summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinqiang zhang <peeweep@0x0.ee>2023-03-07 15:51:03 +0800
committerSam James <sam@gentoo.org>2023-03-11 17:15:03 +0000
commit6d5f2daeee8249439d1c59bd3e0c6e023e2f5e5b (patch)
tree553db40dab6b06c72278ebe3295a15c91148b049 /net-libs/zeromq
parentdev-libs/libmemcached-awesome: add 1.1.4 (diff)
downloadgentoo-6d5f2daeee8249439d1c59bd3e0c6e023e2f5e5b.tar.gz
gentoo-6d5f2daeee8249439d1c59bd3e0c6e023e2f5e5b.tar.bz2
gentoo-6d5f2daeee8249439d1c59bd3e0c6e023e2f5e5b.zip
net-libs/zeromq: fix compile failed under riscv64 qemu-user
Closes: https://bugs.gentoo.org/899986 Signed-off-by: jinqiang zhang <peeweep@0x0.ee> Closes: https://github.com/gentoo/gentoo/pull/29972 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/zeromq')
-rw-r--r--net-libs/zeromq/files/zeromq-4.3.4-qemu-user.patch52
-rw-r--r--net-libs/zeromq/zeromq-4.3.4-r2.ebuild1
2 files changed, 53 insertions, 0 deletions
diff --git a/net-libs/zeromq/files/zeromq-4.3.4-qemu-user.patch b/net-libs/zeromq/files/zeromq-4.3.4-qemu-user.patch
new file mode 100644
index 000000000000..8374496e39e1
--- /dev/null
+++ b/net-libs/zeromq/files/zeromq-4.3.4-qemu-user.patch
@@ -0,0 +1,52 @@
+UPSTREAM: https://github.com/zeromq/libzmq/pull/4486
+BUG: https://bugs.gentoo.org/899986
+From: Han Gao <gaohan@iscas.ac.cn>
+
+In qemu-user, CACHELINE_SIZE probe is undefined
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8672d61799..072a6507e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -481,7 +481,8 @@ execute_process(
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(CACHELINE_SIZE STREQUAL ""
+ OR CACHELINE_SIZE EQUAL 0
+- OR CACHELINE_SIZE EQUAL -1)
++ OR CACHELINE_SIZE EQUAL -1
++ OR CACHELINE_SIZE EQUAL "undefined")
+ set(ZMQ_CACHELINE_SIZE 64)
+ else()
+ set(ZMQ_CACHELINE_SIZE ${CACHELINE_SIZE})
+diff --git a/RELICENSE/hangao.md b/RELICENSE/hangao.md
+new file mode 100644
+index 0000000000..de100bb59a
+--- /dev/null
++++ b/RELICENSE/hangao.md
+@@ -0,0 +1,13 @@
++# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
++
++This is a statement by Han Gao that grants permission to relicense its copyrights in the libzmq C++
++library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
++Open Source Initiative approved license chosen by the current ZeroMQ
++BDFL (Benevolent Dictator for Life).
++
++A portion of the commits made by the Github handle "Rabenda", with
++commit author "Han Gao <gaohan@iscas.ac.cn>" or "Han Gao <rabenda.cn@gmail.com>", are copyright of Han Gao .
++This document hereby grants the libzmq project team to relicense libzmq,
++including all past, present and future contributions of the author listed above.
++
++Han Gao 2023/01/10
+diff --git a/acinclude.m4 b/acinclude.m4
+index ac55776e53..f27fc8e831 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1254,7 +1254,7 @@ AC_DEFUN([LIBZMQ_CHECK_CACHELINE], [{
+ AC_CHECK_TOOL(libzmq_getconf, getconf)
+ if ! test "x$libzmq_getconf" = "x"; then
+ zmq_cacheline_size=$($libzmq_getconf LEVEL1_DCACHE_LINESIZE 2>/dev/null || echo 64)
+- if test "x$zmq_cacheline_size" = "x0" -o "x$zmq_cacheline_size" = "x-1"; then
++ if test "x$zmq_cacheline_size" = "x0" -o "x$zmq_cacheline_size" = "x-1" -o "x$zmq_cacheline_size" = "xundefined"; then
+ # getconf on some architectures does not know the size, try to fallback to
+ # the value the kernel knows on Linux
+ zmq_cacheline_size=$(cat /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size 2>/dev/null || echo 64)
diff --git a/net-libs/zeromq/zeromq-4.3.4-r2.ebuild b/net-libs/zeromq/zeromq-4.3.4-r2.ebuild
index 06892942f602..7cb568736d2d 100644
--- a/net-libs/zeromq/zeromq-4.3.4-r2.ebuild
+++ b/net-libs/zeromq/zeromq-4.3.4-r2.ebuild
@@ -34,6 +34,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-gcc-13.patch
+ "${FILESDIR}"/${P}-qemu-user.patch
)
src_prepare() {