From 7d7f57b3f4f8089b74017c218748acb6c5fe19dc Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 08:18:15 +0000 Subject: Add .gitlab-ci.yml --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..ae67899c7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +image: ubuntu:17.10 + +build: + stage: build + - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng12-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev + + script: + - cmake . && make -j12 + artifacts: + paths: + - bin/inkscape + +test: + stage: test + script: + - make test -- cgit v1.2.3 From 4e45b95dbaa36107d0b561fc1634fb245d41c8a7 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 08:26:37 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae67899c7..8ae76b795 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,8 +2,8 @@ image: ubuntu:17.10 build: stage: build - - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng12-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev - + before_script: + - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng12-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev script: - cmake . && make -j12 artifacts: -- cgit v1.2.3 From 1420ed8187bd342610367e9a6f64b0dc33459281 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 08:30:35 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ae76b795..ab3154bf3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: ubuntu:17.10 +image: ubuntu:17.04 build: stage: build -- cgit v1.2.3 From ca92767aa1152fa285dc48b4bb68c636a5cc6883 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 08:34:44 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab3154bf3..79c60c9c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: ubuntu:17.04 build: stage: build before_script: - - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng12-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev + - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev script: - cmake . && make -j12 artifacts: -- cgit v1.2.3 From d0c4e0435496269b3f793ff9ec85834ca82dc824 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 09:22:04 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79c60c9c6..b29450911 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ build: before_script: - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev script: - - cmake . && make -j12 + - cmake . && make artifacts: paths: - bin/inkscape -- cgit v1.2.3 From 2a551a5e2def618186bee5da939fb2655e5d6683 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 10 Jun 2017 11:20:38 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b29450911..1ed953741 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,22 @@ build: before_script: - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev script: - - cmake . && make + - mkdir build + - cd build + - cmake .. + - make + - cd .. + - tar vfcz inkscape.tgz build/ artifacts: paths: - - bin/inkscape + - inkscape.tgz test: stage: test + before_script: + #Honestly, I have no idea what the non-installed runtime deps of the tests are + - apt update && apt -y install cmake intltool pkg-config python-dev libtool libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev google-mock libgtest-dev script: + - tar xvfz inkscape.tgz + - cd build - make test -- cgit v1.2.3 From ea3a23ad24a4e81493273607317dbee1b3cd4a0d Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 11 Jun 2017 15:59:36 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2c83a4e2..d805634be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ inkscape: - inkscape-build.tgz clang: - stage:build + stage: build script: - apt-get install -y clang-3.8 - mkdir -p clang-build @@ -39,7 +39,8 @@ clang: - scan-build -o cmake .. -DCMAKE_BUILD_TYPE=Debug - VERBOSE=1 scan-build -o ../scan make artifacts: - - scan/ + paths: + - scan/ test: stage: test @@ -57,6 +58,5 @@ pages: artifacts: paths: - public/ - only: - - master - + only: + - master -- cgit v1.2.3 From 63397aa749cff88e86caa15c063a5c2d08ea655b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 11 Jun 2017 16:08:21 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d805634be..8c9cc8c3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,10 +33,10 @@ inkscape: clang: stage: build script: - - apt-get install -y clang-3.8 + - apt-get install -y clang-3.8 clang - mkdir -p clang-build - cd clang-build - - scan-build -o cmake .. -DCMAKE_BUILD_TYPE=Debug + - scan-build cmake .. -DCMAKE_BUILD_TYPE=Debug - VERBOSE=1 scan-build -o ../scan make artifacts: paths: -- cgit v1.2.3 From 69686b58f09425898242562afbfbc3c9d07f66a5 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 11 Jun 2017 23:23:40 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c9cc8c3e..0eca72200 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,6 +57,6 @@ pages: - cp -r scan public artifacts: paths: - - public/ + - public only: - master -- cgit v1.2.3 From ddce5d04e06c9fddcded7c8e5364b8afa9fffc8c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 12 Jun 2017 01:03:15 -0400 Subject: ci: Remove tarballing of build artifacts. GitLab supports specifying directories as artifacts, so hopefully letting GitLab archive it will be a bit faster. --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34db594a4..fd61174bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,14 +25,12 @@ inkscape: - cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug - make - cd .. - - tar vfcz inkscape-build.tgz build/ artifacts: paths: - - inkscape-build.tgz + - build/ test: stage: test script: - - tar xvfz inkscape-build.tgz - cd build - make test -- cgit v1.2.3 From d1879130a4f00d90a52723c12bf4dfac11437729 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 12 Jun 2017 01:08:11 -0400 Subject: ci: Expire artifacts after a year. These are mostly needed to pass between stages, but they might perhaps be used for a bisection if necessary. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd61174bf..31d1ff7f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ inkscape: - make - cd .. artifacts: + expire_in: 1 year paths: - build/ -- cgit v1.2.3 From d724383313e79ce5f8575e2673e0bc7dfead931d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 12 Jun 2017 01:31:46 -0400 Subject: ci: Build in parallel. GitLab's shared runners are on DO 4GB instances, which should have 2 core processors. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31d1ff7f5..29d090da7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ inkscape: - mkdir -p build - cd build - cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug - - make + - make -j3 - cd .. artifacts: expire_in: 1 year -- cgit v1.2.3 From 21c9bc7b2cf2fbda2ed1dd5841eb9333bb274023 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 13 Jun 2017 00:40:46 +0200 Subject: Use markdown for README --- README | 76 --------------------------------------------------------------- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 2446e94c3..000000000 --- a/README +++ /dev/null @@ -1,76 +0,0 @@ -Inkscape. Draw Freely. -====================== - -http://www.inkscape.org/ - -Inkscape is an open source drawing tool with capabilities similar to -Illustrator, Freehand, and CorelDraw that uses the W3C standard scalable -vector graphics format (SVG). Some supported SVG features include -basic shapes, paths, text, markers, clones, alpha blending, transforms, -gradients, and grouping. In addition, Inkscape supports Creative Commons -meta-data, node-editing, layers, complex path operations, text-on-path, -and SVG XML editing. It also imports several formats like EPS, Postscript, -JPEG, PNG, BMP, and TIFF and exports PNG as well as multiple vector-based -formats. - -Inkscape's main motivations are to provide the Open Source community -with a fully W3C compliant XML, SVG, and CSS2 drawing tool emphasizing a -lightweight core with powerful features added as extensions, and the -establishment of a friendly, open, community-oriented development -processes. - - -Basic Installation -================== - -Inkscape version 0.92 and newer can be build using cmake: - - mkdir build - cd build - cmake .. - make - make install - -Other platforms such as Windows and Mac require a lot more and are considered -a developer and packager task. These instructions are kept on the Inkscape wiki. - -Required Dependencies -===================== -The Inkscape core depends on several other libraries that you will need -install, if they are not already present on your system. The most -typical libraries you may need to install are: - - * Boehm-GC - * libsigc++ - * glibmm - * gtkmm - -Please see http://wiki.inkscape.org/wiki/index.php/CompilingInkscape for the -most current dependencies, including links to the source tarballs. - - -Extension Dependencies -====================== -Inkscape also has a number of extensions for implementing various -features such as support for non-SVG file formats, etc. In theory, all -extensions are optional, however in practice you will want to have these -installed and working. Unfortunately, there is a great deal of -variability in how you can get these functioning properly. Here are -some recommendations: - -First, make sure you have Perl and Python. If you are on Windows you -should also install Cygwin. - -Next, you will need to ensure the dependencies for each extension is -present. Depending on which extensions you need, the dependencies are -going to vary, but here are some you may need to install: - - * XML::Parser - * XML::XQL - -If you install dependencies to non-standard locations, such as -installing XML::Parser someplace in your home directory, you may need to -take some extra steps to indicate where those dependencies are to be -found. For instance, with Perl modules, set the PERLLIB or PERL5LIB -variable (see `man perlrun`) - diff --git a/README.md b/README.md new file mode 100644 index 000000000..2446e94c3 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +Inkscape. Draw Freely. +====================== + +http://www.inkscape.org/ + +Inkscape is an open source drawing tool with capabilities similar to +Illustrator, Freehand, and CorelDraw that uses the W3C standard scalable +vector graphics format (SVG). Some supported SVG features include +basic shapes, paths, text, markers, clones, alpha blending, transforms, +gradients, and grouping. In addition, Inkscape supports Creative Commons +meta-data, node-editing, layers, complex path operations, text-on-path, +and SVG XML editing. It also imports several formats like EPS, Postscript, +JPEG, PNG, BMP, and TIFF and exports PNG as well as multiple vector-based +formats. + +Inkscape's main motivations are to provide the Open Source community +with a fully W3C compliant XML, SVG, and CSS2 drawing tool emphasizing a +lightweight core with powerful features added as extensions, and the +establishment of a friendly, open, community-oriented development +processes. + + +Basic Installation +================== + +Inkscape version 0.92 and newer can be build using cmake: + + mkdir build + cd build + cmake .. + make + make install + +Other platforms such as Windows and Mac require a lot more and are considered +a developer and packager task. These instructions are kept on the Inkscape wiki. + +Required Dependencies +===================== +The Inkscape core depends on several other libraries that you will need +install, if they are not already present on your system. The most +typical libraries you may need to install are: + + * Boehm-GC + * libsigc++ + * glibmm + * gtkmm + +Please see http://wiki.inkscape.org/wiki/index.php/CompilingInkscape for the +most current dependencies, including links to the source tarballs. + + +Extension Dependencies +====================== +Inkscape also has a number of extensions for implementing various +features such as support for non-SVG file formats, etc. In theory, all +extensions are optional, however in practice you will want to have these +installed and working. Unfortunately, there is a great deal of +variability in how you can get these functioning properly. Here are +some recommendations: + +First, make sure you have Perl and Python. If you are on Windows you +should also install Cygwin. + +Next, you will need to ensure the dependencies for each extension is +present. Depending on which extensions you need, the dependencies are +going to vary, but here are some you may need to install: + + * XML::Parser + * XML::XQL + +If you install dependencies to non-standard locations, such as +installing XML::Parser someplace in your home directory, you may need to +take some extra steps to indicate where those dependencies are to be +found. For instance, with Perl modules, set the PERLLIB or PERL5LIB +variable (see `man perlrun`) + -- cgit v1.2.3 From 4590fcc92196314e7925d51a73cc05561f6db06a Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 13 Jun 2017 04:43:02 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0eca72200..786e26021 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ pages: dependencies: - clang script: - - cp -r scan public + - cp -r scan/* public artifacts: paths: - public -- cgit v1.2.3 From d7799394a974e873b536d789082fb499aa1070cf Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 13 Jun 2017 13:22:10 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 786e26021..29f301bfd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,7 @@ cache: paths: - ccache/ +# Building inkscape inkscape: stage: build script: @@ -30,14 +31,19 @@ inkscape: paths: - inkscape-build.tgz +# This job is a static analysis build by clang. +# It takes MORE THAN 3 HOURS, and depending on worker sometimes 4 hours. +# Make sure the timeout of the build is big enough clang: stage: build + only: + - schedules script: - apt-get install -y clang-3.8 clang - mkdir -p clang-build - cd clang-build - scan-build cmake .. -DCMAKE_BUILD_TYPE=Debug - - VERBOSE=1 scan-build -o ../scan make + - VERBOSE=1 scan-build -o ../scan make -j2 artifacts: paths: - scan/ @@ -49,6 +55,7 @@ test: - cd build - make test +# uploads the clang scan to user.gitlab.io/inkscape/ pages: stage: deploy dependencies: -- cgit v1.2.3 From d20a28cfd6a92b0e5cd680a3eff66eff8f9b8639 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 13 Jun 2017 14:00:22 +0000 Subject: Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29f301bfd..741ac9ada 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,3 +67,4 @@ pages: - public only: - master + - schedules -- cgit v1.2.3 From e4dea66a338824037b6c35b262aa8db4004b6581 Mon Sep 17 00:00:00 2001 From: Max Gaukler Date: Sun, 11 Jun 2017 12:04:56 +0200 Subject: [Bug #1417470] Fix PDF+TeX output for text inside groups with clip/mask Fixes Bug: - https://launchpad.net/bugs/1417470 --- src/extension/internal/cairo-render-context.cpp | 35 ++++++++++++++++++++++--- src/extension/internal/cairo-render-context.h | 1 + 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 21902db7d..c513744a8 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -128,7 +128,8 @@ CairoRenderContext::CairoRenderContext(CairoRenderer *parent) : _renderer(parent), _render_mode(RENDER_MODE_NORMAL), _clip_mode(CLIP_MODE_MASK), - _omittext_state(EMPTY) + _omittext_state(EMPTY), + _omittext_missing_pages(0) { } @@ -884,6 +885,13 @@ CairoRenderContext::finish(void) if (_vector_based_target) cairo_show_page(_cr); + // PDF+TeX Output, see CairoRenderContext::_prepareRenderGraphic() + while (_omittext_missing_pages > 0) { + _omittext_missing_pages--; + g_warning("PDF+TeX output: issuing blank PDF page at end (workaround for previous error)"); + cairo_show_page(_cr); + } + cairo_destroy(_cr); cairo_surface_finish(_surface); cairo_status_t status = cairo_surface_status(_surface); @@ -1435,8 +1443,29 @@ CairoRenderContext::_prepareRenderGraphic() // Only PDFLaTeX supports importing a single page of a graphics file, // so only PDF backend gets interleaved text/graphics if (_is_omittext && _target == CAIRO_SURFACE_TYPE_PDF) { - if (_omittext_state == NEW_PAGE_ON_GRAPHIC) - cairo_show_page(_cr); + if (_omittext_state == NEW_PAGE_ON_GRAPHIC) { + if (cairo_get_group_target(_cr) != cairo_get_target(_cr)) { + // we are in the middle of a group, i. e., between cairo_push_group() and cairo_pop_group(). + // cairo_show_page() has no effect here! + // To ensure that the the generated TeX source doesn't try to include non-existing pages, + // we will later output an extra blank page. + // This is a workaround for bug #1417470. + g_warning("PDF+TeX output: Found text inside a clipped/masked group. This is not supported, the Z-order will be incorrect. Blank pages will be added to the PDF output to work around bug #1417470."); + _omittext_missing_pages++; + } else { + // no group is active, create new page + cairo_show_page(_cr); + // Output missing pages (workaround for the 'if' case above). + // With this solution, the Z-order is more wrong than necessary. + // It would be better to print the blank pages first, and then the actual current page. + // However, this isn't easily possible with cairo. + while (_omittext_missing_pages > 0) { + _omittext_missing_pages--; + g_warning("PDF+TeX output: issuing blank PDF page (workaround for previous error)"); + cairo_show_page(_cr); + } + } + } _omittext_state = GRAPHIC_ON_TOP; } } diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h index dfa6084d1..9b976fd6d 100644 --- a/src/extension/internal/cairo-render-context.h +++ b/src/extension/internal/cairo-render-context.h @@ -207,6 +207,7 @@ protected: CairoClipMode _clip_mode; CairoOmitTextPageState _omittext_state; + int _omittext_missing_pages; cairo_pattern_t *_createPatternForPaintServer(SPPaintServer const *const paintserver, Geom::OptRect const &pbox, float alpha); -- cgit v1.2.3 From aa90657ac9e33e7df2f2613c914829be95b6540c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Tue, 13 Jun 2017 23:50:24 +0200 Subject: cmake: Fix install target on Windows after 21c9bc7b2cf2fbda2ed1dd5841eb9333bb274023 --- CMakeScripts/Install.cmake | 2 +- CMakeScripts/InstallMSYS2.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeScripts/Install.cmake b/CMakeScripts/Install.cmake index 782161dc2..a188ba2c9 100644 --- a/CMakeScripts/Install.cmake +++ b/CMakeScripts/Install.cmake @@ -10,7 +10,7 @@ if(WIN32) AUTHORS COPYING NEWS - README + README.md TRANSLATORS GPL2.txt GPL3.txt diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index dcdc738a0..89643a01a 100644 --- a/CMakeScripts/InstallMSYS2.cmake +++ b/CMakeScripts/InstallMSYS2.cmake @@ -3,7 +3,7 @@ if(WIN32) AUTHORS COPYING NEWS - README + README.md TRANSLATORS GPL2.txt GPL3.txt -- cgit v1.2.3 From 69b20e6c9167e55fac6e93641428a9ae9e6aec6c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Wed, 14 Jun 2017 00:21:31 +0200 Subject: cmake: Do not force value of CMAKE_INSTALL_MESSAGE on Windows --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b22c2869..7cb82492c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ endif() # console output is slow as hell on Windows and as a result status messages of the "install" target slow down # the whole build process considerably (especially since we also copy a lot of files from the devlibs) # TODO: Is this worth to be configurable / also applicable to other platforms? -if(WIN32) +if(WIN32 AND NOT CMAKE_INSTALL_MESSAGE) set(CMAKE_INSTALL_MESSAGE "LAZY") endif() -- cgit v1.2.3 From d05e7a6896ab8e3b38527d084ac0cbd1b6751094 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Jun 2017 21:28:07 -0500 Subject: Adding links and some formatting to the README.md --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2446e94c3..7a66024f8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Inkscape. Draw Freely. ====================== -http://www.inkscape.org/ +[https://www.inkscape.org/](https://www.inkscape.org/) Inkscape is an open source drawing tool with capabilities similar to Illustrator, Freehand, and CorelDraw that uses the W3C standard scalable @@ -25,27 +25,29 @@ Basic Installation Inkscape version 0.92 and newer can be build using cmake: - mkdir build - cd build - cmake .. - make - make install +```bash +mkdir build +cd build +cmake .. +make +make install +``` Other platforms such as Windows and Mac require a lot more and are considered a developer and packager task. These instructions are kept on the Inkscape wiki. Required Dependencies ===================== + The Inkscape core depends on several other libraries that you will need install, if they are not already present on your system. The most typical libraries you may need to install are: - * Boehm-GC - * libsigc++ - * glibmm - * gtkmm + * [Boehm-GC](http://www.hboehm.info/gc/) + * [libsigc++](http://libsigc.sourceforge.net/) + * [gtkmm](https://www.gtkmm.org/) -Please see http://wiki.inkscape.org/wiki/index.php/CompilingInkscape for the +Please see [the wiki page on compiling Inkscape](http://wiki.inkscape.org/wiki/index.php/CompilingInkscape) for the most current dependencies, including links to the source tarballs. @@ -59,14 +61,14 @@ variability in how you can get these functioning properly. Here are some recommendations: First, make sure you have Perl and Python. If you are on Windows you -should also install Cygwin. +should also install [Cygwin](https://www.cygwin.com/). Next, you will need to ensure the dependencies for each extension is present. Depending on which extensions you need, the dependencies are going to vary, but here are some you may need to install: - * XML::Parser - * XML::XQL + * [XML::Parser](http://search.cpan.org/dist/XML-Parser/) + * [XML::XQL](http://search.cpan.org/dist/XML-XQL/) If you install dependencies to non-standard locations, such as installing XML::Parser someplace in your home directory, you may need to -- cgit v1.2.3 From 3e92220eec85eaf8048353489e4dbc1383a3e6ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 13 Jun 2017 21:32:04 -0500 Subject: Add a build status badge too --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7a66024f8..94ececc10 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ lightweight core with powerful features added as extensions, and the establishment of a friendly, open, community-oriented development processes. +[![build status](https://gitlab.com/inkscape/inkscape/badges/master/build.svg)](https://gitlab.com/inkscape/inkscape/commits/master) Basic Installation ================== -- cgit v1.2.3 From 6ef8265ccdc27bcfd78bed3357580a24cdd98d37 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 14 Jun 2017 11:23:35 +0200 Subject: Use Glib::ustring to simplify title string code. --- src/widgets/desktop-widget.cpp | 94 ++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 55 deletions(-) diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index d8c27f5b7..ce4c5936c 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -66,6 +66,7 @@ #include #include #include +#include "inkscape-version.h" using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; @@ -761,69 +762,52 @@ SPDesktopWidget::updateTitle(gchar const* uri) Gtk::Window *window = static_cast(g_object_get_data(G_OBJECT(this), "window")); if (window) { - gchar const *fname = uri; - GString *name = g_string_new (""); - - gchar const *grayscalename = N_("grayscale"); - gchar const *grayscalenamecomma = N_(", grayscale"); - gchar const *printcolorsname = N_("print colors preview"); - gchar const *printcolorsnamecomma = N_(", print colors preview"); - gchar const *outlinename = N_("outline"); - gchar const *nofiltersname = N_("no filters"); - gchar const *colormodename = NULL; - gchar const *colormodenamecomma = NULL; - gchar const *rendermodename = NULL; - gchar const *modifiedname = ""; + SPDocument *doc = this->desktop->doc(); + + std::string Name; if (doc->isModifiedSinceSave()) { - modifiedname = "*"; + Name += "*"; } - if (this->desktop->getColorMode() == Inkscape::COLORMODE_GRAYSCALE) { - colormodename = grayscalename; - colormodenamecomma = grayscalenamecomma; - } else if (this->desktop->getColorMode() == Inkscape::COLORMODE_PRINT_COLORS_PREVIEW) { - colormodename = printcolorsname; - colormodenamecomma = printcolorsnamecomma; + Name += uri; + + if (desktop->number > 1) { + Name += ": "; + Name += std::to_string(desktop->number); } - if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) { - rendermodename = outlinename; - } else if (this->desktop->getMode() == Inkscape::RENDERMODE_NO_FILTERS) { - rendermodename = nofiltersname; + Name += " ("; + + if (desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) { + Name += N_("outline"); + } else if (desktop->getMode() == Inkscape::RENDERMODE_NO_FILTERS) { + Name += N_("no filters"); } - - - if (this->desktop->number > 1) { - if (rendermodename) { - if (colormodenamecomma) { - g_string_printf (name, _("%s%s: %d (%s%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(rendermodename), _(colormodenamecomma)); - } else { - g_string_printf (name, _("%s%s: %d (%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(rendermodename)); - } - } else { - if (colormodename) { - g_string_printf (name, _("%s%s: %d (%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(colormodename)); - } else { - g_string_printf (name, _("%s%s: %d - Inkscape"), modifiedname, fname, this->desktop->number); - } - } + + if (desktop->getColorMode() != Inkscape::COLORMODE_NORMAL && + desktop->getMode() != Inkscape::RENDERMODE_NORMAL) { + Name += ", "; + } + + if (desktop->getColorMode() == Inkscape::COLORMODE_GRAYSCALE) { + Name += N_("grayscale"); + } else if (desktop->getColorMode() == Inkscape::COLORMODE_PRINT_COLORS_PREVIEW) { + Name += N_("print colors preview"); + } + + if (*Name.rbegin() == '(') { // Can not use C++11 .back() or .pop_back() with ustring! + Name.erase(Name.size() - 2); } else { - if (rendermodename) { - if (colormodenamecomma) { - g_string_printf (name, _("%s%s (%s%s) - Inkscape"), modifiedname, fname, _(rendermodename), _(colormodenamecomma)); - } else { - g_string_printf (name, _("%s%s (%s) - Inkscape"), modifiedname, fname, _(rendermodename)); - } - } else { - if (colormodename) { - g_string_printf (name, _("%s%s (%s) - Inkscape"), modifiedname, fname, _(colormodename)); - } else { - g_string_printf (name, _("%s%s - Inkscape"), modifiedname, fname); - } - } + Name += ")"; } - window->set_title (name->str); - g_string_free (name, TRUE); + + Name += " - Inkscape"; + + // Name += " ("; + // Name += Inkscape::version_string; + // Name += ")"; + + window->set_title (Name); } } -- cgit v1.2.3 From d9e1e8b3669fa24fcf2a567ad91e263f13733ba2 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 14 Jun 2017 12:37:36 +0200 Subject: Remove mention of Perl (Perl dependancy at run-time removed between 0.48 and 0.91). --- README.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 94ececc10..d4f2ba4bf 100644 --- a/README.md +++ b/README.md @@ -55,25 +55,17 @@ most current dependencies, including links to the source tarballs. Extension Dependencies ====================== Inkscape also has a number of extensions for implementing various -features such as support for non-SVG file formats, etc. In theory, all +features such as support for non-SVG file formats. In theory, all extensions are optional, however in practice you will want to have these installed and working. Unfortunately, there is a great deal of variability in how you can get these functioning properly. Here are some recommendations: -First, make sure you have Perl and Python. If you are on Windows you +First, make sure you have Python. If you are on Windows you should also install [Cygwin](https://www.cygwin.com/). -Next, you will need to ensure the dependencies for each extension is -present. Depending on which extensions you need, the dependencies are -going to vary, but here are some you may need to install: - - * [XML::Parser](http://search.cpan.org/dist/XML-Parser/) - * [XML::XQL](http://search.cpan.org/dist/XML-XQL/) - -If you install dependencies to non-standard locations, such as -installing XML::Parser someplace in your home directory, you may need to -take some extra steps to indicate where those dependencies are to be -found. For instance, with Perl modules, set the PERLLIB or PERL5LIB -variable (see `man perlrun`) +Second, if an extension does not work, check the file +`extensions-errors.log` located on Linux at `~/.config/inkscape` and on +Windows at `%userprofile%\Application Data\Inkscape\`. Any missing +programs will be listed. -- cgit v1.2.3 From e07479cf0a1bf8262a5c1b682774f054d32448ea Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 14 Jun 2017 13:14:55 +0200 Subject: Prevent crash due to clones. --- src/ui/dialog/styledialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp index b1bcddd45..5a1ebc532 100644 --- a/src/ui/dialog/styledialog.cpp +++ b/src/ui/dialog/styledialog.cpp @@ -407,6 +407,7 @@ void StyleDialog::_readStyleElement() // Add as children, objects that match selector. for (auto& obj: objVec) { + if (obj->cloned) continue; // Skip cloned objects (they also don't have 'id'). Gtk::TreeModel::Row childrow = *(_store->append(row->children())); childrow[_mColumns._colSelector] = "#" + Glib::ustring(obj->getId()); childrow[_mColumns._colIsSelector] = false; -- cgit v1.2.3 From 73fcfc9f34395148fceda89b892886291b509cb2 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 14 Jun 2017 14:33:02 +0200 Subject: Update dialog when object is added, deleted, or changed. --- src/ui/dialog/styledialog.cpp | 137 ++++++++++++++++++++++++++++++++++++++++++ src/ui/dialog/styledialog.h | 12 ++++ 2 files changed, 149 insertions(+) diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp index 5a1ebc532..8679659ce 100644 --- a/src/ui/dialog/styledialog.cpp +++ b/src/ui/dialog/styledialog.cpp @@ -45,6 +45,7 @@ namespace Inkscape { namespace UI { namespace Dialog { +// Keeps a watch on style element class StyleDialog::NodeObserver : public Inkscape::XML::NodeObserver { public: NodeObserver(StyleDialog* styleDialog) : @@ -78,6 +79,93 @@ StyleDialog::NodeObserver::notifyContentChanged( } +// Keeps a watch for new/removed/changed nodes +// (Must update objects that selectors match.) +class StyleDialog::NodeWatcher : public Inkscape::XML::NodeObserver { +public: + NodeWatcher(StyleDialog* styleDialog, Inkscape::XML::Node *repr) : + _styleDialog(styleDialog), + _repr(repr) + { +#ifdef DEBUG_STYLEDIALOG + std::cout << "StyleDialog::NodeWatcher: Constructor" << std::endl; +#endif + }; + + virtual void notifyChildAdded( Inkscape::XML::Node &/*node*/, + Inkscape::XML::Node &child, + Inkscape::XML::Node */*prev*/ ) + { + if ( _styleDialog && _repr ) { + _styleDialog->_nodeAdded( child ); + } + } + + virtual void notifyChildRemoved( Inkscape::XML::Node &/*node*/, + Inkscape::XML::Node &child, + Inkscape::XML::Node */*prev*/ ) + { + if ( _styleDialog && _repr ) { + _styleDialog->_nodeRemoved( child ); + } + } + + virtual void notifyAttributeChanged( Inkscape::XML::Node &node, + GQuark qname, + Util::ptr_shared /*old_value*/, + Util::ptr_shared /*new_value*/ ) { + if ( _styleDialog && _repr ) { + + // For the moment only care about attributes that are directly used in selectors. + const gchar * cname = g_quark_to_string (qname ); + Glib::ustring name; + if (cname) { + name = cname; + } + + if ( name == "id" || name == "class" ) { + _styleDialog->_nodeChanged( node ); + } + } + } + + StyleDialog * _styleDialog; + Inkscape::XML::Node * _repr; // Need to track if document changes. +}; + +void +StyleDialog::_nodeAdded( Inkscape::XML::Node &node ) { + + StyleDialog::NodeWatcher *w = new StyleDialog::NodeWatcher (this, &node); + node.addObserver (*w); + _nodeWatchers.push_back(w); + + _readStyleElement(); + _selectRow(); +} + +void +StyleDialog::_nodeRemoved( Inkscape::XML::Node &repr ) { + + for (auto it = _nodeWatchers.begin(); it != _nodeWatchers.end(); ++it) { + if ( (*it)->_repr == &repr ) { + (*it)->_repr->removeObserver (**it); + _nodeWatchers.erase( it ); + break; + } + } + + _readStyleElement(); + _selectRow(); +} + +void +StyleDialog::_nodeChanged( Inkscape::XML::Node &object ) { + + _readStyleElement(); + _selectRow(); +} + StyleDialog::TreeStore::TreeStore() { } @@ -248,6 +336,9 @@ StyleDialog::StyleDialog() : _selection_changed_connection = getDesktop()->getSelection()->connectChanged( sigc::hide(sigc::mem_fun(this, &StyleDialog::_handleSelectionChanged))); + // Add watchers + _updateWatchers(); + // Load tree _readStyleElement(); _selectRow(); @@ -447,6 +538,49 @@ void StyleDialog::_writeStyleElement() } +void StyleDialog::_addWatcherRecursive(Inkscape::XML::Node *node) { + +#ifdef DEBUG_STYLEDIALOG + std::cout << "StyleDialog::_addWatcherRecursive()" << std::endl; +#endif + + StyleDialog::NodeWatcher *w = new StyleDialog::NodeWatcher(this, node); + node->addObserver(*w); + _nodeWatchers.push_back(w); + + for (unsigned i = 0; i < node->childCount(); ++i) { + _addWatcherRecursive(node->nthChild(i)); + } +} + +/** + * @brief StyleDialog::_updateWatchers + * Update the watchers on objects. + */ +void StyleDialog::_updateWatchers() +{ + _updating = true; + + // Remove old document watchers + while (!_nodeWatchers.empty()) { + StyleDialog::NodeWatcher *w = _nodeWatchers.back(); + w->_repr->removeObserver(*w); + _nodeWatchers.pop_back(); + delete w; + } + + // Recursively add new watchers + Inkscape::XML::Node *root = SP_ACTIVE_DOCUMENT->getReprRoot(); + _addWatcherRecursive(root); + +#ifdef DEBUG_STYLEDIALOG + std::cout << "StyleDialog::_updateWatchers(): " << _nodeWatchers.size() << std::endl; +#endif + + _updating = false; +} + + /** * @brief StyleDialog::_addToSelector * @param row @@ -712,6 +846,7 @@ void StyleDialog::_selectObjects(int eventX, int eventY) Gtk::TreeModel::Row row = *iter; Gtk::TreeModel::Children children = row.children(); std::vector objVec = row[_mColumns._colObj]; + for (unsigned i = 0; i < objVec.size(); ++i) { SPObject *obj = objVec[i]; getDesktop()->selection->add(obj); @@ -1047,6 +1182,7 @@ StyleDialog::_handleDocumentReplaced(SPDesktop *desktop, SPDocument * /* documen _selection_changed_connection = desktop->getSelection()->connectChanged( sigc::hide(sigc::mem_fun(this, &StyleDialog::_handleSelectionChanged))); + _updateWatchers(); _readStyleElement(); _selectRow(); } @@ -1077,6 +1213,7 @@ StyleDialog::_handleDesktopChanged(SPDesktop* desktop) { _document_replaced_connection = desktop->connectDocumentReplaced( sigc::mem_fun(this, &StyleDialog::_handleDocumentReplaced)); + _updateWatchers(); _readStyleElement(); _selectRow(); } diff --git a/src/ui/dialog/styledialog.h b/src/ui/dialog/styledialog.h index e84489e66..dbbc1e480 100644 --- a/src/ui/dialog/styledialog.h +++ b/src/ui/dialog/styledialog.h @@ -58,6 +58,14 @@ private: // Monitor