version 1.27, 2009/08/14 19:40:48 |
version 1.37, 2014/06/10 14:21:37 |
|
|
# PG_LIB_EXT |
# PG_LIB_EXT |
# PGSQL_TYPE |
# PGSQL_TYPE |
# PGPKGSRCDIR |
# PGPKGSRCDIR |
# |
|
|
|
.if !defined(PGVERSION_MK) |
.if !defined(PGVERSION_MK) |
PGVERSION_MK= defined |
PGVERSION_MK= defined |
Line 25 _SYS_VARS.pgsql= PG_LIB_EXT PGSQL_TYPE P |
|
Line 24 _SYS_VARS.pgsql= PG_LIB_EXT PGSQL_TYPE P |
|
|
|
.include "../../mk/bsd.prefs.mk" |
.include "../../mk/bsd.prefs.mk" |
|
|
PGSQL_VERSION_DEFAULT?= 82 |
PGSQL_VERSION_DEFAULT?= 93 |
PGSQL_VERSIONS_ACCEPTED?= 84 83 82 |
PGSQL_VERSIONS_ACCEPTED?= 93 92 91 90 84 |
|
|
# transform the list into individual variables |
# transform the list into individual variables |
.for pv in ${PGSQL_VERSIONS_ACCEPTED} |
.for pv in ${PGSQL_VERSIONS_ACCEPTED} |
|
|
|
|
# check what is installed |
# check what is installed |
.if ${OPSYS} == "Darwin" |
.if ${OPSYS} == "Darwin" |
.if exists(${LOCALBASE}/lib/libecpg.6.0.1.dylib) |
. if exists(${LOCALBASE}/lib/libecpg.6.5.dylib) |
|
_PGSQL_VERSION_93_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.6.4.dylib) |
|
_PGSQL_VERSION_92_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.6.3.dylib) |
|
_PGSQL_VERSION_91_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.6.2.dylib) |
|
_PGSQL_VERSION_90_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.6.1.dylib) |
_PGSQL_VERSION_84_INSTALLED= yes |
_PGSQL_VERSION_84_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.6.0.0.dylib) |
|
_PGSQL_VERSION_83_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.5.0.2.dylib) |
|
_PGSQL_VERSION_82_INSTALLED= yes |
|
.endif |
|
.else |
.else |
.if exists(${LOCALBASE}/lib/libecpg.so.6.0.1) |
. if exists(${LOCALBASE}/lib/libecpg.so.6.5) |
|
_PGSQL_VERSION_93_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.4) |
|
_PGSQL_VERSION_92_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.3) |
|
_PGSQL_VERSION_91_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.2) |
|
_PGSQL_VERSION_90_INSTALLED= yes |
|
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.1) |
_PGSQL_VERSION_84_INSTALLED= yes |
_PGSQL_VERSION_84_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.so.6.0.0) |
|
_PGSQL_VERSION_83_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.so.5.0.2) |
|
_PGSQL_VERSION_82_INSTALLED= yes |
|
.endif |
|
.endif |
.endif |
|
|
# if a version is explicitely required, take it |
# if a version is explicitely required, take it |
Line 96 _PGSQL_VERSION= ${PGSQL_VERSION_DEFAULT} |
|
Line 107 _PGSQL_VERSION= ${PGSQL_VERSION_DEFAULT} |
|
_PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTACCEPTED} |
_PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTACCEPTED} |
.endif |
.endif |
|
|
# |
|
# set variables for the version we decided to use: |
# set variables for the version we decided to use: |
# |
.if ${_PGSQL_VERSION} == "93" |
.if ${_PGSQL_VERSION} == "84" |
PGSQL_TYPE= postgresql93-client |
|
PGPKGSRCDIR= ../../databases/postgresql93-client |
|
.elif ${_PGSQL_VERSION} == "92" |
|
PGSQL_TYPE= postgresql92-client |
|
PGPKGSRCDIR= ../../databases/postgresql92-client |
|
.elif ${_PGSQL_VERSION} == "91" |
|
PGSQL_TYPE= postgresql91-client |
|
PGPKGSRCDIR= ../../databases/postgresql91-client |
|
.elif ${_PGSQL_VERSION} == "90" |
|
PGSQL_TYPE= postgresql90-client |
|
PGPKGSRCDIR= ../../databases/postgresql90-client |
|
.elif ${_PGSQL_VERSION} == "84" |
PGSQL_TYPE= postgresql84-client |
PGSQL_TYPE= postgresql84-client |
PGPKGSRCDIR= ../../databases/postgresql84-client |
PGPKGSRCDIR= ../../databases/postgresql84-client |
.elif ${_PGSQL_VERSION} == "83" |
|
PGSQL_TYPE= postgresql83-client |
|
PGPKGSRCDIR= ../../databases/postgresql83-client |
|
.elif ${_PGSQL_VERSION} == "82" |
|
PGSQL_TYPE= postgresql82-client |
|
PGPKGSRCDIR= ../../databases/postgresql82-client |
|
.else |
.else |
# force an error |
# force an error |
PGSQL_TYPE= none |
PGSQL_TYPE= none |