summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-haskell/hsql')
-rw-r--r--dev-haskell/hsql/ChangeLog7
-rw-r--r--dev-haskell/hsql/Manifest19
-rw-r--r--dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch58
-rw-r--r--dev-haskell/hsql/hsql-1.7.ebuild11
4 files changed, 79 insertions, 16 deletions
diff --git a/dev-haskell/hsql/ChangeLog b/dev-haskell/hsql/ChangeLog
index 26a27c53ed8b..03a5f5c5661b 100644
--- a/dev-haskell/hsql/ChangeLog
+++ b/dev-haskell/hsql/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-haskell/hsql
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/ChangeLog,v 1.6 2006/03/11 20:33:26 dcoutts Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/ChangeLog,v 1.7 2006/03/11 21:31:06 dcoutts Exp $
+
+ 11 Mar 2006; Duncan Coutts <dcoutts@gentoo.org>
+ +files/hsql-1.7-sqltext-to-int.patch, hsql-1.7.ebuild:
+ Add a patch by Bjorn Bringert to fix a problem found in the sqlite3 backend.
+ See also bugs #98549 and #98551.
11 Mar 2006; Duncan Coutts <dcoutts@gentoo.org> hsql-1.7.ebuild:
Remove the backends from PDEPEND. Use a message in pkg_postinst instead.
diff --git a/dev-haskell/hsql/Manifest b/dev-haskell/hsql/Manifest
index 1051f42143ef..fea39f6e81a9 100644
--- a/dev-haskell/hsql/Manifest
+++ b/dev-haskell/hsql/Manifest
@@ -1,22 +1,15 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 0f90345ddd2bc9e123a90e46a00b9e4c ChangeLog 922
RMD160 4fdc31f052737f6a312557781e19ebb3871305dc ChangeLog 922
SHA256 68b3a9e95e30271be4aae9f25e2521bf144dc591e8fd2e1dc4ec4ca20ca15739 ChangeLog 922
MD5 8b88f3b8f094ddbdd05b6694b7543fc7 files/digest-hsql-1.7 223
RMD160 7d319609e94b9fd8a725bbb036d5f6ae37e818f6 files/digest-hsql-1.7 223
SHA256 68b6c539208dcf5c7056e412864a29dda67a3bea95995b53b80c981b76e3cedd files/digest-hsql-1.7 223
-MD5 19853965d81712068c4c6fbc31233e33 hsql-1.7.ebuild 785
-RMD160 ed39b68bf5f62bdb9d1e7872d419efb4561bf969 hsql-1.7.ebuild 785
-SHA256 961cfada6f0e29f5360ddef3484db3481229f5b68ff5d1320d3390125c414ac7 hsql-1.7.ebuild 785
+MD5 8d8cd22a297e6d46e9722463ea64770c files/hsql-1.7-sqltext-to-int.patch 2443
+RMD160 2c81d50e1eb4cbf947d09ccdd9ed394374312b80 files/hsql-1.7-sqltext-to-int.patch 2443
+SHA256 abecdec2d2b86d55899520cce95249634232134f2045ef1fe1151884e433f20a files/hsql-1.7-sqltext-to-int.patch 2443
+MD5 120ba2bc8889de605d7adab3910a9e01 hsql-1.7.ebuild 883
+RMD160 1d1d49fd5b6bb6f08a1ba7cfffbda8946d05e683 hsql-1.7.ebuild 883
+SHA256 d53ff3f265f8446b32bf48bd04631eed455713840663b0336d5ab517c9caf441 hsql-1.7.ebuild 883
MD5 c694674dcbef799cd4fdb6914683ebff metadata.xml 223
RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 metadata.xml 223
SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 metadata.xml 223
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2.1 (GNU/Linux)
-
-iD8DBQFEEzQG/B0cxt+cq+wRAnOsAJ9ecj8mQZrL6/9tGrWAmE1Sf2blZgCfaY6L
-p+YjyxBBVmlrwa39UJmUQG4=
-=Devc
------END PGP SIGNATURE-----
diff --git a/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch b/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch
new file mode 100644
index 000000000000..65effac3c7e6
--- /dev/null
+++ b/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch
@@ -0,0 +1,58 @@
+Index: HSQL/Database/HSQL.hsc
+===================================================================
+RCS file: /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL.hsc,v
+retrieving revision 1.16
+diff -u -r1.16 HSQL.hsc
+--- HSQL/Database/HSQL.hsc 9 Jan 2006 14:49:23 -0000 1.16
++++ HSQL/Database/HSQL.hsc 11 Mar 2006 20:27:45 -0000
+@@ -239,7 +239,8 @@
+ sqlType==SqlTinyInt ||
+ sqlType==SqlSmallInt||
+ sqlType==SqlBigInt = c_atoi cstr
+- | otherwise = throwDyn (SqlBadTypeCast name sqlType)
++ fromSqlCStringLen field cstr cstrLen
++ = defaultFromSqlCStringLen field cstr cstrLen
+
+ fromSqlValue SqlInteger s = Just (read s)
+ fromSqlValue SqlMedInt s = Just (read s)
+@@ -265,7 +266,8 @@
+ #else
+ c_strtoll cstr nullPtr 10
+ #endif
+- | otherwise = throwDyn (SqlBadTypeCast name sqlType)
++ fromSqlCStringLen field cstr cstrLen
++ = defaultFromSqlCStringLen field cstr cstrLen
+
+ fromSqlValue SqlInteger s = Just (read s)
+ fromSqlValue SqlMedInt s = Just (read s)
+Index: HSQL/Database/HSQL/Types.hs
+===================================================================
+RCS file: /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL/Types.hs,v
+retrieving revision 1.9
+diff -u -r1.9 Types.hs
+--- HSQL/Database/HSQL/Types.hs 9 Jan 2006 14:49:23 -0000 1.9
++++ HSQL/Database/HSQL/Types.hs 11 Mar 2006 20:27:45 -0000
+@@ -150,13 +150,16 @@
+ -- This allows for faster conversion for eq. integral numeric types, etc.
+ -- Default version uses fromSqlValue.
+ fromSqlCStringLen :: FieldDef -> CString -> Int -> IO a
+- fromSqlCStringLen (name,sqlType,_) cstr cstrLen
+- | cstr == nullPtr = throwDyn (SqlFetchNull name)
+- | otherwise = do
+- str <- peekCStringLen (cstr, cstrLen)
+- case fromSqlValue sqlType str of
+- Nothing -> throwDyn (SqlBadTypeCast name sqlType)
+- Just v -> return v
++ fromSqlCStringLen = defaultFromSqlCStringLen
+
+ fromSqlValue :: SqlType -> String -> Maybe a
+ toSqlValue :: a -> String
++
++defaultFromSqlCStringLen :: SqlBind a => FieldDef -> CString -> Int -> IO a
++defaultFromSqlCStringLen (name,sqlType,_) cstr cstrLen
++ | cstr == nullPtr = throwDyn (SqlFetchNull name)
++ | otherwise = do
++ str <- peekCStringLen (cstr, cstrLen)
++ case fromSqlValue sqlType str of
++ Nothing -> throwDyn (SqlBadTypeCast name sqlType)
++ Just v -> return v
diff --git a/dev-haskell/hsql/hsql-1.7.ebuild b/dev-haskell/hsql/hsql-1.7.ebuild
index a24c302e55a0..8fb38388f205 100644
--- a/dev-haskell/hsql/hsql-1.7.ebuild
+++ b/dev-haskell/hsql/hsql-1.7.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/hsql-1.7.ebuild,v 1.6 2006/03/11 20:33:26 dcoutts Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/hsql-1.7.ebuild,v 1.7 2006/03/11 21:31:06 dcoutts Exp $
CABAL_FEATURES="lib haddock"
-inherit ghc-package haskell-cabal
+inherit base ghc-package haskell-cabal
DESCRIPTION="SQL bindings for Haskell"
HOMEPAGE="http://htoolkit.sourceforge.net/"
@@ -18,6 +18,13 @@ DEPEND=">=virtual/ghc-6.4.1"
S="${WORKDIR}/HSQL/HSQL"
+src_unpack() {
+ base_src_unpack
+
+ cd ${S}
+ epatch "${FILESDIR}/${P}-sqltext-to-int.patch"
+}
+
pkg_postinst () {
ghc-package_pkg_postinst