version 1.16, 2006/06/06 19:43:43 |
version 1.46, 2017/10/23 20:34:27 |
|
|
# $NetBSD$ |
# $NetBSD$ |
|
# |
|
# User-settable variables: |
|
# |
|
# PGSQL_VERSION_DEFAULT |
|
# |
|
# Package-settable variables: |
|
# |
|
# PGSQL_VERSIONS_ACCEPTED |
|
# |
|
# Variables set by this file: |
|
# |
|
# PG_LIB_EXT |
|
# PGSQL_TYPE |
|
# PGPKGSRCDIR |
|
|
.if !defined(PGVERSION_MK) |
.if !defined(PGVERSION_MK) |
PGVERSION_MK= defined |
PGVERSION_MK= defined |
|
|
|
_VARGROUPS+= pgsql |
|
_USER_VARS.pgsql= PGSQL_VERSION_DEFAULT |
|
_PKG_VARS.pgsql= PGSQL_VERSIONS_ACCEPTED |
|
_SYS_VARS.pgsql= PG_LIB_EXT PGSQL_TYPE PGPKGSRCDIR |
|
|
.include "../../mk/bsd.prefs.mk" |
.include "../../mk/bsd.prefs.mk" |
|
|
PGSQL_VERSION_DEFAULT?= 80 |
PGSQL_VERSION_DEFAULT?= 95 |
PGSQL_VERSIONS_ACCEPTED?= 81 80 74 |
PGSQL_VERSIONS_ACCEPTED?= 10 96 95 94 93 92 |
|
|
# transform the list into individual variables |
# transform the list into individual variables |
.for pv in ${PGSQL_VERSIONS_ACCEPTED} |
.for pv in ${PGSQL_VERSIONS_ACCEPTED} |
_PGSQL_VERSION_${pv}_OK= yes |
_PGSQL_VERSION_${pv}_OK= yes |
.endfor |
.endfor |
|
|
.if ${_OPSYS_SHLIB_TYPE} == "dylib" |
.if ${SHLIB_TYPE} == "dylib" |
PG_LIB_EXT=dylib |
PG_LIB_EXT=dylib |
.else |
.else |
PG_LIB_EXT=so |
PG_LIB_EXT=so |
|
|
|
|
# check what is installed |
# check what is installed |
.if ${OPSYS} == "Darwin" |
.if ${OPSYS} == "Darwin" |
.if exists(${LOCALBASE}/lib/libecpg.5.0.dylib) |
. if exists(${LOCALBASE}/lib/libecpg.6.10.dylib) |
_PGSQL_VERSION_80_INSTALLED= yes |
_PGSQL_VERSION_10_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.4.1.dylib) |
. if exists(${LOCALBASE}/lib/libecpg.6.8.dylib) |
_PGSQL_VERSION_74_INSTALLED= yes |
_PGSQL_VERSION_96_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.3.dylib) |
. if exists(${LOCALBASE}/lib/libecpg.6.7.dylib) |
_PGSQL_VERSION_73_INSTALLED=yes |
_PGSQL_VERSION_95_INSTALLED= yes |
.endif |
. endif |
|
. if exists(${LOCALBASE}/lib/libecpg.6.6.dylib) |
|
_PGSQL_VERSION_94_INSTALLED= yes |
|
. endif |
|
. 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 |
.else |
.else |
.if exists(${LOCALBASE}/lib/libecpg.so.5.0.1) |
. if exists(${LOCALBASE}/lib/libecpg.so.6.10) |
_PGSQL_VERSION_81_INSTALLED= yes |
_PGSQL_VERSION_10_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.so.5.0.0) |
. if exists(${LOCALBASE}/lib/libecpg.so.6.8) |
_PGSQL_VERSION_80_INSTALLED= yes |
_PGSQL_VERSION_96_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.so.4.1) |
. if exists(${LOCALBASE}/lib/libecpg.so.6.7) |
_PGSQL_VERSION_74_INSTALLED= yes |
_PGSQL_VERSION_95_INSTALLED= yes |
.endif |
. endif |
.if exists(${LOCALBASE}/lib/libecpg.so.3) |
. if exists(${LOCALBASE}/lib/libecpg.so.6.6) |
_PGSQL_VERSION_73_INSTALLED=yes |
_PGSQL_VERSION_94_INSTALLED= yes |
.endif |
. endif |
|
. 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 |
.endif |
.endif |
|
|
# if a version is explicitely required, take it |
# if a version is explicitely required, take it |
Line 79 _PGSQL_VERSION= ${PGSQL_VERSION_DEFAULT} |
|
Line 113 _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} == "10" |
.if ${_PGSQL_VERSION} == "81" |
PGSQL_TYPE= postgresql10-client |
PGSQL_TYPE= postgresql81-client |
PGPKGSRCDIR= ../../databases/postgresql10-client |
PGPKGSRCDIR= ../../databases/postgresql81-client |
.elif ${_PGSQL_VERSION} == "96" |
.elif ${_PGSQL_VERSION} == "80" |
PGSQL_TYPE= postgresql96-client |
PGSQL_TYPE= postgresql80-client |
PGPKGSRCDIR= ../../databases/postgresql96-client |
PGPKGSRCDIR= ../../databases/postgresql80-client |
.elif ${_PGSQL_VERSION} == "95" |
.elif ${_PGSQL_VERSION} == "74" |
PGSQL_TYPE= postgresql95-client |
PGSQL_TYPE= postgresql74-lib |
PGPKGSRCDIR= ../../databases/postgresql95-client |
PGPKGSRCDIR= ../../databases/postgresql74-lib |
.elif ${_PGSQL_VERSION} == "94" |
|
PGSQL_TYPE= postgresql94-client |
|
PGPKGSRCDIR= ../../databases/postgresql94-client |
|
.elif ${_PGSQL_VERSION} == "93" |
|
PGSQL_TYPE= postgresql93-client |
|
PGPKGSRCDIR= ../../databases/postgresql93-client |
|
.elif ${_PGSQL_VERSION} == "92" |
|
PGSQL_TYPE= postgresql92-client |
|
PGPKGSRCDIR= ../../databases/postgresql92-client |
.else |
.else |
# force an error |
# force an error |
PGSQL_TYPE= none |
PGSQL_TYPE= none |
PKG_SKIP_REASON+= "${_PGSQL_VERSION} is not a valid package" |
PKG_FAIL_REASON+= "${_PGSQL_VERSION} is not a valid package" |
.endif |
.endif |
|
|
.include "${PGPKGSRCDIR}/buildlink3.mk" |
.include "${PGPKGSRCDIR}/buildlink3.mk" |