From aa7d1d1e16ba62ce1d8228788fa1b3cd2d1c60d0 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 20 Oct 2014 00:16:56 -0400 Subject: armadillo: Update and use out-of-tree builds Signed-off-by: Timothy Gu --- src/armadillo-1-nocmakeconfigfiles.patch | 28 ++++++++++++++++++++++++++++ src/armadillo-1-staticlib.patch | 23 ----------------------- src/armadillo-2-nocmakeconfigfiles.patch | 14 -------------- src/armadillo.mk | 12 ++++++++---- 4 files changed, 36 insertions(+), 41 deletions(-) create mode 100644 src/armadillo-1-nocmakeconfigfiles.patch delete mode 100644 src/armadillo-1-staticlib.patch delete mode 100644 src/armadillo-2-nocmakeconfigfiles.patch diff --git a/src/armadillo-1-nocmakeconfigfiles.patch b/src/armadillo-1-nocmakeconfigfiles.patch new file mode 100644 index 0000000..daf6be5 --- /dev/null +++ b/src/armadillo-1-nocmakeconfigfiles.patch @@ -0,0 +1,28 @@ +From f33262c29c253608f57e91af0e96bdb7bfa3cc00 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Sun, 19 Oct 2014 12:09:55 -0400 +Subject: [PATCH] Don't export package + +Signed-off-by: Timothy Gu +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0f2180..5ecba48 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -402,7 +402,9 @@ install(TARGETS armadillo EXPORT ArmadilloLibraryDepends + + # Export the package for use from the build-tree + # (this registers the build-tree with a global CMake-registry) +-export(PACKAGE armadillo) ++if(CMAKE_VERSION VERSION_GREATER "2.7" AND NOT (MINGW AND CMAKE_TOOLCHAIN_FILE)) ++ export(PACKAGE armadillo) ++endif() + + ## LOCAL FILES + # Create ArmadilloConfig.cmake file for the use from the build tree +-- +1.9.1 + diff --git a/src/armadillo-1-staticlib.patch b/src/armadillo-1-staticlib.patch deleted file mode 100644 index a643985..0000000 --- a/src/armadillo-1-staticlib.patch +++ /dev/null @@ -1,23 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2013-12-06 08:39:40.000000000 +0100 -+++ b/CMakeLists.txt 2013-12-06 14:05:54.098314032 +0100 -@@ -32,7 +32,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) - - ## NOTE: - ## Set ARMA_USE_WRAPPER to false if you're getting linking errors when compiling your programs, -@@ -340,7 +340,7 @@ - message(STATUS "CMAKE_SHARED_LINKER_FLAGS = ${CMAKE_SHARED_LINKER_FLAGS}") - - --add_library( armadillo SHARED src/wrapper ) -+add_library( armadillo STATIC src/wrapper ) - target_link_libraries( armadillo ${ARMA_LIBS} ) - set_target_properties(armadillo PROPERTIES VERSION ${ARMA_MAJOR}.${ARMA_MINOR_ALT}.${ARMA_PATCH} SOVERSION ${ARMA_MAJOR}) diff --git a/src/armadillo-2-nocmakeconfigfiles.patch b/src/armadillo-2-nocmakeconfigfiles.patch deleted file mode 100644 index 722a12a..0000000 --- a/src/armadillo-2-nocmakeconfigfiles.patch +++ /dev/null @@ -1,14 +0,0 @@ -This file is part of MXE. -See index.html for further information. - ---- armadillo-3.800.2/CMakeLists.txt.patched 2013-04-22 17:15:39.000000000 +0200 -+++ armadillo-3.800.2/CMakeLists.txt 2013-04-22 17:31:43.000000000 +0200 -@@ -404,7 +404,7 @@ - - # Export the package for use from the build-tree - # (this registers the build-tree with a global CMake-registry) --if(CMAKE_VERSION VERSION_GREATER "2.7") -+if(CMAKE_VERSION VERSION_GREATER "2.7" AND NOT (MINGW AND CMAKE_TOOLCHAIN_FILE)) - export(PACKAGE armadillo) - endif() - diff --git a/src/armadillo.mk b/src/armadillo.mk index f375673..302f2cf 100644 --- a/src/armadillo.mk +++ b/src/armadillo.mk @@ -3,8 +3,8 @@ PKG := armadillo $(PKG)_IGNORE := -$(PKG)_VERSION := 3.930.2 -$(PKG)_CHECKSUM := cbd8b2b65d5af4af1e2ab8d93896cd641c27023c +$(PKG)_VERSION := 4.450.4 +$(PKG)_CHECKSUM := a8b4ecba8161aee4d252da9f6de40eb78895f329 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE) @@ -17,8 +17,12 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake . -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' - $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1 + mkdir '$(1)/build' + cd '$(1)/build' && cmake .. \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DBUILD_SHARED_LIBS=$(if $(BUILD_SHARED),YES,NO) \ + -DARMA_USE_WRAPPER=false + $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 # note: don't use -Werror with GCC 4.7.0 and .1 '$(TARGET)-g++' \ -- cgit v0.12