Annotation of /branches/magellan-next/core/libmad/libmad-0.15.1b-r11.smage2
Parent Directory | Revision Log
Revision 8288 -
(hide annotations)
(download)
Thu Jul 14 10:51:58 2011 UTC (13 years, 2 months ago) by niro
File size: 1688 byte(s)
Thu Jul 14 10:51:58 2011 UTC (13 years, 2 months ago) by niro
File size: 1688 byte(s)
-fixed build with libtool-2.4
1 | niro | 8287 | # $Id$ |
2 | |||
3 | PNAME="libmad" | ||
4 | PVER="0.15.1b" | ||
5 | PBUILD="r11" | ||
6 | |||
7 | PCATEGORIE="media-libs" | ||
8 | |||
9 | DESCRIPTION="MAD is a high-quality MPEG audio decoder." | ||
10 | HOMEPAGE="http://www.underbit.com/products/mad/" | ||
11 | |||
12 | DEPEND=">= virtual/glibc" | ||
13 | |||
14 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
15 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
16 | |||
17 | niro | 8288 | sminclude mtools |
18 | niro | 8287 | |
19 | SRC_URI=( | ||
20 | ftp://ftp.mars.org/pub/mpeg/${SRCFILE} | ||
21 | sourceforge://mad/${SRCFILE} | ||
22 | mirror://${PNAME}/${SRCFILE} | ||
23 | ) | ||
24 | |||
25 | UP2DATE="updatecmd_sourceforge mad libmad" | ||
26 | |||
27 | niro | 8288 | src_prepare() |
28 | niro | 8287 | { |
29 | niro | 8288 | munpack ${SRCFILE} || die |
30 | niro | 8287 | cd ${SRCDIR} |
31 | |||
32 | niro | 8288 | # fix libtool |
33 | rm ${SRCDIR}/ltmain.sh || die | ||
34 | libtoolize --verbose --install --force || die | ||
35 | |||
36 | niro | 8287 | # remove unsupported cflags with gcc-4.3 |
37 | sed -i "s:-fforce-mem::g" configure.ac || die | ||
38 | # create missing files | ||
39 | touch NEWS AUTHORS ChangeLog || die | ||
40 | niro | 8288 | autoreconf --force --install --verbose || die |
41 | } | ||
42 | niro | 8287 | |
43 | niro | 8288 | src_compile() |
44 | { | ||
45 | cd ${SRCDIR} | ||
46 | |||
47 | niro | 8287 | # arch special preprocessor |
48 | local myconf | ||
49 | [[ ${ARCH} = x86_64 ]] && myconf="--enable-fpm=64bit" | ||
50 | [[ ${ARCH} = i*86 ]] && myconf="--enable-fpm=intel" | ||
51 | |||
52 | mconfigure --enable-accuracy --disable-debugging ${myconf} || die | ||
53 | mmake || die | ||
54 | } | ||
55 | |||
56 | src_install() | ||
57 | { | ||
58 | cd ${SRCDIR} | ||
59 | mmake DESTDIR=${BINDIR} install || die | ||
60 | |||
61 | # must be updated with every update | ||
62 | cat > ${SRCDIR}/mad.pc << "EOF" | ||
63 | prefix=/usr | ||
64 | exec_prefix=${prefix} | ||
65 | EOF | ||
66 | |||
67 | # fix libdir | ||
68 | echo "libdir=\${exec_prefix}/$(mlibdir)" >> ${SRCDIR}/mad.pc | ||
69 | |||
70 | cat >> ${SRCDIR}/mad.pc << "EOF" | ||
71 | includedir=${prefix}/include | ||
72 | |||
73 | Name: mad | ||
74 | Description: MPEG Audio Decoder | ||
75 | Requires: | ||
76 | EOF | ||
77 | echo "Version: ${PVER}" >> ${SRCDIR}/mad.pc | ||
78 | cat >> ${SRCDIR}/mad.pc << "EOF" | ||
79 | Libs: -L${libdir} -lmad -lm | ||
80 | Cflags: -I${includedir} | ||
81 | EOF | ||
82 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
83 | minstallfile mad.pc /usr/$(mlibdir)/pkgconfig || die | ||
84 | } |