# Template build file for 'gtk+3'. pkgname=gtk+3 version=3.12.2 revision=3 wrksrc="gtk+-${version}" build_style=gnu-configure configure_args="--disable-schemas-compile --enable-gtk2-dependency" short_desc="The GTK+ toolkit (v3)" maintainer="Juan RP " homepage="http://www.gtk.org/" license="LGPL-2.1" distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz" checksum=61d74eea74231b1ea4b53084a9d6fc9917ab0e1d71b69d92cbf60a4b4fb385d0 hostmakedepends="libtool pkg-config glib-devel>=2.40 gtk-update-icon-cache" makedepends="libglib-devel>=2.40 atk-devel>=2.12 at-spi2-atk-devel>=2.12 libpng-devel fontconfig-devel cairo-devel pango-devel>=1.36 gdk-pixbuf-devel>=2.30 gtk-update-icon-cache" depends="gtk-update-icon-cache shared-mime-info glib>=2.38 atk>=2.10" triggers="gtk3-immodules" conf_files="/etc/gtk-3.0/im-multipress.conf" # Package build options build_options="broadway colord cups gir wayland x11" desc_option_broadway="Enable support for the HTML5 Broadway backend" desc_option_colord="Enable support for colord" desc_option_cups="Enable support for the cups print backend" desc_option_gir="Enable support for gobject introspection data" desc_option_wayland="Enable support for the Wayland backend" desc_option_x11="Enable support for the X11 backend" # Enable all options by default. build_options_default="colord cups broadway wayland x11" # Enable gir only for native builds. if [ -z "$CROSS_BUILD" ]; then build_options_default+=" gir" fi if [ "$build_option_broadway" ]; then configure_args+=" --enable-broadway-backend" else configure_args+=" --disable-broadway-backend" fi if [ "$build_option_colord" ]; then configure_args+=" --enable-colord" makedepends+=" colord-devel>=1.1.7" else configure_args+=" --disable-colord" fi if [ "$build_option_cups" ]; then configure_args+=" --enable-cups" hostmakedepends+=" cups-devel" makedepends+=" cups-devel" else configure_args+=" --disable-cups" fi if [ "$build_option_gir" ]; then makedepends+=" gobject-introspection" configure_args+=" --enable-introspection" else configure_args+=" --disable-introspection" fi if [ "$build_option_wayland" ]; then hostmakedepends+=" wayland-devel" makedepends+=" libxkbcommon-devel wayland-devel" configure_args+=" --enable-wayland-backend" else configure_args+=" --disable-wayland-backend" fi if [ "$build_option_x11" ]; then depends+=" dbus-x11" makedepends+=" libXcursor-devel libXdamage-devel libXext-devel libXinerama-devel libXi-devel libXrandr-devel libXcomposite-devel" configure_args+=" --enable-x11-backend" else configure_args+=" --disable-x11-backend" fi pre_configure() { libtoolize -f } post_install() { rm -f ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1 # Provide a default (icon)theme. vinstall ${FILESDIR}/settings.ini 644 usr/share/gtk-3.0 } gtk+3-devel_package() { depends="libglib-devel>=2.40 atk-devel>=2.12 cairo-devel gdk-pixbuf-devel>=2.30 pango-devel>=1.36 at-spi2-atk-devel>=2.12 gtk+3>=${version}_${revision}" if [ "$build_option_x11" ]; then depends+=" libXcomposite-devel libXcursor-devel libXrandr-devel libXi-devel libXinerama-devel libXdamage-devel" fi if [ "$build_option_wayland" ]; then depends+=" libxkbcommon-devel wayland-devel" fi short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig vmove "usr/lib/*.so" if [ "$build_option_gir" ]; then vmove usr/share/gir-1.0 fi vmove usr/share/gtk-doc vmove usr/share/aclocal } } gtk+3-demo_package() { short_desc+=" - demonstration application" pkg_install() { vmove usr/bin/gtk3-demo vmove usr/bin/gtk3-widget-factory vmove usr/bin/gtk3-demo-application vmove usr/share/gtk-3.0/gtkbuilder.rng vmove usr/share/glib-2.0/schemas/org.gtk.Demo.gschema.xml vmove usr/share/glib-2.0/schemas/org.gtk.exampleapp.gschema.xml vmove usr/share/applications vmove usr/share/icons } }