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

69 lines
1.6 KiB
Bash

# Maintainer: Danct12 <danct12@disroot.org>
pkgname=phoc
pkgver=0.40.1
pkgrel=1
pkgdesc="wlroots based Wayland compositor for mobile phones"
arch=('x86_64' 'armv7h' 'aarch64')
url="https://phosh.mobi"
license=('LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND (GPL-3.0-or-later or MIT)')
depends=(
'gobject-introspection'
'gnome-desktop'
'libglvnd'
'libgmobile'
'libinput'
'libliftoff'
'libxcb'
'mutter'
'seatd'
'xcb-util-errors'
'xcb-util-renderutil'
'xcb-util-wm'
'wayland-protocols'
)
makedepends=(
'gi-docgen'
'glib2-devel'
'glslang'
'meson'
'python-docutils'
'vulkan-headers'
)
checkdepends=('xorg-server-xvfb')
source=(https://sources.phosh.mobi/releases/$pkgname/$pkgname-$pkgver.tar.xz{,.asc})
sha256sums=('cbc65258a00dcb9f24a86ed8216a363a1d0d11b977f47987048ccf7874ca3eb9'
'SKIP')
validpgpkeys=('0DB3932762F78E592F6522AFBB5A2C77584122D3')
prepare() {
cd $pkgname-$pkgver/subprojects/wlroots
patch -p1 -i "../packagefiles/wlroots/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch"
}
build() {
local meson_options=(
--wrap-mode default
-D embed-wlroots=enabled
-D gtk_doc=true
-D man=true
--default-library=static
)
arch-meson $pkgname-$pkgver build "${meson_options[@]}"
meson compile -C build
}
check() {
WLR_RENDERER=pixman xvfb-run meson test -C build --print-errorlogs
}
package() {
meson install -C build --destdir "$pkgdir"
# Install scale-to-fit helper
install -Dm755 "$pkgname-$pkgver"/helpers/scale-to-fit "$pkgdir"/usr/bin/scale-to-fit
# Remove unnecessary files
rm -r "$pkgdir"/usr/lib
rm -r "$pkgdir"/usr/include
}