Fwd: [proaudio] media-sound/rosegarden-9999 patch to fix compilation (uses cmake now)

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


an attempt to resurrect this patch as it is still valid...



-------- Přeposlaná zpráva --------
Předmět: [proaudio] media-sound/rosegarden-9999 patch to fix compilation (uses cmake now)
Datum: Wed, 26 Oct 2016 19:16:32 +0200
Od: Miroslav Šulc <fordfrog@xxxxxxxxxx>
Přeposláno - Komu: proaudio@xxxxxxxxxxxxxxxxxxx
Komu: proaudio@xxxxxxxxxxxxxxxxxxx


hi,

rosegarden-9999 from proaudio repo does not compile already for some
time. i'm attaching ebuild patch (and full ebuild for those that wanna
use it immediately without knowing how to use patch command). the ebuild
is complete rewrite as it uses cmake now and the deps changed. i also
dropped the extra deps on external tools and instead copied part of text
from upstream readme to pkg_postinst to direct users to other related
packages which is probably more appropriate.

m.


diff --git a/media-sound/rosegarden/files/rosegarden-12.12.25-debug.patch b/media-sound/rosegarden/files/rosegarden-12.12.25-debug.patch
deleted file mode 100644
index d52b4c6..0000000
--- a/media-sound/rosegarden/files/rosegarden-12.12.25-debug.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- rosegarden-12.12.25/configure.ac
-+++ rosegarden-12.12.25/configure.ac
-@@ -137,9 +137,12 @@
- CXXFLAGS_BUILD="$CXXFLAGS_RELEASE"
- RG_DEFINES_BUILD="$RG_DEFINES_RELEASE"
- 
--AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable debug support [default=no]])],[AC_MSG_NOTICE([enabling debug build])
--CXXFLAGS_BUILD="$CXXFLAGS_DEBUG"
--RG_DEFINES_BUILD="$RG_DEFINES_DEBUG"])
-+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[enable debug support [default=no]]))
-+
-+AS_IF([test "x$enable_debug" = "xyes"], [
-+   AC_MSG_NOTICE([enabling debug build])
-+   CXXFLAGS_BUILD="$CXXFLAGS_DEBUG" RG_DEFINES_BUILD="$RG_DEFINES_DEBUG"
-+])
- 
- if test x"$USER_CXXFLAGS" != x; then
-    	AC_MSG_NOTICE([The CXXFLAGS environment variable is set to "$USER_CXXFLAGS".])
diff --git a/media-sound/rosegarden/rosegarden-9999.ebuild b/media-sound/rosegarden/rosegarden-9999.ebuild
index bd3ccbc..06e296f 100644
--- a/media-sound/rosegarden/rosegarden-9999.ebuild
+++ b/media-sound/rosegarden/rosegarden-9999.ebuild
@@ -2,11 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="5"
+EAPI="6"
 
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-inherit autotools-utils exteutils subversion
+inherit cmake-utils subversion
 
 DESCRIPTION="MIDI and audio sequencer and notation editor."
 HOMEPAGE="http://www.rosegardenmusic.com/";
@@ -17,62 +15,58 @@ ESVN_REPO_URI="http://svn.code.sf.net/p/${PN}/code/trunk/${PN}";
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="debug dssi export gnome kde lilypond lirc"
+IUSE="debug alsa jack lirc sndfile qt4 qt5"
 
-RDEPEND="dev-qt/qtcore
-	dev-qt/qtgui
-	>=media-libs/alsa-lib-1.0
-	>=media-libs/ladspa-cmt-1.14
-	>=media-libs/ladspa-sdk-1.1
-	>=media-libs/liblo-0.23[threads(+)]
+RDEPEND="dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtprintsupport:5
+	dev-qt/qttest:5
+	dev-qt/qtwidgets:5
+	dev-qt/qtxml:5
+	media-libs/dssi
+	media-libs/ladspa-sdk
+	media-libs/liblo[threads(+)]
 	media-libs/liblrdf
-	>=media-libs/libsamplerate-0.1.4
-	>=media-sound/jack-audio-connection-kit-0.109
+	media-libs/libsamplerate
 	sci-libs/fftw:3.0
-	x11-misc/makedepend
-	x11-libs/libXtst
+	sys-libs/zlib
 	|| ( x11-libs/libX11 virtual/x11 )
