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 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 6 | # WXwindows licence is a modified version of LGPL explicitly allowing not |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | # distributing the sources of an application using the library even in the |
| 8 | # case of static linking. |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 9 | LICENSE = "WXwindows" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" |
| 11 | |
| 12 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 13 | inherit lib_package binconfig pkgconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | |
| 15 | DEPENDS += " \ |
| 16 | jpeg \ |
| 17 | libpng \ |
| 18 | tiff \ |
| 19 | " |
| 20 | |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 21 | SRC_URI = " \ |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 22 | gitsm://github.com/wxWidgets/wxWidgets.git;branch=master;protocol=https \ |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 23 | file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 24 | file://fix-libdir-for-multilib.patch \ |
| 25 | file://respect-DESTDIR-when-create-link.patch \ |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 26 | file://not-append-system-name-to-lib-name.patch \ |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 27 | " |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 28 | SRCREV= "9c0a8be1dc32063d91ed1901fd5fcd54f4f955a1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | S = "${WORKDIR}/git" |
| 30 | |
| 31 | # These can be either 'builtin' or 'sys' and builtin means cloned soures are |
| 32 | # build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see |
| 33 | # DEPENDS) |
| 34 | EXTRA_OECMAKE += " \ |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 35 | -DwxUSE_GLCANVAS_EGL=OFF \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 36 | -DwxUSE_LIBJPEG=sys \ |
| 37 | -DwxUSE_LIBPNG=sys \ |
| 38 | -DwxUSE_LIBTIFF=sys \ |
| 39 | -DwxUSE_REGEX=builtin \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 40 | -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 41 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | EXTRA_OECMAKE:append:libc-musl = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | -DHAVE_LOCALE_T=OFF \ |
| 44 | " |
| 45 | |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 46 | # All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake) |
| 47 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', 'no_gui', d)} \ |
| 48 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ |
| 49 | " |
| 50 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 51 | PACKAGECONFIG:remove:class-native = "opengl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | |
| 53 | # Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt' |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 54 | PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk opengl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt" |
| 56 | PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk" |
| 57 | python () { |
| 58 | pkgconfig = d.getVar('PACKAGECONFIG') |
| 59 | if (not 'no_gui' in pkgconfig) and (not 'gtk' in pkgconfig) and (not 'qt' in pkgconfig): |
| 60 | bb.error("PACKAGECONFIG must select a toolkit. Add one of no_gui / gtk / qt!") |
| 61 | } |
| 62 | |
| 63 | # Notes on other PACKAGECONFIGs: |
| 64 | # * 'no_gui' overrides some configs below so they are marked as conflicting |
| 65 | # with 'no_gui' to avoid surprises |
| 66 | # * qt+gstreamer is broken due to incorrect references on glib-2.0 -> mark |
| 67 | # as conflicting |
| 68 | # * wxUSE_LIBGNOMEVFS is for gtk2 (see init.cmake) which we don't support |
| 69 | # -> no gvfs PACKAGECONFIG |
| 70 | # * libmspack is in meta-security |
| 71 | PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt" |
| 72 | PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui" |
| 73 | PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz" |
| 74 | PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack" |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 75 | PACKAGECONFIG[opengl] = "-DwxUSE_OPENGL=ON,-DwxUSE_OPENGL=OFF,libglu" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" |
| 77 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 78 | PACKAGECONFIG[curl] = "-DwxUSE_WEBREQUEST_CURL=ON,-DwxUSE_WEBREQUEST_CURL=OFF,curl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 79 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 80 | do_compile:append() { |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 81 | # if not at re-compile |
| 82 | if [ -L ${B}/wx-config ]; then |
| 83 | # ${B}/wx-config is a symlink for build and not needed after compile |
| 84 | # So for our purposes do: |
| 85 | # 1. make a file out of wx-config so that binconfig.bbclass detects it |
| 86 | # 2. make sure we do not move the file used for compiling into sysroot |
| 87 | cp --remove-destination `readlink ${B}/wx-config | sed 's:inplace-::'` ${B}/wx-config |
| 88 | fi |
| 89 | # 3. Set full sysroot paths so sstate can translate them when setting |
| 90 | # up wxwidgets's consumer sysroots |
| 91 | sed -i \ |
| 92 | -e 's,^includedir=.*,includedir="${STAGING_INCDIR}",g' \ |
| 93 | -e 's,^libdir=.*",libdir="${STAGING_LIBDIR}",g' \ |
| 94 | -e 's,^bindir=.*",bindir="${STAGING_BINDIR}",g' \ |
| 95 | ${B}/wx-config |
| 96 | } |
| 97 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 98 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 99 | # do not ship bindir if empty |
| 100 | rmdir --ignore-fail-on-non-empty ${D}${bindir} |
| 101 | } |
| 102 | |
| 103 | # lib names are not canonical |
| 104 | FILES_SOLIBSDEV = "" |
| 105 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 106 | FILES:${PN} += " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 107 | ${libdir}/libwx_*.so \ |
| 108 | ${libdir}/wx/ \ |
| 109 | " |
| 110 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 111 | FILES:${PN}-dev += " \ |
| 112 | ${libdir}/wx/include/ \ |
| 113 | ${libdir}/wx/config/ \ |
| 114 | " |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 115 | |
| 116 | BBCLASSEXTEND = "native" |