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" |
| 68 | PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups" |
| 69 | PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" |
| 70 | PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes" |
| 71 | PACKAGECONFIG[ffmpeg] = "-Dmedia-ffmpeg=enabled,-Dmedia-ffmpeg=disabled,ffmpeg" |
| 72 | # gtk4 wants gstreamer-player-1.0 -> gstreamer1.0-plugins-bad |
| 73 | PACKAGECONFIG[gstreamer] = "-Dmedia-gstreamer=enabled,-Dmedia-gstreamer=disabled,gstreamer1.0-plugins-bad" |
| 74 | PACKAGECONFIG[tracker] = "-Dtracker=enabled,-Dtracker=disabled,tracker,tracker-miners" |
| 75 | PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled, vulkan-loader vulkan-headers shaderc-native" |
| 76 | |
| 77 | LIBV = "4.0.0" |
| 78 | |
| 79 | FILES:${PN}:append = " \ |
| 80 | ${datadir}/glib-2.0/schemas/ \ |
| 81 | ${datadir}/gtk-4.0/emoji/ \ |
| 82 | ${datadir}/metainfo/ \ |
| 83 | ${datadir}/icons/hicolor/*/apps/org.gtk.PrintEditor4*.* \ |
| 84 | ${libdir}/gtk-4.0/${LIBV}/media \ |
| 85 | ${bindir}/gtk4-update-icon-cache \ |
| 86 | ${bindir}/gtk4-launch \ |
| 87 | " |
| 88 | |
| 89 | FILES:${PN}-dev += " \ |
| 90 | ${datadir}/gtk-4.0/gtk4builder.rng \ |
| 91 | ${datadir}/gtk-4.0/include \ |
| 92 | ${datadir}/gtk-4.0/valgrind \ |
| 93 | ${datadir}/gettext/its \ |
| 94 | ${bindir}/gtk4-builder-tool \ |
| 95 | ${bindir}/gtk4-encode-symbolic-svg \ |
| 96 | ${bindir}/gtk4-query-settings \ |
| 97 | " |
| 98 | |
| 99 | GTKBASE_RRECOMMENDS ?= " \ |
| 100 | liberation-fonts \ |
| 101 | gdk-pixbuf-loader-png \ |
| 102 | gdk-pixbuf-loader-jpeg \ |
| 103 | gdk-pixbuf-loader-gif \ |
| 104 | gdk-pixbuf-loader-xpm \ |
| 105 | shared-mime-info \ |
| 106 | adwaita-icon-theme-symbolic \ |
| 107 | " |
| 108 | |
| 109 | GTKBASE_RRECOMMENDS:class-native ?= "" |
| 110 | |
| 111 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 112 | |
| 113 | RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" |
| 114 | RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
| 115 | RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" |
| 116 | |
| 117 | PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" |
| 118 | python populate_packages:prepend () { |
| 119 | import os.path |
| 120 | |
| 121 | gtk_libdir = d.expand('${libdir}/gtk-4.0/${LIBV}') |
| 122 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); |
| 123 | |
| 124 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk4-printbackend-%s', 'GTK printbackend module for %s') |
| 125 | |
| 126 | if (d.getVar('DEBIAN_NAMES')): |
| 127 | d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-4.0') |
| 128 | } |