The Nix expression for kdiff3 did not build with KDE 4.5.2; with the attached 
patch it now builds.

The version of the DocBook XML DTD in some language versions of the 
documentation was 4.1.2 and it seems that version no longer validates with the 
newer KDE 4.5.2 XML definitions.  

I wonder if we might not find the same problem in some other Nix expressions.

Note that I have not tested to see whether with the patch kdiff3 still builds 
against KDE 4.4; I am not sure if that is necessary or if NixPkgs is no longer 
supporting KDE 4.4 .

From 39f728f0c28291ce0787f8ee650cc2a2d00078f3 Mon Sep 17 00:00:00 2001
From: Karn Kallio <kkal...@eka.(none)>
Date: Mon, 18 Oct 2010 22:51:17 -0430
Subject: [PATCH] Patch kdiff3 so it will build with KDE 4.5.2

The DocBook DTD version must be at least 4.2 for validation.  Add a patch
to change version number in the DOCTYPE.
---
 .../kdiff3/adjust-docbook-xml-version-to-4.2.patch |   45 ++++++++++++++++++++
 pkgs/tools/text/kdiff3/default.nix                 |    3 +
 2 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100644 pkgs/tools/text/kdiff3/adjust-docbook-xml-version-to-4.2.patch

diff --git a/pkgs/tools/text/kdiff3/adjust-docbook-xml-version-to-4.2.patch b/pkgs/tools/text/kdiff3/adjust-docbook-xml-version-to-4.2.patch
new file mode 100644
index 0000000..ca5ce96
--- /dev/null
+++ b/pkgs/tools/text/kdiff3/adjust-docbook-xml-version-to-4.2.patch
@@ -0,0 +1,45 @@
+The DocBook DTD must be 4.2 to validate with KDE 4.5.2.  In the upstream release 0.9.95 
+of kdiff3 some languages have index.docbook with the 4.1.2 DTD.  This patch changes
+the version number in the DOCTYPE to 4.2 for these languages.
+
+
+diff -Naur kdiff3-upstream-0.9.95/doc/de/index.docbook kdiff3-0.9.95/doc/de/index.docbook
+--- kdiff3-upstream-0.9.95/doc/de/index.docbook	2010-10-18 22:38:40.043252907 -0430
++++ kdiff3-0.9.95/doc/de/index.docbook	2010-10-18 22:41:05.954329524 -0430
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" ?>
+-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
++<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+   <!ENTITY kdiff3 "<application
+ >KDiff3</application
+ >">
+diff -Naur kdiff3-upstream-0.9.95/doc/fr/index.docbook kdiff3-0.9.95/doc/fr/index.docbook
+--- kdiff3-upstream-0.9.95/doc/fr/index.docbook	2010-10-18 22:38:40.043252907 -0430
++++ kdiff3-0.9.95/doc/fr/index.docbook	2010-10-18 22:41:05.965408604 -0430
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" ?>
+-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
++<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+   <!ENTITY kdiff3 "<application
+ >KDiff3</application
+ >">
+diff -Naur kdiff3-upstream-0.9.95/doc/it/index.docbook kdiff3-0.9.95/doc/it/index.docbook
+--- kdiff3-upstream-0.9.95/doc/it/index.docbook	2010-10-18 22:38:40.044252773 -0430
++++ kdiff3-0.9.95/doc/it/index.docbook	2010-10-18 22:41:05.976408528 -0430
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" ?>
+-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
++<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+   <!ENTITY kdiff3 "<application
+ >KDiff3</application
+ >">
+diff -Naur kdiff3-upstream-0.9.95/doc/nl/index.docbook kdiff3-0.9.95/doc/nl/index.docbook
+--- kdiff3-upstream-0.9.95/doc/nl/index.docbook	2010-10-18 22:38:40.043252907 -0430
++++ kdiff3-0.9.95/doc/nl/index.docbook	2010-10-18 22:41:05.986408860 -0430
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" ?>
+-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
++<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+   <!ENTITY kdiff3 "<application
+ >KDiff3</application
+ >">
diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix
index 1a313ca..3aacb6f 100644
--- a/pkgs/tools/text/kdiff3/default.nix
+++ b/pkgs/tools/text/kdiff3/default.nix
@@ -12,6 +12,9 @@ stdenv.mkDerivation {
   # kdebase allows having a konqueror plugin built
   buildInputs = [ cmake qt4 perl kdelibs automoc4 phonon gettext kdebase ];
 
+  # Adjust the version of the DocBook XML to 4.2 ( so that it validates ).
+  patches = [ ./adjust-docbook-xml-version-to-4.2.patch ];
+
   meta = {
     homepage = http://kdiff3.sourceforge.net/;
     license = "GPLv2+";
-- 
1.7.3.1

_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to