Hi,

This diff adds a flavor to the IRC client net/ii.  It makes the usage of
ii more flexible.  Thus, it is possible to use ii with IPv6, libtls or a
socks proxy without applying much more patches from the upstream page.
The patch file itself is comes from upstream, too.  I added
net/ucspi-tools to the run dependencies, because the tlsc program is
mentioned in the adapted manual.

I tested this diff with portcheck without an error.  I hope this diff is
fine, if not just notify me.

bye,
Jan

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/ii/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    18 Jul 2014 01:23:04 -0000      1.12
+++ Makefile    9 May 2016 17:53:44 -0000
@@ -3,14 +3,9 @@
 COMMENT=               minimalist IRC client
 
 DISTNAME=              ii-1.7
-REVISION=              1
+REVISION=              2
 CATEGORIES=            net
 
-# adds ssl encryption support
-# patch from http://tools.suckless.org/ii/patches
-PATCHFILES+=           ${DISTNAME}-ssl.diff:0
-PATCH_DIST_STRIP=      -p1
-
 HOMEPAGE=              http://tools.suckless.org/ii
 MASTER_SITES=          http://dl.suckless.org/tools/
 MASTER_SITES0=         ${HOMEPAGE}/patches/
@@ -20,9 +15,31 @@ MAINTAINER=          Gleydson Soares <gsoares@op
 # MIT/X
 PERMIT_PACKAGE_CDROM=  Yes
 
-WANTLIB=               c crypto ssl
+WANTLIB=               c
 
 NO_TEST=               Yes
+
+FLAVORS=               ucspi
+FLAVOR?=
+
+# patches from http://tools.suckless.org/ii/patches
+PATCH_DIST_STRIP=      -p1
+
+.if ${FLAVOR} == "ucspi"
+# adds unix client server programming interface support
+PATCHFILES+=           ${DISTNAME}-ucspi.diff:0
+PATCH_LIST=            patch-* ucspipatch-*
+RUN_DEPENDS=           net/ucspi-tcp \
+                       net/ucspi-tools
+.else
+# adds ssl encryption support
+PATCHFILES+=           ${DISTNAME}-ssl.diff:0
+PATCH_LIST=            patch-* sslpatch-*
+WANTLIB+=              crypto ssl
+.endif
+
+SUPDISTFILES+=         ${DISTNAME}-ssl.diff:0
+SUPDISTFILES+=         ${DISTNAME}-ucspi.diff:0
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/ii ${PREFIX}/bin
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/ii/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo    18 Jul 2014 01:23:04 -0000      1.5
+++ distinfo    7 May 2016 01:23:51 -0000
@@ -1,4 +1,6 @@
-SHA256 (ii-1.7-ssl.diff) = XIX43pP/cC8eUWZG8kGz9hlpuuKwhqwcQ9mH31PNyJw=
+SHA256 (ii-1.7-ssl.diff) = 8arZ/XrHGLHsiIrg5aj/z/fmb0mRScdj5yvIZjrN448=
+SHA256 (ii-1.7-ucspi.diff) = +teAZTglx5YRD+OX6noPVewnwlnJQAIRfbSJdK3xqyY=
 SHA256 (ii-1.7.tar.gz) = OnKsZgbVVgtiXAYscfE1gg4iFP7QmObWJPxAYy3HzJw=
 SIZE (ii-1.7-ssl.diff) = 7631
+SIZE (ii-1.7-ucspi.diff) = 5161
 SIZE (ii-1.7.tar.gz) = 10174
