Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/pgsql.mk
Show All 39 Lines | |||||
# When adding a version, please keep the comment in | # When adding a version, please keep the comment in | ||||
# Mk/bsd.default-versions.mk in sync. | # Mk/bsd.default-versions.mk in sync. | ||||
VALID_PGSQL_VER= 10 11 12 13 14 | VALID_PGSQL_VER= 10 11 12 13 14 | ||||
# Override non-default LIBVERS like this: | # Override non-default LIBVERS like this: | ||||
#PGSQL99_LIBVER=6 | #PGSQL99_LIBVER=6 | ||||
PGSQL_LIBVER= 5 | PGSQL_LIBVER= 5 | ||||
.for v in ${VALID_PGSQL_VER:S,.,,} | . for v in ${VALID_PGSQL_VER:S,.,,} | ||||
PGSQL$v_LIBVER?= ${PGSQL_LIBVER} | PGSQL$v_LIBVER?= ${PGSQL_LIBVER} | ||||
.endfor | . endfor | ||||
.for v in ${PGSQL_DEFAULT} | . for v in ${PGSQL_DEFAULT} | ||||
. if ! ${VALID_PGSQL_VER:M$v} | . if ! ${VALID_PGSQL_VER:M$v} | ||||
IGNORE= Invalid PGSQL default version ${PGSQL_DEFAULT}; valid versions are ${VALID_PGSQL_VER} | IGNORE= Invalid PGSQL default version ${PGSQL_DEFAULT}; valid versions are ${VALID_PGSQL_VER} | ||||
. endif | . endif | ||||
.endfor | . endfor | ||||
. for w in WITH DEFAULT | . for w in WITH DEFAULT | ||||
. ifdef $w_PGSQL_VER | . ifdef $w_PGSQL_VER | ||||
WARNING+= "$w_PGSQL_VER is defined, consider using DEFAULT_VERSIONS=pgsql=${$w_PGSQL_VER:C,^.,&.,} instead" | WARNING+= "$w_PGSQL_VER is defined, consider using DEFAULT_VERSIONS=pgsql=${$w_PGSQL_VER:C,^.,&.,} instead" | ||||
PGSQL_DEFAULT?= ${$w_PGSQL_VER:C,^.,&.,} | PGSQL_DEFAULT?= ${$w_PGSQL_VER:C,^.,&.,} | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
. if empty(PGSQL_VER) | . if empty(PGSQL_VER) | ||||
PGSQL_VER= ${PGSQL_DEFAULT} | PGSQL_VER= ${PGSQL_DEFAULT} | ||||
. endif | . endif | ||||
# We don't want to be :S,.,, the whole time when doing port version checks | # We don't want to be :S,.,, the whole time when doing port version checks | ||||
PGSQL_VER_NODOT= ${PGSQL_VER:S,.,,} | PGSQL_VER_NODOT= ${PGSQL_VER:S,.,,} | ||||
# And now we are checking if we can use it | # And now we are checking if we can use it | ||||
. if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) | . if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) | ||||
# Compat. Please DO NOT use IGNORE_WITH_PGSQL! | # Compat. Please DO NOT use IGNORE_WITH_PGSQL! | ||||
. if defined(IGNORE_WITH_PGSQL) | . if defined(IGNORE_WITH_PGSQL) | ||||
DEV_WARNING+= "Do not set IGNORE_WITH_PGSQL, use the version argument to USES=pgsql" | DEV_WARNING+= "Do not set IGNORE_WITH_PGSQL, use the version argument to USES=pgsql" | ||||
. for ver in ${IGNORE_WITH_PGSQL} | . for ver in ${IGNORE_WITH_PGSQL} | ||||
. if (${PGSQL_VER} == ${ver}) | . if (${PGSQL_VER} == ${ver}) | ||||
IGNORE?= cannot install: does not work with postgresql${PGSQL_VER_NODOT}-client (PostgreSQL ${IGNORE_WITH_PGSQL} not supported) | IGNORE?= cannot install: does not work with postgresql${PGSQL_VER_NODOT}-client (PostgreSQL ${IGNORE_WITH_PGSQL} not supported) | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
. endif # IGNORE_WITH_PGSQL | . endif # IGNORE_WITH_PGSQL | ||||
.if !defined(WANT_PGSQL) || ${WANT_PGSQL:Mlib} | . if !defined(WANT_PGSQL) || ${WANT_PGSQL:Mlib} | ||||
LIB_DEPENDS+= libpq.so.${PGSQL${PGSQL_VER_NODOT}_LIBVER}:databases/postgresql${PGSQL_VER_NODOT}-client | LIB_DEPENDS+= libpq.so.${PGSQL${PGSQL_VER_NODOT}_LIBVER}:databases/postgresql${PGSQL_VER_NODOT}-client | ||||
.endif | . endif | ||||
_USE_PGSQL_DEP= client contrib docs pgtcl plperl plpython pltcl server | _USE_PGSQL_DEP= client contrib docs pgtcl plperl plpython pltcl server | ||||
_USE_PGSQL_DEP_client= psql | _USE_PGSQL_DEP_client= psql | ||||
_USE_PGSQL_DEP_contrib= vacuumlo | _USE_PGSQL_DEP_contrib= vacuumlo | ||||
_USE_PGSQL_DEP_docs= postgresql${PGSQL_VER_NODOT}-docs>0 | _USE_PGSQL_DEP_docs= postgresql${PGSQL_VER_NODOT}-docs>0 | ||||
_USE_PGSQL_DEP_pgtcl= ${LOCALBASE}/lib/pgtcl/pkgIndex.tcl | _USE_PGSQL_DEP_pgtcl= ${LOCALBASE}/lib/pgtcl/pkgIndex.tcl | ||||
_USE_PGSQL_DEP_plperl= postgresql${PGSQL_VER_NODOT}-plperl>0 | _USE_PGSQL_DEP_plperl= postgresql${PGSQL_VER_NODOT}-plperl>0 | ||||
_USE_PGSQL_DEP_plpython=postgresql${PGSQL_VER_NODOT}-plpython>0 | _USE_PGSQL_DEP_plpython=postgresql${PGSQL_VER_NODOT}-plpython>0 | ||||
Show All 20 Lines |