Skip to content

Commit

Permalink
fix(x11/gnome-desktop4): Fix building with glib-cross for cross compi…
Browse files Browse the repository at this point in the history
…lation

This fixes the following error.
/data/data/com.termux/files/usr/bin/gdbus-codegen: 23: import: not found
  • Loading branch information
Biswa96 committed Jul 30, 2024
1 parent 807e650 commit 8f2dc14
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions x11-packages/gnome-desktop4/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-desktop
TERMUX_PKG_DESCRIPTION="Utility library for loading .desktop files"
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
_MAJOR_VERSION=44
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/gnome-desktop/${_MAJOR_VERSION}/gnome-desktop-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_VERSION="44.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/gnome-desktop/${TERMUX_PKG_VERSION%.*}/gnome-desktop-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=42c773745d84ba14bc1cf1c4c6f4606148803a5cd337941c63964795f3c59d42
TERMUX_PKG_DEPENDS="gdk-pixbuf, glib, gsettings-desktop-schemas, gtk4, iso-codes, libcairo, libxkbcommon, xkeyboard-config"
TERMUX_PKG_BUILD_DEPENDS="fontconfig, g-ir-scanner"
TERMUX_PKG_BUILD_DEPENDS="fontconfig, g-ir-scanner, glib-cross"
TERMUX_PKG_DISABLE_GIR=false
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Ddesktop_docs=false
Expand All @@ -19,6 +19,17 @@ 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}"
}

termux_step_post_massage() {
Expand Down

0 comments on commit 8f2dc14

Please sign in to comment.