summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2023-04-28 15:23:16 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-07-19 17:30:56 +0300
commitf605120ce3c50f5d2af65a9343dd3cfde5257206 (patch)
treea7c4bd451a07362ccf611b6c53ae5a96d4085564 /media-libs
parentdev-libs/boron: new package, add 2.0.8 (diff)
downloadgentoo-f605120ce3c50f5d2af65a9343dd3cfde5257206.tar.gz
gentoo-f605120ce3c50f5d2af65a9343dd3cfde5257206.tar.bz2
gentoo-f605120ce3c50f5d2af65a9343dd3cfde5257206.zip
media-libs/faun: new package, add 0.1.2
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/faun/Manifest1
-rw-r--r--media-libs/faun/faun-0.1.2.ebuild33
-rw-r--r--media-libs/faun/files/0.1.2_makefile.patch79
-rw-r--r--media-libs/faun/metadata.xml15
4 files changed, 128 insertions, 0 deletions
diff --git a/media-libs/faun/Manifest b/media-libs/faun/Manifest
new file mode 100644
index 000000000000..ecbc4e4e6cab
--- /dev/null
+++ b/media-libs/faun/Manifest
@@ -0,0 +1 @@
+DIST faun-0.1.2.tar.gz 107751 BLAKE2B 5c8655aad59dfb8292f098af7f90d13e25c8df0d9cf7b3d2d5a0d7c94e68389c898e8d66abb67cb93ef70a4e4d81d63aca9e60afe48afcd4e96ef7371b6611e0 SHA512 b0ec4b7fccc4f17e1f37ed87c45b41f75faa42393143313264d77a117dbc76b37f9418886f425cf06d8baeebfe1269bcdabbe16aead634177021bc50ba1c5260
diff --git a/media-libs/faun/faun-0.1.2.ebuild b/media-libs/faun/faun-0.1.2.ebuild
new file mode 100644
index 000000000000..bf49a3d73f7a
--- /dev/null
+++ b/media-libs/faun/faun-0.1.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="A high-level C audio library"
+HOMEPAGE="https://wickedsmoke.github.io/faun/"
+SRC_URI="https://github.com/WickedSmoke/faun/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="flac"
+
+DEPEND="
+ media-libs/libpulse
+ media-libs/libvorbis
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0.1.2_makefile.patch"
+)
+
+src_configure() {
+ # custom configure
+ ./configure $(usex !flac --no_flac "") || die
+}
+
+src_install() {
+ emake DESTDIR="${D}/usr" install
+ dodoc README.md
+}
diff --git a/media-libs/faun/files/0.1.2_makefile.patch b/media-libs/faun/files/0.1.2_makefile.patch
new file mode 100644
index 000000000000..d971d5937852
--- /dev/null
+++ b/media-libs/faun/files/0.1.2_makefile.patch
@@ -0,0 +1,79 @@
+From 7d87d5e2fc52c1d429fe99b505bf2db643c82da2 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Fri, 28 Apr 2023 14:58:02 +0300
+Subject: [PATCH] Fix buildsystem
+
+* Respect CC, CFLAGS, LDFLAGS
+* Don't strip binaries on install
+--- a/Makefile
++++ b/Makefile
+@@ -6,10 +6,13 @@ ifeq ($(STATIC),1)
+ STATIC_LIB=true
+ endif
+
+-CFLAGS=-O3 -DNDEBUG
++CC ?= cc
++PKG_CONFIG ?= pkg-config
++
++CFLAGS ?= -O3 -DNDEBUG
+ #CFLAGS=-g -DDEBUG
+
+-OPT=-DUSE_SFX_GEN
++OPT=-DUSE_SFX_GEN `$(PKG_CONFIG) --cflags libpulse-simple libpulse vorbisfile`
+ ifeq ($(FLAC),1)
+ OPT+=-DUSE_FLAC
+ endif
+@@ -25,7 +28,7 @@ else
+ LIB_DIR=$(DESTDIR)/lib
+ endif
+
+-DEP_LIB = -lpulse-simple -lpulse -lvorbisfile -lpthread -lm
++DEP_LIB = `$(PKG_CONFIG) --libs libpulse-simple libpulse vorbisfile` -lpthread -lm
+
+ ifdef STATIC_LIB
+ FAUN_LIB=libfaun.a
+@@ -49,10 +52,10 @@ obj:
+ mkdir obj
+
+ obj/tmsg.o: support/tmsg.c obj
+- cc -c -pipe -Wall -W $< $(CFLAGS) -Isupport $(OPT) -fPIC -o $@
++ $(CC) -c -pipe -Wall -W $< $(CFLAGS) -Isupport $(OPT) -fPIC -o $@
+
+ obj/faun.o: faun.c support/wav_write.c support/wav_read.c support/flac.c support/sfx_gen.c support/well512.c support/os_thread.h support/tmsg.h support/flac.h support/sfx_gen.h support/well512.h obj
+- cc -c -pipe -Wall -W $< $(CFLAGS) -Isupport $(OPT) -fPIC -o $@
++ $(CC) -c -pipe -Wall -W $< $(CFLAGS) -Isupport $(OPT) -fPIC -o $@
+
+ $(FAUN_LIB): obj/tmsg.o obj/faun.o
+ ifdef STATIC_LIB
+@@ -60,16 +63,16 @@ ifdef STATIC_LIB
+ ranlib $@
+ #strip -d $@
+ else
+- cc -o $@ $^ -shared -Wl,-soname,$(FAUN_SO) $(DEP_LIB)
++ $(CC) -o $@ $^ -shared -Wl,-soname,$(FAUN_SO) $(LDFLAGS) $(DEP_LIB)
+ ln -sf $@ $(FAUN_SO)
+ ln -sf $@ libfaun.so
+ endif
+
+ faun_test: faun_test.c $(FAUN_LIB)
+- cc -Wall -W $< $(CFLAGS) -I. -L. -lfaun $(DEP_STATIC) -o $@
++ $(CC) -Wall -W $< $(CFLAGS) -I. -L. -lfaun $(DEP_STATIC) $(LDFLAGS) -o $@
+
+ basic: example/basic.c $(FAUN_LIB)
+- cc -Wall -W $< $(CFLAGS) -I. -L. -lfaun $(DEP_STATIC) -o $@
++ $(CC) -Wall -W $< $(CFLAGS) -I. -L. -lfaun $(DEP_STATIC) $(LDFLAGS) -o $@
+
+ install:
+ mkdir -p $(DESTDIR)/include $(LIB_DIR)
+@@ -77,7 +80,7 @@ install:
+ ifdef STATIC_LIB
+ install -m 644 $(FAUN_LIB) $(LIB_DIR)
+ else
+- install -m 755 -s $(FAUN_LIB) $(LIB_DIR)
++ install -m 755 $(FAUN_LIB) $(LIB_DIR)
+ ln -s $(FAUN_LIB) $(LIB_DIR)/$(FAUN_SO)
+ ln -s $(FAUN_LIB) $(LIB_DIR)/libfaun.so
+ endif
+--
+2.39.2
+
diff --git a/media-libs/faun/metadata.xml b/media-libs/faun/metadata.xml
new file mode 100644
index 000000000000..a4800f6c9069
--- /dev/null
+++ b/media-libs/faun/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>azamat.hackimov@gmail.com</email>
+ <name>Azamat H. Hackimov</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">WickedSmoke/faun</remote-id>
+ </upstream>
+</pkgmetadata>