pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Convert to use the options framework.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/133fa1d7eb37
branches:  trunk
changeset: 533070:133fa1d7eb37
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Sep 07 22:07:31 2007 +0000

description:
Convert to use the options framework.

diffstat:

 mail/solid-pop3d/Makefile   |  35 ++++++--------------------------
 mail/solid-pop3d/options.mk |  44 ++++++++++++++++++++++++++++++++++++++++++
 net/quagga-devel/Makefile   |  42 +++++----------------------------------
 net/quagga-devel/options.mk |  47 +++++++++++++++++++++++++++++++++++++++++++++
 net/quagga/Makefile         |  42 +++++----------------------------------
 net/quagga/options.mk       |  47 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 157 insertions(+), 100 deletions(-)

diffs (truncated from 333 to 300 lines):

diff -r 6a378830f4c0 -r 133fa1d7eb37 mail/solid-pop3d/Makefile
--- a/mail/solid-pop3d/Makefile Fri Sep 07 21:55:44 2007 +0000
+++ b/mail/solid-pop3d/Makefile Fri Sep 07 22:07:31 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2006/03/04 21:30:02 jlam Exp $
+# $NetBSD: Makefile,v 1.5 2007/09/07 22:07:31 jlam Exp $
 
 DISTNAME=              solid-pop3d-0.15
 CATEGORIES=            mail
@@ -11,39 +11,18 @@
 EGDIR=                 ${PREFIX}/share/examples/spop3d
 MESSAGE_SUBST+=                EGDIR=${EGDIR}
 
-PLIST_SRC=
-EXAMPLES=
+PLIST_SRC=             # empty
+EXAMPLES=              # empty
 
 GNU_CONFIGURE=         yes
-
-CONFIGURE_ARGS+=       --enable-logextend      \
-                       --enable-statistics
-
-BUILD_DEFS+=           USE_INET6
-
-.if defined(SPOP3D_ENABLE_APOP)
-CONFIGURE_ARGS+=       --enable-apop
-PLIST_SRC+=            ${.CURDIR}/PLIST.apop
-.endif
+CONFIGURE_ARGS+=       --enable-logextend
+CONFIGURE_ARGS+=       --enable-statistics
 
-.if defined(SPOP3D_ENABLE_STANDALONE)
-CONFIGURE_ARGS+=       --enable-standalone
-CONFIGURE_ARGS+=       --enable-connect
-.endif
+.include "options.mk"
 
-.if defined(SPOP3D_ENABLE_ALIASES)
-CONFIGURE_ARGS+=       --enable-mapping
-CONFIGURE_ARGS+=       --enable-nonip
-.endif
-
-.if defined(USE_INET6)
-CONFIGURE_ARGS+=       --enable-ipv6
-.endif
-
+PLIST_SRC+=            ${PKGDIR}/PLIST
 EXAMPLES+=             config.example
 
-PLIST_SRC+=            ${.CURDIR}/PLIST
-
 post-install:
        ${INSTALL_DATA_DIR} ${EGDIR}
        cd ${WRKSRC}/doc; for i in ${EXAMPLES}; do                      \
diff -r 6a378830f4c0 -r 133fa1d7eb37 mail/solid-pop3d/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/solid-pop3d/options.mk       Fri Sep 07 22:07:31 2007 +0000
@@ -0,0 +1,44 @@
+# $NetBSD: options.mk,v 1.1 2007/09/07 22:07:31 jlam Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.solid-pop3d
+PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS+=        solid-pop3d-aliases
+PKG_SUPPORTED_OPTIONS+=        solid-pop3d-apop
+PKG_SUPPORTED_OPTIONS+=        solid-pop3d-standalone
+
+PKG_OPTIONS_LEGACY_VARS+=      SPOP3D_ENABLE_ALIASES:solid-pop3d-aliases
+PKG_OPTIONS_LEGACY_VARS+=      SPOP3D_ENABLE_APOP:solid-pop3d-apop
+PKG_OPTIONS_LEGACY_VARS+=      SPOP3D_ENABLE_STANDALONE:solid-pop3d-standalone
+
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --enable-ipv6
+.endif
+
+###
+### Support user names mapping and non-IP-based virtuals
+###
+.if !empty(PKG_OPTIONS:Msolid-pop3d-aliases)
+CONFIGURE_ARGS+=       --enable-mapping
+CONFIGURE_ARGS+=       --enable-nonip
+.endif
+
+###
+### APOP support
+###
+.if !empty(PKG_OPTIONS:Msolid-pop3d-apop)
+CONFIGURE_ARGS+=       --enable-apop
+PLIST_SRC+=            ${PKGDIR}/PLIST.apop
+.endif
+
+###
+### Run as standalone daemon instead of via inetd
+###
+.if !empty(PKG_OPTIONS:Msolid-pop3d-standalone)
+CONFIGURE_ARGS+=       --enable-standalone
+CONFIGURE_ARGS+=       --enable-connect
+.endif
diff -r 6a378830f4c0 -r 133fa1d7eb37 net/quagga-devel/Makefile
--- a/net/quagga-devel/Makefile Fri Sep 07 21:55:44 2007 +0000
+++ b/net/quagga-devel/Makefile Fri Sep 07 22:07:31 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/05/23 10:44:17 gdt Exp $
+# $NetBSD: Makefile,v 1.5 2007/09/07 22:07:31 jlam Exp $
 # Based on KAME Id: Makefile,v 1.1.2.1.2.1.10.2 1999/01/05 11:03:50 itojun Exp
 #
 
