svn commit: r319134 - in head/net/torsocks: . files

William Grzybowski wg at FreeBSD.org
Sun May 26 20:12:37 UTC 2013


Author: wg
Date: Sun May 26 20:12:35 2013
New Revision: 319134
URL: http://svnweb.freebsd.org/changeset/ports/319134

Log:
  - 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 at gmail.com> (maintainer) [1]
  Approved by:	jpaetzel (mentor)

Added:
  head/net/torsocks/files/patch-configure.in   (contents, props changed)
  head/net/torsocks/files/patch-src_Makefile.am   (contents, props changed)
  head/net/torsocks/files/patch-src_Makefile.in   (contents, props changed)
  head/net/torsocks/files/patch-src_torsocks.in   (contents, props changed)
  head/net/torsocks/files/patch-src_usewithtor.in   (contents, props changed)
Deleted:
  head/net/torsocks/files/patch-Makefile.in
  head/net/torsocks/files/patch-torsocks.in
  head/net/torsocks/files/patch-usewithtor.in
Modified:
  head/net/torsocks/Makefile
  head/net/torsocks/files/patch-Makefile.am
  head/net/torsocks/files/pkg-message.in
  head/net/torsocks/pkg-plist

Modified: head/net/torsocks/Makefile
==============================================================================
--- head/net/torsocks/Makefile	Sun May 26 20:06:20 2013	(r319133)
+++ head/net/torsocks/Makefile	Sun May 26 20:12:35 2013	(r319134)
@@ -1,20 +1,19 @@
-# New ports collection makefile for:	torsocks
-# Date created:				13 February 2009
-# Whom:					Andrei Lavreniyuk <andy.lavr at gmail.com>
-#
+# Created by: Andrei Lavreniyuk <andy.lavr at 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 at 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>

Modified: head/net/torsocks/files/patch-Makefile.am
==============================================================================
--- head/net/torsocks/files/patch-Makefile.am	Sun May 26 20:06:20 2013	(r319133)
+++ head/net/torsocks/files/patch-Makefile.am	Sun May 26 20:12:35 2013	(r319134)
@@ -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

Added: head/net/torsocks/files/patch-configure.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/torsocks/files/patch-configure.in	Sun May 26 20:12:35 2013	(r319134)
@@ -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

Added: head/net/torsocks/files/patch-src_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/torsocks/files/patch-src_Makefile.am	Sun May 26 20:12:35 2013	(r319134)
@@ -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

Added: head/net/torsocks/files/patch-src_Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/torsocks/files/patch-src_Makefile.in	Sun May 26 20:12:35 2013	(r319134)
@@ -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@

Added: head/net/torsocks/files/patch-src_torsocks.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/torsocks/files/patch-src_torsocks.in	Sun May 26 20:12:35 2013	(r319134)
@@ -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}"

Added: head/net/torsocks/files/patch-src_usewithtor.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/torsocks/files/patch-src_usewithtor.in	Sun May 26 20:12:35 2013	(r319134)
@@ -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 <jacob at appelbaum.net> 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=

Modified: head/net/torsocks/files/pkg-message.in
==============================================================================
--- head/net/torsocks/files/pkg-message.in	Sun May 26 20:06:20 2013	(r319133)
+++ head/net/torsocks/files/pkg-message.in	Sun May 26 20:12:35 2013	(r319134)
@@ -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] 

Modified: head/net/torsocks/pkg-plist
==============================================================================
--- head/net/torsocks/pkg-plist	Sun May 26 20:06:20 2013	(r319133)
+++ head/net/torsocks/pkg-plist	Sun May 26 20:12:35 2013	(r319134)
@@ -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
- at dirrm share/torsocks/test
- at 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
+ at dirrm %%DATADIR%%/test
+ at dirrm %%DATADIR%%


More information about the svn-ports-all mailing list