about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorYureka <yuka@yuka.dev>2023-02-20 08:20:52 +0100
committerGitHub <noreply@github.com>2023-02-20 08:20:52 +0100
commitab28fd0173ba84e355118e4761c1acb900654369 (patch)
tree42eb056118d61c739492d05444587e1523901366 /pkgs
parent91cfaa255c6ee4df0234294035346abffbb4cdd3 (diff)
clucene_core_2: fix build with musl and gcc>=11 (#217146)
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/clucene-core/2.x.nix4
-rw-r--r--pkgs/development/libraries/clucene-core/fix-darwin.patch13
-rw-r--r--pkgs/development/libraries/clucene-core/pthread-include.patch14
3 files changed, 18 insertions, 13 deletions
diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix
index d928b814e826f..fbc23af6427e0 100644
--- a/pkgs/development/libraries/clucene-core/2.x.nix
+++ b/pkgs/development/libraries/clucene-core/2.x.nix
@@ -37,6 +37,10 @@ stdenv.mkDerivation rec {
     ./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:
diff --git a/pkgs/development/libraries/clucene-core/fix-darwin.patch b/pkgs/development/libraries/clucene-core/fix-darwin.patch
index c06413f3c2e13..cb47a4f3763f0 100644
--- a/pkgs/development/libraries/clucene-core/fix-darwin.patch
+++ b/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/pkgs/development/libraries/clucene-core/pthread-include.patch b/pkgs/development/libraries/clucene-core/pthread-include.patch
new file mode 100644
index 0000000000000..73a168c132f41
--- /dev/null
+++ b/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;
+
+