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 |
| 14 | ANY_OF_DISTRO_FEATURES = "directfb x11" |
| 15 | |
| 16 | X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite" |
| 17 | DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \ |
| 18 | cairo gdk-pixbuf" |
| 19 | |
| 20 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ |
| 21 | ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \ |
| 22 | " |
| 23 | |
| 24 | PACKAGECONFIG[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 |
| 26 | PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb" |
| 27 | |
| 28 | inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache |
| 29 | |
| 30 | PACKAGES += "libgail gtk-demo" |
| 31 | |
| 32 | FILES_${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 | |
| 38 | FILES_${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 | |
| 48 | FILES_${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 | |
| 55 | FILES_gtk-demo = " \ |
| 56 | ${datadir}/gtk-2.0/demo/* \ |
| 57 | ${bindir}/gtk-demo \ |
| 58 | " |
| 59 | |
| 60 | FILES_libgail = " \ |
| 61 | ${libdir}/gtk-2.0/modules/libgail.so \ |
| 62 | ${libdir}/gtk-2.0/modules/libferret.so \ |
| 63 | " |
| 64 | |
| 65 | GTKBASE_RRECOMMENDS ?= "liberation-fonts gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm shared-mime-info" |
| 66 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 67 | |
| 68 | RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}" |
| 69 | RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
| 70 | |
| 71 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" |
| 72 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0" |
| 73 | |
| 74 | do_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 | |
| 89 | SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess" |
| 90 | |
| 91 | gtk_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 | |