Projects
Essentials
faac
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
faac.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Jul 31 23:42:21 UTC 2013 - i@margueirte.su + +- build against external mp4v2. + * bundled mpeg4ip's mp4v2 is too old to compile with glibc 2.10+. + +------------------------------------------------------------------- Tue Jan 24 10:50:36 UTC 2012 - reddwarf@opensuse.org - run spec-cleaner
View file
faac.spec
Changed
@@ -1,6 +1,19 @@ -# Packmangroup: Multimedia -# Packmanpackagename: faac -# Packman: Manfred Tremmel +# +# spec file for package faac +# +# Copyright (c) 2013 Marguerite Su <marguerite@opensuse.org> +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.links2linux.org/ +# %define major 0 @@ -9,24 +22,26 @@ Name: faac Version: 1.28 -Release: 3 -License: Free to use but restricted +Release: 0 +# Original Code was free to use but restricted. Modifications are LGPL-2.1+ +License: SuSE-Freeware and LGPL-2.1+ Summary: Frontend for encoding MPEG2/4 AAC -Summary(de): Frontend zum Encodieren von MPEG2/4 AAC Url: http://www.audiocoding.com/ Group: Productivity/Multimedia/Video/Editors and Convertors Source0: faac-%{version}.tar.bz2 Source99: baselibs.conf -Patch0: faac_configure_in.patch -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gcc +# PATCH-FIX-UPSTREAM marguerite@opensuse.org - port to use external mp4v2 2.0 +Patch: faac-1.28-external-mp4v2-2.0.patch +# PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix strict-aliasing-punning warning. +Patch1: faac-1.28-strict-aliasing-punning.patch +BuildRequires: gcc-c++ BuildRequires: libmp4v2-devel # Here only because of the configure mp4v2 detection BuildRequires: libstdc++-devel BuildRequires: libtool Requires: %{libname} = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build +Summary(de): Frontend zum Encodieren von MPEG2/4 AAC %description FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely @@ -37,9 +52,10 @@ %package -n %{libname} Summary: Shared library part of faac -Summary(de): Bibliotheken zu faac Group: System/Libraries Provides: %{lib} = %{version} +Obsoletes: %{lib} < %{version} +Summary(de): Bibliotheken zu faac %description -n %{libname} FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely @@ -52,11 +68,13 @@ %package -n %{lib}-devel Summary: Header files and static library for the faac library -Summary(de): Header Dateien und statische Bibliotheken für die faac Bibliothek Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} Provides: %{libname}-devel = %{version} -Provides: faac-devel = %{version} +Provides: %{name}-devel = %{version} +Obsoletes: %{libname}-devel < %{version} +Obsoletes: %{name}-devel < %{version} +Summary(de): Header Dateien und statische Bibliotheken für die faac Bibliothek %description -n %{lib}-devel FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely @@ -69,16 +87,16 @@ %prep %setup -qn faac-%{version} -%patch0 +%patch -p1 +%patch1 -p1 %build -autoreconf -vif -export LDFLAGS="-lmp4v2" +./bootstrap %configure --with-mp4v2 --enable-shared --disable-static make %{?_smp_mflags} %install -%makeinstall +%make_install rm -f %{buildroot}/%{_libdir}/*.la %post -n %{libname} -p /sbin/ldconfig @@ -99,5 +117,4 @@ %{_libdir}/*.so %{_includedir}/* - %changelog
View file
faac-1.28-external-mp4v2-2.0.patch
Added
@@ -0,0 +1,186 @@ +Index: faac-1.28/configure.in +=================================================================== +--- faac-1.28.orig/configure.in ++++ faac-1.28/configure.in +@@ -28,14 +28,23 @@ AC_CHECK_DECL(strcasecmp, MY_DEFINE(HAVE + AC_CHECK_LIB(gnugetopt, getopt_long) + + AM_CONDITIONAL(WITH_MP4V2, false) ++AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, false) + +-AC_CHECK_DECLS([MP4Create, MP4MetadataDelete], +- AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes, ++AC_CHECK_DECLS([MP4Create], ++ AC_CHECK_LIB(mp4v2, MP4Create, external_mp4v2=yes, + external_mp4v2=no, -lstdc++), +- external_mp4v2=no, [#include <mp4.h>]) ++ external_mp4v2=no, [ ++#if defined(__ALTIVEC__) ++#undef bool ++#endif ++#include <mp4v2/mp4v2.h> ++]) + + if test x$external_mp4v2 = xyes; then + AC_MSG_NOTICE([*** Building with external mp4v2 ***]) ++ MY_DEFINE(HAVE_LIBMP4V2) ++ AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, true) ++ AC_CHECK_DECLS([MP4TagsAlloc], [], [], [#include <mp4v2/mp4v2.h>]) + else + if test x$WITHMP4V2 = xyes; then + AC_MSG_NOTICE([*** Building with internal mp4v2 ***]) +Index: faac-1.28/frontend/Makefile.am +=================================================================== +--- faac-1.28.orig/frontend/Makefile.am ++++ faac-1.28/frontend/Makefile.am +@@ -8,5 +8,9 @@ INCLUDES = -I$(top_srcdir)/include -I$(t + LDADD = $(top_builddir)/libfaac/libfaac.la $(top_srcdir)/common/mp4v2/libmp4v2.a -lm -lstdc++ + else + INCLUDES = -I$(top_srcdir)/include ++if WITH_EXTERNAL_MP4V2 ++LDADD = $(top_builddir)/libfaac/libfaac.la -lm -lmp4v2 ++else + LDADD = $(top_builddir)/libfaac/libfaac.la -lm + endif ++endif +Index: faac-1.28/frontend/main.c +=================================================================== +--- faac-1.28.orig/frontend/main.c ++++ faac-1.28/frontend/main.c +@@ -30,7 +30,10 @@ + #endif + + #ifdef HAVE_LIBMP4V2 +-# include <mp4.h> ++#if defined(__ALTIVEC__) ++#undef bool ++#endif ++# include <mp4v2/mp4v2.h> + #endif + + #define DEFAULT_TNS 0 +@@ -870,8 +873,12 @@ int main(int argc, char *argv[]) + if (!faacEncSetConfiguration(hEncoder, myFormat)) { + fprintf(stderr, "Unsupported output format!\n"); + #ifdef HAVE_LIBMP4V2 ++#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */ ++ if (container == MP4_CONTAINER) MP4Close(MP4hFile, 0); ++#else + if (container == MP4_CONTAINER) MP4Close(MP4hFile); + #endif ++#endif + return 1; + } + +@@ -882,12 +889,10 @@ int main(int argc, char *argv[]) + unsigned long ASCLength = 0; + char *version_string; + +-#ifdef MP4_CREATE_EXTENSIBLE_FORMAT +- /* hack to compile against libmp4v2 >= 1.0RC3 +- * why is there no version identifier in mp4.h? */ ++#ifdef MP4_DETAILS_ERROR /* r453 fix */ + MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0); + #else +- MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0, 0); ++ MP4hFile = MP4Create(aacFileName, 0); + #endif + if (!MP4_IS_VALID_FILE_HANDLE(MP4hFile)) { + fprintf(stderr, "Couldn't create output file %s\n", aacFileName); +@@ -902,12 +907,22 @@ int main(int argc, char *argv[]) + free(ASC); + + /* set metadata */ ++#if HAVE_DECL_MP4TAGSALLOC ++ const MP4Tags* tags; ++ tags = MP4TagsAlloc(); ++ MP4TagsFetch( tags, MP4hFile ); ++#endif + version_string = malloc(strlen(faac_id_string) + 6); + strcpy(version_string, "FAAC "); + strcpy(version_string + 5, faac_id_string); ++#if !HAVE_DECL_MP4TAGSALLOC + MP4SetMetadataTool(MP4hFile, version_string); ++#else ++ MP4TagsSetEncodingTool(tags, version_string); ++#endif + free(version_string); + ++#if !HAVE_DECL_MP4TAGSALLOC + if (artist) MP4SetMetadataArtist(MP4hFile, artist); + if (writer) MP4SetMetadataWriter(MP4hFile, writer); + if (title) MP4SetMetadataName(MP4hFile, title); +@@ -920,8 +935,40 @@ int main(int argc, char *argv[]) + if (comment) MP4SetMetadataComment(MP4hFile, comment); + if (artSize) { + MP4SetMetadataCoverArt(MP4hFile, art, artSize); ++#else ++ if (artist) MP4TagsSetArtist(tags, artist); ++ if (writer) MP4TagsSetComposer(tags, writer); ++ if (title) MP4TagsSetName(tags, title); ++ if (album) MP4TagsSetAlbum(tags, album); ++ if (trackno > 0) { ++ MP4TagTrack tt; ++ tt.index = trackno; ++ tt.total = ntracks; ++ MP4TagsSetTrack(tags, &tt); ++ } ++ if (discno > 0) { ++ MP4TagDisk td; ++ td.index = discno; ++ td.total = ndiscs; ++ MP4TagsSetDisk(tags, &td); ++ } ++ if (compilation) MP4TagsSetCompilation(tags, &compilation); ++ if (year) MP4TagsSetReleaseDate(tags, year); ++ if (genre) MP4TagsSetGenre(tags, genre); ++ if (comment) MP4TagsSetComments(tags, comment); ++ if (artSize) { ++ MP4TagArtwork mp4art; ++ mp4art.data = art; ++ mp4art.size = artSize; ++ mp4art.type = MP4_ART_UNDEFINED; // delegate typing to libmp4v2 ++ MP4TagsAddArtwork( tags, &mp4art ); ++#endif + free(art); + } ++#if HAVE_DECL_MP4TAGSALLOC ++ MP4TagsStore( tags, MP4hFile ); ++ MP4TagsFree( tags ); ++#endif + } + else + { +@@ -1138,11 +1185,19 @@ int main(int argc, char *argv[]) + /* clean up */ + if (container == MP4_CONTAINER) + { ++#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */ ++ MP4Close(MP4hFile, 0); ++#else + MP4Close(MP4hFile); ++#endif + if (optimizeFlag == 1) + { + fprintf(stderr, "\n\nMP4 format optimization... "); +- MP4Optimize(aacFileName, NULL, 0); ++#ifdef MP4_DETAILS_ERROR /* r453 fix */ ++ MP4Optimize(aacFileName, NULL, 0); ++#else ++ MP4Optimize(aacFileName, NULL); ++#endif + fprintf(stderr, "Done!"); + } + } else +Index: faac-1.28/common/mp4v2/mpeg4ip.h +=================================================================== +--- faac-1.28.orig/common/mp4v2/mpeg4ip.h ++++ faac-1.28/common/mp4v2/mpeg4ip.h +@@ -123,7 +123,6 @@ + #ifdef __cplusplus + extern "C" { + #endif +-char *strcasestr(const char *haystack, const char *needle); + #ifdef __cplusplus + } + #endif
View file
faac-1.28-strict-aliasing-punning.patch
Added
@@ -0,0 +1,68 @@ +Index: faac-1.28/frontend/input.c +=================================================================== +--- faac-1.28.orig/frontend/input.c ++++ faac-1.28/frontend/input.c +@@ -270,13 +270,17 @@ static void chan_remap(int32_t *buf, int + size_t wav_read_float32(pcmfile_t *sndf, float *buf, size_t num, int *map) + { + size_t i = 0; +- unsigned char bufi[8]; ++ union { ++ unsigned char c[8]; ++ int i; ++ double d; ++ } bufi; + + if ((sndf->samplebytes > 8) || (sndf->samplebytes < 1)) + return 0; + + while (i<num) { +- if (fread(bufi, sndf->samplebytes, 1, sndf->f) != 1) ++ if (fread(&bufi, sndf->samplebytes, 1, sndf->f) != 1) + break; + + if (sndf->isfloat) +@@ -301,7 +305,7 @@ size_t wav_read_float32(pcmfile_t *sndf, + switch (sndf->samplebytes) { + case 1: + /* this is endian clean */ +- buf[i] = ((float)bufi[0] - 128) * (float)256; ++ buf[i] = ((float)bufi.c[0] - 128) * (float)256; + break; + + case 2: +@@ -312,14 +316,14 @@ size_t wav_read_float32(pcmfile_t *sndf, + #endif + { + // swap bytes +- int16_t s = ((int16_t *)bufi)[0]; ++ int16_t s = ((int16_t *)&bufi)[0]; + s = SWAP16(s); + buf[i] = (float)s; + } + else + { + // no swap +- int s = ((int16_t *)bufi)[0]; ++ int s = ((int16_t *)&bufi)[0]; + buf[i] = (float)s; + } + break; +@@ -327,7 +331,7 @@ size_t wav_read_float32(pcmfile_t *sndf, + case 3: + if (!sndf->bigendian) + { +- int s = bufi[0] | (bufi[1] << 8) | (bufi[2] << 16); ++ int s = bufi.c[0] | (bufi.c[1] << 8) | (bufi.c[2] << 16); + + // fix sign + if (s & 0x800000) +@@ -337,7 +341,7 @@ size_t wav_read_float32(pcmfile_t *sndf, + } + else // big endian input + { +- int s = (bufi[0] << 16) | (bufi[1] << 8) | bufi[2]; ++ int s = (bufi.c[0] << 16) | (bufi.c[1] << 8) | bufi.c[2]; + + // fix sign + if (s & 0x800000)
View file
faac_configure_in.patch
Deleted
@@ -1,10 +0,0 @@ ---- configure.in.orig 2007-08-20 20:03:22.000000000 +0200 -+++ configure.in 2008-07-05 15:22:07.000000000 +0200 -@@ -36,6 +36,7 @@ - - if test x$external_mp4v2 = xyes; then - AC_MSG_NOTICE([*** Building with external mp4v2 ***]) -+ MY_DEFINE(HAVE_LIBMP4V2) - else - if test x$WITHMP4V2 = xyes; then - AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.