commit: c24cbb617c1f5d32ac4d8bbf34a70f8d3bcbc704
Author: Bryce Copeland <truffle074 <AT> gmail <DOT> com>
AuthorDate: Wed Aug 13 09:30:35 2025 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Wed Aug 13 09:30:35 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c24cbb61
media-sound/tenacity: new package, add 1.3.4
Signed-off-by: Bryce Copeland <truffle074 <AT> gmail.com>
media-sound/tenacity/Manifest | 2 +
.../tenacity-1.3.4-fix-hardcoded-docdir.patch | 17 +++
.../files/tenacity-1.3.4-fix-rpath-handling.patch | 34 ++++++
media-sound/tenacity/metadata.xml | 22 ++++
media-sound/tenacity/tenacity-1.3.4.ebuild | 127 +++++++++++++++++++++
5 files changed, 202 insertions(+)
diff --git a/media-sound/tenacity/Manifest b/media-sound/tenacity/Manifest
new file mode 100644
index 0000000000..fd7e80275f
--- /dev/null
+++ b/media-sound/tenacity/Manifest
@@ -0,0 +1,2 @@
+DIST tenacity-1.3.4.tar.gz 48863846 BLAKE2B
586e5969c6017c1db61783cc8bfda68ede62882272d3d87c0242c5f2a7792a4c9a29971065e1a0d59fb2a8baedcfc7acbd43a607fb3e7f0a5d4668bb21f6be9a
SHA512
75adae4da374084fd93063d146b4d7d97812e28bedb6c0c7699afc1e543352734b92072ed0bfc800eb79ba8f71695ff823b70f3469cf4dd157f36e24c0f52d10
+DIST tenacity-libnyquist-1.3.4.tar.gz 706367 BLAKE2B
60ea2baf6cb5962902723c5e0e828e9667375ed2e9dabb63c887d10eef4dd2e382a49814a1f004f6a0b1ce4a4b2e344d11b0b1e0bb80eb4ecba0620963b1f742
SHA512
197198dafdf802b393140b9cf1e32ed3fb065ec8007010ef741d89e976362197a1bb88de1553fd7fa0c3f1b3d174879bc60852e199190ce44ac53cd198892a76
diff --git
a/media-sound/tenacity/files/tenacity-1.3.4-fix-hardcoded-docdir.patch
b/media-sound/tenacity/files/tenacity-1.3.4-fix-hardcoded-docdir.patch
new file mode 100644
index 0000000000..df39171d9b
--- /dev/null
+++ b/media-sound/tenacity/files/tenacity-1.3.4-fix-hardcoded-docdir.patch
@@ -0,0 +1,17 @@
+The install path for the README and LICENSE files is hardcoded to
+"/usr/share/doc/tenacity", change this to use the INSTALL_DOCDIR
+defined by cmake.eclass
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 61e61f597..4359bccf7 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1393,7 +1393,7 @@ else()
+ install( FILES "${_INTDIR}/${APP_NAME}.desktop"
+ DESTINATION "${_DATADIR}/applications" )
+ install( FILES "${CMAKE_SOURCE_DIR}/LICENSE.txt"
"${CMAKE_SOURCE_DIR}/README.md"
+- DESTINATION "${_DATADIR}/doc/${APP_NAME}" )
++ DESTINATION "${CMAKE_INSTALL_DOCDIR}" )
+ install( FILES "${_SRCDIR}/tenacity.xml"
+ DESTINATION "${_DATADIR}/mime/packages" )
+ install( FILES "${CMAKE_SOURCE_DIR}/presets/EQDefaultCurves.xml"
diff --git a/media-sound/tenacity/files/tenacity-1.3.4-fix-rpath-handling.patch
b/media-sound/tenacity/files/tenacity-1.3.4-fix-rpath-handling.patch
new file mode 100644
index 0000000000..80beaf4f1a
--- /dev/null
+++ b/media-sound/tenacity/files/tenacity-1.3.4-fix-rpath-handling.patch
@@ -0,0 +1,34 @@
+Tenacity generates RPATH values weirdly, and it doesn't play nice with portage:
+
+1. CMAKE_RUNTIME_OUTPUT_DIRECTORY is used instead of CMAKE_INSTALL_PREFIX, so
by
+default the RPATH will be a directory under "/var/tmp/portage/..."
+
+2. the INSTALL_RPATH will retain values from the BUILD_RPATH, leading to the
+final binary always having the build directory appended in it's RPATH (even if
+the above issue is fixed)
+
+this patch both corrects the INSTALL_RPATH to use CMAKE_INSTALL_PREFIX
+(INSTALL_PREFIX is an alias for it), and sets BUILD_WITH_INSTALL_RPATH
+to prevent the BUILD_RPATH for being linked into the final binaries.
+
+it is necessary to set BUILD_RPATH, even though it's not technically being
+used, as there is a strange behaviour that overrides BUILD_WITH_INSTALL_RPATH
+if this is unset or set to "".
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 345b4ca47..883a097bf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -363,9 +363,9 @@ set( _MODDIR "${_DEST}/modules" )
+ set( _EXEDIR "${_DEST}" )
+
+ # Setup RPATH handling
+-set( CMAKE_BUILD_RPATH "${_DEST}/${_PKGLIB}" )
+-set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
+-set( CMAKE_INSTALL_RPATH "$ORIGIN/../${_PKGLIB}" )
++set( CMAKE_BUILD_RPATH "${INSTALL_PREFIX}/${_PKGLIB}" )
++set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
++set( CMAKE_INSTALL_RPATH "${INSTALL_PREFIX}/${_PKGLIB}" )
+ set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE )
+
+ # Adjust them for the Mac
diff --git a/media-sound/tenacity/metadata.xml
b/media-sound/tenacity/metadata.xml
new file mode 100644
index 0000000000..7f19bab4d6
--- /dev/null
+++ b/media-sound/tenacity/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>[email protected]</email>
+ <name>Bryce Copeland</name>
+ </maintainer>
+ <use>
+ <flag name="id3tag">Enable ID3Tag support for MP3 files</flag>
+ <flag name="lv2">Enable LV2 plugin hosting support</flag>
+ <flag name="midi">Enable MIDI support</flag>
+ <flag name="mp2">Enable MP2 codec support</flag>
+ <flag name="sbsms">Enable SBSMS timestretching support</flag>
+ <flag name="soundtouch">Enable SoundTouch timestretching
support</flag>
+ <flag name="vamp">Enable VAMP plugin hosting support</flag>
+ <flag name="vst2">Enable VST2 plugin hosting support</flag>
+ </use>
+ <upstream>
+
<bugs-to>https://codeberg.org/tenacityteam/tenacity/issues</bugs-to>
+ <remote-id type="codeberg">tenacityteam/tenacity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-sound/tenacity/tenacity-1.3.4.ebuild
b/media-sound/tenacity/tenacity-1.3.4.ebuild
new file mode 100644
index 0000000000..46a162f2e7
--- /dev/null
+++ b/media-sound/tenacity/tenacity-1.3.4.ebuild
@@ -0,0 +1,127 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.2-gtk3"
+
+inherit cmake wxwidgets xdg virtualx
+
+# libnyquist doesn't have tags, instead use the specific submodule commit
tenacity does
+LIBNYQUIST_COMMIT="d4fe08b079538a2fd79277ef1a83434663562f04"
+
+DESCRIPTION="Easy-to-use, privacy-friendly, FLOSS, cross-platform multi-track
audio editor"
+HOMEPAGE="https://tenacityaudio.org/"
+SRC_URI="https://codeberg.org/tenacityteam/${PN}/archive/v${PV}.tar.gz ->
${P}.tar.gz
+
https://codeberg.org/tenacityteam/libnyquist/archive/${LIBNYQUIST_COMMIT}.tar.gz
-> ${PN}-libnyquist-${PV}.tar.gz"
+
+# codeberg doesn't append tag
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="alsa ffmpeg +midi +lame +id3tag +mp3 +mp2 +flac +ogg +vorbis +sbsms
+soundtouch +ladspa +lv2 vamp +vst2"
+REQUIRED_USE="
+ id3tag? ( mp3 )
+ lame? ( mp3 )
+ vorbis? ( ogg )
+"
+
+DEPEND="
+ dev-libs/glib:2
+ x11-libs/gtk+:3
+ x11-libs/wxGTK:${WX_GTK_VER}=[X]
+ media-libs/alsa-lib
+ dev-libs/expat
+ flac? ( media-libs/flac )
+ sys-devel/gettext
+ media-sound/lame
+ id3tag? ( media-libs/libid3tag )
+ mp3? ( media-libs/libmad )
+ ogg? ( media-libs/libogg )
+ media-libs/libsndfile
+ vorbis? ( media-libs/libvorbis )
+ lv2? (
+ media-libs/lilv
+ media-libs/lv2
+ )
+ midi? (
+ media-libs/portaudio
+ media-libs/portmidi
+ )
+ dev-libs/serd
+ dev-libs/sord
+ soundtouch? ( media-libs/libsoundtouch )
+ media-libs/soxr
+ dev-db/sqlite
+ media-libs/sratom
+ media-libs/suil
+ media-libs/taglib
+ mp2? ( media-sound/twolame )
+ media-libs/vamp-plugin-sdk
+ x11-libs/wxGTK
+ sys-libs/zlib
+ ffmpeg? ( media-video/ffmpeg )
+ sbsms? ( media-libs/libsbsms )
+ vamp? ( media-libs/vamp-plugin-sdk )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/tenacity-1.3.4-fix-rpath-handling.patch"
+ "${FILESDIR}/tenacity-1.3.4-fix-hardcoded-docdir.patch"
+)
+
+src_unpack() {
+ default
+
+ # otherwise build will try to run git --submodule --init
+ rmdir "${S}/lib-src/libnyquist" || die
+ ln -s "${WORKDIR}/libnyquist" "${S}/lib-src/libnyquist"
+}
+
+src_configure() {
+ setup-wxwidgets
+
+ local mycmakeargs=(
+ -DVCPKG=OFF
+ -DPERFORM_CODESIGN=OFF
+
+ # portage handles this, specify off to stop autodetect
+ -DSCCACHE=OFF
+ -DCCACHE=OFF
+
+ # Pre-Compiled Headers needs to stay off, even with ccache
installed
+ # otherwise a bunch of preprocessor variables will be missing
+ -DPCH=OFF
+
+ -DMIDI=$(usex midi ON OFF)
+ -DID3TAG=$(usex id3tag ON OFF)
+ -DMP3_DECODING=$(usex mp3 ON OFF)
+ -DMP2=$(usex mp2 ON OFF)
+ -DOGG=$(usex ogg ON OFF)
+ -DVORBIS=$(usex vorbis ON OFF)
+ -DFLAC=$(usex flac ON OFF)
+ -DSBSMS=$(usex sbsms ON OFF)
+ -DSOUNDTOUCH=$(usex soundtouch ON OFF)
+ -DFFMPEG=$(usex ffmpeg ON OFF)
+ -DLADSPA=$(usex ladspa ON OFF)
+ #-DAUDIO_UNITS=OFF # option only exists on MacOS
+ -DLV2=$(usex lv2 ON OFF)
+ -DVAMP=$(usex vamp ON OFF)
+ -DVST2=$(usex vst2 ON OFF)
+
+ # this flag is misleading, when not "" the flag only has an
effect
+ # when CMAKE_GENERATOR is "Visual Studio*" or "XCode" (i.e. not
us)
+ # man pages will be installed regardless on linux
+ -DMANUAL_PATH=""
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ virtx cmake_src_test
+}