Magellan Linux

Contents of /branches/magellan-next/core/libmad/libmad-0.15.1b-r10.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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