Lines 2-9
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= tor |
4 |
PORTNAME= tor |
5 |
PORTVERSION= 0.2.7.6 |
5 |
PORTVERSION= 0.2.8.6 |
6 |
PORTREVISION= 1 |
|
|
7 |
CATEGORIES= security net ipv6 |
6 |
CATEGORIES= security net ipv6 |
8 |
MASTER_SITES= TOR |
7 |
MASTER_SITES= TOR |
9 |
|
8 |
|
Lines 14-21
Link Here
|
14 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
15 |
|
14 |
|
16 |
BROKEN_powerpc64= Does not build |
15 |
BROKEN_powerpc64= Does not build |
|
|
16 |
EXPENSIVE_HARDEN_BROKEN=yes # https://trac.torproject.org/projects/tor/ticket/19821 |
17 |
|
17 |
|
18 |
USES= cpe gmake |
18 |
USES= cpe gmake ssl |
19 |
CPE_VENDOR= torproject |
19 |
CPE_VENDOR= torproject |
20 |
GNU_CONFIGURE= yes |
20 |
GNU_CONFIGURE= yes |
21 |
CONFIGURE_ARGS= --with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc |
21 |
CONFIGURE_ARGS= --with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc |
Lines 24-30
Link Here
|
24 |
TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}" |
24 |
TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}" |
25 |
|
25 |
|
26 |
OPTIONS_DEFINE= BUFFEREVENTS INSTR_DOWNLOADS \ |
26 |
OPTIONS_DEFINE= BUFFEREVENTS INSTR_DOWNLOADS \ |
27 |
STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT |
27 |
STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT EXPENSIVE_HARDEN |
|
|
28 |
OPTIONS_DEFAULT=THREADS TRANSPARENT |
28 |
|
29 |
|
29 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
30 |
BUFFEREVENTS_DESC= Use libevent's buffered IO |
30 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
31 |
INSTR_DOWNLOADS_DESC= Instrument downloads for analysis |
Lines 32-42
Link Here
|
32 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
33 |
TCMALLOC_DESC= Use the tcmalloc memory allocation library |
33 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
34 |
TOR2WEB_DESC= Faster but non-anonymous hidden services |
34 |
TRANSPARENT_DESC= Transparent proxy support |
35 |
TRANSPARENT_DESC= Transparent proxy support |
|
|
36 |
EXPENSIVE_HARDEN_DESC= BROKEN Expensive compiler hardening, makes Tor slower |
35 |
|
37 |
|
36 |
OPTIONS_DEFAULT= THREADS TRANSPARENT |
|
|
37 |
|
38 |
USE_OPENSSL= yes |
39 |
|
40 |
USE_RC_SUBR= tor |
38 |
USE_RC_SUBR= tor |
41 |
SUB_FILES= pkg-message |
39 |
SUB_FILES= pkg-message |
42 |
|
40 |
|
Lines 45-50
Link Here
|
45 |
|
43 |
|
46 |
CONFLICTS= tor-devel-[0-9]* |
44 |
CONFLICTS= tor-devel-[0-9]* |
47 |
|
45 |
|
|
|
46 |
BUFFEREVENTS_CONFIGURE_ENABLE= bufferevents |
47 |
INSTR_DOWNLOADS_CONFIGURE_ENABLE= instrument-downloads |
48 |
TOR2WEB_CONFIGURE_ENABLE= tor2web-mode |
49 |
TRANSPARENT_CONFIGURE_ENABLE= transparent |
50 |
#TCMALLOC_CONFIGURE_WITH= tcmalloc |
51 |
EXPENSIVE_HARDEN_CONFIGURE_ENABLE= expensive-hardening |
52 |
STATIC_TOR_CONFIGURE_ENABLE= static-tor |
53 |
|
48 |
.include <bsd.port.options.mk> |
54 |
.include <bsd.port.options.mk> |
49 |
|
55 |
|
50 |
.if ${OSVERSION} < 1000000 |
56 |
.if ${OSVERSION} < 1000000 |
Lines 51-111
Link Here
|
51 |
WITH_OPENSSL_PORT= yes |
57 |
WITH_OPENSSL_PORT= yes |
52 |
.endif |
58 |
.endif |
53 |
|
59 |
|
54 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
60 |
# delete when this bug is fixed: https://trac.torproject.org/projects/tor/ticket/19518 |
55 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
61 |
.if ${PORT_OPTIONS:MTCMALLOC} |
56 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
62 |
CONFIGURE_ARGS= --with-tcmalloc |
57 |
.else |
|
|
58 |
CONFIGURE_ARGS+= --disable-gcc-hardening |
59 |
.endif |
63 |
.endif |
60 |
|
64 |
|
61 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
65 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
62 |
CONFIGURE_ARGS+= --enable-bufferevents |
66 |
DEP_KIND=BUILD |
|
|
67 |
DEP_LIB_PATH=${LOCALBASE}/lib/ |
68 |
DEP_LIB_SUFF=a |
63 |
.else |
69 |
.else |
64 |
CONFIGURE_ARGS+= --disable-bufferevents |
70 |
DEP_KIND=LIB |
|
|
71 |
DEP_LIB_SUFF=so |
65 |
.endif |
72 |
.endif |
66 |
|
73 |
|
67 |
.if ${PORT_OPTIONS:MINSTR_DOWNLOADS} |
74 |
${DEP_KIND}_DEPENDS+= ${DEP_LIB_PATH}libevent.${DEP_LIB_SUFF}:devel/libevent2 |
68 |
CONFIGURE_ARGS+= --enable-instrument-downloads |
75 |
TCMALLOC_${DEP_KIND}_DEPENDS+= ${DEP_LIB_PATH}libtcmalloc.${DEP_LIB_SUFF}:devel/google-perftools |
|
|
76 |
|
77 |
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \ |
78 |
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64) |
79 |
CONFIGURE_ARGS+= --enable-gcc-hardening |
69 |
.else |
80 |
.else |
70 |
CONFIGURE_ARGS+= --disable-instrument-downloads |
81 |
CONFIGURE_ARGS+= --disable-gcc-hardening |
71 |
.endif |
82 |
.endif |
72 |
|
83 |
|
73 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
84 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
74 |
BUILD_DEPENDS += ${LOCALBASE}/lib/libevent.a:devel/libevent2 |
85 |
CONFIGURE_ARGS+= --with-zlib-dir=/usr/lib --disable-linker-hardening |
75 |
CONFIGURE_ARGS+= --enable-static-tor \ |
86 |
. if ${PORT_OPTIONS:MBUFFEREVENTS} |
76 |
--with-zlib-dir=/usr/lib --disable-linker-hardening |
87 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${LOCALBASE}/lib/libevent.a |
77 |
TOR_LIBEVENT_LIBS= ${LOCALBASE}/lib/libevent.a |
88 |
. endif |
78 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
|
|
79 |
TOR_LIBEVENT_LIBS:= ${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS} |
80 |
.endif |
81 |
.else |
89 |
.else |
82 |
CONFIGURE_ARGS+= --enable-linker-hardening |
90 |
CONFIGURE_ARGS+= --enable-linker-hardening |
83 |
LIB_DEPENDS+= libevent.so:devel/libevent2 |
91 |
. if ${PORT_OPTIONS:MBUFFEREVENTS} |
84 |
TOR_LIBEVENT_LIBS= -levent |
92 |
TOR_LIBEVENT_LIBS:= -levent_openssl -levent |
85 |
.if ${PORT_OPTIONS:MBUFFEREVENTS} |
93 |
. endif |
86 |
TOR_LIBEVENT_LIBS:= -levent_openssl ${TOR_LIBEVENT_LIBS} |
|
|
87 |
.endif |
94 |
.endif |
88 |
.endif |
|
|
89 |
|
95 |
|
90 |
.if ${PORT_OPTIONS:MTCMALLOC} |
|
|
91 |
CONFIGURE_ARGS+= --with-tcmalloc |
92 |
.if ${PORT_OPTIONS:MSTATIC_TOR} |
93 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools |
94 |
.else |
95 |
LIB_DEPENDS+= libtcmalloc.so:devel/google-perftools |
96 |
.endif |
97 |
.endif |
98 |
|
99 |
.if ${PORT_OPTIONS:MTOR2WEB} |
100 |
CONFIGURE_ARGS+= --enable-tor2web-mode |
101 |
.endif |
102 |
|
103 |
.if ${PORT_OPTIONS:MTRANSPARENT} |
104 |
CONFIGURE_ARGS+= --enable-transparent |
105 |
.else |
106 |
CONFIGURE_ARGS+= --disable-transparent |
107 |
.endif |
108 |
|
109 |
post-patch: |
96 |
post-patch: |
110 |
@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ |
97 |
@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \ |
111 |
${WRKSRC}/configure |
98 |
${WRKSRC}/configure |