public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2017-07-25 16:50 Steve Dibb
  0 siblings, 0 replies; 11+ messages in thread
From: Steve Dibb @ 2017-07-25 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     a78247bc9eb78753ac88a9c4d227f4e0f48930c8
Author:     Steve Dibb <beandog <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 25 16:50:05 2017 +0000
Commit:     Steve Dibb <beandog <AT> gentoo <DOT> org>
CommitDate: Tue Jul 25 16:50:05 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a78247bc

media-video/gpac: version bump

Drop old patches, new configure patch, bug 621004

Package-Manager: Portage-2.3.0, Repoman-2.3.1

 media-video/gpac/Manifest                         |   1 +
 media-video/gpac/files/gpac-0.7.1-configure.patch |  94 +++++++++++++++
 media-video/gpac/gpac-0.7.1.ebuild                | 136 ++++++++++++++++++++++
 3 files changed, 231 insertions(+)

diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index 82a0e27b6df..02aa8d5998f 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1 +1,2 @@
 DIST gpac-0.6.1.tar.gz 9113143 SHA256 67d1ac8f8b3e74da0e4e38ea926dc15bca6e9941e8f366e3538abcf13c103c09 SHA512 b1409a8ebcda08c3af504d7de591528ef84f5c3d8d506dd490502e16493de11c2435ea3f5957f39100a2ce040d5e431c86a5a203f806fcc865ae4b08f6cf5595 WHIRLPOOL bd0c87841036220623021898f0b82d2364fd37c5254f58cd7db33617350f0864ce9672b8cbfa10f0d08948f2842fe9b19db9f562074c43df6d94cf2b13a7d141
+DIST gpac-0.7.1.tar.gz 10654838 SHA256 c7a18b9eea1264fee392e7222d16b180e0acdd6bb173ff6b8baadbf50b3b1d7f SHA512 0377d9471db9e5ccf75f85dfd0c9f4e37a211108b5e128a5411ac015bd9c906257320d517717f0fa03d434e1fce24bd8a9c3a73200fac5c21b80895b716ab403 WHIRLPOOL a82e6de4a48b29ca0b74eb206075302aa9db34cfa6681a1e98f22cfc88c43c5f0d0557ade6e770fe9b9f47756039fcb8ef42bd892ab08ef7a7e0fbbd4f239057

diff --git a/media-video/gpac/files/gpac-0.7.1-configure.patch b/media-video/gpac/files/gpac-0.7.1-configure.patch
new file mode 100644
index 00000000000..8bc3ec9f907
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.7.1-configure.patch
@@ -0,0 +1,94 @@
+--- 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/gpac-0.7.1.ebuild b/media-video/gpac/gpac-0.7.1.ebuild
new file mode 100644
index 00000000000..a17425b4c9f
--- /dev/null
+++ b/media-video/gpac/gpac-0.7.1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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 ~x86-fbsd"
+fi
+
+inherit eutils flag-o-matic multilib 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"
+SLOT="0"
+IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k libav libressl mad opengl oss png
+	pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
+
+RDEPEND="
+	a52? ( media-libs/a52dec )
+	aac? ( >=media-libs/faad2-2.0 )
+	alsa? ( media-libs/alsa-lib )
+	dvb? ( media-tv/linuxtv-dvb-apps )
+	ffmpeg? (
+		!libav? ( media-video/ffmpeg:0= )
+		libav? ( media-video/libav:0= ) )
+	jack? ( media-sound/jack-audio-connection-kit )
+	jpeg? ( virtual/jpeg:0 )
+	mad? ( >=media-libs/libmad-0.15.1b )
+	opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
+	>=media-libs/libogg-1.1
+	png? ( >=media-libs/libpng-1.4:0= )
+	vorbis? ( >=media-libs/libvorbis-1.1 )
+	theora? ( media-libs/libtheora )
+	truetype? ( >=media-libs/freetype-2.1.4:2 )
+	xml? ( >=dev-libs/libxml2-2.6.0:2 )
+	xvid? ( >=media-libs/xvid-1.0.1 )
+	sdl? ( media-libs/libsdl )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl:0= ) )
+	pulseaudio? ( media-sound/pulseaudio )
+	X? (
+		x11-libs/libXt
+		x11-libs/libX11
+		x11-libs/libXv
+		x11-libs/libXext
+	)
+"
+# disabled upstream, see applications/Makefile
+# wxwidgets? ( =x11-libs/wxGTK-2.8* )
+DEPEND="${RDEPEND}"
+
+# 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"
+)
+
+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
+
+	econf \
+		--enable-svg \
+		--enable-pic \
+		--disable-amr \
+		--use-js=no \
+		--use-ogg=system \
+		$(use_enable alsa) \
+		$(use_enable debug) \
+		$(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) \
+		--disable-wx \
+		$(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) \
+		--extra-cflags="${CFLAGS}" \
+		--cc="$(tc-getCC)" \
+		--libdir="/$(get_libdir)" \
+		--verbose
+}
+
+src_install() {
+	einstalldocs
+	emake STRIP="true" DESTDIR="${D}" install
+	emake STRIP="true" DESTDIR="${D}" install-lib
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2025-03-13  4:24 Ionen Wolkens
  0 siblings, 0 replies; 11+ messages in thread
From: Ionen Wolkens @ 2025-03-13  4:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d6c049ccb36319fdca8883f34f3227d2cfc40589
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 13 01:03:25 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Mar 13 04:21:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6c049cc

media-video/gpac: add 2.4.0

Closes: https://bugs.gentoo.org/913229
Closes: https://bugs.gentoo.org/919717
Closes: https://bugs.gentoo.org/926819
Closes: https://bugs.gentoo.org/934641
Closes: https://bugs.gentoo.org/940227
Closes: https://bugs.gentoo.org/951221
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 media-video/gpac/Manifest                          |   1 +
 .../gpac/files/gpac-2.4.0-configure-stddef.patch   |  19 +++
 media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch    |  71 ++++++++++
 media-video/gpac/gpac-2.4.0.ebuild                 | 143 +++++++++++++++++++++
 4 files changed, 234 insertions(+)

diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index c3e8ca33dce5..8b033192b1ef 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1,2 +1,3 @@
 DIST gpac-2.0.0.tar.gz 11362932 BLAKE2B a8489831efb77c374d13e2edb3951e60a94907c4cd8601919e1390aee0e9002249e97a9200fd006c2aa783c516f701f7695aa84b5f3596a3bc90290916ff4086 SHA512 e95e6d78167fc306917b3ac89e56ba511bbcb0c825da118f5ba374504499352104b5c1f3ee71e7ec018015b8e302f9b07162d22287ddb21c8564b097d900913f
 DIST gpac-2.2.1.tar.gz 11377184 BLAKE2B 44b47459da0f203d0e4c0eed5836a59f44fb508db4e601b46e9ffdb53d89bb49e22ccdfe7951b17581130f186c47ae8efc0d9002685d5cf9a3547159356d2d9e SHA512 873df4c2fdc3594a0f3bce66d511cee14669643042ab1ca8d7f370ad3f50636c32c31f79818051d00bf844de30a5533ae30c81ed168baf2626a152771b6a6845
+DIST gpac-2.4.0.tar.gz 9914579 BLAKE2B 09d7eeb390b4d10a6d144bf4046a7b53283fa05be01c663e0cd82e8b7b8d9dece30ef42747c12a7477f5b13ca7c7e18905f36d3f20396bb50937a249729fd3a8 SHA512 164d8a1ff235413852cc2077b5153c36b094862b61fdda12065bf6810926caabd1a1f6f30b7aac9a5b640f51fe92a6ca911518a424cab7220b635920d95da99f

diff --git a/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch b/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch
new file mode 100644
index 000000000000..05a9ac08b54d
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.4.0-configure-stddef.patch
@@ -0,0 +1,19 @@
+https://github.com/gpac/gpac/commit/a005fd6eb7a9ede4d3356630cae3d6516c91b73e
+--- a/configure
++++ b/configure
+@@ -1593,2 +1593,3 @@
+ #include <openssl/rand.h>
++#include <stddef.h>
+ int main( void ) {  SSL_CTX_set_options(NULL, SSL_OP_ALL); return 0; }'
+@@ -1619,2 +1620,3 @@
+ config_package png "libpng" "" "-lpng -lz" "png" '#include <png.h>
++#include <stddef.h>
+ int main( void ) {  png_struct *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); return 0; }'
+@@ -1635,2 +1637,3 @@
+ config_package xvid "xvid" "" "-lxvidcore $PTHREAD_LDFLAGS" "" '#include <xvid.h>
++#include <stddef.h>
+ int main( void ) { void *codec; xvid_decore(codec, XVID_DEC_DESTROY, NULL, NULL); return 0; }'
+@@ -1688,2 +1691,3 @@
+ config_package freenect "libfreenect" "" "-lfreenect" "freenect" '#include <libfreenect/libfreenect.h>
++#include <stddef.h>
+ int main( void ) { freenect_context *f_ctx; freenect_init(&f_ctx, NULL); return 0; }'

