diff options
| author | Andreas Müller <schnitzeltony@gmail.com> | 2020-10-14 03:06:13 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-10-13 22:33:05 -0700 |
| commit | 7219c72141c2c5c902232dfba590fd85954f2aae (patch) | |
| tree | 01033d121d6a45d6d6d0fdd2f1077d4c63b5dd03 | |
| parent | 0488766d589dd634bc409e0e6df354d430bc9659 (diff) | |
| download | meta-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.patch | 35 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb | 25 |
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 @@ | |||
| 1 | From a071243763f4b06fc7e71f541c49cecf380b6f27 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Sun, 11 Oct 2020 22:16:55 +0200 | ||
| 4 | Subject: [PATCH] wx-config.in: Disable cross magic - it does not work for us | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | E.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 | ||
| 11 | make projects depending on wxwidgets fail. | ||
| 12 | |||
| 13 | Upstream-Status: Inappropriate [oe specific] | ||
| 14 | |||
| 15 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 16 | --- | ||
| 17 | wx-config.in | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/wx-config.in b/wx-config.in | ||
| 21 | index 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 | -- | ||
| 34 | 2.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" | |||
| 10 | LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" | 10 | LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" |
| 11 | 11 | ||
| 12 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} | 12 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} |
| 13 | inherit features_check lib_package | 13 | inherit 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) |
| 16 | REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}" | 16 | REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}" |
| @@ -21,7 +21,10 @@ DEPENDS += " \ | |||
| 21 | tiff \ | 21 | tiff \ |
| 22 | " | 22 | " |
| 23 | 23 | ||
| 24 | SRC_URI = "git://github.com/wxWidgets/wxWidgets.git" | 24 | SRC_URI = " \ |
| 25 | git://github.com/wxWidgets/wxWidgets.git \ | ||
| 26 | file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \ | ||
| 27 | " | ||
| 25 | PV = "3.1.3" | 28 | PV = "3.1.3" |
| 26 | SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31" | 29 | SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31" |
| 27 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
| @@ -67,6 +70,24 @@ PACKAGECONFIG[opengl] = ",,libglu" | |||
| 67 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" | 70 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" |
| 68 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" | 71 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" |
| 69 | 72 | ||
| 73 | do_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 | |||
| 70 | do_install_append() { | 91 | do_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} |
