1 |
jlec 10/02/03 20:23:57 |
2 |
|
3 |
Added: 2.1.4-gcc4.3.patch 2.1.4-iterator.patch |
4 |
2.1.4-test.patch 2.1.4-FLAGS.patch |
5 |
Log: |
6 |
Function library efficiently solving the Nearest Neighbor Problem(known as the post office problem) |
7 |
(Portage version: 2.2_rc62/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-libs/neartree/files/2.1.4-gcc4.3.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-gcc4.3.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-gcc4.3.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 2.1.4-gcc4.3.patch |
16 |
=================================================================== |
17 |
--- CNearTreeTest.cpp 2009-06-08 04:54:29.000000000 +0200 |
18 |
+++ CNearTreeTest.cpp.new 2009-07-25 12:36:33.000000000 +0200 |
19 |
@@ -47,6 +47,7 @@ |
20 |
#include <cmath> |
21 |
#include <stdio.h> |
22 |
#include <stdlib.h> |
23 |
+#include <cstring> |
24 |
|
25 |
#ifndef USE_LOCAL_HEADERS |
26 |
#include <TNear.h> |
27 |
--- TNear.h 2009-06-08 04:54:29.000000000 +0200 |
28 |
+++ TNear.h.new 2009-07-25 12:39:09.000000000 +0200 |
29 |
@@ -272,6 +272,7 @@ |
30 |
#define TRIANG(a,b,c) ( (((b)+(c))-(a) >= 0)) |
31 |
#endif |
32 |
|
33 |
+#include <algorithm> |
34 |
|
35 |
//======================================================================= |
36 |
// CNearTree is the root class for the neartree. The actual data of the |
37 |
|
38 |
|
39 |
|
40 |
1.1 sci-libs/neartree/files/2.1.4-iterator.patch |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-iterator.patch?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-iterator.patch?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: 2.1.4-iterator.patch |
46 |
=================================================================== |
47 |
diff --git a/TNear.h b/TNear.h |
48 |
index d848b61..a5d255e 100644 |
49 |
--- a/TNear.h |
50 |
+++ b/TNear.h |
51 |
@@ -735,7 +735,7 @@ void BelongsToPoints( const T& t1, const T& t2, ContainerType& group1, Container |
52 |
{ |
53 |
group1.clear(); |
54 |
group2.clear(); |
55 |
- CNearTree<T>::iterator it; |
56 |
+ typename CNearTree<T>::iterator it; |
57 |
|
58 |
for ( it=this->begin( ); it!=this->end( ); ++it ) |
59 |
{ |
60 |
@@ -756,11 +756,11 @@ void SeparateByRadius( const DistanceType radius, const T& tProbe, ContainerType |
61 |
{ |
62 |
inside.clear(); |
63 |
outside.clear(); |
64 |
- CNearTree<T>::iterator it; |
65 |
+ typename CNearTree<T>::iterator it; |
66 |
|
67 |
for ( it=this->begin( ); it!=this->end( ); ++it ) |
68 |
{ |
69 |
- if( DistanceBetween( (*it), probe ) > radius ) |
70 |
+ if( DistanceBetween( (*it), tProbe ) > radius ) |
71 |
{ |
72 |
inside.insert( inside.end( ), (*it) ); |
73 |
} |
74 |
|
75 |
|
76 |
|
77 |
1.1 sci-libs/neartree/files/2.1.4-test.patch |
78 |
|
79 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-test.patch?rev=1.1&view=markup |
80 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-test.patch?rev=1.1&content-type=text/plain |
81 |
|
82 |
Index: 2.1.4-test.patch |
83 |
=================================================================== |
84 |
diff --git a/Makefile b/Makefile |
85 |
index 10e9ba2..b9a349b 100644 |
86 |
--- a/Makefile |
87 |
+++ b/Makefile |
88 |
@@ -303,14 +303,7 @@ tests: $(LIB) $(BIN) $(BIN)/CPPMain $(BIN)/CPPNearTreeTest \ |
89 |
$(BIN)/CMain 3458923 > $(TESTDATA)/CMain.lst |
90 |
$(BIN)/CPPNearTreeTest |
91 |
$(BIN)/CNearTreeTest |
92 |
-ifneq ($(MSYSTEM),MINGW32) |
93 |
- diff -b -c $(TESTDATA)/CPPMain_orig.lst $(TESTDATA)/CPPMain.lst |
94 |
- diff -b -c $(TESTDATA)/CMain_orig.lst $(TESTDATA)/CMain.lst |
95 |
-else |
96 |
- diff -b -c $(TESTDATA)/CPPMain_MINGW_orig.lst $(TESTDATA)/CPPMain.lst |
97 |
- diff -b -c $(TESTDATA)/CMain_MINGW_orig.lst $(TESTDATA)/CMain.lst |
98 |
-endif |
99 |
- |
100 |
+ |
101 |
# |
102 |
# Remove all non-source files |
103 |
# |
104 |
|
105 |
|
106 |
|
107 |
1.1 sci-libs/neartree/files/2.1.4-FLAGS.patch |
108 |
|
109 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-FLAGS.patch?rev=1.1&view=markup |
110 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/neartree/files/2.1.4-FLAGS.patch?rev=1.1&content-type=text/plain |
111 |
|
112 |
Index: 2.1.4-FLAGS.patch |
113 |
=================================================================== |
114 |
diff --git a/Makefile b/Makefile |
115 |
index 10e9ba2..796670e 100644 |
116 |
--- a/Makefile |
117 |
+++ b/Makefile |
118 |
@@ -48,11 +48,11 @@ RELEASE = 2.1.3 |
119 |
# |
120 |
# Compiler and compilation flags |
121 |
# |
122 |
-CC = gcc |
123 |
+CC ?= gcc |
124 |
ifneq ($(MSYSTEM),MINGW32) |
125 |
-CFLAGS = -g -O2 -Wall -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1 |
126 |
+CFLAGS += -ansi -DCNEARTREE_SAFE_TRIANG=1 |
127 |
else |
128 |
-CFLAGS = -g -O2 -Wall -DCNEARTREE_SAFE_TRIANG=1 |
129 |
+CFLAGS = -DCNEARTREE_SAFE_TRIANG=1 |
130 |
endif |
131 |
|
132 |
# |
133 |
@@ -72,8 +72,8 @@ endif |
134 |
# Uncomment the next two lines if CVector is installed locally in $(HOME)/include |
135 |
# and $(HOME)/lib |
136 |
# |
137 |
-#CVECTOR_INCLUDE = -I$(HOME)/include |
138 |
-#CVECTOR_LIBLOC = -L$(HOME)/lib |
139 |
+CVECTOR_INCLUDE = -I/usr/include |
140 |
+CVECTOR_LIBLOC = -L/usr/GENTOOLIBDIR |
141 |
|
142 |
# |
143 |
# Directories |
144 |
@@ -86,7 +86,7 @@ INC = $(ROOT) |
145 |
EXAMPLES = $(ROOT) |
146 |
TESTDATA = $(ROOT) |
147 |
ifndef INSTALL_PREFIX |
148 |
-INSTALL_PREFIX = /usr/local |
149 |
+INSTALL_PREFIX = /usr |
150 |
#INSTALL_PREFIX = $(HOME) |
151 |
endif |
152 |
|
153 |
@@ -111,12 +111,12 @@ CPPLIBRARIES = -lm |
154 |
CLIBRARIES = $(CVECTOR_LIBLOC) -lCVector -lm |
155 |
|
156 |
COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c |
157 |
-CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c |
158 |
-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/lib |
159 |
-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES) |
160 |
-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES) |
161 |
-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include |
162 |
-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include |
163 |
+CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) -c |
164 |
+LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined $(LDFLAGS) |
165 |
+BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) |
166 |
+CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) |
167 |
+BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) $(LDFLAGS) -shared -I/usr/include |
168 |
+BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -static-libtool-libs -I/usr/include |
169 |
INSTALL_COMMAND = $(LIBTOOL) --mode=install cp |
170 |
INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish |