diff options
Diffstat (limited to 'net-wireless/iwd/iwd-9999.ebuild')
-rw-r--r-- | net-wireless/iwd/iwd-9999.ebuild | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/net-wireless/iwd/iwd-9999.ebuild b/net-wireless/iwd/iwd-9999.ebuild index 23be63d6ea2b..bef22a920493 100644 --- a/net-wireless/iwd/iwd-9999.ebuild +++ b/net-wireless/iwd/iwd-9999.ebuild @@ -2,11 +2,15 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit autotools flag-o-matic linux-info systemd +inherit flag-o-matic linux-info systemd + +#Set this variable to the required external ell version +ELL_REQ="" if [[ ${PV} == *9999* ]]; then - EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/wireless/iwd.git" - inherit git-r3 + inherit autotools git-r3 + IWD_EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/wireless/iwd.git" + ELL_EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git" else SRC_URI="https://www.kernel.org/pub/linux/network/wireless/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~sparc ~x86" @@ -19,10 +23,11 @@ LICENSE="GPL-2" SLOT="0" IUSE="+client +crda +monitor ofono wired cpu_flags_x86_aes cpu_flags_x86_ssse3" -COMMON_DEPEND="~dev-libs/ell-9999 - sys-apps/dbus +COMMON_DEPEND="sys-apps/dbus client? ( sys-libs/readline:0= )" +[[ -z "${ELL_REQ}" ]] || COMMON_DEPEND+="~dev-libs/ell-${ELL_REQ}" + RDEPEND="${COMMON_DEPEND} net-wireless/wireless-regdb crda? ( net-wireless/crda )" @@ -86,8 +91,8 @@ pkg_pretend() { check_extra_config if ! use crda; then - if [[ $(getfilevar CONFIG_CFG80211 /usr/src/linux/.config) == y ]] \ - && [[ $(getfilevar CONFIG_EXTRA_FIRMWARE /usr/src/linux/.config) != *regulatory.db* ]] + if linux_config_exists && linux_chkconfig_builtin CFG80211 && + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] then ewarn "" ewarn "REGULATORY DOMAIN PROBLEM:" @@ -101,8 +106,8 @@ pkg_pretend() { src_unpack() { if [[ ${PV} == *9999* ]] ; then - git-r3_src_unpack - git clone git://git.kernel.org/pub/scm/libs/ell/ell.git "${WORKDIR}"/ell + EGIT_REPO_URI=${IWD_EGIT_REPO_URI} git-r3_src_unpack + EGIT_REPO_URI=${ELL_EGIT_REPO_URI} EGIT_CHECKOUT_DIR=${WORKDIR}/ell git-r3_src_unpack else default fi @@ -110,20 +115,26 @@ src_unpack() { src_prepare() { default - eautoreconf + if [[ ${PV} == *9999* ]] ; then + eautoreconf + fi } src_configure() { append-cflags "-fsigned-char" - econf --sysconfdir=/etc/iwd --localstatedir=/var \ + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var \ $(use_enable client) \ $(use_enable monitor) \ $(use_enable ofono) \ $(use_enable wired) \ - --enable-external-ell \ --enable-systemd-service \ --with-systemd-unitdir="$(systemd_get_systemunitdir)" \ - --with-systemd-modloaddir=$(_systemd_get_dir modulesloaddir /usr/lib/modules-load.d) + --with-systemd-modloaddir="${EPREFIX}/usr/lib/modules-load.d" \ + --with-systemd-networkdir="$(systemd_get_utildir)/network" + ) + [[ ${PV} == *9999* ]] || myeconfargs+=(--enable-external-ell) + econf "${myeconfargs[@]}" } src_install() { |