Set PGSQL_TYPE to the PKGBASE of the PostgreSQL library package that's

ultimately selected.  PGSQL_TYPE may be used to reference various
BUILDLINK_*.${PGSQL_TYPE} variables.
This commit is contained in:
jlam 2005-03-17 21:44:58 +00:00
parent 6dd2b9ed4a
commit da54b6a39a

View file

@ -1,4 +1,4 @@
# $NetBSD: pgsql.buildlink3.mk,v 1.6 2005/02/07 04:12:49 dan Exp $
# $NetBSD: pgsql.buildlink3.mk,v 1.7 2005/03/17 21:44:58 jlam Exp $
.if !defined(PGVERSION_MK)
PGVERSION_MK= defined
@ -62,19 +62,23 @@ _PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTACCEPTED}
# set variables for the version we decided to use:
#
.if ${_PGSQL_VERSION} == "80"
PGSQL_TYPE= postgresql80-lib
PGPKGSRCDIR= ../../databases/postgresql80-lib
.elif ${_PGSQL_VERSION} == "74"
PGSQL_TYPE= postgresql74-lib
PGPKGSRCDIR= ../../databases/postgresql74-lib
.elif ${_PGSQL_VERSION} == "73"
PGSQL_TYPE= postgresql73-lib
PGPKGSRCDIR= ../../databases/postgresql73-lib
.else
# force an error
PGSQL_TYPE= none
PKG_SKIP_REASON+= "${_PGSQL_VERSION} is not a valid package"
.endif
.if (defined(USE_BUILDLINK3) && empty(USE_BUILDLINK3:M[nN][oO]))
. include "${PGPKGSRCDIR}/buildlink3.mk"
PGSQL_PREFIX= ${BUILDLINK_PREFIX.postgresql${_PGSQL_VERSION}-lib}
. include "${PGPKGSRCDIR}/buildlink3.mk"
PGSQL_PREFIX= ${BUILDLINK_PREFIX.${PGSQL_TYPE}}
.endif
.endif # PGVERSION_MK