Skip to content

Commit

Permalink
ginkgo: new package
Browse files Browse the repository at this point in the history
  • Loading branch information
3rav authored Jul 25, 2024
1 parent 32e26d9 commit 8f029ac
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions mingw-w64-ginkgo/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Maintainer: Rafał Brzegowy <[email protected]>

_realname=ginkgo
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.8.0
pkgrel=1
pkgdesc='Numerical linear algebra software package (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
depends=("${MINGW_PACKAGE_PREFIX}-metis"
"${MINGW_PACKAGE_PREFIX}-hwloc")
makedepends=("${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-cc"
'git')
license=('spdx:BSD-3-Clause')
url="https://ginkgo-project.github.io"
source=("https://github.com/ginkgo-project/${_realname}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('421efaed1be2ef11d230b79fc68bcf7e264a2c57ae52aff6dec7bd90f8d4ae30')

build() {

#Static Build
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DGINKGO_MIXED_PRECISION=ON \
-DGINKGO_BUILD_HWLOC=ON \
-DGINKGO_BUILD_TESTS=OFF \
-DGINKGO_BUILD_BENCHMARKS=OFF \
../${_realname}-${pkgver}

${MINGW_PREFIX}/bin/cmake --build .

#Shared Build
mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DGINKGO_MIXED_PRECISION=ON \
-DGINKGO_BUILD_HWLOC=ON \
-DGINKGO_BUILD_TESTS=OFF \
-DGINKGO_BUILD_BENCHMARKS=OFF \
../${_realname}-${pkgver}

${MINGW_PREFIX}/bin/cmake --build .
}

package() {
#Static Install
cd "${srcdir}/build-${MSYSTEM}-static"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .

#Shared Install
cd "${srcdir}/build-${MSYSTEM}-shared"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
}

0 comments on commit 8f029ac

Please sign in to comment.