From fa53ab499e2202e6032c6f4fbd0878ee36d82597 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 10 Aug 2023 16:57:12 +0200 Subject: [PATCH] testing/polarplayer-studio: install missing assets --- testing/polarplayer-studio/APKBUILD | 25 +++++++++++++------ testing/polarplayer-studio/fix-musl.patch | 13 ++++++++++ .../polarplayer-studio/fix_icon_path.patch | 11 ++++++++ 3 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 testing/polarplayer-studio/fix-musl.patch create mode 100644 testing/polarplayer-studio/fix_icon_path.patch diff --git a/testing/polarplayer-studio/APKBUILD b/testing/polarplayer-studio/APKBUILD index a1824f3..aa266d4 100644 --- a/testing/polarplayer-studio/APKBUILD +++ b/testing/polarplayer-studio/APKBUILD @@ -1,26 +1,29 @@ # Maintainer: Jakob Meier pkgname=polarplayer-studio pkgver=0.3.0 -pkgrel=0 +pkgrel=1 pkgdesc="PolarPlayer Studio is a MIDI synth for the ROLI Seaboard or other MIDI instruments that send pressure data." url="https://codeberg.org/comcloudway/polarplayer-studio" arch="all" license="AGPL-3.0" -depends="" makedepends="cargo alsa-lib alsa-lib-dev" -checkdepends="" -install="" -#subpackages="$pkgname-dev $pkgname-doc" builddir="$srcdir/$pkgname" -source="$pkgname-$pkgver.tar.gz::https://codeberg.org/comcloudway/polarplayer-studio/archive/$pkgver.tar.gz" +source=" + $pkgname-$pkgver.tar.gz::https://codeberg.org/comcloudway/polarplayer-studio/archive/$pkgver.tar.gz + fix_icon_path.patch + fix-musl.patch +" +options="net" + prepare() { default_prepare - cargo fetch --locked + cargo fetch --target="$CTARGET" + cargo update -p libc } build() { - cargo build --frozen --release + cargo auditable build --release } check() { @@ -30,8 +33,14 @@ check() { package() { cargo install --frozen --offline --path . --root="$pkgdir/usr" rm "$pkgdir"/usr/.crates* + + # install assets + install -d $pkgdir/usr/share/polarplayer-studio + install -Dm644 $builddir/assets/icon.png $pkgdir/usr/share/polarplayer-studio } sha512sums=" 1835206553235809c58f6cebc00faeb7b2380b18faaece0e41150cbc87cc6f5ccd3de7d74522f252a24b2397641edcbc189df5829aeb58cb59a90b57c5a88570 polarplayer-studio-0.3.0.tar.gz +4ba1df7fdc845fbdac7cc0d8d83b75a64ae932c9a4b671e300b38f1722ea834ba8ebc0868ff0beff94551be4344d7f12bfbcaeb9dbd8dec6b35c11e405c19166 fix_icon_path.patch +18185025af47f9be5a4e82035c8d11aa97f0950c8fe4b83cf36fe2c60cc25f40a37cf1e9b9153d8f82ee50d7f223ca2f00f98850c89aa9807e15f6bfea66546b fix-musl.patch " diff --git a/testing/polarplayer-studio/fix-musl.patch b/testing/polarplayer-studio/fix-musl.patch new file mode 100644 index 0000000..ae00797 --- /dev/null +++ b/testing/polarplayer-studio/fix-musl.patch @@ -0,0 +1,13 @@ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -31,6 +31,10 @@ + serde = { version = "1.0.132", features = ["derive"] } + serde_json = "1.0" + ++[patch.crates-io] ++getrandom = { git = "https://github.com/comcloudway/getrandom" } ++libc = { git = "https://github.com/rust-lang/libc" } ++ + [target.'cfg(target_os = "android")'.dependencies] + #ndk = { git = "https://github.com/nikita-skobov/android-ndk-rs", branch = "miniglue" } + #ndk-glue = { git = "https://github.com/nikita-skobov/android-ndk-rs", branch = "miniglue" } diff --git a/testing/polarplayer-studio/fix_icon_path.patch b/testing/polarplayer-studio/fix_icon_path.patch new file mode 100644 index 0000000..6266875 --- /dev/null +++ b/testing/polarplayer-studio/fix_icon_path.patch @@ -0,0 +1,11 @@ +--- a/src/main.rs ++++ b/src/main.rs +@@ -88,7 +88,7 @@ + #[cfg(target_os = "android")] + "icon.png", + #[cfg(not(target_os = "android"))] +- "assets/icon.png", ++ "/usr/share/polarplayer-studio/icon.png", + ).unwrap(); + let egui_tid = egui::TextureId::User(texture.gl_internal_id() as u64); + -- 2.38.5