1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #249947 from tobim/pkgs/yaml-cpp-0.8.0

yaml-cpp: 0.7.0 -> 0.8.0
This commit is contained in:
Weijia Wang 2023-11-04 17:26:32 +01:00 committed by GitHub
commit 6f1609ec47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 43 deletions

View file

@ -27,6 +27,12 @@ mkDerivation rec {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/krita/-/raw/acd9a818660e86b14a66fceac295c2bab318c671/exiv2-0.28.patch";
hash = "sha256-iD2pyid513ThJVeotUlVDrwYANofnEiZmWINNUm/saw=";
})
(fetchpatch {
name = "krita-opencolorio-2.3-compat.patch";
url = "https://invent.kde.org/graphics/krita/-/commit/520c633c2c868f2236d8e56eefecdcb6e3ebd840.patch";
hash = "sha256-eXsgBN8OnKjZOQsOxViPypts6CVh3L+IYKMB/mDUcfQ=";
includes = [ "plugins/dockers/lut/ocio_display_filter_vfx2021.cpp" ];
})
];
nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip makeWrapper ];

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, which
, frei0r
@ -34,12 +35,19 @@ stdenv.mkDerivation {
"-DBUILD_QT6=1"
];
patches = [
(fetchpatch {
# Taken from https://github.com/olive-editor/olive/pull/2294.
name = "olive-editor-openimageio-2.3-compat.patch";
url = "https://github.com/olive-editor/olive/commit/311eeb72944f93f873d1cd1784ee2bf423e1e7c2.patch";
hash = "sha256-lswWn4DbXGH1qPvPla0jSgUJQXuqU7LQGHIPoXAE8ag=";
})
];
# https://github.com/olive-editor/olive/issues/2200
patchPhase = ''
runHook prePatch
postPatch = ''
substituteInPlace ./app/node/project/serializer/serializer230220.cpp \
--replace 'QStringRef' 'QStringView'
runHook postPatch
'';
nativeBuildInputs = [

View file

@ -0,0 +1,17 @@
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index c122b013..04f36bf0 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -43,11 +43,7 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
# ZLIB_VERSION_STRING is still available for backward compatibility.
# See https://cmake.org/cmake/help/git-stage/module/FindZLIB.html
- if (@ZLIB_VERSION@) # @ZLIB_VERSION@
- find_dependency(ZLIB @ZLIB_VERSION@)
- else()
- find_dependency(ZLIB @ZLIB_VERSION_STRING@)
- endif()
+ find_dependency(ZLIB)
endif()
if (NOT TARGET MINIZIP::minizip-ng)

View file

@ -27,32 +27,25 @@
stdenv.mkDerivation rec {
pname = "opencolorio";
version = "2.2.0";
version = "2.3.0";
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "OpenColorIO";
rev = "v${version}";
sha256 = "sha256-l5UUysHdP/gb4Mn5A64XEoHOkthl6Mlb95CuI0l4vXQ=";
sha256 = "sha256-E4TmMEFzI3nKqiDFaAkNx44uo84sacvZqjbfWe3A8fE=";
};
patches = [
(fetchpatch {
name = "darwin-no-hidden-l.patch";
url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/48bab7c643ed8d108524d718e5038d836f906682.patch";
revert = true;
sha256 = "sha256-0DF+lwi2nfkUFG0wYvL3HYbhZS6SqGtPWoOabrFS1Eo=";
})
(fetchpatch {
name = "pkg-config-absolute-path.patch";
url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/332462e7f5051b7e26ee3d8c22890cd5e71e7c30.patch";
sha256 = "sha256-7xHALhnOkKszgFBgPIbiZQaORnEJ+1M6RyoZdFgjElM=";
})
(fetchpatch {
name = "minizip-ng-4.patch";
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/opencolorio/-/raw/5fc40f42f5c05d905793610c37b46ca3649245f3/minizip-ng-4.patch";
hash = "sha256-B+dbBVRn0EuGtJaWxz5ah9el0RN7cLb81hgqnKkvhew=";
# Taken from https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1891.
name = "opencolorio-yaml-cpp-8.0-compat.patch";
url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/e99b4afcf0408d8ec56fdf2b9380327c9284db00.patch";
sha256 = "sha256-7eIvVWKcpE0lmuYdNqFQFHkW/sSSzQ//LNIMOC28KZg=";
})
# Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/25200.
# Needed for zlib >= 1.3 && cmake < 3.27.4.
./broken-cmake-zlib-version.patch
];
postPatch = lib.optionalString stdenv.isDarwin ''
@ -81,14 +74,17 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DOCIO_INSTALL_EXT_PACKAGES=NONE"
"-DOCIO_USE_SSE2NEON=OFF"
# GPU test fails with: freeglut (GPU tests): failed to open display ''
"-DOCIO_BUILD_GPU_TESTS=OFF"
"-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include"
"-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include/minizip-ng"
] ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
# precision issues on non-x86
doCheck = stdenv.isx86_64;
# Tends to fail otherwise.
enableParallelChecking = false;
meta = with lib; {
homepage = "https://opencolorio.org";

View file

@ -25,6 +25,12 @@ stdenv.mkDerivation rec {
hash = "sha256-I2/JPmUBDb0bw7qbSZcAkYHB2q2Uo7En7ZurMwWhg/M=";
};
# Workaround broken zlib version detecion in CMake < 3.37.
postPatch = ''
substituteInPlace ./src/cmake/Config.cmake.in \
--replace " @ZLIB_VERSION@" ""
'';
outputs = [ "bin" "out" "dev" "doc" ];
nativeBuildInputs = [

View file

@ -3,36 +3,19 @@
, fetchFromGitHub
, gitUpdater
, cmake
, fetchpatch
}:
stdenv.mkDerivation rec {
pname = "yaml-cpp";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
owner = "jbeder";
repo = "yaml-cpp";
rev = "yaml-cpp-${version}";
hash = "sha256-2tFWccifn0c2lU/U1WNg2FHrBohjx8CXMllPJCevaNk=";
rev = version;
hash = "sha256-J87oS6Az1/vNdyXu3L7KmUGWzU0IAkGrGMUUha+xDXI=";
};
patches = [
# https://github.com/jbeder/yaml-cpp/issues/774
# https://github.com/jbeder/yaml-cpp/pull/1037
(fetchpatch {
name = "yaml-cpp-Fix-generated-cmake-config.patch";
url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch";
hash = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM=";
})
# TODO: Remove with the next release, when https://github.com/jbeder/yaml-cpp/pull/1058 is available
(fetchpatch {
name = "yaml-cpp-Fix-pc-paths-for-absolute-GNUInstallDirs.patch";
url = "https://github.com/jbeder/yaml-cpp/commit/328d2d85e833be7cb5a0ab246cc3f5d7e16fc67a.patch";
hash = "sha256-1M2rxfbVOrRH9kiImcwcEolXOP8DeDW9Cbu03+mB5Yk=";
})
];
strictDeps = true;
nativeBuildInputs = [
@ -47,9 +30,7 @@ stdenv.mkDerivation rec {
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru.updateScript = gitUpdater {
rev-prefix = "yaml-cpp-";
};
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "A YAML parser and emitter for C++";