rpms/ann/devel ann-gcc43.patch, NONE, 1.1 ann-make.patch, NONE, 1.1 ann.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Dan Horák sharkcz at fedoraproject.org
Tue Aug 26 05:27:00 UTC 2008


Author: sharkcz

Update of /cvs/pkgs/rpms/ann/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28297

Modified Files:
	.cvsignore sources 
Added Files:
	ann-gcc43.patch ann-make.patch ann.spec 
Log Message:
initial import

ann-gcc43.patch:

--- NEW FILE ann-gcc43.patch ---
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

ann-make.patch:

--- NEW FILE ann-make.patch ---
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


--- NEW FILE ann.spec ---
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


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ann/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	25 Aug 2008 19:57:49 -0000	1.1
+++ .cvsignore	26 Aug 2008 05:26:30 -0000	1.2
@@ -0,0 +1 @@
+ann_1.1.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ann/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	25 Aug 2008 19:57:49 -0000	1.1
+++ sources	26 Aug 2008 05:26:30 -0000	1.2
@@ -0,0 +1 @@
+b6247e4a34e8a5e122ebf299cd51f871  ann_1.1.1.tar.gz




More information about the scm-commits mailing list