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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,68 @@
{ lib, stdenv
, fetchFromGitHub
, cmake
, gfortran
, blas
, boost
, python3
, ocl-icd
, opencl-headers
, Accelerate, CoreGraphics, CoreVideo, OpenCL
}:
stdenv.mkDerivation rec {
pname = "clblas";
version = "2.12";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clBLAS";
rev = "v${version}";
sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs";
};
patches = [ ./platform.patch ];
postPatch = ''
sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt
'';
preConfigure = ''
cd src
'';
cmakeFlags = [
"-DBUILD_TEST=OFF"
];
nativeBuildInputs = [ cmake gfortran ];
buildInputs = [
blas
python3
boost
] ++ lib.optionals (!stdenv.isDarwin) [
ocl-icd
opencl-headers
] ++ lib.optionals stdenv.isDarwin [
Accelerate
CoreGraphics
CoreVideo
];
propagatedBuildInputs = lib.optionals stdenv.isDarwin [
OpenCL
];
strictDeps = true;
meta = with lib; {
homepage = "https://github.com/clMathLibraries/clBLAS";
description = "A software library containing BLAS functions written in OpenCL";
longDescription = ''
This package contains a library of BLAS functions on top of OpenCL.
'';
license = licenses.asl20;
maintainers = with maintainers; [ artuuge ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,34 @@
diff --git a/src/library/tools/ktest/config.cpp b/src/library/tools/ktest/config.cpp
index 8b20128..faf9bde 100644
--- a/src/library/tools/ktest/config.cpp
+++ b/src/library/tools/ktest/config.cpp
@@ -24,8 +24,6 @@
using namespace clMath;
-static const char DEFAULT_PLATFORM_NAME[] = "AMD Accelerated Parallel Processing";
-
Config::Config() :
defaultConfig_(""),
cpp_("ktest.cpp"),
@@ -35,7 +33,10 @@ Config::Config() :
hasFuncID_(false), hasSubdims_(false),
skipAccuracy_(false)
{
- setPlatform(DEFAULT_PLATFORM_NAME);
+ platform_ = NULL;
+ setPlatform("");
+
+ device_ = NULL;
setDevice("");
memset(&kargs_, 0, sizeof(kargs_));
@@ -262,7 +263,7 @@ Config::setPlatform(const std::string& name)
continue;
}
if (name.empty()) {
- found = (strcmp(pname, DEFAULT_PLATFORM_NAME) == 0);
+ found = true;
}
else {
found = (strcmp(pname, name.c_str()) == 0);