Skip to content

Commit

Permalink
[libpq] Unconditionally install to subdir (microsoft#33564)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt authored Sep 6, 2023
1 parent 6f8eef2 commit 2b28527
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
1 change: 1 addition & 0 deletions ports/libpq/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
unix/installdirs.patch
unix/fix-configure.patch
unix/single-linkage.patch
unix/no-server-tools.patch
Expand Down
48 changes: 48 additions & 0 deletions ports/libpq/unix/installdirs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 5dacc4d..a9a797e 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -100,14 +100,14 @@ datarootdir := @datarootdir@

bindir := @bindir@

-datadir := @datadir@
+datadir := @datadir@/postgresql
ifeq "$(findstring pgsql, $(datadir))" ""
ifeq "$(findstring postgres, $(datadir))" ""
override datadir := $(datadir)/postgresql
endif
endif

-sysconfdir := @sysconfdir@
+sysconfdir := @sysconfdir@/postgresql
ifeq "$(findstring pgsql, $(sysconfdir))" ""
ifeq "$(findstring postgres, $(sysconfdir))" ""
override sysconfdir := $(sysconfdir)/postgresql
@@ -116,7 +116,7 @@ endif

libdir := @libdir@

-pkglibdir = $(libdir)
+pkglibdir = $(libdir)/postgresql
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
override pkglibdir := $(pkglibdir)/postgresql
@@ -125,7 +125,7 @@ endif

includedir := @includedir@

-pkgincludedir = $(includedir)
+pkgincludedir = $(includedir)/postgresql
ifeq "$(findstring pgsql, $(pkgincludedir))" ""
ifeq "$(findstring postgres, $(pkgincludedir))" ""
override pkgincludedir := $(pkgincludedir)/postgresql
@@ -134,7 +134,7 @@ endif

mandir := @mandir@

-docdir := @docdir@
+docdir := @docdir@/postgresql
ifeq "$(findstring pgsql, $(docdir))" ""
ifeq "$(findstring postgres, $(docdir))" ""
override docdir := $(docdir)/postgresql
2 changes: 1 addition & 1 deletion ports/libpq/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libpq",
"version": "15.3",
"port-version": 1,
"port-version": 2,
"description": "The official database access API of postgresql",
"homepage": "https://www.postgresql.org/",
"license": "PostgreSQL",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4494,7 +4494,7 @@
},
"libpq": {
"baseline": "15.3",
"port-version": 1
"port-version": 2
},
"libpqxx": {
"baseline": "7.7.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libpq.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "859b43f8db33293c411c365d945ecd4ae2cc056b",
"version": "15.3",
"port-version": 2
},
{
"git-tree": "a62f65ad38aa981b6ff7474e16f739a3ffbc622b",
"version": "15.3",
Expand Down

0 comments on commit 2b28527

Please sign in to comment.