Greetings rpmfusion-developers,
As of May 27 2010 the gpac SRPM available from RPM Fusion fails to build
on my system, and the binary RPM for whatever reason doesn't seem to
include MP4Box, a widely used and essential tool for dealing with media
using the MPEG-4 container format. I'm using Fedora 13 x86_64.
Below is a patch that will allow the SRPM to build the latest CVS
revision available for gpac. If desired, a SRPM that includes this
tarball along with the changes below can be found at
http://vidya.dyndns.org/stuff/gpac-0.4.6-0.3.cvs20100527.fc13.src.rpm
The resulting binaries seem to work for what I need, but I haven't
conducted any extensive testing. Since I'm new to this list, I'm also
unsure of whether the patch below conforms to RPM Fusion's coding /
packaging standards.
Thanks to my dear friends at #fedora-social for assisting me in this
endeavor. I hope this package can be of use to someone.
- Lucas
diff -ruP rpmbuild/SOURCES/gpac-0.4.5-amr.patch
rpmbuild.new/SOURCES/gpac-0.4.5-amr.patch
--- rpmbuild/SOURCES/gpac-0.4.5-amr.patch 2008-12-17 07:18:44.000000000
-0700
+++ rpmbuild.new/SOURCES/gpac-0.4.5-amr.patch 2010-05-27
13:06:31.101191626 -0600
@@ -1,20 +1,6 @@
-diff -up gpac/modules/amr_dec/amr_dec.c.amr
gpac/modules/amr_dec/amr_dec.c
---- gpac/modules/amr_dec/amr_dec.c.amr 2008-12-17 12:33:30.000000000
+0100
-+++ gpac/modules/amr_dec/amr_dec.c 2008-12-17 12:33:52.000000000 +0100
-@@ -24,8 +24,8 @@
-
-
- /*include AMR stuff*/
--#include "amr_nb/sp_dec.h"
--#include "amr_nb/d_homing.h"
-+#include <amrnb/sp_dec.h>
-+#include <amrnb/d_homing.h>
- /*remove AMR types to avoid any typedef warning/error*/
- #undef Float
- #undef Bool
diff -up gpac/modules/amr_dec/Makefile.amr
gpac/modules/amr_dec/Makefile
---- gpac/modules/amr_dec/Makefile.amr 2008-12-17 12:33:42.000000000
+0100
-+++ gpac/modules/amr_dec/Makefile 2008-12-17 12:33:49.000000000 +0100
+--- gpac/modules/amr_dec/Makefile.amr 2010-05-04 05:27:18.000000000
-0600
++++ gpac/modules/amr_dec/Makefile 2010-05-27 13:02:48.630191469 -0600
@@ -17,31 +17,7 @@ LDFLAGS+=-pg
endif
@@ -48,8 +34,8 @@
SRCS := $(OBJS:.o=.c)
-@@ -56,11 +32,14 @@ else
- OBJSPIC=$(OBJS)
+@@ -50,11 +26,14 @@ ifeq ($(CONFIG_WIN32),yes)
+ #LDFLAGS+=-export-symbols amr_dec.def
endif
+AMR_NB_LIBS=-lamrnb
@@ -59,32 +45,14 @@
$(LIB): $(OBJS)
-- $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC)
$(EXTRALIBS) -L../../bin/gcc -lgpac
-+ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC)
$(AMR_NB_LIBS) $(AMR_WB_LIBS) $(EXTRALIBS) -L../../bin/gcc -lgpac
+- $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
-L../../bin/gcc -lgpac
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS)
$(AMR_NB_LIBS) $(AMR_WB_LIBS) $(EXTRALIBS) -L../../bin/gcc -lgpac
%.o: %.c
-diff -up gpac/modules/amr_float_dec/amr_float_dec.c.amr
gpac/modules/amr_float_dec/amr_float_dec.c
---- gpac/modules/amr_float_dec/amr_float_dec.c.amr 2008-12-17
12:37:26.000000000 +0100
-+++ gpac/modules/amr_float_dec/amr_float_dec.c 2008-12-17
12:38:07.000000000 +0100
-@@ -31,12 +31,12 @@
-
- #ifdef GPAC_HAS_AMR_FT
- /*AMR NB*/
--#include "amr_nb_ft/interf_dec.h"
-+#include <amrnb/interf_dec.h>
- #endif
-
- #ifdef GPAC_HAS_AMR_FT_WB
- /*AMR WB*/
--#include "amr_wb_ft/dec_if.h"
-+#include <amrwb/dec_if.h>
- #endif
-
- /*default size in CU of composition memory for audio*/
diff -up gpac/modules/amr_float_dec/Makefile.amr
gpac/modules/amr_float_dec/Makefile
---- gpac/modules/amr_float_dec/Makefile.amr 2008-12-17
12:34:17.000000000 +0100
-+++ gpac/modules/amr_float_dec/Makefile 2008-12-17 12:36:56.000000000
+0100
+--- gpac/modules/amr_float_dec/Makefile.amr 2010-05-04
05:27:21.000000000 -0600
++++ gpac/modules/amr_float_dec/Makefile 2010-05-27 13:05:42.286191285
-0600
@@ -21,16 +21,18 @@ OBJS=../amr_dec/amr_in.o amr_float_dec.o
#AMR NB obj
CFLAGS+=-DGPAC_HAS_AMR_FT
@@ -108,12 +76,12 @@
endif
-@@ -51,7 +53,7 @@ all: $(LIB)
+@@ -45,7 +47,7 @@ all: $(LIB)
- $(LIB): $(OBJSPIC)
-- $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC)
$(EXTRALIBS) -L../../bin/gcc -lgpac
-+ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC)
$(AMR_NB_LIBS) $(AMR_WB_LIBS) $(EXTRALIBS) -L../../bin/gcc -lgpac
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
-L../../bin/gcc -lgpac
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS)
$(AMR_NB_LIBS) $(AMR_WB_LIBS) $(EXTRALIBS) -L../../bin/gcc -lgpac
%.o: %.c
diff -ruP rpmbuild/SOURCES/gpac-0.4.6-ffmpeg.patch
rpmbuild.new/SOURCES/gpac-0.4.6-ffmpeg.patch
--- rpmbuild/SOURCES/gpac-0.4.6-ffmpeg.patch 2010-01-16
17:43:58.000000000 -0700
+++ rpmbuild.new/SOURCES/gpac-0.4.6-ffmpeg.patch 2010-05-27
13:19:08.086316533 -0600
@@ -49,8 +49,8 @@
echo "CONFIG_OSS_AUDIO=$has_oss_audio" >> config.mak
echo "CONFIG_ALSA=$has_alsa" >> config.mak
diff -up gpac/modules/ffmpeg_in/Makefile.ffmpeg
gpac/modules/ffmpeg_in/Makefile
---- gpac/modules/ffmpeg_in/Makefile.ffmpeg 2009-07-31
09:37:41.000000000 +0200
-+++ gpac/modules/ffmpeg_in/Makefile 2010-01-16 19:09:26.460862249 +0100
+--- gpac/modules/ffmpeg_in/Makefile.ffmpeg 2010-05-21
01:49:31.000000000 -0600
++++ gpac/modules/ffmpeg_in/Makefile 2010-05-27 13:17:56.052191678 -0600
@@ -2,7 +2,7 @@ include ../../config.mak
vpath %.c $(SRC_PATH)/modules/ffmpeg_in
@@ -60,13 +60,16 @@
ifeq ($(DEBUGBUILD), yes)
CFLAGS+=-g
-@@ -15,13 +15,11 @@ LDFLAGS+=-pg
+@@ -15,7 +15,7 @@ LDFLAGS+=-pg
endif
LOCAL_LIB=
--LINKLIBS=-lgpac -lavcodec -lavformat -lz
+-LINKLIBS=-lgpac -lavcodec -lavformat -lavutil -lz
+LINKLIBS=-lgpac -lz $(FFMPEG_LFLAGS)
+ #darwin needs bz2
+ ifeq ($(CONFIG_DARWIN),yes)
+@@ -25,8 +25,6 @@ endif
#old ffmpeg lib
ifeq ($(CONFIG_FFMPEG_OLD), yes)
CFLAGS+=-DFFMPEG_OLD_HEADERS
diff -ruP rpmbuild/SOURCES/gpac-0.4.6-makefix.patch
rpmbuild.new/SOURCES/gpac-0.4.6-makefix.patch
--- rpmbuild/SOURCES/gpac-0.4.6-makefix.patch 2009-09-19
06:08:42.000000000 -0600
+++ rpmbuild.new/SOURCES/gpac-0.4.6-makefix.patch 2010-05-27
12:40:26.030190639 -0600
@@ -1,7 +1,6 @@
-diff -up gpac/Makefile.makefix gpac/Makefile
---- gpac/Makefile.makefix 2009-07-31 18:43:25.000000000 +0200
-+++ gpac/Makefile 2009-09-01 17:14:20.615499921 +0200
-@@ -60,11 +60,11 @@ install:
+--- gpac/Makefile.makefix 2010-05-05 09:18:35.000000000 -0600
++++ gpac/Makefile 2010-05-27 12:19:54.051316154 -0600
+@@ -60,11 +60,11 @@
install -d "$(DESTDIR)$(mandir)"
install -d "$(DESTDIR)$(mandir)/man1"
if [ -d doc ] ; then \
@@ -12,12 +11,12 @@
+ install -pm 644 doc/man/mp4client.1 $(DESTDIR)$(mandir)/man1/ ; \
+ install -pm 644 doc/man/gpac.1 $(DESTDIR)$(mandir)/man1/ ; \
install -d "$(DESTDIR)$(prefix)/share/gpac" ; \
-- install -m 644 doc/gpac.mp4 $(DESTDIR)$(prefix)/share/gpac/ ; \
-+ install -pm 644 doc/gpac.mp4 $(DESTDIR)$(prefix)/share/gpac/ ; \
+- install -m 644 doc/gpac.mp4 $(DESTDIR)$(prefix)/share/gpac/ ; \
++ install -pm 644 doc/gpac.mp4 $(DESTDIR)$(prefix)/share/gpac/ ; \
fi
- uninstall:
-@@ -89,23 +89,25 @@ ifeq ($(CONFIG_DARWIN),yes)
+ # install -d "$(DESTDIR)$(prefix)/share/gpac/gui" ; \
+@@ -97,23 +97,25 @@
install -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX)
$(DESTDIR)$(prefix)/$(libdir)/libgpac-$(VERSION).$(DYN_LIB_SUFFIX)
ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX)
$(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
else
diff -ruP rpmbuild/SOURCES/gpac-0.4.6-osmo.patch
rpmbuild.new/SOURCES/gpac-0.4.6-osmo.patch
--- rpmbuild/SOURCES/gpac-0.4.6-osmo.patch 1969-12-31 17:00:00.000000000
-0700
+++ rpmbuild.new/SOURCES/gpac-0.4.6-osmo.patch 2010-05-27
18:18:16.870191818 -0600
@@ -0,0 +1,14 @@
+--- gpac/configure.osmo 2010-05-27 13:25:30.365191378 -0600
++++ gpac/configure 2010-05-27 14:03:08.494369924 -0600
+@@ -1007,6 +1016,11 @@ wx_cflags=`wx-config --cppflags core, ba
+ wx_lflags=`wx-config --libs core, base`
+ fi
+
++if test "$has_wx" = "yes"; then
++wx_lflags="${wx_lflags} `gtk-config --libs`"
++wx_lflags="${wx_lflags} `pkg-config --libs gdk-2.0` -lstdc++"
++fi
++
+ if test "$darwin" = "yes" ; then
+ wx_lflags="-Wl,-bind_at_load $wx_lflags -lstdc++" #10.4 needs it, not
sure about 10.3
+ fi
Only in rpmbuild/SOURCES: gpac-20100116.tar.bz2
diff -ruP rpmbuild/SPECS/gpac.spec rpmbuild.new/SPECS/gpac.spec
--- rpmbuild/SPECS/gpac.spec 2010-01-16 17:43:58.000000000 -0700
+++ rpmbuild.new/SPECS/gpac.spec 2010-05-27 18:03:10.321316056 -0600
@@ -7,7 +7,7 @@
# - Fix unused-direct-shlib-dependency on libgpac
%global osmo Osmo4
-%global cvs 20100116
+%global cvs 20100527
%global with_osmo 0
# Mozilla stuff fails. It's completely disabled for now.
%global mozver 3.0
@@ -27,14 +27,11 @@
Source9: gpac-snapshot.sh
#https://sourceforge.net/tracker/?func=detail&atid=571740&aid=2853860&group_id=84101
Patch0: gpac-0.4.6-makefix.patch
-Patch1: gpac-0.4.5-soname.patch
Patch2: gpac-0.4.5-amr.patch
-Patch3: gpac-0.4.5-lib64.patch
-Patch4: gpac-0.4.5-system_openjpeg.patch
Patch5: gpac-0.4.6-js_cflags.patch
#https://sourceforge.net/tracker/?func=detail&atid=571740&aid=2853857&group_id=84101
Patch9: gpac-0.4.6-ffmpeg.patch
-Patch10: gpac-0.4.6-ogl_libs.patch
+Patch11: gpac-0.4.6-osmo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: ImageMagick
@@ -66,6 +63,7 @@
BuildRequires: doxygen
BuildRequires: desktop-file-utils
%{?_with_amr:BuildRequires: amrnb-devel amrwb-devel}
+BuildRequires: gtk+-devel gtk2-devel
%description
GPAC is a multimedia framework based on the MPEG-4 Systems standard
developed
@@ -149,15 +147,10 @@
%prep
%setup -q -n gpac
%patch0 -p1 -b .makefix
-%patch1 -p1 -b .soname
%patch2 -p1 -b .amr
-%if %{_lib} == "lib64"
-%patch3 -p1 -b .lib64
-%endif
-%patch4 -p1 -b .openjpeg
%patch5 -p1 -b .jscflags
%patch9 -p1 -b .ffmpeg
-%patch10 -p1 -b .ogl_libs
+%patch11 -p1 -b .osmo
## kwizart - enable dynamic mode - hardcoded with patch2
# define SONAME number from the first number of gpac version.
@@ -332,6 +325,12 @@
%changelog
+* Thu May 27 2010 Lucas Jacobs <lucas.jacobs(a)mines.sdsmt.edu> -
0.4.6-0.4cvs20100527
+- Update to 20100527
+- Removed upstreamed lib64, soname, OpenJPEG, OpenGL patches
+- Update ffmpeg, makefix and amr patches
+- Added patch to build osmo4_wx properly
+
* Sat Jan 16 2010 Nicolas Chauvet <kwizart(a)fedoraproject.org> -
0.4.6-0.3cvs20100116
- Update to 20100116
- Removed upstreamed patch for system libxml2