Merge pull request #21231 from abbradar/no-fmod

Update DOOM forks, remove top-level fmod
This commit is contained in:
Nikolay Amiantov 2016-12-18 00:29:46 +03:00 committed by GitHub
commit 1cb3831f1c
8 changed files with 105 additions and 104 deletions

View File

@ -1,41 +0,0 @@
{ stdenv, fetchurl }:
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc.lib}/lib64";
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
in
stdenv.mkDerivation rec {
name = "fmod-${version}";
version = "4.44.41";
src = fetchurl {
url = "http://www.fmod.org/download/fmodex/api/Linux/fmodapi44441linux.tar.gz";
sha256 = "0qjvbhx9g6ijv542n6w3ryv20f74p1qx6bbllda9hl14683z8r8p";
};
dontStrip = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/lib $out/include/fmodex
cd api/inc && cp * $out/include/fmodex && cd ../lib
cp libfmodex${bits}-${version}.so $out/lib/libfmodex.so
cp libfmodexL${bits}-${version}.so $out/lib/libfmodexL.so
${patchLib "$out/lib/libfmodex.so"}
${patchLib "$out/lib/libfmodexL.so"}
'';
meta = {
description = "Programming library and toolkit for the creation and playback of interactive audio";
homepage = "http://www.fmod.org/";
license = stdenv.lib.licenses.unfreeRedistributable;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}

View File

@ -1,34 +1,51 @@
{stdenv, fetchFromGitHub, cmake, fmod, mesa, SDL2}:
{ stdenv, fetchFromGitHub, cmake, zdoom
, openal, fluidsynth, soundfont-fluid, mesa_noglu, SDL2
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
stdenv.mkDerivation {
name = "gzdoom-2015-05-07";
src = fetchFromGitHub{
stdenv.mkDerivation rec {
name = "gzdoom-${version}";
version = "2.2.0";
src = fetchFromGitHub {
owner = "coelckers";
repo = "gzdoom";
rev = "a59824cd8897dea5dd452c31be1328415478f990";
sha256 = "1lg9dk5prn2bjmyznq941a862alljvfgbb42whbpg0vw9vhpikak";
rev = "g${version}";
sha256 = "0xxgd8fa29pcdir1xah5cvx41bfy76p4dydpp13mf44p9pr29hrb";
};
buildInputs = [ cmake fmod mesa SDL2 ];
nativeBuildInputs = [ cmake ];
buildInputs = [
SDL2 mesa_noglu openal fluidsynth bzip2 zlib libjpeg libsndfile mpg123
game-music-emu
];
cmakeFlags = [ "-DFMOD_LIBRARY=${fmod}/lib/libfmodex.so" ];
enableParallelBuilding = true;
preConfigure=''
sed s@gzdoom.pk3@$out/share/gzdoom.pk3@ -i src/version.h
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
preConfigure = ''
sed -i \
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
src/sound/music_fluidsynth_mididevice.cpp
'';
installPhase = ''
mkdir -p $out/bin
cp gzdoom $out/bin
mkdir -p $out/share
cp gzdoom.pk3 $out/share
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
for i in *.pk3; do
install -Dm644 "$i" "$out/lib/gzdoom/$i"
done
mkdir $out/bin
ln -s $out/lib/gzdoom/gzdoom $out/bin/gzdoom
'';
meta = {
homepage = https://github.com/coelckers/gzdoom;
meta = with stdenv.lib; {
homepage = "https://github.com/coelckers/gzdoom";
description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.lassulus ];
# Doom source license, MAME license
license = licenses.unfreeRedistributable;
platforms = platforms.linux;
maintainers = with maintainers; [ lassulus ];
};
}

View File

@ -1,9 +1,11 @@
{ stdenv, lib, fetchhg, cmake, pkgconfig, makeWrapper
, SDL, mesa, bzip2, zlib, fmod, libjpeg, fluidsynth, openssl, sqlite-amalgamation
{ stdenv, lib, fetchhg, cmake, pkgconfig, makeWrapper, callPackage
, soundfont-fluid, SDL, mesa, bzip2, zlib, libjpeg, fluidsynth, openssl, sqlite-amalgamation, gtk2
, serverOnly ? false
}:
let suffix = lib.optionalString serverOnly "-server";
let
suffix = lib.optionalString serverOnly "-server";
fmod = callPackage ./fmod.nix { };
# FIXME: drop binary package when upstream fixes their protocol versioning
in stdenv.mkDerivation {
@ -18,7 +20,7 @@ in stdenv.mkDerivation {
# I have no idea why would SDL and libjpeg be needed for the server part!
# But they are.
buildInputs = [ openssl bzip2 zlib SDL libjpeg ]
++ lib.optionals (!serverOnly) [ mesa fmod fluidsynth ];
++ lib.optionals (!serverOnly) [ mesa fmod fluidsynth gtk2 ];
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
@ -26,6 +28,11 @@ in stdenv.mkDerivation {
ln -s ${sqlite-amalgamation}/* sqlite/
sed -ie 's| restrict| _restrict|g' dumb/include/dumb.h \
dumb/src/it/*.c
'' + lib.optionalString serverOnly ''
sed -i \
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
src/sound/music_fluidsynth_mididevice.cpp
'';
cmakeFlags =
@ -39,27 +46,26 @@ in stdenv.mkDerivation {
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/zandronum
mkdir -p $out/lib/zandronum
cp zandronum${suffix} \
zandronum.pk3 \
skulltag_actors.pk3 \
*.pk3 \
${lib.optionalString (!serverOnly) "liboutput_sdl.so"} \
$out/share/zandronum
$out/lib/zandronum
# For some reason, while symlinks work for binary version, they don't for source one.
makeWrapper $out/share/zandronum/zandronum${suffix} $out/bin/zandronum${suffix}
makeWrapper $out/lib/zandronum/zandronum${suffix} $out/bin/zandronum${suffix}
'';
postFixup = lib.optionalString (!serverOnly) ''
patchelf --set-rpath $(patchelf --print-rpath $out/share/zandronum/zandronum):$out/share/zandronum \
$out/share/zandronum/zandronum
patchelf --set-rpath $(patchelf --print-rpath $out/lib/zandronum/zandronum):$out/lib/zandronum \
$out/lib/zandronum/zandronum
'';
meta = with stdenv.lib; {
homepage = http://zandronum.com/;
description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software";
maintainers = with maintainers; [ lassulus ];
license = stdenv.lib.licenses.unfree;
license = licenses.unfreeRedistributable;
platforms = platforms.linux;
};
}

View File

@ -1,40 +1,57 @@
{ stdenv, fetchFromGitHub, cmake, fmod, mesa, SDL }:
{ stdenv, fetchurl, p7zip, cmake
, SDL2, openal, fluidsynth, soundfont-fluid, bzip2, zlib, libjpeg, game-music-emu
, libsndfile, mpg123 }:
stdenv.mkDerivation {
name = "zdoom-2.7.1";
src = fetchFromGitHub {
#url = "https://github.com/rheit/zdoom";
owner = "rheit";
repo = "zdoom";
rev = "2.7.1";
sha256 = "00bx4sgl9j1dyih7yysfq4ah6msxw8580g53p99jfym34ky5ppkh";
stdenv.mkDerivation rec {
name = "zdoom-${version}";
majorVersion = "2.8";
version = "${majorVersion}.1";
src = fetchurl {
url = "https://zdoom.org/files/zdoom/${majorVersion}/zdoom-${version}-src.7z";
sha256 = "0453fqrh9l00xwphfxni5qkf9y134n3s1mr1dvi5cbkxcva7j8bq";
};
buildInputs = [ cmake fmod mesa SDL ];
cmakeFlags = [
"-DFMOD_LIBRARY=${fmod}/lib/libfmodex.so"
"-DSDL_INCLUDE_DIR=${SDL.dev}/include"
nativeBuildInputs = [ p7zip cmake ];
buildInputs = [
SDL2 openal fluidsynth bzip2 zlib libjpeg game-music-emu libsndfile mpg123
];
NIX_CFLAGS_COMPILE = [ "-I ${SDL.dev}/include/SDL" ];
preConfigure = ''
sed s@zdoom.pk3@$out/share/zdoom.pk3@ -i src/version.h
'';
cmakeFlags = [
"-DFORCE_INTERNAL_GME=OFF"
"-DGME_INCLUDE_DIR=${game-music-emu}/include"
"-DGME_LIBRARIES=${game-music-emu}/lib/libgme.so"
];
installPhase = ''
mkdir -p $out/bin
cp zdoom $out/bin
mkdir -p $out/share
cp zdoom.pk3 $out/share
sourceRoot = ".";
enableParallelBuilding = true;
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
preConfigure = ''
sed -i \
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
src/sound/music_fluidsynth_mididevice.cpp
'';
meta = {
homepage = http://zdoom.org/;
installPhase = ''
install -Dm755 zdoom "$out/lib/zdoom/zdoom"
for i in *.pk3; do
install -Dm644 "$i" "$out/lib/zdoom/$i"
done
mkdir -p $out/bin
ln -s $out/lib/zdoom/zdoom $out/bin/zdoom
'';
meta = with stdenv.lib; {
homepage = "http://zdoom.org/";
description = "Enhanced port of the official DOOM source code";
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.lassulus ];
# Doom source license, MAME license
license = licenses.unfreeRedistributable;
platforms = platforms.linux;
maintainers = with maintainer;s [ lassulus ];
};
}

View File

@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
setupHook = ./setup-hook.sh;
meta = {
homepage = http://p7zip.sourceforge.net/;
description = "A port of the 7-zip archiver";

View File

@ -0,0 +1,5 @@
unpackCmdHooks+=(_try7zip)
_try7zip() {
if ! [[ "$curSrc" =~ \.7z$ ]]; then return 1; fi
7z x "$curSrc"
}

View File

@ -7038,10 +7038,6 @@ in
fltk13 = callPackage ../development/libraries/fltk { };
fltk = self.fltk13;
fmod = callPackage ../development/libraries/fmod { };
fmod42416 = callPackage ../development/libraries/fmod/4.24.16.nix { };
fplll = callPackage ../development/libraries/fplll {};
fplll_20160331 = callPackage ../development/libraries/fplll/20160331.nix {};
@ -16178,7 +16174,6 @@ in
xsokoban = callPackage ../games/xsokoban { };
zandronum = callPackage ../games/zandronum {
fmod = fmod42416;
cmake = cmake_2_8;
};