cmr: add version 1.4 (new package)
This commit is contained in:
52
mingw-w64-cmr/PKGBUILD
Normal file
52
mingw-w64-cmr/PKGBUILD
Normal file
@@ -0,0 +1,52 @@
|
||||
# Contributor: Dirk Stolle
|
||||
|
||||
_realname=cmr
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.4
|
||||
pkgrel=1
|
||||
pkgdesc="Combinatorial Matrix Recognition Library (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://discopt.github.io/cmr/'
|
||||
msys2_repository_url='https://github.com/discopt/cmr/'
|
||||
license=('spdx:MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gmp")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-doxygen"
|
||||
"${MINGW_PACKAGE_PREFIX}-gtest"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja")
|
||||
source=("https://github.com/discopt/cmr/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('956a6114d7ee2d3176376660ab1221306da9b2f6de985825d8e60c9cbdf41c17')
|
||||
|
||||
build() {
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
|
||||
"${extra_config[@]}" \
|
||||
-DBUILD_{SHARED,STATIC}_LIBS=ON \
|
||||
-S "${_realname}-${pkgver}" \
|
||||
-B "build-${MSYSTEM}"
|
||||
|
||||
cmake --build "build-${MSYSTEM}"
|
||||
}
|
||||
|
||||
check() {
|
||||
cmake --build "build-${MSYSTEM}" --target test
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}"
|
||||
|
||||
unlink "${pkgdir}${MINGW_PREFIX}/include/cmr/config.h.in"
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user