Message ID | 20230904084937.4135164-1-bbara93@gmail.com |
---|---|
State | Accepted, archived |
Commit | 22d40fcb984849bc8735bf03b306c3a3b11eb779 |
Headers | show |
Series | ghostscript: avoid neon on unsupported machines | expand |
On Mon, 4 Sept 2023 at 10:49, Benjamin Bara <bbara93@gmail.com> wrote: > +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, On Mon, 4 Sept 2023 at 11:04, Alexander Kanavin <alex.kanavin@gmail.com> wrote: > On Mon, 4 Sept 2023 at 10:49, Benjamin Bara <bbara93@gmail.com> wrote: > > +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? Sure, I will post a v2 of this patch as soon as I found out how to contribute to ghostscript :D Thanks, Benjamin
diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb b/meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb index 0ddf708f93..e149efe0f9 100644 --- a/meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb +++ b/meta/recipes-extended/ghostscript/ghostscript_10.01.2.bb @@ -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}/