summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/base64-bytestring
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/base64-bytestring')
-rw-r--r--dev-haskell/base64-bytestring/Manifest4
-rw-r--r--dev-haskell/base64-bytestring/base64-bytestring-0.1.1.1.ebuild40
-rw-r--r--dev-haskell/base64-bytestring/base64-bytestring-0.1.1.3.ebuild33
-rw-r--r--dev-haskell/base64-bytestring/base64-bytestring-1.0.0.0.ebuild29
-rw-r--r--dev-haskell/base64-bytestring/base64-bytestring-1.0.0.1.ebuild29
-rw-r--r--dev-haskell/base64-bytestring/files/Tests.hs116
-rw-r--r--dev-haskell/base64-bytestring/metadata.xml11
7 files changed, 262 insertions, 0 deletions
diff --git a/dev-haskell/base64-bytestring/Manifest b/dev-haskell/base64-bytestring/Manifest
new file mode 100644
index 000000000000..01735fc885d3
--- /dev/null
+++ b/dev-haskell/base64-bytestring/Manifest
@@ -0,0 +1,4 @@
+DIST base64-bytestring-0.1.1.1.tar.gz 6005 SHA256 8dbfd13372330580e8ac94ca09f359aa5dd021625ec190fa12bb1de781b61248 SHA512 b1d21c437a0983d9766139f53ef77aa2adc2e0a42d4e7fceff2539c8a235fbb0e9cd866546f1440534c62301675cf3833c9c0f9793e9dba3e3b2c13f2d8d7ac9 WHIRLPOOL f3b6e27bea4cd39202f36fc1d04cb428f79add85c62d2f5d409994b9d96b88fe32ae1e48608790b366e6122c46366d9ccca678479c2997a11a0504cf956cf0e8
+DIST base64-bytestring-0.1.1.3.tar.gz 6976 SHA256 8f699640f3a9428fb3f5ab11fd7689fa760be08149fb42c36431c9e22cd1d53f SHA512 49ca6320ddb3a6b149fd61e6a046404fc692c7030d4ad48e6d390b645e1c5343854d9814f7e58369c8cba0089d0da1803c57d808c4217bfefe27303d93a20587 WHIRLPOOL 9cecc37650b12b5c210dffc953535a29159e24ae3933ff0b9b70ae685e3ea3730ba1daee93c183db6881e5865cbe1ba02cc3875919005c83a55671298c48f42d
+DIST base64-bytestring-1.0.0.0.tar.gz 8861 SHA256 759fbb0f8f3ff26c4ad3e71fbcccfd472bc1a4eefe4b5508ce78a8793305197c SHA512 272f2535fc39079bb5b59ef833cc37912bdafd559b1cfeaa3ba2982e5ed784226637b7f8349882dd4fc036b51b762cc811c743a153ea3fa151322c7f9c5d9a7b WHIRLPOOL 21f7224101ea592409e1f60c2e8212eeb8df84a4b0678b451234759b379508e16d711ba3a5999a1ba70983594608f2b088b8818d0435cb478543b9b3b537b568
+DIST base64-bytestring-1.0.0.1.tar.gz 9080 SHA256 ab25abf4b00a2f52b270bc3ed43f1d59f16c8eec9d7dffb14df1e9265b233b50 SHA512 6936b34955b89a275f5bd71c74bbad2be6ff9e2023ac652bdbc9c5b10dd624e3862fc348849858fdb5c7b8aacc36ab4cda8bc6ea797c129b6b28d7e2e2e610e7 WHIRLPOOL 4d3499d38fb5276c71ee79bed2af1b802c764570729d912b2f7bc62bc2106fe8053f277549ffb040ab7fcb0cd4574b22f5249454f8f93233c7b528d00ffcc277
diff --git a/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.1.ebuild b/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.1.ebuild
new file mode 100644
index 000000000000..e0378af1ed2b
--- /dev/null
+++ b/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Fast base64 encoding and deconding for ByteStrings"
+HOMEPAGE="https://github.com/bos/base64-bytestring"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND=">=dev-lang/ghc-6.10.1"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ test? (
+ dev-haskell/hunit
+ >=dev-haskell/quickcheck-2.4.0.1
+ dev-haskell/test-framework
+ dev-haskell/test-framework-hunit
+ dev-haskell/test-framework-quickcheck2
+ )
+ "
+
+src_prepare() {
+ cp "${FILESDIR}/Tests.hs" tests \
+ || die "Could not copy missing Tests.hs"
+ sed -e "s@bytestring == 0.9.*@bytestring < 0.11@"\
+ -i "${PN}.cabal"
+}
+
+src_configure() {
+ cabal_src_configure $(use test && use_enable test tests) #395351
+}
diff --git a/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.3.ebuild b/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.3.ebuild
new file mode 100644
index 000000000000..7ba12eaae045
--- /dev/null
+++ b/dev-haskell/base64-bytestring/base64-bytestring-0.1.1.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Fast base64 encoding and deconding for ByteStrings"
+HOMEPAGE="https://github.com/bos/base64-bytestring"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND=">=dev-lang/ghc-6.10.1"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ test? (
+ dev-haskell/hunit
+ >=dev-haskell/quickcheck-2.4.0.1
+ dev-haskell/test-framework
+ dev-haskell/test-framework-hunit
+ dev-haskell/test-framework-quickcheck2
+ )
+ "
+
+src_configure() {
+ cabal_src_configure $(use test && use_enable test tests) #395351
+}
diff --git a/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.0.ebuild b/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.0.ebuild
new file mode 100644
index 000000000000..352c8949ce16
--- /dev/null
+++ b/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Fast base64 encoding and deconding for ByteStrings"
+HOMEPAGE="https://github.com/bos/base64-bytestring"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ test? ( dev-haskell/hunit
+ dev-haskell/quickcheck
+ dev-haskell/test-framework
+ dev-haskell/test-framework-hunit
+ dev-haskell/test-framework-quickcheck2
+ )
+ >=dev-haskell/cabal-1.8"
diff --git a/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.1.ebuild b/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.1.ebuild
new file mode 100644
index 000000000000..e639daf70b32
--- /dev/null
+++ b/dev-haskell/base64-bytestring/base64-bytestring-1.0.0.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.2.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Fast base64 encoding and decoding for ByteStrings"
+HOMEPAGE="https://github.com/bos/base64-bytestring"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ test? ( dev-haskell/hunit
+ dev-haskell/quickcheck
+ dev-haskell/test-framework
+ dev-haskell/test-framework-hunit
+ dev-haskell/test-framework-quickcheck2
+ )
+ >=dev-haskell/cabal-1.8"
diff --git a/dev-haskell/base64-bytestring/files/Tests.hs b/dev-haskell/base64-bytestring/files/Tests.hs
new file mode 100644
index 000000000000..da661f52382f
--- /dev/null
+++ b/dev-haskell/base64-bytestring/files/Tests.hs
@@ -0,0 +1,116 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Main (main) where
+
+import Test.Framework (Test, defaultMain, testGroup)
+import Test.Framework.Providers.QuickCheck2 (testProperty)
+import Test.Framework.Providers.HUnit (testCase)
+
+import Test.QuickCheck (Arbitrary(..))
+
+import Control.Monad (liftM)
+import qualified Data.ByteString.Base64 as Base64
+import qualified Data.ByteString.Base64.URL as Base64URL
+import Data.ByteString (ByteString)
+import Data.ByteString.Char8 ()
+import qualified Data.ByteString as B
+import Test.HUnit hiding (Test)
+
+
+main :: IO ()
+main = defaultMain tests
+
+tests :: [Test]
+tests = [
+ testGroup "Base64" [
+ testProperty "decodeEncode" $
+ genericDecodeEncode Base64.encode Base64.decode
+ , testProperty "decodeEncode Lenient" $
+ genericDecodeEncode Base64.encode
+ (liftM Right Base64.decodeLenient)
+ , testGroup "base64-string tests" base64_string_tests
+ ]
+ , testGroup "Base64URL" [
+ testProperty "decodeEncode" $
+ genericDecodeEncode Base64URL.encode Base64URL.decode
+ , testProperty "decodeEncode Lenient" $
+ genericDecodeEncode Base64URL.encode
+ (liftM Right Base64URL.decodeLenient)
+ , testGroup "base64-string tests" base64url_string_tests
+ ]
+ ]
+
+instance Arbitrary ByteString where
+ arbitrary = liftM B.pack arbitrary
+
+-- | Decoding an encoded sintrg should produce the original string.
+genericDecodeEncode :: (ByteString -> ByteString)
+ -> (ByteString -> Either String ByteString)
+ -> ByteString -> Bool
+genericDecodeEncode enc dec x = case dec (enc x) of
+ Left _ -> False
+ Right x' -> x == x'
+
+--
+-- Unit tests from base64-string
+-- Copyright (c) Ian Lynagh, 2005, 2007.
+--
+
+base64_string_tests :: [Test]
+base64_string_tests =
+ base64_string_test Base64.encode Base64.decode testData ++
+ base64_string_test Base64.encode decodeURL testData
+ where decodeURL :: ByteString -> Either String ByteString
+ decodeURL = liftM Right Base64.decodeLenient
+ testData :: [(ByteString, ByteString)]
+ testData = [("", "")
+ ,("\0", "AA==")
+ ,("\255", "/w==")
+ ,("E", "RQ==")
+ ,("Ex", "RXg=")
+ ,("Exa", "RXhh")
+ ,("Exam", "RXhhbQ==")
+ ,("Examp", "RXhhbXA=")
+ ,("Exampl", "RXhhbXBs")
+ ,("Example", "RXhhbXBsZQ==")
+ ,("Ex\0am\254ple", "RXgAYW3+cGxl")
+ ,("Ex\0am\255ple", "RXgAYW3/cGxl")
+ ]
+
+-- | Same as the base64_string_tests but using the alternative alphabet
+base64url_string_tests :: [Test]
+base64url_string_tests =
+ base64_string_test Base64URL.encode Base64URL.decode testData ++
+ base64_string_test Base64URL.encode decodeURL testData
+ where decodeURL :: ByteString -> Either String ByteString
+ decodeURL = liftM Right Base64URL.decodeLenient
+ testData :: [(ByteString, ByteString)]
+ testData = [("", "")
+ ,("\0", "AA==")
+ ,("\255", "_w==")
+ ,("E", "RQ==")
+ ,("Ex", "RXg=")
+ ,("Exa", "RXhh")
+ ,("Exam", "RXhhbQ==")
+ ,("Examp", "RXhhbXA=")
+ ,("Exampl", "RXhhbXBs")
+ ,("Example", "RXhhbXBsZQ==")
+ ,("Ex\0am\254ple", "RXgAYW3-cGxl")
+ ,("Ex\0am\255ple", "RXgAYW3_cGxl")
+ ]
+
+-- | Generic test given encod enad decode funstions and a
+-- list of (plain, encoded) pairs
+base64_string_test :: (ByteString -> ByteString)
+ -> (ByteString -> Either String ByteString)
+ -> [(ByteString, ByteString)] -> [Test]
+base64_string_test enc dec testData = concat
+ [ [ testCase ("base64-string: Encode " ++ show plain)
+ (encoded_plain @?= encoded),
+ testCase ("base64-string: Decode " ++ show plain)
+ (decoded_encoded @?= Right plain) ]
+ | (plain, encoded) <- testData,
+ let encoded_plain = enc plain
+ decoded_encoded = dec encoded
+ ]
diff --git a/dev-haskell/base64-bytestring/metadata.xml b/dev-haskell/base64-bytestring/metadata.xml
new file mode 100644
index 000000000000..78444e5fc99c
--- /dev/null
+++ b/dev-haskell/base64-bytestring/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <longdescription>
+ Fast base64 encoding and deconding for ByteStrings
+ </longdescription>
+ <upstream>
+ <remote-id type="github">bos/base64-bytestring</remote-id>
+ </upstream>
+</pkgmetadata>