Commit 468942df authored by Karl Hallsby's avatar Karl Hallsby Committed by github-actions[bot]
Browse files

octavePackages.video: Fix build & install

video uses a slightly different build system from other packages. It
uses an autotools bootstrap script to generate a configure script that
detects the ffmpeg necessities.

HOWEVER, we notably do not actually run the Makefile that the
configure script generates! This pre-build step only creates a
"release tarball"! Octave compiles this "release tarball" in
buildOctavePackage's normal buildPhase with
"octave-cli --eval 'pkg build ...'".

(cherry picked from commit 6600862e)
parent ba4f4e74
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -4,7 +4,9 @@
  lib,
  fetchFromGitHub,
  pkg-config,
  ffmpeg,
  autoconf,
  automake,
  ffmpeg_7,
}:

buildOctavePackage rec {
@@ -14,16 +16,28 @@ buildOctavePackage rec {
  src = fetchFromGitHub {
    owner = "Andy1978";
    repo = "octave-video";
    rev = "refs/tags/${version}";
    tag = version;
    hash = "sha256-fn9LNfuS9dSStBfzBjRRkvP50JJ5K+Em02J9+cHqt6w=";
  };

  preBuild = ''
    pushd src
    patchShebangs bootstrap configure
    ./bootstrap
    ./configure
    popd

    tar --transform 's,^,video-${version}/,' -cz * -f video-${version}.tar.gz
  '';

  nativeBuildInputs = [
    pkg-config
    autoconf
    automake
  ];

  propagatedBuildInputs = [
    ffmpeg
    ffmpeg_7
  ];

  meta = {