From patchwork Fri Sep 20 15:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Volk X-Patchwork-Id: 49396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA49ACF9C54 for ; Fri, 20 Sep 2024 15:37:11 +0000 (UTC) Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by mx.groups.io with SMTP id smtpd.web11.21194.1726846626423724988 for ; Fri, 20 Sep 2024 08:37:06 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: t-online.de, ip: 194.25.134.83, mailfrom: f_l_k@t-online.de) Received: from fwd74.aul.t-online.de (fwd74.aul.t-online.de [10.223.144.100]) by mailout07.t-online.de (Postfix) with SMTP id 13FF328853 for ; Fri, 20 Sep 2024 17:36:42 +0200 (CEST) Received: from intel-corei7-64.fritz.box ([84.163.38.23]) by fwd74.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1srfgX-1UIeoN0; Fri, 20 Sep 2024 17:36:42 +0200 From: Markus Volk To: openembedded-core@lists.openembedded.org Subject: [oe-core][PATCH 3/3] gtk+3: remove unneeded .inc file Date: Fri, 20 Sep 2024 17:37:08 +0200 Message-ID: <20240920153708.1774041-3-f_l_k@t-online.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240920153708.1774041-1-f_l_k@t-online.de> References: <20240920153708.1774041-1-f_l_k@t-online.de> MIME-Version: 1.0 X-TOI-EXPURGATEID: 150726::1726846602-01FF9416-60A4A032/0/0 CLEAN NORMAL X-TOI-MSGID: 7b952314-0044-48c9-b0c3-8d458bdd3e18 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 20 Sep 2024 15:37:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/204759 Signed-off-by: Markus Volk --- meta/recipes-gnome/gtk+/gtk+3.inc | 154 --------------------- meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb | 164 ++++++++++++++++++++++- 2 files changed, 157 insertions(+), 161 deletions(-) delete mode 100644 meta/recipes-gnome/gtk+/gtk+3.inc diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc deleted file mode 100644 index 03913768b1..0000000000 --- a/meta/recipes-gnome/gtk+/gtk+3.inc +++ /dev/null @@ -1,154 +0,0 @@ - -SUMMARY = "Multi-platform toolkit for creating GUIs" -DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ -set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." -HOMEPAGE = "http://www.gtk.org" -BUGTRACKER = "https://bugzilla.gnome.org/" -SECTION = "libs" - -DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf gdk-pixbuf-native" - -LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" - -inherit meson gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection - -BBCLASSEXTEND = "native nativesdk" - -GSETTINGS_PACKAGE:class-native = "" - -# versions >= 3.90 are development versions, otherwise like upstream-version-is-even -UPSTREAM_CHECK_REGEX = "[^\d\.](?P3\.([1-8]?[02468])+(\.\d+)+)\.tar" - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" - -do_configure:prepend() { - # These files are generated by wayland-scanner but will race over modification - # time between the copies in the sysroot from wayland-protocols and the copy - # in the source tree. Solve the race by deleting so they need to be regenerated. - rm -f ${S}/modules/input/*-text-input-*.[ch] -} - -GTKDOC_MESON_OPTION = 'gtk_doc' - -EXTRA_OEMESON = "-Dxinerama=no -Dtests=false" -EXTRA_OEMESON:append:class-native = " -Ddemos=false -Dexamples=false" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'opengl x11', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'wayland', '', d)} \ -" -PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" - -PACKAGECONFIG[x11] = "-Dx11_backend=true,-Dx11_backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" -# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build -PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false,libepoxy" -PACKAGECONFIG[wayland] = "-Dwayland_backend=true,-Dwayland_backend=false,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" -PACKAGECONFIG[cups] = ",,cups,cups gtk3-printbackend-cups" -PACKAGECONFIG[colord] = "-Dcolord=yes,-Dcolord=no,colord" -PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=true,-Dcloudproviders=false,libcloudproviders" -PACKAGECONFIG[tracker3] = "-Dtracker3=true,-Dtracker3=false,tinysparql,localsearch" - -prepare_gtk_scripts() { - mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 - - # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache - mkdir -p ${D}${libexecdir} - ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 -} - -do_install:append:class-target() { - prepare_gtk_scripts -} - -do_install:append:class-nativesdk() { - prepare_gtk_scripts -} - -do_install:append:class-native() { - create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache - create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache -} - -PROVIDES += "gtk-icon-utils" -PACKAGES =+ "${PN}-demo" -LIBV = "3.0.0" - -FILES:${PN}-demo = "${bindir}/gtk3-demo \ - ${bindir}/gtk3-demo-application \ - ${bindir}/gtk3-icon-browser \ - ${bindir}/gtk3-widget-factory \ - ${datadir}/gtk-3.0/demo \ - ${datadir}/applications/gtk3-demo.desktop \ - ${datadir}/applications/gtk3-icon-browser.desktop \ - ${datadir}/applications/gtk3-widget-factory.desktop \ - ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ - ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" - -FILES:${PN}:append = " ${bindir}/gtk-update-icon-cache-3.0 \ - ${bindir}/gtk-query-immodules-3.0 \ - ${bindir}/gtk-launch \ - ${datadir}/themes ${datadir}/gtk-3.0/emoji \ - ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ - ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ - ${libdir}/gtk-3.0/modules/*.so" - -FILES:${PN}-dev += " \ - ${datadir}/gtk-3.0/gtkbuilder.rng \ - ${datadir}/gtk-3.0/include \ - ${datadir}/gtk-3.0/valgrind \ - ${datadir}/gettext/its \ - ${libdir}/gtk-3.0/include \ - ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ - ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ - ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ - ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ - ${libdir}/gtk-3.0/modules/*.la \ - ${bindir}/gtk-builder-convert \ - ${bindir}/gtk-encode-symbolic-svg \ - ${bindir}/gtk-builder-tool \ - ${bindir}/gtk-query-settings \ - " - -GTKBASE_RRECOMMENDS ?= "liberation-fonts \ - gdk-pixbuf-loader-png \ - gdk-pixbuf-loader-jpeg \ - gdk-pixbuf-loader-gif \ - gdk-pixbuf-loader-xpm \ - shared-mime-info \ - adwaita-icon-theme-symbolic \ - " - -GTKBASE_RRECOMMENDS:class-native ?= "\ - " - -GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" - -RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" -RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" -RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" - -PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" - -ALTERNATIVE:${PN} = "gtk-update-icon-cache" -ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" -ALTERNATIVE_PRIORITY = "30" - -python populate_packages:prepend () { - import os.path - - gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') - immodules_root = os.path.join(gtk_libdir, 'immodules') - printmodules_root = os.path.join(gtk_libdir, 'printbackends'); - - immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') - if immodules: - d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) - - do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') - - if (d.getVar('DEBIAN_NAMES')): - d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-3.0') -} diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb b/meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb index a8cc1152c3..2171880c50 100644 --- a/meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb +++ b/meta/recipes-gnome/gtk+/gtk+3_3.24.43.bb @@ -1,7 +1,23 @@ -require gtk+3.inc +SUMMARY = "Multi-platform toolkit for creating GUIs" +DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ +set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." +HOMEPAGE = "http://www.gtk.org" +BUGTRACKER = "https://bugzilla.gnome.org/" +SECTION = "libs" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ + file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ + file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" -MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" +CVE_PRODUCT = "gnome:gtk gtk:gtk\+" +DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf gdk-pixbuf-native" + +LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" + +inherit meson gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ file://opengl.patch \ " @@ -9,9 +25,143 @@ SRC_URI[sha256sum] = "7e04f0648515034b806b74ae5d774d87cffb1a2a96c468cb5be476d51b S = "${WORKDIR}/gtk+-${PV}" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ - file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ - file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" +BBCLASSEXTEND = "native nativesdk" -CVE_PRODUCT = "gnome:gtk gtk:gtk\+" +GSETTINGS_PACKAGE:class-native = "" + +# versions >= 3.90 are development versions, otherwise like upstream-version-is-even +UPSTREAM_CHECK_REGEX = "[^\d\.](?P3\.([1-8]?[02468])+(\.\d+)+)\.tar" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +do_configure:prepend() { + # These files are generated by wayland-scanner but will race over modification + # time between the copies in the sysroot from wayland-protocols and the copy + # in the source tree. Solve the race by deleting so they need to be regenerated. + rm -f ${S}/modules/input/*-text-input-*.[ch] +} + +GTKDOC_MESON_OPTION = 'gtk_doc' + +EXTRA_OEMESON = "-Dxinerama=no -Dtests=false" +EXTRA_OEMESON:append:class-native = " -Ddemos=false -Dexamples=false" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'opengl x11', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'wayland', '', d)} \ +" +PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" + +PACKAGECONFIG[x11] = "-Dx11_backend=true,-Dx11_backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" +# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build +PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false,libepoxy" +PACKAGECONFIG[wayland] = "-Dwayland_backend=true,-Dwayland_backend=false,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" +PACKAGECONFIG[cups] = ",,cups,cups gtk3-printbackend-cups" +PACKAGECONFIG[colord] = "-Dcolord=yes,-Dcolord=no,colord" +PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=true,-Dcloudproviders=false,libcloudproviders" +PACKAGECONFIG[tracker3] = "-Dtracker3=true,-Dtracker3=false,tinysparql,localsearch" + +prepare_gtk_scripts() { + mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 + + # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache + mkdir -p ${D}${libexecdir} + ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 +} + +do_install:append:class-target() { + prepare_gtk_scripts +} + +do_install:append:class-nativesdk() { + prepare_gtk_scripts +} + +do_install:append:class-native() { + create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache + create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache +} + +PROVIDES += "gtk-icon-utils" +PACKAGES =+ "${PN}-demo" +LIBV = "3.0.0" + +FILES:${PN}-demo = "${bindir}/gtk3-demo \ + ${bindir}/gtk3-demo-application \ + ${bindir}/gtk3-icon-browser \ + ${bindir}/gtk3-widget-factory \ + ${datadir}/gtk-3.0/demo \ + ${datadir}/applications/gtk3-demo.desktop \ + ${datadir}/applications/gtk3-icon-browser.desktop \ + ${datadir}/applications/gtk3-widget-factory.desktop \ + ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ + ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" + +FILES:${PN}:append = " ${bindir}/gtk-update-icon-cache-3.0 \ + ${bindir}/gtk-query-immodules-3.0 \ + ${bindir}/gtk-launch \ + ${datadir}/themes ${datadir}/gtk-3.0/emoji \ + ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ + ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ + ${libdir}/gtk-3.0/modules/*.so" + +FILES:${PN}-dev += " \ + ${datadir}/gtk-3.0/gtkbuilder.rng \ + ${datadir}/gtk-3.0/include \ + ${datadir}/gtk-3.0/valgrind \ + ${datadir}/gettext/its \ + ${libdir}/gtk-3.0/include \ + ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ + ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ + ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ + ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ + ${libdir}/gtk-3.0/modules/*.la \ + ${bindir}/gtk-builder-convert \ + ${bindir}/gtk-encode-symbolic-svg \ + ${bindir}/gtk-builder-tool \ + ${bindir}/gtk-query-settings \ + " + +GTKBASE_RRECOMMENDS ?= "liberation-fonts \ + gdk-pixbuf-loader-png \ + gdk-pixbuf-loader-jpeg \ + gdk-pixbuf-loader-gif \ + gdk-pixbuf-loader-xpm \ + shared-mime-info \ + adwaita-icon-theme-symbolic \ + " + +GTKBASE_RRECOMMENDS:class-native ?= "\ + " + +GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" + +RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" +RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" +RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" + +PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" + +ALTERNATIVE:${PN} = "gtk-update-icon-cache" +ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" +ALTERNATIVE_PRIORITY = "30" + +python populate_packages:prepend () { + import os.path + + gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') + immodules_root = os.path.join(gtk_libdir, 'immodules') + printmodules_root = os.path.join(gtk_libdir, 'printbackends'); + + immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') + if immodules: + d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) + + do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') + + if (d.getVar('DEBIAN_NAMES')): + d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-3.0') +}