media-sound/jack_capture: new ebuild
authorMiroslav Šulc <fordfrog@gentoo.org>
Wed, 13 Nov 2019 10:54:57 +0000 (11:54 +0100)
committerMiroslav Šulc <fordfrog@gentoo.org>
Wed, 13 Nov 2019 10:55:09 +0000 (11:55 +0100)
dependency for media-sound/cadence

Closes: https://bugs.gentoo.org/155246
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
media-sound/jack_capture/Manifest [new file with mode: 0644]
media-sound/jack_capture/files/jack_capture-0.9.73-Makefile.patch [new file with mode: 0644]
media-sound/jack_capture/jack_capture-0.9.73.ebuild [new file with mode: 0644]
media-sound/jack_capture/jack_capture-9999.ebuild [new file with mode: 0644]
media-sound/jack_capture/metadata.xml [new file with mode: 0644]

diff --git a/media-sound/jack_capture/Manifest b/media-sound/jack_capture/Manifest
new file mode 100644 (file)
index 0000000..25da2c5
--- /dev/null
@@ -0,0 +1 @@
+DIST jack_capture-0.9.73.tar.gz 63676 BLAKE2B 0ea944dc544f237501485c5d89299c2d1e202da2d1e3c4ef7922f4d2d49af7f0c871f077613da63ee3cb1a457a2a4edf4c1ab4b6b0625b4cb455db56d880e6f5 SHA512 eecab2e26d5e83b65adf386d6fb38f2d9169cf1574e462ec455367f7d98f4f4d5a9d0766b9c572cfdcb43c55ae914bb8a2222267842c9912e2afe13c1f7b0038
diff --git a/media-sound/jack_capture/files/jack_capture-0.9.73-Makefile.patch b/media-sound/jack_capture/files/jack_capture-0.9.73-Makefile.patch
new file mode 100644 (file)
index 0000000..ef69ed5
--- /dev/null
@@ -0,0 +1,41 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2017-07-07 17:42:49.613728707 -0400
++++ b/Makefile 2017-07-07 17:44:39.393726882 -0400
+@@ -3,16 +3,13 @@
+ VERSION=0.9.73
+-CC=gcc
+-CPP=g++
++CC ?= gcc
++CXX ?= g++
+ # Needed on OSX
+ CFLAGS += -I/opt/local/include
+-OPTIMIZE=-O3
+-#OPTIMIZE=-O0 -g
+-
+-COMPILEFLAGS=$(CFLAGS) $(OPTIMIZE) -DVERSION=\"$(VERSION)\" -Wall -Wextra -Wno-unused
++COMPILEFLAGS=$(CFLAGS) -DVERSION=\"$(VERSION)\" -Wall -Wextra -Wno-unused
+ LINKFLAGS=$(LDFLAGS) -ljack -lsndfile -lm -lpthread
+ OS := $(shell uname)
+@@ -41,7 +38,7 @@
+       which install
+       which pkg-config
+       which $(CC)
+-      which $(CPP)
++      which $(CXX)
+       $(CC) $(CFLAGS) -E testsndfile.c >/dev/null
+       @echo "All seems good "
+       @echo
+@@ -64,7 +61,7 @@
+ jack_capture_gui2: jack_capture_gui2.cpp
+-      $(CPP) $(CPPFLAGS) $(OPTIMIZE) jack_capture_gui2.cpp $(LDFLAGS) `pkg-config --libs --cflags gtk+-2.0` -o jack_capture_gui2
++      $(CXX) $(CXXFLAGS) jack_capture_gui2.cpp $(LDFLAGS) `pkg-config --libs --cflags gtk+-2.0` -o jack_capture_gui2
+ config_flags: Makefile das_config.h
+       cat das_config.h |grep COMPILEFLAGS|sed s/\\/\\/COMPILEFLAGS//|tr '\n' ' ' >config_flags
diff --git a/media-sound/jack_capture/jack_capture-0.9.73.ebuild b/media-sound/jack_capture/jack_capture-0.9.73.ebuild
new file mode 100644 (file)
index 0000000..b5a612d
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="JACK Recording utility"
+HOMEPAGE="https://github.com/kmatheussen/jack_capture"
+SRC_URI="https://github.com/kmatheussen/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="gtk mp3 ogg osc"
+
+BDEPEND="
+       gtk? ( virtual/pkgconfig )
+"
+CDEPEND="
+       media-libs/libsndfile
+       virtual/jack
+       gtk? ( x11-libs/gtk+:2 )
+       mp3? ( media-sound/lame )
+       ogg? ( media-libs/libogg )
+       osc? ( media-libs/liblo )
+"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-Makefile.patch"
+)
+
+DOCS=( README config )
+
+src_prepare() {
+       default
+
+       use ogg || sed -i -e 's/HAVE_OGG 1/HAVE_OGG 0/' gen_das_config_h.sh
+       use mp3 || sed -i -e 's/HAVE_LAME 1/HAVE_LAME 0/' -e '/COMPILEFLAGS -lmp3lame/d' gen_das_config_h.sh
+       use osc || sed -i -e 's/HAVE_LIBLO 1/HAVE_LIBLO 0/' -e '/COMPILEFLAGS .* liblo/d' gen_das_config_h.sh
+}
+
+src_compile()
+{
+       tc-export CC CXX
+
+       emake PREFIX="${EPREFIX}/usr" jack_capture
+
+       use gtk && emake PREFIX="${EPREFIX}/usr" jack_capture_gui2
+}
+
+src_install()
+{
+       dobin jack_capture
+
+       use gtk && dobin jack_capture_gui2
+
+       dodoc "${DOCS[@]}"
+}
diff --git a/media-sound/jack_capture/jack_capture-9999.ebuild b/media-sound/jack_capture/jack_capture-9999.ebuild
new file mode 100644 (file)
index 0000000..e2fb81c
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="JACK Recording utility"
+HOMEPAGE="https://github.com/kmatheussen/jack_capture"
+EGIT_REPO_URI="https://github.com/kmatheussen/jack_capture.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gtk mp3 ogg osc"
+
+BDEPEND="
+       gtk? ( virtual/pkgconfig )
+"
+CDEPEND="
+       media-libs/libsndfile
+       virtual/jack
+       gtk? ( x11-libs/gtk+:2 )
+       mp3? ( media-sound/lame )
+       ogg? ( media-libs/libogg )
+       osc? ( media-libs/liblo )
+"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.9.73-Makefile.patch"
+)
+
+DOCS=( README config )
+
+src_prepare() {
+       default
+
+       use ogg || sed -i -e 's/HAVE_OGG 1/HAVE_OGG 0/' gen_das_config_h.sh
+       use mp3 || sed -i -e 's/HAVE_LAME 1/HAVE_LAME 0/' -e '/COMPILEFLAGS -lmp3lame/d' gen_das_config_h.sh
+       use osc || sed -i -e 's/HAVE_LIBLO 1/HAVE_LIBLO 0/' -e '/COMPILEFLAGS .* liblo/d' gen_das_config_h.sh
+}
+
+src_compile()
+{
+       tc-export CC CXX
+
+       emake PREFIX="${EPREFIX}/usr" jack_capture
+
+       use gtk && emake PREFIX="${EPREFIX}/usr" jack_capture_gui2
+}
+
+src_install()
+{
+       dobin jack_capture
+
+       use gtk && dobin jack_capture_gui2
+
+       dodoc "${DOCS[@]}"
+}
diff --git a/media-sound/jack_capture/metadata.xml b/media-sound/jack_capture/metadata.xml
new file mode 100644 (file)
index 0000000..fd782ee
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+       <email>miroslav.sulc@fordfrog.com</email>
+       <name>Miroslav Šulc</name>
+</maintainer>
+<maintainer type="project">
+       <email>proaudio@gentoo.org</email>
+       <name>Gentoo ProAudio Project</name>
+</maintainer>
+</pkgmetadata>