summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--standalone/windows/build.sh2
-rw-r--r--standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch48
-rw-r--r--standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch75
3 files changed, 76 insertions, 49 deletions
diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh
index 6b9cdd3ff..670b418d0 100644
--- a/standalone/windows/build.sh
+++ b/standalone/windows/build.sh
@@ -31,7 +31,7 @@ MISSINGH_VERSION="1.2.0.1"
rm -rf MissingH-${MISSINGH_VERSION}
cabal unpack MissingH
cd MissingH-${MISSINGH_VERSION}
-#withcyg patch -p1 <../standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
+withcyg patch -p1 <../standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch
cabal install || true
cd ..
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
deleted file mode 100644
index be18ff23f..000000000
--- a/standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-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
-@@ -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
-
diff --git a/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch b/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch
new file mode 100644
index 000000000..02b6bd63d
--- /dev/null
+++ b/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch
@@ -0,0 +1,75 @@
+From 017b26c0198d6982e47600b66235d01990e49fef Mon Sep 17 00:00:00 2001
+From: mvoidex <voidex@live.com>
+Date: Fri, 18 Jan 2013 15:22:03 +0400
+Subject: [PATCH 1/2] Fixed error (getModificationTime returns UTCTime, not
+ ClockTime)
+
+---
+ src/System/IO/WindowsCompat.hs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs
+index d910dca..38820bb 100644
+--- a/src/System/IO/WindowsCompat.hs
++++ b/src/System/IO/WindowsCompat.hs
+@@ -56,6 +56,8 @@ import System.IO.StatCompat
+ import System.Posix.Consts
+ import System.Time.Utils
+ import System.Directory
++import Data.Time
++import Data.Time.Clock.POSIX
+
+ -- these types aren't defined here
+
+@@ -112,6 +114,9 @@ otherModes = 0o00007
+ accessModes :: FileMode
+ accessModes = ownerModes .|. groupModes .|. otherModes
+
++utcTimeToSeconds :: Num a => UTCTime -> a
++utcTimeToSeconds = fromInteger . floor . utcTimeToPOSIXSeconds
++
+ ----------- stat
+ type FileStatus = FileStatusCompat
+ getFileStatus :: FilePath -> IO FileStatus
+@@ -120,7 +125,7 @@ getFileStatus fp =
+ isdir <- doesDirectoryExist fp
+ perms <- getPermissions fp
+ modct <- getModificationTime fp
+- let epochtime = clockTimeToEpoch modct
++ let epochtime = utcTimeToSeconds modct
+ return $ FileStatusCompat {deviceID = -1,
+ fileID = -1,
+ fileMode = if isfile then regularFileMode
+--
+1.8.1.6
+
+
+From 6991e46b613fd929fd8e9bc49ae13c003a3b740c Mon Sep 17 00:00:00 2001
+From: Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>
+Date: Sun, 12 May 2013 18:08:16 +1200
+Subject: [PATCH 2/2] Fix for older versions of directory (where
+ getModificationTime still returns ClockTime)
+
+---
+ src/System/IO/WindowsCompat.hs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs
+index 38820bb..8f7b476 100644
+--- a/src/System/IO/WindowsCompat.hs
++++ b/src/System/IO/WindowsCompat.hs
+@@ -125,7 +125,11 @@ getFileStatus fp =
+ isdir <- doesDirectoryExist fp
+ perms <- getPermissions fp
+ modct <- getModificationTime fp
++#if MIN_VERSION_directory(1,2,0)
+ let epochtime = utcTimeToSeconds modct
++#else
++ let epochtime = clockTimeToEpoch modct
++#endif
+ return $ FileStatusCompat {deviceID = -1,
+ fileID = -1,
+ fileMode = if isfile then regularFileMode
+--
+1.8.1.6
+