Contents of /branches/magellan-next/core/libmad/libmad-0.15.1b-r11.smage2
Parent Directory | Revision Log
Revision 8287 -
(show annotations)
(download)
Thu Jul 14 09:41:58 2011 UTC (13 years, 2 months ago) by niro
File size: 1539 byte(s)
Thu Jul 14 09:41:58 2011 UTC (13 years, 2 months ago) by niro
File size: 1539 byte(s)
auto added: ver bump to 0.15.1b-r11
1 | # $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 | sminclude mtools mbuild |
18 | |
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 | src_compile() |
28 | { |
29 | cd ${SRCDIR} |
30 | |
31 | # remove unsupported cflags with gcc-4.3 |
32 | sed -i "s:-fforce-mem::g" configure.ac || die |
33 | # create missing files |
34 | touch NEWS AUTHORS ChangeLog || die |
35 | autoreconf --force --install --verbose || die |
36 | |
37 | # arch special preprocessor |
38 | local myconf |
39 | [[ ${ARCH} = x86_64 ]] && myconf="--enable-fpm=64bit" |
40 | [[ ${ARCH} = i*86 ]] && myconf="--enable-fpm=intel" |
41 | |
42 | mconfigure --enable-accuracy --disable-debugging ${myconf} || die |
43 | mmake || die |
44 | } |
45 | |
46 | src_install() |
47 | { |
48 | cd ${SRCDIR} |
49 | mmake DESTDIR=${BINDIR} install || die |
50 | |
51 | # must be updated with every update |
52 | cat > ${SRCDIR}/mad.pc << "EOF" |
53 | prefix=/usr |
54 | exec_prefix=${prefix} |
55 | EOF |
56 | |
57 | # fix libdir |
58 | echo "libdir=\${exec_prefix}/$(mlibdir)" >> ${SRCDIR}/mad.pc |
59 | |
60 | cat >> ${SRCDIR}/mad.pc << "EOF" |
61 | includedir=${prefix}/include |
62 | |
63 | Name: mad |
64 | Description: MPEG Audio Decoder |
65 | Requires: |
66 | EOF |
67 | echo "Version: ${PVER}" >> ${SRCDIR}/mad.pc |
68 | cat >> ${SRCDIR}/mad.pc << "EOF" |
69 | Libs: -L${libdir} -lmad -lm |
70 | Cflags: -I${includedir} |
71 | EOF |
72 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
73 | minstallfile mad.pc /usr/$(mlibdir)/pkgconfig || die |
74 | } |