archrelease: copy trunk to testing-x86_64
[arch-packages.git] / gtk3 / repos / extra-x86_64 / PKGBUILD
blobed220ea6cc68fed91b958b75bc4aa97f2fa3e434
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgbase=gtk3
5 pkgname=(
6   gtk3
7   gtk3-demos
8   gtk3-docs
10 pkgver=3.24.37
11 pkgrel=1
12 epoch=1
13 pkgdesc="GObject-based multi-platform GUI toolkit"
14 url="https://www.gtk.org/"
15 arch=(x86_64)
16 license=(LGPL)
17 depends=(
18   adwaita-icon-theme
19   atk
20   cairo
21   cantarell-fonts
22   dconf
23   desktop-file-utils
24   fontconfig
25   fribidi
26   gdk-pixbuf2
27   glib2
28   harfbuzz
29   iso-codes
30   libcloudproviders
31   libcolord
32   libcups
33   libegl
34   libepoxy
35   libgl
36   librsvg
37   libxcomposite
38   libx11
39   libxcursor
40   libxdamage
41   libxext
42   libxfixes
43   libxi
44   libxinerama
45   libxkbcommon
46   libxrandr
47   libxrender
48   pango
49   shared-mime-info
50   tracker3
51   wayland
53 makedepends=(
54   git
55   glib2-docs
56   gobject-introspection
57   gtk-doc
58   meson
59   sassc
60   wayland-protocols
62 _commit=013b629a2e5420cc01647f859226eb1a37ebe661  # tags/3.24.37^0
63 source=(
64   "git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
65   gtk-query-immodules-3.0.hook
67 sha256sums=('SKIP'
68             'a0319b6795410f06d38de1e8695a9bf9636ff2169f40701671580e60a108e229')
70 pkgver() {
71   cd gtk
72   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
75 prepare() {
76   cd gtk
79 build() {
80   local meson_options=(
81     -D broadway_backend=true
82     -D cloudproviders=true
83     -D colord=yes
84     -D gtk_doc=true
85     -D introspection=true
86     -D man=true
87     -D tracker3=true
88   )
90   CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
91   arch-meson gtk build "${meson_options[@]}"
92   meson compile -C build
95 _pick() {
96   local p="$1" f d; shift
97   for f; do
98     d="$srcdir/$p/${f#$pkgdir/}"
99     mkdir -p "$(dirname "$d")"
100     mv "$f" "$d"
101     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
102   done
105 package_gtk3() {
106   depends+=(gtk-update-icon-cache)
107   optdepends=('evince: Default print preview command')
108   provides=(
109     gtk3-print-backends
110     libgailutil-3.so
111     libgdk-3.so
112     libgtk-3.so
113   )
114   conflicts=(gtk3-print-backends)
115   replaces=("gtk3-print-backends<=3.22.26-1")
116   install=gtk3.install
118   meson install -C build --destdir "$pkgdir"
120   install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-3.0/settings.ini" <<END
121 [Settings]
122 gtk-icon-theme-name = Adwaita
123 gtk-theme-name = Adwaita
124 gtk-font-name = Cantarell 11
127   install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-3.0.hook
129   cd "$pkgdir"
131   _pick demo usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
132   _pick demo usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
133   _pick demo usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
134   _pick demo usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
135   _pick demo usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
137   _pick docs usr/share/gtk-doc
139   # Built by GTK 4, shared with GTK 3
140   rm usr/bin/gtk-update-icon-cache
141   rm usr/share/man/man1/gtk-update-icon-cache.1
144 package_gtk3-demos() {
145   pkgdesc+=" (demo applications)"
146   depends=(gtk3)
147   mv demo/* "$pkgdir"
150 package_gtk3-docs() {
151   pkgdesc+=" (documentation)"
152   depends=()
153   mv docs/* "$pkgdir"
156 # vim:set sw=2 sts=-1 et: