| @@ -1,55 +1,63 @@ | | | @@ -1,55 +1,63 @@ |
1 | # $NetBSD: Makefile,v 1.5 2020/08/31 18:09:30 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.6 2020/11/18 22:39:15 riastradh Exp $ |
2 | | | 2 | |
3 | DISTNAME= ledger2beancount-2.0 | | 3 | DISTNAME= ledger2beancount-2.5 |
4 | PKGREVISION= 2 | | | |
5 | CATEGORIES= finance | | 4 | CATEGORIES= finance |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=beancount/} | | 5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=beancount/} |
7 | GITHUB_PROJECT= ledger2beancount | | 6 | GITHUB_PROJECT= ledger2beancount |
8 | | | 7 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= https://github.com/beancount/ledger2beancount/ | | 9 | HOMEPAGE= https://github.com/beancount/ledger2beancount/ |
11 | COMMENT= Script to convert ledger to beancount | | 10 | COMMENT= Script to convert ledger to beancount |
12 | LICENSE= gnu-gpl-v3 | | 11 | LICENSE= gnu-gpl-v3 |
13 | | | 12 | |
14 | USE_TOOLS+= gmake | | 13 | USE_TOOLS+= gmake |
15 | USE_TOOLS+= perl:run | | 14 | USE_TOOLS+= perl:run |
16 | | | 15 | |
17 | TOOL_DEPENDS+= scdoc>=0:../../textproc/scdoc | | 16 | TOOL_DEPENDS+= scdoc>=0:../../textproc/scdoc |
18 | | | 17 | |
19 | DEPENDS+= p5-Config-Onion>=0:../../devel/p5-Config-Onion | | | |
20 | DEPENDS+= p5-Date-Calc>=0:../../devel/p5-Date-Calc | | 18 | DEPENDS+= p5-Date-Calc>=0:../../devel/p5-Date-Calc |
21 | DEPENDS+= p5-DateTime-Format-Strptime>=1.58:../../time/p5-DateTime-Format-Strptime | | 19 | DEPENDS+= p5-DateTime-Format-Strptime>=1.58:../../time/p5-DateTime-Format-Strptime |
22 | DEPENDS+= p5-File-BaseDir>=0:../../devel/p5-File-BaseDir | | 20 | DEPENDS+= p5-File-BaseDir>=0:../../devel/p5-File-BaseDir |
23 | DEPENDS+= p5-Getopt-Long-Descriptive>=0:../../devel/p5-Getopt-Long-Descriptive | | 21 | DEPENDS+= p5-Getopt-Long-Descriptive>=0:../../devel/p5-Getopt-Long-Descriptive |
| | | 22 | DEPENDS+= p5-List-MoreUtils>=0:../../devel/p5-List-MoreUtils |
| | | 23 | DEPENDS+= p5-Regexp-Common>=0:../../textproc/p5-Regexp-Common |
24 | DEPENDS+= p5-String-Interpolate>=0:../../textproc/p5-String-Interpolate | | 24 | DEPENDS+= p5-String-Interpolate>=0:../../textproc/p5-String-Interpolate |
| | | 25 | DEPENDS+= p5-YAML-XS>=0:../../textproc/p5-YAML-XS |
| | | 26 | DEPENDS+= p5-enum>=0:../../devel/p5-enum |
25 | | | 27 | |
26 | REPLACE_PERL+= bin/ledger2beancount | | 28 | REPLACE_PERL+= bin/ledger2beancount |
27 | | | 29 | |
28 | BUILD_TARGET= man | | 30 | BUILD_TARGET= man |
29 | | | 31 | |
30 | INSTALLATION_DIRS+= bin | | 32 | INSTALLATION_DIRS+= bin |
31 | INSTALLATION_DIRS+= ${PKGMANDIR}/man1 | | 33 | INSTALLATION_DIRS+= ${PKGMANDIR}/man1 |
32 | INSTALLATION_DIRS+= ${PKGMANDIR}/man5 | | 34 | INSTALLATION_DIRS+= ${PKGMANDIR}/man5 |
33 | | | 35 | |
34 | do-install: | | 36 | do-install: |
35 | ${INSTALL_SCRIPT} ${WRKSRC}/bin/ledger2beancount ${DESTDIR}${PREFIX}/bin/. | | 37 | ${INSTALL_SCRIPT} ${WRKSRC}/bin/ledger2beancount ${DESTDIR}${PREFIX}/bin/. |
36 | ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/. | | 38 | ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/. |
37 | ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/. | | 39 | ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/. |
38 | | | 40 | |
39 | TEST_DEPENDS+= coreutils>=0:../../sysutils/coreutils | | 41 | TEST_DEPENDS+= coreutils>=0:../../sysutils/coreutils |
40 | TEST_DEPENDS+= ledger>=3.0.0:../../finance/ledger | | 42 | TEST_DEPENDS+= ledger>=3.0.0:../../finance/ledger |
41 | TEST_DEPENDS+= ${PYPKGPREFIX}-beancount>=0:../../finance/py-beancount | | 43 | TEST_DEPENDS+= ${PYPKGPREFIX}-beancount>=0:../../finance/py-beancount |
42 | TEST_DEPENDS+= p5-YAML-Syck>=0:../../textproc/p5-YAML-Syck | | 44 | TEST_DEPENDS+= p5-YAML-Syck>=0:../../textproc/p5-YAML-Syck |
43 | | | 45 | |
44 | # This should be gsed:test, but that triggers a bug in the mk/ | | 46 | # runtests.sh relies on `\s', a GNUism meaning `[[:space:]]', in sed, |
45 | # infrastructure -- the checksum logic thinks TOOL_SED is gsed, but the | | 47 | # so use gsed. This should be gsed:test, but that triggers a bug in |
46 | # depends logic hasn't actually brought gsed in because it's only | | 48 | # the mk/ infrastructure -- the checksum logic thinks TOOL_SED is gsed, |
47 | # needed for test. | | 49 | # but the depends logic hasn't actually brought gsed in because it's |
| | | 50 | # only needed for test. |
48 | USE_TOOLS+= gsed | | 51 | USE_TOOLS+= gsed |
49 | | | 52 | |
| | | 53 | # runtests.sh relies on GNU sort's `sort -V' for sorting versions. |
50 | TEST_ENV+= SORT=gsort | | 54 | TEST_ENV+= SORT=gsort |
51 | | | 55 | |
52 | TEST_TARGET= test | | 56 | TEST_TARGET= test |
53 | | | 57 | |
54 | .include "../../lang/python/pyversion.mk" | | 58 | .include "../../lang/python/pyversion.mk" |
55 | .include "../../mk/bsd.pkg.mk" | | 59 | .include "../../mk/bsd.pkg.mk" |
| | | 60 | |
| | | 61 | # XXX Need to override default pkgsrc settings of these environment |
| | | 62 | # variables for tests, which require a UTF-8 locale. |
| | | 63 | TEST_ENV+= LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_ALL= |