The attached patch removes the configure check for C++ compiler in dev-util/pkgconfig-0.23 using epunt_cxx from the eutils eclass, allowing correct compilation of pkgconfig in system without a C++ compiler. Reproducible: Always Steps to Reproduce:
Created attachment 206628 [details, diff] the patch
I'd rather have an upstream bug telling them to fix their autoconf to only check for C
That's not an upstream autoconf bug it's a libtool 1.5 problem, it's fixed when using libtool-2, but you need to fix that "manually" for libtool 1.5.
a) Last I knew epunt_cxx did absolutely nothing as the patch it tries to apply does not apply anymore with newer autoconf results, and it is made to not die in such a case. Even if epunt_cxx has been updated with a patching method that works, it might silently stop working again. If it doesn't silently stop working again, but rather fail the build, then it's a bad thing to use as well. b) pkgconfig compiled fine for me on a gcc[nocxx] system many months ago (we were also at pkgconfig-0.23). Albeit I probably used ~arch and libtool-2.2. By now libtool-2.2 is in stable tree too (at least for many arches), but the ltmain.sh in there is from 1.5 and the system libtool version shouldn't matter, hmm... Then again, maybe I remember wrong and didn't compile pkg-config on the nocxx system, but rather cross-compiled that system, so host pkg-config was used c) pkg-config configure.ac has no calls to AC_PROG_CXX, so indeed libtool-1.5 problem Anyway, not sure what to do about this. I don't feel comfortable with epunt_cxx. Maybe when I get to solving all the pkg-config bugs I need to start eautoreconfing anyway and it updates to libtool-2.2?
The problem seems to be fixed with 0.25 (per build.log's and ./configure not checking for g++ and/or cxx anymore)