about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/judy
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-02-22 10:43:06 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-11 16:17:56 +0000
commitca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch)
tree55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/judy
parente4df5a52a6a6531f32626f57205356a773ac2975 (diff)
parent93883402a445ad467320925a0a5dbe43a949f25b (diff)
downloadnixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts:
	nixpkgs/nixos/modules/programs/ssh.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/data/fonts/noto-fonts/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/libraries/mesa/default.nix
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.nix10
2 files changed, 26 insertions, 6 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
index bec72ac80206..da8e89f93565 100644
--- a/nixpkgs/pkgs/development/libraries/judy/default.nix
+++ b/nixpkgs/pkgs/development/libraries/judy/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchurl}:
+{ lib, stdenv, fetchurl, pkgsBuildBuild, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   pname = "judy";
@@ -9,11 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "1sv3990vsx8hrza1mvq3bhvv9m6ff08y4yz7swn6znszz24l0w6j";
   };
 
-  # gcc 4.8 optimisations break judy.
-  # https://sourceforge.net/p/judy/mailman/message/31995144/
-  preConfigure = lib.optionalString stdenv.cc.isGNU ''
-    configureFlagsArray+=("CFLAGS=-fno-strict-aliasing -fno-aggressive-loop-optimizations")
-  '';
+  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