diff --git a/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch b/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch
new file mode 100644
index 000000000000..e9485dfa5f65
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.4.0-ffmpeg7.patch
@@ -0,0 +1,71 @@
+https://bugs.gentoo.org/951221
+https://github.com/gpac/gpac/commit/18863aa2176e423dae2a6d7e39ff6ed6a37b2b78
+--- a/src/filters/ff_dmx.c
++++ b/src/filters/ff_dmx.c
+@@ -2202,5 +2202,4 @@
+ {
+ 	const AVInputFormat *fmt;
+-	AVFormatContext *ctx;
+ 
+     if (!dev_name) return;
+@@ -2211,33 +2210,13 @@
+ 		return;
+ 	}
+-    ctx = avformat_alloc_context();
+-    if (!ctx) return;
+-    ctx->iformat = (AVInputFormat *)fmt;
+-    if (ctx->iformat->priv_data_size > 0) {
+-        ctx->priv_data = av_mallocz(ctx->iformat->priv_data_size);
+-        if (!ctx->priv_data) {
+-			avformat_free_context(ctx);
+-            return;
+-        }
+-        if (ctx->iformat->priv_class) {
+-            *(const AVClass**)ctx->priv_data = ctx->iformat->priv_class;
+-            av_opt_set_defaults(ctx->priv_data);
+-        }
+-    } else {
+-        ctx->priv_data = NULL;
+-	}
+ 
+ 	AVDeviceInfoList *dev_list = NULL;
+-
+-    AVDictionary *tmp = NULL;
+-	av_dict_set(&tmp, "list_devices", "1", 0);
+-    av_opt_set_dict2(ctx, &tmp, AV_OPT_SEARCH_CHILDREN);
+-	if (tmp)
+-		av_dict_free(&tmp);
+-
+-	int res = avdevice_list_devices(ctx, &dev_list);
++	int res = avdevice_list_input_sources(fmt, dev_name, NULL, &dev_list);
+ 	if (res<0) {
+ 		//device doesn't implement avdevice_list_devices, try loading the context using "list_devices=1" option
+ 		if (-res == ENOSYS) {
++			AVFormatContext *ctx = avformat_alloc_context();
++			if (!ctx) return;
++
+ 			AVDictionary *opts = NULL;
+ 			av_dict_set(&opts, "list_devices", "1", 0);
+@@ -2245,6 +2224,15 @@
+ 			if (opts)
+ 				av_dict_free(&opts);
++
++#if !defined(__DARWIN__) && !defined(__APPLE__)
++			// FIXME: no-op, permission issues on macOS Sonoma+
++			if (res>=0) avdevice_list_devices(ctx, &dev_list);
++#endif
++
++			if (res>=0) avformat_close_input(&ctx);
++			avformat_free_context(ctx);
+ 		}
+-	} else if (!res && dev_list->nb_devices) {
++	}
++	if (!res && dev_list && dev_list->nb_devices) {
+ 		if (!dev_desc) {
+ 			gf_dynstrcat(&dev_desc, "# Detected devices\n", NULL);
+@@ -2263,5 +2251,4 @@
+ 
+ 	if (dev_list) avdevice_free_list_devices(&dev_list);
+-	avformat_free_context(ctx);
+ }
+ 

diff --git a/media-video/gpac/gpac-2.4.0.ebuild b/media-video/gpac/gpac-2.4.0.ebuild
new file mode 100644
index 000000000000..68d3e1977978
--- /dev/null
+++ b/media-video/gpac/gpac-2.4.0.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs xdg
+
+DESCRIPTION="Implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
+HOMEPAGE="https://gpac.wp.imt.fr/"
+SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/12"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="
+	X a52 aac alsa dvb ffmpeg http2 jack jpeg jpeg2k libcaca lzma mad
+	opengl png pulseaudio sdl ssl theora truetype vorbis xvid
+"
+
+RDEPEND="
+	sys-libs/zlib:=
+	X? (
+		x11-libs/libX11
+		x11-libs/libXv
+		x11-libs/libXext
+	)
+	a52? ( media-libs/a52dec )
+	aac? ( media-libs/faad2 )
+	alsa? ( media-libs/alsa-lib )
+	ffmpeg? ( media-video/ffmpeg:= )
+	http2? ( net-libs/nghttp2:= )
+	jack? ( virtual/jack )
+	jpeg2k? ( media-libs/openjpeg:2= )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	libcaca? ( media-libs/libcaca )
+	lzma? ( app-arch/xz-utils )
+	mad? ( media-libs/libmad )
+	opengl? (
+		media-libs/libglvnd[X]
+		x11-libs/libX11
+		virtual/glu
+	)
+	png? ( media-libs/libpng:= )
+	pulseaudio? ( media-libs/libpulse )
+	sdl? ( media-libs/libsdl2 )
+	ssl? ( dev-libs/openssl:= )
+	theora? (
+		media-libs/libogg
+		media-libs/libtheora
+	)
+	truetype? ( media-libs/freetype )
+	vorbis? ( media-libs/libvorbis )
+	xvid? ( media-libs/xvid )
+"
+DEPEND="
+	${RDEPEND}
+	X? ( x11-base/xorg-proto )
+	dvb? ( sys-kernel/linux-headers )
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-configure-stddef.patch
+	"${FILESDIR}"/${P}-ffmpeg7.patch
+)
+
+src_prepare() {
+	default
+
+	# respect *FLAGS
+	sed -e '/^sseflags=/d' -e 's/-O[0-3] //' -i configure || die
+
+	# some configure options are ignored? (check if still needed on bump)
+	use alsa || sed -i 's/^check_has_lib alsa/:/' configure || die
+	use jack || sed -i 's/^check_has_lib jack/:/' configure || die
+	use lzma || sed -i 's/^check_has_lib lzma/:/' configure || die
+	use pulseaudio || sed -i 's/^check_has_lib pulseaudio/:/' configure || die
+	use sdl || sed -i 's/has_sdl=.*/has_sdl=no/' configure || die
+}
+
+src_configure() {
+	tc-export AR CC CXX RANLIB
+
+	gpac_use() {
+		usex ${1} --use-${2:-${1}}={system,no}
+	}
+
+	local conf=(
+		./configure # not autotools-based
+
+		--prefix="${EPREFIX}"/usr
+		--libdir="$(get_libdir)"
+		--extra-cflags="${CFLAGS}"
+		--enable-pic
+		--verbose
+
+		$(use_enable X x11)
+		$(use_enable dvb dvbx)
+		$(use_enable opengl 3d)
+
+		$(gpac_use a52)
+		$(gpac_use alsa)
+		$(gpac_use dvb dvb4linux)
+		$(gpac_use aac faad)
+		$(gpac_use ffmpeg)
+		$(gpac_use truetype freetype)
+		--use-hid=no # only for a deprecated module
+		$(gpac_use jack)
+		$(gpac_use jpeg)
+		$(gpac_use libcaca)
+		$(gpac_use lzma)
+		$(gpac_use mad)
+		$(gpac_use http2 nghttp2)
+		$(gpac_use jpeg2k openjpeg)
+		$(gpac_use png)
+		$(gpac_use pulseaudio)
+		$(gpac_use sdl)
+		$(gpac_use ssl)
+		$(gpac_use vorbis)
+		$(gpac_use theora)
+		$(gpac_use xvid)
+
+		# not packaged
+		--use-caption=no
+		--use-directfb=no
+		--use-freenect=no
+		--use-mpeghdec=no
+		--use-openhevc=no
+		--use-opensvc=no
+	)
+
+	einfo "${conf[*]}"
+	"${conf[@]}" || die
+}
+
+src_install() {
+	emake STRIP=: DESTDIR="${D}" install
+	dodoc Changelog README.md share/doc/{*.{bt,doc,txt},SceneGenerators}
+
+	find "${ED}" -type f -name '*.a' -delete || die
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2024-11-10 10:08 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2024-11-10 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     303de897b453ac71ab0c990a9aef7bd86f543948
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 10 10:06:42 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 10:07:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=303de897

media-video/gpac: Fix build w/ big endian

Thanks-to: ernsteiswuerfel <erhard_f <AT> mailbox.org>
Closes: https://bugs.gentoo.org/911634
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../gpac/files/gpac-2.2.1-fix-bigendian.patch      | 22 ++++++++++++++++++++++
 media-video/gpac/gpac-2.2.1-r1.ebuild              |  1 +
 2 files changed, 23 insertions(+)

diff --git a/media-video/gpac/files/gpac-2.2.1-fix-bigendian.patch b/media-video/gpac/files/gpac-2.2.1-fix-bigendian.patch
new file mode 100644
index 000000000000..cf822967f2d3
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.2.1-fix-bigendian.patch
@@ -0,0 +1,22 @@
+From b0ad643014e567f47d1231771b473d25986c512e Mon Sep 17 00:00:00 2001
+From: Aurelien David <aurelien.david@telecom-paristech.fr>
+Date: Tue, 20 Dec 2022 15:48:42 +0100
+Subject: [PATCH] fix bigendian build (#2363)
+
+---
+ src/evg/stencil.c | 8 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/evg/stencil.c b/src/evg/stencil.c
+index 6528722c69..95e6ea7d9e 100644
+--- a/src/evg/stencil.c
++++ b/src/evg/stencil.c
+@@ -1860,7 +1860,7 @@ u32 get_pix_yuv420p(EVG_Texture *_this, u32 x, u32 y, EVGRasterCtx *ctx)
+ #define GET_LE_10BIT_AS_16(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) << 6 )
+ 
+ //#define GET_LE_10BIT_LEFT_AS_8(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) >> 8 )
+-#define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
++#define GET_LE_10BIT_LEFT_AS_8(_ptr) ((_ptr)[1] )
+ #define GET_LE_10BIT_LEFT_AS_16(_ptr) ( (((u16)(_ptr)[1])<<8 | (u16)(_ptr)[0] ) & 0xFFC0 )
+ 
+ #define GET_BE_10BIT_AS_8(_ptr) ( (*(u16 *)(_ptr)) >> 2 )

diff --git a/media-video/gpac/gpac-2.2.1-r1.ebuild b/media-video/gpac/gpac-2.2.1-r1.ebuild
index 25ae4bc6b298..46267cba559a 100644
--- a/media-video/gpac/gpac-2.2.1-r1.ebuild
+++ b/media-video/gpac/gpac-2.2.1-r1.ebuild
@@ -66,6 +66,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.2.0-configure.patch"
 	"${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch"
 	"${FILESDIR}/${PN}-2.2.0-ffmpeg6-deux.patch"
+	"${FILESDIR}/${P}-fix-bigendian.patch" # bug 911634
 )
 
 DOCS=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2023-04-10  9:25 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-04-10  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     b489b1a671b51c3def4b4cdfdd419155caad4b73
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 09:24:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 09:24:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b489b1a6

media-video/gpac: fix build w/ >=ffmpeg-5

Closes: https://bugs.gentoo.org/903550
Thanks-to: Andrew Udvare <audvare <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gpac/files/gpac-2.2.0-ffmpeg6-deux.patch       | 46 ++++++++++++++++++++++
 media-video/gpac/gpac-2.2.0.ebuild                 |  1 +
 2 files changed, 47 insertions(+)

diff --git a/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch b/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch
new file mode 100644
index 000000000000..695852847395
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/903550
+
+From ba14e34dd7a3c4cef5a56962898e9f863dd4b4f3 Mon Sep 17 00:00:00 2001
+From: jeanlf <jeanlf@gpac.io>
+Date: Mon, 13 Mar 2023 09:43:52 +0100
+Subject: [PATCH] fixed compil with ffmpeg 6 - cf #2406
+
+--- a/src/filters/ff_mx.c
++++ b/src/filters/ff_mx.c
+@@ -503,7 +503,11 @@ static GF_Err ffmx_close_seg(GF_Filter *filter, GF_FFMuxCtx *ctx, Bool send_evt_
+ 		evt.seg_size.is_init = 0;
+ 	}
+ 	evt.seg_size.media_range_start = ctx->offset_at_seg_start;
++#if LIBAVFORMAT_VERSION_MAJOR >= 60
+ 	evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0;
++#else
++	evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0;
++#endif
+ 	ctx->offset_at_seg_start = evt.seg_size.media_range_end;
+
+ 	gf_filter_pid_send_event(pid, &evt);
+@@ -1013,13 +1017,21 @@ static GF_Err ffmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_r
+ 		ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag);
+ 	}
+
++
++	res = 1;
++#if LIBAVFORMAT_VERSION_MAJOR < 60
+ 	if (ctx->muxer->oformat) {
+ 		res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, 1);
+-		if (!res) {
+-			GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
+-			return GF_NOT_SUPPORTED;
+-		}
+ 	}
++#else
++	res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, FF_COMPLIANCE_NORMAL);
++#endif
++
++	if (!res) {
++		GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
++		return GF_NOT_SUPPORTED;
++	}
++
+ 	const AVCodec *c = avcodec_find_decoder(ff_codec_id);
+ 	if (!c) return GF_NOT_SUPPORTED;

diff --git a/media-video/gpac/gpac-2.2.0.ebuild b/media-video/gpac/gpac-2.2.0.ebuild
index d8ee67521cd8..d6a91321cd56 100644
--- a/media-video/gpac/gpac-2.2.0.ebuild
+++ b/media-video/gpac/gpac-2.2.0.ebuild
@@ -66,6 +66,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.2.0-configure.patch"
 	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
 	"${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch"
+	"${FILESDIR}/${PN}-2.2.0-ffmpeg6-deux.patch"
 )
 
 DOCS=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2023-03-29 16:16 Alexis Ballier
  0 siblings, 0 replies; 11+ messages in thread
From: Alexis Ballier @ 2023-03-29 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     909822b6b67aed377cfcc99407e52eb7e3aa9565
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 15:57:15 2023 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Mar 29 16:16:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=909822b6

media-video/gpac: bump to 2.2.0

Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 media-video/gpac/Manifest                          |   1 +
 media-video/gpac/files/gpac-2.2.0-configure.patch  | 104 +++++++++++++++++++++
 media-video/gpac/files/gpac-2.2.0-ffmpeg6.patch    |  24 +++++
 .../gpac/{gpac-9999.ebuild => gpac-2.2.0.ebuild}   |  19 +---
 media-video/gpac/gpac-9999.ebuild                  |  19 +---
 5 files changed, 139 insertions(+), 28 deletions(-)

diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index 1eeffa596c2a..5b4301b8344a 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1 +1,2 @@
 DIST gpac-2.0.0.tar.gz 11362932 BLAKE2B a8489831efb77c374d13e2edb3951e60a94907c4cd8601919e1390aee0e9002249e97a9200fd006c2aa783c516f701f7695aa84b5f3596a3bc90290916ff4086 SHA512 e95e6d78167fc306917b3ac89e56ba511bbcb0c825da118f5ba374504499352104b5c1f3ee71e7ec018015b8e302f9b07162d22287ddb21c8564b097d900913f
+DIST gpac-2.2.0.tar.gz 11376708 BLAKE2B f50c131912787c274a5b2d37e242e37ddd07f2c6eab3a932ec243f0fc36aeb06d4f16fd861eb3534f93534c291c55fddc2bcd1f573d2ed186e17464512a1f089 SHA512 4ac63a79a5d1057aadb59429af84ca9e4e0c0b863b19beafb60bd1c30425357dec45b5d6d48d452eb94002b059c9eb0c7bb0cc14222194f641604f964b3207c2

