aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/pgsql.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Uses/pgsql.mk')
-rw-r--r--Mk/Uses/pgsql.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mk/Uses/pgsql.mk b/Mk/Uses/pgsql.mk
index 30e6db57d879..e9274be12cbf 100644
--- a/Mk/Uses/pgsql.mk
+++ b/Mk/Uses/pgsql.mk
@@ -85,7 +85,7 @@ _WANT_PGSQL_VER?= ${pgsql_ARGS}
. endif
# Try to match default version, otherwise just take the first version
-# that matches
+# that matches. Prefer the installed version if it matches
. if !empty(_WANT_PGSQL_VER)
. for version in ${_WANT_PGSQL_VER}
. if ${PGSQL_DEFAULT} == ${version}
@@ -93,6 +93,9 @@ PGSQL_VER= ${version}
. endif
PGSQL_VER?= ${version}
. endfor
+. if defined(_PGSQL_VER) && ${_WANT_PGSQL_VER:M${_PGSQL_VER}} == ${_PGSQL_VER}
+PGSQL_VER= ${_PGSQL_VER}
+. endif
. if defined(_PGSQL_VER) && ${_PGSQL_VER} != ${PGSQL_VER}
IGNORE?= cannot install: the port wants postgresql-client version ${_WANT_PGSQL_VER} and you have version ${_PGSQL_VER} installed
. endif