summaryrefslogtreecommitdiff
path: root/net/torsocks
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-05-26 20:12:35 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2013-05-26 20:12:35 +0000
commit1d757bfcf8df6d941c6eb9ada6d113bbf0c56852 (patch)
tree0b42265f95dc9bbe8420c5f542952081defcad02 /net/torsocks
parent- Update to 6.08.p1 [1] (diff)
- Convert to OptionsNG [1]
- Use libtoolize for autotools [1] - Trim Makefile header [1] - Add LICENSE (GPLv2) - Use PORTDOCS at Makefile - Remove PORTEXAMPLES (sample conf same as original) PR: ports/177113 [1] Submitted by: Andrei Lavreniyuk <andy.lavr@gmail.com> (maintainer) [1] Approved by: jpaetzel (mentor)
Notes
Notes: svn path=/head/; revision=319134
Diffstat (limited to 'net/torsocks')
-rw-r--r--net/torsocks/Makefile74
-rw-r--r--net/torsocks/files/patch-Makefile.am17
-rw-r--r--net/torsocks/files/patch-configure.in20
-rw-r--r--net/torsocks/files/patch-src_Makefile.am10
-rw-r--r--net/torsocks/files/patch-src_Makefile.in (renamed from net/torsocks/files/patch-Makefile.in)0
-rw-r--r--net/torsocks/files/patch-src_torsocks.in (renamed from net/torsocks/files/patch-torsocks.in)0
-rw-r--r--net/torsocks/files/patch-src_usewithtor.in (renamed from net/torsocks/files/patch-usewithtor.in)0
-rw-r--r--net/torsocks/files/pkg-message.in2
-rw-r--r--net/torsocks/pkg-plist38
9 files changed, 92 insertions, 69 deletions
diff --git a/net/torsocks/Makefile b/net/torsocks/Makefile
index fe7deb5716b9..ed0f5913cca0 100644
--- a/net/torsocks/Makefile
+++ b/net/torsocks/Makefile
@@ -1,20 +1,19 @@
-# New ports collection makefile for: torsocks
-# Date created: 13 February 2009
-# Whom: Andrei Lavreniyuk <andy.lavr@gmail.com>
-#
+# Created by: Andrei Lavreniyuk <andy.lavr@gmail.com>
# $FreeBSD$
PORTNAME= torsocks
PORTVERSION= 1.2
+PORTREVISION= 1
CATEGORIES= net security
MASTER_SITES= GOOGLE_CODE \
http://tor.reactor-xg.kiev.ua/files/
-DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= andy.lavr@gmail.com
COMMENT= Most SOCKS-friendly applications way with Tor
-USE_AUTOTOOLS= libtool aclocal autoconf
+LICENSE= GPLv2
+
+USE_AUTOTOOLS= libtool aclocal autoconf libtoolize
ACLOCAL_ARGS= -I ${LOCALBASE}/share/aclocal
USE_GMAKE= yes
@@ -26,35 +25,28 @@ MAN8= torsocks.8
SUB_FILES= pkg-message
-OPTIONS= SOCKSDNS "Use socks server for DNS lookups" off \
- OLDMETHOD "Do not use RTLD_NEXT parameter to dlsym" off \
- NODEBUG "Disable output of error messages" off \
- HOSTNAMES "Enable DNS lookups of socks server" off
+OPTIONS_DEFINE= OLDMETHOD NODEBUG DOCS
-.include <bsd.port.pre.mk>
+OPTIONS_SINGLE= DNS
+OPTIONS_SINGLE_DNS= DEFAULT SOCKSDNS HOSTNAMES
-.if defined(WITH_SOCKSDNS)
-CONFIGURE_ARGS+= --enable-socksdns
-.endif
+SOCKSDNS_DESC= Use socks server for DNS lookups
+OLDMETHOD_DESC= Do not use RTLD_NEXT parameter to dlsym
+NODEBUG_DESC= Disable output of error messages
+HOSTNAMES_DESC= Enable DNS lookups of socks server
+DOCS_DESC= Install examples and docs
+DEFAULT_DESC= DNS lookups default
-.if defined(WITH_OLDMETHOD)
-CONFIGURE_ARGS+= --enable-oldmethod
-.endif
+OPTIONS_DEFAULT= DOCS DEFAULT
-.if defined(WITH_NODEBUG)
-CONFIGURE_ARGS+= --disable-debug
-.endif
+PORTDOCS= INSTALL README TODO ChangeLog
-.if defined(WITH_HOSTNAMES)
-CONFIGURE_ARGS+= --enable-hostnames
-.endif
+.include <bsd.port.options.mk>
-.if defined(WITH_SOCKSDNS) && defined(WITH_HOSTNAMES)
-BROKEN= HOSTNAMES option is not allowed when SOCKSDNS option is enabled
-.endif
+.if ${PORT_OPTIONS:MSOCKSDNS}
+CONFIGURE_ARGS+= --enable-socksdns
pre-everything::
-.if !defined(WITH_SOCKSDNS)
@${ECHO_MSG}
@${ECHO_MSG} "You can use the SOCKSDNS option."
@${ECHO_MSG} "This option causes torsocks to intercept"
@@ -64,7 +56,10 @@ pre-everything::
@${ECHO_MSG}
.endif
-.if !defined(WITH_OLDMETHOD)
+.if ${PORT_OPTIONS:MOLDMETHOD}
+CONFIGURE_ARGS+= --enable-oldmethod
+
+pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You can use the OLDMETHOD option."
@${ECHO_MSG} "This forces torsocks not to use the"
@@ -75,7 +70,10 @@ pre-everything::
@${ECHO_MSG}
.endif
-.if !defined(WITH_NODEBUG)
+.if ${PORT_OPTIONS:MNODEBUG}
+CONFIGURE_ARGS+= --disable-debug
+
+pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You can use the NODEBUG option."
@${ECHO_MSG} "This configuration option tells torsocks"
@@ -83,7 +81,10 @@ pre-everything::
@${ECHO_MSG}
.endif
-.if !defined(WITH_HOSTNAMES)
+.if ${PORT_OPTIONS:MHOSTNAMES}
+CONFIGURE_ARGS+= --enable-hostnames
+
+pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You can use the HOSTNAMES option."
@${ECHO_MSG} "This enables DNS lookups on names"
@@ -99,17 +100,16 @@ post-patch:
@${REINPLACE_CMD} -e 's|@prefix@|${PREFIX}|' ${WRKSRC}/src/torsocks.in
@${REINPLACE_CMD} -e 's|MAP_ANONYMOUS|MAP_ANON|' ${WRKSRC}/src/dead_pool.c
@${MV} ${WRKSRC}/doc/torsocks.conf ${WRKSRC}/doc/torsocks.conf.sample
+ @${MV} ${WRKSRC}/configure.in ${WRKSRC}/configure.ac
post-install:
-.if !defined(NOPORTEXAMPLES)
- @${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/*.sample ${EXAMPLESDIR}
+.if ${PORT_OPTIONS:MDOCS}
${INSTALL_DATA} ${WRKSRC}/doc/*.sample ${PREFIX}/etc
-.endif
-.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/torsocks/files/patch-Makefile.am b/net/torsocks/files/patch-Makefile.am
index bc24f445da75..9897d729cfa8 100644
--- a/net/torsocks/files/patch-Makefile.am
+++ b/net/torsocks/files/patch-Makefile.am
@@ -1,10 +1,9 @@
---- src/Makefile.am.orig 2011-10-24 22:26:34.000000000 +0300
-+++ src/Makefile.am 2011-11-09 12:36:55.697224889 +0200
-@@ -1,6 +1,6 @@
- # Makefile used by configure to create real Makefile
+--- Makefile.am.orig 2011-03-05 18:38:11.000000000 +0200
++++ Makefile.am 2013-03-20 10:13:28.517831100 +0200
+@@ -2,4 +2,6 @@
+ # have all needed files, that a GNU package needs
+ AUTOMAKE_OPTIONS = foreign 1.4
--libdir = @libdir@/torsocks
-+libdir = @prefix@/lib
-
- # Install invocation scripts
- bin_SCRIPTS = torsocks usewithtor
++ACLOCAL_AMFLAGS= -I m4
++
+ SUBDIRS = src doc test
diff --git a/net/torsocks/files/patch-configure.in b/net/torsocks/files/patch-configure.in
new file mode 100644
index 000000000000..2dd7330649b3
--- /dev/null
+++ b/net/torsocks/files/patch-configure.in
@@ -0,0 +1,20 @@
+--- configure.in.orig 2011-10-24 22:30:58.000000000 +0300
++++ configure.in 2013-03-20 10:10:59.362840661 +0200
+@@ -3,13 +3,14 @@
+ ##############################################################################
+
+ # Process this file with autoconf to produce a configure script.
+-AC_INIT()
++AC_INIT([torsocks], [1.2])
++AC_CONFIG_MACRO_DIR([m4])
+
+ # Create a config.g file to store defines generated by configure
+-AC_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADER([config.h])
+
+ # Automake initialization
+-AM_INIT_AUTOMAKE(torsocks, 1.2)
++AM_INIT_AUTOMAKE()
+
+ # Get hostname and other information.
+ AC_CANONICAL_HOST
diff --git a/net/torsocks/files/patch-src_Makefile.am b/net/torsocks/files/patch-src_Makefile.am
new file mode 100644
index 000000000000..bc24f445da75
--- /dev/null
+++ b/net/torsocks/files/patch-src_Makefile.am
@@ -0,0 +1,10 @@
+--- src/Makefile.am.orig 2011-10-24 22:26:34.000000000 +0300
++++ src/Makefile.am 2011-11-09 12:36:55.697224889 +0200
+@@ -1,6 +1,6 @@
+ # Makefile used by configure to create real Makefile
+
+-libdir = @libdir@/torsocks
++libdir = @prefix@/lib
+
+ # Install invocation scripts
+ bin_SCRIPTS = torsocks usewithtor
diff --git a/net/torsocks/files/patch-Makefile.in b/net/torsocks/files/patch-src_Makefile.in
index a5c2b3b9d14d..a5c2b3b9d14d 100644
--- a/net/torsocks/files/patch-Makefile.in
+++ b/net/torsocks/files/patch-src_Makefile.in
diff --git a/net/torsocks/files/patch-torsocks.in b/net/torsocks/files/patch-src_torsocks.in
index e4db4ef2d046..e4db4ef2d046 100644
--- a/net/torsocks/files/patch-torsocks.in
+++ b/net/torsocks/files/patch-src_torsocks.in
diff --git a/net/torsocks/files/patch-usewithtor.in b/net/torsocks/files/patch-src_usewithtor.in
index 5b8bd331e448..5b8bd331e448 100644
--- a/net/torsocks/files/patch-usewithtor.in
+++ b/net/torsocks/files/patch-src_usewithtor.in
diff --git a/net/torsocks/files/pkg-message.in b/net/torsocks/files/pkg-message.in
index 81434dee0c78..079bbb1ad0b1 100644
--- a/net/torsocks/files/pkg-message.in
+++ b/net/torsocks/files/pkg-message.in
@@ -1,6 +1,4 @@
Simple setup file was copied to %%PREFIX%%/etc/torsocks.conf.sample
-An example of a more complex setup file can be found in
-%%PREFIX%%/share/examples/torsocks/
Once you have installed torsocks, just launch it like so:
usewithtor [application]
diff --git a/net/torsocks/pkg-plist b/net/torsocks/pkg-plist
index 7ca2d023bded..65175b2207d4 100644
--- a/net/torsocks/pkg-plist
+++ b/net/torsocks/pkg-plist
@@ -5,24 +5,20 @@ lib/libtorsocks.a
lib/libtorsocks.la
lib/libtorsocks.so
lib/libtorsocks.so.1
-share/torsocks/DEBUG
-share/torsocks/README
-share/torsocks/README.TORDNS
-share/torsocks/SOCKS4.protocol
-share/torsocks/SOCKS5
-share/torsocks/compilewarnings.patch
-share/torsocks/conffile.patch
-share/torsocks/getaddrbyhost.patch
-share/torsocks/getpeername.patch
-share/torsocks/infiniteloop.patch
-share/torsocks/localaddresses.patch
-share/torsocks/socks-extensions.txt
-share/torsocks/tordns.patch
-share/torsocks/test/expectedresults.txt
-share/torsocks/test/run_tests.sh
-@dirrm share/torsocks/test
-@dirrm share/torsocks
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/torsocks.conf.sample
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%DATADIR%%/DEBUG
+%%DATADIR%%/README
+%%DATADIR%%/README.TORDNS
+%%DATADIR%%/SOCKS4.protocol
+%%DATADIR%%/SOCKS5
+%%DATADIR%%/compilewarnings.patch
+%%DATADIR%%/conffile.patch
+%%DATADIR%%/getaddrbyhost.patch
+%%DATADIR%%/getpeername.patch
+%%DATADIR%%/infiniteloop.patch
+%%DATADIR%%/localaddresses.patch
+%%DATADIR%%/socks-extensions.txt
+%%DATADIR%%/tordns.patch
+%%DATADIR%%/test/expectedresults.txt
+%%DATADIR%%/test/run_tests.sh
+@dirrm %%DATADIR%%/test
+@dirrm %%DATADIR%%