[BACK]Return to pgsql.buildlink3.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk

Annotation of pkgsrc/mk/pgsql.buildlink3.mk, Revision 1.14

1.14    ! abs         1: # $NetBSD: pgsql.buildlink3.mk,v 1.13 2005/11/11 15:47:52 joerg Exp $
1.1       recht       2:
                      3: .if !defined(PGVERSION_MK)
                      4: PGVERSION_MK=  defined
                      5:
                      6: .include "../../mk/bsd.prefs.mk"
                      7:
1.13      joerg       8: PGSQL_VERSION_DEFAULT?=                80
1.14    ! abs         9: PGSQL_VERSIONS_ACCEPTED?=      81 80 74 73
1.1       recht      10:
                     11: # transform the list into individual variables
                     12: .for pv in ${PGSQL_VERSIONS_ACCEPTED}
                     13: _PGSQL_VERSION_${pv}_OK=       yes
                     14: .endfor
                     15:
1.9       recht      16: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
                     17: PG_LIB_EXT=dylib
                     18: .else
                     19: PG_LIB_EXT=so
                     20: .endif
                     21:
1.1       recht      22: # check what is installed
1.9       recht      23: .if ${OPSYS} == "Darwin"
                     24: .if exists(${LOCALBASE}/lib/libecpg.5.0.dylib)
                     25: _PGSQL_VERSION_80_INSTALLED=   yes
                     26: .endif
                     27: .if exists(${LOCALBASE}/lib/libecpg.4.1.dylib)
                     28: _PGSQL_VERSION_74_INSTALLED=   yes
                     29: .endif
                     30: .if exists(${LOCALBASE}/lib/libecpg.3.dylib)
                     31: _PGSQL_VERSION_73_INSTALLED=yes
                     32: .endif
                     33: .else
1.14    ! abs        34: .if exists(${LOCALBASE}/lib/libecpg.so.5.0.1)
        !            35: _PGSQL_VERSION_81_INSTALLED=   yes
        !            36: .endif
1.12      abs        37: .if exists(${LOCALBASE}/lib/libecpg.so.5.0.0)
1.4       abs        38: _PGSQL_VERSION_80_INSTALLED=   yes
                     39: .endif
1.5       dan        40: .if exists(${LOCALBASE}/lib/libecpg.so.4.1)
1.1       recht      41: _PGSQL_VERSION_74_INSTALLED=   yes
                     42: .endif
                     43: .if exists(${LOCALBASE}/lib/libecpg.so.3)
                     44: _PGSQL_VERSION_73_INSTALLED=yes
                     45: .endif
1.9       recht      46: .endif
1.1       recht      47:
                     48: # if a version is explicitely required, take it
                     49: .if defined(PGSQL_VERSION_REQD)
                     50: _PGSQL_VERSION=        ${PGSQL_VERSION_REQD}
                     51: .endif
                     52: # if the default is already installed, it is first choice
                     53: .if !defined(_PGSQL_VERSION)
                     54: .if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_OK)
                     55: .if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_INSTALLED)
                     56: _PGSQL_VERSION=        ${PGSQL_VERSION_DEFAULT}
                     57: .endif
                     58: .endif
                     59: .endif
                     60: # prefer an already installed version, in order of "accepted"
                     61: .if !defined(_PGSQL_VERSION)
                     62: .for pv in ${PGSQL_VERSIONS_ACCEPTED}
                     63: .if defined(_PGSQL_VERSION_${pv}_INSTALLED)
                     64: _PGSQL_VERSION?=       ${pv}
                     65: .else
                     66: # keep information as last resort - see below
                     67: _PGSQL_VERSION_FIRSTACCEPTED?= ${pv}
                     68: .endif
                     69: .endfor
                     70: .endif
                     71: # if the default is OK for the addon pkg, take this
                     72: .if !defined(_PGSQL_VERSION)
                     73: .if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_OK)
                     74: _PGSQL_VERSION=        ${PGSQL_VERSION_DEFAULT}
                     75: .endif
                     76: .endif
                     77: # take the first one accepted by the package
                     78: .if !defined(_PGSQL_VERSION)
                     79: _PGSQL_VERSION=        ${_PGSQL_VERSION_FIRSTACCEPTED}
                     80: .endif
                     81:
                     82: #
                     83: # set variables for the version we decided to use:
                     84: #
1.14    ! abs        85: .if ${_PGSQL_VERSION} == "81"
        !            86: PGSQL_TYPE=    postgresql81-client
        !            87: PGPKGSRCDIR=   ../../wip/postgresql81-client
        !            88: .elif ${_PGSQL_VERSION} == "80"
1.10      jlam       89: PGSQL_TYPE=    postgresql80-client
1.9       recht      90: PGPKGSRCDIR=   ../../databases/postgresql80-client
1.4       abs        91: .elif ${_PGSQL_VERSION} == "74"
1.7       jlam       92: PGSQL_TYPE=    postgresql74-lib
1.1       recht      93: PGPKGSRCDIR=   ../../databases/postgresql74-lib
                     94: .elif ${_PGSQL_VERSION} == "73"
1.7       jlam       95: PGSQL_TYPE=    postgresql73-lib
1.1       recht      96: PGPKGSRCDIR=   ../../databases/postgresql73-lib
                     97: .else
                     98: # force an error
1.7       jlam       99: PGSQL_TYPE=            none
1.3       xtraeme   100: PKG_SKIP_REASON+=      "${_PGSQL_VERSION} is not a valid package"
1.1       recht     101: .endif
                    102:
1.8       tv        103: .include "${PGPKGSRCDIR}/buildlink3.mk"
1.7       jlam      104: PGSQL_PREFIX=  ${BUILDLINK_PREFIX.${PGSQL_TYPE}}
1.1       recht     105:
1.11      rillig    106: PGSQL_VERSION= ${_PGSQL_VERSION}
                    107:
1.1       recht     108: .endif # PGVERSION_MK

CVSweb <webmaster@jp.NetBSD.org>