Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/
Date: Mon, 16 Apr 2018 13:55:43
Message-Id: 1523886923.449f5f59a7bd71aa9aa10afc8e35c8724ed9ccac.mrueg@gentoo
commit:     449f5f59a7bd71aa9aa10afc8e35c8724ed9ccac
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 16 13:55:23 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Apr 16 13:55:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=449f5f59

sys-kernel/linux-firmware: Update snapshot

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 sys-kernel/linux-firmware/Manifest                 |   1 +
 .../linux-firmware/linux-firmware-20180416.ebuild  | 119 +++++++++++++++++++++
 2 files changed, 120 insertions(+)

diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest
index 6ca2ed4a6fc..e4468c8f34a 100644
--- a/sys-kernel/linux-firmware/Manifest
+++ b/sys-kernel/linux-firmware/Manifest
@@ -2,4 +2,5 @@ DIST linux-firmware-20180103.tar.gz 138263360 BLAKE2B b7af0f94bf7111a1f4a10c7403
 DIST linux-firmware-20180213.tar.gz 140041732 BLAKE2B 8f8b382233c0d7ad3c1e82169880ed9ab8a00f3372e27f79a0c43bcf8493740dd6c496559a4b28d531878ea32b88ad0e68480ed487f23fa70b2d7c4534ef96b0 SHA512 d4c4e72cf55111cd1914d6f82def864f951c31f7d90031a14c0420ab4d36421c49df788f24ef0c3677b32ae10a1d7920a0d1a4fa983a8f1106715f94fd7977ed
 DIST linux-firmware-20180314.tar.gz 143769384 BLAKE2B 91a90cdfcb413abf6c95a19c240c4f50077b7fcf727edd4ecb280ae29bdd3ed32fb8ffb562eee16da674be0a82ea2ecd84e263b44d910114d89d7b2a031bba5c SHA512 9f9822c0e2f15d928e9c68b2ecd5f3302ac570ca8f375003168cfaaa8acf2efceb279e82ada6a98c5f2554ca81f77b7a5a126d02b43ff2e5252ab68071507f54
 DIST linux-firmware-20180412.tar.gz 145353516 BLAKE2B 72d08ff15ca58f36d53bdee68f7738d9b49a1c3f641b697571ab69e32e9ce3a33fb463a958ffc0d78520ce47518ceef3fc6ae0d560a783b805a1b22f90727878 SHA512 bf124e3e2f8f301ce1bffc0b989e132eebd088efc456a5ee667e93cc689857c67d6a3b964f345e9381c89c9dba9113af8f0d53eba7d9fa1ea74cbafe7b496420
+DIST linux-firmware-20180416.tar.gz 149436328 BLAKE2B 1da8140b8805b4c4d1c12940fe2cb71a8d4fc41ceccdd306f1dbc0c20e986b8a4cef09a1e82bd0c270fad22722738ddb4d7eb2ba81553dfddbb76a3039552d97 SHA512 cf416c7ae8d70a8c36955e7fccff16194515f3b4964e80cba268b5ab2816ea0661bc4ea47ff3bf0c5f47dbdc7abceb39c5586117a6796b5b94bd6ef740424b27
 DIST microcode_amd_fam17h.tar.gz 2204 BLAKE2B 20f3b006587f49fced335fd38711da2384a1f5cd0b93a483d7022d8aa211dc855427a637583dd2eae9f108120f2fda4b80db081d48d3332da906de8e10b94464 SHA512 d3b52797a5968f8da76d39322780e61d04bab5d810b0b07d64e469fcd67998e4191b0e0a9ab7e4c27189941369ef1b2850bbbb1458fd9bbeb958c98f6e378510

