#!/usr/bin/env beesh

# BEE_VERSION xine-lib-1.2.9-0

SRCURL[0]="http://sourceforge.net/projects/xine/files/xine-lib/${PKGVERSION}/xine-lib-${PKGVERSION}.tar.xz"

PATCHURL[0]=""

# BEE_CONFIGURE=compat

# EXCLUDE=""



#mee_extract() {
#    bee_extract ${@}
#}

#mee_patch() {
#    bee_patch ${@}
#}

mee_configure() {

    sed -e 's/avcodec_alloc_frame/av_frame_alloc/'        \
        -e 's/avcodec_free_frame/av_frame_free/'          \
        -i ${S}/src/combined/ffmpeg/ff_{audio,video}_decoder.c \
        ${S}/src/dxr3/ffmpeg_encoder.c &&

    sed -e 's|wand/magick_wand.h|ImageMagick-6/wand/MagickWand.h|' \
        -i ${S}/src/video_dec/image.c &&

    sed -e '/xineplug_vo_out_xcbxv_la_LIBADD/s/$(XCB_LIBS)/$(XCBSHM_LIBS) $(XCB_LIBS)/' \
        -i ${S}/src/video_out/Makefile.in &&

    sed -e 's/\(xcb-shape >= 1.0\)/xcb \1/' \
        -i ${S}/m4/video_out.m4 &&

    bee_configure --disable-vcd \
    		  --with-external-dvdnav
}

#mee_build() {
#    bee_build
#}

#mee_install() {
#    bee_install
#}