]> TLD Linux GIT Repositories - packages/postgresql.git/blobdiff - per-version-dirs.patch
- versioned package, 9.3.24
[packages/postgresql.git] / per-version-dirs.patch
diff --git a/per-version-dirs.patch b/per-version-dirs.patch
new file mode 100644 (file)
index 0000000..3bfd471
--- /dev/null
@@ -0,0 +1,56 @@
+diff -urpa postgresql-9.3.24.orig/src/bin/pg_config/pg_config.c postgresql-9.3.24/src/bin/pg_config/pg_config.c
+--- postgresql-9.3.24.orig/src/bin/pg_config/pg_config.c       2018-08-23 19:56:17.187401335 +0000
++++ postgresql-9.3.24/src/bin/pg_config/pg_config.c    2018-08-23 19:56:33.221401154 +0000
+@@ -26,6 +26,8 @@
+ #include "port.h"
++#include "../port/pg_config_paths.h"
++
+ static const char *progname;
+ static char mypath[MAXPGPATH];
+@@ -481,7 +483,6 @@ main(int argc, char **argv)
+ {
+       int                     i;
+       int                     j;
+-      int                     ret;
+       set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_config"));
+@@ -497,13 +498,7 @@ main(int argc, char **argv)
+               }
+       }
+-      ret = find_my_exec(argv[0], mypath);
+-
+-      if (ret)
+-      {
+-              fprintf(stderr, _("%s: could not find own program executable\n"), progname);
+-              exit(1);
+-      }
++      snprintf(mypath, sizeof(mypath), "%s/%s", PGBINDIR, progname);
+       /* no arguments -> print everything */
+       if (argc < 2)
+diff -urpa postgresql-9.3.24.orig/src/Makefile.global.in postgresql-9.3.24/src/Makefile.global.in
+--- postgresql-9.3.24.orig/src/Makefile.global.in      2018-08-23 19:56:17.183401335 +0000
++++ postgresql-9.3.24/src/Makefile.global.in   2018-08-23 19:56:33.221401154 +0000
+@@ -100,7 +100,7 @@ libdir := @libdir@
+ pkglibdir = $(libdir)
+ ifeq "$(findstring pgsql, $(pkglibdir))" ""
+ ifeq "$(findstring postgres, $(pkglibdir))" ""
+-override pkglibdir := $(pkglibdir)/postgresql
++override pkglibdir := $(pkglibdir)/postgresql/@PG_MAJORVERSION@/lib
+ endif
+ endif
+@@ -148,7 +148,7 @@ endif # PGXS
+ # These derived path variables aren't separately configurable.
+-includedir_server = $(pkgincludedir)/server
++includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server
+ includedir_internal = $(pkgincludedir)/internal
+ pgxsdir = $(pkglibdir)/pgxs