diff --git a/extra-utils/hardinfo/autobuild/defines b/extra-utils/hardinfo/autobuild/defines index 95e8d6867b6..06cd24a06f3 100644 --- a/extra-utils/hardinfo/autobuild/defines +++ b/extra-utils/hardinfo/autobuild/defines @@ -1,6 +1,6 @@ PKGNAME=hardinfo PKGSEC=utils -PKGDEP="gtk-3 libsoup zlib json-glib sysbench" +PKGDEP="gtk-3 libsoup zlib json-glib sysbench hddtemp" # LuaJIT is not available on riscv64 for now. PKGDEP__RISCV64="${PKGDEP/sysbench/}" PKGDEP__RETRO="gtk-2 zlib" @@ -8,4 +8,5 @@ BUILDDEP="intltool" PKGDES="A system information and benchmark tool" # Use GTK-3 instead of outdated GTK-2 on mainline architecture -CMAKE_AFTER__MAINLINE="-DHARDINFO_GTK3=1" +CMAKE_AFTER__MAINLINE=" -DHARDINFO_GTK3=1" +#CMAKE_AFTER__MAINLINE+=" -CMAKE_BUILD_TYPE=Debug" diff --git a/extra-utils/hardinfo/autobuild/patches/0001-bugfix-module-load-order.patch b/extra-utils/hardinfo/autobuild/patches/0001-bugfix-module-load-order.patch new file mode 100644 index 00000000000..34571eb9152 --- /dev/null +++ b/extra-utils/hardinfo/autobuild/patches/0001-bugfix-module-load-order.patch @@ -0,0 +1,27 @@ +diff --git a/hardinfo/util.c b/hardinfo/util.c +index 38c7bce..0f02afb 100644 +--- a/hardinfo/util.c ++++ b/hardinfo/util.c +@@ -962,11 +962,21 @@ static GSList *modules_load(gchar ** module_list) + dir = g_dir_open(filename, 0, NULL); + g_free(filename); + ++ /*** ++ * g_module_open("benchmark.so"/"computer.so") failed due to some undefined ++ * symbols, which are located in devices.so. ++ * From https://docs.gtk.org/glib/method.Dir.read_name.html ++ * The order of entries returned from this g_dir_read_name() is not ++ * defined. Unless we got a better solution, we need a hardcoded ++ * module list, or load devices.so first. ++ */ ++ DEBUG("Temporary fix: loading devices.so before all"); ++ module_load((gchar *) "devices.so"); + if (dir) { + while ((filename = (gchar *) g_dir_read_name(dir))) { + if (g_strrstr(filename, "." G_MODULE_SUFFIX) && + module_in_module_list(filename, module_list) && +- ((module = module_load(filename)))) { ++ ((module = module_load(filename)))) { // Where the bug exists + modules = g_slist_prepend(modules, module); + } + } diff --git a/extra-utils/hardinfo/autobuild/prepare b/extra-utils/hardinfo/autobuild/prepare deleted file mode 100644 index 115bd30d62a..00000000000 --- a/extra-utils/hardinfo/autobuild/prepare +++ /dev/null @@ -1 +0,0 @@ -export LDFLAGS="${LDFLAGS} -lgmodule-2.0" diff --git a/extra-utils/hardinfo/spec b/extra-utils/hardinfo/spec index bec4a69b914..9caaa853a15 100644 --- a/extra-utils/hardinfo/spec +++ b/extra-utils/hardinfo/spec @@ -1,5 +1,5 @@ VER=0.5.1+git20220724 -_COMMIT="10f9789e95b735931805b7eb684ae43ac6f29353" +_COMMIT="54b2e307af763ce87bc8c88e80785d8114bf38dd" SRCS="tbl::https://github.com/lpereira/hardinfo/archive/${_COMMIT}.tar.gz" -CHKSUMS="sha256::0e2a762bcbce157f26127a5f67cf65e60043c0b1f9e6a78ea48ea16abbe497ab" +CHKSUMS="sha256::d1e92c037aedc5b8156ee3c1452ea035f422e70878132a032c1ae0be396e468f" CHKUPDATE="anitya::id=14563"