#!/bin/sh -x
#
#x86
#
#Adds PulseAudio support to the Flash browser plugin
#http://git.0pointer.de/?p=libflashsupport.git;a=summary
#http://repo.or.cz/w/libflashsupport-pulse.git
#git://git.0pointer.de/libflashsupport.git

tce-load -i git pulseaudio-dev libtool openssl-1.0.0-dev automake compiletc

mkdir ~/libflashsupport-pulse
cd ~/libflashsupport-pulse

git clone git://git.0pointer.de/libflashsupport.git ~/libflashsupport-pulse

sed -i 's|#define V4L1|//#define V4L1|g' ~/libflashsupport-pulse/flashsupport.c

CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti"

NOCONFIGURE=1 ./bootstrap.sh
./configure --prefix=/usr/local
make


cd .libs
strip --strip-unneeded ./libflashsupport.so
