Just like ruby before the recently committed change, it is not possible
to install PostgreSQL extensions without a ports checkout since the
change to run fake as a regular user. This unbreaks the situation,
using a similar approach as for ruby. Default to /usr/bin/install for
the install program, and if the BSD_INSTALL_SCRIPT environment variable
is set, use that (minus the -m 755).
Tested with databases/postgresql-pllua, both inside the ports system
and outside it.
As with ruby, FAKE_AS_ROOT = always-wrap is no longer necessary after
this change. With this patch, devel/ptlib would be the sole user of
FAKE_AS_ROOT = always-wrap.
OKs?
Thanks,
Jeremy
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/postgresql/Makefile,v
retrieving revision 1.193
diff -u -p -r1.193 Makefile
--- Makefile 23 Sep 2014 08:41:10 -0000 1.193
+++ Makefile 15 Oct 2014 02:12:16 -0000
@@ -10,15 +10,13 @@ COMMENT-plpython=Python procedural langu
# in case a dump before / restore after pkg_add -u is required!
VERSION= 9.3.5
-REVISION-server= 0
+REVISION-server= 1
DISTNAME= postgresql-${VERSION}
PKGNAME-main= postgresql-client-${VERSION}
PKGNAME-server= postgresql-server-${VERSION}
PKGNAME-docs= postgresql-docs-${VERSION}
PKGNAME-contrib=postgresql-contrib-${VERSION}
PKGNAME-plpython=postgresql-plpython-${VERSION}
-FAKE_AS_ROOT= always-wrap
-
CATEGORIES= databases
SHARED_LIBS= ecpg 7.5 \
@@ -146,8 +144,14 @@ DOCS= ${WRKSRC}/COPYRIGHT ${WRKSRC}/HIST
pre-build:
touch ${WRKSRC}/doc/src/sgml/*-stamp
+INSTALL_REPLACE = 's/^install_bin = .*$$/ifdef BSD_INSTALL_SCRIPT\ninstall_bin
+INSTALL_REPLACE += = \$$\(subst -m 755,,\$${BSD_INSTALL_SCRIPT}\)
+INSTALL_REPLACE += \nelse\ninstall_bin = \/usr\/bin\/install -c -o ${BINOWN}
+INSTALL_REPLACE += -g ${BINGRP}\nendif/'
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postgresql
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/postgresql
+ perl -i -pe ${INSTALL_REPLACE} \
+ ${PREFIX}/lib/postgresql/pgxs/src/Makefile.global
.include <bsd.port.mk>