commit:     ed8e89fcf98331b1c04751d93284b8f9b0884b35
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  2 12:04:16 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Oct  2 12:11:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed8e89fc

media-libs/faac: Security cleanup

Bug: https://bugs.gentoo.org/635602
Package-Manager: Portage-2.3.50, Repoman-2.3.10
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/faac/Manifest                           |   2 -
 media-libs/faac/faac-1.28-r4.ebuild                |  59 ---------
 media-libs/faac/faac-1.29.8.3.ebuild               |  45 -------
 media-libs/faac/files/faac-1.28-altivec.patch      |  40 ------
 .../faac/files/faac-1.28-external-libmp4v2.patch   |  47 -------
 media-libs/faac/files/faac-1.28-inttypes.patch     |  41 ------
 .../files/faac-1.28-libmp4v2_r479_compat.patch     | 138 ---------------------
 7 files changed, 372 deletions(-)

diff --git a/media-libs/faac/Manifest b/media-libs/faac/Manifest
index 2b98cc843f7..95a79b6be69 100644
--- a/media-libs/faac/Manifest
+++ b/media-libs/faac/Manifest
@@ -1,3 +1 @@
-DIST faac-1.28.tar.gz 678891 BLAKE2B 
c5d173649f3df77af7e9856150c52e3edd4dd6bac9c4d66463fa846edab1df4d209113946658820af6413abcd62a7a1101ad30366fc6cc07541c66f9cc7746ba
 SHA512 
0ef721ad28835e95cad41afc0cb6130e1ebb634cb6dd4b40f649bc2269b7bb5bf2887f6d8f023c74628d521f8bdf55b4dd070f972ecff162a5fe0384e026235b
-DIST faac-1.29.8.3.tar.gz 483404 BLAKE2B 
b5301fe63da7a059d0d4cf298107585295a3f385262c0c7715f5aa252a7400288b5be85cf26ea1ccf43e017c0f00fbf6942a91b903637660843701e1a28a6799
 SHA512 
2f17d87245c5cdb1ea37f21fb67f5a239f24133bb863bd635bb1f223d8d54c13d23ad43e93954a89361109c39b01e3b506ee791ffdf52741f76feb8bd1ed316c
 DIST faac-1.29.9.2.tar.gz 483826 BLAKE2B 
f845e75ec640f2a6ac41ad10dfdf1dbc6a6ddef3cb8cc3fe63450515f888343126cb2ec1df4c4eaaefed3d7d5d56249078f14363fcb9d9484228e9b1754a8b99
 SHA512 
71aaf060d087e866700a3a7c7d447e85709f65709e148610c4b34f5a3e095fa4a5c19f49450610949fd7db12345422b8a116a1d061899c127ad9a1bc30e79c7c

