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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Thu Oct 21 20:35:57 2004 UTC (15 years ago) by eradicator
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +1 -1 lines
FILE REMOVED
Revbump for security bug #68343.  Moved patches out of files and onto mirrors.  Cleaned up patches.

1 # Copyright 1999-2004 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-r3.ebuild,v 1.12 2004/09/02 18:13:04 pvdabeel Exp $
4
5 inherit eutils
6
7 IUSE="mmx 3dnow esd nas oss"
8
9 DESCRIPTION="Real Time mp3 player"
10 HOMEPAGE="http://www.mpg123.de/"
11 SRC_URI="http://www.mpg123.de/mpg123/${PN}-pre${PV}.tar.gz"
12
13 LICENSE="as-is"
14 SLOT="0"
15 KEYWORDS="x86 ~ia64 ~amd64 ppc sparc ~alpha hppa ~mips"
16
17 RDEPEND="virtual/libc
18 esd? ( media-sound/esound )
19 nas? ( media-libs/nas )"
20
21 # alsa-1 b0rks and it's not a simple fix
22 # alsa? ( media-libs/alsa-lib )"
23
24 DEPEND="${RDEPEND}
25 >=sys-apps/sed-4"
26
27 PROVIDE="virtual/mpg123"
28
29 S=${WORKDIR}/${PN}
30
31 src_unpack() {
32 unpack ${A} && cd ${S} || die "unpack failed"
33
34 # Apply security fixes
35 epatch ${FILESDIR}/${P}-security.diff
36 epatch ${FILESDIR}/${P}-heapfix.diff
37
38 # Add linux-generic target
39 epatch ${FILESDIR}/${PV}-generic.patch
40
41 # Always apply this patch, even though it's particularly for
42 # amd64. It's good to understand the distinction between int and
43 # long: ANSI says that int should be 32-bits, long should be the
44 # native size of the CPU (usually the same as a pointer).
45 epatch ${FILESDIR}/${P}-amd64.patch
46
47 # Fix Makefile missing quotes
48 epatch ${FILESDIR}/${P}-Makefile.patch
49
50 # Don't force gcc since icc/ccc might be possible
51 sed -i -e "s|CC=gcc||" Makefile
52
53 # Fix a glitch in the x86 related section of the Makefile
54 sed -i -e "s:-m486::g" Makefile
55 # Fix a glitch in the ppc-related section of the Makefile
56 sed -i -e "s:-mcpu=ppc::" Makefile
57 # Make sure we use our CFLAGS
58 sed -i -e "s:-O2::g" Makefile
59 }
60
61 src_compile() {
62 mkdir gentoo-bin
63
64 # The last one in $styles is the default
65 local styles
66
67 use nas && styles="${styles} -nas"
68 use oss && styles="${styles} -generic"
69
70 case $ARCH in
71 ppc*)
72 use esd && styles="${styles} -ppc-esd"
73 use oss && styles="${styles} -ppc"
74
75 [ -z "${styles}" ] && styles="-ppc"
76 ;;
77 x86)
78 use esd && styles="${styles} -esd"
79 use esd && use 3dnow && styles="${styles} -3dnow-esd"
80 use oss && styles="${styles} -i486"
81 use oss && use mmx && styles="${styles} -mmx"
82 use oss && use 3dnow && styles="${styles} -3dnow"
83 # use alsa && styles="${styles} -alsa"
84 # use alsa && use 3dnow && styles="${styles} -3dnow-alsa"
85
86 [ -z "${styles}" ] && styles="-generic"
87 ;;
88 sparc*)
89 use esd && styles="${styles} -sparc-esd"
90 styles="${styles} -sparc"
91 ;;
92 amd64)
93 use esd && styles="${styles} -x86_64-esd"
94 use oss && styles="${styles} -x86_64"
95 # use alsa && styles="${styles} -x86_64-alsa"
96
97 [ -z "${styles}" ] && styles="-x86_64"
98 ;;
99 alpha)
100 use esd && styles="${styles} -alpha-esd"
101 use oss && styles="${styles} -alpha"
102 # use alsa && styles="${styles} -alpha-alsa"
103
104 [ -z "${styles}" ] && styles="-generic"
105 ;;
106 mips|hppa)
107 # use alsa && styles="${styles} -mips-alsa"
108
109 [ -z "${styles}" ] && styles="-generic"
110 ;;
111 *)
112 eerror "No support has been added for your architecture."
113 exit 1
114 ;;
115 esac
116
117 for style in ${styles};
118 do
119 make clean linux${style} CFLAGS="${CFLAGS}" || die
120 mv mpg123 gentoo-bin/mpg123${style}
121 [ -L "gentoo-bin/mpg123" ] && rm gentoo-bin/mpg123
122 ln -s mpg123${style} gentoo-bin/mpg123
123 done
124 }
125
126 src_install() {
127 dodir /usr
128 cp -dR gentoo-bin ${D}/usr/bin
129 doman mpg123.1
130 dodoc BENCHMARKING BUGS CHANGES COPYING JUKEBOX README* TODO
131 }

  ViewVC Help
Powered by ViewVC 1.1.20