diff options
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | mingw.patch | 41 |
3 files changed, 48 insertions, 6 deletions
@@ -7,11 +7,14 @@ pkgbase = mingw-w64-trilinos license = LGPL3 makedepends = mingw-w64-cmake depends = mingw-w64-netcdf + depends = mingw-w64-blas options = staticlibs options = !buildflags options = !strip source = https://github.com/trilinos/Trilinos/archive/trilinos-release-12-12-1.tar.gz + source = mingw.patch sha256sums = 5474c5329c6309224a7e1726cf6f0d855025b2042959e4e2be2748bd6bb49e18 + sha256sums = SKIP pkgname = mingw-w64-trilinos @@ -5,19 +5,17 @@ pkgdesc="Framework for the solution of large-scale, complex multi-physics engine arch=(any) url="http://trilinos.org" license=('LGPL3') -depends=('mingw-w64-netcdf') +depends=('mingw-w64-netcdf' 'mingw-w64-blas') makedepends=('mingw-w64-cmake') options=('staticlibs' '!buildflags' '!strip') -source=("https://github.com/trilinos/Trilinos/archive/trilinos-release-${pkgver//./-}.tar.gz") -sha256sums=('5474c5329c6309224a7e1726cf6f0d855025b2042959e4e2be2748bd6bb49e18') +source=("https://github.com/trilinos/Trilinos/archive/trilinos-release-${pkgver//./-}.tar.gz" mingw.patch) +sha256sums=('5474c5329c6309224a7e1726cf6f0d855025b2042959e4e2be2748bd6bb49e18' SKIP) _architectures="i686-w64-mingw32 x86_64-w64-mingw32" prepare () { cd "$srcdir"/Trilinos-trilinos-release-${pkgver//./-} - sed -i "s|<Winsock2.h>|<winsock2.h>|g" packages/teuchos/parameterlist/src/Teuchos_XMLPerfTestArchive.cpp - echo "target_link_libraries (teuchosparameterlist wsock32)" >> packages/teuchos/parameterlist/src/CMakeLists.txt - sed -i "s|#ifdef _WIN32|#ifdef _MSC_VER|g" packages/teuchos/numerics/src/Teuchos_BLAS.cpp + patch -p1 -i "$srcdir"/mingw.patch } build() { diff --git a/mingw.patch b/mingw.patch new file mode 100644 index 000000000000..9cd60004c719 --- /dev/null +++ b/mingw.patch @@ -0,0 +1,41 @@ +diff --git a/packages/teuchos/numerics/src/Teuchos_BLAS.cpp b/packages/teuchos/numerics/src/Teuchos_BLAS.cpp +index 70e3b05162..f7477e4b81 100644 +--- a/packages/teuchos/numerics/src/Teuchos_BLAS.cpp ++++ b/packages/teuchos/numerics/src/Teuchos_BLAS.cpp +@@ -111,7 +111,7 @@ namespace Teuchos { + + //Explicitly instantiating these templates for windows due to an issue with + //resolving them when linking dlls. +-#ifdef _WIN32 ++#ifdef _MSC_VER + # ifdef HAVE_TEUCHOS_COMPLEX + template BLAS<long int, std::complex<float> >; + template BLAS<long int, std::complex<double> >; +diff --git a/packages/teuchos/parameterlist/src/CMakeLists.txt b/packages/teuchos/parameterlist/src/CMakeLists.txt +index 309259a5d0..2374fe597f 100644 +--- a/packages/teuchos/parameterlist/src/CMakeLists.txt ++++ b/packages/teuchos/parameterlist/src/CMakeLists.txt +@@ -23,3 +23,7 @@ TRIBITS_ADD_LIBRARY( + SOURCES ${SOURCES} + DEFINES -DTEUCHOSPARAMETERLIST_LIB_EXPORTS_MODE + ) ++ ++if (WIN32) ++ target_link_libraries (teuchosparameterlist ws2_32) ++endif () +diff --git a/packages/teuchos/parameterlist/src/Teuchos_XMLPerfTestArchive.cpp b/packages/teuchos/parameterlist/src/Teuchos_XMLPerfTestArchive.cpp +index 1cd1a00264..6c45fbebe9 100644 +--- a/packages/teuchos/parameterlist/src/Teuchos_XMLPerfTestArchive.cpp ++++ b/packages/teuchos/parameterlist/src/Teuchos_XMLPerfTestArchive.cpp +@@ -47,9 +47,8 @@ + #include <Teuchos_XMLObject.hpp> + #include <Teuchos_FileInputSource.hpp> + #include <Teuchos_XMLPerfTestArchive.hpp> +-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +-#include <Winsock2.h> +-#pragma comment(lib, "ws2_32.lib") ++#ifdef _WIN32 ++#include <winsock2.h> + #else + #include <unistd.h> + #endif |