Files
haikuports/media-video/gnash/gnash-0.bep

175 lines
7.7 KiB
Plaintext

DESCRIPTION="Gnash - GNU Flash player"
HOMEPAGE="http://www.gnu.org/software/gnash/"
# dummy
SRC_URI="http://zlib.net/zlib-1.2.3.tar.bz2"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="gcc4,net-misc/curl,dev-libs/openssl (other deps will be cared for later in the build process)"
# The installation of these packages will be prompted from the build
# script:
# media-video/ffmpeg; media-image/giflib;
# only at compile time: agg >= 2.5; dev-libs/boost
# at runtime, boost-all can be replaced with boost-thread and boost-date_time
# to checkout gnash sources: python >= 2.4; dev-util/bzr
#
# urls:
# http://students.mimuw.edu.pl/~ap262965/haiku-gnash/libboost_thread-1.38.0-gcc4-2009-11-14.zip
# http://students.mimuw.edu.pl/~ap262965/haiku-gnash/libboost_date_time-1.38.0-gcc4-2009-11-14.zip
# SDL gui requires http://students.mimuw.edu.pl/~ap262965/haiku-gnash/SDL-1.2.13-r1a1-x86-gcc4-2009-11-13.zip
# iconv_header http://students.mimuw.edu.pl/~ap262965/haiku-gnash/iconv-091128.h
BUILD {
function ask_install() { \
case `alert --idea "Install $1?" "Install" "Already Installed" "Bail"` in \
"Install") \
wget "$2" ; \
bn=`basename "$2"` ; \
unzip -d /boot "$bn" ; \
true \
;; \
"Already Installed") \
true \
;; \
*) \
echo "NOTE: aborting Gnash installation" ; \
false \
;; \
esac \
}
if test ! -e gnash; then \
case `alert --idea "Install (unstable) bazaar 2.1.0? Bazaar is needed to checkout the Gnash sources." "Install" "Already Installed" "Bail"` in \
"Install") \
if test ! -e bzr-2.1.0.tar.gz ; then \
wget http://launchpad.net/bzr/2.1/2.1.0/+download/bzr-2.1.0.tar.gz ; \
tar xf bzr-2.1.0.tar.gz ; \
fi ; \
pushd bzr-2.1.0 ; \
if test ! -e bzr.old ; then \
mv bzr bzr.old ; \
sed bzr.old > bzr -e 's|/usr/bin/env python|/boot/common/bin/python|' ; \
chmod +x bzr ; \
fi ; \
if test ! -e setup.py.old ; then \
mv setup.py setup.py.old ; \
sed setup.py.old > setup.py -e 's|/usr/bin/env python|/boot/common/bin/python|' ; \
chmod +x setup.py ; \
fi ; \
./setup.py install ; \
popd ; \
true \
;; \
"Already Installed") \
true \
;; \
*) \
echo "NOTE: aborting Gnash installation" ; \
false \
;; \
esac ; \
bzr branch http://bzr.savannah.gnu.org/r/gnash/trunk/ gnash; \
fi
ask_install "Ffmpeg (gcc4)" http://students.mimuw.edu.pl/~ap262965/haiku-gnash/ffmpeg-gcc4-haiku-2009-09-19.zip
ask_install "libgif" http://www.fileden.com/files/2008/8/23/2062382/packages/giflib-4.1.6-gcc2-2008-12-31.zip
ask_install "Boost 1.38.0" http://www.haiku-ports.de/packages/dev-libs/boost/boost-1.38.0-gcc4-haiku-2009-09-13.zip
ask_install "Agg 2.5" http://students.mimuw.edu.pl/~ap262965/haiku-gnash/agg-2.5-gcc4-haiku-2009-09-13.zip
pushd gnash
setgcc gcc4
if test ! -e configure; then \
./autogen.sh ; \
rm config.status ; true ;\
fi
if test ! -e config.status; then \
./configure --prefix=/boot/apps/Gnash --exec-prefix=/boot/apps/Gnash --bindir=/boot/apps/Gnash --sysconfdir=/boot/preferences/Gnash --libdir=/boot/common/lib --with-renderer=agg --enable-fps-debug=yes --enable-plugins --enable-npapi --with-npapi-plugindir=/boot/apps/Gnash ; \
fi
make "CXXFLAGS=-I/boot/common/include/boost-1_38/"
pushd plugin ; \
mkdir -pv .libs ; \
unzip -o ../mime.zip ; \
for GCC_VERSION in gcc2 gcc4 ; do \
( setgcc $GCC_VERSION && \
pushd mozilla-sdk && \
g++ -DHAVE_CONFIG_H -I. -I../.. -DPLUGIN_TRACE -DXP_BEOS -I./include -I../../libbase -I/boot/common/include -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -c np_entry.cpp -o ../np_entry.o && \
g++ -DHAVE_CONFIG_H -I. -I../.. -DPLUGIN_TRACE -DXP_BEOS -I./include -I../../libbase -I/boot/common/include -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -c npp_gate.cpp -o ../npp_gate.o && \
g++ -DHAVE_CONFIG_H -I. -I../.. -DPLUGIN_TRACE -DXP_BEOS -I./include -I../../libbase -I/boot/common/include -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -c npn_gate.cpp -o ../npn_gate.o && \
popd && \
g++ -DHAVE_CONFIG_H -I. -I.. -DPLUGIN_TRACE -DXP_BEOS -DGNASHBINDIR=\"/boot/common/bin\" -DSYSCONFDIR=\"/boot/preferences/Gnash\" -I../libcore/parser -I../libbase -I../backend -I./mozilla-sdk -I./mozilla-sdk/include -I/boot/common/include -I/boot/common/include/boost-1_38/ -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -c plugin.cpp -o plugin.o && \
g++ -shared np_entry.o npp_gate.o npn_gate.o plugin.o -lbe -o .libs/libgnashplugin.$GCC_VERSION.so && \
copyattr x .libs/libgnashplugin.$GCC_VERSION.so \
) || (setgcc gcc4; exit 1); \
done ; \
setgcc gcc4
popd
popd
}
INSTALL {
cd gnash
setgcc gcc4
make install
true DISTRODIR=`pwd`/../../distro
ROOTDIR=/boot/develop/haikuports/media-video/gnash
DISTRODIR=/boot/develop/haikuports/media-video/gnash/distro
if test ! -e "$DISTRODIR"; then \
exit 1; \
fi
install plugin/.libs/libgnashplugin.gcc2.so "$DISTRODIR/boot/apps/Gnash"
install plugin/.libs/libgnashplugin.gcc4.so "$DISTRODIR/boot/apps/Gnash"
pushd "$DISTRODIR"
mkdir -pv boot/home/config/settings
cp -r boot/preferences/Gnash boot/home/config/settings
mkdir -pv boot/home/config/settings/Mozilla/plugins
ln -s /boot/apps/Gnash/libgnashplugin.gcc2.so boot/home/config/settings/Mozilla/plugins/
ln -s /boot/apps/Gnash/libgnashplugin.gcc4.so boot/home/config/settings/Mozilla/plugins/
rm boot/apps/Gnash/gprocessor boot/apps/Gnash/rtmpget boot/apps/Gnash/gnash
rm -r boot/apps/Gnash/include boot/apps/Gnash/share
rm -r boot/common/lib/pkgconfig
rm -r boot/common/lib/gnash/libmoz*
mkdir -pv boot/common/bin/
ln -s /boot/apps/Gnash/haiku-gnash boot/common/bin/haiku-gnash
ln -s /boot/apps/Gnash/haiku-gnash boot/common/bin/gnash
for i in boot/common/lib/gnash/*; do \
strip --strip-unneeded "$i"; \
done ; \
strip --strip-debug boot/apps/Gnash/haiku-gnash ; \
true
xres -o boot/apps/Gnash/haiku-gnash -a VICN:101:BEOS:ICON $ROOTDIR/gnash.hvif
if test `uname -v | cut '-d ' -f1 | cut -c2-` -lt 33997; then \
if test -z `grep -li -e '^set sound off$' boot/home/config/settings/Gnash/gnashrc`; then \
echo 'set sound off' >> boot/home/config/settings/Gnash/gnashrc | sort -u ; \
fi ; \
if test -z `grep -li -e '^set pluginsound off$' boot/home/config/settings/Gnash/gnashpluginrc`; then \
echo 'set pluginsound off' >> boot/home/config/settings/Gnash/gnashpluginrc | sort -u ; \
fi ; \
fi
true this is potentially harmful
if test ! -e /system/lib/libpng.so.1.2; then \
ln -s /system/lib/libpng.so system/lib/libpng.so.1.2 ; \
fi
if test ! -e /system/lib/libz.so.1; then \
ln -s /system/lib/libz.so system/lib/libz.so.1 ; \
fi
if test ! -e /system/lib/libjpeg.so.8.0; then \
ln -s /system/lib/libjpeg.so system/lib/libjpeg.so.8.0 ; \
fi
popd
read -p "Gnash installed, press key "
}