Merge pull request #124333 from jljusten/inkscape-1.1

inkscape: 1.0.2 -> 1.1
This commit is contained in:
Jan Tojnar 2021-05-26 13:21:51 +02:00 committed by GitHub
commit f3d551c62f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 26 deletions

View file

@ -3,22 +3,20 @@
, boost , boost
, cairo , cairo
, cmake , cmake
, double-conversion
, fetchurl , fetchurl
, fetchpatch
, gettext , gettext
, gdl
, ghostscript , ghostscript
, glib , glib
, glib-networking , glib-networking
, glibmm , glibmm
, gsl , gsl
, gspell
, gtk-mac-integration , gtk-mac-integration
, gtkmm3 , gtkmm3
, gtkspell3
, gdk-pixbuf , gdk-pixbuf
, imagemagick , imagemagick
, lcms , lcms
, lib2geom
, libcdr , libcdr
, libexif , libexif
, libpng , libpng
@ -47,16 +45,17 @@ let
(ps: with ps; [ (ps: with ps; [
numpy numpy
lxml lxml
pillow
scour scour
]); ]);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "inkscape"; pname = "inkscape";
version = "1.0.2"; version = "1.1";
src = fetchurl { src = fetchurl {
url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.xz"; url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.xz";
sha256 = "sha256-2j4jBRGgjL8h6GcQ0WFFhZT+qHhn6RV7Z+0BoE6ieYo="; sha256 = "sha256-cebozj/fcC9Z28SidmZeuYLreCKwKbvb7O0t9DAXleY=";
}; };
# Inkscape hits the ARGMAX when linking on macOS. It appears to be # Inkscape hits the ARGMAX when linking on macOS. It appears to be
@ -72,13 +71,6 @@ stdenv.mkDerivation rec {
# e.g., those from the "Effects" menu. # e.g., those from the "Effects" menu.
python3 = "${python3Env}/bin/python"; python3 = "${python3Env}/bin/python";
}) })
# Fix build with glib 2.68
# https://gitlab.com/inkscape/inkscape/-/merge_requests/2790
(fetchpatch {
url = "https://gitlab.com/inkscape/inkscape/-/commit/eb24388f1730918edd9565d9e5d09340ec0b3b08.patch";
sha256 = "d2FHRWcOzi0Vsr6t0MuLu3rWpvhFKuuvoXd4/NKUSJI=";
})
]; ];
postPatch = '' postPatch = ''
@ -91,6 +83,10 @@ stdenv.mkDerivation rec {
--replace "call('ps2pdf'" "call('${ghostscript}/bin/ps2pdf'" --replace "call('ps2pdf'" "call('${ghostscript}/bin/ps2pdf'"
patchShebangs share/templates patchShebangs share/templates
patchShebangs man/fix-roff-punct patchShebangs man/fix-roff-punct
# double-conversion is a dependency of 2geom
substituteInPlace CMakeScripts/DefineDependsandFlags.cmake \
--replace 'find_package(DoubleConversion REQUIRED)' ""
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
@ -109,8 +105,6 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
boehmgc boehmgc
boost boost
double-conversion
gdl
gettext gettext
glib glib
glib-networking glib-networking
@ -119,6 +113,7 @@ stdenv.mkDerivation rec {
gtkmm3 gtkmm3
imagemagick imagemagick
lcms lcms
lib2geom
libcdr libcdr
libexif libexif
libpng libpng
@ -138,7 +133,7 @@ stdenv.mkDerivation rec {
python3Env python3Env
zlib zlib
] ++ lib.optionals (!stdenv.isDarwin) [ ] ++ lib.optionals (!stdenv.isDarwin) [
gtkspell3 gspell
] ++ lib.optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
cairo cairo
gtk-mac-integration gtk-mac-integration

View file

@ -1,15 +1,17 @@
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index bc6c0ed845..181467834d 100644
--- a/src/extension/implementation/script.cpp --- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp
@@ -77,10 +77,10 @@ const std::map<std::string, Script::inte @@ -82,10 +82,10 @@ const std::map<std::string, Script::interpreter_t> Script::interpreterTab = {
{ "python", {"python-interpreter", {"pythonw" }}}, { "python", {"python-interpreter", {"pythonw" }}},
#elif defined __APPLE__ #elif defined __APPLE__
{ "perl", {"perl-interpreter", {"perl" }}}, { "perl", {"perl-interpreter", {"perl" }}},
- { "python", {"python-interpreter", {"python3" }}}, - { "python", {"python-interpreter", {"python3" }}},
+ { "python", {"python-interpreter", {"@python3@" }}}, + { "python", {"python-interpreter", {"@python3@" }}},
#else #else
{ "perl", {"perl-interpreter", {"perl" }}}, { "perl", {"perl-interpreter", {"perl" }}},
- { "python", {"python-interpreter", {"python3", "python" }}}, - { "python", {"python-interpreter", {"python3", "python" }}},
+ { "python", {"python-interpreter", {"@python3@" }}}, + { "python", {"python-interpreter", {"@python3@" }}},
#endif #endif
{ "python2", {"python2-interpreter", {"python2", "python" }}}, { "python2", {"python2-interpreter", {"python2", "python" }}},
{ "ruby", {"ruby-interpreter", {"ruby" }}}, { "ruby", {"ruby-interpreter", {"ruby" }}},

View file

@ -0,0 +1,60 @@
{ stdenv
, fetchFromGitLab
, cmake
, ninja
, pkg-config
, boost
, glib
, gsl
, cairo
, double-conversion
, gtest
, lib
}:
stdenv.mkDerivation rec {
pname = "lib2geom";
version = "1.1";
outputs = [ "out" "dev" ];
src = fetchFromGitLab {
owner = "inkscape";
repo = "lib2geom";
rev = "refs/tags/${version}";
sha256 = "sha256-u9pbpwVzAXzrM2/tQnd1B6Jo9Fzg6UZBr9AtUsNMfQ0=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
boost
glib
gsl
cairo
double-conversion
];
checkInputs = [
gtest
];
cmakeFlags = [
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
"-D2GEOM_BUILD_SHARED=ON"
];
doCheck = true;
meta = with lib; {
description = "Easy to use 2D geometry library in C++";
homepage = "https://gitlab.com/inkscape/lib2geom";
license = [ licenses.lgpl21Only licenses.mpl11 ];
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}

View file

@ -15637,6 +15637,8 @@ in
leptonica = callPackage ../development/libraries/leptonica { }; leptonica = callPackage ../development/libraries/leptonica { };
lib2geom = callPackage ../development/libraries/lib2geom { };
lib3ds = callPackage ../development/libraries/lib3ds { }; lib3ds = callPackage ../development/libraries/lib3ds { };
lib3mf = callPackage ../development/libraries/lib3mf { }; lib3mf = callPackage ../development/libraries/lib3mf { };