summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2005-12-02 17:28:37 +0000
committerwiz <wiz@pkgsrc.org>2005-12-02 17:28:37 +0000
commite3a6bd973164e9b6aa11dc6efd215231a3c0b488 (patch)
treefd9a0557f2ef850cf5fa0f7795235d59e6f0feb4 /databases
parent44e7890c4c7676a8b3f49ec6443ee42f14ab8e77 (diff)
downloadpkgsrc-e3a6bd973164e9b6aa11dc6efd215231a3c0b488.tar.gz
Convert to options framework.
Diffstat (limited to 'databases')
-rw-r--r--databases/sqlrelay/Makefile19
-rw-r--r--databases/sqlrelay/options.mk28
2 files changed, 30 insertions, 17 deletions
diff --git a/databases/sqlrelay/Makefile b/databases/sqlrelay/Makefile
index c16793bd66d..9eca7f48996 100644
--- a/databases/sqlrelay/Makefile
+++ b/databases/sqlrelay/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2005/05/22 20:07:46 jlam Exp $
+# $NetBSD: Makefile,v 1.10 2005/12/02 17:28:37 wiz Exp $
DISTNAME= sqlrelay-0.33.1
PKGREVISION= 1
@@ -14,22 +14,7 @@ USE_LANGUAGES= c c++
USE_TOOLS+= gmake
USE_LIBTOOL= YES
-#SQLRELAY_DATABASES+= mysql postgresql
-SQLRELAY_DATABASES?= # empty
-
-.for _db_ in ${SQLRELAY_DATABASES}
-SQLRELAY.${_db_}?= YES
-.endfor
-
-.if defined(SQLRELAY.mysql) && ${SQLRELAY.mysql} == "YES"
-. include "../../mk/mysql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_DIR}
-.endif
-
-.if defined(SQLRELAY.postgresql) && ${SQLRELAY.postgresql} == "YES"
-. include "../../mk/pgsql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-postgresql=${BUILDLINK_DIR}
-.endif
+.include "options.mk"
.include "../../devel/rudiments/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/sqlrelay/options.mk b/databases/sqlrelay/options.mk
new file mode 100644
index 00000000000..f67b503d47d
--- /dev/null
+++ b/databases/sqlrelay/options.mk
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.1 2005/12/02 17:28:37 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.sqlrelay
+PKG_SUPPORTED_OPTIONS+= mysql pgsql
+
+# remove legacy handling after 2005Q4
+.if defined(SQLRELAY_DATABASES)
+.if !empty(SQLRELAY_DATABASES:Mmysql)
+PKG_LEGACY_OPTIONS+= mysql
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable SQLRELAY_DATABASES used, use PKG_OPTIONS.sqlrelay+=mysql instead."
+.endif
+.if !empty(SQLRELAY_DATABASES:Mpostgresql)
+PKG_LEGACY_OPTIONS+= pgsql
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable SQLRELAY_DATABASES used, use PKG_OPTIONS.sqlrelay+=pqsql instead."
+.endif
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmysql)
+CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_DIR}
+.include "../../mk/mysql.buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpgsql)
+CONFIGURE_ARGS+= --with-postgresql=${BUILDLINK_DIR}
+.include "../../mk/pgsql.buildlink3.mk"
+.endif