aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2012-03-10 23:53:22 +0000
committerChris Rees <crees@FreeBSD.org>2012-03-10 23:53:22 +0000
commitbe84c9c4cded98ef693c9ac6c178c81355902844 (patch)
treea7f4c0d2395a60350175167d99c7e08ee84c05f1 /Mk
parent31459d12bdb456eec8487832bfe64b037d4304fb (diff)
downloadports-be84c9c4cded98ef693c9ac6c178c81355902844.tar.gz
ports-be84c9c4cded98ef693c9ac6c178c81355902844.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.database.mk52
1 files changed, 20 insertions, 32 deletions
diff --git a/Mk/bsd.database.mk b/Mk/bsd.database.mk
index a3a2cd9eb2c9..432fcd8c756f 100644
--- a/Mk/bsd.database.mk
+++ b/Mk/bsd.database.mk
@@ -183,10 +183,12 @@ PGSQL91_LIBVER= 5
# Setting/finding PostgreSQL version we want.
. if exists(${LOCALBASE}/bin/pg_config)
_PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)[^0-9].*/\1\2/p'
-. if defined(WITH_PGSQL_VER) && ${WITH_PGSQL_VER} != ${_PGSQL_VER}
+WITH_PGSQL_VER?= ${_PGSQL_VER}
+. if ${WITH_PGSQL_VER} != ${_PGSQL_VER}
IGNORE?= cannot install: you have set WITH_PGSQL_VER=${WITH_PGSQL_VER} in make.conf, but you have postgresql${_PGSQL_VER}-client installed
. endif
-WITH_PGSQL_VER?= ${_PGSQL_VER}
+. else
+WITH_PGSQL_VER?= ${DEFAULT_PGSQL_VER}
. endif
. if defined(WANT_PGSQL_VER)
@@ -204,44 +206,30 @@ _WANT_PGSQL_VER+=${version}
. endfor
. endif
_WANT_PGSQL_VER?= ${WANT_PGSQL_VER}
+. endif
-. if defined(WITH_PGSQL_VER) && !empty(_WANT_PGSQL_VER)
-. for version in ${_WANT_PGSQL_VER}
-. if ${WITH_PGSQL_VER} == ${version}
-PGSQL_VER= ${WITH_PGSQL_VER}
-. endif
-. endfor
-
-# Take highest allowed version, but take default if allowed
-. elif !empty(_WANT_PGSQL_VER)
-. for ver in ${_WANT_PGSQL_VER}
-. if ${DEFAULT_PGSQL_VER} == ${ver}
-PGSQL_VER= ${ver}
-. else
-_PGSQL_VER_HIGHEST= ${ver}
-. endif
-. endfor
-PGSQL_VER?= ${_PGSQL_VER_HIGHEST}
-. elif defined(WITH_PGSQL_VER)
+. if !empty(_WANT_PGSQL_VER)
+. for version in ${_WANT_PGSQL_VER}
+. if ${WITH_PGSQL_VER} == ${version}
PGSQL_VER= ${WITH_PGSQL_VER}
-. endif
-. else
-. if defined(_PGSQL_VER)
-PGSQL_VER= ${_PGSQL_VER}
-. else
-PGSQL_VER= ${DEFAULT_PGSQL_VER}
+. endif
+. endfor
+. if !defined(PGSQL_VER)
+. if ${WITH_PGSQL_VER} == ${DEFAULT_PGSQL_VER}
+IGNORE?= cannot install: the port wants postgresql-client version ${WANT_PGSQL_VER} and the port does not work with the default version (${WITH_PGSQL_VER}). Try installing postgresql-client version ${WANT_PGSQL_VER}
+. else
+IGNORE?= cannot install: the port wants postgresql-client version ${WANT_PGSQL_VER} and you have version ${WITH_PGSQL_VER} installed or set in make.conf
+. endif
. endif
-. endif # WANT_PGSQL_VER
+. endif
-. if empty(PGSQL_VER)
-IGNORE?= cannot install: the port wants postgresql-client version ${WANT_PGSQL_VER} and you have set WITH_PGSQL_VER=${WITH_PGSQL_VER} in make.conf or have postgresql${WITH_PGSQL_VER}-client installed
-. endif
+PGSQL_VER?= ${WITH_PGSQL_VER}
# And now we are checking if we can use it
.if defined(PGSQL${PGSQL_VER}_LIBVER)
.if defined(IGNORE_WITH_PGSQL)
-. for VER in ${IGNORE_WITH_PGSQL}
-. if (${PGSQL_VER} == "${VER}")
+. for ver in ${IGNORE_WITH_PGSQL}
+. if (${PGSQL_VER} == ${ver})
IGNORE?= cannot install: does not work with postgresql${PGSQL_VER}-client (PostgresSQL ${IGNORE_WITH_PGSQL} not supported)
. endif
. endfor