app-misc/jq: cpu savings & anti-bundling safety
authorRobin H. Johnson <robbat2@gentoo.org>
Sat, 13 Apr 2019 04:02:53 +0000 (21:02 -0700)
committerRobin H. Johnson <robbat2@gentoo.org>
Sat, 13 Apr 2019 04:07:30 +0000 (21:07 -0700)
eautoreconf runs on all subdirectories that have autotooled and
referenced by the toplevel Makefile.am SUBDIRS, even when we don't use a
given subdirectory anymore. Rip out the subdirectory and Makefile.am
reference.

As a bonus, by removing the bundled source that's now unused, we prevent
any accidental build usage of it.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
app-misc/jq/jq-1.6-r3.ebuild

index 2b187f05c7ab73fdd103e520aef6fe3e50a6d698..036113cf53164dd67e9b212ef2c6fcc4fb01cc86 100644 (file)
@@ -36,6 +36,12 @@ src_prepare() {
        sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \
                configure.ac || die
 
+       # jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma,
+       # but the bundled copy of oniguruma still gets eautoreconf'd since it
+       # exists; save the cycles by nuking it.
+       sed -i -e '/modules\/oniguruma/d' Makefile.am || die
+       rm -rf "${S}"/modules/oniguruma || die
+
        default
        eautoreconf
 }