Skip to content

Commit

Permalink
media-sound/zynaddsubfx-3.0.5-r1: import from upstream + zest USE
Browse files Browse the repository at this point in the history
This enables zyn-fusion support

Package-Manager: Portage-3.0.1, Repoman-2.3.23
  • Loading branch information
marcan committed Aug 11, 2020
1 parent b026f5b commit 997ee68
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-sound/zynaddsubfx/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST zynaddsubfx-3.0.5.tar.bz2 8141703 BLAKE2B 61f28a62d5ef8c17b5e38febb8ad1ecd40c80f87b26d90804131b97b57534adf5ad96a1f54980b75fd5e71185e2d5376a7df35696c7bcfd593b5d8e34bd2e386 SHA512 1e4d5a6393937e6c7103e6d0e97df76f2d129350854c2f338aa888591091b1508c63e9b52c8e5a176e282ff2f6b72c6a87de54875c412771aff26e8ece2c84e8
12 changes: 12 additions & 0 deletions media-sound/zynaddsubfx/files/zynaddsubfx-3.0.5-docs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,9 +28,6 @@ include(CTestConfig.cmake)
add_subdirectory(src)
add_subdirectory(doc) # Doxygen only

-install(FILES AUTHORS.txt COPYING HISTORY.txt README.adoc
- DESTINATION share/doc/zynaddsubfx
- )
install(FILES zynaddsubfx-jack-multi.desktop zynaddsubfx-jack.desktop zynaddsubfx-alsa.desktop zynaddsubfx-oss.desktop
DESTINATION share/applications)
install(FILES zynaddsubfx.svg
19 changes: 19 additions & 0 deletions media-sound/zynaddsubfx/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>Hector Martin</name>
</maintainer>
<maintainer type="project">
<email>[email protected]</email>
<name>Gentoo ProAudio Project</name>
</maintainer>
<use>
<flag name="dssi">Enable support for DSSI Soft Synth Interface</flag>
<flag name="zest">Enable support for the zyn-fusion zest UI</flag>
</use>
<upstream>
<remote-id type="sourceforge">zynaddsubfx</remote-id>
</upstream>
</pkgmetadata>
96 changes: 96 additions & 0 deletions media-sound/zynaddsubfx/zynaddsubfx-3.0.5-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake flag-o-matic

DESCRIPTION="Software synthesizer capable of making a countless number of instruments"
HOMEPAGE="http://zynaddsubfx.sourceforge.net/"
SRC_URI="mirror://sourceforge/zynaddsubfx/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="alsa doc dssi +fltk jack lash portaudio zest"

REQUIRED_USE="|| ( alsa jack portaudio )"

BDEPEND="
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
DEPEND="
>=dev-libs/mxml-2.2.1
media-libs/liblo
sci-libs/fftw:3.0
sys-libs/zlib
alsa? ( media-libs/alsa-lib )
dssi? ( media-libs/dssi )
fltk? (
>=x11-libs/fltk-1.3:1
x11-libs/libX11
x11-libs/libXpm
)
jack? ( virtual/jack )
lash? ( media-sound/lash )
portaudio? ( media-libs/portaudio )
"
RDEPEND="${DEPEND}
zest? ( media-sound/zyn-fusion )
"

PATCHES=( "${FILESDIR}"/${P}-docs.patch )

DOCS=( ChangeLog HISTORY.txt README.adoc )

src_prepare() {
cmake_src_prepare

if ! use dssi; then
sed -i -e '/pkg_search_module.*DSSI/s/^/#DONT/' src/CMakeLists.txt || die
fi
if ! use jack; then
sed -e '/pkg_check_modules.*JACK/s/^/#DONT/' -i {rtosc,src}/CMakeLists.txt || die
fi
if ! use lash; then
sed -i -e '/pkg_search_module.*LASH/s/^/#DONT/' src/CMakeLists.txt || die
fi
if ! use portaudio; then
sed -i -e '/pkg_check_modules.*PORTAUDIO/s/^/#DONT/' src/CMakeLists.txt || die
fi

# FIXME upstream: sandbox error
sed -i -e '/add_subdirectory(bash-completion)/d' doc/CMakeLists.txt || die
}

src_configure() {
append-cxxflags -std=c++11

local mycmakeargs=(
-DPluginLibDir=$(get_libdir)
$(cmake_use_find_package alsa Alsa)
$(cmake_use_find_package doc Doxygen)
$(cmake_use_find_package fltk FLTK)
)
if use zest ; then
mycmakeargs+=( -DGuiModule=zest )
elif use fltk ; then
mycmakeargs+=( -DGuiModule=fltk )
else
mycmakeargs+=( -DGuiModule=off )
fi
cmake_src_configure
}

src_compile() {
cmake_src_compile
use doc && cmake_src_compile doc
}

src_install() {
use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
cmake_src_install
insinto /usr/share/${PN}
doins -r instruments/*
}

0 comments on commit 997ee68

Please sign in to comment.