gemrb: 0.8.7 -> 0.9.0 (#127631)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Peter Hoeg 2021-06-21 19:53:18 +08:00 committed by GitHub
parent 44f27213f1
commit 4d66930f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,32 +1,71 @@
{ lib, stdenv, fetchFromGitHub, cmake
, freetype, SDL2, SDL2_mixer, openal, zlib, libpng, python2, libvorbis
, libiconv }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, SDL2
, SDL2_mixer
, freetype
, libGL
, libiconv
, libpng
, libvlc
, libvorbis
, openal
, python2 # 0.9.0 crashes after character generation with py3, so stick to py2 for now
, zlib
}:
let
# the GLES backend on rpi is untested as I don't have the hardware
backend =
if (stdenv.isx86_32 || stdenv.isx86_64) then "OpenGL" else "GLES";
in
stdenv.mkDerivation rec {
pname = "gemrb";
version = "0.8.7";
version = "0.9.0";
src = fetchFromGitHub {
owner = "gemrb";
repo = "gemrb";
rev = "v${version}";
sha256 = "14j9mhrbi4gnrbv25nlsvcxzkylijzrnwbqqnrg7pr452lb3srpb";
sha256 = "sha256-h/dNPY0QZ2m7aYgRla3r1E8APJqO99ePa2ABhhh3Aoc=";
};
# TODO: make libpng, libvorbis, sdl_mixer, freetype, vlc, glew (and other gl
# reqs) optional
buildInputs = [ freetype python2 openal SDL2 SDL2_mixer zlib libpng libvorbis libiconv ];
buildInputs = [
SDL2
SDL2_mixer
freetype
libGL
libiconv
libpng
libvlc
libvorbis
openal
python2
zlib
];
nativeBuildInputs = [ cmake ];
# TODO: add proper OpenGL support. We are currently (0.8.7) getting a shader
# error on execution when enabled.
LIBVLC_INCLUDE_PATH = "${lib.getDev libvlc}/include";
LIBVLC_LIBRARY_PATH = "${lib.getLib libvlc}/lib";
cmakeFlags = [
# use the Mesa drivers for video on ARM (harmless on x86)
"-DDISABLE_VIDEOCORE=ON"
"-DLAYOUT=opt"
# "-DOPENGL_BACKEND=GLES"
# "-DOpenGL_GL_PREFERENCE=GLVND"
"-DOPENGL_BACKEND=${backend}"
"-DOpenGL_GL_PREFERENCE=GLVND"
];
postInstall = ''
for s in 36 48 72 96 144; do
install -Dm444 ../artwork/gemrb-logo-glow-''${s}px.png $out/share/icons/hicolor/''${s}x''${s}/gemrb.png
done
install -Dm444 ../artwork/gemrb-logo.png $out/share/icons/gemrb.png
'';
meta = with lib; {
description = "A reimplementation of the Infinity Engine, used by games such as Baldur's Gate";
longDescription = ''
@ -36,8 +75,7 @@ stdenv.mkDerivation rec {
ruleset (Baldur's Gate and Icewind Dale series, Planescape: Torment).
'';
homepage = "https://gemrb.org/";
license = licenses.gpl2;
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.all;
};
}