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 |
|
26 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
23 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
27 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
24 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
|
|
25 |
OBFSPROXY_DESC= Pluggable transport proxy written in Python |
28 |
STATIC_TOR_DESC= Build a static tor |
26 |
STATIC_TOR_DESC= Build a static tor |
29 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
27 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
30 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
28 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
Lines 32-37
Link Here
|
32 |
|
30 |
|
33 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
31 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
34 |
|
32 |
|
|
|
33 |
OPTIONS_RADIO= TRANSPORT |
34 |
OPTIONS_RADIO_TRANSPORT= OBFSPROXY |
35 |
|
35 |
USE_OPENSSL= yes |
36 |
USE_OPENSSL= yes |
36 |
|
37 |
|
37 |
USE_RC_SUBR= tor |
38 |
USE_RC_SUBR= tor |
Lines 44-49
Link Here
|
44 |
|
45 |
|
45 |
.include <bsd.port.options.mk> |
46 |
.include <bsd.port.options.mk> |
46 |
|
47 |
|
|
|
48 |
.if (${OSVERSION} < 1000015) |
49 |
WITH_OPENSSL_PORT= yes |
50 |
.endif |
51 |
|
47 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
52 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
48 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
53 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
49 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
54 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
Lines 63-73
Link Here
|
63 |
CONFIGURE_ARGS+= --disable-instrument-downloads |
68 |
CONFIGURE_ARGS+= --disable-instrument-downloads |
64 |
.endif |
69 |
.endif |
65 |
|
70 |
|
|
|
71 |
.if ${PORT_OPTIONS:MOBFSPROXY} |
72 |
BUILD_DEPENDS += ${LOCALBASE}/bin/obfsproxy:${PORTSDIR}/security/obfsproxy |
73 |
.endif |
74 |
|
66 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
75 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
67 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent2 |
76 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent2 |
68 |
CONFIGURE_ARGS+= --enable-static-tor \ |
77 |
CONFIGURE_ARGS+= --enable-static-tor \ |
69 |
--with-zlib-dir=/usr/lib --disable-linker-hardening |
78 |
--disable-linker-hardening \ |
70 |
TOR_LIBEVENT_LIBS= ${LOCALBASE}/lib/libevent.a |
79 |
--with-libevent-dir=${LOCALBASE}/lib \ |
|
|
80 |
--with-zlib-dir=/usr/lib |
71 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
81 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
72 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS} |
82 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS} |
73 |
.endif |
83 |
.endif |
Lines 99-104
Link Here
|
99 |
CONFIGURE_ARGS+= --disable-transparent |
109 |
CONFIGURE_ARGS+= --disable-transparent |
100 |
.endif |
110 |
.endif |
101 |
|
111 |
|
|
|
112 |
.if ! ${PORT_OPTIONS:MTOR2WEB} |
113 |
check regression-test test: build |
114 |
@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ |
115 |
${MAKE_ARGS} check |
116 |
.endif |
117 |
|
102 |
post-patch: |
118 |
post-patch: |
103 |
@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \ |
119 |
@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \ |
104 |
-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ |
120 |
-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ |
Lines 108-117
Link Here
|
108 |
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \ |
124 |
@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \ |
109 |
${WRKSRC}/Makefile |
125 |
${WRKSRC}/Makefile |
110 |
|
126 |
|
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> |
127 |
.include <bsd.port.mk> |