netcdf-cxx (4.3.1): testsuite fixes on MINGW32/64 and CLANG32/64

* PKGBUILD:
  - amend and split out dependencies to makedepends and depends
  - fix directory for COPYRIGHT file
  - add patch for testsuite fix
* 0001-netcdf-cxx-4.3.1-examples-fix-plugin-name-on-MINGW32-64-and-CLANG32-64.patch:
  - added to fix test 'tst_filter.sh' on MINGW32/64 and CLANG32/64
This commit is contained in:
Jannick
2022-12-14 23:13:23 +01:00
parent f8fc78f54b
commit 64db0306f4
2 changed files with 52 additions and 8 deletions

View File

@@ -0,0 +1,35 @@
From 7626f7a9b57e83aad48566028f2d5dab4ad8a0f3 Mon Sep 17 00:00:00 2001
Date: Tue, 1 Nov 2022 17:01:26 +0100
Subject: examples: fix plugin name on MINGW32/64 and CLANG32/64
* examples/findplugin.in:
add plugin name on MINGW32/64 and CLANG32/64
---
diff --git a/examples/findplugin.in b/examples/findplugin.in
index 0656823..29560ad 100644
--- a/examples/findplugin.in
+++ b/examples/findplugin.in
@@ -39,6 +39,11 @@ if test "x$FP_OS" = xDarwin ; then FP_ISOSX=1; fi
FP_OS=`uname | cut -d '_' -f 1`
if test "x$FP_OS" = xCYGWIN ; then FP_ISCYGWIN=1; fi
+FP_IS_OTHER_WIN=
+case $FP_OS in
+ MINGW* | CLANG* ) FP_IS_OTHER_WIN=1;;
+esac
+
FP_PLUGINS="$topbuilddir/plugins"
FP_PLUGIN_LIB=
@@ -50,6 +55,8 @@ if test "x$FP_ISMSVC" != x ; then
FP_PLUGIN_LIB="${FP_NAME}.dll"
elif test "x$FP_ISCYGWIN" != x ; then
FP_PLUGIN_LIB="cyg${FP_NAME}.dll"
+elif test "x$FP_IS_OTHER_WIN" != x ; then
+ FP_PLUGIN_LIB="lib${FP_NAME}.dll"
elif test "x$FP_ISOSX" != x ; then
FP_PLUGIN_LIB="lib${FP_NAME}.so" # Should this include the version number in the name?
else # Presumably some form on *nix"
--
2.36.1.windows.1

View File

@@ -3,21 +3,30 @@ _realname=netcdf-cxx
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=4.3.1
pkgrel=2
pkgrel=3
pkgdesc="NetCDF C++ bindings (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://github.com/Unidata/netcdf-cxx4/"
license=(custom)
depends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-netcdf>=4.6.0")
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('e3fe3d2ec06c1c2772555bf1208d220aab5fee186d04bd265219b0bc7a978edc')
depends=(
"${MINGW_PACKAGE_PREFIX}-netcdf>=4.6.0"
'sed' # for ncxx4-config
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc"
)
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
'0001-netcdf-cxx-4.3.1-examples-fix-plugin-name-on-MINGW32-64-and-CLANG32-64.patch')
sha256sums=('e3fe3d2ec06c1c2772555bf1208d220aab5fee186d04bd265219b0bc7a978edc'
'dcb7f4c88e1cdfd9627c61020a77c400296aaf1a67f06549e87682b0a8df8844')
prepare() {
cd "${_realname}${pkgver/.*/}-${pkgver}"
patch -p1 < '../0001-netcdf-cxx-4.3.1-examples-fix-plugin-name-on-MINGW32-64-and-CLANG32-64.patch'
autoreconf -vfi
}
@@ -28,7 +37,7 @@ build() {
--prefix="${MINGW_PREFIX}"
# file VERSION (generated by configure) confuses those
# CLANG32/64 header files with #include <version>
# CLANG32/64 header files which #include <version>
mv -f VERSION .VERSION
make libh5bzip2_la_LIBADD=-lhdf5 LIBS=-lnetcdf
@@ -40,5 +49,5 @@ check() {
package() {
make install DESTDIR="${pkgdir}" -C "build-${_realname}-${pkgver}-${MSYSTEM}"
install -Dm644 "${_realname}${pkgver/.*/}-${pkgver}"/COPYRIGHT -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${pkg_realnamename}/"
install -Dm644 "${_realname}${pkgver/.*/}-${pkgver}"/COPYRIGHT -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/"
}