Patchwork [CONSOLIDATED,25,July,PULL,6/7] docbook-dsssl-stylesheets-native: Add SYSROOT_PREPROCESS_FUNC

login
register
mail settings
Submitter Saul Wold
Date July 25, 2011, 7:30 a.m.
Message ID <a4b8591a283717239cae976004eee86b2b65082b.1311578785.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/8415/
State New, archived
Headers show

Comments

Saul Wold - July 25, 2011, 7:30 a.m.
[YOCTO #1250]

This added function will install a private install-catalog binary so that shared state
can find the binary as there is not a guarantee.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../docbook-dsssl-stylesheets-native_1.79.bb       |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
Phil Blundell - July 25, 2011, 3:33 p.m.
On Mon, 2011-07-25 at 00:30 -0700, Saul Wold wrote:
>  SSTATEPOSTINSTFUNCS += "docbook_dsssl_stylesheets_sstate_postinst"
> +SYSROOT_PREPROCESS_FUNCS += "docbook_dsssl_sysroot_preprocess"
> +
>  
>  do_install () {
>  	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-dsssl.html
> @@ -42,8 +44,14 @@ docbook_dsssl_stylesheets_sstate_postinst () {
>  	then
>  		# Ensure that the catalog file sgml-docbook.cat is properly
>  		# updated when the package is installed from sstate cache.
> -		install-catalog \
> +		${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
>  			--add ${sysconfdir}/sgml/sgml-docbook.cat \
>  			${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
>  	fi
>  }
> +
> +docbook_dsssl_sysroot_preprocess () {
> +    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
> +    install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl
> +}
> +

This sort of thing seems like it might be better done in a class of some
kind rather than replicating the code in N separate recipes.

p.

Patch

diff --git a/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb b/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
index 88d24dd..a776ea5 100644
--- a/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
+++ b/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://README;beginline=41;endline=74;md5=875385159b2ee76ecf
 
 DEPENDS = "sgml-common-native"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-dsssl-${PV}.tar.bz2"
 
@@ -19,6 +19,8 @@  S = "${WORKDIR}/docbook-dsssl-${PV}"
 inherit native
 
 SSTATEPOSTINSTFUNCS += "docbook_dsssl_stylesheets_sstate_postinst"
+SYSROOT_PREPROCESS_FUNCS += "docbook_dsssl_sysroot_preprocess"
+
 
 do_install () {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-dsssl.html
@@ -42,8 +44,14 @@  docbook_dsssl_stylesheets_sstate_postinst () {
 	then
 		# Ensure that the catalog file sgml-docbook.cat is properly
 		# updated when the package is installed from sstate cache.
-		install-catalog \
+		${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
 			--add ${sysconfdir}/sgml/sgml-docbook.cat \
 			${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
 	fi
 }
+
+docbook_dsssl_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+    install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl
+}
+