From patchwork Sat May 10 08:43:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 62722 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EB6C3ABD3 for ; Sat, 10 May 2025 08:44:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.6814.1746866653505545286 for ; Sat, 10 May 2025 01:44:13 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2978A153B for ; Sat, 10 May 2025 01:44:02 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C18703F5A1 for ; Sat, 10 May 2025 01:44:12 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 13/23] oeqa/sdk/gtk3: build libhandy instead of galculator Date: Sat, 10 May 2025 09:43:46 +0100 Message-ID: <20250510084400.269726-13-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250510084400.269726-1-ross.burton@arm.com> References: <20250510084400.269726-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 10 May 2025 08:44:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216261 galculator hasn't been touched for a decade now[1] and fails to compile under GCC 15. Switch to building libhandy, which is the GTK+3 precursor to libadwaita in the Gnome stack. Whilst this is in low-maintainence mode, will be updated if it breaks. [1] https://github.com/galculator/galculator/ Signed-off-by: Ross Burton --- meta/lib/oeqa/sdk/cases/gtk3.py | 46 ++++++++++++++------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/meta/lib/oeqa/sdk/cases/gtk3.py b/meta/lib/oeqa/sdk/cases/gtk3.py index 1d953eecf1d..cdaf50ed384 100644 --- a/meta/lib/oeqa/sdk/cases/gtk3.py +++ b/meta/lib/oeqa/sdk/cases/gtk3.py @@ -7,40 +7,34 @@ import os import subprocess import tempfile -import unittest -from oeqa.sdk.case import OESDKTestCase +from oeqa.sdk.cases.meson import MesonTestBase + from oeqa.utils.subprocesstweak import errors_have_output errors_have_output() -class GTK3Test(OESDKTestCase): +class GTK3Test(MesonTestBase): + + def setUp(self): + super().setUp() + self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3") + self.ensure_host_package("glib-2.0-utils", "libglib-2.0-utils", recipe="glib-2.0") + """ Test that autotools and GTK+ 3 compiles correctly. """ - def setUp(self): - libc = self.td.get("TCLIBC") - if libc in [ 'newlib' ]: - raise unittest.SkipTest("GTK3Test class: SDK doesn't contain a supported C library") + def test_libhandy(self): + with tempfile.TemporaryDirectory(prefix="libhandy", dir=self.tc.sdk_dir) as testdir: + tarball = self.fetch(testdir, self.td["DL_DIR"], "https://download.gnome.org/sources/libhandy/1.8/libhandy-1.8.3.tar.xz") - self.ensure_host_package(recipe="intltool") - self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3") - - def test_galculator(self): - with tempfile.TemporaryDirectory(prefix="galculator", dir=self.tc.sdk_dir) as testdir: - tarball = self.fetch(testdir, self.td["DL_DIR"], "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2") - - dirs = {} - dirs["source"] = os.path.join(testdir, "galculator-2.1.4") - dirs["build"] = os.path.join(testdir, "build") - dirs["install"] = os.path.join(testdir, "install") + sourcedir = os.path.join(testdir, "libhandy-1.8.3") + builddir = os.path.join(testdir, "build") + installdir = os.path.join(testdir, "install") subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) - self.assertTrue(os.path.isdir(dirs["source"])) - os.makedirs(dirs["build"]) + self.assertTrue(os.path.isdir(sourcedir)) + os.makedirs(builddir) - self._run("cd {source} && sed -i -e '/s_preferences.*prefs;/d' src/main.c && autoreconf -i -f -I $OECORE_TARGET_SYSROOT/usr/share/aclocal -I m4".format(**dirs)) - self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs)) - self._run("cd {build} && make -j".format(**dirs)) - self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) - - self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "galculator")) + self.build_meson(sourcedir, builddir, installdir, "-Dglade_catalog=disabled -Dintrospection=disabled -Dvapi=false") + self.assertTrue(os.path.isdir(installdir)) + self.check_elf(os.path.join(installdir, "usr", "local", "lib", "libhandy-1.so"))