archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gtk3 / trunk / PKGBUILD
blob03b1efec3a57136b3e606e78a001d8beb81a20af
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgbase=gtk3
5 pkgname=(gtk3 gtk3-docs gtk3-demos)
6 pkgver=3.24.35
7 pkgrel=2
8 epoch=1
9 pkgdesc="GObject-based multi-platform GUI toolkit"
10 url="https://www.gtk.org/"
11 arch=(x86_64)
12 license=(LGPL)
13 depends=(
14   adwaita-icon-theme
15   at-spi2-atk
16   atk
17   cairo
18   cantarell-fonts
19   dconf
20   desktop-file-utils
21   fribidi
22   gdk-pixbuf2
23   gtk-update-icon-cache
24   iso-codes
25   libcloudproviders
26   libcolord
27   libcups
28   libepoxy
29   librsvg
30   libxcomposite
31   libxcursor
32   libxdamage
33   libxi
34   libxinerama
35   libxkbcommon
36   libxrandr
37   mesa
38   pango
39   shared-mime-info
40   tracker3
41   wayland
43 makedepends=(
44   git
45   glib2-docs
46   gobject-introspection
47   gtk-doc
48   meson
49   sassc
50   wayland-protocols
52 options=(debug)
53 _commit=14cf55f98ddd71ad3f91487eda1c7f14d67de119  # tags/3.24.35^0
54 source=(
55   "git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
56   gtk-query-immodules-3.0.hook
58 sha256sums=('SKIP'
59             'a0319b6795410f06d38de1e8695a9bf9636ff2169f40701671580e60a108e229')
61 pkgver() {
62   cd gtk
63   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
66 prepare() {
67   cd gtk
69   # Crash in gnome-screenshot
70   # https://gitlab.gnome.org/GNOME/gtk/-/issues/4456
71   git cherry-pick -n e413f5c43259a22269aa1e75767dd545e10119b5
73   # https://bugs.archlinux.org/task/76651
74   # https://gitlab.gnome.org/GNOME/gtk/-/issues/5365
75   git cherry-pick -n 3f1536632f682c355d0c3abe1afc80cf975c2cce
78 build() {
79   local meson_options=(
80     -D broadway_backend=true
81     -D cloudproviders=true
82     -D colord=yes
83     -D gtk_doc=true
84     -D introspection=true
85     -D man=true
86     -D tracker3=true
87   )
89   CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
90   arch-meson gtk build "${meson_options[@]}"
91   meson compile -C build
94 _pick() {
95   local p="$1" f d; shift
96   for f; do
97     d="$srcdir/$p/${f#$pkgdir/}"
98     mkdir -p "$(dirname "$d")"
99     mv "$f" "$d"
100     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
101   done
104 package_gtk3() {
105   optdepends=('evince: Default print preview command')
106   provides=(gtk3-print-backends libgtk-3.so libgdk-3.so libgailutil-3.so)
107   conflicts=(gtk3-print-backends)
108   replaces=("gtk3-print-backends<=3.22.26-1")
109   install=gtk3.install
111   meson install -C build --destdir "$pkgdir"
113   install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-3.0/settings.ini" <<END
114 [Settings]
115 gtk-icon-theme-name = Adwaita
116 gtk-theme-name = Adwaita
117 gtk-font-name = Cantarell 11
120   install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-3.0.hook
122   cd "$pkgdir"
124   rm usr/bin/gtk-update-icon-cache
125   rm usr/share/man/man1/gtk-update-icon-cache.1
127   _pick docs usr/share/gtk-doc
129   _pick demo usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
130   _pick demo usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
131   _pick demo usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
132   _pick demo usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
133   _pick demo usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
136 package_gtk3-docs() {
137   pkgdesc+=" (documentation)"
138   depends=()
139   mv docs/* "$pkgdir"
142 package_gtk3-demos() {
143   pkgdesc+=" (demo applications)"
144   depends=(gtk3)
145   mv demo/* "$pkgdir"
148 # vim:set sw=2 sts=-1 et: