lvm2: make --enable-cmdlib optional

This seems to be mostly used to simplify LV management tasks from a web
interface
(https://www.redhat.com/archives/linux-lvm/2008-September/msg00029.html),
and is as fat as the `lvm` binary itself
This commit is contained in:
Florian Klink 2020-05-24 02:22:51 +02:00
parent 3ca74a976a
commit 198d1e6f5c

View file

@ -5,10 +5,14 @@
, utillinux
, libuuid
, thin-provisioning-tools, libaio
, enable_cmdlib ? false
, enable_dmeventd ? false
, udev ? null
}:
# configure: error: --enable-dmeventd requires --enable-cmdlib to be used as well
assert enable_dmeventd -> enable_cmdlib;
stdenv.mkDerivation rec {
pname = "lvm2" + stdenv.lib.optionalString enable_dmeventd "with-dmeventd";
version = "2.03.09";
@ -24,8 +28,8 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-readline"
"--enable-pkgconfig"
"--enable-cmdlib"
] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"
++ stdenv.lib.optional enable_cmdlib "--enable-cmdlib"
++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"