blob: d6d14a79d5a89697710523333ad246030ccd9ba0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Multi-platform toolkit for creating GUIs"
2DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
3set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
4HOMEPAGE = "http://www.gtk.org"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6
7LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
10
11SECTION = "libs"
12
13inherit distro_features_check
Patrick Williamsf1e5d692016-03-30 15:21:19 -050014ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016# This picks stable releases in the 2.x series (but not 2.90 onwards,
17# which were GNOME 3 betas).
18UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
19
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022 cairo gdk-pixbuf"
23
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025
26PACKAGECONFIG[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
28PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
Brad Bishop19323692019-04-05 15:28:33 -040029PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog, --disable-man, libxslt-native xmlto-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection manpages
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
33PACKAGES += "libgail gtk-demo"
34
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050035FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 ${bindir}/gtk-query-immodules-2.0 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037 ${datadir}/themes ${sysconfdir} \
38 ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
39
40FILES_${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 Williamsc124f4f2015-09-15 14:41:29 -050050FILES_gtk-demo = " \
51 ${datadir}/gtk-2.0/demo/* \
52 ${bindir}/gtk-demo \
53 "
54
55FILES_libgail = " \
56 ${libdir}/gtk-2.0/modules/libgail.so \
57 ${libdir}/gtk-2.0/modules/libferret.so \
58 "
59
Patrick Williamsc0f7c042017-02-23 20:41:17 -060060GTKBASE_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 Williamsc124f4f2015-09-15 14:41:29 -050068GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
69
70RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
71RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
72
73ALTERNATIVE_${PN} = "gtk-update-icon-cache"
74ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
75
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050076do_compile_prepend() {
77 export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
78}
79
Patrick Williamsc124f4f2015-09-15 14:41:29 -050080do_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 Bishop1a4b7ee2018-12-16 17:11:34 -080093
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 Williamsc124f4f2015-09-15 14:41:29 -050097}
98
99SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
100
101gtk_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