about summary refs log tree commit diff
path: root/pkgs/by-name/gr
diff options
context:
space:
mode:
authorPavel Sobolev <paveloom@riseup.net>2023-12-13 18:33:32 +0300
committerPavel Sobolev <contact@paveloom.dev>2024-05-03 20:34:28 +0300
commitab2517c9bc05f413f8d6774d0d1e7b1dc0a5ba61 (patch)
tree8ea81b5188c14e224fe0d15a4e0ed77e37f9c463 /pkgs/by-name/gr
parent013844af158b8f64b05fe338c25789e1c86a19d0 (diff)
gr-framework: 0.72.11 -> 0.73.5
Diffstat (limited to 'pkgs/by-name/gr')
-rw-r--r--pkgs/by-name/gr/gr-framework/package.nix70
-rw-r--r--pkgs/by-name/gr/gr-framework/patches/use-the-module-mode-to-search-for-the-LibXml2-package.patch25
2 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/by-name/gr/gr-framework/package.nix b/pkgs/by-name/gr/gr-framework/package.nix
new file mode 100644
index 0000000000000..533391a9504e4
--- /dev/null
+++ b/pkgs/by-name/gr/gr-framework/package.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+, qt5
+
+, cmake
+
+, cairo
+, ffmpeg
+, freetype
+, ghostscript
+, glfw
+, libjpeg
+, libtiff
+, qhull
+, xorg
+, zeromq
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gr-framework";
+  version = "0.73.5";
+
+  src = fetchFromGitHub {
+    owner = "sciapp";
+    repo = "gr";
+    rev = "v${version}";
+    hash = "sha256-9Py2r774GaUXWhF3yO3ceT1rPi/uqMVZVAo0xs9n+I0=";
+  };
+
+  patches = [
+    ./patches/use-the-module-mode-to-search-for-the-LibXml2-package.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    qt5.wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    cairo
+    ffmpeg
+    freetype
+    ghostscript
+    glfw
+    libjpeg
+    libtiff
+    qhull
+    qt5.qtbase
+    xorg.libX11
+    xorg.libXft
+    xorg.libXt
+    zeromq
+  ];
+
+  preConfigure = ''
+    echo ${version} > version.txt
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "GR framework is a graphics library for visualisation applications";
+    homepage = "https://gr-framework.org";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ paveloom ];
+  };
+}
diff --git a/pkgs/by-name/gr/gr-framework/patches/use-the-module-mode-to-search-for-the-LibXml2-package.patch b/pkgs/by-name/gr/gr-framework/patches/use-the-module-mode-to-search-for-the-LibXml2-package.patch
new file mode 100644
index 0000000000000..41fdcd5ae72be
--- /dev/null
+++ b/pkgs/by-name/gr/gr-framework/patches/use-the-module-mode-to-search-for-the-LibXml2-package.patch
@@ -0,0 +1,25 @@
+From 78a86da95c7227cbfd0f3073841df5409a576837 Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloomm@gmail.com>
+Date: Wed, 31 Jan 2024 16:50:36 +0000
+Subject: [PATCH] Use the module mode to search for the `LibXml2` package.
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5f865a5b..5550b493 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -117,7 +117,7 @@ if(GR_USE_BUNDLED_LIBRARIES)
+   # (`ONLY_CMAKE_FIND_ROOT_PATH` option is not inherited to `find_package` calls within the LibXml2 config file)
+   find_package(LibXml2 NO_MODULE ONLY_CMAKE_FIND_ROOT_PATH)
+ else()
+-  find_package(LibXml2 NO_MODULE)
++  find_package(LibXml2 MODULE)
+ endif()
+
+ # Find the following packages only in 3rdparty, if `GR_USE_BUNDLED_LIBRARIES` is set
+--
+2.42.0
+