blob: be5273d620cf6160ea09970d5893215caf8e0ae5 [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
14ANY_OF_DISTRO_FEATURES = "directfb x11"
15
16X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
17DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
18 cairo gdk-pixbuf"
19
20PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
21 ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
22"
23
24PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
25# without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
26PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
27
28inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache
29
30PACKAGES += "libgail gtk-demo"
31
32FILES_${PN} = "${bindir}/gtk-update-icon-cache-2.0 \
33 ${bindir}/gtk-query-immodules-2.0 \
34 ${libdir}/lib*${SOLIBS} \
35 ${datadir}/themes ${sysconfdir} \
36 ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
37
38FILES_${PN}-dev += " \
39 ${datadir}/gtk-2.0/include \
40 ${libdir}/gtk-2.0/include \
41 ${libdir}/gtk-2.0/modules/*.la \
42 ${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
43 ${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
44 ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
45 ${libdir}/gtk-2.0/${LIBV}/engines/*.la \
46 ${bindir}/gtk-builder-convert"
47
48FILES_${PN}-dbg += " \
49 ${libdir}/gtk-2.0/modules/.debug/* \
50 ${libdir}/gtk-2.0/${LIBV}/loaders/.debug/* \
51 ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \
52 ${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
53 ${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
54
55FILES_gtk-demo = " \
56 ${datadir}/gtk-2.0/demo/* \
57 ${bindir}/gtk-demo \
58 "
59
60FILES_libgail = " \
61 ${libdir}/gtk-2.0/modules/libgail.so \
62 ${libdir}/gtk-2.0/modules/libferret.so \
63 "
64
65GTKBASE_RRECOMMENDS ?= "liberation-fonts gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm shared-mime-info"
66GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
67
68RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
69RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
70
71ALTERNATIVE_${PN} = "gtk-update-icon-cache"
72ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
73
74do_install () {
75 autotools_do_install
76
77 install -d ${D}${sysconfdir}/gtk-2.0
78
79 mkdir -p ${D}${libdir}/gtk-2.0/include
80 install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
81
82 install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
83 install -m 0644 ${S}/gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/
84 install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
85
86 mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
87}
88
89SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
90
91gtk_sysroot_preprocess () {
92 if [ -e ${D}${bindir}/gtk-builder-convert ]; then
93 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
94 install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
95 fi
96}
97