diff options
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+3.inc')
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3.inc | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc deleted file mode 100644 index 8d5edb7ee8..0000000000 --- a/meta/recipes-gnome/gtk+/gtk+3.inc +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | |||
2 | SUMMARY = "Multi-platform toolkit for creating GUIs" | ||
3 | DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ | ||
4 | set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." | ||
5 | HOMEPAGE = "http://www.gtk.org" | ||
6 | BUGTRACKER = "https://bugzilla.gnome.org/" | ||
7 | SECTION = "libs" | ||
8 | |||
9 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ | ||
10 | gdk-pixbuf-native" | ||
11 | |||
12 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | ||
13 | |||
14 | inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection | ||
15 | |||
16 | BBCLASSEXTEND = "native nativesdk" | ||
17 | |||
18 | GSETTINGS_PACKAGE_class-native = "" | ||
19 | |||
20 | # versions >= 3.90 are development versions, otherwise like upstream-version-is-even | ||
21 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar" | ||
22 | |||
23 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | ||
24 | |||
25 | # This should be in autotools.bbclass, but until something elses uses it putting | ||
26 | # it here avoids rebuilding everything. | ||
27 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | ||
28 | |||
29 | do_configure_prepend() { | ||
30 | # Do this because the configure script is running ./libtool directly | ||
31 | rm -f libtool | ||
32 | ln -s ${TARGET_PREFIX}libtool libtool | ||
33 | #delete a file that will get confused with generated one in ${B} | ||
34 | rm -f ${S}/gtk/gtktypefuncs.c | ||
35 | |||
36 | # These files are generated by wayland-scanner but will race over modification | ||
37 | # time between the copies in the sysroot from wayland-protocols and the copy | ||
38 | # in the source tree. Solve the race by deleting so they need to be regenerated. | ||
39 | # 3.24.22 will not be shipping these files so this can be deleted then: | ||
40 | # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2183 | ||
41 | rm -f ${S}/modules/input/text-input-unstable-v3*.[ch] | ||
42 | } | ||
43 | |||
44 | EXTRA_OECONF += " \ | ||
45 | --disable-glibtest \ | ||
46 | --disable-xinerama \ | ||
47 | --enable-modules \ | ||
48 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \ | ||
49 | " | ||
50 | |||
51 | do_compile_prepend() { | ||
52 | export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" | ||
53 | } | ||
54 | |||
55 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland x11', d)} \ | ||
56 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)}" | ||
57 | PACKAGECONFIG_class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
58 | PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
59 | |||
60 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | ||
61 | # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build | ||
62 | PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy" | ||
63 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" | ||
64 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" | ||
65 | PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" | ||
66 | PACKAGECONFIG[cloudprint] = "--enable-cloudprint,--disable-cloudprint,rest json-glib" | ||
67 | PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" | ||
68 | |||
69 | prepare_gtk_scripts() { | ||
70 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 | ||
71 | |||
72 | # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache | ||
73 | mkdir -p ${D}${libexecdir} | ||
74 | ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 | ||
75 | } | ||
76 | |||
77 | do_install_append_class-target() { | ||
78 | prepare_gtk_scripts | ||
79 | } | ||
80 | |||
81 | do_install_append_class-nativesdk() { | ||
82 | prepare_gtk_scripts | ||
83 | } | ||
84 | |||
85 | do_install_append_class-native() { | ||
86 | create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ | ||
87 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
88 | create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ | ||
89 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
90 | } | ||
91 | |||
92 | PROVIDES += "gtk-icon-utils" | ||
93 | PACKAGES =+ "${PN}-demo" | ||
94 | LIBV = "3.0.0" | ||
95 | |||
96 | FILES_${PN}-demo = "${bindir}/gtk3-demo \ | ||
97 | ${bindir}/gtk3-demo-application \ | ||
98 | ${bindir}/gtk3-icon-browser \ | ||
99 | ${bindir}/gtk3-widget-factory \ | ||
100 | ${datadir}/gtk-3.0/demo \ | ||
101 | ${datadir}/applications/gtk3-demo.desktop \ | ||
102 | ${datadir}/applications/gtk3-icon-browser.desktop \ | ||
103 | ${datadir}/applications/gtk3-widget-factory.desktop \ | ||
104 | ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ | ||
105 | ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" | ||
106 | |||
107 | FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \ | ||
108 | ${bindir}/gtk-query-immodules-3.0 \ | ||
109 | ${bindir}/gtk-launch \ | ||
110 | ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
111 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | ||
112 | ${libdir}/gtk-3.0/modules/*.so" | ||
113 | |||
114 | FILES_${PN}-dev += " \ | ||
115 | ${datadir}/gtk-3.0/gtkbuilder.rng \ | ||
116 | ${datadir}/gtk-3.0/include \ | ||
117 | ${datadir}/gtk-3.0/valgrind \ | ||
118 | ${datadir}/gettext/its \ | ||
119 | ${libdir}/gtk-3.0/include \ | ||
120 | ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ | ||
121 | ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ | ||
122 | ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ | ||
123 | ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ | ||
124 | ${libdir}/gtk-3.0/modules/*.la \ | ||
125 | ${bindir}/gtk-builder-convert \ | ||
126 | ${bindir}/gtk-encode-symbolic-svg \ | ||
127 | ${bindir}/gtk-builder-tool \ | ||
128 | ${bindir}/gtk-query-settings \ | ||
129 | " | ||
130 | |||
131 | GTKBASE_RRECOMMENDS ?= "liberation-fonts \ | ||
132 | gdk-pixbuf-loader-png \ | ||
133 | gdk-pixbuf-loader-jpeg \ | ||
134 | gdk-pixbuf-loader-gif \ | ||
135 | gdk-pixbuf-loader-xpm \ | ||
136 | shared-mime-info \ | ||
137 | adwaita-icon-theme-symbolic \ | ||
138 | " | ||
139 | |||
140 | GTKBASE_RRECOMMENDS_class-native ?= "\ | ||
141 | " | ||
142 | |||
143 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" | ||
144 | |||
145 | RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}" | ||
146 | RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}" | ||
147 | RDEPENDS_${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" | ||
148 | |||
149 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" | ||
150 | |||
151 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" | ||
152 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" | ||
153 | ALTERNATIVE_PRIORITY = "30" | ||
154 | |||
155 | python populate_packages_prepend () { | ||
156 | import os.path | ||
157 | |||
158 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') | ||
159 | immodules_root = os.path.join(gtk_libdir, 'immodules') | ||
160 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); | ||
161 | |||
162 | immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') | ||
163 | if immodules: | ||
164 | d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) | ||
165 | |||
166 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') | ||
167 | |||
168 | if (d.getVar('DEBIAN_NAMES')): | ||
169 | d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0') | ||
170 | } | ||