diff --git a/media-libs/faac/faac-1.28-r4.ebuild 
b/media-libs/faac/faac-1.28-r4.ebuild
deleted file mode 100644
index 4196ae0cfde..00000000000
--- a/media-libs/faac/faac-1.28-r4.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-# eutils for einstalldocs
-inherit autotools epatch epunt-cxx eutils ltprune multilib-minimal
-
-DESCRIPTION="Free MPEG-4 audio codecs by AudioCoding.com"
-HOMEPAGE="http://www.audiocoding.com";
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1 MPEG-4"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 
~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="media-libs/libmp4v2:0="
-DEPEND="${RDEPEND}"
-DOCS=( AUTHORS ChangeLog NEWS README TODO )
-
-src_prepare() {
-       epatch \
-               "${FILESDIR}"/${P}-external-libmp4v2.patch \
-               "${FILESDIR}"/${P}-altivec.patch \
-               "${FILESDIR}"/${P}-libmp4v2_r479_compat.patch \
-               "${FILESDIR}"/${P}-inttypes.patch
-
-       sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die 
#466984
-
-       eautoreconf
-       epunt_cxx
-}
-
-multilib_src_configure() {
-       local myconf
-       # only used for the fronted we need only for the default ABI.
-       [ "${ABI}" != "${DEFAULT_ABI}" ] && myconf+=" --without-mp4v2"
-
-       ECONF_SOURCE="${S}"     econf \
-               $(use_enable static-libs static) \
-               ${myconf}
-
-       # do not build the frontend for non default abis
-       if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
-               sed -i -e 's/frontend//' Makefile || die
-       fi
-}
-
-multilib_src_install() {
-       emake DESTDIR="${D}" install
-       prune_libtool_files
-}
-
-multilib_src_install_all() {
-       einstalldocs
-       dohtml docs/*.html
-       insinto /usr/share/doc/${PF}/pdf
-       doins docs/libfaac.pdf
-}

diff --git a/media-libs/faac/faac-1.29.8.3.ebuild 
b/media-libs/faac/faac-1.29.8.3.ebuild
deleted file mode 100644
index 384836d70d7..00000000000
--- a/media-libs/faac/faac-1.29.8.3.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-# eutils for einstalldocs
-inherit autotools epatch epunt-cxx eutils ltprune multilib-minimal
-
-DESCRIPTION="Free MPEG-4 audio codecs by AudioCoding.com"
-HOMEPAGE="http://www.audiocoding.com";
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1 MPEG-4"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc 
~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="static-libs"
-
-DEPEND="${RDEPEND}"
-DOCS=( AUTHORS ChangeLog NEWS README TODO )
-
-src_prepare() {
-       default
-
-       sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die 
#466984
-
-       eautoreconf
-       epunt_cxx
-}
-
-multilib_src_configure() {
-       local myconf=(
-               $(use_enable static-libs static)
-       )
-
-       ECONF_SOURCE="${S}" econf ${myconf[@]}
-
-       # do not build the frontend for non default abis
-       if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
-               sed -i -e 's/frontend//' Makefile || die
-       fi
-}
-
-multilib_src_install() {
-       emake DESTDIR="${D}" install
-       prune_libtool_files
-}

diff --git a/media-libs/faac/files/faac-1.28-altivec.patch 
b/media-libs/faac/files/faac-1.28-altivec.patch
deleted file mode 100644
index ae461efc30d..00000000000
--- a/media-libs/faac/files/faac-1.28-altivec.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-http://bugs.gentoo.org/306881
-
---- configure.in
-+++ configure.in
-@@ -33,7 +33,12 @@
- AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
-                AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
-                             external_mp4v2=no, -lstdc++),
--               external_mp4v2=no, [#include <mp4v2/mp4v2.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 ***])
---- frontend/main.c
-+++ frontend/main.c
-@@ -30,6 +30,9 @@
- #endif
- 
- #ifdef HAVE_LIBMP4V2
-+#if defined(__ALTIVEC__)
-+# undef bool
-+#endif
- # include <mp4v2/mp4v2.h>
- #endif
- 
---- common/mp4v2/mpeg4ip.h
-+++ common/mp4v2/mpeg4ip.h
-@@ -123,7 +123,6 @@
- #ifdef __cplusplus
- extern "C" {
- #endif
--char *strcasestr(const char *haystack, const char *needle);
- #ifdef __cplusplus
- }
- #endif

diff --git a/media-libs/faac/files/faac-1.28-external-libmp4v2.patch 
b/media-libs/faac/files/faac-1.28-external-libmp4v2.patch
deleted file mode 100644
index 54a63347b87..00000000000
--- a/media-libs/faac/files/faac-1.28-external-libmp4v2.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -ur faac-1.28.orig/configure.in faac-1.28/configure.in
---- faac-1.28.orig/configure.in        2009-02-05 02:55:38.000000000 +0200
-+++ faac-1.28/configure.in     2009-07-10 13:21:34.000000000 +0300
-@@ -28,14 +28,17 @@
- 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,
-                             external_mp4v2=no, -lstdc++),
--               external_mp4v2=no, [#include <mp4.h>])
-+               external_mp4v2=no, [#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)
- else
-   if test x$WITHMP4V2 = xyes; then
-      AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
-diff -ur faac-1.28.orig/frontend/main.c faac-1.28/frontend/main.c
---- faac-1.28.orig/frontend/main.c     2009-01-24 03:10:20.000000000 +0200
-+++ faac-1.28/frontend/main.c  2009-07-10 13:22:18.000000000 +0300
-@@ -30,7 +30,7 @@
- #endif
- 
- #ifdef HAVE_LIBMP4V2
--# include <mp4.h>
-+# include <mp4v2/mp4v2.h>
- #endif
- 
- #define DEFAULT_TNS     0
-diff -ur faac-1.28.orig/frontend/Makefile.am faac-1.28/frontend/Makefile.am
---- faac-1.28.orig/frontend/Makefile.am        2008-12-16 02:56:00.000000000 
+0200
-+++ faac-1.28/frontend/Makefile.am     2009-07-10 13:21:55.000000000 +0300
-@@ -8,5 +8,9 @@
- 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

diff --git a/media-libs/faac/files/faac-1.28-inttypes.patch 
b/media-libs/faac/files/faac-1.28-inttypes.patch
deleted file mode 100644
index 09304fb6017..00000000000
--- a/media-libs/faac/files/faac-1.28-inttypes.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-use standard integer types, not linux ones
-
---- frontend/main.c
-+++ frontend/main.c
-@@ -440,13 +440,13 @@
-     MP4TrackId MP4track = 0;
-     unsigned int ntracks = 0, trackno = 0;
-     unsigned int ndiscs = 0, discno = 0;
--    u_int8_t compilation = 0;
-+    uint8_t compilation = 0;
-     const char *artist = NULL, *title = NULL, *album = NULL, *year = NULL,
-       *genre = NULL, *comment = NULL, *writer = NULL;
--    u_int8_t *art = NULL;
--    u_int64_t artSize = 0;
--    u_int64_t total_samples = 0;
--    u_int64_t encoded_samples = 0;
-+    uint8_t *art = NULL;
-+    uint64_t artSize = 0;
-+    uint64_t total_samples = 0;
-+    uint64_t encoded_samples = 0;
-     unsigned int delay_samples;
-     unsigned int frameSize;
- #endif
-@@ -647,7 +647,7 @@
-         FILE *artFile = fopen(optarg, "rb");
- 
-         if(artFile) {
--            u_int64_t r;
-+            uint64_t r;
- 
-             fseek(artFile, 0, SEEK_END);
-         artSize = ftell(artFile);
-@@ -1112,7 +1112,7 @@
-             if (bytesWritten > 0)
-             {
- #ifdef HAVE_LIBMP4V2
--                u_int64_t samples_left = total_samples - encoded_samples + 
delay_samples;
-+                uint64_t samples_left = total_samples - encoded_samples + 
delay_samples;
-                 MP4Duration dur = samples_left > frameSize ? frameSize : 
samples_left;
-                 MP4Duration ofs = encoded_samples > 0 ? 0 : delay_samples;
- 

diff --git a/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch 
b/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch
deleted file mode 100644
index 6aae0d7793e..00000000000
--- a/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-http://bugs.gentoo.org/397575
-https://sourceforge.net/tracker/?func=detail&aid=3476707&group_id=704&atid=100704
-
---- configure.in
-+++ configure.in
-@@ -33,8 +33,8 @@ 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 <mp4v2/mp4v2.h>])
- 
-@@ -42,6 +42,7 @@ if test x$external_mp4v2 = xyes; then
-   AC_MSG_NOTICE([*** Building with external mp4v2 ***])
-   MY_DEFINE(HAVE_EXTERNAL_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 ***])
---- frontend/main.c
-+++ frontend/main.c
-@@ -873,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;
-     }
- 
-@@ -885,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);
-@@ -905,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);
-@@ -923,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
-     {
-@@ -1141,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... ");
-+#ifdef MP4_DETAILS_ERROR /* r453 fix */
-                 MP4Optimize(aacFileName, NULL, 0);
-+#else
-+                MP4Optimize(aacFileName, NULL);
-+#endif
-                 fprintf(stderr, "Done!");
-             }
-         } else

Reply via email to