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,64 @@
{ lib, stdenv, fetchurl, bash, cabextract, curl, gnupg, libX11, libGLU, libGL, wine-staging }:
let
wine_custom = wine-staging;
mozillaPluginPath = "/lib/mozilla/plugins";
in stdenv.mkDerivation rec {
version = "0.2.8.2";
pname = "pipelight";
src = fetchurl {
url = "https://bitbucket.org/mmueller2012/pipelight/get/v${version}.tar.gz";
sha256 = "1kyy6knkr42k34rs661r0f5sf6l1s2jdbphdg89n73ynijqmzjhk";
};
buildInputs = [ wine_custom libX11 libGLU libGL curl ];
NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
patches = [
./pipelight.patch
./wine-6.13-new-args.patch
];
configurePhase = ''
patchShebangs .
./configure \
--prefix=$out \
--moz-plugin-path=$out/${mozillaPluginPath} \
--wine-path=${wine_custom} \
--gpg-exec=${gnupg}/bin/gpg \
--bash-interp=${bash}/bin/bash \
--downloader=${curl.bin}/bin/curl
$configureFlags
'';
passthru = {
mozillaPlugin = mozillaPluginPath;
wine = wine_custom;
};
postInstall = ''
$out/bin/pipelight-plugin --create-mozilla-plugins
'';
preFixup = ''
substituteInPlace $out/share/pipelight/install-dependency \
--replace cabextract ${cabextract}/bin/cabextract
'';
enableParallelBuilding = true;
meta = {
homepage = "http://pipelight.net/";
license = with lib.licenses; [ mpl11 gpl2 lgpl21 ];
description = "A wrapper for using Windows plugins in Linux browsers";
maintainers = with lib.maintainers; [ skeidel ];
platforms = [ "x86_64-linux" "i686-linux" ];
};
}

View file

@ -0,0 +1,122 @@
diff -urN pipelight.old/bin/pipelight-plugin.in pipelight.new/bin/pipelight-plugin.in
--- pipelight.old/bin/pipelight-plugin.in 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/bin/pipelight-plugin.in 2014-07-27 00:02:39.275834030 +0200
@@ -92,7 +92,7 @@
PLUGIN_PATH=$(realpath "$PLUGIN_PATH")
# Global installation
- if [ $(/usr/bin/id -u) -eq 0 ]; then
+ if [ $(id -u) -eq 0 ]; then
INSTALLDIR="$PLUGIN_PATH"
# Use environment variable (only if it doesn't point to the global directory)
@@ -594,7 +594,7 @@
fi
# Ensure the signature is valid, extract the content
- if ! @@GPG@@ --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then
+ if ! @@GPG@@ --homedir /tmp --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then
rm "$tmpfile"
rm "$decfile"
echo ""
@@ -630,24 +630,10 @@
return 0
}
-# Use fetch on FreeBSD if wget is not available
-if command -v wget >/dev/null 2>&1; then
- download_file()
- {
- wget -O "$1" "$2"
- }
-elif command -v fetch >/dev/null 2>&1; then
- download_file()
- {
- fetch -o "$1" "$2"
- }
-else
- download_file()
- {
- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2
- return 1
- }
-fi
+download_file()
+{
+ curl --cacert /etc/ssl/certs/ca-certificates.crt -o "$1" "$2"
+}
# Use shasum instead of sha256sum on MacOS / *BSD
if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then
diff -urN pipelight.old/configure pipelight.new/configure
--- pipelight.old/configure 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/configure 2014-07-26 23:52:13.690881447 +0200
@@ -66,12 +66,8 @@
datadir=""
libdir=""
mandir=""
-bash_interp="$(which bash)"
-if which gpg &> /dev/null; then
- gpg_exec="$(which gpg)"
-else
- gpg_exec="/usr/bin/gpg"
-fi
+bash_interp=bash
+gpg_exec=gpg
moz_plugin_path=""
gcc_runtime_dlls=""
so_mode="0644"
diff -urN pipelight.old/share/install-dependency pipelight.new/share/install-dependency
--- pipelight.old/share/install-dependency 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/share/install-dependency 2014-07-26 23:26:18.431938546 +0200
@@ -734,42 +734,14 @@
return 0
}
-# Use fetch on FreeBSD if wget is not available
-if command -v wget >/dev/null 2>&1; then
- download_file()
- {
- wget -O "$1" "$2"
- }
- get_download_size()
- {
- local filesize="$(wget -O- "$1" --spider --server-response 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}')"
- local re='^[0-9]+$'
- if [[ "$filesize" -ne "0" ]] && [[ "$filesize" =~ $re ]]; then
- echo "$(($filesize/(1024*1024)))"
- else
- echo "N/A"
- fi
- }
-elif command -v fetch >/dev/null 2>&1; then
- download_file()
- {
- fetch -o "$1" "$2"
- }
- get_download_size()
- {
- echo "N/A"
- }
-else
- download_file()
- {
- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2
- return 1
- }
- get_download_size()
- {
- echo "N/A"
- }
-fi
+download_file()
+{
+ curl --cacert /etc/ssl/certs/ca-certificates.crt -o "$1" "$2"
+}
+get_download_size()
+{
+ echo "N/A"
+}
# Use shasum instead of sha256sum on MacOS / *BSD
if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then

View file

@ -0,0 +1,42 @@
diff --git a/src/windows/pluginloader/apihook.c b/src/windows/pluginloader/apihook.c
index 80bf726..6b80f70 100644
--- a/src/windows/pluginloader/apihook.c
+++ b/src/windows/pluginloader/apihook.c
@@ -42,7 +42,9 @@
#include "common/common.h"
#include "pluginloader.h"
+#define new cnew
#include <windows.h> // for PVOID and other types
+#undef new
#include <string.h> // for memset
void* patchDLLExport(PVOID ModuleBase, const char* functionName, void* newFunctionPtr){
diff --git a/src/windows/pluginloader/npnfunctions.c b/src/windows/pluginloader/npnfunctions.c
index e4e38aa..19f29d5 100644
--- a/src/windows/pluginloader/npnfunctions.c
+++ b/src/windows/pluginloader/npnfunctions.c
@@ -41,7 +41,9 @@
#include "common/common.h"
#include "pluginloader.h"
+#define new cnew
#include <windows.h>
+#undef new
/* Shockwave sometimes calls the function with a wrong instance? Is this a wine bug? */
NPP shockwaveInstanceBug = NULL;
diff --git a/src/windows/pluginloader/pluginloader.c b/src/windows/pluginloader/pluginloader.c
index 8f1170a..99dbceb 100644
--- a/src/windows/pluginloader/pluginloader.c
+++ b/src/windows/pluginloader/pluginloader.c
@@ -50,7 +50,9 @@
#include "pluginloader.h"
#include "apihook.h"
+#define new cnew
#include <windows.h>
+#undef new
#include <objbase.h> // for CoInitializeEx
#include <GL/gl.h>