diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2020-05-23 18:55:54 +0200 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-05-29 20:48:15 +0200 |
commit | a668f6a58ae9ede86b602cd4bfff9e9a69287497 (patch) | |
tree | 367415a848022e97c92ce8ca8786219bc5f827d0 /pkgs/development/libraries/libva | |
parent | 9ab24ec76b7b950d48814ac51e54bd93ea187a0a (diff) |
libva: Switch from GNU Autotools to Meson
Diffstat (limited to 'pkgs/development/libraries/libva')
-rw-r--r-- | pkgs/development/libraries/libva/default.nix | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 86c6a88b1ef4b..d0bd2ecc009b8 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -1,8 +1,8 @@ -{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig -, libXext, libdrm, libXfixes, wayland, libffi, libX11 -, libGL, mesa +{ stdenv, lib, fetchFromGitHub, fetchpatch, meson, pkg-config, ninja, wayland +, libdrm , minimal ? false, libva-minimal -, buildPackages +, libX11, libXext, libXfixes, libffi, libGL +, mesa }: stdenv.mkDerivation rec { @@ -17,24 +17,30 @@ stdenv.mkDerivation rec { sha256 = "0ywasac7z3hwggj8szp83sbxi2naa0a3amblx64y7i1hyyrn0csq"; }; + patches = [ + (fetchpatch { # meson: Allow for libdir and includedir to be absolute paths + url = "https://github.com/intel/libva/commit/de902e2905abff635f3bb151718cc52caa3f669c.patch"; + sha256 = "1lpc8qzvsxnlsh9g0ab5lja204zxz8rr2p973pfihcw7dcxc3gia"; + }) + ]; + + postPatch = '' + # Remove the execute bit from all source code files + # https://github.com/intel/libva/commit/dbd2cd635f33af1422cbc2079af0a7e68671c102 + chmod -x va/va{,_dec_av1,_trace,_vpp}.h + ''; + outputs = [ "dev" "out" ]; - nativeBuildInputs = [ autoreconfHook pkgconfig wayland ]; + nativeBuildInputs = [ meson pkg-config ninja wayland ]; buildInputs = [ libdrm ] ++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ]; # TODO: share libs between minimal and !minimal - perhaps just symlink them - enableParallelBuilding = true; - - configureFlags = [ - # Add FHS paths for non-NixOS applications. - "--with-drivers-path=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" - "ac_cv_path_WAYLAND_SCANNER=${buildPackages.wayland}/bin/wayland-scanner" - ] ++ lib.optionals (!minimal) [ "--enable-glx" ]; - - installFlags = [ - "dummy_drv_video_ladir=$(out)/lib/dri" + mesonFlags = [ + # Add FHS paths for non-NixOS applications: + "-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ]; meta = with stdenv.lib; { |