1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 if [[ ${PV} == 99999999* ]]; then
10 EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
13 GIT_COMMIT="df40d15d6ad617e72ce7ea00b91d9117d92dcccc"
14 SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
18 DESCRIPTION="Linux firmware files"
19 HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
21 LICENSE="linux-firmware ( BSD ISC MIT no-source-code ) GPL-2 GPL-2+ freedist"
26 RDEPEND="!savedconfig? (
27 !sys-firmware/alsa-firmware[alsa_cards_ca0132]
28 !sys-firmware/alsa-firmware[alsa_cards_korg1212]
29 !sys-firmware/alsa-firmware[alsa_cards_maestro3]
30 !sys-firmware/alsa-firmware[alsa_cards_sb16]
31 !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
32 !media-tv/cx18-firmware
33 !<sys-firmware/ivtv-firmware-20080701-r1
34 !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
35 !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
36 !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
37 !net-dialup/ueagle-atm
38 !net-dialup/ueagle4-atm
39 !net-wireless/ar9271-firmware
40 !net-wireless/i2400m-fw
41 !net-wireless/libertas-firmware
42 !sys-firmware/rt61-firmware
43 !net-wireless/rt73-firmware
44 !net-wireless/rt2860-firmware
45 !net-wireless/rt2870-firmware
46 !sys-block/qla-fc-firmware
47 !sys-firmware/amd-ucode
48 !sys-firmware/iwl1000-ucode
49 !sys-firmware/iwl2000-ucode
50 !sys-firmware/iwl2030-ucode
51 !sys-firmware/iwl3945-ucode
52 !sys-firmware/iwl4965-ucode
53 !sys-firmware/iwl5000-ucode
54 !sys-firmware/iwl5150-ucode
55 !sys-firmware/iwl6000-ucode
56 !sys-firmware/iwl6005-ucode
57 !sys-firmware/iwl6030-ucode
58 !sys-firmware/iwl6050-ucode
59 !sys-firmware/iwl3160-ucode
60 !sys-firmware/iwl7260-ucode
61 !sys-firmware/iwl7265-ucode
62 !sys-firmware/iwl3160-7260-bt-ucode
63 !sys-firmware/radeon-ucode
65 #add anything else that collides to this
68 if [[ ${PV} == 99999999* ]]; then
72 # rename directory from git snapshot tarball
73 mv ${PN}-*/ ${P} || die
79 echo "# Remove files that shall not be installed from this list." > ${PN}.conf
80 find * \( \! -type d -and \! -name ${PN}.conf \) >> ${PN}.conf
82 if use savedconfig; then
83 restore_config ${PN}.conf
84 ebegin "Removing all files not listed in config"
85 find * \( \! -type d -and \! -name ${PN}.conf \) \
86 | sort ${PN}.conf ${PN}.conf - \
87 | uniq -u | xargs -r rm
89 # remove empty directories, bug #396073
90 find -type d -empty -delete || die
95 if use !savedconfig; then
96 save_config ${PN}.conf
99 insinto /lib/firmware/
104 if use savedconfig; then
105 ewarn "USE=savedconfig is active. You must handle file collisions manually."
110 elog "If you are only interested in particular firmware files, edit the saved"
111 elog "configfile and remove those that you do not want."