fix(x11/libwnck): Fix building with glib-cross for cross compilation

This fixes the following error.
OSError: [Errno 8] Exec format error: '/data/data/com.termux/files/usr/bin/glib-mkenums'
This commit is contained in:
termux-pacman-bot
2024-07-30 20:09:59 +00:00
parent 72d96de78e
commit 3ced7b88a9

View File

@@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/libwnck
TERMUX_PKG_DESCRIPTION="Window Navigator Construction Kit"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
_MAJOR_VERSION=43
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://ftp.gnome.org/pub/GNOME/sources/libwnck/${_MAJOR_VERSION}/libwnck-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_VERSION="43.0"
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/libwnck/${TERMUX_PKG_VERSION%.*}/libwnck-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=905bcdb85847d6b8f8861e56b30cd6dc61eae67ecef4cd994a9f925a26a2c1fe
TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libcairo, libx11, libxrender, pango, startup-notification"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner"
@@ -17,4 +16,15 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
termux_step_pre_configure() {
termux_setup_gir
local _WRAPPER_BIN="${TERMUX_PKG_BUILDDIR}/_wrapper/bin"
mkdir -p "${_WRAPPER_BIN}"
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
sed "s|^export PKG_CONFIG_LIBDIR=|export PKG_CONFIG_LIBDIR=${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig:|" \
"${TERMUX_STANDALONE_TOOLCHAIN}/bin/pkg-config" \
> "${_WRAPPER_BIN}/pkg-config"
chmod +x "${_WRAPPER_BIN}/pkg-config"
export PKG_CONFIG="${_WRAPPER_BIN}/pkg-config"
fi
export PATH="${_WRAPPER_BIN}:${PATH}"
}