From b81e86a6ed7db7e8957f664631a8cdb4126e02dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Sep 2013 19:13:31 +0100 Subject: successfully builds (except XMPP) --- Creds.hs | 8 +-- Makefile | 8 +-- git-annex.cabal | 8 ++- standalone/android/evilsplicer-headers.hs | 7 +- .../async_fix-build-with-new-ghc.patch | 25 ++++++++ .../file-embed_export-TH-symbols.patch | 25 ++++++++ .../gnuidn_fix-build-with-new-base.patch | 50 +++++++++++++++ .../wai-app-static_1.3.1-remove-TH.patch | 36 ----------- .../wai-app-static_deal-with-TH.patch | 54 ++++++++++++++++ ...es_export-module-referenced-by-TH-splices.patch | 29 +++++++++ .../yesod_001_hacked-up-for-Android.patch | 74 ++++++++++++++++++++++ .../yesod_002_hack-around-missing-symbols.patch | 41 ++++++++++++ .../yesod_hacked-up-for-Android.patch | 74 ---------------------- standalone/android/install-haskell-packages | 30 ++++----- 14 files changed, 329 insertions(+), 140 deletions(-) create mode 100644 standalone/android/haskell-patches/async_fix-build-with-new-ghc.patch create mode 100644 standalone/android/haskell-patches/file-embed_export-TH-symbols.patch create mode 100644 standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch delete mode 100644 standalone/android/haskell-patches/wai-app-static_1.3.1-remove-TH.patch create mode 100644 standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch create mode 100644 standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch create mode 100644 standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch create mode 100644 standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch delete mode 100644 standalone/android/haskell-patches/yesod_hacked-up-for-Android.patch diff --git a/Creds.hs b/Creds.hs index 588d67cfe..70e00ef34 100644 --- a/Creds.hs +++ b/Creds.hs @@ -16,10 +16,9 @@ import Crypto import Types.Remote (RemoteConfig, RemoteConfigKey) import Remote.Helper.Encryptable (remoteCipher, embedCreds) #ifndef mingw32_HOST_OS -import Utility.Env (setEnv) +import Utility.Env (setEnv, getEnv) #endif -import System.Environment import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Map as M import Utility.Base64 @@ -101,11 +100,10 @@ getRemoteCredPair c storage = maybe fromcache (return . Just) =<< fromenv {- Gets a CredPair from the environment. -} getEnvCredPair :: CredPairStorage -> IO (Maybe CredPair) getEnvCredPair storage = liftM2 (,) - <$> get uenv - <*> get penv + <$> getEnv uenv + <*> getEnv penv where (uenv, penv) = credPairEnvironment storage - get = catchMaybeIO . getEnv {- Stores a CredPair in the environment. -} setEnvCredPair :: CredPair -> CredPairStorage -> IO () diff --git a/Makefile b/Makefile index 5b1a6d467..87b84929f 100644 --- a/Makefile +++ b/Makefile @@ -160,12 +160,12 @@ osxapp: Build/Standalone Build/OSXMkLibs rm -f tmp/git-annex.dmg.bz2 bzip2 --fast tmp/git-annex.dmg -ANDROID_FLAGS?= +ANDROID_FLAGS?=-f-XMPP # Cross compile for Android. # Uses https://github.com/neurocyte/ghc-android android: Build/EvilSplicer echo "Running native build, to get TH splices.." - if [ ! -e dist/setup/setup ]; then $(CABAL) configure -f"-Production $(ANDROID_FLAGS)" -O0; fi + if [ ! -e dist/setup/setup ]; then $(CABAL) configure -f-Production -O0 $(ANDROID_FLAGS); fi mkdir -p tmp if ! $(CABAL) build --ghc-options=-ddump-splices 2> tmp/dump-splices; then tail tmp/dump-splices >&2; exit 1; fi echo "Setting up Android build tree.." @@ -183,9 +183,9 @@ android: Build/EvilSplicer # Cabal cannot cross compile with custom build type, so workaround. sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal if [ ! -e tmp/androidtree/dist/setup/setup ]; then \ - cd tmp/androidtree && $$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/cabal configure -f"Android $(ANDROID_FLAGS)"; \ + cd tmp/androidtree && $$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \ fi - cd tmp/androidtree && $(CABAL) build + cd tmp/androidtree && $$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/cabal build adb: ANDROID_FLAGS="-Production" $(MAKE) android diff --git a/git-annex.cabal b/git-annex.cabal index 0846cca39..2fbd28ae0 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -133,8 +133,12 @@ Executable git-annex CPP-Options: -DWITH_FSEVENTS else if (! os(windows) && ! os(solaris) && ! os(linux)) - CPP-Options: -DWITH_KQUEUE - C-Sources: Utility/libkqueue.c + if flag(Android) + Build-Depends: hinotify + CPP-Options: -DWITH_INOTIFY + else + CPP-Options: -DWITH_KQUEUE + C-Sources: Utility/libkqueue.c if os(linux) && flag(Dbus) Build-Depends: dbus (>= 0.10.3) diff --git a/standalone/android/evilsplicer-headers.hs b/standalone/android/evilsplicer-headers.hs index 35a20a001..ee4d6f1a3 100644 --- a/standalone/android/evilsplicer-headers.hs +++ b/standalone/android/evilsplicer-headers.hs @@ -6,6 +6,7 @@ - ** DO NOT COMMIT ** -} import qualified Data.Monoid +import qualified Data.Set import qualified Data.Map import qualified Data.Map as Data.Map.Base import qualified Data.Foldable @@ -16,12 +17,16 @@ import qualified Text.Hamlet import qualified Text.Julius import qualified Text.Css import qualified "blaze-markup" Text.Blaze.Internal -import qualified Yesod.Widget +import qualified Yesod.Core.Widget import qualified Yesod.Routes.TH.Types import qualified Yesod.Routes.Dispatch import qualified WaiAppStatic.Storage.Embedded +import qualified WaiAppStatic.Storage.Embedded.Runtime import qualified Data.FileEmbed import qualified Data.ByteString.Internal +import qualified Data.Text.Encoding +import qualified Network.Wai +import qualified Yesod.Core.Types {- End EvilSplicer headers. -} diff --git a/standalone/android/haskell-patches/async_fix-build-with-new-ghc.patch b/standalone/android/haskell-patches/async_fix-build-with-new-ghc.patch new file mode 100644 index 000000000..727720ad4 --- /dev/null +++ b/standalone/android/haskell-patches/async_fix-build-with-new-ghc.patch @@ -0,0 +1,25 @@ +From 0035f0366e426af213244b2eb25ffb63cb9e74d0 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 06:14:50 +0000 +Subject: [PATCH] fix build with new ghc + +--- + async.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/async.cabal b/async.cabal +index 8e47d9d..98e6312 100644 +--- a/async.cabal ++++ b/async.cabal +@@ -70,7 +70,7 @@ source-repository head + + library + exposed-modules: Control.Concurrent.Async +- build-depends: base >= 4.3 && < 4.7, stm >= 2.2 && < 2.5 ++ build-depends: base >= 4.3 && < 4.9, stm >= 2.2 && < 2.5 + + test-suite test-async + type: exitcode-stdio-1.0 +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/file-embed_export-TH-symbols.patch b/standalone/android/haskell-patches/file-embed_export-TH-symbols.patch new file mode 100644 index 000000000..865cbe3cc --- /dev/null +++ b/standalone/android/haskell-patches/file-embed_export-TH-symbols.patch @@ -0,0 +1,25 @@ +From fdbd29ce6e8ff11f721f9e74cac1f4ca14e6773d Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 07:06:33 +0000 +Subject: [PATCH] export TH symbols + +--- + Data/FileEmbed.hs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Data/FileEmbed.hs b/Data/FileEmbed.hs +index c17f082..6654f60 100644 +--- a/Data/FileEmbed.hs ++++ b/Data/FileEmbed.hs +@@ -26,6 +26,8 @@ module Data.FileEmbed + #endif + , inject + , injectFile ++ -- used by TH (pointlessly) ++ , stringToBs + ) where + + import Language.Haskell.TH.Syntax +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch b/standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch new file mode 100644 index 000000000..ff9d8f245 --- /dev/null +++ b/standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch @@ -0,0 +1,50 @@ +From afdec6c9e66211a0ac8419fffe191b059d1fd00c Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 17:24:33 +0000 +Subject: [PATCH] fix build with new base + +--- + Data/Text/IDN/IDNA.chs | 1 + + Data/Text/IDN/Punycode.chs | 1 + + Data/Text/IDN/StringPrep.chs | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/Data/Text/IDN/IDNA.chs b/Data/Text/IDN/IDNA.chs +index ed29ee4..dbb4ba5 100644 +--- a/Data/Text/IDN/IDNA.chs ++++ b/Data/Text/IDN/IDNA.chs +@@ -31,6 +31,7 @@ import Foreign + import Foreign.C + + import Data.Text.IDN.Internal ++import System.IO.Unsafe + + #include + #include +diff --git a/Data/Text/IDN/Punycode.chs b/Data/Text/IDN/Punycode.chs +index 24b5fa6..4e62555 100644 +--- a/Data/Text/IDN/Punycode.chs ++++ b/Data/Text/IDN/Punycode.chs +@@ -32,6 +32,7 @@ import Data.List (unfoldr) + import qualified Data.ByteString as B + import qualified Data.Text as T + ++import System.IO.Unsafe + import Foreign + import Foreign.C + +diff --git a/Data/Text/IDN/StringPrep.chs b/Data/Text/IDN/StringPrep.chs +index 752dc9e..5e9fd84 100644 +--- a/Data/Text/IDN/StringPrep.chs ++++ b/Data/Text/IDN/StringPrep.chs +@@ -39,6 +39,7 @@ import qualified Data.ByteString as B + import qualified Data.Text as T + import qualified Data.Text.Encoding as TE + ++import System.IO.Unsafe + import Foreign + import Foreign.C + +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/wai-app-static_1.3.1-remove-TH.patch b/standalone/android/haskell-patches/wai-app-static_1.3.1-remove-TH.patch deleted file mode 100644 index 30bf5256a..000000000 --- a/standalone/android/haskell-patches/wai-app-static_1.3.1-remove-TH.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c18ae75852b1340ca502528138bf421659f61a3d Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Mon, 15 Apr 2013 12:44:15 -0400 -Subject: [PATCH] remove TH - -Should not need these icons in git-annex, so not worth using the Evil -Splicer. ---- - Network/Wai/Application/Static.hs | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs -index 3195fbb..b48aa01 100644 ---- a/Network/Wai/Application/Static.hs -+++ b/Network/Wai/Application/Static.hs -@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO) - - import Blaze.ByteString.Builder (toByteString) - --import Data.FileEmbed (embedFile) -- - import Data.Text (Text) - import qualified Data.Text as T - -@@ -198,8 +196,6 @@ staticAppPieces _ _ req - H.status405 - [("Content-Type", "text/plain")] - "Only GET is supported" --staticAppPieces _ [".hidden", "folder.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")] --staticAppPieces _ [".hidden", "haskell.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")] - staticAppPieces ss rawPieces req = liftIO $ do - case toPieces rawPieces of - Just pieces -> checkPieces ss pieces req >>= response --- -1.8.2.rc3 - diff --git a/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch b/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch new file mode 100644 index 000000000..d9860f922 --- /dev/null +++ b/standalone/android/haskell-patches/wai-app-static_deal-with-TH.patch @@ -0,0 +1,54 @@ +From 432a8fc47bb11cf8fd0a832e033cfb94a6332dbe Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 07:29:39 +0000 +Subject: [PATCH] deal with TH + +Export modules referenced by it. + +Should not need these icons in git-annex, so not worth using the Evil +Splicer. +--- + Network/Wai/Application/Static.hs | 4 ---- + wai-app-static.cabal | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs +index 3f07391..75709b7 100644 +--- a/Network/Wai/Application/Static.hs ++++ b/Network/Wai/Application/Static.hs +@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO) + + import Blaze.ByteString.Builder (toByteString) + +-import Data.FileEmbed (embedFile) +- + import Data.Text (Text) + import qualified Data.Text as T + +@@ -198,8 +196,6 @@ staticAppPieces _ _ req + H.status405 + [("Content-Type", "text/plain")] + "Only GET is supported" +-staticAppPieces _ [".hidden", "folder.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")] +-staticAppPieces _ [".hidden", "haskell.png"] _ = return $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")] + staticAppPieces ss rawPieces req = liftIO $ do + case toPieces rawPieces of + Just pieces -> checkPieces ss pieces req >>= response +diff --git a/wai-app-static.cabal b/wai-app-static.cabal +index ec22813..e944caa 100644 +--- a/wai-app-static.cabal ++++ b/wai-app-static.cabal +@@ -56,9 +56,9 @@ library + WaiAppStatic.Storage.Embedded + WaiAppStatic.Listing + WaiAppStatic.Types +- other-modules: Util + WaiAppStatic.Storage.Embedded.Runtime + WaiAppStatic.Storage.Embedded.TH ++ other-modules: Util + ghc-options: -Wall + extensions: CPP + +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch b/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch new file mode 100644 index 000000000..e20e3c7f1 --- /dev/null +++ b/standalone/android/haskell-patches/yesod-routes_export-module-referenced-by-TH-splices.patch @@ -0,0 +1,29 @@ +From f6bfe8e01d8fe6d129ad3819070aa17934094a0a Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 06:24:09 +0000 +Subject: [PATCH] export module referenced by TH splices + +--- + yesod-routes.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/yesod-routes.cabal b/yesod-routes.cabal +index 0b245f2..a97582a 100644 +--- a/yesod-routes.cabal ++++ b/yesod-routes.cabal +@@ -27,11 +27,11 @@ library + Yesod.Routes.Class + Yesod.Routes.Parse + Yesod.Routes.Overlap ++ Yesod.Routes.TH.Types + other-modules: Yesod.Routes.TH.Dispatch + Yesod.Routes.TH.RenderRoute + Yesod.Routes.TH.ParseRoute + Yesod.Routes.TH.RouteAttrs +- Yesod.Routes.TH.Types + ghc-options: -Wall + + test-suite runtests +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch b/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch new file mode 100644 index 000000000..23ba50d33 --- /dev/null +++ b/standalone/android/haskell-patches/yesod_001_hacked-up-for-Android.patch @@ -0,0 +1,74 @@ +From 8bf7c428a42b984f63f435bb34f22743202ae449 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 05:24:19 +0000 +Subject: [PATCH] hacked up for Android + +--- + Yesod.hs | 2 -- + Yesod/Default/Util.hs | 17 ----------------- + 2 files changed, 19 deletions(-) + +diff --git a/Yesod.hs b/Yesod.hs +index b367144..3050bf5 100644 +--- a/Yesod.hs ++++ b/Yesod.hs +@@ -5,9 +5,7 @@ module Yesod + ( -- * Re-exports from yesod-core + module Yesod.Core + , module Yesod.Form +- , module Yesod.Persist + ) where + + import Yesod.Core + import Yesod.Form +-import Yesod.Persist +diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs +index a10358e..c5a4e58 100644 +--- a/Yesod/Default/Util.hs ++++ b/Yesod/Default/Util.hs +@@ -8,7 +8,6 @@ module Yesod.Default.Util + , widgetFileNoReload + , widgetFileReload + , TemplateLanguage (..) +- , defaultTemplateLanguages + , WidgetFileSettings + , wfsLanguages + , wfsHamletSettings +@@ -20,9 +19,6 @@ import Yesod.Core -- purposely using complete import so that Haddock will see ad + import Control.Monad (when, unless) + import System.Directory (doesFileExist, createDirectoryIfMissing) + import Language.Haskell.TH.Syntax +-import Text.Lucius (luciusFile, luciusFileReload) +-import Text.Julius (juliusFile, juliusFileReload) +-import Text.Cassius (cassiusFile, cassiusFileReload) + import Text.Hamlet (HamletSettings, defaultHamletSettings) + import Data.Maybe (catMaybes) + import Data.Default (Default (def)) +@@ -69,24 +65,11 @@ data TemplateLanguage = TemplateLanguage + , tlReload :: FilePath -> Q Exp + } + +-defaultTemplateLanguages :: HamletSettings -> [TemplateLanguage] +-defaultTemplateLanguages hset = +- [ TemplateLanguage False "hamlet" whamletFile' whamletFile' +- , TemplateLanguage True "cassius" cassiusFile cassiusFileReload +- , TemplateLanguage True "julius" juliusFile juliusFileReload +- , TemplateLanguage True "lucius" luciusFile luciusFileReload +- ] +- where +- whamletFile' = whamletFileWithSettings hset +- + data WidgetFileSettings = WidgetFileSettings + { wfsLanguages :: HamletSettings -> [TemplateLanguage] + , wfsHamletSettings :: HamletSettings + } + +-instance Default WidgetFileSettings where +- def = WidgetFileSettings defaultTemplateLanguages defaultHamletSettings +- + widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp + widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs + +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch b/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch new file mode 100644 index 000000000..eaad739e5 --- /dev/null +++ b/standalone/android/haskell-patches/yesod_002_hack-around-missing-symbols.patch @@ -0,0 +1,41 @@ +From 7e815b11f242d6836f9615439e32f9937bf2feaf Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 13:59:34 +0000 +Subject: [PATCH] hack around missing symbols + +--- + Yesod.hs | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/Yesod.hs b/Yesod.hs +index 3050bf5..fbe309c 100644 +--- a/Yesod.hs ++++ b/Yesod.hs +@@ -5,7 +5,24 @@ module Yesod + ( -- * Re-exports from yesod-core + module Yesod.Core + , module Yesod.Form ++ , insertBy ++ , replace ++ , deleteBy ++ , delete ++ , insert ++ , Key + ) where + + import Yesod.Core + import Yesod.Form ++ ++-- These symbols are usually imported from persistent, ++-- But it is not built on Android. Still export them ++-- just so that hiding them will work. ++data Key = DummyKey ++insertBy = undefined ++replace = undefined ++deleteBy = undefined ++delete = undefined ++insert = undefined ++ +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod_hacked-up-for-Android.patch b/standalone/android/haskell-patches/yesod_hacked-up-for-Android.patch deleted file mode 100644 index 23ba50d33..000000000 --- a/standalone/android/haskell-patches/yesod_hacked-up-for-Android.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 8bf7c428a42b984f63f435bb34f22743202ae449 Mon Sep 17 00:00:00 2001 -From: foo -Date: Sun, 22 Sep 2013 05:24:19 +0000 -Subject: [PATCH] hacked up for Android - ---- - Yesod.hs | 2 -- - Yesod/Default/Util.hs | 17 ----------------- - 2 files changed, 19 deletions(-) - -diff --git a/Yesod.hs b/Yesod.hs -index b367144..3050bf5 100644 ---- a/Yesod.hs -+++ b/Yesod.hs -@@ -5,9 +5,7 @@ module Yesod - ( -- * Re-exports from yesod-core - module Yesod.Core - , module Yesod.Form -- , module Yesod.Persist - ) where - - import Yesod.Core - import Yesod.Form --import Yesod.Persist -diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs -index a10358e..c5a4e58 100644 ---- a/Yesod/Default/Util.hs -+++ b/Yesod/Default/Util.hs -@@ -8,7 +8,6 @@ module Yesod.Default.Util - , widgetFileNoReload - , widgetFileReload - , TemplateLanguage (..) -- , defaultTemplateLanguages - , WidgetFileSettings - , wfsLanguages - , wfsHamletSettings -@@ -20,9 +19,6 @@ import Yesod.Core -- purposely using complete import so that Haddock will see ad - import Control.Monad (when, unless) - import System.Directory (doesFileExist, createDirectoryIfMissing) - import Language.Haskell.TH.Syntax --import Text.Lucius (luciusFile, luciusFileReload) --import Text.Julius (juliusFile, juliusFileReload) --import Text.Cassius (cassiusFile, cassiusFileReload) - import Text.Hamlet (HamletSettings, defaultHamletSettings) - import Data.Maybe (catMaybes) - import Data.Default (Default (def)) -@@ -69,24 +65,11 @@ data TemplateLanguage = TemplateLanguage - , tlReload :: FilePath -> Q Exp - } - --defaultTemplateLanguages :: HamletSettings -> [TemplateLanguage] --defaultTemplateLanguages hset = -- [ TemplateLanguage False "hamlet" whamletFile' whamletFile' -- , TemplateLanguage True "cassius" cassiusFile cassiusFileReload -- , TemplateLanguage True "julius" juliusFile juliusFileReload -- , TemplateLanguage True "lucius" luciusFile luciusFileReload -- ] -- where -- whamletFile' = whamletFileWithSettings hset -- - data WidgetFileSettings = WidgetFileSettings - { wfsLanguages :: HamletSettings -> [TemplateLanguage] - , wfsHamletSettings :: HamletSettings - } - --instance Default WidgetFileSettings where -- def = WidgetFileSettings defaultTemplateLanguages defaultHamletSettings -- - widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp - widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs - --- -1.7.10.4 - diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 097afc94d..bd56120a6 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -2,18 +2,12 @@ # Bootstraps from an empty cabal to all the necessary haskell packages # being installed, with the necessary patches to work on Android. # +# You should install ghc-android first. +# # Note that the newest version of packages is installed. # It attempts to reuse patches for older versions, but # new versions of packages often break cross-compilation by adding TH, # etc -# -# Needs some extra C libraries and packages to be installed -# on the host system: -# libgnutls-dev libxml2-dev libgsasl7-dev pkg-config c2hs -# -# Also needs some C libraries to be installed inside the cross-compiler -# lib directory (~/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/sysroot/usr/lib/) -# , cross-compiled for Android: libgnutls libxml2 set -e @@ -40,15 +34,11 @@ patched () { $SHELL fi done - cabalinstall "$@" + cabalinstall --force-reinstalls "$@" rm -rf $pkg* cd .. } -unpatched () { - cabalinstall "$@" -} - installgitannexdeps () { echo cabal install git-annex --only-dependencies cabal install git-annex --only-dependencies "$@" @@ -76,24 +66,28 @@ install_pkgs () { patched socks patched entropy patched vector - patched wai-app-static patched persistent patched profunctors patched skein patched lens - patched shakespeare - patched shakespeare-css - patched shakespeare-js patched DAV patched persistent-template + patched file-embed + patched wai-app-static patched hamlet + patched shakespeare + patched shakespeare-css + patched shakespeare-js + patched yesod-routes patched yesod-core patched yesod-persistent patched yesod-form patched yesod-auth patched yesod + patched async + patched gnuidn - installgitannexdeps -f-Pairing -f-XMPP + installgitannexdeps -fAndroid -f-Pairing cd .. rm -rf tmp -- cgit v1.2.3