lxterminal: patch m4 to respect XML_CATALOG_FILES

The patch removes the need for a separate script to combine existing
catalog files, making the package simpler.
This commit is contained in:
Tyler Compton 2018-01-02 00:58:20 -07:00
parent b1d1679d5c
commit a5880ace7f
4 changed files with 20 additions and 28 deletions

View file

@ -1,6 +1,5 @@
{ stdenv, fetchurl, automake, autoconf, intltool, pkgconfig, gtk2, vte { stdenv, fetchurl, automake, autoconf, intltool, pkgconfig, gtk2, vte
, libxslt, docbook_xml_dtd_412, docbook_xml_xslt, libxml2, findXMLCatalogs , libxslt, docbook_xml_dtd_412, docbook_xml_xslt, libxml2, findXMLCatalogs
, buildSingleXMLCatalog
}: }:
let version = "0.3.1"; in let version = "0.3.1"; in
@ -15,12 +14,15 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--enable-man" "--enable-man"
"--with-xml-catalog=../catalog.xml" # Generated by buildSingleXMLCatalog
]; ];
buildInputs = [ buildInputs = [
automake autoconf intltool pkgconfig gtk2 vte libxslt docbook_xml_dtd_412 automake autoconf intltool pkgconfig gtk2 vte libxslt docbook_xml_dtd_412
docbook_xml_xslt libxml2 findXMLCatalogs buildSingleXMLCatalog docbook_xml_xslt libxml2 findXMLCatalogs
];
patches = [
./respect-xml-catalog-files-var.patch
]; ];
preConfigure = '' preConfigure = ''

View file

@ -0,0 +1,15 @@
diff --git a/acinclude.m4 b/acinclude.m4
index be626c5..b449b1b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
[
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
- if $jh_found_xmlcatalog && \
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
AC_MSG_RESULT([found])
ifelse([$3],,,[$3
])dnl

View file

@ -1,21 +0,0 @@
# Creates a single XML catalog that references the catalogs found by
# findXMLCatalogs.
# Useful for situations where only one catalog is expected.
buildSingleXMLCatalog() {
echo '<?xml version="1.0"?>' > catalog.xml
echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' >> catalog.xml
catalogs=$(echo $XML_CATALOG_FILES | tr " " "\n")
for x in $catalogs
do
echo ' <nextCatalog catalog="'$x'" />' >> catalog.xml
done
echo '</catalog>' >> catalog.xml
}
if [ -z "$buildSingleXMLCatalogHookDone" ]; then
buildSingleXMLCatalogHookDone=1
envHooks+=(buildSingleXMLCatalog)
fi

View file

@ -359,10 +359,6 @@ with pkgs;
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh; findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
buildSingleXMLCatalog = makeSetupHook {
deps = [ findXMLCatalogs ];
} ../build-support/setup-hooks/build-single-xml-catalog.sh;
wrapGAppsHook = makeSetupHook { wrapGAppsHook = makeSetupHook {
deps = [ gnome3.dconf.lib gnome3.gtk librsvg makeWrapper ]; deps = [ gnome3.dconf.lib gnome3.gtk librsvg makeWrapper ];
} ../build-support/setup-hooks/wrap-gapps-hook.sh; } ../build-support/setup-hooks/wrap-gapps-hook.sh;