Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Cross-Plattform GUI Library" |
Andrew Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 2 | DESCRIPTION = "wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 3 | HOMEPAGE = "https://www.wxwidgets.org/" |
| 4 | BUGTRACKER = "https://trac.wxwidgets.org/" |
| 5 | |
| 6 | # wxWidgets licence is a modified version of LGPL explicitly allowing not |
| 7 | # distributing the sources of an application using the library even in the |
| 8 | # case of static linking. |
| 9 | LICENSE = "wxWidgets" |
| 10 | LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" |
| 11 | |
| 12 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 13 | inherit features_check lib_package binconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | |
| 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)}" |
| 17 | |
| 18 | DEPENDS += " \ |
| 19 | jpeg \ |
| 20 | libpng \ |
| 21 | tiff \ |
| 22 | " |
| 23 | |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 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 | " |
| 28 | PV = "3.1.4" |
| 29 | SRCREV= "6cdaedd42ba59331b3dc4ead50e0bac76ae14c19" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | S = "${WORKDIR}/git" |
| 31 | |
| 32 | # These can be either 'builtin' or 'sys' and builtin means cloned soures are |
| 33 | # build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see |
| 34 | # DEPENDS) |
| 35 | EXTRA_OECMAKE += " \ |
| 36 | -DwxUSE_LIBJPEG=sys \ |
| 37 | -DwxUSE_LIBPNG=sys \ |
| 38 | -DwxUSE_LIBTIFF=sys \ |
| 39 | -DwxUSE_REGEX=builtin \ |
| 40 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | EXTRA_OECMAKE:append:libc-musl = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | -DHAVE_LOCALE_T=OFF \ |
| 43 | " |
| 44 | |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 45 | PACKAGECONFIG ?= "gtk ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | |
| 47 | # Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt' |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 48 | PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk opengl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 49 | PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt" |
| 50 | PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk" |
| 51 | python () { |
| 52 | pkgconfig = d.getVar('PACKAGECONFIG') |
| 53 | if (not 'no_gui' in pkgconfig) and (not 'gtk' in pkgconfig) and (not 'qt' in pkgconfig): |
| 54 | bb.error("PACKAGECONFIG must select a toolkit. Add one of no_gui / gtk / qt!") |
| 55 | } |
| 56 | |
| 57 | # Notes on other PACKAGECONFIGs: |
| 58 | # * 'no_gui' overrides some configs below so they are marked as conflicting |
| 59 | # with 'no_gui' to avoid surprises |
| 60 | # * qt+gstreamer is broken due to incorrect references on glib-2.0 -> mark |
| 61 | # as conflicting |
| 62 | # * wxUSE_LIBGNOMEVFS is for gtk2 (see init.cmake) which we don't support |
| 63 | # -> no gvfs PACKAGECONFIG |
| 64 | # * libmspack is in meta-security |
| 65 | PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt" |
| 66 | PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui" |
| 67 | PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz" |
| 68 | PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack" |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 69 | PACKAGECONFIG[opengl] = ",,libglu" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 70 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" |
| 71 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" |
| 72 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | do_compile:append() { |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 91 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 92 | # do not ship bindir if empty |
| 93 | rmdir --ignore-fail-on-non-empty ${D}${bindir} |
| 94 | } |
| 95 | |
| 96 | # lib names are not canonical |
| 97 | FILES_SOLIBSDEV = "" |
| 98 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 99 | FILES:${PN} += " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 100 | ${libdir}/libwx_*.so \ |
| 101 | ${libdir}/wx/ \ |
| 102 | " |
| 103 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 104 | FILES:${PN}-dev += "${libdir}/wx/include/" |