From 6af8fcb2bdbeeb7bd88dcb6e1e063430edea6dec Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Sun, 28 Nov 2021 07:15:49 +0100 Subject: [PATCH] [new-package] f2cblaslapack (clang only) --- .../001-no-petsc-conf.patch | 11 ++++++ mingw-w64-f2cblaslapack/PKGBUILD | 35 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 mingw-w64-f2cblaslapack/001-no-petsc-conf.patch create mode 100644 mingw-w64-f2cblaslapack/PKGBUILD diff --git a/mingw-w64-f2cblaslapack/001-no-petsc-conf.patch b/mingw-w64-f2cblaslapack/001-no-petsc-conf.patch new file mode 100644 index 0000000000..7b22fe7a12 --- /dev/null +++ b/mingw-w64-f2cblaslapack/001-no-petsc-conf.patch @@ -0,0 +1,11 @@ +--- a/makefile ++++ b/makefile +@@ -24,7 +24,7 @@ + # By default, pick up the options from the PETSc configuration files + ######################################################################################## + BLASLAPACK_TYPE = F2CBLASLAPACK +-include ${PETSC_DIR}/lib/petsc/conf/base ++#include ${PETSC_DIR}/lib/petsc/conf/base + + ######################################################################################## + # compile the source files and create the blas and lapack libs diff --git a/mingw-w64-f2cblaslapack/PKGBUILD b/mingw-w64-f2cblaslapack/PKGBUILD new file mode 100644 index 0000000000..bc0af6fbf8 --- /dev/null +++ b/mingw-w64-f2cblaslapack/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Mehdi Chinoune + +_realname=f2cblaslapack +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=3.4.2.q4 +pkgrel=1 +pkgdesc="f2c BLAS/LAPACK (mingw-w64)" +provides=("${MINGW_PACKAGE_PREFIX}-lapack") +arch=('any') +mingw_arch=('clang64') +url='https://www.petsc.org/' # Part of petsc +license=('2-clause BSD') +source=("http://ftp.mcs.anl.gov/pub/petsc/externalpackages/${_realname}-${pkgver}.tar.gz" + 001-no-petsc-conf.patch) +sha256sums=('41a43c6f2514ab34bf55aca5474b875882c7d4cd70c76bf4bc7ac433e6c2003e' + '7a77aa2621945d2103bb85735b0e9d08526e1943b7f055c1ee7680fd401064f1') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/001-no-petsc-conf.patch +} + +build() { + [[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM} + cp -r "${srcdir}"/${_realname}-${pkgver} "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM} + + make +} + +package() { + cd "${srcdir}"/build-${MSYSTEM} + install -Dm644 libf2cblas.a "${pkgdir}"${MINGW_PREFIX}/lib/libblas.a + install -Dm644 libf2clapack.a "${pkgdir}"${MINGW_PREFIX}/lib/liblapack.a +}