/[gentoo-x86]/media-video/smplayer/smplayer-0.6.8.ebuild
Gentoo

Contents of /media-video/smplayer/smplayer-0.6.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sat Mar 3 14:19:17 2012 UTC (2 years, 5 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Remove old version using deprecated qt4 eclass.

(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-video/smplayer/smplayer-0.6.8.ebuild,v 1.10 2010/01/05 19:36:41 nixnut Exp $
4
5 EAPI="2"
6
7 inherit eutils qt4
8
9 MY_PV=${PV##*_p}
10 if [[ "${MY_PV}" != "${PV}" ]]; then
11 # svn snapshot
12 MY_PV=r${MY_PV}
13 MY_P=${PN}-${MY_PV}
14 S="${WORKDIR}/${MY_P}"
15 SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
16 else
17 # regular upstream release
18 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
19 fi
20
21 DESCRIPTION="Great Qt4 GUI front-end for mplayer"
22 HOMEPAGE="http://smplayer.sourceforge.net"
23 LICENSE="GPL-2"
24 SLOT="0"
25 KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd"
26 IUSE="debug"
27
28 DEPEND="x11-libs/qt-gui:4"
29 RDEPEND="${DEPEND}
30 media-video/mplayer[ass,png]"
31
32 LANGS="bg ca cs de en_US es et eu fi fr gl hu it ja ka ko ku mk nl pl pt_BR
33 pt sk sr sv tr zh_CN zh_TW"
34 # langs with long notation in pkg, but no long notation in portage:
35 NOLONGLANGS="ar_SY el_GR ro_RO ru_RU sl_SI uk_UA vi_VN"
36 for X in ${LANGS}; do
37 IUSE="${IUSE} linguas_${X}"
38 done
39 for X in ${NOLONGLANGS}; do
40 IUSE="${IUSE} linguas_${X%_*}"
41 done
42
43 src_prepare() {
44 # Force Ctrl+Q as default quit shortcut
45 epatch "${FILESDIR}/${P}-quit.patch"
46
47 # Upstream Makefile sucks
48 sed -i -e "/^PREFIX=/s:/usr/local:/usr:" \
49 -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
50 -e '/\.\/get_svn_revision\.sh/,+2c\
51 cd src && $(DEFS) $(MAKE)' \
52 "${S}"/Makefile || die "sed failed"
53
54 # Turn debug message flooding off
55 if ! use debug ; then
56 sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
57 "${S}"/src/smplayer.pro || die "sed failed"
58 fi
59 }
60
61 src_configure() {
62 cd "${S}"/src
63 echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
64 eqmake4
65 }
66
67 gen_translation() {
68 ebegin "Generating $1 translation"
69 lrelease ${PN}_${1}.ts
70 eend $? || die "failed to generate $1 translation"
71 }
72
73 src_compile() {
74 emake || die "emake failed"
75
76 # Generate translations
77 cd "${S}"/src/translations
78 local lang= nolangs= x=
79 for lang in ${LINGUAS}; do
80 if has ${lang} ${LANGS}; then
81 gen_translation ${lang}
82 continue
83 elif [[ " ${NOLONGLANGS} " == *" ${lang}_"* ]]; then
84 for x in ${NOLONGLANGS}; do
85 if [[ "${lang}" == "${x%_*}" ]]; then
86 gen_translation ${x}
87 continue 2
88 fi
89 done
90 fi
91 nolangs="${nolangs} ${lang}"
92 done
93 [[ -n ${nolangs} ]] && ewarn "Sorry, but ${PN} does not support the LINGUAS:" ${nolangs}
94 # install fails when no translation is present (bug 244370)
95 [[ -z $(ls *.qm 2>/dev/null) ]] && gen_translation en_US
96 }
97
98 src_install() {
99 # remove unneeded copies of GPL
100 rm -f Copying.txt docs/{cs,en,ja,ru}/gpl.html
101 rm -rf docs/{de,es,nl,ro}
102
103 # remove windows-only files
104 rm "${S}"/*.bat
105
106 emake DESTDIR="${D}" install || die "emake install failed"
107 prepalldocs
108 }

  ViewVC Help
Powered by ViewVC 1.1.20