From 30c283631c70d39c2c645be00ca9b01efbaa4735 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 7 Mar 2021 12:37:04 +0100 Subject: [PATCH 1/2] CI: read mingw_arch array to decide which builds the PKGBUILD supports --- .ci/ci-generate-srcinfo.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.ci/ci-generate-srcinfo.py b/.ci/ci-generate-srcinfo.py index ac07da1132..d38094ad3a 100644 --- a/.ci/ci-generate-srcinfo.py +++ b/.ci/ci-generate-srcinfo.py @@ -28,6 +28,7 @@ import shutil from collections import OrderedDict import hashlib import time +import shlex import subprocess from concurrent.futures import ThreadPoolExecutor @@ -89,6 +90,21 @@ def get_cache_key(pkgbuild_path: str) -> str: return h.hexdigest() +def get_mingw_arch_list(pkgbuild_path: str) -> List[str]: + bash = shutil.which("bash") + assert bash is not None + sub_commands = [ + shlex.join(['source', pkgbuild_path]), + 'echo -n "${mingw_arch[@]}"' + ] + out = subprocess.check_output([bash, '-c', ';'.join(sub_commands)], universal_newlines=True) + arch_list = out.strip().split() + if not arch_list: + arch_list = ["mingw32", "mingw64"] + assert arch_list + return arch_list + + def get_srcinfo_for_pkgbuild(args: Tuple[str, str]) -> Optional[CacheTuple]: pkgbuild_path, mode = args pkgbuild_path = os.path.abspath(pkgbuild_path) @@ -106,7 +122,7 @@ def get_srcinfo_for_pkgbuild(args: Tuple[str, str]) -> Optional[CacheTuple]: srcinfos = {} if mode == "mingw": - for name in ["mingw32", "mingw64"]: + for name in get_mingw_arch_list(pkgbuild_path): env = os.environ.copy() env["MINGW_INSTALLS"] = name srcinfos[name] = subprocess.check_output( From 358331f2702e8f1a5238466b70b8c788094652a2 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 7 Mar 2021 12:37:38 +0100 Subject: [PATCH 2/2] darktable: use new mingw_arch array --- mingw-w64-darktable/PKGBUILD | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mingw-w64-darktable/PKGBUILD b/mingw-w64-darktable/PKGBUILD index 7b78123abe..ff6ef81734 100644 --- a/mingw-w64-darktable/PKGBUILD +++ b/mingw-w64-darktable/PKGBUILD @@ -1,15 +1,13 @@ # Maintainer: Peter Budai -# XXX: skip 32bit build, no longer supported upstream -[[ $MINGW_CHOST = "i686-w64-mingw32" ]] && exit 0; - _realname=darktable pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=3.4.1 -pkgrel=1 +pkgrel=2 pkgdesc="darktable is an open source photography workflow application and raw developer (mingw-w64)" arch=('any') +mingw_arch=('mingw64') url='https://www.darktable.org' license=('GPL3') makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"