From 1d757bfcf8df6d941c6eb9ada6d113bbf0c56852 Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Sun, 26 May 2013 20:12:35 +0000 Subject: - 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 (maintainer) [1] Approved by: jpaetzel (mentor) --- net/torsocks/Makefile | 74 +++++++++++++++--------------- net/torsocks/files/patch-Makefile.am | 17 ++++--- net/torsocks/files/patch-Makefile.in | 11 ----- net/torsocks/files/patch-configure.in | 20 ++++++++ net/torsocks/files/patch-src_Makefile.am | 10 ++++ net/torsocks/files/patch-src_Makefile.in | 11 +++++ net/torsocks/files/patch-src_torsocks.in | 11 +++++ net/torsocks/files/patch-src_usewithtor.in | 28 +++++++++++ net/torsocks/files/patch-torsocks.in | 11 ----- net/torsocks/files/patch-usewithtor.in | 28 ----------- net/torsocks/files/pkg-message.in | 2 - net/torsocks/pkg-plist | 38 +++++++-------- 12 files changed, 142 insertions(+), 119 deletions(-) delete mode 100644 net/torsocks/files/patch-Makefile.in create mode 100644 net/torsocks/files/patch-configure.in create mode 100644 net/torsocks/files/patch-src_Makefile.am create mode 100644 net/torsocks/files/patch-src_Makefile.in create mode 100644 net/torsocks/files/patch-src_torsocks.in create mode 100644 net/torsocks/files/patch-src_usewithtor.in delete mode 100644 net/torsocks/files/patch-torsocks.in delete mode 100644 net/torsocks/files/patch-usewithtor.in (limited to 'net') 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 -# +# Created by: Andrei Lavreniyuk # $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 +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 -.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 +.include 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-Makefile.in b/net/torsocks/files/patch-Makefile.in deleted file mode 100644 index a5c2b3b9d14d..000000000000 --- a/net/torsocks/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Makefile.in.orig 2011-10-24 23:23:39.000000000 +0300 -+++ src/Makefile.in 2011-11-09 12:41:22.805940562 +0200 -@@ -196,7 +196,7 @@ - includedir = @includedir@ - infodir = @infodir@ - install_sh = @install_sh@ --libdir = @libdir@/torsocks -+libdir = @prefix@/lib - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ 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-src_Makefile.in b/net/torsocks/files/patch-src_Makefile.in new file mode 100644 index 000000000000..a5c2b3b9d14d --- /dev/null +++ b/net/torsocks/files/patch-src_Makefile.in @@ -0,0 +1,11 @@ +--- src/Makefile.in.orig 2011-10-24 23:23:39.000000000 +0300 ++++ src/Makefile.in 2011-11-09 12:41:22.805940562 +0200 +@@ -196,7 +196,7 @@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +-libdir = @libdir@/torsocks ++libdir = @prefix@/lib + libexecdir = @libexecdir@ + localedir = @localedir@ + localstatedir = @localstatedir@ diff --git a/net/torsocks/files/patch-src_torsocks.in b/net/torsocks/files/patch-src_torsocks.in new file mode 100644 index 000000000000..e4db4ef2d046 --- /dev/null +++ b/net/torsocks/files/patch-src_torsocks.in @@ -0,0 +1,11 @@ +--- src/torsocks.in.orig 2010-12-11 18:28:08.000000000 +0200 ++++ src/torsocks.in 2011-01-12 17:01:34.460490482 +0200 +@@ -68,7 +68,7 @@ + exit + fi + +-LIBDIR="@prefix@/lib/torsocks" ++LIBDIR="@prefix@/lib" + LIB_NAME="libtorsocks" + SHLIB_EXT="@SHLIB_EXT@" + SHLIB="${LIBDIR}/${LIB_NAME}.${SHLIB_EXT}" diff --git a/net/torsocks/files/patch-src_usewithtor.in b/net/torsocks/files/patch-src_usewithtor.in new file mode 100644 index 000000000000..5b8bd331e448 --- /dev/null +++ b/net/torsocks/files/patch-src_usewithtor.in @@ -0,0 +1,28 @@ +--- src/usewithtor.in.orig 2009-11-08 14:35:11.000000000 +0200 ++++ src/usewithtor.in 2009-11-13 17:10:26.726475549 +0200 +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#!/bin/sh + # *************************************************************************** + # * * + # * $Id: usewithtor.in,v 1.3 2008-07-06 15:17:35 hoganrobert Exp $* +@@ -26,8 +26,8 @@ + # * Original copyright notice from tsocks source file follows: * + # *************************************************************************** + +-# Wrapper script for use of the tsocks(8) transparent socksification library +-# See the tsocks(1) and torify(1) manpages. ++# Wrapper script for use of the torsocks(8) transparent socksification library ++# See the torsocks(1) and torify(1) manpages. + + # Copyright (c) 2004, 2006 Peter Palfrader + # Modified by Jacob Appelbaum April 16th 2006 +@@ -35,7 +35,7 @@ + # May be distributed under the same terms as Tor itself + + +-# Define and ensure we have tsocks ++# Define and ensure we have torsocks + # XXX: what if we don't have which? + TORSOCKS="`which torsocks`" + PROG= diff --git a/net/torsocks/files/patch-torsocks.in b/net/torsocks/files/patch-torsocks.in deleted file mode 100644 index e4db4ef2d046..000000000000 --- a/net/torsocks/files/patch-torsocks.in +++ /dev/null @@ -1,11 +0,0 @@ ---- src/torsocks.in.orig 2010-12-11 18:28:08.000000000 +0200 -+++ src/torsocks.in 2011-01-12 17:01:34.460490482 +0200 -@@ -68,7 +68,7 @@ - exit - fi - --LIBDIR="@prefix@/lib/torsocks" -+LIBDIR="@prefix@/lib" - LIB_NAME="libtorsocks" - SHLIB_EXT="@SHLIB_EXT@" - SHLIB="${LIBDIR}/${LIB_NAME}.${SHLIB_EXT}" diff --git a/net/torsocks/files/patch-usewithtor.in b/net/torsocks/files/patch-usewithtor.in deleted file mode 100644 index 5b8bd331e448..000000000000 --- a/net/torsocks/files/patch-usewithtor.in +++ /dev/null @@ -1,28 +0,0 @@ ---- src/usewithtor.in.orig 2009-11-08 14:35:11.000000000 +0200 -+++ src/usewithtor.in 2009-11-13 17:10:26.726475549 +0200 -@@ -1,4 +1,4 @@ --#! /bin/sh -+#!/bin/sh - # *************************************************************************** - # * * - # * $Id: usewithtor.in,v 1.3 2008-07-06 15:17:35 hoganrobert Exp $* -@@ -26,8 +26,8 @@ - # * Original copyright notice from tsocks source file follows: * - # *************************************************************************** - --# Wrapper script for use of the tsocks(8) transparent socksification library --# See the tsocks(1) and torify(1) manpages. -+# Wrapper script for use of the torsocks(8) transparent socksification library -+# See the torsocks(1) and torify(1) manpages. - - # Copyright (c) 2004, 2006 Peter Palfrader - # Modified by Jacob Appelbaum April 16th 2006 -@@ -35,7 +35,7 @@ - # May be distributed under the same terms as Tor itself - - --# Define and ensure we have tsocks -+# Define and ensure we have torsocks - # XXX: what if we don't have which? - TORSOCKS="`which torsocks`" - PROG= 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%% -- cgit v1.2.3