blob: ccbcfc8da4fffd2d9af64790eb59c1e617fa4813 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001SUMMARY = "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
Brad Bishop8410d612019-11-25 09:40:59 -050013inherit features_check
Brad Bishop26bdd442019-08-16 17:08:17 -040014ANY_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).
18UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
19
20X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
21DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \
22 cairo gdk-pixbuf"
23
24PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)}"
25
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"
29PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog, --disable-man, libxslt-native xmlto-native"
30
31inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection manpages
32
33PACKAGES += "libgail gtk-demo"
34
35FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \
36 ${bindir}/gtk-query-immodules-2.0 \
37 ${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
50FILES_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
60GTKBASE_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 "
68GTKGLIBC_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
76do_compile_prepend() {
77 export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
78}
79
80do_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
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