diff options
author | mi <mi@FreeBSD.org> | 2015-04-15 06:24:44 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2015-04-15 06:24:44 +0800 |
commit | 27912bf59a31d8de2216682625b44e2d7f813259 (patch) | |
tree | f0f18fa405ffb34df4808d0a020e8383cfd1d8d9 | |
parent | 934df12642ff3cb8af71aae8bdd176b0a642aaff (diff) | |
download | freebsd-ports-gnome-27912bf59a31d8de2216682625b44e2d7f813259.tar.gz freebsd-ports-gnome-27912bf59a31d8de2216682625b44e2d7f813259.tar.zst freebsd-ports-gnome-27912bf59a31d8de2216682625b44e2d7f813259.zip |
Only use -fPIC, when compiling shared objects, not static ones.
Implement regression-check target (also known under other aliases)
using upstream's self-tests.
-rw-r--r-- | net/libsrtp/Makefile | 4 | ||||
-rw-r--r-- | net/libsrtp/files/patch-Makefile.in | 34 |
2 files changed, 35 insertions, 3 deletions
diff --git a/net/libsrtp/Makefile b/net/libsrtp/Makefile index 007687de9bc4..f30c33acea9b 100644 --- a/net/libsrtp/Makefile +++ b/net/libsrtp/Makefile @@ -4,6 +4,7 @@ PORTNAME= libsrtp DISTVERSIONPREFIX= v DISTVERSION= 1.5.2 +PORTREVISION= 1 CATEGORIES= net MAINTAINER= alexander@brovikov.ru @@ -40,4 +41,7 @@ post-build: @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ ${MAKEFILE} ${MAKE_ARGS} shared_library) +check test runtest regression-test: build + ${SETENV} LD_LIBRARY_PATH=${WRKSRC} ${MAKE_CMD} -C ${WRKSRC} runtest + .include <bsd.port.mk> diff --git a/net/libsrtp/files/patch-Makefile.in b/net/libsrtp/files/patch-Makefile.in index a7f41da3be0a..f52d1b156d79 100644 --- a/net/libsrtp/files/patch-Makefile.in +++ b/net/libsrtp/files/patch-Makefile.in @@ -1,6 +1,15 @@ ---- Makefile.in.orig 2015-03-11 14:02:12 UTC -+++ Makefile.in -@@ -84,12 +84,11 @@ pkgconfig_DATA = libsrtp.pc +--- Makefile.in 2015-03-11 14:02:12 UTC ++++ Makefile.in 2015-04-14 17:56:33 -0400 +@@ -44,7 +44,7 @@ + CC = @CC@ + INCDIR = -Icrypto/include -I$(srcdir)/include -I$(srcdir)/crypto/include + DEFS = @DEFS@ +-CPPFLAGS= -fPIC @CPPFLAGS@ ++CPPFLAGS= @CPPFLAGS@ + CFLAGS = @CFLAGS@ + LIBS = @LIBS@ + LDFLAGS = -L. @LDFLAGS@ +@@ -84,12 +84,11 @@ endif SHAREDLIBVERSION = 1 @@ -14,3 +23,22 @@ SHAREDLIB_DIR = $(bindir) SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp.dll.a SHAREDLIBVERSION = +@@ -108,6 +107,9 @@ + %.o: %.c + $(COMPILE) -c $< -o $@ + ++%.So: %.c ++ $(COMPILE) -DPIC -fPIC -c $< -o $@ ++ + %$(EXE): %.c + $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) + +@@ -143,7 +145,7 @@ + ar cr libsrtp.a $^ + $(RANLIB) libsrtp.a + +-libsrtp.$(SHAREDLIBSUFFIX): $(srtpobj) $(cryptobj) $(gdoi) ++libsrtp.$(SHAREDLIBSUFFIX): $(srtpobj:.o=.So) $(cryptobj:.o=.So) $(gdoi:.o=.So) + $(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \ + $^ $(LDFLAGS) $(LIBS) + if [ -n "$(SHAREDLIBVERSION)" ]; then \ |