Files

56 lines
2.0 KiB
Bash

# Maintainer: Storm Dragon <storm_dragon@stormux.org>
pkgname=wine-access-git
pkgver=r63.g0763498
pkgrel=1
pkgdesc='Wine accessibility helper with MSAA, NVDA Controller, and Tolk compatibility for screen readers'
arch=('x86_64')
url='https://git.stormux.org/storm/wine-access'
license=('LGPL-2.1-or-later')
depends=('glib2' 'wine' 'libxcb')
makedepends=('cmake' 'git' 'pkgconf' 'mingw-w64-gcc')
optdepends=('orca>=51: Orca screen reader integration')
provides=('wine-access')
conflicts=('wine-access')
# Wine's import generation needs native object symbols, which LTO hides.
options=('!lto')
source=('wine-access::git+https://git.stormux.org/storm/wine-access.git')
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/wine-access"
printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cmake -S "$srcdir/wine-access" -B "$srcdir/build" \
-DCMAKE_TOOLCHAIN_FILE="$srcdir/wine-access/winelib-toolchain.cmake" \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBEXECDIR=libexec \
-DWINE_ACCESS_INSTALL_DIR:PATH=libexec/wine-access
cmake --build "$srcdir/build"
}
package() {
DESTDIR="$pkgdir" cmake --install "$srcdir/build"
# CMake installs these artifacts as files; Wine's launcher must be executable.
chmod 755 "$pkgdir/usr/libexec/wine-access/wine-access.exe"
install -Dm644 "$srcdir/wine-access/README.md" \
"$pkgdir/usr/share/doc/wine-access/README.md"
install -Dm644 "$srcdir/wine-access/orca/README.md" \
"$pkgdir/usr/share/doc/wine-access/orca/README.md"
# Orca discovers user extensions only. Users link this package-owned copy
# into their extension directory and approve it in their own session.
local extension_file
for extension_file in "$srcdir/wine-access/orca/wine_access/"*.py; do
install -Dm644 "$extension_file" \
"$pkgdir/usr/share/wine-access/orca/wine_access/${extension_file##*/}"
done
}