View | Details | Raw Unified | Return to bug 194029 | Differences between
and this patch

Collapse All | Expand All

(-)net-p2p/transmission-cli/Makefile (-15 / +6 lines)
Lines 21-32 LICENSE= GPLv2 Link Here
21
.endif
21
.endif
22
LICENSE_FILE=	${WRKSRC}/COPYING
22
LICENSE_FILE=	${WRKSRC}/COPYING
23
23
24
USES+=		tar:xz
24
USES+=		autoreconf tar:xz
25
25
26
CONFLICTS_INSTALL=	${PORTNAME}${PKGNAMESUFFIX}-2.5*
26
CONFLICTS_INSTALL=	${PORTNAME}${PKGNAMESUFFIX}-2.5*
27
27
28
OPTIONS_DEFINE=	LITE DOCS
28
OPTIONS_DEFINE=	LITE DOCS
29
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude third-party
29
#EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude third-party
30
30
31
.include <bsd.port.options.mk>
31
.include <bsd.port.options.mk>
32
32
Lines 46-65 GEN_RUN_DEPENDS=${LOCALBASE}/share/transmission/we Link Here
46
USES+=		gmake iconv libtool pkgconfig
46
USES+=		gmake iconv libtool pkgconfig
47
USE_OPENSSL=	yes
47
USE_OPENSSL=	yes
48
GNU_CONFIGURE=	yes
48
GNU_CONFIGURE=	yes
49
CPPFLAGS+=	-I${LOCALBASE}/include -DWITH_UTP=1
49
CPPFLAGS+=	-I${LOCALBASE}/include
50
LDFLAGS+=	-L${LOCALBASE}/lib
50
LDFLAGS+=	-L${LOCALBASE}/lib
51
LIBS+=		${ICONV_LIB}
51
LIBS+=		${ICONV_LIB}
52
CONFIGURE_ARGS=--with-zlib=/usr \
52
CONFIGURE_ARGS=--with-zlib=/usr \
53
		 --disable-utp \
53
		 --enable-external-dht \
54
		 --enable-external-natpmp \
54
		 --enable-external-natpmp \
55
		${EXTRA_CONF_ARGS}
55
		${EXTRA_CONF_ARGS}
56
CONFIGURE_ENV=	OPENSSL_CFLAGS="-I${OPENSSLINC}" \
56
CONFIGURE_ENV=	OPENSSL_CFLAGS="-I${OPENSSLINC}" \
57
		OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" \
57
		OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto"
58
		DHT_CFLAGS=" " \
59
		DHT_LIBS="-ldht" \
60
		LIBUTP_CFLAGS=" " \
61
		LIBUTP_LIBS="-lutp" \
62
		LIBUTP_LIBS_QT="-lutp"
63
58
64
EXTRA_CONF_ARGS?=--enable-cli \
59
EXTRA_CONF_ARGS?=--enable-cli \
65
		 --disable-daemon \
60
		 --disable-daemon \
Lines 99-111 general-patch: Link Here
99
# Don't conflict with patches but force system libraries
94
# Don't conflict with patches but force system libraries
100
	@${REINPLACE_CMD} -e 's|third-party \\|\\|g' \
95
	@${REINPLACE_CMD} -e 's|third-party \\|\\|g' \
101
		${WRKSRC}/Makefile.in
96
		${WRKSRC}/Makefile.in
102
	@${REINPLACE_CMD} -Ee '/^DHT_(CFLAGS|LIBS)=/d' \
97
	@${REINPLACE_CMD} \
103
		-e 's|third-party/[^ ]*Makefile||g' \
98
		-e 's|third-party/[^ ]*Makefile||g' \
104
		${WRKSRC}/configure
99
		${WRKSRC}/configure
105
	@${REINPLACE_CMD} \
106
		-e 's,TRANSMISSION_TOP}/third-party/dht/libdht.a,DHT_LIBS},' \
107
		${WRKSRC}/qt/qtr.pro
108
	@${ECHO_CMD} 'DHT_LIBS = @DHT_LIBS@' >>${WRKSRC}/qt/config.pri.in
109
100
110
post-patch: general-patch
101
post-patch: general-patch
111
102
(-)net-p2p/transmission-cli/files/patch-unbundle (+108 lines)
Line 0 Link Here
1
Index: configure.ac
2
===================================================================
3
--- configure.ac	(revision 14339)
4
+++ configure.ac	(working copy)
5
@@ -196,8 +196,23 @@ dnl  dht
6
 
7
 DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
8
 DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
