diff options
author | Tim Biermann <tbier@posteo.de> | 2022-10-02 09:20:36 +0200 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2022-10-02 09:20:36 +0200 |
commit | bd8915f7bf1d5d0969852ce9d0076d2d030efbbf (patch) | |
tree | 93967c5040964eff2b082c800ecaac80478c68b1 /inkscape | |
parent | 428feecf00cfe7c4f2aba7c0618f445d199bd121 (diff) | |
parent | a8a30a8138b4ce1dbc9b630027562956736bda75 (diff) | |
download | contrib-bd8915f7bf1d5d0969852ce9d0076d2d030efbbf.tar.gz contrib-bd8915f7bf1d5d0969852ce9d0076d2d030efbbf.tar.xz |
Merge remote-tracking branch 'origin/3.6' into 3.7
Diffstat (limited to 'inkscape')
-rw-r--r-- | inkscape/.footprint | 2 | ||||
-rw-r--r-- | inkscape/.signature | 9 | ||||
-rw-r--r-- | inkscape/Pkgfile | 22 | ||||
-rw-r--r-- | inkscape/inkscape-1.2.1-poppler-22.09.0.patch | 83 |
4 files changed, 103 insertions, 13 deletions
diff --git a/inkscape/.footprint b/inkscape/.footprint index 82e02bab8..dfc23a21e 100644 --- a/inkscape/.footprint +++ b/inkscape/.footprint @@ -108,9 +108,9 @@ drwxr-xr-x root/root usr/lib/cmake/2Geom/ -rw-r--r-- root/root usr/lib/cmake/2Geom/2GeomTargets.cmake drwxr-xr-x root/root usr/lib/inkscape/ -rwxr-xr-x root/root usr/lib/inkscape/libinkscape_base.so +-rwxr-xr-x root/root usr/lib/inkscape/libpoppler.so.124 lrwxrwxrwx root/root usr/lib/lib2geom.so -> lib2geom.so.1.1.0 -rwxr-xr-x root/root usr/lib/lib2geom.so.1.1.0 --rwxr-xr-x root/root usr/lib/libpoppler.so.121 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/2geom.pc drwxr-xr-x root/root usr/share/ diff --git a/inkscape/.signature b/inkscape/.signature index c3e3bf246..81e8cd483 100644 --- a/inkscape/.signature +++ b/inkscape/.signature @@ -1,6 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF31l/IJeoXoc9x2fVnTG1ovQbgvcKD+qTEcBUyQhytndr94Rzl58J6rqzEyPZk844yqMPvQaWSQIOHzLwjp4upgg= -SHA256 (Pkgfile) = b8d77aab76218a2acfdcae76fa8e5b1ecaa82ef7eabed6cee268bd453924e0ba -SHA256 (.footprint) = dccafd2579f20a13e284e5f4fd93b6dce94b020bef7121a278c0547b1d699408 +RWSagIOpLGJF3wU2L/4bYLCn3HOPpd2EQvv07FCalkev/0iaoSZjy/xAv1ocfvLp8COUxWXCruu5lD1rn0A4/CDO50Auyvzn+gY= +SHA256 (Pkgfile) = 67e291813b6553ae19da01c292b4c4ee0b0e0cd63300674410fdd3554225cc63 +SHA256 (.footprint) = 1c24d3b5ba0c986a1b9f7dc00485cb6f433fe75ad2332bf4e12001e4ef454b6e SHA256 (inkscape-1.2_2022-05-15_dc2aedaf03.tar.xz) = 8d9b31142554945664edfefe2d6b55910a5099765f7176a71107c34f1dcde6ad -SHA256 (poppler-22.05.0.tar.xz) = a969ced458e050d6202367bd7427054e2bd19bae39e8f969910d3b9151abf958 +SHA256 (poppler-22.09.0.tar.xz) = d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb30d5852a41e2e +SHA256 (inkscape-1.2.1-poppler-22.09.0.patch) = 5e847d11c1c42db717ad39bc03708e3b855f0e0a99ee4ac8d97f5bfe4af8985c diff --git a/inkscape/Pkgfile b/inkscape/Pkgfile index c36ed2231..6212772f3 100644 --- a/inkscape/Pkgfile +++ b/inkscape/Pkgfile @@ -7,11 +7,12 @@ name=inkscape _name=inkscape-INKSCAPE version=1.2.1 _version=1.2_2022-05-15_dc2aedaf03 -_pversion=22.05.0 -_psoversion=121 -release=1 +_pversion=22.09.0 +_psoversion=124 +release=2 source=(https://media.inkscape.org/dl/resources/file/inkscape-$_version.tar.xz - https://poppler.freedesktop.org/poppler-$_pversion.tar.xz) + https://poppler.freedesktop.org/poppler-$_pversion.tar.xz + inkscape-1.2.1-poppler-22.09.0.patch) poppler() { cmake -S poppler-$_pversion -B build-poppler -G Ninja \ @@ -33,18 +34,23 @@ poppler() { cmake --build build-poppler DESTDIR=$SRC/poppler cmake --install build-poppler - install -D -t $PKG/usr/lib $SRC/poppler/usr/lib/libpoppler.so.$_psoversion + install -D -t $PKG/usr/lib/inkscape $SRC/poppler/usr/lib/libpoppler.so.$_psoversion export CXXFLAGS+=" -I$SRC/poppler/usr/include -I$SRC/poppler/usr/include/poppler" export PKG_CONFIG_PATH="$SRC/poppler/usr/lib/pkgconfig:$PKG_CONFIG_PATH" } build() { - [ ! -e "/usr/lib/libpoppler.so.$_psoversion" ] && poppler + #[ ! -e "/usr/lib/inkscape/libpoppler.so.$_psoversion" ] && + poppler + + # https://gitlab.com/inkscape/inkscape/-/merge_requests/4719 + patch -d $name-$_version -p1 -i $SRC/inkscape-1.2.1-poppler-22.09.0.patch # https://gitlab.gnome.org/GNOME/glib/-/issues/2331 - CFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66' - CXXFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66' + CFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66 -L/usr/lib/inkscape' + CXXFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66 -L/usr/lib/inkscape' + export LDFLAGS+=" -Wl,-rpath=/usr/lib/inkscape" cmake -S $name-$_version -B build -G Ninja \ -D CMAKE_INSTALL_PREFIX=/usr \ diff --git a/inkscape/inkscape-1.2.1-poppler-22.09.0.patch b/inkscape/inkscape-1.2.1-poppler-22.09.0.patch new file mode 100644 index 000000000..168845814 --- /dev/null +++ b/inkscape/inkscape-1.2.1-poppler-22.09.0.patch @@ -0,0 +1,83 @@ +From fb00794923d19cfbb2ca4adca3ae8971553a06be Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 2 Sep 2022 06:21:28 +0100 +Subject: [PATCH] Fix build with Poppler 22.09.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With Poppler 22.09.0, inkscape fails to build with: +``` +/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:394:23: error: no matching function for call to ‘GfxState::getLineDash(double**, int*, double*)’ + 394 | state->getLineDash(&dash_pattern, &dash_length, &dash_start); + | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from /var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:44: +/usr/include/poppler/GfxState.h:1506:32: note: candidate: ‘const std::vector<double>& GfxState::getLineDash(double*)’ + 1506 | const std::vector<double> &getLineDash(double *start) + | ^~~~~~~~~~~ +[...] +/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/pdf-parser.cpp:700:21: error: no matching function for call to ‘GfxState::setLineDash(double*&, int&, double)’ + 700 | state->setLineDash(dash, length, args[1].getNum()); + | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``` + +Poppler changed the getLineDash interface: +``` +- void getLineDash(double **dash, int *length, double *start) ++ const std::vector<double> &getLineDash(double *start) +``` + +... and the setLineDash interface: +```` +- void setLineDash(double *dash, int length, double start); ++ void setLineDash(std::vector<double> &&dash, double start); +``` + +Signed-off-by: Sam James <sam@gentoo.org> +--- + src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++++ + src/extension/internal/pdfinput/svg-builder.cpp | 9 ++++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp +index cca1e84096..80d64c9b86 100644 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -697,7 +697,11 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/) + _POPPLER_FREE(obj); + } + } ++#if POPPLER_CHECK_VERSION(22, 9, 0) ++ state->setLineDash(std::vector<double> (dash, dash + length), args[1].getNum()); ++#else + state->setLineDash(dash, length, args[1].getNum()); ++#endif + builder->updateStyle(state); + } + +diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp +index 12f71dd921..9fc56fe63c 100644 +--- a/src/extension/internal/pdfinput/svg-builder.cpp ++++ b/src/extension/internal/pdfinput/svg-builder.cpp +@@ -389,10 +389,17 @@ void SvgBuilder::_setStrokeStyle(SPCSSAttr *css, GfxState *state) { + sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str()); + + // Line dash +- double *dash_pattern; + int dash_length; + double dash_start; ++#if POPPLER_CHECK_VERSION(22, 9, 0) ++ const double *dash_pattern; ++ const std::vector<double> &dash = state->getLineDash(&dash_start); ++ dash_pattern = dash.data(); ++ dash_length = dash.size(); ++#else ++ double *dash_pattern; + state->getLineDash(&dash_pattern, &dash_length, &dash_start); ++#endif + if ( dash_length > 0 ) { + Inkscape::CSSOStringStream os_array; + for ( int i = 0 ; i < dash_length ; i++ ) { +-- +GitLab + |