diff --git a/sys-kernel/linux-firmware/linux-firmware-20180416.ebuild b/sys-kernel/linux-firmware/linux-firmware-20180416.ebuild
new file mode 100644
index 00000000000..d8f01a90078
--- /dev/null
+++ b/sys-kernel/linux-firmware/linux-firmware-20180416.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit savedconfig
+
+if [[ ${PV} == 99999999* ]]; then
+	inherit git-r3
+	SRC_URI=""
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
+	KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+else
+	GIT_COMMIT="162161461d5c9ec62faa6d89a50afb8281fae8c9"
+	SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz
+		mirror://gentoo/microcode_amd_fam17h.tar.gz
+		https://dev.gentoo.org/~whissi/dist/${PN}/microcode_amd_fam17h.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Linux firmware files"
+HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
+
+LICENSE="linux-firmware ( BSD ISC MIT no-source-code ) GPL-2 GPL-2+ freedist"
+SLOT="0"
+IUSE="savedconfig"
+
+DEPEND=""
+RDEPEND="!savedconfig? (
+		!sys-firmware/alsa-firmware[alsa_cards_ca0132]
+		!sys-firmware/alsa-firmware[alsa_cards_korg1212]
+		!sys-firmware/alsa-firmware[alsa_cards_maestro3]
+		!sys-firmware/alsa-firmware[alsa_cards_sb16]
+		!sys-firmware/alsa-firmware[alsa_cards_ymfpci]
+		!media-tv/cx18-firmware
+		!<sys-firmware/ivtv-firmware-20080701-r1
+		!media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
+		!media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
+		!media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
+		!net-dialup/ueagle-atm
+		!net-dialup/ueagle4-atm
+		!net-wireless/ar9271-firmware
+		!net-wireless/i2400m-fw
+		!net-wireless/libertas-firmware
+		!sys-firmware/rt61-firmware
+		!net-wireless/rt73-firmware
+		!net-wireless/rt2860-firmware
+		!net-wireless/rt2870-firmware
+		!sys-block/qla-fc-firmware
+		!sys-firmware/amd-ucode
+		!sys-firmware/iwl1000-ucode
+		!sys-firmware/iwl2000-ucode
+		!sys-firmware/iwl2030-ucode
+		!sys-firmware/iwl3945-ucode
+		!sys-firmware/iwl4965-ucode
+		!sys-firmware/iwl5000-ucode
+		!sys-firmware/iwl5150-ucode
+		!sys-firmware/iwl6000-ucode
+		!sys-firmware/iwl6005-ucode
+		!sys-firmware/iwl6030-ucode
+		!sys-firmware/iwl6050-ucode
+		!sys-firmware/iwl3160-ucode
+		!sys-firmware/iwl7260-ucode
+		!sys-firmware/iwl7265-ucode
+		!sys-firmware/iwl3160-7260-bt-ucode
+		!sys-firmware/radeon-ucode
+	)"
+#add anything else that collides to this
+
+QA_PREBUILT="lib/firmware/*"
+
+src_unpack() {
+	if [[ ${PV} == 99999999* ]]; then
+		git-r3_src_unpack
+	else
+		default
+		# rename directory from git snapshot tarball
+		mv ${PN}-*/ ${P} || die
+	fi
+}
+
+src_prepare() {
+	default
+
+	mv "${WORKDIR}"/microcode_amd_fam17h.bin "${S}"/amd-ucode || die
+
+	echo "# Remove files that shall not be installed from this list." > ${PN}.conf
+	find * \( \! -type d -and \! -name ${PN}.conf \) >> ${PN}.conf
+
+	if use savedconfig; then
+		restore_config ${PN}.conf
+		ebegin "Removing all files not listed in config"
+		find * \( \! -type d -and \! -name ${PN}.conf \) \
+			| sort ${PN}.conf ${PN}.conf - \
+			| uniq -u | xargs -r rm
+		eend $? || die
+		# remove empty directories, bug #396073
+		find -type d -empty -delete || die
+	fi
+}
+
+src_install() {
+	if use !savedconfig; then
+		save_config ${PN}.conf
+	fi
+	rm ${PN}.conf || die
+	insinto /lib/firmware/
+	doins -r *
+}
+
+pkg_preinst() {
+	if use savedconfig; then
+		ewarn "USE=savedconfig is active. You must handle file collisions manually."
+	fi
+}
+
+pkg_postinst() {
+	elog "If you are only interested in particular firmware files, edit the saved"
+	elog "configfile and remove those that you do not want."
+}