]> git.pld-linux.org Git - packages/lib2geom.git/blame - lib2geom.spec
Release 3 (by relup.sh)
[packages/lib2geom.git] / lib2geom.spec
CommitLineData
72198c6f
JB
1#
2# Conditional build:
3%bcond_without python # Python bindings
4#
5Summary: 2Geom - easy 2D graphics library
6Summary(pl.UTF-8): 2Geom - łatwa biblioteka do grafiki 2D
7Name: lib2geom
8Version: 1.1
6206caf6 9Release: 3
72198c6f
JB
10License: LGPL v2.1 or MPL v1.1
11Group: Libraries
12#Source0Download: https://gitlab.com/inkscape/lib2geom/-/tags
13Source0: https://gitlab.com/inkscape/lib2geom/-/archive/%{version}/%{name}-%{version}.tar.bz2
14# Source0-md5: 438a95f4c92b8370b3ab00a843c8a5fa
15Patch0: %{name}-pc.patch
16Patch1: %{name}-python-install.patch
17URL: https://gitlab.com/inkscape/lib2geom
18BuildRequires: boost-devel >= 1.60
19%{?with_python:BuildRequires: boost-python3-devel >= 1.60}
20BuildRequires: cairo-devel
21BuildRequires: cmake >= 3.12
22BuildRequires: double-conversion-devel
23BuildRequires: glib2-devel >= 2.0
24BuildRequires: gsl-devel
25BuildRequires: gtk+3-devel >= 3.0
26BuildRequires: pkgconfig
27%{?with_python:BuildRequires: python3-Cython >= 0.16}
28%{?with_python:BuildRequires: python3-devel >= 1:3.2}
29BuildRequires: libstdc++-devel >= 6:7
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
332Geom is a C++ 2D geometry library geared towards robust processing of
34computational geometry data associated with vector graphics. The
35primary design consideration is ease of use and clarity. It is
36dual-licensed under LGPL 2.1 and MPL 1.1.
37
38%description -l pl.UTF-8
392Geom to biblioteka C++ do geometrii 2D, nakierowana głównie na bogate
40przetwarzanie danych geometrii obliczeniowej, związanych z grafiką
41wektorową. Główne założenia projektowe to łatwość użycia i
42przejrzystość. Kod biblioteki jest na podwójnej licencji LGPL 2.1 i
43MPL 1.1.
44
45%package devel
46Summary: Header files for 2Geom library
47Summary(pl.UTF-8): Pliki nagłówkowe biblioteki 2Geom
48Group: Development/Libraries
49Requires: %{name} = %{version}-%{release}
50Requires: boost-devel >= 1.60
51Requires: gsl-devel
52Requires: libstdc++-devel >= 6:7
53
54%description devel
55Header files for 2Geom library.
56
57%description devel -l pl.UTF-8
58Pliki nagłówkowe biblioteki 2Geom.
59
60%package -n python3-py2geom
61Summary: Python bindings for lib2geom
62Summary(pl.UTF-8): Wiązania Pythona do lib2geom
63Group: Libraries/Python
64Requires: %{name} = %{version}-%{release}
65
66%description -n python3-py2geom
67Boost-based Python bindings for lib2geom.
68
69%description -n python3-py2geom -l pl.UTF-8
70Wiązania Pythona do lib2geom oparte na bibliotece Boost.
71
72%prep
73%setup -q
74%patch0 -p1
75%patch1 -p1
76
77%build
78install -d build
79cd build
80%cmake .. \
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}
86
87%{__make}
88
89%if %{with python}
90# cy2geom code seems outdated
91#%{__make} -C src/cython
92
93%{__make} -C src/py2geom
94%endif
95
96%install
97rm -rf $RPM_BUILD_ROOT
98
99%{__make} -C build install \
100 DESTDIR=$RPM_BUILD_ROOT
101
102%if %{with python}
103%{__make} -C build/src/py2geom install \
104 DESTDIR=$RPM_BUILD_ROOT
105
106%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
107%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
108%endif
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%post -p /sbin/ldconfig
114%postun -p /sbin/ldconfig
115
116%files
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
120
121%files devel
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
127
128%if %{with python}
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
135%endif
This page took 0.112079 seconds and 4 git commands to generate.