net-wireless/wpa_supplicant: Support qt5
authorJason A. Donenfeld <zx2c4@gentoo.org>
Wed, 7 Oct 2015 20:09:42 +0000 (22:09 +0200)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Wed, 7 Oct 2015 20:09:42 +0000 (22:09 +0200)
Package-Manager: portage-2.2.22

net-wireless/wpa_supplicant/wpa_supplicant-2.5.ebuild

index ae65c11b6a3700efb9e7c3bd2aab303a7d1b22bc..7e8122ddf35a7504eb1738cec9ae613769323d79 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit eutils toolchain-funcs qt4-r2 systemd multilib
+inherit eutils toolchain-funcs qt4-r2 qmake-utils systemd multilib
 
 DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
 HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
@@ -13,8 +13,8 @@ LICENSE="|| ( GPL-2 BSD )"
 
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 p2p ps3 qt4 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD"
-REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )"
+IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 p2p ps3 qt4 qt5 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD"
+REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl ) ?? ( qt4 qt5 )"
 
 CDEPEND="dbus? ( sys-apps/dbus )
        kernel_linux? (
@@ -28,6 +28,12 @@ CDEPEND="dbus? ( sys-apps/dbus )
                dev-qt/qtgui:4
                dev-qt/qtsvg:4
        )
+       qt5? (
+               dev-qt/qtcore:5
+               dev-qt/qtgui:5
+               dev-qt/qtwidgets:5
+               dev-qt/qtsvg:5
+       )
        readline? (
                sys-libs/ncurses:0=
                sys-libs/readline:0
@@ -272,6 +278,11 @@ src_configure() {
                eqmake4 wpa_gui.pro
                popd > /dev/null
        fi
+       if use qt5 ; then
+               pushd "${S}"/wpa_gui-qt4 > /dev/null
+               eqmake5 wpa_gui.pro
+               popd > /dev/null
+       fi
 }
 
 src_compile() {
@@ -283,7 +294,7 @@ src_compile() {
                emake -C ../src/eap_peer
        fi
 
-       if use qt4 ; then
+       if use qt4 || use qt5; then
                pushd "${S}"/wpa_gui-qt4 > /dev/null
                einfo "Building wpa_gui"
                emake
@@ -318,7 +329,7 @@ src_install() {
 
        doman doc/docbook/*.{5,8}
 
-       if use qt4 ; then
+       if use qt4 || use qt5 ; then
                into /usr
                dobin wpa_gui-qt4/wpa_gui
                doicon wpa_gui-qt4/icons/wpa_gui.svg