From 827fd3637f0902de4da3d02f1f0eaad7d29a31e63ec147a3502c9b7000b64d68 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 3 Feb 2009 21:42:12 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/asciidoc?expand=0&rev=18 --- a2x-missing-package-msg.diff | 67 ++++++++++++++++++++++++++++++++++++ asciidoc.changes | 5 +++ asciidoc.spec | 6 +++- 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 a2x-missing-package-msg.diff diff --git a/a2x-missing-package-msg.diff b/a2x-missing-package-msg.diff new file mode 100644 index 0000000..398c7a6 --- /dev/null +++ b/a2x-missing-package-msg.diff @@ -0,0 +1,67 @@ +Index: a2x +=================================================================== +--- a2x.orig ++++ a2x +@@ -143,8 +143,14 @@ function is_executable() + # Return 127 if $1 is not in search path else return 0. + function require() + { ++ local pkg + if ! is_executable "$1"; then +- quit "cannot find required program: $1" 127 ++ if [ -n "$2" ]; then ++ pkg="$2" ++ else ++ pkg="$1" ++ fi ++ quit "cannot find required program: $1; install the missing package '$pkg'" 127 + fi + } + +@@ -479,7 +485,7 @@ function to_docbook() + + function to_xhtml() + { +- require "xsltproc" ++ require "xsltproc" "libxslt" + local xsl xml html + xsl=$(conf_file docbook-xsl/xhtml.xsl) + if [ ! -r "$xsl" ]; then +@@ -497,7 +503,7 @@ function to_xhtml() + + function to_chunked() + { +- require "xsltproc" ++ require "xsltproc" "libxslt" + local chunkdir xsl xml hhp chm + case "$FORMAT" in + chunked) +@@ -534,7 +540,7 @@ function to_chunked() + + function to_manpage() + { +- require "xsltproc" ++ require "xsltproc" "libxslt" + local xsl xml + xsl=$(conf_file docbook-xsl/manpage.xsl) + if [ ! -r "$xsl" ]; then +@@ -564,8 +570,8 @@ function run_fop() + local xsl xml fo pdf + xml="$SRC_DIR/$SRC_NAME.xml" + pdf="$DESTINATION_DIR/$SRC_NAME.pdf" +- require "xsltproc" +- require "$FOP_COMMAND" ++ require "xsltproc" "libxslt" ++ require "$FOP_COMMAND" "fop" + xsl=$(conf_file docbook-xsl/fo.xsl) + if [ ! -r "$xsl" ]; then + quit "file not found: $xsl" +@@ -613,7 +619,7 @@ function to_text() + -o - \"$SRC_FILE\" | lynx -dump -stdin >\"$text\"" + else + require "w3m" +- require "xsltproc" ++ require "xsltproc" "libxslt" + xsl=$(conf_file docbook-xsl/text.xsl) + execute_command_2 "asciidoc $ASCIIDOC_OPTS -f \"$conf\" -b docbook \ + -o - \"$SRC_FILE\" \ diff --git a/asciidoc.changes b/asciidoc.changes index bfd2774..1af0e49 100644 --- a/asciidoc.changes +++ b/asciidoc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 30 08:19:54 CET 2009 - tiwai@suse.de + +- Additional error message about missing package in a2x + ------------------------------------------------------------------- Wed Jan 21 14:56:14 CET 2009 - tiwai@suse.de diff --git a/asciidoc.spec b/asciidoc.spec index fdd1098..54d33e3 100644 --- a/asciidoc.spec +++ b/asciidoc.spec @@ -21,7 +21,7 @@ Name: asciidoc Summary: Text-Based Document Generation Version: 8.3.3 -Release: 2 +Release: 3 License: GPL v2 or later Group: Development/Tools/Doc Generators Requires: python >= 2.3 @@ -36,6 +36,7 @@ Patch0: asciidoc-vim-fix.diff Patch1: asciidoc-8.2.6-no-safe-check.diff Patch2: asciidoc-a2x-fop-fix.diff Patch3: asciidoc-ignore-deprecation.diff +Patch4: a2x-missing-package-msg.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -70,6 +71,7 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 %build @@ -109,6 +111,8 @@ rm -rf $RPM_BUILD_ROOT %doc doc examples %changelog +* Fri Jan 30 2009 tiwai@suse.de +- Additional error message about missing package in a2x * Wed Jan 21 2009 tiwai@suse.de - Don't require fop and libxslt but use recommends as asciidoc itself can work without these packages. They are needed only