Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@ libKF5WidgetsAddons.so.5 kwidgetsaddons-5.26.0_1
libsearpc.so.1 libsearpc-3.0.7_1
libseafile.so.0 seafile-libclient-7.0.10_2
libpodofo.so.0.9.7 libpodofo0.9.7-0.9.7_1
libpodofo.so.2 libpodofo-0.10.3_1
libpodofo.so.3 libpodofo-1.0.3_1
libIrcUtil.so.3 libcommuni-3.4.0_1
libIrcCore.so.3 libcommuni-3.4.0_1
libIrcModel.so.3 libcommuni-3.4.0_1
Expand Down
17 changes: 17 additions & 0 deletions srcpkgs/calibre/patches/disable-piper-env.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- a/setup/build_environment.py
+++ b/setup/build_environment.py
@@ -220,10 +220,10 @@ elif ismacos:
uchardet_inc_dirs = pkgconfig_include_dirs('uchardet', '', '/usr/include/uchardet')
uchardet_lib_dirs = pkgconfig_lib_dirs('uchardet', '', '/usr/lib')
uchardet_libs = pkgconfig_libs('uchardet', '', '')
- piper_inc_dirs = pkgconfig_include_dirs('espeak-ng', '', '/usr/include') + pkgconfig_include_dirs(
- 'libonnxruntime', '', '/usr/include/onnxruntime')
- piper_lib_dirs = pkgconfig_lib_dirs('espeak-ng', '', '/usr/lib') + pkgconfig_lib_dirs('libonnxruntime', '', '/usr/lib')
- piper_libs = pkgconfig_libs('espeak-ng', '', 'espeak-ng') + pkgconfig_libs('libonnxruntime', '', 'onnxruntime')
+ # Piper disabled - requires onnxruntime which is not packaged
+ piper_inc_dirs = []
+ piper_lib_dirs = []
+ piper_libs = []
for x in ('libavcodec', 'libavformat', 'libavdevice', 'libavfilter', 'libavutil', 'libpostproc', 'libswresample', 'libswscale'):
for inc in pkgconfig_include_dirs(x, '', '/usr/include'):
if inc and inc not in ffmpeg_inc_dirs:
17 changes: 17 additions & 0 deletions srcpkgs/calibre/patches/disable-piper.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- a/setup/extensions.json
+++ b/setup/extensions.json
@@ -135,14 +135,6 @@
"needs_c++": "17"
},
- {
- "name": "piper",
- "sources": "calibre/utils/tts/piper.cpp",
- "needs_c++": "17",
- "libraries": "!piper_libs",
- "lib_dirs": "!piper_lib_dirs",
- "inc_dirs": "!piper_inc_dirs"
- },
{
"name": "html_as_json",
"sources": "calibre/srv/html_as_json.cpp",
"needs_c++": "11"
530 changes: 530 additions & 0 deletions srcpkgs/calibre/patches/podofo-1.0.patch

Large diffs are not rendered by default.

106 changes: 0 additions & 106 deletions srcpkgs/calibre/patches/py313-re-scanner.patch

This file was deleted.

11 changes: 0 additions & 11 deletions srcpkgs/calibre/patches/qt610.patch

This file was deleted.

20 changes: 10 additions & 10 deletions srcpkgs/calibre/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'calibre'
pkgname=calibre
version=8.7.0
revision=4
version=9.6.0
revision=2

Check failure on line 4 in srcpkgs/calibre/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

revision should be set to 1 on update
build_helper=python3
pycompile_dirs="/usr/lib/calibre/"
hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow
Expand All @@ -11,13 +11,13 @@
mathjax liberation-fonts-ttf python3-zeroconf xdg-utils rapydscript-ng
python3-PyQt-builder python3-Markdown python3-xxhash"
makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel
libpodofo-devel libwmf-devel libxkbcommon-devel poppler-cpp-devel
freetype-devel uchardet-devel openssl-devel icu-devel libusb-devel
sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel
python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network
python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel
qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel
ffmpeg6-devel"
libpodofo-devel libwmf-devel libxkbcommon-devel poppler-cpp-devel

Check failure on line 14 in srcpkgs/calibre/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

please indent with tabs
freetype-devel uchardet-devel openssl-devel icu-devel libusb-devel
sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel
python3-pyqt6-gui python3-pyqt6-svg python3-pyqt6-widgets python3-pyqt6-network
python3-pyqt6-printsupport python3-pyqt6-webengine python3-pyqt6-webchannel
qt6-base-private-devel python3-pyqt6-bindings python3-pyqt6-webengine-devel
ffmpeg6-devel"
depends="desktop-file-utils optipng poppler python3-BeautifulSoup4
qt6-imageformats python3-Pygments python3-pycryptodome python3-xxhash
python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw
Expand All @@ -39,7 +39,7 @@
homepage="https://calibre-ebook.com"
changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.txt"
distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
checksum=2cfe587e3773d8607fe8bbefbcd77b5cfb816124cac89e491353deb8f2fa9324
checksum=c4d740d50a0c2e38ac33af10e815366cbd2d0846a06dafca3008eaafe2f09bea
python_version=3
lib32disabled=yes
nocross="python3 setup.py gui"
Expand Down
159 changes: 159 additions & 0 deletions srcpkgs/horizon/patches/port-to-podofo-1.0.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
Port to PoDoFo 1.0.x API changes.

diff --git a/src/export_pdf/canvas_pdf.cpp b/src/export_pdf/canvas_pdf.cpp
index 413b07fe..d3fbe6a0 100644
--- a/src/export_pdf/canvas_pdf.cpp
+++ b/src/export_pdf/canvas_pdf.cpp
@@ -62,7 +62,7 @@ void CanvasPDF::img_line(const Coordi &p0, const Coordi &p1, const uint64_t widt
rp1 = transform.transform(p1);
}
auto color = get_pdf_layer_color(layer);
- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b));
+ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b));
painter.DrawLine(to_pt(rp0.x), to_pt(rp0.y), to_pt(rp1.x), to_pt(rp1.y));
}

