ghostscript: avoid neon on unsupported machines
PATCH 1/1 ghostscript: avoid neon on unsupported machines
From: Benjamin Bara <[email protected]>
Disable neon if the machine does not support it.
--- meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb | 8 ++++++++ 1 file changed, 8 insertions(+)
meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb +8 -0
@@ -56,6 +56,14 @@ prune_sources() { } do_unpack[postfuncs] += "prune_sources" +do_configure:prepend () { + if ! [ "${@bb.utils.filter('TUNE_FEATURES', 'neon', d)}" ]; then + # unset the neon-specific variables if no neon available + sed -i 's/HAVE_NEON=".*"/HAVE_NEON=""/g' ${S}/configure.ac + sed -i 's/TESS_NEON=".*"/TESS_NEON=""/g' ${S}/configure.ac + fi +} + do_install:append () { mkdir -p ${D}${datadir}/ghostscript/${PV}/ cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
Signature · 1 line
2.34.1
meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb prune_sources() { · line 63
Quoted 5 lines · Benjamin Bara
meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb +5
-0+do_configure:prepend () { + if ! [ "${@bb.utils.filter('TUNE_FEATURES', 'neon', d)}" ]; then + # unset the neon-specific variables if no neon available + sed -i 's/HAVE_NEON=".*"/HAVE_NEON=""/g' ${S}/configure.ac + sed -i 's/TESS_NEON=".*"/TESS_NEON=""/g' ${S}/configure.ac
Ad hoc patching with sed should be avoided if possible because it's difficult to understand and is prone to silent breakage (e.g. no longer doing what it was meant to). Can you make a proper patch please and submit upstream as well? Perhaps add an explicit option?
Alex
Hi Alex,
Quoted 11 lines · Alexander Kanavin
meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb prune_sources() { · line 63
Quoted 5 lines · Benjamin Bara
meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb +5
-0+do_configure:prepend () { + if ! [ "${@bb.utils.filter('TUNE_FEATURES', 'neon', d)}" ]; then + # unset the neon-specific variables if no neon available + sed -i 's/HAVE_NEON=".*"/HAVE_NEON=""/g' ${S}/configure.ac + sed -i 's/TESS_NEON=".*"/TESS_NEON=""/g' ${S}/configure.acAd hoc patching with sed should be avoided if possible because it's difficult to understand and is prone to silent breakage (e.g. no longer doing what it was meant to). Can you make a proper patch please and submit upstream as well? Perhaps add an explicit option?
Sure, I will post a v2 of this patch as soon as I found out how to contribute to ghostscript :D
Thanks,
Benjamin