1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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"
17 DEPEND
="$(qt4_min_version 4.2)"
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"
24 IUSE
="${IUSE} linguas_${X}"
26 for X
in ${NOLONGLANGS}; do
27 IUSE
="${IUSE} linguas_${X%_*}"
30 QT4_BUILT_WITH_USE_CHECK
="qt3support"
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
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
!"
56 elif [[ " ${NOLONGLANGS} " == *" ${LANG}_
"* ]]; then
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!"
66 ewarn
"Sorry, but ${PN} does not support the ${LANG} LINGUA."
71 emake DESTDIR
="${D}" install || die
"emake install failed"