Index: patches/patch-config_mk
===================================================================
RCS file: patches/patch-config_mk
diff -N patches/patch-config_mk
--- patches/patch-config_mk     18 Jul 2014 01:23:04 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-config_mk,v 1.4 2014/07/18 01:23:04 gsoares Exp $
---- config.mk.orig     Wed Jul 16 22:29:41 2014
-+++ config.mk  Thu Jul 17 08:21:18 2014
-@@ -15,13 +15,13 @@ LIBDIR      = ${PREFIX}/lib
- VERSION     = 1.7
- 
- # includes and libs
--INCLUDES    = -I. -I${INCDIR} -I/usr/include
--LIBS        = -L${LIBDIR} -L/usr/lib -lc -lssl -lcrypto
-+INCLUDES    += -I${INCDIR}
-+LIBS        = -L${LIBDIR} -lssl -lcrypto
- # uncomment and comment other variables for compiling on Solaris
- #LIBS = -L${LIBDIR} -L/usr/lib -lc -lsocket -lnsl
- #CFLAGS      = -g ${INCLUDES} -DVERSION=\"${VERSION}\"
- 
- # compiler
- CC          = cc
--CFLAGS      = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
--LDFLAGS     = ${LIBS}
-+CFLAGS      += ${INCLUDES} -DVERSION=\"${VERSION}\"
-+LDFLAGS     += ${LIBS}
Index: patches/sslpatch-config_mk
===================================================================
RCS file: patches/sslpatch-config_mk
diff -N patches/sslpatch-config_mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/sslpatch-config_mk  18 Jul 2014 01:23:04 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-config_mk,v 1.4 2014/07/18 01:23:04 gsoares Exp $
+--- config.mk.orig     Wed Jul 16 22:29:41 2014
++++ config.mk  Thu Jul 17 08:21:18 2014
+@@ -15,13 +15,13 @@ LIBDIR      = ${PREFIX}/lib
+ VERSION     = 1.7
+ 
+ # includes and libs
+-INCLUDES    = -I. -I${INCDIR} -I/usr/include
+-LIBS        = -L${LIBDIR} -L/usr/lib -lc -lssl -lcrypto
++INCLUDES    += -I${INCDIR}
++LIBS        = -L${LIBDIR} -lssl -lcrypto
+ # uncomment and comment other variables for compiling on Solaris
+ #LIBS = -L${LIBDIR} -L/usr/lib -lc -lsocket -lnsl
+ #CFLAGS      = -g ${INCLUDES} -DVERSION=\"${VERSION}\"
+ 
+ # compiler
+ CC          = cc
+-CFLAGS      = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
+-LDFLAGS     = ${LIBS}
++CFLAGS      += ${INCLUDES} -DVERSION=\"${VERSION}\"
++LDFLAGS     += ${LIBS}
Index: patches/ucspipatch-config_mk
===================================================================
RCS file: patches/ucspipatch-config_mk
diff -N patches/ucspipatch-config_mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/ucspipatch-config_mk        7 May 2016 01:11:39 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-config_mk,v 1.4 2014/07/18 01:23:04 gsoares Exp $
+--- config.mk.orig     Wed Jul 16 22:29:41 2014
++++ config.mk  Thu Jul 17 08:21:18 2014
+@@ -15,13 +15,13 @@ LIBDIR      = ${PREFIX}/lib
+ VERSION     = 1.7
+ 
+ # includes and libs
+-INCLUDES    = -I. -I${INCDIR} -I/usr/include
+-LIBS        = -L${LIBDIR} -L/usr/lib -lc
++INCLUDES    += -I${INCDIR}
++LIBS        = -L${LIBDIR}
+ # uncomment and comment other variables for compiling on Solaris
+ #LIBS = -L${LIBDIR} -L/usr/lib -lc -lsocket -lnsl
+ #CFLAGS      = -g ${INCLUDES} -DVERSION=\"${VERSION}\"
+ 
+ # compiler
+ CC          = cc
+-CFLAGS      = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
+-LDFLAGS     = ${LIBS}
++CFLAGS      += ${INCLUDES} -DVERSION=\"${VERSION}\"
++LDFLAGS     += ${LIBS}
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/ii/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR   20 Sep 2007 19:15:00 -0000      1.1.1.1
+++ pkg/DESCR   9 May 2016 18:06:12 -0000
@@ -1 +1,4 @@
-ii is a minimalist FIFO and filesystem-based IRC client. 
+ii is a minimalist FIFO and filesystem-based IRC client.
+
+Flavors:
+       ucspi - uses ucspi for back-end connection instead of socked API

Reply via email to