summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-17 13:10:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-17 13:10:41 -0400
commitd2e0d313743df08fecb7313a150b84764c6377b0 (patch)
tree845b917f2f3dc943f5a7c3ea25a0a26ffbad7bad /standalone
parentfcfab84fd292d6534e4709b9ed1be03686d7b78f (diff)
work around strange MissingH build fail on windows, that I cannot reproduce here
Diffstat (limited to 'standalone')
-rw-r--r--standalone/windows/build.sh11
-rw-r--r--standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch58
2 files changed, 67 insertions, 2 deletions
diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh
index 1bab587f8..fd833d830 100644
--- a/standalone/windows/build.sh
+++ b/standalone/windows/build.sh
@@ -17,10 +17,17 @@ incygwin () {
}
# Install haskell dependencies.
-cabal update
-cabal list --installed
# cabal install is not run in cygwin, because we don't want configure scripts
# for haskell libraries to link them with the cygwin library.
+cabal update
+
+rm -rf MissingH-1.2.0.0
+cabal unpack MissingH
+cd MissingH-1.2.0.0
+incygwin patch -p1 <../standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
+cabal install --reinstall
+cd ..
+
cabal install --only-dependencies -f"$FLAGS"
# Build git-annex
diff --git a/standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch b/standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
new file mode 100644
index 000000000..115afd7f9
--- /dev/null
+++ b/standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
@@ -0,0 +1,58 @@
+From 93876dea5befa576c1324e25dcf2135ae1705427 Mon Sep 17 00:00:00 2001
+From: Joey Hess <joey@kitenet.net>
+Date: Fri, 17 May 2013 13:04:56 -0400
+Subject: [PATCH] hack around strange build problem in jenkins autobuilder
+
+src\System\IO\WindowsCompat.hs:123:41:
+ Couldn't match expected type `System.Time.ClockTime'
+ with actual type `time-1.4:Data.Time.Clock.UTC.UTCTime'
+ In the first argument of `clockTimeToEpoch', namely `modct'
+ In the expression: clockTimeToEpoch modct
+ In an equation for `epochtime': epochtime = clockTimeToEpoch modct
+
+But it works on Windows here..
+---
+ src/System/IO/WindowsCompat.hs | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs
+index 473490d..0eea21b 100644
+--- a/src/System/IO/WindowsCompat.hs
++++ b/src/System/IO/WindowsCompat.hs
+@@ -44,8 +44,7 @@ Or, to avoid having to use CPP and make things even easier, just import
+ -}
+
+ module System.IO.WindowsCompat
+-#if 1
+-!(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__))
++#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__))
+ where
+ #else
+ (module System.IO.StatCompat, module System.IO.WindowsCompat)
+@@ -120,8 +119,10 @@ getFileStatus fp =
+ do isfile <- doesFileExist fp
+ isdir <- doesDirectoryExist fp
+ perms <- getPermissions fp
++ {-
+ modct <- getModificationTime fp
+- let epochtime = clockTimeToEpoch modct
++ let epochtime = clockTimeToEpoch $ modct
++ -}
+ return $ FileStatusCompat {deviceID = -1,
+ fileID = -1,
+ fileMode = if isfile then regularFileMode
+@@ -131,8 +132,8 @@ getFileStatus fp =
+ fileGroup = 0,
+ specialDeviceID = -1,
+ fileSize = 0, -- fixme: hFileSize?
+- accessTime = fromInteger epochtime,
+- modificationTime = fromInteger epochtime,
+- statusChangeTime = fromInteger epochtime
++ accessTime = undefined -- fromInteger epochtime,
++ modificationTime = undefined -- fromInteger epochtime,
++ statusChangeTime = undefined -- fromInteger epochtime
+ }
+ #endif
+--
+1.8.3.rc1
+