wxwidgets_git.bb 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. # wxWidgets licence is a modified version of LGPL explicitly allowing not
  6. # distributing the sources of an application using the library even in the
  7. # case of static linking.
  8. LICENSE = "wxWidgets"
  9. LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6"
  10. inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)}
  11. inherit features_check lib_package
  12. # All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake)
  13. REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}"
  14. DEPENDS += " \
  15. jpeg \
  16. libpng \
  17. tiff \
  18. "
  19. SRC_URI = "git://github.com/wxWidgets/wxWidgets.git"
  20. PV = "3.1.3"
  21. SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31"
  22. S = "${WORKDIR}/git"
  23. # These can be either 'builtin' or 'sys' and builtin means cloned soures are
  24. # build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see
  25. # DEPENDS)
  26. EXTRA_OECMAKE += " \
  27. -DwxUSE_LIBJPEG=sys \
  28. -DwxUSE_LIBPNG=sys \
  29. -DwxUSE_LIBTIFF=sys \
  30. -DwxUSE_REGEX=builtin \
  31. "
  32. EXTRA_OECMAKE_append_libc-musl = " \
  33. -DHAVE_LOCALE_T=OFF \
  34. "
  35. PACKAGECONFIG ?= "gtk"
  36. # Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt'
  37. PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk"
  38. PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt"
  39. PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk"
  40. python () {
  41. pkgconfig = d.getVar('PACKAGECONFIG')
  42. if (not 'no_gui' in pkgconfig) and (not 'gtk' in pkgconfig) and (not 'qt' in pkgconfig):
  43. bb.error("PACKAGECONFIG must select a toolkit. Add one of no_gui / gtk / qt!")
  44. }
  45. # Notes on other PACKAGECONFIGs:
  46. # * 'no_gui' overrides some configs below so they are marked as conflicting
  47. # with 'no_gui' to avoid surprises
  48. # * qt+gstreamer is broken due to incorrect references on glib-2.0 -> mark
  49. # as conflicting
  50. # * wxUSE_LIBGNOMEVFS is for gtk2 (see init.cmake) which we don't support
  51. # -> no gvfs PACKAGECONFIG
  52. # * libmspack is in meta-security
  53. PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt"
  54. PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui"
  55. PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz"
  56. PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack"
  57. PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2"
  58. PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui"
  59. do_install_append() {
  60. # do not ship bindir if empty
  61. rmdir --ignore-fail-on-non-empty ${D}${bindir}
  62. }
  63. # lib names are not canonical
  64. FILES_SOLIBSDEV = ""
  65. FILES_${PN} += " \
  66. ${libdir}/libwx_*.so \
  67. ${libdir}/wx/ \
  68. "
  69. FILES_${PN}-dev += "${libdir}/wx/include/"