diff options
3 files changed, 94 insertions, 0 deletions
diff --git a/meta/recipes-support/appstream/appstream/0002-Do-not-build-qt-tests.patch b/meta/recipes-support/appstream/appstream/0002-Do-not-build-qt-tests.patch new file mode 100644 index 0000000000..9a725ab8e4 --- /dev/null +++ b/meta/recipes-support/appstream/appstream/0002-Do-not-build-qt-tests.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From a7721cf4f412fbe18fe15127bea7b1457b99f684 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Marc Ferland <marc.ferland@sonatest.com> | ||
| 3 | Date: Fri, 26 Jul 2024 15:41:00 -0400 | ||
| 4 | Subject: [PATCH] Do not build qt/tests | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Fixes the following build failure: | ||
| 10 | |||
| 11 | | In file included from /home/marc/mnt/yocto-kde/build/tmp/work/x86_64-linux/appstream-native/1.0.3/recipe-sysroot-native/usr/include/QtTest/QtTest:11, | ||
| 12 | | from ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp:21: | ||
| 13 | | ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp: In function βint main(int, char**)β: | ||
| 14 | | ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp:117:1: error: expected primary-expression before β)β token | ||
| 15 | | 117 | QTEST_MAIN(PoolReadTest) | ||
| 16 | | | ^~~~~~~~~~ | ||
| 17 | |||
| 18 | Upstream-Status: Inappropriate [oe-specific] | ||
| 19 | |||
| 20 | Signed-off-by: Marc Ferland <marc.ferland@sonatest.com> | ||
| 21 | --- | ||
| 22 | qt/meson.build | 2 -- | ||
| 23 | 1 file changed, 2 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/qt/meson.build b/qt/meson.build | ||
| 26 | index 1909bcf7..c3ca20fb 100644 | ||
| 27 | --- a/qt/meson.build | ||
| 28 | +++ b/qt/meson.build | ||
| 29 | @@ -148,5 +148,3 @@ install_data ( | ||
| 30 | |||
| 31 | # end of Qt version loop | ||
| 32 | endforeach | ||
| 33 | - | ||
| 34 | -subdir('tests/') | ||
diff --git a/meta/recipes-support/appstream/appstream/0003-Fix-PACKAGE_PREFIX_DIR-in-qt-cmake-AppStreamQtConfig.patch b/meta/recipes-support/appstream/appstream/0003-Fix-PACKAGE_PREFIX_DIR-in-qt-cmake-AppStreamQtConfig.patch new file mode 100644 index 0000000000..e522a92e14 --- /dev/null +++ b/meta/recipes-support/appstream/appstream/0003-Fix-PACKAGE_PREFIX_DIR-in-qt-cmake-AppStreamQtConfig.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From c36b6226479a20ebd910f355deddb9d5c7571213 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Marc Ferland <marc.ferland@sonatest.com> | ||
| 3 | Date: Mon, 29 Jul 2024 09:35:51 -0400 | ||
| 4 | Subject: [PATCH] Fix PACKAGE_PREFIX_DIR in qt/cmake/AppStreamQtConfig.cmake.in | ||
| 5 | |||
| 6 | PACKAGE_PREFIX_DIR points to an invalid directory. This breaks | ||
| 7 | librairies linking to appstream-qt. | ||
| 8 | |||
| 9 | For example, when building the 'discover' package from the meta-kde | ||
| 10 | layer we get the following build error: | ||
| 11 | |||
| 12 | | CMake Error in libdiscover/CMakeLists.txt: | ||
| 13 | | Imported target "AppStreamQt" includes non-existent path | ||
| 14 | | | ||
| 15 | | "/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/" | ||
| 16 | | | ||
| 17 | | in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: | ||
| 18 | | | ||
| 19 | | * The path was deleted, renamed, or moved to another location. | ||
| 20 | | | ||
| 21 | | * An install or uninstall procedure did not complete successfully. | ||
| 22 | | | ||
| 23 | | * The installation package was faulty and references files it does not | ||
| 24 | | provide. | ||
| 25 | |||
| 26 | The path above should've been: | ||
| 27 | |||
| 28 | /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/usr/include/ | ||
| 29 | |||
| 30 | instead of: | ||
| 31 | |||
| 32 | /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/ | ||
| 33 | |||
| 34 | Upstream-Status: Inappropriate [upstream ticket https://github.com/ximion/appstream/issues/643] | ||
| 35 | |||
| 36 | Signed-off-by: Marc Ferland <marc.ferland@sonatest.com> | ||
| 37 | --- | ||
| 38 | qt/cmake/AppStreamQtConfig.cmake.in | 2 +- | ||
| 39 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 40 | |||
| 41 | diff --git a/qt/cmake/AppStreamQtConfig.cmake.in b/qt/cmake/AppStreamQtConfig.cmake.in | ||
| 42 | index 63df65f2..5ab2d0ec 100644 | ||
| 43 | --- a/qt/cmake/AppStreamQtConfig.cmake.in | ||
| 44 | +++ b/qt/cmake/AppStreamQtConfig.cmake.in | ||
| 45 | @@ -1,5 +1,5 @@ | ||
| 46 | |||
| 47 | -get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE) | ||
| 48 | +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) | ||
| 49 | |||
| 50 | # Use original install prefix when loaded through a "/usr move" | ||
| 51 | # cross-prefix symbolic link such as /lib -> /usr/lib. | ||
diff --git a/meta/recipes-support/appstream/appstream_1.0.3.bb b/meta/recipes-support/appstream/appstream_1.0.3.bb index 625e85a0ae..092d85d1a0 100644 --- a/meta/recipes-support/appstream/appstream_1.0.3.bb +++ b/meta/recipes-support/appstream/appstream_1.0.3.bb | |||
| @@ -27,6 +27,8 @@ GIDOCGEN_MESON_OPTION = "apidocs" | |||
| 27 | SRC_URI = " \ | 27 | SRC_URI = " \ |
| 28 | https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \ | 28 | https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \ |
| 29 | file://0001-remove-hardcoded-path.patch \ | 29 | file://0001-remove-hardcoded-path.patch \ |
| 30 | file://0002-Do-not-build-qt-tests.patch \ | ||
| 31 | file://0003-Fix-PACKAGE_PREFIX_DIR-in-qt-cmake-AppStreamQtConfig.patch \ | ||
| 30 | " | 32 | " |
| 31 | SRC_URI[sha256sum] = "5ab6f6cf644e7875a9508593962e56bb430f4e59ae0bf03be6be7029deb6baa4" | 33 | SRC_URI[sha256sum] = "5ab6f6cf644e7875a9508593962e56bb430f4e59ae0bf03be6be7029deb6baa4" |
| 32 | 34 | ||
| @@ -36,9 +38,16 @@ PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | |||
| 36 | 38 | ||
| 37 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd" | 39 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd" |
| 38 | PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer" | 40 | PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer" |
| 41 | PACKAGECONFIG[qt6] = "-Dqt=true,-Dqt=false,qtbase" | ||
| 39 | 42 | ||
| 40 | FILES:${PN} += "${datadir}" | 43 | FILES:${PN} += "${datadir}" |
| 41 | 44 | ||
| 42 | EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" | 45 | EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" |
| 43 | 46 | ||
| 44 | BBCLASSEXTEND = "native" | 47 | BBCLASSEXTEND = "native" |
| 48 | |||
| 49 | # Fix meson not finding the Qt build tools in cross-compilation | ||
| 50 | # setups. See: https://github.com/mesonbuild/meson/issues/13018 | ||
| 51 | do_configure:prepend:class-target() { | ||
| 52 | export PATH=${STAGING_DIR_NATIVE}${libexecdir}:$PATH | ||
| 53 | } | ||
