commit:     542fb70f2232e5abe46131c44d974151ed24ea7e
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Thu Jan 16 15:28:39 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Jan 16 23:06:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=542fb70f

media-libs/faun: add 0.2.1

Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 media-libs/faun/Manifest                        |  1 +
 media-libs/faun/faun-0.2.1.ebuild               | 38 +++++++++++++++++++++++
 media-libs/faun/files/faun-0.2.1_makefile.patch | 40 +++++++++++++++++++++++++
 media-libs/faun/metadata.xml                    |  1 +
 4 files changed, 80 insertions(+)

diff --git a/media-libs/faun/Manifest b/media-libs/faun/Manifest
index 003becd5010b..3f02599eba50 100644
--- a/media-libs/faun/Manifest
+++ b/media-libs/faun/Manifest
@@ -1 +1,2 @@
 DIST faun-0.1.4.tar.gz 110154 BLAKE2B 
a41e33282442a1b2999c7cc46fc6978607b6d6f2e6d8d7e92dd43386f2ff2ac61aa3c86e0219ffded8a35224c366a85cd7ab1c36a128eb746457be9fdea76c8e
 SHA512 
4449c478109dd78933e346e87228639d0c5fcc33466a60a9649756cb69b087b82a7e0aa21591b4b2e8046858ac6ac9fc7cc43d84eb2e64624b49af8445dcda21
+DIST faun-0.2.1.tar.gz 118623 BLAKE2B 
812f99462d512efde104c664ae1a12b0ada5b87e7b975c2f89274c41d9d24409eccb2ea28d37e02225dab0d6290bf2fa5302a55b5ec824ae7943aaa6149c80cb
 SHA512 
d145d99519c6836147f27bada0b87b70ad864b9bb3af3860183fc7a1c0b51c10a6f904ca365f7016510088d4f83e42dbd2d0e9dd260ad73209e29985af3a9fd4

diff --git a/media-libs/faun/faun-0.2.1.ebuild 
b/media-libs/faun/faun-0.2.1.ebuild
new file mode 100644
index 000000000000..3750f5c686a8
--- /dev/null
+++ b/media-libs/faun/faun-0.2.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="A high-level C audio library"
+HOMEPAGE="https://wickedsmoke.codeberg.page/faun_doc/";
+SRC_URI="https://codeberg.org/wickedsmoke/faun/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="flac"
+
+DEPEND="
+       flac? ( media-libs/flac )
+       media-libs/libpulse
+       media-libs/libvorbis
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.2.1_makefile.patch"
+)
+
+src_configure() {
+       tc-export CC
+       # custom configure
+       edo ./configure $(usex !flac --no_flac "")
+}
+
+src_install() {
+       emake DESTDIR="${D}/usr" install
+       dodoc README.md
+}

diff --git a/media-libs/faun/files/faun-0.2.1_makefile.patch 
b/media-libs/faun/files/faun-0.2.1_makefile.patch
new file mode 100644
index 000000000000..7de9b4d67449
--- /dev/null
+++ b/media-libs/faun/files/faun-0.2.1_makefile.patch
@@ -0,0 +1,40 @@
+From c8c08f50ba9900790ce4127eee4adcbda208ad7b Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <[email protected]>
+Date: Thu, 16 Jan 2025 18:19:25 +0300
+Subject: [PATCH] Fix buildsystem
+
+* Respect CFLAGS, library dependencies
+--- a/Makefile
++++ b/Makefile
+@@ -6,10 +6,11 @@ ifeq ($(STATIC),1)
+     STATIC_LIB=true
+ endif
+ 
+-CFLAGS+=-O3 -DNDEBUG
++CFLAGS?=-O3 -DNDEBUG
+ #CFLAGS+=-g -DDEBUG
++PKG_CONFIG?=pkg-config
+ 
+-OPT=-DUSE_LOAD_MEM -DUSE_SFX_GEN
++OPT=-DUSE_LOAD_MEM -DUSE_SFX_GEN `$(PKG_CONFIG) --cflags libpulse-simple 
libpulse vorbisfile`
+ 
+ DESTDIR ?= /usr/local
+ 
+@@ -22,11 +23,11 @@ else
+ LIB_DIR=$(DESTDIR)/lib
+ endif
+ 
+-DEP_LIB = -lpulse -lvorbisfile -lpthread -lm
++DEP_LIB = `$(PKG_CONFIG) --libs libpulse-simple libpulse vorbisfile` 
-lpthread -lm
+ 
+ ifeq ($(FLAC),1)
+-OPT+=-DUSE_FLAC=1
+-DEP_LIB+=-lFLAC
++OPT+=-DUSE_FLAC=1 `$(PKG_CONFIG) --cflags flac`
++DEP_LIB+=`$(PKG_CONFIG) --libs flac`
+ else ifeq ($(FLAC),2)
+ OPT+=-DUSE_FLAC=2
+ endif
+-- 
+2.45.2
+

diff --git a/media-libs/faun/metadata.xml b/media-libs/faun/metadata.xml
index a4800f6c9069..3d722b078133 100644
--- a/media-libs/faun/metadata.xml
+++ b/media-libs/faun/metadata.xml
@@ -10,6 +10,7 @@
                <name>Proxy Maintainers</name>
        </maintainer>
        <upstream>
+               <remote-id type="codeberg">wickedsmoke/faun</remote-id>
                <remote-id type="github">WickedSmoke/faun</remote-id>
        </upstream>
 </pkgmetadata>

Reply via email to