summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-10-14 03:06:13 +0200
committerKhem Raj <raj.khem@gmail.com>2020-10-13 22:33:05 -0700
commit7219c72141c2c5c902232dfba590fd85954f2aae (patch)
tree01033d121d6a45d6d6d0fdd2f1077d4c63b5dd03
parent0488766d589dd634bc409e0e6df354d430bc9659 (diff)
downloadmeta-openembedded-7219c72141c2c5c902232dfba590fd85954f2aae.tar.gz
wxwidgets: Add what's necessary so that consumers of wxwidgets_git can find it
When I created wxwidgets recipe I had no test case for consumers of wxwidgets. This changed now and it showed that wxwidgets is building fine but is completely useless: It is a collection of libraries that are impossible to find for other recipes. To get rid wxwidgets now inherits binconfig: wxwidgets creates wx-config that at least cmake relies upon. wx-config content had to be adjusted: * As is it is a symlink to a useless file: Make it a file with usable contents * To let wx-config report correct libraries a patch was added disabling cross magic not working here. * Set full sysroot paths for includedir/libdir/bindir so that sstate can adjust them when creating recipe-sysroot for recipes depending on wxwidgets Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch35
-rw-r--r--meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb25
2 files changed, 58 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch b/meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch
new file mode 100644
index 0000000000..b3b9e79c53
--- /dev/null
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch
@@ -0,0 +1,35 @@
1From a071243763f4b06fc7e71f541c49cecf380b6f27 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sun, 11 Oct 2020 22:16:55 +0200
4Subject: [PATCH] wx-config.in: Disable cross magic - it does not work for us
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9E.g 'wx-config --libs' appends a '-Linux' to all libraries (e.g
10-lwx_gtk3u_xrc-3.1 is reported as -lwx_gtk3u_xrc-3.1-Linux) which is wrong and
11make projects depending on wxwidgets fail.
12
13Upstream-Status: Inappropriate [oe specific]
14
15Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
16---
17 wx-config.in | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/wx-config.in b/wx-config.in
21index d132e3182f..d0d162e8a3 100755
22--- a/wx-config.in
23+++ b/wx-config.in
24@@ -396,7 +396,7 @@ get_mask()
25 }
26
27 # Returns true if this script is for a cross compiled config.
28-is_cross() { [ "x@cross_compiling@" = "xyes" ]; }
29+is_cross() { [ "xno" = "xyes" ]; }
30
31
32 # Determine the base directories we require.
33--
342.26.2
35
diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
index 95a6e85276..555399f749 100644
--- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
@@ -10,7 +10,7 @@ LICENSE = "wxWidgets"
10LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" 10LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6"
11 11
12inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} 12inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)}
13inherit features_check lib_package 13inherit features_check lib_package binconfig
14 14
15# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake) 15# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake)
16REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}" 16REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}"
@@ -21,7 +21,10 @@ DEPENDS += " \
21 tiff \ 21 tiff \
22" 22"
23 23
24SRC_URI = "git://github.com/wxWidgets/wxWidgets.git" 24SRC_URI = " \
25 git://github.com/wxWidgets/wxWidgets.git \
26 file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \
27"
25PV = "3.1.3" 28PV = "3.1.3"
26SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31" 29SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31"
27S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
@@ -67,6 +70,24 @@ PACKAGECONFIG[opengl] = ",,libglu"
67PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" 70PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2"
68PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" 71PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui"
69 72
73do_compile_append() {
74 # if not at re-compile
75 if [ -L ${B}/wx-config ]; then
76 # ${B}/wx-config is a symlink for build and not needed after compile
77 # So for our purposes do:
78 # 1. make a file out of wx-config so that binconfig.bbclass detects it
79 # 2. make sure we do not move the file used for compiling into sysroot
80 cp --remove-destination `readlink ${B}/wx-config | sed 's:inplace-::'` ${B}/wx-config
81 fi
82 # 3. Set full sysroot paths so sstate can translate them when setting
83 # up wxwidgets's consumer sysroots
84 sed -i \
85 -e 's,^includedir=.*,includedir="${STAGING_INCDIR}",g' \
86 -e 's,^libdir=.*",libdir="${STAGING_LIBDIR}",g' \
87 -e 's,^bindir=.*",bindir="${STAGING_BINDIR}",g' \
88 ${B}/wx-config
89}
90
70do_install_append() { 91do_install_append() {
71 # do not ship bindir if empty 92 # do not ship bindir if empty
72 rmdir --ignore-fail-on-non-empty ${D}${bindir} 93 rmdir --ignore-fail-on-non-empty ${D}${bindir}