diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-10-22 16:51:22 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-22 16:54:25 +0200 |
commit | a7bbd31eec03cae2ceda10443ec58e2f0e6ce804 (patch) | |
tree | 0c29e8cc91e6675a0bf598e37368a424097f6a6f /media-gfx | |
parent | app-text/poppler: Remove old (diff) | |
download | gentoo-a7bbd31eec03cae2ceda10443ec58e2f0e6ce804.tar.gz gentoo-a7bbd31eec03cae2ceda10443ec58e2f0e6ce804.tar.bz2 gentoo-a7bbd31eec03cae2ceda10443ec58e2f0e6ce804.zip |
media-gfx/inkscape: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/inkscape/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.03.0.patch | 43 | ||||
-rw-r--r-- | media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.04.0.patch | 130 | ||||
-rw-r--r-- | media-gfx/inkscape/inkscape-1.1.2-r1.ebuild | 188 |
4 files changed, 0 insertions, 362 deletions
diff --git a/media-gfx/inkscape/Manifest b/media-gfx/inkscape/Manifest index 43b58482d8b7..e27b5a4f3503 100644 --- a/media-gfx/inkscape/Manifest +++ b/media-gfx/inkscape/Manifest @@ -1,2 +1 @@ -DIST inkscape-1.1.2.tar.xz 34222832 BLAKE2B cb9bd271ff209055a6f5c2d99fd93dde29c7cb8c1b7caa7061dd1380ea914d5ccc6f5a91c5356c68bf0fd1462a3a5178e9774d0aeadcfceee9f0ea5f4beee73b SHA512 55884f34e6fcc604027e7ea60f67702a658d3838332c1f3b56ec2cb05ab44992df0651ed741d6e7e807848366b24ee7415d0908ed1143b0bfb33ddbf26ae5c16 DIST inkscape-1.2.1.tar.xz 98048464 BLAKE2B 2de10beb5a90ba81e2f212710dc78fce7c72acef5d004ab86f443b97dcf12e65fb755d7a2655520bd94561a71664dc75abd1ebf9e6bbba14c912cac487b7f18c SHA512 1f968cb20855e77ad8a1b16f8d4841e3279e139c7b1f41eccb7fbef9a7da092f3ffe7f123d032c395939a002725f68d6f1305b2a87ed68610a69a31052711521 diff --git a/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.03.0.patch b/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.03.0.patch deleted file mode 100644 index 4083c9426644..000000000000 --- a/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.03.0.patch +++ /dev/null @@ -1,43 +0,0 @@ -https://gitlab.com/inkscape/inkscape/-/commit/f7857a4fc2b916e64d9689ccc89914ad19f3ef0a.patch -https://bugs.gentoo.org/843275 - -From f7857a4fc2b916e64d9689ccc89914ad19f3ef0a Mon Sep 17 00:00:00 2001 -From: Evangelos Foutras <evangelos@foutrelis.com> -Date: Sun, 20 Mar 2022 22:41:51 -0300 -Subject: [PATCH] Ensure compatibility with Poppler 22.03 and later - -This change ensures that Inkscape will build against Poppler 22.03 after -the changes that were made to the constructor of `PDFDoc`. - -See: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4f2abd3ef - -Co-authored-by: Rafael Siejakowski <rs@rs-math.net> -(cherry picked from commit a18c57ffff313fd08bc8a44f6b6bf0b01d7e9b75) ---- a/src/extension/internal/pdfinput/pdf-input.cpp -+++ b/src/extension/internal/pdfinput/pdf-input.cpp -@@ -668,8 +668,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { - - // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from - // glib gstdio.c -- GooString *filename_goo = new GooString(uri); -- pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password -+ pdf_doc = _POPPLER_MAKE_SHARED_PDFDOC(uri); // TODO: Could ask for password - - if (!pdf_doc->isOk()) { - int error = pdf_doc->getErrorCode(); ---- a/src/extension/internal/pdfinput/poppler-transition-api.h -+++ b/src/extension/internal/pdfinput/poppler-transition-api.h -@@ -14,6 +14,12 @@ - - #include <glib/poppler-features.h> - -+#if POPPLER_CHECK_VERSION(22, 3, 0) -+#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared<PDFDoc>(std::make_unique<GooString>(uri)) -+#else -+#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared<PDFDoc>(new GooString(uri), nullptr, nullptr, nullptr) -+#endif -+ - #if POPPLER_CHECK_VERSION(0, 83, 0) - #define _POPPLER_CONST_83 const - #else -GitLab diff --git a/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.04.0.patch b/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.04.0.patch deleted file mode 100644 index 8e507d0ebcf4..000000000000 --- a/media-gfx/inkscape/files/inkscape-1.1.2-r1-poppler-22.04.0.patch +++ /dev/null @@ -1,130 +0,0 @@ -https://gitlab.com/inkscape/inkscape/-/commit/a18c57ffff313fd08bc8a44f6b6bf0b01d7e9b75.patch -https://bugs.gentoo.org/835661 - -From 08b2f3d93c08bcf1e363f4284112fd14a7cbd09c Mon Sep 17 00:00:00 2001 -From: Rafael Siejakowski <rs@rs-math.net> -Date: Mon, 4 Apr 2022 22:09:39 -0300 -Subject: [PATCH] Compatibility with Poppler 22.04 - -Replace vanilla pointers with std::shared_ptr for pointers to fonts; -eliminate manual ref-counting. -Cherry-picked from 6a7b9ec0af088baa08b92fd76b33eca26537fb35. - -Fixes https://gitlab.com/inkscape/inkscape/-/issues/3387 ---- a/src/extension/internal/pdfinput/pdf-parser.cpp -+++ b/src/extension/internal/pdfinput/pdf-parser.cpp -@@ -30,6 +30,7 @@ - #include "Gfx.h" - #include "pdf-parser.h" - #include "util/units.h" -+#include "poppler-transition-api.h" - - #include "glib/poppler-features.h" - #include "goo/gmem.h" -@@ -2158,7 +2159,7 @@ void PdfParser::opSetCharSpacing(Object args[], int /*numArgs*/) - // TODO not good that numArgs is ignored but args[] is used: - void PdfParser::opSetFont(Object args[], int /*numArgs*/) - { -- GfxFont *font = res->lookupFont(args[0].getName()); -+ auto font = res->lookupFont(args[0].getName()); - - if (!font) { - // unsetting the font (drawing no text) is better than using the -@@ -2179,7 +2180,9 @@ void PdfParser::opSetFont(Object args[], int /*numArgs*/) - fflush(stdout); - } - -+#if !POPPLER_CHECK_VERSION(22, 4, 0) - font->incRefCnt(); -+#endif - state->setFont(font, args[1].getNum()); - fontChanged = gTrue; - } -@@ -2373,7 +2376,6 @@ void PdfParser::doShowText(const GooString *s) { - #else - void PdfParser::doShowText(GooString *s) { - #endif -- GfxFont *font; - int wMode; - double riseX, riseY; - CharCode code; -@@ -2392,7 +2394,7 @@ void PdfParser::doShowText(GooString *s) { - #endif - int len, n, uLen; - -- font = state->getFont(); -+ auto font = state->getFont(); - wMode = font->getWMode(); - - builder->beginString(state); -@@ -2445,10 +2447,10 @@ void PdfParser::doShowText(GooString *s) { - //out->updateCTM(state, 1, 0, 0, 1, 0, 0); - if (false){ /*!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy, - code, u, uLen)) {*/ -- _POPPLER_CALL_ARGS(charProc, ((Gfx8BitFont *)font)->getCharProc, code); -- if ((resDict = ((Gfx8BitFont *)font)->getResources())) { -+ _POPPLER_CALL_ARGS(charProc, _POPPLER_FONTPTR_TO_GFX8(font)->getCharProc, code); -+ if (resDict = _POPPLER_FONTPTR_TO_GFX8(font)->getResources()) { - pushResources(resDict); -- } -+ } - if (charProc.isStream()) { - //parse(&charProc, gFalse); // TODO: parse into SVG font - } else { ---- a/src/extension/internal/pdfinput/poppler-transition-api.h -+++ b/src/extension/internal/pdfinput/poppler-transition-api.h -@@ -14,6 +14,12 @@ - - #include <glib/poppler-features.h> - -+#if POPPLER_CHECK_VERSION(22, 4, 0) -+#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get()) -+#else -+#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr) -+#endif -+ - #if POPPLER_CHECK_VERSION(22, 3, 0) - #define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared<PDFDoc>(std::make_unique<GooString>(uri)) - #else ---- a/src/extension/internal/pdfinput/svg-builder.cpp -+++ b/src/extension/internal/pdfinput/svg-builder.cpp -@@ -108,7 +108,6 @@ SvgBuilder::~SvgBuilder() = default; - - void SvgBuilder::_init() { - _font_style = nullptr; -- _current_font = nullptr; - _font_specification = nullptr; - _font_scaling = 1; - _need_font_update = true; -@@ -1021,11 +1020,8 @@ void SvgBuilder::updateFont(GfxState *state) { - _need_font_update = false; - updateTextMatrix(state); // Ensure that we have a text matrix built - -- if (_font_style) { -- //sp_repr_css_attr_unref(_font_style); -- } - _font_style = sp_repr_css_attr_new(); -- GfxFont *font = state->getFont(); -+ auto font = state->getFont(); - // Store original name - if (font->getName()) { - _font_specification = font->getName()->getCString(); -@@ -1171,7 +1167,6 @@ void SvgBuilder::updateFont(GfxState *state) { - sp_repr_css_set_property(_font_style, "writing-mode", "tb"); - } - -- _current_font = font; - _invalidated_style = true; - } - ---- a/src/extension/internal/pdfinput/svg-builder.h -+++ b/src/extension/internal/pdfinput/svg-builder.h -@@ -203,7 +203,6 @@ private: - std::vector<SvgGraphicsState> _state_stack; - - SPCSSAttr *_font_style; // Current font style -- GfxFont *_current_font; - const char *_font_specification; - double _font_scaling; - bool _need_font_update; -GitLab diff --git a/media-gfx/inkscape/inkscape-1.1.2-r1.ebuild b/media-gfx/inkscape/inkscape-1.1.2-r1.ebuild deleted file mode 100644 index 502e42c4c678..000000000000 --- a/media-gfx/inkscape/inkscape-1.1.2-r1.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) -PYTHON_REQ_USE="xml(+)" -MY_P="${P/_/}" -inherit cmake flag-o-matic xdg toolchain-funcs python-single-r1 - -if [[ ${PV} = 9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://gitlab.com/inkscape/inkscape.git" -else - SRC_URI="https://media.inkscape.org/dl/resources/file/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~sparc x86" -fi - -DESCRIPTION="SVG based generic vector-drawing program" -HOMEPAGE="https://inkscape.org/" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -IUSE="cdr dbus dia exif graphicsmagick imagemagick inkjar jemalloc jpeg -openmp postscript readline spell svg2 test visio wpg" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -BDEPEND=" - dev-util/glib-utils - >=dev-util/intltool-0.40 - >=sys-devel/gettext-0.17 - virtual/pkgconfig - test? ( virtual/imagemagick-tools ) -" -COMMON_DEPEND="${PYTHON_DEPS} - >=app-text/poppler-0.57.0:=[cairo] - >=dev-cpp/cairomm-1.12:0 - >=dev-cpp/glibmm-2.54.1:2 - dev-cpp/gtkmm:3.0 - >=dev-cpp/pangomm-2.40:1.4 - >=dev-libs/boehm-gc-7.1:= - dev-libs/boost:= - dev-libs/double-conversion:= - >=dev-libs/glib-2.41 - >=dev-libs/libsigc++-2.8:2 - >=dev-libs/libxml2-2.7.4 - >=dev-libs/libxslt-1.1.25 - dev-libs/gdl:3 - dev-libs/popt - media-gfx/potrace - media-libs/fontconfig - media-libs/freetype:2 - media-libs/lcms:2 - media-libs/libpng:0= - net-libs/libsoup:2.4 - sci-libs/gsl:= - x11-libs/libX11 - >=x11-libs/pango-1.37.2 - x11-libs/gtk+:3 - $(python_gen_cond_dep ' - dev-python/lxml[${PYTHON_USEDEP}] - media-gfx/scour[${PYTHON_USEDEP}] - ') - cdr? ( - app-text/libwpg:0.3 - dev-libs/librevenge - media-libs/libcdr - ) - dbus? ( dev-libs/dbus-glib ) - exif? ( media-libs/libexif ) - imagemagick? ( - !graphicsmagick? ( media-gfx/imagemagick:=[cxx] ) - graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] ) - ) - jemalloc? ( dev-libs/jemalloc ) - jpeg? ( media-libs/libjpeg-turbo:= ) - readline? ( sys-libs/readline:= ) - spell? ( app-text/gspell ) - visio? ( - app-text/libwpg:0.3 - dev-libs/librevenge - media-libs/libvisio - ) - wpg? ( - app-text/libwpg:0.3 - dev-libs/librevenge - ) -" -# These only use executables provided by these packages -# See share/extensions for more details. inkscape can tell you to -# install these so we could of course just not depend on those and rely -# on that. -RDEPEND="${COMMON_DEPEND} - $(python_gen_cond_dep ' - dev-python/numpy[${PYTHON_USEDEP}] - ') - dia? ( app-office/dia ) - postscript? ( app-text/ghostscript-gpl ) -" -DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest ) -" - -RESTRICT="!test? ( test )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/${PN}-1.1.2-r1-poppler-22.03.0.patch" # bug 835424 - "${FILESDIR}/${PN}-1.1.2-r1-poppler-22.04.0.patch" # bug 835661 / bug 843275 -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp - python-single-r1_pkg_setup -} - -src_unpack() { - if [[ ${PV} = 9999* ]]; then - git-r3_src_unpack - else - default - fi - [[ -d "${S}" ]] || mv -v "${WORKDIR}/${P}_202"?-??-* "${S}" || die -} - -src_prepare() { - cmake_src_prepare - sed -i "/install.*COPYING/d" CMakeScripts/ConfigCPack.cmake || die -} - -src_configure() { - # aliasing unsafe wrt #310393 - append-flags -fno-strict-aliasing - - local mycmakeargs=( - # -DWITH_LPETOOL # Compile with LPE Tool and experimental LPEs enabled - -DWITH_NLS=ON - -DENABLE_POPPLER=ON - -DENABLE_POPPLER_CAIRO=ON - -DWITH_PROFILING=OFF - -DWITH_INTERNAL_2GEOM=ON - -DBUILD_TESTING=$(usex test) - -DWITH_LIBCDR=$(usex cdr) - -DWITH_DBUS=$(usex dbus) - -DWITH_IMAGE_MAGICK=$(usex imagemagick $(usex !graphicsmagick)) # requires ImageMagick 6, only IM must be enabled - -DWITH_GRAPHICS_MAGICK=$(usex graphicsmagick $(usex imagemagick)) # both must be enabled to use GraphicsMagick - -DWITH_GNU_READLINE=$(usex readline) - -DWITH_GSPELL=$(usex spell) - -DWITH_JEMALLOC=$(usex jemalloc) - -DENABLE_LCMS=ON - -DWITH_OPENMP=$(usex openmp) - -DBUILD_SHARED_LIBS=ON - -DWITH_SVG2=$(usex svg2) - -DWITH_LIBVISIO=$(usex visio) - -DWITH_LIBWPG=$(usex wpg) - ) - - cmake_src_configure -} - -src_test() { - cmake_build -j1 check -} - -src_install() { - cmake_src_install - - find "${ED}" -type f -name "*.la" -delete || die - - find "${ED}"/usr/share/man -type f -maxdepth 3 -name '*.bz2' -exec bzip2 -d {} \; || die - - find "${ED}"/usr/share/man -type f -maxdepth 3 -name '*.gz' -exec gzip -d {} \; || die - - local extdir="${ED}"/usr/share/${PN}/extensions - - if [[ -e "${extdir}" ]] && [[ -n $(find "${extdir}" -mindepth 1) ]]; then - python_optimize "${ED}"/usr/share/${PN}/extensions - fi - - # Empty directory causes sandbox issues, see bug #761915 - rm -r "${ED}/usr/share/inkscape/fonts" || die "Failed to remove fonts directory." -} |