[staging-next] {libuecc,ecdsautils,lensfun,sqlitebrowser}: fix build with cmake 4 (#447115)

This commit is contained in:
K900
2025-09-29 13:17:52 +03:00
committed by GitHub
4 changed files with 42 additions and 4 deletions
+16 -4
View File
@@ -1,7 +1,12 @@
{
lib,
stdenv,
pkgs,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
doxygen,
libuecc,
}:
let
@@ -11,19 +16,26 @@ in
stdenv.mkDerivation {
inherit pname version;
src = pkgs.fetchFromGitHub {
src = fetchFromGitHub {
owner = "freifunk-gluon";
repo = "ecdsautils";
rev = "v${version}";
sha256 = "sha256-vGHLAX/XOtePvdT/rljCOdlILHVO20mCt6p+MUi13dg=";
};
nativeBuildInputs = with pkgs; [
patches = [
(fetchpatch {
url = "https://github.com/freifunk-gluon/ecdsautils/commit/19f096f9c10264f4efe4b926fe83126e85642cba.patch";
hash = "sha256-oJv47NckFHFONPcG3WfHwgaHRqrz2eWXzbr5SQr+kX4=";
})
];
nativeBuildInputs = [
cmake
pkg-config
doxygen
];
buildInputs = with pkgs; [ libuecc ];
buildInputs = [ libuecc ];
meta = with lib; {
description = "Tiny collection of programs used for ECDSA (keygen, sign, verify)";
+10
View File
@@ -45,6 +45,16 @@ stdenv.mkDerivation {
mkdir -p data/db
tar xvf $TMPDIR/db/version_1.tar -C data/db
date +%s > data/db/timestamp.txt
''
# Backport CMake 4 support
# This is already on master, but not yet in a stable release:
# https://github.com/lensfun/lensfun/issues/2520
# https://github.com/lensfun/lensfun/commit/011de2e85813ff496a85404b30891352555de077
+ ''
substituteInPlace CMakeLists.txt \
--replace-fail \
'CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR )' \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.12 FATAL_ERROR)'
'';
nativeBuildInputs = [
+9
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchgit,
fetchpatch,
cmake,
}:
@@ -15,6 +16,14 @@ stdenv.mkDerivation rec {
sha256 = "1sm05aql75sh13ykgsv3ns4x4zzw9lvzid6misd22gfgf6r9n5fs";
};
patches = [
# Backport CMake 4 support
(fetchpatch {
url = "https://github.com/neocturne/libuecc/commit/b3812bf5ab1777193c4b85863311c33997d141f9.patch";
hash = "sha256-3h+LC5JlSXNiJlEQxSQzC7+5s+nMp+ll2NQQC5HzTf0=";
})
];
nativeBuildInputs = [ cmake ];
meta = with lib; {
@@ -28,6 +28,13 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail '"Unknown"' '"${finalAttrs.src.rev}"'
''
# Fix build with CMake 4
# Will be part of the Qt6 port
# Note: The vendored version of qhexedit is incompatible with our qhexedit2: https://github.com/sqlitebrowser/sqlitebrowser/issues/1808
+ ''
substituteInPlace libs/qhexedit/CMakeLists.txt \
--replace-fail 'cmake_minimum_required(VERSION 2.8.12.2)' 'cmake_minimum_required(VERSION 3.16)'
'';
buildInputs = [