On 12/17/2016 12:41 AM, Chris Staub wrote:
On 12/17/2016 12:55 AM, DJ Lucas wrote:
(6) Now, a mixture of '(1)' and '(2)', above, is being returned to: all
separate dirs again; and still (a degree of) per-package whac-a-mole
use of './configure'/make args
'--libdir=...'/'--with-libdir=...'/&c,
particularly for cmake-based builds.
====
Is that about right - a reasonably accurate summary.
With above notations, seems accurate enough. Short of the handmade
Makefile for libcap, all of the affected packages use cmake. It seems to
me that this is a very minor deficiency with cmake, or more likely its
users (because many cmake packages do find the correct {,/usr}/lib
directories) as compared with autotools. I might take a look at it at
some point, but at least they provide a standard override.
--DJ
I believe some or possibly all of the affected packages that use Cmake
are using its "GNUInstallDirs" module, which automatically installs to
"lib64" if it determines that you have a 64-bit system. Therefore, you
may be able to eliminate modification of most or all of these packages
by editing the GNUInstallDirs module. Specifically, it has an if
statement that checks "CMAKE_SIZEOF_VOID_P" and assumes 64 bits if it
equals "8". I assume there's a more elegant solution, but I currently
use this hack to edit the size it looks for so it doesn't match:
sed -i '/CMAKE_SIZEOF_VOID_P.*EQUAL/s/8/88/' Modules/GNUInstallDirs.cmake
Thanks Chris. That's incredibly helpful! Initially, I had though
'/CMAKE_SIZEOF_VOID_P.*EQUAL/s/EQUAL/NOT EQUAL/' and apply lib32, but
the test would never be true (the lib64/lib32 is useless). How about
this incredibly beautiful solution?
if "$(uname -m)" == "x86_64"; then
sed '/\n.*/!N;/.*\n.*CMAKE_SIZEOF_VOID_P.*EQUAL/{$d;N;N;N;N;N;d};P;D' \
-i.bak GNUInstallDirs.cmake
fi
It's even uglier on the console! In short, delete 1 line before and five
lines after the pattern and the line containing the match. :-) Yep,
patch! Anyway, just kill the else clause in its entirety. The reverse
would never be true. I tested quick and it seems to work as expected.
--DJ
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page