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