Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Multi-platform toolkit for creating GUIs" |
| 2 | DESCRIPTION = "GTK is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ |
| 3 | set of widgets, GTK is suitable for projects ranging from small one-off projects to complete application suites." |
| 4 | HOMEPAGE = "http://www.gtk.org" |
| 5 | BUGTRACKER = "https://bugzilla.gnome.org/" |
| 6 | SECTION = "libs" |
| 7 | |
| 8 | DEPENDS = " \ |
| 9 | atk \ |
| 10 | cairo \ |
| 11 | fribidi \ |
| 12 | gdk-pixbuf \ |
| 13 | gdk-pixbuf-native \ |
| 14 | gi-docgen \ |
| 15 | glib-2.0 \ |
| 16 | graphene \ |
| 17 | harfbuzz \ |
| 18 | jpeg \ |
| 19 | libepoxy \ |
| 20 | libpng \ |
| 21 | librsvg \ |
| 22 | libxkbcommon \ |
| 23 | pango \ |
| 24 | tiff \ |
| 25 | " |
| 26 | |
| 27 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" |
| 28 | LIC_FILES_CHKSUM = " \ |
| 29 | file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ |
| 30 | file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ |
| 31 | file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ |
| 32 | file://tests/testgtk.c;endline=25;md5=49d06770681b8322466b52ed19d29fb2 \ |
| 33 | " |
| 34 | |
| 35 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 36 | |
| 37 | UPSTREAM_CHECK_REGEX = "gtk-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)\.tar.xz" |
| 38 | |
| 39 | SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk/${MAJ_VER}/gtk-${PV}.tar.xz" |
| 40 | SRC_URI[sha256sum] = "b362f968d085b4d3d9340d4d38c706377ded9d5374e694a2b6b7e6292e3cba74" |
| 41 | |
| 42 | S = "${WORKDIR}/gtk-${PV}" |
| 43 | |
| 44 | inherit meson gettext pkgconfig gi-docgen update-alternatives gsettings features_check gobject-introspection |
| 45 | |
| 46 | # TBD: nativesdk |
| 47 | # gobject-introspection.bbclass pins introspection off for nativesk. As long as |
| 48 | # we do not remove this wisdom or hack gtk4, it is not possible to build |
| 49 | # nativesdk-gtk4 |
| 50 | BBCLASSEXTEND = "native" |
| 51 | |
| 52 | GSETTINGS_PACKAGE:class-native = "" |
| 53 | |
| 54 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
| 55 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 56 | GTKDOC_MESON_OPTION = "gtk_doc" |
| 57 | GIR_MESON_ENABLE_FLAG = 'enabled' |
| 58 | GIR_MESON_DISABLE_FLAG = 'disabled' |
| 59 | |
| 60 | EXTRA_OEMESON = " -Dbuild-tests=false -Ddemos=false" |
| 61 | |
| 62 | PACKAGECONFIG ??= "gstreamer ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11 vulkan', d)}" |
| 63 | PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
| 64 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
| 65 | |
| 66 | PACKAGECONFIG[x11] = "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes xinerama" |
| 67 | PACKAGECONFIG[wayland] = "-Dwayland-backend=true,-Dwayland-backend=false,wayland wayland-protocols virtual/egl virtual/libgles2 wayland-native" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 68 | PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=enabled,-Dcloudproviders=disabled,libcloudproviders" |
| 69 | PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups,cups" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 70 | PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" |
| 71 | PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes" |
| 72 | PACKAGECONFIG[ffmpeg] = "-Dmedia-ffmpeg=enabled,-Dmedia-ffmpeg=disabled,ffmpeg" |
| 73 | # gtk4 wants gstreamer-player-1.0 -> gstreamer1.0-plugins-bad |
| 74 | PACKAGECONFIG[gstreamer] = "-Dmedia-gstreamer=enabled,-Dmedia-gstreamer=disabled,gstreamer1.0-plugins-bad" |
| 75 | PACKAGECONFIG[tracker] = "-Dtracker=enabled,-Dtracker=disabled,tracker,tracker-miners" |
| 76 | PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled, vulkan-loader vulkan-headers shaderc-native" |
| 77 | |
| 78 | LIBV = "4.0.0" |
| 79 | |
| 80 | FILES:${PN}:append = " \ |
| 81 | ${datadir}/glib-2.0/schemas/ \ |
| 82 | ${datadir}/gtk-4.0/emoji/ \ |
| 83 | ${datadir}/metainfo/ \ |
| 84 | ${datadir}/icons/hicolor/*/apps/org.gtk.PrintEditor4*.* \ |
| 85 | ${libdir}/gtk-4.0/${LIBV}/media \ |
| 86 | ${bindir}/gtk4-update-icon-cache \ |
| 87 | ${bindir}/gtk4-launch \ |
| 88 | " |
| 89 | |
| 90 | FILES:${PN}-dev += " \ |
| 91 | ${datadir}/gtk-4.0/gtk4builder.rng \ |
| 92 | ${datadir}/gtk-4.0/include \ |
| 93 | ${datadir}/gtk-4.0/valgrind \ |
| 94 | ${datadir}/gettext/its \ |
| 95 | ${bindir}/gtk4-builder-tool \ |
| 96 | ${bindir}/gtk4-encode-symbolic-svg \ |
| 97 | ${bindir}/gtk4-query-settings \ |
| 98 | " |
| 99 | |
| 100 | GTKBASE_RRECOMMENDS ?= " \ |
| 101 | liberation-fonts \ |
| 102 | gdk-pixbuf-loader-png \ |
| 103 | gdk-pixbuf-loader-jpeg \ |
| 104 | gdk-pixbuf-loader-gif \ |
| 105 | gdk-pixbuf-loader-xpm \ |
| 106 | shared-mime-info \ |
| 107 | adwaita-icon-theme-symbolic \ |
| 108 | " |
| 109 | |
| 110 | GTKBASE_RRECOMMENDS:class-native ?= "" |
| 111 | |
| 112 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 113 | |
| 114 | RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" |
| 115 | RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
| 116 | RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" |
| 117 | |
| 118 | PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" |
| 119 | python populate_packages:prepend () { |
| 120 | import os.path |
| 121 | |
| 122 | gtk_libdir = d.expand('${libdir}/gtk-4.0/${LIBV}') |
| 123 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); |
| 124 | |
| 125 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk4-printbackend-%s', 'GTK printbackend module for %s') |
| 126 | |
| 127 | if (d.getVar('DEBIAN_NAMES')): |
| 128 | d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-4.0') |
| 129 | } |