diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-25 15:54:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-25 15:54:35 +0100 |
commit | d0bb3151c569ab6e40c84c177f43bff3c7ce4780 (patch) | |
tree | 0c543a2f299a437229bcd5db5c62697a41243689 /net-wireless | |
parent | 601320c16301dbd7e8830e8c2ab7d6aef5b65abe (diff) |
gentoo auto-resync : 25:08:2023 - 15:54:35
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/Manifest.gz | bin | 13896 -> 13901 bytes | |||
-rw-r--r-- | net-wireless/bluez/Manifest | 3 | ||||
-rw-r--r-- | net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch | 38 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-5.66-musl-max-input.patch | 19 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch | 185 | ||||
-rw-r--r-- | net-wireless/iwd/Manifest | 2 | ||||
-rw-r--r-- | net-wireless/iwd/iwd-2.8.ebuild | 184 |
7 files changed, 186 insertions, 245 deletions
diff --git a/net-wireless/Manifest.gz b/net-wireless/Manifest.gz Binary files differindex bde508da0d49..a297d676f68f 100644 --- a/net-wireless/Manifest.gz +++ b/net-wireless/Manifest.gz diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest index d5996e83f0bf..9ce5f330bfb1 100644 --- a/net-wireless/bluez/Manifest +++ b/net-wireless/bluez/Manifest @@ -1,10 +1,7 @@ AUX 0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch 1912 BLAKE2B c7226ccbf1b794b5f3d6504dcb6950bc7e7bd69995243d0e4cf30dfb161f95e15c18c96724f82916e8c83cac6ff255ed957b60c9ee9ad53e108c69eb509074d5 SHA512 65a970fa82ded9f6e97ef2f0d856010f96468cbd375447e1c47d6073be5a364f747b7b5ea93a0bc3b7dba0470dc8dccd9b5d1f6567f18b38042e424d3e06171b -AUX 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch 1252 BLAKE2B ce6d00ea244d91e76b696e60ddb9096aa48572b68474f321f05b0e3e9525932e6fdaeacc3b141dc4b118d5fa305b7a0510e9c57c935e489a9c159dcd826ad870 SHA512 774f1d9cd49dd3fc0e9f02ad93876c59d78f88f149591f384cf5d2e3541d237ce390552c8bc2cb4d4ad7e5dcc295df49220565f0b0e686a2f8b3404f68323d32 AUX bluetooth-conf.d 21 BLAKE2B 7c94e499438f441fc18f0b50178e707982ac91871a74b2e7a35c9930d32441a89f742993e993e3003f9bcb5e3ee9adde2ab1cbe33b27245b1b1e91e7c3dc1a0b SHA512 45befd3fb42ea3462fa6e1ee9f3ee9591e197d4925a4c9df6733bacfe44cf44f54ed3aad6fd7a6a2953da54b93460a1cf0ea1cadf0d7e47f811e4c3182af74d5 AUX bluetooth-init.d-r5 313 BLAKE2B 6bad1b9a75de5927ab22a229d6ce18247b32a79b994078338eff33df7f74a7dc4a5266212f6d0150101600e3a864a9b64ce6a576208218750bfbe88bc5911baa SHA512 95aff192be6207047fc01b42754bcd34d5cd7f82c16486fdd81bb1d14be040e4f3e9bafd8dc2f4e8b87bf1eb50f6634f526feaf2b38c0c6807f40784d84dac96 -AUX bluez-5.66-musl-max-input.patch 610 BLAKE2B dee1a911f763d590a486d3aa7bd0a3d9eae40d9c8cba5ea01eda59304c1a4a1939b84771626ce97f2943ba88c523eb59dee3876cedc850e8bebbdb3b7c0d9bbb SHA512 ceb21eb70c1afbea5e25d4009ea5100d506e05a83b5a39564d6db2abb26f39f1850282fbbcab8f978b592da9893e8f87ace49afb1dbe99161155ad55a84e81e0 AUX bluez-5.66-power-state-adapter-property.patch 1085 BLAKE2B 9d76822b8ab649eb322e9511b86d85b912d8a073f15c563b689ad57b12e1c1eb043ed1741b62364dfae3b4a100ad4fdce36e723103f231dd77bf070c4ae0be73 SHA512 df52b4d260e0de6de9ad4bc1201740b2bc37a537c96e2a22d4f8b698caf6fcea81eba1e8d7b152ad6a1237a51e06212e7cfdc429b9b7f7ff66d23a294cbc55e5 -AUX bluez-5.66-transient-hostname-fix.patch 5163 BLAKE2B 6a0f63370634ec7bdc830d8bb26ca47f273194e4a5ebf3c7fc654371f520d117da5112e76b4939e96e0d56ede2a0663ae1414dc809b9315a8bac63045ed70867 SHA512 fe787ec5a2e77da7ca3483797b07b1c4d0dbc133d22095e8b6fb3361a79f7762284af265e3bee54e330e22b110ee95916ad1f4f1f37002af9fc7859b09d1bdd0 AUX bluez-5.68-bap-dettach-io.patch 3472 BLAKE2B 424f55cc90e3b9f5045a3a3728929eccd4e2938701cfa217d82b9971ea2abec76eb1eb3ed9def74230b67ec9c3cb69b932543c7671ffa97fd52675f732460cf1 SHA512 a18750769207e479e10edf95469ae562e288ee1ac7b20ad826b1e3e1e9160daa2df388dcbb8d6889e258d36fd1ca47bef07fdffbeb89ea629f0902d66e5cd785 AUX bluez-5.68-bap-ebusy-fix.patch 5827 BLAKE2B cf8d111897ea7d51da88e6680342870a72226c1e67fea8a95686331dc29447e1ab777b50db839904a366f2e320b3e69bb6e43a9f8de91366a414901d0242dbb2 SHA512 1134848a726acda5bee8f7816d41c2284f29eb61425d474e5d5fcbf660a788c0cc5d73a679e27a72b4a4be147e8970b02fc35023fd28badf59e587debc695fe3 AUX bluez-5.68-bap-nonzero.patch 764 BLAKE2B ba4e0853888649564baa5294c8687a7180175c0a8b83ec48c8c6b2e06f45b1c83386bf429081b73276495d5579f464adb7ccc5d1c55ef9864499c018230dd303 SHA512 129fe6a611dd6a42b32033b3975fd197a0925d50ff1259fdbaa74b1f39135c8cf538a5211ad66a0a4b6621a6e2bf5e9be8a40060fcd8d8718e5b9009c297b008 diff --git a/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch deleted file mode 100644 index 004a3895aa09..000000000000 --- a/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f7861d27fbcbc519f57d8496aa9486f487908821 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera <hadess@hadess.net> -Date: Sat, 9 Nov 2013 18:13:43 +0100 -Subject: [PATCH 1/5] obex: Use GLib helper function to manipulate paths - -Instead of trying to do it by hand. This also makes sure that -relative paths aren't used by the agent. ---- - obexd/src/manager.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/obexd/src/manager.c b/obexd/src/manager.c -index cec8a39..f18896e 100644 ---- a/obexd/src/manager.c -+++ b/obexd/src/manager.c -@@ -651,14 +651,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data) - DBUS_TYPE_STRING, &name, - DBUS_TYPE_INVALID)) { - /* Splits folder and name */ -- const char *slash = strrchr(name, '/'); -+ gboolean is_relative = !g_path_is_absolute(name); - DBG("Agent replied with %s", name); -- if (!slash) { -- agent->new_name = g_strdup(name); -+ if (is_relative) { -+ agent->new_name = g_path_get_basename(name); - agent->new_folder = NULL; - } else { -- agent->new_name = g_strdup(slash + 1); -- agent->new_folder = g_strndup(name, slash - name); -+ agent->new_name = g_path_get_basename(name); -+ agent->new_folder = g_path_get_dirname(name); - } - } - --- -1.8.4.2 - diff --git a/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch b/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch deleted file mode 100644 index d8bdb3316e49..000000000000 --- a/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch +++ /dev/null @@ -1,19 +0,0 @@ -# https://lore.kernel.org/linux-bluetooth/20230131055258.3311810-1-sam@gentoo.org/T/#u -# musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box. -# This patch assigns _POSIX_MAX_INPUT to MAX_INPUT. -# Please refer: https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a -# https://bugs.gentoo.org/888467 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -28,6 +28,11 @@ - #include <sys/random.h> - #endif - -+/* define MAX_INPUT for musl */ -+#ifndef MAX_INPUT -+#define MAX_INPUT _POSIX_MAX_INPUT -+#endif -+ - #include "src/shared/util.h" - - void *util_malloc(size_t size) diff --git a/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch b/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch deleted file mode 100644 index fef2776f7a0e..000000000000 --- a/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch +++ /dev/null @@ -1,185 +0,0 @@ -From e515f4b6e25c971c47ab79e9cbdfa17119bbde23 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera <hadess@hadess.net> -Date: Wed, 9 Nov 2022 16:17:55 +0100 -Subject: [PATCH 1/2] hostname: Add '' around printed strings - -Otherwise we can't see whether the string is nul, or empty. ---- - plugins/hostname.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/plugins/hostname.c b/plugins/hostname.c -index 1a9513adb..14b6450b5 100644 ---- a/plugins/hostname.c -+++ b/plugins/hostname.c -@@ -128,7 +128,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, - - dbus_message_iter_get_basic(iter, &str); - -- DBG("pretty hostname: %s", str); -+ DBG("pretty hostname: '%s'", str); - - g_free(pretty_hostname); - pretty_hostname = g_strdup(str); -@@ -146,7 +146,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, - - dbus_message_iter_get_basic(iter, &str); - -- DBG("static hostname: %s", str); -+ DBG("static hostname: '%s'", str); - - g_free(static_hostname); - static_hostname = g_strdup(str); -@@ -165,7 +165,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, - - dbus_message_iter_get_basic(iter, &str); - -- DBG("chassis: %s", str); -+ DBG("chassis: '%s'", str); - - for (i = 0; chassis_table[i].chassis; i++) { - if (strcmp(chassis_table[i].chassis, str)) --- -2.37.3 - - -From e2b2b1675f310023862319ea10ffd205a75cc0cb Mon Sep 17 00:00:00 2001 -From: Bastien Nocera <hadess@hadess.net> -Date: Wed, 9 Nov 2022 16:17:56 +0100 -Subject: [PATCH 2/2] hostname: Fallback to transient hostname - -After pretty hostname, and static hostname, also support transient -hostname as a last resort before 'BlueZ X.XX'. - -This happens on Fedora's Workstation installation as it calls -"hostnamectl set-hostname" on startup. In Fedora Silverblue, the default -hostname is set as fedora in /etc/os-release. - -In both cases, we should fall back to that transient hostname, as bad as -it could be. - -Note that the transient hostname needs to be monitored through the -kernel directly, as explained in: -https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html ---- - plugins/hostname.c | 57 ++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 55 insertions(+), 2 deletions(-) - -diff --git a/plugins/hostname.c b/plugins/hostname.c -index 14b6450b5..51707f07d 100644 ---- a/plugins/hostname.c -+++ b/plugins/hostname.c -@@ -16,6 +16,8 @@ - #include <stdint.h> - #include <stdlib.h> - #include <string.h> -+#include <fcntl.h> -+#include <sys/utsname.h> - - #include "lib/bluetooth.h" - #include "lib/sdp.h" -@@ -44,8 +46,10 @@ - static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS; - static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED; - --static char *pretty_hostname = NULL; --static char *static_hostname = NULL; -+static char *pretty_hostname = NULL; -+static char *static_hostname = NULL; -+static char *transient_hostname = NULL; -+static guint hostname_id = 0; - - /* - * Fallback to static hostname only if empty pretty hostname was already -@@ -60,6 +64,10 @@ static const char *get_hostname(void) - if (static_hostname && - g_str_equal(static_hostname, "") == FALSE) - return static_hostname; -+ -+ if (transient_hostname && -+ g_str_equal(transient_hostname, "") == FALSE) -+ return transient_hostname; - } - - return NULL; -@@ -181,6 +189,32 @@ static void property_changed(GDBusProxy *proxy, const char *name, - } - } - -+static void read_transient_hostname(void) -+{ -+ struct utsname u; -+ -+ if (uname(&u) != 0) { -+ g_free(transient_hostname); -+ transient_hostname = NULL; -+ DBG("failed to read transient hostname"); -+ return; -+ } -+ -+ g_free(transient_hostname); -+ transient_hostname = g_strdup(u.nodename); -+ -+ DBG("read transient hostname: '%s'", transient_hostname); -+} -+ -+static gboolean hostname_cb(GIOChannel *io, GIOCondition cond, -+ gpointer user_data) -+{ -+ DBG("transient hostname changed"); -+ read_transient_hostname(); -+ adapter_foreach(update_class, NULL); -+ return TRUE; -+} -+ - static int hostname_probe(struct btd_adapter *adapter) - { - DBG(""); -@@ -261,9 +295,11 @@ static GDBusProxy *hostname_proxy = NULL; - static int hostname_init(void) - { - DBusConnection *conn = btd_get_dbus_connection(); -+ int fd; - int err; - - read_dmi_fallback(); -+ read_transient_hostname(); - - hostname_client = g_dbus_client_new(conn, "org.freedesktop.hostname1", - "/org/freedesktop/hostname1"); -@@ -289,6 +325,17 @@ static int hostname_init(void) - hostname_client = NULL; - } - -+ fd = open("/proc/sys/kernel/hostname", O_RDONLY); -+ if (fd < 0) { -+ error("open(/proc/sys/kernel/hostname): %s (%d)", -+ strerror(errno), errno); -+ } else { -+ GIOChannel *io = g_io_channel_unix_new(fd); -+ -+ hostname_id = g_io_add_watch(io, G_IO_ERR, hostname_cb, NULL); -+ g_io_channel_unref(io); -+ } -+ - return err; - } - -@@ -306,8 +353,14 @@ static void hostname_exit(void) - hostname_client = NULL; - } - -+ if (hostname_id != 0) { -+ g_source_remove(hostname_id); -+ hostname_id = 0; -+ } -+ - g_free(pretty_hostname); - g_free(static_hostname); -+ g_free(transient_hostname); - } - - BLUETOOTH_PLUGIN_DEFINE(hostname, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, --- -2.37.3 - diff --git a/net-wireless/iwd/Manifest b/net-wireless/iwd/Manifest index 7b2bf9a25963..37cfbe740c3e 100644 --- a/net-wireless/iwd/Manifest +++ b/net-wireless/iwd/Manifest @@ -6,10 +6,12 @@ DIST iwd-2.4.tar.xz 1062540 BLAKE2B 9aa5e79ab3cc7ff83892c51c6074ca27876b037905c5 DIST iwd-2.5.tar.xz 1064656 BLAKE2B 44ea59e5c408543aca7303327a087fe8296d65c0d4d52a75929b958465ae39ed367eccd7eaae74e8da8a2f586e01fc3634dc37552c9679895fa5236d84e1eb32 SHA512 d70b4e47a52e5cbaa1572aed5a680a08eb715936f7f7ecb5e15628735e2eb980a4b024d97a864ce4380f885787101ad684a4d646504cc8ab39fc92cad5f328ff DIST iwd-2.6.tar.xz 1066332 BLAKE2B 09ac5aa977d5ca1343e752a35992d9b1484733b590e29fa40cbbdc1b51ce37dd8716e9dc7a1b300f0f720e91295dfa2f385bf4371da645ee009c26b20171b2b5 SHA512 e5907824291b1c370d2ce900ce0acf9d9f90dcc9f2675b951de2a3fc047b17818b660b5d0a5b712dd2ff1f48947e02ad6531b23e2fa21d6a0f78e9f9ab506ebb DIST iwd-2.7.tar.xz 1066388 BLAKE2B e5a0758979ad4e28b8c40b10c92e8c5c0a4793fb6c7efd03aa8d5b112e1bd54986a59de7e503449bf10127c4801f3965c64c259e8a36af227448e07488b44153 SHA512 e8697d317d7b24d0997bf03eef644bb6ebd708e076909ad1f3e3aa2239fd1f4b2d6ca729f79fff84ff93967b0abd48eba02a248b6e723486b69e954489f8d167 +DIST iwd-2.8.tar.xz 1067700 BLAKE2B ac691dfff675bd331a7af9e02179a5df61f0e20299c4a2851bd31950cbd0b696369069bd4a635cb25d24aec75996190bf8e47c2626eeff43b7ab37af5f932989 SHA512 bd208dc5ff391dccfe1b4a12f4b587ca8cedc1c1a7a2ddb34999c23acfad0e590e0463ac1ddc5093cb6489eb8ab8a090c01bcf06d679cfaf59c4b81469631795 EBUILD iwd-2.3.ebuild 4963 BLAKE2B 1ccee314744166fd80390842efb3e62c9a6a898a3cad09bfe8efc1a76bf5410965029fc9aa9f4b53c960f43befcf920731958668d155494385b4f3d1b2c746d2 SHA512 71d485e1aa3aa6396c633fed8241f21e55096ee2a432608397db194d193f4f8e5dc65a432e49d6d6269784aa4829526bad29edc863d770d9a47b7774806bcf1a EBUILD iwd-2.4.ebuild 4967 BLAKE2B 826505ee17092f2114826b7db3755da971e9ebb2c7708dc77c5c3c9815196e4cf5232e753fa8bdd18fb39ccb4e90255d1b22a1de400b5cf22a008f1f09860418 SHA512 ce10c558b60cba575ad4041be74c89ecdbd97ccbb5ab582a833b462dc9cadd7133f36e512671dc8cb27bcc8006218dd6e8e9e77023011cee906999b9d3768c6b EBUILD iwd-2.5.ebuild 4969 BLAKE2B 7c9b9a82d6370ae137a17df3da3dc08a4354057072f70e4cddc7d52d9db72c639ab153e420adc4fb5ccb5d13f82c6b2f8af34674ff49aacda307015447ef56ee SHA512 8d5a2bfd3318acf42ffa1111f6d037bf7cd20c54369db08de290c20eb494f3578f58a017a4640ca8e00383afd0fab869d651dbd8b2718e8db17dd4146d7022f0 EBUILD iwd-2.6.ebuild 4969 BLAKE2B 7c9b9a82d6370ae137a17df3da3dc08a4354057072f70e4cddc7d52d9db72c639ab153e420adc4fb5ccb5d13f82c6b2f8af34674ff49aacda307015447ef56ee SHA512 8d5a2bfd3318acf42ffa1111f6d037bf7cd20c54369db08de290c20eb494f3578f58a017a4640ca8e00383afd0fab869d651dbd8b2718e8db17dd4146d7022f0 EBUILD iwd-2.7.ebuild 4969 BLAKE2B 7c9b9a82d6370ae137a17df3da3dc08a4354057072f70e4cddc7d52d9db72c639ab153e420adc4fb5ccb5d13f82c6b2f8af34674ff49aacda307015447ef56ee SHA512 8d5a2bfd3318acf42ffa1111f6d037bf7cd20c54369db08de290c20eb494f3578f58a017a4640ca8e00383afd0fab869d651dbd8b2718e8db17dd4146d7022f0 +EBUILD iwd-2.8.ebuild 4969 BLAKE2B 46a04585975c13522deb2c87c1cafd2af50d00358438e7d87c8fe81ee28a89f8fd8cdb94ce45a717816a7f06e1e42063804f081d24df2adc66cd0c9dd24b4732 SHA512 e2bd44e161a142ee9af275a8f60b63e470bd885e2a276666df05938f00bc8384dffe1e302c1ea10b68d58ee17fdb85f1dd3c6d090f87ce000cd7b65ade87e11b EBUILD iwd-9999.ebuild 4965 BLAKE2B d160cf783e7c66f3957d7b8814caec00474dc04e5018009a4ae600d07807e1a142fc8c17e912be43d26ead8f0af97ffed873d870656ccf2dcfd60fc51744e9fd SHA512 f1d5a1c2adc148dad670e326a173c4a2d4559a70950c9bde11daac8d27b78a0d90c5a22b3e36decc5566578bdc6e55ee0492e434b4ca8486e7c75ec2d42edf90 MISC metadata.xml 844 BLAKE2B a0745226f5314cee29c405d53b5f03c1e2706518272a69443174123601c4b79ad5902e2f22575b46bed37c5d6ebebd1ad4cdcccbb7c40405c4d04f2b92bef17d SHA512 9997101871ad37981492b0a70150d091926ec2321f13d70d5f85f2ff5d360cc87970beb9575c2f78a909e6f3a91ef022fd7115db9ec0ec77d5d94363ed30d793 diff --git a/net-wireless/iwd/iwd-2.8.ebuild b/net-wireless/iwd/iwd-2.8.ebuild new file mode 100644 index 000000000000..8d0adac8258a --- /dev/null +++ b/net-wireless/iwd/iwd-2.8.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit flag-o-matic linux-info systemd + +#Set this variable to the required external ell version +ELL_REQ="0.58" + +if [[ ${PV} == *9999* ]]; then + 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 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + MYRST2MAN="RST2MAN=:" +fi + +DESCRIPTION="Wireless daemon for linux" +HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 crda +monitor ofono standalone systemd wired" + +DEPEND=" + sys-apps/dbus + client? ( sys-libs/readline:0= ) +" + +[[ -z "${ELL_REQ}" ]] || DEPEND+=" ~dev-libs/ell-${ELL_REQ}" + +RDEPEND=" + ${DEPEND} + acct-group/netdev + net-wireless/wireless-regdb + crda? ( net-wireless/crda ) + standalone? ( + systemd? ( sys-apps/systemd ) + !systemd? ( virtual/resolvconf ) + ) +" + +BDEPEND=" + virtual/pkgconfig +" + +[[ ${PV} == *9999* ]] && BDEPEND+=" dev-python/docutils" + +pkg_setup() { + CONFIG_CHECK=" + ~ASYMMETRIC_KEY_TYPE + ~ASYMMETRIC_PUBLIC_KEY_SUBTYPE + ~CFG80211 + ~CRYPTO_AES + ~CRYPTO_CBC + ~CRYPTO_CMAC + ~CRYPTO_DES + ~CRYPTO_ECB + ~CRYPTO_HMAC + ~CRYPTO_MD4 + ~CRYPTO_MD5 + ~CRYPTO_RSA + ~CRYPTO_SHA1 + ~CRYPTO_SHA256 + ~CRYPTO_SHA512 + ~CRYPTO_USER_API_HASH + ~CRYPTO_USER_API_SKCIPHER + ~KEY_DH_OPERATIONS + ~PKCS7_MESSAGE_PARSER + ~RFKILL + ~X509_CERTIFICATE_PARSER + " + if use crda;then + CONFIG_CHECK="${CONFIG_CHECK} ~CFG80211_CRDA_SUPPORT" + WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: please enable CFG80211_CRDA_SUPPORT for proper + regulatory domain support" + fi + + if use amd64;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_DES3_EDE_X86_64" + WARNING_CRYPTO_DES3_EDE_X86_64="CRYPTO_DES3_EDE_X86_64: enable for increased performance" + fi + + if use cpu_flags_x86_aes;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_AES_NI_INTEL" + WARNING_CRYPTO_AES_NI_INTEL="CRYPTO_AES_NI_INTEL: enable for increased performance" + fi + + if use cpu_flags_x86_ssse3 && use amd64; then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_SHA1_SSSE3 ~CRYPTO_SHA256_SSSE3 ~CRYPTO_SHA512_SSSE3" + WARNING_CRYPTO_SHA1_SSSE3="CRYPTO_SHA1_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA256_SSSE3="CRYPTO_SHA256_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA512_SSSE3="CRYPTO_SHA512_SSSE3: enable for increased performance" + fi + + if use kernel_linux && kernel_is -ge 4 20; then + CONFIG_CHECK="${CONFIG_CHECK} ~PKCS8_PRIVATE_KEY_PARSER" + fi + + check_extra_config + + if ! use crda; then + if use kernel_linux && kernel_is -lt 4 15; then + ewarn "POSSIBLE REGULATORY DOMAIN PROBLEM:" + ewarn "Regulatory domain support for kernels older than 4.15 requires crda." + fi + if linux_config_exists && linux_chkconfig_builtin CFG80211 && + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] + then + ewarn "" + ewarn "REGULATORY DOMAIN PROBLEM:" + ewarn "With CONFIG_CFG80211=y (built-in), the driver won't be able to load regulatory.db from" + ewarn " /lib/firmware, resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m" + ewarn " or add regulatory.db and regulatory.db.p7s to CONFIG_EXTRA_FIRMWARE." + ewarn "" + fi + fi +} + +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + 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 +} + +src_prepare() { + default + if [[ ${PV} == *9999* ]] ; then + eautoreconf + fi +} + +src_configure() { + append-cflags "-fsigned-char" + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var + $(use_enable client) + $(use_enable monitor) + $(use_enable ofono) + $(use_enable wired) + --enable-systemd-service + --with-systemd-unitdir="$(systemd_get_systemunitdir)" + --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_compile() { + emake ${MYRST2MAN} +} + +src_install() { + emake DESTDIR="${D}" ${MYRST2MAN} install + keepdir /var/lib/${PN} + + newinitd "${FILESDIR}/iwd.initd-r1" iwd + + if use wired;then + newinitd "${FILESDIR}/ead.initd" ead + fi + + if [[ ${PV} == *9999* ]] ; then + exeinto /usr/share/iwd/scripts/ + doexe test/* + fi + + if use standalone ; then + local iwdconf="${ED}/etc/iwd/main.conf" + dodir /etc/iwd + echo "[General]" > "${iwdconf}" + echo "EnableNetworkConfiguration=true" >> "${iwdconf}" + echo "[Network]" >> "${iwdconf}" + echo "NameResolvingService=$(usex systemd systemd resolvconf)" >> "${iwdconf}" + dodir /etc/conf.d + echo "rc_provide=\"net\"" > "${ED}"/etc/conf.d/iwd + fi +} |