-	dssi? ( >=media-libs/dssi-0.9 )
-	export? (
-		|| ( kde-base/kdialog kde-base/kdebase )
-		dev-perl/XML-Twig
-		>=media-libs/libsndfile-1.0.16 )
-	lilypond? (
-		>=media-sound/lilypond-2.6.0
-		|| (
-			kde? ( kde-base/okular )
-			gnome? ( app-text/evince )
-			app-text/acroread ) )
-	lirc? ( >=app-misc/lirc-0.8 )"
+	x11-libs/libXext
+	alsa? ( media-libs/alsa-lib )
+	lirc? ( app-misc/lirc )
+	sndfile? ( media-libs/libsndfile )
+	jack? ( media-sound/jack-audio-connection-kit )"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}/${PN}-12.12.25-debug.patch" )
+src_configure() {
+	local mycmakeargs=(
+		-DDISABLE_LIRC=$(!usex lirc)
+		-DUSE_QT4=$(usex qt4)
+		-DUSE_QT5=$(usex qt5)
+	)
 
-pkg_setup(){
-	if ! use export && \
-		! ( has_all-pkg "media-libs/libsndfile dev-perl/XML-Twig" && \
-		has_any-pkg "kde-base/kdialog kde-base/kdebase" ) ;then
-		ewarn "you won't be able to use the rosegarden-project-package-manager"
-		ewarn "please emerge with USE=\"export\""
+	if [ has_use debug ]; then
+		CMAKE_BUILD_TYPE="Debug"
 	fi
 
-	if ! use lilypond && ! ( has_version "media-sound/lilypond" && has_any-pkg "app-text/acroread kde-base/okular app-text/evince" ) ;then
-		ewarn "lilypond preview won't work."
-		ewarn "If you want this feature please remerge USE=\"lilypond\""
-	fi
+	cmake-utils_src_configure
 }
 
-src_prepare() {
-	subversion_src_prepare
-	autotools-utils_src_prepare
-}
+pkg_postinst() {
+	einfo "In order to be fully functional and provide the optimal user experience,"
+	einfo "Rosegarden requires the following external applications."
+	einfo
+	einfo "  - General MIDI soft synth (TiMidity + Freepats or better)"
+	einfo "  - LilyPond"
+	einfo "  - Okular, Evince, Acroread, MuPDF, ePDFView, or other PDF viewer reachable"
+	einfo "    through xdg-open"
+	einfo "  - lpr or lp"
+	einfo "  - QjackCtl (JACK Audio Connection Kit - Qt GUI Interface)"
+	einfo "  - FLAC"
+	einfo "  - WavPack"
+	einfo "  - DSSI plugins"
+	einfo "  - LADSPA plugins"
 
-src_configure() {
-	local myeconfargs=(
-		--with-qtdir="${EPREFIX}"/usr/
-		--with-qtlibdir="${EPREFIX}"/usr/$(get_libdir)/qt4
-		$(use_enable debug)
-	)
-	autotools-utils_src_configure
 }

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="6"

inherit cmake-utils subversion

DESCRIPTION="MIDI and audio sequencer and notation editor."
HOMEPAGE="http://www.rosegardenmusic.com/";
SRC_URI=""

ESVN_REPO_URI="http://svn.code.sf.net/p/${PN}/code/trunk/${PN}";

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="debug alsa jack lirc sndfile qt4 qt5"

RDEPEND="dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtnetwork:5
	dev-qt/qtprintsupport:5
	dev-qt/qttest:5
	dev-qt/qtwidgets:5
	dev-qt/qtxml:5
	media-libs/dssi
	media-libs/ladspa-sdk
	media-libs/liblo[threads(+)]
	media-libs/liblrdf
	media-libs/libsamplerate
	sci-libs/fftw:3.0
	sys-libs/zlib
	|| ( x11-libs/libX11 virtual/x11 )
	x11-libs/libXext
	alsa? ( media-libs/alsa-lib )
	lirc? ( app-misc/lirc )
	sndfile? ( media-libs/libsndfile )
	jack? ( media-sound/jack-audio-connection-kit )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_configure() {
	local mycmakeargs=(
		-DDISABLE_LIRC=$(!usex lirc)
		-DUSE_QT4=$(usex qt4)
		-DUSE_QT5=$(usex qt5)
	)

	if [ has_use debug ]; then
		CMAKE_BUILD_TYPE="Debug"
	fi

	cmake-utils_src_configure
}

pkg_postinst() {
	einfo "In order to be fully functional and provide the optimal user experience,"
	einfo "Rosegarden requires the following external applications."
	einfo
	einfo "  - General MIDI soft synth (TiMidity + Freepats or better)"
	einfo "  - LilyPond"
	einfo "  - Okular, Evince, Acroread, MuPDF, ePDFView, or other PDF viewer reachable"
	einfo "    through xdg-open"
	einfo "  - lpr or lp"
	einfo "  - QjackCtl (JACK Audio Connection Kit - Qt GUI Interface)"
	einfo "  - FLAC"
	einfo "  - WavPack"
	einfo "  - DSSI plugins"
	einfo "  - LADSPA plugins"

}



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/