summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-08-31 23:13:31 +0000
committerSam James <sam@gentoo.org>2020-08-31 23:14:39 +0000
commita373cdf5df43887629aaf902bd080f6b7f46a10e (patch)
tree9bc50fd235b131a057650124c6a6a77c762e327f /media-video/gpac
parentwww-servers/apache: security cleanup (diff)
downloadgentoo-a373cdf5df43887629aaf902bd080f6b7f46a10e.tar.gz
gentoo-a373cdf5df43887629aaf902bd080f6b7f46a10e.tar.bz2
gentoo-a373cdf5df43887629aaf902bd080f6b7f46a10e.zip
media-video/gpac: security cleanup
Bug: https://bugs.gentoo.org/711262 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/gpac')
-rw-r--r--media-video/gpac/Manifest1
-rw-r--r--media-video/gpac/files/ffmpeg4.patch44
-rw-r--r--media-video/gpac/files/gpac-0.7.1-configure.patch94
-rw-r--r--media-video/gpac/files/gpac-0.7.1-openssl-1.1.patch126
-rw-r--r--media-video/gpac/files/gpac-freetype.patch15
-rw-r--r--media-video/gpac/gpac-0.7.1-r1.ebuild150
6 files changed, 0 insertions, 430 deletions
diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index 8340f361bd62..fa53da9d266e 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1,2 +1 @@
-DIST gpac-0.7.1.tar.gz 10654838 BLAKE2B 795fd11d6bf02bb0d27d97f2c98017e9875aae26ea7d99c5587c7ec5ccc8273283fbce6444389ff4371a34d0e7d03102982ff8a8ec014c7f0c2ddd36c684cba9 SHA512 0377d9471db9e5ccf75f85dfd0c9f4e37a211108b5e128a5411ac015bd9c906257320d517717f0fa03d434e1fce24bd8a9c3a73200fac5c21b80895b716ab403
DIST gpac-0.8.1.tar.gz 11432459 BLAKE2B 5c08d6c903b4865c19818c5cee07c0a0ebd1775f168740eadc3722d6b19ed685d4f6089cee4bbd68a52bf7cce4cf564c083deb629c47ba35eac66c754f3136cf SHA512 f2039fe91a502ea8c54330abf893d52d10fb57d4459f5f3aae28122f565ab8964011b67e6af0d79c170fa55b125ac1385fd1d280021da7d1d37b27c74ee5b6c1
diff --git a/media-video/gpac/files/ffmpeg4.patch b/media-video/gpac/files/ffmpeg4.patch
deleted file mode 100644
index 61f329806a55..000000000000
--- a/media-video/gpac/files/ffmpeg4.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: gpac-0.7.1/applications/dashcast/video_encoder.c
-===================================================================
---- gpac-0.7.1.orig/applications/dashcast/video_encoder.c
-+++ gpac-0.7.1/applications/dashcast/video_encoder.c
-@@ -144,7 +144,7 @@ int dc_video_encoder_open(VideoOutputFil
- }
-
- //the global header gives access to the extradata (SPS/PPS)
-- video_output_file->codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
-+ video_output_file->codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
-
- video_output_file->vstream_idx = 0;//video_stream->index;
-
-Index: gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c
-===================================================================
---- gpac-0.7.1.orig/modules/ffmpeg_in/ffmpeg_decode.c
-+++ gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c
-@@ -49,7 +49,7 @@
- static uint8_t * ffmpeg_realloc_buffer(uint8_t * oldBuffer, u32 size) {
- uint8_t * buffer;
- /* Size of buffer must be larger, see avcodec_decode_video2 documentation */
-- u32 allocatedSz = sizeof( char ) * (FF_INPUT_BUFFER_PADDING_SIZE + size);
-+ u32 allocatedSz = sizeof( char ) * (AV_INPUT_BUFFER_PADDING_SIZE + size);
- if (oldBuffer)
- gf_free(oldBuffer);
- buffer = (uint8_t*)gf_malloc( allocatedSz );
-@@ -577,7 +577,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B
- capability->cap.valueInt = 1;
- return GF_OK;
- case GF_CODEC_PADDING_BYTES:
-- capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE;
-+ capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE;
- return GF_OK;
- case GF_CODEC_REORDER:
- capability->cap.valueInt = 1;
-@@ -669,7 +669,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B
- break;
-
- case GF_CODEC_PADDING_BYTES:
-- capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE;
-+ capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE;
- break;
- default:
- capability->cap.valueInt = 0;
diff --git a/media-video/gpac/files/gpac-0.7.1-configure.patch b/media-video/gpac/files/gpac-0.7.1-configure.patch
deleted file mode 100644
index 8bc3ec9f9079..000000000000
--- a/media-video/gpac/files/gpac-0.7.1-configure.patch
+++ /dev/null
@@ -1,94 +0,0 @@
---- gpac-0.7.1/Makefile.orig 2017-07-25 09:34:51.910379115 -0600
-+++ gpac-0.7.1/Makefile 2017-07-25 09:36:18.906385736 -0600
-@@ -252,7 +252,9 @@
- $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/include/gpac/enst/*.h "$(DESTDIR)$(prefix)/include/gpac/enst"
- endif
- mkdir -p "$(DESTDIR)$(prefix)/$(libdir)"
-+ifeq ($(STATIC_LIBS),yes)
- $(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(libdir)"
-+endif
- $(MAKE) installdylib
-
- uninstall-lib:
---- gpac-0.7.1/src/Makefile.orig 2017-07-25 09:37:48.157392528 -0600
-+++ gpac-0.7.1/src/Makefile 2017-07-25 09:39:06.092398459 -0600
-@@ -267,16 +267,20 @@
-
- ifeq ($(CONFIG_DARWIN),yes)
-
-+ifeq ($(STATICLIBS),yes)
- $(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
- $(RANLIB) ../bin/gcc/libgpac_static.a
-+endif
- ifneq ($(STATICBUILD),yes)
- $(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(EXTRALIBS) $(LDFLAGS)
- endif
-
- else
-
-+ifeq ($(STATICLIBS),yes)
- $(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
- $(RANLIB) ../bin/gcc/libgpac_static.a
-+endif
- ifneq ($(STATICBUILD),yes)
- $(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(EXTRALIBS) $(LDFLAGS)
- mv $@ $@.$(VERSION_SONAME)
---- gpac-0.7.1/configure.orig 2017-07-25 10:01:58.789502926 -0600
-+++ gpac-0.7.1/configure 2017-07-25 10:02:54.110507136 -0600
-@@ -109,6 +109,7 @@
- has_openjpeg="no"
- gprof_build="no"
- static_build="no"
-+static_libs="no"
- want_pic="no"
- want_gcov="no"
- has_joystick="no"
-@@ -260,6 +261,7 @@
- --enable-amr-wb enable AMR WB library
- --enable-amr enable both AMR NB and WB libraries
- --enable-static-bin link statically against libgpac
-+ --enable-static-lib GPAC static libraries build
- --static-mp4box configure for static linking of MP4Box only.
- --enable-depth enables depth handling in the compositor
-
-@@ -705,15 +707,6 @@
- CFLAGS="$CFLAGS -Wno-pointer-sign"
- fi
-
--
--#GCC opt
--if test "$no_gcc_opt" = "no"; then
-- CFLAGS="-O3 $CFLAGS"
--else
-- CFLAGS="-O0 $CFLAGS"
--fi
--
--
- #GCC PIC
- if test "$cross_prefix" != "" ; then
- want_pic="no"
-@@ -1885,6 +1878,8 @@
- ;;
- --enable-static-bin) static_build="yes";
- ;;
-+ --enable-static-lib) static_libs="yes";
-+ ;;
- --disable-ipv6) has_ipv6="no"
- ;;
- --disable-wx) has_wx="no"
-@@ -2559,6 +2554,7 @@
- echo "debug version: $debuginfo"
- echo "GProf enabled: $gprof_build"
- echo "Static build enabled: $static_build"
-+echo "Static libs enabled: $static_libs"
- echo "Memory tracking enabled: $use_memory_tracking"
- echo "Fixed-Point Version: $use_fixed_point"
- echo "IPV6 Support: $has_ipv6"
-@@ -3194,6 +3190,7 @@
- echo "GPROFBUILD=$gprof_build" >> config.mak
- echo "MP4BOX_STATIC=$static_mp4box" >> config.mak
- echo "STATICBUILD=$static_build" >> config.mak
-+echo "STATICLIBS=$static_libs" >> config.mak
-
- echo "CONFIG_IPV6=$has_ipv6" >> config.mak
- if test "$has_ipv6" = "yes" ; then
diff --git a/media-video/gpac/files/gpac-0.7.1-openssl-1.1.patch b/media-video/gpac/files/gpac-0.7.1-openssl-1.1.patch
deleted file mode 100644
index e25a5bca78bb..000000000000
--- a/media-video/gpac/files/gpac-0.7.1-openssl-1.1.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From e64a7d229fdcb5c190064b7860ade50124dcc735 Mon Sep 17 00:00:00 2001
-From: Aurelien David <aurelien.david@telecom-paristech.fr>
-Date: Fri, 6 Oct 2017 16:46:18 +0200
-Subject: [PATCH] compatibility with OpenSSL 1.1.x (#616)
-
-diff --git a/src/utils/downloader.c b/src/utils/downloader.c
-index b8c923b88..3b7d37b41 100644
---- a/src/utils/downloader.c
-+++ b/src/utils/downloader.c
-@@ -204,7 +204,7 @@ struct __gf_download_manager
- u32 limit_data_rate, read_buf_size;
- u64 max_cache_size;
- Bool allow_broken_certificate;
--
-+
- GF_List *skip_proxy_servers;
- GF_List *credentials;
- GF_List *cache_entries;
-@@ -392,10 +392,18 @@ static Bool init_ssl_lib() {
- GF_LOG(GF_LOG_ERROR, GF_LOG_NETWORK, ("[HTTPS] Error while initializing Random Number generator, failed to init SSL !\n"));
- return GF_TRUE;
- }
-+
-+ /* per https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html
-+ ** As of version 1.1.0 OpenSSL will automatically allocate all resources that it needs so no explicit initialisation is required.
-+ ** Similarly it will also automatically deinitialise as required.
-+ */
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
- SSL_load_error_strings();
- SSLeay_add_all_algorithms();
- SSLeay_add_ssl_algorithms();
-+#endif
-+
- _ssl_is_initialized = GF_TRUE;
- GF_LOG(GF_LOG_DEBUG, GF_LOG_NETWORK, ("[HTTPS] Initalization of SSL library complete.\n"));
- return GF_FALSE;
-@@ -422,6 +430,7 @@ static int ssl_init(GF_DownloadManager *dm, u32 mode)
- }
-
- switch (mode) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- case 0:
- meth = SSLv23_client_method();
- break;
-@@ -436,6 +445,11 @@ static int ssl_init(GF_DownloadManager *dm, u32 mode)
- case 3:
- meth = TLSv1_client_method();
- break;
-+#else /* for openssl 1.1+ this is the prefered method */
-+ case 0:
-+ meth = TLS_client_method();
-+ break;
-+#endif
- default:
- goto error;
- }
-@@ -771,7 +785,7 @@ void gf_dm_sess_del(GF_DownloadSession *sess)
- gf_sk_del(sess->sock);
- gf_list_del(sess->headers);
- gf_mx_del(sess->mx);
--
-+
- gf_free(sess);
- GF_LOG(GF_LOG_DEBUG, GF_LOG_NETWORK, ("[Downloader] gf_dm_sess_del(%p) : DONE\n", sess ));
- }
-@@ -1145,7 +1159,7 @@ GF_DownloadSession *gf_dm_sess_new_simple(GF_DownloadManager * dm, const char *u
- {
- GF_DownloadSession *sess;
- if (!dm) return NULL;
--
-+
- GF_SAFEALLOC(sess, GF_DownloadSession);
- if (!sess) {
- GF_LOG(GF_LOG_ERROR, GF_LOG_NETWORK, ("%s:%d Cannot allocate session for URL %s: OUT OF MEMORY!\n", __FILE__, __LINE__, url));
-@@ -1166,8 +1180,8 @@ GF_DownloadSession *gf_dm_sess_new_simple(GF_DownloadManager * dm, const char *u
- gf_free(sess);
- return NULL;
- }
--
--
-+
-+
- assert( dm );
-
- *e = gf_dm_sess_setup_from_url(sess, url);
-@@ -1225,7 +1239,7 @@ static GF_Err gf_dm_read_data(GF_DownloadSession *sess, char *data, u32 data_siz
- gf_mx_v(sess->mx);
- return GF_IP_CONNECTION_CLOSED;
- }
--
-+
- #ifdef GPAC_HAS_SSL
- if (sess->ssl) {
- s32 size;
-@@ -1451,7 +1465,11 @@ static void gf_dm_connect(GF_DownloadSession *sess)
- const GENERAL_NAME *altname = sk_GENERAL_NAME_value(altnames, i);
- if (altname->type == GEN_DNS)
- {
-- unsigned char *altname_str = ASN1_STRING_data(altname->d.ia5);
-+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ unsigned char *altname_str = ASN1_STRING_data(altname->d.ia5);
-+ #else
-+ unsigned char *altname_str = (unsigned char *)ASN1_STRING_get0_data(altname->d.ia5);
-+ #endif
- gf_list_add(valid_names, altname_str);
- }
- }
-@@ -1806,7 +1824,7 @@ GF_DownloadManager *gf_dm_new(GF_Config *cfg)
- dm->limit_data_rate = 1000 * atoi(opt) / 8;
- else
- gf_cfg_set_key(cfg, "Downloader", "MaxRate", "0");
--
-+
-
- dm->read_buf_size = GF_DOWNLOAD_BUFFER_SIZE;
- //when rate is limited, use smaller smaller read size
-@@ -2943,7 +2961,7 @@ static GF_Err wait_for_header_and_parse(GF_DownloadSession *sess, char * sHTTP)
- hdrp->value = gf_strdup(hdr_val);
- gf_list_add(sess->headers, hdrp);
- }
--
-+
- if (sep) sep[0]=':';
- if (hdr_sep) hdr_sep[0] = '\r';
- }
diff --git a/media-video/gpac/files/gpac-freetype.patch b/media-video/gpac/files/gpac-freetype.patch
deleted file mode 100644
index 98224aff30e1..000000000000
--- a/media-video/gpac/files/gpac-freetype.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gpac-0.7.1/configure
-===================================================================
---- gpac-0.7.1.orig/configure
-+++ gpac-0.7.1/configure
-@@ -1117,8 +1117,8 @@ if docc $CFLAGS_DIR $ft_cflags $ft_lflag
- fi
- if test "$cross_prefix" = "" ; then
- if test "$has_ft" = "no" ; then
-- ft_cflags="`freetype-config --cflags 2>>$logs`"
-- ft_lflags="`freetype-config --libs 2>>$logs`"
-+ ft_cflags="`pkg-config --cflags freetype2 2>>$logs`"
-+ ft_lflags="`pkg-config --libs freetype2 2>>$logs`"
- if docc $ft_cflags $ft_lflags $LDFLAGS ; then
- has_ft="system"
- fi
diff --git a/media-video/gpac/gpac-0.7.1-r1.ebuild b/media-video/gpac/gpac-0.7.1-r1.ebuild
deleted file mode 100644
index bdac8071f899..000000000000
--- a/media-video/gpac/gpac-0.7.1-r1.ebuild
+++ /dev/null
@@ -1,150 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == *9999 ]] ; then
- SCM="git-r3"
- EGIT_REPO_URI="https://github.com/gpac/gpac"
-else
- SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
-fi
-
-inherit flag-o-matic toolchain-funcs ${SCM}
-
-DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
-HOMEPAGE="https://gpac.wp.imt.fr/"
-
-LICENSE="GPL-2"
-# subslot == libgpac major
-SLOT="0/7"
-IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k libressl mad opengl oss png
- pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
-
-RDEPEND="
- media-libs/libogg
- a52? ( media-libs/a52dec )
- aac? ( media-libs/faad2 )
- alsa? ( media-libs/alsa-lib )
- ffmpeg? ( media-video/ffmpeg:0= )
- jack? ( virtual/jack )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- mad? ( media-libs/libmad )
- opengl? (
- media-libs/freeglut
- virtual/glu
- virtual/opengl
- )
- png? ( media-libs/libpng:0= )
- pulseaudio? ( media-sound/pulseaudio )
- theora? ( media-libs/libtheora )
- truetype? ( media-libs/freetype:2 )
- sdl? ( media-libs/libsdl )
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- vorbis? ( media-libs/libvorbis )
- X? (
- x11-libs/libXt
- x11-libs/libX11
- x11-libs/libXv
- x11-libs/libXext
- )
- xml? ( dev-libs/libxml2:2 )
- xvid? ( media-libs/xvid )
-"
-# disabled upstream, see applications/Makefile
-# wxwidgets? ( =x11-libs/wxGTK-2.8* )
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dvb? ( sys-kernel/linux-headers )
-"
-
-# DOCS="AUTHORS BUGS Changelog README.md TODO doc/CODING_STYLE doc/*.doc doc/*.bt doc/SceneGenerators doc/ipmpx_syntax.bt doc/*.txt"
-PATCHES=(
- "${FILESDIR}/${PN}-0.7.1-configure.patch"
- "${FILESDIR}/ffmpeg4.patch"
- "${FILESDIR}/${PN}-freetype.patch"
- "${FILESDIR}/${P}-openssl-1.1.patch"
-)
-
-DOCS=(
- doc/CODING_STYLE
- doc/GPAC\ UPnP.doc
- doc/ISO\ 639-2\ codes.txt
- doc/SceneGenerators
- doc/ipmpx_syntax.bt
- Changelog
- AUTHORS
- BUGS
- README.md
- TODO
-)
-HTML_DOCS="doc/*.html"
-
-my_use() {
- local flag="$1" pflag="${2:-$1}"
- if use ${flag}; then
- echo "--use-${pflag}=system"
- else
- echo "--use-${pflag}=no"
- fi
-}
-
-src_prepare() {
- default
- sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
-}
-
-src_configure() {
- tc-export CC CXX AR RANLIB
-
- local myeconfargs=(
- --extra-cflags="${CFLAGS}"
- --cc="$(tc-getCC)"
- --libdir="/$(get_libdir)"
- --verbose
- --enable-pic
- --enable-svg
- --disable-amr
- --disable-wx
- --use-js=no
- --use-ogg=system
- $(use_enable alsa)
- $(use_enable debug)
- $(use_enable dvb dvb4linux)
- $(use_enable ipv6)
- $(use_enable jack jack yes)
- $(use_enable opengl 3d)
- $(use_enable oss oss-audio)
- $(use_enable pulseaudio pulseaudio yes)
- $(use_enable sdl)
- $(use_enable ssl)
- $(use_enable static-libs static-lib)
- $(use_enable X x11)
- $(use_enable X x11-shm)
- $(use_enable X x11-xv)
- $(my_use a52)
- $(my_use aac faad)
- $(my_use dvb dvbx)
- $(my_use ffmpeg)
- $(my_use jpeg)
- $(my_use jpeg2k openjpeg)
- $(my_use mad)
- $(my_use png)
- $(my_use theora)
- $(my_use truetype ft)
- $(my_use vorbis)
- $(my_use xvid)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- einstalldocs
- emake STRIP="true" DESTDIR="${D}" install
- emake STRIP="true" DESTDIR="${D}" install-lib
-}