================================ flac:source=1.2.1-2 (previous: 1.2.1-1) cvc rdiff flac -1 /weasel.rpath.org@wgl:3-devel/1.2.1-2 ================================ 1.2.1-2 Filip Brcic (brcha@xxxxxxx) Thu Jan 14 20:11:23 2010 fixed recipe + metadata flac-1.2.1-asneeded.patch: new --- /dev/null +++ flac-1.2.1-asneeded.patch @@ -0,0 +22 @@ +diff -ur flac-1.2.1.orig/src/flac/Makefile.am flac-1.2.1/src/flac/Makefile.am +--- flac-1.2.1.orig/src/flac/Makefile.am 2007-09-11 20:56:51.000000000 +0300 ++++ flac-1.2.1/src/flac/Makefile.am 2007-09-20 19:38:09.000000000 +0300 +@@ -53,6 +53,6 @@ + $(top_builddir)/src/share/utf8/libutf8.la \ + $(top_builddir)/src/libFLAC/libFLAC.la \ + @OGG_LIBS@ \ +- @LIBICONV@ \ ++ @LTLIBICONV@ \ + @MINGW_WINSOCK_LIBS@ \ + -lm +diff -ur flac-1.2.1.orig/src/metaflac/Makefile.am flac-1.2.1/src/metaflac/Makefile.am +--- flac-1.2.1.orig/src/metaflac/Makefile.am 2007-09-11 20:59:25.000000000 +0300 ++++ flac-1.2.1/src/metaflac/Makefile.am 2007-09-20 19:38:25.000000000 +0300 +@@ -49,6 +49,6 @@ + $(top_builddir)/src/share/utf8/libutf8.la \ + $(top_builddir)/src/libFLAC/libFLAC.la \ + @OGG_LIBS@ \ +- @LIBICONV@ \ ++ @LTLIBICONV@ \ + @MINGW_WINSOCK_LIBS@ \ + -lm flac-1.2.1-asm.patch: new --- /dev/null +++ flac-1.2.1-asm.patch @@ -0,0 +80 @@ +diff -urp flac-1.2.1-old/src/libFLAC/ia32/bitreader_asm.nasm flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm +--- flac-1.2.1-old/src/libFLAC/ia32/bitreader_asm.nasm 2007-03-30 02:54:53.000000000 +0200 ++++ flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm 2007-09-27 21:39:45.000000000 +0200 +@@ -140,8 +140,13 @@ cident FLAC__bitreader_read_rice_signed_ + %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE + mov edi, _FLAC__crc16_table + %else ++%ifdef OBJ_FORMAT_elf ++ mov edi, [esp + 16] ; saved ebx (GOT base) ++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff] ++%else + mov edi, FLAC__crc16_table + %endif ++%endif + ;; eax (ax) crc a.k.a. br->read_crc + ;; ebx (bl) intermediate result index into FLAC__crc16_table[] + ;; ecx br->crc16_align +@@ -216,8 +221,13 @@ cident FLAC__bitreader_read_rice_signed_ + %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE + mov edi, _FLAC__crc16_table + %else ++%ifdef OBJ_FORMAT_elf ++ mov edi, [esp + 16] ; saved ebx (GOT base) ++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff] ++%else + mov edi, FLAC__crc16_table + %endif ++%endif + ;; eax (ax) crc a.k.a. br->read_crc + ;; ebx (bl) intermediate result index into FLAC__crc16_table[] + ;; ecx br->crc16_align +@@ -315,8 +325,13 @@ cident FLAC__bitreader_read_rice_signed_ + %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE + call _bitreader_read_from_client_ + %else ++%ifdef OBJ_FORMAT_elf ++ mov ebx, [esp + 20] ; saved ebx (GOT base) ++ call bitreader_read_from_client_ wrt ..plt ++%else + call bitreader_read_from_client_ + %endif ++%endif + pop edx ; /* discard, unused */ + pop ecx ; /* restore */ + mov esi, [ebp + 16] ; cwords = br->consumed_words; +@@ -362,13 +377,20 @@ cident FLAC__bitreader_read_rice_signed_ + mov [ebp + 16], esi ; br->consumed_words = cwords; + mov [ebp + 20], ecx ; br->consumed_bits = cbits; + push ecx ; /* save */ ++ push ebx ; /* save */ + push ebp ; /* push br argument */ + %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE + call _bitreader_read_from_client_ + %else ++%ifdef OBJ_FORMAT_elf ++ mov ebx, [esp + 24] ; saved ebx (GOT base) ++ call bitreader_read_from_client_ wrt ..plt ++%else + call bitreader_read_from_client_ + %endif ++%endif + pop edx ; /* discard, unused */ ++ pop ebx ; /* restore */ + pop ecx ; /* restore */ + mov esi, [ebp + 16] ; cwords = br->consumed_words; + ; ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits; +@@ -437,8 +459,13 @@ cident FLAC__bitreader_read_rice_signed_ + %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE + mov edi, _FLAC__crc16_table + %else ++%ifdef OBJ_FORMAT_elf ++ mov edi, [esp + 24] ; saved ebx (GOT base) ++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff] ++%else + mov edi, FLAC__crc16_table + %endif ++%endif + ;; eax (ax) crc a.k.a. br->read_crc + ;; ebx (bl) intermediate result index into FLAC__crc16_table[] + ;; ecx br->crc16_align flac-1.2.1-gcc-4.3-includes.patch: new --- /dev/null +++ flac-1.2.1-gcc-4.3-includes.patch @@ -0,0 +11 @@ +diff -Naur flac-1.2.1-orig/examples/cpp/encode/file/main.cpp flac-1.2.1/examples/cpp/encode/file/main.cpp +--- flac-1.2.1-orig/examples/cpp/encode/file/main.cpp 2007-09-13 09:58:03.000000000 -0600 ++++ flac-1.2.1/examples/cpp/encode/file/main.cpp 2007-11-18 12:59:45.000000000 -0600 +@@ -30,6 +30,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <cstring> + #include "FLAC++/metadata.h" + #include "FLAC++/encoder.h" + flac-1.2.1-cflags.patch: new --- /dev/null +++ flac-1.2.1-cflags.patch @@ -0,0 +12 @@ +diff -ur flac-1.2.1.orig/configure.in flac-1.2.1/configure.in +--- flac-1.2.1.orig/configure.in 2007-09-13 18:48:42.000000000 +0300 ++++ flac-1.2.1/configure.in 2007-09-20 19:26:05.000000000 +0300 +@@ -301,7 +301,7 @@ + CPPFLAGS="-DNDEBUG $CPPFLAGS" + if test "x$GCC" = xyes; then + CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS" +- CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS" ++ CFLAGS="$CFLAGS" + fi + fi + flac-1.2.1-dontbuild-tests.patch: new --- /dev/null +++ flac-1.2.1-dontbuild-tests.patch @@ -0,0 +78 @@ +Index: flac-1.2.1/src/test_grabbag/cuesheet/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_grabbag/cuesheet/Makefile.am ++++ flac-1.2.1/src/test_grabbag/cuesheet/Makefile.am +@@ -20,7 +20,7 @@ EXTRA_DIST = \ + test_cuesheet.dsp \ + test_cuesheet.vcproj + +-noinst_PROGRAMS = test_cuesheet ++check_PROGRAMS = test_cuesheet + test_cuesheet_SOURCES = \ + main.c + test_cuesheet_LDADD = \ +Index: flac-1.2.1/src/test_grabbag/picture/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_grabbag/picture/Makefile.am ++++ flac-1.2.1/src/test_grabbag/picture/Makefile.am +@@ -20,7 +20,7 @@ EXTRA_DIST = \ + test_picture.dsp \ + test_picture.vcproj + +-noinst_PROGRAMS = test_picture ++check_PROGRAMS = test_picture + test_picture_SOURCES = \ + main.c + test_picture_LDADD = \ +Index: flac-1.2.1/src/test_libFLAC/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_libFLAC/Makefile.am ++++ flac-1.2.1/src/test_libFLAC/Makefile.am +@@ -22,7 +22,7 @@ EXTRA_DIST = \ + + INCLUDES = -I$(top_srcdir)/src/libFLAC/include + +-noinst_PROGRAMS = test_libFLAC ++check_PROGRAMS = test_libFLAC + test_libFLAC_LDADD = \ + $(top_builddir)/src/share/grabbag/libgrabbag.la \ + $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ +Index: flac-1.2.1/src/test_libFLAC++/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_libFLAC++/Makefile.am ++++ flac-1.2.1/src/test_libFLAC++/Makefile.am +@@ -20,7 +20,7 @@ EXTRA_DIST = \ + test_libFLAC++.dsp \ + test_libFLAC++.vcproj + +-noinst_PROGRAMS = test_libFLAC++ ++check_PROGRAMS = test_libFLAC++ + test_libFLAC___LDADD = \ + $(top_builddir)/src/share/grabbag/libgrabbag.la \ + $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ +Index: flac-1.2.1/src/test_seeking/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_seeking/Makefile.am ++++ flac-1.2.1/src/test_seeking/Makefile.am +@@ -24,7 +24,7 @@ AM_CFLAGS = @OGG_CFLAGS@ + + INCLUDES = + +-noinst_PROGRAMS = test_seeking ++check_PROGRAMS = test_seeking + test_seeking_LDADD = \ + $(top_builddir)/src/libFLAC/libFLAC.la \ + @OGG_LIBS@ \ +Index: flac-1.2.1/src/test_streams/Makefile.am +=================================================================== +--- flac-1.2.1.orig/src/test_streams/Makefile.am ++++ flac-1.2.1/src/test_streams/Makefile.am +@@ -20,7 +20,7 @@ EXTRA_DIST = \ + test_streams.dsp \ + test_streams.vcproj + +-noinst_PROGRAMS = test_streams ++check_PROGRAMS = test_streams + test_streams_SOURCES = \ + main.c + test_streams_LDADD = -lm flac-1.2.1-embedded-m4.tar.bz2: new flac-1.2.1-dontbuild-examples.patch: new --- /dev/null +++ flac-1.2.1-dontbuild-examples.patch @@ -0,0 +34 @@ +Index: flac-1.2.1/configure.in +=================================================================== +--- flac-1.2.1.orig/configure.in ++++ flac-1.2.1/configure.in +@@ -255,6 +255,12 @@ AC_DEFINE(FLAC__HAS_OGG) + AH_TEMPLATE(FLAC__HAS_OGG, [define if you have the ogg library]) + fi + ++dnl Build examples? ++AC_ARG_ENABLE(examples, ++ AS_HELP_STRING([--disable-examples], [Don't build examples during make]),, ++ enable_examples="yes") ++AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"]) ++ + dnl check for i18n(internationalization); these are from libiconv/gettext + AM_ICONV + AM_LANGINFO_CODESET +Index: flac-1.2.1/Makefile.am +=================================================================== +--- flac-1.2.1.orig/Makefile.am ++++ flac-1.2.1/Makefile.am +@@ -30,7 +30,11 @@ + + AUTOMAKE_OPTIONS = foreign 1.7 + +-SUBDIRS = doc include m4 man src examples test build obj ++SUBDIRS = doc include m4 man src test build obj ++ ++if EXAMPLES ++SUBDIRS += examples ++endif + + DISTCLEANFILES = libtool-disable-static + flac.recipe: changed Index: flac.recipe ==================================================================== contents(size sha1) inode(mtime) --- flac.recipe /weasel.rpath.org@wgl:3-devel/1.2.1-1 +++ flac.recipe /weasel.rpath.org@wgl:3-devel/1.2.1-2 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Filip Brcic <brcha@xxxxxxx> +# Copyright (c) 2009-2010 Filip Brcic <brcha@xxxxxxx> # Distributed under the terms of the GNU General Public License v3 # @@ -8,43 +8,60 @@ version = '1.2.1' buildRequires = [ - 'docbook-utils:runtime', 'libogg:devel', 'libstdc++:devel', 'nasm:runtime', + 'libogg:devel', 'libstdc++:devel', 'nasm:runtime', + 'autoconf:runtime', 'automake:runtime', 'libtool:runtime' ] + shortDesc = 'Free Lossless Audio Codec' + longDesc = """ +FLAC stands for Free Lossless Audio Codec. It's an audio format +similar to Ogg Vorbis (libvorbis) and MP3 (LAME), but lossless, +meaning that audio is compressed in FLAC without any loss in quality. +Naturally, because FLAC is lossless it does not compress as well as +Vorbis or MP3 (which are lossy), but unlike Vorbis and MP3, +FLAC-encoded files can be safely converted into other audio codecs +(including Vorbis and MP3) - precisely because no data was lost when +the file was converted into FLAC in the first place. As such, even if +you don't have the disk space to have your audio files in FLAC for +normal use, FLAC works quite well for archiving them. That way you can +convert them into whatever audio codec you may need in the future. Of +course, if you do have the disk space, FLAC works as well as - or even +better than - Vorbis and MP3 when it comes to audio playback. +""" + url = 'http://flac.sourceforge.net/' + licenses = [ 'GPL-2', 'LGPL-2' ] + categories = [ 'Media/Libraries' ] + def unpack(r): - r.Description(shortDesc='Free Lossless Audio Codec', - longDesc="""FLAC stands for Free Lossless Audio Codec. It's an audio format similar to Ogg Vorbis (libvorbis) and MP3 (LAME), but lossless, meaning that audio is compressed in FLAC without any loss in quality. -Naturally, because FLAC is lossless it does not compress as well as Vorbis or MP3 (which are lossy), but unlike Vorbis and MP3, FLAC-encoded files can be safely converted into other audio codecs (including Vorbis and MP3) - precisely because no data was lost when the file was converted into FLAC in the first place. As such, even if you don't have the disk space to have your audio files in FLAC for normal use, FLAC works quite well for archiving them. That way you can convert them into whatever audio codec you may need in the future. Of course, if you do have the disk space, FLAC works as well as - or even better than - Vorbis and MP3 when it comes to audio playback.""") - r.PackageURL('http://flac.sourceforge.net/') - r.Licenses('GPL', 'LGPL', 'FDL', 'Xiph') r.addArchive('http://downloads.xiph.org/releases/flac/') + r.addArchive('mirror://gentoo/%(name)s-%(version)s-embedded-m4.tar.bz2', + dir='m4') - r.extraConfig = '--enable-sse --disable-rpath' + for p in [ 'flac-1.2.1-asneeded.patch', + 'flac-1.2.1-cflags.patch', + 'flac-1.2.1-asm.patch', + 'flac-1.2.1-dontbuild-tests.patch', + 'flac-1.2.1-dontbuild-examples.patch', + 'flac-1.2.1-gcc-4.3-includes.patch', + ]: + r.addPatch(p) - r.Environment('LIBS', '-lm') - - if Arch.x86_64: - # First build 32bit version - macros32 = r.macros.copy() - macros32.cc = '"gcc -m32"' - macros32.cxx = '"g++ -m32"' - macros32.ld = '"ld -m elf_i386"' - macros32.libdir = '%(prefix)s/lib' - - r.Run('cp -a %(builddir)s %(builddir)s/../32bit') - - r.Configure(r.extraConfig, dir='../32bit', overrideMacros=macros32, - preConfigure='USE_ARCH=32') - r.Run('sed -i "33i\#include <string.h>" ../32bit/examples/cpp/encode/file/main.cpp') - r.Make(dir='../32bit', overrideMacros=macros32, preMake='USE_ARCH=32') - r.MakeInstall(dir='../32bit', overrideMacros=macros32, preMake='USE_ARCH=32') - - r.NormalizePkgConfig(exceptions='.*') + r.Autoreconf(m4Dir='m4') def configure(r): - r.Configure(r.extraConfig) - r.Run('sed -i "33i\#include <string.h>" examples/cpp/encode/file/main.cpp') + enableSSE = '' + if Arch.x86.sse or Arch.x86_64: + enableSSE = ' --enable-sse' + enable3dnow = '' + if Arch.x86.threednow or Arch.x86_64.threednow: + enable3dnow = ' --enable-3dnow' - def policy(r): - r.Run("""sed -i '/#include "config.h"/d' %(destdir)s%(includedir)s/FLAC/export.h""") - + r.Configure( + ' --enable-ogg' + + enableSSE + enable3dnow + + ' --enable-cpplibs' + ' --disable-examples' + ' --disable-doxygen-docs' + ' --disable-dependency-tracking' + ' --disable-xmms-plugin' + ) Committed by: brcha