diff --git a/srcpkgs/cmixer/patches/linux.patch b/srcpkgs/cmixer/patches/linux.patch new file mode 100644 index 00000000000..653488322b4 --- /dev/null +++ b/srcpkgs/cmixer/patches/linux.patch @@ -0,0 +1,34 @@ +--- cmixer.pl.orig ++++ cmixer.pl +@@ -34,23 +34,6 @@ + + sub read_mixerctl { + my $self = shift; +- foreach (`mixerctl 2>&1`) { +- #mixerctl: /dev/mixer: Device not configured +- die "No mixer device found" if (/^mixerctl: \/dev\/mixer.: Device not configured$/); +- #outputs.master=255,255 volume +- if (/^(outputs|inputs|record)\.([^\.]*)=(\d+),(\d+)\s+/) { +- $self->{mixer}{$1}{$2}{volume}{left} = $3; +- $self->{mixer}{$1}{$2}{volume}{right} = $4; +- # outputs.mono=255 volume +- } elsif (/^(outputs|inputs|record)\.([^\.]*)=(\d+)\s+/) { +- $self->{mixer}{$1}{$2}{volume}{center} = $3; +- # outputs.master.mute=off [ off on ] +- } elsif (/^(outputs|inputs|record)\.(.*)\.mute=(on|off)\s+/) { +- $self->{mixer}{$1}{$2}{mute} = $3; +- } +- #todo: record.source=mic [ mic cd video aux line mixerout mixeroutmono phone ] +- #inputs.mix_source=mic,beep,hp { mic mic2 beep hp } +- } + foreach (`aucatctl 2>&1`) { + die "Failed to connect to sndiod" if (/couldn't open MIDI device$/); + #mplayer0=127 +@@ -59,7 +42,6 @@ + $self->{mixer}{sndio}{$1}{volume}{center} = 2 * $2; + } + } +- die "No outputs found" unless (exists $self->{mixer}{outputs}); + } + + sub update_view { diff --git a/srcpkgs/cmixer/template b/srcpkgs/cmixer/template new file mode 100644 index 00000000000..1fefb2b529b --- /dev/null +++ b/srcpkgs/cmixer/template @@ -0,0 +1,20 @@ +# Template file for 'cmixer' +pkgname=cmixer +version=0.2 +revision=1 +depends="aucatctl perl-Curses-UI" +short_desc="Curses sndio mixer" +maintainer="Duncaen " +license="ISC" +homepage="https://rhaalovely.net/" +distfiles="https://rhaalovely.net/stuff/cmixer-${version}.tar.gz" +checksum=1ee4489a73f15b0a4a1c5698ac4476295b53c054c08a98ae94087f0f14104007 + +post_extract() { + sed -n '3,15p' cmixer.pl >LICENSE +} + +do_install() { + vbin cmixer.pl cmixer + vlicense LICENSE +}