From patchwork Mon Oct 9 20:06:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54700 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3A21D27BBEC; Mon, 9 Oct 2023 22:20:06 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 90B3227BBE2 for ; Mon, 9 Oct 2023 22:20:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpxfJ-0008Mq-6W; Mon, 09 Oct 2023 17:19:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpxfB-0008Cu-Bh for guix-patches@gnu.org; Mon, 09 Oct 2023 17:19:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpxfB-0007Au-3a for guix-patches@gnu.org; Mon, 09 Oct 2023 17:19:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpxfV-0007hp-RO for guix-patches@gnu.org; Mon, 09 Oct 2023 17:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 58/63] gnu: libstdc++-doc: Build libstdc++ info documentation. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 21:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.169688635029516 (code B ref 65479); Mon, 09 Oct 2023 21:20:01 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 21:19:10 +0000 Received: from localhost ([127.0.0.1]:33582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpxee-0007fj-B5 for submit@debbugs.gnu.org; Mon, 09 Oct 2023 17:19:10 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:57188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpxeb-0007eU-17 for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 17:19:07 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 54C8F20B12 for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 23:17:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C588D8009B; Mon, 9 Oct 2023 23:17:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ajfdvXHtUi5O; Mon, 9 Oct 2023 23:17:41 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 545B38009C; Mon, 9 Oct 2023 23:17:41 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:06:46 +0100 Message-ID: <73f6e74f995bbe804146590a19be22d022524e74.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch: New file. * gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch: Ditto. * gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch: Ditto. * gnu/local.mk: Register them. * gnu/packages/gcc.scm (gcc-5)[source]: Use gcc-5.5.0-libstdc++-xmlcatalog.patch, gcc-13.2.0-libstdc++-docbook-xsl-uri.patch and gcc-13.2.0-libstdc++-info-install-fix.patch. (gcc-9)[source]: Use gcc-13.2.0-libstdc++-docbook-xsl-uri.patch and gcc-13.2.0-libstdc++-info-install-fix.patch. (make-libstdc++-doc)[arguments]<#:phases>: Remove 'set-xsl-directory. Adjust 'build and 'install for info documentation and to respect make-flags. [native-inputs]: Add docbook2x. --- gnu/local.mk | 3 + gnu/packages/gcc.scm | 38 +- ...gcc-13.2.0-libstdc++-docbook-xsl-uri.patch | 50 +++ ...cc-13.2.0-libstdc++-info-install-fix.patch | 70 +++ .../gcc-5.5.0-libstdc++-xmlcatalog.patch | 402 ++++++++++++++++++ 5 files changed, 542 insertions(+), 21 deletions(-) create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch create mode 100644 gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0ffbc0755f..ce850c9f7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1233,6 +1233,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-5-fix-powerpc64le-build.patch \ %D%/packages/patches/gcc-5-source-date-epoch-1.patch \ %D%/packages/patches/gcc-5-source-date-epoch-2.patch \ + %D%/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch \ %D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch \ %D%/packages/patches/gcc-6-cross-environment-variables.patch \ %D%/packages/patches/gcc-6-source-date-epoch-1.patch \ @@ -1251,6 +1252,8 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-12-cross-environment-variables.patch \ %D%/packages/patches/gcc-10-tree-sra-union-handling.patch \ %D%/packages/patches/gcc-11-libstdc++-powerpc.patch \ + %D%/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch \ + %D%/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch \ %D%/packages/patches/gcolor3-update-libportal-usage.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 2bb76c0a02..a983fd040a 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -498,6 +498,9 @@ (define-public gcc-5 "gcc-5.0-libvtv-runpath.patch" "gcc-5-source-date-epoch-1.patch" "gcc-5-source-date-epoch-2.patch" + "gcc-5.5.0-libstdc++-xmlcatalog.patch" + "gcc-13.2.0-libstdc++-docbook-xsl-uri.patch" + "gcc-13.2.0-libstdc++-info-install-fix.patch" "gcc-6-libsanitizer-mode-size.patch" "gcc-fix-texi2pod.patch" "gcc-5-hurd.patch" @@ -682,7 +685,9 @@ (define-public gcc-9 (sha256 (base32 "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7")) - (patches (search-patches "gcc-9-strmov-store-file-names.patch" + (patches (search-patches "gcc-13.2.0-libstdc++-docbook-xsl-uri.patch" + "gcc-13.2.0-libstdc++-info-install-fix.patch" + "gcc-9-strmov-store-file-names.patch" "gcc-9-asan-fix-limits-include.patch" "gcc-5.0-libvtv-runpath.patch")) (modules '((guix build utils))) @@ -1325,6 +1330,7 @@ (define (make-libstdc++-doc gcc) libxslt docbook-xml docbook-xsl + docbook2x graphviz)) ;for 'dot', invoked by 'doxygen' (inputs '()) (propagated-inputs '()) @@ -1337,28 +1343,18 @@ (define (make-libstdc++-doc gcc) (add-before 'configure 'chdir (lambda _ (chdir "libstdc++-v3"))) - (add-before 'configure 'set-xsl-directory - (lambda _ - (substitute* (find-files "doc" - "^Makefile\\.in$") - (("@XSL_STYLE_DIR@") - (string-append #$(this-package-native-input "docbook-xsl") - "/xml/xsl/" - (strip-store-file-name docbook)))))) (replace 'build - (lambda _ - ;; XXX: There's also a 'doc-info' target, but it - ;; relies on docbook2X, which itself relies on - ;; DocBook 4.1.2, which is not really usable - ;; (lacks a catalog.xml.) - (invoke "make" - "doc-html" - "doc-man"))) + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke `("make" ,@make-flags + "doc-info" + "doc-html" + "doc-man")))) (replace 'install - (lambda _ - (invoke "make" - "doc-install-html" - "doc-install-man")))))) + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke `("make" ,@make-flags + "doc-install-info" + "doc-install-html" + "doc-install-man"))))))) (properties (alist-delete 'hidden? (package-properties gcc))))) (define-public libstdc++-doc-5 diff --git a/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch b/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch new file mode 100644 index 0000000000..9252b6920a --- /dev/null +++ b/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch @@ -0,0 +1,50 @@ +# Upstreamed + +From 2748b8df7a241c5fd6a7c2de6621c5cc56bb6ae1 Mon Sep 17 00:00:00 2001 +Message-Id: <2748b8df7a241c5fd6a7c2de6621c5cc56bb6ae1.1692808412.git.mirai@makinata.eu> +In-Reply-To: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu> +References: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu> +From: Bruno Victal +Date: Mon, 21 Aug 2023 20:58:43 +0100 +Subject: [PATCH 2/2] libstdc++: Update docbook xsl URI. + +The URI for namespaced docbook-xsl was updated to reflect the current +DocBook upstream at . + +libstdc++-v3/Changelog: + * acinclude.m4: Update docbook xsl URI. + * configure: Regenerate. +--- + libstdc++-v3/acinclude.m4 | 2 +- + libstdc++-v3/configure | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 +index b25378eaace..152811fd00d 100644 +--- a/libstdc++-v3/acinclude.m4 ++++ b/libstdc++-v3/acinclude.m4 +@@ -604,7 +604,7 @@ dnl XSL_STYLE_DIR + dnl + AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [ + +-glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/ ++glibcxx_docbook_url=http://cdn.docbook.org/release/xsl/current/ + + AC_MSG_CHECKING([for local stylesheet directory]) + glibcxx_local_stylesheets=no +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index c4da56c3042..d967b137ea1 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -73923,7 +73923,7 @@ fi + + + +-glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/ ++glibcxx_docbook_url=http://cdn.docbook.org/release/xsl/current/ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5 + $as_echo_n "checking for local stylesheet directory... " >&6; } +-- +2.40.1 + diff --git a/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch b/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch new file mode 100644 index 0000000000..abc4cc877f --- /dev/null +++ b/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch @@ -0,0 +1,70 @@ +# Upstreamed + +From 2db0606adfdb800f3fcc95f2cb6c13ff76246e5f Mon Sep 17 00:00:00 2001 +Message-Id: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu> +From: Bruno Victal +Date: Mon, 21 Aug 2023 20:58:22 +0100 +Subject: [PATCH 1/2] libstdc++: Fix 'doc-install-info' rule. + +The info manual isn't moved to the expected location after +generation which causes the install rule for it to fail. + +libstdc++-v3/Changelog: + + * doc/Makefile.in: Regenerate. + * doc/Makefile.am: Fix 'doc-install-info' rule. + Fix typo in commment. +--- + libstdc++-v3/doc/Makefile.am | 4 ++-- + libstdc++-v3/doc/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am +index 8371441c62e..373522d593d 100644 +--- a/libstdc++-v3/doc/Makefile.am ++++ b/libstdc++-v3/doc/Makefile.am +@@ -598,7 +598,7 @@ stamp-pdf-docbook: doc-pdf-docbook-pre doc-xml-single-docbook + doc-pdf-docbook: stamp-pdf-docbook + + # TEXINFO, via docbook2X +-# NB: Both experimental and tempermental ++# NB: Both experimental and temperamental + manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi + manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info + DB2TEXI_FLAGS = \ +@@ -615,7 +615,7 @@ stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo + + stamp-info-docbook: stamp-texinfo-docbook + @echo "Generating info files..." +- $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} ++ $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info} + $(STAMP) stamp-info-docbook + + doc-texinfo-docbook: stamp-texinfo-docbook +diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in +index 21ad8557f7a..c19e3e3044c 100644 +--- a/libstdc++-v3/doc/Makefile.in ++++ b/libstdc++-v3/doc/Makefile.in +@@ -645,7 +645,7 @@ manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf + DBLATEX_FLAGS = --verbose --pdf --dump --debug --tmpdir=${docbook_outdir}/latex + + # TEXINFO, via docbook2X +-# NB: Both experimental and tempermental ++# NB: Both experimental and temperamental + manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi + manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info + DB2TEXI_FLAGS = \ +@@ -1096,7 +1096,7 @@ stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo + + stamp-info-docbook: stamp-texinfo-docbook + @echo "Generating info files..." +- $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} ++ $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info} + $(STAMP) stamp-info-docbook + + doc-texinfo-docbook: stamp-texinfo-docbook + +base-commit: f9ff6fa58217294d63f255dd02abfcc8a074f509 +-- +2.40.1 + diff --git a/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch b/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch new file mode 100644 index 0000000000..473e08e240 --- /dev/null +++ b/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch @@ -0,0 +1,402 @@ +From 7f792d2acc0d3eeb95c6f8e0acd72ae304cec9be Mon Sep 17 00:00:00 2001 +Message-Id: <7f792d2acc0d3eeb95c6f8e0acd72ae304cec9be.1692813549.git.mirai@makinata.eu> +From: Jonathan Wakely +Date: Wed, 27 Feb 2019 11:25:44 +0000 +Subject: [PATCH] PR libstdc++/89466 avoid slow xsltproc command in configure + +Note: Backported from a4395a846a9343960714568e7cf8af4425e63a50. + +Certain broken versions of xsltproc ignore the --nonet option and will +attempt to fetch the docbook stylesheet from the WWW when it isn't in +the local XML catalog. + +This patch checks for the local stylesheet directory first, and doesn't +use xsltproc if no local stylesheets are found. Checking for the local +directory is done using xmlcatalog if available, only checking the +hardcoded list of directories if xmlcatalog fails. The right directory +for Suse is added to the hardcoded list. + +This should avoid doing an xsltproc check that would need to download +the stylesheet, so no network connection is made even if a broken +xsltproc is present. + + PR libstdc++/89466 + * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local + stylesheet directories before check for xsltproc. Try to use + xmlcatalog to find local stylesheet directory before trying hardcoded + paths. Add path used by suse to hardcoded paths. Adjust xsltproc + check to look for the same stylesheet as doc/Makefile.am uses. Don't + use xsltproc if xmlcatalog fails to find a local stylesheet. + * configure.ac: Check for xmlcatalog. + * Makefile.in: Regenerate. + * configure: Likewise. + * doc/Makefile.in: Likewise. + * include/Makefile.in: Likewise. + * libsupc++/Makefile.in: Likewise. + * po/Makefile.in: Likewise. + * python/Makefile.in: Likewise. + * src/Makefile.in: Likewise. + * src/c++11/Makefile.in: Likewise. + * src/c++98/Makefile.in: Likewise. + * src/filesystem/Makefile.in: Likewise. + * testsuite/Makefile.in: Likewise. + +From-SVN: r269249 +Modified-by: Bruno Victal +--- + libstdc++-v3/Makefile.in | 1 + + libstdc++-v3/acinclude.m4 | 47 +++++++------ + libstdc++-v3/configure | 90 +++++++++++++++++++------ + libstdc++-v3/configure.ac | 1 + + libstdc++-v3/doc/Makefile.in | 1 + + libstdc++-v3/include/Makefile.in | 1 + + libstdc++-v3/libsupc++/Makefile.in | 1 + + libstdc++-v3/po/Makefile.in | 1 + + libstdc++-v3/python/Makefile.in | 1 + + libstdc++-v3/src/Makefile.in | 1 + + libstdc++-v3/src/c++11/Makefile.in | 1 + + libstdc++-v3/src/c++98/Makefile.in | 1 + + libstdc++-v3/src/filesystem/Makefile.in | 1 + + libstdc++-v3/testsuite/Makefile.in | 1 + + 14 files changed, 109 insertions(+), 40 deletions(-) + +diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in +index a9451e19a96..6aee8281f77 100644 +--- a/libstdc++-v3/Makefile.in ++++ b/libstdc++-v3/Makefile.in +@@ -230,6 +230,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 +index 18b7b6638ec..fde3fb6da6e 100644 +--- a/libstdc++-v3/acinclude.m4 ++++ b/libstdc++-v3/acinclude.m4 +@@ -674,34 +674,43 @@ dnl XSL_STYLE_DIR + dnl + AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [ + +-AC_MSG_CHECKING([for docbook stylesheets for documentation creation]) +-glibcxx_stylesheets=no +-if test x${XSLTPROC} = xyes && echo '' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then +- glibcxx_stylesheets=yes +-fi +-AC_MSG_RESULT($glibcxx_stylesheets) ++glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/ + + AC_MSG_CHECKING([for local stylesheet directory]) + glibcxx_local_stylesheets=no +-if test x"$glibcxx_stylesheets" = x"yes"; then +- if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets +- fi +- if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns +- fi +- if test -d /usr/share/xml/docbook/stylesheet/nwalsh5/current; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh5/current +- fi ++if test x${XMLCATALOG} = xyes && xsl_style_dir=`xmlcatalog "" $glibcxx_docbook_url 2>/dev/null` ++then ++ XSL_STYLE_DIR=`echo $xsl_style_dir | sed -n 's;^file://;;p'` ++ glibcxx_local_stylesheets=yes ++else ++ for dir in \ ++ /usr/share/sgml/docbook/xsl-ns-stylesheets \ ++ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns \ ++ /usr/share/xml/docbook/stylesheet/nwalsh5/current \ ++ /usr/share/xml/docbook/stylesheet/nwalsh/current ++ do ++ if test -d $dir; then ++ glibcxx_local_stylesheets=yes ++ XSL_STYLE_DIR=$dir ++ break ++ fi ++ done + fi + AC_MSG_RESULT($glibcxx_local_stylesheets) + + if test x"$glibcxx_local_stylesheets" = x"yes"; then + AC_SUBST(XSL_STYLE_DIR) + AC_MSG_NOTICE($XSL_STYLE_DIR) ++ ++ AC_MSG_CHECKING([for docbook stylesheets for documentation creation]) ++ glibcxx_stylesheets=no ++ if test x${XMLCATALOG} = xno || xmlcatalog "" $glibcxx_docbook_url/xhtml/docbook.xsl >/dev/null 2>&1; then ++ if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude $glibcxx_docbook_url/xhtml/docbook.xsl - 2>/dev/null; then ++ glibcxx_stylesheets=yes ++ fi ++ fi ++ AC_MSG_RESULT($glibcxx_stylesheets) ++ + else + glibcxx_stylesheets=no + fi +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index a51dfe6eb13..0c462490b81 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -634,6 +634,7 @@ BUILD_EPUB_TRUE + XSL_STYLE_DIR + XMLLINT + XSLTPROC ++XMLCATALOG + DOT + DOXYGEN + BUILD_INFO_FALSE +@@ -79678,6 +79679,44 @@ fi + + + # Check for docbook ++# Extract the first word of "xmlcatalog", so it can be a program name with args. ++set dummy xmlcatalog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_XMLCATALOG+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$XMLCATALOG"; then ++ ac_cv_prog_XMLCATALOG="$XMLCATALOG" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_XMLCATALOG="yes" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++ test -z "$ac_cv_prog_XMLCATALOG" && ac_cv_prog_XMLCATALOG="no" ++fi ++fi ++XMLCATALOG=$ac_cv_prog_XMLCATALOG ++if test -n "$XMLCATALOG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCATALOG" >&5 ++$as_echo "$XMLCATALOG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ + # Extract the first word of "xsltproc", so it can be a program name with args. + set dummy xsltproc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +@@ -79756,31 +79795,28 @@ fi + + + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook stylesheets for documentation creation" >&5 +-$as_echo_n "checking for docbook stylesheets for documentation creation... " >&6; } +-glibcxx_stylesheets=no +-if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then +- glibcxx_stylesheets=yes +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5 +-$as_echo "$glibcxx_stylesheets" >&6; } ++glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5 + $as_echo_n "checking for local stylesheet directory... " >&6; } + glibcxx_local_stylesheets=no +-if test x"$glibcxx_stylesheets" = x"yes"; then +- if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets +- fi +- if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns +- fi +- if test -d /usr/share/xml/docbook/stylesheet/nwalsh5/current; then +- glibcxx_local_stylesheets=yes +- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh5/current +- fi ++if test x${XMLCATALOG} = xyes && xsl_style_dir=`xmlcatalog "" $glibcxx_docbook_url 2>/dev/null` ++then ++ XSL_STYLE_DIR=`echo $xsl_style_dir | sed -n 's;^file://;;p'` ++ glibcxx_local_stylesheets=yes ++else ++ for dir in \ ++ /usr/share/sgml/docbook/xsl-ns-stylesheets \ ++ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns \ ++ /usr/share/xml/docbook/stylesheet/nwalsh5/current \ ++ /usr/share/xml/docbook/stylesheet/nwalsh/current ++ do ++ if test -d $dir; then ++ glibcxx_local_stylesheets=yes ++ XSL_STYLE_DIR=$dir ++ break ++ fi ++ done + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_local_stylesheets" >&5 + $as_echo "$glibcxx_local_stylesheets" >&6; } +@@ -79789,6 +79825,18 @@ if test x"$glibcxx_local_stylesheets" = x"yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: $XSL_STYLE_DIR" >&5 + $as_echo "$as_me: $XSL_STYLE_DIR" >&6;} ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook stylesheets for documentation creation" >&5 ++$as_echo_n "checking for docbook stylesheets for documentation creation... " >&6; } ++ glibcxx_stylesheets=no ++ if test x${XMLCATALOG} = xno || xmlcatalog "" $glibcxx_docbook_url/xhtml/docbook.xsl >/dev/null 2>&1; then ++ if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude $glibcxx_docbook_url/xhtml/docbook.xsl - 2>/dev/null; then ++ glibcxx_stylesheets=yes ++ fi ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5 ++$as_echo "$glibcxx_stylesheets" >&6; } ++ + else + glibcxx_stylesheets=no + fi +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 580fb8b2eb8..92a18b88135 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -422,6 +422,7 @@ AC_CHECK_PROG([DOXYGEN], doxygen, yes, no) + AC_CHECK_PROG([DOT], dot, yes, no) + + # Check for docbook ++AC_CHECK_PROG([XMLCATALOG], xmlcatalog, yes, no) + AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no) + AC_CHECK_PROG([XMLLINT], xmllint, yes, no) + GLIBCXX_CONFIGURE_DOCBOOK +diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in +index 4690fad8ac6..522a96c681d 100644 +--- a/libstdc++-v3/doc/Makefile.in ++++ b/libstdc++-v3/doc/Makefile.in +@@ -202,6 +202,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + + # Validate existing XML structure. + XMLLINT = xmllint +diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in +index 591301add5f..c28b1f4504f 100644 +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -202,6 +202,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in +index 8f627c6bcd3..5f63c6c0f72 100644 +--- a/libstdc++-v3/libsupc++/Makefile.in ++++ b/libstdc++-v3/libsupc++/Makefile.in +@@ -273,6 +273,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in +index 5bcf4da7fa5..cabd3f3368c 100644 +--- a/libstdc++-v3/po/Makefile.in ++++ b/libstdc++-v3/po/Makefile.in +@@ -202,6 +202,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in +index 26eb2abfb19..c1f46c02ea1 100644 +--- a/libstdc++-v3/python/Makefile.in ++++ b/libstdc++-v3/python/Makefile.in +@@ -232,6 +232,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index 5221a5d5c29..e0c7bab1e78 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -265,6 +265,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in +index 4f92d71d19c..88a2dd5c7a0 100644 +--- a/libstdc++-v3/src/c++11/Makefile.in ++++ b/libstdc++-v3/src/c++11/Makefile.in +@@ -235,6 +235,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in +index 8dca17f360e..58ea47a9db6 100644 +--- a/libstdc++-v3/src/c++98/Makefile.in ++++ b/libstdc++-v3/src/c++98/Makefile.in +@@ -236,6 +236,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in +index f8f0180f9ba..c7c997686cb 100644 +--- a/libstdc++-v3/src/filesystem/Makefile.in ++++ b/libstdc++-v3/src/filesystem/Makefile.in +@@ -244,6 +244,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in +index 4f67a37966d..d7417fe5a1f 100644 +--- a/libstdc++-v3/testsuite/Makefile.in ++++ b/libstdc++-v3/testsuite/Makefile.in +@@ -202,6 +202,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ + VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ + WARN_FLAGS = @WARN_FLAGS@ + WERROR = @WERROR@ ++XMLCATALOG = @XMLCATALOG@ + XMLLINT = @XMLLINT@ + XSLTPROC = @XSLTPROC@ + XSL_STYLE_DIR = @XSL_STYLE_DIR@ +-- +2.40.1 +