[packages/levmar] - new

qboosh qboosh at pld-linux.org
Thu Jan 24 20:45:58 CET 2013


commit 38278dcf1fb6e3300cae75b310c18f1c94366a62
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jan 24 20:46:30 2013 +0100

    - new

 levmar-make.patch |  20 +++++++++
 levmar.spec       | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+)
---
diff --git a/levmar.spec b/levmar.spec
new file mode 100644
index 0000000..584beb6
--- /dev/null
+++ b/levmar.spec
@@ -0,0 +1,118 @@
+# TODO: PLASMA parallel library (http://icl.cs.utk.edu/plasma/)
+#
+# Conditional build:
+%bcond_without	static_libs	# don't build static libraries
+#
+Summary:	LEVMAR - Levenberg-Marquardt non-linear least squares algorithm
+Summary(pl.UTF-8):	LEVMAR - nieliniowy algorytm najmniejszych kwadratów Levenberga-Marquardta
+Name:		levmar
+Version:	2.6
+Release:	1
+License:	GPL v2+
+Group:		Libraries
+Source0:	http://www.ics.forth.gr/~lourakis/levmar/%{name}-%{version}.tgz
+# Source0-md5:	16bc34efa1617219f241eef06427f13f
+Patch0:		%{name}-make.patch
+URL:		http://www.ics.forth.gr/~lourakis/levmar/
+%{?with_static_libs:BuildRequires:	cmake >= 2.6}
+BuildRequires:	blas-devel
+BuildRequires:	lapack-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LEVMAR is a copylefted C/C++ implementation of the Levenberg-Marquardt
+non-linear least squares algorithm. LEVMAR includes double and single
+precision LM versions, both with analytic and finite difference
+approximated Jacobians. LEVMAR also has some support for constrained
+non-linear least squares, allowing linear equation, box and linear
+inequality constraints.
+
+%description -l pl.UTF-8
+LEVMAR to wydana na wolnej licencji implementacja w C/C++ nieliniowego
+algorytmu najmniejszych kwadratów Levenberga-Marquardta. LEVMAR
+zawiera wersje LM podwójnej i pojedynczej precyzji, z jakobianami
+zarówno analitycznymi, jak i aproksymowanymi metodą różnic
+skończonych. LEVMAR ma także obsługę w pewnym zakresie nieliniowego
+algorytmu najmniejszych kwadratów z ograniczeniami w postaci równań
+liniowych, przedziałów oraz nierówności liniowych.
+
+%package devel
+Summary:	Header files for LEVMAR library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki LEVMAR
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for LEVMAR library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LEVMAR.
+
+%package static
+Summary:	Static LEVMAR library
+Summary(pl.UTF-8):	Statyczna biblioteka LEVMAR
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static LEVMAR library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LEVMAR.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+# shared library (cmake suite doesn't support it)
+install -d sobj
+%{__make} -f Makefile.so \
+	CC="%{__cc}" \
+	CFLAGS='%{rpmcflags} %{rpmcppflags} $(CONFIGFLAGS) -Wall -fPIC' \
+	LAPACKLIBS="-llapack -lblas -lm"
+# now static
+%if %{with static_libs}
+install -d build
+cd build
+%cmake .. \
+	-DLAPACKBLAS_DIR=%{_libdir} \
+	-DF2C_LIB_NAME=m
+
+%{__make}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+
+install sobj/liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}
+ln -sf liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}/liblevmar.so.2
+ln -sf liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}/liblevmar.so
+cp -p levmar.h $RPM_BUILD_ROOT%{_includedir}
+%if %{with static_libs}
+install build/liblevmar.a $RPM_BUILD_ROOT%{_libdir}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.txt 
+%attr(755,root,root) %{_libdir}/liblevmar.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblevmar.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblevmar.so
+%{_includedir}/levmar.h
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/liblevmar.a
+%endif
diff --git a/levmar-make.patch b/levmar-make.patch
new file mode 100644
index 0000000..c435bd4
--- /dev/null
+++ b/levmar-make.patch
@@ -0,0 +1,20 @@
+--- levmar-2.6/Makefile.so.orig	2009-12-04 22:26:31.000000000 +0100
++++ levmar-2.6/Makefile.so	2013-01-24 20:04:49.481824471 +0100
+@@ -6,7 +6,7 @@
+ # major & minor shared lib numbers
+ MAJ=2
+ MIN=2
+-ODIR=sobj # where to place object files for shared lib
++ODIR=sobj
+ CC=gcc
+ CONFIGFLAGS=-ULINSOLVERS_RETAIN_MEMORY
+ #ARCHFLAGS=-march=pentium4 # YOU MIGHT WANT TO UNCOMMENT THIS FOR P4
+@@ -21,7 +21,7 @@
+ LIBS=$(LAPACKLIBS)
+ 
+ $(ODIR)/liblevmar.so.$(MAJ).$(MIN): $(LIBOBJS)
+-	$(CC) -shared -Wl,-soname,liblevmar.so.$(MAJ) -o $(ODIR)/liblevmar.so.$(MAJ).$(MIN) $(LIBOBJS) #-llapack -lblas -lf2c
++	$(CC) -shared -Wl,-soname,liblevmar.so.$(MAJ) -o $(ODIR)/liblevmar.so.$(MAJ).$(MIN) $(LIBOBJS) $(LAPACKLIBS)
+ 
+ # implicit rule for generating *.o files in ODIR from *.c files
+ $(ODIR)/%.o : %.c
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/levmar.git/commitdiff/38278dcf1fb6e3300cae75b310c18f1c94366a62



More information about the pld-cvs-commit mailing list