Skip to content

Commit

Permalink
depends: Fix Autotools-generated libzmq.pc file
Browse files Browse the repository at this point in the history
See zeromq/libzmq#4667.

Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
  • Loading branch information
hebasto and theuni committed Jul 19, 2024
1 parent b110e7e commit b05f272
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $(package)_patches += builtin_sha1.patch
$(package)_patches += fix_have_windows.patch
$(package)_patches += cmake_minimum.patch
$(package)_patches += no_librt.patch
$(package)_patches += fix_mingw_link.patch

define $(package)_set_vars
$(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF
Expand All @@ -26,7 +27,8 @@ define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/builtin_sha1.patch && \
patch -p1 < $($(package)_patch_dir)/fix_have_windows.patch && \
patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch && \
patch -p1 < $($(package)_patch_dir)/no_librt.patch
patch -p1 < $($(package)_patch_dir)/no_librt.patch && \
patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch
endef

define $(package)_config_cmds
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 b05f272

Please sign in to comment.