summaryrefslogtreecommitdiff
path: root/community-testing/haskell-tar
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-04 01:23:34 -0700
committerroot <root@rshg054.dnsready.net>2012-10-04 01:23:34 -0700
commitc3ff6b4da8966c22dcbf0f5d8a957b875242789f (patch)
tree73064dc985b6d59695639dfb6d4ae4ba99395cc5 /community-testing/haskell-tar
parent1350233b6dc1924ba29a42462447995f26dae0dc (diff)
Thu Oct 4 01:23:34 PDT 2012
Diffstat (limited to 'community-testing/haskell-tar')
-rw-r--r--community-testing/haskell-tar/0001-update-changed-time-code-for-ghc-7.6.1.patch50
-rw-r--r--community-testing/haskell-tar/PKGBUILD16
2 files changed, 60 insertions, 6 deletions
diff --git a/community-testing/haskell-tar/0001-update-changed-time-code-for-ghc-7.6.1.patch b/community-testing/haskell-tar/0001-update-changed-time-code-for-ghc-7.6.1.patch
new file mode 100644
index 000000000..b8c2264bc
--- /dev/null
+++ b/community-testing/haskell-tar/0001-update-changed-time-code-for-ghc-7.6.1.patch
@@ -0,0 +1,50 @@
+From bd14edd6240c72baa22822338fc872e6827af680 Mon Sep 17 00:00:00 2001
+From: Thomas Dziedzic <gostrc@gmail.com>
+Date: Tue, 11 Sep 2012 06:24:09 -0700
+Subject: [PATCH] update changed time code for ghc 7.6.1
+
+---
+ Codec/Archive/Tar/Pack.hs | 9 +++++----
+ tar.cabal | 2 +-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/Codec/Archive/Tar/Pack.hs b/Codec/Archive/Tar/Pack.hs
+index 8e43091..0af6103 100644
+--- a/Codec/Archive/Tar/Pack.hs
++++ b/Codec/Archive/Tar/Pack.hs
+@@ -28,8 +28,8 @@ import qualified System.FilePath as FilePath.Native
+ import System.Directory
+ ( getDirectoryContents, doesDirectoryExist, getModificationTime
+ , Permissions(..), getPermissions )
+-import System.Time
+- ( ClockTime(..) )
++import Data.Time.Clock.POSIX
++ ( utcTimeToPOSIXSeconds )
+ import System.IO
+ ( IOMode(ReadMode), openBinaryFile, hFileSize )
+ import System.IO.Unsafe (unsafeInterleaveIO)
+@@ -170,5 +170,6 @@ recurseDirectories base (dir:dirs) = unsafeInterleaveIO $ do
+
+ getModTime :: FilePath -> IO EpochTime
+ getModTime path = do
+- (TOD s _) <- getModificationTime path
+- return $! fromIntegral s
++ utcTime <- getModificationTime path
++ let s = truncate . utcTimeToPOSIXSeconds $ utcTime
++ return $! s
+diff --git a/tar.cabal b/tar.cabal
+index e748b07..d85b0da 100644
+--- a/tar.cabal
++++ b/tar.cabal
+@@ -25,7 +25,7 @@ source-repository head
+
+ library
+ build-depends: base >= 3 && < 5, filepath,
+- directory, old-time, bytestring
++ directory, bytestring, time
+
+ exposed-modules:
+ Codec.Archive.Tar
+--
+1.7.12
+
diff --git a/community-testing/haskell-tar/PKGBUILD b/community-testing/haskell-tar/PKGBUILD
index 5b0c05867..ab2f5f8f4 100644
--- a/community-testing/haskell-tar/PKGBUILD
+++ b/community-testing/haskell-tar/PKGBUILD
@@ -1,23 +1,27 @@
-# $Id: PKGBUILD 72313 2012-06-11 17:26:17Z tdziedzic $
+# $Id: PKGBUILD 77025 2012-10-03 15:25:16Z tdziedzic $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
pkgname=haskell-tar
pkgver=0.4.0.0
-pkgrel=2
+pkgrel=3
pkgdesc="Reading, writing and manipulating \".tar\" archive files."
url="http://hackage.haskell.org/package/tar"
license=('custom:BSD3')
arch=('x86_64' 'i686')
-depends=('ghc=7.4.2-1')
-options=('strip')
-source=("http://hackage.haskell.org/packages/archive/tar/$pkgver/tar-$pkgver.tar.gz")
+depends=('ghc=7.6.1-1')
+source=("http://hackage.haskell.org/packages/archive/tar/$pkgver/tar-$pkgver.tar.gz"
+ '0001-update-changed-time-code-for-ghc-7.6.1.patch')
install=haskell-tar.install
-sha256sums=('a3d37be1b8666c16c6371d193a0795b8abe7b0216e81870a2666e1e85d931113')
+sha256sums=('a3d37be1b8666c16c6371d193a0795b8abe7b0216e81870a2666e1e85d931113'
+ '17b8afc519db5bed5d89807e6e659788f5d9c2f5c569150a9d1c6faac52e98e6')
build() {
cd "$srcdir/tar-$pkgver"
+ # time functions have changed in ghc 7.6.1
+ patch -Np1 -i ${srcdir}/0001-update-changed-time-code-for-ghc-7.6.1.patch
+
runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
--prefix=/usr --docdir="/usr/share/doc/$pkgname" \
--libsubdir=\$compiler/site-local/\$pkgid