diff --git a/bottles-bin/PKGBUILD b/bottles-bin/PKGBUILD index da7f3ef..92ebe14 100644 --- a/bottles-bin/PKGBUILD +++ b/bottles-bin/PKGBUILD @@ -9,14 +9,14 @@ pkgdesc="Easily manage wine and proton prefixes (prebuilt)" arch=('any') url="https://usebottles.com" license=('GPL-3.0-only') -depends=('fvs2' 'gtk4' 'gtksourceview5' 'hicolor-icon-theme' 'icoextract' - 'libadwaita' 'libportal-gtk4' 'patool' 'python' 'python-cairo' +depends=('gtk4' 'gtksourceview5' 'hicolor-icon-theme' 'icoextract' + 'libadwaita' 'libportal-gtk4' 'python' 'python-cairo' 'python-certifi' 'python-chardet' 'python-charset-normalizer' 'python-gobject' 'python-idna' 'python-markdown' 'python-orjson' - 'python-pathvalidate' 'python-pefile' 'python-pycurl' - 'python-requests' 'python-urllib3' 'python-yaml' 'python-yara' - 'vkbasalt-cli') -optdepends=('vulkan-tools: vkcube test / Vulkan info' + 'python-pefile' 'python-pycurl' + 'python-requests' 'python-urllib3' 'python-yaml' 'python-yara') +optdepends=('vkbasalt: post-processing layer that applies the configured effects' + 'vulkan-tools: vkcube test / Vulkan info' 'xorg-xdpyinfo: display info detection' 'imagemagick: icon/image conversion' 'vmtouch: preload bottle files into memory' diff --git a/bottles-bin/pkg.sh b/bottles-bin/pkg.sh index 761c8f8..b1e2fa3 100644 --- a/bottles-bin/pkg.sh +++ b/bottles-bin/pkg.sh @@ -9,12 +9,18 @@ UPSTREAM_REPO="bottlesdevs/Bottles" +# fvs-lab/fvs2 (+ its core library) is AUR-only, so the binary is built here +# and bundled under /usr/lib/bottles. Versions pinned to the combination the +# AUR fvs2 package ships; bump on new fvs2 releases. +FVS2_VERSION=0.8.1 +FVS2_CORE_VERSION=0.1.1 + # Installed in CI (pacman) before build_artifact runs. blueprint-compiler # resolves Gtk/Adw/GtkSource imports via their typelibs, hence the GUI libs. BUILD_DEPS=(meson ninja blueprint-compiler gobject-introspection desktop-file-utils appstream-glib gettext glib2-devel python python-gobject gtk4 libadwaita gtksourceview5 - libportal-gtk4) + libportal-gtk4 go python-pip) latest_version() { gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//' @@ -33,9 +39,35 @@ build_artifact() { patch -d "$srctree" -p1 < "$pkgdir/remove-flatpak-checks.patch" + # the bundled fvs2 lives outside $PATH; point Bottles at it + grep -q 'return "fvs2"' "$srctree/bottles/fvs/repo.py" \ + || { echo "fvs2 path hook not found in bottles/fvs/repo.py" >&2; return 1; } + sed -i 's|return "fvs2"|return "/usr/lib/bottles/fvs2"|' "$srctree/bottles/fvs/repo.py" + meson setup "$workdir/build" "$srctree" --prefix=/usr --buildtype=release meson install -C "$workdir/build" --destdir "$destdir" + # Build the fvs2 CLI (Go) and bundle it. Its "core" library is a sibling + # repository that go.mod expects next to the source tree. + mkdir -p "$workdir/fvs" "$destdir/usr/lib/bottles" + curl -sfL "https://github.com/fvs-lab/fvs2/archive/refs/tags/v$FVS2_VERSION.tar.gz" | tar -xz -C "$workdir/fvs" + curl -sfL "https://github.com/fvs-lab/core/archive/refs/tags/v$FVS2_CORE_VERSION.tar.gz" | tar -xz -C "$workdir/fvs" + ln -s "core-$FVS2_CORE_VERSION" "$workdir/fvs/core" + (cd "$workdir/fvs/fvs2-$FVS2_VERSION" && \ + GOPATH="$workdir/gopath" \ + GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" \ + go build -o "$destdir/usr/lib/bottles/fvs2" ./cmd/fvs2) + + # patool, pathvalidate and vkbasalt-cli are AUR-only pure-python libs; + # bundle them into the app's module dir, which the launcher puts on + # sys.path. patool/pathvalidate pinned via upstream's requirements.txt. + grep -E '^(patool|pathvalidate)==' "$srctree/requirements.txt" > "$workdir/bundle-reqs.txt" + [[ "$(wc -l < "$workdir/bundle-reqs.txt")" -eq 2 ]] || { echo "expected patool+pathvalidate pins in requirements.txt" >&2; return 1; } + echo 'vkbasalt-cli' >> "$workdir/bundle-reqs.txt" + python -m pip install --isolated --no-deps --target "$destdir/usr/share/bottles" \ + -r "$workdir/bundle-reqs.txt" + rm -rf "$destdir/usr/share/bottles/bin" + # These caches are generated by pacman hooks; shipping them would cause # file conflicts on install. rm -f "$destdir/usr/share/glib-2.0/schemas/gschemas.compiled" \ diff --git a/gearlever-bin/.SRCINFO b/gearlever-bin/.SRCINFO index 3e5e212..bb5cce7 100644 --- a/gearlever-bin/.SRCINFO +++ b/gearlever-bin/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = gearlever-bin pkgdesc = Manage AppImages with ease (prebuilt) pkgver = 4.6.2 - pkgrel = 1 + pkgrel = 2 url = https://gearlever.mijorus.it arch = any license = GPL-3.0-or-later @@ -15,8 +15,6 @@ pkgbase = gearlever-bin depends = python-dbus depends = python-requests depends = python-pyxdg - depends = python-ftputil - depends = python-desktop-entry-lib depends = 7zip depends = binutils depends = squashfs-tools @@ -26,6 +24,6 @@ pkgbase = gearlever-bin provides = gearlever conflicts = gearlever source = https://github.com/Felitendo/PKGBUILDS/releases/download/gearlever-bin-4.6.2/gearlever-bin-4.6.2.tar.zst - sha256sums = 319841a5dffd942b6f3b86822ac4d9d52a5b4ee559ea03ee5c2a6318a5161546 + sha256sums = 225dd08d1fbdf33bb5979660737cee180f60b8cfa6477f1553025a6c2f5236a5 pkgname = gearlever-bin diff --git a/gearlever-bin/PKGBUILD b/gearlever-bin/PKGBUILD index 10766aa..d6518a6 100644 --- a/gearlever-bin/PKGBUILD +++ b/gearlever-bin/PKGBUILD @@ -4,21 +4,20 @@ pkgname=gearlever-bin pkgver=4.6.2 -pkgrel=1 +pkgrel=2 pkgdesc="Manage AppImages with ease (prebuilt)" arch=('any') url="https://gearlever.mijorus.it" license=('GPL-3.0-or-later') depends=('gtk4' 'libadwaita' 'glib2' 'dconf' 'hicolor-icon-theme' 'python' 'python-gobject' 'python-dbus' 'python-requests' 'python-pyxdg' - 'python-ftputil' 'python-desktop-entry-lib' '7zip' 'binutils' 'squashfs-tools' 'fuse2') optdepends=('dwarfs: extract AppImages that use a DwarFS filesystem' 'libxml2-legacy: required by the LibreOffice AppImage') provides=('gearlever') conflicts=('gearlever') source=("https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst") -sha256sums=('319841a5dffd942b6f3b86822ac4d9d52a5b4ee559ea03ee5c2a6318a5161546') +sha256sums=('225dd08d1fbdf33bb5979660737cee180f60b8cfa6477f1553025a6c2f5236a5') package() { cp -a "$srcdir/usr" "$pkgdir/" diff --git a/gearlever-bin/pkg.sh b/gearlever-bin/pkg.sh index 8effc8b..ca63a9b 100644 --- a/gearlever-bin/pkg.sh +++ b/gearlever-bin/pkg.sh @@ -8,7 +8,7 @@ UPSTREAM_REPO="mijorus/gearlever" # Installed in CI (pacman) before build_artifact runs. -BUILD_DEPS=(meson ninja glib2 glib2-devel python gettext) +BUILD_DEPS=(meson ninja glib2 glib2-devel python gettext python-pip) latest_version() { # gh instead of curl: unauthenticated GitHub API calls are rate-limited on @@ -43,6 +43,15 @@ build_artifact() { # files themselves into the install tree. find "$destdir" -name meson.build -delete + # ftputil and desktop-entry-lib are AUR-only; bundle them (pure python) + # into the app's module dir, which the launcher puts on sys.path. Versions + # come from upstream's requirements.txt pins. + grep -E '^(ftputil|desktop-entry-lib)' "$srctree/requirements.txt" > "$workdir/bundle-reqs.txt" + [[ "$(wc -l < "$workdir/bundle-reqs.txt")" -eq 2 ]] || { echo "expected 2 pinned bundle deps in requirements.txt" >&2; return 1; } + python -m pip install --isolated --no-deps --target "$destdir/usr/share/gearlever" \ + -r "$workdir/bundle-reqs.txt" + rm -rf "$destdir/usr/share/gearlever/bin" + # These caches are generated by pacman hooks; shipping them would cause # file conflicts on install. rm -f "$destdir/usr/share/glib-2.0/schemas/gschemas.compiled" \