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,
|
||||
cmake,
|
||||
libjpeg,
|
||||
gtest,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libyuv";
|
||||
version = "1787"; # Defined in: include/libyuv/version.h
|
||||
version = "1908"; # Defined in: include/libyuv/version.h
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://chromium.googlesource.com/libyuv/libyuv.git";
|
||||
rev = "eb6e7bb63738e29efd82ea3cf2a115238a89fa51"; # refs/heads/stable
|
||||
hash = "sha256-DtRYoaAXb9ZD2OLiKbzKzH5vzuu+Lzu4eHaDgPB9hjU=";
|
||||
rev = "b7a857659f8485ee3c6769c27a3e74b0af910746"; # upstream does not do tagged releases
|
||||
hash = "sha256-4Irs+hlAvr6v5UKXmKHhg4IK3cTWdsFWxt1QTS0rizU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
# NEON does not work on aarch64, we disable it
|
||||
cmakeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [
|
||||
"-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"
|
||||
cmakeFlags = [
|
||||
"-DUNIT_TEST=ON"
|
||||
];
|
||||
|
||||
buildInputs = [ libjpeg ];
|
||||
|
||||
patches = [
|
||||
./link-library-against-libjpeg.patch
|
||||
buildInputs = [
|
||||
libjpeg
|
||||
gtest
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -40,6 +39,16 @@ stdenv.mkDerivation {
|
||||
--replace "@VERSION@" "$version"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
./libyuv_unittest
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://chromium.googlesource.com/libyuv/libyuv";
|
||||
description = "Open source project that includes YUV scaling and conversion functionality";
|
||||
|
Loading…
x
Reference in New Issue
Block a user