phosh-arch/gtk3-mobile/PKGBUILD
2024-08-13 08:17:11 -07:00

209 lines
6.8 KiB
Bash

# Maintainer: Danct12 <danct12@disroot.org>
# Contributor Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
pkgname=gtk3-mobile
pkgver=3.24.43
pkgrel=1
pkgdesc="GObject-based multi-platform GUI toolkit (Built with Purism patches)"
url="https://www.gtk.org/"
arch=('x86_64' 'armv7h' 'aarch64')
license=(LGPL-2.1-or-later)
depends=(
adwaita-icon-theme
at-spi2-core
cairo
cantarell-fonts
dconf
desktop-file-utils
fontconfig
fribidi
gdk-pixbuf2
glib2
glibc
gtk-update-icon-cache
harfbuzz
iso-codes
libcloudproviders
libcolord
libcups
libegl
libepoxy
libgl
librsvg
libx11
libxcomposite
libxcursor
libxdamage
libxext
libxfixes
libxi
libxinerama
libxkbcommon
libxrandr
libxrender
pango
shared-mime-info
tracker3
wayland
)
makedepends=(
git
glib2-devel
gobject-introspection
gtk-doc
hicolor-icon-theme
meson
sassc
wayland-protocols
)
optdepends=('evince: Default print preview command')
provides=(
gtk3
gtk3-print-backends
libgailutil-3.so
libgdk-3.so
libgtk-3.so
)
conflicts=(
gtk3
gtk3-print-backends
)
install=gtk3.install
source=(
"git+https://gitlab.gnome.org/GNOME/gtk.git#tag=$pkgver"
gtk-query-immodules-3.0.hook
0001-Allow-disabling-legacy-Tracker-search.patch
# Purism patches
Add-GtkHdyViewSwitcherButton.patch
Add-GtkHdyViewSwitcher.patch
Add-GtkHdyViewSwitcherBar.patch
Add-GtkHdyAnimation.patch
Add-GtkHdySqueezer.patch
Add-GtkHdyViewSwitcherTitle.patch
Add-GtkHdyShadowHelper.patch
Add-GtkHdyNavigationDirection.patch
Add-GtkHdySwipeable-and-GtkHdySwipeTracker.patch
Add-GtkHdyClamp.patch
Add-GtkHdyFlap.patch
theme-Add-libhandy-styles.patch
Add-padding-for-HdyViewSwitcherTitle.patch
hdy-flap-Use-natural-size-for-folding-instead-of-minimum.patch
Add-org.gtk.Settings.Purism.patch
gtkprivate-Add-an-API-to-check-if-phone.patch
aboutdialog-Port-to-phones.patch
Add-the-view-sidebar-symbolic-icon.patch
Port-file-chooser-to-phones.patch
messagedialog-Set-orientation-based-on-device.patch
dialog-Maximize-resizable-dialogs-on-phones.patch
window-Maximize-resizable-pseudo-dialogs-on-mobile.patch
headerbar-Use-a-back-button-in-dialogs-on-mobile.patch
infobar-Move-the-action-area-below-on-the-phone.patch
Reduce-the-font-chooser-minimum-size.patch
printunixdialog-Adapt-for-phones.patch
window-Disable-window-dragging-on-phones.patch
librem5-Make-GtkShortcutsWindow-adaptive.patch
scrolledwindow-Set-deceleration-value-based-on-the-device.patch
events-Compress-touch-update-events.patch
gdk-wayland-Track-last-touch-serial-on-seat.patch
)
sha256sums=('2d447a2ecf41d2616e413263b495a8f410a43dda1c74cf3e05a740c98f98f9ff'
'de46e5514ff39a7a65e01e485e874775ab1c0ad20b8e94ada43f4a6af1370845'
'f102ea1987b9b8370882d5c7f6aa577bfa3adade834b179c6352c39388ab9b3e'
'5d741bf9ef9071f1a78cf8b1b8f0ffa62d67e1144628093e66a0e22ac06d5d3d'
'4d8c9deaa13619eb813e399413bb8e4a77b825e843e80efe9580f0c70317dbae'
'23cff79de2a818b58e8dc76551d32b67642c5031253350285dbec5d7f160a7a0'
'd3af6e355ce1508fcf021ab46dfed389f914e3f9cf1bbf11b2eec131d5b76427'
'8b40ce6feb86b09c30e08280b8a7cd7fb1a79eea1d5de827706411c629687c8d'
'115a79dceb93715bb729e351b5964003f1bf725044619f28a5a8c76adf5fb22b'
'd43e2eda22eea205f55ff452e6ebc6b844463c258885a1ea4beae908034d82dc'
'c8e849707874e5da7610ca69da5f4451fddd3182b2e6a9c4d4531bb0fce70636'
'a972aa3b1dfe1aa46365d595ab0011154fcb37dede6fd281494872b390181049'
'257d65205e783107115676c6fb193bed7554ca8eac5249c6053b1fddadbe0164'
'5d0234ef479c71b654432f70c004ea203d5d739a91eb2501c1b16c15d6ecf0eb'
'b92313d8fdb6552cbd30bdd287dac4cd5ebb275b3adc16f9a7ca69aac1de7269'
'59a5f0ebd8b7edbac6383d0c5493524b1e6083fe18feff269122ae90fa00984e'
'dd45a31922dd3f991510231db2b6bba177b6bba87391359cb3c0f952efe35e8d'
'623071a08e6f11605fcf2715b912f247c136c32cf4606ff4cd6fbf5dcea8cb13'
'4090a682251701822354b9234e56731696e29c5a18d9f784ace4acec48a289e0'
'f5a46311e324a21ba84378f7afcf84a6b63bf30863f87819082abaf69e07ffea'
'37c03f07e3dfd4797897bc763ab16584329dda38eb669ff0134e5c5bf8c1fee9'
'22907025b7eff0e8df69320b5e8c677ee36f492bfc28ecb216cba5a7a3d23fab'
'd2cacebfa98032fbe0b4cf8d5f57715701d2b27a6e3b419480a239ee7e88c248'
'e9990ef0b19f76c34538afca009e3133d382d95ba04d73c7fa3c376bf24f775c'
'93059974c72ac6975b75bf014a5d1e9e4dee0af91c714e54efde9549ae7abe1d'
'5a1bd1b7a6398f941a2c5a2f106f8e58ba94ff7f0dba8f96fb9e74551e821177'
'84af604adc392c5e8e4b721219694f0a7c3d7f1c507ec6ffe4cb3349c6bd2d51'
'2e6b997431443c53449af401bc5d4a3645c55ba3268809cf5c28cdfbe98e379c'
'f81d536f84b589fa2bdf516c7f7a07083da5a0729467203a918fb8f715b366a7'
'2c1ab430785c1d3ac2622db66aa531a165d592d997e7f445c8512786217955c8'
'7b6d71ac78967c7bcf45c3f9b458874373dcf5ac7b8df451df9dbe7d42e07a6d'
'308db49020bae14b42de494e72216c0b9b222f59d1e18d1e4c04dda45e060e54'
'5b9194b11f214fc7033265ef0f1ed085485318b6fd3028074c8c58115a59a868'
'3568421c2ac4434ccc340add69520bce021b52f90ff2ef3bf065ff2e249e5903')
pkgver() {
cd gtk
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd gtk
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
}
build() {
local meson_options=(
-D broadway_backend=true
-D cloudproviders=true
-D colord=yes
-D gtk_doc=true
-D introspection=true
-D man=true
-D tracker=false
-D tracker3=true
)
CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
arch-meson gtk build "${meson_options[@]}"
meson compile -C build
}
package() {
meson install -C build --destdir "$pkgdir"
install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-3.0/settings.ini" <<END
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = Cantarell 11
END
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-3.0.hook
cd "$pkgdir"
# Built by GTK 4, shared with GTK 3
rm usr/bin/gtk-update-icon-cache
rm usr/share/man/man1/gtk-update-icon-cache.1
# provided by gtk3-docs
rm -r usr/share/gtk-doc
# provided by gtk3-demos
rm -r usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
rm -r usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
rm -r usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
rm -r usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
rm -r usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
}
# vim:set ts=2 sw=2 et: