3 %bcond_without tests # do not perform "make test"
6 %define pnam ConvexHull-MonotoneChain
7 Summary: Math::ConvexHull::MonotoneChain - Andrew's monotone chain algorithm for finding a convex hull in 2D
8 Name: perl-Math-ConvexHull-MonotoneChain
12 Group: Development/Languages/Perl
13 Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5: eaac1a9350f914fea5bbce2029b95b57
15 URL: http://search.cpan.org/dist/Math-ConvexHull-MonotoneChain/
16 BuildRequires: perl-devel >= 1:5.8.0
17 BuildRequires: rpm-perlprov >= 4.1-13
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 This is somewhat experimental still.
23 This (XS) module optionally exports a single function convex_hull
24 which calculates the convex hull of the input points and returns it.
25 The algorithm is O(n log n) due to having to sort the input list, but
26 should be somewhat faster than a plain Graham's scan (also O(n log n))
27 in practice since it avoids polar coordinates.
30 %setup -q -n %{pdir}-%{pnam}-%{version}
33 %{__perl} Makefile.PL \
37 OPTIMIZE="%{rpmcflags}"
39 %{?with_tests:%{__make} test}
42 rm -rf $RPM_BUILD_ROOT
44 %{__make} pure_install \
45 DESTDIR=$RPM_BUILD_ROOT
48 rm -rf $RPM_BUILD_ROOT
51 %defattr(644,root,root,755)
53 %dir %{perl_vendorarch}/Math/ConvexHull
54 %{perl_vendorarch}/Math/ConvexHull/MonotoneChain.pm
55 %dir %{perl_vendorarch}/auto/Math/ConvexHull
56 %dir %{perl_vendorarch}/auto/Math/ConvexHull/MonotoneChain
57 %attr(755,root,root) %{perl_vendorarch}/auto/Math/ConvexHull/MonotoneChain/MonotoneChain.so