diff --git a/media-sound/ardour/Manifest b/media-sound/ardour/Manifest index 32dfbfe089de9..568362838b75c 100644 --- a/media-sound/ardour/Manifest +++ b/media-sound/ardour/Manifest @@ -1 +1,2 @@ +DIST Ardour-9.10.0.tar.bz2 18226802 BLAKE2B 063495446b289fe8ca8a8e9735b12841a817f9fd6d35ed3f3acd5f52724c132b99cbb554cb7a8780de523c7ef5aea9cbfefcf5b198e9f257b6f04d18be39f254 SHA512 574226c594d305d2cacbebb0b1dada7f1ec028d559f1efbe36360afb7e334a3e89de8a808ea9cd116377956bdc7fb93829ca9c021a1dd6043d985226d5940d2d DIST Ardour-9.8.0.tar.bz2 18134703 BLAKE2B ea0e5c70d7b6f2e10ddc0f32866c3b51b455736f18b4f07b4e16a89bc4d3c714569a2f14406fed3810560af9706d24f5ef085c7bc3883d3fdb8a53f0a011549b SHA512 b5d4fc63ca270c82bb9209c07bbe450209b70758257389a0dd17de87fc1628ef139f94d03f052b5ea7d3a856aaea1a60a1ad08b536a4a084c07dcac9a8f603fc diff --git a/media-sound/ardour/ardour-9.10.0.ebuild b/media-sound/ardour/ardour-9.10.0.ebuild new file mode 100644 index 0000000000000..62df9bc40028e --- /dev/null +++ b/media-sound/ardour/ardour-9.10.0.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..15} ) +PYTHON_REQ_USE='threads(+)' +inherit desktop edo flag-o-matic optfeature python-any-r1 waf-utils toolchain-funcs xdg + +DESCRIPTION="Digital Audio Workstation" +HOMEPAGE="https://ardour.org/" + +if [[ ${PV} == *9999* ]]; then + # Main repo not stable + #EGIT_REPO_URI="https://git.ardour.org/ardour/ardour.git" + EGIT_REPO_URI="https://github.com/Ardour/ardour.git" + inherit git-r3 +else + # upstream doesn't provide a release tarball in github repo + # see https://github.com/Ardour/ardour/blob/master/README-GITHUB.txt + # official link is available here, but with token/expiration: + # https://community.ardour.org/download?architecture=x86_64&type=source + SRC_URI="https://dev.gentoo.org/~fordfrog/distfiles/Ardour-${PV}.tar.bz2" + S="${WORKDIR}/Ardour-${PV}" + KEYWORDS="~amd64 ~loong ~x86" +fi + +LICENSE="GPL-2" +SLOT="9" +IUSE="doc jack phonehome pulseaudio test" +CPU_USE=( + cpu_flags_x86_{avx,avx512f,fma3,sse} +) +IUSE+=" ${CPU_USE[@]}" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-arch/libarchive:= + dev-cpp/cairomm:0[X] + dev-cpp/glibmm:2 + dev-cpp/pangomm:1.4 + dev-libs/glib:2 + dev-libs/libsigc++:2 + dev-libs/libxml2:2= + media-libs/alsa-lib + media-libs/aubio:= + media-libs/flac + media-libs/fontconfig + media-libs/freetype:2 + media-libs/liblo + media-libs/liblrdf + media-libs/libpng:= + media-libs/libsamplerate + media-libs/libsndfile + media-libs/lilv + media-libs/lv2 + media-libs/raptor:2 + media-libs/rubberband:= + media-libs/taglib:= + media-libs/vamp-plugin-sdk + net-libs/libwebsockets:= + net-misc/curl + sys-apps/dbus + sys-libs/readline:0= + sci-libs/fftw:3.0=[threads] + virtual/libusb:1 + x11-libs/cairo[X] + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/pango + x11-themes/hicolor-icon-theme + jack? ( virtual/jack ) + pulseaudio? ( media-libs/libpulse ) +" +# media-libs/suil[X,gtk2] bundled suil is used, maybe probably because of ytk +# !bundled-libs? ( media-sound/fluidsynth ) at least libltc is missing to be able to unbundle... +DEPEND=" + ${RDEPEND} + dev-libs/boost + dev-libs/sord + media-libs/sratom + x11-libs/libXi + test? ( dev-util/cppunit ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-util/itstool + sys-devel/gettext + virtual/pkgconfig + doc? ( + app-text/doxygen + media-gfx/graphviz + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-8.12-fix_fpu.patch" + # see bug #966219 + "${FILESDIR}/${PN}-8.12-fix_fftranscode.patch" +) + +src_prepare() { + default + + local optflags=( + $(usev cpu_flags_x86_sse sse) + ) + # these flags imply sse and avx + if use cpu_flags_x86_sse && use cpu_flags_x86_avx; then + optflags+=( + avx + $(usev cpu_flags_x86_avx512f avx512f) + $(usev cpu_flags_x86_fma3 fma) + ) + fi + + # use only flags defined by users + sed 's/flag_line = o.*/flag_line = \": '"${optflags[*]}"'\"/' \ + -i wscript || die + + # shebang + python_fix_shebang wscript + python_fix_shebang waf + + # fix hardcoded cpp, apply `gcc -E` needs patching but will fail w/ clang + tc-export CPP + sed -e "s@obj.command = 'cpp'@obj.command = '${CPP/-gcc -E/-cpp}'@" \ + -i gtk2_ardour/wscript || die + + # skip non-generic tests with failures + sed -e "\@'test/fpu_test.cc',@d" -i libs/ardour/wscript || die +} + +src_configure() { + # avoid bug https://bugs.gentoo.org/800067 + local -x AS="$(tc-getCC) -c" + + # -Werror=odr + # https://tracker.ardour.org/view.php?id=9649 + # https://bugs.gentoo.org/917095 + filter-lto + + append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/ardour${SLOT}" + + local backends=( + alsa + dummy + $(usev jack) + $(usev pulseaudio) + ) + + # VST support is enabled by default given --no-lxvst is not called. + # But please keep in mind the README (obsolete?) made by upstream. + # https://github.com/Ardour/ardour/blob/master/PACKAGER_README + tc-export CC CXX + local myconf=( + --configdir="${EPREFIX}"/etc + --cxx17 + --freedesktop + --no-execstack + --noconfirm + --optimize + --with-backends=$(IFS=','; echo "${backends[*]}") + $(usev !cpu_flags_x86_sse --no-fpu-optimization) + $(usev !phonehome --no-phone-home) + $(usev test --test) + # not possible right now --use-external-libs + # missing dependency: https://github.com/c4dm/qm-dsp + ) + + waf-utils_src_configure "${myconf[@]}" +} + +src_compile() { + waf-utils_src_compile + waf-utils_src_compile i18n + if use doc; then + pushd doc >/dev/null || die + doxygen -u Doxyfile || die + doxygen Doxyfile || die + find . \( -iname '*.map' -o -iname '*.md5' \) -delete || die + popd >/dev/null || die + fi +} + +src_test() { + pushd "${S}"/libs/ardour/ >/dev/null || die + edo ./run-tests.sh + popd >/dev/null || die +} + +src_install() { + use doc && local HTML_DOCS=( doc/html/. ) + + waf-utils_src_install + + mv ${PN}.1 ${PN}${SLOT}.1 || die + doman ${PN}${SLOT}.1 + + local s + for s in 16 22 32 48 256 512; do + newicon -s ${s} gtk2_ardour/resources/Ardour-icon_${s}px.png ardour${SLOT}.png + done + + sed -i \ + -e "s/\(^Name=\).*/\1Ardour ${SLOT}/" \ + -e 's/;AudioEditing;/;X-AudioEditing;/' \ + build/gtk2_ardour/ardour${SLOT}.desktop || die + domenu build/gtk2_ardour/ardour${SLOT}.desktop + + insinto /usr/share/mime/packages + newins build/gtk2_ardour/ardour.xml ardour${SLOT}.xml + rm "${D}/usr/share/mime/packages/ardour.xml" || die + + # the appdata directory is deprecated + # no patch because this causes the translation fail + mv "${ED}"/usr/share/{appdata,metainfo} || die +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature "another synth used by default if installed" media-plugins/gmsynth-lv2 + optfeature "exporting audio in mp3" media-video/ffmpeg[lame] + + elog "Please do _not_ report problems with the package to ${PN} upstream." + elog "If you think you've found a bug, check the upstream binary package" + elog "before you report anything to upstream." +}