uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
40
pkgs/games/scorched3d/default.nix
Normal file
40
pkgs/games/scorched3d/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, libGLU, libGL, glew, pkg-config, openalSoft, freealut, wxGTK, libogg
|
||||
, freetype, libvorbis, fftwSinglePrec, SDL, SDL_net, expat, libjpeg, libpng }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "44";
|
||||
pname = "scorched3d";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/scorched3d/Scorched3D-${version}-src.tar.gz";
|
||||
sha256 = "1fldi9pn7cz6hc9h70pacgb7sbykzcac44yp3pkhn0qh4axj10qw";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ libGLU libGL glew openalSoft freealut wxGTK libogg freetype libvorbis
|
||||
SDL SDL_net expat libjpeg libpng fftwSinglePrec
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
patches = [
|
||||
./file-existence.patch
|
||||
(fetchurl {
|
||||
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/games-strategy/scorched3d/files/scorched3d-44-fix-c++14.patch?id=1bbcfc9ae3dfdfcbdd35151cb7b6050776215e4d";
|
||||
sha256 = "1farmjxbc2wm4scsdbdnvh29fipnb6mp6z85hxz4bx6n9kbc8y7n";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = "scorched";
|
||||
|
||||
configureFlags = [ "--with-fftw=${fftwSinglePrec.dev}" ];
|
||||
|
||||
NIX_LDFLAGS = "-lopenal";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://scorched3d.co.uk/";
|
||||
description = "3D Clone of the classic Scorched Earth";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux; # maybe more
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
37
pkgs/games/scorched3d/file-existence.patch
Normal file
37
pkgs/games/scorched3d/file-existence.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/src/common/common/DefinesFile.cpp b/src/common/common/DefinesFile.cpp
|
||||
index 6ad803d..022797a 100644
|
||||
--- a/src/common/common/DefinesFile.cpp
|
||||
+++ b/src/common/common/DefinesFile.cpp
|
||||
@@ -36,6 +36,17 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
+namespace {
|
||||
+ bool fileCanBeStated(const std::string &file)
|
||||
+ {
|
||||
+ struct stat buf;
|
||||
+ memset(&buf, 0, sizeof(buf));
|
||||
+ int result = stat(file.c_str(), &buf );
|
||||
+
|
||||
+ return result == 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
std::string S3D::getHomeDir()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@@ -74,12 +85,12 @@ bool S3D::dirMake(const std::string &file)
|
||||
|
||||
bool S3D::fileExists(const std::string &file)
|
||||
{
|
||||
- return (S3D::fileModTime(file) != 0);
|
||||
+ return fileCanBeStated(file);
|
||||
}
|
||||
|
||||
bool S3D::dirExists(const std::string &file)
|
||||
{
|
||||
- return (S3D::fileModTime(file) != 0);
|
||||
+ return fileCanBeStated(file);
|
||||
}
|
||||
|
||||
time_t S3D::fileModTime(const std::string &file)
|
||||
Loading…
Add table
Add a link
Reference in a new issue