initial import (RHBZ#2226762)

This commit is contained in:
topazus 2023-07-28 15:34:53 +08:00
parent 85c5503306
commit ccef639b41
3 changed files with 84 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/lib2geom-1.3.tar.bz2

82
lib2geom.spec Normal file
View File

@ -0,0 +1,82 @@
%global forgeurl https://gitlab.com/inkscape/lib2geom
Version: 1.3
%forgemeta
Name: lib2geom
Release: %autorelease
Summary: Easy to use 2D geometry library in C++
License: LGPL-2.1-only AND MPL-1.1
URL: %{forgeurl}
Source0: %{forgesource}
# Fix EllipticalArc::expandToTransformed()
#Patch0: https://gitlab.com/inkscape/lib2geom/-/merge_requests/107.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: boost-devel
BuildRequires: gsl-devel
BuildRequires: double-conversion-devel
BuildRequires: gtest-devel
BuildRequires: ragel
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(gsl)
%description
2Geom is a C++ 2D geometry library geared towards robust processing of
computational geometry data associated with vector graphics.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%forgeautosetup -p1
%build
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-D2GEOM_BUILD_SHARED=ON \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
%cmake_build
%install
%cmake_install
%check
# skip elliptical-arc-test test on aarch64, ppc64le and s390x
# https://koji.fedoraproject.org/koji/taskinfo?taskID=103958899
# https://gitlab.com/inkscape/lib2geom/-/issues/67
%ifarch x86_64
%ctest
%else
%ctest -E elliptical-arc-test
%endif
%files
%license COPYING-LGPL-2.1 COPYING-MPL-1.1
%doc README.md
%{_libdir}/lib2geom.so.1*
%files devel
%dir %{_includedir}/2geom-*
%{_includedir}/2geom-*/2geom/
%dir %{_libdir}/cmake/2Geom
%{_libdir}/cmake/2Geom/*.cmake
%{_libdir}/lib2geom.so
%{_libdir}/pkgconfig/2geom.pc
%changelog
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (lib2geom-1.3.tar.bz2) = 2e24ec1496ad7cafcd457f8a7d201ddad0b92915889bef3015cec5238de8393bf7ce7f47799f4c72c9253ed50fdbdcf2f810f76fe4f62bf916ef3debe4c32cb1