754f76872d637f76e23b9ad0ecca9e628fa82bcf
[vuplus_openembedded] / libxine / libxine_1.0.0-rc6a.oe
1 # libxine OE build file
2 # Modified by Advanced Micro Devices, Inc.
3
4 #FIXME: libxine doesn't build when X11 has been built before:
5 #| In file included from video_out_dxr3.c:55:
6 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:16: error: parse error before "Bool"
7 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:17: error: parse error before '*' token
8 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:20: warning: type defaults to `int' in declaration of 
9 #`XineramaQueryExtension'
10 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:20: warning: data definition has no type or storage class
11 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:22: error: parse error before "XineramaQueryVersion"
12 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:23: error: parse error before '*' token
13 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:26: warning: type defaults to `int' in declaration of 
14 #`XineramaQueryVersion'
15 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:26: warning: data definition has no type or storage class
16 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:28: error: parse error before "XineramaIsActive"
17 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:28: error: parse error before '*' token
18 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:28: warning: type defaults to `int' in declaration of 
19 #`XineramaIsActive'
20 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:28: warning: data definition has no type or storage class
21 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/X11/extensions/Xinerama.h:41: error: parse error before '*' token
22 #| In file included from /local/pkg/oe/collie/tmp/staging/arm-linux/include/inttypes.h:28,
23 #|                  from ../../src/xine-engine/xine_internal.h:31,
24 #|                  from video_out_dxr3.c:65:
25 #| /local/pkg/oe/collie/tmp/staging/arm-linux/include/stdint.h:49: error: syntax error before "typedef"
26
27 DESCRIPTION = "libxine"
28 SECTION = "libs"
29 PRIORITY = "optional"
30 MAINTAINER = "Pawel Osiczko <p.osiczko@tetrapyloctomy.org>"
31 DEPENDS = "zlib libogg libvorbis libmad"
32
33 inherit autotools pkgconfig
34
35 S = "${WORKDIR}/xine-lib-1-rc6a"
36
37 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/xine/xine-lib-1-rc6a.tar.gz \
38         file://cpu.patch;patch=1 \
39         file://configure.patch;patch=1"
40
41 SOV = "1.0.6"
42
43 # Omit the annoying xine-config in /usr/bin
44 FILES_${PN}="/usr/lib/*.so*"
45
46 # And include it in the dev package
47 FILES_${PN}-dev += " /usr/bin"
48
49 EXTRA_OECONF="-with-zlib-path=${STAGING_DIR}/${HOST_SYS} \
50         --with-vorbis-prefix=${STAGING_DIR}/${HOST_SYS} \
51         --disable-oggtest \
52         --with-ogg-prefix=${STAGING_DIR}/${HOST_SYS} \
53         --disable-altivec --disable-vis --disable-mlib \
54         --enable-shared --disable-static \ 
55         --disable-fb --disable-alsa --disable-vcd \
56         --disable-asf --disable-faad --disable-iconv \
57         --disable-nls --disable-aalib --without-x \
58         --without-v4l --without-arts --without-sdl"
59                               
60 do_compile() {
61         oe_runmake LIBTOOL=${S}/${TARGET_SYS}-libtool
62 }
63
64 do_install() {
65         oe_runmake DESTDIR=${D} LIBTOOL=${S}/${TARGET_SYS}-libtool install
66 }
67
68 HEADERS="src/xine-engine/xineintl.h src/xine-utils/xineutils.h            \
69         src/xine-engine/xine_internal.h  src/xine-engine/xine_plugin.h    \
70         src/xine-utils/xine_buffer.h     src/xine-engine/video_out.h      \
71         src/xine-engine/buffer.h         src/xine-engine/vo_scale.h       \
72         src/xine-engine/configfile.h     src/xine-utils/attributes.h      \
73         src/xine-engine/info_helper.h    src/xine-engine/scratch.h        \
74         src/xine-engine/audio_decoder.h  src/input/input_plugin.h         \
75         src/xine-engine/spu_decoder.h    src/xine-engine/audio_out.h      \
76         src/xine-engine/io_helper.h      src/xine-engine/video_decoder.h  \
77         src/xine-engine/broadcaster.h    src/xine-engine/metronom.h       \
78         src/xine-utils/xmllexer.h        src/xine-engine/osd.h            \
79         src/xine-engine/video_overlay.h  src/xine-utils/xmlparser.h       \
80         src/xine-utils/compat.h          src/xine-engine/plugin_catalog.h \
81         src/xine-engine/post.h           src/demuxers/demux.h             \
82         src/xine-engine/resample.h"
83         
84
85 do_stage() {
86         install -d ${STAGING_INCDIR}/xine
87
88         install -m 0644 ${S}/include/xine.h ${STAGING_INCDIR}
89
90         for file in ${HEADERS}; do
91                 cp ${S}/$file ${STAGING_INCDIR}/xine/`basename $file`
92         done
93
94         oe_libinstall -so -C src/xine-engine libxine ${STAGING_LIBDIR}
95 }
96
97 python populate_packages_prepend () {
98         plugindir = oe.data.expand('${libdir}/xine/plugins/1.0.0', d)
99         do_split_packages(d, plugindir, '^xineplug_(.*)\.so$', 'libxine-plugin-%s', 'Xine plugin for %s', extra_depends='' )
100
101         postdir = oe.data.expand('${libdir}/xine/plugins/1.0.0/post', d)
102         do_split_packages(d, postdir, '^xineplug_(.*)\.so$', 'libxine-plugin-%s', 'Xine plugin for %s', extra_depends='' )
103
104         fontdir = oe.data.expand('${datadir}/xine/libxine1/fonts', d)
105         do_split_packages(d, fontdir, '^(.*).xinefont.gz$', 'libxine-font-%s', 'Xine font %s', extra_depends='' )
106 }