3 %bcond_without tests # do not perform "make test"
6 %define pnam ConvexHull
7 %include /usr/lib/rpm/macros.perl
8 Summary: Math::ConvexHull - Calculate convex hulls using Graham's scan (n*log(n))
9 Name: perl-Math-ConvexHull
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 5d9225c5fadf5c71172cd88c81661d4d
17 URL: http://search.cpan.org/dist/Math-ConvexHull/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Math::ConvexHull is a simple module that calculates convex hulls from a set
25 of points in 2D space. It is a straightforward implementation of the algorithm
26 known as Graham's scan which, with complexity of O(n*log(n)), is the fastest
27 known method of finding the convex hull of an arbitrary set of points.
28 There are some methods of eliminating points that cannot be part of the
29 convex hull. These may or may not be implemented in a future version.
31 The implementation cannot deal with duplicate points. Therefore, points
32 which are very, very close (think floating point close) to the
33 previous point are dropped since version 1.02 of the module.
34 However, if you pass in randomly ordered data which contains duplicate points,
35 this safety measure might not help you. In that case, you will have to
36 remove duplicates yourself.
38 None by default, but you may choose to have the convex_hull() subroutine
39 exported to your namespace using standard Exporter semantics.
42 %setup -q -n %{pdir}-%{pnam}-%{version}
45 %{__perl} Makefile.PL \
49 %{?with_tests:%{__make} test}
52 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55 DESTDIR=$RPM_BUILD_ROOT
58 rm -rf $RPM_BUILD_ROOT
61 %defattr(644,root,root,755)
63 %{perl_vendorlib}/Math/*.pm