Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kitinerary for openSUSE:Factory checked in at 2023-02-04 14:13:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitinerary (Old) and /work/SRC/openSUSE:Factory/.kitinerary.new.4462 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitinerary" Sat Feb 4 14:13:09 2023 rev:58 rq:1062936 version:22.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kitinerary/kitinerary.changes 2023-01-07 17:18:06.833583064 +0100 +++ /work/SRC/openSUSE:Factory/.kitinerary.new.4462/kitinerary.changes 2023-02-04 14:18:34.498592013 +0100 @@ -1,0 +2,8 @@ +Tue Jan 31 10:33:52 UTC 2023 - Christophe Marin <[email protected]> + +- Update to 22.12.2 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/gear/22.12.2/ + +------------------------------------------------------------------- Old: ---- kitinerary-22.12.1.tar.xz kitinerary-22.12.1.tar.xz.sig New: ---- kitinerary-22.12.2.tar.xz kitinerary-22.12.2.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitinerary.spec ++++++ --- /var/tmp/diff_new_pack.EGUZPa/_old 2023-02-04 14:18:34.878594082 +0100 +++ /var/tmp/diff_new_pack.EGUZPa/_new 2023-02-04 14:18:34.882594104 +0100 @@ -18,7 +18,7 @@ %bcond_without released Name: kitinerary -Version: 22.12.1 +Version: 22.12.2 Release: 0 Summary: Data model and extraction system for travel reservations License: LGPL-2.1-or-later ++++++ kitinerary-22.12.1.tar.xz -> kitinerary-22.12.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/.gitlab-ci.yml new/kitinerary-22.12.2/.gitlab-ci.yml --- old/kitinerary-22.12.1/.gitlab-ci.yml 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/.gitlab-ci.yml 2023-01-31 20:38:12.000000000 +0100 @@ -10,3 +10,29 @@ - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml + +# Manual job for building a fully static extractor binary for e.g. use by Nextcloud +static-extractor: + stage: build + image: centos:centos7 + tags: + - Linux + when: manual + script: + - export BUILD_ROOT=/builds + - export STAGING_ROOT=/builds/staging + - scripts/setup-centos.sh + - source /opt/rh/rh-git227/enable + - source /opt/rh/devtoolset-11/enable + - scripts/build-openssl.sh + - scripts/build-iso-codes.sh + - scripts/build-static-qt.sh + - scripts/build-cmake-modules.sh + - scripts/collect-data-files.sh + - strip build/bin/kitinerary-extractor + artifacts: + expire_in: 1 week + when: on_success + paths: + - build/bin/kitinerary-extractor + - build/share diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/CMakeLists.txt new/kitinerary-22.12.2/CMakeLists.txt --- old/kitinerary-22.12.1/CMakeLists.txt 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/CMakeLists.txt 2023-01-31 20:38:12.000000000 +0100 @@ -3,7 +3,7 @@ # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(PIM_VERSION "5.22.1") +set(PIM_VERSION "5.22.2") project(KItinerary VERSION ${PIM_VERSION}) set(KF5_MIN_VERSION "5.91.0") @@ -41,8 +41,8 @@ find_package(SharedMimeInfo 1.3 REQUIRED) endif() -set(KMIME_VERSION "5.22.1") -set(PIM_PKPASS "5.22.1") +set(KMIME_VERSION "5.22.2") +set(PIM_PKPASS "5.22.2") find_package(KF5Mime ${KMIME_VERSION} CONFIG REQUIRED) find_package(KPimPkPass ${PIM_PKPASS} CONFIG REQUIRED) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/LICENSES/BSD-2-Clause.txt new/kitinerary-22.12.2/LICENSES/BSD-2-Clause.txt --- old/kitinerary-22.12.1/LICENSES/BSD-2-Clause.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/LICENSES/BSD-2-Clause.txt 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,9 @@ +Copyright (c) <year> <owner> + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/CMakeLists.txt new/kitinerary-22.12.2/autotests/CMakeLists.txt --- old/kitinerary-22.12.1/autotests/CMakeLists.txt 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/CMakeLists.txt 2023-01-31 20:38:12.000000000 +0100 @@ -16,7 +16,7 @@ ecm_add_test(extractordocumentnodetest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) ecm_add_test(extractorfiltertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) ecm_add_test(extractorrepositorytest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) -ecm_add_test(extractorscriptenginetest.cpp extractorscriptenginetest.qrc TEST_NAME extractorscriptenginetest LINK_LIBRARIES Qt::Test KPim::Itinerary) +ecm_add_test(extractorscriptenginetest.cpp extractorscriptenginetest.qrc TEST_NAME extractorscriptenginetest LINK_LIBRARIES Qt::Test KPim::Itinerary KF5::CalendarCore) ecm_add_test(berdecodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) ecm_add_test(berencodertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) ecm_add_test(bcbpparsertest.cpp LINK_LIBRARIES Qt::Test KPim::Itinerary) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/extractorscriptenginetest.cpp new/kitinerary-22.12.2/autotests/extractorscriptenginetest.cpp --- old/kitinerary-22.12.1/autotests/extractorscriptenginetest.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/extractorscriptenginetest.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -14,6 +14,8 @@ #include <KItinerary/ExtractorResult> #include <KItinerary/ScriptExtractor> +#include <kcalendarcore_version.h> + #include <QDebug> #include <QFile> #include <QJsonDocument> @@ -61,7 +63,9 @@ #else << s(SOURCE_DIR "/scriptenginedata/iata-bcbp-demo.pdf-no-zxing.json"); #endif +#if KCALENDARCORE_VERSION >= QT_VERSION_CHECK(5, 103, 0) QTest::newRow("ical") << s(SOURCE_DIR "/extractordata/ical/eventreservation.ics") << s(SOURCE_DIR "/scriptenginedata/eventreservation.ics.json"); +#endif QTest::newRow("uic9183") << s(SOURCE_DIR "/uic918-3/valid/Testw_VOW8XG6_A9E8DXL_0.bin") << s(SOURCE_DIR "/scriptenginedata/Testw_VOW8XG6_A9E8DXL_0.bin.json"); QTest::newRow("html") << s(SOURCE_DIR "/structureddata/google-flight-reservation-json-ld.html") << s(SOURCE_DIR "/scriptenginedata/google-flight-reservation-json-ld.html.json"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/locationutiltest.cpp new/kitinerary-22.12.2/autotests/locationutiltest.cpp --- old/kitinerary-22.12.1/autotests/locationutiltest.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/locationutiltest.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -111,11 +111,13 @@ QTest::newRow("diacritic") << QStringLiteral("Düsseldorf") << QStringLiteral("Dusseldorf") << true << true; QTest::newRow("diacritic 2") << QStringLiteral("RÄ«ga") << QStringLiteral("Riga") << true << true; QTest::newRow("diacritic case-insensitive") << QStringLiteral("København H") << QStringLiteral("KOEBENHAVN H") << true << true; - QTest::newRow("diacritic transliteration") << QStringLiteral("Zürich") << QStringLiteral("ZUERICH") << true << true; + QTest::newRow("diacritic-transliteration-1") << QStringLiteral("Zürich") << QStringLiteral("ZUERICH") << true << true; + QTest::newRow("diacritic-transliteration-2") << QStringLiteral("GyÅr") << QStringLiteral("GYOER") << true << true; QTest::newRow("random-suffix-1") << QStringLiteral("Berlin") << QStringLiteral("Berlin (tief)") << true << false; QTest::newRow("random-suffix-2") << QStringLiteral("München Hbf") << QStringLiteral("München Hbf Gl.27-36") << true << false; QTest::newRow("random-suffix-3") << QStringLiteral("Berlin") << QStringLiteral("Berlin+City") << true << false; + QTest::newRow("random-suffix-and-diacritic") << QStringLiteral("München Hbf") << QStringLiteral("MUNCHEN") << true << false; QTest::newRow("space-insensitive") << QStringLiteral("Frankfurt(Main)Hbf") << QStringLiteral("Frankfurt (Main) Hbf") << true << true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/rct2/valid/irt-mav.json new/kitinerary-22.12.2/autotests/rct2/valid/irt-mav.json --- old/kitinerary-22.12.1/autotests/rct2/valid/irt-mav.json 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/rct2/valid/irt-mav.json 2023-01-31 20:38:12.000000000 +0100 @@ -4,10 +4,10 @@ "@type": "Rct2Ticket", "coachNumber": "23", "outboundArrivalStation": "MUENCHEN HBF", - "outboundArrivalTime": "2018-08-19T14:32:00", + "outboundArrivalTime": "2019-08-19T14:32:00", "outboundClass": "2", "outboundDepartureStation": "BUDAPEST-KELETI", - "outboundDepartureTime": "2018-08-19T07:40:00", + "outboundDepartureTime": "2019-08-19T07:40:00", "passengerName": "JÅhn à Doe", "seatNumber": "101, 102", "title": "MENETJEGY+HELYJEGY", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/rct2/valid/res-dsb-invalid-unicode-encoding.json new/kitinerary-22.12.2/autotests/rct2/valid/res-dsb-invalid-unicode-encoding.json --- old/kitinerary-22.12.1/autotests/rct2/valid/res-dsb-invalid-unicode-encoding.json 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/rct2/valid/res-dsb-invalid-unicode-encoding.json 2023-01-31 20:38:12.000000000 +0100 @@ -4,10 +4,10 @@ "@type": "Rct2Ticket", "coachNumber": "062", "outboundArrivalStation": "Odense", - "outboundArrivalTime": "2018-12-08T18:50:00", + "outboundArrivalTime": "2019-12-08T18:50:00", "outboundClass": "2", "outboundDepartureStation": "København", - "outboundDepartureTime": "2018-12-08T17:22:00", + "outboundDepartureTime": "2019-12-08T17:22:00", "seatNumber": "103", "title": "RESERVATION", "trainNumber": "267", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/autotests/scriptenginedata/eventreservation.ics.json new/kitinerary-22.12.2/autotests/scriptenginedata/eventreservation.ics.json --- old/kitinerary-22.12.1/autotests/scriptenginedata/eventreservation.ics.json 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/autotests/scriptenginedata/eventreservation.ics.json 2023-01-31 20:38:12.000000000 +0100 @@ -37,7 +37,8 @@ "status": 0, "summary": "Akademy 2019", "transparency": 0, - "uid": "KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c" + "uid": "KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c", + "url": "" }, "contextDateTime": "Invalid Date", "isNull": false, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/po/cs/kitinerary.po new/kitinerary-22.12.2/po/cs/kitinerary.po --- old/kitinerary-22.12.1/po/cs/kitinerary.po 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/po/cs/kitinerary.po 2023-01-31 20:38:12.000000000 +0100 @@ -1,18 +1,18 @@ -# Vit Pelcak <[email protected]>, 2017, 2018, 2019, 2020, 2021. +# Vit Pelcak <[email protected]>, 2017, 2018, 2019, 2020, 2021, 2022. msgid "" msgstr "" "Project-Id-Version: desktop files\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2022-07-20 00:46+0000\n" -"PO-Revision-Date: 2021-07-15 15:59+0200\n" -"Last-Translator: Vit Pelcak <[email protected]>\n" +"PO-Revision-Date: 2022-10-10 16:48+0200\n" +"Last-Translator: Vit Pelcak <[email protected]>\n" "Language-Team: Czech <[email protected]>\n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Lokalize 21.04.3\n" +"X-Generator: Lokalize 22.08.1\n" #: calendarhandler.cpp:160 #, kde-format @@ -91,12 +91,12 @@ #: calendarhandler.cpp:306 #, kde-format msgid "Ferry from %1 to %2" -msgstr "" +msgstr "PÅÃvoz z %1 do %2" #: calendarhandler.cpp:319 #, kde-format msgid "Ticket number: %1" -msgstr "" +msgstr "ÄÃslo jÃzdenky: %1" #: calendarhandler.cpp:329 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/po/zh_CN/kitinerary.po new/kitinerary-22.12.2/po/zh_CN/kitinerary.po --- old/kitinerary-22.12.1/po/zh_CN/kitinerary.po 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/po/zh_CN/kitinerary.po 2023-01-31 20:38:12.000000000 +0100 @@ -3,7 +3,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2022-07-20 00:46+0000\n" -"PO-Revision-Date: 2022-12-24 11:44\n" +"PO-Revision-Date: 2023-01-15 15:27\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/README.md new/kitinerary-22.12.2/scripts/README.md --- old/kitinerary-22.12.1/scripts/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/README.md 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,43 @@ +# Static extractor executable build + +For use e.g. as part of Nextcloud it can be useful to build a fully static executable binary. + +This is done by the `static-extractor` Gitlab job, the scripts in this folder are the implementation detail of that job. + +## Supported platforms + +Anything x86_64 with GLIBC 2.17 or newer. + +## Deployment + +The extractor needs external data in the form of translation catalogs and iso-codes files. Those are provided +in the same archive as the binary, and need to be placed in the same relative location to the binary to be found. + +Alternatively, they can be placed in a path listed in the `XDG_DATA_DIRS` environment variable. + +## Translations + +When using the iCal output format, translations are relevant. This is done using Gettext and thus follows the +environment variables that influence that (`LANG`, `LANGUAGE`, `LC_ALL`, etc). + +This also implies that Glibc locale data has to be installed on the system, Gettext will not work without those. + +## Local builds + +If you want to locally reproduce the same build, this can be done by running the commands from the build scripts in the +order specified in `.gitlab-ci.yml` in an environment set up like follows: + +``` +docker run -it --rm centos:centos7 +export CI_PROJECT_PATH=pim/kitinerary +export BUILD_ROOT=/builds +export STAGING_ROOT=/builds/staging +``` + +Optionally, map a local folder into `/builds` in the Docker image to retain the checkouts and build results. This +is particularly useful when debugging/optimizing the build itself. + +## Future Work + +Ideally this would reuse the static build artifacts produced by the CI already anyway, and reuse the +existing dependency mechanism of the CI. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/README.md.license new/kitinerary-22.12.2/scripts/README.md.license --- old/kitinerary-22.12.1/scripts/README.md.license 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/README.md.license 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2023 Volker Krause <[email protected]> +SPDX-License-Identifier: CC0-1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/build-cmake-modules.sh new/kitinerary-22.12.2/scripts/build-cmake-modules.sh --- old/kitinerary-22.12.1/scripts/build-cmake-modules.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/build-cmake-modules.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,90 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-2-Clause +# SPDX-FileCopyrightText: 2020-2022 Volker Krause <[email protected]> +set -e +set -x + +function build_cmake_module() { + local repo=$1 + shift + local module=$1 + shift + local version=$1 + shift + + mkdir -p $BUILD_ROOT + mkdir -p $STAGING_ROOT + pushd $BUILD_ROOT + + if ! [ -d $BUILD_ROOT/$module ]; then + git clone $repo $module + cd $module + git checkout $version + else + # already checked out, so we assume it's the current module set up by Gitlab for us + cd $module + fi + + mkdir build + cd build + cmake -DBUILD_SHARED=ON \ + -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_PREFIX_PATH=$STAGING_ROOT \ + -DCMAKE_INSTALL_PREFIX=$STAGING_ROOT \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \ + -DZLIB_USE_STATIC_LIBS=ON \ + $@ -DCMAKE_BUILD_TYPE=Release .. + + make -j 4 + make install + + popd +} + +function build_kde_module() { + local module=$1 + shift + build_cmake_module https://invent.kde.org/$module $module master $@ +} + +function build_kf_module() { + local module=$1 + shift + build_cmake_module https://invent.kde.org/$module $module kf5 $@ +} + +build_cmake_module https://gitlab.freedesktop.org/freetype/freetype.git freetype VER-2-12-1 + +build_cmake_module https://gitlab.freedesktop.org/poppler/poppler poppler master \ + -DBUILD_CPP_TESTS=OFF -DBUILD_QT5_TESTS=OFF -DBUILD_GTK_TESTS=OFF -DENABLE_CPP=OFF \ + -DENABLE_DCTDECODER=unmaintained -DENABLE_GLIB=OFF -DENABLE_GOBJECT_INTROSPECTION=OFF -DENABLE_LIBOPENJPEG=unmaintained \ + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_UTILS=OFF -DWITH_NSS3=OFF -DWITH_TIFF=OFF -DENABLE_LIBCURL=OFF \ + -DENABLE_CMS=none -DWITH_CAIRO=OFF -DWITH_JPEG=OFF -DFONT_CONFIGURATION=generic -DENABLE_BOOST=OFF -DENABLE_QT5=OFF -DENABLE_QT6=OFF + +build_cmake_module https://github.com/libical/libical.git libical v3.0.14 \ + -DWITH_CXX_BINDINGS=OFF -DSTATIC_ONLY=ON -DGOBJECT_INTROSPECTION=OFF -DICAL_BUILD_DOCS=OFF \ + -DICAL_GLIB_VAPI=OFF -DICAL_GLIB=OFF -DENABLE_GTK_DOC=OFF -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON \ + -DCMAKE_DISABLE_FIND_PACKAGE_BDB=ON + +build_cmake_module https://gitlab.gnome.org/GNOME/libxml2.git libxml2 master \ + -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_DEBUG=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_ZLIB=OFF + +build_cmake_module https://github.com/nu-book/zxing-cpp.git zxing-cpp v2.0.0 \ + -DBUILD_SHARED_LIBRARY=OFF -DBUILD_EXAMPLES=OFF -DBUILD_BLACKBOX_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_PYTHON_MODULE=OFF + +# KDE Frameworks +build_kf_module frameworks/extra-cmake-modules +build_kf_module frameworks/karchive -DCMAKE_DISABLE_FIND_PACKAGE_LibLZMA=ON -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=ON +build_kf_module frameworks/kcodecs +build_kf_module frameworks/kconfig -DKCONFIG_USE_DBUS=OFF +build_kf_module frameworks/kcoreaddons +build_kf_module frameworks/ki18n -DBUILD_WITH_QML=OFF +build_kf_module frameworks/kcalendarcore +build_kf_module frameworks/kcontacts + +# PIM +build_kde_module pim/kmime +build_kde_module pim/kpkpass + +export CXXFLAGS="-static-libstdc++ -static-libgcc" +build_kde_module $CI_PROJECT_PATH -DKITINERARY_STANDALONE_CLI_EXTRACTOR=ON -DBUILD_TOOLS=OFF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/build-iso-codes.sh new/kitinerary-22.12.2/scripts/build-iso-codes.sh --- old/kitinerary-22.12.1/scripts/build-iso-codes.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/build-iso-codes.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2019-2022 Volker Krause <[email protected]> +# SPDX-License-Identifier: BSD-2-Clause +set -e +set -x + +mkdir -p $BUILD_ROOT +mkdir -p $STAGING_ROOT + +pushd $BUILD_ROOT + +git clone https://salsa.debian.org/iso-codes-team/iso-codes.git +cd iso-codes + +./configure --prefix=$STAGING_ROOT +make -j 4 +make install + +popd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/build-openssl.sh new/kitinerary-22.12.2/scripts/build-openssl.sh --- old/kitinerary-22.12.1/scripts/build-openssl.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/build-openssl.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2019-2022 Volker Krause <[email protected]> +# SPDX-License-Identifier: BSD-2-Clause +set -e +set -x + +mkdir -p $BUILD_ROOT +mkdir -p $STAGING_ROOT + +pushd $BUILD_ROOT + +git clone https://github.com/openssl/openssl.git +cd openssl +git checkout OpenSSL_1_1_1-stable + +./config --prefix=$STAGING_ROOT --openssldir=$STAGING_ROOT +make -j 4 +make install_dev +rm -f $STAGING_ROOT/lib/libcrypto.so* +rm -f $STAGING_ROOT/lib64/libcrypto.so* +rm -f $STAGING_ROOT/lib/libssl.so* +rm -f $STAGING_ROOT/lib64/libssl.so* + +popd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/build-static-qt.sh new/kitinerary-22.12.2/scripts/build-static-qt.sh --- old/kitinerary-22.12.1/scripts/build-static-qt.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/build-static-qt.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,76 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-2-Clause +# SPDX-FileCopyrightText: 2020-2022 Volker Krause <[email protected]> +set -e +set -x + +function build-static-qt-module() { + local module=$1 + shift + + mkdir -p $BUILD_ROOT + mkdir -p $STAGING_ROOT + pushd $BUILD_ROOT + + git clone https://invent.kde.org/qt/qt/$module + cd $module + git checkout kde/5.15 + mkdir build + cd build + if [ $module == "qtbase" ]; then + ../configure -prefix $STAGING_ROOT $@ + else + $STAGING_ROOT/bin/qmake .. $@ + fi + make -j 4 + make install + + popd +} + +build-static-qt-module qtbase \ + -release -optimize-size \ + -qpa offscreen \ + -no-pch \ + -no-icu \ + -no-dbus \ + -no-glib \ + -no-xcb -no-opengl -no-feature-vulkan \ + -no-feature-sql \ + -no-widgets \ + -no-feature-network \ + -no-feature-sha3-fast \ + -no-accessibility \ + -no-feature-animation -no-feature-clipboard -no-feature-colornames -no-feature-cursor -no-feature-cssparser -no-feature-draganddrop \ + -no-feature-gestures -no-feature-im \ + -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_xpm -no-feature-imageformatplugin -no-feature-movie \ + -no-feature-picture -no-feature-pdf \ + -no-feature-concurrent -no-feature-future -no-feature-sharedmemory -no-feature-systemsemaphore \ + -no-feature-statemachine \ + -no-feature-syntaxhighlighter \ + -no-feature-tabletevent -no-feature-wheelevent \ + -no-feature-texthtmlparser -no-feature-textodfwriter \ + -no-feature-topleveldomain \ + -no-feature-validator \ + -no-feature-desktopservices \ + -no-feature-proxymodel -no-feature-stringlistmodel \ + -no-feature-testlib \ + -no-fontconfig -no-harfbuzz \ + -no-feature-sessionmanager \ + -no-feature-textmarkdownreader -no-feature-textmarkdownwriter \ + -static -confirm-license -opensource -make libs -make tools + +build-static-qt-module qtdeclarative -- \ + -no-feature-qml-debug \ + -no-feature-qml-preview \ + -no-feature-qml-profiler \ + -no-feature-qml-animation \ + -no-feature-qml-list-model \ + -no-feature-qml-worker-script + +build-static-qt-module qttools + +# Patch .prl files to use static zlib +for i in `find $STAGING_ROOT -name "*.prl"`; do + sed -i -e 's,-lz,/usr/lib64/libz.a,g' $i +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/collect-data-files.sh new/kitinerary-22.12.2/scripts/collect-data-files.sh --- old/kitinerary-22.12.1/scripts/collect-data-files.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/collect-data-files.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,33 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2019-2022 Volker Krause <[email protected]> +# SPDX-License-Identifier: BSD-2-Clause +set -e +set -x + +DEPLOY_ROOT=$BUILD_ROOT/$CI_PROJECT_PATH/build/ + +function copy_file() +{ + local subpath=`dirname $1` + mkdir -p $DEPLOY_ROOT/$subpath + cp -v $STAGING_ROOT/$1 $DEPLOY_ROOT/$subpath +} + +copy_file share/iso-codes/json/iso_3166-1.json +copy_file share/iso-codes/json/iso_3166-2.json + +mkdir -p $DEPLOY_ROOT/share/ +cp -rv $STAGING_ROOT/share/locale $DEPLOY_ROOT/share/ + +# remove catalogs we don't use +for i in iso_15924.mo iso_3166.mo iso_3166_2.mo iso_3166-3.mo iso_4217.mo 'iso_639*.mo' karchive5_qt.qm kcodecs5_qt.qm kconfig5_qt.qm kcoreaddons5_qt.qm libkmime5.mo kcontacts5.mo ki18n5.mo LC_SCRIPTS; do + find $DEPLOY_ROOT -name $i | xargs rm -rf +done + +# remove languages we have no own translation for +for i in `ls $DEPLOY_ROOT/share/locale`; do + if ! [ -f $DEPLOY_ROOT/share/locale/$i/LC_MESSAGES/kitinerary.mo ]; then + echo "Dropping language $i" + rm -rf $DEPLOY_ROOT/share/locale/$i + fi +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/setup-centos.sh new/kitinerary-22.12.2/scripts/setup-centos.sh --- old/kitinerary-22.12.1/scripts/setup-centos.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/setup-centos.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,27 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2019-2022 Volker Krause <[email protected]> +# SPDX-License-Identifier: BSD-2-Clause +set -e +set -x + +CMAKE_VERSION=3.25.1 + +# install build dependencies +yum install -y centos-release-scl +yum install -y \ + devtoolset-11-gcc-c++ \ + rh-git227 \ + glibc-devel \ + gettext \ + gperf \ + make \ + shared-mime-info \ + which \ + zlib-devel \ + zlib-static \ + python3 + +# get latest CMake +CMAKE_MINOR_VERSION=`echo $CMAKE_VERSION | sed -e 's/\.[^\.]*$//'` +curl -Lo /tmp/cmake.sh https://cmake.org/files/v$CMAKE_MINOR_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh +bash /tmp/cmake.sh --skip-license --prefix=/usr --exclude-subdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/scripts/setup-opensuse-leap.sh new/kitinerary-22.12.2/scripts/setup-opensuse-leap.sh --- old/kitinerary-22.12.1/scripts/setup-opensuse-leap.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kitinerary-22.12.2/scripts/setup-opensuse-leap.sh 2023-01-31 20:38:12.000000000 +0100 @@ -0,0 +1,44 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2019-2022 Volker Krause <[email protected]> +# SPDX-License-Identifier: BSD-2-Clause +set -e +set -x + +GCC_VERSION=10 +CMAKE_VERSION=3.25.1 + +# install build dependencies +zypper --non-interactive install \ + curl \ + gzip \ + tar \ + gcc$GCC_VERSION \ + gcc$GCC_VERSION-c++ \ + gettext-runtime \ + gettext-tools \ + git \ + glibc-devel-static \ + gperf \ + make \ + shared-mime-info \ + which \ + zlib-devel-static \ + python3 + +# gcc-$GCC_VERSION is a non-standard compiler on this platform, hide that +ln -s /usr/bin/gcc-$GCC_VERSION /usr/bin/gcc +ln -s /usr/bin/g++-$GCC_VERSION /usr/bin/g++ +ln -s /usr/bin/gcc-ar-$GCC_VERSION /usr/bin/gcc-ar +ln -s /usr/bin/gcc-nm-$GCC_VERSION /usr/bin/gcc-nm +ln -s /usr/bin/gcc-ranlib-$GCC_VERSION /usr/bin/gcc-ranlib +ln -s /usr/bin/gcov-$GCC_VERSION /usr/bin/gcov +ln -s /usr/bin/gcov-dump-$GCC_VERSION /usr/bin/gcov-dump +ln -s /usr/bin/gcov-tool-$GCC_VERSION /usr/bin/gcov-tool +ln -s /usr/bin/cpp-$GCC_VERSION /usr/bin/cpp +ln -s /usr/bin/gcc /usr/bin/cc +ln -s /usr/bin/g++ /usr/bin/c++ + +# get latest CMake +CMAKE_MINOR_VERSION=`echo $CMAKE_VERSION | sed -e 's/\.[^\.]*$//'` +curl -Lo /tmp/cmake.sh https://cmake.org/files/v$CMAKE_MINOR_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh +bash /tmp/cmake.sh --skip-license --prefix=/usr --exclude-subdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/CMakeLists.txt new/kitinerary-22.12.2/src/CMakeLists.txt --- old/kitinerary-22.12.1/src/CMakeLists.txt 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/CMakeLists.txt 2023-01-31 20:38:12.000000000 +0100 @@ -1,13 +1,14 @@ # SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]> # SPDX-License-Identifier: BSD-3-Clause +option(BUILD_TOOLS "Build development tools" ON) + add_subdirectory(osm) if (TARGET Qt::Network AND NOT CMAKE_CROSSCOMPILING AND OSM_PLANET_DIR AND OsmTools_FOUND) add_subdirectory(knowledgedb-generator) endif() add_subdirectory(lib) add_subdirectory(cli) -option(BUILD_TOOLS "Build development tools" ON) if (BUILD_TOOLS) add_subdirectory(tools) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/cli/CMakeLists.txt new/kitinerary-22.12.2/src/cli/CMakeLists.txt --- old/kitinerary-22.12.1/src/cli/CMakeLists.txt 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/cli/CMakeLists.txt 2023-01-31 20:38:12.000000000 +0100 @@ -6,16 +6,19 @@ return() endif() +option(KITINERARY_STANDALONE_CLI_EXTRACTOR "Build stand-alone command line extractor (this should be off, unless you are building the dedicated Flatpak for this" OFF) + add_executable(kitinerary-extractor main.cpp) target_include_directories(kitinerary-extractor PRIVATE ${CMAKE_BINARY_DIR}) +if (KITINERARY_STANDALONE_CLI_EXTRACTOR) + target_compile_definitions(kitinerary-extractor PRIVATE -DKITINERARY_STANDALONE_CLI_EXTRACTOR) +endif() target_link_libraries(kitinerary-extractor KPimItinerary KPim::PkPass KF5::CalendarCore ) -option(KITINERARY_STANDALONE_CLI_EXTRACTOR "Build stand-alone command line extractor (this should be off, unless you are building the dedicated Flatpak for this" OFF) - if (KITINERARY_STANDALONE_CLI_EXTRACTOR) install(TARGETS kitinerary-extractor DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(PROGRAMS org.kde.kitinerary-extractor.desktop DESTINATION ${KDE_INSTALL_APPDIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/cli/main.cpp new/kitinerary-22.12.2/src/cli/main.cpp --- old/kitinerary-22.12.1/src/cli/main.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/cli/main.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -25,6 +25,7 @@ #include <QCoreApplication> #include <QDateTime> #include <QDebug> +#include <QDir> #include <QFile> #include <QJsonArray> #include <QJsonDocument> @@ -95,6 +96,17 @@ QCoreApplication::setOrganizationName(QStringLiteral("KDE")); QCoreApplication app(argc, argv); +#ifdef KITINERARY_STANDALONE_CLI_EXTRACTOR + // set additional data file search path relative to the current binary location + // NOTE: QCoreApplication::applicationDirPath is only valid once QCoreApplication has been created + auto xdgDataDirs = qgetenv("XDG_DATA_DIRS"); + if (!xdgDataDirs.isEmpty()) { + xdgDataDirs += QDir::listSeparator().toLatin1(); + } + xdgDataDirs += QString(QCoreApplication::applicationDirPath() + QDir::separator() + QLatin1String("..") + QDir::separator() + QLatin1String("share")).toUtf8(); + qputenv("XDG_DATA_DIRS", xdgDataDirs); +#endif + QCommandLineParser parser; parser.setApplicationDescription(QStringLiteral("Command line itinerary extractor.")); parser.addHelpOption(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/cli/org.kde.kitinerary-extractor.appdata.xml new/kitinerary-22.12.2/src/cli/org.kde.kitinerary-extractor.appdata.xml --- old/kitinerary-22.12.1/src/cli/org.kde.kitinerary-extractor.appdata.xml 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/cli/org.kde.kitinerary-extractor.appdata.xml 2023-01-31 20:38:12.000000000 +0100 @@ -36,7 +36,7 @@ <name xml:lang="sk">Extraktor cez prÃkazový riadok pre KItinerary</name> <name xml:lang="sl">KItinerary ekstraktor ukazne vrstice</name> <name xml:lang="sv">Kitinerary extrahering pÃ¥ kommandoraden</name> - <name xml:lang="tr">KItinerary Komut Satırı Ãıkarıcı</name> + <name xml:lang="tr">K Yolcu Belgesi Komut Satırı Ãıkarıcısı</name> <name xml:lang="uk">Ðомандний заÑÑб видобÑÐ²Ð°Ð½Ð½Ñ KItinerary</name> <name xml:lang="x-test">xxKItinerary Command Line Extractorxx</name> <name xml:lang="zh-CN">KItinerary å½ä»¤è¡å¯¼åºå·¥å ·</name> @@ -69,7 +69,7 @@ <summary xml:lang="sk">Extraktor dát pre rezerváciu cez prÃkazový riadok.</summary> <summary xml:lang="sl">Ekstraktor podatkov o rezervaciji v ukazni vrstici.</summary> <summary xml:lang="sv">Extrahering av reservationsdata pÃ¥ kommandoraden</summary> - <summary xml:lang="tr">Komut sayırı ayırma veri çıkarıcısı.</summary> + <summary xml:lang="tr">Komut satırında çalıÅan rezervasyon verisi çıkarıcı.</summary> <summary xml:lang="uk">ÐÑогÑама Ð´Ð»Ñ Ð²Ð¸Ð´Ð¾Ð±ÑÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ Ð±ÑонÑваннÑ, кеÑÑÐ²Ð°Ð½Ð½Ñ ÑÐºÐ¾Ñ Ð²ÑдбÑваÑÑÑÑÑ Ð· командного ÑÑдка.</summary> <summary xml:lang="x-test">xxCommand line reservation data extractor.xx</summary> <summary xml:lang="zh-CN">å½ä»¤è¡è¡ç¨é¢è®¢æ°æ®å¯¼åºå·¥å ·ã</summary> @@ -104,7 +104,7 @@ <p xml:lang="sk">Extraktor cez prÃkazový riadok pre dáta itinerára na integráciu do aplikácià tretÃch strán.</p> <p xml:lang="sl">Ekstraktor ukazne vrstice za potovalne podatke za integracijo aplikacije tretje osebe.</p> <p xml:lang="sv">Extrahering av reseinformation pÃ¥ kommandoraden, för att integrera med tredjepartsprogram.</p> - <p xml:lang="tr">Ãçüncü parti uygulamalarla tümleÅtirmek için yolculuk verisi komut satırı çıkarıcısı.</p> + <p xml:lang="tr">Ãçüncü parti uygulamalarla tümleÅtirmek için komut satırında çalıÅan yolcu belgesi verisi çıkarıcısı.</p> <p xml:lang="uk">ÐÑогÑама, кеÑÑÐ²Ð°Ð½Ð½Ñ ÑÐºÐ¾Ñ Ð²ÑдбÑваÑÑÑÑÑ Ð· командного ÑÑдка, Ð´Ð»Ñ Ð²Ð¸Ð´Ð¾Ð±ÑÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ Ð±ÑонÑваннÑ. ÐÑизнаÑено Ð´Ð»Ñ ÑнÑегÑаÑÑÑ Ð·Ñ ÑÑоÑоннÑми пÑогÑамами.</p> <p xml:lang="x-test">xxCommand line extractor for itinerary data, for integrating into 3rd party applications.xx</p> <p xml:lang="zh-CN">å½ä»¤è¡è¡ç¨æ°æ®å¯¼åºå·¥å ·ï¼ç¨äºä¸ç¬¬ä¸æ¹åºç¨ç¨åºè¿è¡æ´åã</p> @@ -116,9 +116,9 @@ <binary>kitinerary-extractor</binary> </provides> <releases> + <release version="5.22.2" date="2023-02-02"/> <release version="5.22.1" date="2023-01-05"/> <release version="5.22.0" date="2022-12-08"/> <release version="5.21.3" date="2022-11-03"/> - <release version="5.21.2" date="2022-10-13"/> </releases> </component> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/cli/org.kde.kitinerary-extractor.desktop new/kitinerary-22.12.2/src/cli/org.kde.kitinerary-extractor.desktop --- old/kitinerary-22.12.1/src/cli/org.kde.kitinerary-extractor.desktop 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/cli/org.kde.kitinerary-extractor.desktop 2023-01-31 20:38:12.000000000 +0100 @@ -27,7 +27,7 @@ Name[sk]=Extraktor KItinerary Name[sl]=KItinerary Extractor Name[sv]=Kitinerary extrahering -Name[tr]=KItinerary Ãıkarıcısı +Name[tr]=K Yolcu Belgesi Ãıkarıcısı Name[uk]=ÐаÑÑб видобÑÐ²Ð°Ð½Ð½Ñ KItinerary Name[x-test]=xxKItinerary Extractorxx Name[zh_CN]=KItinerary 导åºå·¥å · @@ -59,7 +59,7 @@ GenericName[sk]=Extraktor cez prÃkazový riadok pre KItinerary GenericName[sl]=KItinerary ekstraktor ukazne vrstice GenericName[sv]=Kitinerary extrahering pÃ¥ kommandoraden -GenericName[tr]=KItinerary Komut Satırı Ãıkarıcı +GenericName[tr]=K Yolcu Belgesi Komut Satırı Ãıkarıcı GenericName[uk]=ÐаÑÑб видобÑÐ²Ð°Ð½Ð½Ñ KItinerary Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¾Ð³Ð¾ ÑÑдка GenericName[x-test]=xxKItinerary command line extractorxx GenericName[zh_CN]=KItinerary å½ä»¤è¡å¯¼åºå·¥å · diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/CMakeLists.txt new/kitinerary-22.12.2/src/lib/CMakeLists.txt --- old/kitinerary-22.12.1/src/lib/CMakeLists.txt 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/CMakeLists.txt 2023-01-31 20:38:12.000000000 +0100 @@ -1,7 +1,9 @@ # SPDX-FileCopyrightText: 2018-2021 Volker Krause <[email protected]> # SPDX-License-Identifier: BSD-3-Clause -add_subdirectory(vdv/certs) +if (BUILD_TOOLS) + add_subdirectory(vdv/certs) +endif() configure_file(config-kitinerary.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kitinerary.h) add_library(KPimItinerary ${kitinerary_lib_srcs}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/barcodedecoder.cpp new/kitinerary-22.12.2/src/lib/barcodedecoder.cpp --- old/kitinerary-22.12.1/src/lib/barcodedecoder.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/barcodedecoder.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -40,7 +40,7 @@ static constexpr const auto SQUARE_MAX_ASPECT = 1.25f; static constexpr const auto PDF417_MIN_ASPECT = 1.5f; static constexpr const auto PDF417_MAX_ASPECT = 6.0f; -static constexpr const auto ANY1D_MIN_ASPECT = 4.0f; +static constexpr const auto ANY1D_MIN_ASPECT = 1.95f; static constexpr const auto ANY1D_MAX_ASPECT = 8.0f; BarcodeDecoder::BarcodeDecoder() = default; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/jsonlddocument.cpp new/kitinerary-22.12.2/src/lib/jsonlddocument.cpp --- old/kitinerary-22.12.1/src/lib/jsonlddocument.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/jsonlddocument.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -127,14 +127,6 @@ }; static const auto fallbackDateTimePatternCount = sizeof(fallbackDateTimePattern) / sizeof(const char *); -static double doubleValue(const QJsonValue &v) -{ - if (v.isDouble()) { - return v.toDouble(); - } - return v.toString().toDouble(); -} - static bool isEmptyJsonLdObject(const QJsonObject &obj) { for (auto it = obj.begin(); it != obj.end(); ++it) { @@ -205,8 +197,16 @@ return dt; } - case QVariant::Double: - return doubleValue(v); + case QMetaType::Double: + case QMetaType::Float: + { + if (v.isDouble()) { + return v.toDouble(); + } + bool ok = false; + const auto res = v.toString().toDouble(&ok); + return ok ? res : QVariant(); + } case QVariant::Int: if (v.isDouble()) { return v.toDouble(); @@ -219,9 +219,6 @@ default: break; } - if (prop.type() == qMetaTypeId<float>()) { - return doubleValue(v); - } if (prop.userType() == qMetaTypeId<QVariantList>()) { QVariantList l; @@ -262,7 +259,9 @@ } const auto prop = mo->property(idx); const auto value = propertyValue(prop, it.value()); - prop.writeOnGadget(v, value); + if (!value.isNull()) { + prop.writeOnGadget(v, value); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/locationutil.cpp new/kitinerary-22.12.2/src/lib/locationutil.cpp --- old/kitinerary-22.12.1/src/lib/locationutil.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/locationutil.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -214,6 +214,20 @@ return lit == lhs.end() && rit == rhs.end(); } +static bool hasCommonPrefix(QStringView lhs, QStringView rhs) +{ + // check for a common prefix + bool foundSeparator = false; + for (auto i = 0; i < std::min(lhs.size(), rhs.size()); ++i) { + if (lhs[i].toCaseFolded() != rhs[i].toCaseFolded()) { + return foundSeparator; + } + foundSeparator |= !lhs[i].isLetter(); + } + + return lhs.startsWith(rhs, Qt::CaseInsensitive) || rhs.startsWith(lhs, Qt::CaseInsensitive); +} + static bool isSameLocationName(const QString &lhs, const QString &rhs, LocationUtil::Accuracy accuracy) { if (lhs.isEmpty() || rhs.isEmpty()) { @@ -237,15 +251,7 @@ if (accuracy == LocationUtil::CityLevel) { // check for a common prefix - bool foundSeparator = false; - for (auto i = 0; i < std::min(lhsNormalized.size(), rhsNormalized.size()); ++i) { - if (lhsNormalized[i] != rhsNormalized[i]) { - return foundSeparator; - } - foundSeparator |= !lhsNormalized[i].isLetter(); - } - - return lhsNormalized.startsWith(rhsNormalized) || rhsNormalized.startsWith(lhsNormalized); + return hasCommonPrefix(lhsNormalized, rhsNormalized) || hasCommonPrefix(lhsTransliterated, rhsTransliterated); } return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/mergeutil.cpp new/kitinerary-22.12.2/src/lib/mergeutil.cpp --- old/kitinerary-22.12.1/src/lib/mergeutil.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/mergeutil.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -151,7 +151,7 @@ return isSameFlight(lhsFlight, rhsFlight); } - // train: booking ref, train number and depature day match + // train: booking ref, train number and departure day match if (JsonLd::isA<TrainReservation>(lhs)) { const auto lhsRes = lhs.value<TrainReservation>(); const auto rhsRes = rhs.value<TrainReservation>(); @@ -383,10 +383,21 @@ qCDebug(CompareLog) << "unbound trip" << lhs.departureStation().name() << rhs.departureStation().name() << lhs.arrivalStation().name() << rhs.arrivalStation().name(); return LocationUtil::isSameLocation(lhs.departureStation(), rhs.departureStation(), LocationUtil::Exact) && LocationUtil::isSameLocation(lhs.arrivalStation(), rhs.arrivalStation(), LocationUtil::Exact); - } else if (!equalAndPresent(lhs.departureTime(), rhs.departureTime()) || conflictIfPresent(lhs.arrivalTime(), rhs.arrivalTime())) { + } else if (!equalAndPresent(lhs.departureTime(), rhs.departureTime())) { return false; } + // arrival times (when present) should either match exactly, or be almost the same at a matching arrival location + // (tickets even for the same connection booked on the same day sometimes have slight variation in the arrival time...) + if (conflictIfPresent(lhs.arrivalTime(), rhs.arrivalTime())) { + if (std::abs(lhs.arrivalTime().secsTo(rhs.arrivalTime())) > 180) { + return false; + } + if (!LocationUtil::isSameLocation(lhs.arrivalStation(), rhs.arrivalStation(), LocationUtil::Exact)) { + return false; + } + } + // if we don't have train numbers, also fall back to the less robust location comparison if (lhs.trainNumber().isEmpty() || rhs.trainNumber().isEmpty()) { qCDebug(CompareLog) << "missing train number" << lhs.trainNumber() << rhs.trainNumber(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/pdf/pdfimage.h new/kitinerary-22.12.2/src/lib/pdf/pdfimage.h --- old/kitinerary-22.12.1/src/lib/pdf/pdfimage.h 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/pdf/pdfimage.h 2023-01-31 20:38:12.000000000 +0100 @@ -51,7 +51,7 @@ constexpr inline bool isNull() const { - return m_refNum >= 0; + return m_refNum < 0; } constexpr inline bool operator==(const PdfImageRef &other) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/booking.js new/kitinerary-22.12.2/src/lib/scripts/booking.js --- old/kitinerary-22.12.1/src/lib/scripts/booking.js 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/booking.js 2023-01-31 20:38:12.000000000 +0100 @@ -103,14 +103,15 @@ res.reservationNumber = href.match(/mailto:(\d+)-/)[1]; } else if (aElem.attribute('universal') == 'true') { res.reservationFor.name = aElem.content; - } else if (aElem.content.match(/modify/) && href.startsWith("https:")) { + } else if (!res.modifyReservationUrl && href.startsWith("https:") && (href.match(/pbsource=email_change;/) || href.match(/pbsource=conf_email_modify;/))) { res.modifyReservationUrl = href; } } const times = doc.eval('//time'); - res.checkinTime = times[0].attribute("datetime"); - res.checkoutTime = times[1].attribute("datetime"); + // chop of UTC offset if present, that is based on time of booking, not time of travel + res.checkinTime = times[0].attribute("datetime").substr(0, 19); + res.checkoutTime = times[1].attribute("datetime").substr(0, 19); const text = doc.root.recursiveContent; for (let locale in regExMap) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/deutschebahn.js new/kitinerary-22.12.2/src/lib/scripts/deutschebahn.js --- old/kitinerary-22.12.1/src/lib/scripts/deutschebahn.js 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/deutschebahn.js 2023-01-31 20:38:12.000000000 +0100 @@ -294,7 +294,7 @@ let res = JsonLd.newTrainReservation(); res.reservedTicket = node.result[0]; applyUic9183ToReservation(res, code); - res.reservationFor.departureDay = JsonLd.toDateTime(bl.findSubBlock('031').content, 'dd.mm.yyyy', 'de'); + res.reservationFor.departureDay = JsonLd.toDateTime(bl.findSubBlock('031').content, 'dd.MM.yyyy', 'de'); res.reservationFor.departureStation = JsonLd.toJson(code.outboundDepartureStation); res.reservationFor.arrivalStation = JsonLd.toJson(code.outboundArrivalStation); @@ -305,7 +305,7 @@ let ret = JsonLd.newTrainReservation(); ret.reservedTicket = node.result[0]; applyUic9183ToReservation(ret, code); - ret.reservationFor.departureDay = JsonLd.toDateTime(bl.findSubBlock('032').content, 'dd.mm.yyyy', 'de'); + ret.reservationFor.departureDay = JsonLd.toDateTime(bl.findSubBlock('032').content, 'dd.MM.yyyy', 'de'); ret.reservationFor.departureStation = JsonLd.toJson(code.returnDepartureStation); ret.reservationFor.arrivalStation = JsonLd.toJson(code.returnArrivalStation); return [res, ret]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/indico.json new/kitinerary-22.12.2/src/lib/scripts/indico.json --- old/kitinerary-22.12.1/src/lib/scripts/indico.json 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/indico.json 2023-01-31 20:38:12.000000000 +0100 @@ -5,6 +5,12 @@ "match": "^\\[Indico\\] ", "mimeType": "message/rfc822", "scope": "Ancestors" + }, + { + "field": "Subject", + "match": "^Registration modified ", + "mimeType": "message/rfc822", + "scope": "Ancestors" } ], "function": "parseRegistration", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/mav.js new/kitinerary-22.12.2/src/lib/scripts/mav.js --- old/kitinerary-22.12.1/src/lib/scripts/mav.js 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/mav.js 2023-01-31 20:38:12.000000000 +0100 @@ -9,25 +9,28 @@ return new Date(value * 1000 + base.getTime()); } +function parseUicStationCode(value) +{ + value &= 0xffffff; + return value < 1000000 ? undefined : "uic:" + value; +} + // see https://community.kde.org/KDE_PIM/KItinerary/MAV_Barcode -function parseBarcode(data) { - var res = JsonLd.newTrainReservation(); - const inner = ByteArray.inflate(data.slice(2)); - const view = new DataView(inner); - res.reservationNumber = ByteArray.decodeUtf8(inner.slice(0, 17)); - res.reservationFor.provider.identifier = "uic:" + view.getUint16(18, false); - const tripBlockOffset = view.getUInt8(28) == 0x81 ? 107 : 43; - res.reservationFor.departureStation.identifier = "uic:" + (view.getUint32(tripBlockOffset - 1, false) & 0xffffff); +// data starts at offset 20 in the header block, at which point both formats are structurally identical +function parseBarcodeCommon(res, data) { + const view = new DataView(data); + const tripBlockOffset = view.getUInt8(8) == 0x81 ? 87 : 23; + res.reservationFor.departureStation.identifier = parseUicStationCode(view.getUint32(tripBlockOffset - 1, false)); res.reservationFor.departureStation.name = "" + (view.getUint32(tripBlockOffset - 1, false) & 0xffffff); - res.reservationFor.arrivalStation.identifier = "uic:" + (view.getUint32(tripBlockOffset + 2 , false) & 0xffffff); + res.reservationFor.arrivalStation.identifier = parseUicStationCode(view.getUint32(tripBlockOffset + 2 , false)); res.reservationFor.arrivalStation.name = "" + (view.getUint32(tripBlockOffset + 2, false) & 0xffffff); - res.reservedTicket.ticketedSeat.seatingType = ByteArray.decodeUtf8(inner.slice(tripBlockOffset + 96, tripBlockOffset + 97)); + res.reservedTicket.ticketedSeat.seatingType = ByteArray.decodeUtf8(data.slice(tripBlockOffset + 96, tripBlockOffset + 97)); res.reservationFor.departureDay = parseDateTime(view.getUint32(tripBlockOffset + 98, false)); - if (view.getUInt8(28) == 0x81) { - res.underName.name = ByteArray.decodeUtf8(inner.slice(39, 39 + 45)); + if (view.getUInt8(8) == 0x81) { + res.underName.name = ByteArray.decodeUtf8(data.slice(19, 19 + 45)); } - for (var i = 0; i < view.getUInt8(30); ++i) { - const seatBlock = inner.slice(inner.byteLength - ((i+1) *57)); + for (var i = 0; i < view.getUInt8(10); ++i) { + const seatBlock = data.slice(data.byteLength - ((i+1) *57)); const seatView = new DataView(seatBlock); res.reservationFor.trainNumber = ByteArray.decodeUtf8(seatBlock.slice(16, 16+5)); if (seatView.getUInt8(22) == 0) { // surcharge block @@ -36,6 +39,15 @@ res.reservedTicket.ticketedSeat.seatSection = ByteArray.decodeUtf8(seatBlock.slice(22, 25)); res.reservedTicket.ticketedSeat.seatNumber = seatView.getUInt16(25, false); } +} + +function parseBarcode(data) { + var res = JsonLd.newTrainReservation(); + const inner = ByteArray.inflate(data.slice(2)); + const view = new DataView(inner); + res.reservationNumber = ByteArray.decodeUtf8(inner.slice(0, 17)); + res.reservationFor.provider.identifier = "uic:" + view.getUint16(18, false); + parseBarcodeCommon(res, inner.slice(20)); res.reservedTicket.ticketToken = "pdf417bin:" + ByteArray.toBase64(data); return res; } @@ -47,14 +59,7 @@ res.reservationFor.provider.identifier = "uic:" + ByteArray.decodeUtf8(data.slice(20, 24)); const inner = ByteArray.inflate(data.slice(24)); - const header2 = new DataView(inner.slice(0, 19)); - if (header2.getUInt8(8) == 0x81) { - res.underName.name = ByteArray.decodeUtf8(inner.slice(19, 19 + 45)); - } - - const ticketBlockOffset = header2.getUInt8(8) == 0x81 ? 87 : 23; - res.reservedTicket.ticketedSeat.seatingType = ByteArray.decodeUtf8(inner.slice(ticketBlockOffset + 96, ticketBlockOffset + 97)); - + parseBarcodeCommon(res, inner); res.reservedTicket.ticketToken = "pdf417bin:" + ByteArray.toBase64(data); return res; } @@ -78,4 +83,40 @@ reservations.push(res); } return reservations; +} + +function parseInternationalUic9183(uic9183, node) +{ + let res = node.result[0]; + const rct2 = uic9183.ticketLayout; + const train = rct2.text(14, 1, 30, 1).match(/ZUGBINDUNG: (.*?) (.*)?/); // why is this in German?? + if (train[2] && train[2] != "null") { + res.reservationFor.trainNumber = train[2] + ' ' + train[1]; + } else { + res.reservationFor.trainNumber = train[1]; + } + return res; +} + +function parseInternationalTicket(pdf, node, triggerNode) +{ + const text = pdf.pages[triggerNode.location].text; + let reservations = []; + let idx = 0; + while (true) { + let leg = text.substr(idx).match(/(\d\d\.\d\d\.) (\d\d:\d\d) (.*) â (\d\d:\d\d) (.*?) (.*)/); + if (!leg) + break; + idx = leg.index + leg[0].length; + + let res = JsonLd.newTrainReservation(); + res.reservationFor.departureTime = JsonLd.toDateTime(leg[1] + leg[2], 'dd.MM.hh:mm', 'hu'); + res.reservationFor.arrivalTime = JsonLd.toDateTime(leg[1] + leg[4], 'dd.MM.hh:mm', 'hu'); + res.reservationFor.departureStation.name = leg[3]; + res.reservationFor.arrivalStation.name = leg[5]; + res.reservationFor.trainNumber = leg[6]; + res = JsonLd.apply(triggerNode.result[0], res); + reservations.push(res); + } + return reservations; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/mav.json new/kitinerary-22.12.2/src/lib/scripts/mav.json --- old/kitinerary-22.12.1/src/lib/scripts/mav.json 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/mav.json 2023-01-31 20:38:12.000000000 +0100 @@ -39,5 +39,31 @@ "function": "parseTicket", "mimeType": "application/pdf", "script": "mav.js" + }, + { + "filter": [ + { + "field": "carrierId", + "match": "1155", + "mimeType": "internal/uic9183", + "scope": "Current" + } + ], + "function": "parseInternationalUic9183", + "mimeType": "internal/uic9183", + "script": "mav.js" + }, + { + "filter": [ + { + "field": "carrierId", + "match": "1155", + "mimeType": "internal/uic9183", + "scope": "Descendants" + } + ], + "function": "parseInternationalTicket", + "mimeType": "application/pdf", + "script": "mav.js" } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/onepagebooking.js new/kitinerary-22.12.2/src/lib/scripts/onepagebooking.js --- old/kitinerary-22.12.1/src/lib/scripts/onepagebooking.js 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/onepagebooking.js 2023-01-31 20:38:12.000000000 +0100 @@ -34,7 +34,7 @@ const numberAdults = content.match(/Anzahl der Erwachsene[rn]:\n? *([0-9]+)/)[1] - const numberChildren = content.match(/Anzahl der Kinder:\n? *([0-9]+)/)[1] + const numberChildren = content.match(/Anzahl der Kinder:\n? *([0-9]+)/); var res = JsonLd.newLodgingReservation() @@ -55,7 +55,7 @@ res.priceCurrency = "EUR" res.reservationFor.numAdults = numberAdults - res.reservationFor.numChildren = numberChildren + res.reservationFor.numChildren = numberChildren ? numberChildren[1] : undefined; return res } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/scripts/pretix.js new/kitinerary-22.12.2/src/lib/scripts/pretix.js --- old/kitinerary-22.12.1/src/lib/scripts/pretix.js 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/scripts/pretix.js 2023-01-31 20:38:12.000000000 +0100 @@ -6,11 +6,12 @@ function parsePass(content, node) { var res = node.result[0]; res.reservationFor.name = content.field['eventName'].value; - res.reservationFor.startDate = JsonLd.toDateTime(content.field['doorsOpen'].value, 'dd.MM.yyyy hh:mm', 'de'); - res.reservationFor.endDate = JsonLd.toDateTime(content.field['doorsClose'].value, 'dd.MM.yyyy hh:mm', 'de'); + res.reservationFor.startDate = JsonLd.toDateTime(content.field['doorsOpen'].value, ['dd.MM.yyyy hh:mm', 'dd.MM.yyyy'], 'de'); + res.reservationFor.endDate = JsonLd.toDateTime(content.field['doorsClose'].value, ['dd.MM.yyyy hh:mm', 'dd.MM.yyyy'], 'de'); res.reservationFor.url = content.field['website'].value; res.underName = JsonLd.newObject('Person'); res.underName.name = content.field['name'].value; res.reservationNumber = content.field['orderCode'].value; + res.reservedTicket.name = content.field['ticket'].value; return res; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/stringutil.cpp new/kitinerary-22.12.2/src/lib/stringutil.cpp --- old/kitinerary-22.12.1/src/lib/stringutil.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/stringutil.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -127,7 +127,8 @@ { u'ä', "ae" }, { u'ö', "oe" }, { u'ø', "oe" }, - { u'ü', "ue" } + { u'ü', "ue" }, + { u'Å', "oe" }, }; QString StringUtil::transliterate(QStringView s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitinerary-22.12.1/src/lib/uic9183/rct2ticket.cpp new/kitinerary-22.12.2/src/lib/uic9183/rct2ticket.cpp --- old/kitinerary-22.12.1/src/lib/uic9183/rct2ticket.cpp 2023-01-03 01:01:08.000000000 +0100 +++ new/kitinerary-22.12.2/src/lib/uic9183/rct2ticket.cpp 2023-01-31 20:38:12.000000000 +0100 @@ -63,9 +63,12 @@ } const auto validDt = firstDayOfValidity(); - const auto year = validDt.isValid() ? validDt.year() : contextDt.date().year(); - - return QDateTime({year, d.month(), d.day()}, t); + const auto baseDate = validDt.isValid() ? validDt : contextDt.date(); + auto dt = QDateTime({baseDate.year(), d.month(), d.day()}, t); + if (dt.isValid() && dt.date() < baseDate) { + dt = dt.addYears(1); + } + return dt; } static constexpr const char* res_patterns[] = { @@ -138,8 +141,10 @@ { "fahrschein", Rct2Ticket::Transport }, { "cestovny listok", Rct2Ticket::Transport }, { "jizdenka", Rct2Ticket::Transport }, + { "menetjegy", Rct2Ticket::Transport }, { "reservation", Rct2Ticket::Reservation }, { "reservierung", Rct2Ticket::Reservation }, + { "helyjegy", Rct2Ticket::Reservation }, { "interrail", Rct2Ticket::RailPass }, };