diff --git a/media-video/gpac/files/gpac-2.2.0-configure.patch b/media-video/gpac/files/gpac-2.2.0-configure.patch
new file mode 100644
index 000000000000..1d26b52a6d90
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.2.0-configure.patch
@@ -0,0 +1,104 @@
+* Makes static libs optional
+* Removes auto-SSE2 detection
+
+Index: gpac-2.2.0/Makefile
+===================================================================
+--- gpac-2.2.0.orig/Makefile
++++ gpac-2.2.0/Makefile
+@@ -276,7 +276,9 @@ install-lib:
+ 	$(INSTALL) $(INSTFLAGS) -m 644 config.h "$(DESTDIR)$(prefix)/include/gpac/configuration.h" || true
+ 
+ 	$(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)"
++ifeq ($(STATIC_LIBS), yes)
+ 	$(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(lib_dir)" || true
++endif
+ 
+ 	$(INSTALL) -d $(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig
+ 	$(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig"
+Index: gpac-2.2.0/configure
+===================================================================
+--- gpac-2.2.0.orig/configure
++++ gpac-2.2.0/configure
+@@ -74,6 +74,7 @@ enable_sanitizer="no"
+ libgpac_cflags=""
+ libgpac_extralibs=""
+ static_build="no"
++static_libs="no"
+ static_bin="no"
+ static_modules="no"
+ lm_lib=""
+@@ -273,6 +274,7 @@ GPAC build options:
+   --disable-opt            disable GCC optimizations
+   --static-build           link statically against libgpac but still allow dependencies to shared libraries (enable --static-modules)
+   --static-bin             enable static linking of MP4Box and gpac only (will enable --static-build), disable all libraries not linkable statically.
++  --enable-static-lib      GPAC static libraries build
+   --sdl-cfg=SDL_PATH       specify path to sdl-config for local install [$sdl_path]
+   --enable-sdl-static      use static SDL linking [default=no]
+   --X11-path=X11_PATH      specify path for X11 includes and libraries [$X11_PATH]
+@@ -552,6 +554,8 @@ for opt do
+             echo "$opt deprecated, use --static-build instead"
+             static_build="yes";
+             ;;
++        --enable-static-libs) static_libs="yes";
++            ;;
+         --enable-fixed-point) use_fixed_point="yes"
+             ;;
+         --strip) INSTFLAGS="-s $INSTFLAGS"
+@@ -943,14 +947,6 @@ if docc -lz -Wno-pointer-sign ; then
+ 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"
+@@ -978,11 +974,6 @@ cat > $TMPC << EOF
+ int main( void ) { return 0; }
+ EOF
+ 
+-if docc -msse2 $LDFLAGS ; then
+-  CFLAGS="$CFLAGS -msse2"
+-fi
+-
+-
+ #check dlopen support
+ has_dlopen="no"
+ cat > $TMPC << EOF
+@@ -1888,6 +1879,7 @@ else
+ fi
+ echo "debug version: $debuginfo"
+ echo "GProf enabled: $gprof_build"
++echo "Static libs enabled: $static_libs"
+ echo "Memory tracking enabled: $use_memory_tracking"
+ echo "Sanitizer enabled: $enable_sanitizer"
+ echo "Fixed-Point Version: $use_fixed_point"
+@@ -2604,6 +2596,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.m
+ echo "GPROFBUILD=$gprof_build" >> config.mak
+ echo "STATIC_BINARY=$static_bin" >> config.mak
+ echo "STATIC_BUILD=$static_build" >> config.mak
++echo "STATIC_LIBS=$static_libs" >> config.mak
+ 
+ echo "CONFIG_IPV6=$has_ipv6" >> config.mak
+ if test "$has_ipv6" = "yes" ; then
+Index: gpac-2.2.0/src/Makefile
+===================================================================
+--- gpac-2.2.0.orig/src/Makefile
++++ gpac-2.2.0/src/Makefile
+@@ -369,8 +369,10 @@ endif
+ 
+ else
+ 
++ifeq ($(STATIC_LIBS), yes)
+ 	$(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
+ 	$(RANLIB) ../bin/gcc/libgpac_static.a
++endif
+ ifneq ($(STATIC_BUILD),yes)
+ 	$(CC) $(SHFLAGS) $(LD_SONAME) -o $@ $(OBJS) $(ALL_LIBS) $(LDFLAGS)
+ 	mv $@ $@.$(VERSION_SONAME)

diff --git a/media-video/gpac/files/gpac-2.2.0-ffmpeg6.patch b/media-video/gpac/files/gpac-2.2.0-ffmpeg6.patch
new file mode 100644
index 000000000000..89bd0492b7ed
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.2.0-ffmpeg6.patch
@@ -0,0 +1,24 @@
+Index: gpac-2.2.0/src/filters/ff_mx.c
+===================================================================
+--- gpac-2.2.0.orig/src/filters/ff_mx.c
++++ gpac-2.2.0/src/filters/ff_mx.c
+@@ -503,7 +503,7 @@ static GF_Err ffmx_close_seg(GF_Filter *
+ 		evt.seg_size.is_init = 0;
+ 	}
+ 	evt.seg_size.media_range_start = ctx->offset_at_seg_start;
+-	evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0;
++	evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0;
+ 	ctx->offset_at_seg_start = evt.seg_size.media_range_end;
+ 
+ 	gf_filter_pid_send_event(pid, &evt);
+@@ -1013,8 +1013,8 @@ static GF_Err ffmx_configure_pid(GF_Filt
+ 		ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag);
+ 	}
+ 
+-	if (ctx->muxer->oformat && ctx->muxer->oformat->query_codec) {
+-		res = ctx->muxer->oformat->query_codec(ff_codec_id, 1);
++	if (ctx->muxer->oformat) {
++		res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, 1);
+ 		if (!res) {
+ 			GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name));
+ 			return GF_NOT_SUPPORTED;

diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-2.2.0.ebuild
similarity index 91%
copy from media-video/gpac/gpac-9999.ebuild
copy to media-video/gpac/gpac-2.2.0.ebuild
index 777f20e6208b..d8ee67521cd8 100644
--- a/media-video/gpac/gpac-9999.ebuild
+++ b/media-video/gpac/gpac-2.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -63,8 +63,9 @@ DEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-2.0.0-configure.patch"
+	"${FILESDIR}/${PN}-2.2.0-configure.patch"
 	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
+	"${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch"
 )
 
 DOCS=(
@@ -77,8 +78,6 @@ DOCS=(
 	README.md
 )
 
-HTML_DOCS="share/doc/*.html"
-
 my_use() {
 	local flag="$1" pflag="${2:-$1}"
 	if use ${flag}; then
@@ -88,11 +87,6 @@ my_use() {
 	fi
 }
 
-src_prepare() {
-	default
-	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
-}
-
 src_configure() {
 	tc-export CC CXX AR RANLIB
 
@@ -100,11 +94,8 @@ src_configure() {
 		--cc="$(tc-getCC)"
 		--libdir="$(get_libdir)"
 		--verbose
-		--enable-ipv6
 		--enable-pic
 		--enable-svg
-		--disable-amr
-		--use-js=no
 		--use-ogg=system
 		$(use_enable alsa)
 		$(use_enable debug)
@@ -121,14 +112,14 @@ src_configure() {
 		$(use_enable X x11-xv)
 		$(my_use a52)
 		$(my_use aac faad)
-		$(my_use dvb dvbx)
+		$(use_enable 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 truetype freetype)
 		$(my_use vorbis)
 		$(my_use xvid)
 	)

diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-9999.ebuild
index 777f20e6208b..d8ee67521cd8 100644
--- a/media-video/gpac/gpac-9999.ebuild
+++ b/media-video/gpac/gpac-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -63,8 +63,9 @@ DEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-2.0.0-configure.patch"
+	"${FILESDIR}/${PN}-2.2.0-configure.patch"
 	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
+	"${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch"
 )
 
 DOCS=(
@@ -77,8 +78,6 @@ DOCS=(
 	README.md
 )
 
-HTML_DOCS="share/doc/*.html"
-
 my_use() {
 	local flag="$1" pflag="${2:-$1}"
 	if use ${flag}; then
@@ -88,11 +87,6 @@ my_use() {
 	fi
 }
 
-src_prepare() {
-	default
-	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
-}
-
 src_configure() {
 	tc-export CC CXX AR RANLIB
 
@@ -100,11 +94,8 @@ src_configure() {
 		--cc="$(tc-getCC)"
 		--libdir="$(get_libdir)"
 		--verbose
-		--enable-ipv6
 		--enable-pic
 		--enable-svg
-		--disable-amr
-		--use-js=no
 		--use-ogg=system
 		$(use_enable alsa)
 		$(use_enable debug)
@@ -121,14 +112,14 @@ src_configure() {
 		$(use_enable X x11-xv)
 		$(my_use a52)
 		$(my_use aac faad)
-		$(my_use dvb dvbx)
+		$(use_enable 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 truetype freetype)
 		$(my_use vorbis)
 		$(my_use xvid)
 	)


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2020-09-12 21:42 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2020-09-12 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b50d5fdee658b196969eac6a9f5a4a4394e18943
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 12 21:36:01 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 12 21:42:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b50d5fde

media-video/gpac: bump to 1.0.1

Changes:
* Introduce CPU_FLAGS_X86_SSE2
* Refresh configure patch (avoids static libs)

Closes: https://bugs.gentoo.org/731088
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/gpac/Manifest                         |   1 +
 media-video/gpac/files/gpac-1.0.1-configure.patch | 117 ++++++++++++++++++
 media-video/gpac/gpac-1.0.1.ebuild                | 143 ++++++++++++++++++++++
 3 files changed, 261 insertions(+)

diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index 261a41794a2..85687ad16fe 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1,2 +1,3 @@
 DIST gpac-0.8.1.tar.gz 11432459 BLAKE2B 5c08d6c903b4865c19818c5cee07c0a0ebd1775f168740eadc3722d6b19ed685d4f6089cee4bbd68a52bf7cce4cf564c083deb629c47ba35eac66c754f3136cf SHA512 f2039fe91a502ea8c54330abf893d52d10fb57d4459f5f3aae28122f565ab8964011b67e6af0d79c170fa55b125ac1385fd1d280021da7d1d37b27c74ee5b6c1
 DIST gpac-1.0.0.tar.gz 10289999 BLAKE2B 9bd1134a53c59fae59bb18a2e4f8c5db0639fbbc7e2270a16d8a621c3cb37529c7bdf536b0ac71227579b3b6c09305960775f6676a1f4d0f15b3cf3ae99b91ef SHA512 930b4b02f1d68554a99b9fde3faf6a429d78a86522b52da7601a40907d41e159724c935952becc008ae626001cb23543e446125dfb58764513d5808197ec4e29
+DIST gpac-1.0.1.tar.gz 10352926 BLAKE2B 80bdbd568551f9028a44acfa0cfeba585b69f24392393c1fb1bfe16f4b614eb79cda5f641f0b61854734f0dd85eb17520c2012040d3c47d68f66e5beb66fb2db SHA512 533371d59e72250bef315be03ec3437cd66782d0fb6bdb6486a6f4d57d06a6a7deff1b31fe8bfd360be1d1c848b33b5d25e7268f56f27f8e92cbcb7da1aba82b

diff --git a/media-video/gpac/files/gpac-1.0.1-configure.patch b/media-video/gpac/files/gpac-1.0.1-configure.patch
new file mode 100644
index 00000000000..e471157af6b
--- /dev/null
+++ b/media-video/gpac/files/gpac-1.0.1-configure.patch
@@ -0,0 +1,117 @@
+* Makes static libs optional
+* Removes auto-SSE2 detection
+----
+diff --git a/Makefile b/Makefile
+index 303a413..1ef750e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -284,8 +284,9 @@ ifeq ($(GPAC_ENST),yes)
+ endif
+ 
+ 	$(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)"
++ifeq ($(STATIC_LIBS), yes)
+ 	$(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(lib_dir)" || true
+-
++endif
+ 	$(INSTALL) -d $(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig
+ 	$(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(lib_dir)/pkgconfig"
+ 
+diff --git a/configure b/configure
+index de8ea99..4f5a6a8 100755
+--- a/configure
++++ b/configure
+@@ -105,6 +105,7 @@ has_dvb4linux="no"
+ has_openjpeg="no"
+ gprof_build="no"
+ static_build="no"
++static_libs="no"
+ want_pic="no"
+ want_gcov="no"
+ has_joystick="no"
+@@ -264,6 +265,7 @@ GPAC configuration options:
+   --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
+ 
+@@ -706,14 +708,6 @@ if docc -lz -Wno-pointer-sign ; then
+ 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"
+@@ -1710,6 +1704,8 @@ for opt do
+             ;;
+         --enable-static-bin) static_build="yes";
+             ;;
++        --enable-static-libs) static_libs="yes";
++            ;;
+         --disable-ipv6) has_ipv6="no"
+             ;;
+         --disable-platinum) has_platinum="no"
+@@ -2357,6 +2353,7 @@ echo "** GPAC $version rev$revision Core Configuration **"
+ 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 "Sanitizer enabled: $enable_sanitizer"
+ echo "Fixed-Point Version: $use_fixed_point"
+@@ -3049,6 +3046,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.mak
+ 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/src/Makefile b/src/Makefile
+index c483c8d..b24d5bb 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -347,7 +347,6 @@ filters_svc: $(LIBGPAC_FILTERS_SVC)
+ 	@echo "LIBS $(EXTRALIBS)"
+ 
+ ifeq ($(CONFIG_DARWIN),yes)
+-
+ 	$(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
+ 	$(RANLIB) ../bin/gcc/libgpac_static.a
+ ifneq ($(STATICBUILD),yes)
+@@ -355,9 +354,10 @@ ifneq ($(STATICBUILD),yes)
+ 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)
+diff --git a/configure b/configure
+index 4f5a6a8..baba248 100755
+--- a/configure
++++ b/configure
+@@ -735,10 +735,6 @@ cat > $TMPC << EOF
+ int main( void ) { return 0; }
+ EOF
+ 
+-if docc -msse2 $LDFLAGS ; then
+-  CFLAGS="$CFLAGS -msse2"
+-fi
+-
+ 
+ #look for zlib
+ cat > $TMPC << EOF

diff --git a/media-video/gpac/gpac-1.0.1.ebuild b/media-video/gpac/gpac-1.0.1.ebuild
new file mode 100644
index 00000000000..a32cc796a65
--- /dev/null
+++ b/media-video/gpac/gpac-1.0.1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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} xdg
+
+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/10"
+IUSE="a52 aac alsa cpu_flags_x86_sse2 debug dvb ffmpeg ipv6 jack jpeg jpeg2k libressl mad opengl oss png
+	pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
+
+BDEPEND="virtual/pkgconfig"
+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:2 )
+	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 )
+"
+DEPEND="
+	${RDEPEND}
+	dvb? ( sys-kernel/linux-headers )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.0.1-configure.patch"
+	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
+)
+
+DOCS=(
+	share/doc/CODING_STYLE
+	share/doc/GPAC\ UPnP.doc
+	share/doc/ISO\ 639-2\ codes.txt
+	share/doc/SceneGenerators
+	share/doc/ipmpx_syntax.bt
+	Changelog
+	README.md
+)
+
+HTML_DOCS="share/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} $(usex cpu_flags_x86_sse2 '-msse2' '')"
+		--cc="$(tc-getCC)"
+		--libdir="$(get_libdir)"
+		--verbose
+		--enable-pic
+		--enable-svg
+		--disable-amr
+		--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="${ED}" install
+	emake STRIP="true" DESTDIR="${ED}" install-lib
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2020-09-08 22:42 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2020-09-08 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     c32af12a0308aa3e7cda2258acef74d81b0de57d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 22:36:17 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 22:42:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c32af12a

media-video/gpac: rename zlib patch

Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/gpac/files/{zlib.patch => gpac-1.0.0-zlib-compile.patch} | 0
 media-video/gpac/gpac-1.0.0.ebuild                                   | 2 +-
 media-video/gpac/gpac-9999.ebuild                                    | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/media-video/gpac/files/zlib.patch b/media-video/gpac/files/gpac-1.0.0-zlib-compile.patch
similarity index 100%
rename from media-video/gpac/files/zlib.patch
rename to media-video/gpac/files/gpac-1.0.0-zlib-compile.patch

diff --git a/media-video/gpac/gpac-1.0.0.ebuild b/media-video/gpac/gpac-1.0.0.ebuild
index 6a8fe8c576a..7721c668112 100644
--- a/media-video/gpac/gpac-1.0.0.ebuild
+++ b/media-video/gpac/gpac-1.0.0.ebuild
@@ -65,7 +65,7 @@ DEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-0.8.1-configure.patch"
 	"${FILESDIR}/${PN}-1.0.0-makefile-debian.patch"
-	"${FILESDIR}/zlib.patch"
+	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
 )
 
 DOCS=(

diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-9999.ebuild
index 1fcbfe48c82..eb3754e022a 100644
--- a/media-video/gpac/gpac-9999.ebuild
+++ b/media-video/gpac/gpac-9999.ebuild
@@ -64,7 +64,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-0.8.1-configure.patch"
-	"${FILESDIR}/zlib.patch"
+	"${FILESDIR}/${PN}-1.0.0-zlib-compile.patch"
 )
 
 DOCS=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2018-05-08 18:33 Lars Wendler
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Wendler @ 2018-05-08 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     59bd97f12ae21d1a47dae7ca0d0ea77569ebca65
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May  8 18:31:58 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue May  8 18:32:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59bd97f1

media-video/gpac: Use pkg-config to find freetype

Thanks to Bernd Feige who reported the issue and provided a patch.

Bug: https://bugs.gentoo.org/655272
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 media-video/gpac/files/gpac-freetype.patch | 15 +++++++++++++++
 media-video/gpac/gpac-0.7.1.ebuild         |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/media-video/gpac/files/gpac-freetype.patch b/media-video/gpac/files/gpac-freetype.patch
new file mode 100644
index 00000000000..98224aff30e
--- /dev/null
+++ b/media-video/gpac/files/gpac-freetype.patch
@@ -0,0 +1,15 @@
+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.ebuild b/media-video/gpac/gpac-0.7.1.ebuild
index ca4acbd586e..ed5c090d045 100644
--- a/media-video/gpac/gpac-0.7.1.ebuild
+++ b/media-video/gpac/gpac-0.7.1.ebuild
@@ -56,12 +56,14 @@ RDEPEND="
 "
 # disabled upstream, see applications/Makefile
 # wxwidgets? ( =x11-libs/wxGTK-2.8* )
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
 
 # 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"
 )
 
 DOCS=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2017-02-24  9:00 Alexis Ballier
  0 siblings, 0 replies; 11+ messages in thread
