From 3904ec2ab55bce00cd60ca97501ca76c34d60627 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sat, 20 Jun 2020 23:01:35 +0300 Subject: [PATCH] cava: update patches --- packages/cava/Makefile.am.patch | 12 ++++++-- packages/cava/no-posix-shmem.patch | 44 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 packages/cava/no-posix-shmem.patch diff --git a/packages/cava/Makefile.am.patch b/packages/cava/Makefile.am.patch index 4c2173ac9..595aee585 100644 --- a/packages/cava/Makefile.am.patch +++ b/packages/cava/Makefile.am.patch @@ -1,7 +1,7 @@ diff -uNr cava-0.7.0/Makefile.am cava-0.7.0.mod/Makefile.am --- cava-0.7.0/Makefile.am 2020-05-26 23:29:47.000000000 +0300 -+++ cava-0.7.0.mod/Makefile.am 2020-06-20 21:53:06.667611313 +0300 -@@ -11,7 +11,7 @@ ++++ cava-0.7.0.mod/Makefile.am 2020-06-20 22:56:16.822969805 +0300 +@@ -11,15 +11,13 @@ bin_PROGRAMS = cava cava_SOURCES = cava.c config.c input/common.c input/fifo.c input/shmem.c \ output/terminal_noncurses.c output/raw.c @@ -10,3 +10,11 @@ diff -uNr cava-0.7.0/Makefile.am cava-0.7.0.mod/Makefile.am cava_CPPFLAGS = -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" \ -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L cava_CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized + + if OSX + cava_CFLAGS += -DNORT +-else +- cava_LDFLAGS += -lrt + endif + + if ALSA diff --git a/packages/cava/no-posix-shmem.patch b/packages/cava/no-posix-shmem.patch new file mode 100644 index 000000000..97593759e --- /dev/null +++ b/packages/cava/no-posix-shmem.patch @@ -0,0 +1,44 @@ +diff -uNr cava-0.7.0/cava.c cava-0.7.0.mod/cava.c +--- cava-0.7.0/cava.c 2020-05-26 23:29:47.000000000 +0300 ++++ cava-0.7.0.mod/cava.c 2020-06-20 22:57:21.423501150 +0300 +@@ -505,10 +505,12 @@ + audio.rate = 44100; + break; + #endif ++#ifndef __ANDROID__ + case INPUT_SHMEM: + thr_id = pthread_create(&p_thread, NULL, input_shmem, (void *)&audio); + // audio.rate = 44100; + break; ++#endif + #ifdef PORTAUDIO + case INPUT_PORTAUDIO: + thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio); +diff -uNr cava-0.7.0/input/shmem.c cava-0.7.0.mod/input/shmem.c +--- cava-0.7.0/input/shmem.c 2020-05-26 23:29:47.000000000 +0300 ++++ cava-0.7.0.mod/input/shmem.c 2020-06-20 22:58:08.319893092 +0300 +@@ -1,6 +1,7 @@ + #include "input/shmem.h" + #include "input/common.h" + ++#ifndef __ANDROID__ + #include + #include + #include +@@ -80,3 +81,4 @@ + } + return 0; + } ++#endif // __ANDROID__ +diff -uNr cava-0.7.0/input/shmem.h cava-0.7.0.mod/input/shmem.h +--- cava-0.7.0/input/shmem.h 2020-05-26 23:29:47.000000000 +0300 ++++ cava-0.7.0.mod/input/shmem.h 2020-06-20 22:57:46.439709609 +0300 +@@ -1,5 +1,7 @@ + // header file for shmem, part of cava. +- + #pragma once + ++#ifndef __ANDROID__ ++ + void *input_shmem(void *data); ++#endif