/[gentoo-x86]/media-libs/mlt/mlt-0.7.6-r1.ebuild
Gentoo

Contents of /media-libs/mlt/mlt-0.7.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Wed May 16 08:21:59 2012 UTC (12 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Stabilise latest on amd64 and x86. Drop older overshadowed versions.

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

1 aballier 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.6 # $Header: /var/cvsroot/gentoo-x86/media-libs/mlt/mlt-0.7.6-r1.ebuild,v 1.5 2012/05/05 08:02:35 jdhore Exp $
4 aballier 1.1
5     EAPI=4
6     PYTHON_DEPEND="python? 2:2.6"
7     inherit eutils toolchain-funcs multilib python
8    
9     DESCRIPTION="An open source multimedia framework, designed and developed for television broadcasting"
10     HOMEPAGE="http://www.mltframework.org/"
11     SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz"
12    
13     LICENSE="GPL-2"
14     SLOT="0"
15 tomka 1.4 KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
16 aballier 1.1 IUSE="compressed-lumas dv debug ffmpeg frei0r gtk jack kde libsamplerate melt
17     mmx qt4 quicktime sdl sse sse2 swfdec vorbis xine xml lua python ruby vdpau" # java perl php tcl
18    
19     RDEPEND="ffmpeg? ( virtual/ffmpeg[vdpau?] )
20     dv? ( >=media-libs/libdv-0.104 )
21     xml? ( >=dev-libs/libxml2-2.5 )
22     vorbis? ( >=media-libs/libvorbis-1.1.2 )
23     sdl? ( >=media-libs/libsdl-1.2.10
24     >=media-libs/sdl-image-1.2.4 )
25     libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
26     jack? ( media-sound/jack-audio-connection-kit
27     media-libs/ladspa-sdk
28     >=dev-libs/libxml2-2.5 )
29     frei0r? ( media-plugins/frei0r-plugins )
30     gtk? ( x11-libs/gtk+:2
31     media-libs/libexif
32     x11-libs/pango )
33     quicktime? ( media-libs/libquicktime )
34     swfdec? ( media-libs/swfdec )
35     xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
36     qt4? ( x11-libs/qt-gui:4 x11-libs/qt-svg:4 media-libs/libexif )
37     !media-libs/mlt++
38     lua? ( >=dev-lang/lua-5.1.4-r4 )
39     ruby? ( dev-lang/ruby )"
40     # sox? ( media-sound/sox )
41     # java? ( >=virtual/jre-1.5 )
42     # perl? ( dev-lang/perl )
43     # php? ( dev-lang/php )
44     # tcl? ( dev-lang/tcl )
45    
46     SWIG_DEPEND=">=dev-lang/swig-2.0"
47     DEPEND="${RDEPEND}
48 jdhore 1.5 virtual/pkgconfig
49 aballier 1.2 compressed-lumas? ( || ( media-gfx/imagemagick[png]
50     media-gfx/graphicsmagick[imagemagick,png] ) )
51 jdhore 1.5 lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
52 aballier 1.1 python? ( ${SWIG_DEPEND} )
53     ruby? ( ${SWIG_DEPEND} )"
54     # java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
55     # perl? ( ${SWIG_DEPEND} )
56     # php? ( ${SWIG_DEPEND} )
57     # tcl? ( ${SWIG_DEPEND} )
58    
59     pkg_setup() {
60     python_set_active_version 2
61     python_pkg_setup
62     }
63    
64     src_prepare() {
65     epatch "${FILESDIR}"/${PN}-0.7.2-ruby-link.patch \
66     "${FILESDIR}"/${PN}-0.7.6-ffmpeg.patch
67     # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
68     for x in python lua; do
69     sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
70     done
71     sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
72     }
73    
74     src_configure() {
75     tc-export CC CXX
76    
77     local myconf="--enable-gpl
78     --enable-motion-est
79     $(use_enable debug)
80     $(use_enable dv)
81     $(use_enable sse)
82     $(use_enable sse2)
83     $(use_enable swfdec)
84     $(use_enable gtk gtk2)
85     $(use_enable vorbis)
86     $(use_enable sdl)
87     $(use_enable jack jackrack)
88     $(use_enable ffmpeg avformat)
89     $(use_enable frei0r)
90     $(use_enable melt)
91     $(use_enable libsamplerate resample)
92     $(use vdpau && echo ' --avformat-vdpau')
93     $(use_enable xml)
94     $(use_enable xine)
95     $(use_enable kde kdenlive)
96     $(use_enable qt4 qimage)
97     --disable-sox"
98     #$(use_enable sox) FIXME
99    
100     use ffmpeg && myconf="${myconf} --avformat-swscale"
101    
102     (use quicktime && use dv) || myconf="${myconf} --disable-kino"
103    
104     use compressed-lumas && myconf="${myconf} --luma-compress"
105    
106     ( use x86 || use amd64 ) && \
107     myconf="${myconf} $(use_enable mmx)" ||
108     myconf="${myconf} --disable-mmx"
109    
110     use melt || sed -i -e "s;src/melt;;" Makefile
111    
112     # TODO: add swig language bindings
113     # see also http://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
114    
115     local swig_lang
116     # TODO: java perl php tcl
117     for i in lua python ruby ; do
118     use $i && swig_lang="${swig_lang} $i"
119     done
120     [ -z "${swig_lang}" ] && swig_lang="none"
121    
122     econf ${myconf} --swig-languages="${swig_lang}"
123     sed -i -e s/^OPT/#OPT/ "${S}/config.mak"
124     }
125    
126     src_install() {
127     emake DESTDIR="${D}" install || die
128     dodoc AUTHORS ChangeLog NEWS README docs/*.txt
129    
130     dodir /usr/share/${PN}
131     insinto /usr/share/${PN}
132     doins -r demo
133    
134     docinto swig
135    
136     # Install SWIG bindings
137     if use lua; then
138     cd "${S}"/src/swig/lua
139     exeinto $(pkg-config --variable INSTALL_CMOD lua)
140     doexe mlt.so || die
141     dodoc play.lua
142     fi
143    
144     if use python; then
145     cd "${S}"/src/swig/python
146     insinto $(python_get_sitedir)
147     doins mlt.py || die
148     exeinto $(python_get_sitedir)
149     doexe _mlt.so || die
150     dodoc play.py
151     fi
152    
153     if use ruby; then
154     cd "${S}"/src/swig/ruby
155     exeinto $("${EPREFIX}"/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')
156     doexe mlt.so || die
157     dodoc play.rb thumbs.rb
158     fi
159     # TODO: java perl php tcl
160     }
161    
162     pkg_postinst() {
163     if use python; then
164     python_mod_optimize mlt.py
165     fi
166     }
167    
168     pkg_postrm() {
169     if use python; then
170     python_mod_cleanup mlt.py
171     fi
172     }

  ViewVC Help
Powered by ViewVC 1.1.13