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

Contents of /media-libs/mlt/mlt-0.7.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Jul 12 13:09:11 2013 UTC (12 months, 1 week ago) by aballier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
remove old

(Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key 160F534A)

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

  ViewVC Help
Powered by ViewVC 1.1.20