xava: update to 0.6.3.0 (renamed from cava-gui)

This commit is contained in:
Đoàn Trần Công Danh 2020-08-27 07:05:05 +07:00
parent d28a070ae4
commit 01d774d920
5 changed files with 62 additions and 44 deletions

1
srcpkgs/cava-gui Symbolic link
View File

@ -0,0 +1 @@
xava

View File

@ -1,23 +0,0 @@
Source: maxice8
Upstream: no
Reason: fixes compilation with musl libc, and avoid using an internal implementation
--- input/fifo.c
+++ input/fifo.c
@@ -1,6 +1,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/fcntl.h>
+#include <sys/types.h>
#include <time.h>
#include "fifo.h"
@@ -27,7 +28,7 @@ void* input_fifo(void* data)
int t = 0;
//int size = 1024;
int bytes = 0;
- __int16_t buf[BUFSIZE / 2];
+ int16_t buf[BUFSIZE / 2];
struct timespec req = { .tv_sec = 0, .tv_nsec = 10000000 };

View File

@ -1,21 +0,0 @@
# Template file for 'cava-gui'
pkgname=cava-gui
version=0.6.1.1
revision=1
wrksrc="xava-${version}"
build_style=cmake
hostmakedepends="automake libtool"
makedepends="SDL2-devel iniparser-devel ncurses-devel sndio-devel portaudio-devel"
short_desc="Console-based Audio Visualizer for ALSA (GUI branch)"
maintainer="nik123 <pavlica.nikola@gmail.com>"
license="MIT"
homepage="https://github.com/nikp123/xava"
distfiles="https://github.com/nikp123/xava/archive/${version}.tar.gz"
checksum=53704343b33025a0d4de552e96af67a5b5ab4f6efc8956296aee5a74bebb9bdf
conflicts=cava
post_install() {
vlicense LICENSE
vmkdir usr/share/examples
vcopy example_files usr/share/examples/cava
}

View File

@ -0,0 +1,36 @@
From 9748190a7c191ed21d551d816b91a7005c8ef51a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Thu, 27 Aug 2020 07:38:26 +0700
Subject: [PATCH] GetInstallDir: fix buffer overflow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
strlen(3) will return length of input, not including terminating NUL
character. And strcpy(3) will copy the included NUL character.
Thus, we'll get buffer overflow for 1 character.
Fix it.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
src/shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/shared.c src/shared.c
index 1738650..4c1ce31 100644
--- src/shared.c
+++ src/shared.c
@@ -107,7 +107,7 @@ char *xavaGetInstallDir() {
path[strlen(path)-executableNameSize] = '\0';
#else
// everything non-windows is simple as fuck, go look at the mess above
- const char *path = malloc(strlen(PREFIX"/share/"PACKAGE"/"));
+ const char *path = malloc(strlen(PREFIX"/share/"PACKAGE"/") + 1);
strcpy(path, PREFIX"/share/"PACKAGE"/");
#endif
return path;
--
2.28.0.461.g40977abb40

25
srcpkgs/xava/template Normal file
View File

@ -0,0 +1,25 @@
# Template file for 'xava'
pkgname=xava
version=0.6.3.0
revision=1
build_style=cmake
hostmakedepends="automake libtool pkg-config"
makedepends="SDL2-devel iniparser-devel ncurses-devel sndio-devel portaudio-devel"
short_desc="X11 Audio Visualizer for ALSA"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/nikp123/xava"
distfiles="https://github.com/nikp123/xava/archive/${version}.tar.gz"
checksum=745da4f6690f58e29d9f20ca790b3f354a1f53ef810d4ab6b1027bcac7e62fbf
post_install() {
vlicense LICENSE
vmkdir usr/share/examples
vcopy example_files/etc usr/share/examples/xava
}
cava-gui_package() {
depends="xava"
short_desc+=" - transition package"
build_style=meta
}