FreeBSD Bugzilla – Attachment 187734 Details for
Bug 213038
Uses/postgis.mk: new framework for databases/postgis*
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
postgis.mk
postgis.mk (text/x-makefile), 4.92 KB, created by
Loïc Bartoletti
on 2017-11-04 18:26:22 UTC
(
hide
)
Description:
postgis.mk
Filename:
MIME Type:
Creator:
Loïc Bartoletti
Created:
2017-11-04 18:26:22 UTC
Size:
4.92 KB
patch
obsolete
>Index: Mk/Uses/postgis.mk >=================================================================== >--- Mk/Uses/postgis.mk (nonexistent) >+++ Mk/Uses/postgis.mk (copie de travail) >@@ -0,0 +1,152 @@ >+# $FreeBSD$ >+# >+# Provide support for Postgis >+# >+# Feature: postgis >+# Usage: USES= postgis[:version] >+# >+# Maintainer can set version required. Minimum and maximum >+# versions can be specified; e.g. 2.1-, 2.2+ >+# >+# If no version is given (by the maintainer via the port or >+# by the user via defined variable), try to find the >+# currently installed version. Fall back to default if >+# necessary. >+# >+# MAINTAINER: pgsql@FreeBSD.org >+ >+.if !defined(_INCLUDE_USES_POSTGIS_MK) >+ >+_INCLUDE_USES_POSTGIS_MK= yes >+ >+.include "${USESDIR}/pgsql.mk" >+ >+# Variables set by postgis.mk: >+# >+# POSTGIS_VER >+# Detected Postgis version. Do *not* use this >+# to add dependencies; use WANT_POSTGIS as explained above >+# >+ >+# When adding a version, please keep the comment in >+# Mk/bsd.default-versions.mk in sync. >+VALID_POSTGIS_VER= 2.0 2.1 2.2 2.3 2.4 >+ >+# Versions of PostgreSQL supported by which versions of PostGIS >+# https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS >+VALID_PGSQL_VER_GIS20= 9.1 9.2 >+VALID_PGSQL_VER_GIS21= 9.1 9.2 9.3 9.4 >+VALID_PGSQL_VER_GIS22= 9.1 9.2 9.3 9.4 9.5 >+VALID_PGSQL_VER_GIS23= 9.2 9.3 9.4 9.5 9.6 >+VALID_PGSQL_VER_GIS24= 9.3 9.4 9.5 9.6 10 >+ >+PREFERED_PGSQL_VER_GIS20= 9.2 >+PREFERED_PGSQL_VER_GIS21= ${DEFAULT_PGSQL_VER} >+PREFERED_PGSQL_VER_GIS22= ${DEFAULT_PGSQL_VER} >+PREFERED_PGSQL_VER_GIS23= ${DEFAULT_PGSQL_VER} >+ >+# Override non-default LIBVERS like this: >+#POSTGIS2_LIBVER=2 >+ >+POSTGIS_LIBVER= 2 >+.for v in ${VALID_POSTGIS_VER:S,.,,} >+POSTGIS$v_LIBVER?= ${POSTGIS_LIBVER} >+.endfor >+ >+.include "${USESDIR}/pgsql.mk" >+ >+.for v in ${POSTGIS_DEFAULT} >+. if ! ${VALID_POSTGIS_VER:M$v} >+IGNORE= Invalid POSTGIS default version ${POSTGIS_DEFAULT}; valid versions are ${VALID_POSTGIS_VER} >+. endif >+.endfor >+ >+. for w in WITH DEFAULT >+. ifdef $w_POSTGIS_VER >+WARNING+= "$w_POSTGIS_VER is defined, consider using DEFAULT_VERSIONS=postgis=${$w_POSTGIS_VER} instead" >+POSTGIS_DEFAULT?= ${$w_POSTGIS_VER} >+. endif >+. endfor >+ >+. ifdef DEFAULT_POSTGIS_VER && WITH_POSTGIS_VER >+IGNORE= will not allow setting both DEFAULT_POSTGIS_VER and WITH_POSTGIS_VER. Use DEFAULT_VERSIONS=postgis=2.4 instead >+. endif >+ >+# Handle the + and - version stuff >+. if !empty(postgis_ARGS) >+. if ${postgis_ARGS:M*+} >+. for version in ${VALID_POSTGIS_VER} >+. if ${postgis_ARGS:S/+//} <= ${version} >+_WANT_POSTGIS_VER+=${version} >+. endif >+. endfor >+. elif ${postgis_ARGS:M*-} >+. for version in ${VALID_POSTGIS_VER} >+. if ${postgis_ARGS:S/-//} >= ${version} >+_WANT_POSTGIS_VER+=${version} >+. endif >+. endfor >+. endif >+_WANT_POSTGIS_VER?= ${postgis_ARGS} >+. endif >+ >+# For simplify next iterations >+.if empty(_WANT_POSTGIS_VER) >+_WANT_POSTGIS_VER= ${POSTGIS_DEFAULT} >+.else >+_COMPAT?= ${_WANT_POSTGIS_VER:M${POSTGIS_DEFAULT}} >+. if empty(_COMPAT) >+IGNORE+= "the port wants PostGIS version ${_WANT_POSTGIS_VER} and default version is ${POSTGIS_DEFAULT}" >+. else >+_WANT_POSTGIS_VER= ${POSTGIS_DEFAULT} >+. endif >+.endif >+ >+# Finding a present version of PostGIS >+.for v in ${VALID_POSTGIS_VER} >+_POSTGIS_LIB=${LOCALBASE}/lib/postgresql/postgis-$v.so >+. if exists(${_POSTGIS_LIB}) >+_POSTGIS_VER= $v >+. endif >+.endfor >+ >+.if !empty(_POSTGIS_VER) >+ >+# Verify that wanted or default postgis version(s) is/are compatible with postgis version installed >+_COMPAT?= ${_WANT_POSTGIS_VER:M${_POSTGIS_VER}} >+ >+. if empty(_COMPAT) >+IGNORE+= "the port wants PostGIS version ${_WANT_POSTGIS_VER} and you have version ${_POSTGIS_VER} installed" >+. else >+POSTGIS_VER= ${_POSTGIS_VER} >+. endif >+.else >+.if empty(PGSQL_VER) # PostgreSQL not installed >+. for v in ${_WANT_POSTGIS_VER} >+last_want_ver= $v >+. if ${POSTGIS_DEFAULT} == $v # Nice >+POSTGIS_VER=$v >+. endif >+. endfor >+. if empty(POSTGIS_VER) >+POSTGIS_VER=${last_want_ver} >+USES+= pgsql:${PREFERED_PGSQL_VER_GIS${POSTGIS_VER}} >+. endif >+. else # Check Compatibilty between PostGis and PostgreSQL >+. for pgis_want in ${_WANT_POSTGIS_VER} >+. for psql_v_ver in ${VALID_PGSQL_VER_GIS${pgis_want:S,.,,}} >+. if ${psql_v_ver} == ${PGSQL_VER} >+POSTGIS_VER= ${pgis_want} >+. endif >+. endfor >+. endfor >+. if empty(POSTGIS_VER) >+IGNORE= "Can't find a compatible version for PostGis ${_WANT_POSTGIS_VER} with PostgreSQL ${PGSQL_VER}" >+. endif >+. endif >+.endif >+ >+WARNING+= "WANT ${POSTGIS_VER}" >+ >+RUN_DEPENDS+= ${LOCALBASE}/lib/postgresql/postgis-${POSTGIS_VER}.so:databases/postgis${POSTGIS_VER:S,.,,} >+ >+.endif # !defined(_INCLUDE_USES_POSTGIS_MK) > >Modification de propriétés sur Mk/Uses/postgis.mk >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
lbartoletti
:
maintainer-approval+
Actions:
View
Attachments on
bug 213038
:
175219
|
177091
| 187734 |
187735
|
187736