about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam A. Kennington III2015-09-16 21:20:29 -0700
committerWilliam A. Kennington III2015-09-16 21:20:49 -0700
commit318ac091b25f3231c01680769563ae5460b54057 (patch)
tree80b10bed96ae63f813cf521351490f128c428fd8
parent3faf5b53a571b37c6076a325a854781dc25d3a12 (diff)
ldns: Compat with perl 5.22
-rw-r--r--pkgs/development/libraries/ldns/default.nix9
-rw-r--r--pkgs/development/libraries/ldns/perl-5.22-compat.patch12
2 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/development/libraries/ldns/default.nix b/pkgs/development/libraries/ldns/default.nix
index b4dbbf792efa..b1f81549ef0c 100644
--- a/pkgs/development/libraries/ldns/default.nix
+++ b/pkgs/development/libraries/ldns/default.nix
@@ -8,11 +8,14 @@ stdenv.mkDerivation rec {
     sha256 = "1kf8pkwhcssvgzhh6ha1pjjiziwvwmfaali7kaafh6118mcy124b";
   };
 
-  patchPhase = ''
-    sed -i 's,\$(srcdir)/doc/doxyparse.pl,perl $(srcdir)/doc/doxyparse.pl,' Makefile.in
+  patches = [ ./perl-5.22-compat.patch ];
+
+  postPatch = ''
+    patchShebangs doc/doxyparse.pl
   '';
 
-  buildInputs = [ openssl perl ];
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ openssl ];
 
   configureFlags = [ "--with-ssl=${openssl}" "--with-drill" ];
 
diff --git a/pkgs/development/libraries/ldns/perl-5.22-compat.patch b/pkgs/development/libraries/ldns/perl-5.22-compat.patch
new file mode 100644
index 000000000000..ddf711cef5d8
--- /dev/null
+++ b/pkgs/development/libraries/ldns/perl-5.22-compat.patch
@@ -0,0 +1,12 @@
+diff -Naur old/doc/doxyparse.pl new/doc/doxyparse.pl
+--- old/doc/doxyparse.pl	2014-01-11 06:04:41.000000000 +0900
++++ new/doc/doxyparse.pl	2015-08-08 22:29:34.216889652 +0900
+@@ -273,7 +273,7 @@
+ 
+ 	print MAN $MAN_MIDDLE;
+ 
+-	if (defined(@$also)) {
++	if (@$also) {
+ 		print MAN "\n.SH SEE ALSO\n\\fI";
+ 		print MAN join "\\fR, \\fI", @$also;
+ 		print MAN "\\fR.\nAnd ";