new file mode 100644
@@ -0,0 +1,56 @@
+It sets 'libdir' with path element 'lib' directly which is not suitable for
+multilib. Add an option '--baselib' for wx-config to support multilib when
+cross compile. And set default value of baselib with "lib${wxPLATFORM_LIB_DIR}".
+
+Upstream-Status: Pending [oe specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ build/cmake/config.cmake | 2 +-
+ wx-config.in | 6 ++++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake
+index 52ae69d3f6..28aa733eb0 100644
+--- a/build/cmake/config.cmake
++++ b/build/cmake/config.cmake
+@@ -86,7 +86,7 @@ function(wx_write_config)
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix "\${prefix}")
+ set(includedir "\${prefix}/include")
+- set(libdir "\${exec_prefix}/lib")
++ set(libdir "\${exec_prefix}/\${baselib}")
+ set(bindir "\${exec_prefix}/bin")
+
+ find_program(EGREP egrep)
+diff --git a/wx-config.in b/wx-config.in
+index e3f7d115bb..0e78af03c7 100755
+--- a/wx-config.in
++++ b/wx-config.in
+@@ -42,7 +42,8 @@ usage()
+ {
+ cat 1>&2 <<EOF
+
+- wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--release] [--version-full]
++ wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]][--baselib=DIR]
++ [--release] [--version-full]
+ [--list] [--selected-config] [--host=HOST] [--toolkit=TOOLKIT]
+ [--universal[=yes|no]] [--unicode[=yes|no]] [--static[=yes|no]]
+ [--debug[=yes|no]] [--version[=VERSION]] [--flavour=FLAVOUR]
+@@ -137,7 +138,7 @@ wxconfig_output_options="prefix exec_prefix
+
+ # Options that permit the user to supply hints that may affect the output.
+ # These options all accept arbitrary values, to interpret as they please.
+-wxconfig_input_options="prefix exec_prefix utility $wxconfig_schema"
++wxconfig_input_options="prefix exec_prefix baselib utility $wxconfig_schema"
+
+ # Input options that accept only a yes or no argument.
+ #
+@@ -404,6 +405,7 @@ is_cross() { [ "x@cross_compiling@" = "xyes" ]; }
+ # Determine the base directories we require.
+ prefix=${input_option_prefix-${this_prefix:-@prefix@}}
+ exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}}
++baselib=${input_option_baselib:-lib@wxPLATFORM_LIB_DIR@}
+ wxconfdir="@libdir@/wx/config"
+
+ installed_configs=`cd "$wxconfdir" 2> /dev/null && ls | grep -v "^inplace-"`
@@ -24,6 +24,7 @@ SRC_URI = " \
file://fix-libdir-for-multilib.patch \
file://respect-DESTDIR-when-create-link.patch \
file://not-append-system-name-to-lib-name.patch \
+ file://wx-config-fix-libdir-for-multilib.patch \
"
SRCREV= "9c0a8be1dc32063d91ed1901fd5fcd54f4f955a1"
S = "${WORKDIR}/git"
@@ -42,6 +43,7 @@ EXTRA_OECMAKE += " \
EXTRA_OECMAKE:append:libc-musl = " \
-DHAVE_LOCALE_T=OFF \
"
+EXTRA_OECMAKE:append:class-target = ' -DEGREP="/bin/grep -E"'
# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake)
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', 'no_gui', d)} \
@@ -113,4 +115,6 @@ FILES:${PN}-dev += " \
${libdir}/wx/config/ \
"
+RDEPENDS:${PN}-dev += "grep"
+
BBCLASSEXTEND = "native"