2006-08-03 11:49:00 +02:00
|
|
|
# ports collection makefile for: tor-devel
|
|
|
|
# Date created: 2005.10.20
|
|
|
|
# Whom: peter.thoenen@yahoo.com
|
2004-05-29 09:30:00 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= tor
|
2011-08-30 18:57:43 +02:00
|
|
|
DISTVERSION= 0.2.2.32
|
2011-09-07 01:40:32 +02:00
|
|
|
PORTREVISION= 1
|
2009-07-27 09:07:09 +02:00
|
|
|
CATEGORIES= security net ipv6
|
2011-07-21 17:10:56 +02:00
|
|
|
MASTER_SITES= https://www.torproject.org/dist/ \
|
2011-01-01 19:36:01 +01:00
|
|
|
ftp://ftp.bit.nl/mirror/tor/ \
|
2011-03-01 20:15:12 +01:00
|
|
|
http://cyberside.net.ee/tor/ \
|
|
|
|
http://mirrors.chaos-darmstadt.de/tor-mirror/dist/ \
|
2011-07-24 05:58:00 +02:00
|
|
|
http://mirror.tor.hu/dist/ \
|
|
|
|
http://onion.anonymo.us.org/dist/ \
|
|
|
|
http://theonionrouter.com/dist/ \
|
2011-01-01 19:36:01 +01:00
|
|
|
http://tor.amorphis.eu/dist/ \
|
|
|
|
http://tor.askapache.com/dist/ \
|
|
|
|
http://tor.beme-it.de/dist/ \
|
|
|
|
http://tor.ccc.de/dist/ \
|
2011-07-24 05:58:00 +02:00
|
|
|
http://tor.cyberarmy.at/dist/ \
|
2011-03-01 20:15:12 +01:00
|
|
|
http://tor.homosu.net/dist/ \
|
2011-01-01 19:36:01 +01:00
|
|
|
http://tor.idnr.ws/dist/ \
|
2011-07-24 05:58:00 +02:00
|
|
|
http://tor.kamagurka.org/dist/ \
|
2011-03-01 20:15:12 +01:00
|
|
|
http://tor.searchprivate.com/dist/ \
|
|
|
|
http://tor.taiga-san.net/dist/ \
|
2011-07-24 05:58:00 +02:00
|
|
|
http://tor.webersiedlung.at/dist/ \
|
|
|
|
http://tordistua.reactor-xg.kiev.ua/ \
|
2011-01-01 19:36:01 +01:00
|
|
|
http://torproj.xpdm.us/dist/ \
|
2011-03-01 20:15:12 +01:00
|
|
|
http://torproject.nwlinux.us/dist/ \
|
2011-01-01 19:36:01 +01:00
|
|
|
http://www.oignon.net/dist/ \
|
|
|
|
http://www.torproject.org.nyud.net/dist/ \
|
2011-07-24 05:58:00 +02:00
|
|
|
http://www.torproject.us/dist/ \
|
|
|
|
http://www.torservers.net/mirrors/torproject.org/dist/
|
2004-05-29 09:30:00 +02:00
|
|
|
|
2011-01-20 06:10:54 +01:00
|
|
|
MAINTAINER= bf@FreeBSD.org
|
2004-05-29 09:30:00 +02:00
|
|
|
COMMENT= An anonymizing overlay network for TCP
|
|
|
|
|
2011-07-24 05:58:00 +02:00
|
|
|
LICENSE= BSD
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2011-08-30 18:57:43 +02:00
|
|
|
LIB_DEPENDS= event-2.0:${PORTSDIR}/devel/libevent2
|
2004-07-08 20:49:10 +02:00
|
|
|
|
2004-05-29 09:30:00 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2011-08-30 18:57:43 +02:00
|
|
|
CONFIGURE_ARGS= --with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc \
|
|
|
|
--enable-linker-hardening
|
|
|
|
CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \
|
|
|
|
TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include/event2 -I${LOCALBASE}/include" \
|
|
|
|
TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/event2" \
|
|
|
|
TOR_LIBEVENT_LIBS="-levent-2.0"
|
2004-05-29 09:30:00 +02:00
|
|
|
|
2008-08-20 10:01:17 +02:00
|
|
|
OPTIONS= BUFFREELISTS "freelists for buffer RAM" on \
|
2009-07-27 09:07:09 +02:00
|
|
|
INSTR_DOWNLOADS "instrument downloads for analysis" off \
|
2008-08-20 10:01:17 +02:00
|
|
|
TCMALLOC "use the tcmalloc memory allocation library" off \
|
2007-06-05 11:04:07 +02:00
|
|
|
THREADS "multi-threading support" on \
|
2010-08-30 16:45:04 +02:00
|
|
|
TRANSPARENT "transparent proxy support" on
|
2007-06-05 11:04:07 +02:00
|
|
|
|
2006-08-03 11:49:00 +02:00
|
|
|
USE_RC_SUBR= tor
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2011-05-08 06:34:15 +02:00
|
|
|
GROUPS = _tor
|
|
|
|
USERS= _tor
|
|
|
|
|
2008-08-20 10:01:17 +02:00
|
|
|
CONFLICTS= tor-devel-[0-9]*
|
2007-06-05 11:04:07 +02:00
|
|
|
|
2004-05-29 09:30:00 +02:00
|
|
|
MANCOMPRESSED= no
|
2008-08-20 10:01:17 +02:00
|
|
|
MAN1= tor.1 tor-resolve.1 torify.1 tor-gencert.1
|
2004-05-29 09:30:00 +02:00
|
|
|
|
2007-06-05 11:04:07 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2011-08-30 18:57:43 +02:00
|
|
|
.if ( (${OSVERSION} >= 703100 && ${OSVERSION} < 800000) || \
|
|
|
|
(${OSVERSION} >= 800500 && ${OSVERSION} < 900000) || \
|
|
|
|
(${OSVERSION} >= 900003) ) && !defined(USE_GCC)
|
|
|
|
CONFIGURE_ARGS+= --enable-gcc-hardening
|
|
|
|
.endif
|
|
|
|
|
2011-01-01 19:36:01 +01:00
|
|
|
.if ( ${OSVERSION} < 704000 || \
|
|
|
|
(${OSVERSION} >= 800000 && ${OSVERSION} < 801500) || \
|
|
|
|
(${OSVERSION} >= 900000 && ${OSVERSION} < 900011) )
|
|
|
|
WITH_OPENSSL_PORT= yes
|
|
|
|
.endif
|
|
|
|
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
|
|
|
|
|
2008-08-20 10:01:17 +02:00
|
|
|
.if defined(WITH_BUFFREELISTS)
|
|
|
|
CONFIGURE_ARGS+= --enable-buf-freelists
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-buf-freelists
|
|
|
|
.endif
|
2007-06-05 11:04:07 +02:00
|
|
|
|
2009-07-27 09:07:09 +02:00
|
|
|
.if defined(WITH_INSTR_DOWNLOADS)
|
|
|
|
CONFIGURE_ARGS+= --enable-instrument-downloads
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-instrument-downloads
|
2008-08-20 10:01:17 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_TCMALLOC)
|
|
|
|
CONFIGURE_ARGS+= --with-tcmalloc
|
|
|
|
LIB_DEPENDS+= tcmalloc:${PORTSDIR}/devel/google-perftools
|
2011-09-07 01:40:32 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2007-06-05 11:04:07 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_THREADS)
|
|
|
|
CONFIGURE_ARGS+= --enable-threads
|
2008-08-20 10:01:17 +02:00
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
2007-06-05 11:04:07 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-threads
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_TRANSPARENT)
|
|
|
|
CONFIGURE_ARGS+= --enable-transparent
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-transparent
|
|
|
|
.endif
|
|
|
|
|
2004-05-29 09:30:00 +02:00
|
|
|
post-patch:
|
|
|
|
@${MV} ${WRKSRC}/contrib/tor-tsocks.conf \
|
|
|
|
${WRKSRC}/contrib/tor-tsocks.conf.sample
|
|
|
|
@${REINPLACE_CMD} -e "s|tor-tsocks.conf|tor-tsocks.conf.sample|g" \
|
|
|
|
${WRKSRC}/contrib/Makefile.in
|
2011-08-30 18:57:43 +02:00
|
|
|
@${REINPLACE_CMD} -e '\|^install-data-am:|s|install-docDATA||' \
|
|
|
|
${WRKSRC}/doc/Makefile.in
|
2007-06-05 11:04:07 +02:00
|
|
|
|
|
|
|
post-configure:
|
2010-08-30 16:45:04 +02:00
|
|
|
@${FIND} -X ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -e \
|
2008-08-20 10:01:17 +02:00
|
|
|
"s|-lpthread|${PTHREAD_LIBS}|g"
|
2011-08-30 18:57:43 +02:00
|
|
|
@${REINPLACE_CMD} -e '\|^nodist_man_MANS =|s|$$|${MAN1}|' \
|
|
|
|
${WRKSRC}/doc/Makefile
|
2004-05-29 09:30:00 +02:00
|
|
|
|
2004-07-08 20:49:10 +02:00
|
|
|
post-install:
|
2007-06-05 11:04:07 +02:00
|
|
|
${MKDIR} /var/run/tor
|
2011-05-08 06:34:15 +02:00
|
|
|
${CHOWN} -R _tor:_tor /var/run/tor
|
2007-06-05 11:04:07 +02:00
|
|
|
${TOUCH} /var/log/tor
|
|
|
|
${CHOWN} _tor:_tor /var/log/tor
|
|
|
|
${MKDIR} /var/db/tor/data
|
2011-05-08 06:34:15 +02:00
|
|
|
${CHOWN} -R _tor:_tor /var/db/tor
|
|
|
|
${CHMOD} -R 700 /var/db/tor
|
2007-06-05 11:04:07 +02:00
|
|
|
${CAT} ${PKGMESSAGE}
|
|
|
|
|
2010-08-30 16:45:04 +02:00
|
|
|
check regression-test test: build
|
2008-08-20 10:01:17 +02:00
|
|
|
@( cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
|
|
|
|
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check )
|
|
|
|
|
2007-06-05 11:04:07 +02:00
|
|
|
.include <bsd.port.post.mk>
|