]> git.pld-linux.org Git - packages/polyclipping.git/blob - polyclipping.spec
- initial from FC
[packages/polyclipping.git] / polyclipping.spec
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
7 Summary:        Polygon clipping library
8 Name:           polyclipping
9 Version:        6.2.1
10 Release:        1
11 License:        Boost
12 Group:          Libraries
13 URL:            http://sourceforge.net/projects/polyclipping
14 Source0:        http://downloads.sourceforge.net/polyclipping/clipper_ver%{version}.zip
15 # Source0-md5:  040821e66ec529f3d78f8ff7c4e256b2
16 BuildRequires:  cmake
17 BuildRequires:  dos2unix
18
19 %description
20 This library primarily performs the boolean clipping operations -
21 intersection, union, difference & xor - on 2D polygons. It also
22 performs polygon offsetting. The library handles complex
23 (self-intersecting) polygons, polygons with holes and polygons with
24 overlapping co-linear edges. Input polygons for clipping can use
25 EvenOdd, NonZero, Positive and Negative filling modes. The clipping
26 code is based on the Vatti clipping algorithm, and outperforms other
27 clipping libraries.
28
29 %package        devel
30 Summary:        Development files for %{name}
31 Group:          Development/Libraries
32 Requires:       %{name} = %{version}-%{release}
33
34 %description    devel
35 The %{name}-devel package contains libraries and header files for
36 developing applications that use %{name}.
37
38
39 %prep
40 %setup -qc
41
42 # Delete binaries
43 find . \( -name "*.exe" -o -name "*.dll" \) -delete
44
45 # Correct line ends and encodings
46 find . -type f -exec dos2unix -k {} \;
47
48 for filename in perl/perl_readme.txt README; do
49   iconv -f iso8859-1 -t utf-8 "${filename}" > "${filename}".conv && \
50     touch -r "${filename}" "${filename}".conv && \
51     mv "${filename}".conv "${filename}"
52 done
53
54 # Enable use_lines
55 sed -i 's|^//#define use_lines$|#define use_lines|' cpp/clipper.hpp
56
57
58 %build
59 install -d cpp/build
60 cd cpp/build
61 %{cmake} ..
62 %{__make}
63 cd ../..
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 %{__make} -C cpp/build install \
68         DESTDIR=$RPM_BUILD_ROOT
69
70 # Install agg header with corrected include statement
71 sed -e 's/\.\.\/clipper\.hpp/clipper.hpp/' < cpp/cpp_agg/agg_conv_clipper.h > $RPM_BUILD_ROOT/%{_includedir}/%{name}/agg_conv_clipper.h
72
73 %post -p /sbin/ldconfig
74 %postun -p /sbin/ldconfig
75
76 %files
77 %defattr(644,root,root,755)
78 %doc License.txt README
79 %doc "Third\ Party/Haskell" "Third\ Party/perl" "Third\ Party/ruby" "Third\ Party/python" Documentation
80 %attr(755,root,root) %ghost %{_libdir}/lib%{name}.so.19
81 %attr(755,root,root) %{_libdir}/lib%{name}.so.*.*
82
83 %files devel
84 %defattr(644,root,root,755)
85 %{_npkgconfigdir}/%{name}.pc
86 %{_includedir}/%{name}
87 %attr(755,root,root) %{_libdir}/lib%{name}.so
88
89 %changelog
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
This page took 0.087779 seconds and 3 git commands to generate.