From 0871b6c67e60aecbb8943c53d4193b52f2254a4a Mon Sep 17 00:00:00 2001 From: Robert Kirkman Date: Fri, 3 Jan 2025 01:06:57 -0600 Subject: [PATCH] addpkg(x11/meld): 3.22.2 Closes #18900 (that bug was described as "with the general intention of running meld", and this is a newer way and a newer version of meld than that) --- x11-packages/meld/build.sh | 31 +++++++++++++++++++ .../meld/handle-bindtextdomain-oserror.patch | 11 +++++++ 2 files changed, 42 insertions(+) create mode 100644 x11-packages/meld/build.sh create mode 100644 x11-packages/meld/handle-bindtextdomain-oserror.patch diff --git a/x11-packages/meld/build.sh b/x11-packages/meld/build.sh new file mode 100644 index 000000000000000..0a03c2793901373 --- /dev/null +++ b/x11-packages/meld/build.sh @@ -0,0 +1,31 @@ +TERMUX_PKG_HOMEPAGE=https://meldmerge.org/ +TERMUX_PKG_DESCRIPTION="A visual diff and merge tool targeted at developers" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="3.22.2" +TERMUX_PKG_SRCURL=https://download.gnome.org/sources/meld/3.22/meld-${TERMUX_PKG_VERSION}.tar.xz +TERMUX_PKG_SHA256=46a0a713fbcd1b153b377a1e0757c8ce255c9822467658eacfbd89b1e92316ef +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_DEPENDS="gsettings-desktop-schemas, glib, gtk3, gtksourceview4, libcairo, pango, pycairo, pygobject, python" +TERMUX_PKG_BUILD_DEPENDS="gettext" +TERMUX_PKG_PLATFORM_INDEPENDENT=true +# The "byte-compile" build setting will go away in the next release +# It does not actually turn off byte compiling because Termux has recent Meson +# (https://gitlab.gnome.org/GNOME/meld/-/commit/361ac82ce94dd46d0eed0e9239c34a8e3d13cd2e) +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dbyte-compile=false +" + +termux_step_pre_configure() { + termux_setup_glib_cross_pkg_config_wrapper +} + +# It is really strange that this is necessary. The reason that meson is installing this +# into $TERMUX_PREFIX/local/lib/python3.12/dist-packages instead of $TERMUX_PREFIX/lib/python3.12/site-packages +# is not clear. Other distros do not seem to have this problem. +termux_step_post_make_install() { + mkdir -p "$TERMUX_PREFIX/lib/python$TERMUX_PYTHON_VERSION/site-packages" + mv "$TERMUX_PREFIX/local/lib/python$TERMUX_PYTHON_VERSION/dist-packages/$TERMUX_PKG_NAME" \ + "$TERMUX_PREFIX/lib/python$TERMUX_PYTHON_VERSION/site-packages/" + rm -rf "$TERMUX_PREFIX/local" +} diff --git a/x11-packages/meld/handle-bindtextdomain-oserror.patch b/x11-packages/meld/handle-bindtextdomain-oserror.patch new file mode 100644 index 000000000000000..5f82292dbb32ab1 --- /dev/null +++ b/x11-packages/meld/handle-bindtextdomain-oserror.patch @@ -0,0 +1,11 @@ +--- a/bin/meld ++++ b/bin/meld +@@ -141,7 +141,7 @@ try: + locale.bindtextdomain(locale_domain, str(locale_dir)) + locale.bind_textdomain_codeset(locale_domain, 'UTF-8') + locale.textdomain(locale_domain) +-except AttributeError as e: ++except (AttributeError,OSError) as e: + # Python builds linked without libintl (i.e., OSX) don't have + # bindtextdomain(), which causes Gtk.Builder translations to fail. + print(