shadow: rely on propagated findXMLCatalogs hook
shadow uses a copy of m4 from gtk-doc so we need to apply the same
fix as in 407db7b019
.
Also patch it to use the correct DocBook version.
This commit is contained in:
parent
a5c04ea774
commit
e2e3f6b6a6
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2
|
||||
, docbook_xml_dtd_412, docbook_xsl, gnome-doc-utils, flex, bison
|
||||
, docbook_xml_dtd_45, docbook_xsl, gnome-doc-utils, flex, bison
|
||||
, pam ? null, glibcCross ? null
|
||||
}:
|
||||
|
||||
@ -30,12 +30,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = stdenv.lib.optional (pam != null && stdenv.isLinux) pam;
|
||||
nativeBuildInputs = [autoreconfHook libxslt libxml2
|
||||
docbook_xml_dtd_412 docbook_xsl gnome-doc-utils flex bison
|
||||
docbook_xml_dtd_45 docbook_xsl gnome-doc-utils flex bison
|
||||
];
|
||||
|
||||
patches =
|
||||
[ ./keep-path.patch
|
||||
# Obtain XML resources from XML catalog (patch adapted from gtk-doc)
|
||||
./respect-xml-catalog-files-var.patch
|
||||
dots_in_usernames
|
||||
|
||||
# Check for correct DocBook version during configure
|
||||
# https://github.com/shadow-maint/shadow/pull/162
|
||||
(fetchpatch {
|
||||
url = "https://github.com/shadow-maint/shadow/commit/47797ca6654f79e3de854a6c69db2bdb0516db08.patch";
|
||||
sha256 = "1zn8f6fd26gj5sh60099xqc7mjwgbbkkic5xfigvxa4b90vm8fd7";
|
||||
})
|
||||
];
|
||||
|
||||
# The nix daemon often forbids even creating set[ug]id files.
|
||||
@ -52,11 +61,6 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
export ac_cv_func_setpgrp_void=yes
|
||||
export shadow_cv_logdir=/var/log
|
||||
(
|
||||
head -n -1 "${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"
|
||||
tail -n +3 "${docbook_xsl}/share/xml/docbook-xsl/catalog.xml"
|
||||
) > xmlcatalog
|
||||
configureFlags="$configureFlags --with-xml-catalog=$PWD/xmlcatalog ";
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
|
@ -0,0 +1,30 @@
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index dd01f165..e23160ee 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -46,9 +46,21 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||
ifelse([$3],,,[$3
|
||||
])dnl
|
||||
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
|
||||
])
|
Loading…
Reference in New Issue
Block a user