ncspot: use curses
This commit is contained in:
parent
999c4bd350
commit
d5f812c72a
2 changed files with 26 additions and 1 deletions
|
@ -8,23 +8,37 @@ _clear_vendor_checksums() {
|
||||||
fetch() {
|
fetch() {
|
||||||
curl -L "https://github.com/hrkfdn/ncspot/archive/refs/tags/v0.6.0.tar.gz" -o $pkgname-$pkgver.tar.gz
|
curl -L "https://github.com/hrkfdn/ncspot/archive/refs/tags/v0.6.0.tar.gz" -o $pkgname-$pkgver.tar.gz
|
||||||
curl -L "https://github.com/sfackler/rust-openssl/archive/refs/tags/openssl-v0.10.34.tar.gz" -o rust-openssl.tar.gz
|
curl -L "https://github.com/sfackler/rust-openssl/archive/refs/tags/openssl-v0.10.34.tar.gz" -o rust-openssl.tar.gz
|
||||||
|
curl -L "https://github.com/Ella-0/ncurses-rs/archive/refs/heads/master.tar.gz" -o ncurses.tar.gz
|
||||||
|
curl -L "https://github.com/Ella-0/pancurses/archive/refs/heads/master.tar.gz" -o pancurses.tar.gz
|
||||||
|
tar -xf ncurses.tar.gz
|
||||||
|
mv ncurses-rs-master ncurses
|
||||||
|
tar -xf pancurses.tar.gz
|
||||||
|
mv pancurses-master pancurses
|
||||||
tar -xf $pkgname-$pkgver.tar.gz
|
tar -xf $pkgname-$pkgver.tar.gz
|
||||||
tar -xf rust-openssl.tar.gz
|
tar -xf rust-openssl.tar.gz
|
||||||
|
cp ../cursive_ptr.patch .
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
cargo vendor > .cargo/config
|
cargo vendor > .cargo/config
|
||||||
_clear_vendor_checksums openssl-sys
|
_clear_vendor_checksums openssl-sys
|
||||||
_clear_vendor_checksums openssl
|
_clear_vendor_checksums openssl
|
||||||
|
_clear_vendor_checksums ncurses
|
||||||
|
_clear_vendor_checksums pancurses
|
||||||
|
_clear_vendor_checksums cursive
|
||||||
cp -r ../rust-openssl-openssl-v0.10.34/openssl/ vendor/
|
cp -r ../rust-openssl-openssl-v0.10.34/openssl/ vendor/
|
||||||
cp -r ../rust-openssl-openssl-v0.10.34/openssl-sys/ vendor/
|
cp -r ../rust-openssl-openssl-v0.10.34/openssl-sys/ vendor/
|
||||||
|
cp -r ../ncurses/ vendor/
|
||||||
|
cp -r ../pancurses/ vendor/
|
||||||
sed vendor/openssl/Cargo.toml -i -e 's/0.10.34/0.10.33/g'
|
sed vendor/openssl/Cargo.toml -i -e 's/0.10.34/0.10.33/g'
|
||||||
sed vendor/openssl/Cargo.toml -i -e 's/0.9.62/0.9.61/g'
|
sed vendor/openssl/Cargo.toml -i -e 's/0.9.62/0.9.61/g'
|
||||||
sed vendor/openssl-sys/Cargo.toml -i -e 's/0.9.62/0.9.61/g'
|
sed vendor/openssl-sys/Cargo.toml -i -e 's/0.9.62/0.9.61/g'
|
||||||
|
sed vendor/ncurses/Cargo.toml -i -e 's/5.100.0/5.101.0/g'
|
||||||
|
patch -p1 < ../cursive_ptr.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
cargo build --release --no-default-features --features termion_backend,alsa_backend
|
cargo build --release --no-default-features --features cursive/pancurses-backend,alsa_backend
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
|
11
pkgs/ncspot/cursive_ptr.patch
Normal file
11
pkgs/ncspot/cursive_ptr.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/vendor/cursive/src/backends/curses/pan.rs
|
||||||
|
+++ b/vendor/cursive/src/backends/curses/pan.rs
|
||||||
|
@@ -70,7 +70,7 @@
|
||||||
|
pancurses::mouseinterval(0);
|
||||||
|
pancurses::mousemask(
|
||||||
|
pancurses::ALL_MOUSE_EVENTS | pancurses::REPORT_MOUSE_POSITION,
|
||||||
|
- ::std::ptr::null_mut(),
|
||||||
|
+ None,
|
||||||
|
);
|
||||||
|
|
||||||
|
// This asks the terminal to provide us with mouse drag events
|
Loading…
Reference in a new issue