Hello community, here is the log from the commit of package ghc-asn1-types for openSUSE:Factory checked in at 2016-07-21 07:59:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-asn1-types (Old) and /work/SRC/openSUSE:Factory/.ghc-asn1-types.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-asn1-types" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-asn1-types/ghc-asn1-types.changes 2015-10-06 13:24:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-asn1-types.new/ghc-asn1-types.changes 2016-07-21 07:59:38.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Jul 10 17:27:30 UTC 2016 - [email protected] + +- Update to version 0.3.2 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- asn1-types-0.3.1.tar.gz New: ---- asn1-types-0.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-asn1-types.spec ++++++ --- /var/tmp/diff_new_pack.zPWnHe/_old 2016-07-21 07:59:40.000000000 +0200 +++ /var/tmp/diff_new_pack.zPWnHe/_new 2016-07-21 07:59:40.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-asn1-types # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,52 +17,49 @@ %global pkg_name asn1-types - -Name: ghc-asn1-types -Version: 0.3.1 +Name: ghc-%{pkg_name} +Version: 0.3.2 Release: 0 Summary: ASN.1 types License: BSD-3-Clause Group: System/Libraries - -Url: http://hackage.haskell.org/package/%{pkg_name} -Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build - +Url: https://hackage.haskell.org/package/%{pkg_name} +Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros # Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel BuildRequires: ghc-hourglass-devel BuildRequires: ghc-memory-devel +BuildRequires: ghc-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build # End cabal-rpm deps %description ASN.1 standard types. - %package devel Summary: Haskell %{pkg_name} library development files Group: Development/Libraries/Other -Provides: %{name}-static = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} -Requires: %{name} = %{version}-%{release} %description devel This package provides the Haskell %{pkg_name} library development files. - %prep %setup -q -n %{pkg_name}-%{version} + %build %ghc_lib_build + %install %ghc_lib_install + %post devel %ghc_pkg_recache ++++++ asn1-types-0.3.1.tar.gz -> asn1-types-0.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asn1-types-0.3.1/Data/ASN1/Types/String.hs new/asn1-types-0.3.2/Data/ASN1/Types/String.hs --- old/asn1-types-0.3.1/Data/ASN1/Types/String.hs 2015-09-21 15:04:20.000000000 +0200 +++ new/asn1-types-0.3.2/Data/ASN1/Types/String.hs 2015-12-19 08:32:06.000000000 +0100 @@ -134,7 +134,13 @@ decodeBMP :: ByteString -> String decodeBMP b | odd (B.length b) = error "not a valid BMP string" - | otherwise = undefined + | otherwise = fromUCS2 $ B.unpack b + where fromUCS2 [] = [] + fromUCS2 (b0:b1:l) = + let v :: Word16 + v = (fromIntegral b0 `shiftL` 8) .|. fromIntegral b1 + in toEnum (fromIntegral v) : fromUCS2 l + fromUCS2 _ = error "decodeBMP: internal error" encodeBMP :: String -> ByteString encodeBMP s = B.pack $ concatMap (toUCS2 . fromEnum) s where toUCS2 v = [b0,b1] @@ -144,7 +150,16 @@ decodeUTF32 :: ByteString -> String decodeUTF32 b | (B.length b `mod` 4) /= 0 = error "not a valid UTF32 string" - | otherwise = undefined + | otherwise = fromUTF32 $ B.unpack b + where fromUTF32 (a:b:c:d:l) = + let v :: Word32 + v = (fromIntegral a `shiftL` 24) .|. + (fromIntegral b `shiftL` 16) .|. + (fromIntegral c `shiftL` 8) .|. + (fromIntegral d) + in toEnum (fromIntegral v) : fromUTF32 l + fromUTF32 [] = [] + fromUTF32 _ = error "decodeUTF32: internal error" encodeUTF32 :: String -> ByteString encodeUTF32 s = B.pack $ concatMap (toUTF32 . fromEnum) s where toUTF32 v = [b0,b1,b2,b3] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asn1-types-0.3.1/asn1-types.cabal new/asn1-types-0.3.2/asn1-types.cabal --- old/asn1-types-0.3.1/asn1-types.cabal 2015-09-21 15:04:20.000000000 +0200 +++ new/asn1-types-0.3.2/asn1-types.cabal 2015-12-19 08:32:06.000000000 +0100 @@ -1,5 +1,5 @@ Name: asn1-types -Version: 0.3.1 +Version: 0.3.2 Description: ASN.1 standard types License: BSD3 License-file: LICENSE
