libsrtp/libsrtp-1.5.0-shared.patch
2023-07-10 12:57:54 +02:00

78 lines
3.2 KiB
Diff

diff -up libsrtp-1.5.0/Makefile.in.shared libsrtp-1.5.0/Makefile.in
--- libsrtp-1.5.0/Makefile.in.shared 2014-10-13 10:35:33.000000000 -0400
+++ libsrtp-1.5.0/Makefile.in 2014-11-14 10:14:01.604954699 -0500
@@ -113,17 +113,13 @@ kernel = crypto/kernel/crypto_kernel.o
cryptobj = $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay)
-# libsrtp.a (implements srtp processing)
+# libsrtp (implements srtp processing)
srtpobj = srtp/srtp.o srtp/ekt.o
-libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
- ar cr libsrtp.a $^
- $(RANLIB) libsrtp.a
-
-libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
- $(CC) -shared -Wl,-soname,libsrtp.so \
- -o libsrtp.so $^ $(LDFLAGS)
+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
+ $(COMPILE) -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,$@.1 -z noexecstack -o $@.1.0.0 $^
+ ln -s $@.1.0.0 $@
# libcryptomath.a contains general-purpose routines that are used to
# generate tables and verify cryptoalgorithm implementations - this
@@ -150,19 +146,19 @@ testapp = $(crypto_testapp) test/srtp_dr
test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \
test/dtls_srtp_driver$(EXE)
-$(testapp): libsrtp.a
+$(testapp): libsrtp.so
test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ $(COMPILE) $(LDFLAGS) -o $@ test/rtpw.c test/rtp.c test/getopt_s.c $(LIBS) $(SRTPLIB)
test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ $(COMPILE) $(LDFLAGS) -o $@ test/srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ $(COMPILE) $(LDFLAGS) -o $@ test/rdbx_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ $(COMPILE) $(LDFLAGS) -o $@ test/dtls_srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
test: $(testapp)
@echo "Build done. Please run '$(MAKE) runtest' to run self tests."
@@ -220,7 +216,7 @@ install:
cp $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp
cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
- if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
+ if [ -f libsrtp.so.0.0.0 ]; then cp libsrtp.so.0.0.0 $(DESTDIR)$(libdir)/; fi
if [ -f libsrtp.so ]; then cp libsrtp.so $(DESTDIR)$(libdir)/; fi
if [ "$(pkgconfig_DATA)" != "" ]; then \
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \
@@ -229,7 +225,7 @@ install:
uninstall:
rm -f $(DESTDIR)$(includedir)/srtp/*.h
- rm -f $(DESTDIR)$(libdir)/libsrtp.a
+ rm -f $(DESTDIR)$(libdir)/libsrtp.so*
rm -f $(DESTDIR)$(libdir)/libsrtp.so
-rmdir $(DESTDIR)$(includedir)/srtp
if [ "$(pkgconfig_DATA)" != "" ]; then \
@@ -238,7 +234,7 @@ uninstall:
clean:
rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
- libcryptomath.a libsrtp.a libsrtp.so core *.core test/core
+ libcryptomath.a libsrtp.so* core *.core test/core
for a in * */* */*/*; do \
if [ -f "$$a~" ] ; then rm -f $$a~; fi; \
done;