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