Skip to content

Commit

Permalink
fix(x11/libdazzle): Fix building with glib-cross for cross compilation
Browse files Browse the repository at this point in the history
This fixes the following error.
OSError: [Errno 8] Exec format error: '/data/data/com.termux/files/usr/bin/glib-mkenums'
  • Loading branch information
Biswa96 committed Jul 30, 2024
1 parent 5a6845f commit 7676017
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions x11-packages/libdazzle/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/libdazzle
TERMUX_PKG_DESCRIPTION="A companion library to GObject and Gtk+"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
_MAJOR_VERSION=3.44
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/libdazzle/${_MAJOR_VERSION}/libdazzle-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_VERSION="3.44.0"
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/libdazzle/${TERMUX_PKG_VERSION%.*}/libdazzle-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3cd3e45eb6e2680cb05d52e1e80dd8f9d59d4765212f0e28f78e6c1783d18eae
TERMUX_PKG_DEPENDS="gdk-pixbuf, glib, gtk3, libcairo, pango"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, valac"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, glib-cross, valac"
TERMUX_PKG_DISABLE_GIR=false
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Denable_tools=false
Expand All @@ -19,4 +18,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}"
}

0 comments on commit 7676017

Please sign in to comment.