[dev-haskell/hdbc-postgresql] remove, 2.3.2.2 from Gentoo is fine

This commit is contained in:
Sławomir Nizio
2013-11-30 02:28:13 +01:00
parent 8bfd5f6388
commit e90717e4ea
5 changed files with 0 additions and 173 deletions
-1
View File
@@ -1 +0,0 @@
DIST HDBC-postgresql-2.3.2.1.tar.gz 24683 SHA256 ebda9d5809d9e24ad67234784df9d75af1b12c6a32d87b221bb785d4080721ca SHA512 12576203936d7c939688946160133174b12082c6684554f6f5a8e3c44251982c13eacdf9a18a45c21e877a220178b303299a3b3e72cb828cf58dede2b9c519cb WHIRLPOOL 08491a2f4ad67fce8ee14fa935499af91bbb0927241bdd51dc0d91acd1543b7ff200abb6d8d05fca43d9df304d4b0ad0450414079eccaec381679c1cbf394552
@@ -1,53 +0,0 @@
--- HDBC-postgresql-2.3.2.1-orig/testsrc/TestSbasics.hs 2012-03-04 04:08:01.000000000 +1100
+++ HDBC-postgresql-2.3.2.1/testsrc/TestSbasics.hs 2012-10-13 11:08:27.482597846 +1100
@@ -1,10 +1,14 @@
+{-# LANGUAGE CPP, ScopedTypeVariables #-}
module TestSbasics(tests) where
import Test.HUnit
import Data.List
import Database.HDBC
import TestUtils
import System.IO
-import Control.Exception hiding (catch)
+#if !MIN_VERSION_base(4,6,0)
+import Prelude hiding (catch)
+#endif
+import Control.Exception
openClosedb = sqlTestCase $
do dbh <- connectDB
@@ -142,7 +146,7 @@
-- Let's try a rollback.
catch (withTransaction dbh (\_ -> do sExecuteMany sth rows
fail "Foo"))
- (\_ -> return ())
+ (\(_::IOException) -> return ())
sExecute qrysth []
sFetchAllRows qrysth >>= (assertEqual "rollback" [[Just "0"]])
--- HDBC-postgresql-2.3.2.1-orig/testsrc/Testbasics.hs 2012-03-04 04:08:01.000000000 +1100
+++ HDBC-postgresql-2.3.2.1/testsrc/Testbasics.hs 2012-10-13 11:07:43.622396904 +1100
@@ -1,9 +1,13 @@
+{-# LANGUAGE CPP, ScopedTypeVariables #-}
module Testbasics(tests) where
import Test.HUnit
import Database.HDBC
import TestUtils
import System.IO
-import Control.Exception hiding (catch)
+#if !MIN_VERSION_base(4,6,0)
+import Prelude hiding (catch)
+#endif
+import Control.Exception
openClosedb = sqlTestCase $
do dbh <- connectDB
@@ -140,7 +144,7 @@
-- Let's try a rollback.
catch (withTransaction dbh (\_ -> do executeMany sth rows
fail "Foo"))
- (\_ -> return ())
+ (\(_::IOException) -> return ())
execute qrysth []
fetchAllRows qrysth >>= (assertEqual "rollback" [[SqlString "0"]])
@@ -1,46 +0,0 @@
From e9b2fbab07b8f55ae6a9e120ab0b98c433842a8b Mon Sep 17 00:00:00 2001
From: Gracjan Polak <gracjan@scrive.com>
Date: Wed, 11 Sep 2013 13:29:22 +0300
Subject: [PATCH] Add a hack to support both Cabal-1.16 and Cabal-1.18 Setup.hs
script (fixed number of arguments for programFindLocation)
---
Setup.hs | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/Setup.hs b/Setup.hs
index 76d7605..7cbd484 100755
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,4 +1,5 @@
#!/usr/bin/env runhaskell
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
import Distribution.Simple
import Distribution.PackageDescription
@@ -26,8 +27,21 @@ main = defaultMainWithHooks simpleUserHooks {
}
}
+-- 'ConstOrId' is a @Cabal-1.16@ vs @Cabal-1.18@ compatibility hack,
+-- 'programFindLocation' has a new (unused in this case)
+-- parameter. 'ConstOrId' adds this parameter when types say it is
+-- mandatory.
+class ConstOrId a b where
+ constOrId :: a -> b
+
+instance ConstOrId a a where
+ constOrId = id
+
+instance ConstOrId a (b -> a) where
+ constOrId = const
+
pgconfigProgram = (simpleProgram "pgconfig or pg_config") {
- programFindLocation = \verbosity -> do
+ programFindLocation = \verbosity -> constOrId $ do
pgconfig <- findProgramLocation verbosity "pgconfig"
pg_config <- findProgramLocation verbosity "pg_config"
return (pgconfig `mplus` pg_config)
--
1.8.4
@@ -1,65 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-postgresql/hdbc-postgresql-2.3.2.1.ebuild,v 1.5 2012/12/24 15:35:57 slyfox Exp $
EAPI=4
# ebuild generated by hackport 0.2.18.9999
CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
inherit base haskell-cabal versionator
MY_PN="HDBC-postgresql"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="PostgreSQL driver for HDBC"
HOMEPAGE="http://github.com/hdbc/hdbc-postgresql"
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="2"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="test" # requires configured postgresql
hdbc_PV=$(get_version_component_range 1-2)
RDEPEND=">dev-db/postgresql-base-8
dev-haskell/convertible[profile?]
=dev-haskell/hdbc-${hdbc_PV}*[profile?]
dev-haskell/mtl[profile?]
dev-haskell/parsec[profile?]
dev-haskell/utf8-string[profile?]
>=dev-lang/ghc-6.8.2
>=dev-db/postgresql-base-8"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.8
test? ( dev-haskell/convertible
dev-haskell/hunit
dev-haskell/quickcheck
dev-haskell/testpack
)
"
S="${WORKDIR}/${MY_P}"
PATCHES=("${FILESDIR}/${MY_PN}-2.3.2.1-ghc-7.6.patch" "${FILESDIR}/${PN}-new-Cabal.patch")
src_configure() {
cabal_src_configure $(cabal_flag test buildtests)
}
src_test() {
# default tests
haskell-cabal_src_test || die "cabal test failed"
# built custom tests
"${S}/dist/build/runtests/runtests" || die "unit tests failed"
}
src_install() {
cabal_src_install
# if tests were enabled, make sure the unit test driver is deleted
rm -f "${ED}/usr/bin/runtests"
}
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>haskell</herd>
<maintainer>
<email>haskell@gentoo.org</email>
</maintainer>
</pkgmetadata>