summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/gpac/files/gpac-2.0.0-configure.patch')
-rw-r--r--media-video/gpac/files/gpac-2.0.0-configure.patch113
1 files changed, 113 insertions, 0 deletions
diff --git a/media-video/gpac/files/gpac-2.0.0-configure.patch b/media-video/gpac/files/gpac-2.0.0-configure.patch
new file mode 100644
index 000000000000..2b54d16a8d22
--- /dev/null
+++ b/media-video/gpac/files/gpac-2.0.0-configure.patch
@@ -0,0 +1,113 @@
+* Makes static libs optional
+* Removes auto-SSE2 detection
+----
+Index: gpac-2.0.0/Makefile
+===================================================================
+--- gpac-2.0.0.orig/Makefile
++++ gpac-2.0.0/Makefile
+@@ -298,8 +298,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"
+
+Index: gpac-2.0.0/configure
+===================================================================
+--- gpac-2.0.0.orig/configure
++++ gpac-2.0.0/configure
+@@ -106,6 +106,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"
+@@ -271,6 +272,7 @@ GPAC configuration options:
+ --static-modules use static modules in libgpac rather than dynamic library modules
+ --static-build link statically against libgpac but still allow dependencies to shared libraries (enable --static-modules)
+ --enable-static-bin old name for --static-build, deprecated
++ --enable-static-lib GPAC static libraries build
+ --static-bin enable static linking of MP4Box and gpac only (enable --static-build), disable MP4Client and all libraries not linkable statically.
+ --static-mp4box old name for --static-bin, deprecated
+ --enable-depth enables depth handling in the compositor
+@@ -741,14 +743,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"
+@@ -776,10 +770,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
+@@ -1790,6 +1780,8 @@ for opt do
+ echo "$opt deprecated, use --static-build instead"
+ static_build="yes";
+ ;;
++ --enable-static-libs) static_libs="yes";
++ ;;
+ --disable-ipv6) has_ipv6="no"
+ ;;
+ --disable-platinum) has_platinum="no"
+@@ -2521,6 +2513,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"
+@@ -3252,6 +3245,7 @@ echo "DEBUGBUILD=$debuginfo" >> config.m
+ echo "GPROFBUILD=$gprof_build" >> config.mak
+ echo "STATIC_BINARY=$static_bin" >> 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-2.0.0/src/Makefile
+===================================================================
+--- gpac-2.0.0.orig/src/Makefile
++++ gpac-2.0.0/src/Makefile
+@@ -387,7 +387,6 @@ jsmods: $(LIBGPAC_JSMODS)
+ # @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)
+@@ -395,9 +394,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)