Skip to contentSkip to conversation

libxslt: Avoid regenerating manpage during "make install"

PATCH New Phil Blundell 1 participant 1 message Apr 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxslt: Avoid regenerating manpage during "make install"

The timestamps in libxslt-1.1.28.tar.gz (specifically) are rather hokey, making the source files for the documentation appear newer than the generated output:

-rw-rw-r-- 500/500 16307 2012-11-21 07:22 libxslt-1.1.28/doc/xsltproc.xml

-rw-rw-r-- 500/500        7082 2012-09-12 07:24 libxslt-1.1.28/doc/xsltproc2.html
-rw-rw-r-- 500/500        9475 2012-09-04 15:26 libxslt-1.1.28/doc/xsltproc.html
-rw-rw-r-- 500/500        8256 2012-11-21 06:03 libxslt-1.1.28/doc/xsltproc.1

This causes make to decide that xsltproc.1 needs to be regenerated during the installation process. However, this requires a native xsltproc binary which may not be available, leading to errors like:

| make[2]: /usr/bin/xsltproc: Command not found
| make[2]: [xsltproc.1] Error 127 (ignored)

Adding DEPENDS_class-target = "libxslt-native", or installing xsltproc in the host environment, fixes the above but the documentation still doesn't build:

| I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
| warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
| error
| xsltParseStylesheetFile : cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
| compilation error: file ./xsltproc.xml line 10 element refentry
| xsltParseStylesheetProcess : document is not a stylesheet

And in any case, requiring libxslt-native would increase build time for no real benefit. So, let's just adjust the timestamp on the shipped copy of xsltproc.1 to make it appear newer than the source files.

---
 meta/recipes-support/libxslt/libxslt_1.1.28.bb |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-support/libxslt/libxslt_1.1.28.bb +4 -0
index 3f89e78..887f290 100644
@@ -21,6 +22,10 @@ inherit autotools pkgconfig binconfig lib_package
 # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
 do_configure_prepend () {
 	sed -i -e 's/ansidecl.h//' ${S}/configure.in
+
+	# The timestamps in the 1.1.28 tarball are messed up causing this file to
+	# appear out of date.  Touch it so that we don't try to regenerate it.
+	touch ${S}/doc/xsltproc.1
 }
 
 EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
Signature · 1 line
1.7.10.4