From 108e54eef1aed0c019504584710532040eaae277 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Wed, 22 Nov 2023 17:20:39 -0500 Subject: [PATCH] New package: kew-1.7.1 --- srcpkgs/kew/patches/update-makefile.patch | 39 +++++++++++++++++++++++ srcpkgs/kew/template | 15 +++++++++ 2 files changed, 54 insertions(+) create mode 100644 srcpkgs/kew/patches/update-makefile.patch create mode 100644 srcpkgs/kew/template diff --git a/srcpkgs/kew/patches/update-makefile.patch b/srcpkgs/kew/patches/update-makefile.patch new file mode 100644 index 0000000000000..b6d2caf781bfa --- /dev/null +++ b/srcpkgs/kew/patches/update-makefile.patch @@ -0,0 +1,39 @@ +diff --git a/Makefile b/Makefile +index 3701f01fb17..7559bd303f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,17 @@ + CC = gcc + PKG_CONFIG ?= pkg-config +-CFLAGS = -I/usr/include/vorbis -I/usr/include/opus -I/usr/include/stb -Iinclude/imgtotxt/ext -Iinclude/imgtotxt -I/usr/include/ffmpeg -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libavformat -Iinclude/miniaudio -O1 -g $(shell $(PKG_CONFIG) --cflags gio-2.0 chafa libavformat fftw3f) +-LIBS = -lpthread -lrt -pthread -lm -lfreeimage -lglib-2.0 -lopus -lopusfile -lvorbisfile $(shell $(PKG_CONFIG) --libs gio-2.0 chafa libavformat fftw3f) ++CFLAGS = -I/usr/include/stb -Iinclude/imgtotxt/ext -Iinclude/imgtotxt -I/usr/include/ffmpeg -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libavformat -Iinclude/miniaudio -O2 -g $(shell $(PKG_CONFIG) --cflags gio-2.0 chafa libavformat fftw3f opus opusfile vorbis) ++CFLAGS += -fstack-protector-strong -Wformat -Werror=format-security -fPIE -fstack-protector -fstack-protector-strong -D_FORTIFY_SOURCE=2 ++CFLAGS += -Wall -Wpointer-arith ++LIBS = -latomic -lpthread -lrt -pthread -lm -lfreeimage -lglib-2.0 $(shell $(PKG_CONFIG) --libs gio-2.0 chafa libavformat fftw3f opus opusfile vorbisfile) ++LDFLAGS = -pie -Wl,-z,relro + + OBJDIR = src/obj + PREFIX = /usr + SRCS = src/soundcommon.c src/player.c src/soundopus.c src/soundvorbis.c src/soundbuiltin.c src/soundpcm.c src/mpris.c src/playerops.c src/volume.c src/cutils.c src/soundgapless.c src/songloader.c src/file.c src/chafafunc.c src/cache.c src/metadata.c src/playlist.c src/stringfunc.c src/term.c src/settings.c src/albumart.c src/visuals.c src/kew.c + OBJS = $(SRCS:src/%.c=$(OBJDIR)/%.o) + +-MAN_PAGE = kew.1 ++MAN_PAGE = kew.1 + MAN_DIR ?= $(PREFIX)/share/man + + all: kew +@@ -17,7 +20,7 @@ $(OBJDIR)/%.o: src/%.c Makefile | $(OBJDIR) + $(CC) $(CFLAGS) -c -o $@ $< + + $(OBJDIR)/write_ascii.o: include/imgtotxt/write_ascii.c Makefile | $(OBJDIR) +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS) -c -o $@ $< $(LDFLAGS) + + $(OBJDIR): + mkdir -p $(OBJDIR) +@@ -40,3 +43,4 @@ uninstall: + .PHONY: clean + clean: + rm -rf $(OBJDIR) kew ++ diff --git a/srcpkgs/kew/template b/srcpkgs/kew/template new file mode 100644 index 0000000000000..d3b11a1776c33 --- /dev/null +++ b/srcpkgs/kew/template @@ -0,0 +1,15 @@ +# Template file for 'kew' +pkgname=kew +version=1.7.1 +revision=1 +build_style=gnu-makefile +make_use_env=yes +hostmakedepends="pkg-config" +makedepends="chafa-devel ffmpeg-devel fftw-devel freeimage-devel libglib-devel + libogg-devel libvorbis-devel opus-devel opusfile-devel" +short_desc="Command-line music player" +maintainer="cinerea0 " +license="GPL-2.0-only" +homepage="https://github.com/ravachol/kew" +distfiles="https://github.com/ravachol/kew/archive/refs/tags/v${version}.tar.gz" +checksum=b28bc3488406bb975da4a313120a54c001358622db41a16df08867892833342d