summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.html5
-rw-r--r--src/armadillo-1-staticlib.patch43
-rw-r--r--src/armadillo-test.cpp24
-rw-r--r--src/armadillo.mk30
4 files changed, 102 insertions, 0 deletions
diff --git a/index.html b/index.html
index e38a585..22236ac 100644
--- a/index.html
+++ b/index.html
@@ -924,6 +924,11 @@ USE_OSGPLUGIN(<plugin2>)
<td id="apr-website"><a href="http://apr.apache.org/">APR</a></td>
</tr>
<tr>
+ <td id="armadillo-package">armadillo</td>
+ <td id="armadillo-version">3.4.0</td>
+ <td id="armadillo-website"><a href="http://armadillo.sf.net/">Armadillo C++ linear algebra library</a></td>
+ </tr>
+ <tr>
<td id="atk-package">atk</td>
<td id="atk-version">2.4.0</td>
<td id="atk-website"><a href="http://www.gtk.org/">ATK</a></td>
diff --git a/src/armadillo-1-staticlib.patch b/src/armadillo-1-staticlib.patch
new file mode 100644
index 0000000..d4be9a6
--- /dev/null
+++ b/src/armadillo-1-staticlib.patch
@@ -0,0 +1,43 @@
+This file is part of MXE.
+See index.html for further information.
+
+--- armadillo-3.4.0/CMakeLists.txt.orig 2012-09-06 09:43:16.000000000 +0200
++++ armadillo-3.4.0/CMakeLists.txt 2012-09-09 16:18:57.000000000 +0200
+@@ -40,7 +40,7 @@
+ set(ARMA_USE_ATLAS false)
+ set(ARMA_USE_BOOST false)
+ set(ARMA_USE_HDF5 false)
+-set(ARMA_USE_WRAPPER true )
++set(ARMA_USE_WRAPPER false)
+
+
+ if(WIN32)
+@@ -158,15 +158,15 @@
+ endif()
+
+ else()
++
++ if(ARMA_USE_LAPACK STREQUAL true)
++ set(ARMA_LIBS ${ARMA_LIBS} ${LAPACK_LIBRARIES})
++ endif()
+
+ if(ARMA_USE_BLAS STREQUAL true)
+ set(ARMA_LIBS ${ARMA_LIBS} ${BLAS_LIBRARIES})
+ endif()
+
+- if(ARMA_USE_LAPACK STREQUAL true)
+- set(ARMA_LIBS ${ARMA_LIBS} ${LAPACK_LIBRARIES})
+- endif()
+-
+ if(ARMA_USE_ATLAS STREQUAL true)
+ set(ARMA_LIBS ${ARMA_LIBS} ${CBLAS_LIBRARIES})
+ set(ARMA_LIBS ${ARMA_LIBS} ${CLAPACK_LIBRARIES})
+@@ -263,7 +263,7 @@
+ #set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+
+-add_library( armadillo SHARED src/wrap_libs )
++add_library( armadillo STATIC src/wrap_libs )
+ target_link_libraries( armadillo ${ARMA_LIBS} )
+
+ set_target_properties(armadillo PROPERTIES VERSION ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH} SOVERSION 3)
diff --git a/src/armadillo-test.cpp b/src/armadillo-test.cpp
new file mode 100644
index 0000000..da32512
--- /dev/null
+++ b/src/armadillo-test.cpp
@@ -0,0 +1,24 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <armadillo>
+
+using namespace arma;
+
+int main()
+{
+ mat A = randu<mat>(50,50);
+ mat B = trans(A)*A; // generate a symmetric matrix
+
+ vec eigval;
+ mat eigvec;
+
+ // use standard algorithm by default
+ eig_sym(eigval, eigvec, B);
+
+ // use divide & conquer algorithm
+ eig_sym(eigval, eigvec, B, "dc");
+ return 0;
+}
diff --git a/src/armadillo.mk b/src/armadillo.mk
new file mode 100644
index 0000000..04462ac
--- /dev/null
+++ b/src/armadillo.mk
@@ -0,0 +1,30 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+# armadillo
+PKG := armadillo
+$(PKG)_IGNORE :=
+$(PKG)_CHECKSUM := e7fdb6518172aabaa28c84412b52db7d86ef37a5
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc boost blas lapack
+
+define $(PKG)_UPDATE
+ wget -q -O- 'http://sourceforge.net/projects/arma/files/' | \
+ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)' && \
+ cmake . -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'
+ $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1
+
+# note: don't use -Werror with GCC 4.7.0 and .1
+'$(TARGET)-g++' \
+ -W -Wall \
+ '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-armadillo.exe' \
+ -larmadillo -llapack -lblas -lgfortran
+ -lboost_serialization-mt -lboost_thread_win32-mt -lboost_system-mt
+endef