Commit e3de64e8 authored by Florian Franzen's avatar Florian Franzen
Browse files

fmt: 6.1.2 -> 6.2.1

parent 0ac9c727
{ fetchFromGitHub, fmt }:
fmt.overrideAttrs (super: rec {
name = "${super.pname}-${version}";
version = "6.1.2";
src = fetchFromGitHub {
owner = "fmtlib";
repo = "fmt";
rev = version;
sha256 = "1ngb2fd7c2jnxi3x5kjgxmpixmyc737f77vibij43dl77ybiaihi";
};
})
{ stdenv, fetchFromGitHub, fetchpatch, cmake, enableShared ? true }:
stdenv.mkDerivation rec {
pname = "fmt";
version = "6.2.1";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "fmtlib";
repo = "fmt";
rev = version;
sha256 = "1i6nfxazq4d05r3sxyc3ziwkqq7s8rdbv9p16afv66aqmsbqqqic";
};
patches = [
# Fix BC break breaking Kodi
# https://github.com/xbmc/xbmc/issues/17629
# https://github.com/fmtlib/fmt/issues/1620
(fetchpatch {
url = "https://github.com/fmtlib/fmt/commit/7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch";
sha256 = "0v8hm5958ih1bmnjr16fsbcmdnq4ykyf6b0hg6dxd5hxd126vnxx";
})
# Fix paths in pkg-config file
# https://github.com/fmtlib/fmt/pull/1657
(fetchpatch {
url = "https://github.com/fmtlib/fmt/commit/78f041ab5b40a1145ba686aeb8013e8788b08cd2.patch";
sha256 = "1hqp96zl9l3qyvsm7pxl6ah8c26z035q2mz2pqhqa0wvzd1klcc6";
})
# Fix cmake config paths.
(fetchpatch {
url = "https://github.com/fmtlib/fmt/pull/1702.patch";
sha256 = "18cadqi7nac37ymaz3ykxjqs46rvki396g6qkqwp4k00cmic23y3";
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
];
doCheck = true;
}
commit dc32ac5c6153a4f5a3fc966e4cc941e5bf3af234
Author: Garrett Brown <garrett.brown@aclima.io>
Date: Sun Feb 16 15:39:39 2020 -0800
CMake: Allow build system to provide protobuf compiler
When building without Hunter, it is desirable to pass the path to protoc and
the protobuf include directory from the build system. Allow these variables
to be overridden.
Fixes the error:
| CMake Error at cmake/functions.cmake:52 (message):
| Protobuf_PROTOC_EXECUTABLE is empty
| Call Stack (most recent call first):
| cmake/functions.cmake:96 (compile_proto_to_cpp)
| src/crypto/protobuf/CMakeLists.txt:6 (add_proto_library)
diff --git a/cmake/functions.cmake b/cmake/functions.cmake
index 6d63b145..b2212752 100644
--- a/cmake/functions.cmake
+++ b/cmake/functions.cmake
@@ -47,8 +47,13 @@ function(add_flag flag)
endfunction()
function(compile_proto_to_cpp PROTO_LIBRARY_NAME PB_H PB_CC PROTO)
- get_target_property(Protobuf_INCLUDE_DIR protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)
- get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_RELEASE)
+ if (NOT Protobuf_INCLUDE_DIR)
+ get_target_property(Protobuf_INCLUDE_DIR protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)
+ endif()
+ if (NOT Protobuf_PROTOC_EXECUTABLE)
+ get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_RELEASE)
+ set(PROTOBUF_DEPENDS protobuf::protoc)
+ endif()
if (NOT Protobuf_PROTOC_EXECUTABLE)
message(FATAL_ERROR "Protobuf_PROTOC_EXECUTABLE is empty")
@@ -80,7 +85,7 @@ function(compile_proto_to_cpp PROTO_LIBRARY_NAME PB_H PB_CC PROTO)
COMMAND ${GEN_COMMAND}
ARGS -I${PROJECT_SOURCE_DIR}/core -I${GEN_ARGS} --cpp_out=${SCHEMA_OUT_DIR} ${PROTO_ABS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- DEPENDS protobuf::protoc
+ DEPENDS ${PROTOBUF_DEPENDS}
VERBATIM
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment