labplot: rebuild against orcus/ixion 0.20

This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2025-02-14 11:14:57 +01:00
parent bae2a8415c
commit a23b618846
2 changed files with 189 additions and 4 deletions

View File

@@ -0,0 +1,182 @@
--- a/cmake/FindOrcus.cmake
+++ b/cmake/FindOrcus.cmake
@@ -14,28 +14,28 @@
set (Orcus_FOUND TRUE)
else ()
find_package(PkgConfig QUIET)
- pkg_search_module(PC_ORCUS liborcus liborcus-0.19 liborcus-0.18 liborcus-0.17 liborcus-0.16 QUIET)
- pkg_search_module(PC_IXION libixion libixion-0.19 libixion-0.18 libixion-0.17 libixion-0.16 QUIET)
+ pkg_search_module(PC_ORCUS liborcus liborcus-0.20 liborcus-0.19 liborcus-0.18 liborcus-0.17 liborcus-0.16 QUIET)
+ pkg_search_module(PC_IXION libixion libixion-0.20 libixion-0.19 libixion-0.18 libixion-0.17 libixion-0.16 QUIET)
find_library (Orcus_LIBRARY
- NAMES orcus orcus-0.19 orcus-0.18 orcus-0.17 orcus-0.16
+ NAMES orcus orcus-0.20 orcus-0.19 orcus-0.18 orcus-0.17 orcus-0.16
HINTS ${PC_ORCUS_LIBRARY_DIRS}
PATH_SUFFIXES orcus
)
find_library (Orcus_parser_LIBRARY
- NAMES orcus-parser orcus-parser-0.19 orcus-parser-0.18 orcus-parser-0.17 orcus-parser-0.16
+ NAMES orcus-parser orcus-parser-0.20 orcus-parser-0.19 orcus-parser-0.18 orcus-parser-0.17 orcus-parser-0.16
HINTS ${PC_ORCUS_LIBRARY_DIRS}
PATH_SUFFIXES orcus
)
find_library (Orcus_spreadsheet_LIBRARY
- NAMES orcus-spreadsheet-model orcus-spreadsheet-model-0.19 orcus-spreadsheet-model-0.18 orcus-spreadsheet-model-0.17 orcus-spreadsheet-model-0.16
+ NAMES orcus-spreadsheet-model orcus-spreadsheet-model-0.20 orcus-spreadsheet-model-0.19 orcus-spreadsheet-model-0.18 orcus-spreadsheet-model-0.17 orcus-spreadsheet-model-0.16
HINTS ${PC_ORCUS_LIBRARY_DIRS}
PATH_SUFFIXES orcus
)
set(Orcus_LIBRARIES ${Orcus_LIBRARY} ${Orcus_parser_LIBRARY} ${Orcus_spreadsheet_LIBRARY})
find_library (Ixion_LIBRARY
- NAMES ixion ixion-0.19 ixion-0.18 ixion-0.17 ixion-0.16
+ NAMES ixion ixion-0.20 ixion-0.19 ixion-0.18 ixion-0.17 ixion-0.16
HINTS ${PC_IXION_LIBRARY_DIRS}
PATH_SUFFIXES orcus
)
--- a/src/backend/datasources/filters/OdsFilter.cpp
+++ b/src/backend/datasources/filters/OdsFilter.cpp
@@ -295,13 +295,13 @@
auto type = model.get_celltype(pos);
switch (type) {
- case ixion::celltype_t::string:
+ case ixion::cell_t::string:
columnModes[col] = AbstractColumn::ColumnMode::Text;
break;
- case ixion::celltype_t::numeric: // numeric values are always double (can't detect if integer)
+ case ixion::cell_t::numeric: // numeric values are always double (can't detect if integer)
// default: Double
break;
- case ixion::celltype_t::formula: {
+ case ixion::cell_t::formula: {
auto formula = model.get_formula_result(pos);
switch (formula.get_type()) { // conside formula type
case ixion::formula_result::result_type::value:
@@ -320,9 +320,9 @@
}
break;
}
- case ixion::celltype_t::boolean:
- case ixion::celltype_t::empty:
- case ixion::celltype_t::unknown: // default: Double
+ case ixion::cell_t::boolean:
+ case ixion::cell_t::empty:
+ case ixion::cell_t::unknown: // default: Double
break;
}
}
@@ -335,17 +335,17 @@
auto type = model.get_celltype(pos);
switch (type) {
- case ixion::celltype_t::string: {
+ case ixion::cell_t::string: {
auto value = model.get_string_value(pos);
vectorNames << QString::fromStdString(std::string(value));
break;
}
- case ixion::celltype_t::numeric: {
+ case ixion::cell_t::numeric: {
double value = model.get_numeric_value(pos);
vectorNames << QLocale().toString(value);
break;
}
- case ixion::celltype_t::formula: {
+ case ixion::cell_t::formula: {
auto formula = model.get_formula_result(pos);
switch (formula.get_type()) {
case ixion::formula_result::result_type::value: {
@@ -367,9 +367,9 @@
// TODO
break;
}
- case ixion::celltype_t::empty:
- case ixion::celltype_t::unknown:
- case ixion::celltype_t::boolean:
+ case ixion::cell_t::empty:
+ case ixion::cell_t::unknown:
+ case ixion::cell_t::boolean:
vectorNames << AbstractFileFilter::convertFromNumberToColumn(ranges.first.column + startColumn - 1 + col);
;
}
@@ -398,7 +398,7 @@
auto type = model.get_celltype(pos);
switch (type) {
- case ixion::celltype_t::numeric: {
+ case ixion::cell_t::numeric: {
double value = model.get_numeric_value(pos);
// column mode may be non-numeric
if (columnModes.at(col) == AbstractColumn::ColumnMode::Double)
@@ -407,7 +407,7 @@
(*static_cast<QVector<QString>*>(dataContainer[col]))[row] = QLocale().toString(value);
break;
}
- case ixion::celltype_t::formula: {
+ case ixion::cell_t::formula: {
// read formula result. We can't handle formulas yet (?)
auto formula = model.get_formula_result(pos);
switch (formula.get_type()) {
@@ -438,7 +438,7 @@
}
break;
}
- case ixion::celltype_t::string: {
+ case ixion::cell_t::string: {
// column mode may be numeric
if (columnModes.at(col) == AbstractColumn::ColumnMode::Double)
(*static_cast<QVector<double>*>(dataContainer[col]))[row] = model.get_numeric_value(pos);
@@ -446,10 +446,10 @@
(*static_cast<QVector<QString>*>(dataContainer[col]))[row] = QString::fromStdString(std::string(model.get_string_value(pos)));
break;
}
- case ixion::celltype_t::empty: // nothing to do
+ case ixion::cell_t::empty: // nothing to do
break;
- case ixion::celltype_t::unknown:
- case ixion::celltype_t::boolean:
+ case ixion::cell_t::unknown:
+ case ixion::cell_t::boolean:
DEBUG(Q_FUNC_INFO << ", cell type unknown or boolean not supported yet.")
}
}
@@ -502,19 +502,19 @@
auto type = model.get_celltype(pos);
switch (type) {
- case ixion::celltype_t::string: {
+ case ixion::cell_t::string: {
auto value = model.get_string_value(pos);
DEBUG(Q_FUNC_INFO << " " << value)
line << QString::fromStdString(std::string(value));
break;
}
- case ixion::celltype_t::numeric: {
+ case ixion::cell_t::numeric: {
double value = model.get_numeric_value(pos);
DEBUG(Q_FUNC_INFO << " " << value)
line << QLocale().toString(value);
break;
}
- case ixion::celltype_t::formula: {
+ case ixion::cell_t::formula: {
// read formula result. We can't handle formulas yet (?)
auto formula = model.get_formula_result(pos);
switch (formula.get_type()) {
@@ -534,11 +534,11 @@
}
break;
}
- case ixion::celltype_t::empty:
+ case ixion::cell_t::empty:
line << QString();
break;
- case ixion::celltype_t::unknown:
- case ixion::celltype_t::boolean:
+ case ixion::cell_t::unknown:
+ case ixion::cell_t::boolean:
line << QString();
DEBUG(Q_FUNC_INFO << ", cell type unknown or boolean not implemented yet.")
break;

View File

@@ -4,7 +4,7 @@ _realname=labplot
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.11.1
pkgrel=1
pkgrel=2
pkgdesc="FREE, open source and cross-platform Data Visualization and Analysis software accessible to everyone. (mingw-w64)"
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
@@ -69,13 +69,15 @@ source=("https://download.kde.org/stable/labplot/labplot-${pkgver}.tar.xz"
"002-fix-build-with-kuserfeedback.patch"
"003-fix-build-with-qxlsx.patch"
"004-fix-find-poppler-qt6.patch"
"005-fix-find-qtadvanceddocking.patch")
"005-fix-find-qtadvanceddocking.patch"
"006-fix-build-with-ixion-0.20.patch")
sha256sums=('53aa6ac8df39324d99463e60d88de25346b3928da5bb0f210b0563489046679d'
'998d361b026aa5db9153c73ca930a1843098d8ba4b7b357b1508a6361bb3aa51'
'345dbe2802d2acf146ced5030314ad59dcae7c415bafd48698a3503999751974'
'1525d4be3aa7c9136e4487b51b56bb0cd81cb64e0ebe54942183d3685d1ff664'
'9d390317042c80740e0fd3b7274eb4ed8e1c50a34eafe51844f8e72351d7f117'
'a9ad822875ead147e7e2193393b5fe3100dcd8e50b0e89017eadc2b78c8ba5e3')
'a9ad822875ead147e7e2193393b5fe3100dcd8e50b0e89017eadc2b78c8ba5e3'
'a82756ed1a76570c9176aef3e3195e83aaef48b1697c942248c5d7f593d1dad7')
apply_patch_with_msg() {
for _patch in "$@"
@@ -93,7 +95,8 @@ prepare() {
002-fix-build-with-kuserfeedback.patch \
003-fix-build-with-qxlsx.patch \
004-fix-find-poppler-qt6.patch \
005-fix-find-qtadvanceddocking.patch
005-fix-find-qtadvanceddocking.patch \
006-fix-build-with-ixion-0.20.patch
# remove conflict with breeze package
rm data/color-schemes/BreezeDark.colors