src_configure() { local myconf append-flags -fno-lto append-cppflags -std=gnu++14 tc-export CC tc-export CXX tc-export AR local UPS_DRIVERS="" for u in $USE ; do u2=${u#ups_drivers_} [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" done UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" # TODO: USE flag for sys-power/powerman econf \ --sysconfdir=/etc/nut \ --datarootdir=/usr/share/nut \ --datadir=/usr/share/nut \ --disable-static \ --with-statepath=/var/lib/nut \ --with-drvpath=/$(get_libdir)/nut \ --with-htmlpath=/usr/share/nut/html \ --with-user=nut \ --with-group=nut \ --with-logfacility=LOG_DAEMON \ --with-dev \ --with-serial \ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ --without-powerman \ $(use_with cgi) \ $(use_with ipmi) \ $(use_with ipmi freeipmi) \ $(use_with snmp) \ $(use_with ssl) \ $(use_with tcpd wrap) \ $(use_with usb) \ $(use_with xml neon) \ $(use_with zeroconf avahi) \ ${myconf} }