jgmenu fails to cross build from source. Its buildsystem basically has
no clue about cross building and just uses build architecture build
tools. Its configure script quickly fails on locating dependencies.
Generally, we want the buildsystem to use tools prefixed with the host
architecture. Additionally, the presence of a configure script usually
means that configure figures out all the tooling to use. This configure
does neither.
I am proposing a relatively minimal patch (which is still impressive in
size). It'll add a --pkg-config option to configure. Unlike the common
approach, I'm asking debhelper to pass cross tools to make despite the
presence of configure by forcing it back to the makefile buildsystem. To
achieve success, all uses of pkg-config both in configure and the
Makefiles must become substitutable.
This patch makes jgmenu cross buildable. A better approach would be for
configure to not just check for dependencies using pkg-config, but
actually extract the compiler flags and linker flags and store those in
Makefile.inc. Then, the makefiles would never invoke pkg-config nor need
to know its name. That approach felt too invasive to me though.
Helmut