summaryrefslogtreecommitdiff
path: root/chat/xchat2
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2004-10-30 18:28:00 +0000
committerminskim <minskim@pkgsrc.org>2004-10-30 18:28:00 +0000
commit9c82a46ffc8cd02893d2c24c446393dd69a07f1a (patch)
treea9dc7a59b353ac4db74a79d42e896c2b45b42e20 /chat/xchat2
parent78f9b864df0ca403e44bb5d5283c7d547a229155 (diff)
downloadpkgsrc-9c82a46ffc8cd02893d2c24c446393dd69a07f1a.tar.gz
Convert to use bsd.options.mk. Patches provided by adrianp@ with
slight modification by me.
Diffstat (limited to 'chat/xchat2')
-rw-r--r--chat/xchat2/Makefile21
-rw-r--r--chat/xchat2/options.mk45
2 files changed, 47 insertions, 19 deletions
diff --git a/chat/xchat2/Makefile b/chat/xchat2/Makefile
index 56ea36a976e..827b02d4fb2 100644
--- a/chat/xchat2/Makefile
+++ b/chat/xchat2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2004/10/30 18:22:35 minskim Exp $
+# $NetBSD: Makefile,v 1.40 2004/10/30 18:28:00 minskim Exp $
#
.include "Makefile.common"
@@ -24,24 +24,7 @@ LDFLAGS.IRIX+= -lX11
LDFLAGS.Darwin+= -lX11
.include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+= USE_INET6 USE_SOCKS XCHAT_USE_SSL
-
-# IPv6 support
-.if defined(USE_INET6) && !empty(USE_INET6:M[Yy][Ee][Ss])
-CONFIGURE_ARGS+= --enable-ipv6
-.endif
-
-# Socks support
-.if defined(USE_SOCKS) && !empty(USE_SOCKS:M[Yy][Ee][Ss])
-CONFIGURE_ARGS+= --enable-socks
-.endif
-
-# SSL support
-.if defined(XCHAT_USE_SSL) && !empty(XCHAT_USE_SSL:M[Yy][Ee][Ss])
-. include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-openssl=${SSLBASE}
-.endif
+.include "options.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
diff --git a/chat/xchat2/options.mk b/chat/xchat2/options.mk
new file mode 100644
index 00000000000..f245528ca0d
--- /dev/null
+++ b/chat/xchat2/options.mk
@@ -0,0 +1,45 @@
+# $NetBSD: options.mk,v 1.1 2004/10/30 18:28:00 minskim Exp $
+
+# Global and legacy options
+.if defined(USE_SOCKS) && !empty(USE_SOCKS:M[Yy][Ee][Ss])
+PKG_DEFAULT_OPTIONS+= socks
+.endif
+.if defined(XCHAT_USE_SSL) && !empty(XCHAT_USE_SSL:M[Yy][Ee][Ss])
+PKG_DEFAULT_OPTIONS+= ssl
+.endif
+.if defined(USE_INET6) && !empty(USE_INET6:M[yY][eE][sS])
+PKG_DEFAULT_OPTIONS+= inet6
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.xchat2
+PKG_SUPPORTED_OPTIONS= inet6 ssl socks
+
+.if !defined(PKG_OPTIONS.xchat2)
+PKG_DEFAULT_OPTIONS+= inet6 ssl
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Use OpenSSL libraries for connecting to ircs servers
+###
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-openssl=${SSLBASE}
+.else
+CONFIGURE_ARGS+= --enable-openssl=no
+.endif
+
+###
+### Support for connecting thru SOCKS servers
+###
+.if !empty(PKG_OPTIONS:Msocks)
+CONFIGURE_ARGS+= --enable-socks
+.endif
+
+###
+### IPv6 support.
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.endif