summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfnrir2023-05-25 21:38:53 +0200
committerfnrir2023-05-25 21:38:53 +0200
commit33d519f4df3fd5c096d24fda15928989e8f80fd8 (patch)
tree28a046dc016ce06172f6bda79ed569664bd8a969
parent281ab50f2db9ff811159211c8c4022bd358c500b (diff)
downloadaur-33d519f4df3fd5c096d24fda15928989e8f80fd8.tar.gz
Update PKGBUILD
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD28
-rw-r--r--fix-sandbox.patch69
3 files changed, 23 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e59ee382f007..7894dd78c3c0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,13 @@
pkgbase = an-anime-game-launcher-patched-git
pkgdesc = A Launcher for a specific anime game with auto-patching, discord rpc and time tracking (with a couple of fixes)
- pkgver = 3.6.0.r2.g1795386
- pkgrel = 2
+ pkgver = 3.7.0.r0.g7bae189
+ pkgrel = 1
url = https://github.com/an-anime-team/an-anime-game-launcher
arch = x86_64
license = GPL3
makedepends = cargo
+ makedepends = python
+ makedepends = python-toml
depends = cabextract
depends = curl
depends = git
@@ -25,13 +27,11 @@ pkgbase = an-anime-game-launcher-patched-git
source = git+https://github.com/an-anime-team/anime-launcher-sdk
source = an-anime-game-launcher.desktop
source = use-cloned-sdk.patch
- source = fix-sandbox.patch
source = discord-no-panic.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 3bb15b29fd47e60ead712a67046daf42bd0ba5547d379ead6ea9bba37ea7b137
sha256sums = 41bf614e86d2b439dde5dd60ea2e1384f420656d24cc5f075e2b4e9d0fb2b31d
- sha256sums = 7a60bb9654dd6cf9c5612a9297c540b3334a16ef61048c54132b34dd5202d75b
sha256sums = 207069d6510fbfa09a157f942da48c2985cb05780aa44c00f1ba9909201dacb1
pkgname = an-anime-game-launcher-patched-git
diff --git a/PKGBUILD b/PKGBUILD
index ac97ff09c68a..64068e856cda 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Contributer: DrakeTDL <everyone@disroot.org>
_pkgname="an-anime-game-launcher"
pkgname="$_pkgname-patched-git"
-pkgver=3.6.0.r2.g1795386
-pkgrel=2
+pkgver=3.7.0.r0.g7bae189
+pkgrel=1
pkgdesc="A Launcher for a specific anime game with auto-patching, discord rpc and time tracking (with a couple of fixes)"
arch=("x86_64")
url="https://github.com/an-anime-team/an-anime-game-launcher"
@@ -20,7 +20,7 @@ depends=(
unzip
xdelta3
)
-makedepends=(cargo)
+makedepends=(cargo python python-toml)
optdepends=(
"mangohud: FPS Hud/GUI"
"gamemode: Game Optimizations"
@@ -32,7 +32,6 @@ source=(
"git+https://github.com/an-anime-team/anime-launcher-sdk"
"${_pkgname}.desktop"
"use-cloned-sdk.patch"
- "fix-sandbox.patch"
"discord-no-panic.patch"
)
noextract=()
@@ -41,7 +40,6 @@ sha256sums=(
SKIP
"3bb15b29fd47e60ead712a67046daf42bd0ba5547d379ead6ea9bba37ea7b137"
"41bf614e86d2b439dde5dd60ea2e1384f420656d24cc5f075e2b4e9d0fb2b31d"
- "7a60bb9654dd6cf9c5612a9297c540b3334a16ef61048c54132b34dd5202d75b"
"207069d6510fbfa09a157f942da48c2985cb05780aa44c00f1ba9909201dacb1"
)
@@ -54,13 +52,25 @@ prepare() {
cd "${_pkgname}"
git submodule update --init --recursive --single-branch
- sdkver=$(grep -Pazo '(?s)\[dependencies\.anime-launcher-sdk\]\ngit = "\S+"\ntag = "\S+"' Cargo.toml | tail -n 1 | cut -d '"' -f 2)
+ #sdkver=$(grep -Pazo '(?s)\[dependencies\.anime-launcher-sdk\]\ngit = "\S+"\ntag = "\S+"' Cargo.toml | tail -n 1 | cut -d '"' -f 2)
# Use cloned anime-launcher-sdk
- patch -up1 -i "../use-cloned-sdk.patch"
+ #patch -up1 -i "../use-cloned-sdk.patch"
+ code='import toml
+with open("Cargo.toml", "rt") as file:
+ cargo = toml.load(file)
+cargo["dependencies"]["anime-launcher-sdk"].pop("git")
+ver = cargo["dependencies"]["anime-launcher-sdk"].pop("tag")
+cargo["dependencies"]["anime-launcher-sdk"]["path"] = "../anime-launcher-sdk"
+with open("Cargo.toml", "wt") as file:
+ toml.dump(cargo, file)
+print(f"sdkver={ver}")
+'
+ export $(echo "$code" | python)
+ if [ -z "$sdkver" ]; then
+ false
+ fi
cd "../anime-launcher-sdk"
git switch --detach $sdkver
- # Fix launching game w/ sandboxing and w/o /var/home
- patch -up1 -i "../fix-sandbox.patch"
# Don't panic when not connected to Discord rpc
patch -up1 -i "../discord-no-panic.patch"
}
diff --git a/fix-sandbox.patch b/fix-sandbox.patch
deleted file mode 100644
index 6e149dc4cf93..000000000000
--- a/fix-sandbox.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff --git a/src/config/schema_blanks/sandbox/mod.rs b/src/config/schema_blanks/sandbox/mod.rs
-index a6b3590..36305d9 100644
---- a/src/config/schema_blanks/sandbox/mod.rs
-+++ b/src/config/schema_blanks/sandbox/mod.rs
-@@ -1,5 +1,6 @@
- use serde::{Serialize, Deserialize};
- use serde_json::Value as JsonValue;
-+use std::fs::metadata;
-
- mod mounts;
-
-@@ -141,15 +142,53 @@ impl Sandbox {
- }
-
- if self.isolate_home {
-- command.push_str(" --tmpfs /home");
-- command.push_str(" --tmpfs /var/home");
-+ match metadata("/home") {
-+ Ok(meta) => {
-+ if meta.is_dir() {
-+ command.push_str(" --tmpfs /home");
-+ } else {
-+ tracing::info!("/var/home is not a directory.")
-+ }
-+ },
-+ Err(_) => tracing::info!("/home does not exist.")
-+ }
-+ match metadata("/var/home") {
-+ Ok(meta) => {
-+ if meta.is_dir() {
-+ command.push_str(" --tmpfs /var/home");
-+ } else {
-+ tracing::info!("/var/home is not a directory.")
-+ }
-+ },
-+ Err(_) => tracing::info!("/var/home does not exist.")
-+ }
-
- if let Ok(user) = std::env::var("USER") {
-- command += &format!(" --tmpfs '/var/home/{}'", user.trim());
-+ let dir = format!("/var/home/{}", user.trim());
-+ match metadata(&dir) {
-+ Ok(meta) => {
-+ if meta.is_dir() {
-+ command += &format!(" --tmpfs '{}'", dir);
-+ } else {
-+ tracing::info!("{} is not a directory.", dir)
-+ }
-+ },
-+ Err(_) => tracing::info!("{} does not exist.", dir)
-+ }
- }
-
- if let Ok(home) = std::env::var("HOME") {
-- command += &format!(" --tmpfs '{}'", home.trim());
-+ let dir = home.trim();
-+ match metadata(dir) {
-+ Ok(meta) => {
-+ if meta.is_dir() {
-+ command += &format!(" --tmpfs '{}'", dir);
-+ } else {
-+ tracing::info!("{} is not a directory.", dir)
-+ }
-+ },
-+ Err(_) => tracing::info!("{} does not exist.", dir)
-+ }
- }
- }
-