version 1.3.2.1, 2005/02/11 15:27:57 |
version 1.26, 2009/07/29 06:33:03 |
|
|
# $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?= 74 |
PGSQL_VERSION_DEFAULT?= 82 |
PGSQL_VERSIONS_ACCEPTED?= 80 74 73 |
PGSQL_VERSIONS_ACCEPTED?= 84 83 82 81 |
|
|
# 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" |
|
PG_LIB_EXT=dylib |
|
.else |
|
PG_LIB_EXT=so |
|
.endif |
|
|
# check what is installed |
# check what is installed |
.if exists(${LOCALBASE}/lib/libecpg.so.4.2) |
.if ${OPSYS} == "Darwin" |
|
.if exists(${LOCALBASE}/lib/libecpg.6.0.1.dylib) |
|
_PGSQL_VERSION_84_INSTALLED= yes |
|
.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 |
|
.if exists(${LOCALBASE}/lib/libecpg.5.0.1.dylib) |
|
_PGSQL_VERSION_81_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.5.0.dylib) |
|
_PGSQL_VERSION_80_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.4.1.dylib) |
|
_PGSQL_VERSION_74_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.3.dylib) |
|
_PGSQL_VERSION_73_INSTALLED=yes |
|
.endif |
|
.else |
|
.if exists(${LOCALBASE}/lib/libecpg.so.6.0.1) |
|
_PGSQL_VERSION_84_INSTALLED= yes |
|
.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 |
|
.if exists(${LOCALBASE}/lib/libecpg.so.5.0.1) |
|
_PGSQL_VERSION_81_INSTALLED= yes |
|
.endif |
|
.if exists(${LOCALBASE}/lib/libecpg.so.5.0.0) |
_PGSQL_VERSION_80_INSTALLED= yes |
_PGSQL_VERSION_80_INSTALLED= yes |
.endif |
.endif |
.if exists(${LOCALBASE}/lib/libecpg.so.4.1) |
.if exists(${LOCALBASE}/lib/libecpg.so.4.1) |
Line 23 _PGSQL_VERSION_74_INSTALLED= yes |
|
Line 84 _PGSQL_VERSION_74_INSTALLED= yes |
|
.if exists(${LOCALBASE}/lib/libecpg.so.3) |
.if exists(${LOCALBASE}/lib/libecpg.so.3) |
_PGSQL_VERSION_73_INSTALLED=yes |
_PGSQL_VERSION_73_INSTALLED=yes |
.endif |
.endif |
|
.endif |
|
|
# if a version is explicitely required, take it |
# if a version is explicitely required, take it |
.if defined(PGSQL_VERSION_REQD) |
.if defined(PGSQL_VERSION_REQD) |
Line 61 _PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTAC |
|
Line 123 _PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTAC |
|
# |
# |
# set variables for the version we decided to use: |
# set variables for the version we decided to use: |
# |
# |
.if ${_PGSQL_VERSION} == "80" |
.if ${_PGSQL_VERSION} == "84" |
PGPKGSRCDIR= ../../databases/postgresql80-lib |
PGSQL_TYPE= postgresql84-client |
.elif ${_PGSQL_VERSION} == "74" |
PGPKGSRCDIR= ../../databases/postgresql84-client |
PGPKGSRCDIR= ../../databases/postgresql74-lib |
.elif ${_PGSQL_VERSION} == "83" |
.elif ${_PGSQL_VERSION} == "73" |
PGSQL_TYPE= postgresql83-client |
PGPKGSRCDIR= ../../databases/postgresql73-lib |
PGPKGSRCDIR= ../../databases/postgresql83-client |
|
.elif ${_PGSQL_VERSION} == "82" |
|
PGSQL_TYPE= postgresql82-client |
|
PGPKGSRCDIR= ../../databases/postgresql82-client |
|
.elif ${_PGSQL_VERSION} == "81" |
|
PGSQL_TYPE= postgresql81-client |
|
PGPKGSRCDIR= ../../databases/postgresql81-client |
|
.elif ${_PGSQL_VERSION} == "80" |
|
PGSQL_TYPE= postgresql80-client |
|
PGPKGSRCDIR= ../../databases/postgresql80-client |
.else |
.else |
# force an error |
# force an error |
PKG_SKIP_REASON+= "${_PGSQL_VERSION} is not a valid package" |
PGSQL_TYPE= none |
|
PKG_FAIL_REASON+= "${_PGSQL_VERSION} is not a valid package" |
.endif |
.endif |
|
|
.if (defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO])) |
.include "${PGPKGSRCDIR}/buildlink3.mk" |
. include "${PGPKGSRCDIR}/buildlink3.mk" |
PGSQL_PREFIX= ${BUILDLINK_PREFIX.${PGSQL_TYPE}} |
PGSQL_PREFIX= ${BUILDLINK_PREFIX.postgresql${_PGSQL_VERSION}-lib} |
|
.endif |
PGSQL_VERSION= ${_PGSQL_VERSION} |
|
|
.endif # PGVERSION_MK |
.endif # PGVERSION_MK |