cmake: 3.31.7 -> 4.1.1 (#394444)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
qttools,
|
||||
@@ -39,6 +40,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./greeter-path.patch
|
||||
./sddm-ignore-config-mtime.patch
|
||||
./sddm-default-session.patch
|
||||
|
||||
(fetchpatch {
|
||||
name = "sddm-fix-cmake-4.patch";
|
||||
url = "https://github.com/sddm/sddm/commit/228778c2b4b7e26db1e1d69fe484ed75c5791c3a.patch";
|
||||
hash = "sha256-Okt9LeZBhTDhP7NKBexWAZhkK6N6j9dFkAEgpidSnzE=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -23,6 +23,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cmakeFlags = [ "-DSHARED=ON" ];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 2.4)' \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Audio encoder which generates compressed audio streams based on ATSC A/52 specification";
|
||||
homepage = "https://aften.sourceforge.net/";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
lib,
|
||||
stdenv,
|
||||
withTarget ? "GENERIC",
|
||||
@@ -17,6 +18,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-p1pxqJ38h6RKXMg1t+2RHlfmRKPuM18pbUarUx/w9lw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "blasfeo-fix-cmake-4.patch";
|
||||
url = "https://github.com/giaf/blasfeo/commit/75078e2b6153d1c8bc5329e83a82d4d4d3eefd76.patch";
|
||||
hash = "sha256-bH5xUKAjNFCO9rRc655BcMiUesNFFln+iEPC5JHcQAU=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DTARGET=${withTarget}" ];
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
gitUpdater,
|
||||
cmake,
|
||||
bzip2,
|
||||
@@ -29,6 +30,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
patches = [
|
||||
./cfitsio-pc-cmake.patch
|
||||
|
||||
(fetchpatch {
|
||||
name = "cfitsio-fix-cmake-4.patch";
|
||||
url = "https://github.com/HEASARC/cfitsio/commit/101e0880fca41e2223df7eec56d9e84e90b9ed56.patch";
|
||||
hash = "sha256-rufuqOBfE7ItTYwsGdu9G4BXSz4vZd52XmJi09kqrCM=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -22,11 +22,24 @@ stdenv.mkDerivation rec {
|
||||
lib.cmakeBool "ENABLE_CUSTOM_COMPILER_FLAGS" false
|
||||
);
|
||||
|
||||
# cJSON actually uses C99 standard, not C89
|
||||
# https://github.com/DaveGamble/cJSON/issues/275
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
|
||||
'';
|
||||
postPatch =
|
||||
# cJSON actually uses C99 standard, not C89
|
||||
# https://github.com/DaveGamble/cJSON/issues/275
|
||||
''
|
||||
substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
|
||||
''
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See:
|
||||
# * <https://github.com/DaveGamble/cJSON/issues/946>
|
||||
# * <https://github.com/DaveGamble/cJSON/pull/935>
|
||||
# * <https://github.com/DaveGamble/cJSON/pull/949>
|
||||
+ ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.0)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/DaveGamble/cJSON";
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
--- cmake-3.2.2/Source/cmFileCommand.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/ccmFileCommand.cxx 2015-06-10 11:02:27.345598700 +0200
|
||||
@@ -1179,7 +1179,7 @@
|
||||
MatchProperties CollectMatchProperties(const char* file)
|
||||
{
|
||||
// Match rules are case-insensitive on some platforms.
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
std::string lower = cmSystemTools::LowerCase(file);
|
||||
const char* file_to_match = lower.c_str();
|
||||
#else
|
||||
--- cmake-3.2.2/Source/cmInstallCommand.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/cmInstallCommand.cxx 2015-06-10 11:04:19.257935200 +0200
|
||||
@@ -1138,7 +1138,7 @@
|
||||
{
|
||||
literal_args += " REGEX \"";
|
||||
// Match rules are case-insensitive on some platforms.
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
std::string regex = cmSystemTools::LowerCase(args[i]);
|
||||
#else
|
||||
std::string regex = args[i];
|
||||
--- cmake-3.2.2/Source/kwsys/Glob.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/Glob.cxx 2015-06-10 11:05:51.602674000 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <string.h>
|
||||
namespace KWSYS_NAMESPACE
|
||||
{
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
// On Windows and apple, no difference between lower and upper case
|
||||
# define KWSYS_GLOB_CASE_INDEPENDENT
|
||||
#endif
|
||||
--- cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-06-10 11:13:00.308303500 +0200
|
||||
@@ -911,7 +911,7 @@
|
||||
// Hide implementation details in an anonymous namespace.
|
||||
namespace {
|
||||
// *****************************************************************************
|
||||
-#if defined(__linux) || defined(__APPLE__)
|
||||
+#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
int LoadLines(
|
||||
FILE *file,
|
||||
kwsys_stl::vector<kwsys_stl::string> &lines)
|
||||
@@ -947,7 +947,7 @@
|
||||
return nRead;
|
||||
}
|
||||
|
||||
-# if defined(__linux)
|
||||
+# if defined(__linux) || defined(__CYGWIN__)
|
||||
// *****************************************************************************
|
||||
int LoadLines(
|
||||
const char *fileName,
|
||||
@@ -986,7 +986,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__linux)
|
||||
+#if defined(__linux) || defined(__CYGWIN__)
|
||||
// ****************************************************************************
|
||||
template<typename T>
|
||||
int GetFieldsFromFile(
|
||||
@@ -3132,7 +3132,6 @@
|
||||
pos = buffer.find("processor\t",pos+1);
|
||||
}
|
||||
|
||||
-#ifdef __linux
|
||||
// Find the largest physical id.
|
||||
int maxId = -1;
|
||||
kwsys_stl::string idc =
|
||||
@@ -3165,14 +3164,6 @@
|
||||
atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str());
|
||||
}
|
||||
|
||||
-#else // __CYGWIN__
|
||||
- // does not have "physical id" entries, neither "cpu cores"
|
||||
- // this has to be fixed for hyper-threading.
|
||||
- kwsys_stl::string cpucount =
|
||||
- this->ExtractValueFromCpuInfoFile(buffer,"cpu count");
|
||||
- this->NumberOfPhysicalCPU=
|
||||
- this->NumberOfLogicalCPU = atoi(cpucount.c_str());
|
||||
-#endif
|
||||
// gotta have one, and if this is 0 then we get a / by 0n
|
||||
// better to have a bad answer than a crash
|
||||
if(this->NumberOfPhysicalCPU <= 0)
|
||||
@@ -3370,7 +3361,7 @@
|
||||
GlobalMemoryStatusEx(&statex);
|
||||
return statex.ullTotalPhys/1024;
|
||||
# endif
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
SystemInformation::LongLong memTotal=0;
|
||||
int ierr=GetFieldFromFile("/proc/meminfo","MemTotal:",memTotal);
|
||||
if (ierr)
|
||||
@@ -3501,7 +3492,7 @@
|
||||
GlobalMemoryStatusEx(&statex);
|
||||
return (statex.ullTotalPhys - statex.ullAvailPhys)/1024;
|
||||
# endif
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
const char *names[3]={"MemTotal:","MemFree:",NULL};
|
||||
SystemInformation::LongLong values[2]={SystemInformation::LongLong(0)};
|
||||
int ierr=GetFieldsFromFile("/proc/meminfo",names,values);
|
||||
@@ -3560,7 +3551,7 @@
|
||||
return -2;
|
||||
}
|
||||
return pmc.WorkingSetSize/1024;
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
SystemInformation::LongLong memUsed=0;
|
||||
int ierr=GetFieldFromFile("/proc/self/status","VmRSS:",memUsed);
|
||||
if (ierr)
|
||||
@@ -3612,7 +3603,7 @@
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return GetCurrentProcessId();
|
||||
-#elif defined(__linux) || defined(__APPLE__)
|
||||
+#elif defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
return getpid();
|
||||
#else
|
||||
return -1;
|
||||
--- cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-06-10 11:21:58.980443200 +0200
|
||||
@@ -93,19 +93,12 @@
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1800
|
||||
# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
|
||||
# endif
|
||||
-#elif defined (__CYGWIN__)
|
||||
-# include <windows.h>
|
||||
-# undef _WIN32
|
||||
#endif
|
||||
|
||||
#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
-#ifdef __CYGWIN__
|
||||
-# include <sys/cygwin.h>
|
||||
-#endif
|
||||
-
|
||||
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
|
||||
// same for TIOCGWINSZ
|
||||
#if defined(_WIN32) || defined (__LIBCATAMOUNT__)
|
||||
@@ -1148,15 +1141,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
-#if defined(__CYGWIN__)
|
||||
- // Convert filename to native windows path if possible.
|
||||
- char winpath[MAX_PATH];
|
||||
- if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath))
|
||||
- {
|
||||
- return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES);
|
||||
- }
|
||||
- return access(filename.c_str(), R_OK) == 0;
|
||||
-#elif defined(_WIN32)
|
||||
+#if defined(_WIN32)
|
||||
return (GetFileAttributesW(
|
||||
SystemTools::ConvertToWindowsExtendedPath(filename).c_str())
|
||||
!= INVALID_FILE_ATTRIBUTES);
|
||||
@@ -1190,28 +1175,6 @@
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-#ifdef __CYGWIN__
|
||||
-bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
|
||||
-{
|
||||
- SystemToolsTranslationMap::iterator i =
|
||||
- SystemTools::Cyg2Win32Map->find(path);
|
||||
-
|
||||
- if (i != SystemTools::Cyg2Win32Map->end())
|
||||
- {
|
||||
- strncpy(win32_path, i->second.c_str(), MAX_PATH);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0)
|
||||
- {
|
||||
- win32_path[0] = 0;
|
||||
- }
|
||||
- SystemToolsTranslationMap::value_type entry(path, win32_path);
|
||||
- SystemTools::Cyg2Win32Map->insert(entry);
|
||||
- }
|
||||
- return win32_path[0] != 0;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
|
||||
{
|
||||
@@ -4307,7 +4270,7 @@
|
||||
|
||||
bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
|
||||
{
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32)
|
||||
// On Windows, the name must be at least two characters long.
|
||||
if(len < 2)
|
||||
{
|
||||
@@ -5078,9 +5041,6 @@
|
||||
static unsigned int SystemToolsManagerCount;
|
||||
SystemToolsTranslationMap *SystemTools::TranslationMap;
|
||||
SystemToolsTranslationMap *SystemTools::LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
-SystemToolsTranslationMap *SystemTools::Cyg2Win32Map;
|
||||
-#endif
|
||||
|
||||
// SystemToolsManager manages the SystemTools singleton.
|
||||
// SystemToolsManager should be included in any translation unit
|
||||
@@ -5126,9 +5086,6 @@
|
||||
// Allocate the translation map first.
|
||||
SystemTools::TranslationMap = new SystemToolsTranslationMap;
|
||||
SystemTools::LongPathMap = new SystemToolsTranslationMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
|
||||
-#endif
|
||||
|
||||
// Add some special translation paths for unix. These are not added
|
||||
// for windows because drive letters need to be maintained. Also,
|
||||
@@ -5183,9 +5140,6 @@
|
||||
{
|
||||
delete SystemTools::TranslationMap;
|
||||
delete SystemTools::LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- delete SystemTools::Cyg2Win32Map;
|
||||
-#endif
|
||||
}
|
||||
|
||||
|
||||
--- cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-06-10 11:24:24.271286600 +0200
|
||||
@@ -298,15 +298,6 @@
|
||||
static bool FileExists(const kwsys_stl::string& filename);
|
||||
|
||||
/**
|
||||
- * Converts Cygwin path to Win32 path. Uses dictionary container for
|
||||
- * caching and calls to cygwin_conv_to_win32_path from Cygwin dll
|
||||
- * for actual translation. Returns true on success, else false.
|
||||
- */
|
||||
-#ifdef __CYGWIN__
|
||||
- static bool PathCygwinToWin32(const char *path, char *win32_path);
|
||||
-#endif
|
||||
-
|
||||
- /**
|
||||
* Return file length
|
||||
*/
|
||||
static unsigned long FileLength(const kwsys_stl::string& filename);
|
||||
@@ -942,9 +933,6 @@
|
||||
*/
|
||||
static SystemToolsTranslationMap *TranslationMap;
|
||||
static SystemToolsTranslationMap *LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- static SystemToolsTranslationMap *Cyg2Win32Map;
|
||||
-#endif
|
||||
friend class SystemToolsManager;
|
||||
};
|
||||
|
||||
--- cmake-3.2.2/Modules/FindCurses.cmake 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Modules/FindCurses.cmake 2015-06-10 12:10:19.682030300 +0200
|
||||
@@ -60,15 +60,6 @@
|
||||
if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES))
|
||||
set(CURSES_USE_NCURSES TRUE)
|
||||
endif()
|
||||
-# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
|
||||
-# cygwin ncurses stopped providing curses.h symlinks see above
|
||||
-# message. Cygwin is an ncurses package, so force ncurses on
|
||||
-# cygwin if the curses.h is missing
|
||||
-if(CYGWIN)
|
||||
- if(NOT EXISTS /usr/include/curses.h)
|
||||
- set(CURSES_USE_NCURSES TRUE)
|
||||
- endif()
|
||||
-endif()
|
||||
|
||||
|
||||
# Not sure the logic is correct here.
|
||||
@@ -1,14 +0,0 @@
|
||||
Revert of commit 1af23c4de2c7d58c06171d70b37794b5c860d5f4.
|
||||
--- b/Modules/Platform/Darwin.cmake
|
||||
+++ a/Modules/Platform/Darwin.cmake
|
||||
@@ -47,9 +47,7 @@
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
|
||||
set(CMAKE_MODULE_EXISTS 1)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
-if(NOT "${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
|
||||
- set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
-endif()
|
||||
|
||||
foreach(lang C CXX OBJC OBJCXX)
|
||||
set(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
|
||||
@@ -1,32 +0,0 @@
|
||||
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
|
||||
index 5ce8a9046b..f7361308b7 100644
|
||||
--- a/Modules/FindCURL.cmake
|
||||
+++ b/Modules/FindCURL.cmake
|
||||
@@ -239,9 +239,24 @@ if(CURL_FOUND)
|
||||
IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
|
||||
- if(CURL_USE_STATIC_LIBS AND MSVC)
|
||||
- set_target_properties(CURL::libcurl PROPERTIES
|
||||
- INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib")
|
||||
+ if(PC_CURL_FOUND)
|
||||
+ if(PC_CURL_LINK_LIBRARIES)
|
||||
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||
+ INTERFACE_LINK_LIBRARIES "${PC_CURL_LINK_LIBRARIES}")
|
||||
+ endif()
|
||||
+ if(PC_CURL_LDFLAGS_OTHER)
|
||||
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||
+ INTERFACE_LINK_OPTIONS "${PC_CURL_LDFLAGS_OTHER}")
|
||||
+ endif()
|
||||
+ if(PC_CURL_CFLAGS_OTHER)
|
||||
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||
+ INTERFACE_COMPILE_OPTIONS "${PC_CURL_CFLAGS_OTHER}")
|
||||
+ endif()
|
||||
+ else()
|
||||
+ if(CURL_USE_STATIC_LIBS AND MSVC)
|
||||
+ set_target_properties(CURL::libcurl PROPERTIES
|
||||
+ INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,61 @@
|
||||
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
|
||||
index 196ab18b0b..31dd4346b1 100644
|
||||
--- a/Modules/Platform/Darwin-Initialize.cmake
|
||||
+++ b/Modules/Platform/Darwin-Initialize.cmake
|
||||
@@ -16,7 +16,7 @@
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
- execute_process(COMMAND sw_vers -productVersion
|
||||
+ execute_process(COMMAND @sw_vers@ -productVersion
|
||||
OUTPUT_VARIABLE _CMAKE_HOST_OSX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
|
||||
index c65587edbe..0a7cc380c3 100644
|
||||
--- a/Source/kwsys/SystemInformation.cxx
|
||||
+++ b/Source/kwsys/SystemInformation.cxx
|
||||
@@ -3833,7 +3833,7 @@
|
||||
}
|
||||
char const* names[3] = { "Pages wired down:", "Pages active:", nullptr };
|
||||
long long values[2] = { 0 };
|
||||
- int ierr = GetFieldsFromCommand("vm_stat", names, values);
|
||||
+ int ierr = GetFieldsFromCommand("@vm_stat@", names, values);
|
||||
if (ierr) {
|
||||
return -1;
|
||||
}
|
||||
@@ -5586,7 +5586,7 @@
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
std::vector<char const*> args;
|
||||
- args.push_back("sw_vers");
|
||||
+ args.push_back("@sw_vers@");
|
||||
args.push_back(arg);
|
||||
args.push_back(nullptr);
|
||||
ver = this->RunProcess(args);
|
||||
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
|
||||
index 15a1e2c0c3..33bb304cf7 100644
|
||||
--- a/Tests/CMakeLists.txt
|
||||
+++ b/Tests/CMakeLists.txt
|
||||
@@ -1958,7 +1958,7 @@
|
||||
if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 5)
|
||||
if(NOT CMake_TEST_XCTest_DEPLOYMENT_TARGET)
|
||||
execute_process(
|
||||
- COMMAND sw_vers -productVersion
|
||||
+ COMMAND @sw_vers@ -productVersion
|
||||
OUTPUT_VARIABLE OSX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
|
||||
index ddc975c202..8ff651fd90 100644
|
||||
--- a/Utilities/cmcurl/CMakeLists.txt
|
||||
+++ b/Utilities/cmcurl/CMakeLists.txt
|
||||
@@ -127,7 +127,7 @@
|
||||
set(OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
else()
|
||||
execute_process(
|
||||
- COMMAND sw_vers -productVersion
|
||||
+ COMMAND @sw_vers@ -productVersion
|
||||
OUTPUT_VARIABLE OSX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
+11
-9
@@ -1,7 +1,8 @@
|
||||
diff -ur a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
|
||||
--- a/Source/kwsys/ProcessUNIX.c 2024-04-11 07:12:19.000000000 -0700
|
||||
+++ b/Source/kwsys/ProcessUNIX.c 2024-05-15 10:41:00.286160616 -0700
|
||||
@@ -2501,20 +2501,20 @@
|
||||
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
|
||||
index ce6bb7b9cf..9ffc32f039 100644
|
||||
--- a/Source/kwsys/ProcessUNIX.c
|
||||
+++ b/Source/kwsys/ProcessUNIX.c
|
||||
@@ -2501,20 +2501,20 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
|
||||
have two integers to store: the pid and then the ppid. */
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
|
||||
defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
|
||||
@@ -27,15 +28,16 @@ diff -ur a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
|
||||
# define KWSYSPE_PS_FORMAT "%d %d %*[^\n]\n"
|
||||
#endif
|
||||
|
||||
diff -ur a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
|
||||
--- a/Source/kwsys/SystemInformation.cxx 2024-04-11 07:12:19.000000000 -0700
|
||||
+++ b/Source/kwsys/SystemInformation.cxx 2024-05-15 10:40:00.901059278 -0700
|
||||
@@ -3884,7 +3884,7 @@
|
||||
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
|
||||
index aca032459e..093c9aac0c 100644
|
||||
--- a/Source/kwsys/SystemInformation.cxx
|
||||
+++ b/Source/kwsys/SystemInformation.cxx
|
||||
@@ -3850,7 +3850,7 @@ long long SystemInformationImplementation::GetProcMemoryUsed()
|
||||
long long memUsed = 0;
|
||||
pid_t pid = getpid();
|
||||
std::ostringstream oss;
|
||||
- oss << "ps -o rss= -p " << pid;
|
||||
+ oss << "@ps@ -o rss= -p " << pid;
|
||||
FILE* file = popen(oss.str().c_str(), "r");
|
||||
if (file == nullptr) {
|
||||
if (!file) {
|
||||
return -1;
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
|
||||
index 8840cdcb..c34b7ee9 100644
|
||||
index b8d4765692..902c1e5290 100644
|
||||
--- a/Source/cmFindBase.cxx
|
||||
+++ b/Source/cmFindBase.cxx
|
||||
@@ -280,6 +280,11 @@ void cmFindBase::FillCMakeEnvironmentPath()
|
||||
@@ -312,6 +312,11 @@ void cmFindBase::FillCMakeEnvironmentPath()
|
||||
// Add CMAKE_*_PATH environment variables
|
||||
std::string var = cmStrCat("CMAKE_", this->CMakePathName, "_PATH");
|
||||
paths.AddEnvPrefixPath("CMAKE_PREFIX_PATH");
|
||||
@@ -15,14 +15,14 @@ index 8840cdcb..c34b7ee9 100644
|
||||
|
||||
if (this->CMakePathName == "PROGRAM") {
|
||||
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
|
||||
index 9b51b1ad..6acc676c 100644
|
||||
index 6201894fd1..9533862a2b 100644
|
||||
--- a/Source/cmFindPackageCommand.cxx
|
||||
+++ b/Source/cmFindPackageCommand.cxx
|
||||
@@ -2039,6 +2039,7 @@ void cmFindPackageCommand::FillPrefixesCMakeEnvironment()
|
||||
@@ -2467,6 +2467,7 @@ void cmFindPackageCommand::FillPrefixesCMakeEnvironment()
|
||||
|
||||
// And now the general CMake environment variables
|
||||
paths.AddEnvPath("CMAKE_PREFIX_PATH");
|
||||
+ paths.AddEnvPath("NIXPKGS_CMAKE_PREFIX_PATH");
|
||||
if (this->DebugMode) {
|
||||
if (this->DebugModeEnabled()) {
|
||||
debugBuffer = cmStrCat(debugBuffer,
|
||||
"CMAKE_PREFIX_PATH env variable "
|
||||
@@ -18,6 +18,7 @@
|
||||
texinfo,
|
||||
xz,
|
||||
zlib,
|
||||
darwin,
|
||||
isBootstrap ? null,
|
||||
isMinimalBuild ? (
|
||||
if isBootstrap != null then
|
||||
@@ -48,36 +49,35 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
+ lib.optionalString isMinimalBuild "-minimal"
|
||||
+ lib.optionalString cursesUI "-cursesUI"
|
||||
+ lib.optionalString qt5UI "-qt5UI";
|
||||
version = "3.31.7";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cmake.org/files/v${lib.versions.majorMinor finalAttrs.version}/cmake-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-ptLrHr65kTDf5j71o0DD/bEUMczj18oUhSTBJZJM6mg=";
|
||||
hash = "sha256-sp9vGXM6oiS3djUHoQikJ+1Ixojh+vIrKcROHDBUkoI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add NIXPKGS_CMAKE_PREFIX_PATH to cmake which is like CMAKE_PREFIX_PATH
|
||||
# except it is not searched for programs
|
||||
./000-nixpkgs-cmake-prefix-path.diff
|
||||
./nixpkgs-cmake-prefix-path.patch
|
||||
# Don't search in non-Nix locations such as /usr, but do search in our libc.
|
||||
./001-search-path.diff
|
||||
./search-path.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
(replaceVars ./darwin-binary-paths.patch {
|
||||
sw_vers = lib.getExe' darwin.DarwinTools "sw_vers";
|
||||
vm_stat = lib.getExe' darwin.system_cmds "vm_stat";
|
||||
})
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isCygwin ./004-cygwin.diff
|
||||
# On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG.
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin ./006-darwin-always-set-runtime-c-flag.diff
|
||||
# On platforms where ps is not part of stdenv, patch the invocation of ps to use an absolute path.
|
||||
++ lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) (
|
||||
replaceVars ./007-darwin-bsd-ps-abspath.diff {
|
||||
replaceVars ./darwin-bsd-ps-abspath.patch {
|
||||
ps = lib.getExe ps;
|
||||
}
|
||||
)
|
||||
++ [
|
||||
# Backport of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9900
|
||||
# Needed to correctly link curl in pkgsStatic.
|
||||
./008-FindCURL-Add-more-target-properties-from-pkg-config.diff
|
||||
# Backport of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/11134
|
||||
# Fixes build against curl 8.16 and later
|
||||
./009-cmCTestCurl-Avoid-using-undocumented-type-for-CURLOPT_PROXYTYPE-values.diff
|
||||
./fix-curl-8.16.patch
|
||||
];
|
||||
|
||||
outputs = [
|
||||
@@ -136,7 +136,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configurePlatforms = [ ];
|
||||
|
||||
configureFlags = [
|
||||
"CXXFLAGS=-Wno-elaborated-enum-base"
|
||||
"--docdir=share/doc/${finalAttrs.pname}-${finalAttrs.version}"
|
||||
]
|
||||
++ (
|
||||
@@ -157,11 +156,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--sphinx-info"
|
||||
"--sphinx-man"
|
||||
]
|
||||
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
|
||||
++ lib.optionals stdenv.hostPlatform.is32bit [
|
||||
"CFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
]
|
||||
++ [
|
||||
"--"
|
||||
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||
@@ -180,12 +174,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "BUILD_CursesDialog" cursesUI)
|
||||
];
|
||||
|
||||
# `pkgsCross.musl64.cmake.override { stdenv = pkgsCross.musl64.llvmPackages_16.libcxxStdenv; }`
|
||||
# fails with `The C++ compiler does not support C++11 (e.g. std::unique_ptr).`
|
||||
# The cause is a compiler warning `warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]`
|
||||
# interfering with the feature check.
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-unused-command-line-argument";
|
||||
|
||||
# make install attempts to use the just-built cmake
|
||||
preInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
|
||||
index b9381c3d7d..5e944640b5 100644
|
||||
index e95da44ea4..660fb647f2 100644
|
||||
--- a/Modules/Platform/UnixPaths.cmake
|
||||
+++ b/Modules/Platform/UnixPaths.cmake
|
||||
@@ -26,9 +26,6 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
||||
@@ -29,9 +29,6 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
||||
# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
|
||||
# synchronized
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
@@ -12,7 +12,7 @@ index b9381c3d7d..5e944640b5 100644
|
||||
# CMake install location
|
||||
"${_CMAKE_INSTALL_DIR}"
|
||||
)
|
||||
@@ -47,48 +44,49 @@ endif()
|
||||
@@ -51,48 +48,49 @@ _cmake_record_install_prefix()
|
||||
|
||||
# Non "standard" but common install prefixes
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
@@ -81,10 +81,10 @@ index b9381c3d7d..5e944640b5 100644
|
||||
# Reminder when adding new locations computed from environment variables
|
||||
# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
|
||||
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
|
||||
index b9e2f17979..ab517cd4a7 100644
|
||||
index c56dfaf9ac..403133273c 100644
|
||||
--- a/Modules/Platform/WindowsPaths.cmake
|
||||
+++ b/Modules/Platform/WindowsPaths.cmake
|
||||
@@ -70,7 +70,7 @@ endif()
|
||||
@@ -71,7 +71,7 @@ _cmake_record_install_prefix()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
validatePkgConfig,
|
||||
}:
|
||||
@@ -17,6 +18,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-M3GocT0hodw3Sc2NHcFDiPVZ1XN7BqIUuYLW8OaXMqM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "console-bridge-fix-cmake-4.patch";
|
||||
url = "https://github.com/ros/console_bridge/commit/81ec67f6daf3cd19ef506e00f02efb1645597b9c.patch";
|
||||
hash = "sha256-qSYnqjD+63lWBdtrXbTawt1OpiAO9uvT7R5KmfpUmwQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
validatePkgConfig
|
||||
|
||||
@@ -34,6 +34,19 @@ stdenv.mkDerivation {
|
||||
"-DCPPTOML_BUILD_EXAMPLES=OFF"
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See:
|
||||
#
|
||||
# * <https://github.com/skystrife/cpptoml/pull/132>
|
||||
# * <https://github.com/facebook/watchman/issues/1286>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.1.0)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ TOML configuration library";
|
||||
homepage = "https://github.com/skystrife/cpptoml";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
gflags,
|
||||
staticOnly ? stdenv.hostPlatform.isStatic,
|
||||
@@ -19,6 +20,15 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "crc32c-fix-cmake-4.patch";
|
||||
url = "https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07.patch";
|
||||
excludes = [ "third_party/*" ];
|
||||
hash = "sha256-XYH0Mwvmf8RkXscVo6pAejTbRmVl9tY+lpp1sqbNXa0=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ gflags ];
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
enableStatic ? stdenv.hostPlatform.isStatic,
|
||||
}:
|
||||
@@ -17,6 +18,20 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-M80H+azCzQYa4/gBLWv5GNNhEuHsH7LbJ/ajwmACnrM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "double-conversion-fix-cmake-4-1.patch";
|
||||
url = "https://github.com/google/double-conversion/commit/101e1ba89dc41ceb75090831da97c43a76cd2906.patch";
|
||||
hash = "sha256-VRmuNXdzt/I+gWbz5mwWkx5IGn8Vsl9WkdwRsuwZdkU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "double-conversion-fix-cmake-4-2.patch";
|
||||
url = "https://github.com/google/double-conversion/commit/0604b4c18815aadcf7f4b78dfa6bfcb91a634ed7.patch";
|
||||
hash = "sha256-cJBp1ou1O/bMQ/7kvcX52dWbUdhmPfQ9aWmEhQdyhis=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = lib.optional (!enableStatic) "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
@@ -17,6 +17,16 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1bi7wsz3p5slb43kj7lgb3r6lb91lvb6ldi556k4y50ix6b5khyb";
|
||||
};
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://sourceforge.net/p/ebook-tools/bugs/14/>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.4.0)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
libICE,
|
||||
libXext,
|
||||
libXi,
|
||||
@@ -22,6 +23,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sha256 = "sha256-nD1NZRb7+gKA7ck8d2mPtzA+RDwaqvN9Jp4yiKbD6lI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "freeglut-fix-cmake-4.patch";
|
||||
url = "https://github.com/freeglut/freeglut/commit/2294389397912c9a6505a88221abb7dca0a4fb79.patch";
|
||||
hash = "sha256-buNhlVUbDekklnar6KFWN/GUKE+jMEqTGrY3LY0LwVs=";
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
enableShared ? !stdenv.hostPlatform.isStatic,
|
||||
}:
|
||||
@@ -17,6 +18,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "gflags-fix-cmake-4.patch";
|
||||
url = "https://github.com/gflags/gflags/commit/70c01a642f08734b7bddc9687884844ca117e080.patch";
|
||||
hash = "sha256-TYdroBbF27Wvvm/rOahBEvhezuKCcxbtgh/ZhpA5ESo=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
# This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin)
|
||||
|
||||
@@ -31,6 +31,16 @@ stdenv.mkDerivation rec {
|
||||
"-DINSTALL_INCLUDEDIR=${placeholder "dev"}/include"
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/EHfive/ldacBT/pull/1>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.0)' \
|
||||
'cmake_minimum_required(VERSION 3.0...3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "AOSP libldac dispatcher";
|
||||
homepage = "https://github.com/EHfive/ldacBT";
|
||||
|
||||
@@ -40,6 +40,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://github.com/3MFConsortium/lib3mf/pull/421/commits/6d7b5709a4a1cf9bd55ae8b4ae999c9ca014f62c.patch?full_index=1";
|
||||
hash = "sha256-rGOyXZUZglRNMu1/oVhgSpRdi0pUa/wn5SFHCS9jVOY=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "lib3mf-fix-cmake-4.patch";
|
||||
url = "https://github.com/3MFConsortium/lib3mf/commit/01325a73de25d2ad49e992b5b6294beb32298c92.patch";
|
||||
hash = "sha256-8vv2ydnDgvSKkGjpmk5ng1BGKK0okTMOeAoGwlKcziY=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -37,6 +37,23 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/AppImageCommunity/libappimage/commit/1e0515b23b90588ce406669134feca56ddcbbe43.patch";
|
||||
hash = "sha256-WIMvXNqC1stgPiBTRpXHWq3edIRnQomtRSW2qO52TRo=";
|
||||
})
|
||||
|
||||
# we really just want this for cmake 4 compatibility
|
||||
(fetchpatch {
|
||||
name = "libappimage-use-system-gtest.patch";
|
||||
url = "https://github.com/AppImageCommunity/libappimage/commit/7b83b7247fd2d86c330e09f534c9cec1b03f649f.patch";
|
||||
excludes = [
|
||||
"ci/*"
|
||||
"lib/gtest"
|
||||
"tests/*"
|
||||
];
|
||||
hash = "sha256-H+ph5TfKJPFcAzw2c7pzmqvB9R50HtZP/DbroOxLTVU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "libappimage-fix-cmake-4.patch";
|
||||
url = "https://github.com/AppImageCommunity/libappimage/commit/e5f6ea562611d534dc8e899a12ddf15c50e820be.patch";
|
||||
hash = "sha256-P6fPoiqVX3TrKGrU2EXIMBpQLGl7xNcy41Iq7vRM+n8=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -24,6 +24,14 @@ stdenv.mkDerivation rec {
|
||||
flex
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)' \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)'
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
}:
|
||||
@@ -17,6 +18,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-PIVBePTWceMgiENdaL9lvXIL/RQIrtg7l0OG2tO0SU8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "libebml-fix-cmake-4.patch";
|
||||
url = "https://github.com/Matroska-Org/libebml/commit/6725c5f0169981cb0bd2ee124fbf0d8ca30b762d.patch";
|
||||
hash = "sha256-q62EWnJmQzBtra1xL0N7rC4RARJZQ/HAVyorzvB7XFY=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
||||
@@ -28,6 +28,20 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
substituteInPlace ebur128/libebur128.pc.cmake \
|
||||
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
||||
''
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See:
|
||||
#
|
||||
# * <https://github.com/jiixyj/libebur128/issues/134>
|
||||
# * <https://github.com/jiixyj/libebur128/pull/135>
|
||||
+ ''
|
||||
for file in CMakeLists.txt test/CMakeLists.txt; do
|
||||
substituteInPlace "$file" \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.8.12' \
|
||||
'cmake_minimum_required(VERSION 3.10'
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitea,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
gperf,
|
||||
zlib,
|
||||
@@ -24,6 +25,15 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-6/49rk7pmIpJRj32WmxC171NtdIOaMNhX8RD7o6Jbzs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "libid3tag-fix-cmake-4.patch";
|
||||
url = "https://codeberg.org/tenacityteam/libid3tag/commit/eee94b22508a066f7b9bc1ae05d2d85982e73959.patch";
|
||||
hash = "sha256-OAdMapNr8qpvXZqNOZ3LUHQ1H79zD1rvzrVksqmz6dU=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace packaging/id3tag.pc.in \
|
||||
--replace-fail "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
freebsd,
|
||||
}:
|
||||
@@ -17,6 +18,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-rO2Mf2/BfKlPh1wHe0qTuyQAyqpSB/j3Q+JWpNDyNm0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "libipt-fix-cmake-4.patch";
|
||||
url = "https://github.com/intel/libipt/commit/fa7d42de25be526da532284cc8b771fdeb384f81.patch";
|
||||
hash = "sha256-/jTyoGyKw29Nu27bAXmStpjOdTeGdQYpEX2rb29vSSQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isFreeBSD freebsd.libstdthreads;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
brotli,
|
||||
cmake,
|
||||
giflib,
|
||||
@@ -139,6 +140,17 @@ stdenv.mkDerivation rec {
|
||||
rm -rf third_party/!(sjpeg)/
|
||||
shopt -u extglob
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See:
|
||||
#
|
||||
# * <https://github.com/webmproject/sjpeg/commit/9990bdceb22612a62f1492462ef7423f48154072>
|
||||
# * <https://github.com/webmproject/sjpeg/commit/94e0df6d0f8b44228de5be0ff35efb9f946a13c9>
|
||||
substituteInPlace third_party/sjpeg/CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.8.7)' \
|
||||
'cmake_minimum_required(VERSION 3.5...3.10)'
|
||||
|
||||
substituteInPlace plugins/gdk-pixbuf/jxl.thumbnailer \
|
||||
--replace '/usr/bin/gdk-pixbuf-thumbnailer' "$out/libexec/gdk-pixbuf-thumbnailer-jxl"
|
||||
substituteInPlace CMakeLists.txt \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
libebml,
|
||||
nix-update-script,
|
||||
@@ -27,6 +28,14 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-hfu3Q1lIyMlWFWUM2Pu70Hie0rlQmua7Kq8kSIWnfHE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "libmatroska-fix-cmake-4.patch";
|
||||
url = "https://github.com/Matroska-Org/libmatroska/commit/dc80e194e93e6f0e25c8ad3e015d83aca2a99e10.patch";
|
||||
hash = "sha256-2dKRJ6z5rOrLJ5agvXQ6k8TPi5rTMA3H1wCO2F5tBbc=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
libmysofa,
|
||||
zlib,
|
||||
}:
|
||||
@@ -18,6 +19,16 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-sPnQPD41AceXM4uGqWXMYhuQv0TUkA6TZP8ChxUFIoI=";
|
||||
};
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/videolabs/libspatialaudio/commit/cec3eeac0984cfd8c1d09fef0dd511c6ccf2a175>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.1)' \
|
||||
'cmake_minimum_required(VERSION 3.5)'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
libmysofa
|
||||
@@ -33,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||
description = "Ambisonic encoding / decoding and binauralization library in C++";
|
||||
homepage = "https://github.com/videolabs/libspatialaudio";
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ krav ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,6 +75,23 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://gitlab.com/libtiff/libtiff/-/commit/ed141286a37f6e5ddafb5069347ff5d587e7a4e0.patch";
|
||||
hash = "sha256-DIsk8trbHMMTrj6jP5Ae8ciRjHV4CPHdWCN+VbeFnFo=";
|
||||
})
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "libtiff-cmake-4-1.patch";
|
||||
url = "https://gitlab.com/libtiff/libtiff/-/commit/d1279f0f9c8fee724c380523a7a6cf60c690521d.patch";
|
||||
hash = "sha256-7EwfgG8zYwyNPIpyCYq8PSbf1TBmo4N36e96GB3wWPo=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "libtiff-cmake-4-2.patch";
|
||||
url = "https://gitlab.com/libtiff/libtiff/-/commit/2b6b70183d048b8f32e6b95e9aa82ed2e46ddf1f.patch";
|
||||
hash = "sha256-fGhlm2PYxjXAyMdM8vyvgcDzzJw8YTHWFRunr+RZnOU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "libtiff-cmake-4-3.patch";
|
||||
url = "https://gitlab.com/libtiff/libtiff/-/commit/ff5997ea1206df2ebbbf5e30611c8a84f649a333.patch";
|
||||
hash = "sha256-G2Q8EKOzNLh028kPYAKmoEzAbDu0tGNpnxkd3pMT96U=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
}:
|
||||
|
||||
@@ -21,6 +22,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-6Xpgz8AKHBR6Z0sJe7FCKr2fp4otnOPz/cwueKNKxfA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "uchardet-cmake-4.patch";
|
||||
url = "https://gitlab.freedesktop.org/uchardet/uchardet/-/commit/6e163c978a7c13a6d3ff64a1e3dd4ba81d2d9e09.patch";
|
||||
hash = "sha256-WXIQEoIpT7b5vELAfQJFEt2hiYrlnGCjV7ILCmd9kqY=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
doCheck = !stdenv.hostPlatform.isi686; # tests fail on i686
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
libjpeg,
|
||||
openssl,
|
||||
@@ -34,6 +35,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patches = [
|
||||
# fix generated pkg-config files
|
||||
./pkgconfig.patch
|
||||
|
||||
(fetchpatch {
|
||||
name = "libvncserver-fix-cmake-4.patch";
|
||||
url = "https://github.com/LibVNC/libvncserver/commit/e64fa928170f22a2e21b5bbd6d46c8f8e7dd7a96.patch";
|
||||
hash = "sha256-AAZ3H34+nLqQggb/sNSx2gIGK96m4zatHX3wpyjNLOA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -18,6 +18,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.8.6)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/lzfse/lzfse";
|
||||
description = "Reference C implementation of the LZFSE compressor";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
perl,
|
||||
pkg-config,
|
||||
@@ -18,6 +19,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-b6yCn0NFpONI7WwfjDOc0d2nCKMIiUXi+rsnytiNc0Q=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "multimarkdown-fix-cmake-4.patch";
|
||||
url = "https://github.com/fletcher/MultiMarkdown-6/commit/655c0908155758e7c94858af2fb99dc992709075.patch";
|
||||
hash = "sha256-d1b5NcBQDVnbmTvVnPyiTS8aSx/VGgRLHD0nSs+JksI=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools/enumsToPerl.pl
|
||||
'';
|
||||
|
||||
@@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace olm.pc.in \
|
||||
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
||||
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.4)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
''
|
||||
# Clang 19 has become more strict about assigning to const variables
|
||||
# Patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281497
|
||||
|
||||
@@ -19,6 +19,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# Remove on the next version bump.
|
||||
#
|
||||
# See: <https://github.com/qhull/qhull/commit/62ccc56af071eaa478bef6ed41fd7a55d3bb2d80>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.0)' \
|
||||
'cmake_minimum_required(VERSION 3.5...4.0)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.qhull.org/";
|
||||
description = "Compute the convex hull, Delaunay triangulation, Voronoi diagram and more";
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
nix-update-script,
|
||||
|
||||
cmake,
|
||||
@@ -21,6 +22,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-L6uBRXaPJZinIRTm+x+wnXmlVkSlWm4XMB5yX/wxg2A=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "qpoases-fix-cmake-4.patch";
|
||||
url = "https://github.com/coin-or/qpOASES/commit/35b762ba3fee2e009d9e99650c68514da05585c5.patch";
|
||||
hash = "sha256-I6l+ah1j45VEMokZqX6DYVmE55uWlVi0rx2B+HQv5Ik=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
|
||||
@@ -33,6 +33,12 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/Reference-ScaLAPACK/scalapack/commit/76cc1ed3032e9a4158a4513c9047c3746b269f04.patch";
|
||||
hash = "sha256-kmllLa9GUeTrHRYeS0yIk9I8LwaIoEytdyQGRuinn3A=";
|
||||
})
|
||||
|
||||
(fetchpatch {
|
||||
name = "scalapack-fix-cmake-4.patch";
|
||||
url = "https://github.com/Reference-ScaLAPACK/scalapack/commit/c3d6b22b0032fd2b8772d99c2239c18473e197a7.patch";
|
||||
hash = "sha256-935KtaqPO2cghbD9Z8YMxGGOQJo1D1LqTje6/IL4bGI=";
|
||||
})
|
||||
];
|
||||
|
||||
# Required to activate ILP64.
|
||||
|
||||
@@ -32,6 +32,14 @@ stdenv.mkDerivation rec {
|
||||
"-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include"
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required (VERSION 3.1 FATAL_ERROR)' \
|
||||
'cmake_minimum_required (VERSION 3.10 FATAL_ERROR)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Audio resampling library";
|
||||
homepage = "https://soxr.sourceforge.net";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
openssl,
|
||||
windows,
|
||||
@@ -27,7 +28,15 @@ stdenv.mkDerivation rec {
|
||||
windows.pthreads
|
||||
];
|
||||
|
||||
patches = lib.optionals stdenv.hostPlatform.isMinGW [
|
||||
patches = [
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "srt-fix-cmake-4.patch";
|
||||
url = "https://github.com/Haivision/srt/commit/0def1b1a1094fc57752f241250e9a1aed71bbffd.patch";
|
||||
hash = "sha256-dnBGNut+I9trkQzr81Wo36O2Pt7d2gsjA1buJBegPMM=";
|
||||
})
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||
./no-msvc-compat-headers.patch
|
||||
];
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
zlib,
|
||||
testers,
|
||||
@@ -18,6 +19,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-QX0EpHGT36UsgIfRf5iALnwxe0jjLpZvCTbk8vSMFF4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "taglib-fix-cmake-4.patch";
|
||||
url = "https://github.com/taglib/taglib/commit/967aaf7af2f4aa2e9fed0edb2cbaca98b737eebe.patch";
|
||||
hash = "sha256-GeowBwspGAmrjALaIgEgSR9uUuClKAkS/cwZ2FHltl4=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -32,6 +32,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmake
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.1)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = unstableGitUpdater { };
|
||||
tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
||||
|
||||
@@ -28,6 +28,12 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/sctplab/usrsctp/commit/ac559d2a95277e5e0827e9ee5a1d3b1b50e0822a.patch";
|
||||
hash = "sha256-QBlzH37Xwwnn1y8pM941Zesz18p2EazfeD0lCU8n6nI=";
|
||||
})
|
||||
|
||||
(fetchpatch {
|
||||
name = "usrsctp-fix-cmake-4.patch";
|
||||
url = "https://github.com/sctplab/usrsctp/commit/7569d2ce1e8658534369ad9726ca62139211db84.patch";
|
||||
hash = "sha256-Hxp1SGwmpm6UK//KFLQoOmmI0a1QpSNaTaEEUbC8jbg=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -44,6 +44,14 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
# without this binaries only get built if shared libs are disable
|
||||
sed 's@^if (NOT BUILD_SHARED_LIBS)$@if (TRUE)@g' -i CMakeLists.txt
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/google/woff2/issues/183>
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.8.6)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
fetchurl,
|
||||
cmake,
|
||||
nasm,
|
||||
fetchpatch,
|
||||
fetchpatch2,
|
||||
|
||||
# NUMA support enabled by default on NUMA platforms:
|
||||
@@ -58,6 +59,26 @@ stdenv.mkDerivation rec {
|
||||
# fix compilation with gcc15
|
||||
# https://bitbucket.org/multicoreware/x265_git/pull-requests/36
|
||||
./gcc15-fixes.patch
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "x265-fix-cmake-4-1.patch";
|
||||
url = "https://bitbucket.org/multicoreware/x265_git/commits/b354c009a60bcd6d7fc04014e200a1ee9c45c167/raw";
|
||||
stripLen = 1;
|
||||
hash = "sha256-kS+hYZb5dnIlNoZ8ABmNkLkPx+NqCPy+DonXktBzJAE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "x265-fix-cmake-4-2.patch";
|
||||
url = "https://bitbucket.org/multicoreware/x265_git/commits/51ae8e922bcc4586ad4710812072289af91492a8/raw";
|
||||
stripLen = 1;
|
||||
hash = "sha256-ZrpyfSnijUgdyVscW73K48iEXa9k85ftNaQdr0HWSYg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "x265-fix-cmake-4-3.patch";
|
||||
url = "https://bitbucket.org/multicoreware/x265_git/commits/78e5ac35c13c5cbccc5933083edceb0d3eaeaa21/raw";
|
||||
stripLen = 1;
|
||||
hash = "sha256-qEihgUKGEdthbKz67s+/hS/qdpzl+3tEB3gx2tarax4=";
|
||||
})
|
||||
]
|
||||
# TODO: remove after update to version 4.2
|
||||
++ lib.optionals (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isLinux) [
|
||||
|
||||
@@ -123,6 +123,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
# CMake 4 dropped support of versions lower than 3.5, and versions
|
||||
# lower than 3.10 are deprecated.
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeBinaryWrapper
|
||||
|
||||
@@ -19,6 +19,14 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.0)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Implementation of the FreeDesktop specifications to be used in c++ projects";
|
||||
homepage = "https://github.com/azubieta/xdg-utils-cxx";
|
||||
|
||||
@@ -30,14 +30,26 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-q2h5y0Asad+fGB9haO4Vg7a1ffO2JSb7czzlhmT3VmI=";
|
||||
};
|
||||
|
||||
# Use proper STREQUAL instead of EQUAL to compare strings
|
||||
# See: https://github.com/zeromq/libzmq/pull/4711
|
||||
patches = [
|
||||
# Use proper STREQUAL instead of EQUAL to compare strings
|
||||
# See: https://github.com/zeromq/libzmq/pull/4711
|
||||
(fetchpatch {
|
||||
url = "https://github.com/zeromq/libzmq/pull/4711/commits/55bd6b3df06734730d3012c17bc26681e25b549d.patch";
|
||||
hash = "sha256-/FVah+s7f1hWXv3MXkYfIiV1XAiMVDa0tmt4BQmSgmY=";
|
||||
name = "cacheline_undefined.patch";
|
||||
})
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
(fetchpatch {
|
||||
name = "zeromq-fix-cmake-4-1.patch";
|
||||
url = "https://github.com/zeromq/libzmq/commit/34f7fa22022bed9e0e390ed3580a1c83ac4a2834.patch";
|
||||
hash = "sha256-oauAZV6pThplcn2v9mQxhxlUhYgpbly0JBLYik+zoJE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "zeromq-fix-cmake-4-2.patch";
|
||||
url = "https://github.com/zeromq/libzmq/commit/b91a6201307b72beb522300366aad763d19b1456.patch";
|
||||
hash = "sha256-FKvZi7pTUx+wLUR8Suf+pRFg8I5OHpJ93gEmTxUrmO4=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -29,6 +29,16 @@ stdenv.mkDerivation rec {
|
||||
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/google/zopfli/pull/207>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 2.8.11)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 -t $out/share/doc/zopfli ../README*
|
||||
cp $src/src/zopfli/*.h $dev/include/
|
||||
|
||||
@@ -54,6 +54,16 @@ stdenv.mkDerivation rec {
|
||||
libxslt
|
||||
];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/dajobe/raptor/issues/75>
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)' \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "RDF Parser Toolkit";
|
||||
mainProgram = "rapper";
|
||||
|
||||
@@ -53,6 +53,22 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# headers are located in the dev output:
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail ' ''${CMAKE_INSTALL_PREFIX}/include' " ${placeholder "dev"}/include"
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See: <https://github.com/silnrsi/graphite/issues/98>
|
||||
badCmakeFiles=(
|
||||
CMakeLists.txt
|
||||
src/CMakeLists.txt
|
||||
tests/{bittwiddling,json,sparsetest,utftest}/CMakeLists.txt
|
||||
gr2fonttest/CMakeLists.txt
|
||||
)
|
||||
for file in "''${badCmakeFiles[@]}"; do
|
||||
substituteInPlace "$file" \
|
||||
--replace-fail \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)' \
|
||||
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)'
|
||||
done
|
||||
'';
|
||||
|
||||
cmakeFlags = lib.optionals static [
|
||||
|
||||
@@ -21,6 +21,14 @@ stdenv.mkDerivation {
|
||||
|
||||
propagatedBuildInputs = lib.optionals stdenv.cc.isClang [ openmp ];
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required (VERSION 2.8.5)' \
|
||||
'cmake_minimum_required (VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Video stabilization library";
|
||||
homepage = "http://public.hronopik.de/vid.stab/";
|
||||
|
||||
@@ -112,14 +112,19 @@ buildPythonApplication rec {
|
||||
"test_index"
|
||||
];
|
||||
|
||||
# Hardcode libclang paths
|
||||
postPatch = ''
|
||||
substituteInPlace hotdoc/extensions/c/c_extension.py \
|
||||
--replace "shutil.which('llvm-config')" 'True' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${lib.versions.major llvmPackages.libclang.version}"' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${lib.getLib llvmPackages.libclang}"' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${lib.getLib llvmPackages.libclang}/lib"'
|
||||
'';
|
||||
postPatch =
|
||||
# Hardcode libclang paths
|
||||
''
|
||||
substituteInPlace hotdoc/extensions/c/c_extension.py \
|
||||
--replace "shutil.which('llvm-config')" 'True' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${lib.versions.major llvmPackages.libclang.version}"' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${lib.getLib llvmPackages.libclang}"' \
|
||||
--replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${lib.getLib llvmPackages.libclang}/lib"'
|
||||
''
|
||||
# <https://github.com/MathieuDuponchelle/cmark/pull/2>
|
||||
+ ''
|
||||
patch -p1 -d cmark -i ${./fix-cmake-4.patch}
|
||||
'';
|
||||
|
||||
# Make pytest run from a temp dir to have it pick up installed package for cmark
|
||||
preCheck = ''
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From 60cac435fb801b3efce4f85643ac42cef5b22805 Mon Sep 17 00:00:00 2001
|
||||
From: Saleem Abdulrasool <compnerd@compnerd.org>
|
||||
Date: Sun, 22 Dec 2019 11:32:37 -0800
|
||||
Subject: [PATCH 1/2] build: chmod -x CMakeLists.txt (NFC)
|
||||
|
||||
Remove the unnecessary execute permission on CMakeLists.txt.
|
||||
---
|
||||
CMakeLists.txt | 0
|
||||
1 file changed, 0 insertions(+), 0 deletions(-)
|
||||
mode change 100755 => 100644 CMakeLists.txt
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
|
||||
From e922e337bf405b043788dd5febf9957e19d11300 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Mayo <aklhfex@gmail.com>
|
||||
Date: Wed, 13 Aug 2025 19:27:03 +0100
|
||||
Subject: [PATCH 2/2] CMake 4 compatibility
|
||||
|
||||
All CMake versions older than 3.10 are deprecated.
|
||||
---
|
||||
CMakeLists.txt | 17 ++---------------
|
||||
extensions/CMakeLists.txt | 2 +-
|
||||
2 files changed, 3 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ff97419f8..83d44f0a3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,12 +1,6 @@
|
||||
-cmake_minimum_required(VERSION 2.8.9)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
-# prevent ugly developer warnings because version is set directly, not through project()
|
||||
-# it should be redone properly by using VERSION in project() if on CMake 3.x
|
||||
-if(CMAKE_MAJOR_VERSION GREATER 2)
|
||||
- cmake_policy(SET CMP0048 OLD)
|
||||
-endif()
|
||||
-
|
||||
-project(cmark)
|
||||
+project(cmark VERSION 0.28.3)
|
||||
|
||||
include("FindAsan.cmake")
|
||||
|
||||
@@ -14,13 +8,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
|
||||
endif()
|
||||
|
||||
-set(PROJECT_NAME "cmark")
|
||||
-
|
||||
-set(PROJECT_VERSION_MAJOR 0)
|
||||
-set(PROJECT_VERSION_MINOR 28)
|
||||
-set(PROJECT_VERSION_PATCH 3)
|
||||
-set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} )
|
||||
-
|
||||
option(CMARK_TESTS "Build cmark tests and enable testing" ON)
|
||||
option(CMARK_STATIC "Build static libcmark library" ON)
|
||||
option(CMARK_SHARED "Build shared libcmark library" ON)
|
||||
diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt
|
||||
index e62d1550f..b6a1556e9 100644
|
||||
--- a/extensions/CMakeLists.txt
|
||||
+++ b/extensions/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.8)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
set(LIBRARY "cmarkextensions")
|
||||
set(LIBRARY_SOURCES
|
||||
core-extensions.c
|
||||
@@ -10,6 +10,7 @@
|
||||
fuse,
|
||||
openssl,
|
||||
tinyxml2,
|
||||
gtest,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -36,6 +37,7 @@ stdenv.mkDerivation rec {
|
||||
fuse
|
||||
openssl
|
||||
tinyxml2
|
||||
gtest
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
@@ -49,6 +51,12 @@ stdenv.mkDerivation rec {
|
||||
"-DUSE_INTERNAL_TINYXML=OFF"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DINSTALL_LIBENCFS=ON"
|
||||
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# Upstream is deprecated, so it won’t be fixed there. We should
|
||||
# probably phase this package out.
|
||||
"-DCMAKE_POLICY_VERSION_MINIMUM=3.10"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user