summary says it all Reproducible: Always
1. In 0.4.2, the patches are available both as separate files under FILESDIR _and_ in a tarball. I think the discrete patch files should be removed if patches have their own tarball. 2. Some patches were incorporated into upstream and are no longer needed ("DESTDIR", "static-defs" and "ffmpeg-errno"). 3. The PIC patch needs a change (oss wouldn't patch cleanly and two new modules): --- gpac-0.4.2-pic.patch 2006-11-23 21:38:21.000000000 +0200 +++ gpac-0.4.4-pic.patch 2007-08-21 16:57:28.000000000 +0300 ---- gpac/modules/oss_audio/Makefile.old 2006-11-23 20:37:45.000000000 +0100 -+++ gpac/modules/oss_audio/Makefile 2006-11-23 20:37:59.000000000 +0100 -@@ -30,10 +30,16 @@ +--- gpac/modules/oss_audio/Makefile.old ++++ gpac/modules/oss_audio/Makefile +@@ -31,10 +31,15 @@ LIB=gm_oss_audio.$(DYN_LIB_SUFFIX) ++OBJSPIC=$(OBJS:.o=.opic) ++ ++%.opic : %.c ++ $(CC) $(CFLAGS) -fPIC -c $< -o $@ ++ + all: $(LIB) + +-$(LIB): $(OBJS) +- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS) ++$(LIB): $(OBJSPIC) ++ $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS) + + + %.o: %.c + +--- gpac/modules/ismacryp/Makefile.old ++++ gpac/modules/ismacryp/Makefile +@@ -24,11 +24,16 @@ + LDFLAGS+=-export-symbols ismacryp.def + endif + ++OBJSPIC=$(OBJS:.o=.opic) + ++%.opic : %.c ++ $(CC) $(CFLAGS) -fPIC -c $< -o $@ ++ + all: $(LIB) + + +-$(LIB): $(OBJS) +- $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac ++$(LIB): $(OBJSPIC) ++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC) $(EXTRALIBS) -L../../bin/gcc -lgpac + + + %.o: %.c +--- gpac/modules/alsa/Makefile.old ++++ gpac/modules/alsa/Makefile +@@ -22,10 +22,15 @@ + + LIB=gm_alsa.$(DYN_LIB_SUFFIX) + +OBJSPIC=$(OBJS:.o=.opic) + +%.opic : %.c @@ -611,9 +652,9 @@ all: $(LIB) -$(LIB): $(OBJS) -- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac +- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -lasound +$(LIB): $(OBJSPIC) -+ $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC) $(EXTRALIBS) -L../../bin/gcc -lgpac ++ $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJSPIC) $(EXTRALIBS) -L../../bin/gcc -lgpac -lasound %.o: %.c 4. I don't know if this is interesting: * QA Notice: Package has poor programming practices which may compile * fine but exhibit random runtime failures. * laser.c:65: warning: implicit declaration of function ‘findAttribute’ main.c:923: warning: implicit declaration of function ‘generate_table’ main.c:925: warning: implicit declaration of function ‘generateSVGCode_V1’ main.c:926: warning: implicit declaration of function ‘generateSVGCode_V2’ main.c:927: warning: implicit declaration of function ‘generateSVGCode_V3’ v1.c:41: warning: implicit declaration of function ‘generateAttributes’ v1.c:177: warning: implicit declaration of function ‘findAttribute’ v1.c:186: warning: implicit declaration of function ‘svgNameToImplementationName’ v1.c:610: warning: implicit declaration of function ‘generate_laser_tables’ v2.c:335: warning: implicit declaration of function ‘generateCoreInfo’ v2.c:338: warning: implicit declaration of function ‘generateGenericInfo’ v2.c:466: warning: implicit declaration of function ‘generate_laser_tables’ v3.c:289: warning: implicit declaration of function ‘generate_laser_tables_da’ * QA Notice: Package has poor programming practices which may compile * but will almost certainly crash on 64bit architectures. * Function `findAttribute' implicitly converted to pointer at laser.c:65 Function `findAttribute' implicitly converted to pointer at v1.c:177 that's it.
Thanks Zeev, I was waiting for a version bump to cleanup a bit our patchset and eventually send it upstream. @arch teams : I had to drop your keyword while bumping due to a missing dep on media-libs/openjpeg $ diff -u gpac-0.4.2-r1.ebuild gpac-0.4.4.ebuild | grep KEYW -KEYWORDS="~alpha amd64 ppc ppc64 x86 ~x86-fbsd" +KEYWORDS="~amd64 ~x86" @bsd : I had to port the patch you provided in bug #159240 , I hope there are no incompatible additions.
Created attachment 128938 [details, diff] Use -lpthread correctly This is a better patch for FreeBSD I think. The current one doesn't work for us :/
(In reply to comment #3) > Created an attachment (id=128938) [edit] > Use -lpthread correctly Wont appending -lpthread to ldflags cause failures with as-needed ? wouldn't it be better to link only the binaries that need it ? why not just removing the GPAC_SH_FLAGS=-pthread line if you want to link using -lpthread (so that it'll be the same as on linux) ?
Created attachment 128942 [details, diff] Use -lpthread correctly. As you will :) --as-needed doesn't work on FreeBSD anwyay, but this works just as well.
(In reply to comment #5) > Created an attachment (id=128942) [edit] > Use -lpthread correctly. > > As you will :) --as-needed doesn't work on FreeBSD anwyay, but this works just > as well. I've just replaced the bsd.patch by this one in patchlevel 2, thanks !
bsd done
Marked ~ppc/~ppc64.
~alpha done, closing.