# fss-0002
# -Os seems to be required by some of their mmx asm code
# --enable-vdpau should be enabled, but is not currently compiling
# LIBS="-ldl -lm"

main:
  ./configure LDFLAGS="-lintl -liconv" $CONF $DOCDIR $TARGET --enable-ipv6 --with-wavpack --enable-antialiasing --enable-mmap --with-libflac ${DOCDIR}html/xine/ --disable-samba --with-xcb --with-sdl --with-alsa --enable-opengl --enable-glu--enable-xinerama --enable-xvmc --enable-dvb --enable-v4l2 --enable-bluray --enable-a52dec --enable-faad --enable-mad --with-freetype --disable-vdpau
  sed -i -e 's|^OPENGL_LIBS = |&-ldl |' src/video_out/Makefile
  sed -i -e 's|^LDFLAGS = |&-ldl -lm |' src/demuxers/Makefile
  #sed -i -e 's|include <postprocess.h>|include <postproc/postprocess.h>|' src/post/planar/pp.c src/combined/ffmpeg/ff_video_decoder.c
  #sed -i -e 's|include <avcodec.h>|include <libavcodec/avcodec.h>|' src/combined/ffmpeg/ffmpeg_decoder.h src/combined/ffmpeg/{ffmpeg_encoder.c,ff_dvaudio_decoder.c}
  make pkgconfigdir=${TC}lib/pkgconfig/
  make pkgconfigdir=${TC}lib/pkgconfig/ install
  mv -v /share/aclocal/xine.m4 ${TC}share/aclocal/
  mv -v /bin/xine-config ${TC}bin/
  chmod ugo-x /lib/libxine{,-interface}.la
  mv -v /lib/libxine{,-interface}.la ${TC}lib/
  chgrp -R e_video /share/xine-lib /lib/{xine,libxine.so*}
  rm -Rf /share/{locale,aclocal} /bin/xine-list-*
