Make rigsofrods build the latest code.

I add angelscript 2.22 too, as it makes RoR happy.
This commit is contained in:
Lluís Batlle i Rossell 2016-04-16 00:59:45 +02:00
parent 93bd5556be
commit e741a302d4
5 changed files with 69 additions and 46 deletions

View File

@ -0,0 +1,44 @@
{stdenv, fetchurl, unzip}:
let
s = # Generated upstream information
rec {
baseName="angelscript";
version = "2.22.2";
name="${baseName}-${version}";
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "1pp853lbnz383ilp9wbgc3wv1dn7lpx3idz8dmzda94rckl7sd43";
};
buildInputs = [
unzip
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
preConfigure = ''
cd angelscript/projects/gnuc
sed -i makefile -e "s@LOCAL = .*@LOCAL = $out@"
export SHARED=1
export VERSION="${s.version}"
mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include"
'';
postBuild = ''
rm ../../lib/*
'';
postInstall = ''
mkdir -p "$out/share/docs/angelscript"
cp -r ../../../docs/* "$out/share/docs/angelscript"
'';
meta = {
inherit (s) version;
description = "Light-weight scripting library";
license = stdenv.lib.licenses.zlib ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
homepage="http://www.angelcode.com/angelscript/";
};
}

View File

@ -1,15 +1,17 @@
{ fetchsvn, fetchurl, stdenv, wxGTK29, freeimage, cmake, zziplib, mesa, boost,
{ fetchurl, fetchFromGitHub, stdenv, wxGTK30, freeimage, cmake, zziplib, mesa, boost,
pkgconfig, libuuid, openal, ogre, ois, curl, gtk, pixman, mygui, unzip,
angelscript, caelum, ogrepaged, mysocketw, libxcb
angelscript, ogrepaged, mysocketw, libxcb
}:
stdenv.mkDerivation rec {
version = "0.39.4";
version = "git-20160412";
name = "rigsofrods-${version}";
src = fetchurl {
url = mirror://sourceforge/rigsofrods/rigsofrods-source-0.39.4.tar.bz2;
sha256 = "1kpjkski0yllwzdki0rjpqvifjs0fwpgs513y4dv4s9wfwan1qcx";
src = fetchFromGitHub {
owner = "RigsOfRods";
repo = "rigs-of-rods";
rev = "1ebd359dbd467b4c3171dd6d054e7d8ec39f78ba";
sha256 = "0h71nrgq5r5cnh20c7wl8jzyaf50dj1b5jdrwihnklpsfyfvjlw4";
};
contentPackSrc = fetchurl {
@ -19,21 +21,21 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
cmakeFlags = [
"-DROR_USE_CURL=TRUE"
"-DROR_USE_MYGUI=TRUE"
"-DROR_USE_OPNEAL=TRUE"
"-DROR_USE_CAELUM=TRUE"
"-DROR_USE_PAGED=TRUE"
"-DROR_USE_ANGELSCRIPT=TRUE"
"-DROR_USE_SOCKETW=TRUE"
"-DCMAKE_BUILD_TYPE=Release"
];
#cmakeFlags = [
# "-DROR_USE_CURL=TRUE"
# "-DROR_USE_MYGUI=TRUE"
# "-DROR_USE_OPNEAL=TRUE"
# "-DROR_USE_CAELUM=TRUE"
# "-DROR_USE_PAGED=TRUE"
# "-DROR_USE_ANGELSCRIPT=TRUE"
# "-DROR_USE_SOCKETW=TRUE"
# "-DCMAKE_BUILD_TYPE=Release"
#];
installPhase = ''
sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg
mkdir -p $out/share/rigsofrods
cp -r ../bin/* $out/share/rigsofrods
cp -r bin/* $out/share/rigsofrods
cp ../tools/linux/binaries/plugins.cfg $out/share/rigsofrods
mkdir -p $out/bin
ln -s $out/share/rigsofrods/{RoR,rorconfig} $out/bin
@ -43,11 +45,11 @@ stdenv.mkDerivation rec {
unzip "${contentPackSrc}"
'';
patches = [ ./doubleslash.patch ./paths.patch ];
#patches = [ ./paths.patch ];
buildInputs = [ wxGTK29 freeimage cmake zziplib mesa boost pkgconfig
buildInputs = [ wxGTK30 freeimage cmake zziplib mesa boost pkgconfig
libuuid openal ogre ois curl gtk mygui unzip angelscript
caelum ogrepaged mysocketw libxcb ];
ogrepaged mysocketw libxcb ];
meta = {
description = "3D simulator game where you can drive, fly and sail various vehicles";

View File

@ -1,13 +0,0 @@
diff --git a/CMakeDependenciesConfig.txt b/CMakeDependenciesConfig.txt
index 447a440..e2562de 100644
--- a/CMakeDependenciesConfig.txt
+++ b/CMakeDependenciesConfig.txt
@@ -228,7 +228,7 @@ ELSEIF(UNIX)
# Paged Geometry
find_path(PAGED_INCLUDE_DIRS "PagedGeometry/PagedGeometry.h")
if(PAGED_INCLUDE_DIRS)
- set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};/${PAGED_INCLUDE_DIRS}/PagedGeometry")
+ set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};${PAGED_INCLUDE_DIRS}/PagedGeometry")
find_library(PAGED_LIBRARIES "PagedGeometry")
set(ROR_USE_PAGED ON)
else()

View File

@ -1,12 +0,0 @@
diff --git a/source/main/framework/ContentManager.cpp b/source/main/framework/ContentManager.cpp
index 0bfea8c..82cdab9 100644
--- a/source/main/framework/ContentManager.cpp
+++ b/source/main/framework/ContentManager.cpp
@@ -238,6 +238,7 @@ bool ContentManager::init(void)
#endif // USE_OPENAL
// and the content
+ ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("Program Path")+"packs", "FileSystem", "Packs", true);
ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"packs", "FileSystem", "Packs", true);
ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"mods", "FileSystem", "Packs", true);

View File

@ -5247,6 +5247,8 @@ in
angelscript = callPackage ../development/interpreters/angelscript {};
angelscript_2_22 = callPackage ../development/interpreters/angelscript/2.22.nix {};
chibi = callPackage ../development/interpreters/chibi { };
ceptre = callPackage ../development/interpreters/ceptre { };
@ -14945,7 +14947,7 @@ in
};
rigsofrods = callPackage ../games/rigsofrods {
mygui = myguiSvn;
angelscript = angelscript_2_22;
};
rili = callPackage ../games/rili { };