Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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 | |
| 7 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" |
| 8 | |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" |
| 10 | |
| 11 | SECTION = "libs" |
| 12 | |
| 13 | inherit distro_features_check |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 14 | ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | cairo gdk-pixbuf" |
| 23 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog, --disable-man, libxslt-native xmlto-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection manpages |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | |
| 33 | PACKAGES += "libgail gtk-demo" |
| 34 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 35 | FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | ${bindir}/gtk-query-immodules-2.0 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | ${datadir}/themes ${sysconfdir} \ |
| 38 | ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so" |
| 39 | |
| 40 | FILES_${PN}-dev += " \ |
| 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 | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | FILES_gtk-demo = " \ |
| 51 | ${datadir}/gtk-2.0/demo/* \ |
| 52 | ${bindir}/gtk-demo \ |
| 53 | " |
| 54 | |
| 55 | FILES_libgail = " \ |
| 56 | ${libdir}/gtk-2.0/modules/libgail.so \ |
| 57 | ${libdir}/gtk-2.0/modules/libferret.so \ |
| 58 | " |
| 59 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 68 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 69 | |
| 70 | RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}" |
| 71 | RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
| 72 | |
| 73 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" |
| 74 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0" |
| 75 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 76 | do_compile_prepend() { |
| 77 | export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" |
| 78 | } |
| 79 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |