Docbook2X: Fix --to-stdout' option of docbook2texi', fix Perl dependencies

of all the perl scripts, add dependency on Texinfo since `makeinfo' can be
invoked directly by `docbook2texi --info'.

svn path=/nixpkgs/trunk/; revision=11083
This commit is contained in:
Ludovic Courtès 2008-03-12 15:19:54 +00:00
parent be448d64fe
commit 2d75587897
3 changed files with 43 additions and 9 deletions

View File

@ -0,0 +1,15 @@
--- docbook2X-0.8.8/perl/db2x_texixml.pl 2006-04-20 05:02:31.000000000 +0200
+++ docbook2X-0.8.8/perl/db2x_texixml.pl 2008-03-12 15:36:55.000000000 +0100
@@ -432,8 +432,12 @@ sub texi_openfile {
$openstr = '>-';
}
} else {
+ if(not $self->{options}->{'to-stdout'}) {
$openstr .= '> ' . shell_quote($filename);
print "$filename\n"
if $self->{options}->{'list-files'};
+ } else {
+ $openstr = '>-';
+ }
}
}

View File

@ -1,4 +1,5 @@
{ fetchurl, stdenv, perl, perlXMLSAX
{ fetchurl, stdenv, texinfo, perl
, perlXMLSAX, perlXMLParser, perlXMLNamespaceSupport
, groff, libxml2, libxslt, gnused
, makeWrapper }:
@ -9,16 +10,33 @@ stdenv.mkDerivation rec {
sha256 = "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0";
};
buildInputs = [ perl groff libxml2 libxslt makeWrapper ];
propagatedBuildInputs = [ perlXMLSAX ];
# This patch makes sure that `docbook2texi --to-stdout' actually
# writes its output to stdout instead of creating a file.
patches = [ ./db2x_texixml-to-stdout.patch ];
buildInputs = [ perl texinfo groff libxml2 libxslt makeWrapper
perlXMLSAX perlXMLParser perlXMLNamespaceSupport ];
postConfigure = ''
# Broken substitution is used for `perl/config.pl', which leaves literal
# `$prefix' in it.
substituteInPlace "perl/config.pl" \
--replace '${"\$" + "{prefix}"}' "$out"
'';
postInstall = ''
perl_programs="db2x_manxml db2x_texixml db2x_xsltproc
docbook2man docbook2texi";
for i in $perl_programs
perlPrograms="db2x_manxml db2x_texixml db2x_xsltproc
docbook2man docbook2texi";
for i in $perlPrograms
do
wrapProgram $out/bin/$i --prefix PERL5LIB : \
"${perlXMLSAX}/lib/site_perl"
# XXX: We work around the fact that `wrapProgram' doesn't support
# spaces below by inserting escaped backslashes.
wrapProgram $out/bin/$i --prefix PERL5LIB : \
"${perlXMLSAX}/lib/site_perl:${perlXMLParser}/lib/site_perl" \
--prefix PERL5LIB : \
"${perlXMLNamespaceSupport}/lib/site_perl" \
--prefix XML_CATALOG_FILES "\ " \
"$out/share/docbook2X/dtd/catalog.xml\ $out/share/docbook2X/xslt/catalog.xml"
done
wrapProgram $out/bin/sgml2xml-isoent --prefix PATH : \

View File

@ -504,7 +504,8 @@ rec {
});
docbook2x = import ../tools/typesetting/docbook2x {
inherit fetchurl stdenv perl perlXMLSAX
inherit fetchurl stdenv texinfo perl
perlXMLSAX perlXMLParser perlXMLNamespaceSupport
gnused groff libxml2 libxslt makeWrapper;
};