Lines 2-8
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= tor |
4 |
PORTNAME= tor |
5 |
DISTVERSION= 0.2.6.10 |
5 |
DISTVERSION= 0.2.7.6 |
6 |
CATEGORIES= security net ipv6 |
6 |
CATEGORIES= security net ipv6 |
7 |
MASTER_SITES= TOR |
7 |
MASTER_SITES= TOR |
8 |
|
8 |
|
Lines 15-30
Link Here
|
15 |
USES= cpe gmake |
15 |
USES= cpe gmake |
16 |
CPE_VENDOR= torproject |
16 |
CPE_VENDOR= torproject |
17 |
GNU_CONFIGURE= yes |
17 |
GNU_CONFIGURE= yes |
18 |
CONFIGURE_ARGS= --with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc |
18 |
CONFIGURE_ARGS= --with-openssl-dir=${OPENSSLBASE} --disable-asciidoc |
19 |
CONFIGURE_ENV= TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include" \ |
|
|
20 |
TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/" \ |
21 |
TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}" |
22 |
|
19 |
|
23 |
OPTIONS_DEFINE= BUFFEREVENTS INSTR_DOWNLOADS \ |
20 |
OPTIONS_DEFINE= BUFFEREVENTS INSTR_DOWNLOADS \ |
24 |
STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT |
21 |
STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT |
25 |
|
22 |
|
|
|
23 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
24 |
|
25 |
OPTIONS_GROUP= TRANSPORT |
26 |
OPTIONS_GROUP_TRANSPORT= OBFSPROXY |
27 |
|
28 |
BUFFEREVENTS_CONFIGURE_ENABLE= bufferevents |
29 |
INSTR_DOWNLOADS_CONFIGURE_ENABLE= instrument-downloads |
30 |
OBFSPROXY_BUILD_DEPENDS= ${LOCALBASE}/bin/obfsproxy:security/obfsproxy |
31 |
TOR2WEB_CONFIGURE_ENABLE= tor2web-mode |
32 |
TRANSPARENT_CONFIGURE_ENABLE= transparent |
33 |
|
26 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
34 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
27 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
35 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
|
|
36 |
OBFSPROXY_DESC= Pluggable transport proxy written in Python |
28 |
STATIC_TOR_DESC= Build a static tor |
37 |
STATIC_TOR_DESC= Build a static tor |
29 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
38 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
30 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
39 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
Lines 32-37
Link Here
|
32 |
|
41 |
|
33 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
42 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
34 |
|
43 |
|
|
|
44 |
OPTIONS_GROUP= TRANSPORT |
45 |
OPTIONS_GROUP_TRANSPORT= OBFSPROXY |
46 |
|
35 |
USE_OPENSSL= yes |
47 |
USE_OPENSSL= yes |
36 |
|
48 |
|
37 |
USE_RC_SUBR= tor |
49 |
USE_RC_SUBR= tor |
Lines 44-49
Link Here
|
44 |
|
56 |
|
45 |
.include <bsd.port.options.mk> |
57 |
.include <bsd.port.options.mk> |
46 |
|
58 |
|
|
|
59 |
.if (${OSVERSION} < 1000015) |
60 |
WITH_OPENSSL_PORT= yes |
61 |
.endif |
62 |
|
47 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
63 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
48 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
64 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
49 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
65 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
Lines 51-79
Link Here
|
51 |
CONFIGURE_ARGS+= --disable-gcc-hardening |
67 |
CONFIGURE_ARGS+= --disable-gcc-hardening |
52 |
.endif |
68 |
.endif |
53 |
|
69 |
|
54 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
70 |
.if ${PORT_OPTIONS:MOBFSPROXY} |
55 |
CONFIGURE_ARGS+= --enable-bufferevents |
71 |
BUILD_DEPENDS += ${LOCALBASE}/bin/obfsproxy:security/obfsproxy |
56 |
.else |
|
|
57 |
CONFIGURE_ARGS+= --disable-bufferevents |
58 |
.endif |
72 |
.endif |
59 |
|
73 |
|
60 |
.if ${PORT_OPTIONS:MINSTR_DOWNLOADS} |
|
|
61 |
CONFIGURE_ARGS+= --enable-instrument-downloads |
62 |
.else |
63 |
CONFIGURE_ARGS+= --disable-instrument-downloads |
64 |
.endif |
65 |
|
66 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
74 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
67 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent2 |
75 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libevent.a:devel/libevent2 |
68 |
CONFIGURE_ARGS+= --enable-static-tor \ |
76 |
CONFIGURE_ARGS+= --enable-static-tor \ |
69 |
--with-zlib-dir=/usr/lib --disable-linker-hardening |
77 |
--disable-linker-hardening \ |
70 |
TOR_LIBEVENT_LIBS= ${LOCALBASE}/lib/libevent.a |
78 |
--with-libevent-dir=${LOCALBASE}/lib \ |
|
|
79 |
--with-zlib-dir=/usr/lib |
71 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
80 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
72 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS} |
81 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS} |
73 |
.endif |
82 |
.endif |
74 |
.else |
83 |
.else |
75 |
CONFIGURE_ARGS+= --enable-linker-hardening |
84 |
CONFIGURE_ARGS+= --enable-linker-hardening |
76 |
LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2 |
85 |
LIB_DEPENDS+= libevent.so:devel/libevent2 |
77 |
TOR_LIBEVENT_LIBS= -levent |
86 |
TOR_LIBEVENT_LIBS= -levent |
78 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
87 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
79 |
TOR_LIBEVENT_LIBS:= -levent_openssl ${TOR_LIBEVENT_LIBS} |
88 |
TOR_LIBEVENT_LIBS:= -levent_openssl ${TOR_LIBEVENT_LIBS} |
Lines 82-117
Link Here
|
82 |
|
91 |
|
83 |
.if ${PORT_OPTIONS:MTCMALLOC} |
92 |
.if ${PORT_OPTIONS:MTCMALLOC} |
84 |
CONFIGURE_ARGS+= --with-tcmalloc |
93 |
CONFIGURE_ARGS+= --with-tcmalloc |
|
|
94 |
LDFLAGS+= "-L${LOCALBASE}/lib" |
85 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
95 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
86 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libtcmalloc.so:${PORTSDIR}/devel/google-perftools |
96 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools |
87 |
.else |
|
|
88 |
LIB_DEPENDS+= libtcmalloc.so:${PORTSDIR}/devel/google-perftools |
89 |
.endif |
97 |
.endif |
|
|
98 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libtcmalloc.so:devel/google-perftools |
99 |
LIB_DEPENDS+= libtcmalloc.so:devel/google-perftools |
90 |
.endif |
100 |
.endif |
91 |
|
101 |
|
92 |
.if ${PORT_OPTIONS:MTOR2WEB} |
102 |
.if ! ${PORT_OPTIONS:MTOR2WEB} |
93 |
CONFIGURE_ARGS+= --enable-tor2web-mode |
103 |
check regression-test test: build |
|
|
104 |
@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ |
105 |
${MAKE_ARGS} check |
94 |
.endif |
106 |
.endif |
95 |
|
107 |
|
96 |
.if ${PORT_OPTIONS:MTRANSPARENT} |
|
|
97 |
CONFIGURE_ARGS+= --enable-transparent |
98 |
.else |
99 |
CONFIGURE_ARGS+= --disable-transparent |
100 |
.endif |
101 |
|
102 |
post-patch: |
103 |
@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \ |
104 |
-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ |
105 |
${WRKSRC}/configure |
106 |
|
107 |
post-configure: |
108 |
post-configure: |
108 |
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \ |
109 |
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \ |
109 |
${WRKSRC}/Makefile |
110 |
${WRKSRC}/Makefile |
110 |
|
111 |
|
111 |
.if ! ${PORT_OPTIONS:MTOR2WEB} |
|
|
112 |
check regression-test test: build |
113 |
@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ |
114 |
${MAKE_ARGS} check |
115 |
|
116 |
.endif |
117 |
.include <bsd.port.mk> |
112 |
.include <bsd.port.mk> |