diff options
-rw-r--r-- | recipes/sgml-common/sgml-common-native_0.6.3.bb | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/recipes/sgml-common/sgml-common-native_0.6.3.bb b/recipes/sgml-common/sgml-common-native_0.6.3.bb index 67f1710a4f..9c33968f35 100644 --- a/recipes/sgml-common/sgml-common-native_0.6.3.bb +++ b/recipes/sgml-common/sgml-common-native_0.6.3.bb @@ -1,37 +1,49 @@ SECTION = "base" DEPENDS = "" +PR = "r1" SRC_URI[md5sum] = "103c9828f24820df86e55e7862e28974" SRC_URI[sha256sum] = "7dc418c1d361123ffc5e45d61f1b97257940a8eb35d0bfbbc493381cc5b1f959" S = "${WORKDIR}/sgml-common-${PV}" +SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle" require sgml-common_${PV}.bb inherit native do_install () { - : -} -do_stage () { # For unknown reasons 'make install' does not work. - install -m 0755 bin/install-catalog ${STAGING_BINDIR_NATIVE}/ - install -m 0755 bin/sgmlwhich ${STAGING_BINDIR_NATIVE}/ - install -d ${sysconfdir}/sgml - install -m 0644 config/sgml.conf ${sysconfdir}/sgml - install -d ${STAGING_DATADIR}/sgml - install -m 0644 xml.dcl ${STAGING_DATADIR}/sgml/ - install -d ${STAGING_DATADIR}/sgml/xml-iso-entities-8879.1986 - install -m 0644 xml-iso-entities/catalog ${STAGING_DATADIR}/sgml/xml-iso-entities-8879.1986/ - install -m 0644 xml-iso-entities/*.ent ${STAGING_DATADIR}/sgml/xml-iso-entities-8879.1986/ - install -d ${STAGING_DATADIR}/sgml/sgml-iso-entities-8879.1986 - install -m 0644 sgml-iso-entities/catalog ${STAGING_DATADIR}/sgml/sgml-iso-entities-8879.1986/ - install -m 0644 sgml-iso-entities/*.ent ${STAGING_DATADIR}/sgml/sgml-iso-entities-8879.1986/ - install-catalog \ - --add ${sysconfdir}/sgml/sgml-ent.cat ${STAGING_DATADIR}/sgml/sgml-iso-entities-8879.1986/catalog - install-catalog \ - --add ${sysconfdir}/sgml/sgml-docbook.cat ${sysconfdir}/sgml/sgml-ent.cat + install -d ${D}${bindir}/ + install -m 0755 bin/install-catalog ${D}${bindir}/ + install -m 0755 bin/sgmlwhich ${D}${bindir}/ + install -d ${D}${sysconfdir}/sgml/ + install -m 0644 config/sgml.conf ${D}${sysconfdir}/sgml + install -d ${D}${datadir}/sgml + install -m 0644 xml.dcl ${D}${datadir}/sgml/ + install -d ${D}${datadir}/sgml/xml-iso-entities-8879.1986 + install -m 0644 xml-iso-entities/catalog ${D}${datadir}/sgml/xml-iso-entities-8879.1986/ + install -m 0644 xml-iso-entities/*.ent ${D}${datadir}/sgml/xml-iso-entities-8879.1986/ + install -d ${D}${datadir}/sgml/sgml-iso-entities-8879.1986 + install -m 0644 sgml-iso-entities/catalog ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/ + install -m 0644 sgml-iso-entities/*.ent ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/ + # install-catalog script contains hard coded reference to {sysconfdir}. Changed it to ${D}${sysconfdir}. + sed -i -e "s|${sysconfdir}/sgml|${D}${sysconfdir}/sgml|g" ${D}${bindir}/install-catalog + ${D}${bindir}/install-catalog \ + --add ${D}${sysconfdir}/sgml/sgml-ent.cat ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog + ${D}${bindir}/install-catalog \ + --add ${D}${sysconfdir}/sgml/sgml-docbook.cat ${D}${sysconfdir}/sgml/sgml-ent.cat } PACKAGES = "" +sgml_common_native_mangle () { + # Reverte back to ${sysconfdir} path in install-catalog + sed -i -e "s|${D}${sysconfdir}/sgml|${sysconfdir}/sgml|g" ${SYSROOT_DESTDIR}${STAGING_BINDIR}/install-catalog + # Change path from ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog to ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog in sgml-ent.cat + sed -i -e "s|${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-ent.cat + # Change path from ${D}${sysconfdir}/sgml/sgml-ent.cat|${sysconfdir}/sgml/sgml-ent.cat to ${sysconfdir}/sgml/sgml-ent.cat in sgml-ent.cat + sed -i -e "s|${D}${sysconfdir}/sgml/sgml-ent.cat|${sysconfdir}/sgml/sgml-ent.cat|g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-docbook.cat + # Remove ${D} path from catalog file created by install-catalog script + sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/catalog +} |