Hello community,

here is the log from the commit of package ghc-zip-archive for openSUSE:Factory 
checked in at 2018-07-24 17:23:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-zip-archive (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-zip-archive.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-zip-archive"

Tue Jul 24 17:23:31 2018 rev:11 rq:623901 version:0.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-zip-archive/ghc-zip-archive.changes  
2018-05-30 12:28:01.104782987 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-zip-archive.new/ghc-zip-archive.changes     
2018-07-24 17:23:33.543389984 +0200
@@ -1,0 +2,21 @@
+Wed Jul 18 14:26:49 UTC 2018 - [email protected]
+
+- Cosmetic: replace tabs with blanks, strip trailing white space,
+  and update copyright headers with spec-cleaner.
+
+-------------------------------------------------------------------
+Fri Jul 13 14:31:35 UTC 2018 - [email protected]
+
+- Update zip-archive to version 0.3.3.
+  zip-archive 0.3.3
+
+    * Remove dependency on old-time (typedrat).
+    * Drop splitBase flag and support for base versions < 3.
+
+  zip-archive 0.3.2.5
+
+    * Move 'build-tools: unzip' from library stanza to test stanza.
+      unzip should only be required for testing, not for regular
+      builds of the library.
+
+-------------------------------------------------------------------

Old:
----
  zip-archive-0.3.2.4.tar.gz

New:
----
  zip-archive-0.3.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-zip-archive.spec ++++++
--- /var/tmp/diff_new_pack.Pwp68l/_old  2018-07-24 17:23:34.043390622 +0200
+++ /var/tmp/diff_new_pack.Pwp68l/_new  2018-07-24 17:23:34.043390622 +0200
@@ -19,7 +19,7 @@
 %global pkg_name zip-archive
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.3.2.4
+Version:        0.3.3
 Release:        0
 Summary:        Library for creating and modifying zip archives
 License:        BSD-3-Clause
@@ -35,14 +35,12 @@
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-old-time-devel
 BuildRequires:  ghc-pretty-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-unix-devel
 BuildRequires:  ghc-zlib-devel
-BuildRequires:  unzip
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-process-devel

++++++ zip-archive-0.3.2.4.tar.gz -> zip-archive-0.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.2.4/changelog 
new/zip-archive-0.3.3/changelog
--- old/zip-archive-0.3.2.4/changelog   2018-02-21 23:27:59.000000000 +0100
+++ new/zip-archive-0.3.3/changelog     2018-06-25 21:51:15.000000000 +0200
@@ -1,3 +1,14 @@
+zip-archive 0.3.3
+
+  * Remove dependency on old-time (typedrat).
+  * Drop splitBase flag and support for base versions < 3.
+
+zip-archive 0.3.2.5
+
+  * Move 'build-tools: unzip' from library stanza to test stanza.
+    unzip should only be required for testing, not for regular
+    builds of the library.
+
 zip-archive 0.3.2.4
 
   * Make build-tools stanza conditional on non-windows. Closes #44.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.2.4/src/Codec/Archive/Zip.hs 
new/zip-archive-0.3.3/src/Codec/Archive/Zip.hs
--- old/zip-archive-0.3.2.4/src/Codec/Archive/Zip.hs    2018-01-22 
21:12:49.000000000 +0100
+++ new/zip-archive-0.3.3/src/Codec/Archive/Zip.hs      2018-06-25 
21:51:15.000000000 +0200
@@ -1,5 +1,6 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE ViewPatterns #-}
 ------------------------------------------------------------------------
 -- |
 -- Module      : Codec.Archive.Zip
@@ -65,10 +66,10 @@
 
        ) where
 
-import System.Time ( toUTCTime, addToClockTime, CalendarTime (..), ClockTime 
(..), TimeDiff (..) )
-#if MIN_VERSION_directory(1,2,0)
-import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds )
-#endif
+import Data.Time.Calendar ( toGregorian, fromGregorian )
+import Data.Time.Clock ( UTCTime(..) )
+import Data.Time.Clock.POSIX ( posixSecondsToUTCTime, utcTimeToPOSIXSeconds )
+import Data.Time.LocalTime ( TimeOfDay(..), timeToTimeOfDay )
 import Data.Bits ( shiftL, shiftR, (.&.) )
 import Data.Binary
 import Data.Binary.Get
@@ -292,12 +293,8 @@
                         return B.empty
                       else
                         B.fromStrict <$> S.readFile path
-#if MIN_VERSION_directory(1,2,0)
   modEpochTime <- fmap (floor . utcTimeToPOSIXSeconds)
                    $ getModificationTime path
-#else
-  (TOD modEpochTime _) <- getModificationTime path
-#endif
   let entry = toEntry path' modEpochTime contents
 
   entryE <-
@@ -485,9 +482,14 @@
   epochTimeToMSDOSDateTime minMSDOSDateTime
   -- if time is earlier than minimum DOS datetime, return minimum
 epochTimeToMSDOSDateTime epochtime =
