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