diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/clucene-core | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/clucene-core')
5 files changed, 79 insertions, 22 deletions
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix index 861e9179e094..18d055a387ac 100644 --- a/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix +++ b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix @@ -30,17 +30,24 @@ stdenv.mkDerivation rec { "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT=" ]; - patches = # From debian - [ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch - ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch - ./Install-contribs-lib.patch - ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; + patches = [ + # From debian + ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch + ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch + ./Install-contribs-lib.patch + # From arch + ./fix-missing-include-time.patch + + # required for darwin and linux-musl + ./pthread-include.patch + + ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; # fails with "Unable to find executable: # /build/clucene-core-2.3.3.4/build/bin/cl_test" doCheck = false; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; meta = with lib; { description = "Core library for full-featured text search engine"; @@ -54,7 +61,7 @@ stdenv.mkDerivation rec { CLucene is a port of the very popular Java Lucene text search engine API. ''; - homepage = "http://clucene.sourceforge.net"; + homepage = "https://clucene.sourceforge.net"; platforms = platforms.unix; license = with licenses; [ asl20 lgpl2 ]; }; diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/default.nix b/nixpkgs/pkgs/development/libraries/clucene-core/default.nix index 58c24069a3a4..b6765af12a4c 100644 --- a/nixpkgs/pkgs/development/libraries/clucene-core/default.nix +++ b/nixpkgs/pkgs/development/libraries/clucene-core/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./gcc6.patch ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { CLucene is a port of the very popular Java Lucene text search engine API. ''; - homepage = "http://clucene.sourceforge.net"; + homepage = "https://clucene.sourceforge.net"; platforms = platforms.unix; license = with licenses; [ asl20 lgpl2 ]; }; diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch b/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch index c06413f3c2e1..cb47a4f3763f 100644 --- a/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch +++ b/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch @@ -1,16 +1,3 @@ ---- a/src/shared/CLucene/LuceneThreads.h -+++ b/src/shared/CLucene/LuceneThreads.h -@@ -7,6 +7,9 @@ - #ifndef _LuceneThreads_h - #define _LuceneThreads_h - -+#if defined(_CL_HAVE_PTHREAD) -+ #include <pthread.h> -+#endif - - CL_NS_DEF(util) - class CLuceneThreadIdCompare; - --- a/src/shared/CLucene/config/repl_tchar.h +++ b/src/shared/CLucene/config/repl_tchar.h @@ -28,26 +28,26 @@ diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch b/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch new file mode 100644 index 000000000000..0ac26f76929a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch @@ -0,0 +1,49 @@ +From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sbergman@redhat.com> +Date: Wed, 12 Oct 2022 08:40:49 +0200 +Subject: [PATCH] Fix missing #include <time.h> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +At least on recent Fedora 37 beta, building now failed with + +> CLucene/document/DateTools.cpp:26:19: error: ‘gmtime’ was not declared in this scope +> 26 | tm *ptm = gmtime(&secs); +> | ^~~~~~ + +etc. + +As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id: +https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672 +20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out +_CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for +anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools +and deprecating DateField. DateTools still requires some testing and its own +unit testing" on 2008-06-29 had introduced this use of it (into then +src/CLucene/document/DateTools.H). And apparently most build environments have +silently been happy ever since when the dead leading check for +_CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the +following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not +<time.h>. +--- + src/shared/CLucene/clucene-config.h.cmake | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake +index bd8683a5..6fe0f92b 100644 +--- a/src/shared/CLucene/clucene-config.h.cmake ++++ b/src/shared/CLucene/clucene-config.h.cmake +@@ -100,8 +100,7 @@ ${SYMBOL__T} + //#cmakedefine _CL_STAT_MACROS_BROKEN + + /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +-//not actually used for anything... +-//#cmakedefine _CL_TIME_WITH_SYS_TIME 1 ++#cmakedefine _CL_TIME_WITH_SYS_TIME 1 + + /* Define that we will be using -fvisibility=hidden, and + * make public classes visible using __attribute__ ((visibility("default"))) +-- +2.37.3 + diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch b/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch new file mode 100644 index 000000000000..73a168c132f4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch @@ -0,0 +1,14 @@ +--- a/src/shared/CLucene/LuceneThreads.h ++++ b/src/shared/CLucene/LuceneThreads.h +@@ -7,6 +7,9 @@ + #ifndef _LuceneThreads_h + #define _LuceneThreads_h + ++#if defined(_CL_HAVE_PTHREAD) ++ #include <pthread.h> ++#endif + + CL_NS_DEF(util) + class CLuceneThreadIdCompare; + + |