Skip to content

Commit

Permalink
libpq: add v16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Dec 31, 2023
1 parent 329a143 commit 1e2e8df
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes/libpq/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"16.1":
url: "https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2"
sha256: "ce3c4d85d19b0121fe0d3f8ef1fa601f71989e86f8a66f7dc3ad546dd5564fec"
"15.5":
url: "https://ftp.postgresql.org/pub/source/v15.5/postgresql-15.5.tar.bz2"
sha256: "8f53aa95d78eb8e82536ea46b68187793b42bba3b4f65aa342f540b23c9b10a6"
Expand All @@ -24,6 +27,10 @@ sources:
url: "https://ftp.postgresql.org/pub/source/v9.6.24/postgresql-9.6.24.tar.gz"
sha256: "52947ecc119846eace5164399d173576c0d4a47ec116ae58a46a8fd0c576c7c3"
patches:
"16.1":
- patch_file: "patches/16/001-mingw-build-static-libraries.patch"
patch_description: "port MinGW: Enable building static libraries in MinGW."
patch_type: "portability"
"15.5":
- patch_file: "patches/15/001-mingw-build-static-libraries.patch"
patch_description: "port MinGW: Enable building static libraries in MinGW."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
--- src/Makefile.shlib
+++ src/Makefile.shlib
@@ -315,8 +315,10 @@
$(CC) $(CFLAGS) -shared -o $@ -Wl,--out-implib=$(stlib) $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)

# see notes in src/backend/parser/Makefile about use of this type of rule
-$(stlib): $(shlib)
- touch $@
+$(stlib): $(OBJS) | $(SHLIB_PREREQS)
+ rm -f $@
+ $(LINK.static) $@ $^
+ $(RANLIB) $@

else

@@ -336,12 +338,12 @@
# Else we just use --export-all-symbols.
ifeq (,$(SHLIB_EXPORTS))
$(shlib): $(OBJS) | $(SHLIB_PREREQS)
- $(CC) $(CFLAGS) -shared -static-libgcc -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--export-all-symbols -Wl,--out-implib=$(stlib)
+ $(CC) $(CFLAGS) -shared -static-libgcc -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--export-all-symbols -Wl,--out-implib=lib$(NAME).dll.a
else
DLL_DEFFILE = lib$(NAME)dll.def

$(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
- $(CC) $(CFLAGS) -shared -static-libgcc -o $@ $(OBJS) $(DLL_DEFFILE) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--out-implib=$(stlib)
+ $(CC) $(CFLAGS) -shared -static-libgcc -o $@ $(OBJS) $(DLL_DEFFILE) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--out-implib=lib$(NAME).dll.a

UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

@@ -418,6 +420,9 @@
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
endif
+ifneq (,$(findstring $(PORTNAME),win32))
+ $(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/lib$(NAME).dll.a'
+endif
else # no soname
$(INSTALL_SHLIB) $< '$(DESTDIR)$(pkglibdir)/$(shlib)'
endif
2 changes: 2 additions & 0 deletions recipes/libpq/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"16.1":
folder: all
"15.5":
folder: all
"15.4":
Expand Down

0 comments on commit 1e2e8df

Please sign in to comment.