-  let ut = toUTCTime (TOD epochtime 0)
-      dosTime = toEnum $ (ctSec ut `div` 2) + shiftL (ctMin ut) 5 + shiftL 
(ctHour ut) 11
-      dosDate = toEnum $ ctDay ut + shiftL (fromEnum (ctMonth ut) + 1) 5 + 
shiftL (ctYear ut - 1980) 9
+  let 
+    UTCTime
+      (toGregorian -> (fromInteger -> year, month, day))
+      (timeToTimeOfDay -> (TimeOfDay hour minutes (floor -> sec))) 
+      = posixSecondsToUTCTime (fromIntegral epochtime)
+
+    dosTime = toEnum $ (sec `div` 2) + shiftL minutes 5 + shiftL hour 11
+    dosDate = toEnum $ day + shiftL month 5 + shiftL (year - 1980) 9
   in  MSDOSDateTime { msDOSDate = dosDate, msDOSTime = dosTime }
 
 -- | Convert a MSDOS datetime to a 'ClockTime'.
@@ -497,18 +499,10 @@
       minutes = fromIntegral $ (shiftR dosTime 5) .&. 0O77
       hour    = fromIntegral $ shiftR dosTime 11
       day     = fromIntegral $ dosDate .&. 0O37
-      month   = fromIntegral $ ((shiftR dosDate 5) .&. 0O17) - 1
+      month   = fromIntegral $ ((shiftR dosDate 5) .&. 0O17)
       year    = fromIntegral $ shiftR dosDate 9
-      timeSinceEpoch = TimeDiff
-               { tdYear = year + 10, -- dos times since 1980, unix epoch 
starts 1970
-                 tdMonth = month,
-                 tdDay = day - 1,  -- dos days start from 1
-                 tdHour = hour,
-                 tdMin = minutes,
-                 tdSec = seconds,
-                 tdPicosec = 0 }
-      (TOD epochsecs _) = addToClockTime timeSinceEpoch (TOD 0 0)
-  in  epochsecs
+      utc = UTCTime (fromGregorian (1980 + year) month day) (3600 * hour + 60 
* minutes + seconds)
+  in floor (utcTimeToPOSIXSeconds utc)
 
 #ifndef _WINDOWS
 getDirectoryContentsRecursive' :: [ZipOption] -> FilePath -> IO [FilePath]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.2.4/zip-archive.cabal 
new/zip-archive-0.3.3/zip-archive.cabal
--- old/zip-archive-0.3.2.4/zip-archive.cabal   2018-02-21 23:27:40.000000000 
+0100
+++ new/zip-archive-0.3.3/zip-archive.cabal     2018-06-25 21:51:15.000000000 
+0200
@@ -1,5 +1,5 @@
 Name:                zip-archive
-Version:             0.3.2.4
+Version:             0.3.3
 Cabal-Version:       >= 1.10
 Build-type:          Custom
 Synopsis:            Library for creating and modifying zip archives.
@@ -24,21 +24,24 @@
   type:              git
   location:          git://github.com/jgm/zip-archive.git
 
-flag splitBase
-  Description:       Choose the new, smaller, split-up base package.
-  Default:           True
 flag executable
   Description:       Build the Zip executable.
   Default:           False
 
 Library
-  if flag(splitBase)
-    Build-depends:   base >= 3 && < 5, pretty, containers
-  else
-    Build-depends:   base < 3
-  Build-depends:     binary >= 0.6, zlib, filepath, bytestring >= 0.10.0,
-                     array, mtl, text >= 0.11, old-time, digest >= 0.0.0.1,
-                     directory, time
+  Build-depends:     base >= 3 && < 5,
+                     pretty,
+                     containers,
+                     binary >= 0.6,
+                     zlib,
+                     filepath,
+                     bytestring >= 0.10.0,
+                     array,
+                     mtl,
+                     text >= 0.11,
+                     digest >= 0.0.0.1,
+                     directory >= 1.2.0,
+                     time
   Exposed-modules:   Codec.Archive.Zip
   Default-Language:  Haskell98
   Hs-Source-Dirs:    src
@@ -47,7 +50,6 @@
     cpp-options:     -D_WINDOWS
   else
     Build-depends:   unix
-    Build-tools:     unzip
 
 custom-setup
   setup-depends: base, Cabal
@@ -59,7 +61,9 @@
     Buildable:       False
   Main-is:           Main.hs
   Hs-Source-Dirs:    .
-  Build-Depends:     base >= 4.2 && < 5, directory >= 1.1, bytestring >= 0.9.0,
+  Build-Depends:     base >= 4.2 && < 5,
+                     directory >= 1.1,
+                     bytestring >= 0.9.0,
                      zip-archive
   Other-Modules:     Paths_zip_archive
   Ghc-Options:       -Wall
@@ -70,11 +74,12 @@
   Main-Is:        test-zip-archive.hs
   Hs-Source-Dirs: tests
   Build-Depends:  base >= 4.2 && < 5,
-                  directory >= 1.3, bytestring >= 0.9.0, process, time, 
old-time, 
+                  directory >= 1.3, bytestring >= 0.9.0, process, time,
                   HUnit, zip-archive, temporary, filepath
   Default-Language:  Haskell98
   Ghc-Options:    -Wall
   if os(windows)
     cpp-options:     -D_WINDOWS
   else
+    Build-tools:     unzip
     Build-depends:   unix


Reply via email to