Magellan Linux

Contents of /trunk/core/libmad/libmad-0.15.1b-r7.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1325 - (show annotations) (download)
Sat May 2 14:09:29 2009 UTC (15 years ago) by niro
File size: 1406 byte(s)
-moved to 'core'
1 # $Header: /magellan-cvs/smage/libmad/libmad-0.15.1b-r7.smage2,v 1.1 2008/02/13 21:04:41 niro Exp $
2
3 PNAME="libmad"
4 PVER="0.15.1b"
5 PBUILD="r7"
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 src_compile()
27 {
28 cd ${SRCDIR}
29
30 # arch special preprocessor
31 local myconf
32 [[ ${ARCH} = x86_64 ]] && myconf="--enable-fpm=64bit"
33 [[ ${ARCH} = i*86 ]] && myconf="--enable-fpm=intel"
34
35 mconfigure --enable-accuracy --disable-debugging ${myconf} || die
36 mmake || die
37 }
38
39 src_install()
40 {
41 cd ${SRCDIR}
42 mmake DESTDIR=${BINDIR} install || die
43
44 # must be updated with every update
45 cat > ${SRCDIR}/mad.pc << "EOF"
46 prefix=/usr
47 exec_prefix=${prefix}
48 EOF
49
50 # fix libdir
51 echo "libdir=\${exec_prefix}/$(mlibdir)" >> ${SRCDIR}/mad.pc
52
53 cat >> ${SRCDIR}/mad.pc << "EOF"
54 includedir=${prefix}/include
55
56 Name: mad
57 Description: MPEG Audio Decoder
58 Requires:
59 EOF
60 echo "Version: ${PVER}" >> ${SRCDIR}/mad.pc
61 cat >> ${SRCDIR}/mad.pc << "EOF"
62 Libs: -L${libdir} -lmad -lm
63 Cflags: -I${includedir}
64 EOF
65 minstalldir /usr/$(mlibdir)/pkgconfig || die
66 minstallfile mad.pc /usr/$(mlibdir)/pkgconfig || die
67 }

Properties

Name Value
svn:keywords Id