~comcloudway/ccw-aports

fa53ab499e2202e6032c6f4fbd0878ee36d82597 — Jakob Meier 1 year, 1 month ago 453105d
testing/polarplayer-studio: install missing assets
M testing/polarplayer-studio/APKBUILD => testing/polarplayer-studio/APKBUILD +17 -8
@@ 1,26 1,29 @@
# Maintainer: Jakob Meier <comcloudway@ccw.icu>
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
"

A testing/polarplayer-studio/fix-musl.patch => testing/polarplayer-studio/fix-musl.patch +13 -0
@@ 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" }

A testing/polarplayer-studio/fix_icon_path.patch => testing/polarplayer-studio/fix_icon_path.patch +11 -0
@@ 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);