diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-23 08:35:49 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-23 08:35:49 +0100 |
commit | 386855c4d1ef509c1fd32abd721589c81669613b (patch) | |
tree | 35dc984118f0a7dc2df88313d83bb5779fd12514 /dev-haskell/hdbc | |
parent | 0118ac4510d7b85ca62da20e4abd1286dd8bd752 (diff) |
gentoo auto-resync : 23:10:2023 - 08:35:49
Diffstat (limited to 'dev-haskell/hdbc')
-rw-r--r-- | dev-haskell/hdbc/Manifest | 7 | ||||
-rw-r--r-- | dev-haskell/hdbc/files/hdbc-2.4.0.4-fix-tests.patch | 127 | ||||
-rw-r--r-- | dev-haskell/hdbc/hdbc-2.4.0.3.ebuild | 2 | ||||
-rw-r--r-- | dev-haskell/hdbc/hdbc-2.4.0.4.ebuild | 43 | ||||
-rw-r--r-- | dev-haskell/hdbc/metadata.xml | 7 |
5 files changed, 177 insertions, 9 deletions
diff --git a/dev-haskell/hdbc/Manifest b/dev-haskell/hdbc/Manifest index 804b1300a8fe..a438ba11dcc7 100644 --- a/dev-haskell/hdbc/Manifest +++ b/dev-haskell/hdbc/Manifest @@ -1,3 +1,6 @@ +AUX hdbc-2.4.0.4-fix-tests.patch 4335 BLAKE2B 07eb99aef19b37baf6ef8dee74509b84e8a9ac237c02d1915c9bbeb638969a0a740381bf53375fc674d64e58b23fca92513ffce2caf86b4211c88fa56e3c7d04 SHA512 addd0874412c64af9feb8ff23a0f92b4052d2cfa76967d9b49ba5b8c2f069cf347b0af2173ddcc6933beb8c907783c0b6af80221187c10f6039ce45508b30a4c DIST HDBC-2.4.0.3.tar.gz 23489 BLAKE2B 23de627666bc4a03c5f3ec93607641c539c1652a4fa9b798dbfd1f9c09ebcffc562bda88e45a522e38753177d69ee0585c9536ab6b6c353747373b751ead7f2a SHA512 394a74e69ff854e657f66f1fe25ff4d2de33bf4410d560454ec7a2cd3e383586acc34eb694a7d1d70005871240417ee32d4163af9e33978921bfbcfcfe23fe43 -EBUILD hdbc-2.4.0.3.ebuild 915 BLAKE2B 1fbaee60a0ab990818c747303e5696baaf8f3ca743e6ab2c05859d7fd33f434b8b4c7e78c4e1d1b87a4c979709994d09ae776fcfd1283b2077a4d0c9d20187d0 SHA512 51661418cb69930e765487a68959d447c232c5e82986c94332cf4bc644fdbde2b2e52d3061de3245173a46a40d694961e1e8488287a39dd6d92038dc342e17df -MISC metadata.xml 631 BLAKE2B 07611f0047262254fb4a5e7b77278f2459ee2b0339407e9fd097ca0df93404461defb700f0081631e22b8fda960f537fad7df66816a0edfe1716fb825659c62b SHA512 09b973fb4b226cf25eafd3d54c3673a1584c718cf20c944a47e07addb887f619ee4e2a4850b61ed4eae6491ce0236ea69e1b53faaa4f302eead920640b957fa9 +DIST hdbc-2.4.0.4.tar.gz 23756 BLAKE2B 5711f68c212194915895392139544c401981d46672f969fdc453deb01611826f536fefcc989edb1a723ccf9b385c6934d0f7102ded3d3fba17e494faad341a73 SHA512 16bdd35b8b2491ead171f4920133025ac6bc2cf47f8ea9c0ed684107ad576f757badeabc4e789f976948d96a47dafa638f907d9a534bce7bcd54b1d406fb001a +EBUILD hdbc-2.4.0.3.ebuild 915 BLAKE2B a8692f56be783243224a25d4c51c21bb982a28bb78505fbf7e494e9b1c3cae9a2ee26dbb24fbbd46e3074ac5cff110f61e7d4cebfc21f1c09affac4dd01e4393 SHA512 0c6176e686f6c2db7990753ccf4de3f2a2ce32db581db8a4a71ba56483fea22659f1a35cb37c7f2bac9b888df81b6e27acff1f0c218b8b50d5542e0ffb82c45c +EBUILD hdbc-2.4.0.4.ebuild 878 BLAKE2B c1a3104b9c2d4790e3220da2b87a72a70ea17649afadd1c321c77b2790b280321af9a93e84d1923d1617a3186a5b3b7806c4c1cd9d2696932ba67d573003f79f SHA512 cedb4a4b1e42736bfbfebe1b7018bde580a97c6e96258f41862a029028c4b738e7f19a8c923306b3d1ed5ef25538739df8c72e300e40a8c4afca32c027b3d762 +MISC metadata.xml 369 BLAKE2B 9f28c0762fcdaf15160914ccec011b8117a751e44b9ea763612ed73ac8be23afb0300621956bf436bb5ca328c595ff639f59d7bcb2af25d3868eb3ac0a8f3d0b SHA512 be438ea1924c48ddec291faaae21ad3e8ef90da786acd62a5008288581d27181f42238fb3ea430034b9d6ef992139512e60c97767bbb639512213a0fd5a5992e diff --git a/dev-haskell/hdbc/files/hdbc-2.4.0.4-fix-tests.patch b/dev-haskell/hdbc/files/hdbc-2.4.0.4-fix-tests.patch new file mode 100644 index 000000000000..e2b94b459273 --- /dev/null +++ b/dev-haskell/hdbc/files/hdbc-2.4.0.4-fix-tests.patch @@ -0,0 +1,127 @@ +From cea6c0ebde0c3c7a0a0976fd9a0e745ccad9dec4 Mon Sep 17 00:00:00 2001 +From: hololeap <hololeap@users.noreply.github.com> +Date: Mon, 27 Feb 2023 07:54:10 -0700 +Subject: [PATCH] Fix tests + +Fix tests for modern 'time' and turn 'runtests' into a proper test +suite. + +Signed-off-by: hololeap <hololeap@users.noreply.github.com> +--- + HDBC.cabal | 40 +++++++++++++++++----------------------- + testsrc/TestSqlValue.hs | 16 +++++++++++++++- + 2 files changed, 32 insertions(+), 24 deletions(-) + +diff --git a/HDBC.cabal b/HDBC.cabal +index e189f9a..15d0c15 100644 +--- a/HDBC.cabal ++++ b/HDBC.cabal +@@ -24,9 +24,6 @@ source-repository head + + flag splitBase + description: Choose the new smaller, split-up base package. +-flag buildtests +- description: Build the executable to run unit tests +- default: False + flag minTime15 + description: Use time 1.5 or higher. + default: True +@@ -59,28 +56,25 @@ library + FlexibleInstances, DeriveDataTypeable + Default-Language: Haskell2010 + +-Executable runtests +- if flag(buildtests) +- Buildable: True +- Build-Depends: HUnit, QuickCheck >= 2.0 ++Test-Suite runtests ++ Build-Depends: HUnit, QuickCheck >= 2.0 + +- if flag(splitBase) +- Build-Depends: base>=3 && <5, old-time, bytestring, containers +- if flag(minTime15) +- Build-Depends: time >= 1.5 && < 1.14 +- CPP-Options: -DMIN_TIME_15 +- else +- Build-Depends: time >= 1.2 && < 1.5, old-locale +- else +- Build-Depends: base<3 +- Build-Depends: mtl, convertible >= 1.1.0.0, utf8-string, text +- +- -- Hack for cabal-install weirdness. cabal-install forces base 3, +- -- though it works fine for Setup.lhs manually. Fix. +- if impl(ghc >= 6.9) +- build-depends: base >= 4 ++ if flag(splitBase) ++ Build-Depends: base>=3 && <5, old-time, bytestring, containers ++ if flag(minTime15) ++ Build-Depends: time >= 1.5 && < 1.14 ++ CPP-Options: -DMIN_TIME_15 ++ else ++ Build-Depends: time >= 1.2 && < 1.5, old-locale + else +- Buildable: False ++ Build-Depends: base<3 ++ Build-Depends: mtl, convertible >= 1.1.0.0, utf8-string, text ++ ++ -- Hack for cabal-install weirdness. cabal-install forces base 3, ++ -- though it works fine for Setup.lhs manually. Fix. ++ if impl(ghc >= 6.9) ++ build-depends: base >= 4 ++ Type: exitcode-stdio-1.0 + Main-Is: runtests.hs + Other-Modules: TestSqlValue + Hs-Source-Dirs: ., testsrc +diff --git a/testsrc/TestSqlValue.hs b/testsrc/TestSqlValue.hs +index 7d29453..e6161e8 100644 +--- a/testsrc/TestSqlValue.hs ++++ b/testsrc/TestSqlValue.hs +@@ -6,12 +6,18 @@ All rights reserved. + For license and copyright information, see the file COPYRIGHT + -} + ++{-# LANGUAGE CPP #-} ++ + module TestSqlValue where + import Test.QuickCheck hiding (Result) + import Test.QuickCheck.Property (Result) + import qualified Test.HUnit as HU + import Database.HDBC ++#if MIN_VERSION_time(0,10,0) ++import Data.Time.Format (parseTimeM) ++#else + import Data.Time.Format (parseTime) ++#endif + import Data.Time.LocalTime + import Database.HDBC.Locale (defaultTimeLocale, iso8601DateFormat, oldIso8601DateFormat) + import Data.Maybe +@@ -29,17 +35,25 @@ fromSql_Int x = + + testZonedTimeStr = "1989-08-01 15:33:01 -0500" + testZonedTime :: ZonedTime +-testZonedTime = fromJust $ parseTime defaultTimeLocale (iso8601DateFormat (Just "%T %z")) ++testZonedTime = fromJust $ parseTimeM False defaultTimeLocale (iso8601DateFormat (Just "%T %z")) + testZonedTimeStr + + testZonedTimeFracStr = "1989-08-01 15:33:01.536 -0500" + testZonedTimeFrac :: ZonedTime ++#if MIN_VERSION_time(0,10,0) ++testZonedTimeFrac = fromJust $ parseTimeM False defaultTimeLocale (iso8601DateFormat (Just "%T%Q %z")) ++#else + testZonedTimeFrac = fromJust $ parseTime defaultTimeLocale (iso8601DateFormat (Just "%T%Q %z")) ++#endif + testZonedTimeFracStr + + testZonedTimeTwoDigitYearStr = "89-08-01 15:33:01 -0500" + testZonedTimeTwoDigitYear :: ZonedTime ++#if MIN_VERSION_time(0,10,0) ++testZonedTimeTwoDigitYear = fromJust $ parseTimeM False defaultTimeLocale (oldIso8601DateFormat (Just "%T %z")) ++#else + testZonedTimeTwoDigitYear = fromJust $ parseTime defaultTimeLocale (oldIso8601DateFormat (Just "%T %z")) ++#endif + testZonedTimeTwoDigitYearStr + + ztparsenf = +-- +2.39.2 + diff --git a/dev-haskell/hdbc/hdbc-2.4.0.3.ebuild b/dev-haskell/hdbc/hdbc-2.4.0.3.ebuild index ed0a10f5648d..16d3945d0c86 100644 --- a/dev-haskell/hdbc/hdbc-2.4.0.3.ebuild +++ b/dev-haskell/hdbc/hdbc-2.4.0.3.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 # ebuild generated by hackport 0.6.1.9999 #hackport: flags: buildtests:test diff --git a/dev-haskell/hdbc/hdbc-2.4.0.4.ebuild b/dev-haskell/hdbc/hdbc-2.4.0.4.ebuild new file mode 100644 index 000000000000..159e1a2ddf5a --- /dev/null +++ b/dev-haskell/hdbc/hdbc-2.4.0.4.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# ebuild generated by hackport 0.8.1.0.9999 +#hackport: flags: +minTime15,+splitBase + +CABAL_PN="HDBC" + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="Haskell Database Connectivity" +HOMEPAGE="https://github.com/hdbc/hdbc" + +LICENSE="BSD" +SLOT="2/${PV}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +PATCHES=( + "${FILESDIR}/${PN}-2.4.0.4-fix-tests.patch" +) + +RDEPEND=" + >=dev-haskell/convertible-1.1.0.0:=[profile?] + dev-haskell/old-time:=[profile?] + dev-haskell/utf8-string:=[profile?] + >=dev-lang/ghc-8.4.3:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-2.2.0.1 + test? ( + dev-haskell/hunit + >=dev-haskell/quickcheck-2.0 + ) +" + +src_configure() { + haskell-cabal_src_configure \ + --flag=minTime15 \ + --flag=splitBase +} diff --git a/dev-haskell/hdbc/metadata.xml b/dev-haskell/hdbc/metadata.xml index 5e241a22ffbf..4c4bed34630e 100644 --- a/dev-haskell/hdbc/metadata.xml +++ b/dev-haskell/hdbc/metadata.xml @@ -5,13 +5,8 @@ <email>haskell@gentoo.org</email> <name>Gentoo Haskell</name> </maintainer> - <longdescription> - HDBC provides an abstraction layer between Haskell programs and SQL - relational databases. This lets you write database code once, in - Haskell, and have it work with any number of backend SQL databases - (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.) - </longdescription> <upstream> + <remote-id type="hackage">HDBC</remote-id> <remote-id type="github">hdbc/hdbc</remote-id> </upstream> </pkgmetadata> |