From: Alexis Ballier @ 2017-02-24  9:00 UTC (permalink / raw
  To: gentoo-commits

commit:     7609dc75c695e48c508cb5c13ac6afa88b384bb2
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 24 08:59:27 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Feb 24 08:59:34 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7609dc75

media-video/gpac: remove old

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 media-video/gpac/Manifest                          |   1 -
 media-video/gpac/files/ffmpeg25.patch              |  43 ---
 media-video/gpac/files/gpac-0.5.2-avpixfmt.patch   |  57 ----
 media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch   | 307 ---------------------
 .../gpac/files/gpac-0.5.2-static-libs.patch        |  80 ------
 media-video/gpac/gpac-0.5.2.ebuild                 | 120 --------
 media-video/gpac/gpac-0.6.1-r1.ebuild              | 119 --------
 7 files changed, 727 deletions(-)

diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
index fed26a3dcd..82a0e27b6d 100644
--- a/media-video/gpac/Manifest
+++ b/media-video/gpac/Manifest
@@ -1,2 +1 @@
-DIST gpac-0.5.2.tar.gz 9044537 SHA256 14de020482fc0452240f368564baa95a71b729980e4f36d94dd75c43ac4d9d5c SHA512 b6828953333c6615a2a57845190c246681f4d83a73e1f96f200fed6bfe97b7273ab5d30618b7782cd442e68e8c9e37971792dfd6366dcf21b3b3bdbb1a8bc979 WHIRLPOOL d3e45dd7eb7070aca8d9bbc55d235f31a2955b682f1f0ae145b14db8dda69397fb840beadd7c0631bee0560f6bb3bad23a0abbc9571bab4df323136dd1c1c122
 DIST gpac-0.6.1.tar.gz 9113143 SHA256 67d1ac8f8b3e74da0e4e38ea926dc15bca6e9941e8f366e3538abcf13c103c09 SHA512 b1409a8ebcda08c3af504d7de591528ef84f5c3d8d506dd490502e16493de11c2435ea3f5957f39100a2ce040d5e431c86a5a203f806fcc865ae4b08f6cf5595 WHIRLPOOL bd0c87841036220623021898f0b82d2364fd37c5254f58cd7db33617350f0864ce9672b8cbfa10f0d08948f2842fe9b19db9f562074c43df6d94cf2b13a7d141

diff --git a/media-video/gpac/files/ffmpeg25.patch b/media-video/gpac/files/ffmpeg25.patch
deleted file mode 100644
index 5451b8e119..0000000000
--- a/media-video/gpac/files/ffmpeg25.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add proper versionned checks for avformat_close_input
-https://bugs.gentoo.org/show_bug.cgi?id=536526
-
-diff --git a/modules/ffmpeg_in/ffmpeg_demux.c b/modules/ffmpeg_in/ffmpeg_demux.c
-index a5202ee..975a945 100644
---- a/modules/ffmpeg_in/ffmpeg_demux.c
-+++ b/modules/ffmpeg_in/ffmpeg_demux.c
-@@ -301,7 +301,7 @@ static Bool FFD_CanHandleURL(GF_InputService *plug, const char *url)
- 	}
- 
- exit:
--#ifndef FF_API_CLOSE_INPUT_FILE
-+#if LIBAVFORMAT_VERSION_MAJOR < 54
- 	if (ctx) av_close_input_file(ctx);
- #else
- 	if (ctx) avformat_close_input(&ctx);
-@@ -680,7 +680,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, GF_ClientService *serv,
- 
- 		ffd->seekable = (av_seek_frame(ffd->ctx, -1, 0, AVSEEK_FLAG_BACKWARD)<0) ? 0 : 1;
- 		if (!ffd->seekable) {
--#ifndef FF_API_CLOSE_INPUT_FILE
-+#if LIBAVFORMAT_VERSION_MAJOR < 54
- 			av_close_input_file(ffd->ctx);
- #else
- 			avformat_close_input(&ffd->ctx);
-@@ -699,7 +699,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, GF_ClientService *serv,
- 
- err_exit:
- 	GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] Error opening file %s: %s\n", url, gf_error_to_string(e)));
--#ifndef FF_API_CLOSE_INPUT_FILE
-+#if LIBAVFORMAT_VERSION_MAJOR < 54
- 	if (ffd->ctx) av_close_input_file(ffd->ctx);
- #else
- 	if (ffd->ctx) avformat_close_input(&ffd->ctx);
-@@ -757,7 +757,7 @@ static GF_Err FFD_CloseService(GF_InputService *plug)
- 
- 	ffd->is_running = 0;
- 
--#ifndef FF_API_CLOSE_INPUT_FILE
-+#if LIBAVFORMAT_VERSION_MAJOR < 54
- 	if (ffd->ctx) av_close_input_file(ffd->ctx);
- #else
- 	if (ffd->ctx) avformat_close_input(&ffd->ctx);

