From c3ff6b4da8966c22dcbf0f5d8a957b875242789f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Oct 2012 01:23:34 -0700 Subject: Thu Oct 4 01:23:34 PDT 2012 --- ...01-update-changed-time-code-for-ghc-7.6.1.patch | 50 ++++++++++++++++++++++ community-testing/haskell-tar/PKGBUILD | 16 ++++--- 2 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 community-testing/haskell-tar/0001-update-changed-time-code-for-ghc-7.6.1.patch (limited to 'community-testing/haskell-tar') 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 +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 # Contributor: Arch Haskell Team 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 -- cgit v1.2.3-54-g00ecf