about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/judy
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/judy')
-rw-r--r--nixpkgs/pkgs/development/libraries/judy/cross.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/judy/default.nix28
2 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/judy/cross.patch b/nixpkgs/pkgs/development/libraries/judy/cross.patch
new file mode 100644
index 000000000000..a4e53c08a6d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/judy/cross.patch
@@ -0,0 +1,22 @@
+--- a/src/Judy1/Makefile.am
++++ b/src/Judy1/Makefile.am
+@@ -18,7 +18,7 @@
+ libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
+ 
+ Judy1Tables.c: Judy1TablesGen.c
+-	$(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
++	$(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
+ 
+ Judy1ByCount.c:../JudyCommon/JudyByCount.c
+ 	cp -f ../JudyCommon/JudyByCount.c      		Judy1ByCount.c   
+--- a/src/JudyL/Makefile.am
++++ b/src/JudyL/Makefile.am
+@@ -18,7 +18,7 @@
+ libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
+ 
+ JudyLTables.c: JudyLTablesGen.c
+-	$(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen 
++	$(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen 
+ 
+ JudyLByCount.c:   ../JudyCommon/JudyByCount.c
+ 	cp -f ../JudyCommon/JudyByCount.c      		JudyLByCount.c   
diff --git a/nixpkgs/pkgs/development/libraries/judy/default.nix b/nixpkgs/pkgs/development/libraries/judy/default.nix
new file mode 100644
index 000000000000..618aee498466
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/judy/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkgsBuildBuild, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "judy";
+  version = "1.0.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/judy/Judy-${version}.tar.gz";
+    sha256 = "1sv3990vsx8hrza1mvq3bhvv9m6ff08y4yz7swn6znszz24l0w6j";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];
+  patches = [ ./cross.patch ];
+
+  # Disable parallel builds as manpages lack some dependencies:
+  #    ../tool/jhton ext/JudyHS_funcs_3.htm | grep -v '^[   ]*$' | sed -e 's/\.C//' > man/man3/JudyHS_funcs
+  #    make[2]: *** No rule to make target 'man/man3/JSLD', needed by 'all-am'.  Stop.
+  # Let's wait for the upstream fix similar to https://sourceforge.net/p/judy/patches/4/
+  enableParallelBuilding = false;
+
+  meta = {
+    homepage = "https://judy.sourceforge.net/";
+    license = lib.licenses.lgpl21Plus;
+    description = "State-of-the-art C library that implements a sparse dynamic array";
+    platforms = lib.platforms.unix;
+  };
+}