diff options
Diffstat (limited to 'meta/recipes-support/appstream/appstream')
3 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch b/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch new file mode 100644 index 0000000000..d4d5517ab1 --- /dev/null +++ b/meta/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch @@ -0,0 +1,32 @@ +From 03f00252c2fc948c0bce1fc0a6ee87adef71d1bb Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@t-online.de> +Date: Mon, 12 Dec 2022 15:42:42 +0100 +Subject: [PATCH] remove hardcoded path + +Signed-off-by: Markus Volk <f_l_k@t-online.de> + +Dont include hardcoded path. This fixes: +| cc1: error: include location "/usr/include" is unsafe for cross-compilation [-Werror=poison-system-directories] + +Upstream-Status: Inappropriate [oe-specific] +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 5f2eaa22..4a2483a1 100644 +--- a/meson.build ++++ b/meson.build +@@ -191,10 +191,10 @@ endif + stemmer_inc_dirs = include_directories() + if get_option('stemming') + stemmer_lib = cc.find_library('stemmer', required: true) +- stemmer_inc_dirs = include_directories(['/usr/include']) ++ stemmer_inc_dirs = include_directories(['']) + if not cc.has_header('libstemmer.h') + if cc.has_header('libstemmer/libstemmer.h') +- stemmer_inc_dirs = include_directories('/usr/include/libstemmer') ++ stemmer_inc_dirs = include_directories('') + else + error('Unable to find Snowball header "libstemmer.h". Please ensure libstemmer/Snowball is installed properly in order to continue.') + endif 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 @@ +From a7721cf4f412fbe18fe15127bea7b1457b99f684 Mon Sep 17 00:00:00 2001 +From: Marc Ferland <marc.ferland@sonatest.com> +Date: Fri, 26 Jul 2024 15:41:00 -0400 +Subject: [PATCH] Do not build qt/tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following build failure: + +| 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, +| from ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp:21: +| ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp: In function βint main(int, char**)β: +| ../AppStream-1.0.3/qt/tests/asqt-pool-test.cpp:117:1: error: expected primary-expression before β)β token +| 117 | QTEST_MAIN(PoolReadTest) +| | ^~~~~~~~~~ + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Marc Ferland <marc.ferland@sonatest.com> +--- + qt/meson.build | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/qt/meson.build b/qt/meson.build +index 1909bcf7..c3ca20fb 100644 +--- a/qt/meson.build ++++ b/qt/meson.build +@@ -148,5 +148,3 @@ install_data ( + + # end of Qt version loop + endforeach +- +-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 @@ +From c36b6226479a20ebd910f355deddb9d5c7571213 Mon Sep 17 00:00:00 2001 +From: Marc Ferland <marc.ferland@sonatest.com> +Date: Mon, 29 Jul 2024 09:35:51 -0400 +Subject: [PATCH] Fix PACKAGE_PREFIX_DIR in qt/cmake/AppStreamQtConfig.cmake.in + +PACKAGE_PREFIX_DIR points to an invalid directory. This breaks +librairies linking to appstream-qt. + +For example, when building the 'discover' package from the meta-kde +layer we get the following build error: + +| CMake Error in libdiscover/CMakeLists.txt: +| Imported target "AppStreamQt" includes non-existent path +| +| "/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/" +| +| in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: +| +| * The path was deleted, renamed, or moved to another location. +| +| * An install or uninstall procedure did not complete successfully. +| +| * The installation package was faulty and references files it does not +| provide. + +The path above should've been: + + /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/usr/include/ + +instead of: + + /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/ + +Upstream-Status: Inappropriate [upstream ticket https://github.com/ximion/appstream/issues/643] + +Signed-off-by: Marc Ferland <marc.ferland@sonatest.com> +--- + qt/cmake/AppStreamQtConfig.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/qt/cmake/AppStreamQtConfig.cmake.in b/qt/cmake/AppStreamQtConfig.cmake.in +index 63df65f2..5ab2d0ec 100644 +--- a/qt/cmake/AppStreamQtConfig.cmake.in ++++ b/qt/cmake/AppStreamQtConfig.cmake.in +@@ -1,5 +1,5 @@ + +-get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE) ++get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + + # Use original install prefix when loaded through a "/usr move" + # cross-prefix symbolic link such as /lib -> /usr/lib. |