Merge pull request #30189 from jtojnar/docbook-xml-catalogs-hook
Rely on XML_CATALOG_FILES variable for DocBook
This commit is contained in:
commit
ca720961f5
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, which, autoreconfHook, ncurses, perl
|
{ stdenv, fetchFromGitHub, which, autoreconfHook, ncurses, perl
|
||||||
, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl }:
|
, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "20170912";
|
version = "20170912";
|
||||||
@ -12,19 +12,12 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0qndszmaihly3pp2wqiqm31nxbv9ys3j05kzffaqhzngfilmar9g";
|
sha256 = "0qndszmaihly3pp2wqiqm31nxbv9ys3j05kzffaqhzngfilmar9g";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook docbook_xsl libxslt.bin which ];
|
nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cyrus_sasl gss gpgme kerberos libidn ncurses
|
cyrus_sasl gss gpgme kerberos libidn ncurses
|
||||||
notmuch openssl perl lmdb
|
notmuch openssl perl lmdb
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
for f in doc/*.xsl ; do
|
|
||||||
substituteInPlace $f \
|
|
||||||
--replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-debug"
|
"--enable-debug"
|
||||||
"--enable-gpgme"
|
"--enable-gpgme"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{stdenv, fetchurl, unzip}:
|
{stdenv, fetchurl, unzip, findXMLCatalogs}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
inherit stdenv fetchurl unzip;
|
inherit stdenv fetchurl unzip findXMLCatalogs;
|
||||||
name = "docbook-xml-4.1.2";
|
name = "docbook-xml-4.1.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.docbook.org/xml/4.1.2/docbkx412.zip;
|
url = http://www.docbook.org/xml/4.1.2/docbkx412.zip;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{stdenv, fetchurl, unzip}:
|
{stdenv, fetchurl, unzip, findXMLCatalogs}:
|
||||||
|
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
inherit stdenv fetchurl unzip;
|
inherit stdenv fetchurl unzip findXMLCatalogs;
|
||||||
name = "docbook-xml-4.2";
|
name = "docbook-xml-4.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip;
|
url = http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{stdenv, fetchurl, unzip}:
|
{stdenv, fetchurl, unzip, findXMLCatalogs}:
|
||||||
|
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
inherit stdenv fetchurl unzip;
|
inherit stdenv fetchurl unzip findXMLCatalogs;
|
||||||
name = "docbook-xml-4.3";
|
name = "docbook-xml-4.3";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip;
|
url = http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{stdenv, fetchurl, unzip}:
|
{stdenv, fetchurl, unzip, findXMLCatalogs}:
|
||||||
|
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
inherit stdenv fetchurl unzip;
|
inherit stdenv fetchurl unzip findXMLCatalogs;
|
||||||
name = "docbook-xml-4.4";
|
name = "docbook-xml-4.4";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip;
|
url = http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{stdenv, fetchurl, unzip}:
|
{stdenv, fetchurl, unzip, findXMLCatalogs}:
|
||||||
|
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
inherit stdenv fetchurl unzip;
|
inherit stdenv fetchurl unzip findXMLCatalogs;
|
||||||
name = "docbook-xml-4.5";
|
name = "docbook-xml-4.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip;
|
url = http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, unzip, src, name, postInstall ? "true", meta ? {} }:
|
{ stdenv, fetchurl, unzip, src, name, postInstall ? "true", meta ? {}, findXMLCatalogs }:
|
||||||
|
|
||||||
assert unzip != null;
|
assert unzip != null;
|
||||||
|
|
||||||
@ -6,6 +6,7 @@ stdenv.mkDerivation {
|
|||||||
inherit src name postInstall;
|
inherit src name postInstall;
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
buildInputs = [unzip];
|
buildInputs = [unzip];
|
||||||
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
||||||
|
|
||||||
meta = meta // {
|
meta = meta // {
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchurl }:
|
{ lib, stdenv, fetchurl, findXMLCatalogs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -10,6 +10,8 @@ let
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ findXMLCatalogs ];
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -15,25 +15,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# Prevent the manpage builds from attempting to access the Internet.
|
|
||||||
prePatch = ''
|
|
||||||
substituteInPlace cmake_admin/CreateManpages.cmake --replace \
|
|
||||||
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
|
|
||||||
${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl
|
|
||||||
|
|
||||||
for xml in doc/*.xml.in; do
|
|
||||||
substituteInPlace "$xml" --replace \
|
|
||||||
http://www.docbook.org/xml/4.5/docbookx.dtd \
|
|
||||||
${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
#Temporarily remove drumstick-piano; Gives segment fault. Submitted ticket
|
#Temporarily remove drumstick-piano; Gives segment fault. Submitted ticket
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm $out/bin/drumstick-vpiano
|
rm $out/bin/drumstick-vpiano
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_45 ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsaLib doxygen fluidsynth qt5.qtbase qt5.qtsvg
|
alsaLib doxygen fluidsynth qt5.qtbase qt5.qtsvg
|
||||||
];
|
];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, perl, python, libxml2Python, libxslt, which
|
{ stdenv, fetchurl, autoreconfHook, pkgconfig, perl, python, libxml2Python, libxslt, which
|
||||||
, docbook_xml_dtd_43, docbook_xsl, gnome_doc_utils, dblatex, gettext, itstool }:
|
, docbook_xml_dtd_43, docbook_xsl, gnome_doc_utils, dblatex, gettext, itstool }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -10,29 +10,20 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y";
|
sha256 = "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./respect-xml-catalog-files-var.patch
|
||||||
|
];
|
||||||
|
|
||||||
outputDevdoc = "out";
|
outputDevdoc = "out";
|
||||||
|
|
||||||
# maybe there is a better way to pass the needed dtd and xsl files
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
# "-//OASIS//DTD DocBook XML V4.1.2//EN" and "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
|
|
||||||
preConfigure = ''
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
cat > $out/nix-support/catalog.xml << EOF
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
|
||||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
|
||||||
<nextCatalog catalog="${docbook_xsl}/xml/xsl/docbook/catalog.xml" />
|
|
||||||
<nextCatalog catalog="${docbook_xml_dtd_43}/xml/dtd/docbook/catalog.xml" />
|
|
||||||
</catalog>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
configureFlags="--with-xml-catalog=$out/nix-support/catalog.xml --disable-scrollkeeper";
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ pkgconfig perl python libxml2Python libxslt docbook_xml_dtd_43 docbook_xsl
|
[ pkgconfig perl python libxml2Python libxslt docbook_xml_dtd_43 docbook_xsl
|
||||||
gnome_doc_utils dblatex gettext which itstool
|
gnome_doc_utils dblatex gettext which itstool
|
||||||
];
|
];
|
||||||
|
|
||||||
|
configureFlags = "--disable-scrollkeeper";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.gtk.org/gtk-doc;
|
homepage = https://www.gtk.org/gtk-doc;
|
||||||
description = "Tools to extract documentation embedded in GTK+ and GNOME source code";
|
description = "Tools to extract documentation embedded in GTK+ and GNOME source code";
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
diff --git a/m4/gtkdoc_jh_check_xml_catalog.m4 b/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||||
|
index 618c1c9..1842a0d 100644
|
||||||
|
--- a/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||||
|
+++ b/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||||
|
@@ -10,7 +10,21 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||||
|
AC_MSG_RESULT([found])
|
||||||
|
ifelse([$3],,,[$3])
|
||||||
|
else
|
||||||
|
- AC_MSG_RESULT([not found])
|
||||||
|
- ifelse([$4],,[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],[$4])
|
||||||
|
+ jh_check_xml_catalog_saved_ifs="$IFS"
|
||||||
|
+ IFS=' '
|
||||||
|
+ for f in $XML_CATALOG_FILES; do
|
||||||
|
+ if [[ -f "$f" ]] && \
|
||||||
|
+ AC_RUN_LOG([$XMLCATALOG --noout "$f" "$1" >&2]); then
|
||||||
|
+ jh_found_xmlcatalog=true
|
||||||
|
+ AC_MSG_RESULT([found])
|
||||||
|
+ ifelse([$3],,,[$3])
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ IFS="$jh_check_xml_catalog_saved_ifs"
|
||||||
|
+ if ! $jh_found_xmlcatalog; then
|
||||||
|
+ AC_MSG_RESULT([not found])
|
||||||
|
+ ifelse([$4],,[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],[$4])
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
])
|
@ -80,10 +80,6 @@ stdenv.mkDerivation rec {
|
|||||||
# Drop examples, since they contain non-ASCII characters that break docbook2x :(
|
# Drop examples, since they contain non-ASCII characters that break docbook2x :(
|
||||||
sed -i 's/ Example: .*$//' doc/config_settings.xml
|
sed -i 's/ Example: .*$//' doc/config_settings.xml
|
||||||
|
|
||||||
substituteInPlace cmake/Docbook.cmake \
|
|
||||||
--replace "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/html/docbook.xsl"
|
|
||||||
substituteInPlace doc/docs.xml \
|
|
||||||
--replace "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" "${docbook_xml_dtd_44}/xml/dtd/docbook/docbookx.dtd"
|
|
||||||
substituteInPlace cmake/Conky.cmake --replace "#set(RELEASE true)" "set(RELEASE true)"
|
substituteInPlace cmake/Conky.cmake --replace "#set(RELEASE true)" "set(RELEASE true)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -91,7 +87,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ glib cmake libXinerama ]
|
buildInputs = [ glib cmake libXinerama ]
|
||||||
++ optionals docsSupport [ docbook2x libxslt man less ]
|
++ optionals docsSupport [ docbook2x docbook_xsl docbook_xml_dtd_44 libxslt man less ]
|
||||||
++ optional ncursesSupport ncurses
|
++ optional ncursesSupport ncurses
|
||||||
++ optional x11Support xlibsWrapper
|
++ optional x11Support xlibsWrapper
|
||||||
++ optional xdamageSupport libXdamage
|
++ optional xdamageSupport libXdamage
|
||||||
|
@ -12,14 +12,13 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig docbook_xsl ];
|
||||||
buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap python ];
|
buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap python ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
chmod +w ./scripts/gen-offsets.sh
|
chmod +w ./scripts/gen-offsets.sh
|
||||||
substituteInPlace ./scripts/gen-offsets.sh --replace hexdump ${utillinux}/bin/hexdump
|
substituteInPlace ./scripts/gen-offsets.sh --replace hexdump ${utillinux}/bin/hexdump
|
||||||
substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" ""
|
substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" ""
|
||||||
substituteInPlace ./Documentation/Makefile --replace "--skip-validation" "--skip-validation -x ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
|
|
||||||
substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl.dev}/include/libnl3"
|
substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl.dev}/include/libnl3"
|
||||||
substituteInPlace ./Makefile --replace "tar-name := $(shell git tag -l v$(CRIU_VERSION))" "tar-name = 2.0" # --replace "-Werror" ""
|
substituteInPlace ./Makefile --replace "tar-name := $(shell git tag -l v$(CRIU_VERSION))" "tar-name = 2.0" # --replace "-Werror" ""
|
||||||
ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto
|
ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto
|
||||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
cmake perl curl gtest lzma bzip2 lz4 db dpkg libxslt.bin
|
cmake perl curl gtest lzma bzip2 lz4 db dpkg libxslt.bin
|
||||||
] ++ lib.optionals withDocs [
|
] ++ lib.optionals withDocs [
|
||||||
doxygen Po4a w3m
|
doxygen Po4a w3m docbook_xml_dtd_45
|
||||||
] ++ lib.optionals withNLS [
|
] ++ lib.optionals withNLS [
|
||||||
gettext
|
gettext
|
||||||
];
|
];
|
||||||
@ -44,15 +44,6 @@ stdenv.mkDerivation rec {
|
|||||||
-DWITH_DOC=${if withDocs then "ON" else "OFF"}
|
-DWITH_DOC=${if withDocs then "ON" else "OFF"}
|
||||||
-DUSE_NLS=${if withNLS then "ON" else "OFF"}
|
-DUSE_NLS=${if withNLS then "ON" else "OFF"}
|
||||||
)
|
)
|
||||||
|
|
||||||
for f in doc/*; do
|
|
||||||
if [[ -f "$f" ]]; then
|
|
||||||
substituteInPlace "$f" \
|
|
||||||
--replace \
|
|
||||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
|
|
||||||
"${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user