]> git.pld-linux.org Git - packages/polyclipping.git/blame - polyclipping.spec
- added pc patch (install arch-specific .pc file in arch-dependent location)
[packages/polyclipping.git] / polyclipping.spec
CommitLineData
01e1d5d6
AM
1# The Clipper C++ crystallographic library already uses the name "clipper".
2# The developer is fine with the choosen name.
3
4# API monitoring
5# http://upstream-tracker.org/versions/clipper.html
6
7Summary: Polygon clipping library
ed30f6d7 8Summary(pl.UTF-8): Biblioteka do obcinania wielokątów
01e1d5d6 9Name: polyclipping
3ff5ab22 10Version: 6.4.2
ed30f6d7 11Release: 2
01e1d5d6
AM
12License: Boost
13Group: Libraries
01e1d5d6 14Source0: http://downloads.sourceforge.net/polyclipping/clipper_ver%{version}.zip
3ff5ab22 15# Source0-md5: 100b4ec56c5308bac2d10f3966e35e11
ed30f6d7
JB
16Patch0: %{name}-pc.patch
17URL: https://sourceforge.net/projects/polyclipping/
18BuildRequires: cmake >= 2.6.0
01e1d5d6 19BuildRequires: dos2unix
01869d60
ER
20BuildRequires: iconv
21BuildRequires: libstdc++-devel
22BuildRequires: pkgconfig
d06b15ed
ER
23BuildRequires: sed >= 4.0
24BuildRequires: unzip
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
01e1d5d6
AM
26
27%description
28This library primarily performs the boolean clipping operations -
29intersection, union, difference & xor - on 2D polygons. It also
30performs polygon offsetting. The library handles complex
31(self-intersecting) polygons, polygons with holes and polygons with
32overlapping co-linear edges. Input polygons for clipping can use
33EvenOdd, NonZero, Positive and Negative filling modes. The clipping
34code is based on the Vatti clipping algorithm, and outperforms other
35clipping libraries.
36
ed30f6d7
JB
37%description -l pl.UTF-8
38Biblioteka do wykonywania logicznych operacji na wielokątach
39dwuwymiarowych - przecięć, sumy, różnicy i różnicy symetrycznej.
40Wykonuje także obcinanie marginesów. Biblioteka obsługuje wielokąty
41złożone (samoprzecinające się), wielokąty z dziurami oraz z
42nakładającymi się liniowo krawędziami. Wejściowe wielokąty mogą
43używać trybu wypełniania EvenOdd, NonZero, Positive i Negative. Kod
44obcinania jest oparty na algorytmie Vattiego i jest szybszy od wielu
45innych bibliotek.
46
d06b15ed 47%package devel
ed30f6d7
JB
48Summary: Development files for polyclipping library
49Summary(pl.UTF-8): Pliki programistyczne biblioteki polyclipping
01e1d5d6
AM
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52
d06b15ed 53%description devel
ed30f6d7
JB
54This package contains the header files for developing applications
55that use polyclipping library.
56
57%description devel -l pl.UTF-8
58Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
59wykorzystujących bibliotekę polyclipping.
01e1d5d6 60
01e1d5d6
AM
61%prep
62%setup -qc
ed30f6d7 63%patch0 -p1
01e1d5d6
AM
64
65# Delete binaries
d06b15ed 66find . \( -name "*.exe" -o -name "*.dll" \) -print0 | xargs -0 rm -v
01e1d5d6
AM
67
68# Correct line ends and encodings
69find . -type f -exec dos2unix -k {} \;
70
71for filename in perl/perl_readme.txt README; do
d06b15ed
ER
72 iconv -f iso8859-1 -t utf-8 "${filename}" > "${filename}".conv && \
73 touch -r "${filename}" "${filename}".conv && \
ed30f6d7 74 %{__mv} "${filename}".conv "${filename}"
01e1d5d6
AM
75done
76
77# Enable use_lines
78sed -i 's|^//#define use_lines$|#define use_lines|' cpp/clipper.hpp
79
01e1d5d6
AM
80%build
81install -d cpp/build
82cd cpp/build
ed30f6d7
JB
83%cmake .. \
84 -DCMAKE_INSTALL_PKGCONFIGDIR=%{_pkgconfigdir}
01e1d5d6 85%{__make}
01e1d5d6
AM
86
87%install
88rm -rf $RPM_BUILD_ROOT
ed30f6d7 89
01e1d5d6
AM
90%{__make} -C cpp/build install \
91 DESTDIR=$RPM_BUILD_ROOT
92
93# Install agg header with corrected include statement
d06b15ed 94sed -e 's/\.\.\/clipper\.hpp/clipper.hpp/' < cpp/cpp_agg/agg_conv_clipper.h > $RPM_BUILD_ROOT%{_includedir}/%{name}/agg_conv_clipper.h
01e1d5d6 95
d06b15ed
ER
96%clean
97rm -rf $RPM_BUILD_ROOT
01e1d5d6 98
ed30f6d7
JB
99%post -p /sbin/ldconfig
100%postun -p /sbin/ldconfig
101
01e1d5d6
AM
102%files
103%defattr(644,root,root,755)
ed30f6d7 104%doc License.txt README Third?Party/{Flash,Go,Haskell,Java,LuaJIT,Matlab,ObjectiveC,perl,ruby}/*_readme.txt
d06b15ed 105%attr(755,root,root) %{_libdir}/libpolyclipping.so.*.*.*
3ff5ab22 106%attr(755,root,root) %ghost %{_libdir}/libpolyclipping.so.22
01e1d5d6
AM
107
108%files devel
109%defattr(644,root,root,755)
ed30f6d7
JB
110%attr(755,root,root) %{_libdir}/libpolyclipping.so
111%{_includedir}/polyclipping
112%{_pkgconfigdir}/polyclipping.pc
This page took 0.090704 seconds and 4 git commands to generate.