summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/neartree
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/neartree')
-rw-r--r--sci-libs/neartree/Manifest1
-rw-r--r--sci-libs/neartree/files/2.1.4-test.patch20
-rw-r--r--sci-libs/neartree/files/2.3.1-gentoo.patch100
-rw-r--r--sci-libs/neartree/files/2.3.2-gentoo.patch82
-rw-r--r--sci-libs/neartree/files/2.3.2-notest.patch22
-rw-r--r--sci-libs/neartree/files/3.1.1-gentoo.patch98
-rw-r--r--sci-libs/neartree/files/3.1.1-notest.patch34
-rw-r--r--sci-libs/neartree/files/3.1.1-test.patch34
-rw-r--r--sci-libs/neartree/files/CMakeLists.txt21
-rw-r--r--sci-libs/neartree/metadata.xml8
-rw-r--r--sci-libs/neartree/neartree-3.1.1-r3.ebuild33
11 files changed, 453 insertions, 0 deletions
diff --git a/sci-libs/neartree/Manifest b/sci-libs/neartree/Manifest
new file mode 100644
index 000000000000..6a6335df6739
--- /dev/null
+++ b/sci-libs/neartree/Manifest
@@ -0,0 +1 @@
+DIST neartree-3.1.1.tar.gz 124848 SHA256 5f26d0bef816f492d3939fbe06b8523a495a1fe4d06e9f8283f68a55436961ae SHA512 dca94cdc46610f3636f958cb361eecdc2b8ba7cf2192043810262f902b1999229eb4d00823cd96790f35c15305f6ecbef85710328776a2f1d306d9d3d4ca39eb WHIRLPOOL a16efe30e73ce07bb6ee149718db4b6a72f8edbc38a196867bb4a13e502919149cc1dace8eb4b84d8505d967752e8c2c4c691191f3761ccd68b55a431de572a7
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/files/2.3.1-gentoo.patch b/sci-libs/neartree/files/2.3.1-gentoo.patch
new file mode 100644
index 000000000000..aac9c169f620
--- /dev/null
+++ b/sci-libs/neartree/files/2.3.1-gentoo.patch
@@ -0,0 +1,100 @@
+diff --git a/Makefile b/Makefile
+index 38b63c5..4e6bc40 100644
+--- a/Makefile
++++ b/Makefile
+@@ -42,17 +42,17 @@
+
+ # Version string
+ VERSION = 3:0:0
+-RELEASE = 2.3
++RELEASE = 2.3.1
+
+
+ #
+ # 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 = $(DESTDIR)/usr
+ #INSTALL_PREFIX = $(HOME)
+ endif
+
+@@ -111,10 +111,10 @@ 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
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/GENTOOLIBDIR $(LDFLAGS)
+ BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CXXFLAGS) $(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
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+@@ -221,10 +221,10 @@ all: $(LIB) $(BIN) $(SOURCE) $(HEADERS) \
+ $(LIB)/libCNearTree.$(LIB_EXT) \
+ $(BIN)/CPPMain $(BIN)/CMain $(BIN)/CPPNearTreeTest $(BIN)/CNearTreeTest
+
+-install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include \
++install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/GENTOOLIBDIR $(INSTALL_PREFIX)/include \
+ $(INC) $(LIB)/libCNearTree.$(LIB_EXT) $(INC)/TNear.h $(INC)/CNearTree.h $(INC)/rhrand.h
+- $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
+- $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
++ $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
++ $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
+ -cp $(INSTALL_PREFIX)/include/TNear.h $(INSTALL_PREFIX)/include/TNear_old.h
+ -cp $(INSTALL_PREFIX)/include/CNearTree.h $(INSTALL_PREFIX)/include/CNearTree_old.h
+ cp $(INC)/TNear.h $(INSTALL_PREFIX)/include/TNear.h
+@@ -233,14 +233,6 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include
+ chmod 644 $(INSTALL_PREFIX)/include/TNear.h
+ chmod 644 $(INSTALL_PREFIX)/include/CNearTree.h
+ chmod 644 $(INSTALL_PREFIX)/include/rhrand.h
+- echo "Testing final install dynamic"
+- $(BUILD_COMMAND_DYNAMIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_dynamic
+- $(BIN)/CNearTreeTest_dynamic
+- echo "Testing final install static"
+- $(BUILD_COMMAND_STATIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_static
+- $(BIN)/CNearTreeTest_static
+
+
+
+@@ -250,8 +242,8 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include
+ $(INSTALL_PREFIX):
+ mkdir -p $(INSTALL_PREFIX)
+
+-$(INSTALL_PREFIX)/lib: $(INSTALL_PREFIX)
+- mkdir -p $(INSTALL_PREFIX)/lib
++$(INSTALL_PREFIX)/GENTOOLIBDIR: $(INSTALL_PREFIX)
++ mkdir -p $(INSTALL_PREFIX)/GENTOOLIBDIR
+
+ $(INSTALL_PREFIX)/bin: $(INSTALL_PREFIX)
+ mkdir -p $(INSTALL_PREFIX)/bin
diff --git a/sci-libs/neartree/files/2.3.2-gentoo.patch b/sci-libs/neartree/files/2.3.2-gentoo.patch
new file mode 100644
index 000000000000..4ddf55f7526b
--- /dev/null
+++ b/sci-libs/neartree/files/2.3.2-gentoo.patch
@@ -0,0 +1,82 @@
+ Makefile | 28 ++++++++++++++--------------
+ 1 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2a5c626..0698510 100644
+--- a/Makefile
++++ b/Makefile
+@@ -50,11 +50,11 @@ RELEASE = 2.3.2
+ #
+ # 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
+
+ #
+@@ -74,8 +74,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
+@@ -88,7 +88,7 @@ INC = $(ROOT)
+ EXAMPLES = $(ROOT)
+ TESTDATA = $(ROOT)
+ ifndef INSTALL_PREFIX
+-INSTALL_PREFIX = /usr/local
++INSTALL_PREFIX = $(DESTDIR)/usr
+ #INSTALL_PREFIX = $(HOME)
+ endif
+
+@@ -113,10 +113,10 @@ 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
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/GENTOOLIBDIR $(LDFLAGS)
+ BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CXXFLAGS) $(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
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+@@ -223,11 +223,11 @@ all: $(LIB) $(BIN) $(SOURCE) $(HEADERS) \
+ $(LIB)/libCNearTree.$(LIB_EXT) \
+ $(BIN)/CPPMain $(BIN)/CMain $(BIN)/CPPNearTreeTest $(BIN)/CNearTreeTest
+
+-install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include \
++install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/GENTOOLIBDIR $(INSTALL_PREFIX)/include \
+ $(INC) $(LIB)/libCNearTree.$(LIB_EXT) $(INC)/TNear.h $(INC)/CNearTree.h \
+ $(INC)/rhrand.h $(INC)/triple.h
+- $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
+- $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
++ $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
++ $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
+ -cp $(INSTALL_PREFIX)/include/TNear.h $(INSTALL_PREFIX)/include/TNear_old.h
+ -cp $(INSTALL_PREFIX)/include/CNearTree.h $(INSTALL_PREFIX)/include/CNearTree_old.h
+ cp $(INC)/TNear.h $(INSTALL_PREFIX)/include/TNear.h
+@@ -255,8 +255,8 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include
+ $(INSTALL_PREFIX):
+ mkdir -p $(INSTALL_PREFIX)
+
+-$(INSTALL_PREFIX)/lib: $(INSTALL_PREFIX)
+- mkdir -p $(INSTALL_PREFIX)/lib
++$(INSTALL_PREFIX)/GENTOOLIBDIR: $(INSTALL_PREFIX)
++ mkdir -p $(INSTALL_PREFIX)/GENTOOLIBDIR
+
+ $(INSTALL_PREFIX)/bin: $(INSTALL_PREFIX)
+ mkdir -p $(INSTALL_PREFIX)/bin
diff --git a/sci-libs/neartree/files/2.3.2-notest.patch b/sci-libs/neartree/files/2.3.2-notest.patch
new file mode 100644
index 000000000000..f49d1d7edad7
--- /dev/null
+++ b/sci-libs/neartree/files/2.3.2-notest.patch
@@ -0,0 +1,22 @@
+ Makefile | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2a5c626..cab4102 100644
+--- a/Makefile
++++ b/Makefile
+@@ -238,14 +238,6 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include
+ chmod 644 $(INSTALL_PREFIX)/include/CNearTree.h
+ chmod 644 $(INSTALL_PREFIX)/include/rhrand.h
+ chmod 644 $(INSTALL_PREFIX)/include/triple.h
+- echo "Testing final install dynamic"
+- $(BUILD_COMMAND_DYNAMIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_dynamic
+- $(BIN)/CNearTreeTest_dynamic
+- echo "Testing final install static"
+- $(BUILD_COMMAND_STATIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_static
+- $(BIN)/CNearTreeTest_static
+
+
+
diff --git a/sci-libs/neartree/files/3.1.1-gentoo.patch b/sci-libs/neartree/files/3.1.1-gentoo.patch
new file mode 100644
index 000000000000..4f72e022e345
--- /dev/null
+++ b/sci-libs/neartree/files/3.1.1-gentoo.patch
@@ -0,0 +1,98 @@
+From eb88a598f46f835782ba93bfbde68761cb159f4c Mon Sep 17 00:00:00 2001
+Message-Id: <eb88a598f46f835782ba93bfbde68761cb159f4c.1323853429.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 14 Dec 2011 09:50:42 +0100
+Subject: [PATCH 1/2] gentoo.patch
+
+Conflicts:
+
+ Makefile
+---
+ Makefile | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5c92d8b..859363e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ RELEASE = 3.1
+ #
+-CC = gcc
+ ifneq ($(MSYSTEM),MINGW32)
+-CFLAGS = -g -O2 -Wall -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1
++CFLAGS += -ansi -DCNEARTREE_SAFE_TRIANG=1
+ TIME = time
+ else
+-CFLAGS = -g -O2 -Wall -DCNEARTREE_SAFE_TRIANG=1
+-TIME =
++CFLAGS += -DCNEARTREE_SAFE_TRIANG=1
++TIME =
+ endif
+
+ #
+@@ -76,8 +76,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
+@@ -90,7 +90,7 @@ INC = $(ROOT)
+ EXAMPLES = $(ROOT)
+ TESTDATA = $(ROOT)
+ ifndef INSTALL_PREFIX
+-INSTALL_PREFIX = /usr/local
++INSTALL_PREFIX = $(DESTDIR)/usr
+ #INSTALL_PREFIX = $(HOME)
+ endif
+
+@@ -115,10 +115,10 @@ 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) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/GENTOOLIBDIR $(LDFLAGS)
+ BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CXXFLAGS) $(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
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+@@ -223,13 +223,13 @@ endif
+ #
+ all: $(LIB) $(BIN) $(SOURCE) $(HEADERS) \
+ $(LIB)/libCNearTree.$(LIB_EXT) \
+- $(BIN)/CPPMain $(BIN)/CMain $(BIN)/CPPNearTreeTest $(BIN)/CNearTreeTest $(BIN)/CNearTreeTestInst
++ $(BIN)/CPPMain $(BIN)/CMain $(BIN)/CPPNearTreeTest $(BIN)/CNearTreeTest
+
+-install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include \
++install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/GENTOOLIBDIR $(INSTALL_PREFIX)/include \
+ $(INC) $(LIB)/libCNearTree.$(LIB_EXT) $(INC)/TNear.h $(INC)/CNearTree.h \
+ $(INC)/rhrand.h $(INC)/triple.h
+- $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
+- $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
++ $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
++ $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/GENTOOLIBDIR/libCNearTree.$(LIB_EXT)
+ -cp $(INSTALL_PREFIX)/include/TNear.h $(INSTALL_PREFIX)/include/TNear_old.h
+ -cp $(INSTALL_PREFIX)/include/CNearTree.h $(INSTALL_PREFIX)/include/CNearTree_old.h
+ cp $(INC)/TNear.h $(INSTALL_PREFIX)/include/TNear.h
+@@ -257,8 +257,8 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include
+ $(INSTALL_PREFIX):
+ mkdir -p $(INSTALL_PREFIX)
+
+-$(INSTALL_PREFIX)/lib: $(INSTALL_PREFIX)
+- mkdir -p $(INSTALL_PREFIX)/lib
++$(INSTALL_PREFIX)/GENTOOLIBDIR: $(INSTALL_PREFIX)
++ mkdir -p $(INSTALL_PREFIX)/GENTOOLIBDIR
+
+ $(INSTALL_PREFIX)/bin: $(INSTALL_PREFIX)
+ mkdir -p $(INSTALL_PREFIX)/bin
+--
+1.7.8
+
diff --git a/sci-libs/neartree/files/3.1.1-notest.patch b/sci-libs/neartree/files/3.1.1-notest.patch
new file mode 100644
index 000000000000..c85a50537894
--- /dev/null
+++ b/sci-libs/neartree/files/3.1.1-notest.patch
@@ -0,0 +1,34 @@
+From c9367aefa380d276590e3e0045f69fc884fed948 Mon Sep 17 00:00:00 2001
+Message-Id: <c9367aefa380d276590e3e0045f69fc884fed948.1323853429.git.jlec@gentoo.org>
+In-Reply-To: <eb88a598f46f835782ba93bfbde68761cb159f4c.1323853429.git.jlec@gentoo.org>
+References: <eb88a598f46f835782ba93bfbde68761cb159f4c.1323853429.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 14 Dec 2011 09:56:51 +0100
+Subject: [PATCH 2/2] notest.patch
+
+---
+ Makefile | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 859363e..8de706b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -240,14 +240,6 @@ install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/GENTOOLIBDIR $(INSTALL_PREFIX)
+ chmod 644 $(INSTALL_PREFIX)/include/CNearTree.h
+ chmod 644 $(INSTALL_PREFIX)/include/rhrand.h
+ chmod 644 $(INSTALL_PREFIX)/include/triple.h
+- echo "Testing final install dynamic"
+- $(BUILD_COMMAND_DYNAMIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_dynamic
+- $(BIN)/CNearTreeTest_dynamic
+- echo "Testing final install static"
+- $(BUILD_COMMAND_STATIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_static
+- $(BIN)/CNearTreeTest_static
+
+
+
+--
+1.7.8
+
diff --git a/sci-libs/neartree/files/3.1.1-test.patch b/sci-libs/neartree/files/3.1.1-test.patch
new file mode 100644
index 000000000000..2796be6eaf85
--- /dev/null
+++ b/sci-libs/neartree/files/3.1.1-test.patch
@@ -0,0 +1,34 @@
+From 6a9ec8e68191a3ff9ad21a34814e71f6baf6f5ce Mon Sep 17 00:00:00 2001
+Message-Id: <6a9ec8e68191a3ff9ad21a34814e71f6baf6f5ce.1323853619.git.jlec@gentoo.org>
+From: Justin Lecher <jlec@gentoo.org>
+Date: Wed, 14 Dec 2011 10:06:51 +0100
+Subject: [PATCH] 3.1.1-test.patch
+
+---
+ Makefile | 10 ----------
+ 1 files changed, 0 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8de706b..73ae0da 100644
+--- a/Makefile
++++ b/Makefile
+@@ -339,16 +339,6 @@ tests: $(LIB) $(BIN) $(BIN)/CPPMain $(BIN)/CPPMain_Flip $(BIN)/CPPNearTreeTest
+ $(TIME) $(BIN)/CPPNearTreeTestInstNoFlip
+ $(TIME) $(BIN)/CNearTreeTest --debug
+ $(TIME) $(BIN)/CNearTreeTestInst --debug
+-ifneq ($(MSYSTEM),MINGW32)
+- diff -b -c $(TESTDATA)/CPPMain_orig.lst $(TESTDATA)/CPPMain.lst
+- diff -b -c $(TESTDATA)/CPPMain_orig.lst $(TESTDATA)/CPPMain_Flip.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)/CPPMain_MINGW_orig.lst $(TESTDATA)/CPPMain_Flip.lst
+- diff -b -c $(TESTDATA)/CMain_MINGW_orig.lst $(TESTDATA)/CMain.lst
+-endif
+-
+ #
+ # Remove all non-source files
+ #
+--
+1.7.8
+
diff --git a/sci-libs/neartree/files/CMakeLists.txt b/sci-libs/neartree/files/CMakeLists.txt
new file mode 100644
index 000000000000..cb4375da7964
--- /dev/null
+++ b/sci-libs/neartree/files/CMakeLists.txt
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 2.8)
+project (Neartree C)
+
+SET (LIB_MAJOR 5)
+SET (LIB_MINOR 1)
+SET (LIB_RELEASE 0)
+
+SET (_soversion ${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE})
+
+include_directories ("${PROJECT_SOURCE_DIR}")
+
+add_library(CNearTree SHARED CNearTree.c)
+target_link_libraries(CNearTree CVector m)
+
+set_target_properties(CNearTree PROPERTIES SOVERSION ${LIB_MAJOR} VERSION ${_soversion})
+
+INSTALL(TARGETS CNearTree DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+install(FILES CNearTree.h rhrand.h TNear.h triple.h
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
+install(FILES README_NearTree.txt DESTINATION ${DOC_DIR})
+install(FILES README_NearTree.html index.html DESTINATION ${DOC_DIR}/html)
diff --git a/sci-libs/neartree/metadata.xml b/sci-libs/neartree/metadata.xml
new file mode 100644
index 000000000000..187a4e99374a
--- /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>
+ <upstream>
+ <remote-id type="sourceforge">neartree</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/neartree/neartree-3.1.1-r3.ebuild b/sci-libs/neartree/neartree-3.1.1-r3.ebuild
new file mode 100644
index 000000000000..de89d71cfb5c
--- /dev/null
+++ b/sci-libs/neartree/neartree-3.1.1-r3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+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}/${PN}/${MY_P}/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/cvector"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ cp "${FILESDIR}"/CMakeLists.txt . || die
+}
+
+src_configure() {
+ local mycmakeargs=( -DDOC_DIR="${EPREFIX}/usr/share/doc/${PF}" )
+ cmake-utils_src_configure
+}