commit:     ec183334ef0907de90db918399442e44fa4dcaa0
Author:     Aleksandr Batyuk <abbat.2008 <AT> gmail <DOT> com>
AuthorDate: Tue Mar 17 07:04:53 2020 +0000
Commit:     Aleksandr Batyuk <abbat.2008 <AT> gmail <DOT> com>
CommitDate: Tue Mar 17 07:04:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ec183334

net-wireless/rtl8821ce: New Package

Realtek RTL8821CE Driver module for Linux kernel.

Closes: https://bugs.gentoo.org/696980
Tested-by: Aleksandr Batyuk <abbat.2008 <AT> gmail.com>
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Aleksandr Batyuk <abbat.2008 <AT> gmail.com>

 net-wireless/rtl8821ce/Manifest                  |  1 +
 net-wireless/rtl8821ce/files/32bit.patch         | 17 +++++++++
 net-wireless/rtl8821ce/metadata.xml              |  8 ++++
 net-wireless/rtl8821ce/rtl8821ce-20191119.ebuild | 47 ++++++++++++++++++++++++
 4 files changed, 73 insertions(+)

diff --git a/net-wireless/rtl8821ce/Manifest b/net-wireless/rtl8821ce/Manifest
new file mode 100644
index 0000000..ca5653c
--- /dev/null
+++ b/net-wireless/rtl8821ce/Manifest
@@ -0,0 +1 @@
+DIST rtl8821ce-20191119.tar.gz 4519557 BLAKE2B 
e47add6566c68ea0408a34f8a374ca6cec92e68a269991f1e48c5459fea82feae8c6eecb22f06785414dc23e2c1cf889b4bda95ab49210b4edbf93aee1c9ddc5
 SHA512 
b0a248bfc7abea57163b1ad29946cce509cfac6100c2f8129dfe347539267ff6840bdef845c6939bbf4963707ded107345133b1ec56da95e334d05c67f0e4122

diff --git a/net-wireless/rtl8821ce/files/32bit.patch 
b/net-wireless/rtl8821ce/files/32bit.patch
new file mode 100644
index 0000000..8f37af8
--- /dev/null
+++ b/net-wireless/rtl8821ce/files/32bit.patch
@@ -0,0 +1,17 @@
+diff --git a/hal/rtl8821c/pci/rtl8821ce_halmac.c 
b/hal/rtl8821c/pci/rtl8821ce_halmac.c
+index 1100cdf..f7ae7b0 100755
+--- a/hal/rtl8821c/pci/rtl8821ce_halmac.c
++++ b/hal/rtl8821c/pci/rtl8821ce_halmac.c
+@@ -24,7 +24,11 @@ static u8 pci_write_port_not_xmitframe(void *d,  u32 size, 
u8 *pBuf, u8 qsel)
+       PADAPTER padapter = dvobj_get_primary_adapter(pobj);
+       u32 page_size = 0;
+       u8 *txbd;
++#ifdef CONFIG_64BIT
+       u64 txbd_dma;
++#else
++      dma_addr_t txbd_dma;
++#endif
+       u8 ret = _SUCCESS;
+       dma_addr_t mapping;
+
+

diff --git a/net-wireless/rtl8821ce/metadata.xml 
b/net-wireless/rtl8821ce/metadata.xml
new file mode 100644
index 0000000..36b7316
--- /dev/null
+++ b/net-wireless/rtl8821ce/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>abbat.2...@gmail.com</email>
+               <name>Aleksandr Batyuk</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/net-wireless/rtl8821ce/rtl8821ce-20191119.ebuild 
b/net-wireless/rtl8821ce/rtl8821ce-20191119.ebuild
new file mode 100644
index 0000000..93a134f
--- /dev/null
+++ b/net-wireless/rtl8821ce/rtl8821ce-20191119.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit linux-mod
+
+COMMIT="27f98a55cc48b9a26e6eb4127976c8feb95867d8"
+
+DESCRIPTION="Realtek RTL8821CE Driver module for Linux kernel"
+HOMEPAGE="https://github.com/tomaspinho/rtl8821ce";
+SRC_URI="https://github.com/tomaspinho/rtl8821ce/archive/${COMMIT}.tar.gz -> 
rtl8821ce-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources"
+
+S="${WORKDIR}/rtl8821ce-${COMMIT}"
+
+MODULE_NAMES="8821ce(net/wireless)"
+BUILD_TARGETS="all"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+}
+
+src_prepare(){
+       # fix 32bit build
+       epatch "${FILESDIR}/32bit.patch"
+}
+
+pkg_setup() {
+       linux-mod_pkg_setup
+}
+
+src_compile(){
+       linux-mod_src_compile
+}
+
+src_install() {
+       linux-mod_src_install
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+}

Reply via email to