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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sat Oct 30 23:31:17 2004 UTC (16 years, 1 month ago) by eradicator
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Removing insecure versions.

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

  ViewVC Help
Powered by ViewVC 1.1.20