@@ -27,11 +27,11 @@
 PLIST_SRC=             ${WRKDIR}/PLIST
 PLIST_CAT=             # empty
 
-INFO_FILES=    # PLIST
+INFO_FILES=            # PLIST
 
-RCD_SCRIPTS=   zebra bgpd ospfd ripd
-PKG_GROUPS=    quagga
-PKG_USERS=     quagga:quagga
+RCD_SCRIPTS=           zebra bgpd ospfd ripd
+PKG_GROUPS=            quagga
+PKG_USERS=             quagga:quagga
 
 # log_syslog.conf is used as a template for each config file
 .for _file_ in vtysh.conf zebra.conf bgpd.conf ospfd.conf ripd.conf
@@ -39,37 +39,7 @@
                        ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
 .endfor
 
-BUILD_DEFS+=                   USE_ZEBRA_VTYSH USE_ZEBRA_OSPF_OPAQUELSA
-USE_ZEBRA_VTYSH?=              YES
-USE_ZEBRA_OSPF_OPAQUELSA?=     YES
-
-.if defined(USE_ZEBRA_VTYSH) && ${USE_ZEBRA_VTYSH} == "YES"
-USE_GNU_READLINE=      # uses rl_pending_input
-.  include "../../devel/readline/buildlink3.mk"
-CONFIGURE_ARGS+=       --enable-vtysh
-PLIST_CAT+=            ${PKGDIR}/PLIST.vtysh
-.else
-CONFIGURE_ARGS+=       --disable-vtysh
-.endif
-
-.if defined(USE_ZEBRA_OSPF_OPAQUELSA) && ${USE_ZEBRA_OSPF_OPAQUELSA} == "YES"
-CONFIGURE_ARGS+=       --enable-opaque-lsa
-PLIST_CAT+=            ${PKGDIR}/PLIST.opaquelsa
-.endif
-
-BUILD_DEFS+=           USE_INET6
-
-.if defined(USE_INET6) && ${USE_INET6} == YES
-PLIST_CAT+=            ${PKGDIR}/PLIST.v6
-RCD_SCRIPTS+=          ospf6d ripngd
-.for _file_ in ospf6d.conf ripngd.conf
-CONF_FILES_PERMS+=     ${PREFIX}/share/examples/quagga/log_syslog.conf \
-                       ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
-.endfor
-.else
-CONFIGURE_ARGS+=       --disable-ospf6d
-CONFIGURE_ARGS+=       --disable-ripngd
-.endif
+.include "options.mk"
 
 PLIST_CAT+=            ${PKGDIR}/PLIST
 
diff -r 6a378830f4c0 -r 133fa1d7eb37 net/quagga-devel/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/quagga-devel/options.mk       Fri Sep 07 22:07:31 2007 +0000
@@ -0,0 +1,47 @@
+# $NetBSD: options.mk,v 1.1 2007/09/07 22:07:32 jlam Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.quagga
+PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS+=        quagga-ospf-opaque-lsa
+PKG_SUPPORTED_OPTIONS+=        quagga-vtysh
+PKG_SUGGESTED_OPTIONS= quagga-ospf-opaque-lsa quagga-vtysh
+
+PKG_OPTIONS_LEGACY_VARS+=      USE_ZEBRA_OSPF_OPAQUELSA:quagga-ospf-opaque-lsa
+PKG_OPTIONS_LEGACY_VARS+=      USE_ZEBRA_VTYSH:quagga-vtysh
+
+.include "../../mk/bsd.options.mk"
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+PLIST_CAT+=            ${PKGDIR}/PLIST.v6
+RCD_SCRIPTS+=          ospf6d ripngd
+.  for _file_ in ospf6d.conf ripngd.conf
+CONF_FILES_PERMS+=     ${PREFIX}/share/examples/quagga/log_syslog.conf \
+                       ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
+.  endfor
+.else
+CONFIGURE_ARGS+=       --disable-ospf6d
+CONFIGURE_ARGS+=       --disable-ripngd
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-vtysh)
+USE_GNU_READLINE=      # uses rl_pending_input
+.  include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+=       --enable-vtysh
+PLIST_CAT+=            ${PKGDIR}/PLIST.vtysh
+.else
+CONFIGURE_ARGS+=       --disable-vtysh
+.endif
+
+###
+### ???
+###
+.if !empty(PKG_OPTIONS:Mquagga-ospf-opaque-lsa)
+CONFIGURE_ARGS+=       --enable-opaque-lsa
+PLIST_CAT+=            ${PKGDIR}/PLIST.opaquelsa
+.endif
diff -r 6a378830f4c0 -r 133fa1d7eb37 net/quagga/Makefile
--- a/net/quagga/Makefile       Fri Sep 07 21:55:44 2007 +0000
+++ b/net/quagga/Makefile       Fri Sep 07 22:07:31 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2006/06/05 19:28:25 gdt Exp $
+# $NetBSD: Makefile,v 1.30 2007/09/07 22:07:31 jlam Exp $
 # Based on KAME Id: Makefile,v 1.1.2.1.2.1.10.2 1999/01/05 11:03:50 itojun Exp
 #
 
