summaryrefslogtreecommitdiff
path: root/security/stunnel
diff options
context:
space:
mode:
authorobache <obache>2008-10-01 14:34:32 +0000
committerobache <obache>2008-10-01 14:34:32 +0000
commite3a19bf90e130325148ab14a56921b3b7ac95b38 (patch)
tree66f7d8999f4640e29c68ef8dbc5911d9f48255b0 /security/stunnel
parentd160a63e0eeff4a80e5155f3ed5282e66669a52b (diff)
downloadpkgsrc-e3a19bf90e130325148ab14a56921b3b7ac95b38.tar.gz
* Move inclusion of phthread.buildlink3.mk to rightful place in options.mk and
only suggest pthread option when native pthread exists. We cannot use pthread.buildlink3.mk to just detect if suituable pthread implementation exist or not. Avoid unwanted dependency on pthread package when no native pthread and pthread option off. * Move inclusion of seculity/tcp_wappers/buildlink3.mk to rightful place in options.mk. Avoid unwanted dependency on tcp_wrappers when libwrap option off. * Remove deprecated(?) --with-tcp-wrappers from CONFIGURE_ARGS. * Remove --enable-libwrap from CONFIGURE_ARGS even if require tcp_wrappers. It affect not only check of existence of tcp_wappers but also blow off needful addition of -lwrap to LIBS. Fixes PR 39635
Diffstat (limited to 'security/stunnel')
-rw-r--r--security/stunnel/Makefile8
-rw-r--r--security/stunnel/options.mk14
2 files changed, 10 insertions, 12 deletions
diff --git a/security/stunnel/Makefile b/security/stunnel/Makefile
index 78c1bad984f..acb02e62a95 100644
--- a/security/stunnel/Makefile
+++ b/security/stunnel/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2008/05/29 00:44:30 schmonz Exp $
+# $NetBSD: Makefile,v 1.64 2008/10/01 14:34:32 obache Exp $
DISTNAME= stunnel-4.24
PKGREVISION= 1
@@ -18,22 +18,16 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-ssl=${SSLBASE:Q} \
--with-cert-dir=${SSLCERTS:Q} \
--with-pem-dir=${SSLCERTS:Q} \
- --with-tcp-wrappers \
--sysconfdir=${PKG_SYSCONFDIR:Q} \
--localstatedir=${VARBASE:Q}
-PTHREAD_OPTS?= optional
-
PKG_SYSCONFSUBDIR= stunnel
RCD_SCRIPTS= stunnel
REPLACE_PERL+= src/stunnel3.in
USE_TOOLS+= perl:run
-.include "../../mk/pthread.buildlink3.mk"
-
.include "options.mk"
.include "../../security/openssl/buildlink3.mk"
-.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/stunnel/options.mk b/security/stunnel/options.mk
index e532720c33b..32368913857 100644
--- a/security/stunnel/options.mk
+++ b/security/stunnel/options.mk
@@ -1,9 +1,13 @@
-# $NetBSD: options.mk,v 1.4 2008/09/19 19:20:57 adrianp Exp $
+# $NetBSD: options.mk,v 1.5 2008/10/01 14:34:32 obache Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.stunnel
PKG_SUPPORTED_OPTIONS= inet6 pthread libwrap
PKG_SUGGESTED_OPTIONS= libwrap
-.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "none"
+CHECK_BUILTIN.pthread:= yes
+.include "../../mk/pthread.builtin.mk"
+CHECK_BUILTIN.pthread:= no
+
+.if !empty(BUILTIN_LIB_FOUND.pthread:M[yY][eE][sS])
PKG_SUGGESTED_OPTIONS+= pthread
.endif
@@ -22,9 +26,9 @@ CONFIGURE_ARGS+= --disable-ipv6
### Support pthreads
###
.if !empty(PKG_OPTIONS:Mpthread)
+PTHREAD_AUTO_VARS= yes
+.include "../../mk/pthread.buildlink3.mk"
CONFIGURE_ARGS+= --with-threads=pthread
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}" \
- LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}"
.else
CONFIGURE_ARGS+= --with-threads=fork
.endif
@@ -33,7 +37,7 @@ CONFIGURE_ARGS+= --with-threads=fork
### Support libwrap
###
.if !empty(PKG_OPTIONS:Mlibwrap)
-CONFIGURE_ARGS+= --enable-libwrap
+.include "../../security/tcp_wrappers/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libwrap
.endif