diff --git a/net-wireless/wpa_supplicant/patches/wpa_supplicant-2.9-gcc2.patch b/net-wireless/wpa_supplicant/patches/wpa_supplicant-2.9-gcc2.patch new file mode 100644 index 000000000..de02d57b6 --- /dev/null +++ b/net-wireless/wpa_supplicant/patches/wpa_supplicant-2.9-gcc2.patch @@ -0,0 +1,77 @@ +From 3e64b474c112a40620ada798ec2d69747d921474 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 13 Apr 2020 18:34:42 -0400 +Subject: [PATCH] GCC2 fixes. + +--- + src/ap/hostapd.h | 2 +- + src/common/ieee802_11_common.h | 2 +- + src/common/ieee802_11_defs.h | 8 ++++---- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h +index 518c7f1..d31f078 100644 +--- a/src/ap/hostapd.h ++++ b/src/ap/hostapd.h +@@ -135,7 +135,7 @@ struct hostapd_sae_commit_queue { + struct dl_list list; + int rssi; + size_t len; +- u8 msg[]; ++ u8 msg[0]; + }; + + /** +diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h +index 963b67a..9491128 100644 +--- a/src/common/ieee802_11_common.h ++++ b/src/common/ieee802_11_common.h +@@ -15,7 +15,7 @@ + struct element { + u8 id; + u8 datalen; +- u8 data[]; ++ u8 data[0]; + } STRUCT_PACKED; + + struct hostapd_hw_modes; +diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h +index 71cf383..1b3bdb6 100644 +--- a/src/common/ieee802_11_defs.h ++++ b/src/common/ieee802_11_defs.h +@@ -948,12 +948,12 @@ struct ieee80211_mgmt { + struct { + u8 action; + u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; +- u8 variable[]; /* OCI element */ ++ u8 variable[0]; /* OCI element */ + } STRUCT_PACKED sa_query_req; + struct { + u8 action; /* */ + u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; +- u8 variable[]; /* OCI element */ ++ u8 variable[0]; /* OCI element */ + } STRUCT_PACKED sa_query_resp; + struct { + u8 action; +@@ -1014,7 +1014,7 @@ struct ieee80211_mgmt { + struct { + u8 action; /* 12 */ + u8 dialog_token; +- u8 variable[]; ++ u8 variable[0]; + } STRUCT_PACKED coloc_intf_report; + struct { + u8 action; /* 15 */ +@@ -2109,7 +2109,7 @@ struct ieee80211_he_capabilities { + u8 he_phy_capab_info[11]; + /* Followed by 4, 8, or 12 octets of Supported HE-MCS And NSS Set field + * and optional variable length PPE Thresholds field. */ +- u8 optional[]; ++ u8 optional[0]; + } STRUCT_PACKED; + + struct ieee80211_he_operation { +-- +2.24.1 + diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.9.haiku.1.recipe b/net-wireless/wpa_supplicant/wpa_supplicant-2.9.haiku.1.recipe new file mode 100644 index 000000000..cd2a58386 --- /dev/null +++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.9.haiku.1.recipe @@ -0,0 +1,61 @@ +SUMMARY="A WPA Supplicant with support for WPA and WPA2" +DESCRIPTION=" +wpa_supplicant is a WPA Supplicant for Linux, BSD, macOS, Windows, and Haiku \ +with support for WPA and WPA2 (IEEE 802.11i / RSN). It is suitable for both \ +desktop/laptop computers and embedded systems. Supplicant is the IEEE \ +802.1X/WPA component that is used in the client stations. It implements key \ +negotiation with a WPA Authenticator and it controls the roaming and IEEE \ +802.11 authentication/association of the wlan driver." +HOMEPAGE="https://w1.fi/wpa_supplicant/" +COPYRIGHT="2003-2019 Jouni Malinen" +LICENSE="BSD (2-clause) + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/haiku/wpa_supplicant/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="e83b12a6121e7260506fbe7eef9e411d8cab790f187133d3e6952f5412e0845c" +PATCHES="wpa_supplicant-2.9-gcc2.patch" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PROVIDES=" + wpa_supplicant = $portVersion compat >= 2 + cmd:wpa_supplicant = $portVersion compat >= 2 + " +REQUIRES=" + haiku + lib:libssl + " + +BUILD_REQUIRES=" + devel:libssl + " +BUILD_PREREQUIRES=" + haiku_devel + cmd:gcc + cmd:ld + cmd:make + " + +BUILD() +{ + cd wpa_supplicant + make wpa_supplicant +} + +INSTALL() +{ + cd wpa_supplicant + mkdir -p $binDir + cp -v wpa_supplicant $binDir + + appSig=$(catattr -r BEOS:APP_SIG wpa_supplicant | cut -f2 -d"/") + localeFolder=$dataDir/locale/catalogs + mkdir -p $localeFolder/$appSig + + for file in wpa_gui-haiku/locales/*.catkeys; do + catLang=$(basename $file .catkeys) + echo "Linking $catLang.catalog..." + linkcatkeys -o $localeFolder/$appSig/$catLang.catalog \ + -s "application/$appSig" -l $catLang "$file" + done +}