know also installs same versions on native system , for EvilSplicer
This commit is contained in:
parent
a31a9ee39e
commit
9734c482a9
1 changed files with 133 additions and 102 deletions
|
@ -7,24 +7,24 @@
|
|||
#
|
||||
# Needs some extra C libraries to be installed inside the cross-compiler
|
||||
# lib directory: libgnutls libxml2
|
||||
#
|
||||
# The same versions are also installed in the host system. This is needed
|
||||
# in order to use the EvilSplicer to expand Template Haskell.
|
||||
|
||||
# lib dir
|
||||
set -e
|
||||
|
||||
PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH
|
||||
|
||||
# Not run every time because we don't care about the latest versions.
|
||||
if [ ! -e $HOME/.ghc/android-14/arm-linux-androideabi-4.7/cabal/packages/hackage.haskell.org ]; then
|
||||
cabal update
|
||||
fi
|
||||
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
doit () {
|
||||
echo "$@"
|
||||
eval "$@"
|
||||
}
|
||||
|
||||
patched () {
|
||||
pkg=$1
|
||||
version=$2
|
||||
if [ "$native" ]; then
|
||||
doit cabal install --force-reinstalls $pkg-$version
|
||||
else
|
||||
shift 2
|
||||
cabal unpack $pkg-$version
|
||||
cd $pkg-$version
|
||||
|
@ -32,16 +32,31 @@ patched () {
|
|||
echo applying $patch
|
||||
patch -p1 < $patch
|
||||
done
|
||||
cabal install "$@"
|
||||
doit cabal install "$@"
|
||||
cd ..
|
||||
fi
|
||||
}
|
||||
|
||||
unpatched () {
|
||||
echo "cabal install $@"
|
||||
cabal install "$@"
|
||||
if [ "$native" ]; then
|
||||
doit cabal install "$@"
|
||||
else
|
||||
doit cabal install "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
unpatched bytestring-0.10.3.0 text-0.11.2.3 parsec-3.1.3
|
||||
onlycross () {
|
||||
if [ ! "$native" ]; then
|
||||
eval $@
|
||||
fi
|
||||
}
|
||||
|
||||
install_pkgs () {
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
|
||||
onlycross unpatched bytestring-0.10.3.0 text-0.11.2.3 parsec-3.1.3
|
||||
patched network 2.4.1.0
|
||||
unpatched cereal-0.3.5.2
|
||||
patched socks 0.4.2
|
||||
|
@ -59,7 +74,7 @@ unpatched nats-0.1 semigroups-0.9 tagged-0.4.4 comonad-3.0.1.1 comonad-transform
|
|||
patched profunctors 3.3
|
||||
patched split 0.2.1.2
|
||||
unpatched monads-tf-0.1.0.1
|
||||
patched gnutls 0.1.4
|
||||
onlycross patched gnutls 0.1.4
|
||||
unpatched attoparsec-0.10.4.0 blaze-builder-0.3.1.1
|
||||
patched syb 0.3.7
|
||||
patched aeson 0.6.1.0
|
||||
|
@ -100,26 +115,42 @@ patched file-embed 0.0.4.7
|
|||
patched gsasl 0.3.5 \
|
||||
--ghc-options=-I$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/sysroot/usr/include/ \
|
||||
--ld-options="-L $HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/sysroot/usr/lib/"
|
||||
patched network-protocol-xmpp 0.4.4
|
||||
onlycross patched network-protocol-xmpp 0.4.4
|
||||
patched shakespeare-css 1.0.2
|
||||
patched shakespeare-i18n 1.0.0.2
|
||||
patched shakespeare-js 1.1.2
|
||||
patched persistent 1.1.5.1
|
||||
unpatched largeword-1.0.4 crypto-api-0.10.2 http-date-0.0.4 \
|
||||
onlycross unpatched largeword-1.0.4 crypto-api-0.10.2 http-date-0.0.4 \
|
||||
cryptohash-0.8.3 vault-0.2.0.4 unix-compat-0.4.1.1 \
|
||||
crypto-conduit-0.4.3 wai-1.3.0.3
|
||||
patched wai-app-static 1.3.1
|
||||
patched wai-extra 1.3.2.1
|
||||
onlycross patched wai-extra 1.3.2.1
|
||||
patched yesod-routes 1.1.2
|
||||
unpatched http-conduit-1.8.7.1
|
||||
onlycross unpatched http-conduit-1.8.7.1
|
||||
patched DAV 0.3
|
||||
patched yesod-core 1.1.8
|
||||
patched yesod-persistent 1.1.0.1
|
||||
patched yesod-form 1.2.1.1
|
||||
unpatched warp-1.3.7.2 yaml-0.8.2
|
||||
onlycross unpatched warp-1.3.7.2 yaml-0.8.2
|
||||
patched yesod-default 1.1.3.2
|
||||
patched yesod 1.1.8
|
||||
patched yesod-static 1.1.2
|
||||
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
}
|
||||
|
||||
# First, the native build.
|
||||
native=1
|
||||
if [ ! -e $HOME/.cabal/packages/hackage.haskell.org ]; then
|
||||
cabal update
|
||||
fi
|
||||
install_pkgs
|
||||
|
||||
# Now the cross compile.
|
||||
native=0
|
||||
PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH
|
||||
if [ ! -e $HOME/.ghc/android-14/arm-linux-androideabi-4.7/cabal/packages/hackage.haskell.org ]; then
|
||||
cabal update
|
||||
fi
|
||||
install_pkgs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue