Initial OE addition.
[vuplus_openembedded] / libxine / libxine_1.0.0-beta12.oe
1 DESCRIPTION = "libxine is a library for multimedia players. \
2 It plays back CDs, DVDs, and VCDs. It also decodes multimedia \
3 files like AVI, MOV, WMV, and MP3 from local disk drives, \
4 and displays multimedia streamed over the Internet. It interprets \
5 many of the most common multimedia formats available - \
6 and some of the most uncommon formats, too."
7 SECTION = "libs"
8 PRIORITY = "optional"
9 DEPENDS = "zlib libogg tremor libmad"
10 PR = "r4"
11
12 inherit autotools pkgconfig binconfig
13
14 SRC_URI = "${SOURCEFORGE_MIRROR}/xine/xine-lib-1-beta12.tar.gz \
15            file://full.patch;patch=1 \
16            file://libvorbis.patch;patch=1 \
17            file://demux_ogg.patch;patch=1 \
18            file://configure.ac.patch;patch=1 \
19            file://vo_scale.patch;patch=1 \
20            file://oss.patch;patch=1;pnum=0 \
21            file://fix-oss-plugin.patch;patch=1 \
22            file://mpegvideo-static-inlining.patch;patch=1 \
23            file://fix-syntax-xine-vorbis-decoder.patch;patch=1 \
24            file://fftscope-static-inlining.patch;patch=1"
25 S = "${WORKDIR}/xine-lib-1-beta12"
26
27 SOV = "1.0.6"
28
29 do_configure() {
30         ./autogen.sh --host ${TARGET_SYS} --build ${BUILD_SYS} \
31               --enable-shared --disable-static --prefix=${prefix} \
32               --with-zlib-path=${STAGING_DIR}/${HOST_SYS} --with-vorbis-prefix=${STAGING_DIR}/${HOST_SYS} \
33               --disable-oggtest --with-ogg-prefix=${STAGING_DIR}/${HOST_SYS} --without-x \
34         --disable-iconv --disable-nls --without-arts --without-sdl \
35         --disable-aalib
36 }
37
38 do_compile() {
39         oe_runmake LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool OGG_LIBS=${STAGING_LIBDIR}/libogg.so
40 }
41
42 do_stage() {
43         oe_runmake -e LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool \
44           -C src install-data \
45           'prefix=${STAGING_DIR}' 'exec_prefix=${STAGING_DIR}' \
46           'libdir=${STAGING_LIBDIR}' \
47           'includedir=${STAGING_INCDIR}'
48
49         oe_runmake -e LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool \
50           -C include install-data \
51           'prefix=${STAGING_DIR}' 'exec_prefix=${STAGING_DIR}' \
52           'libdir=${STAGING_LIBDIR}' \
53           'includedir=${STAGING_INCDIR}'
54
55         for plugin in `find ${S}/src -type f -name xineplug*.la`; do 
56           dir=`dirname $plugin`
57           libname=`basename $plugin|sed -e's,\.la,,'` 
58           oe_libinstall -so -C $dir $libname ${STAGING_LIBDIR}/xine/plugins/1.0.0
59         done
60
61         oe_libinstall -so -C src/xine-engine libxine ${STAGING_LIBDIR}
62 }
63
64 do_install() {
65         oe_runmake -e LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool \
66           -C src install-data \
67           'prefix=${D}' 'exec_prefix=${D}' 'libdir=${D}/${libdir}' \
68           'includedir=${D}/${includedir}' 
69
70         oe_runmake -e LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool \
71           -C include install-data \
72           'prefix=${D}' 'exec_prefix=${D}' 'libdir=${D}/${libdir}' \
73           'includedir=${D}/${includedir}'
74
75         for plugin in `find ${S}/src -type f -name xineplug*.la`; do
76           dir=`dirname $plugin`
77           libname=`basename $plugin|sed -e's,\.la,,'`
78           oe_libinstall -so -C $dir $libname ${D}/${libdir}/xine/plugins/1.0.0
79         done
80
81         oe_libinstall -so -C src/xine-engine libxine ${D}/${libdir}
82 }
83
84 python populate_packages_prepend () {
85         plugins_dir = oe.data.expand('/usr/lib/xine/plugins/1.0.0/', d)
86         
87         do_split_packages(d, plugins_dir, file_regex='^xineplug_(.*).so$', output_pattern='libxine-plugin-%s', description='Xine plugin - %s')
88 }
89