[SCM] gpac/master: Reintroduce soname versioning for library. Patch should be discussed with upstream.
ceros-guest at users.alioth.debian.org
ceros-guest at users.alioth.debian.org
Sun May 1 04:13:58 UTC 2011
The following commit has been merged in the master branch:
commit abad48464385889bf3eae340d8c13043b5f0e0e4
Author: Andres Mejia <mcitadel at gmail.com>
Date: Sat Apr 30 22:42:49 2011 -0400
Reintroduce soname versioning for library.
Patch should be discussed with upstream.
diff --git a/debian/patches/series b/debian/patches/series
index 8418043..aac0c56 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
mp4client-makefile-fix.patch
+soname-fix.patch
diff --git a/debian/patches/soname-fix.patch b/debian/patches/soname-fix.patch
new file mode 100644
index 0000000..36e4139
--- /dev/null
+++ b/debian/patches/soname-fix.patch
@@ -0,0 +1,97 @@
+Description: Patch to introduce proper soname versioning for library.
+Origin: http://git.debian.org/?p=pkg-multimedia/gpac.git;a=blob;f=debian/patches/soname-fix.patch
+--- a/configure
++++ b/configure
+@@ -1743,6 +1743,10 @@
+
+
+ version="`grep '#define GPAC_VERSION ' \"$source_path/include/gpac/tools.h\" | cut -d '"' -f 2`"
++version_major=`grep '#define GPAC_VERSION_MAJOR ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++version_minor=`grep '#define GPAC_VERSION_MINOR ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++version_micro=`grep '#define GPAC_VERSION_MICRO ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++soname_version="${version_major}.${version_minor}.${version_micro}"
+
+ if which svnversion >/dev/null
+ then
+@@ -2080,6 +2084,9 @@
+ fi
+ echo "EXTRALIBS=$extralibs" >> config.mak
+ echo "VERSION=$version" >>config.mak
++echo "VERSION_MAJOR=$version_major" >>config.mak
++echo "VERSION_MINOR=$version_minor" >>config.mak
++echo "VERSION_MICRO=$version_micro" >>config.mak
+
+ if test "$use_fixed_point" = "yes"; then
+ echo "#define GPAC_FIXED_POINT" >> $TMPH
+@@ -2122,6 +2129,7 @@
+ fi
+
+ if test "$win32" = "no" ; then
++ DYN_LIB_SUFFIX="${DYN_LIB_SUFFIX}.${soname_version}"
+ echo "GPAC_SH_FLAGS=$GPAC_SH_FLAGS" >> config.mak
+ echo "DYN_LIB_SUFFIX=$DYN_LIB_SUFFIX" >> config.mak
+ else
+--- a/Makefile
++++ b/Makefile
+@@ -106,8 +106,9 @@
+ $(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
+- $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX).$(VERSION)
+- ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
++ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
++ ln -sf libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so.$(VERSION_MAJOR)
++ ln -sf libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so
+ ifeq ($(DESTDIR)$(prefix),$(prefix))
+ ldconfig || true
+ endif
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -169,7 +169,7 @@
+ EXTRALIBS+=$(GPAC_SH_FLAGS)
+ endif
+
+-LD_SONAME="-Wl,-soname,$(LIB)"
++LD_SONAME="-Wl,-soname,libgpac.so.$(VERSION_MAJOR)"
+ ifeq ($(CONFIG_DARWIN), yes)
+ LD_SONAME=
+ endif
+@@ -210,6 +210,10 @@
+ ar cr ../bin/gcc/libgpac_static.a $(OBJS)
+ ranlib ../bin/gcc/libgpac_static.a
+ $(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o ../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
++ifeq (,$(findstring yes, $(CONFIG_DARWIN) $(CONFIG_WIN32)))
++ ln -sf $@ ../bin/gcc/libgpac.so.$(VERSION_MAJOR)
++ ln -sf $@ ../bin/gcc/libgpac.so
++endif
+ endif
+
+ dep: depend
+@@ -220,7 +224,8 @@
+
+ clean:
+ rm -f $(OBJS) ../bin/gcc/$(LIB)
+- rm -rf ../bin/gcc/libgpac_static.a
++ rm -rf ../bin/gcc/libgpac_static.a ../bin/gcc/libgpac.so \
++ ../bin/gcc/libgpac.so.$(VERSION_MAJOR)
+
+ distclean: clean
+ rm -f Makefile.bak .depend
+--- a/include/gpac/tools.h
++++ b/include/gpac/tools.h
+@@ -57,8 +57,13 @@
+ *
+ * Macro giving GPAC version expressed as a printable string
+ */
+-/*KEEP SPACE SEPARATORS FOR MAKE / GREP (SEE MAIN MAKEFILE)!!!, and NO SPACE in GPAC_VERSION for proper install*/
+-#define GPAC_VERSION "0.4.6-DEV"
++/* KEEP SPACE SEPARATORS FOR MAKE / GREP (SEE MAIN MAKEFILE)!!!
++ * SONAME versions must be digits (not strings)
++ */
++#define GPAC_VERSION "0.4.6-DEV"
++#define GPAC_VERSION_MAJOR 1
++#define GPAC_VERSION_MINOR 0
++#define GPAC_VERSION_MICRO 0
+
+ #include <gpac/version.h>
+ #define GPAC_FULL_VERSION GPAC_VERSION"-rev"GPAC_SVN_REVISION
--
gpac packaging
More information about the pkg-multimedia-commits
mailing list