@@ -27,11 +27,11 @@
 PLIST_SRC=             ${WRKDIR}/PLIST
 PLIST_CAT=             # empty
 
-INFO_FILES=    # PLIST
+INFO_FILES=            # PLIST
 
-RCD_SCRIPTS=   zebra bgpd ospfd ripd
-PKG_GROUPS=    quagga
-PKG_USERS=     quagga:quagga
+RCD_SCRIPTS=           zebra bgpd ospfd ripd
+PKG_GROUPS=            quagga
+PKG_USERS=             quagga:quagga
 
 # log_syslog.conf is used as a template for each config file
 .for _file_ in vtysh.conf zebra.conf bgpd.conf ospfd.conf ripd.conf
@@ -39,37 +39,7 @@
                        ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
 .endfor
 
-BUILD_DEFS+=                   USE_ZEBRA_VTYSH USE_ZEBRA_OSPF_OPAQUELSA
-USE_ZEBRA_VTYSH?=              YES
-USE_ZEBRA_OSPF_OPAQUELSA?=     YES
-
-.if defined(USE_ZEBRA_VTYSH) && ${USE_ZEBRA_VTYSH} == "YES"
-USE_GNU_READLINE=      # uses rl_pending_input
-.  include "../../devel/readline/buildlink3.mk"
-CONFIGURE_ARGS+=       --enable-vtysh
-PLIST_CAT+=            ${PKGDIR}/PLIST.vtysh
-.else
-CONFIGURE_ARGS+=       --disable-vtysh
-.endif
-
-.if defined(USE_ZEBRA_OSPF_OPAQUELSA) && ${USE_ZEBRA_OSPF_OPAQUELSA} == "YES"
-CONFIGURE_ARGS+=       --enable-opaque-lsa
-PLIST_CAT+=            ${PKGDIR}/PLIST.opaquelsa
-.endif
-
-BUILD_DEFS+=           USE_INET6
-
-.if defined(USE_INET6) && ${USE_INET6} == YES
-PLIST_CAT+=            ${PKGDIR}/PLIST.v6
-RCD_SCRIPTS+=          ospf6d ripngd
-.for _file_ in ospf6d.conf ripngd.conf
-CONF_FILES_PERMS+=     ${PREFIX}/share/examples/quagga/log_syslog.conf \
-                       ${PKG_SYSCONFDIR}/${_file_} quagga quagga 0600
-.endfor
-.else
-CONFIGURE_ARGS+=       --disable-ospf6d
-CONFIGURE_ARGS+=       --disable-ripngd
-.endif
+.include "options.mk"
 
 PLIST_CAT+=            ${PKGDIR}/PLIST
 
diff -r 6a378830f4c0 -r 133fa1d7eb37 net/quagga/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/quagga/options.mk     Fri Sep 07 22:07:31 2007 +0000
@@ -0,0 +1,47 @@
+# $NetBSD: options.mk,v 1.1 2007/09/07 22:07:31 jlam Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.quagga
+PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS+=        quagga-ospf-opaque-lsa
+PKG_SUPPORTED_OPTIONS+=        quagga-vtysh
+PKG_SUGGESTED_OPTIONS= quagga-ospf-opaque-lsa quagga-vtysh
+
+PKG_OPTIONS_LEGACY_VARS+=      USE_ZEBRA_OSPF_OPAQUELSA:quagga-ospf-opaque-lsa
+PKG_OPTIONS_LEGACY_VARS+=      USE_ZEBRA_VTYSH:quagga-vtysh
+
+.include "../../mk/bsd.options.mk"
+
+###



Home | Main Index | Thread Index | Old Index