pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/postgresql-postgis2 postresql-postgis2: Subs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb9e7d2262d5
branches:  trunk
changeset: 308734:fb9e7d2262d5
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Wed May 30 17:03:56 2018 +0000

description:
postresql-postgis2: Substitute major version in PLIST

Add a variable MAJOR, currently 2.4, and instead of open-coding 2.4 in
PLIST, use ${MAJOR}, and teach print-PLIST how to invert that in only
the right places.

No functional change; this just reduces work on updating.

diffstat:

 databases/postgresql-postgis2/Makefile |   9 +++-
 databases/postgresql-postgis2/PLIST    |  60 +++++++++++++++++-----------------
 2 files changed, 37 insertions(+), 32 deletions(-)

diffs (97 lines):

diff -r be28807cedb3 -r fb9e7d2262d5 databases/postgresql-postgis2/Makefile
--- a/databases/postgresql-postgis2/Makefile    Wed May 30 16:26:31 2018 +0000
+++ b/databases/postgresql-postgis2/Makefile    Wed May 30 17:03:56 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2018/05/30 12:03:46 gdt Exp $
+# $NetBSD: Makefile,v 1.45 2018/05/30 17:03:56 gdt Exp $
 
-DISTNAME=      postgis-2.4.4
+MAJOR=         2.4
+DISTNAME=      postgis-${MAJOR}.4
 PKGNAME=       postgresql${PGSQL_VERSION}-${DISTNAME}
 CATEGORIES=    databases geography
 MASTER_SITES=  https://download.osgeo.org/postgis/source/
@@ -48,6 +49,10 @@
 
 DOCDIR=                        ${PREFIX}/share/doc/postgis
 
+PLIST_SUBST+=          MAJOR=${MAJOR}
+PRINT_PLIST_AWK+=      { gsub(/postgis-${MAJOR:S|/|\\/|g}/, "postgis-$${MAJOR}") }
+PRINT_PLIST_AWK+=      { gsub(/topology-${MAJOR:S|/|\\/|g}/, "topology-$${MAJOR}") }
+
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     extras/template_gis/profile \
                        extras/template_gis/createdb.postgis.1 \
diff -r be28807cedb3 -r fb9e7d2262d5 databases/postgresql-postgis2/PLIST
--- a/databases/postgresql-postgis2/PLIST       Wed May 30 16:26:31 2018 +0000
+++ b/databases/postgresql-postgis2/PLIST       Wed May 30 17:03:56 2018 +0000
@@ -1,39 +1,39 @@
-@comment $NetBSD: PLIST,v 1.13 2018/05/30 12:03:46 gdt Exp $
+@comment $NetBSD: PLIST,v 1.14 2018/05/30 17:03:56 gdt Exp $
 bin/pgsql2shp
 bin/raster2pgsql
 bin/shp2pgsql
 include/liblwgeom.h
 include/liblwgeom_topo.h
 lib/liblwgeom.la
-lib/postgresql/postgis-2.4.so
-lib/postgresql/postgis_topology-2.4.so
-lib/postgresql/rtpostgis-2.4.so
-share/postgresql/contrib/postgis-2.4/legacy.sql
-share/postgresql/contrib/postgis-2.4/legacy_gist.sql
-share/postgresql/contrib/postgis-2.4/legacy_minimal.sql
-share/postgresql/contrib/postgis-2.4/postgis.sql
-share/postgresql/contrib/postgis-2.4/postgis_comments.sql
-share/postgresql/contrib/postgis-2.4/postgis_for_extension.sql
-share/postgresql/contrib/postgis-2.4/postgis_proc_set_search_path.sql
-share/postgresql/contrib/postgis-2.4/postgis_restore.pl
-share/postgresql/contrib/postgis-2.4/postgis_upgrade.sql
-share/postgresql/contrib/postgis-2.4/postgis_upgrade_for_extension.sql
-share/postgresql/contrib/postgis-2.4/raster_comments.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis_for_extension.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis_legacy.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis_proc_set_search_path.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis_upgrade.sql
-share/postgresql/contrib/postgis-2.4/rtpostgis_upgrade_for_extension.sql
-share/postgresql/contrib/postgis-2.4/sfcgal_comments.sql
-share/postgresql/contrib/postgis-2.4/spatial_ref_sys.sql
-share/postgresql/contrib/postgis-2.4/topology.sql
-share/postgresql/contrib/postgis-2.4/topology_comments.sql
-share/postgresql/contrib/postgis-2.4/topology_upgrade.sql
-share/postgresql/contrib/postgis-2.4/uninstall_legacy.sql
-share/postgresql/contrib/postgis-2.4/uninstall_postgis.sql
-share/postgresql/contrib/postgis-2.4/uninstall_rtpostgis.sql
-share/postgresql/contrib/postgis-2.4/uninstall_topology.sql
+lib/postgresql/postgis-${MAJOR}.so
+lib/postgresql/postgis_topology-${MAJOR}.so
+lib/postgresql/rtpostgis-${MAJOR}.so
+share/postgresql/contrib/postgis-${MAJOR}/legacy.sql
+share/postgresql/contrib/postgis-${MAJOR}/legacy_gist.sql
+share/postgresql/contrib/postgis-${MAJOR}/legacy_minimal.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis_comments.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis_for_extension.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis_proc_set_search_path.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis_restore.pl
+share/postgresql/contrib/postgis-${MAJOR}/postgis_upgrade.sql
+share/postgresql/contrib/postgis-${MAJOR}/postgis_upgrade_for_extension.sql
+share/postgresql/contrib/postgis-${MAJOR}/raster_comments.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_for_extension.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_legacy.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_proc_set_search_path.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_upgrade.sql
+share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_upgrade_for_extension.sql
+share/postgresql/contrib/postgis-${MAJOR}/sfcgal_comments.sql
+share/postgresql/contrib/postgis-${MAJOR}/spatial_ref_sys.sql
+share/postgresql/contrib/postgis-${MAJOR}/topology.sql
+share/postgresql/contrib/postgis-${MAJOR}/topology_comments.sql
+share/postgresql/contrib/postgis-${MAJOR}/topology_upgrade.sql
+share/postgresql/contrib/postgis-${MAJOR}/uninstall_legacy.sql
+share/postgresql/contrib/postgis-${MAJOR}/uninstall_postgis.sql
+share/postgresql/contrib/postgis-${MAJOR}/uninstall_rtpostgis.sql
+share/postgresql/contrib/postgis-${MAJOR}/uninstall_topology.sql
 share/postgresql/extension/postgis--2.0.0--${PKGVERSION}.sql
 share/postgresql/extension/postgis--2.0.1--${PKGVERSION}.sql
 share/postgresql/extension/postgis--2.0.2--${PKGVERSION}.sql



Home | Main Index | Thread Index | Old Index