diff options
author | Ross Burton <ross.burton@intel.com> | 2013-05-29 16:45:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-17 16:45:34 +0100 |
commit | 7eab456a68c55eeed4555210a92bd25f66862d57 (patch) | |
tree | b29d105fa8fcadc8a42adf443897d1255ccf78e8 /meta | |
parent | b10267f90ecf95a527aed4af539a99d04cd97eae (diff) | |
download | poky-7eab456a68c55eeed4555210a92bd25f66862d57.tar.gz |
gtk+3: split into .bb/.inc
I plan on introducing a git master version for automatically testing upstream
development, so this split makes things a lot easier.
(From OE-Core rev: f245b1f37fc326c85d19a8a48784c44d15b08ea7)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3.inc | 102 | ||||
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb | 111 |
2 files changed, 107 insertions, 106 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc new file mode 100644 index 0000000000..4742eb9267 --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+3.inc | |||
@@ -0,0 +1,102 @@ | |||
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 | SECTION = "libs" | ||
7 | |||
8 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ | ||
9 | docbook-utils-native gdk-pixbuf-native" | ||
10 | |||
11 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | ||
12 | |||
13 | inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings | ||
14 | |||
15 | # This should be in autotools.bbclass, but until something elses uses it putting | ||
16 | # it here avoids rebuilding everything. | ||
17 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | ||
18 | |||
19 | do_configure_prepend() { | ||
20 | # Do this because the configure script is running ./libtool directly | ||
21 | ln -s ${TARGET_PREFIX}libtool libtool || true | ||
22 | } | ||
23 | |||
24 | # Forcibly disable the GTK+ 2 dependency as we don't want to natively build the | ||
25 | # entire GTK+ stack, or need GTK+ 2 for gtk-update-icon-cache. | ||
26 | EXTRA_OECONF += " \ | ||
27 | --disable-gtk2-dependency \ | ||
28 | --disable-glibtest \ | ||
29 | --disable-xinerama \ | ||
30 | --enable-modules \ | ||
31 | --disable-cups \ | ||
32 | --disable-introspection \ | ||
33 | " | ||
34 | |||
35 | PACKAGECONFIG ??= "${@base_contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ | ||
36 | ${@base_contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" | ||
37 | |||
38 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | ||
39 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon" | ||
40 | |||
41 | do_install_append() { | ||
42 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 | ||
43 | } | ||
44 | |||
45 | PACKAGES =+ "${PN}-demo" | ||
46 | LIBV = "3.0.0" | ||
47 | |||
48 | FILES_${PN}-demo = "${bindir}/gtk3-demo \ | ||
49 | ${bindir}/gtk3-demo-application \ | ||
50 | ${bindir}/gtk3-widget-factory \ | ||
51 | ${datadir}/gtk-3.0/demo" | ||
52 | |||
53 | # The demo uses PNG files and mime type sniffing, so ensure that these | ||
54 | # dependencies are present. | ||
55 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info" | ||
56 | |||
57 | FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \ | ||
58 | ${bindir}/gtk-query-immodules-3.0 \ | ||
59 | ${bindir}/gtk-launch \ | ||
60 | ${libdir}/lib*${SOLIBS} \ | ||
61 | ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
62 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | ||
63 | ${libdir}/gtk-3.0/modules/*.so" | ||
64 | |||
65 | FILES_${PN}-dev += " \ | ||
66 | ${datadir}/gtk-3.0/gtkbuilder.rng \ | ||
67 | ${datadir}/gtk-3.0/include \ | ||
68 | ${libdir}/gtk-3.0/include \ | ||
69 | ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ | ||
70 | ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ | ||
71 | ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ | ||
72 | ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ | ||
73 | ${libdir}/gtk-3.0/modules/*.la \ | ||
74 | ${bindir}/gtk-builder-convert" | ||
75 | |||
76 | FILES_${PN}-dbg += " \ | ||
77 | ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \ | ||
78 | ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \ | ||
79 | ${libdir}/gtk-3.0/${LIBV}/engines/.debug \ | ||
80 | ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \ | ||
81 | ${libdir}/gtk-3.0/modules/.debug" | ||
82 | |||
83 | |||
84 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" | ||
85 | |||
86 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" | ||
87 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" | ||
88 | |||
89 | python populate_packages_prepend () { | ||
90 | import os.path | ||
91 | |||
92 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') | ||
93 | immodules_root = os.path.join(gtk_libdir, 'immodules') | ||
94 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); | ||
95 | |||
96 | d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) | ||
97 | do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') | ||
98 | |||
99 | if (d.getVar('DEBIAN_NAMES', 1)): | ||
100 | d.setVar('PKG_${PN}', 'libgtk-3.0') | ||
101 | } | ||
102 | |||
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb b/meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb index 8f254fb232..b9d4091091 100644 --- a/meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb +++ b/meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb | |||
@@ -1,19 +1,4 @@ | |||
1 | SUMMARY = "Multi-platform toolkit for creating GUIs" | 1 | require gtk+3.inc |
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 | SECTION = "libs" | ||
7 | |||
8 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ | ||
9 | docbook-utils-native gdk-pixbuf-native" | ||
10 | |||
11 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
14 | file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ | ||
15 | file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ | ||
16 | file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" | ||
17 | 2 | ||
18 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" | 3 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
19 | 4 | ||
@@ -23,95 +8,9 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ | |||
23 | SRC_URI[md5sum] = "8e878e18fc385f2b813419dc7b40a968" | 8 | SRC_URI[md5sum] = "8e878e18fc385f2b813419dc7b40a968" |
24 | SRC_URI[sha256sum] = "1ca80c9c15a1df95d74cefb8c2afe4682ba272a4b489106f04877be2a7aff297" | 9 | SRC_URI[sha256sum] = "1ca80c9c15a1df95d74cefb8c2afe4682ba272a4b489106f04877be2a7aff297" |
25 | 10 | ||
26 | inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings | ||
27 | |||
28 | S = "${WORKDIR}/gtk+-${PV}" | 11 | S = "${WORKDIR}/gtk+-${PV}" |
29 | 12 | ||
30 | # This should be in autotools.bbclass, but until something elses uses it putting | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ |
31 | # it here avoids rebuilding everything. | 14 | file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ |
32 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | 15 | file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ |
33 | 16 | file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" | |
34 | do_configure_prepend() { | ||
35 | # Do this because the configure script is running ./libtool directly | ||
36 | ln -s ${TARGET_PREFIX}libtool libtool || true | ||
37 | } | ||
38 | |||
39 | # Forcibly disable the GTK+ 2 dependency as we don't want to natively build the | ||
40 | # entire GTK+ stack, or need GTK+ 2 for gtk-update-icon-cache. | ||
41 | EXTRA_OECONF += " \ | ||
42 | --disable-gtk2-dependency \ | ||
43 | --disable-glibtest \ | ||
44 | --disable-xinerama \ | ||
45 | --enable-modules \ | ||
46 | --disable-cups \ | ||
47 | --disable-introspection \ | ||
48 | " | ||
49 | |||
50 | PACKAGECONFIG ??= "${@base_contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ | ||
51 | ${@base_contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" | ||
52 | |||
53 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | ||
54 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon" | ||
55 | |||
56 | do_install_append() { | ||
57 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 | ||
58 | } | ||
59 | |||
60 | PACKAGES =+ "${PN}-demo" | ||
61 | LIBV = "3.0.0" | ||
62 | |||
63 | FILES_${PN}-demo = "${bindir}/gtk3-demo \ | ||
64 | ${bindir}/gtk3-demo-application \ | ||
65 | ${bindir}/gtk3-widget-factory \ | ||
66 | ${datadir}/gtk-3.0/demo" | ||
67 | |||
68 | # The demo uses PNG files and mime type sniffing, so ensure that these | ||
69 | # dependencies are present. | ||
70 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info" | ||
71 | |||
72 | FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \ | ||
73 | ${bindir}/gtk-query-immodules-3.0 \ | ||
74 | ${bindir}/gtk-launch \ | ||
75 | ${libdir}/lib*${SOLIBS} \ | ||
76 | ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
77 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | ||
78 | ${libdir}/gtk-3.0/modules/*.so" | ||
79 | |||
80 | FILES_${PN}-dev += " \ | ||
81 | ${datadir}/gtk-3.0/gtkbuilder.rng \ | ||
82 | ${datadir}/gtk-3.0/include \ | ||
83 | ${libdir}/gtk-3.0/include \ | ||
84 | ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ | ||
85 | ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ | ||
86 | ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ | ||
87 | ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ | ||
88 | ${libdir}/gtk-3.0/modules/*.la \ | ||
89 | ${bindir}/gtk-builder-convert" | ||
90 | |||
91 | FILES_${PN}-dbg += " \ | ||
92 | ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \ | ||
93 | ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \ | ||
94 | ${libdir}/gtk-3.0/${LIBV}/engines/.debug \ | ||
95 | ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \ | ||
96 | ${libdir}/gtk-3.0/modules/.debug" | ||
97 | |||
98 | |||
99 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" | ||
100 | |||
101 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" | ||
102 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" | ||
103 | |||
104 | python populate_packages_prepend () { | ||
105 | import os.path | ||
106 | |||
107 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') | ||
108 | immodules_root = os.path.join(gtk_libdir, 'immodules') | ||
109 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); | ||
110 | |||
111 | d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) | ||
112 | do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') | ||
113 | |||
114 | if (d.getVar('DEBIAN_NAMES', 1)): | ||
115 | d.setVar('PKG_${PN}', 'libgtk-3.0') | ||
116 | } | ||
117 | |||