logo

overlay

My (experimental) gentoo overlay
commit: e040b9197aa101ed00c090d9df5fb06fcebb6723
parent: 2ca6f3f142791b0b12650d9995bac53557794464
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  7 Mar 2018 02:48:24 +0100

media-sound/sbagen: Initial commit

based on https://bugs.gentoo.org/96497

Diffstat:

Amedia-sound/sbagen/Manifest1+
Amedia-sound/sbagen/metadata.xml8++++++++
Amedia-sound/sbagen/sbagen-1.4.5.ebuild49+++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/media-sound/sbagen/Manifest b/media-sound/sbagen/Manifest @@ -0,0 +1 @@ +DIST sbagen-1.4.5.tgz 713168 SHA256 02b05d0f89f1baa6e6b282f4a5db279b4c59ee6fc400a5a9686aa11287f220e4 SHA512 35a8cdf0ca59cef01200a102c6f718b163006eec6c3450e7ee32bac0454be2db4d9a4df2f1a52d6cc2beda1d45bf9a7816a2c9dfae710eef14dbe5667cec9bf9 WHIRLPOOL fb7f7802aedf5ff08c76080cf61c53945145a3b219e1f75bc5535b2ff52f8f4844aac624d2e6a9f7dfb3f643da2a86f044fad13b1ca05091dc00655fd3a8a578 diff --git a/media-sound/sbagen/metadata.xml b/media-sound/sbagen/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> +</maintainer> +</pkgmetadata> diff --git a/media-sound/sbagen/sbagen-1.4.5.ebuild b/media-sound/sbagen/sbagen-1.4.5.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Command line sequenced binaural beat generator" +HOMEPAGE="http://sbagen.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +RESTRICT="mirror" + +IUSE="mp3 vorbis" + +DEPEND="mp3? ( media-libs/libmad ) + vorbis? ( media-libs/tremor )" + +DOCS="README.md SBAGEN.txt" + +src_prepare() { + default + rm -r libs || die "Removing third-party libs failed" + rm sbagen || die "Removing sbagen binary failed" + sed -i 's;"libs/mad.h";<mad.h>;' mp3dec.c || die "Fixing mp3dec.c include failed" + sed -i -r 's;include "libs/(.*.h)";include <tremor/\1>;' oggdec.c || die "Fixing oggdec.c include failed" +} + +src_compile() { + if use vorbis; then + append-flags -DOGG_DECODE -ltremor + fi + if use mp3; then + append-flags -DMP3_DECODE -lmad + fi + + $(tc-getCC) ${CFLAGS} -DT_LINUX -Wall -lm -lpthread ${LDFLAGS} sbagen.c -o sbagen || die "Sbagen: compilation failed" +} + +src_install() { + dobin sbagen + if use vorbis; then + insinto + doins *.ogg + fi + einstalldocs +}