diff options
Diffstat (limited to 'meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.6.bb')
-rw-r--r-- | meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.6.bb | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.6.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.6.bb new file mode 100644 index 0000000000..2cd154cab6 --- /dev/null +++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.6.bb | |||
@@ -0,0 +1,123 @@ | |||
1 | SUMMARY = "Cross-Plattform GUI Library" | ||
2 | DESCRIPTION = "wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls." | ||
3 | HOMEPAGE = "https://www.wxwidgets.org/" | ||
4 | BUGTRACKER = "https://trac.wxwidgets.org/" | ||
5 | |||
6 | # WXwindows 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 = "WXwindows" | ||
10 | LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" | ||
11 | |||
12 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} | ||
13 | inherit lib_package binconfig pkgconfig | ||
14 | |||
15 | DEPENDS += " \ | ||
16 | jpeg \ | ||
17 | libpng \ | ||
18 | tiff \ | ||
19 | " | ||
20 | |||
21 | SRC_URI = "gitsm://github.com/wxWidgets/wxWidgets.git;branch=3.2;protocol=https \ | ||
22 | file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \ | ||
23 | file://0002-fix-libdir-for-multilib.patch \ | ||
24 | file://0003-create-links-with-relative-path.patch \ | ||
25 | file://0004-don-not-append-system-name-to-lib-name.patch \ | ||
26 | file://0005-wx-config-fix-libdir-for-multilib.patch \ | ||
27 | file://0006-Fix-locale-on-musl.patch \ | ||
28 | file://0007-Set-HAVE_LARGEFILE_SUPPORT-to-1-explicitly.patch \ | ||
29 | " | ||
30 | SRCREV = "5ff25322553c1870cf20a2e1ba6f20ed50d9fe9a" | ||
31 | |||
32 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | ||
33 | |||
34 | # These can be either 'builtin' or 'sys' and builtin means cloned soures are | ||
35 | # build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see | ||
36 | # DEPENDS) | ||
37 | EXTRA_OECMAKE += " \ | ||
38 | -DwxUSE_GLCANVAS_EGL=OFF \ | ||
39 | -DwxUSE_LIBJPEG=sys \ | ||
40 | -DwxUSE_LIBPNG=sys \ | ||
41 | -DwxUSE_LIBTIFF=sys \ | ||
42 | -DwxUSE_REGEX=builtin \ | ||
43 | " | ||
44 | EXTRA_OECMAKE:append:class-target = ' -DEGREP="/bin/grep -E"' | ||
45 | |||
46 | # OpenGL support currently seems tied to using libglu, which requires x11 | ||
47 | PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 wayland', 'gtk', 'no_gui', d)} \ | ||
48 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \ | ||
49 | " | ||
50 | |||
51 | PACKAGECONFIG:remove:class-native = "opengl" | ||
52 | |||
53 | # Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt' | ||
54 | PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk opengl" | ||
55 | PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON -DwxUSE_PRIVATE_FONTS=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" | ||
75 | PACKAGECONFIG[opengl] = "-DwxUSE_OPENGL=ON,-DwxUSE_OPENGL=OFF,libglu" | ||
76 | PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,virtual/libsdl2" | ||
77 | PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk3,,,no_gui" | ||
78 | PACKAGECONFIG[curl] = "-DwxUSE_WEBREQUEST_CURL=ON,-DwxUSE_WEBREQUEST_CURL=OFF,curl" | ||
79 | |||
80 | # Support LFS unconditionally | ||
81 | CXXFLAGS += "-D_FILE_OFFSET_BITS=64" | ||
82 | |||
83 | do_compile:append() { | ||
84 | # if not at re-compile | ||
85 | if [ -L ${B}/wx-config ]; then | ||
86 | # ${B}/wx-config is a symlink for build and not needed after compile | ||
87 | # So for our purposes do: | ||
88 | # 1. make a file out of wx-config so that binconfig.bbclass detects it | ||
89 | # 2. make sure we do not move the file used for compiling into sysroot | ||
90 | cp --remove-destination `readlink ${B}/wx-config | sed 's:inplace-::'` ${B}/wx-config | ||
91 | fi | ||
92 | # 3. Set full sysroot paths so sstate can translate them when setting | ||
93 | # up wxwidgets's consumer sysroots | ||
94 | sed -i \ | ||
95 | -e 's,^includedir=.*,includedir="${STAGING_INCDIR}",g' \ | ||
96 | -e 's,^libdir=.*",libdir="${STAGING_LIBDIR}",g' \ | ||
97 | -e 's,^bindir=.*",bindir="${STAGING_BINDIR}",g' \ | ||
98 | ${B}/wx-config | ||
99 | } | ||
100 | |||
101 | do_install:append() { | ||
102 | # do not ship bindir if empty | ||
103 | rmdir --ignore-fail-on-non-empty ${D}${bindir} | ||
104 | |||
105 | # fix host contamination | ||
106 | sed -i -e "s#${STAGING_DIR_NATIVE}##g" \ | ||
107 | -e "s#${STAGING_DIR_TARGET}##g" \ | ||
108 | ${D}${libdir}/wx/config/*-unicode-3.2 \ | ||
109 | ${D}${libdir}/cmake/wxWidgets/wxWidgetsTargets.cmake | ||
110 | } | ||
111 | |||
112 | FILES:${PN} += " \ | ||
113 | ${libdir}/wx/ \ | ||
114 | " | ||
115 | |||
116 | FILES:${PN}-dev += " \ | ||
117 | ${libdir}/wx/include/ \ | ||
118 | ${libdir}/wx/config/ \ | ||
119 | " | ||
120 | |||
121 | RDEPENDS:${PN}-dev += "grep" | ||
122 | |||
123 | BBCLASSEXTEND = "native" | ||