[arch-commits] Commit in hledger-iadd/repos/community-testing-x86_64 (3 files)
Felix Yan
felixonmars at gemini.archlinux.org
Tue Jul 13 13:42:06 UTC 2021
Date: Tuesday, July 13, 2021 @ 13:42:06
Author: felixonmars
Revision: 976769
archrelease: copy trunk to community-testing-x86_64
Added:
hledger-iadd/repos/community-testing-x86_64/PKGBUILD
(from rev 976768, hledger-iadd/trunk/PKGBUILD)
Deleted:
hledger-iadd/repos/community-testing-x86_64/PKGBUILD
hledger-iadd/repos/community-testing-x86_64/hledger-lib-1.22.patch
------------------------+
PKGBUILD | 104 +++++++++++++++++++++------------------------
hledger-lib-1.22.patch | 107 -----------------------------------------------
2 files changed, 48 insertions(+), 163 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-07-13 13:41:47 UTC (rev 976768)
+++ PKGBUILD 2021-07-13 13:42:06 UTC (rev 976769)
@@ -1,56 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-_hkgname=hledger-iadd
-pkgname=hledger-iadd
-pkgver=1.3.14
-pkgrel=32
-pkgdesc="A terminal UI as drop-in replacement for hledger add"
-url="https://github.com/hpdeifel/hledger-iadd#readme"
-license=("BSD")
-arch=('x86_64')
-depends=('ghc-libs' 'haskell-brick' 'haskell-free' 'haskell-hledger-lib' 'haskell-megaparsec'
- 'haskell-microlens' 'haskell-microlens-th' 'haskell-optparse-applicative'
- 'haskell-text-zipper' 'haskell-unordered-containers' 'haskell-vector' 'haskell-vty'
- 'haskell-xdg-basedir')
-makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-discover')
-source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
- hledger-lib-1.22.patch)
-sha256sums=('c5472492ec443948762e4e236d91d9057ed23e8f0866c2aa32929997ae479c4d'
- '37a144b21334670e126a6aa76ab806f72a28456d6a969496db2a7be2c70bf328')
-
-prepare() {
- cd $_hkgname-$pkgver
- patch -p1 -i ../hledger-lib-1.22.patch
- uusi -d semigroups $_hkgname.cabal
-}
-
-build() {
- cd $_hkgname-$pkgver
-
- runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
- --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
- --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
- --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
- --ghc-option='-pie'
-
- runhaskell Setup build $MAKEFLAGS
- runhaskell Setup register --gen-script
- runhaskell Setup unregister --gen-script
- sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
- sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
-}
-
-check() {
- cd $_hkgname-$pkgver
- runhaskell Setup test --show-details=direct
-}
-
-package() {
- cd $_hkgname-$pkgver
-
- install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
- install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
- runhaskell Setup copy --destdir="$pkgdir"
- install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
- rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
-}
Copied: hledger-iadd/repos/community-testing-x86_64/PKGBUILD (from rev 976768, hledger-iadd/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-07-13 13:42:06 UTC (rev 976769)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hledger-iadd
+pkgname=hledger-iadd
+pkgver=1.3.15
+pkgrel=1
+pkgdesc="A terminal UI as drop-in replacement for hledger add"
+url="https://github.com/hpdeifel/hledger-iadd#readme"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-brick' 'haskell-free' 'haskell-hledger-lib' 'haskell-megaparsec'
+ 'haskell-microlens' 'haskell-microlens-th' 'haskell-optparse-applicative'
+ 'haskell-text-zipper' 'haskell-unordered-containers' 'haskell-vector' 'haskell-vty'
+ 'haskell-xdg-basedir')
+makedepends=('ghc' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-discover')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha512sums=('c1c6b60b0563664e6c02ac2757442f6486434e2c36651c35a9217930cd8c0ec4eb5ad87fe87734673c60bc3de4a01545512194d6b772ddf5031652788a0dc69e')
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ runhaskell Setup build $MAKEFLAGS
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+ cd $_hkgname-$pkgver
+ runhaskell Setup test --show-details=direct
+}
+
+package() {
+ cd $_hkgname-$pkgver
+
+ install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+ install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+ runhaskell Setup copy --destdir="$pkgdir"
+ install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}
Deleted: hledger-lib-1.22.patch
===================================================================
--- hledger-lib-1.22.patch 2021-07-13 13:41:47 UTC (rev 976768)
+++ hledger-lib-1.22.patch 2021-07-13 13:42:06 UTC (rev 976769)
@@ -1,107 +0,0 @@
-commit ee3a0ab82fad7d70328a4ed0a8796cd112195737
-Author: Felix Yan <felixonmars at archlinux.org>
-Date: Mon Jul 5 21:39:16 2021 +0800
-
- Support hledger-lib 1.22
-
- All tests are passing here.
-
-diff --git a/hledger-iadd.cabal b/hledger-iadd.cabal
-index 845472a..8cc93ee 100644
---- a/hledger-iadd.cabal
-+++ b/hledger-iadd.cabal
-@@ -60,7 +60,7 @@ library
- , Data.Time.Ext
- default-language: Haskell2010
- build-depends: base >= 4.9 && < 5
-- , hledger-lib >= 1.21 && < 1.22
-+ , hledger-lib >= 1.22 && < 1.23
- , brick >= 0.27
- , vty >= 5.4
- , text
-@@ -88,7 +88,7 @@ executable hledger-iadd
- default-language: Haskell2010
- build-depends: base >= 4.9 && < 5
- , hledger-iadd
-- , hledger-lib >= 1.21 && < 1.22
-+ , hledger-lib >= 1.22 && < 1.23
- , brick >= 0.27
- , vty >= 5.4
- , text
-@@ -116,7 +116,7 @@ test-suite spec
- default-language: Haskell2010
- build-depends: base >= 4.9 && < 5
- , hledger-iadd
-- , hledger-lib >= 1.21 && < 1.22
-+ , hledger-lib >= 1.22 && < 1.23
- , text
- , transformers >= 0.3
- , time >= 1.5
-diff --git a/src/Model.hs b/src/Model.hs
-index 8478e30..24b79da 100644
---- a/src/Model.hs
-+++ b/src/Model.hs
-@@ -269,7 +269,7 @@ isSubsetTransaction current origin =
- cmpPosting a b = HL.paccount a == HL.paccount b
- && cmpAmount (HL.pamount a) (HL.pamount b)
-
-- cmpAmount (HL.Mixed a) (HL.Mixed b) = ((==) `on` map (HL.acommodity &&& HL.aquantity)) a b
-+ cmpAmount a b = ((==) `on` map (HL.acommodity &&& HL.aquantity)) (HL.amounts a) (HL.amounts b)
-
- listToMaybe' :: [a] -> Maybe [a]
- listToMaybe' [] = Nothing
-@@ -280,7 +280,7 @@ numPostings = length . HL.tpostings
-
- -- | Returns True if all postings balance and the transaction is not empty
- transactionBalanced :: HL.Transaction -> Bool
--transactionBalanced = HL.isTransactionBalanced Nothing
-+transactionBalanced = HL.isTransactionBalanced HL.balancingOpts
-
- -- | Computes the sum of all postings in the transaction and inverts it
- negativeAmountSum :: HL.Transaction -> HL.MixedAmount
-@@ -371,13 +371,13 @@ isDuplicateTransaction journal trans = any ((==EQ) . cmpTransaction trans) (HL.
- -- | Compare two mixed amounts by first sorting the individual amounts
- -- deterministically and then comparing them one-by-one.
- cmpMixedAmount :: HL.MixedAmount -> HL.MixedAmount -> Ordering
-- cmpMixedAmount (HL.Mixed as1) (HL.Mixed as2) =
-+ cmpMixedAmount as1 as2 =
- let
-- sortedAs1 = sortBy cmpAmount as1
-- sortedAs2 = sortBy cmpAmount as2
-+ sortedAs1 = sortBy cmpAmount $ HL.amounts as1
-+ sortedAs2 = sortBy cmpAmount $ HL.amounts as2
- in
- mconcat $
-- compare (length as1) (length as2) : zipWith cmpAmount sortedAs1 sortedAs2
-+ compare (length $ HL.amounts as1) (length $ HL.amounts as2) : zipWith cmpAmount sortedAs1 sortedAs2
-
- cmpBalanceAssertion :: HL.BalanceAssertion -> HL.BalanceAssertion -> Ordering
- cmpBalanceAssertion = lexical [cmp HL.baamount, cmp HL.batotal]
-diff --git a/tests/AmountParserSpec.hs b/tests/AmountParserSpec.hs
-index fc1586c..e250738 100644
---- a/tests/AmountParserSpec.hs
-+++ b/tests/AmountParserSpec.hs
-@@ -34,7 +34,7 @@ spec = describe "parseAmount" $ do
- parseAmount HL.nulljournal "23 +" `shouldSatisfy` isLeft
-
- amount :: Text -> HL.MixedAmount
--amount = HL.mixed . pure . fromRight . runIdentity . runParserT (evalStateT HL.amountp HL.nulljournal) ""
-+amount = HL.mixed . Just . fromRight . runIdentity . runParserT (evalStateT HL.amountp HL.nulljournal) ""
-
- fromRight :: Either a b -> b
- fromRight = either (error "fromRight: Left value encountered") id
-diff --git a/tests/ModelSpec.hs b/tests/ModelSpec.hs
-index 4c33bc6..6e72ba6 100644
---- a/tests/ModelSpec.hs
-+++ b/tests/ModelSpec.hs
-@@ -198,8 +198,8 @@ isDuplicateTransactionSpec = do
- a2 = (HL.eur 0.5) { HL.astyle = HL.amountstyle { HL.asprecision = HL.Precision 15 } }
-
- p1 = mkPosting ("Test", -1)
-- p2 = HL.nullposting { HL.paccount = "Toast", HL.pamount = HL.Mixed [a1] }
-- p3 = HL.nullposting { HL.paccount = "Toast", HL.pamount = HL.Mixed [a2] }
-+ p2 = HL.nullposting { HL.paccount = "Toast", HL.pamount = HL.mixedAmount a1 }
-+ p3 = HL.nullposting { HL.paccount = "Toast", HL.pamount = HL.mixedAmount a2 }
-
- t0 = mkTransaction ((2017,9,23), "Test", [])
- t1 = t0 { HL.tpostings = [p1,p2,p2] }
More information about the arch-commits
mailing list