commit:     50d614cc8c602bbc5ced0bab0c5de1ca3a91567d
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 19:16:54 2019 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 11:47:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d614cc

net-wireless/broadcom-sta: fix build for kernel 5.1, EAPI=7

* Apply Ubuntu's patch for the 5.1 kernel, taken from
  
http://launchpadlibrarian.net/429676743/bcmwl_6.30.223.271+bdcom-0ubuntu4_6.30.223.271+bdcom-0ubuntu5.diff.gz.
* Bump to EAPI 7 and use an array for PATCHES, fix one patch that didn't
  apply with -p1.

Closes: https://bugs.gentoo.org/685214
Closes: https://github.com/gentoo/gentoo/pull/12500
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 ....ebuild => broadcom-sta-6.30.223.271-r5.ebuild} | 32 ++++++++++------------
 .../files/broadcom-sta-6.30.223.141-makefile.patch |  4 +--
 .../broadcom-sta-6.30.223.271-r5-linux-5.1.patch   | 29 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 19 deletions(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild 
b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
similarity index 82%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 95eeba5c483..91581b52a4e 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 inherit eutils linux-info linux-mod
 
 DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
@@ -71,22 +71,20 @@ pkg_setup() {
        BUILD_TARGETS="wl.ko"
 }
 
-src_prepare() {
-       epatch \
-               "${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
-               "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
-               "${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
-               "${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \
-               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" \
+PATCHES=(
+               "${FILESDIR}/${PN}-6.30.223.141-makefile.patch"
+               "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch"
+               "${FILESDIR}/${PN}-6.30.223.141-gcc.patch"
+               "${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch"
+               "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
                "${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
-
-       epatch_user
-}
+               "${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
+)
 
 src_install() {
        linux-mod_src_install

diff --git 
a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch 
b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
index 09c495d2a10..d5b97fe87eb 100644
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
@@ -1,5 +1,5 @@
---- Makefile.old       2013-04-28 22:42:59.000000000 +0200
-+++ Makefile   2013-04-28 22:45:53.000000000 +0200
+--- a/Makefile 2013-04-28 22:42:59.000000000 +0200
++++ b/Makefile 2013-04-28 22:45:53.000000000 +0200
 @@ -128,9 +128,9 @@
  
  EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped

diff --git 
a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch 
b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
new file mode 100644
index 00000000000..fcee46ea3d0
--- /dev/null
+++ 
b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
@@ -0,0 +1,29 @@
+From 20bb1a6da26c496572ee63d310cdf69a2f1553f8 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <[email protected]>
+Date: Fri, 17 May 2019 20:32:20 +0000
+Subject: [PATCH] add support for linux 5.1
+
+get_ds() was removed and replaced universally with KERNEL_DS.
+Provide a version of get_ds() to do likewise for 5.1 and later.
+
+Signed-off-by: Seth Forshee <[email protected]>
+---
+ src/include/linuxver.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/include/linuxver.h b/src/include/linuxver.h
+index b05bc32..2b88b30 100644
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -591,4 +591,9 @@ do {                                                       
                \
+ #define netdev_priv(dev) dev->priv
+ #endif 
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
++#include <linux/uaccess.h>
++#define get_ds() (KERNEL_DS)
++#endif
++
+ #endif 
+-- 
+2.20.1

Reply via email to