/[gentoo-x86]/media-sound/mpg123/mpg123-0.59s-r11.ebuild
Gentoo

Contents of /media-sound/mpg123/mpg123-0.59s-r11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Thu Feb 21 17:26:01 2008 UTC (11 years, 8 months ago) by drac
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.4.4)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-0.59s-r11.ebuild,v 1.15 2008/01/17 19:09:51 grobian Exp $
4
5 inherit eutils toolchain-funcs
6
7 PATCH_VER="1.6"
8 S="${WORKDIR}/${PN}"
9
10 DESCRIPTION="Real Time mp3 player"
11 HOMEPAGE="http://www.mpg123.de/"
12 SRC_URI="http://www.mpg123.de/mpg123/${PN}-pre${PV}.tar.gz
13 mirror://gentoo/${P}-gentoo-${PATCH_VER}.tar.bz2"
14
15 LICENSE="as-is"
16 SLOT="0"
17
18 KEYWORDS="mips"
19 IUSE="mmx 3dnow esd nas oss"
20
21 RDEPEND="esd? ( media-sound/esound )
22 nas? ( media-libs/nas )"
23
24 # alsa-1 b0rks and it's not a simple fix
25 # alsa? ( media-libs/alsa-lib )"
26
27 DEPEND="${RDEPEND}
28 dev-lang/perl"
29
30 PROVIDE="virtual/mpg123"
31
32 PATCHDIR="${WORKDIR}/patches"
33
34 src_unpack() {
35 unpack ${A}
36
37 cd "${S}"
38
39 EPATCH_SUFFIX="patch"
40 epatch ${PATCHDIR}
41
42 # Bug #70592; terminal line settings should only be set once; not everytime a new song starts
43 epatch "${FILESDIR}/${PV}-set-terminal-line-settings-once.patch"
44
45 # Bug #87539; user CFLAGS are not respected on amd64
46 epatch "${FILESDIR}/${PN}-respectusercflags.patch"
47
48 sed -i "s:${PV}-mh4:${PVR}:" version.h
49
50 epatch "${FILESDIR}/${P}-gmake-3.81.patch"
51
52 # Bug #130577
53 perl -e 'my @text = <STDIN>; my $str = join "",@text; $str =~ s/\\\n//gs; print $str' < Makefile > Makefile.fixed
54 mv Makefile.fixed Makefile
55 }
56
57 src_compile() {
58 mkdir gentoo-bin
59
60 # The last one in $styles is the default
61 local styles
62
63 use nas && styles="${styles} -nas"
64 use oss && styles="${styles} -generic"
65 atype="linux"
66
67 case $ARCH in
68 ppc64)
69 use esd && styles="${styles} -ppc64-esd"
70 use oss && styles="${styles} -ppc64"
71
72 [[ -z "${styles}" ]] && styles="-ppc64"
73 ;;
74 ppc)
75 use esd && styles="${styles} -ppc-esd"
76 use oss && styles="${styles} -ppc"
77
78 [ -z "${styles}" ] && styles="-ppc"
79 ;;
80 x86)
81 use esd && styles="${styles} -esd"
82 use esd && use 3dnow && styles="${styles} -3dnow-esd"
83 use oss && styles="${styles} -i486"
84 use oss && use mmx && styles="${styles} -mmx"
85 use oss && use 3dnow && styles="${styles} -3dnow"
86 # use alsa && styles="${styles} -alsa"
87 # use alsa && use 3dnow && styles="${styles} -3dnow-alsa"
88
89 [[ -z "${styles}" ]] && styles="-generic"
90 ;;
91 sparc*)
92 use esd && styles="${styles} -sparc-esd"
93 styles="${styles} -sparc -generic"
94 ;;
95 amd64)
96 use esd && styles="${styles} -x86_64-esd"
97 use oss && styles="${styles} -x86_64"
98 # use alsa && styles="${styles} -x86_64-alsa"
99
100 [[ -z "${styles}" ]] && styles="-x86_64"
101 ;;
102 alpha)
103 use esd && styles="${styles} -alpha-esd"
104 use oss && styles="${styles} -alpha"
105 # use alsa && styles="${styles} -alpha-alsa"
106
107 [[ -z "${styles}" ]] && styles="-generic"
108 ;;
109 mips|hppa|ia64)
110 # use alsa && styles="${styles} -mips-alsa"
111
112 [[ -z "${styles}" ]] && styles="-generic"
113 ;;
114 *)
115 eerror "No support has been added for your architecture."
116 exit 1
117 ;;
118 esac
119
120 for style in ${styles};
121 do
122 emake -j1 clean ${atype}${style} CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die
123 mv mpg123 gentoo-bin/mpg123${style}
124 [[ -L "gentoo-bin/mpg123" ]] && rm gentoo-bin/mpg123
125 ln -s mpg123${style} gentoo-bin/mpg123
126 done
127 }
128
129 src_install() {
130 dodir /usr
131 cp -R gentoo-bin "${D}/usr/bin"
132 doman mpg123.1
133 dodoc BENCHMARKING BUGS CHANGES JUKEBOX README* TODO
134 }

  ViewVC Help
Powered by ViewVC 1.1.20