Name: libredwg Version: 0.13 Release: %autorelease Summary: GNU C library and programs to read and write DWG files License: GPL-3.0-or-later URL: https://www.gnu.org/software/libredwg/ #Source0: https://ftp.gnu.org/gnu/libredwg/libredwg-%{version}.tar.xz #Source0: https://github.com/LibreDWG/libredwg/releases/download/%{version}/libredwg-%{version}.tar.xz Source0: https://github.com/LibreDWG/libredwg/archive/%{version}/libredwg-%{version}.tar.gz Source1: https://github.com/zserge/jsmn/archive/85695f3d5903b1cd5b4030efe50db3b4f5f3c928.tar.gz Patch0: https://github.com/LibreDWG/libredwg/commit/d0208db81cfffa588b1618c329eda2e76718011e.patch Patch1: https://github.com/LibreDWG/libredwg/commit/5c450c78ceb074ea3befcea954964f2cb7d35b08.patch BuildRequires: gcc BuildRequires: swig BuildRequires: python3-devel BuildRequires: perl-devel BuildRequires: perl-macros BuildRequires: perl(Convert::Binary::C) BuildRequires: perl(ExtUtils::Embed) BuildRequires: pcre2-devel BuildRequires: pslib-devel BuildRequires: libasan BuildRequires: libubsan # Required for tests. BuildRequires: python3-libxml2 BuildRequires: pcre2 BuildRequires: pcre2-utf16 # no big-endian. s390 untested ExcludeArch: ppcle64 s390x %description GNU LibreDWG is a free C library to handle DWG files. It aims to be a free replacement for the OpenDWG libraries. DWG is the native file format of AutoCAD. LibreDWG is based on LibDWG, originally written by Felipe Castro. LibreDWG is in beta development stage. Not all planned features are yet completed, but the API should stay mostly stable. At the moment our decoder (i.e. reader) is done, just some very advanced R2010+ and pre-R13 entities fail to read and are skipped over. The writer is good enough for R2000. Among the example applications we wrote using LibreDWG is a reader (from dwg, dxf, json), a writer (convert from dwg, dxf, json or add from scratch), a rewriter (i.e. saveas), an initial SVG and Postscript conversion, converters from and to DXF and JSON, dwggrep to search for text, and dwglayer to print the list of layers. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries, perl5 and python bindings and header files for developing applications that use %{name}. For more serious development use the git repository, and add parallel, timeout and potion. %package -n python3-LibreDWG Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-LibreDWG The python3-LibreDWG package contains the python bindings for developing applications that use %{name}. %package -n perl-LibreDWG Summary: Perl bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release}, perl %description -n perl-LibreDWG The perl-LibreDWG package contains the perl bindings for developing applications that use %{name}. %prep %autosetup -p1 tar xf %{SOURCE1} -C jsmn/ --strip-components=1 %build export CFLAGS="%{optflags} -Wno-alloc-size" %cmake %cmake_build %install %cmake_install %check %ctest %files %license COPYING %doc README AUTHORS NEWS doc/LibreDWG.pdf %files devel %files -n python3-LibreDWG %files -n perl-LibreDWG %changelog %autochangelog