Skip to content

Commit 4af59a4

Browse files
committed
build: use patch rather than sed in zeromq package
1 parent cc107a3 commit 4af59a4

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

depends/packages/zeromq.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $(package)_version=4.3.1
33
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb
6+
$(package)_patches=remove_libstd_link.patch
67

78
define $(package)_set_vars
89
$(package)_config_opts=--without-docs --disable-shared --disable-curve --disable-curve-keygen --disable-perf
@@ -15,7 +16,8 @@ define $(package)_set_vars
1516
endef
1617

1718
define $(package)_preprocess_cmds
18-
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
19+
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
20+
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
1921
endef
2022

2123
define $(package)_config_cmds
@@ -31,6 +33,5 @@ define $(package)_stage_cmds
3133
endef
3234

3335
define $(package)_postprocess_cmds
34-
sed -i.old "s/ -lstdc++//" lib/pkgconfig/libzmq.pc && \
3536
rm -rf bin share lib/*.la
3637
endef
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
commit 47d4cd12a2c051815ddda78adebdb3923b260d8a
2+
Author: fanquake <[email protected]>
3+
Date: Tue Aug 18 14:45:40 2020 +0800
4+
5+
Remove needless linking against libstdc++
6+
7+
This is broken for a number of reasons, including:
8+
- g++ understands "static-libstdc++ -lstdc++" to mean "link against
9+
whatever libstdc++ exists, probably shared", which in itself is buggy.
10+
- another stdlib (libc++ for example) may be in use
11+
12+
See #11981.
13+
14+
diff --git a/src/libzmq.pc.in b/src/libzmq.pc.in
15+
index 233bc3a..3c2bf0d 100644
16+
--- a/src/libzmq.pc.in
17+
+++ b/src/libzmq.pc.in
18+
@@ -7,6 +7,6 @@ Name: libzmq
19+
Description: 0MQ c++ library
20+
Version: @VERSION@
21+
Libs: -L${libdir} -lzmq
22+
-Libs.private: -lstdc++ @pkg_config_libs_private@
23+
+Libs.private: @pkg_config_libs_private@
24+
Requires.private: @pkg_config_names_private@
25+
Cflags: -I${includedir} @pkg_config_defines@

0 commit comments

Comments
 (0)