Compare commits

...

No commits in common. 'epel9' and 'i10ce' have entirely different histories.
epel9 ... i10ce

2
.gitignore vendored

@ -1 +1 @@
/libftdi*.tar.bz2
SOURCES/libftdi1-1.5.tar.bz2

@ -0,0 +1 @@
0b4dc9763342d094d2b5e74ced7d10d574b4758d SOURCES/libftdi1-1.5.tar.bz2

@ -0,0 +1,80 @@
Return-Path: <libftdi+bounces-3653-dan=danny.cz@developer.intra2net.com>
X-Original-To: dan@danny.cz
Delivered-To: dan@danny.cz
Received: from redcrew.org (redcrew.org [37.157.195.192])
by server.danny.cz (Postfix) with ESMTP id 6814A11AA7C
for <dan@danny.cz>; Thu, 16 Mar 2023 11:14:54 +0100 (CET)
Received: from developer.intra2net.com (developer.intra2net.com [193.186.7.72])
by redcrew.org (Postfix) with ESMTP id 75E572A11
for <dan@danny.cz>; Thu, 16 Mar 2023 11:14:54 +0100 (CET)
Received: from developer.intra2net.com (localhost.localdomain [127.0.0.1])
by developer.intra2net.com (Postfix) with SMTP id A02EF278278;
Thu, 16 Mar 2023 11:14:53 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1678961693; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=RWRBP3sFq1pG6+FlDOdi6Yk+9FOiLm8CwFX46/0LR9g=;
b=ZclgNrLBH+8LWy6RE95IIv9NUWz/pbaU5/Vm7/qJHwEkyDbg5Si6fQruq5bxtVfJKctd3D
SRgOO2cG0s11995VvcXjK0XyaKVzBFjk7kw7lXNkeGWuAHXktpOwzJNp5WtKfW0JJsx+J1
tGarT4PKc2EDcU+WJOhe1JNBafWX5yM=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1678961693;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=RWRBP3sFq1pG6+FlDOdi6Yk+9FOiLm8CwFX46/0LR9g=;
b=/LLE8SqF+wbv1TgIbDhMSvfr8O/FtBTOxq111bCe1rkEc892zDS7mxy3GvjgVfN1TjVCZ2
iosAeMltIBho8FBQ==
From: Fabian Vogt <fvogt@suse.de>
To: libftdi@developer.intra2net.com
Subject: [PATCH] Fix race during build of python bindings
Date: Thu, 16 Mar 2023 11:14:52 +0100
Message-ID: <4468851.LvFx2qVVIh@linux-e202.suse.de>
List-Id: libftdi
List-Help: <mailto:libftdi+help@developer.intra2net.com>
List-Post: <mailto:libftdi@developer.intra2net.com>
List-Subscribe: <mailto:libftdi+subscribe@developer.intra2net.com>
List-Unsubscribe: <mailto:libftdi+unsubscribe@developer.intra2net.com>
Reply-To: libftdi@developer.intra2net.com
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
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 <fvogt@suse.de>
---
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
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@developer.intra2net.com

@ -0,0 +1,27 @@
From c68b20b1764acf269a385239d3bdfde6191d3be4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 19 Dec 2022 17:40:43 +0100
Subject: [PATCH] move from distutils to sysconfig
The distutils module was deprecated in Python 3.10, thus switch to the
sysconfig module instead.
---
python/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 5b6f420..19ce500 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -42,7 +42,7 @@ endif ()
set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON )
-execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print( sysconfig.get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )"
+execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print( sysconfig.get_path( 'platlib', vars={'platbase': '${CMAKE_INSTALL_PREFIX}'} ) )"
OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE )
--
2.39.0

@ -0,0 +1,80 @@
From 5169cfca22381c2bf72f9bae43b72a72c8698990 Mon Sep 17 00:00:00 2001
From: William S Fulton <wsf@fultondesigns.co.uk>
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

