pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/finance



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Mon Mar 23 02:29:49 UTC 2020

Modified Files:
        pkgsrc/finance: Makefile
Added Files:
        pkgsrc/finance/ledger2beancount: DESCR Makefile PLIST distinfo
        pkgsrc/finance/ledger2beancount/patches: patch-tests_runtests

Log Message:
ledger2beancount: Import version 2.0


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 pkgsrc/finance/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/finance/ledger2beancount/DESCR \
    pkgsrc/finance/ledger2beancount/Makefile \
    pkgsrc/finance/ledger2beancount/PLIST \
    pkgsrc/finance/ledger2beancount/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/finance/ledger2beancount/patches/patch-tests_runtests

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/finance/Makefile
diff -u pkgsrc/finance/Makefile:1.71 pkgsrc/finance/Makefile:1.72
--- pkgsrc/finance/Makefile:1.71        Sun Mar 22 21:27:51 2020
+++ pkgsrc/finance/Makefile     Mon Mar 23 02:29:49 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2020/03/22 21:27:51 riastradh Exp $
+# $NetBSD: Makefile,v 1.72 2020/03/23 02:29:49 riastradh Exp $
 #
 
 COMMENT=       Monetary, financial and related applications
@@ -19,6 +19,7 @@ SUBDIR+=      gnucash
 SUBDIR+=       gnucash-docs
 SUBDIR+=       homebank
 SUBDIR+=       ledger
+SUBDIR+=       ledger2beancount
 SUBDIR+=       libofx
 SUBDIR+=       magento
 SUBDIR+=       moneyguru

Added files:

Index: pkgsrc/finance/ledger2beancount/DESCR
diff -u /dev/null pkgsrc/finance/ledger2beancount/DESCR:1.1
--- /dev/null   Mon Mar 23 02:29:49 2020
+++ pkgsrc/finance/ledger2beancount/DESCR       Mon Mar 23 02:29:49 2020
@@ -0,0 +1,6 @@
+A script to automatically convert ledger-based textual ledgers
+(finance/ledger) to beancount-based ones (finance/py-beancount).
+
+Conversion is based on (concrete) syntax, so that information that is
+not meaningful for accounting reasons but still valuable (e.g.,
+comments, formatting, etc.) can be preserved.
Index: pkgsrc/finance/ledger2beancount/Makefile
diff -u /dev/null pkgsrc/finance/ledger2beancount/Makefile:1.1
--- /dev/null   Mon Mar 23 02:29:49 2020
+++ pkgsrc/finance/ledger2beancount/Makefile    Mon Mar 23 02:29:49 2020
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+DISTNAME=      ledger2beancount-2.0
+CATEGORIES=    finance
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=zacchiro/}
+GITHUB_PROJECT=        ledger2beancount
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/zacchiro/ledger2beancount/
+COMMENT=       Script to convert ledger to beancount
+LICENSE=       gnu-gpl-v3
+
+USE_TOOLS+=    gmake
+USE_TOOLS+=    perl:run
+
+TOOL_DEPENDS+= scdoc>=0:../../textproc/scdoc
+
+DEPENDS+=      p5-Config-Onion>=0:../../devel/p5-Config-Onion
+DEPENDS+=      p5-Date-Calc>=0:../../devel/p5-Date-Calc
+DEPENDS+=      p5-DateTime-Format-Strptime>=1.58:../../time/p5-DateTime-Format-Strptime
+DEPENDS+=      p5-File-BaseDir>=0:../../devel/p5-File-BaseDir
+DEPENDS+=      p5-Getopt-Long-Descriptive>=0:../../devel/p5-Getopt-Long-Descriptive
+DEPENDS+=      p5-String-Interpolate>=0:../../textproc/p5-String-Interpolate
+
+REPLACE_PERL+= bin/ledger2beancount
+
+BUILD_TARGET=  man
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man5
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/bin/ledger2beancount ${DESTDIR}${PREFIX}/bin/.
+       ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/.
+       ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/.
+
+TEST_DEPENDS+= coreutils>=0:../../sysutils/coreutils
+TEST_DEPENDS+= ledger>=3.0.0:../../finance/ledger
+TEST_DEPENDS+= ${PYPKGPREFIX}-beancount>=0:../../finance/py-beancount
+TEST_DEPENDS+= p5-YAML-Syck>=0:../../textproc/p5-YAML-Syck
+
+USE_TOOLS+=    gsed:test
+
+TEST_ENV+=     SORT=gsort
+
+TEST_TARGET=   test
+
+.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/finance/ledger2beancount/PLIST
diff -u /dev/null pkgsrc/finance/ledger2beancount/PLIST:1.1
--- /dev/null   Mon Mar 23 02:29:49 2020
+++ pkgsrc/finance/ledger2beancount/PLIST       Mon Mar 23 02:29:49 2020
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+bin/ledger2beancount
+man/man1/ledger2beancount.1
+man/man5/ledger2beancount.5
Index: pkgsrc/finance/ledger2beancount/distinfo
diff -u /dev/null pkgsrc/finance/ledger2beancount/distinfo:1.1
--- /dev/null   Mon Mar 23 02:29:49 2020
+++ pkgsrc/finance/ledger2beancount/distinfo    Mon Mar 23 02:29:49 2020
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+SHA1 (ledger2beancount-2.0.tar.gz) = f323279e3e1e467b9f40ebc3d26b31d11799b4c0
+RMD160 (ledger2beancount-2.0.tar.gz) = f81bba80803c3b7235aff03ae6c7c05b6397d96e
+SHA512 (ledger2beancount-2.0.tar.gz) = a5a741b8af1bb26d0c01673c70e0aee49926d3acfe36b5f160e01d0038f459902beaed89c69bd6179ade09798a0c6103c960796d8bf9a23897791bdefc51e360
+Size (ledger2beancount-2.0.tar.gz) = 67729 bytes
+SHA1 (patch-tests_runtests) = d856c35d7bef8193618c09c6fb8b6e91b52abb0b

Index: pkgsrc/finance/ledger2beancount/patches/patch-tests_runtests
diff -u /dev/null pkgsrc/finance/ledger2beancount/patches/patch-tests_runtests:1.1
--- /dev/null   Mon Mar 23 02:29:49 2020
+++ pkgsrc/finance/ledger2beancount/patches/patch-tests_runtests        Mon Mar 23 02:29:49 2020
@@ -0,0 +1,30 @@
+$NetBSD: patch-tests_runtests,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+- Let the environment specify SORT so we can set it from the makefile.
+- Avoid C.UTF-8 locale.
+
+--- tests/runtests.orig        2020-02-22 07:25:00.000000000 +0000
++++ tests/runtests
+@@ -3,11 +3,13 @@
+ status=0
+ 
+ # We need sort from coreutils for -V
++if [ -z "${SORT-}" ]; then
+ case `uname -s` in
+       Linux*) SORT=sort ;;
+       Darwin*) SORT=gsort ;;
+       *) SORT=sort ;;
+ esac
++fi
+ 
+ test_conversion () {
+       test=$1
+@@ -68,7 +70,7 @@ test_validity_beancount () {
+       fi
+ }
+ 
+-export LC_ALL=C.UTF-8
++export LC_ALL=en_US.UTF-8
+ 
+ ledger_version=$(ledger --version 2>/dev/null | grep "^Ledger [0-9]" | cut -d " " -f 2 | cut -d . -f 1)
+ if [ -z $ledger_version ]; then



Home | Main Index | Thread Index | Old Index