summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-02-03 20:23:57 +0000
committerJustin Lecher <jlec@gentoo.org>2010-02-03 20:23:57 +0000
commita3589fce071a170db3ab1dfe6323be7115bedc44 (patch)
treedea2775f5485040156f0bdfa349effe20c867d8d /sci-libs/neartree
parentCVector is an ANSI C implementation of dynamic arrays to provide a crude appr... (diff)
downloadhistorical-a3589fce071a170db3ab1dfe6323be7115bedc44.tar.gz
historical-a3589fce071a170db3ab1dfe6323be7115bedc44.tar.bz2
historical-a3589fce071a170db3ab1dfe6323be7115bedc44.zip
Function library efficiently solving the Nearest Neighbor Problem(known as the post office problem)
Package-Manager: portage-2.2_rc62/cvs/Linux x86_64
Diffstat (limited to 'sci-libs/neartree')
-rw-r--r--sci-libs/neartree/ChangeLog13
-rw-r--r--sci-libs/neartree/Manifest18
-rw-r--r--sci-libs/neartree/files/2.1.4-FLAGS.patch58
-rw-r--r--sci-libs/neartree/files/2.1.4-gcc4.3.patch20
-rw-r--r--sci-libs/neartree/files/2.1.4-iterator.patch27
-rw-r--r--sci-libs/neartree/files/2.1.4-test.patch20
-rw-r--r--sci-libs/neartree/metadata.xml8
-rw-r--r--sci-libs/neartree/neartree-2.1.4.ebuild61
8 files changed, 225 insertions, 0 deletions
diff --git a/sci-libs/neartree/ChangeLog b/sci-libs/neartree/ChangeLog
new file mode 100644
index 000000000000..969b3c4c2f97
--- /dev/null
+++ b/sci-libs/neartree/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sci-libs/neartree
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/neartree/ChangeLog,v 1.1 2010/02/03 20:23:57 jlec Exp $
+
+*neartree-2.1.4 (03 Feb 2010)
+
+ 03 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org>
+ +files/2.1.4-FLAGS.patch, +files/2.1.4-gcc4.3.patch,
+ +files/2.1.4-iterator.patch, +files/2.1.4-test.patch,
+ +neartree-2.1.4.ebuild, +metadata.xml:
+ function library efficiently solving the Nearest Neighbor Problem(known as
+ the post office problem)
+
diff --git a/sci-libs/neartree/Manifest b/sci-libs/neartree/Manifest
new file mode 100644
index 000000000000..a38ce9ff3229
--- /dev/null
+++ b/sci-libs/neartree/Manifest
@@ -0,0 +1,18 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 2.1.4-FLAGS.patch 2506 RMD160 4348d93a6875bd4810eb05e37e06ae7739b215c5 SHA1 ccf6f7580729b05d2dc7527c9bc7a65c124ec7fb SHA256 3a9390047f038a30490545e97b0b4580295efc5d1a0ee6b3a6d13897c843ba98
+AUX 2.1.4-gcc4.3.patch 616 RMD160 9a3c54f125c8f8d15b026a8799d58aff6c7b9faf SHA1 7dc0d4a04b7a4f7456059da1ebf223ca699773d3 SHA256 a04edc6d830d13707adb4b386ad5f31cc93efae2e4168cfb6e94cd7c1bd8f6b0
+AUX 2.1.4-iterator.patch 845 RMD160 33c451d43b0817680818648e91ce146e5c2f71c2 SHA1 b0e7b24400eedd129a1a0bd4fffeada2a79c80bd SHA256 977f9d70688cbd42baeba9262ad113797bcee76e455629ca7fac26d06e2a7de8
+AUX 2.1.4-test.patch 638 RMD160 8d3352b9c48ed13f724d10e6551cca4df478e466 SHA1 86937e57f7e5d0f5e82d91b91bfe42394502d29b SHA256 0771a2a7ac552d56d8642388300ba1b4b51d781aeb89e7594ef9ea0129d5f0ad
+DIST neartree-2.1.4.zip 95970 RMD160 cbf90912f9ce8f162c5440bd67d695168c92c6c3 SHA1 aa5ef6174ed81423423145cf7facdc0f6a4decb8 SHA256 54ba8d6e35734586605221342b62b78ee11e88d7855e2ba34130deed5f70ef55
+EBUILD neartree-2.1.4.ebuild 1348 RMD160 ee8e211e8fe05d6aa523f25e311587b14935817b SHA1 8c525fe3bbae24a0077ddadcd7712b2f322e8cbc SHA256 c76c4b5020211086fb19ec37703a168fe34a5ff0bfd6f330d0ed18f6077be1af
+MISC ChangeLog 547 RMD160 fb975caa26ccfe541e8907465a184b77b3794276 SHA1 9776b8abdc739d007d00859eec657277d6b7fdb1 SHA256 ae7992f3082b4d6b2ebaad439797ebcbd24346a6a2fc3282ad615f7be049bc38
+MISC metadata.xml 215 RMD160 bc9c07aa91f2f175542244e4e4522a73558210a1 SHA1 facb283386de1c0b6b938cdcd4dde04d1694298b SHA256 13f32353652adbd3d934d41381cfc2cacc9e1127c508cebc73806cc1026ee80c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.14 (GNU/Linux)
+
+iEYEARECAAYFAktp22IACgkQgAnW8HDreRaIfQCfU1pbrCIySwkcnaISZNx+jtPT
+N0YAoIgsOCAKjpcaCXUxidUfJw8FxcTX
+=HwOk
+-----END PGP SIGNATURE-----
diff --git a/sci-libs/neartree/files/2.1.4-FLAGS.patch b/sci-libs/neartree/files/2.1.4-FLAGS.patch
new file mode 100644
index 000000000000..ef957881de8a
--- /dev/null
+++ b/sci-libs/neartree/files/2.1.4-FLAGS.patch
@@ -0,0 +1,58 @@
+diff --git a/Makefile b/Makefile
+index 10e9ba2..796670e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,11 +48,11 @@ RELEASE = 2.1.3
+ #
+ # Compiler and compilation flags
+ #
+-CC = gcc
++CC ?= gcc
+ ifneq ($(MSYSTEM),MINGW32)
+-CFLAGS = -g -O2 -Wall -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1
++CFLAGS += -ansi -DCNEARTREE_SAFE_TRIANG=1
+ else
+-CFLAGS = -g -O2 -Wall -DCNEARTREE_SAFE_TRIANG=1
++CFLAGS = -DCNEARTREE_SAFE_TRIANG=1
+ endif
+
+ #
+@@ -72,8 +72,8 @@ endif
+ # Uncomment the next two lines if CVector is installed locally in $(HOME)/include
+ # and $(HOME)/lib
+ #
+-#CVECTOR_INCLUDE = -I$(HOME)/include
+-#CVECTOR_LIBLOC = -L$(HOME)/lib
++CVECTOR_INCLUDE = -I/usr/include
++CVECTOR_LIBLOC = -L/usr/GENTOOLIBDIR
+
+ #
+ # Directories
+@@ -86,7 +86,7 @@ INC = $(ROOT)
+ EXAMPLES = $(ROOT)
+ TESTDATA = $(ROOT)
+ ifndef INSTALL_PREFIX
+-INSTALL_PREFIX = /usr/local
++INSTALL_PREFIX = /usr
+ #INSTALL_PREFIX = $(HOME)
+ endif
+
+@@ -111,12 +111,12 @@ CPPLIBRARIES = -lm
+ CLIBRARIES = $(CVECTOR_LIBLOC) -lCVector -lm
+
+ COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/lib
+-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
+-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined $(LDFLAGS)
++BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CXXFLAGS) $(LDFLAGS) $(INCLUDES)
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) $(LDFLAGS) -shared -I/usr/include
++BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -static-libtool-libs -I/usr/include
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
+
diff --git a/sci-libs/neartree/files/2.1.4-gcc4.3.patch b/sci-libs/neartree/files/2.1.4-gcc4.3.patch
new file mode 100644
index 000000000000..527254ce57d3
--- /dev/null
+++ b/sci-libs/neartree/files/2.1.4-gcc4.3.patch
@@ -0,0 +1,20 @@
+--- CNearTreeTest.cpp 2009-06-08 04:54:29.000000000 +0200
++++ CNearTreeTest.cpp.new 2009-07-25 12:36:33.000000000 +0200
+@@ -47,6 +47,7 @@
+ #include <cmath>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+
+ #ifndef USE_LOCAL_HEADERS
+ #include <TNear.h>
+--- TNear.h 2009-06-08 04:54:29.000000000 +0200
++++ TNear.h.new 2009-07-25 12:39:09.000000000 +0200
+@@ -272,6 +272,7 @@
+ #define TRIANG(a,b,c) ( (((b)+(c))-(a) >= 0))
+ #endif
+
++#include <algorithm>
+
+ //=======================================================================
+ // CNearTree is the root class for the neartree. The actual data of the
diff --git a/sci-libs/neartree/files/2.1.4-iterator.patch b/sci-libs/neartree/files/2.1.4-iterator.patch
new file mode 100644
index 000000000000..4563ecb8619d
--- /dev/null
+++ b/sci-libs/neartree/files/2.1.4-iterator.patch
@@ -0,0 +1,27 @@
+diff --git a/TNear.h b/TNear.h
+index d848b61..a5d255e 100644
+--- a/TNear.h
++++ b/TNear.h
+@@ -735,7 +735,7 @@ void BelongsToPoints( const T& t1, const T& t2, ContainerType& group1, Container
+ {
+ group1.clear();
+ group2.clear();
+- CNearTree<T>::iterator it;
++ typename CNearTree<T>::iterator it;
+
+ for ( it=this->begin( ); it!=this->end( ); ++it )
+ {
+@@ -756,11 +756,11 @@ void SeparateByRadius( const DistanceType radius, const T& tProbe, ContainerType
+ {
+ inside.clear();
+ outside.clear();
+- CNearTree<T>::iterator it;
++ typename CNearTree<T>::iterator it;
+
+ for ( it=this->begin( ); it!=this->end( ); ++it )
+ {
+- if( DistanceBetween( (*it), probe ) > radius )
++ if( DistanceBetween( (*it), tProbe ) > radius )
+ {
+ inside.insert( inside.end( ), (*it) );
+ }
diff --git a/sci-libs/neartree/files/2.1.4-test.patch b/sci-libs/neartree/files/2.1.4-test.patch
new file mode 100644
index 000000000000..382cfd17fa58
--- /dev/null
+++ b/sci-libs/neartree/files/2.1.4-test.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile b/Makefile
+index 10e9ba2..b9a349b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -303,14 +303,7 @@ tests: $(LIB) $(BIN) $(BIN)/CPPMain $(BIN)/CPPNearTreeTest \
+ $(BIN)/CMain 3458923 > $(TESTDATA)/CMain.lst
+ $(BIN)/CPPNearTreeTest
+ $(BIN)/CNearTreeTest
+-ifneq ($(MSYSTEM),MINGW32)
+- diff -b -c $(TESTDATA)/CPPMain_orig.lst $(TESTDATA)/CPPMain.lst
+- diff -b -c $(TESTDATA)/CMain_orig.lst $(TESTDATA)/CMain.lst
+-else
+- diff -b -c $(TESTDATA)/CPPMain_MINGW_orig.lst $(TESTDATA)/CPPMain.lst
+- diff -b -c $(TESTDATA)/CMain_MINGW_orig.lst $(TESTDATA)/CMain.lst
+-endif
+-
++
+ #
+ # Remove all non-source files
+ #
diff --git a/sci-libs/neartree/metadata.xml b/sci-libs/neartree/metadata.xml
new file mode 100644
index 000000000000..efb490d78817
--- /dev/null
+++ b/sci-libs/neartree/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>sci@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sci-libs/neartree/neartree-2.1.4.ebuild b/sci-libs/neartree/neartree-2.1.4.ebuild
new file mode 100644
index 000000000000..88a1c6790c41
--- /dev/null
+++ b/sci-libs/neartree/neartree-2.1.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/neartree/neartree-2.1.4.ebuild,v 1.1 2010/02/03 20:23:57 jlec Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_PN=NearTree
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Function library efficiently solving the Nearest Neighbor Problem(known as the post office problem)"
+HOMEPAGE="http://neartree.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}/${MY_PN}.zip -> ${P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/cvector"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-FLAGS.patch
+ epatch "${FILESDIR}"/${PV}-gcc4.3.patch
+ epatch "${FILESDIR}"/${PV}-iterator.patch
+ epatch "${FILESDIR}"/${PV}-test.patch
+
+ sed \
+ -e "s:GENTOOLIBDIR:$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -i Makefile
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ all || die
+}
+
+src_test() {
+ emake \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ tests || die
+}
+
+src_install() {
+ dobin bin/* || die "failed to install bins"
+ dolib.a lib/.libs/*.a || die "failed to install libs"
+
+ insinto /usr/include
+ doins *.h || die "failed to install includes"
+
+ dodoc README_NearTree.txt || die
+ dohtml *.html || die
+}