|
The original purpose of this revision was to refactor the three,
similar, convoluted pipelines that are used to parse the output from
pkg-config and populate cvxopt's FOO_LIB, FOO_LIB_DIR, and FOO_INC_DIR
variables. That was fairly easy: the code to strip out "pthread" and
"m" from `pkg-config --libs-only-l` never worked, so I've dropped
it. After that, the remaining three pipelines all did essentially the
same thing and were combined into a single function that is still
large but now only because it is documented.
Having solved that problem, I made things a bit messy again. I
discovered that most of these variables can be passed an empty string,
resulting in a command line with "empty" arguments like "-L
-L/path/to/wherever" and GCC will accept that. What it won't accept is
the empty "-I" arguments corresponding to the INC_DIR variables. Can
we leave those unset if pkg-config returns the empty string? No!
Because if we do that, then cvxopt will guess the wrong location
(outside of EPREFIX) and attempt to use that. So I added some code to
prepopulate those variables with the right location, and only append
to them when pkg-config gives us something to append.
I think this works better, but I guess we'll see. I've opened an
upstream issue about the empty string problem in these variables. If
they can make the "API" a bit nicer in the future, a lot of the new
ugliness can be reverted.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|