I found an arguably hacky workaround for getting the debug package to work again:
It seems doing the meson
configure call before build ()
breaks the debug prefix map used for creating the debug pacakges. This is because the CFLAGS
variable is only set to contain the DEBUG_CFLAGS
during the build ()
function, but not during the prepare ()
function.
A simple, but ugly fix would be to configure twice: once just for the version information, and once for the build.
Here is a short patch:
diff --git a/PKGBUILD b/PKGBUILD
index 1535646..100bafa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,18 +34,23 @@ makedepends=(
source=("${pkgname}::git+${url}.git")
md5sums=('SKIP')
-prepare () {
+_meson_configure () {
+ local _builddir="$1"
arch-meson \
--buildtype=debug \
-Dwerror=false \
-Dexamples=false \
- "${pkgname}" build
+ "${pkgname}" "${_builddir}"
+}
+
+prepare () {
+ _meson_configure build-pkgver
}
pkgver () {
(
set -o pipefail
- meson introspect --projectinfo build \
+ meson introspect --projectinfo build-pkgver \
| awk 'match($0, /"version":\s*"([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)"/, ret) {printf "%s",ret[1]}'
)
cd "${pkgname}"
@@ -53,6 +58,7 @@ pkgver () {
}
build () {
+ _meson_configure build
meson compile -C build
}
Pinned Comments
aperez commented on 2018-09-28 08:31 (UTC) (edited on 2019-03-07 16:25 (UTC) by aperez)
IMPORTANT
Please do not flag this package as out-of-date if the only change you need is to update to a newer version. It is not needed because it always fetches the sources using Git and uses the most recent version without needing to modify the PKGBUILD — just rebuild the package.
Also, please try building in a clean chroot before assuming that the PKGBUILD is broken.