blob: 1d3c972da7cc29d001aaab35f92d14ad56b1936b [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Cross-Plattform GUI Library"
Andrew Geisslereafcbb82020-06-05 17:59:17 -05002DESCRIPTION = "wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls."
Andrew Geissler82c905d2020-04-13 13:39:40 -05003HOMEPAGE = "https://www.wxwidgets.org/"
4BUGTRACKER = "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.
9LICENSE = "wxWidgets"
10LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6"
11
12inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)}
13inherit features_check lib_package
14
15# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake)
16REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}"
17
18DEPENDS += " \
19 jpeg \
20 libpng \
21 tiff \
22"
23
24SRC_URI = "git://github.com/wxWidgets/wxWidgets.git"
25PV = "3.1.3"
26SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31"
27S = "${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)
32EXTRA_OECMAKE += " \
33 -DwxUSE_LIBJPEG=sys \
34 -DwxUSE_LIBPNG=sys \
35 -DwxUSE_LIBTIFF=sys \
36 -DwxUSE_REGEX=builtin \
37"
38EXTRA_OECMAKE_append_libc-musl = " \
39 -DHAVE_LOCALE_T=OFF \
40"
41
42PACKAGECONFIG ?= "gtk"
43
44# Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt'
45PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk"
46PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt"
47PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk"
48python () {
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
62PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt"
63PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui"
64PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz"
65PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack"
66PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2"
67PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui"
68
69do_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
75FILES_SOLIBSDEV = ""
76
77FILES_${PN} += " \
78 ${libdir}/libwx_*.so \
79 ${libdir}/wx/ \
80"
81
82FILES_${PN}-dev += "${libdir}/wx/include/"