summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-02-08 04:51:50 +0000
committerAron Griffis <agriffis@gentoo.org>2004-02-08 04:51:50 +0000
commitec3fc5c5f9427d0392f5f2a38cf56d7f68a83b70 (patch)
tree656aa637b3405eaefc3b4afca8aedb0a83b018d1 /media-sound/mpg123
parentppc (diff)
downloadgentoo-2-ec3fc5c5f9427d0392f5f2a38cf56d7f68a83b70.tar.gz
gentoo-2-ec3fc5c5f9427d0392f5f2a38cf56d7f68a83b70.tar.bz2
gentoo-2-ec3fc5c5f9427d0392f5f2a38cf56d7f68a83b70.zip
Majorly clean up the arch support in this ebuild
Diffstat (limited to 'media-sound/mpg123')
-rw-r--r--media-sound/mpg123/ChangeLog5
-rw-r--r--media-sound/mpg123/mpg123-0.59s-r1.ebuild66
2 files changed, 29 insertions, 42 deletions
diff --git a/media-sound/mpg123/ChangeLog b/media-sound/mpg123/ChangeLog
index 0637c1be6fd2..5146c5e6be3b 100644
--- a/media-sound/mpg123/ChangeLog
+++ b/media-sound/mpg123/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for media-sound/mpg123
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/ChangeLog,v 1.24 2004/01/12 00:21:56 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/ChangeLog,v 1.25 2004/02/08 04:51:50 agriffis Exp $
+
+ 07 Feb 2004; Aron Griffis <agriffis@gentoo.org> mpg123-0.59s-r1.ebuild:
+ Majorly clean up the arch support in this ebuild
11 Jan 2004; Aron Griffis <agriffis@gentoo.org> mpg123-0.59s-r1.ebuild:
stable on alpha and ia64
diff --git a/media-sound/mpg123/mpg123-0.59s-r1.ebuild b/media-sound/mpg123/mpg123-0.59s-r1.ebuild
index 571bfc93c4ec..8aa01c35fd93 100644
--- a/media-sound/mpg123/mpg123-0.59s-r1.ebuild
+++ b/media-sound/mpg123/mpg123-0.59s-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-0.59s-r1.ebuild,v 1.5 2004/01/12 00:21:56 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-0.59s-r1.ebuild,v 1.6 2004/02/08 04:51:50 agriffis Exp $
inherit eutils
@@ -17,59 +17,43 @@ DEPEND="virtual/glibc
>=sys-apps/sed-4"
src_unpack () {
- unpack ${A}
- cd ${S}
+ unpack ${A} && cd ${S} || die "unpack failed"
# Apply security fix
epatch ${FILESDIR}/${P}-security.diff
+
+ # Add linux-generic target
epatch ${FILESDIR}/${PV}-generic.patch
- use amd64 && epatch ${FILESDIR}/mpg123-0.59s-amd64.patch
- sed -i \
- -e "s:-O2 -m486:${CFLAGS}:" \
- -e "s:-O2 -mcpu=ppc:${CFLAGS}:g" Makefile
-}
-src_compile() {
- local MAKEOPT=""
- local MAKESTYLE=""
+ # Always apply this patch, even though it's particularly for
+ # amd64. It's good to understand the distinction between int and
+ # long: ANSI says that int should be 32-bits, long should be the
+ # native size of the CPU (usually the same as a pointer).
+ epatch ${FILESDIR}/mpg123-0.59s-amd64.patch
- SYSTEM_ARCH=`echo $ARCH |\
- sed -e s/[i]*.86/i386/ \
- -e s/sun.*/sparc/ \
- -e s/arm.*/arm/ \
- -e s/sa110/arm/`
+ # Don't force gcc since icc/ccc might be possible
+ sed -i -e "s|CC=gcc||" Makefile
+}
- if [ -z "$SYSTEM_ARCH" ]
- then
- SYSTEM_ARCH=`uname -m |\
- sed -e s/[i]*.86/i386/ -e s/arm.*/arm/ -e s/sa110/arm/`
- fi
+src_compile() {
+ local style=""
- case $SYSTEM_ARCH in
+ case $ARCH in
ppc)
- MAKESTYLE="-ppc";;
- i386)
- if [ -z "use mmx" ]
- then
- MAKESTYLE="-mmx"
- else
- MAKESTYLE="-i486"
- fi;;
- sparc64)
- MAKESTYLE="-sparc";;
- sparc)
- MAKESTYLE="-sparc";;
+ style="-ppc";;
+ x86)
+ use mmx && style="-mmx" || style="-i486";;
+ sparc*)
+ style="-sparc";;
amd64|x86_64)
- MAKESTYLE="-x86_64";;
+ style="-x86_64";;
alpha)
- MAKESTYLE="-alpha";;
- arm)
- ;;
- hppa)
- MAKESTYLE="-generic";;
+ style="-alpha";;
+ arm|hppa|ia64)
+ style="-generic";;
esac
- make linux${MAKESTYLE}${MAKEOPT} || die
+ make linux${style} RPM_OPT_FLAGS="${CFLAGS}" || die
}
src_install () {