[92462] trunk/dports/databases
vince at macports.org
vince at macports.org
Sun Apr 29 00:57:01 PDT 2012
Revision: 92462
https://trac.macports.org/changeset/92462
Author: vince at macports.org
Date: 2012-04-29 00:56:57 -0700 (Sun, 29 Apr 2012)
Log Message:
-----------
Initial commit
Added Paths:
-----------
trunk/dports/databases/postgis2/
trunk/dports/databases/postgis2/Portfile
trunk/dports/databases/postgis2/files/
trunk/dports/databases/postgis2/files/ed_commnd
Added: trunk/dports/databases/postgis2/Portfile
===================================================================
--- trunk/dports/databases/postgis2/Portfile (rev 0)
+++ trunk/dports/databases/postgis2/Portfile 2012-04-29 07:56:57 UTC (rev 92462)
@@ -0,0 +1,157 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 64746 2010-03-15 13:15:37Z nox at macports.org $
+
+PortSystem 1.0
+PortGroup archcheck 1.0
+
+name postgis2
+categories databases gis
+license GPL
+revision 9656
+version 2.0.1-svn
+platforms darwin
+maintainers vince openmaintainer
+
+description PostGIS is the spatial extension to the\
+ PostGreSQL database.
+
+long_description PostGIS 2 adds geometrical, geographical and topological\
+ types, and functions operating thereon, to the PostGreSQL\
+ database. The 2.0 release also provides raster handling\
+ and basic 3D geometry capacities (TIN and polyhedra).
+
+homepage http://postgis.refractions.net/
+
+master_sites http://www.postgis.org/download
+
+fetch.type svn
+svn.revision ${revision}
+svn.url http://svn.osgeo.org/postgis/trunk
+
+depends_lib port:geos\
+ port:proj\
+ port:libiconv\
+ port:libxml2
+
+archcheck.files lib/libgeos_c.dylib\
+ lib/libiconv.dylib\
+ lib/libproj.dylib\
+ lib/libxml2.dylib
+
+worksrcdir trunk
+
+# PostGIS 2.0 is not compatible with PostGIS 1.5
+
+conflicts postgis
+
+# Neither is PostGIS 2.0 compatible with PostGreSQL 8
+
+variant postgresql90 description {Builds with postgresql 9.0} \
+ conflicts postgresql91 {
+ depends_lib-append port:postgresql90
+ archcheck.files-append lib/postgresql90/libpq.dylib
+ configure.args-append --libdir=${prefix}/lib/postgresql90\
+ --with-pgconfig=${prefix}/lib/postgresql90/bin/pg_config
+ build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql90\
+ PGSQL_MANDIR=${destroot}${prefix}/share/man
+}
+
+variant postgresql91 description {Builds with postgresql 9.1} \
+ conflicts postgresql90 {
+ depends_lib-append port:postgresql91
+ archcheck.files-append lib/postgresql91/libpq.dylib
+ configure.args-append --libdir=${prefix}/lib/postgresql91\
+ --with-pgconfig=${prefix}/lib/postgresql91/bin/pg_config
+ build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql91\
+ PGSQL_MANDIR=${destroot}${prefix}/share/man
+}
+
+variant raster description {Build raster support} {
+
+ depends_lib-append port:gdal
+ configure.args-append --with-raster
+}
+
+variant topology description {Build topology support} {
+
+ configure.args-append --with-topology
+}
+
+variant gui description {Build the GUI import tool} {
+
+ depends_lib-append port:gtk2
+ configure.args-append --with-gui
+}
+
+variant comments description {Build comments -- ! broken } {
+
+ ui_warn "Variant comments is currently broken. Use at your own risks."
+
+ depends_build port:docbook-xsl \
+ port:libxslt \
+ port:ImageMagick
+
+ configure.args --datadir=${prefix}/share/${name} \
+ --with-projdir=${prefix} \
+ --with-xsldir=${prefix}/share/xsl/docbook-xsl
+
+ build.target-append comments
+ destroot.target-append docs-install comments-install
+}
+
+default_variants +raster +topology
+
+if {![variant_isset postgresql90] && ![variant_isset postgresql91]} {
+ default_variants +postgresql91
+}
+
+# Port phases
+
+pre-fetch {
+ if {[join [split [exec ${prefix}/bin/geos-config --version] "."] ""] < 332\
+ && [variant_isset topology]} {
+
+ return -code error "Topology module requires at least geos 3.3.2.\
+ Please upgrade."
+ }
+
+ if {[variant_isset postgresql90]} {
+ set PGVERSION postgresql90
+ } elseif {[variant_isset postgresql91]} {
+ set PGVERSION postgresql91
+ }
+
+ # Can’t install a non-universal PostGIS on a universal PostGreSQL
+ if {![catch {exec ${prefix}/bin/port installed $PGVERSION\
+ |& grep universal}] && ![variant_isset universal]} {
+
+ return -code error "Since $PGVERSION has been built universal,\
+ PostGIS must also be built universal."
+ }
+}
+
+pre-configure {
+ system "cd ${worksrcpath} && ./autogen.sh"
+}
+
+configure.cflags-append \
+ -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close \
+ -I${prefix}/include
+
+post-configure {
+ if {[variant_isset universal]} {
+ # We must add universal flags to compile liblwgeom properly
+ file copy ${filespath}/ed_command ${worksrcpath}/ed_command
+ reinplace -E "s#XXX#${configure.universal_cflags}#" \
+ ${worksrcpath}/ed_command
+ system "cd ${worksrcpath}/liblwgeom && \
+ ed Makefile < ${worksrcpath}/ed_command"
+ }
+}
+
+build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv'
+
+
+livecheck.type regex
+livecheck.url ${master_sites}
+livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)\\.tar
\ No newline at end of file
Added: trunk/dports/databases/postgis2/files/ed_commnd
===================================================================
--- trunk/dports/databases/postgis2/files/ed_commnd (rev 0)
+++ trunk/dports/databases/postgis2/files/ed_commnd 2012-04-29 07:56:57 UTC (rev 92462)
@@ -0,0 +1,4 @@
+g/LDFLAGS =/a\
+LDFLAGS += XXX
+.
+,wq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120429/3b865601/attachment.html>
More information about the macports-changes
mailing list