@@ -138,7 +138,7 @@ void CanvasPDF::img_draw_text(const Coordf &p, float size, const std::string &rt
Coordi p0(xshift, yshift);
Coordi pt = tf.transform(p0);

- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients(cos(fangle), sin(fangle), -sin(fangle),
+ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix(cos(fangle), sin(fangle), -sin(fangle),
cos(fangle), to_pt(pt.x), to_pt(pt.y)));
painter.DrawText(line.c_str(), 0, to_pt(size) / -2);
painter.Restore();
@@ -154,8 +154,8 @@ void CanvasPDF::img_polygon(const Polygon &ipoly, bool tr)
return;

auto color = get_pdf_layer_color(ipoly.layer);
- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(color.r, color.g, color.b));
- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b));
+ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b));
+ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b));
painter.GraphicsState.SetLineWidth(to_pt(settings.min_line_width));
if (ipoly.usage == nullptr) { // regular patch
draw_polygon(ipoly, tr);
@@ -195,8 +195,8 @@ void CanvasPDF::img_hole(const Hole &hole)
return;

auto color = get_pdf_layer_color(PDFExportSettings::HOLES_LAYER);
- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(color.r, color.g, color.b));
- painter.GraphicsState.SetStrokeColor(PoDoFo::PdfColor(color.r, color.g, color.b));
+ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b));
+ painter.GraphicsState.SetStrokingColor(PoDoFo::PdfColor(color.r, color.g, color.b));
painter.GraphicsState.SetLineWidth(to_pt(settings.min_line_width));

auto hole2 = hole;
diff --git a/src/export_pdf/export_pdf.cpp b/src/export_pdf/export_pdf.cpp
index 71142919..ab2e8272 100644
--- a/src/export_pdf/export_pdf.cpp
+++ b/src/export_pdf/export_pdf.cpp
@@ -88,17 +88,16 @@ public:
auto &page = document.GetPages().GetPageAt(number);
auto &annot = page.GetAnnotations().CreateAnnot<PoDoFo::PdfAnnotationLink>(rect);
annot.SetBorderStyle(0, 0, 0);
- annot.SetDestination(first_pages.at(path));
+ annot.SetDestination(*first_pages.at(path));
}
for (auto &[url, number, rect] : datasheet_annotations) {
auto &page = document.GetPages().GetPageAt(number);
auto &annot = page.GetAnnotations().CreateAnnot<PoDoFo::PdfAnnotationLink>(rect);
annot.SetBorderStyle(0, 0, 0);

- auto action = std::make_shared<PoDoFo::PdfAction>(document, PoDoFo::PdfActionType::URI);
-
+ auto action = document.CreateAction<PoDoFo::PdfActionURI>();
action->SetURI(PoDoFo::PdfString(url));
- annot.SetAction(action);
+ annot.SetAction(*action);
}

document.Save(filename);
@@ -109,7 +108,7 @@ private:
PoDoFo::PdfPainter painter;
PoDoFo::PdfFont &font;
PoDoFo::PdfOutlines *outlines = nullptr;
- std::map<UUIDVec, std::shared_ptr<PoDoFo::PdfDestination>> first_pages;
+ std::map<UUIDVec, std::unique_ptr<PoDoFo::PdfDestination>> first_pages;
std::vector<std::tuple<UUIDVec, unsigned int, PoDoFo::Rect>> annotations;
std::vector<std::tuple<std::string, unsigned int, PoDoFo::Rect>> datasheet_annotations;

@@ -138,7 +137,7 @@ private:
painter.SetCanvas(page);

painter.GraphicsState.SetLineCapStyle(PoDoFo::PdfLineCapStyle::Round);
- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(0, 0, 0));
+ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(0, 0, 0));
painter.TextState.SetFont(font, 10);
painter.TextState.SetRenderingMode(PoDoFo::PdfTextRenderingMode::Invisible);

@@ -167,9 +166,10 @@ private:
}
}

- auto dest = std::make_shared<PoDoFo::PdfDestination>(page);
+ auto dest = document.CreateDestination();
+ dest->SetDestination(page);
if (first) {
- first_pages.emplace(path, dest);
+ first_pages.emplace(path, std::move(dest));
first = false;
}

