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

Collapse All | Expand All

(-)Makefile (-4 / +12 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
DISTVERSION=	0.2.6.10
5
PORTVERSION=	0.2.6.10
6
PORTREVISION=	1
6
CATEGORIES=	security net ipv6
7
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
8
MASTER_SITES=	TOR
8
9
Lines 83-89 Link Here
83
.if ${PORT_OPTIONS:MTCMALLOC}
84
.if ${PORT_OPTIONS:MTCMALLOC}
84
CONFIGURE_ARGS+=	--with-tcmalloc
85
CONFIGURE_ARGS+=	--with-tcmalloc
85
.if ${PORT_OPTIONS:MSTATIC_TOR}
86
.if ${PORT_OPTIONS:MSTATIC_TOR}
86
BUILD_DEPENDS +=	${LOCALBASE}/lib/libtcmalloc.so:${PORTSDIR}/devel/google-perftools
87
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:${PORTSDIR}/devel/google-perftools
87
.else
88
.else
88
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
89
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
89
.endif
90
.endif
Lines 100-109 Link Here
100
.endif
101
.endif
101
102
102
post-patch:
103
post-patch:
103
	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
104
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
104
		-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
105
		${WRKSRC}/configure
105
		${WRKSRC}/configure
106
106
107
post-patch-STATIC_TOR-off:
108
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
109
		${WRKSRC}/configure
110
111
post-patch-STATIC_TOR-on:
112
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
113
		${WRKSRC}/configure
114
107
post-configure:
115
post-configure:
108
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
116
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
109
		${WRKSRC}/Makefile
117
		${WRKSRC}/Makefile
(-)files/tor.in (-11 / +2 lines)
Lines 15-22 Link Here
15
#			Default: %%PREFIX%%/etc/tor/torrc
15
#			Default: %%PREFIX%%/etc/tor/torrc
16
# tor_user (str):	Tor daemon user. Default: _tor
16
# tor_user (str):	Tor daemon user. Default: _tor
17
# tor_datadir (str):	Tor datadir.  Default: /var/db/tor
17
# tor_datadir (str):	Tor datadir.  Default: /var/db/tor
18
# tor_logfile (str):	Tor log file.  Default: /var/log/tor
19
# tor_loglevel (str):	Tor log severity level.  Default: notice
20
#
18
#
21
19
22
. /etc/rc.subr
20
. /etc/rc.subr
Lines 30-37 Link Here
30
: ${tor_conf="%%PREFIX%%/etc/tor/torrc"}
28
: ${tor_conf="%%PREFIX%%/etc/tor/torrc"}
31
: ${tor_user="_tor"}
29
: ${tor_user="_tor"}
32
: ${tor_pidfile="/var/run/tor/tor.pid"}
30
: ${tor_pidfile="/var/run/tor/tor.pid"}
33
: ${tor_logfile="/var/log/tor"}
34
: ${tor_loglevel="notice"}
35
: ${tor_datadir="/var/db/tor"}
31
: ${tor_datadir="/var/db/tor"}
36
32
37
required_files=${tor_conf}
33
required_files=${tor_conf}
Lines 38-50 Link Here
38
required_dirs=${tor_datadir}
34
required_dirs=${tor_datadir}
39
pidfile=${tor_pidfile}
35
pidfile=${tor_pidfile}
40
command="%%PREFIX%%/bin/${name}"
36
command="%%PREFIX%%/bin/${name}"
41
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --+Log ${tor_loglevel}\ file\ ${tor_logfile}"
37
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
42
extra_commands="log reload"
38
extra_commands="reload"
43
log_cmd="${name}_log"
44
39
45
tor_log() {
46
	cat ${tor_logfile}
47
}
48
49
run_rc_command "$1"
40
run_rc_command "$1"
50
41

Return to bug 204739