aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-12 08:57:23 -0300
committerFrancesco Colista <fcolista@alpinelinux.org>2019-05-21 10:34:58 +0000
commita21674dde1469ee3d28e30a88f1e8a33a336eaf9 (patch)
tree2508c77b61e3be76f29a2c1ebf475cc40efa4cb0
parent129f7b6821ca192e6bd14a89688506900ea36850 (diff)
downloadaports-a21674dde1469ee3d28e30a88f1e8a33a336eaf9.tar.gz
aports-a21674dde1469ee3d28e30a88f1e8a33a336eaf9.tar.bz2
aports-a21674dde1469ee3d28e30a88f1e8a33a336eaf9.tar.xz
main/libsrtp: upgrade to 2.2.0
- Fix license - Provide shared library - Use modern style
-rw-r--r--main/libsrtp/APKBUILD43
-rw-r--r--main/libsrtp/fix-name-collision.patch54
-rw-r--r--main/libsrtp/libsrtp-1.4.4-shared.patch52
-rw-r--r--main/libsrtp/use-cracklib-words.patch11
4 files changed, 17 insertions, 143 deletions
diff --git a/main/libsrtp/APKBUILD b/main/libsrtp/APKBUILD
index 71873f243f..3a2a32f40e 100644
--- a/main/libsrtp/APKBUILD
+++ b/main/libsrtp/APKBUILD
@@ -1,30 +1,15 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libsrtp
-pkgver=1.5.4
-pkgrel=1
+pkgver=2.2.0
+pkgrel=0
pkgdesc="An implementation of the Secure Real-time Transport Protocol (SRTP)"
url="http://srtp.sourceforge.net"
arch="all"
-license="BSD"
-depends=""
-depends_dev=""
-makedepends="$depends_dev automake autoconf libtool"
-checkdepends="cracklib-words"
-install=""
-subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/cisco/libsrtp/archive/v$pkgver.tar.gz
- fix-name-collision.patch
- use-cracklib-words.patch
- "
-
-builddir="$srcdir"/libsrtp-$pkgver
-
-prepare() {
- default_prepare
- update_config_guess
- update_config_sub
-}
+license="BSD-3-Clause"
+makedepends="automake autoconf libtool"
+subpackages="$pkgname-static $pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/cisco/libsrtp/archive/v$pkgver.tar.gz"
build() {
cd "$builddir"
@@ -36,7 +21,7 @@ build() {
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var
- make
+ make all shared_library
}
package() {
@@ -46,9 +31,15 @@ package() {
check() {
cd "$builddir"
- make runtest
+ # Required for loading libsrtp2.so.1
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$builddir" make runtest
+}
+
+static() {
+ depends=""
+ pkgdesc="$pkgdesc (static library)"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}
-sha512sums="fcf6a36a0f687a6aa2b245e4055332ae892c953e19ebe3bfb7d091da0a7afbfcb804d9f602bd2d849235b559d3ca7924ee00c7f0da419c23b053b096ef4ccd19 libsrtp-1.5.4.tar.gz
-9e0dd1e04852d217e195e1677d5b4b6dc60f0732ca376e7957aa3d8f400bb75ca19fb169908741420adc7d740a9023309a251da3f648e03ff18bf297a167f845 fix-name-collision.patch
-69f0d6cb8886a9751fbc6be8886a987c4f22dd191fbb38034dacf78c7723bc979e93b766fc81a656bdad8af8f4ae18b7625aba17da9c5b9c120c967134fb9506 use-cracklib-words.patch"
+sha512sums="3a5214b02199ae8dff45a2ed225ed9b1dcb75a9c6b07669e23bf86f97ad26e3e22b4930acdf3c56b21b605211a89a53a17c61602195b391a5b29a09823ba868c libsrtp-2.2.0.tar.gz"
diff --git a/main/libsrtp/fix-name-collision.patch b/main/libsrtp/fix-name-collision.patch
deleted file mode 100644
index 4f109a4190..0000000000
--- a/main/libsrtp/fix-name-collision.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/test/srtp_driver.c
-+++ b/test/srtp_driver.c
-@@ -341,7 +341,7 @@
- if (do_codec_timing) {
- srtp_policy_t policy;
- int ignore;
-- double mips = mips_estimate(1000000000, &ignore);
-+ double mips_est = mips_estimate(1000000000, &ignore);
-
- crypto_policy_set_rtp_default(&policy.rtp);
- crypto_policy_set_rtcp_default(&policy.rtcp);
-@@ -353,33 +353,33 @@
- policy.allow_repeat_tx = 0;
- policy.next = NULL;
-
-- printf("mips estimate: %e\n", mips);
-+ printf("mips estimate: %e\n", mips_est);
-
- printf("testing srtp processing time for voice codecs:\n");
- printf("codec\t\tlength (octets)\t\tsrtp instructions/second\n");
- printf("G.711\t\t%d\t\t\t%e\n", 80,
-- (double) mips * (80 * 8) /
-+ (double) mips_est * (80 * 8) /
- srtp_bits_per_second(80, &policy) / .01 );
- printf("G.711\t\t%d\t\t\t%e\n", 160,
-- (double) mips * (160 * 8) /
-+ (double) mips_est * (160 * 8) /
- srtp_bits_per_second(160, &policy) / .02);
- printf("G.726-32\t%d\t\t\t%e\n", 40,
-- (double) mips * (40 * 8) /
-+ (double) mips_est * (40 * 8) /
- srtp_bits_per_second(40, &policy) / .01 );
- printf("G.726-32\t%d\t\t\t%e\n", 80,
-- (double) mips * (80 * 8) /
-+ (double) mips_est * (80 * 8) /
- srtp_bits_per_second(80, &policy) / .02);
- printf("G.729\t\t%d\t\t\t%e\n", 10,
-- (double) mips * (10 * 8) /
-+ (double) mips_est * (10 * 8) /
- srtp_bits_per_second(10, &policy) / .01 );
- printf("G.729\t\t%d\t\t\t%e\n", 20,
-- (double) mips * (20 * 8) /
-+ (double) mips_est * (20 * 8) /
- srtp_bits_per_second(20, &policy) / .02 );
- printf("Wideband\t%d\t\t\t%e\n", 320,
-- (double) mips * (320 * 8) /
-+ (double) mips_est * (320 * 8) /
- srtp_bits_per_second(320, &policy) / .01 );
- printf("Wideband\t%d\t\t\t%e\n", 640,
-- (double) mips * (640 * 8) /
-+ (double) mips_est * (640 * 8) /
- srtp_bits_per_second(640, &policy) / .02 );
- }
-
diff --git a/main/libsrtp/libsrtp-1.4.4-shared.patch b/main/libsrtp/libsrtp-1.4.4-shared.patch
deleted file mode 100644
index 43b8843603..0000000000
--- a/main/libsrtp/libsrtp-1.4.4-shared.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- srtp/Makefile.in
-+++ srtp/Makefile.in
-@@ -65,11 +65,11 @@
-
-
- # implicit rules for object files and test apps
-
- %.o: %.c
-- $(COMPILE) -c $< -o $@
-+ $(COMPILE) -fPIC -c $< -o $@
-
- %$(EXE): %.c
- $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
-
-
-@@ -103,10 +103,16 @@
-
- libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
- ar cr libsrtp.a $^
- $(RANLIB) libsrtp.a
-
-+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.1 -o libsrtp.so.1.0 $^
-+
-+libsrtp.dylib: $(srtpobj) $(cryptobj) $(gdoi)
-+ $(CC) $(LDFLAGS) -dynamiclib -install_name $(libdir)/libsrtp.1.dylib -o libsrtp.1.0.dylib $^
-+
- # libcryptomath.a contains general-purpose routines that are used to
- # generate tables and verify cryptoalgorithm implementations - this
- # library is not meant to be included in production code
-
- cryptomath = crypto/math/math.o crypto/math/gf2_8.o
-@@ -195,10 +198,20 @@
- $(INSTALL) -d $(DESTDIR)$(includedir)/srtp
- $(INSTALL) -d $(DESTDIR)$(libdir)
- cp include/*.h $(DESTDIR)$(includedir)/srtp
- cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp
- if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
-+ if [ -f libsrtp.so.1.0 ]; then \
-+ cp libsrtp.so.1.0 $(DESTDIR)$(libdir)/; \
-+ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so.1; \
-+ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so; \
-+ fi
-+ if [ -f libsrtp.1.0.dylib ]; then \
-+ cp libsrtp.1.0.dylib $(DESTDIR)$(libdir)/; \
-+ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.1.dylib; \
-+ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.dylib; \
-+ fi
-
- uninstall:
- rm -rf $(DESTDIR)$(includedir)/srtp
- rm -rf $(DESTDIR)$(libdir)/libsrtp.a
diff --git a/main/libsrtp/use-cracklib-words.patch b/main/libsrtp/use-cracklib-words.patch
deleted file mode 100644
index ed33c15e1e..0000000000
--- a/main/libsrtp/use-cracklib-words.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/test/rtpw.c
-+++ b/test/rtpw.c
-@@ -93,7 +93,7 @@
- #ifdef RTPW_USE_WINSOCK2
- # define DICT_FILE "words.txt"
- #else
--# define DICT_FILE "/usr/share/dict/words"
-+# define DICT_FILE "/usr/share/dict/cracklib-words"
- #endif
- #define USEC_RATE (5e5)
- #define MAX_WORD_LEN 128