@@ -216,15 +216,16 @@ private:

PoDoFo::PdfOutlineItem *sheet_node;
if (parent) {
- sheet_node = parent->CreateChild(PoDoFo::PdfString(sheet->name), dest);
+ sheet_node = &parent->CreateChild(PoDoFo::PdfString(sheet->name));
+ sheet_node->SetDestination(*dest);
}
else {
- sheet_node = outlines->CreateRoot(PoDoFo::PdfString(sheet->name));
- sheet_node->SetDestination(dest);
+ sheet_node = &outlines->CreateRoot(PoDoFo::PdfString(sheet->name));
+ sheet_node->SetDestination(*dest);
}

for (auto sym : sheet->get_block_symbols_sorted()) {
- auto sym_node = sheet_node->CreateChild(PoDoFo::PdfString(sym->block_instance->refdes), dest);
+ auto sym_node = &sheet_node->CreateChild(PoDoFo::PdfString(sym->block_instance->refdes));
sym_node->SetTextFormat(PoDoFo::PdfOutlineFormat::Italic);
export_schematic(*sym->schematic, uuid_vec_append(path, sym->block_instance->uuid), prv, sym_node);
}
diff --git a/src/export_pdf/export_pdf_board.cpp b/src/export_pdf/export_pdf_board.cpp
index 717c3524..b30e23ae 100644
--- a/src/export_pdf/export_pdf_board.cpp
+++ b/src/export_pdf/export_pdf_board.cpp
@@ -39,15 +39,15 @@ void export_pdf(const class Board &brd, const class PDFExportSettings &settings,
auto &page = document.GetPages().CreatePage(PoDoFo::Rect(0, 0, to_pt(width), to_pt(height)));
painter.SetCanvas(page);
painter.GraphicsState.SetLineCapStyle(PoDoFo::PdfLineCapStyle::Round);
- painter.GraphicsState.SetFillColor(PoDoFo::PdfColor(0, 0, 0));
+ painter.GraphicsState.SetNonStrokingColor(PoDoFo::PdfColor(0, 0, 0));
painter.TextState.SetFont(font, 10);
painter.TextState.SetRenderingMode(PoDoFo::PdfTextRenderingMode::Invisible);
if (settings.mirror) {
- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients(
+ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix(
-1, 0, 0, 1, to_pt(bbox.second.x + border_width), to_pt(-bbox.first.y + border_width)));
}
else {
- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients(
+ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix(
1, 0, 0, 1, to_pt(-bbox.first.x + border_width), to_pt(-bbox.first.y + border_width)));
}
ca.layer_filter = true;
diff --git a/src/export_pdf/export_pdf_util.cpp b/src/export_pdf/export_pdf_util.cpp
index b3c4834f..b1ab924a 100644
--- a/src/export_pdf/export_pdf_util.cpp
+++ b/src/export_pdf/export_pdf_util.cpp
@@ -13,7 +13,7 @@ void render_picture(PoDoFo::PdfDocument &doc, PoDoFo::PdfPainter &painter, const

painter.Save();
const auto fangle = pl.get_angle_rad();
- painter.GraphicsState.SetCurrentMatrix(PoDoFo::Matrix::FromCoefficients(
+ painter.GraphicsState.ConcatenateTransformationMatrix(PoDoFo::Matrix(
cos(fangle), sin(fangle), -sin(fangle), cos(fangle), to_pt((double)pl.shift.x), to_pt((double)pl.shift.y)));
const int64_t w = pic.data->width * pic.px_size;
const int64_t h = pic.data->height * pic.px_size;
8 changes: 4 additions & 4 deletions srcpkgs/horizon/template
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Template file for 'horizon'
pkgname=horizon
version=2.7.1
revision=1
version=2.7.2
revision=2

Check failure on line 4 in srcpkgs/horizon/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

revision should be set to 1 on update
build_style=meson
hostmakedepends="pkg-config cmake glib-devel"
makedepends="cairomm-devel librsvg-devel sqlite-devel
glm libgit2-devel libcurl-devel occt-devel cppzmq libpodofo0.9.7-devel libzip-devel
glm libgit2-devel libcurl-devel occt-devel cppzmq libpodofo-devel libzip-devel
gtkmm-devel libepoxy-devel libsodium-devel libarchive-devel libspnav-devel"
short_desc="Free EDA package"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-3.0-only"
homepage="https://horizon-eda.org/"
changelog="https://raw.githubusercontent.com/horizon-eda/horizon/master/CHANGELOG.md"
distfiles="https://github.com/horizon-eda/horizon/archive/v${version}.tar.gz"
checksum=499102738195691d55570d743ece77422c7fa4cc946f6cb76df956d9ff6ae42f
checksum=6b605f7e4c46d894a64997e0f60eba937e7d68d908b4d715cd2dde3364bd79a2

pre_configure() {
# this needs to be set when cross compiling, otherwise meson complains
Expand Down
Loading
Loading