initial import
This commit is contained in:
parent
1a0f362f10
commit
d01b04cdaf
5 changed files with 196 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
ann_1.1.1.tar.gz
|
||||
50
ann-gcc43.patch
Normal file
50
ann-gcc43.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
diff -Nru ann_1.1.1.orig/ann2fig/ann2fig.cpp ann_1.1.1/ann2fig/ann2fig.cpp
|
||||
--- ann_1.1.1.orig/ann2fig/ann2fig.cpp 2006-08-04 21:46:28.000000000 +0200
|
||||
+++ ann_1.1.1/ann2fig/ann2fig.cpp 2008-08-14 20:13:06.000000000 +0200
|
||||
@@ -41,6 +41,8 @@
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#include <cstdio> // C standard I/O
|
||||
+#include <cstring> // C standard string
|
||||
+#include <cstdlib> // C standard lib
|
||||
#include <fstream> // file I/O
|
||||
#include <string> // string manipulation
|
||||
#include <ANN/ANNx.h> // all ANN includes
|
||||
diff -Nru ann_1.1.1.orig/src/ANN.cpp ann_1.1.1/src/ANN.cpp
|
||||
--- ann_1.1.1.orig/src/ANN.cpp 2006-08-04 21:46:27.000000000 +0200
|
||||
+++ ann_1.1.1/src/ANN.cpp 2008-08-14 20:13:06.000000000 +0200
|
||||
@@ -24,6 +24,8 @@
|
||||
// Added performance counting to annDist()
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
+#include <cstdlib> // C standard lib
|
||||
+
|
||||
#include <ANN/ANNx.h> // all ANN includes
|
||||
#include <ANN/ANNperf.h> // ANN performance
|
||||
|
||||
diff -Nru ann_1.1.1.orig/src/kd_dump.cpp ann_1.1.1/src/kd_dump.cpp
|
||||
--- ann_1.1.1.orig/src/kd_dump.cpp 2006-08-04 21:46:27.000000000 +0200
|
||||
+++ ann_1.1.1/src/kd_dump.cpp 2008-08-14 20:15:03.000000000 +0200
|
||||
@@ -31,6 +31,9 @@
|
||||
// desired.)
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
+#include <cstring> // C standard string
|
||||
+#include <cstdlib> // C standard lib
|
||||
+
|
||||
#include "kd_tree.h" // kd-tree declarations
|
||||
#include "bd_tree.h" // bd-tree declarations
|
||||
|
||||
diff -Nru ann_1.1.1.orig/test/ann_test.cpp ann_1.1.1/test/ann_test.cpp
|
||||
--- ann_1.1.1.orig/test/ann_test.cpp 2006-08-04 21:46:27.000000000 +0200
|
||||
+++ ann_1.1.1/test/ann_test.cpp 2008-08-14 20:13:06.000000000 +0200
|
||||
@@ -34,6 +34,9 @@
|
||||
// Added planted distribution
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
+#include <cstring> // C standard string
|
||||
+#include <cstdlib> // C standard lib
|
||||
+
|
||||
#include <ctime> // clock
|
||||
#include <cmath> // math routines
|
||||
#include <string> // C string ops
|
||||
43
ann-make.patch
Normal file
43
ann-make.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
diff -Nru ann_1.1.1.orig/Make-config ann_1.1.1/Make-config
|
||||
--- ann_1.1.1.orig/Make-config 2006-08-04 21:46:26.000000000 +0200
|
||||
+++ ann_1.1.1/Make-config 2008-08-14 19:35:57.000000000 +0200
|
||||
@@ -67,6 +67,14 @@
|
||||
# files in the MS_WIN32 directory).
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
+# Linux shared library using g++
|
||||
+linux:
|
||||
+ $(MAKE) targets \
|
||||
+ "ANNLIB = libANN.so.1.0" \
|
||||
+ "ANNDEVLIB = libANN.so" \
|
||||
+ "C++ = g++" \
|
||||
+ "MAKELIB = g++ -shared -Wl,-soname -Wl,libANN.so.1 -o" \
|
||||
+ "RANLIB = true"
|
||||
# Linux using g++
|
||||
linux-g++:
|
||||
$(MAKE) targets \
|
||||
diff -Nru ann_1.1.1.orig/Makefile ann_1.1.1/Makefile
|
||||
--- ann_1.1.1.orig/Makefile 2006-08-04 21:46:26.000000000 +0200
|
||||
+++ ann_1.1.1/Makefile 2008-08-14 19:28:16.000000000 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# main make entry point
|
||||
#-----------------------------------------------------------------------------
|
||||
-alpha-g++ macosx-g++ linux-g++ sgi sunos4 sunos4-g++ sunos5 sunos5-g++ sunos5-g++-sl authors-debug authors-perf:
|
||||
+alpha-g++ macosx-g++ linux linux-g++ sgi sunos4 sunos4-g++ sunos5 sunos5-g++ sunos5-g++-sl authors-debug authors-perf:
|
||||
cd src ; $(MAKE) $@
|
||||
cd test ; $(MAKE) $@
|
||||
cd sample ; $(MAKE) $@
|
||||
diff -Nru ann_1.1.1.orig/src/Makefile ann_1.1.1/src/Makefile
|
||||
--- ann_1.1.1.orig/src/Makefile 2006-08-04 21:46:27.000000000 +0200
|
||||
+++ ann_1.1.1/src/Makefile 2008-08-14 19:36:45.000000000 +0200
|
||||
@@ -56,7 +56,8 @@
|
||||
$(LIBDIR)/$(ANNLIB): $(OBJECTS)
|
||||
$(MAKELIB) $(ANNLIB) $(OBJECTS)
|
||||
$(RANLIB) $(ANNLIB)
|
||||
- mv $(ANNLIB) $(LIBDIR)
|
||||
+ ln -s $(ANNLIB) $(ANNDEVLIB)
|
||||
+ mv $(ANNLIB) $(ANNDEVLIB) $(LIBDIR)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Make object files
|
||||
101
ann.spec
Normal file
101
ann.spec
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
Name: ann
|
||||
Version: 1.1.1
|
||||
Release: 2%{?dist}
|
||||
Summary: Library for searching Approximate Nearest Neighbors
|
||||
|
||||
Group: Applications/System
|
||||
License: LGPLv2+
|
||||
URL: http://www.cs.umd.edu/~mount/ANN
|
||||
Source0: http://www.cs.umd.edu/~mount/ANN/Files/%{version}/%{name}_%{version}.tar.gz
|
||||
Patch0: ann-make.patch
|
||||
Patch1: ann-gcc43.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
|
||||
%description
|
||||
ANN is a library written in the C++ programming language to support both
|
||||
exact and approximate nearest neighbor searching in spaces of various
|
||||
dimensions. It was implemented by David M. Mount of the University of
|
||||
Maryland, and Sunil Arya of the Hong Kong University of Science and
|
||||
Technology. ANN (pronounced like the name ``Ann'') stands for
|
||||
Approximate Nearest Neighbors. ANN is also a testbed containing
|
||||
programs and procedures for generating data sets, collecting and
|
||||
analyzing statistics on the performance of nearest neighbor algorithms
|
||||
and data structures, and visualizing the geometric structure of these
|
||||
data structures.
|
||||
|
||||
%package libs
|
||||
Summary: Runtime files for the ANN library
|
||||
Group: System Environment/Libraries
|
||||
|
||||
%description libs
|
||||
Runtime files needed to use ANN library.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for the ANN library
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development files needed to use ANN library.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}_%{version}
|
||||
%patch0 -p1 -b .make
|
||||
%patch1 -p1 -b .gcc43
|
||||
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} linux CFLAGS="-fPIC -DPIC $RPM_OPT_FLAGS"
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/ANN
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
|
||||
install -p -m 0644 include/ANN/*.h $RPM_BUILD_ROOT%{_includedir}/ANN
|
||||
install -p -m 0755 lib/libANN.so.* $RPM_BUILD_ROOT%{_libdir}
|
||||
install -p -m 0755 bin/ann2fig $RPM_BUILD_ROOT%{_bindir}
|
||||
|
||||
pushd $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -s libANN.so.1.0 libANN.so.1
|
||||
ln -s libANN.so.1.0 libANN.so
|
||||
popd
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root,-)
|
||||
%doc Copyright.txt License.txt ReadMe.txt
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/ANNmanual.pdf
|
||||
%{_includedir}/ANN
|
||||
%{_libdir}/*.so
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Aug 16 2008 Dan Horak <dan[at]danny.cz> - 1.1.1-2
|
||||
- put general docs only into libs subpackage
|
||||
- update license
|
||||
|
||||
* Thu Aug 14 2008 Dan Horak <dan[at]danny.cz> - 1.1.1-1
|
||||
- initial Fedora package
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
b6247e4a34e8a5e122ebf299cd51f871 ann_1.1.1.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue