summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-08-17 19:43:08 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-08-17 19:43:08 +0000
commitb7e3ccbc280ebe03f4a60f67a997414d66efc1ca (patch)
treebe52050af50c03c9bbbf430bcc17e026a1f1646d
parent06985325fc74c1c26e4c978a6772ebdc5afb576e (diff)
downloadfreebsd-ports-b7e3ccbc280ebe03f4a60f67a997414d66efc1ca.zip
databases/pg_partman: Unbreak build with PostgreSQL 11+
=======================<phase: package >============================ ===> Building package for pg_partman-4.0.0_1 pkg-static: Unable to access file /wrkdirs/usr/ports/databases/pg_partman/work/stage/usr/local/bin/partition_data.py:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/databases/pg_partman/work/stage/usr/local/bin/reapply_constraints.py:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/databases/pg_partman/work/stage/usr/local/bin/reapply_foreign_keys.py:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/databases/pg_partman/work/stage/usr/local/bin/undo_partition.py:No such file or directory *** Error code 1 http://package18.nyi.freebsd.org/data/120amd64-default-PR239514/2019-07-29_20h41m52s/logs/pg_partman-4.0.0_1.log With PostgreSQL 11+ some scripts are only installed when they are common to all PG versions per the Makefile. Exclude them from the plist in case we are building with PG11+. PR: 239609 Approved by: lacey.leanne@gmail.com (maintainer timeout, 2 weeks)
-rw-r--r--databases/pg_partman/Makefile12
-rw-r--r--databases/pg_partman/pkg-plist8
2 files changed, 15 insertions, 5 deletions
diff --git a/databases/pg_partman/Makefile b/databases/pg_partman/Makefile
index ce786b749029..2c0f41df9e5a 100644
--- a/databases/pg_partman/Makefile
+++ b/databases/pg_partman/Makefile
@@ -25,6 +25,16 @@ SHEBANG_GLOB= *.py
OPTIONS_DEFINE= DOCS
+.include <bsd.port.pre.mk>
+
+# With PG11+ some scripts are only installed when they are common to
+# all PG versions.
+.if ${PGSQL_VER:R} < 11
+PLIST_SUB+= OLDPG=""
+.else
+PLIST_SUB+= OLDPG="@comment "
+.endif
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/postgresql/pg_partman_bgw.so
@@ -37,4 +47,4 @@ post-install-DOCS-on:
post-install-DOCS-off:
${RM} -r ${STAGEDIR}${PREFIX}/share/doc/postgresql
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/pg_partman/pkg-plist b/databases/pg_partman/pkg-plist
index 9c369a9ef01b..4efd970ae09b 100644
--- a/databases/pg_partman/pkg-plist
+++ b/databases/pg_partman/pkg-plist
@@ -1,10 +1,10 @@
bin/check_unique_constraint.py
bin/dump_partition.py
-bin/partition_data.py
-bin/reapply_constraints.py
-bin/reapply_foreign_keys.py
+%%OLDPG%%bin/partition_data.py
+%%OLDPG%%bin/reapply_constraints.py
+%%OLDPG%%bin/reapply_foreign_keys.py
bin/reapply_indexes.py
-bin/undo_partition.py
+%%OLDPG%%bin/undo_partition.py
bin/vacuum_maintenance.py
lib/postgresql/pg_partman_bgw.so
%%PORTDOCS%%%%DOCSDIR%%/migration_to_partman.md