Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 523114 - media-video/smplayer qt5 support
Summary: media-video/smplayer qt5 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2014-09-18 11:51 UTC by Alpha Bravo
Modified: 2015-01-31 13:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
smplayer-14.9.0.ebuild (smplayer-14.9.0.ebuild,2.21 KB, text/plain)
2014-09-18 11:53 UTC, Alpha Bravo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alpha Bravo 2014-09-18 11:51:49 UTC
Version 14.9. 
 * Fix for Youtube. 
 * New option to shut down the computer when playback has finished. 
 * The themes and skin icons are loaded from resource files (*.rcc). 
 * New fix for searching subtitles from opensubtitles.org that should return more results.

Reproducible: Always
Comment 1 Alpha Bravo 2014-09-18 11:53:31 UTC
Created attachment 385004 [details]
smplayer-14.9.0.ebuild

Ebuild supports building with Qt5.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-18 11:59:32 UTC
Comment on attachment 385004 [details]
smplayer-14.9.0.ebuild

--- smplayer-14.3.0.ebuild
+++ smplayer-14.9.0.ebuild
@@ -8,19 +8,23 @@
 zh_CN zh_TW"
 PLOCALE_BACKUP="en_US"

-inherit eutils l10n qt4-r2
+inherit eutils l10n qmake-utils

 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

-DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+DESCRIPTION="Great Qt GUI front-end for mplayer"
 HOMEPAGE="http://smplayer.sourceforge.net/"
 LICENSE="GPL-2 BSD"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
-IUSE="debug"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug qt4 qt5"

-DEPEND="dev-qt/qtcore:4
-       dev-qt/qtgui:4"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="qt4? ( dev-qt/qtcore:4
+              dev-qt/qtgui:4 )
+       qt5? ( dev-qt/qtcore:5
+              dev-qt/qtgui:5 )"
 COMMON_USE="libass,png,X"
 RDEPEND="${DEPEND}
        || (
@@ -53,7 +57,11 @@
 src_configure() {
        cd "${S}"/src
        echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
-       eqmake4
+       if use qt5 ; then
+               eqmake5
+       else
+               eqmake4
+       fi
 }

 gen_translation() {
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2014-09-18 13:58:56 UTC
I think we should keep all previous KEYWORDS for now, USE=qt5 is masked.

The rest of the diff looks good to me but I haven't tested the new version.
Comment 4 Nikos Chantziaras 2014-09-20 10:27:34 UTC
The new version will not work if the skins interface is enabled in smplayer's settings dialog. A new smplayer-skins package is needed. However, upstream uses versioning now for that package ("14.9.0"). Portage will not detect this as an upgrade path, since the current skins packages are date-versioned.

The way I solved this in the multimedia-overlay, is to put x11-themes/smplayer-skins-14.9.0 in SLOT 1, and then depend on that slot in the smplayer ebuild.
Comment 5 Alpha Bravo 2014-09-22 05:11:56 UTC
--- smplayer-14.3.0.ebuild
+++ smplayer-14.9.0.ebuild
@@ -8,19 +8,35 @@
 zh_CN zh_TW"
 PLOCALE_BACKUP="en_US"
 
-inherit eutils l10n qt4-r2
+inherit eutils l10n qmake-utils
 
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 
-DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+DESCRIPTION="Great Qt GUI front-end for mplayer"
 HOMEPAGE="http://smplayer.sourceforge.net/"
 LICENSE="GPL-2 BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
-IUSE="debug"
+IUSE="debug qt4 qt5"
 
-DEPEND="dev-qt/qtcore:4
-       dev-qt/qtgui:4"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="
+       qt4? (
+               dev-qt/qtcore:4
+               dev-qt/qtgui:4
+               dev-qt/qtscript:4
+       )
+       qt5? (
+               dev-qt/linguist-tools
+               dev-qt/qtcore:5
+               dev-qt/qtdbus:5
+               dev-qt/qtgui:5
+               dev-qt/qtnetwork:5
+               dev-qt/qtscript:5
+               dev-qt/qtwidgets:5
+               dev-qt/qtxml:5
+       )"
 COMMON_USE="libass,png,X"
 RDEPEND="${DEPEND}
        || (
@@ -53,12 +69,21 @@
 src_configure() {
        cd "${S}"/src
        echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
-       eqmake4
+
+       if use qt5 ; then
+               eqmake5
+       else
+               eqmake4
+       fi
 }
 
 gen_translation() {
        ebegin "Generating $1 translation"
-       lrelease ${PN}_${1}.ts
+       if use qt5 ; then
+               /usr/lib64/qt5/bin/lrelease ${PN}_${1}.ts
+       else
+               lrelease ${PN}_${1}.ts
+       fi
        eend $? || die "failed to generate $1 translation"
 }
Comment 6 Alpha Bravo 2014-09-22 06:16:25 UTC
--- smplayer-14.3.0.ebuild
+++ smplayer-14.9.0.ebuild
@@ -8,19 +8,35 @@
 zh_CN zh_TW"
 PLOCALE_BACKUP="en_US"
 
-inherit eutils l10n qt4-r2
+inherit eutils l10n qmake-utils
 
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 
-DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+DESCRIPTION="Great Qt GUI front-end for mplayer"
 HOMEPAGE="http://smplayer.sourceforge.net/"
 LICENSE="GPL-2 BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
-IUSE="debug"
+IUSE="debug qt4 qt5"
 
-DEPEND="dev-qt/qtcore:4
-       dev-qt/qtgui:4"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="
+       qt4? (
+               dev-qt/qtcore:4
+               dev-qt/qtgui:4
+               dev-qt/qtscript:4
+       )
+       qt5? (
+               dev-qt/linguist-tools
+               dev-qt/qtcore:5
+               dev-qt/qtdbus:5
+               dev-qt/qtgui:5
+               dev-qt/qtnetwork:5
+               dev-qt/qtscript:5
+               dev-qt/qtwidgets:5
+               dev-qt/qtxml:5
+       )"
 COMMON_USE="libass,png,X"
 RDEPEND="${DEPEND}
        || (
@@ -43,8 +59,10 @@
        fi
 
        # Turn off online update checker, bug #479902
+       # Turn off skins support until versioning issues are resolved
        sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
                -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+               -e 's:DEFINES += SKINS:#DEFINES += SKINS:'\
                -i "${S}"/src/smplayer.pro || die "sed failed"
 
        # l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
@@ -53,12 +71,21 @@
 src_configure() {
        cd "${S}"/src
        echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
-       eqmake4
+
+       if use qt5 ; then
+               eqmake5
+       else
+               eqmake4
+       fi
 }
 
 gen_translation() {
        ebegin "Generating $1 translation"
-       lrelease ${PN}_${1}.ts
+       if use qt5 ; then
+               /usr/lib64/qt5/bin/lrelease ${PN}_${1}.ts
+       else
+               lrelease ${PN}_${1}.ts
+       fi
        eend $? || die "failed to generate $1 translation"
 }
Comment 7 Alpha Bravo 2014-09-22 06:19:48 UTC
Comment 5: Fixed keywords, dependencies and failure when building on Qt5-only system.
Comment 6: Attempt to disable skins support in response to comment 4.
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2014-09-24 08:40:01 UTC
I have done the version bump, but haven't had time to test the Qt5 support yet. So I'm leaving that open for now. 

The skins issue is resolved by removing the old ebuilds, as none were marked stable. This is still an issue with the themes package, but that will be resolved in time.
Comment 9 Ben de Groot (RETIRED) gentoo-dev 2015-01-31 13:21:47 UTC
Implemented in 14.9.0.6690 (masked due to mpv/libav mask).