mirror of
https://gitee.com/open-loongarch/buildroot-2024.08.git
synced 2026-10-28 22:17:12 +08:00
first commit: base 2024.08
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
From 8eae1193457f72899f9cc2254ae1489026df9bb6 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Rommel <rommel@layer-7.net>
|
||||
Date: Sat, 10 Aug 2013 00:44:35 +0200
|
||||
Subject: [PATCH] detect.py: fix the ZMQ version check to the ZMQ version of
|
||||
the buildroot
|
||||
|
||||
The setup.py script tries to compile a test C program and runs it, to
|
||||
retrieve a version string for the installed ZMQ library, but if the cross
|
||||
compiler links it together, the result cannot be run on the host, due to
|
||||
different architectures and libraries.
|
||||
|
||||
And if the host compiler would compile/link it, it would not link with
|
||||
the library version inside buildroot but with the library from the
|
||||
host, possibly returning a wrong version number.
|
||||
|
||||
Instead of trying to run the compiled test program to get the version
|
||||
dynamically, return the version of the buildroot environment.
|
||||
|
||||
Written by Michael Rommel, modified for version 16.0.2 by Lionel
|
||||
Flandrin.
|
||||
|
||||
Modified for version 18.0.2 by Asaf Kahlon
|
||||
|
||||
Modified for version 24.0.1 by James Hilliard
|
||||
|
||||
Signed-off-by: Michael Rommel <rommel@layer-7.net>
|
||||
Signed-off-by: Lionel Flandrin <lionel@svkt.org>
|
||||
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
---
|
||||
buildutils/detect.py | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/buildutils/detect.py b/buildutils/detect.py
|
||||
index 842e3b14..e2eca744 100644
|
||||
--- a/buildutils/detect.py
|
||||
+++ b/buildutils/detect.py
|
||||
@@ -120,18 +120,20 @@ def detect_zmq(basedir, compiler, **compiler_attrs):
|
||||
|
||||
cc = get_compiler(compiler=compiler, **compiler_attrs)
|
||||
efile = test_compilation(cfile, compiler=cc, **compiler_attrs)
|
||||
- patch_lib_paths(efile, cc.library_dirs)
|
||||
+ #patch_lib_paths(efile, cc.library_dirs)
|
||||
|
||||
# add library dirs to %PATH% for windows
|
||||
env = os.environ.copy()
|
||||
if sys.platform.startswith("win"):
|
||||
env["PATH"] = os.pathsep.join([env["PATH"]] + cc.library_dirs)
|
||||
|
||||
- rc, so, se = get_output_error([efile], env=env)
|
||||
- if rc:
|
||||
- msg = f"Error running version detection script:\n{so}\n{se}"
|
||||
- logging.error(msg)
|
||||
- raise OSError(msg)
|
||||
+ #rc, so, se = get_output_error([efile], env=env)
|
||||
+ #if rc:
|
||||
+ # msg = f"Error running version detection script:\n{so}\n{se}"
|
||||
+ # logging.error(msg)
|
||||
+ # raise OSError(msg)
|
||||
+
|
||||
+ so = "vers: ##ZEROMQ_VERSION##"
|
||||
|
||||
handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_PYTHON_PYZMQ
|
||||
bool "python-pyzmq"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # zeromq
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq
|
||||
select BR2_PACKAGE_ZEROMQ
|
||||
help
|
||||
This package contains the python language binding for zeromq.
|
||||
|
||||
http://zeromq.org/bindings:python
|
||||
|
||||
comment "python-pyzmq needs a toolchain w/ C++, threads"
|
||||
depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
|
||||
@@ -0,0 +1,6 @@
|
||||
# md5, sha256 from https://pypi.org/pypi/pyzmq/json
|
||||
md5 280afc0992b0a9f109dafc1e672d2f26 pyzmq-25.1.2.tar.gz
|
||||
sha256 93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226 pyzmq-25.1.2.tar.gz
|
||||
# Locally computed sha256 checksums
|
||||
sha256 c0cf5f5c03f8d6772f7a271df1cb671054578bd3d79527c72fc1f28f8cc72a7a LICENSE.BSD
|
||||
sha256 5f1dac83d6c25674004810ec9e54b304ccbb8303ac5961813b09235966abfd48 LICENSE.LESSER
|
||||
@@ -0,0 +1,33 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-pyzmq
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PYTHON_PYZMQ_VERSION = 25.1.2
|
||||
PYTHON_PYZMQ_SOURCE = pyzmq-$(PYTHON_PYZMQ_VERSION).tar.gz
|
||||
PYTHON_PYZMQ_SITE = https://files.pythonhosted.org/packages/3a/33/1a3683fc9a4bd64d8ccc0290da75c8f042184a1a49c146d28398414d3341
|
||||
PYTHON_PYZMQ_LICENSE = LGPL-3.0+, BSD-3-Clause, Apache-2.0
|
||||
# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0
|
||||
PYTHON_PYZMQ_LICENSE_FILES = LICENSE.LESSER LICENSE.BSD
|
||||
PYTHON_PYZMQ_SETUP_TYPE = setuptools
|
||||
PYTHON_PYZMQ_BUILD_OPTS = -C--build-option=--zmq=$(STAGING_DIR)/usr
|
||||
PYTHON_PYZMQ_DEPENDENCIES = \
|
||||
host-python-cython \
|
||||
host-python-packaging \
|
||||
host-python-setuptools-scm \
|
||||
zeromq
|
||||
|
||||
# Due to issues with cross-compiling, hardcode to the zeromq in BR
|
||||
define PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION
|
||||
$(SED) 's/##ZEROMQ_VERSION##/$(ZEROMQ_VERSION)/' \
|
||||
$(@D)/buildutils/detect.py
|
||||
endef
|
||||
|
||||
PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZEROMQ_DRAFTS),y)
|
||||
PYTHON_PYZMQ_BUILD_OPTS += -C--build-option=--enable-drafts
|
||||
endif
|
||||
|
||||
$(eval $(python-package))
|
||||
Reference in New Issue
Block a user