commit:     492fc8d469625b2f93f6651eef4e65d82a208ecd
Author:     Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  8 14:00:03 2018 +0000
Commit:     Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org>
CommitDate: Mon Apr  9 01:19:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=492fc8d4

net-wireless/hostapd: add savedconfig support

Bug: https://bugs.gentoo.org/473124
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-wireless/hostapd/hostapd-2.6-r2.ebuild | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/net-wireless/hostapd/hostapd-2.6-r2.ebuild 
b/net-wireless/hostapd/hostapd-2.6-r2.ebuild
index 64d34bf0f89..250e07cfbe7 100644
--- a/net-wireless/hostapd/hostapd-2.6-r2.ebuild
+++ b/net-wireless/hostapd/hostapd-2.6-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-inherit toolchain-funcs eutils systemd
+inherit toolchain-funcs eutils systemd savedconfig
 
 DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
 HOMEPAGE="http://hostap.epitest.fi";
@@ -49,6 +49,12 @@ src_prepare() {
 src_configure() {
        local CONFIG="${S}/.config"
 
+       restore_config "${CONFIG}"
+       if [[ -f "${CONFIG}" ]]; then
+               default_src_configure
+               return 0
+       fi
+
        # toolchain setup
        echo "CC = $(tc-getCC)" > ${CONFIG}
 
@@ -194,6 +200,8 @@ src_install() {
                exeinto /etc/log.d/scripts/services/
                doexe logwatch/${PN}
        fi
+
+       save_config .config
 }
 
 pkg_postinst() {

Reply via email to