summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING10
-rw-r--r--finance/Makefile1
-rw-r--r--finance/ktoblzcheck-data/Makefile55
-rw-r--r--finance/ktoblzcheck-data/distinfo5
-rw-r--r--finance/ktoblzcheck-data/files/patch-src_CMakeLists.txt17
-rw-r--r--finance/ktoblzcheck-data/pkg-descr4
-rw-r--r--finance/ktoblzcheck-data/pkg-plist6
-rw-r--r--finance/ktoblzcheck/Makefile33
-rw-r--r--finance/ktoblzcheck/distinfo8
-rw-r--r--finance/ktoblzcheck/files/patch-src_CMakeLists.txt12
-rw-r--r--finance/ktoblzcheck/files/patch-src_bankdata_CMakeLists.txt23
-rw-r--r--finance/ktoblzcheck/pkg-descr2
-rw-r--r--finance/ktoblzcheck/pkg-plist14
13 files changed, 115 insertions, 75 deletions
diff --git a/UPDATING b/UPDATING
index dd3a73264f3c..5d09cc390aff 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,16 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20250627:
+ AFFECTS: users of finance/ktoblzcheck
+ AUTHOR: jhale@FreeBSD.org
+
+ The bank data databases have been moved to finance/ktoblzcheck-data.
+ It may be necessary to remove ktoblzcheck < 1.59 before upgrading to
+ avoid conflicts.
+
+ pkg delete -f ktoblzcheck
+
20250622:
AFFECTS: users of net-mgmt/netbox
AUTHOR: kai@FreeBSD.org
diff --git a/finance/Makefile b/finance/Makefile
index 64d9d880c75e..3bc8bbd91aab 100644
--- a/finance/Makefile
+++ b/finance/Makefile
@@ -44,6 +44,7 @@
SUBDIR += kmymoney
SUBDIR += kraft
SUBDIR += ktoblzcheck
+ SUBDIR += ktoblzcheck-data
SUBDIR += ledger
SUBDIR += ledgersmb12
SUBDIR += libbtc
diff --git a/finance/ktoblzcheck-data/Makefile b/finance/ktoblzcheck-data/Makefile
new file mode 100644
index 000000000000..bf56392695f3
--- /dev/null
+++ b/finance/ktoblzcheck-data/Makefile
@@ -0,0 +1,55 @@
+PORTNAME= ktoblzcheck
+PORTVERSION= 1.0.0.${BANKDATA_START_DATE}
+CATEGORIES= finance
+MASTER_SITES= SF/${PORTNAME} \
+ LOCAL/jhale/${PORTNAME}:bankdata
+PKGNAMESUFFIX= -data
+DISTFILES= ${PORTNAME}${PKGNAMESUFFIX}-${KBCD_DATE}${EXTRACT_SUFX} \
+ ${PORTNAME}-bankdata-${BANKDATA_START_DATE}${EXTRACT_SUFX}:bankdata
+
+MAINTAINER= jhale@FreeBSD.org
+COMMENT= Bank data used by ktoblzcheck
+WWW= https://ktoblzcheck.sourceforge.net/
+
+# Project does not specify a license for the resulting databases, but the data
+# files it processes are in the public domain.
+LICENSE= PD
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}openpyxl>0:textproc/py-openpyxl@${PY_FLAVOR}
+
+USES= cmake python:build
+
+CMAKE_ARGS= -DDATA_FILEPATH_sepa:PATH="../data/sepa_${BANKDATA_START_DATE}.txt"
+CMAKE_ON= INSTALL_RAW_BANKDATA_FILE \
+ INSTALL_SEPA_BANKDATA_FILE
+CMAKE_OFF= ENABLE_BANKDATA_DOWNLOAD
+
+WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-${KBCD_DATE}
+
+PLIST_SUB= BANKDATA_START_DATE=${BANKDATA_START_DATE}
+
+# Custom: Upstream ships a dated a distfile, but will most likely not contain
+# the most recent bank data. This is just used for build system changes.
+KBCD_DATE= 20250515
+# Custom: This is the date when the bank data is officially recocognized and
+# supported.
+BANKDATA_START_DATE= 20250609
+# Custom: This is the date when the bank data is officially void and can no
+# longer be relied upon.
+BANKDATA_END_DATE= 20250907
+
+post-extract:
+# Out of an abundance of caution, remove the pre-built DBs and shipped SEPA data.
+ (cd ${WRKSRC}/data && ${RM} bankdata* sepa*)
+# Populate ${WRKSRC}/data with the contents of our bankdata archive.
+.for f in blz_${BANKDATA_START_DATE}.txt ch_data.txt nl_data.xlsx sepa_${BANKDATA_START_DATE}.txt
+ ${CP} ${WRKDIR}/${PORTNAME}-bankdata-${BANKDATA_START_DATE}/${f} ${WRKSRC}/data
+.endfor
+
+post-patch:
+# See comment in files/patch-src_CMakeLists.txt.
+ @${REINPLACE_CMD} -e 's|%%BANKDATA_END_DATE%%|'"$$(date -j -f "%Y%m%d" "+%d.%m.%Y" ${BANKDATA_END_DATE})"'|' \
+ ${WRKSRC}/src/CMakeLists.txt
+
+.include <bsd.port.mk>
diff --git a/finance/ktoblzcheck-data/distinfo b/finance/ktoblzcheck-data/distinfo
new file mode 100644
index 000000000000..8e559b557fe4
--- /dev/null
+++ b/finance/ktoblzcheck-data/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1751008153
+SHA256 (ktoblzcheck-data-20250515.tar.gz) = 307479cd3c487ba6d6c4f5966634a6023c1f29d4386b93a5e96cea7541bebe4c
+SIZE (ktoblzcheck-data-20250515.tar.gz) = 267821
+SHA256 (ktoblzcheck-bankdata-20250609.tar.gz) = 36d9a5ea5c3e7b1183d8fe2f24658d7e50ac3686b14573b17f9f46cf04388065
+SIZE (ktoblzcheck-bankdata-20250609.tar.gz) = 510238
diff --git a/finance/ktoblzcheck-data/files/patch-src_CMakeLists.txt b/finance/ktoblzcheck-data/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..563c6dca417e
--- /dev/null
+++ b/finance/ktoblzcheck-data/files/patch-src_CMakeLists.txt
@@ -0,0 +1,17 @@
+Set VALID_END_DATE via the port Makefile. This would otherwise only be set
+if the CMake argument ENABLE_BANKDATA_DOWNLOAD is true, but we cannot download
+files during the build process. This value needs to be defined as the last day
+the bank data is valid in %d.%m.%Y format to enable the custom commands/targets
+that build that databases.
+
+--- src/CMakeLists.txt.orig 2025-05-15 11:18:20 UTC
++++ src/CMakeLists.txt
+@@ -40,7 +40,7 @@ message(STATUS "Using bank data db ${BANKDATA_TEST_DBP
+ message(STATUS "Using bank data db ${BANKDATA_CH_DBPATH}")
+ message(STATUS "Using bank data db ${BANKDATA_TEST_DBPATH}")
+
+-set(VALID_END_DATE "")
++set(VALID_END_DATE "%%BANKDATA_END_DATE%%")
+
+ if(ENABLE_BANKDATA_DOWNLOAD)
+ extract_date(
diff --git a/finance/ktoblzcheck-data/pkg-descr b/finance/ktoblzcheck-data/pkg-descr
new file mode 100644
index 000000000000..61b37fbbae32
--- /dev/null
+++ b/finance/ktoblzcheck-data/pkg-descr
@@ -0,0 +1,4 @@
+ktoblzcheck-data converts raw bank code data published by several
+financial institutions including Deutsche Bundesbank, SIX Group, and
+Betaalvereniging Nederland, into SQLite databases used by the ktoblzcheck
+library.
diff --git a/finance/ktoblzcheck-data/pkg-plist b/finance/ktoblzcheck-data/pkg-plist
new file mode 100644
index 000000000000..f04c3f692164
--- /dev/null
+++ b/finance/ktoblzcheck-data/pkg-plist
@@ -0,0 +1,6 @@
+%%DATADIR%%/bankdata.ch.db
+%%DATADIR%%/bankdata.de.db
+%%DATADIR%%/bankdata.nl.db
+%%DATADIR%%/blz_%%BANKDATA_START_DATE%%.txt
+%%DATADIR%%/ibandata.txt
+%%DATADIR%%/sepa_%%BANKDATA_START_DATE%%.txt
diff --git a/finance/ktoblzcheck/Makefile b/finance/ktoblzcheck/Makefile
index 3e07cfb248d9..249a45eb9612 100644
--- a/finance/ktoblzcheck/Makefile
+++ b/finance/ktoblzcheck/Makefile
@@ -1,33 +1,26 @@
PORTNAME= ktoblzcheck
-PORTVERSION= 1.57
-PORTREVISION= 3
-CATEGORIES= finance german
-MASTER_SITES= SF/${PORTNAME} \
- LOCAL/jhale/${PORTNAME}:bankdata
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
- ${PORTNAME}-bankdata-${BANKDATA_DATE}${EXTRACT_SUFX}:bankdata
+PORTVERSION= 1.59
+CATEGORIES= finance
+MASTER_SITES= SF/${PORTNAME}
MAINTAINER= jhale@FreeBSD.org
-COMMENT= Check bank codes of German banks
+COMMENT= Check bank codes of various financial institutions
WWW= https://ktoblzcheck.sourceforge.net/
LICENSE= LGPL21+
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}openpyxl>0:textproc/py-openpyxl@${PY_FLAVOR}
LIB_DEPENDS= libcurl.so:ftp/curl
+RUN_DEPENDS= ${PORTNAME}-data>=1.0.0.20250609:finance/ktoblzcheck-data
+TEST_DEPENDS= ${PORTNAME}-data>=1.0.0.20250609:finance/ktoblzcheck-data
-USES= cmake localbase pathfix python:build sqlite
+USES= cmake:testing localbase pathfix sqlite
USE_LDCONFIG= yes
-CMAKE_OFF= ENABLE_BANKDATA_DOWNLOAD \
- INSTALL_RAW_BANKDATA_FILE
+CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Python3
PORTDOCS= README.md
-BANKDATA_DATE= 20241209
-
OPTIONS_DEFINE= DOCS DOXYGEN
OPTIONS_SUB= yes
@@ -35,16 +28,6 @@ DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen \
dot:graphics/graphviz
DOXYGEN_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Doxygen
-TEST_TARGET= test
-
-post-patch:
- @${CP} ${WRKDIR}/${PORTNAME}-bankdata-${BANKDATA_DATE}/blz_${BANKDATA_DATE}.txt ${WRKSRC}/src/bankdata
- @${CP} ${WRKDIR}/${PORTNAME}-bankdata-${BANKDATA_DATE}/ch_data.txt ${WRKSRC}/src/bankdata
- @${CP} ${WRKDIR}/${PORTNAME}-bankdata-${BANKDATA_DATE}/nl_data.xlsx ${WRKSRC}/src/bankdata
- @${CP} ${WRKDIR}/${PORTNAME}-bankdata-${BANKDATA_DATE}/sepa_${BANKDATA_DATE}.txt ${WRKSRC}/src/bankdata/sepa
- @${REINPLACE_CMD} -e 's|%%BANKDATA_DATE%%|'"$$(date -j -f "%Y%m%d" "+%d.%m.%Y" ${BANKDATA_DATE})"'|' \
- ${WRKSRC}/src/bankdata/CMakeLists.txt
-
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
diff --git a/finance/ktoblzcheck/distinfo b/finance/ktoblzcheck/distinfo
index d16290608db5..5f464edee9a6 100644
--- a/finance/ktoblzcheck/distinfo
+++ b/finance/ktoblzcheck/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1735156937
-SHA256 (ktoblzcheck-1.57.tar.gz) = 4c3b782e5d8e31e219c3e2ece0c6e84a93929ae0b2f36080d4c183a644d05672
-SIZE (ktoblzcheck-1.57.tar.gz) = 96788
-SHA256 (ktoblzcheck-bankdata-20241209.tar.gz) = 9938c764cb01a0a3ce72b29db365e441cbf73b87fa2f288e5bfb197b912d518d
-SIZE (ktoblzcheck-bankdata-20241209.tar.gz) = 514266
+TIMESTAMP = 1751021858
+SHA256 (ktoblzcheck-1.59.tar.gz) = 3cd33880d2425e8fa3be9918c85485514f53e04b0b986bcf7bd003fc53071fa7
+SIZE (ktoblzcheck-1.59.tar.gz) = 89603
diff --git a/finance/ktoblzcheck/files/patch-src_CMakeLists.txt b/finance/ktoblzcheck/files/patch-src_CMakeLists.txt
deleted file mode 100644
index 5f15e3e63f9a..000000000000
--- a/finance/ktoblzcheck/files/patch-src_CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Disable the Python bindings for now. They could be in a slave port later if
-needed, but I am not currently aware of anything that uses them.
-
---- src/CMakeLists.txt.orig 2020-12-28 00:28:41 UTC
-+++ src/CMakeLists.txt
-@@ -9,6 +9,3 @@ add_subdirectory(bankdata)
- add_subdirectory(include)
- add_subdirectory(lib)
- add_subdirectory(bin)
--if(Python_Development_FOUND)
-- add_subdirectory(python)
--endif()
diff --git a/finance/ktoblzcheck/files/patch-src_bankdata_CMakeLists.txt b/finance/ktoblzcheck/files/patch-src_bankdata_CMakeLists.txt
deleted file mode 100644
index ac0dfb7bc07a..000000000000
--- a/finance/ktoblzcheck/files/patch-src_bankdata_CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/bankdata/CMakeLists.txt.orig 2024-01-05 07:31:23 UTC
-+++ src/bankdata/CMakeLists.txt
-@@ -23,6 +23,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ch_data.cmake "
- file(DOWNLOAD \"${CH_RAW_DATA_URL}\" \"${CH_RAW_DATA_PATH}\")
- ")
-
-+if(ENABLE_BANKDATA_DOWNLOAD)
- # fetch validity date from bank's website
- function(extract_date ARG)
- file(DOWNLOAD ${BANK_WEBSITE_URL} ${TEMP_FILE})
-@@ -57,10 +58,10 @@ add_custom_command(
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Download raw bank data file to ${CH_RAW_DATA_PATH}"
- )
-+endif()
-
- # store the validity date in VALID_DATE
--set(VALID_DATE "")
--extract_date(VALID_DATE)
-+set(VALID_DATE "%%BANKDATA_DATE%%")
-
- if(NOT "${VALID_DATE}" STREQUAL "")
- add_custom_command(
diff --git a/finance/ktoblzcheck/pkg-descr b/finance/ktoblzcheck/pkg-descr
index 6b11c22a0c05..9f6f6ca0665e 100644
--- a/finance/ktoblzcheck/pkg-descr
+++ b/finance/ktoblzcheck/pkg-descr
@@ -1,2 +1,2 @@
KtoBLZCheck is a library to check account numbers and bank codes of
-German banks.
+various financial institutions.
diff --git a/finance/ktoblzcheck/pkg-plist b/finance/ktoblzcheck/pkg-plist
index d7ba80871f02..60c6ec7c401f 100644
--- a/finance/ktoblzcheck/pkg-plist
+++ b/finance/ktoblzcheck/pkg-plist
@@ -31,11 +31,11 @@ libdata/pkgconfig/ktoblzcheck.pc
%%DOXYGEN%%%%DOCSDIR%%/api/classIbanCheck.html
%%DOXYGEN%%%%DOCSDIR%%/api/classes.html
%%DOXYGEN%%%%DOCSDIR%%/api/closed.png
-%%DOXYGEN%%%%DOCSDIR%%/api/dir_027acad13201f25411f30b3a77f2b006.html
%%DOXYGEN%%%%DOCSDIR%%/api/dir_5a44bfe66872ebd87256b63344bc501a.html
-%%DOXYGEN%%%%DOCSDIR%%/api/dir_63c478c42e36c4f05959c97623df5ccd.html
%%DOXYGEN%%%%DOCSDIR%%/api/dir_8f1ddfcaba34d370f217a025e0bf2872.html
-%%DOXYGEN%%%%DOCSDIR%%/api/dir_b6310677cdb1a308af776abddf4b17ae.html
+%%DOXYGEN%%%%DOCSDIR%%/api/dir_b595697878e38297fca870e1c306251b.html
+%%DOXYGEN%%%%DOCSDIR%%/api/dir_d3cb94c4c25e21114b6ed199847bcaf5.html
+%%DOXYGEN%%%%DOCSDIR%%/api/dir_f36729f1e90a4f37b93d8ff044e485fe.html
%%DOXYGEN%%%%DOCSDIR%%/api/doc.png
%%DOXYGEN%%%%DOCSDIR%%/api/docd.png
%%DOXYGEN%%%%DOCSDIR%%/api/doxygen.css
@@ -59,8 +59,8 @@ libdata/pkgconfig/ktoblzcheck.pc
%%DOXYGEN%%%%DOCSDIR%%/api/iban_8h_source.html
%%DOXYGEN%%%%DOCSDIR%%/api/index.html
%%DOXYGEN%%%%DOCSDIR%%/api/jquery.js
-%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck-1_857_2src_2include_2ktoblzcheck__export_8h.html
-%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck-1_857_2src_2include_2ktoblzcheck__export_8h_source.html
+%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck-1_859_2src_2include_2ktoblzcheck__export_8h.html
+%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck-1_859_2src_2include_2ktoblzcheck__export_8h_source.html
%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck_8h.html
%%DOXYGEN%%%%DOCSDIR%%/api/ktoblzcheck_8h_source.html
%%DOXYGEN%%%%DOCSDIR%%/api/menu.js
@@ -84,9 +84,5 @@ libdata/pkgconfig/ktoblzcheck.pc
%%DOXYGEN%%%%DOCSDIR%%/api/tab_s.png
%%DOXYGEN%%%%DOCSDIR%%/api/tab_sd.png
%%DOXYGEN%%%%DOCSDIR%%/api/tabs.css
-%%DATADIR%%/bankdata.ch.db
-%%DATADIR%%/bankdata.de.db
-%%DATADIR%%/bankdata.nl.db
-%%DATADIR%%/ibandata.txt
share/man/man1/ibanchk.1.gz
share/man/man1/ktoblzcheck.1.gz