mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 13:38:52 +02:00
gnash
* remove Haiku Alpha related post install code; * move the code responsible for downloading packages of dependencies to it's own file.
This commit is contained in:
@@ -1,87 +1,28 @@
|
||||
DESCRIPTION="Gnash - GNU Flash player"
|
||||
HOMEPAGE="http://www.gnu.org/software/gnash/"
|
||||
# dummy
|
||||
SRC_URI="http://zlib.net/zlib-1.2.3.tar.bz2"
|
||||
SRC_URI="http://ports.haiku-files.org/export/682/haikuports/trunk/media-video/gnash/mime.zip"
|
||||
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
|
||||
DEPEND="gcc4,media-video/ffmpeg,media-image/giflib,agg,dev-libs/boost"
|
||||
# Use 'install-gnash-deps --compile-time' to install deps
|
||||
#
|
||||
# notes:
|
||||
# the /boot/preferences/Gnash directory is not inserted into the archive,
|
||||
# * the /boot/preferences/Gnash directory is not inserted into the archive,
|
||||
# but it might be used to supplement /boot/home/config/settings/Gnash
|
||||
# * on Haiku alpha
|
||||
# ** versioned symlinks to libraries must be created;
|
||||
# ** sound must be disabled in ~/config/Gnash/gnashrc;
|
||||
# ** if you don't mind replacing system files, installing libroot with chgset 34161 backported will improve stability.
|
||||
# ** more info on webpage
|
||||
#
|
||||
|
||||
|
||||
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 \
|
||||
@@ -143,38 +84,17 @@ INSTALL {
|
||||
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
|
||||
ln -sf /boot/apps/Gnash/haiku-gnash boot/common/bin/haiku-gnash
|
||||
ln -sf /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
|
||||
strip --strip-unneeded "$i" || true; \
|
||||
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 "
|
||||
}
|
||||
|
||||
145
media-video/gnash/install-gnash-deps
Executable file
145
media-video/gnash/install-gnash-deps
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#
|
||||
# Installing Gnash dependencies.
|
||||
#
|
||||
#
|
||||
# Gnash at runtime needs
|
||||
# Curl optional package
|
||||
# OpenSSL optional package
|
||||
# media-video/ffmpeg
|
||||
# media-image/giflib
|
||||
# boost::thread
|
||||
# boost::date_time
|
||||
#
|
||||
#
|
||||
# Gnash at compile-time needs
|
||||
# sed
|
||||
# gcc4
|
||||
# libtool
|
||||
# autotools
|
||||
# Curl optional package
|
||||
# OpenSSL optional package
|
||||
# media-video/ffmpeg
|
||||
# media-image/giflib
|
||||
# boost-all
|
||||
# agg >= 2.5 (the version in libbe is 2.4, cannot be used and proper care should be taken to link to -lagg before -lbe)
|
||||
#
|
||||
#
|
||||
# Checking Gnash from repository requires
|
||||
# Python >= 2.4
|
||||
# dev-util/bzr
|
||||
#
|
||||
#
|
||||
# Building the depreciated SDL gui additionally requires
|
||||
# SDL (gcc4 build) http://students.mimuw.edu.pl/~ap262965/haiku-gnash/SDL-1.2.13-r1a1-x86-gcc4-2009-11-13.zip
|
||||
# iconv_header (or the LibIconv optional package) http://students.mimuw.edu.pl/~ap262965/haiku-gnash/iconv-091128.h
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
function ask() {
|
||||
case `alert --idea "Install $1?" "Install" "Already Installed" "Bail"` in
|
||||
"Install")
|
||||
wget "$2"
|
||||
bn=`basename "$2"`
|
||||
unzip -o -d /boot "$bn"
|
||||
;;
|
||||
"Already Installed")
|
||||
;;
|
||||
*)
|
||||
alert --info "Aborted installing Gnash dependencies." Dismiss
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function ask_bzr() {
|
||||
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 ;
|
||||
}
|
||||
|
||||
function ask_opt() {
|
||||
case `alert --idea "Install $1?" "Install" "Already Installed" "Bail"` in
|
||||
"Install")
|
||||
installoptionalpackage -a "$1"
|
||||
;;
|
||||
"Already Installed")
|
||||
;;
|
||||
*)
|
||||
alert --info "Aborted installing Gnash dependencies." Dismiss
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ $# -gt 1 ] || ( [ $# -eq 1 ] && [ x$1 != 'x--compile-time' ] )
|
||||
then
|
||||
alert --info "Usage: $0 [--compile-time]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
COMPILE_TIME=yes
|
||||
else
|
||||
COMPILE_TIME=no
|
||||
fi
|
||||
|
||||
DIRNAME="gnash-dependencies"
|
||||
|
||||
if [ -e "$DIRNAME" ]
|
||||
then
|
||||
echo "Warning: directory \"$DIRNAME\"/ already present"
|
||||
fi
|
||||
|
||||
mkdir "$DIRNAME"
|
||||
pushd "$DIRNAME"
|
||||
|
||||
ask_opt Sed
|
||||
|
||||
|
||||
ask Ffmpeg-gcc4 http://students.mimuw.edu.pl/~ap262965/haiku-gnash/ffmpeg-gcc4-haiku-2009-09-19.zip
|
||||
ask giflib http://www.fileden.com/files/2008/8/23/2062382/packages/giflib-4.1.6-gcc2-2008-12-31.zip
|
||||
|
||||
if [ $COMPILE_TIME == yes ]
|
||||
then
|
||||
ask Boost-all http://www.haiku-ports.de/packages/dev-libs/boost/boost-1.38.0-gcc4-haiku-2009-09-13.zip
|
||||
ask agg-2.5-gcc4 http://students.mimuw.edu.pl/~ap262965/haiku-gnash/agg-2.5-gcc4-haiku-2009-09-13.zip
|
||||
ask_bzr
|
||||
else
|
||||
ask Boost::thread http://students.mimuw.edu.pl/~ap262965/haiku-gnash/libboost_thread-1.38.0-gcc4-2009-11-14.zip
|
||||
ask Boost::date_time http://students.mimuw.edu.pl/~ap262965/haiku-gnash/libboost_date_time-1.38.0-gcc4-2009-11-14.zip
|
||||
fi
|
||||
|
||||
ask_opt Curl
|
||||
ask_opt OpenSSL
|
||||
Reference in New Issue
Block a user