diff options
author | bapt <bapt@FreeBSD.org> | 2012-06-02 17:38:19 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-06-02 17:38:19 +0800 |
commit | 4c37a5afb81879f191c495f7021f9ce39bd1e358 (patch) | |
tree | 9bc11f589a5566a5619c22984c1f79ee922b1ed6 /ports-mgmt | |
parent | a22e518a5402b49db43086deb2ef05c9ddb59bac (diff) | |
download | freebsd-ports-gnome-4c37a5afb81879f191c495f7021f9ce39bd1e358.tar.gz freebsd-ports-gnome-4c37a5afb81879f191c495f7021f9ce39bd1e358.tar.zst freebsd-ports-gnome-4c37a5afb81879f191c495f7021f9ce39bd1e358.zip |
Convert to new options framework
PR= ports/168534
Submitted by: Bryan Drewery <bryan@shatow.net> (maintainer)
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portupgrade/Makefile | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile index 6a59cb23edac..32fb2b45eda4 100644 --- a/ports-mgmt/portupgrade/Makefile +++ b/ports-mgmt/portupgrade/Makefile @@ -18,8 +18,13 @@ COMMENT= FreeBSD ports/packages administration and management tool suite LICENSE= BSD -OPTIONS= BDB4 "Use Berkeley DB >=2 as backend" on \ - BDB1 "Use Berkeley DB 1.85 as backend" off +OPTIONS_DEFINE= DB_OVERRIDE +OPTIONS_SINGLE= DB_OVERRIDE +OPTIONS_SINGLE_DB_OVERRIDE= BDB4 BDB1 +OPTIONS_DEFAULT= DB_OVERRIDE BDB4 +DB_OVERRIDE_DESC= Override DB backend instead of default DBM +BDB1_DESC= Use Berkeley DB 1 +BDB4_DESC= Use Berkeley DB >=2 CONFLICTS_INSTALL= portupgrade-devel-* @@ -50,18 +55,17 @@ MANCOMPRESSED= maybe EXAMPLESDIR= ${PREFIX}/share/examples/pkgtools DOCSDIR= ${PREFIX}/share/doc/pkgtools +.include <bsd.port.pre.mk> + INSTALL_TARGET= install -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} INSTALL_TARGET+= install-doc .endif -.include <bsd.port.pre.mk> - -.if defined(WITH_BDB4) +.if ${PORT_OPTIONS:MBDB4} # For PKG_DBDRIVER={bdb_btree,bdb_hash} RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb -.endif -.if defined(WITH_BDB1) && !defined(WITH_BDB4) +.elif ${PORT_OPTIONS:MBDB1} # For PKG_DBDRIVER={bdb1_btree,bdb1_hash} RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/bdb1.so:${PORTSDIR}/databases/ruby-bdb1 .endif @@ -72,18 +76,9 @@ RUN_DEPENDS+= ${RUBY_SITELIBDIR}/parsedate.rb:${PORTSDIR}/devel/ruby-date2 .endif pre-extract: -.if !defined(WITH_BDB4) && !defined(WITH_BDB1) - @${ECHO_MSG} "=================================================================" - @${ECHO_MSG} "Neither WITH_BDB4 nor WITH_BDB1 are defined. Will use DBD driver." - @${ECHO_MSG} "=================================================================" -.endif -.if defined(WITH_BDB4) && defined(WITH_BDB1) - @${ECHO_MSG} "=================================================================" - @${ECHO_MSG} "Both WITH_BDB4 and WITH_BDB1 are defined. Will use BDB4 driver." - @${ECHO_MSG} "=================================================================" -.elif defined(WITH_BDB1) && exists(${RUBY_SITEARCHLIBDIR}/bdb.so) +.if exists(${RUBY_SITEARCHLIBDIR}/bdb.so) && ${PORT_OPTIONS:MBDB1} @${ECHO_MSG} "=================================================================" - @${ECHO_MSG} "WITH_BDB1 is defined but ruby-bdb port installed." + @${ECHO_MSG} "BDB1 is defined but databases/ruby-bdb port installed." @${ECHO_MSG} "Remove ruby-bdb or redefine options." @${ECHO_MSG} "=================================================================" @exit 1 |