public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pdf2djvu] rawhide: Rebuild for poppler 26.08.0
@ 2026-08-07 17:54 Marek Kasik
  0 siblings, 0 replies; only message in thread
From: Marek Kasik @ 2026-08-07 17:54 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/pdf2djvu
Branch : rawhide
Commit : ea366f9eb9c7e0d13ac0da8cdb116d973e9968c2
Author : Marek Kasik <mkasik@redhat.com>
Date   : 2026-08-07T17:05:07+02:00
Stats  : +150/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/pdf2djvu/c/ea366f9eb9c7e0d13ac0da8cdb116d973e9968c2?branch=rawhide

Log:
Rebuild for poppler 26.08.0

---
diff --git a/pdf2djvu-poppler-26.08.0.patch b/pdf2djvu-poppler-26.08.0.patch
new file mode 100644
index 0000000..e0399bb
--- /dev/null
+++ b/pdf2djvu-poppler-26.08.0.patch
@@ -0,0 +1,149 @@
+--- pdf2djvu-0.9.19/pdf-backend.cc
++++ pdf2djvu-0.9.19/pdf-backend.cc
+@@ -169,7 +169,11 @@ static void cmyk_to_rgb(const std::array
+   pdf::gfx::RgbColor rgb_cc;
+   for (int i = 0; i < 4; i++)
+     cmyk_cc.c[i] = pdf::gfx::double_as_color_component(cmyk[i]);
++#if POPPLER_VERSION_INTEGER >= 260600
++  cmyk_space.getRGB(cmyk_cc, &rgb_cc);
++#else
+   cmyk_space.getRGB(&cmyk_cc, &rgb_cc);
++#endif
+   rgb[0] = pdf::gfx::color_component_as_double(rgb_cc.r);
+   rgb[1] = pdf::gfx::color_component_as_double(rgb_cc.g);
+   rgb[2] = pdf::gfx::color_component_as_double(rgb_cc.b);
+@@ -181,7 +185,11 @@ static bool annotations_callback(pdf::an
+   std::string border_color;
+   if (annotation->getType() != pdf::ant::Annotation::typeLink)
+     return true;
++#if POPPLER_VERSION_INTEGER >= 260600
++  const pdf::ant::Color *color = annotation->getColor();
++#else
+   pdf::ant::Color *color = annotation->getColor();
++#endif
+   if (color == nullptr)
+   {
+     border_colors.push_back("");
+@@ -237,6 +245,13 @@ void pdf::Document::get_page_size(int n,
+ 
+ const std::string pdf::Document::get_xmp()
+ {
++#if POPPLER_VERSION_INTEGER >= 260800
++  std::optional<std::string> mstring;
++  mstring = this->readMetadata();
++  if (!mstring.has_value())
++    return "";
++  const char *cstring = mstring.value().c_str();
++#else
+   std::unique_ptr<const pdf::String> mstring;
+ #if POPPLER_VERSION_INTEGER >= 211000
+   mstring = this->readMetadata();
+@@ -246,6 +261,8 @@ const std::string pdf::Document::get_xmp
+   if (mstring.get() == nullptr)
+     return "";
+   const char *cstring = pdf::get_c_string(mstring.get());
++#endif
++
+   if (strncmp(cstring, "<?xpacket begin=", 16) != 0)
+     return "";
+   cstring += 16;
+@@ -413,7 +430,11 @@ pdf::Metadata::Metadata(pdf::Document &d
+     char tzs = 0; int tzh = 0, tzm = 0;
+     if (!pdf::dict_lookup(info_dict, field.first, &object)->isString())
+       continue;
++#if POPPLER_VERSION_INTEGER >= 260400
++    const char *input = object.getString().c_str();
++#else
+     const char *input = pdf::get_c_string(object.getString());
++#endif
+     if (input[0] == 'D' && input[1] == ':')
+       input += 2;
+     int year = scan_date_digits(input, 4);
+@@ -476,7 +497,11 @@ void pdf::set_color(splash::Color &resul
+ bool pdf::Environment::antialias = false;
+ 
+ pdf::Renderer::Renderer(pdf::splash::Color &paper_color, bool monochrome)
++#if POPPLER_VERSION_INTEGER >= 260200
++: pdf::splash::OutputDevice(monochrome ? splashModeMono1 : splashModeRGB8, 4, paper_color),
++#else
+ : pdf::splash::OutputDevice(monochrome ? splashModeMono1 : splashModeRGB8, 4, false, paper_color),
++#endif
+   catalog(NULL)
+ {
+   this->setFontAntialias(pdf::Environment::antialias);
+@@ -505,7 +530,11 @@ bool pdf::get_glyph(splash::Splash *spla
+   if (font == nullptr)
+     return false;
+   splash::ClipResult clip_result;
++#if POPPLER_VERSION_INTEGER >= 260200
++  if (!font->getGlyph(code, 0, 0, bitmap, static_cast<int>(x), static_cast<int>(y), splash->getClip(), &clip_result))
++#else
+   if (!font->getGlyph(code, 0, 0, bitmap, static_cast<int>(x), static_cast<int>(y), (SplashClip *) &splash->getClip(), &clip_result))
++#endif
+     return false;
+   return (clip_result != splashClipAllOutside);
+ }
+--- pdf2djvu-0.9.19/pdf-backend.hh
++++ pdf2djvu-0.9.19/pdf-backend.hh
+@@ -63,7 +63,11 @@ namespace pdf
+     typedef ::Splash Splash;
+     typedef ::SplashColor Color;
+     typedef ::SplashFont Font;
++#if POPPLER_VERSION_INTEGER >= 260500
++    typedef double Coord;
++#else
+     typedef ::SplashCoord Coord;
++#endif
+     typedef ::SplashPath Path;
+     typedef ::SplashGlyphBitmap GlyphBitmap;
+     typedef ::SplashBitmap Bitmap;
+--- pdf2djvu-0.9.19/pdf-document-map.cc
++++ pdf2djvu-0.9.19/pdf-document-map.cc
+@@ -41,9 +41,18 @@ pdf::DocumentMap::DocumentMap(const std:
+             std::unique_ptr<pdf::Document> doc(new pdf::Document(path));
+             pdf::Catalog *catalog = doc->getCatalog();
+             for (int i = 0; i < doc->getNumPages(); i++) {
++#if POPPLER_VERSION_INTEGER >= 260700
++                std::string s;
++#else
+                 pdf::String s;
++#endif
+                 if (catalog->indexToLabel(i, &s)) {
++#if POPPLER_VERSION_INTEGER >= 260700
++                    pdf::String pdf_string(s);
++                    std::string str = pdf::string_as_utf8(&pdf_string);
++#else
+                     std::string str = pdf::string_as_utf8(&s);
++#endif
+                     this->labels.push_back(str);
+                 }
+                 else
+--- pdf2djvu-0.9.19/pdf-dpi.cc
++++ pdf2djvu-0.9.19/pdf-dpi.cc
+@@ -91,7 +91,11 @@ public:
+ 
+ void DpiGuessDevice::process_image(pdf::gfx::State *state, int width, int height)
+ {
++#if POPPLER_VERSION_INTEGER >= 260200
++  const std::array<double, 6> &ctm = state->getCTM();
++#else
+   const double *ctm = state->getCTM();
++#endif
+   double h_dpi = 72.0 * width / hypot(ctm[0], ctm[1]);
+   double v_dpi = 72.0 * height / hypot(ctm[2], ctm[3]);
+   this->min_ = std::min(this->min_, std::min(h_dpi, v_dpi));
+--- pdf2djvu-0.9.19/pdf-unicode.cc
++++ pdf2djvu-0.9.19/pdf-unicode.cc
+@@ -105,7 +105,12 @@ std::string pdf::string_as_utf8(const pd
+ 
+ std::string pdf::string_as_utf8(pdf::Object &object)
+ {
++#if POPPLER_VERSION_INTEGER >= 260700
++    pdf::String pdf_string(object.getString());
++    return pdf::string_as_utf8(&pdf_string);
++#else
+     return pdf::string_as_utf8(object.getString());
++#endif
+ }
+ 
+ /* class pdf::FullNFKC

diff --git a/pdf2djvu.spec b/pdf2djvu.spec
index b775e3c..a7e8ec5 100644
--- a/pdf2djvu.spec
+++ b/pdf2djvu.spec
@@ -7,6 +7,7 @@ URL:            http://jwilk.net/software/pdf2djvu
 Source0:        https://github.com/jwilk/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
 Patch0:         pdf2djvu-poppler-version.patch
 Patch1:         pdf2djvu-poppler-26.01.0.patch
+Patch2:         pdf2djvu-poppler-26.08.0.patch
 
 ExcludeArch:    %{ix86}
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 17:54 [rpms/pdf2djvu] rawhide: Rebuild for poppler 26.08.0 Marek Kasik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox