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,33 @@
|
||||
From 009e5cf0750134ed5403aae23ef53a177764ca04 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Wed, 29 Dec 2021 13:49:15 -0800
|
||||
Subject: [PATCH] remove join from sip_h.files string
|
||||
|
||||
When cross compiling, the configure system appends the hosts /usr/ directory
|
||||
to the path of which to find files that python-sip will install. This leads to
|
||||
python-sip attempting to install everything under the hosts /usr directory into
|
||||
the targets /usr/include/python directory.
|
||||
|
||||
Remove the .join() in the sip_h.files string to prevent the above issue.
|
||||
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
configure.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.py b/configure.py
|
||||
index 25bcaa7..fc8f2dc 100644
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -408,7 +408,7 @@ def create_makefiles(macros):
|
||||
# There will only be one element.
|
||||
files, path = gen_installs[0]
|
||||
pro.write("\n")
|
||||
- pro.write("sip_h.files = %s\n" % " ".join(files))
|
||||
+ pro.write("sip_h.files = %s\n" % files)
|
||||
pro.write("sip_h.path = %s\n" % quote(path))
|
||||
pro.write("INSTALLS += sip_h\n")
|
||||
|
||||
--
|
||||
2.33.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From e8bbb7844c141b339ef0598decf2a808faa50f5e Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Dragon <hypnotoad@lindra.de>
|
||||
Date: Sun, 17 Dec 2023 22:55:17 +0100
|
||||
Subject: [PATCH] siplib: fix build with python >= 3.11
|
||||
|
||||
With python 3.11, the PyFrameObject structure members have been
|
||||
removed from the public C API:
|
||||
|
||||
https://docs.python.org/3.11/whatsnew/3.11.html#whatsnew311-c-api-porting
|
||||
https://docs.python.org/3.11/whatsnew/3.11.html#pyframeobject-3-11-hiding
|
||||
|
||||
This patch migrates to the opaque PyFrameObject.
|
||||
|
||||
Upstream: Not Applicable, SIP 4.x is no longer maintained
|
||||
Signed-off-by: Ralf Dragon <hypnotoad@lindra.de>
|
||||
---
|
||||
siplib/sip.h | 2 +-
|
||||
siplib/siplib.c | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/siplib/sip.h b/siplib/sip.h
|
||||
index 251b122..b9d8ea2 100644
|
||||
--- a/siplib/sip.h
|
||||
+++ b/siplib/sip.h
|
||||
@@ -1799,7 +1799,7 @@ typedef struct _sipAPIDef {
|
||||
int (*api_get_time)(PyObject *, sipTimeDef *);
|
||||
PyObject *(*api_from_time)(const sipTimeDef *);
|
||||
int (*api_is_user_type)(const sipWrapperType *);
|
||||
- struct _frame *(*api_get_frame)(int);
|
||||
+ PyFrameObject *(*api_get_frame)(int);
|
||||
int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
|
||||
PyObject *(*api_unicode_new)(SIP_SSIZE_T, unsigned, int *, void **);
|
||||
void (*api_unicode_write)(int, void *, int, unsigned);
|
||||
diff --git a/siplib/siplib.c b/siplib/siplib.c
|
||||
index db52b68..a297855 100644
|
||||
--- a/siplib/siplib.c
|
||||
+++ b/siplib/siplib.c
|
||||
@@ -448,7 +448,7 @@ static PyObject *sip_api_from_datetime(const sipDateDef *date,
|
||||
static int sip_api_get_time(PyObject *obj, sipTimeDef *time);
|
||||
static PyObject *sip_api_from_time(const sipTimeDef *time);
|
||||
static int sip_api_is_user_type(const sipWrapperType *wt);
|
||||
-static struct _frame *sip_api_get_frame(int);
|
||||
+static PyFrameObject *sip_api_get_frame(int);
|
||||
static int sip_api_check_plugin_for_type(const sipTypeDef *td,
|
||||
const char *name);
|
||||
static PyObject *sip_api_unicode_new(SIP_SSIZE_T len, unsigned maxchar,
|
||||
@@ -13741,13 +13741,13 @@ static int sip_api_is_user_type(const sipWrapperType *wt)
|
||||
/*
|
||||
* Return a frame from the execution stack.
|
||||
*/
|
||||
-static struct _frame *sip_api_get_frame(int depth)
|
||||
+static PyFrameObject *sip_api_get_frame(int depth)
|
||||
{
|
||||
- struct _frame *frame = PyEval_GetFrame();
|
||||
+ PyFrameObject *frame = PyEval_GetFrame();
|
||||
|
||||
while (frame != NULL && depth > 0)
|
||||
{
|
||||
- frame = frame->f_back;
|
||||
+ frame = PyFrame_GetBack(frame);
|
||||
--depth;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_PYTHON_SIP
|
||||
bool "python-sip"
|
||||
depends on BR2_PACKAGE_QT5
|
||||
help
|
||||
SIP is a tool that makes it very easy to create Python
|
||||
bindings for C and C++ libraries. It was originally
|
||||
developed to create PyQt, the Python bindings for the Qt
|
||||
toolkit, but can be used to create bindings for any C or C++
|
||||
library.
|
||||
|
||||
SIP comprises a code generator and a Python module. The code
|
||||
generator processes a set of specification files and
|
||||
generates C or C++ code which is then compiled to create the
|
||||
bindings extension module. The SIP Python module provides
|
||||
support functions to the automatically generated code.
|
||||
|
||||
http://www.riverbankcomputing.com/software/sip/intro
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally calculated:
|
||||
sha256 b39d93e937647807bac23579edbff25fe46d16213f708370072574ab1f1b4211 sip-4.19.25.tar.gz
|
||||
sha256 accecbfda71ad4497bce0d451796706e734e405e5ecf3b3f9ee0cc68300a3d9c LICENSE
|
||||
sha256 7ebb61006e46b9e9340dd135d5f4afbbcb1d1d6c6709f74473b35929007b9aeb LICENSE-GPL2
|
||||
sha256 63cb5f5c1ea39b732c495f354f971e40f6db84c567ca5573a68bb65af07741f8 LICENSE-GPL3
|
||||
@@ -0,0 +1,50 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-sip
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PYTHON_SIP_VERSION = 4.19.25
|
||||
PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz
|
||||
PYTHON_SIP_SITE = https://www.riverbankcomputing.com/static/Downloads/sip/$(PYTHON_SIP_VERSION)
|
||||
PYTHON_SIP_LICENSE = SIP license or GPL-2.0 or GPL-3.0
|
||||
PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
|
||||
PYTHON_SIP_DEPENDENCIES = host-python-setuptools python3 qt5base
|
||||
HOST_PYTHON_SIP_DEPENDENCIES = host-python3 host-python-setuptools
|
||||
|
||||
define HOST_PYTHON_SIP_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py)
|
||||
endef
|
||||
|
||||
define HOST_PYTHON_SIP_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define HOST_PYTHON_SIP_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
|
||||
endef
|
||||
|
||||
define PYTHON_SIP_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
|
||||
--bindir $(TARGET_DIR)/usr/bin \
|
||||
--destdir $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
|
||||
--incdir $(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
|
||||
--sipdir $(TARGET_DIR)/usr/share/sip \
|
||||
--sysroot $(STAGING_DIR)/usr \
|
||||
--no-stubs \
|
||||
--use-qmake && \
|
||||
$(HOST_DIR)/bin/qmake)
|
||||
endef
|
||||
|
||||
define PYTHON_SIP_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define PYTHON_SIP_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user