From d01b04cdaf940d6c971068790a3dfc43c661dc75 Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Aug 26 2008 05:26:30 +0000 Subject: initial import --- diff --git a/.cvsignore b/.cvsignore index e69de29..483590f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ann_1.1.1.tar.gz diff --git a/ann-gcc43.patch b/ann-gcc43.patch new file mode 100644 index 0000000..eb3cc9d --- /dev/null +++ b/ann-gcc43.patch @@ -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 // C standard I/O ++#include // C standard string ++#include // C standard lib + #include // file I/O + #include // string manipulation + #include // 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 // C standard lib ++ + #include // all ANN includes + #include // 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 // C standard string ++#include // 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 // C standard string ++#include // C standard lib ++ + #include // clock + #include // math routines + #include // C string ops diff --git a/ann-make.patch b/ann-make.patch new file mode 100644 index 0000000..0c5d7fc --- /dev/null +++ b/ann-make.patch @@ -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 diff --git a/ann.spec b/ann.spec new file mode 100644 index 0000000..e61ccdf --- /dev/null +++ b/ann.spec @@ -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 - 1.1.1-2 +- put general docs only into libs subpackage +- update license + +* Thu Aug 14 2008 Dan Horak - 1.1.1-1 +- initial Fedora package diff --git a/sources b/sources index e69de29..77e7259 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b6247e4a34e8a5e122ebf299cd51f871 ann_1.1.1.tar.gz