mesa-demos: 8.4.0 -> 8.5.0

This commit is contained in:
Pierre Bourdon 2022-07-11 13:48:41 +02:00
parent fc81f2eab1
commit eda07a0e8f
No known key found for this signature in database
GPG key ID: 6FB80DCD84DA0F1C
2 changed files with 29 additions and 8 deletions

View file

@ -1,19 +1,27 @@
{ lib, stdenv, fetchurl, freeglut, glew, libGL, libGLU, libX11, libXext, mesa, pkg-config, wayland }:
{ lib, stdenv, fetchurl, freeglut, glew, libGL, libGLU, libX11, libXext, mesa
, meson, ninja, pkg-config, wayland, wayland-protocols }:
stdenv.mkDerivation rec {
pname = "mesa-demos";
version = "8.4.0";
version = "8.5.0";
src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/demos/${pname}-${version}.tar.bz2";
sha256 = "0zgzbz55a14hz83gbmm0n9gpjnf5zadzi2kjjvkn6khql2a9rs81";
url = "https://archive.mesa3d.org/demos/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-zqLfCoDwmjD2NcTrGmcr+Qxd3uC4539NcAQWaO9xqsE=";
};
buildInputs = [ freeglut glew libX11 libXext libGL libGLU mesa mesa.osmesa wayland ];
nativeBuildInputs = [ pkg-config ];
patches = [
# https://gitlab.freedesktop.org/mesa/demos/-/merge_requests/83
./demos-data-dir.patch
];
configureFlags = [ "--with-system-data-files" ];
enableParallelBuilding = true;
buildInputs = [
freeglut glew libX11 libXext libGL libGLU mesa mesa.osmesa wayland
wayland-protocols
];
nativeBuildInputs = [ meson ninja pkg-config ];
mesonFlags = [ "-Dwith-system-data-files=true" ];
meta = with lib; {
description = "Collection of demos and test programs for OpenGL and Mesa";

View file

@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index 282c39629da54ba6d7e1e380ffcf70da15e48d83..0c15274bff62b43f95ca7d7c5e29cc2dbd3cc42f 100644
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,7 @@ null_dep = dependency('', required : false)
demos_data_dir = '../data/'
if get_option('with-system-data-files')
- demos_data_dir = get_option('datadir') / 'mesa-demos'
+ demos_data_dir = get_option('prefix') / get_option('datadir') / 'mesa-demos/'
endif
add_project_arguments(
'-DDEMOS_DATA_DIR="@0@"'.format(demos_data_dir),