media-video/smplayer: minor improvements.
[underlay.git] / media-video / smplayer / smplayer-0.5.62.ebuild
blobc7d118c5480c5e2809c1354b9c9b65340bb0e0fc
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit eutils qt4
7 DESCRIPTION="Great front-end for mplayer written in Qt4"
8 HOMEPAGE="http://smplayer.sourceforge.net"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
10 RESTRICT="mirror"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE=""
17 DEPEND="$(qt4_min_version 4.2)"
18 RDEPEND="${DEPEND}
19 >media-video/mplayer-1.0_rc1"
21 LANGS="bg cs de en_US es fr hu it ja ka nl pl pt_BR pt_PT sk sr sv tr zh_CN zh_TW"
22 NOLONGLANGS="ro_RO ru_RU uk_UA"
23 for X in ${LANGS}; do
24 IUSE="${IUSE} linguas_${X}"
25 done
26 for X in ${NOLONGLANGS}; do
27 IUSE="${IUSE} linguas_${X%_*}"
28 done
30 QT4_BUILT_WITH_USE_CHECK="qt3support"
32 src_compile() {
33 local MY_SVNREV="UNKNOWN"
34 echo "SVN-r${MY_SVNREV}" > svn_revision.txt
35 echo "#define SVN_REVISION \"SVN-r${MY_SVNREV}\"" > src/svn_revision.h
37 # Fix paths in Makefile and allow parallel building
38 sed -i -e "/^PREFIX=/s:/usr/local:/usr:" \
39 -e "/^CONF_PREFIX=/s:\$(PREFIX)::" \
40 -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
41 -e '/get_svn_revision.sh/,+2c\
42 cd src && $(DEFS) $(MAKE)' \
43 "${S}"/Makefile || die "sed failed"
45 eqmake4 src/${PN}.pro -o src/Makefile
46 emake || die "emake failed"
48 # Generate translations
49 cd "${S}"/src/translations
50 local LANG=
51 for LANG in ${LINGUAS}; do
52 if has ${LANG} ${LANGS}; then
53 einfo "Generating ${LANG} translation ..."
54 lrelease ${PN}_${LANG}.ts || die "Failed to generate ${LANG} translation!"
55 continue
56 elif [[ " ${NOLONGLANGS} " == *" ${LANG}_"* ]]; then
57 local X=
58 for X in ${NOLONGLANGS}; do
59 if [[ "${LANG}" == "${X%_*}" ]]; then
60 einfo "Generating ${X} translation ..."
61 lrelease ${PN}_${X}.ts || die "Failed to generate ${X} translation!"
62 continue 2
64 done
66 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA."
67 done
70 src_install() {
71 emake DESTDIR="${D}" install || die "emake install failed"
72 prepalldocs