libyuv: 1787 -> 1908, remove old hacks, run tests
This commit is contained in:
parent
7697340a31
commit
e90e273aa4
@ -1,11 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 636531ee..af1b0e4e 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -39,6 +39,7 @@ INCLUDE ( FindJPEG )
|
|
||||||
if (JPEG_FOUND)
|
|
||||||
include_directories( ${JPEG_INCLUDE_DIR} )
|
|
||||||
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
|
|
||||||
+ target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
|
|
||||||
add_definitions( -DHAVE_JPEG )
|
|
||||||
endif()
|
|
@ -4,31 +4,30 @@
|
|||||||
fetchgit,
|
fetchgit,
|
||||||
cmake,
|
cmake,
|
||||||
libjpeg,
|
libjpeg,
|
||||||
|
gtest,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "libyuv";
|
pname = "libyuv";
|
||||||
version = "1787"; # Defined in: include/libyuv/version.h
|
version = "1908"; # Defined in: include/libyuv/version.h
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://chromium.googlesource.com/libyuv/libyuv.git";
|
url = "https://chromium.googlesource.com/libyuv/libyuv.git";
|
||||||
rev = "eb6e7bb63738e29efd82ea3cf2a115238a89fa51"; # refs/heads/stable
|
rev = "b7a857659f8485ee3c6769c27a3e74b0af910746"; # upstream does not do tagged releases
|
||||||
hash = "sha256-DtRYoaAXb9ZD2OLiKbzKzH5vzuu+Lzu4eHaDgPB9hjU=";
|
hash = "sha256-4Irs+hlAvr6v5UKXmKHhg4IK3cTWdsFWxt1QTS0rizU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
];
|
];
|
||||||
|
|
||||||
# NEON does not work on aarch64, we disable it
|
cmakeFlags = [
|
||||||
cmakeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [
|
"-DUNIT_TEST=ON"
|
||||||
"-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libjpeg ];
|
buildInputs = [
|
||||||
|
libjpeg
|
||||||
patches = [
|
gtest
|
||||||
./link-library-against-libjpeg.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -40,6 +39,16 @@ stdenv.mkDerivation {
|
|||||||
--replace "@VERSION@" "$version"
|
--replace "@VERSION@" "$version"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
|
./libyuv_unittest
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://chromium.googlesource.com/libyuv/libyuv";
|
homepage = "https://chromium.googlesource.com/libyuv/libyuv";
|
||||||
description = "Open source project that includes YUV scaling and conversion functionality";
|
description = "Open source project that includes YUV scaling and conversion functionality";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user