From 0918b83c75d455bf24d6d541c6607c519d7d695b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 Nov 2011 16:47:18 +0000 Subject: [PATCH] * Added the Docbook 4.1 SGML DTDs. * Fixed the "docbook2man --sgml" command in docbook2x. * Fixed the module-init-tools manual pages. svn path=/nixpkgs/trunk/; revision=30165 --- .../sgml+xml/schemas/sgml-dtd/docbook/4.1.nix | 33 +++++++++++++++++++ .../linux/module-init-tools/default.nix | 6 ++-- pkgs/tools/typesetting/docbook2x/default.nix | 8 +++-- pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix diff --git a/pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix b/pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix new file mode 100644 index 000000000000..811515ee55b3 --- /dev/null +++ b/pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, unzip }: + +let + + src = fetchurl { + url = http://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip; + sha256 = "04b3gp4zkh9c5g9kvnywdkdfkcqx3kjc04j4mpkr4xk7lgqgrany"; + }; + + isoents = fetchurl { + url = http://www.oasis-open.org/cover/ISOEnts.zip; + sha256 = "1clrkaqnvc1ja4lj8blr0rdlphngkcda3snm7b9jzvcn76d3br6w"; + }; + +in + +stdenv.mkDerivation { + name = "docbook-sgml-4.1"; + + unpackPhase = "true"; + + buildInputs = [ unzip ]; + + installPhase = + '' + o=$out/sgml/dtd/docbook-4.1 + mkdir -p $o + cd $o + unzip ${src} + unzip ${isoents} + sed -e "s/iso-/ISO/" -e "s/.gml//" -i docbook.cat + ''; +} diff --git a/pkgs/os-specific/linux/module-init-tools/default.nix b/pkgs/os-specific/linux/module-init-tools/default.nix index d29b8bee5e47..79e1111d40d6 100644 --- a/pkgs/os-specific/linux/module-init-tools/default.nix +++ b/pkgs/os-specific/linux/module-init-tools/default.nix @@ -1,8 +1,8 @@ -{stdenv, fetchurl, docbook2x}: +{ stdenv, fetchurl, docbook2x, docbook_sgml_dtd_41 }: stdenv.mkDerivation rec { name = "module-init-tools-3.16"; - + src = fetchurl { url = "mirror://kernel/linux/utils/kernel/module-init-tools/${name}.tar.bz2"; sha256 = "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"; @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { buildInputs = [ docbook2x ]; + SGML_CATALOG_FILES = "${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat"; + patches = [ ./module-dir.patch ./docbook2man.patch ]; postInstall = "rm $out/sbin/insmod.static"; # don't need it diff --git a/pkgs/tools/typesetting/docbook2x/default.nix b/pkgs/tools/typesetting/docbook2x/default.nix index c02471d3e515..00dbe22aed35 100644 --- a/pkgs/tools/typesetting/docbook2x/default.nix +++ b/pkgs/tools/typesetting/docbook2x/default.nix @@ -1,10 +1,12 @@ { fetchurl, stdenv, texinfo, perl , XMLSAX, XMLParser, XMLNamespaceSupport -, groff, libxml2, libxslt, gnused, libiconv +, groff, libxml2, libxslt, gnused, libiconv, opensp +, docbook_xml_dtd_43 , makeWrapper }: stdenv.mkDerivation rec { name = "docbook2X-0.8.8"; + src = fetchurl { url = "mirror://sourceforge/docbook2x/${name}.tar.gz"; sha256 = "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"; @@ -15,7 +17,7 @@ stdenv.mkDerivation rec { patches = [ ./db2x_texixml-to-stdout.patch ]; buildInputs = [ perl texinfo groff libxml2 libxslt makeWrapper - XMLSAX XMLParser XMLNamespaceSupport + XMLSAX XMLParser XMLNamespaceSupport opensp ] ++ (if libiconv != null then [libiconv] else []); postConfigure = '' @@ -37,7 +39,7 @@ stdenv.mkDerivation rec { --prefix PERL5LIB : \ "${XMLNamespaceSupport}/lib/perl5/site_perl" \ --prefix XML_CATALOG_FILES "\ " \ - "$out/share/docbook2X/dtd/catalog.xml\ $out/share/docbook2X/xslt/catalog.xml" + "$out/share/docbook2X/dtd/catalog.xml\ $out/share/docbook2X/xslt/catalog.xml\ ${docbook_xml_dtd_43}/xml/dtd/docbook/catalog.xml" done wrapProgram $out/bin/sgml2xml-isoent --prefix PATH : \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53909c374a33..5ad6957b9376 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6180,6 +6180,8 @@ let docbook5 = callPackage ../data/sgml+xml/schemas/docbook-5.0 { }; + docbook_sgml_dtd_41 = callPackage ../data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix { }; + docbook_xml_dtd_412 = callPackage ../data/sgml+xml/schemas/xml-dtd/docbook/4.1.2.nix { }; docbook_xml_dtd_42 = callPackage ../data/sgml+xml/schemas/xml-dtd/docbook/4.2.nix { };