This commit is contained in:
Ella Stanforth 2022-04-30 21:37:36 +00:00
parent 16a5b53b85
commit 1b6733360f
6 changed files with 259 additions and 0 deletions

44
snd/libpulse/build.sh Normal file
View file

@ -0,0 +1,44 @@
pkgname=libpulse
pkgver=15.99.1
fetch() {
curl -L "https://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.bz2
tar -xf $pkgname-$pkgver.tar.bz2
mv pulseaudio-$pkgver $pkgname-$pkgver
mkdir $pkgname-$pkgver/build
cd $pkgname-$pkgver
}
build() {
cd $pkgname-$pkgver
cd build
meson .. \
--buildtype=release \
--prefix=/usr \
--libexecdir=lib \
-Ddaemon=false \
-Dtests=false \
-Ddoxygen=false \
-Dclient=true \
-Dgtk=disabled \
-Dman=false
samu
}
package() {
cd $pkgname-$pkgver
cd build
DESTDIR=$pkgdir samu install
rm -rf $pkgdir/usr/share/locale
rm -rf $pkgdir/usr/share/bash*
}
backup() {
return
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}

34
snd/libsndfile/build.sh Normal file
View file

@ -0,0 +1,34 @@
pkgname=libsndfile
pkgver=1.0.31
fetch() {
curl -L "https://github.com/libsndfile/libsndfile/releases/download/$pkgver/libsndfile-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2
tar -xf $pkgname-$pkgver.tar.bz2
mkdir $pkgname-$pkgver/build
}
build() {
cd $pkgname-$pkgver
cd build
cmake -G Ninja ../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON
samu
}
package() {
cd $pkgname-$pkgver
cd build
DESTDIR=$pkgdir samu install
}
backup() {
return
}
license() {
cd $pkgname-$pkgver
cat COPYING
}

56
snd/ncspot/build.sh Normal file
View file

@ -0,0 +1,56 @@
pkgname=ncspot
pkgver=0.9.6
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
}
fetch() {
curl -L "https://github.com/hrkfdn/ncspot/archive/refs/tags/v$pkgver.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/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
# cp ../cursive_ptr.patch .
cd $pkgname-$pkgver
mkdir -p .cargo
cargo vendor > .cargo/config
# # _clear_vendor_checksums openssl-sys
# # _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-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.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() {
cd $pkgname-$pkgver
cargo build --release --no-default-features --features cursive/termion-backend,pulseaudio_backend
}
package() {
cd $pkgname-$pkgver
install -Dm 755 target/release/$pkgname $pkgdir/usr/bin/
}
backup() {
return
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}

View 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

77
snd/pipewire/build.sh Normal file
View file

@ -0,0 +1,77 @@
pkgname=pipewire
pkgver=0.3.48
mver=0.4.1
fetch() {
curl "https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2
curl "https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$mver/media-session-$mver.tar.bz2" -O
tar -xf $pkgname-$pkgver.tar.bz2
mkdir $pkgname-$pkgver/build
tar -xf media-session-$mver.tar.bz2 -C $pkgname-$pkgver/subprojects/
mv $pkgname-$pkgver/subprojects/media-session-$mver $pkgname-$pkgver/subprojects/media-session
cd $pkgname-$pkgver
patch -p1 < ../../libudev-zero.patch
}
build() {
cd $pkgname-$pkgver
cd build
meson .. \
--buildtype=release \
--prefix=/usr \
--libexecdir=lib \
-Ddocs=disabled \
-Dexamples=disabled \
-Dman=disabled \
-Dinstalled_tests=disabled \
-Dgstreamer=disabled \
-Dsystemd=disabled \
-Dpipewire-jack=disabled \
-Dpipewire-alsa=enabled \
-Dpipewire-v4l2=disabled \
-Dspa-plugins=enabled \
-Dalsa=enabled \
-Daudiomixer=enabled \
-Dbluez5=disabled \
-Dcontrol=enabled \
-Daudiotestsrc=enabled \
-Dffmpeg=disabled \
-Djack=disabled \
-Dsupport=enabled \
-Devl=disabled \
-Dv4l2=disabled \
-Ddbus=enabled \
-Dlibcamera=disabled \
-Dvideoconvert=disabled \
-Dvideotestsrc=disabled \
-Dvolume=enabled \
-Dvulkan=disabled \
-Dpw-cat=enabled \
-Dudev=enabled \
-Dsdl2=disabled \
-Dsndfile=enabled \
-Dlibpulse=enabled \
-Droc=disabled \
-Davahi=disabled \
-Dlibusb=disabled \
-Draop=disabled \
-Dlv2=disabled \
-Dsession-managers="['media-session']"
samu
}
package() {
cd $pkgname-$pkgver
cd build
DESTDIR=$pkgdir samu install
}
backup() {
return
}
license() {
cd $pkgname-$pkgver
cat COPYING
}

View file

@ -0,0 +1,37 @@
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
index 61ad1af..52510b5 100644
--- a/spa/plugins/alsa/alsa-udev.c
+++ b/spa/plugins/alsa/alsa-udev.c
@@ -148,9 +148,6 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev)
if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem"))
return SPA_ID_INVALID;
- if (udev_device_get_property_value(dev, "SOUND_INITIALIZED") == NULL)
- return SPA_ID_INVALID;
-
if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL)
return SPA_ID_INVALID;
@@ -627,7 +624,7 @@ static int enum_devices(struct impl *this)
for (devices = udev_enumerate_get_list_entry(enumerate); devices;
devices = udev_list_entry_get_next(devices)) {
- struct udev_device *dev;
+ struct udev_device *dev, *pdev;
dev = udev_device_new_from_syspath(this->udev, udev_list_entry_get_name(devices));
if (dev == NULL)
@@ -635,6 +632,13 @@ static int enum_devices(struct impl *this)
process_device(this, ACTION_ADD, dev);
+ pdev = udev_device_get_parent(dev);
+ if (pdev) {
+ process_device(this, ACTION_ADD, pdev);
+ }
+
+ /* no need to call udev_device_unref(pdev) here.
+ udev_device_unref() will free parent device implicitly */
udev_device_unref(dev);
}
udev_enumerate_unref(enumerate);