cups-filters: Fix build with clang16/c++17
PATCH 1/2 cups-filters: Fix build with clang16/c++17
Signed-off-by Khem Raj <[email protected]>
--- ...se-instead-of-throw-from-c-17-onward.patch | 36 +++++++++++++++++++ .../cups/cups-filters_1.28.11.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch
meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 104fba23b1c0c67c92777b3165c6dca99558a656 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 6 Feb 2023 18:13:52 -0800 +Subject: [PATCH] use noexcept(false) instead of throw() from c++17 onwards + +C++17 removed dynamic exception specifications [1] +they had been deprecated since C++11, replace +throw(whatever) with noexcept(false). + +[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html + +Upstream-Status: Submitted [https://github.com/OpenPrinting/cups-filters/pull/505] +Signed-off-by: Khem Raj <[email protected]> +--- + filter/pdftoraster.cxx | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/filter/pdftoraster.cxx b/filter/pdftoraster.cxx +index e8af184fb..e91e22459 100755 +--- a/filter/pdftoraster.cxx ++++ b/filter/pdftoraster.cxx +@@ -2148,7 +2148,11 @@ int main(int argc, char *argv[]) { + /* For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW + * should be used as a guard, otherwise use traditional definition */ + #ifndef _GLIBCXX_THROW ++#if __cplusplus < 201703L + #define _GLIBCXX_THROW throw ++#else ++#define _GLIBCXX_THROW(x) noexcept(false) ++#endif + #endif + + void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc) +-- +2.39.1 +
meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb +1 -0
@@ -1,3 +1,4 @@ include cups-filters.inc +SRC_URI += "file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch" SRC_URI[sha256sum] = "472418f1a1e12c9ad91b01caa020eb668626776d85de9da488be38e6663102ca"
Signature · 1 line
2.39.1
PATCH 2/2 cups-filters: Upgrade to 1.28.17 release
- Switch to github release artifact downloads
- Add missing dependency on libexif
- Merge .inc into .bb as there are no other users of it
Signed-off-by Khem Raj <[email protected]>
---
meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb | 4 ----
.../cups/{cups-filters.inc => cups-filters_1.28.17.bb} | 8 +++++---
2 files changed, 5 insertions(+), 7 deletions(-)
delete mode 100644 meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb
rename meta-oe/recipes-printing/cups/{cups-filters.inc => cups-filters_1.28.17.bb} (87%)meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb deleted +0 -4
@@ -1,4 +0,0 @@ -include cups-filters.inc - -SRC_URI += "file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch" -SRC_URI[sha256sum] = "472418f1a1e12c9ad91b01caa020eb668626776d85de9da488be38e6663102ca"
meta-oe/recipes-printing/cups/cups-filters_1.28.17.bb renamed from meta-oe/recipes-printing/cups/cups-filters.inc +5 -3
@@ -6,12 +6,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d77679ce6a2cc4d873d4ebbf2a401e6" SECTION = "console/utils" -DEPENDS = "cups glib-2.0 glib-2.0-native dbus dbus-glib lcms ghostscript poppler qpdf libpng" +DEPENDS = "cups glib-2.0 glib-2.0-native dbus dbus-glib lcms ghostscript poppler qpdf libpng libexif" DEPENDS:class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-native gettext-native libpng-native" -SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz" +SRC_URI = "${GITHUB_BASE_URI}/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch" +SRC_URI[sha256sum] = "270a3752a960368aa99d431fb5d34f4039b2ac943c576d840612d1d8185c9bb9" -inherit autotools-brokensep gettext pkgconfig +inherit autotools-brokensep gettext pkgconfig github-releases EXTRA_OECONF += " --enable-ghostscript --disable-ldap \ --with-pdftops=hybrid --enable-imagefilters \
Signature · 1 line
2.39.1