Skip to content

Commit

Permalink
depends: Fix Autotools-generated libzmq.pc file
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jun 4, 2024
1 parent 0cac5dc commit 7bbbd06
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
$(package)_patches=remove_libstd_link.patch
$(package)_patches+=fix_mingw_link.patch

define $(package)_set_vars
$(package)_config_opts = --without-docs --disable-shared --disable-valgrind
Expand All @@ -14,6 +15,7 @@ define $(package)_set_vars
endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch && \
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch
endef

Expand Down
24 changes: 24 additions & 0 deletions depends/patches/zeromq/fix_mingw_link.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
commit 5bd0b91a64b4acacb210d91ee297e775fdc58737
Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Date: Wed Mar 20 14:37:26 2024 +0000

Fix Autotools-generated `libzmq.pc` file

This change fixes cross-compiling for Windows with static linking.

See https://github.com/zeromq/libzmq/pull/4667.


diff --git a/configure.ac b/configure.ac
index 622f544d..bfea9499 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,7 +365,7 @@ case "${host_os}" in

if test "x$enable_static" = "xyes"; then
CPPFLAGS="-DZMQ_STATIC $CPPFLAGS"
- PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -liphlpapi"
+ PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -liphlpapi -lws2_32"
fi
# Set FD_SETSIZE to 16384
CPPFLAGS=" -DFD_SETSIZE=16384 $CPPFLAGS"

0 comments on commit 7bbbd06

Please sign in to comment.