diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix index d6049d2845137..df9782cc65ce6 100644 --- a/pkgs/development/libraries/clucene-core/2.x.nix +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -48,6 +48,8 @@ stdenv.mkDerivation rec { url = "https://869170.bugs.gentoo.org/attachment.cgi?id=858825"; hash = "sha256-TbAfBKdXh+1HepZc8J6OhK1XGwhwBCMvO8QBDsad998="; }) + ] ++ lib.optionals (stdenv.isDarwin && !stdenv.targetPlatform.isx86_64) [ + ./fix-darwin-aarch64.patch ]; # see https://github.com/macports/macports-ports/commit/236d43f2450c6be52dc42fd3a2bbabbaa5136201 diff --git a/pkgs/development/libraries/clucene-core/fix-darwin-aarch64.patch b/pkgs/development/libraries/clucene-core/fix-darwin-aarch64.patch new file mode 100644 index 0000000000000..2adff4b1a48b4 --- /dev/null +++ b/pkgs/development/libraries/clucene-core/fix-darwin-aarch64.patch @@ -0,0 +1,47 @@ +--- a/src/shared/CMakeLists.txt ++++ b/src/shared/CMakeLists.txt +@@ -103,34 +103,20 @@ CHECK_OPTIONAL_FUNCTIONS( wcsupr wcscasecmp wcsicmp wcstoll wprintf lltow + ) + + #make decisions about which functions to use... +-CHOOSE_FUNCTION(fileHandleStat "fstati64;_fstati64;fstat64;fstat;_fstat") ++CHOOSE_FUNCTION(fileHandleStat "fstat;_fstat") + IF ( _CL_HAVE_FUNCTION_FSTATI64 OR _CL_HAVE_FUNCTION__FSTATI64 OR _CL_HAVE_FUNCTION_FSTAT64 ) + SET ( USE_STAT64 1 ) + ENDIF ( _CL_HAVE_FUNCTION_FSTATI64 OR _CL_HAVE_FUNCTION__FSTATI64 OR _CL_HAVE_FUNCTION_FSTAT64 ) + +-IF ( USE_STAT64 ) +- CHOOSE_FUNCTION(fileStat "stati64;_stati64;stat64;stat;_stat") +- CHOOSE_FUNCTION(fileSize "filelengthi64;_filelengthi64;filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") +- CHOOSE_FUNCTION(fileSeek "lseeki64;_lseeki64;lseek64;lseek;_lseek") +- CHOOSE_MISC(TYPE_CL_STAT_T +- HAVE_TYPE_CL_STAT_T +- "struct stati64 x\;" "#define cl_stat_t stati64" "stati64" +- "struct _stati64 x\;" "#define cl_stat_t _stati64" "_stati64" +- "struct stat64 x\;" "#define cl_stat_t stat64" "stat64" +- "struct stat x\;" "#define cl_stat_t stat" "stat" +- "struct _stat x\;" "#define cl_stat_t _stat" "_stat" +- ) +-ELSE( USE_STAT64 ) +- #borland doesn't have a fstat64, so we have to fallback to non 64 bit everything... +- CHOOSE_FUNCTION(fileStat "stat;_stat") +- CHOOSE_FUNCTION(fileSize "filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") +- CHOOSE_FUNCTION(fileSeek "lseek;_lseek") +- CHOOSE_MISC(TYPE_CL_STAT_T +- HAVE_TYPE_CL_STAT_T +- "struct stat x\;" "#define cl_stat_t stat" "stat" +- "struct _stat x\;" "#define cl_stat_t _stat" "_stat" +- ) +-ENDIF( USE_STAT64 ) ++#borland doesn't have a fstat64, so we have to fallback to non 64 bit everything... ++CHOOSE_FUNCTION(fileStat "stat;_stat") ++CHOOSE_FUNCTION(fileSize "filelength;_filelength" "#define fileSize CL_NS(util)::Misc::filelength") ++CHOOSE_FUNCTION(fileSeek "lseek;_lseek") ++CHOOSE_MISC(TYPE_CL_STAT_T ++ HAVE_TYPE_CL_STAT_T ++ "struct stat x\;" "#define cl_stat_t stat" "stat" ++ "struct _stat x\;" "#define cl_stat_t _stat" "_stat" ++ ) + + #ftell (and probably soon ftell64) are POSIX standard functions, but tell and + #tell64 are not, so we define fileTell in terms of fileSeek. diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index 185f38d2e0be8..ff7daaedf811a 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -66,6 +66,14 @@ stdenv.mkDerivation rec { url = "https://salsa.debian.org/debian/dovecot/-/raw/debian/1%252.3.19.1+dfsg1-2/debian/patches/Support-openssl-3.0.patch"; hash = "sha256-PbBB1jIY3jIC8Js1NY93zkV0gISGUq7Nc67Ul5tN7sw="; }) + (fetchpatch { + url = "https://github.com/dovecot/core/commit/6b2eb995da62b8eca9d8f713bd5858d3d9be8062.patch?full_index=1"; + hash = "sha256-7XlLDrWlwsWNddSyVdAUPn3eA55NpF//qtPAsIfXJHQ="; + }) + (fetchpatch { + url = "https://github.com/dovecot/core/commit/eca7b6b9984dd1cb5fcd28f7ebccaa5301aead1e.patch?full_index=1"; + hash = "sha256-s7GpZQySJRavOL8t4BmGYaQSOD+gE7m6Tc3OMHhb3TM="; + }) ] ++ lib.optionals stdenv.isDarwin [ # fix timespec calls ./timespec.patch