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

Collapse All | Expand All

(-)Makefile (-29 / +26 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
PORTVERSION=	0.3.0.10
5
PORTVERSION=	0.3.1.7
6
CATEGORIES=	security net ipv6
6
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
7
MASTER_SITES=	TOR
8
8
Lines 19-31 Link Here
19
USES=		cpe gmake pkgconfig
19
USES=		cpe gmake pkgconfig
20
CPE_VENDOR=	torproject
20
CPE_VENDOR=	torproject
21
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}"
22
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}" \
23
		--with-libevent-dir="${LOCALBASE}"
23
CONFIGURE_ENV=	TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include" \
24
CONFIGURE_ENV=	TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include" \
24
		TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/" \
25
		TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/" \
25
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
26
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
26
27
27
OPTIONS_DEFINE=	MANPAGES DOCS STATIC_TOR TCMALLOC TOR2WEB
28
OPTIONS_DEFINE=	MANPAGES DOCS LZMA STATIC_TOR TCMALLOC TOR2WEB ZSTD
28
OPTIONS_DEFAULT=MANPAGES
29
OPTIONS_DEFAULT=MANPAGES LZMA
29
OPTIONS_SUB=	yes
30
OPTIONS_SUB=	yes
30
31
31
STATIC_TOR_DESC=	Build a static tor
32
STATIC_TOR_DESC=	Build a static tor
Lines 42-50 Link Here
42
43
43
CONFLICTS=	tor-devel-[0-9]*
44
CONFLICTS=	tor-devel-[0-9]*
44
45
45
STATIC_TOR_USES=	ssl:build
46
LZMA_CONFIGURE_ENABLE=		lzma
46
STATIC_TOR_USES_OFF=	ssl
47
47
48
STATIC_TOR_USES=		ssl:build
49
STATIC_TOR_BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:devel/libevent
50
STATIC_TOR_CONFIGURE_ON=	--enable-static-tor \
51
				--with-zlib-dir=/usr/lib --disable-linker-hardening
52
STATIC_TOR_VARS=		tor_libevent_libs={LOCALBASE}/lib/libevent.a
53
STATIC_TOR_CONFIGURE_OFF=	--enable-linker-hardening
54
STATIC_TOR_USES_OFF=		ssl
55
STATIC_TOR_LIB_DEPENDS_OFF=	libevent.so:devel/libevent
56
STATIC_TOR_VARS_OFF=		tor_libevent_libs=-levent
57
58
TCMALLOC_CONFIGURE_ON=		--with-tcmalloc
59
60
TOR2WEB_CONFIGURE_ENABLE=	tor2web-mode
61
62
ZSTD_CONFIGURE_ENABLE=		zstd
63
ZSTD_LIB_DEPENDS=		libzstd.so:archivers/zstd
64
48
.include <bsd.port.options.mk>
65
.include <bsd.port.options.mk>
49
66
50
.if ${PORT_OPTIONS:MDOCS} || ${PORT_OPTIONS:MMANPAGES}
67
.if ${PORT_OPTIONS:MDOCS} || ${PORT_OPTIONS:MMANPAGES}
Lines 60-91 Link Here
60
CONFIGURE_ARGS+=	--disable-gcc-hardening
77
CONFIGURE_ARGS+=	--disable-gcc-hardening
61
.endif
78
.endif
62
79
63
.if ${PORT_OPTIONS:MSTATIC_TOR}
80
.if !empty(PORT_OPTIONS:MTCMALLOC) && !empty(PORT_OPTIONS:MSTATIC_TOR)
64
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:devel/libevent
65
CONFIGURE_ARGS+=	--enable-static-tor \
66
			--with-zlib-dir=/usr/lib --disable-linker-hardening
67
TOR_LIBEVENT_LIBS=	${LOCALBASE}/lib/libevent.a
68
.else
69
CONFIGURE_ARGS+=	--enable-linker-hardening
70
LIB_DEPENDS+=		libevent.so:devel/libevent
71
TOR_LIBEVENT_LIBS=	-levent
72
.endif
73
74
.if ${PORT_OPTIONS:MTCMALLOC}
75
CONFIGURE_ARGS+=	--with-tcmalloc
76
.if ${PORT_OPTIONS:MSTATIC_TOR}
77
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
81
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
78
.else
82
.elif ${PORT_OPTIONS:MTCMALLOC}
79
LIB_DEPENDS+=		libtcmalloc.so:devel/google-perftools
83
LIB_DEPENDS+=		libtcmalloc.so:devel/google-perftools
80
.endif
84
.endif
81
.endif
82
85
83
.if ${PORT_OPTIONS:MTOR2WEB}
86
pre-everything-TOR2WEB-on::
84
CONFIGURE_ARGS+=	--enable-tor2web-mode
85
.endif
86
87
pre-everything::
88
.if ${PORT_OPTIONS:MTOR2WEB}
89
	@${ECHO_MSG}
87
	@${ECHO_MSG}
90
	@${ECHO_MSG} "Warning: The expert option 'tor2web' is chosen."
88
	@${ECHO_MSG} "Warning: The expert option 'tor2web' is chosen."
91
	@${ECHO_MSG} "         With this option tor cannot be used for regular traffic,"
89
	@${ECHO_MSG} "         With this option tor cannot be used for regular traffic,"
Lines 92-98 Link Here
92
	@${ECHO_MSG} "         only for non-anonymous hidden service traffic."
90
	@${ECHO_MSG} "         only for non-anonymous hidden service traffic."
93
	@${ECHO_MSG} "         Please make sure you understand this option."
91
	@${ECHO_MSG} "         Please make sure you understand this option."
94
	@${ECHO_MSG}
92
	@${ECHO_MSG}
95
.endif
96
93
97
post-patch:
94
post-patch:
98
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
95
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1502098144
1
TIMESTAMP = 1505758464
2
SHA256 (tor-0.3.0.10.tar.gz) = 9a8e6e49a1688dae64dca10f84a414ec9a4f393fb2256ae28e0c2e3239185ab1
2
SHA256 (tor-0.3.1.7.tar.gz) = 1df5dd4894bb2f5e0dc96c466955146353cf33ac50cd997cfc1b28ea3ed9c08f
3
SIZE (tor-0.3.0.10.tar.gz) = 5845205
3
SIZE (tor-0.3.1.7.tar.gz) = 6058284

Return to bug 222431