9
+DHT_LIBS_QT="\$(top_builddir)/third-party/dht/libdht.a"
10
+build_bundled_dht="yes"
11
+AC_ARG_ENABLE([external-dht],
12
+              AS_HELP_STRING([--enable-external-dht],[Use system external-dht]),
13
+              [want_external_dht=${enableval}],
14
+              [want_external_dht=no])
15
+if test "x$want_external_dht" != "xno" ; then
16
+	dnl Would be lovely if it had pkgconfig
17
+	DHT_CFLAGS=""
18
+	DHT_LIBS="-ldht"
19
+	DHT_LIBS_QT="-ldht"
20
+	build_bundled_dht="no"
21
+fi
22
+AM_CONDITIONAL([BUILD_DHT],[test "x$build_bundled_dht" = "xyes"])
23
 AC_SUBST(DHT_CFLAGS)
24
 AC_SUBST(DHT_LIBS)
25
+AC_SUBST(DHT_LIBS_QT)
26
 
27
 
28
 dnl ----------------------------------------------------------------------------
29
@@ -211,17 +226,30 @@ AC_CHECK_LIB([rt],
30
 
31
 AC_MSG_CHECKING([µTP])
32
 build_utp="no"
33
-if test "x$CXX" != "x" ; then
34
-    have_utp="yes"
35
-else
36
-    have_utp="no"
37
-fi
38
+
39
+ac_save_LIBS="$LIBS"
40
+LIBS="-lutp"
41
+AC_LINK_IFELSE(
42
+  [AC_LANG_PROGRAM([#include <libutp/utp.h>],
43
+                   [struct UTPFunctionTable func;])],
44
+  [have_utp="yes"],
45
+  [have_utp="no"]
46
+)
47
+LIBS=$ac_save_LIBS
48
+
49
 AC_ARG_ENABLE([utp],
50
               AS_HELP_STRING([--enable-utp],[build µTP support]),
51
               [want_utp=${enableval}],
52
-              [want_utp=${have_utp}])
53
-if test "x$want_utp" = "xyes" ; then
54
+              [want_utp=yes])
55
+if test "x$want_utp" = "xyes"; then
56
     if test "x$have_utp" = "xyes"; then
57
+        dnl Would be lovely if it had pkgconfig
58
+        LIBUTP_CFLAGS=""
59
+        LIBUTP_LIBS="-lutp"
60
+        LIBUTP_LIBS_QT="-lutp"
61
+        AC_DEFINE([WITH_UTP],[1])
62
+        build_utp="system"
63
+    elif test "x$CXX" != "x"; then
64
         LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
65
         LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
66
         LIBUTP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libutp/libutp.a"
67
Index: qt/config.pri.in
68
===================================================================
69
--- qt/config.pri.in	(revision 14339)
70
+++ qt/config.pri.in	(working copy)
71
@@ -1,3 +1,4 @@
72
+DHT_LIBS = @DHT_LIBS_QT@
73
 LIBUTP_LIBS = @LIBUTP_LIBS_QT@ 
74
 LIBUPNP_LIBS = @LIBUPNP_LIBS_QT@
75
 LIBNATPMP_LIBS = @LIBNATPMP_LIBS_QT@
76
Index: qt/qtr.pro
77
===================================================================
78
--- qt/qtr.pro	(revision 14339)
79
+++ qt/qtr.pro	(working copy)
80
@@ -27,7 +27,7 @@ INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH
81
 INCLUDEPATH += $${TRANSMISSION_TOP}
82
 LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransmission.a
83
 LIBS += $${LIBUTP_LIBS}
84
-LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
85
+LIBS += $${DHT_LIBS}
86
 LIBS += $${LIBUPNP_LIBS}
87
 LIBS += $${LIBNATPMP_LIBS}
88
 unix: LIBS += -L$${EVENT_TOP}/lib -lz -lrt
89
Index: third-party/Makefile.am
90
===================================================================
91
--- third-party/Makefile.am	(revision 14339)
92
+++ third-party/Makefile.am	(working copy)
93
@@ -1,3 +1,6 @@
94
+if BUILD_DHT
95
+  DHT_DIR = dht
96
+endif
97
 if BUILD_UTP
98
   UTP_DIR = libutp
99
 endif
100
@@ -9,7 +12,7 @@ if BUILD_NATPMP
101
 endif 
102
 
103
 SUBDIRS = \
104
-  dht \
105
+  $(DHT_DIR) \
106
   $(NATPMP_DIR) \
107
   $(MINIUPNP_DIR) \
108
   $(UTP_DIR)

Return to bug 194029