[vmmlib] Initial commit
Jaroslav Škarvada
jskarvad at fedoraproject.org
Wed Dec 14 14:15:17 UTC 2011
commit 30039e2751ea0f84e227c28724c63b5f808ce9a7
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Wed Dec 14 15:14:58 2011 +0100
Initial commit
.gitignore | 1 +
sources | 1 +
vmmlib-test-fix.patch | 38 +++++++++++++++++++++++++++
vmmlib.spec | 67 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..bd7d757 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+vmmlib-*.tar.xz
diff --git a/sources b/sources
index e69de29..0eda4a3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f13d54359182bcc9b6e0f248a442d9ba vmmlib-20111122svn540.tar.xz
diff --git a/vmmlib-test-fix.patch b/vmmlib-test-fix.patch
new file mode 100644
index 0000000..bd54022
--- /dev/null
+++ b/vmmlib-test-fix.patch
@@ -0,0 +1,38 @@
+diff -up vmmlib-20111122svn540/Makefile.orig vmmlib-20111122svn540/Makefile
+--- vmmlib-20111122svn540/Makefile.orig 2011-10-13 20:01:19.000000000 +0200
++++ vmmlib-20111122svn540/Makefile 2011-11-22 18:03:24.732308940 +0100
+@@ -27,7 +27,15 @@ VMMLIB_UNIT_TESTS =\
+
+ VMMLIB_UNIT_TESTS_OBJECTS = ${VMMLIB_UNIT_TESTS:%.cpp=%.o}
+
+-CXXFLAGS += -I. -Iinclude
++CXXFLAGS += -I. -Iinclude -Itests -include f2c.h -include f2c_fix.h -include stdint.h
++
++LBITS := $(shell getconf LONG_BIT)
++ifeq ($(LBITS),64)
++ LIBDIR=$(DESTDIR)/usr/lib64
++else
++ LIBDIR=$(DESTDIR)/usr/lib
++endif
++LDFLAGS += -L$(LIBDIR)/atlas -u MAIN__
+
+ # on mac we want to use the frameworks, not the unix style libs
+ ARCH = $(shell uname)
+@@ -38,7 +46,7 @@ LDFLAGS += -framework Accelerate
+ else
+ CXXFLAGS += -DVMMLIB_USE_LAPACK
+ LDFLAGS +=
+-LIBS += -lclapack -lf2c
++LIBS += -lclapack -lf2c -llapack
+
+ endif
+
+diff --git a/tests/f2c_fix.h b/tests/f2c_fix.h
+index 0e25758..6356519 100644
+--- a/tests/f2c_fix.h
++++ b/tests/f2c_fix.h
+@@ -0,0 +1,4 @@
++#define integer f2c_fix_integer
++#define uinteger f2c_fix_uinteger
++typedef int f2c_fix_integer;
++typedef unsigned int f2c_fix_uinteger;
diff --git a/vmmlib.spec b/vmmlib.spec
new file mode 100644
index 0000000..fbb5844
--- /dev/null
+++ b/vmmlib.spec
@@ -0,0 +1,67 @@
+%global snap_date 20111122
+%global svn_revision 540
+%global alphatag %{snap_date}svn%{svn_revision}
+
+# The source for this package was pulled from upstream's subversion (svn).
+# Use the following commands to generate the tarball (expand the macros):
+# svn export -r %%{svn_revision} http://vmmlib.svn.sourceforge.net/svnroot/vmmlib/trunk vmmlib-%%{alphatag}
+# tar -cJvf vmmlib-%%{alphatag}.tar.xz vmmlib-%%{alphatag}
+
+Name: vmmlib
+Version: 0
+Release: 0.2.%{alphatag}%{?dist}
+Summary: A vector and matrix math library implemented using C++ templates
+Group: Development/Libraries
+License: BSD
+URL: http://vmmlib.sourceforge.net/
+Source0: %{name}-%{alphatag}.tar.xz
+# Fix for broken test-suite, tests that still fail have been disabled until
+# there will be better fix
+Patch0: vmmlib-test-fix.patch
+BuildArch: noarch
+BuildRequires: atlas-devel lapack-devel f2c glibc-headers
+
+%description
+vmmlib is a vector and matrix math library implemented using C++ templates.
+Its basic functionality includes a vector and a matrix class, with additional
+functionality for the often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
+More advanced functionality include solvers, frustum computations and frustum
+culling classes, and spatial data structures.
+
+%package devel
+Summary: A vector and matrix math library implemented using C++ templates
+Group: Development/Libraries
+
+%description devel
+vmmlib is a vector and matrix math library implemented using C++ templates.
+Its basic functionality includes a vector and a matrix class, with additional
+functionality for the often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
+More advanced functionality include solvers, frustum computations and frustum
+culling classes, and spatial data structures.
+
+%prep
+%setup -q -n %{name}-%{alphatag}
+%patch0 -p1 -b .test-fix
+
+%build
+make %{?_smp_mflags}
+
+%install
+install -m 755 -d %{buildroot}%{_includedir}/vmmlib
+install -p -m 644 -t %{buildroot}%{_includedir}/vmmlib include/vmmlib/*.hpp
+mkdir _tmpdoc
+mv include/vmmlib/{LICENSE,ACKNOWLEDGEMENTS} _tmpdoc/
+
+%check
+./vmmlib_unit_tests
+
+%files devel
+%doc README _tmpdoc/*
+%{_includedir}/vmmlib
+
+%changelog
+* Tue Dec 13 2011 Jaroslav Škarvada <jskarvad at redhat.com> - 0-0.2.20111122svn540
+- Fixed unit test on 64 bit
+
+* Tue Nov 22 2011 Jaroslav Škarvada <jskarvad at redhat.com> - 0-0.1.20111122svn540
+- Initial release
More information about the scm-commits
mailing list