3 %bcond_without python # Python bindings
5 Summary: 2Geom - easy 2D graphics library
6 Summary(pl.UTF-8): 2Geom - łatwa biblioteka do grafiki 2D
10 License: LGPL v2.1 or MPL v1.1
12 #Source0Download: https://gitlab.com/inkscape/lib2geom/-/tags
13 Source0: https://gitlab.com/inkscape/lib2geom/-/archive/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5: 438a95f4c92b8370b3ab00a843c8a5fa
15 Patch0: %{name}-pc.patch
16 Patch1: %{name}-python-install.patch
17 URL: https://gitlab.com/inkscape/lib2geom
18 BuildRequires: boost-devel >= 1.60
19 %{?with_python:BuildRequires: boost-python3-devel >= 1.60}
20 BuildRequires: cairo-devel
21 BuildRequires: cmake >= 3.12
22 BuildRequires: double-conversion-devel
23 BuildRequires: glib2-devel >= 2.0
24 BuildRequires: gsl-devel
25 BuildRequires: gtk+3-devel >= 3.0
26 BuildRequires: pkgconfig
27 %{?with_python:BuildRequires: python3-Cython >= 0.16}
28 %{?with_python:BuildRequires: python3-devel >= 1:3.2}
29 BuildRequires: libstdc++-devel >= 6:7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 2Geom is a C++ 2D geometry library geared towards robust processing of
34 computational geometry data associated with vector graphics. The
35 primary design consideration is ease of use and clarity. It is
36 dual-licensed under LGPL 2.1 and MPL 1.1.
38 %description -l pl.UTF-8
39 2Geom to biblioteka C++ do geometrii 2D, nakierowana głównie na bogate
40 przetwarzanie danych geometrii obliczeniowej, związanych z grafiką
41 wektorową. Główne założenia projektowe to łatwość użycia i
42 przejrzystość. Kod biblioteki jest na podwójnej licencji LGPL 2.1 i
46 Summary: Header files for 2Geom library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki 2Geom
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: boost-devel >= 1.60
52 Requires: libstdc++-devel >= 6:7
55 Header files for 2Geom library.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki 2Geom.
60 %package -n python3-py2geom
61 Summary: Python bindings for lib2geom
62 Summary(pl.UTF-8): Wiązania Pythona do lib2geom
63 Group: Libraries/Python
64 Requires: %{name} = %{version}-%{release}
66 %description -n python3-py2geom
67 Boost-based Python bindings for lib2geom.
69 %description -n python3-py2geom -l pl.UTF-8
70 Wiązania Pythona do lib2geom oparte na bibliotece Boost.
81 -D2GEOM_BUILD_SHARED=ON \
82 %{?with_python:-D2GEOM_BOOST_PYTHON=ON} \
83 %{?with_python:-D2GEOM_CYTHON_BINDINGS=ON} \
84 -DCMAKE_SKIP_RPATH=ON \
85 -DPYTHON3_SITEARCH_INSTALL_DIR=%{py3_sitedir}
90 # cy2geom code seems outdated
91 #%{__make} -C src/cython
93 %{__make} -C src/py2geom
97 rm -rf $RPM_BUILD_ROOT
99 %{__make} -C build install \
100 DESTDIR=$RPM_BUILD_ROOT
103 %{__make} -C build/src/py2geom install \
104 DESTDIR=$RPM_BUILD_ROOT
106 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
107 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
111 rm -rf $RPM_BUILD_ROOT
113 %post -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
117 %defattr(644,root,root,755)
118 %doc AUTHORS.md LICENSE.md NEWS.md README.md TODO.md
119 %attr(755,root,root) %{_libdir}/lib2geom.so.1.1.0
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{_libdir}/lib2geom.so
124 %{_includedir}/2geom-1.1.0
125 %{_pkgconfigdir}/2geom.pc
126 %{_libdir}/cmake/2Geom
129 %files -n python3-py2geom
130 %defattr(644,root,root,755)
131 %dir %{py3_sitedir}/py2geom
132 %{py3_sitedir}/py2geom/__pycache__
133 %{py3_sitedir}/py2geom/__init__.py
134 %attr(755,root,root) %{py3_sitedir}/py2geom/_py2geom.so