Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 8 | |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" |
| 10 | |
| 11 | SECTION = "libs" |
| 12 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 13 | inherit features_check |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 14 | ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" |
| 15 | |
| 16 | # This picks stable releases in the 2.x series (but not 2.90 onwards, |
| 17 | # which were GNOME 3 betas). |
| 18 | UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)" |
| 19 | |
| 20 | X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite" |
| 21 | DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \ |
| 22 | cairo gdk-pixbuf" |
| 23 | |
| 24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)}" |
| 25 | |
| 26 | PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}" |
| 27 | # without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE |
| 28 | PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb" |
| 29 | PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog, --disable-man, libxslt-native xmlto-native" |
| 30 | |
| 31 | inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection manpages |
| 32 | |
| 33 | PACKAGES += "libgail gtk-demo" |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | FILES:${PN} += "${bindir}/gtk-update-icon-cache-2.0 \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 36 | ${bindir}/gtk-query-immodules-2.0 \ |
| 37 | ${datadir}/themes ${sysconfdir} \ |
| 38 | ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so" |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | FILES:${PN}-dev += " \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 41 | ${datadir}/gtk-2.0/include \ |
| 42 | ${libdir}/gtk-2.0/include \ |
| 43 | ${libdir}/gtk-2.0/modules/*.la \ |
| 44 | ${libdir}/gtk-2.0/${LIBV}/loaders/*.la \ |
| 45 | ${libdir}/gtk-2.0/${LIBV}/immodules/*.la \ |
| 46 | ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \ |
| 47 | ${libdir}/gtk-2.0/${LIBV}/engines/*.la \ |
| 48 | ${bindir}/gtk-builder-convert" |
| 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | FILES:gtk-demo = " \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 51 | ${datadir}/gtk-2.0/demo/* \ |
| 52 | ${bindir}/gtk-demo \ |
| 53 | " |
| 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | FILES:libgail = " \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 56 | ${libdir}/gtk-2.0/modules/libgail.so \ |
| 57 | ${libdir}/gtk-2.0/modules/libferret.so \ |
| 58 | " |
| 59 | |
| 60 | GTKBASE_RRECOMMENDS ?= "liberation-fonts \ |
| 61 | gdk-pixbuf-loader-png \ |
| 62 | gdk-pixbuf-loader-jpeg \ |
| 63 | gdk-pixbuf-loader-gif \ |
| 64 | gdk-pixbuf-loader-xpm \ |
| 65 | shared-mime-info \ |
| 66 | gnome-theme-adwaita \ |
| 67 | " |
| 68 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 69 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 70 | RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" |
| 71 | RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 72 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | ALTERNATIVE:${PN} = "gtk-update-icon-cache" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 74 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0" |
| 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | do_compile:prepend() { |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 77 | export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" |
| 78 | } |
| 79 | |
| 80 | do_install () { |
| 81 | autotools_do_install |
| 82 | |
| 83 | install -d ${D}${sysconfdir}/gtk-2.0 |
| 84 | |
| 85 | mkdir -p ${D}${libdir}/gtk-2.0/include |
| 86 | install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h |
| 87 | |
| 88 | install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/ |
| 89 | install -m 0644 ${S}/gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/ |
| 90 | install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/ |
| 91 | |
| 92 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0 |
| 93 | |
| 94 | # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache |
| 95 | mkdir -p ${D}${libexecdir} |
| 96 | ln ${D}${bindir}/gtk-query-immodules-2.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-2.0 |
| 97 | } |
| 98 | |
| 99 | SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess" |
| 100 | |
| 101 | gtk_sysroot_preprocess () { |
| 102 | if [ -e ${D}${bindir}/gtk-builder-convert ]; then |
| 103 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
| 104 | install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
| 105 | fi |
| 106 | } |
| 107 | |