2011-05-05 15:42:15 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Algorithm-QuadTree
|
|
|
|
#
|
2011-11-11 11:11:33 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-05-05 15:42:15 +00:00
|
|
|
#
|
2011-11-11 11:11:33 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2011-05-05 15:42:15 +00:00
|
|
|
|
|
|
|
Name: perl-Algorithm-QuadTree
|
|
|
|
Version: 0.1
|
|
|
|
Release: 1
|
|
|
|
AutoReqProv: on
|
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
License: Perl
|
2011-11-11 11:11:33 +00:00
|
|
|
Url: http://search.cpan.org/dist/Algorithm-QuadTree/
|
2011-05-05 15:42:15 +00:00
|
|
|
Summary: A QuadTree Algorithm class in pure Perl
|
2011-11-17 15:18:55 +00:00
|
|
|
Source: Algorithm-QuadTree-%{version}.tar.gz
|
2011-05-05 15:42:15 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%{perl_requires}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
|
|
|
|
%description
|
|
|
|
Algorithm::QuadTree implements a quadtree algorithm (QTA) in pure Perl.
|
|
|
|
Essentially, a QTA is used to access a particular area of a map very quickly.
|
|
|
|
This is especially useful in finding objects enclosed in a given region, or in
|
|
|
|
detecting intersection among objects. In fact, I wrote this module to rapidly
|
|
|
|
search through objects in a Tk::Canvas widget, but have since used it in other
|
|
|
|
non-Tk programs successfully. It is a classic memory/speed trade-off.
|
|
|
|
|
|
|
|
Lots of information about QTAs can be found on the web. But, very briefly, a
|
|
|
|
quadtree is a hierarchical data model that recursively decomposes a map into
|
|
|
|
smaller regions. Each node in the tree has 4 children nodes, each of which
|
|
|
|
represents one quarter of the area that the parent represents. So, the root node
|
|
|
|
represents the complete map. This map is then split into 4 equal quarters, each
|
|
|
|
of which is represented by one child node. Each of these children is now treated
|
|
|
|
as a parent, and its area is recursively split up into 4 equal areas, and so on
|
|
|
|
up to a desired depth.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n QuadTree
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
|
|
|
|
make
|
|
|
|
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
|
|
|
%perl_process_packlist
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README Changes
|
|
|
|
%doc %{_mandir}/man3/*
|
|
|
|
%{perl_vendorlib}/Algorithm
|
|
|
|
#%{perl_vendorarch}/auto/Algorithm
|
|
|
|
|
|
|
|
%changelog
|