View | Details | Raw Unified | Return to bug 197073
Collapse All | Expand All

(-)Makefile (-8 / +13 lines)
Lines 4-10 Link Here
4
PORTNAME=	libsrtp
4
PORTNAME=	libsrtp
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
DISTVERSION=	1.5.0
6
DISTVERSION=	1.5.0
7
PORTREVISION=	1
7
PORTREVISION=	2
8
CATEGORIES=	net
8
CATEGORIES=	net
9
MASTER_SITES=	GHR
9
MASTER_SITES=	GHR
10
10
Lines 20-30 Link Here
20
20
21
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
CONFIGURE_ARGS=	--enable-openssl
22
CONFIGURE_ARGS=	--enable-openssl
23
CFLAGS+=	-fPIC	# Taken from configure script
24
USES=		gmake pathfix pkgconfig
23
USES=		gmake pathfix pkgconfig
25
USE_LDCONFIG=	yes
24
USE_LDCONFIG=	yes
26
USE_OPENSSL=	yes
25
USE_OPENSSL=	yes
27
WITH_OPENSSL_PORT=	yes
26
ALL_TARGET=	all libsrtp.so.0
28
27
29
.if ! defined(WITH_DEBUG)
28
.if ! defined(WITH_DEBUG)
30
CONFIGURE_ARGS+=--disable-debug
29
CONFIGURE_ARGS+=--disable-debug
Lines 38-48 Link Here
38
	@${REINPLACE_CMD} '/pkg-config/s/openssl/libcrypto/' \
37
	@${REINPLACE_CMD} '/pkg-config/s/openssl/libcrypto/' \
39
		${WRKSRC}/configure
38
		${WRKSRC}/configure
40
39
41
post-build:
42
	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
43
		${MAKEFILE} ${MAKE_ARGS} libsrtp.so.0)
44
45
post-install:
40
post-install:
46
	${LN} -s libsrtp.so.0 ${STAGEDIR}${PREFIX}/lib/libsrtp.so
41
	${LN} -s libsrtp.so.0 ${STAGEDIR}${PREFIX}/lib/libsrtp.so
47
42
48
.include <bsd.port.mk>
43
regression-test test check runtest: build
44
	${GMAKE} -C ${WRKSRC} runtest
45
46
.include <bsd.port.pre.mk>
47
48
.if ${OPENSSLLIB} != "/usr/lib"
49
LDFLAGS+=	-L${OPENSSLLIB}
50
.endif
51
LDFLAGS+=	-lcrypto
52
53
.include <bsd.port.post.mk>
(-)files/patch-libsrtp.pc.in (-3 / +2 lines)
Lines 1-10 Link Here
1
--- libsrtp.pc.in.orig	2014-12-30 16:27:06 UTC
1
--- libsrtp.pc.in	2014-12-30 16:27:06 UTC
2
+++ libsrtp.pc.in
2
+++ libsrtp.pc.in
3
@@ -7,5 +7,6 @@ Name: @PACKAGE_NAME@
3
@@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@
4
 Version: @PACKAGE_VERSION@
4
 Version: @PACKAGE_VERSION@
5
 Description: Library for SRTP (Secure Realtime Transport Protocol)
5
 Description: Library for SRTP (Secure Realtime Transport Protocol)
6
 
6
 
7
-Libs: -L${libdir} -lsrtp @LIBS@
7
-Libs: -L${libdir} -lsrtp @LIBS@
8
+Libs: -L${libdir} -lsrtp
8
+Libs: -L${libdir} -lsrtp
9
+Requires.private: libcrypto
10
 Cflags: -I${includedir}
9
 Cflags: -I${includedir}
(-)files/patch-shared-objects (+21 lines)
Line 0 Link Here
1
--- Makefile.in	2014-10-13 10:35:33.000000000 -0400
2
+++ Makefile.in	2015-01-25 12:55:19.000000000 -0500
3
@@ -87,4 +87,7 @@
4
 	$(COMPILE) -c $< -o $@
5
 
6
+%.So: %.c
7
+	$(COMPILE) -DPIC -fPIC -c $< -o $@
8
+
9
 %$(EXE): %.c
10
 	$(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
11
@@ -122,7 +125,7 @@
12
 	$(RANLIB) libsrtp.a
13
 
14
-libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi) 
15
-	$(CC) -shared -Wl,-soname,libsrtp.so \
16
-	    -o libsrtp.so $^ $(LDFLAGS)
17
+libsrtp.so: $(srtpobj:.o=.So) $(cryptobj:.o=.So) $(gdoi:.o=.So) 
18
+	$(CC) -shared -Wl,-soname,libsrtp.so \
19
+	    -o libsrtp.so $^ $(LDFLAGS)
20
 
21
 # libcryptomath.a contains general-purpose routines that are used to

Return to bug 197073