@ -1,14 +1,23 @@
Name: libftdi
Version: 1.5
Release: 2%{?dist}
Release: 16%{?dist}
Summary: Library to program and control the FTDI USB controller
License: LGPLv2
# Automatically converted from old format: LGPLv2 - review is highly recommended.
License: LicenseRef-Callaway-LGPLv2
URL: https://www.intra2net.com/en/developer/libftdi/
Source0: https://www.intra2net.com/en/developer/%{name}/download/%{name}1-%{version}.tar.bz2
# http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30
Patch0: libftdi-1.5-fix_pkgconfig_path.patch
# http://developer.intra2net.com/mailarchive/html/libftdi/2023/msg00003.html
Patch1: libftdi-1.5-no-distutils.patch
# http://developer.intra2net.com/mailarchive/html/libftdi/2023/msg00005.html
Patch2: libftdi-1.5-cmake-deps.patch
# Fix for SWIG 4.3.0
# https://bugzilla.redhat.com/show_bug.cgi?id=2319133
# http://developer.intra2net.com/mailarchive/html/libftdi/2024/msg00024.html
Patch3: libftdi-1.5-swig-4.3.patch
BuildRequires: cmake
BuildRequires: gcc
@ -73,7 +82,7 @@ sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules
%build
%cmake -DSTATICLIBS=off -DFTDIPP=on -DPYTHON_BINDINGS=on -DDOCUMENTATION=on .
%cmake -DSTATICLIBS=off -DFTDIPP=on -DPYTHON_BINDINGS=on -DDOCUMENTATION=on -DEXAMPLES=off
%cmake_build
%install
@ -81,21 +90,6 @@ sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules
install -D -pm 0644 packages/99-libftdi.rules %{buildroot}%{_udevrulesdir}/69-libftdi.rules
mkdir -p %{buildroot}/usr/lib/udev/rules.d/
install -pm 0644 packages/99-libftdi.rules %{buildroot}/usr/lib/udev/rules.d/69-libftdi.rules
# Cleanup examples
rm -f %{buildroot}%{_bindir}/simple
rm -f %{buildroot}%{_bindir}/bitbang
rm -f %{buildroot}%{_bindir}/bitbang2
rm -f %{buildroot}%{_bindir}/bitbang_ft2232
rm -f %{buildroot}%{_bindir}/bitbang_cbus
rm -f %{buildroot}%{_bindir}/find_all
rm -f %{buildroot}%{_bindir}/find_all_pp
rm -f %{buildroot}%{_bindir}/baud_test
rm -f %{buildroot}%{_bindir}/serial_read
rm -f %{buildroot}%{_bindir}/serial_test
rm -f %{buildroot}%{_datadir}/doc/libftdi1/example.conf
rm -f %{buildroot}%{_datadir}/doc/libftdipp1/example.conf
@ -132,11 +126,53 @@ rm -f %{buildroot}%{_datadir}/doc/libftdipp1/example.conf
%{_includedir}/libftdi1/*.hpp
%{_libdir}/pkgconfig/libftdipp1.pc
%ldconfig_scriptlets
%ldconfig_scriptlets c++
%changelog
* Thu Dec 26 2024 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 1.5-16
- Rebuilt for MSVSphere 10
* Wed Oct 16 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.5-16
- Fix for SWIG 4.3.0 (rhbz#2319133)
* Mon Sep 02 2024 Miroslav Suchý <msuchy@redhat.com> - 1.5-15
- convert license to SPDX
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 1.5-13
- Rebuilt for Python 3.13
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.5-9
- Rebuilt for Python 3.12
* Tue Jun 06 2023 Dan Horák <dan[at]danny.cz> - 1.5-8
- Fix parallel build
* Fri Feb 03 2023 Dan Horák <dan[at]danny.cz> - 1.5-7
- Prepare for distutils removal (rhbz#2154854)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.5-4
- Rebuilt for Python 3.11
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Aug 17 2021 Björn Esser <besser82@fedoraproject.org> - 1.5-2
- Add patch to fix includedir in pkgconfig file

@ -1 +0,0 @@
SHA512 (libftdi1-1.5.tar.bz2) = c525b2ab6aff9ef9254971ae7d57f3549a36a36875765c48f947d52532814a2a004de1232389d4fe824a8c8ab84277b08427308573476e1da9b7db83db802f6f
Loading…
Cancel
Save