On Sun, 31 Jan 2021 16:38:02 +1100
Jonathan Gray <[email protected]> wrote:

> https://github.com/cisco/libsrtp/commit/716a73862b387a2107f37398c0fb7d9a754c0ccd.patch
> 
> /tmp/libsrtp2.so.1.0 --> /usr/local/lib/libsrtp2.so.2.0
> Dynamic export changes:
> removed:
>       bit_string
> 

Tested on amd64 and macppc (vanilla clang there). It needs itself to be
installed for tests to run, i've tweaked your diff to do so. 

OK cwen@

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/libsrtp/Makefile,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 Makefile
--- Makefile    3 Feb 2020 20:40:40 -0000       1.12
+++ Makefile    31 Jan 2021 11:53:22 -0000
@@ -1,18 +1,21 @@
 # $OpenBSD: Makefile,v 1.12 2020/02/03 20:40:40 sthen Exp $
 
-SHARED_LIBS +=  srtp2                     1.0 # 0.0
+SHARED_LIBS +=  srtp2                     2.0 # 0.0
 
 COMMENT=       secure RTP library
 
 GH_ACCOUNT=    cisco
 GH_PROJECT=    libsrtp
 GH_TAGNAME=    v2.3.0
-REVISION=      0
+REVISION=      1
 
 CATEGORIES=    security telephony
 
 # BSD
 PERMIT_PACKAGE=        Yes
+
+# Requires itself to be installed for tests
+TEST_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH}
 
 CONFIGURE_STYLE= gnu
 
Index: patches/patch-crypto_math_datatypes_c
===================================================================
RCS file: patches/patch-crypto_math_datatypes_c
diff -N patches/patch-crypto_math_datatypes_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-crypto_math_datatypes_c       31 Jan 2021 11:53:22 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix building with gcc-10
+716a73862b387a2107f37398c0fb7d9a754c0ccd
+
+Index: crypto/math/datatypes.c
+--- crypto/math/datatypes.c.orig
++++ crypto/math/datatypes.c
+@@ -79,7 +79,7 @@ int octet_get_weight(uint8_t octet)
+ 
+ /* the value MAX_PRINT_STRING_LEN is defined in datatypes.h */
+ 
+-char bit_string[MAX_PRINT_STRING_LEN];
++static char bit_string[MAX_PRINT_STRING_LEN];
+ 
+ uint8_t srtp_nibble_to_hex_char(uint8_t nibble)
+ {
Index: patches/patch-test_util_c
===================================================================
RCS file: patches/patch-test_util_c
diff -N patches/patch-test_util_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-test_util_c   31 Jan 2021 11:53:22 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix building with gcc-10
+716a73862b387a2107f37398c0fb7d9a754c0ccd
+
+Index: test/util.c
+--- test/util.c.orig
++++ test/util.c
+@@ -49,7 +49,7 @@
+ #include <stdint.h>
+ 
+ /* include space for null terminator */
+-char bit_string[MAX_PRINT_STRING_LEN + 1];
++static char bit_string[MAX_PRINT_STRING_LEN + 1];
+ 
+ static inline int hex_char_to_nibble(uint8_t c)
+ {

Reply via email to