--- qsynth-0.3.6.ebuild +++ qsynth-0.3.6-r1.ebuild @@ -2,9 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-sound/qsynth/qsynth-0.3.6.ebuild,v 1.5 2012/03/06 14:33:12 ranger Exp $ -EAPI=2 +EAPI=4 +LANGS="cs de es ru" -inherit qt4 eutils flag-o-matic +inherit qt4-r2 eutils flag-o-matic DESCRIPTION="A Qt application to control FluidSynth" HOMEPAGE="http://qsynth.sourceforge.net/" @@ -13,7 +14,7 @@ SLOT="0" IUSE="debug jack alsa pulseaudio" -KEYWORDS="amd64 ppc x86" +KEYWORDS="~amd64 ~ppc ~x86" DEPEND=">=x11-libs/qt-core-4.2:4 >=x11-libs/qt-gui-4.2:4 @@ -22,6 +23,8 @@ !pulseaudio? ( !jack? ( !alsa? ( >=media-sound/fluidsynth-1.0.7a[oss] ) ) )" RDEPEND="${DEPEND}" +DOCS="AUTHORS ChangeLog README TODO TRANSLATORS" + src_configure() { # Stupidly, qsynth's configure does *not* use pkg-config to # discover the presence of Qt4, but uses fixed paths; as they @@ -32,24 +35,29 @@ append-ldflags -L/usr/$(get_libdir)/qt4 econf \ - $(use_enable debug) \ - || die "econf failed" + $(use_enable debug) eqmake4 "${PN}.pro" -o "${PN}.mak" } src_compile() { - lupdate "${PN}.pro" || die - emake || die + lupdate "${PN}.pro" || die "lupdate failed" + qt4-r2_src_compile } src_install () { - emake DESTDIR="${D}" install || die "make install failed" - dodoc AUTHORS ChangeLog README TODO + qt4-r2_src_install # The desktop file is invalid, and we also change the command # depending on useflags rm -rf "${D}/usr/share/applications/qsynth.desktop" + local lang + for lang in ${LANGS} ; do + if ! use linguas_${lang} ; then + rm -r "${D}"/usr/share/locale/${PN}_${lang}.qm + fi + done + local cmd if use jack; then cmd="qsynth"