aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Maxim Kochetkov <fido_max@inbox.ru>2020-10-05 13:19:50 +0300
committerGravatar Peter Korsgaard <peter@korsgaard.com>2020-10-11 17:52:21 +0200
commitd7327e65aeaf9861531bf8fbedafac94569ff5b1 (patch)
treead8019a70c56590fae309889a5d70bafdf0271b0
parent9d93f9cc3ec72a2add887c712d4b91b1ef1bd545 (diff)
downloadbuildroot-d7327e65aeaf9861531bf8fbedafac94569ff5b1.tar.gz
buildroot-d7327e65aeaf9861531bf8fbedafac94569ff5b1.tar.bz2
package/postgresql: add configure and includedir-server output to pg_config
Some external packages call pg_config to determine the installed PostgreSQL server includedir and configure options. Add this output to Buildroots own pg_config, so these packages correctly compile. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 787ad0b35d0d5d38b5e3da473fb861f903ba65bd) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/postgresql/pg_config8
-rw-r--r--package/postgresql/postgresql.mk1
2 files changed, 8 insertions, 1 deletions
diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config
index 642252f27f..59a9e6cfad 100644
--- a/package/postgresql/pg_config
+++ b/package/postgresql/pg_config
@@ -11,12 +11,18 @@ case "$1" in
--includedir)
echo "$prefix/include"
;;
+ --includedir-server)
+ echo "$prefix/include/postgresql/server"
+ ;;
--libdir)
echo "$prefix/lib"
;;
--version)
echo "PostgreSQL @POSTGRESQL_VERSION@"
;;
+ --configure)
+ echo "@POSTGRESQL_CONF_OPTIONS@"
+ ;;
*)
- echo "Usage: $0 {--includedir|--libdir|--version}"
+ echo "Usage: $0 {--includedir|--includedir-server|--libdir|--version|--configure}"
esac
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 18c7b2ade4..3630b5a385 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -115,6 +115,7 @@ POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
$(INSTALL) -m 0755 -D package/postgresql/pg_config \
$(STAGING_DIR)/usr/bin/pg_config
+ $(SED) "s|@POSTGRESQL_CONF_OPTIONS@|$(POSTGRESQL_CONF_OPTS)|g" $(STAGING_DIR)/usr/bin/pg_config
$(SED) "s|@POSTGRESQL_VERSION@|$(POSTGRESQL_VERSION)|g" $(STAGING_DIR)/usr/bin/pg_config
endef