Subject: pkg/37088: net/socat compiles with ipv6 despite -inet6 option
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Yakovetsky Vladimir <yx@x.ua>
List: pkgsrc-bugs
Date: 10/09/2007 10:40:01
>Number:         37088
>Category:       pkg
>Synopsis:       net/socat compiles with ipv6 despite -inet6 option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 09 10:40:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        NetBSD 4.99.31
>Organization:
>Environment:
System: NetBSD lrou.x.ua 4.99.31 NetBSD 4.99.31 (lrou_odd-1.852) #0: Sun Sep 30 18:16:16 EEST 2007 yx@lrou.x.ua:/sys/arch/i386/compile/lrou_odd i386
Architecture: i386
Machine: i386

>Description:
	net/socat compiles with ipv6 despite -inet6 option

>How-To-Repeat:
% grep -i inet6 /etc/mki.conf
MKINET6=		no
PKG_DEFAULT_OPTIONS+=	-inet6

% cd /usr/pkgsrc/net/socat && make update
...
checking whether to include IPv6 support... yes
...

% socat -V | grep _IP
  #define WITH_IP4 1
  #define WITH_IP6 1


>Fix:
:r net/socat/options.mk

PKG_OPTIONS_VAR=	PKG_OPTIONS.socat
PKG_SUPPORTED_OPTIONS+=	inet6

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+=	--enable-ip6
.else
CONFIGURE_ARGS+=	--disable-ip6
.endif

--- net/socat/Makefile.orig
+++ net/socat/Makefile
@@ -20,6 +20,8 @@
 SUBST_FILES.paths=	doc/socat.1
 SUBST_SED.paths=	-e 's,/usr/,${PREFIX}/,g'
 
+.include "options.mk"
+
 .include "../../security/openssl/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"