lame-3.99.5.recipe revision ae94b127
1SUMMARY="A high quality MPEG Audio Layer III (MP3) encoder"
2DESCRIPTION="Following the great history of GNU naming, LAME originally stood \
3for LAME Ain't an Mp3 Encoder. LAME is an educational tool to be used for \
4learning about MP3 encoding. The goal of the LAME project is to use the open \
5source model to improve the psycho acoustics, noise shaping and speed of MP3.
6Many popular ripping and encoding programs include the LAME encoding engine.
7
8LAME features:
9
10- Many improvements in quality and speed over ISO reference software.
11- MPEG1,2 and 2.5 layer III encoding.
12- CBR (constant bitrate) and two types of variable bitrate, VBR and ABR.
13- Encoding engine can be compiled as a shared library (Linux/UNIX), DLL, \
14Directshow filter or ACM codec (Windows).
15- Free format encoding and decoding.
16- GPSYCHO: a GPL'd psycho acoustic and noise shaping model.
17- Powerful and easy to use presets.
18- Quality better than all other encoders at most bitrates.
19- Fast! Encodes faster than real time on a PentiumII 266mhz at highest \
20quality mode.
21- MP3x: a GTK/X-Window MP3 frame analyzer for both .mp3 and unencoded audio \
22files."
23HOMEPAGE="http://lame.sourceforge.net/"
24COPYRIGHT="1998-2012 Mike Cheng et al."
25LICENSE="GNU LGPL v2"
26REVISION="9"
27SOURCE_URI="http://downloads.sourceforge.net/project/lame/lame/3.99/lame-$portVersion.tar.gz"
28CHECKSUM_SHA256="24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff"
29PATCHES="lame-$portVersion.patchset"
30ADDITIONAL_FILES="
31	gtk.m4
32	lib-link.m4
33	lib-ld.m4
34	lib-prefix.m4
35	"
36
37ARCHITECTURES="x86 x86_gcc2 x86_64"
38SECONDARY_ARCHITECTURES="x86_gcc2 x86"
39
40PROVIDES="
41	lame$secondaryArchSuffix = $portVersion compat >= 1
42	lib:libmp3lame$secondaryArchSuffix = 0.0.0 compat >= 0
43	"
44if [ -z "$secondaryArchSuffix" ]; then
45	PROVIDES="$PROVIDES
46		cmd:lame = $portVersion compat >= 1
47		"
48fi
49REQUIRES="
50	haiku$secondaryArchSuffix
51	lib:libiconv$secondaryArchSuffix
52	lib:libncurses$secondaryArchSuffix
53	"
54
55PROVIDES_devel="
56	lame${secondaryArchSuffix}_devel = $portVersion
57	devel:libmp3lame${secondaryArchSuffix} = 0.0.0 compat >= 0
58	"
59REQUIRES_devel="
60	lame${secondaryArchSuffix} == $portVersion base
61	"
62
63BUILD_REQUIRES="
64	haiku${secondaryArchSuffix}_devel
65	devel:libiconv$secondaryArchSuffix
66	devel:libncurses$secondaryArchSuffix
67	"
68BUILD_PREREQUIRES="
69	cmd:aclocal_1.13
70	cmd:autoconf
71	cmd:automake_1.13
72	cmd:gcc${secondaryArchSuffix}
73	cmd:ld${secondaryArchSuffix}
74	cmd:libtoolize$secondaryArchSuffix
75	cmd:make
76	cmd:m4
77	cmd:sed
78	cmd:find
79	"
80
81BUILD()
82{
83	mkdir -p m4
84# configure checks for gtk, but they didn't include the gtk.m4 so we need to.
85	cp $portDir/additional-files/gtk.m4 m4/gtk.m4
86	cp `aclocal --print-ac-dir`/iconv.m4 m4/iconv.m4
87	cp $portDir/additional-files/lib-link.m4 m4/lib-link.m4
88	cp $portDir/additional-files/lib-ld.m4 m4/lib-ld.m4
89	cp $portDir/additional-files/lib-prefix.m4 m4/lib-prefix.m4
90
91	sed -i 's/AM_C_PROTOTYPES//' configure.in
92	sed -i 's/AUTOMAKE_OPTIONS = foreign $(top_srcdir)\/ansi2knr//' \
93		libmp3lame/i386/Makefile.am
94	sed -i 's/AUTOMAKE_OPTIONS = foreign ansi2knr//' \
95		doc/man/Makefile.am
96	sed -i 's/AUTOMAKE_OPTIONS = foreign ansi2knr//' \
97		doc/html/Makefile.am
98	sed -i 's/HAVE_SNDFILE="yes"/HAVE_SNDFILE="no"/g' configure.in
99	sed -i 's/PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, HAVE_SNDFILE="no", HAVE_SNDFILE="no")/HAVE_SNDFILE="no"/' configure.in
100	sed -i 's/@SNDFILE_CFLAGS@/-ffast-math/g' frontend/*
101	sed -i 's/@SNDFILE_LIBS@/-ffast-math/g' frontend/*
102
103	libtoolize --force --copy --install
104	aclocal-1.13 -I m4
105	automake-1.13
106	autoconf
107	runConfigure ./configure
108	make $jobArgs
109}
110
111INSTALL()
112{
113	make install
114	if [ -n "$secondaryArchSuffix" ]; then
115		rm $binDir/lame
116	fi
117
118	rm $libDir/libmp3lame.la
119
120	# prepare devel/lib
121	prepareInstalledDevelLibs libmp3lame
122	fixPkgconfig
123
124	# devel package
125	packageEntries devel $developDir
126}
127