know also installs same versions on native system , for EvilSplicer

This commit is contained in:
Joey Hess 2013-05-08 11:31:42 -04:00
parent a31a9ee39e
commit 9734c482a9

View file

@ -7,24 +7,24 @@
# #
# Needs some extra C libraries to be installed inside the cross-compiler # Needs some extra C libraries to be installed inside the cross-compiler
# lib directory: libgnutls libxml2 # 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 # lib dir
set -e 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 doit () {
echo "$@"
# Not run every time because we don't care about the latest versions. eval "$@"
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
patched () { patched () {
pkg=$1 pkg=$1
version=$2 version=$2
if [ "$native" ]; then
doit cabal install --force-reinstalls $pkg-$version
else
shift 2 shift 2
cabal unpack $pkg-$version cabal unpack $pkg-$version
cd $pkg-$version cd $pkg-$version
@ -32,94 +32,125 @@ patched () {
echo applying $patch echo applying $patch
patch -p1 < $patch patch -p1 < $patch
done done
cabal install "$@" doit cabal install "$@"
cd .. cd ..
fi
} }
unpatched () { unpatched () {
echo "cabal install $@" if [ "$native" ]; then
cabal install "$@" doit cabal install "$@"
else
doit cabal install "$@"
fi
} }
unpatched bytestring-0.10.3.0 text-0.11.2.3 parsec-3.1.3 onlycross () {
patched network 2.4.1.0 if [ ! "$native" ]; then
unpatched cereal-0.3.5.2 eval $@
patched socks 0.4.2 fi
unpatched hslogger-1.2.1 }
patched MissingH 1.2.0.0
patched unix-time 0.1.4 install_pkgs () {
patched async 2.0.1.4 rm -rf tmp
patched zlib 0.5.4.0 mkdir tmp
patched primitive 0.5.0.1 cd tmp
patched vector 0.10.0.1
patched distributive 0.3 onlycross unpatched bytestring-0.10.3.0 text-0.11.2.3 parsec-3.1.3
unpatched hashable-1.1.2.5 patched network 2.4.1.0
patched case-insensitive 0.4.0.1 unpatched cereal-0.3.5.2
unpatched nats-0.1 semigroups-0.9 tagged-0.4.4 comonad-3.0.1.1 comonad-transformers-3.0.1 patched socks 0.4.2
patched profunctors 3.3 unpatched hslogger-1.2.1
patched split 0.2.1.2 patched MissingH 1.2.0.0
unpatched monads-tf-0.1.0.1 patched unix-time 0.1.4
patched gnutls 0.1.4 patched async 2.0.1.4
unpatched attoparsec-0.10.4.0 blaze-builder-0.3.1.1 patched zlib 0.5.4.0
patched syb 0.3.7 patched primitive 0.5.0.1
patched aeson 0.6.1.0 patched vector 0.10.0.1
patched lifted-base 0.2.0.2 patched distributive 0.3
patched resourcet 0.4.4 unpatched hashable-1.1.2.5
patched monad-control 0.3.1.4 patched case-insensitive 0.4.0.1
unpatched conduit-0.5.6 unpatched nats-0.1 semigroups-0.9 tagged-0.4.4 comonad-3.0.1.1 comonad-transformers-3.0.1
patched monad-logger 0.2.3.2 patched profunctors 3.3
unpatched reflection-1.1.7 bifunctors-3.2 semigroupoids-3.0.2 patched split 0.2.1.2
unpatched bifunctors-3.2 comonads-fd-3.0.1 groupoids-3.0.1.1 unpatched monads-tf-0.1.0.1
unpatched profunctor-extras-3.3 onlycross patched gnutls 0.1.4
patched lens 3.8.5 unpatched attoparsec-0.10.4.0 blaze-builder-0.3.1.1
unpatched xml-types-0.3.3 patched syb 0.3.7
patched libxml-sax 0.7.3 patched aeson 0.6.1.0
patched network-conduit 0.6.2.2 patched lifted-base 0.2.0.2
unpatched asn1-data-0.7.1 asn1-types-0.1.3 attoparsec-conduit-0.5.0.3 patched resourcet 0.4.4
unpatched blaze-builder-conduit-0.5.0.3 blaze-markup-0.5.1.5 blaze-html-0.5.1.3 patched monad-control 0.3.1.4
patched cipher-aes 0.1.7 unpatched conduit-0.5.6
unpatched crypto-api-0.10.2 patched monad-logger 0.2.3.2
unpatched cprng-aes-0.3.4 unpatched reflection-1.1.7 bifunctors-3.2 semigroupoids-3.0.2
unpatched http-types-0.8.0 mime-types-0.1.0.3 unpatched bifunctors-3.2 comonads-fd-3.0.1 groupoids-3.0.1.1
unpatched certificate-1.3.7 system-fileio-0.3.11 tls-1.1.2 unpatched profunctor-extras-3.3
unpatched utf8-string-0.3.7 patched lens 3.8.5
unpatched publicsuffixlist-0.1 unpatched xml-types-0.3.3
unpatched xml-conduit-1.0.3.3 patched libxml-sax 0.7.3
unpatched zlib-bindings-0.1.1.3 zlib-conduit-0.5.0.3 patched network-conduit 0.6.2.2
patched shakespeare 1.0.3 unpatched asn1-data-0.7.1 asn1-types-0.1.3 attoparsec-conduit-0.5.0.3
patched hamlet 1.1.6.1 unpatched blaze-builder-conduit-0.5.0.3 blaze-markup-0.5.1.5 blaze-html-0.5.1.3
patched xml-hamlet 0.4.0.3 patched cipher-aes 0.1.7
unpatched certificate-1.3.7 unpatched crypto-api-0.10.2
unpatched dataenc-0.12 hxt-charproperties-9.1.1 \ unpatched cprng-aes-0.3.4
unpatched http-types-0.8.0 mime-types-0.1.0.3
unpatched certificate-1.3.7 system-fileio-0.3.11 tls-1.1.2
unpatched utf8-string-0.3.7
unpatched publicsuffixlist-0.1
unpatched xml-conduit-1.0.3.3
unpatched zlib-bindings-0.1.1.3 zlib-conduit-0.5.0.3
patched shakespeare 1.0.3
patched hamlet 1.1.6.1
patched xml-hamlet 0.4.0.3
unpatched certificate-1.3.7
unpatched dataenc-0.12 hxt-charproperties-9.1.1 \
hxt-regex-xmlschema-9.1.0 hxt-unicode-9.0.2 hxt-9.3.1.1 hxt-regex-xmlschema-9.1.0 hxt-unicode-9.0.2 hxt-9.3.1.1
unpatched -f-templateHaskell QuickCheck-2.5.1.1 unpatched -f-templateHaskell QuickCheck-2.5.1.1
unpatched Crypto-4.2.5.1 unpatched Crypto-4.2.5.1
patched HTTP 4000.2.8 patched HTTP 4000.2.8
patched hS3 0.5.7 patched hS3 0.5.7
patched file-embed 0.0.4.7 patched file-embed 0.0.4.7
patched gsasl 0.3.5 \ patched gsasl 0.3.5 \
--ghc-options=-I$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/sysroot/usr/include/ \ --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/" --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-css 1.0.2
patched shakespeare-i18n 1.0.0.2 patched shakespeare-i18n 1.0.0.2
patched shakespeare-js 1.1.2 patched shakespeare-js 1.1.2
patched persistent 1.1.5.1 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 \ 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 crypto-conduit-0.4.3 wai-1.3.0.3
patched wai-app-static 1.3.1 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 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 DAV 0.3
patched yesod-core 1.1.8 patched yesod-core 1.1.8
patched yesod-persistent 1.1.0.1 patched yesod-persistent 1.1.0.1
patched yesod-form 1.2.1.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-default 1.1.3.2
patched yesod 1.1.8 patched yesod 1.1.8
patched yesod-static 1.1.2 patched yesod-static 1.1.2
cd .. cd ..
rm -rf tmp 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