[crux-commits] ports/contrib (refs/remotes/origin/3.6): libsrtp: fix build

crux at crux.nu crux at crux.nu
Sat Apr 10 19:06:05 UTC 2021


commit c64823a13f231cc208a66ba11cf2a67f555bee15
Author: Danny Rawlins <contact at romster.me>
Date:   Thu Jan 7 23:58:36 2021 +1100

    libsrtp: fix build

diff --git a/libsrtp/.signature b/libsrtp/.signature
index e3aa9f004..78698b6f0 100644
--- a/libsrtp/.signature
+++ b/libsrtp/.signature
@@ -1,5 +1,6 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3+yAfRtiRb2qYxxfKAFv3FAl2z7EPYC50s6USgox7ExUf1YKIS3b0/WXsclsSK+QoHZlnEe/Cgzb2w48UAgLcAI=
-SHA256 (Pkgfile) = 75acfd1d9e0ac9065ebf462f4f233a63cd229b9b0478d67309474a04e9d0a260
+RWSagIOpLGJF35np8vQoo3BYPaLvh1jCeksmMPoM8msa333LZsEevn3kyFqUUj4cFTiJIhYWLkUNr0Yaoxp25e1+1RRrP7stMgI=
+SHA256 (Pkgfile) = cbfbfad0188559a04356d4ad6bfdf2db1b248ad2e54c451ba75ecf2724b1bbac
 SHA256 (.footprint) = 91295a1aca3241912bd2cf2fb57bdf10b3f3d53025e35c879a35d70ca34f09a3
-SHA256 (libsrtp-2.3.0-1.tar.gz) = 185cefa11cb44ee94082d57ec59ad9740e84a48b0c71abb2a90720ec9529a71b
+SHA256 (libsrtp-2.3.0.tar.gz) = 94093a5d04c5f4743e8d81182b76938374df6d393b45322f24960d250b0110e8
+SHA256 (libsrtp-2.3.0-shared-fix.patch) = d996cb9eae1f8d40b2394ebc937616470ae2d67bd075578a4d473e7c2b918358
diff --git a/libsrtp/Pkgfile b/libsrtp/Pkgfile
index c872b477c..490b7d20a 100644
--- a/libsrtp/Pkgfile
+++ b/libsrtp/Pkgfile
@@ -1,19 +1,17 @@
 # Description:  Secure Realtime transport protocol library
 # URL: https://github.com/cisco/libsrtp
 # Maintainer: Tim Biermann, tbier at posteo dot de
-# Depends on:
 
 name=libsrtp
 version=2.3.0
-release=2
-source=(#https://github.com/cisco/libsrtp/archive/v$version/$name-$version.tar.gz)
-  # ugly fix, but hey.. let's wait for a release here
-  https://github.com/cisco/libsrtp/archive/7d351de8177b33c96669bb79dc684a8dc64c2483/$name-$version-1.tar.gz)
+release=3
+source=(https://github.com/cisco/libsrtp/archive/v$version/$name-$version.tar.gz
+  libsrtp-2.3.0-shared-fix.patch)
 
 build() {
-  #cd $name-$version
-  cd $name-7d351de8177b33c96669bb79dc684a8dc64c2483
-  autoreconf -fvi
+  cd $name-$version
+  patch -p1 -i $SRC/libsrtp-2.3.0-shared-fix.patch
+  CFLAGS+=' -fcommon' \
   ./configure \
     --prefix=/usr \
     --enable-openssl
diff --git a/libsrtp/libsrtp-2.3.0-shared-fix.patch b/libsrtp/libsrtp-2.3.0-shared-fix.patch
new file mode 100644
index 000000000..4ad0d34c0
--- /dev/null
+++ b/libsrtp/libsrtp-2.3.0-shared-fix.patch
@@ -0,0 +1,36 @@
+diff -up libsrtp-2.3.0/Makefile.in.sharedfix libsrtp-2.3.0/Makefile.in
+--- libsrtp-2.3.0/Makefile.in.sharedfix	2020-01-07 09:48:36.004217062 -0500
++++ libsrtp-2.3.0/Makefile.in	2020-01-07 09:53:08.117725096 -0500
+@@ -106,12 +106,14 @@ bindir = @bindir@
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libsrtp2.pc
+ 
+-SHAREDLIBVERSION = 1
++SHAREDLIBMINIVER = 1
++SHAREDLIBVERSION = $(SHAREDLIBMINIVER).0.0
+ ifneq (,$(or $(findstring linux, at host@), $(findstring gnu, at host@)))
+ SHAREDLIB_DIR = $(libdir)
+-SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@
+ SHAREDLIBSUFFIXNOVER = so
++SHAREDLIBMINISUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBMINIVER)
+ SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION)
++SHAREDLIB_LDFLAGS = -shared -Wl,-soname,libsrtp2.$(SHAREDLIBMINISUFFIX)
+ else ifneq (,$(or $(findstring cygwin, at host@), $(findstring mingw, at host@)))
+ SHAREDLIB_DIR = $(bindir)
+ SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp2.dll.a
+@@ -166,6 +168,7 @@ libsrtp2.$(SHAREDLIBSUFFIX): $(srtpobj)
+ 	$(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \
+ 				$^ $(LDFLAGS) $(LIBS)
+ 	if [ -n "$(SHAREDLIBVERSION)" ]; then \
++		ln -sfn $@ libsrtp2.$(SHAREDLIBMINISUFFIX); \
+ 		ln -sfn $@ libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
+ 	fi
+ 
+@@ -288,6 +291,7 @@ install:
+ 		cp libsrtp2.$(SHAREDLIBSUFFIXNOVER) $(DESTDIR)$(SHAREDLIB_DIR)/; \
+ 		if [ -n "$(SHAREDLIBVERSION)" ]; then \
+ 			ln -sfn libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
++			ln -sfn libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2.$(SHAREDLIBMINISUFFIX); \
+ 		fi; \
+ 	fi
+ 	$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)


More information about the crux-commits mailing list