summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2012-06-02 06:00:09 +0000
committerMark Wright <gienah@gentoo.org>2012-06-02 06:00:09 +0000
commit006f3fbcf8c32e68a1381824ea45b33febe3ab34 (patch)
tree7b5b94f1fb7d8eca30efbcb9d396f8b1fc69fd13 /dev-haskell
parentAdd hdbc-mysql (diff)
downloadhistorical-006f3fbcf8c32e68a1381824ea45b33febe3ab34.tar.gz
historical-006f3fbcf8c32e68a1381824ea45b33febe3ab34.tar.bz2
historical-006f3fbcf8c32e68a1381824ea45b33febe3ab34.zip
Bump hdbc-odbc to 2.3.1.0
Package-Manager: portage-2.1.10.63/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/hdbc-odbc/ChangeLog10
-rw-r--r--dev-haskell/hdbc-odbc/files/hdbc-odbc-2.3.1.0-ghc-6.12.patch37
-rw-r--r--dev-haskell/hdbc-odbc/hdbc-odbc-2.3.1.0.ebuild73
3 files changed, 118 insertions, 2 deletions
diff --git a/dev-haskell/hdbc-odbc/ChangeLog b/dev-haskell/hdbc-odbc/ChangeLog
index e491753bcf11..ad2f7ee62590 100644
--- a/dev-haskell/hdbc-odbc/ChangeLog
+++ b/dev-haskell/hdbc-odbc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-haskell/hdbc-odbc
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-odbc/ChangeLog,v 1.14 2011/06/12 19:51:22 slyfox Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-odbc/ChangeLog,v 1.15 2012/06/02 06:00:09 gienah Exp $
+
+*hdbc-odbc-2.3.1.0 (02 Jun 2012)
+
+ 02 Jun 2012; Mark Wright <gienah@gentoo.org>
+ +files/hdbc-odbc-2.3.1.0-ghc-6.12.patch, +hdbc-odbc-2.3.1.0.ebuild:
+ Bump hdbc-odbc to 2.3.1.0
*hdbc-odbc-2.2.3.2 (12 Jun 2011)
diff --git a/dev-haskell/hdbc-odbc/files/hdbc-odbc-2.3.1.0-ghc-6.12.patch b/dev-haskell/hdbc-odbc/files/hdbc-odbc-2.3.1.0-ghc-6.12.patch
new file mode 100644
index 000000000000..791656b18613
--- /dev/null
+++ b/dev-haskell/hdbc-odbc/files/hdbc-odbc-2.3.1.0-ghc-6.12.patch
@@ -0,0 +1,37 @@
+--- HDBC-odbc-2.3.1.0-orig/HDBC-odbc.cabal 2011-08-10 07:16:38.000000000 +1000
++++ HDBC-odbc-2.3.1.0/HDBC-odbc.cabal 2011-08-12 14:51:43.510895477 +1000
+@@ -37,10 +37,10 @@
+ ExistentialQuantification,
+ ForeignFunctionInterface,
+ ScopedTypeVariables
+- Build-Depends: base >= 4.3.1.0 && < 5
++ Build-Depends: base >= 4.2.0.2 && < 5
+ , mtl
+ , HDBC>=2.1.0
+- , time>=1.2.0.3
++ , time>=1.1.4
+ , utf8-string
+ , bytestring
+ GHC-Options: -O2
+--- HDBC-odbc-2.3.1.0-orig/Database/HDBC/ODBC/Statement.hsc 2011-08-10 07:16:38.000000000 +1000
++++ HDBC-odbc-2.3.1.0/Database/HDBC/ODBC/Statement.hsc 2011-08-12 15:16:11.585672600 +1000
+@@ -17,7 +17,7 @@
+ import Database.HDBC.ODBC.Utils
+ import Database.HDBC.ODBC.TypeConv
+
+-import Foreign.C.String (castCUCharToChar)
++import GHC.Base (unsafeChr)
+ import Foreign.C.Types
+ import Foreign.ForeignPtr
+ import Foreign.Ptr
+@@ -55,6 +55,10 @@
+ #let CALLCONV = "ccall"
+ #endif
+
++-- | Convert a C @unsigned char@, representing a Latin-1 character, to
++-- the corresponding Haskell character.
++castCUCharToChar :: CUChar -> Char
++castCUCharToChar ch = unsafeChr (fromIntegral (fromIntegral ch :: Word8))
+ fGetQueryInfo :: Conn -> ChildList -> String
+ -> IO ([SqlColDesc], [(String, SqlColDesc)])
+ fGetQueryInfo iconn children query =
diff --git a/dev-haskell/hdbc-odbc/hdbc-odbc-2.3.1.0.ebuild b/dev-haskell/hdbc-odbc/hdbc-odbc-2.3.1.0.ebuild
new file mode 100644
index 000000000000..2fa09e5d1645
--- /dev/null
+++ b/dev-haskell/hdbc-odbc/hdbc-odbc-2.3.1.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-odbc/hdbc-odbc-2.3.1.0.ebuild,v 1.1 2012/06/02 06:00:09 gienah Exp $
+
+EAPI=4
+
+# ebuild generated by hackport 0.2.18.9999
+
+# haddock is disabled as it chokes in .hsc file:
+# Database/HDBC/ODBC/Statement.hsc:462:3:
+# parse error on input `Word16'
+CABAL_FEATURES="bin lib profile hoogle hscolour"
+inherit haskell-cabal
+
+MY_PN="HDBC-odbc"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="ODBC driver for HDBC"
+HOMEPAGE="http://software.complete.org/hdbc-odbc"
+SRC_URI="http://hackage.haskell.org/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="test" # requires configured ODBC
+
+hdbc_PV=$(get_version_component_range 1-2)
+
+RDEPEND="=dev-haskell/hdbc-${hdbc_PV}*[profile?]
+ dev-haskell/mtl[profile?]
+ >=dev-haskell/time-1.2.0.3[profile?]
+ dev-haskell/utf8-string[profile?]
+ >=dev-lang/ghc-6.12.3
+ >=dev-db/unixODBC-2.2
+ "
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.2.3
+ test? ( dev-haskell/convertible
+ dev-haskell/hunit
+ dev-haskell/quickcheck
+ dev-haskell/testpack
+ dev-haskell/time
+ )
+ "
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ if has_version "<dev-lang/ghc-7.0.1"; then
+ # Backport to ghc 6.12.3.
+ epatch "${FILESDIR}/${P}-ghc-6.12.patch" || die "Could not apply ${P}-ghc-6.12.patch"
+ fi
+}
+
+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"
+}