1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PLOCALES="ar_SY bg ca cs da de el_GR en_US es et eu fi fr gl he_IL hr hu it ja
7 ka ko ku lt mk ms_MY nl pl pt pt_BR ro_RO ru_RU sk sl_SI sr sv th tr uk_UA vi_VN
11 inherit eutils l10n qt4-r2
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
15 DESCRIPTION="Great Qt4 GUI front-end for mplayer"
16 HOMEPAGE="http://smplayer.sourceforge.net/"
19 KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux"
22 DEPEND="dev-qt/qtcore:4
24 COMMON_USE="libass,png,X"
26 media-video/mplayer[bidi,${COMMON_USE}]
30 # Upstream Makefile sucks
31 sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
32 -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
33 -e '/\.\/get_svn_revision\.sh/,+2c\
34 cd src && $(DEFS) $(MAKE)' \
35 "${S}"/Makefile || die "sed failed"
37 # Turn debug message flooding off
39 sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
40 "${S}"/src/smplayer.pro || die "sed failed"
43 # Turn off online update checker, bug #479902
44 sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
45 -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
46 -i "${S}"/src/smplayer.pro || die "sed failed"
48 # l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
53 echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
58 ebegin "Generating $1 translation"
59 lrelease ${PN}_${1}.ts
60 eend $? || die "failed to generate $1 translation"
66 cd "${S}"/src/translations
67 l10n_for_each_locale_do gen_translation
71 # remove unneeded copies of licenses
72 rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
73 rm -r docs/{de,es,fr,nl,ro} || die
75 emake DESTDIR="${D}" install