Merge pull request #198075 from wegank/saga-8.4.0

saga: 7.9.1 -> 8.4.0
This commit is contained in:
7c6f434c 2022-11-04 07:56:57 +00:00 committed by GitHub
commit 25e4de52b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 20 deletions

View File

@ -3,11 +3,11 @@
, lib , lib
, fetchurl , fetchurl
# native # native
, autoreconfHook , cmake
, pkg-config , pkg-config
# not native # not native
, gdal , gdal
, wxGTK31 , wxGTK32
, proj , proj
, dxflib , dxflib
, curl , curl
@ -31,24 +31,20 @@
mkDerivation rec { mkDerivation rec {
pname = "saga"; pname = "saga";
version = "7.9.1"; version = "8.4.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/saga-gis/SAGA%20-%20${lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz"; url = "mirror://sourceforge/saga-gis/SAGA%20-%20${lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
sha256 = "sha256-Jq1LhBSeJuq9SlNl/ko5I8+jnjZnLMfGYNNUnzVWo7w="; sha256 = "sha256-v6DPwV20fcsznrEaFJk0/ewU4z3cTjzYYuLkyMwSLV0=";
}; };
sourceRoot = "saga-${version}/saga-gis";
nativeBuildInputs = [ nativeBuildInputs = [
# Upstream's gnerated ./configure is not reliable cmake
autoreconfHook
pkg-config pkg-config
]; ];
configureFlags = [
"--with-system-svm"
# hdf is no detected otherwise
"HDF5_LIBS=-l${hdf5}/lib"
"HDF5_CFLAGS=-I${hdf5.dev}/include"
];
buildInputs = [ buildInputs = [
curl curl
dxflib dxflib
@ -56,7 +52,7 @@ mkDerivation rec {
libsvm libsvm
hdf5 hdf5
gdal gdal
wxGTK31 wxGTK32
proj proj
libharu libharu
opencv opencv
@ -77,9 +73,9 @@ mkDerivation rec {
sqlite sqlite
]; ];
enableParallelBuilding = true; cmakeFlags = [
"-DOpenMP_SUPPORT=${if stdenv.isDarwin then "OFF" else "ON"}"
CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing"; ];
meta = with lib; { meta = with lib; {
description = "System for Automated Geoscientific Analyses"; description = "System for Automated Geoscientific Analyses";

View File

@ -1,4 +1,5 @@
{ lib, stdenv { lib
, stdenv
, fetchurl , fetchurl
, qmake , qmake
}: }:
@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
''; '';
installPhase = '' installPhase = ''
install -d -m 0755 $out/lib install -d -m 0755 $out/lib
cp -pr *.so* $out/lib cp -pr *${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib
install -d -m 0755 $out/include/dxflib install -d -m 0755 $out/include/dxflib
cp -pr src/*.h $out/include/dxflib cp -pr src/*.h $out/include/dxflib
# Generate pkg-config file # Generate pkg-config file
@ -39,8 +40,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://qcad.org/en/90-dxflib"; homepage = "https://qcad.org/en/90-dxflib";
maintainers = with lib.maintainers; [raskin]; maintainers = with lib.maintainers; [ raskin ];
platforms = lib.platforms.linux; platforms = lib.platforms.unix;
description = "DXF file format library"; description = "DXF file format library";
}; };
} }