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

Collapse All | Expand All

(-)Makefile (-3 / +8 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
CATEGORIES=	security net ipv6
6
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
7
MASTER_SITES=	TOR
8
8
Lines 83-89 Link Here
83
.if ${PORT_OPTIONS:MTCMALLOC}
83
.if ${PORT_OPTIONS:MTCMALLOC}
84
CONFIGURE_ARGS+=	--with-tcmalloc
84
CONFIGURE_ARGS+=	--with-tcmalloc
85
.if ${PORT_OPTIONS:MSTATIC_TOR}
85
.if ${PORT_OPTIONS:MSTATIC_TOR}
86
BUILD_DEPENDS +=	${LOCALBASE}/lib/libtcmalloc.so:${PORTSDIR}/devel/google-perftools
86
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:${PORTSDIR}/devel/google-perftools
87
.else
87
.else
88
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
88
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
89
.endif
89
.endif
Lines 99-109 Link Here
99
CONFIGURE_ARGS+=	--disable-transparent
99
CONFIGURE_ARGS+=	--disable-transparent
100
.endif
100
.endif
101
101
102
post-patch:
102
post-patch-STATIC_TOR-off:
103
	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
103
	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
104
		-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-on:
108
	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
109
		-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
110
		${WRKSRC}/configure
111
107
post-configure:
112
post-configure:
108
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
113
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
109
		${WRKSRC}/Makefile
114
		${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