Merge pull request #1958 from tonytheodore/itpp

Added new module itpp
This commit is contained in:
Tony Theodore 2017-11-01 19:58:17 +11:00 committed by GitHub
commit a194a08162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

23
src/itpp-1-fixes.patch Normal file
View File

@ -0,0 +1,23 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Wed, 1 Nov 2017 19:30:10 +1100
Subject: [PATCH] install pc files etc. on mingw
diff --git a/itpp/CMakeLists.txt b/itpp/CMakeLists.txt
index 1111111..2222222 100644
--- a/itpp/CMakeLists.txt
+++ b/itpp/CMakeLists.txt
@@ -101,7 +101,7 @@ if (HTML_DOCS AND DOXYGEN_FOUND)
endif()
#itpp-config script for UNIX-like systems
-if (UNIX)
+if (UNIX OR MINGW)
if (ITPP_LIBS)
string (REPLACE ";" " " ITPP_LIBS "${ITPP_LIBS}")
endif()

33
src/itpp.mk Normal file
View File

@ -0,0 +1,33 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := itpp
$(PKG)_WEBSITE := http://itpp.sourceforge.net
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.3.1
$(PKG)_CHECKSUM := 50717621c5dfb5ed22f8492f8af32b17776e6e06641dfe3a3a8f82c8d353b877
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc blas lapack fftw
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://sourceforge.net/projects/itpp/files/itpp/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DITPP_SHARED_LIB=$(CMAKE_SHARED_BOOL) \
-DHTML_DOCS=OFF \
-DBLAS_LIBRARIES=-lblas \
-DLAPACK_LIBRARIES='-llapack -lgfortran -lquadmath'
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# compile test
'$(TARGET)-g++' \
-W -Wall -pedantic \
'$(SOURCE_DIR)/tests/array_test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
endef