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,160 @@
{ lib
, config
, stdenv
, fetchurl
, fetchpatch
, boost
, ffmpeg
, ffms
, fftw
, fontconfig
, freetype
, icu
, intltool
, libGL
, libGLU
, libX11
, libass
, libiconv
, pkg-config
, wxGTK
, zlib
, spellcheckSupport ? true
, hunspell ? null
, automationSupport ? true
, lua ? null
, openalSupport ? false
, openal ? null
, alsaSupport ? stdenv.isLinux
, alsa-lib ? null
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
, libpulseaudio ? null
, portaudioSupport ? false
, portaudio ? null
}:
assert spellcheckSupport -> (hunspell != null);
assert automationSupport -> (lua != null);
assert openalSupport -> (openal != null);
assert alsaSupport -> (alsa-lib != null);
assert pulseaudioSupport -> (libpulseaudio != null);
assert portaudioSupport -> (portaudio != null);
let
inherit (lib) optional;
in
stdenv.mkDerivation rec {
pname = "aegisub";
version = "3.2.2";
src = fetchurl {
url = "http://ftp.aegisub.org/pub/releases/${pname}-${version}.tar.xz";
hash = "sha256-xV4zlFuC2FE8AupueC8Ncscmrc03B+lbjAAi9hUeaIU=";
};
patches = [
# Compatibility with ICU 59
(fetchpatch {
url = "https://github.com/Aegisub/Aegisub/commit/dd67db47cb2203e7a14058e52549721f6ff16a49.patch";
sha256 = "sha256-R2rN7EiyA5cuBYIAMpa0eKZJ3QZahfnRp8R4HyejGB8=";
})
# Compatbility with Boost 1.69
(fetchpatch {
url = "https://github.com/Aegisub/Aegisub/commit/c3c446a8d6abc5127c9432387f50c5ad50012561.patch";
sha256 = "sha256-7nlfojrb84A0DT82PqzxDaJfjIlg5BvWIBIgoqasHNk=";
})
# Compatbility with make 4.3
(fetchpatch {
url = "https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch";
sha256 = "sha256-rG8RJokd4V4aSYOQw2utWnrWPVrkqSV3TAvnGXNhLOk=";
})
# Compatibility with ffms2
(fetchpatch {
url = "https://github.com/Aegisub/Aegisub/commit/1aa9215e7fc360de05da9b7ec2cd68f1940af8b2.patch";
sha256 = "sha256-JsuI4hQTcT0TEqHHoSsGbuiTg4hMCH3Cxp061oLk8Go=";
})
./update-ffms2.patch
# Compatibility with X11
(fetchpatch {
url = "https://github.com/Aegisub/Aegisub/commit/7a6da26be6a830f4e1255091952cc0a1326a4520.patch";
sha256 = "sha256-/aTcIjFlZY4N9+IyHL4nwR0hUR4HTJM7ibbdKmNxq0w=";
})
];
nativeBuildInputs = [
intltool
pkg-config
];
buildInputs = [
boost
ffmpeg
ffms
fftw
fontconfig
freetype
icu
libGL
libGLU
libX11
libass
libiconv
wxGTK
zlib
]
++ optional alsaSupport alsa-lib
++ optional automationSupport lua
++ optional openalSupport openal
++ optional portaudioSupport portaudio
++ optional pulseaudioSupport libpulseaudio
++ optional spellcheckSupport hunspell
;
enableParallelBuilding = true;
hardeningDisable = [
"bindnow"
"relro"
];
postPatch = ''
sed -i 's/-Wno-c++11-narrowing/-Wno-narrowing/' configure.ac src/Makefile
'';
# compat with icu61+
# https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
CXXFLAGS = [ "-DU_USING_ICU_NAMESPACE=1" ];
# this is fixed upstream though not yet in an officially released version,
# should be fine remove on next release (if one ever happens)
NIX_LDFLAGS = "-lpthread";
postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub";
meta = with lib; {
homepage = "https://github.com/Aegisub/Aegisub";
description = "An advanced subtitle editor";
longDescription = ''
Aegisub is a free, cross-platform open source tool for creating and
modifying subtitles. Aegisub makes it quick and easy to time subtitles to
audio, and features many powerful tools for styling them, including a
built-in real-time video preview.
'';
# The Aegisub sources are itself BSD/ISC, but they are linked against GPL'd
# softwares - so the resulting program will be GPL
license = licenses.bsd3;
maintainers = [ maintainers.AndersonTorres ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}
# TODO [ AndersonTorres ]: update to fork release

View file

@ -0,0 +1,105 @@
commit 89c4e8d34ab77c3322f097b91fd9de22cbea7a37
Author: Thomas Goyne <plorkyeran@aegisub.org>
Date: Wed Nov 21 16:41:05 2018 -0800
Update ffmpeg and ffms2
diff --git a/src/video_provider_ffmpegsource.cpp b/src/video_provider_ffmpegsource.cpp
index 8bd68fbbf..f4ed6a2f2 100644
--- a/src/video_provider_ffmpegsource.cpp
+++ b/src/video_provider_ffmpegsource.cpp
@@ -44,6 +44,23 @@
#include <libaegisub/make_unique.h>
namespace {
+typedef enum AGI_ColorSpaces {
+ AGI_CS_RGB = 0,
+ AGI_CS_BT709 = 1,
+ AGI_CS_UNSPECIFIED = 2,
+ AGI_CS_FCC = 4,
+ AGI_CS_BT470BG = 5,
+ AGI_CS_SMPTE170M = 6,
+ AGI_CS_SMPTE240M = 7,
+ AGI_CS_YCOCG = 8,
+ AGI_CS_BT2020_NCL = 9,
+ AGI_CS_BT2020_CL = 10,
+ AGI_CS_SMPTE2085 = 11,
+ AGI_CS_CHROMATICITY_DERIVED_NCL = 12,
+ AGI_CS_CHROMATICITY_DERIVED_CL = 13,
+ AGI_CS_ICTCP = 14
+} AGI_ColorSpaces;
+
/// @class FFmpegSourceVideoProvider
/// @brief Implements video loading through the FFMS library.
class FFmpegSourceVideoProvider final : public VideoProvider, FFmpegSourceProvider {
@@ -78,7 +95,7 @@ public:
if (matrix == RealColorSpace)
FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), nullptr);
else if (matrix == "TV.601")
- FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
+ FFMS_SetInputFormatV(VideoSource, AGI_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
else
return;
ColorSpace = matrix;
@@ -103,16 +120,16 @@ std::string colormatrix_description(int cs, int cr) {
std::string str = cr == FFMS_CR_JPEG ? "PC" : "TV";
switch (cs) {
- case FFMS_CS_RGB:
+ case AGI_CS_RGB:
return "None";
- case FFMS_CS_BT709:
+ case AGI_CS_BT709:
return str + ".709";
- case FFMS_CS_FCC:
+ case AGI_CS_FCC:
return str + ".FCC";
- case FFMS_CS_BT470BG:
- case FFMS_CS_SMPTE170M:
+ case AGI_CS_BT470BG:
+ case AGI_CS_SMPTE170M:
return str + ".601";
- case FFMS_CS_SMPTE240M:
+ case AGI_CS_SMPTE240M:
return str + ".240M";
default:
throw VideoOpenError("Unknown video color space");
@@ -206,8 +223,10 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st
// set thread count
int Threads = OPT_GET("Provider/Video/FFmpegSource/Decoding Threads")->GetInt();
+#if FFMS_VERSION < ((2 << 24) | (30 << 16) | (0 << 8) | 0)
if (FFMS_GetVersion() < ((2 << 24) | (17 << 16) | (2 << 8) | 1) && FFMS_GetSourceType(Index) == FFMS_SOURCE_LAVF)
Threads = 1;
+#endif
// set seekmode
// TODO: give this its own option?
@@ -235,18 +254,22 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st
else
DAR = double(Width) / Height;
- CS = TempFrame->ColorSpace;
+ int VideoCS = CS = TempFrame->ColorSpace;
CR = TempFrame->ColorRange;
- if (CS == FFMS_CS_UNSPECIFIED)
- CS = Width > 1024 || Height >= 600 ? FFMS_CS_BT709 : FFMS_CS_BT470BG;
+ if (CS == AGI_CS_UNSPECIFIED)
+ CS = Width > 1024 || Height >= 600 ? AGI_CS_BT709 : AGI_CS_BT470BG;
RealColorSpace = ColorSpace = colormatrix_description(CS, CR);
#if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0)
- if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
- if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo))
+ if (CS != AGI_CS_RGB && CS != AGI_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
+ CS = AGI_CS_BT470BG;
+ ColorSpace = colormatrix_description(AGI_CS_BT470BG, CR);
+ }
+
+ if (CS != VideoCS) {
+ if (FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), &ErrInfo))
throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer);
- ColorSpace = colormatrix_description(FFMS_CS_BT470BG, CR);
}
#endif