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

Contents of /media-video/smplayer/smplayer-0.6.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Dec 31 16:17:50 2008 UTC (10 years, 5 months ago) by armin76
Branch: MAIN
Changes since 1.2: +2 -2 lines
x86 stable wrt #253077
(Portage version: 2.1.6.4/cvs/Linux 2.6.26-gentoo-r2 ia64)

1 # Copyright 1999-2008 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.5-r1.ebuild,v 1.2 2008/12/31 02:22:18 bluebird Exp $
4
5 EAPI=2
6 inherit eutils qt4
7
8 DESCRIPTION="Great Qt4 GUI front-end for mplayer"
9 HOMEPAGE="http://smplayer.sourceforge.net"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 sparc x86 ~x86-fbsd"
14 IUSE="debug"
15 DEPEND="|| ( x11-libs/qt-gui:4
16 =x11-libs/qt-4.3* )"
17 RDEPEND="${DEPEND}
18 || ( >media-video/mplayer-1.0_rc1[png,srt]
19 >=media-video/mplayer-1.0_rc2_p28058[ass,png] )"
20
21 LANGS="bg ca cs de en_US es eu fi fr gl hu it ja ka ko ku mk nl pl pt_BR pt_PT sk sr sv tr zh_CN zh_TW"
22 NOLONGLANGS="ar_SY el_GR ro_RO ru_RU sl_SI 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
29
30 src_prepare() {
31 # Fix paths in Makefile and allow parallel building
32 sed -i -e "/^PREFIX=/s:/usr/local:/usr:" \
33 -e "/^CONF_PREFIX=/s:\$(PREFIX)::" \
34 -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
35 -e '/get_svn_revision.sh/,+2c\
36 cd src && $(DEFS) $(MAKE)' \
37 "${S}"/Makefile || die "sed failed"
38
39 # Turn debug message flooding off
40 if ! use debug ; then
41 sed -i "s:#DEFINES += NO_DEBUG_ON_CONSOLE:DEFINES += NO_DEBUG_ON_CONSOLE:" \
42 "${S}"/src/smplayer.pro || die "sed failed"
43 fi
44 }
45
46 src_configure() {
47 eqmake4 src/${PN}.pro -o src/Makefile
48 }
49
50 src_compile() {
51 emake || die "emake failed"
52
53 # Generate translations
54 cd "${S}"/src/translations
55 local LANG=
56 for LANG in ${LINGUAS}; do
57 if has ${LANG} ${LANGS}; then
58 einfo "Generating ${LANG} translation ..."
59 lrelease ${PN}_${LANG}.ts || die "Failed to generate ${LANG} translation!"
60 continue
61 elif [[ " ${NOLONGLANGS} " == *" ${LANG}_"* ]]; then
62 local X=
63 for X in ${NOLONGLANGS}; do
64 if [[ "${LANG}" == "${X%_*}" ]]; then
65 einfo "Generating ${X} translation ..."
66 lrelease ${PN}_${X}.ts || die "Failed to generate ${X} translation!"
67 continue 2
68 fi
69 done
70 fi
71 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA."
72 done
73 # install fails when no translation is present (bug 244370)
74 [[ -f *.qm ]] || lrelease ${PN}_en_US.ts
75 }
76
77 src_install() {
78 # remove unneeded copies of GPL
79 rm Copying.txt docs/en/gpl.html docs/ru/gpl.html
80 for i in de es ja nl ro ; do
81 rm -rf docs/$i
82 done
83
84 # remove windows-only files
85 rm "${S}"/*.bat
86
87 emake DESTDIR="${D}" install || die "emake install failed"
88 prepalldocs
89
90 einfo "Note that the default configuration files location has changed"
91 einfo "since 0.6.4. You may want to move your existing configuration:"
92 einfo "mv ~/.smplayer ~/.config/smplayer"
93 }

  ViewVC Help
Powered by ViewVC 1.1.20