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)} |
| 13 | inherit features_check lib_package |
| 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 | |
| 24 | SRC_URI = "git://github.com/wxWidgets/wxWidgets.git" |
| 25 | PV = "3.1.3" |
| 26 | SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31" |
| 27 | S = "${WORKDIR}/git" |
| 28 | |
| 29 | # These can be either 'builtin' or 'sys' and builtin means cloned soures are |
| 30 | # build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see |
| 31 | # DEPENDS) |
| 32 | EXTRA_OECMAKE += " \ |
| 33 | -DwxUSE_LIBJPEG=sys \ |
| 34 | -DwxUSE_LIBPNG=sys \ |
| 35 | -DwxUSE_LIBTIFF=sys \ |
| 36 | -DwxUSE_REGEX=builtin \ |
| 37 | " |
| 38 | EXTRA_OECMAKE_append_libc-musl = " \ |
| 39 | -DHAVE_LOCALE_T=OFF \ |
| 40 | " |
| 41 | |
| 42 | PACKAGECONFIG ?= "gtk" |
| 43 | |
| 44 | # Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt' |
| 45 | PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk" |
| 46 | PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt" |
| 47 | PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk" |
| 48 | python () { |
| 49 | pkgconfig = d.getVar('PACKAGECONFIG') |
| 50 | if (not 'no_gui' in pkgconfig) and (not 'gtk' in pkgconfig) and (not 'qt' in pkgconfig): |
| 51 | bb.error("PACKAGECONFIG must select a toolkit. Add one of no_gui / gtk / qt!") |
| 52 | } |
| 53 | |
| 54 | # Notes on other PACKAGECONFIGs: |
| 55 | # * 'no_gui' overrides some configs below so they are marked as conflicting |
| 56 | # with 'no_gui' to avoid surprises |
| 57 | # * qt+gstreamer is broken due to incorrect references on glib-2.0 -> mark |
| 58 | # as conflicting |
| 59 | # * wxUSE_LIBGNOMEVFS is for gtk2 (see init.cmake) which we don't support |
| 60 | # -> no gvfs PACKAGECONFIG |
| 61 | # * libmspack is in meta-security |
| 62 | PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt" |
| 63 | PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui" |
| 64 | PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz" |
| 65 | PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack" |
| 66 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" |
| 67 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" |
| 68 | |
| 69 | do_install_append() { |
| 70 | # do not ship bindir if empty |
| 71 | rmdir --ignore-fail-on-non-empty ${D}${bindir} |
| 72 | } |
| 73 | |
| 74 | # lib names are not canonical |
| 75 | FILES_SOLIBSDEV = "" |
| 76 | |
| 77 | FILES_${PN} += " \ |
| 78 | ${libdir}/libwx_*.so \ |
| 79 | ${libdir}/wx/ \ |
| 80 | " |
| 81 | |
| 82 | FILES_${PN}-dev += "${libdir}/wx/include/" |