[packages/libredwg] - updated to 0.14, python module switched to python3 (no users of old python 2 package)
qboosh
qboosh at pld-linux.org
Fri Nov 6 20:26:14 CET 2026
commit 816497a8cb4aae4dd0ef6efe32428d04abb35fec
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Nov 6 20:27:04 2026 +0100
- updated to 0.14, python module switched to python3 (no users of old python 2 package)
config-update.patch | 43 -----------------------------------------
libredwg-python.patch | 12 ++++++------
libredwg.spec | 53 ++++++++++++++++++++++++---------------------------
3 files changed, 31 insertions(+), 77 deletions(-)
---
diff --git a/libredwg.spec b/libredwg.spec
index 44f9ba6..67aaa7c 100644
--- a/libredwg.spec
+++ b/libredwg.spec
@@ -5,15 +5,14 @@
Summary: LibreDWG - free implementation of the DWG file format
Summary(pl.UTF-8): LibreDWG - wolnodostępna implementacja formatu plików DWG
Name: libredwg
-Version: 0.13.3
-Release: 4
+Version: 0.14
+Release: 1
License: GPL v3+
Group: Libraries
Source0: https://ftp.gnu.org/gnu/libredwg/%{name}-%{version}.tar.xz
-# Source0-md5: f2929a35db8e74d304fd720ab96f5eee
+# Source0-md5: 5dbca7fbb46ce3383c78fccebc8a734b
Patch0: %{name}-info.patch
Patch1: %{name}-python.patch
-Patch2: config-update.patch
URL: http://www.gnu.org/software/libredwg/
BuildRequires: autoconf >= 2.69
BuildRequires: automake >= 1:1.14
@@ -27,11 +26,11 @@ BuildRequires: pcre2-16-devel
BuildRequires: perl-devel
BuildRequires: pkgconfig
BuildRequires: pslib-devel
-BuildRequires: python-devel >= 1:2.7
+BuildRequires: python3-devel >= 1:3.2
BuildRequires: rpm-perlprov
BuildRequires: rpm-pythonprov
BuildRequires: sed >= 4.0
-BuildRequires: swig-python >= 1.3.17
+BuildRequires: swig-python >= 2
BuildRequires: tar >= 1:1.22
BuildRequires: texinfo
BuildRequires: xz
@@ -53,7 +52,7 @@ CAD rozwijanego przez firmę AutoDesk.
Summary: Header files for LibreDWG library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibreDWG
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
# dwg.h file
Conflicts: libdwg-devel
@@ -67,7 +66,7 @@ Pliki nagłówkowe biblioteki LibreDWG.
Summary: Static LibreDWG library
Summary(pl.UTF-8): Statyczna biblioteka LibreDWG
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description static
Static LibreDWG library.
@@ -79,7 +78,7 @@ Statyczna biblioteka LibreDWG.
Summary: Perl interface for LibreDWG library
Summary(pl.UTF-8): Interfejs Perla do biblioteki LibreDWG
Group: Development/Languages/Perl
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n perl-libredwg
Perl interface for LibreDWG library.
@@ -87,23 +86,25 @@ Perl interface for LibreDWG library.
%description -n perl-libredwg -l pl.UTF-8
Interfejs Perla do biblioteki LibreDWG.
-%package -n python-libredwg
+%package -n python3-libredwg
Summary: Python interface for LibreDWG library
Summary(pl.UTF-8): Interfejs Pythona do biblioteki LibreDWG
Group: Development/Languages/Perl
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Obsoletes: python-libredwg < 0.14
-%description -n python-libredwg
+%description -n python3-libredwg
Python interface for LibreDWG library.
-%description -n python-libredwg -l pl.UTF-8
+%description -n python3-libredwg -l pl.UTF-8
Interfejs Pythona do biblioteki LibreDWG.
%prep
%setup -q
%patch -P0 -p1
%patch -P1 -p1
-%patch -P2 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env perl,%{__perl},' src/gen-dynapi.pl
# no git-version-gen in release tarball
%{__sed} -i -e 's/m4_esyscmd(.*git-version-gen.*)/%{version},/' configure.ac
@@ -115,15 +116,11 @@ Interfejs Pythona do biblioteki LibreDWG.
%{__autoheader}
%{__automake}
%configure \
- PYTHON="%{__python}" \
+ PYTHON="%{__python3}" \
--disable-silent-rules \
%{?with_static_libs:--enable-static} \
--with-perl-install=vendor
-# programs/dwg2ps.1 is missing in dist as of 0.13.2
-%{__make} -C src
-%{__make} -C programs regen-man
-
%{__make}
%install
@@ -135,8 +132,7 @@ rm -rf $RPM_BUILD_ROOT
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libredwg.la
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_LibreDWG.la
-%py_postclean
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_LibreDWG.la
# just example, nothing really useful
install -d $RPM_BUILD_ROOT%{_examplesdir}/python-libredwg-%{version}
@@ -172,8 +168,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/dwgwrite
%attr(755,root,root) %{_bindir}/dxf2dwg
%attr(755,root,root) %{_bindir}/dxfwrite
-%attr(755,root,root) %{_libdir}/libredwg.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libredwg.so.0
+%{_libdir}/libredwg.so.*.*.*
+%ghost %{_libdir}/libredwg.so.0
%{_mandir}/man1/dwg2SVG.1*
%{_mandir}/man1/dwg2dxf.1*
%{_mandir}/man1/dwg2ps.1*
@@ -191,7 +187,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libredwg.so
+%{_libdir}/libredwg.so
%{_includedir}/dwg.h
%{_includedir}/dwg_api.h
%{_pkgconfigdir}/libredwg.pc
@@ -206,10 +202,11 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/LibreDWG.pm
%dir %{perl_vendorarch}/auto
%dir %{perl_vendorarch}/auto/LibreDWG
-%attr(755,root,root) %{perl_vendorarch}/auto/LibreDWG/LibreDWG.so
+%{perl_vendorarch}/auto/LibreDWG/LibreDWG.so
-%files -n python-libredwg
+%files -n python3-libredwg
%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/_LibreDWG.so
-%{py_sitescriptdir}/LibreDWG.py[co]
+%{py3_sitedir}/_LibreDWG.so
+%{py3_sitescriptdir}/LibreDWG.py
+%{py3_sitescriptdir}/__pycache__/LibreDWG.cpython-*.pyc
%{_examplesdir}/python-libredwg-%{version}
diff --git a/config-update.patch b/config-update.patch
deleted file mode 100644
index 0a0e4c7..0000000
--- a/config-update.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From bc79b6445d44db5b5c755be343b728f7d175d932 Mon Sep 17 00:00:00 2001
-From: "Guilherme V. Favretto" <97709742+guifavretto at users.noreply.github.com>
-Date: Tue, 24 Mar 2026 19:43:57 -0300
-Subject: [PATCH] Fix compilation issues on modern systems with GCC
-
-In systems with modern glibc (like Arch Linux), including system
-headers before config.h could lead to _POSIX_C_SOURCE macro
-redefinition errors. Added include guards to config.h and a #ifndef
-protection for _POSIX_C_SOURCE to prevent this.
-
-* configure.ac: Add AH_TOP and AH_BOTTOM for CONFIG_H include guards.
- Use AH_VERBATIM to wrap _POSIX_C_SOURCE in #ifndef.
----
- configure.ac | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1148b6b8a4..d12af972ff 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -50,6 +50,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
- dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
- AC_CONFIG_HEADERS([src/config.h])
-+AH_TOP([#ifndef CONFIG_H
-+#define CONFIG_H 1])
-+AH_BOTTOM([#endif /* CONFIG_H */])
- AC_MSG_CHECKING([git version])
- AC_MSG_RESULT($PACKAGE_VERSION)
- AC_MSG_CHECKING([so version-info])
-@@ -223,7 +226,11 @@ darwin*|macos*)
- AC_DEFINE([_POSIX_C_SOURCE],[900000L],[Needed for all APPLE extensions])
- ;;
- *)
-- AC_DEFINE([_POSIX_C_SOURCE],[200809L],[Needed for strdup])
-+ AH_VERBATIM([_POSIX_C_SOURCE],
-+[/* Needed for strdup */
-+#ifndef _POSIX_C_SOURCE
-+# define _POSIX_C_SOURCE 200809L
-+#endif])
- ;;
- esac
- case "$host_os" in
diff --git a/libredwg-python.patch b/libredwg-python.patch
index 5935758..eb2d4d6 100644
--- a/libredwg-python.patch
+++ b/libredwg-python.patch
@@ -1,11 +1,11 @@
---- libredwg-0.12/bindings/python/Makefile.am.orig 2021-01-06 19:18:21.747727679 +0100
-+++ libredwg-0.12/bindings/python/Makefile.am 2021-01-06 19:20:34.227009977 +0100
-@@ -46,7 +46,7 @@
+--- libredwg-0.14/bindings/python/Makefile.am.orig 2026-04-05 07:34:00.000000000 +0200
++++ libredwg-0.14/bindings/python/Makefile.am 2026-11-06 19:59:04.284147661 +0100
+@@ -46,7 +46,7 @@ _LibreDWG_la_SOURCES = $(BUILT_SOURCES)
## more magic: SWIG_PYTHON_CPPFLAGS resolves to null and python includes
## are not passed to gcc via -I
_LibreDWG_la_CPPFLAGS = -I$(top_srcdir)/include $(AX_SWIG_PYTHON_CPPFLAGS)
--_LibreDWG_la_LDFLAGS = -module -no-undefined $(PYTHON_EXTRA_LDFLAGS)
-+_LibreDWG_la_LDFLAGS = -module -avoid-version -shared -no-undefined $(PYTHON_EXTRA_LDFLAGS)
+-_LibreDWG_la_LDFLAGS = -module -avoid-version -no-undefined \
++_LibreDWG_la_LDFLAGS = -module -shared -avoid-version -no-undefined \
+ $(PYTHON_SO_LDFLAGS) $(PYTHON_EXTRA_LDFLAGS)
_LibreDWG_la_LIBADD = ../../src/libredwg.la $(PYTHON_LIBS) $(PYTHON_EXTRA_LIBS)
- ## not elegant, but works
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libredwg.git/commitdiff/816497a8cb4aae4dd0ef6efe32428d04abb35fec
More information about the pld-cvs-commit
mailing list