From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1235484-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6DAE51382C5
	for <garchives@archives.gentoo.org>; Mon, 28 Dec 2020 12:10:09 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 93295E0D64;
	Mon, 28 Dec 2020 12:10:08 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6EB14E0D64
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Dec 2020 12:10:08 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 03F82340D5D
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Dec 2020 12:10:07 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6221842F
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Dec 2020 12:10:05 +0000 (UTC)
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" <fordfrog@gentoo.org>
Message-ID: <1609157402.13f0c75b59df12e9cd21d52822e464c61647a8bd.fordfrog@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/ardour/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-sound/ardour/ardour-9999.ebuild
X-VCS-Directories: media-sound/ardour/
X-VCS-Committer: fordfrog
X-VCS-Committer-Name: Miroslav Šulc
X-VCS-Revision: 13f0c75b59df12e9cd21d52822e464c61647a8bd
X-VCS-Branch: master
Date: Mon, 28 Dec 2020 12:10:05 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 35ec67a5-e152-4302-bf40-a788f2360953
X-Archives-Hash: 01d9ce44d5d4fee7c7fd188549880169

commit:     13f0c75b59df12e9cd21d52822e464c61647a8bd
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Sun Oct 25 00:32:25 2020 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 12:10:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13f0c75b

media-sound/ardour: Update live ebuild

Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
Closes: https://github.com/gentoo/gentoo/pull/18027
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-sound/ardour/ardour-9999.ebuild | 68 ++++++++++++++++++++++++++---------
 1 file changed, 51 insertions(+), 17 deletions(-)

diff --git a/media-sound/ardour/ardour-9999.ebuild b/media-sound/ardour/ardour-9999.ebuild
index b4637a515b8..55fedd0ef1d 100644
--- a/media-sound/ardour/ardour-9999.ebuild
+++ b/media-sound/ardour/ardour-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=6
 PYTHON_COMPAT=( python3_{6,7,8,9} )
 PYTHON_REQ_USE='threads(+)'
 PLOCALES="cs de el en_GB es eu fr it ja nn pl pt pt_PT ru sv zh"
-inherit eutils toolchain-funcs flag-o-matic l10n python-any-r1 waf-utils
+inherit eutils toolchain-funcs flag-o-matic l10n python-any-r1 waf-utils xdg
 
 DESCRIPTION="Digital Audio Workstation"
 HOMEPAGE="https://ardour.org/"
@@ -15,7 +15,7 @@ if [[ ${PV} == *9999* ]]; then
 	inherit git-r3
 else
 	KEYWORDS="~amd64 ~x86"
-	SRC_URI="https://community.ardour.org/src/Ardour-${PV}.0.tar.bz2"
+	SRC_URI="https://dev.gentoo.org/~fordfrog/distfiles/Ardour-${PV}.0.tar.bz2"
 	S="${WORKDIR}/Ardour-${PV}.0"
 fi
 
@@ -65,10 +65,16 @@ RDEPEND="
 
 DEPEND="${RDEPEND}
 	${PYTHON_DEPS}
-	jack? ( virtual/jack )
+	dev-util/itstool
 	sys-devel/gettext
 	virtual/pkgconfig
-	doc? ( app-doc/doxygen[dot] )"
+	doc? ( app-doc/doxygen[dot] )
+	jack? ( virtual/jack )"
+
+pkg_pretend() {
+	[[ $(tc-getLD) == *gold* ]] && (has_version sci-libs/fftw[openmp] || has_version sci-libs/fftw[threads]) && \
+		ewarn "Linking with gold linker might produce broken executable, see bug #733972"
+}
 
 pkg_setup() {
 	if has_version \>=dev-libs/libsigc++-2.6 ; then
@@ -78,7 +84,9 @@ pkg_setup() {
 }
 
 src_prepare() {
-	eapply_user
+	default
+	xdg_src_prepare
+
 	sed 's/'full-optimization\'\ :\ \\[.*'/'full-optimization\'\ :\ \'\','/' -i "${S}"/wscript || die
 	MARCH=$(get-flag march)
 	OPTFLAGS=""
@@ -117,30 +125,56 @@ src_configure() {
 
 	tc-export CC CXX
 	mkdir -p "${D}"
-	waf-utils_src_configure \
-		--destdir="${D}" \
-		--configdir=/etc \
-		--optimize \
-		--with-backends=${backends} \
-		$(usex doc "--docs" '') \
-		$({ use altivec || use cpu_flags_x86_sse; } && echo "--fpu-optimization" || echo "--no-fpu-optimization") \
-		$(usex phonehome "--phone-home" "--no-phone-home") \
+	local myconf=(
+		--configdir=/etc
+		--freedesktop
+		--noconfirm
+		--optimize
+		--with-backends=${backends}
+		$({ use altivec || use cpu_flags_x86_sse; } && echo "--fpu-optimization" || echo "--no-fpu-optimization")
+		$(usex doc "--docs" '')
 		$(usex nls "--nls" "--no-nls")
-#not possible right now		--use-external-libs
+		$(usex phonehome "--phone-home" "--no-phone-home")
+		# not possible right now  --use-external-libs
+	)
+
+	waf-utils_src_configure "${myconf[@]}"
 }
+
 src_compile() {
 	waf-utils_src_compile
 	use nls && waf-utils_src_compile i18n
 }
+
 src_install() {
+	local s
+
 	waf-utils_src_install
-	mv ${PN}.1 ${PN}${SLOT}.1
+
+	mv ${PN}.1 ${PN}${SLOT}.1 || die
 	doman ${PN}${SLOT}.1
-	newicon "${S}/gtk2_ardour/resources/Ardour-icon_48px.png" ${PN}${SLOT}.png
-	make_desktop_entry ardour6 ardour6 ardour6 AudioVideo
+
+	for s in 16 22 32 48 256 512; do
+		dosym ../../../../ardour${SLOT}/resources/Ardour-icon_${s}px.png \
+			/usr/share/icons/hicolor/${s}x${s}/apps/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
+
+	insinto /usr/share/metainfo
+	doins build/gtk2_ardour/ardour${SLOT}.appdata.xml
 }
 
 pkg_postinst() {
+	xdg_pkg_postinst
+
 	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."