diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-29 21:54:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-29 21:54:14 +0100 |
commit | 911d13b08c9edf41dd5fd5f5e15c952ca1fc3b6c (patch) | |
tree | 98c9e54e57ca3eaa2b64cf2002fb8fc5a11620dd /media-video/gpac/files | |
parent | 822a054dd1bab7f8080ccd486398034b4ff0b97d (diff) |
gentoo auto-resync : 29:03:2023 - 21:54:14
Diffstat (limited to 'media-video/gpac/files')
-rw-r--r-- | media-video/gpac/files/gpac-2.2.0-configure.patch | 104 | ||||
-rw-r--r-- | media-video/gpac/files/gpac-2.2.0-ffmpeg6.patch | 24 |
2 files changed, 128 insertions, 0 deletions
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; |