diff --git a/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch b/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch
deleted file mode 100644
index 0137a3ba64..0000000000
--- a/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: gpac-0.5.2/applications/dashcast/video_encoder.c
-===================================================================
---- gpac-0.5.2.orig/applications/dashcast/video_encoder.c
-+++ gpac-0.5.2/applications/dashcast/video_encoder.c
-@@ -86,7 +86,7 @@ int dc_video_encoder_open(VideoOutputFil
- 		video_output_file->codec_ctx->time_base.den = video_data_conf->time_base.den;
- 		video_output_file->codec_ctx->time_base.num = video_data_conf->time_base.num * video_data_conf->time_base.den / video_data_conf->framerate;
- 	}
--	video_output_file->codec_ctx->pix_fmt = PIX_FMT_YUV420P;
-+	video_output_file->codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
- 	video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
- 
- //	video_output_file->codec_ctx->codec_id = video_codec->id;
-@@ -96,7 +96,7 @@ int dc_video_encoder_open(VideoOutputFil
- //	video_output_file->codec_ctx->height = video_data_conf->height;
- //	video_output_file->codec_ctx->time_base = (AVRational) {1 ,
- //				video_output_file->video_data_conf->framerate};
--//	video_output_file->codec_ctx->codec->pix_fmt = PIX_FMT_YUV420P;
-+//	video_output_file->codec_ctx->codec->pix_fmt = AV_PIX_FMT_YUV420P;
- 	video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
- //
- //	av_opt_set(video_output_file->codec_ctx->priv_data, "preset", "ultrafast", 0);
-Index: gpac-0.5.2/applications/dashcast/video_muxer.c
-===================================================================
---- gpac-0.5.2.orig/applications/dashcast/video_muxer.c
-+++ gpac-0.5.2/applications/dashcast/video_muxer.c
-@@ -643,7 +643,7 @@ int dc_ffmpeg_video_muxer_open(VideoOutp
- 
- 	video_stream->codec->time_base = video_codec_ctx->time_base;
- 
--	video_stream->codec->pix_fmt = PIX_FMT_YUV420P;
-+	video_stream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
- 	video_stream->codec->gop_size = video_codec_ctx->time_base.den; //video_output_file->video_data_conf->framerate;
- 
- 	av_opt_set(video_stream->codec->priv_data, "preset", "ultrafast", 0);
-Index: gpac-0.5.2/applications/dashcast/video_scaler.c
-===================================================================
---- gpac-0.5.2.orig/applications/dashcast/video_scaler.c
-+++ gpac-0.5.2/applications/dashcast/video_scaler.c
-@@ -125,7 +125,7 @@ int dc_video_scaler_data_init(VideoInput
- 	dc_consumer_init(&video_scaled_data->consumer, video_cb_size, name);
- 
- 	video_scaled_data->num_producers = max_source;
--	video_scaled_data->out_pix_fmt = PIX_FMT_YUV420P;
-+	video_scaled_data->out_pix_fmt = AV_PIX_FMT_YUV420P;
- 	GF_SAFE_ALLOC_N(video_scaled_data->vsprop, max_source, VideoScaledProp);
- 	memset(video_scaled_data->vsprop, 0, max_source * sizeof(VideoScaledProp));
- 
-@@ -198,7 +198,7 @@ int dc_video_scaler_scale(VideoInputData
- 		video_scaled_data_node->cropped_frame->width  = video_input_data->vprop[index].width  - video_input_data->vprop[index].crop_x;
- 		video_scaled_data_node->cropped_frame->height = video_input_data->vprop[index].height - video_input_data->vprop[index].crop_y;
- #endif
--		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
-+		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, AV_PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
- 			GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Video scaler: error while cropping picture.\n"));
- 			return -1;
- 		}

diff --git a/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch b/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch
deleted file mode 100644
index 1cf5487b87..0000000000
--- a/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
-===================================================================
---- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_decode.c
-+++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
-@@ -102,7 +102,7 @@ static void FFDEC_LoadDSI(FFDec *ffd, GF
- 	}
- 
- 	switch (codec->id) {
--	case CODEC_ID_SVQ3:
-+	case AV_CODEC_ID_SVQ3:
- 	{
- 		u32 at_type, size;
- 		size = gf_bs_read_u32(bs);
-@@ -240,10 +240,10 @@ static GF_Err FFDEC_AttachStream(GF_Base
- 			(*ctx)->codec_type = AVMEDIA_TYPE_VIDEO;
- 			switch (ffd->oti) {
- 			case GPAC_OTI_VIDEO_MPEG4_PART2:
--				codec_id = CODEC_ID_MPEG4;
-+				codec_id = AV_CODEC_ID_MPEG4;
- 				break;
- 			case GPAC_OTI_VIDEO_AVC:
--				codec_id = CODEC_ID_H264;
-+				codec_id = AV_CODEC_ID_H264;
- 				break;
- #ifdef HAS_HEVC
- 			case GPAC_OTI_VIDEO_HEVC:
-@@ -257,14 +257,14 @@ static GF_Err FFDEC_AttachStream(GF_Base
- 			case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
- 			case GPAC_OTI_VIDEO_MPEG2_HIGH:
- 			case GPAC_OTI_VIDEO_MPEG2_422:
--				codec_id = CODEC_ID_MPEG2VIDEO;
-+				codec_id = AV_CODEC_ID_MPEG2VIDEO;
- 				break;
- 			case GPAC_OTI_IMAGE_JPEG:
--				codec_id = CODEC_ID_MJPEG;
-+				codec_id = AV_CODEC_ID_MJPEG;
- 				ffd->is_image=1;
- 				break;
- 			case 0xFF:
--				codec_id = CODEC_ID_SVQ3;
-+				codec_id = AV_CODEC_ID_SVQ3;
- 				break;
- 			}
- 		} else if (ffd->st==GF_STREAM_AUDIO) {
-@@ -273,18 +273,18 @@ static GF_Err FFDEC_AttachStream(GF_Base
- 			case GPAC_OTI_AUDIO_MPEG2_PART3:
- 			case GPAC_OTI_AUDIO_MPEG1:
- 				(*ctx)->frame_size = 1152;
--				codec_id = CODEC_ID_MP2;
-+				codec_id = AV_CODEC_ID_MP2;
- 				break;
- 			case GPAC_OTI_AUDIO_AC3:
--				codec_id = CODEC_ID_AC3;
-+				codec_id = AV_CODEC_ID_AC3;
- 				break;
- 			case GPAC_OTI_AUDIO_EAC3:
--				codec_id = CODEC_ID_EAC3;
-+				codec_id = AV_CODEC_ID_EAC3;
- 				break;
- 			}
- 		}
- 		else if ((ffd->st==GF_STREAM_ND_SUBPIC) && (ffd->oti==0xe0)) {
--			codec_id = CODEC_ID_DVD_SUBTITLE;
-+			codec_id = AV_CODEC_ID_DVD_SUBTITLE;
- 		}
- 		*codec = avcodec_find_decoder(codec_id);
- 	}
-@@ -375,8 +375,8 @@ static GF_Err FFDEC_AttachStream(GF_Base
- #endif //HAS_HEVC
- 	if (!ffd->output_cb_size) ffd->output_cb_size = 4;
- 
--	if (codec_id == CODEC_ID_RAWVIDEO) {
--		(*ctx)->codec_id = CODEC_ID_RAWVIDEO;
-+	if (codec_id == AV_CODEC_ID_RAWVIDEO) {
-+		(*ctx)->codec_id = AV_CODEC_ID_RAWVIDEO;
- 		(*ctx)->pix_fmt = ffd->raw_pix_fmt;
- 		if ((*ctx)->extradata && strstr((char *) (*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
- 	} else {
-@@ -388,7 +388,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
- 	}
- 	/*setup audio streams*/
- 	if (ffd->st==GF_STREAM_AUDIO) {
--		if ((*codec)->id == CODEC_ID_MP2) {
-+		if ((*codec)->id == AV_CODEC_ID_MP2) {
- 			(*ctx)->frame_size = ((*ctx)->sample_rate > 24000) ? 1152 : 576;
- 		}
- 		/*may be 0 (cfg not known yet)*/
-@@ -408,17 +408,17 @@ static GF_Err FFDEC_AttachStream(GF_Base
- 
- 	} else {
- 		switch ((*codec)->id) {
--		case CODEC_ID_MJPEG:
--		case CODEC_ID_MJPEGB:
--		case CODEC_ID_LJPEG:
-+		case AV_CODEC_ID_MJPEG:
-+		case AV_CODEC_ID_MJPEGB:
-+		case AV_CODEC_ID_LJPEG:
- #if (LIBAVCODEC_VERSION_INT > AV_VERSION_INT(51, 20, 0))
--		case CODEC_ID_GIF:
-+		case AV_CODEC_ID_GIF:
- #endif
--		case CODEC_ID_RAWVIDEO:
-+		case AV_CODEC_ID_RAWVIDEO:
- 			ffd->pix_fmt = GF_PIXEL_RGB_24;
- 			break;
- 
--		case CODEC_ID_DVD_SUBTITLE:
-+		case AV_CODEC_ID_DVD_SUBTITLE:
- #if !defined(FF_API_AVFRAME_LAVC)
- 			*frame = avcodec_alloc_frame();
- #else
-@@ -843,7 +843,7 @@ redecode:
- 	}
- 
- 
--	if ( ctx->codec_id == CODEC_ID_RAWVIDEO) {
-+	if ( ctx->codec_id == AV_CODEC_ID_RAWVIDEO) {
- 		if (*outBufferLength != ffd->out_size) {
- 			*outBufferLength = ffd->out_size;
- 			return GF_BUFFER_TOO_SMALL;
-@@ -852,7 +852,7 @@ redecode:
- 			*outBufferLength = ffd->out_size;
- 			assert(inBufferLength==ffd->out_size);
- 
--			if (ffd->raw_pix_fmt==PIX_FMT_BGR24) {
-+			if (ffd->raw_pix_fmt==AV_PIX_FMT_BGR24) {
- 				s32 i, j;
- 				for (j=0; j<ctx->height; j++) {
- 					u8 *src = (u8 *) inBuffer + j*3*ctx->width;
-@@ -940,7 +940,7 @@ redecode:
- 				/*OK we loose the DSI stored in the codec context, but H263 doesn't need any, and if we're
- 				here this means the DSI was broken, so no big deal*/
- 				avcodec_close(ctx);
--				*codec = avcodec_find_decoder(CODEC_ID_H263);
-+				*codec = avcodec_find_decoder(AV_CODEC_ID_H263);
- 
- #ifdef USE_AVCTX3
- 				if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
-@@ -991,7 +991,7 @@ redecode:
- 
- 	stride = frame->linesize[0];
- #ifndef NO_10bit
--	if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) )  {
-+	if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) )  {
- 		ffd->conv_to_8bit = 1;
- 		stride=w;
- 	}
-@@ -1000,7 +1000,7 @@ redecode:
- 	/*recompute outsize in case on-the-fly change*/
- 	if ((w != ctx->width) || (h != ctx->height)
- 	        || (ffd->direct_output && (stride != ffd->stride))
--	        || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != PIX_FMT_YUV420P) && !ffd->output_as_8bit )
-+	        || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != AV_PIX_FMT_YUV420P) && !ffd->output_as_8bit )
- 	        //need to realloc the conversion buffer
- 	        || (ffd->conv_to_8bit && !ffd->conv_buffer && ffd->direct_output)
- 	   ) {
-@@ -1011,7 +1011,7 @@ redecode:
- 		}
- #ifndef NO_10bit
- 		//this YUV format is handled natively in GPAC
--		else if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
-+		else if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
- 			ffd->stride = ffd->direct_output ? frame->linesize[0] : ctx->width*2;
- 			outsize = ffd->stride * ctx->height * 3 / 2;
- 			ffd->out_pix_fmt = GF_PIXEL_YV12_10;
-@@ -1157,23 +1157,20 @@ redecode:
- 	if (ffd->out_pix_fmt==GF_PIXEL_RGB_24) {
- 		pict.data[0] =  (uint8_t *)outBuffer;
- 		pict.linesize[0] = 3*ctx->width;
--		pix_out = PIX_FMT_RGB24;
-+		pix_out = AV_PIX_FMT_RGB24;
- 	} else {
- 		pict.data[0] =  (uint8_t *)outBuffer;
- 		pict.data[1] =  (uint8_t *)outBuffer + ffd->stride * ctx->height;
- 		pict.data[2] =  (uint8_t *)outBuffer + 5 * ffd->stride * ctx->height / 4;
- 		pict.linesize[0] = ffd->stride;
- 		pict.linesize[1] = pict.linesize[2] = ffd->stride/2;
--		pix_out = PIX_FMT_YUV420P;
-+		pix_out = AV_PIX_FMT_YUV420P;
- #ifndef NO_10bit
- 		//this YUV format is handled natively in GPAC
--		if (ctx->pix_fmt==PIX_FMT_YUV420P10LE) {
--			pix_out = PIX_FMT_YUV420P10LE;
-+		if (ctx->pix_fmt==AV_PIX_FMT_YUV420P10LE) {
-+			pix_out = AV_PIX_FMT_YUV420P10LE;
- 		}
- #endif
--		if (!mmlevel && frame->interlaced_frame) {
--			avpicture_deinterlace((AVPicture *) frame, (AVPicture *) frame, ctx->pix_fmt, ctx->width, ctx->height);
--		}
- 	}
- 	pict.data[3] = 0;
- 	pict.linesize[3] = 0;
-@@ -1263,13 +1260,13 @@ static u32 FFDEC_CanHandleStream(GF_Base
- 		switch (ffd->oti) {
- 		case GPAC_OTI_AUDIO_MPEG2_PART3:
- 		case GPAC_OTI_AUDIO_MPEG1:
--			codec_id = CODEC_ID_MP2;
-+			codec_id = AV_CODEC_ID_MP2;
- 			break;
- 		case GPAC_OTI_AUDIO_AC3:
--			codec_id = CODEC_ID_AC3;
-+			codec_id = AV_CODEC_ID_AC3;
- 			break;
- 		case GPAC_OTI_AUDIO_EAC3:
--			codec_id = CODEC_ID_EAC3;
-+			codec_id = AV_CODEC_ID_EAC3;
- 			break;
- 		}
- 	}
-@@ -1309,11 +1306,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
- 		switch (ffd->oti) {
- 		/*MPEG-4 v1 simple profile*/
- 		case GPAC_OTI_VIDEO_MPEG4_PART2:
--			codec_id = CODEC_ID_MPEG4;
-+			codec_id = AV_CODEC_ID_MPEG4;
- 			break;
- 		/*H264 (not std OTI, just the way we use it internally)*/
- 		case GPAC_OTI_VIDEO_AVC:
--			codec_id = CODEC_ID_H264;
-+			codec_id = AV_CODEC_ID_H264;
- 			break;
- #ifdef HAS_HEVC
- 		case GPAC_OTI_VIDEO_HEVC:
-@@ -1329,11 +1326,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
- 		case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
- 		case GPAC_OTI_VIDEO_MPEG2_HIGH:
- 		case GPAC_OTI_VIDEO_MPEG2_422:
--			codec_id = CODEC_ID_MPEG2VIDEO;
-+			codec_id = AV_CODEC_ID_MPEG2VIDEO;
- 			break;
- 		/*JPEG*/
- 		case GPAC_OTI_IMAGE_JPEG:
--			codec_id = CODEC_ID_MJPEG;
-+			codec_id = AV_CODEC_ID_MJPEG;
- 			/*return maybe supported as FFMPEG JPEG decoder has some issues with many files, so let's use it only if no
- 			other dec is available*/
- 			if (avcodec_find_decoder(codec_id) != NULL)
-Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
-===================================================================
---- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_demux.c
-+++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
-@@ -333,13 +333,13 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
- 		AVCodecContext *dec = ffd->ctx->streams[ffd->audio_st]->codec;
- 		esd->slConfig->timestampResolution = ffd->audio_tscale.den;
- 		switch (dec->codec_id) {
--		case CODEC_ID_MP2:
-+		case AV_CODEC_ID_MP2:
- 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG1;
- 			break;
--		case CODEC_ID_MP3:
-+		case AV_CODEC_ID_MP3:
- 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG2_PART3;
- 			break;
--		case CODEC_ID_AAC:
-+		case AV_CODEC_ID_AAC:
- 			if (!dec->extradata_size) goto opaque_audio;
- 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_AAC_MPEG4;
- 			esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
-@@ -374,25 +374,25 @@ opaque_audio:
- 		AVCodecContext *dec = ffd->ctx->streams[ffd->video_st]->codec;
- 		esd->slConfig->timestampResolution = ffd->video_tscale.den;
- 		switch (dec->codec_id) {
--		case CODEC_ID_MPEG4:
-+		case AV_CODEC_ID_MPEG4:
- 			/*there is a bug in fragmentation of raw H264 in ffmpeg, the NALU startcode (0x00000001) is split across
- 			two frames - we therefore force internal ffmpeg codec ID to avoid NALU size recompute
- 			at the decoder level*/
--//		case CODEC_ID_H264:
-+//		case AV_CODEC_ID_H264:
- 			/*if dsi not detected force use ffmpeg*/
- 			if (!dec->extradata_size) goto opaque_video;
- 			/*otherwise use any MPEG-4 Visual*/
--			esd->decoderConfig->objectTypeIndication = (dec->codec_id==CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
-+			esd->decoderConfig->objectTypeIndication = (dec->codec_id==AV_CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
- 			esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
- 			esd->decoderConfig->decoderSpecificInfo->data = gf_malloc(sizeof(char)*dec->extradata_size);
- 			memcpy(esd->decoderConfig->decoderSpecificInfo->data,
- 			       dec->extradata,
- 			       sizeof(char)*dec->extradata_size);
- 			break;
--		case CODEC_ID_MPEG1VIDEO:
-+		case AV_CODEC_ID_MPEG1VIDEO:
- 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG1;
- 			break;
--		case CODEC_ID_MPEG2VIDEO:
-+		case AV_CODEC_ID_MPEG2VIDEO:
- 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG2_422;
- 			break;
- 		default:
-Index: gpac-0.5.2/modules/Makefile
-===================================================================
---- gpac-0.5.2.orig/modules/Makefile
-+++ gpac-0.5.2/modules/Makefile
-@@ -100,12 +100,10 @@ endif
- 
- 
- ifneq ($(CONFIG_FFMPEG), no)
--ifneq ($(CONFIG_LIBAV), new) #we don't support libav newest APIs
- ifeq ($(CONFIG_OPENHEVC),no)
- PLUGDIRS+=ffmpeg_in
- endif
- endif
--endif
- 
- ifeq ($(CONFIG_OPENHEVC), yes)
- ifeq ($(CONFIG_FFMPEG), no)

diff --git a/media-video/gpac/files/gpac-0.5.2-static-libs.patch b/media-video/gpac/files/gpac-0.5.2-static-libs.patch
deleted file mode 100644
index 91c89c4404..0000000000
--- a/media-video/gpac/files/gpac-0.5.2-static-libs.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-Index: gpac-0.5.2/configure
-===================================================================
---- gpac-0.5.2.orig/configure
-+++ gpac-0.5.2/configure
-@@ -101,6 +101,7 @@ has_xmlrpc="no"
- has_openjpeg="no"
- gprof_build="no"
- static_build="no"
-+static_libs="no"
- want_pic="no"
- want_gcov="no"
- has_joystick="no"
-@@ -248,6 +249,7 @@ GPAC configuration options:
-   --enable-amr-wb          enable AMR WB library
-   --enable-amr             enable both AMR NB and WB libraries
-   --enable-static-bin      GPAC static build
-+  --enable-static-lib      GPAC static libraries build
-   --static-mp4box          configure for static linking of MP4Box.
-   --enable-depth           enables depth handling in the compositor
- 
-@@ -1775,6 +1777,8 @@ for opt do
-             ;;
-         --enable-static-bin) static_build="yes";
-             ;;
-+	--enable-static-lib) static_libs="yes";
-+	   ;;
-         --disable-ipv6) has_ipv6="no"
-             ;;
-         --disable-wx) has_wx="no"
-@@ -2452,6 +2456,7 @@ echo "** GPAC $version rev$revision Core
- echo "debug version: $debuginfo"
- echo "GProf enabled: $gprof_build"
- echo "Static build enabled: $static_build"
-+echo "Static libs build enabled: $static_libs"
- echo "Memory tracking enabled: $use_memory_tracking"
- echo "Use standard memory allocator: $use_std_alloc"
- echo "Fixed-Point Version: $use_fixed_point"
-@@ -3064,6 +3069,7 @@ echo "CONFIG_AMR_WB_FT=$has_amr_wb" >> c
- echo "DEBUGBUILD=$debuginfo" >> config.mak
- echo "GPROFBUILD=$gprof_build" >> 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
-Index: gpac-0.5.2/Makefile
-===================================================================
---- gpac-0.5.2.orig/Makefile
-+++ gpac-0.5.2/Makefile
-@@ -203,7 +203,9 @@ ifeq ($(GPAC_ENST), yes)
- 	$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/include/gpac/enst/*.h "$(DESTDIR)$(prefix)/include/gpac/enst"
- endif
- 	mkdir -p "$(DESTDIR)$(prefix)/$(libdir)"
-+ifeq ($(STATICLIBS),yes)
- 	$(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(libdir)"
-+endif
- 	$(MAKE) installdylib
- 
- uninstall-lib:
-Index: gpac-0.5.2/src/Makefile
-===================================================================
---- gpac-0.5.2.orig/src/Makefile
-+++ gpac-0.5.2/src/Makefile
-@@ -606,12 +606,16 @@ compositor: $(LIBGPAC_COMPOSITOR)
- 	@echo "OBJS $(OBJS)"
- 	@echo "LIBS $(EXTRALIBS)"
- ifeq ($(CONFIG_DARWIN),yes)
-+ifeq ($(STATICLIBS),yes)
- 	$(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
- 	$(RANLIB) ../bin/gcc/libgpac_static.a
-+endif
- 	$(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) 
- else
-+ifeq ($(STATICLIBS),yes)
- 	$(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
- 	$(RANLIB) ../bin/gcc/libgpac_static.a
-+endif
- 	$(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
- ifeq (,$(findstring yes, $(CONFIG_WIN32)))
- 	mv $@ $@.$(VERSION_SONAME)

diff --git a/media-video/gpac/gpac-0.5.2.ebuild b/media-video/gpac/gpac-0.5.2.ebuild
deleted file mode 100644
index 31467af3ce..0000000000
--- a/media-video/gpac/gpac-0.5.2.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-if [[ ${PV} == *9999 ]] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/gpac/gpac"
-	KEYWORDS="alpha"
-else
-	SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd"
-fi
-
-inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
-
-DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
-HOMEPAGE="http://gpac.wp.mines-telecom.fr/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid"
-
-RDEPEND="
-	a52? ( media-libs/a52dec )
-	aac? ( >=media-libs/faad2-2.0 )
-	alsa? ( media-libs/alsa-lib )
-	dvb? ( media-tv/linuxtv-dvb-apps )
-	ffmpeg? ( virtual/ffmpeg )
-	jack? ( media-sound/jack-audio-connection-kit )
-	jpeg? ( virtual/jpeg )
-	mad? ( >=media-libs/libmad-0.15.1b )
-	opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
-	>=media-libs/libogg-1.1
-	png? ( >=media-libs/libpng-1.4 )
-	vorbis? ( >=media-libs/libvorbis-1.1 )
-	theora? ( media-libs/libtheora )
-	truetype? ( >=media-libs/freetype-2.1.4 )
-	xml? ( >=dev-libs/libxml2-2.6.0 )
-	xvid? ( >=media-libs/xvid-1.0.1 )
-	sdl? ( media-libs/libsdl )
-	jpeg2k? ( media-libs/openjpeg:0 )
-	ssl? ( dev-libs/openssl )
-	pulseaudio? ( media-sound/pulseaudio )
-	x11-libs/libXt
-	x11-libs/libX11
-	x11-libs/libXv
-	x11-libs/libXext"
-# disabled upstream, see applications/Makefile
-# wxwidgets? ( =x11-libs/wxGTK-2.8* )
-
-DEPEND="${RDEPEND}"
-
-my_use() {
-	local flag="$1" pflag="${2:-$1}"
-	if use ${flag}; then
-		echo "--use-${pflag}=system"
-	else
-		echo "--use-${pflag}=no"
-	fi
-}
-
-src_prepare() {
-	epatch	"${FILESDIR}"/110_all_implicitdecls.patch \
-			"${FILESDIR}"/${PN}-0.5.2-static-libs.patch \
-			"${FILESDIR}"/${PN}-0.5.2-gf_isom_set_pixel_aspect_ratio.patch \
-			"${FILESDIR}"/${PN}-0.5.2-avpixfmt.patch
-	has_version '>=media-video/ffmpeg-2.9' && epatch "${FILESDIR}"/${PN}-0.5.2-ffmpeg29.patch
-	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
-}
-
-src_configure() {
-	tc-export CC CXX AR RANLIB
-	# upstream used this internal define to check whether to use the new API
-	# when it is a guard for deprecating the old one...
-	append-cflags "-DFF_API_AVFRAME_LAVC=1"
-
-	econf \
-		--enable-svg \
-		--enable-pic \
-		--disable-amr \
-		--use-js=no \
-		--use-ogg=system \
-		$(use_enable alsa) \
-		$(use_enable debug) \
-		$(use_enable ipv6) \
-		$(use_enable jack jack yes) \
-		$(use_enable opengl) \
-		$(use_enable oss oss-audio) \
-		$(use_enable pulseaudio pulseaudio yes) \
-		$(use_enable sdl) \
-		$(use_enable ssl) \
-		$(use_enable static-libs static-lib) \
-		--disable-wx \
-		$(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) \
-		--extra-cflags="${CFLAGS}" \
-		--cc="$(tc-getCC)" \
-		--libdir="/$(get_libdir)" \
-		--verbose
-}
-
-src_install() {
-	emake STRIP="true" DESTDIR="${D}" install
-	emake STRIP="true" DESTDIR="${D}" install-lib
-	dodoc AUTHORS BUGS Changelog README TODO
-	dodoc doc/*.txt
-	dohtml doc/*.html
-}

diff --git a/media-video/gpac/gpac-0.6.1-r1.ebuild b/media-video/gpac/gpac-0.6.1-r1.ebuild
deleted file mode 100644
index 566713ada3..0000000000
--- a/media-video/gpac/gpac-0.6.1-r1.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-if [[ ${PV} == *9999 ]] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/gpac/gpac"
-	KEYWORDS=""
-else
-	SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-fi
-
-inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
-
-DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
-HOMEPAGE="http://gpac.wp.mines-telecom.fr/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png
-	pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid X"
-
-RDEPEND="
-	a52? ( media-libs/a52dec )
-	aac? ( >=media-libs/faad2-2.0 )
-	alsa? ( media-libs/alsa-lib )
-	dvb? ( media-tv/linuxtv-dvb-apps )
-	ffmpeg? ( virtual/ffmpeg )
-	jack? ( media-sound/jack-audio-connection-kit )
-	jpeg? ( virtual/jpeg )
-	mad? ( >=media-libs/libmad-0.15.1b )
-	opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
-	>=media-libs/libogg-1.1
-	png? ( >=media-libs/libpng-1.4 )
-	vorbis? ( >=media-libs/libvorbis-1.1 )
-	theora? ( media-libs/libtheora )
-	truetype? ( >=media-libs/freetype-2.1.4 )
-	xml? ( >=dev-libs/libxml2-2.6.0 )
-	xvid? ( >=media-libs/xvid-1.0.1 )
-	sdl? ( media-libs/libsdl )
-	jpeg2k? ( media-libs/openjpeg:0 )
-	ssl? ( dev-libs/openssl )
-	pulseaudio? ( media-sound/pulseaudio )
-	X? (
-		x11-libs/libXt
-		x11-libs/libX11
-		x11-libs/libXv
-		x11-libs/libXext
-	)"
-# disabled upstream, see applications/Makefile
-# wxwidgets? ( =x11-libs/wxGTK-2.8* )
-
-DEPEND="${RDEPEND}"
-
-my_use() {
-	local flag="$1" pflag="${2:-$1}"
-	if use ${flag}; then
-		echo "--use-${pflag}=system"
-	else
-		echo "--use-${pflag}=no"
-	fi
-}
-
-src_prepare() {
-	epatch	"${FILESDIR}"/110_all_implicitdecls.patch \
-			"${FILESDIR}"/${PN}-0.5.3-static-libs.patch \
-			"${FILESDIR}"/${PN}-0.5.2-gf_isom_set_pixel_aspect_ratio.patch
-	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
-}
-
-src_configure() {
-	tc-export CC CXX AR RANLIB
-
-	econf \
-		--enable-svg \
-		--enable-pic \
-		--disable-amr \
-		--use-js=no \
-		--use-ogg=system \
-		$(use_enable alsa) \
-		$(use_enable debug) \
-		$(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) \
-		--disable-wx \
-		$(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) \
-		--extra-cflags="${CFLAGS}" \
-		--cc="$(tc-getCC)" \
-		--libdir="/$(get_libdir)" \
-		--verbose
-}
-
-src_install() {
-	emake STRIP="true" DESTDIR="${D}" install
-	emake STRIP="true" DESTDIR="${D}" install-lib
-	dodoc AUTHORS BUGS Changelog README.md TODO
-	dodoc doc/*.txt
-	dohtml doc/*.html
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2015-09-16 11:47 Alexis Ballier
  0 siblings, 0 replies; 11+ messages in thread
From: Alexis Ballier @ 2015-09-16 11:47 UTC (permalink / raw
  To: gentoo-commits

commit:     a2a7ab8426921d89601e1d73746e83dcc2f511a7
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 16 11:47:18 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Sep 16 11:47:35 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2a7ab84

media-video/gpac: fix build with ffmpeg git master.

Package-Manager: portage-2.2.20.1

 media-video/gpac/files/gpac-0.5.2-avpixfmt.patch |  57 +++++
 media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch | 307 +++++++++++++++++++++++
 media-video/gpac/gpac-0.5.2.ebuild               |   7 +-
 3 files changed, 370 insertions(+), 1 deletion(-)

diff --git a/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch b/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch
new file mode 100644
index 0000000..0137a3b
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.2-avpixfmt.patch
@@ -0,0 +1,57 @@
+Index: gpac-0.5.2/applications/dashcast/video_encoder.c
+===================================================================
+--- gpac-0.5.2.orig/applications/dashcast/video_encoder.c
++++ gpac-0.5.2/applications/dashcast/video_encoder.c
+@@ -86,7 +86,7 @@ int dc_video_encoder_open(VideoOutputFil
+ 		video_output_file->codec_ctx->time_base.den = video_data_conf->time_base.den;
+ 		video_output_file->codec_ctx->time_base.num = video_data_conf->time_base.num * video_data_conf->time_base.den / video_data_conf->framerate;
+ 	}
+-	video_output_file->codec_ctx->pix_fmt = PIX_FMT_YUV420P;
++	video_output_file->codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
+ 
+ //	video_output_file->codec_ctx->codec_id = video_codec->id;
+@@ -96,7 +96,7 @@ int dc_video_encoder_open(VideoOutputFil
+ //	video_output_file->codec_ctx->height = video_data_conf->height;
+ //	video_output_file->codec_ctx->time_base = (AVRational) {1 ,
+ //				video_output_file->video_data_conf->framerate};
+-//	video_output_file->codec_ctx->codec->pix_fmt = PIX_FMT_YUV420P;
++//	video_output_file->codec_ctx->codec->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
+ //
+ //	av_opt_set(video_output_file->codec_ctx->priv_data, "preset", "ultrafast", 0);
+Index: gpac-0.5.2/applications/dashcast/video_muxer.c
+===================================================================
+--- gpac-0.5.2.orig/applications/dashcast/video_muxer.c
++++ gpac-0.5.2/applications/dashcast/video_muxer.c
+@@ -643,7 +643,7 @@ int dc_ffmpeg_video_muxer_open(VideoOutp
+ 
+ 	video_stream->codec->time_base = video_codec_ctx->time_base;
+ 
+-	video_stream->codec->pix_fmt = PIX_FMT_YUV420P;
++	video_stream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	video_stream->codec->gop_size = video_codec_ctx->time_base.den; //video_output_file->video_data_conf->framerate;
+ 
+ 	av_opt_set(video_stream->codec->priv_data, "preset", "ultrafast", 0);
+Index: gpac-0.5.2/applications/dashcast/video_scaler.c
+===================================================================
+--- gpac-0.5.2.orig/applications/dashcast/video_scaler.c
++++ gpac-0.5.2/applications/dashcast/video_scaler.c
+@@ -125,7 +125,7 @@ int dc_video_scaler_data_init(VideoInput
+ 	dc_consumer_init(&video_scaled_data->consumer, video_cb_size, name);
+ 
+ 	video_scaled_data->num_producers = max_source;
+-	video_scaled_data->out_pix_fmt = PIX_FMT_YUV420P;
++	video_scaled_data->out_pix_fmt = AV_PIX_FMT_YUV420P;
+ 	GF_SAFE_ALLOC_N(video_scaled_data->vsprop, max_source, VideoScaledProp);
+ 	memset(video_scaled_data->vsprop, 0, max_source * sizeof(VideoScaledProp));
+ 
+@@ -198,7 +198,7 @@ int dc_video_scaler_scale(VideoInputData
+ 		video_scaled_data_node->cropped_frame->width  = video_input_data->vprop[index].width  - video_input_data->vprop[index].crop_x;
+ 		video_scaled_data_node->cropped_frame->height = video_input_data->vprop[index].height - video_input_data->vprop[index].crop_y;
+ #endif
+-		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
++		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, AV_PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
+ 			GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Video scaler: error while cropping picture.\n"));
+ 			return -1;
+ 		}

diff --git a/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch b/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch
new file mode 100644
index 0000000..1cf5487
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.2-ffmpeg29.patch
@@ -0,0 +1,307 @@
+Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
+===================================================================
+--- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_decode.c
++++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_decode.c
+@@ -102,7 +102,7 @@ static void FFDEC_LoadDSI(FFDec *ffd, GF
+ 	}
+ 
+ 	switch (codec->id) {
+-	case CODEC_ID_SVQ3:
++	case AV_CODEC_ID_SVQ3:
+ 	{
+ 		u32 at_type, size;
+ 		size = gf_bs_read_u32(bs);
+@@ -240,10 +240,10 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ 			(*ctx)->codec_type = AVMEDIA_TYPE_VIDEO;
+ 			switch (ffd->oti) {
+ 			case GPAC_OTI_VIDEO_MPEG4_PART2:
+-				codec_id = CODEC_ID_MPEG4;
++				codec_id = AV_CODEC_ID_MPEG4;
+ 				break;
+ 			case GPAC_OTI_VIDEO_AVC:
+-				codec_id = CODEC_ID_H264;
++				codec_id = AV_CODEC_ID_H264;
+ 				break;
+ #ifdef HAS_HEVC
+ 			case GPAC_OTI_VIDEO_HEVC:
+@@ -257,14 +257,14 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ 			case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
+ 			case GPAC_OTI_VIDEO_MPEG2_HIGH:
+ 			case GPAC_OTI_VIDEO_MPEG2_422:
+-				codec_id = CODEC_ID_MPEG2VIDEO;
++				codec_id = AV_CODEC_ID_MPEG2VIDEO;
+ 				break;
+ 			case GPAC_OTI_IMAGE_JPEG:
+-				codec_id = CODEC_ID_MJPEG;
++				codec_id = AV_CODEC_ID_MJPEG;
+ 				ffd->is_image=1;
+ 				break;
+ 			case 0xFF:
+-				codec_id = CODEC_ID_SVQ3;
++				codec_id = AV_CODEC_ID_SVQ3;
+ 				break;
+ 			}
+ 		} else if (ffd->st==GF_STREAM_AUDIO) {
+@@ -273,18 +273,18 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ 			case GPAC_OTI_AUDIO_MPEG2_PART3:
+ 			case GPAC_OTI_AUDIO_MPEG1:
+ 				(*ctx)->frame_size = 1152;
+-				codec_id = CODEC_ID_MP2;
++				codec_id = AV_CODEC_ID_MP2;
+ 				break;
+ 			case GPAC_OTI_AUDIO_AC3:
+-				codec_id = CODEC_ID_AC3;
++				codec_id = AV_CODEC_ID_AC3;
+ 				break;
+ 			case GPAC_OTI_AUDIO_EAC3:
+-				codec_id = CODEC_ID_EAC3;
++				codec_id = AV_CODEC_ID_EAC3;
+ 				break;
+ 			}
+ 		}
+ 		else if ((ffd->st==GF_STREAM_ND_SUBPIC) && (ffd->oti==0xe0)) {
+-			codec_id = CODEC_ID_DVD_SUBTITLE;
++			codec_id = AV_CODEC_ID_DVD_SUBTITLE;
+ 		}
+ 		*codec = avcodec_find_decoder(codec_id);
+ 	}
+@@ -375,8 +375,8 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ #endif //HAS_HEVC
+ 	if (!ffd->output_cb_size) ffd->output_cb_size = 4;
+ 
+-	if (codec_id == CODEC_ID_RAWVIDEO) {
+-		(*ctx)->codec_id = CODEC_ID_RAWVIDEO;
++	if (codec_id == AV_CODEC_ID_RAWVIDEO) {
++		(*ctx)->codec_id = AV_CODEC_ID_RAWVIDEO;
+ 		(*ctx)->pix_fmt = ffd->raw_pix_fmt;
+ 		if ((*ctx)->extradata && strstr((char *) (*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
+ 	} else {
+@@ -388,7 +388,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ 	}
+ 	/*setup audio streams*/
+ 	if (ffd->st==GF_STREAM_AUDIO) {
+-		if ((*codec)->id == CODEC_ID_MP2) {
++		if ((*codec)->id == AV_CODEC_ID_MP2) {
+ 			(*ctx)->frame_size = ((*ctx)->sample_rate > 24000) ? 1152 : 576;
+ 		}
+ 		/*may be 0 (cfg not known yet)*/
+@@ -408,17 +408,17 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ 
+ 	} else {
+ 		switch ((*codec)->id) {
+-		case CODEC_ID_MJPEG:
+-		case CODEC_ID_MJPEGB:
+-		case CODEC_ID_LJPEG:
++		case AV_CODEC_ID_MJPEG:
++		case AV_CODEC_ID_MJPEGB:
++		case AV_CODEC_ID_LJPEG:
+ #if (LIBAVCODEC_VERSION_INT > AV_VERSION_INT(51, 20, 0))
+-		case CODEC_ID_GIF:
++		case AV_CODEC_ID_GIF:
+ #endif
+-		case CODEC_ID_RAWVIDEO:
++		case AV_CODEC_ID_RAWVIDEO:
+ 			ffd->pix_fmt = GF_PIXEL_RGB_24;
+ 			break;
+ 
+-		case CODEC_ID_DVD_SUBTITLE:
++		case AV_CODEC_ID_DVD_SUBTITLE:
+ #if !defined(FF_API_AVFRAME_LAVC)
+ 			*frame = avcodec_alloc_frame();
+ #else
+@@ -843,7 +843,7 @@ redecode:
+ 	}
+ 
+ 
+-	if ( ctx->codec_id == CODEC_ID_RAWVIDEO) {
++	if ( ctx->codec_id == AV_CODEC_ID_RAWVIDEO) {
+ 		if (*outBufferLength != ffd->out_size) {
+ 			*outBufferLength = ffd->out_size;
+ 			return GF_BUFFER_TOO_SMALL;
+@@ -852,7 +852,7 @@ redecode:
+ 			*outBufferLength = ffd->out_size;
+ 			assert(inBufferLength==ffd->out_size);
+ 
+-			if (ffd->raw_pix_fmt==PIX_FMT_BGR24) {
++			if (ffd->raw_pix_fmt==AV_PIX_FMT_BGR24) {
+ 				s32 i, j;
+ 				for (j=0; j<ctx->height; j++) {
+ 					u8 *src = (u8 *) inBuffer + j*3*ctx->width;
+@@ -940,7 +940,7 @@ redecode:
+ 				/*OK we loose the DSI stored in the codec context, but H263 doesn't need any, and if we're
+ 				here this means the DSI was broken, so no big deal*/
+ 				avcodec_close(ctx);
+-				*codec = avcodec_find_decoder(CODEC_ID_H263);
++				*codec = avcodec_find_decoder(AV_CODEC_ID_H263);
+ 
+ #ifdef USE_AVCTX3
+ 				if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
+@@ -991,7 +991,7 @@ redecode:
+ 
+ 	stride = frame->linesize[0];
+ #ifndef NO_10bit
+-	if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) )  {
++	if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && ffd->output_as_8bit && (frame->linesize[0] >= 2*w) )  {
+ 		ffd->conv_to_8bit = 1;
+ 		stride=w;
+ 	}
+@@ -1000,7 +1000,7 @@ redecode:
+ 	/*recompute outsize in case on-the-fly change*/
+ 	if ((w != ctx->width) || (h != ctx->height)
+ 	        || (ffd->direct_output && (stride != ffd->stride))
+-	        || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != PIX_FMT_YUV420P) && !ffd->output_as_8bit )
++	        || ((ffd->out_pix_fmt==GF_PIXEL_YV12) && (ctx->pix_fmt != AV_PIX_FMT_YUV420P) && !ffd->output_as_8bit )
+ 	        //need to realloc the conversion buffer
+ 	        || (ffd->conv_to_8bit && !ffd->conv_buffer && ffd->direct_output)
+ 	   ) {
+@@ -1011,7 +1011,7 @@ redecode:
+ 		}
+ #ifndef NO_10bit
+ 		//this YUV format is handled natively in GPAC
+-		else if ((ctx->pix_fmt == PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
++		else if ((ctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) && !ffd->output_as_8bit) {
+ 			ffd->stride = ffd->direct_output ? frame->linesize[0] : ctx->width*2;
+ 			outsize = ffd->stride * ctx->height * 3 / 2;
+ 			ffd->out_pix_fmt = GF_PIXEL_YV12_10;
+@@ -1157,23 +1157,20 @@ redecode:
+ 	if (ffd->out_pix_fmt==GF_PIXEL_RGB_24) {
+ 		pict.data[0] =  (uint8_t *)outBuffer;
+ 		pict.linesize[0] = 3*ctx->width;
+-		pix_out = PIX_FMT_RGB24;
++		pix_out = AV_PIX_FMT_RGB24;
+ 	} else {
+ 		pict.data[0] =  (uint8_t *)outBuffer;
+ 		pict.data[1] =  (uint8_t *)outBuffer + ffd->stride * ctx->height;
+ 		pict.data[2] =  (uint8_t *)outBuffer + 5 * ffd->stride * ctx->height / 4;
+ 		pict.linesize[0] = ffd->stride;
+ 		pict.linesize[1] = pict.linesize[2] = ffd->stride/2;
+-		pix_out = PIX_FMT_YUV420P;
++		pix_out = AV_PIX_FMT_YUV420P;
+ #ifndef NO_10bit
+ 		//this YUV format is handled natively in GPAC
+-		if (ctx->pix_fmt==PIX_FMT_YUV420P10LE) {
+-			pix_out = PIX_FMT_YUV420P10LE;
++		if (ctx->pix_fmt==AV_PIX_FMT_YUV420P10LE) {
++			pix_out = AV_PIX_FMT_YUV420P10LE;
+ 		}
+ #endif
+-		if (!mmlevel && frame->interlaced_frame) {
+-			avpicture_deinterlace((AVPicture *) frame, (AVPicture *) frame, ctx->pix_fmt, ctx->width, ctx->height);
+-		}
+ 	}
+ 	pict.data[3] = 0;
+ 	pict.linesize[3] = 0;
+@@ -1263,13 +1260,13 @@ static u32 FFDEC_CanHandleStream(GF_Base
+ 		switch (ffd->oti) {
+ 		case GPAC_OTI_AUDIO_MPEG2_PART3:
+ 		case GPAC_OTI_AUDIO_MPEG1:
+-			codec_id = CODEC_ID_MP2;
++			codec_id = AV_CODEC_ID_MP2;
+ 			break;
+ 		case GPAC_OTI_AUDIO_AC3:
+-			codec_id = CODEC_ID_AC3;
++			codec_id = AV_CODEC_ID_AC3;
+ 			break;
+ 		case GPAC_OTI_AUDIO_EAC3:
+-			codec_id = CODEC_ID_EAC3;
++			codec_id = AV_CODEC_ID_EAC3;
+ 			break;
+ 		}
+ 	}
+@@ -1309,11 +1306,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
+ 		switch (ffd->oti) {
+ 		/*MPEG-4 v1 simple profile*/
+ 		case GPAC_OTI_VIDEO_MPEG4_PART2:
+-			codec_id = CODEC_ID_MPEG4;
++			codec_id = AV_CODEC_ID_MPEG4;
+ 			break;
+ 		/*H264 (not std OTI, just the way we use it internally)*/
+ 		case GPAC_OTI_VIDEO_AVC:
+-			codec_id = CODEC_ID_H264;
++			codec_id = AV_CODEC_ID_H264;
+ 			break;
+ #ifdef HAS_HEVC
+ 		case GPAC_OTI_VIDEO_HEVC:
+@@ -1329,11 +1326,11 @@ static u32 FFDEC_CanHandleStream(GF_Base
+ 		case GPAC_OTI_VIDEO_MPEG2_SPATIAL:
+ 		case GPAC_OTI_VIDEO_MPEG2_HIGH:
+ 		case GPAC_OTI_VIDEO_MPEG2_422:
+-			codec_id = CODEC_ID_MPEG2VIDEO;
++			codec_id = AV_CODEC_ID_MPEG2VIDEO;
+ 			break;
+ 		/*JPEG*/
+ 		case GPAC_OTI_IMAGE_JPEG:
+-			codec_id = CODEC_ID_MJPEG;
++			codec_id = AV_CODEC_ID_MJPEG;
+ 			/*return maybe supported as FFMPEG JPEG decoder has some issues with many files, so let's use it only if no
+ 			other dec is available*/
+ 			if (avcodec_find_decoder(codec_id) != NULL)
+Index: gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
+===================================================================
+--- gpac-0.5.2.orig/modules/ffmpeg_in/ffmpeg_demux.c
++++ gpac-0.5.2/modules/ffmpeg_in/ffmpeg_demux.c
+@@ -333,13 +333,13 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
+ 		AVCodecContext *dec = ffd->ctx->streams[ffd->audio_st]->codec;
+ 		esd->slConfig->timestampResolution = ffd->audio_tscale.den;
+ 		switch (dec->codec_id) {
+-		case CODEC_ID_MP2:
++		case AV_CODEC_ID_MP2:
+ 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG1;
+ 			break;
+-		case CODEC_ID_MP3:
++		case AV_CODEC_ID_MP3:
+ 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_MPEG2_PART3;
+ 			break;
+-		case CODEC_ID_AAC:
++		case AV_CODEC_ID_AAC:
+ 			if (!dec->extradata_size) goto opaque_audio;
+ 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_AUDIO_AAC_MPEG4;
+ 			esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
+@@ -374,25 +374,25 @@ opaque_audio:
+ 		AVCodecContext *dec = ffd->ctx->streams[ffd->video_st]->codec;
+ 		esd->slConfig->timestampResolution = ffd->video_tscale.den;
+ 		switch (dec->codec_id) {
+-		case CODEC_ID_MPEG4:
++		case AV_CODEC_ID_MPEG4:
+ 			/*there is a bug in fragmentation of raw H264 in ffmpeg, the NALU startcode (0x00000001) is split across
+ 			two frames - we therefore force internal ffmpeg codec ID to avoid NALU size recompute
+ 			at the decoder level*/
+-//		case CODEC_ID_H264:
++//		case AV_CODEC_ID_H264:
+ 			/*if dsi not detected force use ffmpeg*/
+ 			if (!dec->extradata_size) goto opaque_video;
+ 			/*otherwise use any MPEG-4 Visual*/
+-			esd->decoderConfig->objectTypeIndication = (dec->codec_id==CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
++			esd->decoderConfig->objectTypeIndication = (dec->codec_id==AV_CODEC_ID_H264) ? GPAC_OTI_VIDEO_AVC : GPAC_OTI_VIDEO_MPEG4_PART2;
+ 			esd->decoderConfig->decoderSpecificInfo->dataLength = dec->extradata_size;
+ 			esd->decoderConfig->decoderSpecificInfo->data = gf_malloc(sizeof(char)*dec->extradata_size);
+ 			memcpy(esd->decoderConfig->decoderSpecificInfo->data,
+ 			       dec->extradata,
+ 			       sizeof(char)*dec->extradata_size);
+ 			break;
+-		case CODEC_ID_MPEG1VIDEO:
++		case AV_CODEC_ID_MPEG1VIDEO:
+ 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG1;
+ 			break;
+-		case CODEC_ID_MPEG2VIDEO:
++		case AV_CODEC_ID_MPEG2VIDEO:
+ 			esd->decoderConfig->objectTypeIndication = GPAC_OTI_VIDEO_MPEG2_422;
+ 			break;
+ 		default:
+Index: gpac-0.5.2/modules/Makefile
+===================================================================
+--- gpac-0.5.2.orig/modules/Makefile
++++ gpac-0.5.2/modules/Makefile
+@@ -100,12 +100,10 @@ endif
+ 
+ 
+ ifneq ($(CONFIG_FFMPEG), no)
+-ifneq ($(CONFIG_LIBAV), new) #we don't support libav newest APIs
+ ifeq ($(CONFIG_OPENHEVC),no)
+ PLUGDIRS+=ffmpeg_in
+ endif
+ endif
+-endif
+ 
+ ifeq ($(CONFIG_OPENHEVC), yes)
+ ifeq ($(CONFIG_FFMPEG), no)

diff --git a/media-video/gpac/gpac-0.5.2.ebuild b/media-video/gpac/gpac-0.5.2.ebuild
index 14c43be..04a7f8e 100644
--- a/media-video/gpac/gpac-0.5.2.ebuild
+++ b/media-video/gpac/gpac-0.5.2.ebuild
@@ -64,12 +64,17 @@ my_use() {
 src_prepare() {
 	epatch	"${FILESDIR}"/110_all_implicitdecls.patch \
 			"${FILESDIR}"/${PN}-0.5.2-static-libs.patch \
-			"${FILESDIR}"/${PN}-0.5.2-gf_isom_set_pixel_aspect_ratio.patch
+			"${FILESDIR}"/${PN}-0.5.2-gf_isom_set_pixel_aspect_ratio.patch \
+			"${FILESDIR}"/${PN}-0.5.2-avpixfmt.patch
+	has_version '>=media-video/ffmpeg-2.9' && epatch "${FILESDIR}"/${PN}-0.5.2-ffmpeg29.patch
 	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
 }
 
 src_configure() {
 	tc-export CC CXX AR RANLIB
+	# upstream used this internal define to check whether to use the new API
+	# when it is a guard for deprecating the old one...
+	append-cflags "-DFF_API_AVFRAME_LAVC=1"
 
 	econf \
 		--enable-svg \


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/
@ 2015-08-22  9:20 Alexis Ballier
  0 siblings, 0 replies; 11+ messages in thread
From: Alexis Ballier @ 2015-08-22  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2d3805f9c45c2803e5b6b78b4210e409384785fb
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 09:20:14 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 09:20:14 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d3805f9

media-video/gpac-9999: minor updates.

Rename patch to ...-0.5.3-... as it does not apply to 0.5.2.
Do not override S for releases.

Package-Manager: portage-2.2.20.1

 .../{gpac-0.5.2-static-libs.patch => gpac-0.5.3-static-libs.patch}     | 0
 media-video/gpac/gpac-9999.ebuild                                      | 3 +--
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/media-video/gpac/files/gpac-0.5.2-static-libs.patch b/media-video/gpac/files/gpac-0.5.3-static-libs.patch
similarity index 100%
rename from media-video/gpac/files/gpac-0.5.2-static-libs.patch
rename to media-video/gpac/files/gpac-0.5.3-static-libs.patch

diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-9999.ebuild
index ab5603b..2c15ff5 100644
--- a/media-video/gpac/gpac-9999.ebuild
+++ b/media-video/gpac/gpac-9999.ebuild
@@ -11,7 +11,6 @@ if [[ ${PV} == *9999 ]] ; then
 else
 	SRC_URI="https://github.com/gpac/gpac/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 	KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-	S="${WORKDIR}"/${PN}
 fi
 
 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
@@ -65,7 +64,7 @@ my_use() {
 
 src_prepare() {
 	epatch	"${FILESDIR}"/110_all_implicitdecls.patch \
-			"${FILESDIR}"/${PN}-0.5.2-static-libs.patch \
+			"${FILESDIR}"/${PN}-0.5.3-static-libs.patch \
 			"${FILESDIR}"/${PN}-0.5.2-gf_isom_set_pixel_aspect_ratio.patch
 	sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
 }


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-13  4:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 16:50 [gentoo-commits] repo/gentoo:master commit in: media-video/gpac/, media-video/gpac/files/ Steve Dibb
  -- strict thread matches above, loose matches on Subject: below --
2025-03-13  4:24 Ionen Wolkens
2024-11-10 10:08 Andreas Sturmlechner
2023-04-10  9:25 Sam James
2023-03-29 16:16 Alexis Ballier
2020-09-12 21:42 Sam James
2020-09-08 22:42 Sam James
2018-05-08 18:33 Lars Wendler
2017-02-24  9:00 Alexis Ballier
2015-09-16 11:47 Alexis Ballier
2015-08-22  9:20 Alexis Ballier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox