1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
6 PYTHON_REQ_USE='threads(+)'
8 inherit eutils toolchain-funcs flag-o-matic python-any-r1 waf-utils
10 DESCRIPTION="Digital Audio Workstation"
11 HOMEPAGE="http://ardour.org/"
13 if [[ ${PV} == *9999* ]]; then
14 EGIT_REPO_URI="https://git.ardour.org/ardour/ardour.git"
17 KEYWORDS="~amd64 ~x86"
18 SRC_URI="mirror://gentoo/${P}.tar.bz2"
19 S="${WORKDIR}/Ardour-${PV}.0"
24 IUSE="altivec doc jack cpu_flags_x86_sse cpu_flags_x86_mmx cpu_flags_x86_3dnow"
27 >=dev-cpp/glibmm-2.32.0
28 >=dev-cpp/gtkmm-2.16:2.4
29 >=dev-cpp/libgnomecanvasmm-2.26:2.6
31 >=dev-libs/glib-2.10.1:2
33 >=dev-libs/libxml2-2.6:2
35 >=gnome-base/libgnomecanvas-2
40 media-libs/libart_lgpl
42 >=media-libs/liblrdf-0.4.0-r20
43 >=media-libs/libsamplerate-0.1
44 >=media-libs/libsndfile-1.0.18
45 >=media-libs/libsoundtouch-1.6.0
47 >=media-libs/rubberband-1.6.0
48 >=media-libs/taglib-1.7
49 media-libs/vamp-plugin-sdk
52 sci-libs/fftw:3.0[threads]
55 >=x11-libs/gtk+-2.8.1:2
57 jack? ( virtual/jack )
61 >=media-libs/suil-0.6.10
62 >=media-libs/lv2-1.4.0"
66 jack? ( virtual/jack )
69 doc? ( app-doc/doxygen[dot] )"
72 if has_version \>=dev-libs/libsigc++-2.6 ; then
73 append-cxxflags -std=c++11
75 python-any-r1_pkg_setup
80 if ! [[ ${PV} == *9999* ]]; then
81 eapply "${FILESDIR}"/${PN}-4.x-revision-naming.patch
82 touch "${S}/libs/ardour/revision.cc"
84 sed 's/'full-optimization\'\ :\ \\[.*'/'full-optimization\'\ :\ \'\','/' -i "${S}"/wscript || die
85 MARCH=$(get-flag march)
87 if use cpu_flags_x86_sse; then
88 if [[ ${MARCH} == "i686" ]] || [[ ${MARCH} == "i486" ]]; then
89 elog "You enabled sse but use an march that does not support sse!"
90 elog "We add -msse to the flags now, but please consider switching your march in make.conf!"
94 if use cpu_flags_x86_mmx; then
95 if [[ ${MARCH} == "i486" ]]; then
96 elog "You enabled mmx with i486 set as march! You have been warned!"
98 OPTFLAGS="${OPTFLAGS} mmx"
100 if use cpu_flags_x86_3dnow; then
101 OPTFLAGS="${OPTFLAGS} 3dnow"
103 sed 's/flag_line\ =\ o.*/flag_line\ =\ \": '"${OPTFLAGS}"' just some place holders\"/' \
104 -i "${S}"/wscript || die
105 sed 's/cpu\ ==\ .*/cpu\ ==\ "LeaveMarchAsIs":/' -i "${S}"/wscript || die
106 append-flags "-lboost_system"
107 python_fix_shebang "${S}"/wscript
108 python_fix_shebang "${S}"/waf
114 waf-utils_src_configure \
115 $(usex doc "--docs" '') \
116 $({ use altivec || use cpu_flags_x86_sse; } && echo "--fpu-optimization" || echo "--no-fpu-optimization") \
117 $(usex jack "--with-backends=alsa,jack" "--with-backends=alsa --libjack=weak") \
126 waf-utils_src_install
127 mv ${PN}.1 ${PN}${SLOT}.1
129 newicon "${S}/gtk2_ardour/resources/Ardour-icon_48px.png" ${PN}${SLOT}.png
130 make_desktop_entry ardour5 ardour5 ardour5 AudioVideo
134 elog "Please do _not_ report problems with the package to ${PN} upstream."
135 elog "If you think you've found a bug, check the upstream binary package"
136 elog "before you report anything to upstream."