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