From 6391dd697c4b5cfbc452bf920da539f0417709b0 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 13 May 2023 10:29:57 +0200 Subject: [PATCH] gcab: avoid calling git in the meson build script as it will fail if there is no git repo --- mingw-w64-gcab/0001-skip-git.patch | 11 +++++++++++ mingw-w64-gcab/PKGBUILD | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 mingw-w64-gcab/0001-skip-git.patch diff --git a/mingw-w64-gcab/0001-skip-git.patch b/mingw-w64-gcab/0001-skip-git.patch new file mode 100644 index 0000000000..5f9a461051 --- /dev/null +++ b/mingw-w64-gcab/0001-skip-git.patch @@ -0,0 +1,11 @@ +--- gcab-1.5/meson.build.orig 2023-05-13 10:27:18.425741300 +0200 ++++ gcab-1.5/meson.build 2023-05-13 10:27:22.062791200 +0200 +@@ -7,7 +7,7 @@ + + git_version = [] + git = find_program('git', required: false) +-if git.found() ++if git.found() and false + git_version = run_command(git, 'describe', '--abbrev=4', '--dirty', check: true).stdout().strip().split('-') + endif + diff --git a/mingw-w64-gcab/PKGBUILD b/mingw-w64-gcab/PKGBUILD index 6821e89cb6..3091ee9c68 100644 --- a/mingw-w64-gcab/PKGBUILD +++ b/mingw-w64-gcab/PKGBUILD @@ -4,7 +4,7 @@ _realname=gcab pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.5 -pkgrel=2 +pkgrel=3 pkgdesc="A GObject library to create cabinet files (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32') @@ -19,8 +19,17 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-meson" "${MINGW_PACKAGE_PREFIX}-gobject-introspection" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cc") -source=("https://download.gnome.org/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz") -sha256sums=('46bf7442491faa4148242b9ec2a0786a5f6e9effb1b0566e5290e8cc86f00f0c') +source=("https://download.gnome.org/sources/${_realname}/${pkgver:0:3}/${_realname}-${pkgver}.tar.xz" + "0001-skip-git.patch") +sha256sums=('46bf7442491faa4148242b9ec2a0786a5f6e9effb1b0566e5290e8cc86f00f0c' + 'bfc3e3e3c52252f744247cf3d80c93aa8d7d5336d4cab085ec11680ba3a5c4a5') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + # https://gitlab.gnome.org/GNOME/gcab/-/issues/18 + patch -Np1 -i "${srcdir}/0001-skip-git.patch" +} build() { [[ -d build-${MSYSTEM} ]] && rm -rf build-${MSYSTEM}