summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2025-05-10 09:43:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-12 22:01:55 +0100
commita916ac384456960e5aac4e0ebd72808ce927067d (patch)
treed448d178a6ef1618d486b37bf11fa53ff5e8ecd5 /meta/lib/oeqa
parent49cce6af422997a8a4f473bc18f83b2f6b48630d (diff)
downloadpoky-a916ac384456960e5aac4e0ebd72808ce927067d.tar.gz
oeqa/sdk/gtk3: build libhandy instead of galculator
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/ (From OE-Core rev: ff6fa71eb0511d8594c4416a37d75a85470ff9c6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/sdk/cases/gtk3.py46
1 files changed, 20 insertions, 26 deletions
diff --git a/meta/lib/oeqa/sdk/cases/gtk3.py b/meta/lib/oeqa/sdk/cases/gtk3.py
index 1d953eecf1..cdaf50ed38 100644
--- a/meta/lib/oeqa/sdk/cases/gtk3.py
+++ b/meta/lib/oeqa/sdk/cases/gtk3.py
@@ -7,40 +7,34 @@
7import os 7import os
8import subprocess 8import subprocess
9import tempfile 9import tempfile
10import unittest
11 10
12from oeqa.sdk.case import OESDKTestCase 11from oeqa.sdk.cases.meson import MesonTestBase
12
13from oeqa.utils.subprocesstweak import errors_have_output 13from oeqa.utils.subprocesstweak import errors_have_output
14errors_have_output() 14errors_have_output()
15 15
16class GTK3Test(OESDKTestCase): 16class GTK3Test(MesonTestBase):
17 """
18 Test that autotools and GTK+ 3 compiles correctly.
19 """
20 def setUp(self):
21 libc = self.td.get("TCLIBC")
22 if libc in [ 'newlib' ]:
23 raise unittest.SkipTest("GTK3Test class: SDK doesn't contain a supported C library")
24 17
25 self.ensure_host_package(recipe="intltool") 18 def setUp(self):
19 super().setUp()
26 self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3") 20 self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3")
21 self.ensure_host_package("glib-2.0-utils", "libglib-2.0-utils", recipe="glib-2.0")
27 22
28 def test_galculator(self): 23 """
29 with tempfile.TemporaryDirectory(prefix="galculator", dir=self.tc.sdk_dir) as testdir: 24 Test that autotools and GTK+ 3 compiles correctly.
30 tarball = self.fetch(testdir, self.td["DL_DIR"], "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2") 25 """
26 def test_libhandy(self):
27 with tempfile.TemporaryDirectory(prefix="libhandy", dir=self.tc.sdk_dir) as testdir:
28 tarball = self.fetch(testdir, self.td["DL_DIR"], "https://download.gnome.org/sources/libhandy/1.8/libhandy-1.8.3.tar.xz")
31 29
32 dirs = {} 30 sourcedir = os.path.join(testdir, "libhandy-1.8.3")
33 dirs["source"] = os.path.join(testdir, "galculator-2.1.4") 31 builddir = os.path.join(testdir, "build")
34 dirs["build"] = os.path.join(testdir, "build") 32 installdir = os.path.join(testdir, "install")
35 dirs["install"] = os.path.join(testdir, "install")
36 33
37 subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT) 34 subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
38 self.assertTrue(os.path.isdir(dirs["source"])) 35 self.assertTrue(os.path.isdir(sourcedir))
39 os.makedirs(dirs["build"]) 36 os.makedirs(builddir)
40
41 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))
42 self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
43 self._run("cd {build} && make -j".format(**dirs))
44 self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
45 37
46 self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "galculator")) 38 self.build_meson(sourcedir, builddir, installdir, "-Dglade_catalog=disabled -Dintrospection=disabled -Dvapi=false")
39 self.assertTrue(os.path.isdir(installdir))
40 self.check_elf(os.path.join(installdir, "usr", "local", "lib", "libhandy-1.so"))