summary refs log tree commit diff
path: root/pkgs/development/octave-modules
diff options
context:
space:
mode:
authorKarl Hallsby <karl@hallsby.com>2023-04-13 12:16:58 -0500
committerKarl Hallsby <karl@hallsby.com>2023-04-13 15:06:29 -0500
commitd77e1a6daf19eeb2419187e6be4d1190c2a35d91 (patch)
treebd8fb7ef3944090769f1749728a72aa7f247ecde /pkgs/development/octave-modules
parent929a328dd92f8ffb5aa11469ad7001bc0ebb534d (diff)
octavePackages.control: update 3.5.1 -> 3.5.2
Also update to use the GitHub version of control, as development has
moved there from SourceForge and 3.5.1 is no longer obtainable from
SourceForge.

Add autoreconfHook so that config.h header is generated for control by
control.
This seems to be a regression, as 3.5.1 and earlier should have been
building fine without it?
Diffstat (limited to 'pkgs/development/octave-modules')
-rw-r--r--pkgs/development/octave-modules/control/default.nix28
1 files changed, 22 insertions, 6 deletions
diff --git a/pkgs/development/octave-modules/control/default.nix b/pkgs/development/octave-modules/control/default.nix
index 95ccaf3d05513..74df9fcda0857 100644
--- a/pkgs/development/octave-modules/control/default.nix
+++ b/pkgs/development/octave-modules/control/default.nix
@@ -1,21 +1,37 @@
 { buildOctavePackage
 , lib
-, fetchurl
+, fetchFromGitHub
 , gfortran
 , lapack, blas
+, autoreconfHook
 }:
 
 buildOctavePackage rec {
   pname = "control";
-  version = "3.5.1";
+  version = "3.5.2";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
-    sha256 = "sha256-U/o0RQoHdDhPP3xuiR9gCFb60CKrA30bpc/dH/ozDpg=";
+  src = fetchFromGitHub {
+    owner = "gnu-octave";
+    repo = "pkg-control";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-isUHovpknIFclspHjAtUxGLkrdxitdWSnQMED9n+R3s=";
   };
 
+  # Running autoreconfHook inside the src directory fixes a compile issue about
+  # the config.h header for control missing.
+  # This is supposed to be handled by control's top-level Makefile, but does not
+  # appear to be working. This manually forces it instead.
+  preAutoreconf = ''
+    pushd src
+  '';
+
+  postAutoreconf = ''
+    popd
+  '';
+
   nativeBuildInputs = [
     gfortran
+    autoreconfHook
   ];
 
   buildInputs = [
@@ -23,7 +39,7 @@ buildOctavePackage rec {
   ];
 
   meta = with lib; {
-    homepage = "https://octave.sourceforge.io/control/index.html";
+    homepage = "https://gnu-octave.github.io/packages/control/";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ KarlJoad ];
     description = "Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library";