1 |
OK Robert, you can test this for me. It fixes the mcpu flag problem, |
2 |
and copies in your CFLAGS as it should. |
3 |
WARNING: this is an untested ebuild (well, it built on my iMac OK, but |
4 |
so did the original). |
5 |
Cut and paste below this line if the attachment doesn't get through: |
6 |
--------- |
7 |
# Copyright 1999-2002 Gentoo Technologies, Inc. |
8 |
# Distributed under the terms of the GNU General Public License, v2 or later |
9 |
# Author Achim Gottinger <achim@g.o> |
10 |
# mpg123-0.59r-r1.ebuild,v 1.3 2002/05/09 23:48:34 blauwers Exp |
11 |
|
12 |
S=${WORKDIR}/${P} |
13 |
|
14 |
DESCRIPTION="Real Time mp3 player" |
15 |
SRC_URI="http://www.mpg123.de/mpg123/${P}.tar.gz" |
16 |
HOMEPAGE="http://www.mpg123.de/" |
17 |
|
18 |
DEPEND="virtual/glibc" |
19 |
|
20 |
src_unpack () { |
21 |
unpack ${A} |
22 |
cd ${S} |
23 |
patch -p1 < ${FILESDIR}/${P}-sparc.diff |
24 |
cp Makefile Makefile.orig |
25 |
sed -e "s:-O2 -m486:${CFLAGS}:" \ |
26 |
-e "s:-O2 -mcpu=ppc:$CFLAGS:g" Makefile.orig > Makefile |
27 |
} |
28 |
|
29 |
src_compile() { |
30 |
local MAKEOPT="" |
31 |
local MAKESTYLE="" |
32 |
|
33 |
SYSTEM_ARCH=`echo $ARCH |\ |
34 |
sed -e s/[i]*.86/i386/ \ |
35 |
-e s/sun.*/sparc/ \ |
36 |
-e s/arm.*/arm/ \ |
37 |
-e s/sa110/arm/` |
38 |
|
39 |
if [ -z "$SYSTEM_ARCH" ] |
40 |
then |
41 |
SYSTEM_ARCH=`uname -m |\ |
42 |
sed -e s/[i]*.86/i386/ -e s/arm.*/arm/ -e s/sa110/arm/` |
43 |
fi |
44 |
|
45 |
case $SYSTEM_ARCH in |
46 |
ppc) |
47 |
MAKESTYLE="-ppc";; |
48 |
i386) |
49 |
MAKESTYLE="-i486";; |
50 |
sparc64) |
51 |
MAKESTYLE="-sparc";; |
52 |
sparc) |
53 |
MAKESTYLE="-sparc";; |
54 |
arm) |
55 |
;; |
56 |
esac |
57 |
|
58 |
make linux${MAKESTYLE}${MAKEOPT} || die |
59 |
} |
60 |
|
61 |
src_install () { |
62 |
into /usr |
63 |
dobin mpg123 |
64 |
doman mpg123.1 |
65 |
dodoc BENCHMARKING BUGS CHANGES COPYING JUKEBOX README* TODO |
66 |
} |