From 9baeb63482c91e7ee1ff5d5be86deea1c14fab34 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 12 Nov 2018 01:01:52 +0100 Subject: lib2geom: init at 1.0.0 --- pkgs/development/libraries/lib2geom/default.nix | 72 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/libraries/lib2geom/default.nix (limited to 'pkgs') diff --git a/pkgs/development/libraries/lib2geom/default.nix b/pkgs/development/libraries/lib2geom/default.nix new file mode 100644 index 00000000000..ce494e4b68a --- /dev/null +++ b/pkgs/development/libraries/lib2geom/default.nix @@ -0,0 +1,72 @@ +{ stdenv +, fetchFromGitLab +, fetchpatch +, cmake +, ninja +, pkg-config +, boost +, glib +, gsl +, cairo +, double-conversion +, gtest +}: + +stdenv.mkDerivation rec { + pname = "lib2geom-unstable"; + version = "2020-03-12"; + + outputs = [ "out" "dev" ]; + + src = fetchFromGitLab { + owner = "inkscape"; + repo = "lib2geom"; + rev = "226eb8c60f2af639d74a0229c0ba90e649e6451d"; + sha256 = "BSuqasBfig6HiKY/xtJm7CjbSaV8cW45ip59iEO5Es4="; + }; + + patches = [ + # Re-enable assertions for tests to work + # https://gitlab.com/inkscape/lib2geom/issues/5 + # https://gitlab.com/inkscape/lib2geom/merge_requests/17 + (fetchpatch { + url = "https://gitlab.com/inkscape/lib2geom/commit/4aa78f52232682b353eb15c219171e466987bac7.patch"; + sha256 = "XsX8SPft0RwDemJujc8lierBe4s3iw8YkW4CSlY5LsY="; + }) + ]; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + ]; + + buildInputs = [ + boost + glib + gsl + cairo + double-conversion + ]; + + checkInputs = [ + gtest + ]; + + cmakeBuildType = "RelWithDebugInfo"; # needed to keep assertions for tests working + + cmakeFlags = [ + "-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests + "-DBUILD_SHARED_LIBS=ON" + ]; + + doCheck = true; + + meta = with stdenv.lib; { + description = "Easy to use 2D geometry library in C++"; + homepage = "https://gitlab.com/inkscape/lib2geom"; + license = [ licenses.lgpl21 licenses.mpl11 ]; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e4f1a3d2558..dbf22e2decc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15635,6 +15635,8 @@ in leptonica = callPackage ../development/libraries/leptonica { }; + lib2geom = callPackage ../development/libraries/lib2geom { }; + lib3ds = callPackage ../development/libraries/lib3ds { }; lib3mf = callPackage ../development/libraries/lib3mf { }; -- cgit 1.4.1 From ff8752a60361623bdb01f3534f12d503cc854c8e Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 25 May 2021 00:28:26 -0700 Subject: lib2geom: update 2020-03-12 -> 1.1 Reworks: * lgpl21 => lgpl21Only (jtojnar) * stdenv.lib => lib (jtojnar) * Use 1.1 tagged version rather than sha1 from inkscape 1.1 (jtojnar) * BUILD_SHARED_LIBS => 2GEOM_BUILD_SHARED (jtojnar) * Drop cmakeBuildType (jtojnar) --- pkgs/development/libraries/lib2geom/default.nix | 28 +++++++------------------ 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/libraries/lib2geom/default.nix b/pkgs/development/libraries/lib2geom/default.nix index ce494e4b68a..755ed6b814e 100644 --- a/pkgs/development/libraries/lib2geom/default.nix +++ b/pkgs/development/libraries/lib2geom/default.nix @@ -1,6 +1,5 @@ { stdenv , fetchFromGitLab -, fetchpatch , cmake , ninja , pkg-config @@ -10,31 +9,22 @@ , cairo , double-conversion , gtest +, lib }: stdenv.mkDerivation rec { - pname = "lib2geom-unstable"; - version = "2020-03-12"; + pname = "lib2geom"; + version = "1.1"; outputs = [ "out" "dev" ]; src = fetchFromGitLab { owner = "inkscape"; repo = "lib2geom"; - rev = "226eb8c60f2af639d74a0229c0ba90e649e6451d"; - sha256 = "BSuqasBfig6HiKY/xtJm7CjbSaV8cW45ip59iEO5Es4="; + rev = "refs/tags/${version}"; + sha256 = "sha256-u9pbpwVzAXzrM2/tQnd1B6Jo9Fzg6UZBr9AtUsNMfQ0="; }; - patches = [ - # Re-enable assertions for tests to work - # https://gitlab.com/inkscape/lib2geom/issues/5 - # https://gitlab.com/inkscape/lib2geom/merge_requests/17 - (fetchpatch { - url = "https://gitlab.com/inkscape/lib2geom/commit/4aa78f52232682b353eb15c219171e466987bac7.patch"; - sha256 = "XsX8SPft0RwDemJujc8lierBe4s3iw8YkW4CSlY5LsY="; - }) - ]; - nativeBuildInputs = [ cmake ninja @@ -53,19 +43,17 @@ stdenv.mkDerivation rec { gtest ]; - cmakeBuildType = "RelWithDebugInfo"; # needed to keep assertions for tests working - cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests - "-DBUILD_SHARED_LIBS=ON" + "-D2GEOM_BUILD_SHARED=ON" ]; doCheck = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Easy to use 2D geometry library in C++"; homepage = "https://gitlab.com/inkscape/lib2geom"; - license = [ licenses.lgpl21 licenses.mpl11 ]; + license = [ licenses.lgpl21Only licenses.mpl11 ]; maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; }; -- cgit 1.4.1 From 413d9271507d041606645d745c999c2e1c880fb8 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 24 May 2021 21:24:26 -0700 Subject: inkscape: 1.0.2 -> 1.1 Reworks: * Remove fetchpatch * Remove gdl (jtojnar) * gtkspell -> gspell (jtojnar) * Add pillow to fix jpg export (jtojnar) * Remove double-conversion, add substituteInPlace (jtojnar) --- pkgs/applications/graphics/inkscape/default.nix | 27 +++++++++------------- .../graphics/inkscape/fix-python-paths.patch | 22 ++++++++++-------- 2 files changed, 23 insertions(+), 26 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index bea288e2958..813db098475 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -3,22 +3,20 @@ , boost , cairo , cmake -, double-conversion , fetchurl -, fetchpatch , gettext -, gdl , ghostscript , glib , glib-networking , glibmm , gsl +, gspell , gtk-mac-integration , gtkmm3 -, gtkspell3 , gdk-pixbuf , imagemagick , lcms +, lib2geom , libcdr , libexif , libpng @@ -47,16 +45,17 @@ let (ps: with ps; [ numpy lxml + pillow scour ]); in stdenv.mkDerivation rec { pname = "inkscape"; - version = "1.0.2"; + version = "1.1"; src = fetchurl { 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 @@ -72,13 +71,6 @@ stdenv.mkDerivation rec { # e.g., those from the "Effects" menu. 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 = '' @@ -91,6 +83,10 @@ stdenv.mkDerivation rec { --replace "call('ps2pdf'" "call('${ghostscript}/bin/ps2pdf'" patchShebangs share/templates patchShebangs man/fix-roff-punct + + # double-conversion is a dependency of 2geom + substituteInPlace CMakeScripts/DefineDependsandFlags.cmake \ + --replace 'find_package(DoubleConversion REQUIRED)' "" ''; nativeBuildInputs = [ @@ -109,8 +105,6 @@ stdenv.mkDerivation rec { buildInputs = [ boehmgc boost - double-conversion - gdl gettext glib glib-networking @@ -119,6 +113,7 @@ stdenv.mkDerivation rec { gtkmm3 imagemagick lcms + lib2geom libcdr libexif libpng @@ -138,7 +133,7 @@ stdenv.mkDerivation rec { python3Env zlib ] ++ lib.optionals (!stdenv.isDarwin) [ - gtkspell3 + gspell ] ++ lib.optionals stdenv.isDarwin [ cairo gtk-mac-integration diff --git a/pkgs/applications/graphics/inkscape/fix-python-paths.patch b/pkgs/applications/graphics/inkscape/fix-python-paths.patch index 9428ade8863..9634be50497 100644 --- a/pkgs/applications/graphics/inkscape/fix-python-paths.patch +++ b/pkgs/applications/graphics/inkscape/fix-python-paths.patch @@ -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 +++ b/src/extension/implementation/script.cpp -@@ -77,10 +77,10 @@ const std::map Script::interpreterTab = { + { "python", {"python-interpreter", {"pythonw" }}}, #elif defined __APPLE__ - { "perl", {"perl-interpreter", {"perl" }}}, -- { "python", {"python-interpreter", {"python3" }}}, -+ { "python", {"python-interpreter", {"@python3@" }}}, + { "perl", {"perl-interpreter", {"perl" }}}, +- { "python", {"python-interpreter", {"python3" }}}, ++ { "python", {"python-interpreter", {"@python3@" }}}, #else - { "perl", {"perl-interpreter", {"perl" }}}, -- { "python", {"python-interpreter", {"python3", "python" }}}, -+ { "python", {"python-interpreter", {"@python3@" }}}, + { "perl", {"perl-interpreter", {"perl" }}}, +- { "python", {"python-interpreter", {"python3", "python" }}}, ++ { "python", {"python-interpreter", {"@python3@" }}}, #endif - { "python2", {"python2-interpreter", {"python2", "python" }}}, - { "ruby", {"ruby-interpreter", {"ruby" }}}, + { "python2", {"python2-interpreter", {"python2", "python" }}}, + { "ruby", {"ruby-interpreter", {"ruby" }}}, -- cgit 1.4.1