diff --git a/0001-Fix-race-during-build-of-python-bindings.patch b/0001-Fix-race-during-build-of-python-bindings.patch deleted file mode 100644 index 7dcd965..0000000 --- a/0001-Fix-race-during-build-of-python-bindings.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 579f5cb2df5e337df2848f686af3308e45950b81 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Thu, 16 Mar 2023 10:55:18 +0100 -Subject: [PATCH] Fix race during build of python bindings - -The CMake documentation says about add_custom_command that the output must -not be used as dependency in more than one target, but this was the case -here: Both the doc_i target and the SWIG target depended on ftdi1_doc.i. -Make the SWIG target depend on doc_i instead. - -This fixes that ftdi1_doc.i was built twice with parallel builds, leading -to random errors. - -Signed-off-by: Fabian Vogt ---- - python/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt -index 5b6f420..1a8142b 100644 ---- a/python/CMakeLists.txt -+++ b/python/CMakeLists.txt -@@ -25,7 +25,7 @@ link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src ) - if ( DOCUMENTATION ) - set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) - # manually add dependency for new cmake / swig versions -- set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i) -+ set_property(SOURCE ftdi1.i PROPERTY DEPENDS doc_i) - endif() - if(NOT CMAKE_VERSION VERSION_LESS 3.8.0) - swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i ) --- -2.39.2 - diff --git a/_service b/_service index 2a06b4f..815daa3 100644 --- a/_service +++ b/_service @@ -1,5 +1,5 @@ - + git://developer.intra2net.com/libftdi git enable @@ -8,7 +8,7 @@ @PARENT_TAG@.@TAG_OFFSET@+git.%h v(.*) - + *.tar diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..d6a42cf --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + git://developer.intra2net.com/libftdi + de9f01ece34d2fe6e842e0250a38f4b16eda2429 \ No newline at end of file diff --git a/libftdi1-1.5.12+git.0684c1b.obscpio b/libftdi1-1.5.12+git.0684c1b.obscpio deleted file mode 100644 index 1e0a37d..0000000 --- a/libftdi1-1.5.12+git.0684c1b.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2128536ffe8f5792c662736c40b828c6e48cfcabc844a47c4463cba71dc643b -size 590860 diff --git a/libftdi1-1.5.42+git.de9f01e.obscpio b/libftdi1-1.5.42+git.de9f01e.obscpio new file mode 100644 index 0000000..716cd45 --- /dev/null +++ b/libftdi1-1.5.42+git.de9f01e.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6b5ef0fd28178aa53d8a1ab4e4e112bc557e0b429b417f1671e6f10afd3412 +size 591372 diff --git a/libftdi1.changes b/libftdi1.changes index f2d9ca0..02e6c51 100644 --- a/libftdi1.changes +++ b/libftdi1.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Wed Nov 6 09:58:53 UTC 2024 - Ana Guerrero + +- Fix for SWIG 4.3.0, add patch swig-4.3.patch + +------------------------------------------------------------------- +Mon May 13 13:19:55 UTC 2024 - trenn@suse.de + +- Update to version 1.5.42+git.de9f01e: + * CMake: bump the minimal required version to 3.5 + * python: move from distutils to sysconfig + * CMake: use ${PC_LIBUSB_LIBRARIES} instead of a library name + * CMake: fix multiarch support + * CMake: make the project compatible with building as a subproject + * ftdipp/CMakeLists.txt: remove VIM modline settings + * CMake: rework subdirectory handling + * CMake: rework findlibusb module + * CMake: report CMake version + * CMake: use dedicated recipe for documentation generation +D 0001-Fix-race-during-build-of-python-bindings.patch +Patch got integrated mainline + ------------------------------------------------------------------- Thu Mar 16 10:02:33 UTC 2023 - Fabian Vogt diff --git a/libftdi1.obsinfo b/libftdi1.obsinfo index 11672f2..2607c0a 100644 --- a/libftdi1.obsinfo +++ b/libftdi1.obsinfo @@ -1,5 +1,4 @@ name: libftdi1 -version: 1.5.12+git.0684c1b -mtime: 1620147075 -commit: 0684c1b1be9ccb893829c20a8505c91e101bbf43 - +version: 1.5.42+git.de9f01e +mtime: 1703171675 +commit: de9f01ece34d2fe6e842e0250a38f4b16eda2429 diff --git a/libftdi1.spec b/libftdi1.spec index 3c02e5d..89dd6fd 100644 --- a/libftdi1.spec +++ b/libftdi1.spec @@ -1,7 +1,7 @@ # # spec file for package libftdi1 # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,15 +19,15 @@ %define sover -2 %define libname %{name}%{sover} Name: libftdi1 -Version: 1.5.12+git.0684c1b +Version: 1.5.42+git.de9f01e Release: 0 Summary: Library to program and control the FTDI USB controller License: LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-with-classpath-exception Group: Hardware/Other URL: https://www.intra2net.com/en/developer/libftdi Source: libftdi1-%{version}.tar.xz -# PATCH-FIX-UPSTREAM: http://developer.intra2net.com/mailarchive/html/libftdi/2023/msg00005.html -Patch1: 0001-Fix-race-during-build-of-python-bindings.patch +# PATCH-FIX-UPSTREAM http://developer.intra2net.com/mailarchive/html/libftdi/2024/msg00024.html +Patch1: swig-4.3.patch BuildRequires: cmake >= 2.8 BuildRequires: doxygen BuildRequires: gcc-c++ diff --git a/swig-4.3.patch b/swig-4.3.patch new file mode 100644 index 0000000..0a76f1a --- /dev/null +++ b/swig-4.3.patch @@ -0,0 +1,80 @@ +From 5169cfca22381c2bf72f9bae43b72a72c8698990 Mon Sep 17 00:00:00 2001 +From: William S Fulton +Date: Fri, 18 Oct 2024 09:38:20 +0200 +Subject: [PATCH] python: update for SWIG 4.3 + +SWIG 4.3 comes with an API change to the SWIG_Python_AppendOutput() +function, so switch to the recommended SWIG_AppendOutput() instead. +Because the new function is a macro in fact also switch to the {..} +delimiters as the code needs to be preprocessed. The change is +compatible with the previous SWIG releases 4.2 and 4.1 at least. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2319133 +Related: https://github.com/swig/swig/pull/2907 +--- + python/ftdi1.i | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/python/ftdi1.i b/python/ftdi1.i +index 8b179f9..fac4d16 100644 +--- a/python/ftdi1.i ++++ b/python/ftdi1.i +@@ -52,7 +52,7 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_usb_find_all_docstring) ftdi_usb_find_all; + %typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) SWIGTYPE** OUTPUT %{ $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); %} ++%typemap(argout,noblock=1) SWIGTYPE** OUTPUT { $result = SWIG_AppendOutput($result, SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); } + %apply SWIGTYPE** OUTPUT { struct ftdi_device_list **devlist }; + int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devlist, + int vendor, int product); +@@ -92,12 +92,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_read_data_docstring) ftdi_read_data; + %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} +-%typemap(argout) (unsigned char *buf, int size) %{ ++%typemap(argout,noblock=1) (unsigned char *buf, int size) { + if(result<0) + $2=0; +- $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); ++ $result = SWIG_AppendOutput($result, charp2str((char*)$1, $2)); + free($1); +-%} ++} + int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size); + %clear (unsigned char *buf, int size); + +@@ -119,12 +119,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_read_pins_docstring) ftdi_read_pins; + %typemap(in,numinputs=0) unsigned char *pins ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) (unsigned char *pins) %{ $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, 1)); %} ++%typemap(argout,noblock=1) (unsigned char *pins) { $result = SWIG_AppendOutput($result, charp2str((char*)$1, 1)); } + int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins); + %clear unsigned char *pins; + + %typemap(in,numinputs=0) unsigned char *latency ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) (unsigned char *latency) %{ $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, 1)); %} ++%typemap(argout,noblock=1) (unsigned char *latency) { $result = SWIG_AppendOutput($result, charp2str((char*)$1, 1)); } + int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency); + %clear unsigned char *latency; + +@@ -137,12 +137,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %clear int* value; + + %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} +-%typemap(argout) (unsigned char *buf, int size) %{ ++%typemap(argout,noblock=1) (unsigned char *buf, int size) { + if(result<0) + $2=0; +- $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); ++ $result = SWIG_AppendOutput($result, charp2str((char*)$1, $2)); + free($1); +-%} ++} + int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, int size); + %clear (unsigned char *buf, int size); + +-- +2.47.0 +