summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-wireless
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/adm8211/Manifest1
-rw-r--r--net-wireless/adm8211/adm8211-20060111.ebuild57
-rw-r--r--net-wireless/adm8211/files/01-fix-up-build-breaks-from-2.6.19.patch44
-rw-r--r--net-wireless/adm8211/files/02-Use-ieee80211_generic_get_stats.patch43
-rw-r--r--net-wireless/adm8211/files/03-fix-work_struct-build-breakage.patch69
-rw-r--r--net-wireless/adm8211/files/04-fix-set-essid-for-WE-21.patch26
-rw-r--r--net-wireless/adm8211/files/05-update-email-address-from-jkmaline-cc.hut.fi-to.patch81
-rw-r--r--net-wireless/adm8211/files/06-adm8211-fix-build-breakage-from-skb-mac.raw.patch53
-rw-r--r--net-wireless/adm8211/files/2.6.20-no-config_h.patch20
-rw-r--r--net-wireless/adm8211/files/2.6.20.patch27
-rw-r--r--net-wireless/adm8211/files/linux-2.6.17.patch10
-rw-r--r--net-wireless/adm8211/files/linux-2.6.19.patch32
-rw-r--r--net-wireless/adm8211/metadata.xml5
-rw-r--r--net-wireless/aircrack-ng/Manifest2
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-1.2_rc1-r1.ebuild138
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-1.2_rc2.ebuild138
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-9999.ebuild144
-rw-r--r--net-wireless/aircrack-ng/metadata.xml23
-rw-r--r--net-wireless/airpwn/Manifest1
-rw-r--r--net-wireless/airpwn/airpwn-1.4-r2.ebuild45
-rw-r--r--net-wireless/airpwn/metadata.xml13
-rw-r--r--net-wireless/airsnort/Manifest1
-rw-r--r--net-wireless/airsnort/airsnort-0.2.7e.ebuild30
-rw-r--r--net-wireless/airsnort/metadata.xml10
-rw-r--r--net-wireless/airtraf/Manifest1
-rw-r--r--net-wireless/airtraf/airtraf-1.1-r3.ebuild54
-rw-r--r--net-wireless/airtraf/files/airtraf-1.1-fprintf-format.patch14
-rw-r--r--net-wireless/airtraf/files/airtraf-1.1-off-by-one.patch29
-rw-r--r--net-wireless/airtraf/files/airtraf-1.1.patch59
-rw-r--r--net-wireless/airtraf/metadata.xml12
-rw-r--r--net-wireless/ap-utils/Manifest2
-rw-r--r--net-wireless/ap-utils/ap-utils-1.4.ebuild32
-rw-r--r--net-wireless/ap-utils/ap-utils-1.5.ebuild23
-rw-r--r--net-wireless/ap-utils/files/ap-utils-1.4-ppc-fix.diff24
-rw-r--r--net-wireless/ap-utils/metadata.xml5
-rw-r--r--net-wireless/b43-fwcutter/Manifest2
-rw-r--r--net-wireless/b43-fwcutter/b43-fwcutter-018.ebuild34
-rw-r--r--net-wireless/b43-fwcutter/b43-fwcutter-019.ebuild36
-rw-r--r--net-wireless/b43-fwcutter/metadata.xml12
-rw-r--r--net-wireless/bcm43xx-fwcutter/Manifest2
-rw-r--r--net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-005.ebuild39
-rw-r--r--net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-006.ebuild39
-rw-r--r--net-wireless/bcm43xx-fwcutter/metadata.xml12
-rw-r--r--net-wireless/bladerf-firmware/Manifest2
-rw-r--r--net-wireless/bladerf-firmware/bladerf-firmware-1.7.1.ebuild28
-rw-r--r--net-wireless/bladerf-firmware/bladerf-firmware-1.8.0.ebuild34
-rw-r--r--net-wireless/bladerf-firmware/metadata.xml11
-rw-r--r--net-wireless/bladerf-fpga/Manifest8
-rw-r--r--net-wireless/bladerf-fpga/bladerf-fpga-0.0.6.ebuild30
-rw-r--r--net-wireless/bladerf-fpga/bladerf-fpga-0.1.1-r1.ebuild30
-rw-r--r--net-wireless/bladerf-fpga/bladerf-fpga-0.1.2.ebuild30
-rw-r--r--net-wireless/bladerf-fpga/bladerf-fpga-0.3.4.ebuild30
-rw-r--r--net-wireless/bladerf-fpga/metadata.xml15
-rw-r--r--net-wireless/bladerf/Manifest2
-rw-r--r--net-wireless/bladerf/bladerf-2015.02.ebuild53
-rw-r--r--net-wireless/bladerf/bladerf-2015.07.ebuild53
-rw-r--r--net-wireless/bladerf/bladerf-9999.ebuild53
-rw-r--r--net-wireless/bladerf/metadata.xml17
-rw-r--r--net-wireless/bluedevil/Manifest2
-rw-r--r--net-wireless/bluedevil/bluedevil-2.0_rc1.ebuild27
-rw-r--r--net-wireless/bluedevil/bluedevil-2.1.1.ebuild27
-rw-r--r--net-wireless/bluedevil/metadata.xml5
-rw-r--r--net-wireless/blueman/Manifest3
-rw-r--r--net-wireless/blueman/blueman-1.23-r2.ebuild100
-rw-r--r--net-wireless/blueman/blueman-1.98_p20150105.ebuild101
-rw-r--r--net-wireless/blueman/blueman-2.0.ebuild116
-rw-r--r--net-wireless/blueman/blueman-9999.ebuild115
-rw-r--r--net-wireless/blueman/files/blueman-1.23-fix-broken-status-icon.patch34
-rw-r--r--net-wireless/blueman/files/blueman-1.23-plugins-conf-file.patch30
-rw-r--r--net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch266
-rw-r--r--net-wireless/blueman/files/blueman-1.98_p20150105-set-codeset-for-gettext-to-UTF-8-always.patch239
-rw-r--r--net-wireless/blueman/files/blueman-2.0-set-codeset-for-gettext-to-UTF-8-always.patch219
-rw-r--r--net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch267
-rw-r--r--net-wireless/blueman/metadata.xml19
-rw-r--r--net-wireless/bluez-hcidump/Manifest1
-rw-r--r--net-wireless/bluez-hcidump/bluez-hcidump-2.5.ebuild19
-rw-r--r--net-wireless/bluez-hcidump/metadata.xml8
-rw-r--r--net-wireless/bluez/Manifest5
-rw-r--r--net-wireless/bluez/bluez-4.101-r9.ebuild204
-rw-r--r--net-wireless/bluez/bluez-5.25.ebuild208
-rw-r--r--net-wireless/bluez/bluez-5.32.ebuild209
-rw-r--r--net-wireless/bluez/bluez-5.33.ebuild209
-rw-r--r--net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch58
-rw-r--r--net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch38
-rw-r--r--net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch29
-rw-r--r--net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch47
-rw-r--r--net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch25
-rw-r--r--net-wireless/bluez/files/bluetooth-init.d-r221
-rw-r--r--net-wireless/bluez/files/bluetooth-init.d-r321
-rwxr-xr-xnet-wireless/bluez/files/bluez-plugdev.patch14
-rw-r--r--net-wireless/bluez/files/bluez-udevadm-path.patch10
-rw-r--r--net-wireless/bluez/files/rfcomm-conf.d5
-rw-r--r--net-wireless/bluez/files/rfcomm-init.d27
-rwxr-xr-xnet-wireless/bluez/files/rfcomm-init.d-r235
-rw-r--r--net-wireless/bluez/metadata.xml21
-rw-r--r--net-wireless/broadcom-sta/Manifest7
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild66
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild67
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild69
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild75
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild77
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild77
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild83
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch21
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch60
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch71
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch32
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch10
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch102
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch17
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch126
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch29
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch30
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch350
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch26
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch102
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch17
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch14
-rw-r--r--net-wireless/broadcom-sta/metadata.xml15
-rw-r--r--net-wireless/bss/Manifest1
-rw-r--r--net-wireless/bss/bss-0.8.ebuild34
-rw-r--r--net-wireless/bss/metadata.xml7
-rw-r--r--net-wireless/btcrack/btcrack-9999.ebuild28
-rw-r--r--net-wireless/btcrack/metadata.xml13
-rw-r--r--net-wireless/chillispot/Manifest1
-rw-r--r--net-wireless/chillispot/chillispot-1.1.0.ebuild34
-rw-r--r--net-wireless/chillispot/files/chillispot33
-rw-r--r--net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch81
-rw-r--r--net-wireless/chillispot/metadata.xml15
-rw-r--r--net-wireless/chirp/Manifest1
-rw-r--r--net-wireless/chirp/chirp-0.4.1.ebuild43
-rw-r--r--net-wireless/chirp/chirp-9999.ebuild43
-rw-r--r--net-wireless/chirp/metadata.xml12
-rw-r--r--net-wireless/cpyrit-cuda/Manifest1
-rw-r--r--net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0-r1.ebuild30
-rw-r--r--net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0.ebuild27
-rw-r--r--net-wireless/cpyrit-cuda/metadata.xml13
-rw-r--r--net-wireless/cpyrit-opencl/Manifest1
-rw-r--r--net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0-r1.ebuild30
-rw-r--r--net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0.ebuild27
-rw-r--r--net-wireless/cpyrit-opencl/metadata.xml13
-rw-r--r--net-wireless/crackle/Manifest1
-rw-r--r--net-wireless/crackle/crackle-0.1.ebuild29
-rw-r--r--net-wireless/crackle/files/flags.patch20
-rw-r--r--net-wireless/crackle/metadata.xml10
-rw-r--r--net-wireless/crda/Manifest3
-rw-r--r--net-wireless/crda/crda-1.1.2-r3.ebuild48
-rw-r--r--net-wireless/crda/crda-1.1.2-r4.ebuild58
-rw-r--r--net-wireless/crda/crda-1.1.3-r1.ebuild67
-rw-r--r--net-wireless/crda/crda-1.1.3.ebuild56
-rw-r--r--net-wireless/crda/crda-3.18.ebuild75
-rw-r--r--net-wireless/crda/files/crda-1.1.3-missing-include.patch11
-rw-r--r--net-wireless/crda/files/crda-3.18-cflags.patch33
-rw-r--r--net-wireless/crda/files/crda-3.18-libreg-link.patch30
-rw-r--r--net-wireless/crda/files/crda-3.18-no-ldconfig.patch28
-rw-r--r--net-wireless/crda/files/crda-3.18-no-werror.patch32
-rw-r--r--net-wireless/crda/files/crda-3.18-openssl.patch44
-rw-r--r--net-wireless/crda/files/libnl31-support.diff60
-rw-r--r--net-wireless/crda/metadata.xml16
-rw-r--r--net-wireless/dump1090/Manifest1
-rw-r--r--net-wireless/dump1090/dump1090-0.0_p20140919.ebuild47
-rw-r--r--net-wireless/dump1090/dump1090-9999.ebuild47
-rw-r--r--net-wireless/dump1090/files/gmap_usr_share_mv.patch14
-rw-r--r--net-wireless/dump1090/metadata.xml12
-rw-r--r--net-wireless/gnome-bluetooth/Manifest3
-rw-r--r--net-wireless/gnome-bluetooth/files/61-gnome-bluetooth.rules11
-rw-r--r--net-wireless/gnome-bluetooth/files/gnome-bluetooth-3.12.0-gold.patch54
-rw-r--r--net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.0.ebuild73
-rw-r--r--net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.1.ebuild73
-rw-r--r--net-wireless/gnome-bluetooth/gnome-bluetooth-3.16.1.ebuild73
-rw-r--r--net-wireless/gnome-bluetooth/metadata.xml5
-rw-r--r--net-wireless/gnuradio/Manifest3
-rw-r--r--net-wireless/gnuradio/files/gnuradio-3.6.1-automagic-audio.patch90
-rw-r--r--net-wireless/gnuradio/files/gnuradio-3.7.4-include_stringh.patch18
-rw-r--r--net-wireless/gnuradio/files/gnuradio-3.7.6.1-qwt-with-qt5-support.patch23
-rw-r--r--net-wireless/gnuradio/files/gnuradio-9999-build-type-nonfatal.patch11
-rw-r--r--net-wireless/gnuradio/gnuradio-3.6.5.1-r2.ebuild196
-rw-r--r--net-wireless/gnuradio/gnuradio-3.7.6.1-r2.ebuild232
-rw-r--r--net-wireless/gnuradio/gnuradio-3.7.7.1.ebuild231
-rw-r--r--net-wireless/gnuradio/gnuradio-9999.ebuild231
-rw-r--r--net-wireless/gnuradio/metadata.xml28
-rw-r--r--net-wireless/gobi_loader/Manifest1
-rw-r--r--net-wireless/gobi_loader/files/gobi_loader-0.7-makefile.patch22
-rw-r--r--net-wireless/gobi_loader/gobi_loader-0.7-r2.ebuild34
-rw-r--r--net-wireless/gobi_loader/metadata.xml13
-rw-r--r--net-wireless/gqrx/Manifest2
-rw-r--r--net-wireless/gqrx/files/no_qtsvg.patch13
-rw-r--r--net-wireless/gqrx/gqrx-2.3.1.ebuild44
-rw-r--r--net-wireless/gqrx/gqrx-2.3.2.ebuild44
-rw-r--r--net-wireless/gqrx/gqrx-9999.ebuild43
-rw-r--r--net-wireless/gqrx/metadata.xml14
-rw-r--r--net-wireless/gr-baz/gr-baz-9999.ebuild42
-rw-r--r--net-wireless/gr-baz/metadata.xml17
-rw-r--r--net-wireless/gr-iqbal/Manifest2
-rw-r--r--net-wireless/gr-iqbal/files/add-pkgconfig-file.patch52
-rw-r--r--net-wireless/gr-iqbal/gr-iqbal-0.36.0.ebuild39
-rw-r--r--net-wireless/gr-iqbal/gr-iqbal-0.37.2.ebuild32
-rw-r--r--net-wireless/gr-iqbal/gr-iqbal-9999.ebuild32
-rw-r--r--net-wireless/gr-iqbal/metadata.xml12
-rw-r--r--net-wireless/gr-osmosdr/Manifest2
-rw-r--r--net-wireless/gr-osmosdr/files/hackrf-safety.patch34
-rw-r--r--net-wireless/gr-osmosdr/gr-osmosdr-0.1.4.ebuild70
-rw-r--r--net-wireless/gr-osmosdr/gr-osmosdr-0.1.4_p20150730.ebuild70
-rw-r--r--net-wireless/gr-osmosdr/gr-osmosdr-9999.ebuild70
-rw-r--r--net-wireless/gr-osmosdr/metadata.xml15
-rw-r--r--net-wireless/gr-rds/gr-rds-9999.ebuild45
-rw-r--r--net-wireless/gr-rds/metadata.xml8
-rw-r--r--net-wireless/hackrf-tools/Manifest2
-rw-r--r--net-wireless/hackrf-tools/files/52-hackrf.rules1
-rw-r--r--net-wireless/hackrf-tools/hackrf-tools-2014.08.1.ebuild43
-rw-r--r--net-wireless/hackrf-tools/hackrf-tools-2015.07.2-r1.ebuild45
-rw-r--r--net-wireless/hackrf-tools/hackrf-tools-2015.07.2.ebuild43
-rw-r--r--net-wireless/hackrf-tools/hackrf-tools-9999.ebuild45
-rw-r--r--net-wireless/hackrf-tools/metadata.xml15
-rw-r--r--net-wireless/hidclient/Manifest1
-rw-r--r--net-wireless/hidclient/files/README16
-rw-r--r--net-wireless/hidclient/hidclient-20120728.ebuild34
-rw-r--r--net-wireless/hidclient/metadata.xml11
-rw-r--r--net-wireless/horst/Manifest1
-rw-r--r--net-wireless/horst/horst-4.2.ebuild35
-rw-r--r--net-wireless/horst/horst-9999.ebuild37
-rw-r--r--net-wireless/horst/metadata.xml11
-rw-r--r--net-wireless/hostap-utils/Manifest1
-rw-r--r--net-wireless/hostap-utils/files/hostap-utils-0.4.7-makefile.patch31
-rw-r--r--net-wireless/hostap-utils/hostap-utils-0.4.7-r1.ebuild34
-rw-r--r--net-wireless/hostap-utils/metadata.xml6
-rw-r--r--net-wireless/hostapd/Manifest1
-rw-r--r--net-wireless/hostapd/files/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch49
-rw-r--r--net-wireless/hostapd/files/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch41
-rw-r--r--net-wireless/hostapd/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch73
-rw-r--r--net-wireless/hostapd/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch66
-rw-r--r--net-wireless/hostapd/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch52
-rw-r--r--net-wireless/hostapd/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch50
-rw-r--r--net-wireless/hostapd/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch32
-rw-r--r--net-wireless/hostapd/files/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch29
-rw-r--r--net-wireless/hostapd/files/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch61
-rw-r--r--net-wireless/hostapd/files/hostapd-conf.d9
-rw-r--r--net-wireless/hostapd/files/hostapd-hlr_auc_gw-openssl.patch43
-rw-r--r--net-wireless/hostapd/files/hostapd-init.d39
-rw-r--r--net-wireless/hostapd/files/hostapd.service9
-rw-r--r--net-wireless/hostapd/hostapd-2.4-r2.ebuild220
-rw-r--r--net-wireless/hostapd/hostapd-2.4-r3.ebuild224
-rw-r--r--net-wireless/hostapd/metadata.xml21
-rw-r--r--net-wireless/irda-utils/Manifest1
-rw-r--r--net-wireless/irda-utils/files/irda-setup.sh68
-rw-r--r--net-wireless/irda-utils/files/irda-usb.sh62
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch15
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch26
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch11
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff48
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch132
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff11
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff14
-rw-r--r--net-wireless/irda-utils/files/irda-utils-rh1.patch11
-rw-r--r--net-wireless/irda-utils/files/irda.confd27
-rw-r--r--net-wireless/irda-utils/files/irda.initd86
-rw-r--r--net-wireless/irda-utils/files/irda.modsd48
-rw-r--r--net-wireless/irda-utils/files/irda.rules18
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild94
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild96
-rw-r--r--net-wireless/irda-utils/metadata.xml10
-rw-r--r--net-wireless/iw/Manifest6
-rw-r--r--net-wireless/iw/files/iw-3.10-versioncheck.patch30
-rw-r--r--net-wireless/iw/iw-3.10-r1.ebuild33
-rw-r--r--net-wireless/iw/iw-3.10.ebuild32
-rw-r--r--net-wireless/iw/iw-3.11.ebuild32
-rw-r--r--net-wireless/iw/iw-3.13.ebuild34
-rw-r--r--net-wireless/iw/iw-3.14.ebuild34
-rw-r--r--net-wireless/iw/iw-3.17.ebuild34
-rw-r--r--net-wireless/iw/iw-4.0.ebuild34
-rw-r--r--net-wireless/iw/metadata.xml13
-rw-r--r--net-wireless/kismet-ubertooth/Manifest3
-rw-r--r--net-wireless/kismet-ubertooth/files/kismet-ubertooth-0.0_p534-respect-cflags.patch61
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534-r1.ebuild58
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534.ebuild58
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-2012.10.1-r1.ebuild56
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-2012.10.1-r2.ebuild56
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-2012.10.1.ebuild56
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-2014.04.1.ebuild54
-rw-r--r--net-wireless/kismet-ubertooth/kismet-ubertooth-9999.ebuild54
-rw-r--r--net-wireless/kismet-ubertooth/metadata.xml13
-rw-r--r--net-wireless/kismet/Manifest1
-rw-r--r--net-wireless/kismet/files/bluechanfix_r3184.patch15
-rw-r--r--net-wireless/kismet/files/header_alignment_r3326.patch58
-rw-r--r--net-wireless/kismet/files/kismet-2011.03.2-cflags-backport.patch115
-rw-r--r--net-wireless/kismet/files/kismet-2013.03.1-tinfo.patch11
-rw-r--r--net-wireless/kismet/files/kismet-console-scrolling-backport.patch12
-rw-r--r--net-wireless/kismet/files/kismet.confd12
-rw-r--r--net-wireless/kismet/files/kismet.initd27
-rw-r--r--net-wireless/kismet/files/makefile.patch119
-rw-r--r--net-wireless/kismet/files/plugins-ldflags.patch10
-rw-r--r--net-wireless/kismet/files/ruby19_fixes.patch85
-rw-r--r--net-wireless/kismet/files/update-kismet_shootout.patch103
-rw-r--r--net-wireless/kismet/files/use-hostname-by-default.patch29
-rw-r--r--net-wireless/kismet/kismet-2013.03.1-r2.ebuild174
-rw-r--r--net-wireless/kismet/kismet-9999.ebuild167
-rw-r--r--net-wireless/kismet/metadata.xml31
-rw-r--r--net-wireless/lorcon-old/lorcon-old-9999.ebuild27
-rw-r--r--net-wireless/lorcon-old/metadata.xml11
-rw-r--r--net-wireless/lorcon/Manifest1
-rw-r--r--net-wireless/lorcon/lorcon-0.0_p20130212-r1.ebuild100
-rw-r--r--net-wireless/lorcon/lorcon-9999.ebuild100
-rw-r--r--net-wireless/lorcon/metadata.xml11
-rw-r--r--net-wireless/madwifi-ng-tools/Manifest6
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.3.3.ebuild75
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4119.20100201.ebuild70
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4133.20100621.ebuild70
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4165.20110816.ebuild70
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.4180.20120502.ebuild70
-rw-r--r--net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.ebuild75
-rw-r--r--net-wireless/madwifi-ng-tools/metadata.xml11
-rw-r--r--net-wireless/madwifi-ng/Manifest6
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-dfs-ieee80211-skb-update.patch12
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-0.9.3-uudecode-gcda-fix.patch12
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch190
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-request_module-build.patch31
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-injection-r3925.patch32
-rw-r--r--net-wireless/madwifi-ng/files/madwifi-ng-r1886.patch26
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.3.3.ebuild85
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4-r1.ebuild95
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4.4119.20100201.ebuild96
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4.4133.20100621.ebuild96
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4.4165.20110816.ebuild96
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4.4180.20120502.ebuild96
-rw-r--r--net-wireless/madwifi-ng/madwifi-ng-0.9.4.ebuild95
-rw-r--r--net-wireless/madwifi-ng/metadata.xml19
-rw-r--r--net-wireless/madwimax/Manifest1
-rw-r--r--net-wireless/madwimax/madwimax-0.1.1-r1.ebuild42
-rw-r--r--net-wireless/madwimax/metadata.xml10
-rw-r--r--net-wireless/mdk/Manifest1
-rw-r--r--net-wireless/mdk/files/3.6-makefile.patch37
-rw-r--r--net-wireless/mdk/files/fix_wids_mdk3_v5.patch21
-rw-r--r--net-wireless/mdk/mdk-3.6-r1.ebuild37
-rw-r--r--net-wireless/mdk/metadata.xml9
-rw-r--r--net-wireless/metadata.xml36
-rw-r--r--net-wireless/mfoc/Manifest1
-rw-r--r--net-wireless/mfoc/metadata.xml8
-rw-r--r--net-wireless/mfoc/mfoc-0.10.7.ebuild27
-rw-r--r--net-wireless/multimode/Manifest2
-rw-r--r--net-wireless/multimode/metadata.xml12
-rw-r--r--net-wireless/multimode/multimode-1.00-r2.ebuild43
-rw-r--r--net-wireless/multimode/multimode-1.4_p20140831-r1.ebuild41
-rw-r--r--net-wireless/multimode/multimode-9999.ebuild41
-rw-r--r--net-wireless/ndiswrapper/Manifest2
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.56-cflags.patch12
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.58-3.9.patch32
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.59-3.14.patch48
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.59-cflags.patch13
-rw-r--r--net-wireless/ndiswrapper/metadata.xml15
-rw-r--r--net-wireless/ndiswrapper/ndiswrapper-1.58.ebuild106
-rw-r--r--net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild107
-rw-r--r--net-wireless/neard/Manifest3
-rw-r--r--net-wireless/neard/files/neard.confd8
-rw-r--r--net-wireless/neard/files/neard.rc23
-rw-r--r--net-wireless/neard/metadata.xml11
-rw-r--r--net-wireless/neard/neard-0.11.ebuild30
-rw-r--r--net-wireless/neard/neard-0.13.ebuild30
-rw-r--r--net-wireless/neard/neard-0.15.ebuild31
-rw-r--r--net-wireless/openbsc/metadata.xml9
-rw-r--r--net-wireless/openbsc/openbsc-9999.ebuild34
-rw-r--r--net-wireless/openggsn/metadata.xml6
-rw-r--r--net-wireless/openggsn/openggsn-9999.ebuild23
-rw-r--r--net-wireless/orinoco-fwutils/Manifest2
-rw-r--r--net-wireless/orinoco-fwutils/metadata.xml11
-rw-r--r--net-wireless/orinoco-fwutils/orinoco-fwutils-0.1.ebuild43
-rw-r--r--net-wireless/orinoco-fwutils/orinoco-fwutils-0.3.ebuild42
-rw-r--r--net-wireless/orinoco-usb/metadata.xml5
-rw-r--r--net-wireless/orinoco-usb/orinoco-usb-9999.ebuild42
-rw-r--r--net-wireless/osmobts/metadata.xml6
-rw-r--r--net-wireless/osmobts/osmobts-9999.ebuild31
-rw-r--r--net-wireless/osmocom-bb/metadata.xml9
-rw-r--r--net-wireless/osmocom-bb/osmocom-bb-9999.ebuild46
-rw-r--r--net-wireless/portapack-firmware/Manifest1
-rw-r--r--net-wireless/portapack-firmware/metadata.xml9
-rw-r--r--net-wireless/portapack-firmware/portapack-firmware-20150722.ebuild50
-rw-r--r--net-wireless/pyrit/Manifest1
-rw-r--r--net-wireless/pyrit/metadata.xml17
-rw-r--r--net-wireless/pyrit/pyrit-0.4.0-r1.ebuild35
-rw-r--r--net-wireless/python-wifi/Manifest1
-rw-r--r--net-wireless/python-wifi/metadata.xml11
-rw-r--r--net-wireless/python-wifi/python-wifi-0.5.0-r1.ebuild36
-rw-r--r--net-wireless/python-wifi/python-wifi-0.5.0-r3.ebuild34
-rw-r--r--net-wireless/reaver/Manifest1
-rw-r--r--net-wireless/reaver/files/reaver-1.4_cflags.patch47
-rw-r--r--net-wireless/reaver/files/reaver-1.4_memset.patch11
-rw-r--r--net-wireless/reaver/files/reaver-1.4_parallel-make.patch50
-rw-r--r--net-wireless/reaver/files/reaver-1.4_var_db.patch11
-rw-r--r--net-wireless/reaver/files/reaver-1.4_wps_registrar.patch11
-rw-r--r--net-wireless/reaver/metadata.xml13
-rw-r--r--net-wireless/reaver/reaver-1.4-r1.ebuild36
-rw-r--r--net-wireless/reaver/reaver-1.4-r3.ebuild47
-rw-r--r--net-wireless/reaver/reaver-1.4.ebuild34
-rw-r--r--net-wireless/rfkill/Manifest1
-rw-r--r--net-wireless/rfkill/metadata.xml13
-rw-r--r--net-wireless/rfkill/rfkill-0.5.ebuild30
-rw-r--r--net-wireless/rfswitch/Manifest1
-rw-r--r--net-wireless/rfswitch/metadata.xml10
-rw-r--r--net-wireless/rfswitch/rfswitch-1.3.ebuild54
-rw-r--r--net-wireless/rtl-sdr/Manifest3
-rw-r--r--net-wireless/rtl-sdr/metadata.xml6
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-0.5.0.ebuild51
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-0.5.3-r1.ebuild50
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-0.5.3.ebuild56
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-0.5.3_p20150730.ebuild50
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-9999.ebuild50
-rw-r--r--net-wireless/rtl8180/Manifest1
-rw-r--r--net-wireless/rtl8180/files/rtl8180-2.6.19.patch145
-rw-r--r--net-wireless/rtl8180/files/rtl8180-2.6.20.patch32
-rw-r--r--net-wireless/rtl8180/metadata.xml5
-rw-r--r--net-wireless/rtl8180/rtl8180-0.22_pre20050528.ebuild45
-rw-r--r--net-wireless/spectools/Manifest2
-rw-r--r--net-wireless/spectools/metadata.xml24
-rw-r--r--net-wireless/spectools/spectools-2011.08.1-r2.ebuild71
-rw-r--r--net-wireless/spectools/spectools-2011.08.1_p20140618.ebuild70
-rw-r--r--net-wireless/spectools/spectools-9999.ebuild70
-rw-r--r--net-wireless/ubertooth/Manifest2
-rw-r--r--net-wireless/ubertooth/files/40-ubertooth.rules5
-rw-r--r--net-wireless/ubertooth/metadata.xml21
-rw-r--r--net-wireless/ubertooth/ubertooth-0.0_p534.ebuild92
-rw-r--r--net-wireless/ubertooth/ubertooth-2014.04.1-r1.ebuild116
-rw-r--r--net-wireless/ubertooth/ubertooth-9999.ebuild102
-rw-r--r--net-wireless/uhd/Manifest2
-rw-r--r--net-wireless/uhd/metadata.xml18
-rw-r--r--net-wireless/uhd/uhd-3.8.2.ebuild46
-rw-r--r--net-wireless/wavemon/Manifest2
-rw-r--r--net-wireless/wavemon/files/wavemon-0.6.7-dont-override-CFLAGS.patch11
-rw-r--r--net-wireless/wavemon/files/wavemon-0.7.5-ncurses-tinfo.patch18
-rw-r--r--net-wireless/wavemon/files/wavemon-0.7.6-ncurses-tinfo.patch19
-rw-r--r--net-wireless/wavemon/metadata.xml8
-rw-r--r--net-wireless/wavemon/wavemon-0.7.5.ebuild47
-rw-r--r--net-wireless/wavemon/wavemon-0.7.6.ebuild51
-rw-r--r--net-wireless/wepattack/Manifest1
-rw-r--r--net-wireless/wepattack/files/wepattack-0.1.3-filter-mac-address.patch186
-rw-r--r--net-wireless/wepattack/files/wepattack-0.1.3-missed-string.h-warnings-fix.patch30
-rw-r--r--net-wireless/wepattack/files/wepattack.conf9
-rw-r--r--net-wireless/wepattack/metadata.xml18
-rw-r--r--net-wireless/wepattack/wepattack-0.1.3-r3.ebuild57
-rw-r--r--net-wireless/wepdecrypt/Manifest1
-rw-r--r--net-wireless/wepdecrypt/files/wepdecrypt-0.8-buffer.patch11
-rw-r--r--net-wireless/wepdecrypt/files/wepdecrypt-0.8-build.patch20
-rw-r--r--net-wireless/wepdecrypt/files/wepdecrypt-0.8-dyn.patch13
-rw-r--r--net-wireless/wepdecrypt/files/wepdecrypt-0.8-fltk.patch16
-rw-r--r--net-wireless/wepdecrypt/metadata.xml8
-rw-r--r--net-wireless/wepdecrypt/wepdecrypt-0.8-r2.ebuild44
-rw-r--r--net-wireless/wifi-radar/Manifest1
-rw-r--r--net-wireless/wifi-radar/metadata.xml7
-rw-r--r--net-wireless/wifi-radar/wifi-radar-2.0.8-r2.ebuild68
-rw-r--r--net-wireless/wireless-regdb/Manifest4
-rw-r--r--net-wireless/wireless-regdb/metadata.xml16
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20130213.ebuild34
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20141118.ebuild34
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20150313.ebuild34
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20150605.ebuild34
-rw-r--r--net-wireless/wireless-tools/Manifest1
-rw-r--r--net-wireless/wireless-tools/files/wireless-tools-29-asneeded.patch13
-rw-r--r--net-wireless/wireless-tools/metadata.xml17
-rw-r--r--net-wireless/wireless-tools/wireless-tools-30_pre9.ebuild62
-rw-r--r--net-wireless/wpa_supplicant/Manifest1
-rw-r--r--net-wireless/wpa_supplicant/files/2015-1/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch42
-rw-r--r--net-wireless/wpa_supplicant/files/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch49
-rw-r--r--net-wireless/wpa_supplicant/files/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch41
-rw-r--r--net-wireless/wpa_supplicant/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch73
-rw-r--r--net-wireless/wpa_supplicant/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch66
-rw-r--r--net-wireless/wpa_supplicant/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch52
-rw-r--r--net-wireless/wpa_supplicant/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch50
-rw-r--r--net-wireless/wpa_supplicant/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch32
-rw-r--r--net-wireless/wpa_supplicant/files/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch29
-rw-r--r--net-wireless/wpa_supplicant/files/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch61
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_cli.sh47
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-dbus-path-fix.patch20
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-do-not-call-dbus-functions-with-NULL-path.patch60
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-2.4-generate-libeap-peer.patch353
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-conf.d6
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-init.d70
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant.conf7
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant.service11
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant_at.service11
-rw-r--r--net-wireless/wpa_supplicant/metadata.xml28
-rw-r--r--net-wireless/wpa_supplicant/wpa_supplicant-2.4-r3.ebuild383
-rw-r--r--net-wireless/wpa_supplicant/wpa_supplicant-2.4-r4.ebuild387
-rw-r--r--net-wireless/yatebts/Manifest1
-rw-r--r--net-wireless/yatebts/files/yatebts-4.0.0-dont-mess-with-cflags.patch13
-rw-r--r--net-wireless/yatebts/files/yatebts-bladeRF-transceiver_revert_init_order.patch86
-rw-r--r--net-wireless/yatebts/files/yatebts-sgsnggsn-inetutils-hostname-fix.diff14
-rw-r--r--net-wireless/yatebts/metadata.xml12
-rw-r--r--net-wireless/yatebts/yatebts-4.0.0-r1.ebuild50
-rw-r--r--net-wireless/yatebts/yatebts-9999.ebuild49
497 files changed, 21107 insertions, 0 deletions
diff --git a/net-wireless/adm8211/Manifest b/net-wireless/adm8211/Manifest
new file mode 100644
index 00000000000..a9f0e75f8d1
--- /dev/null
+++ b/net-wireless/adm8211/Manifest
@@ -0,0 +1 @@
+DIST adm8211-20060111.tar.bz2 36391 SHA256 09e803d78d2b86ca2261960135d280b48ef8ccb9bf1aef877bc5a011bf32bb76
diff --git a/net-wireless/adm8211/adm8211-20060111.ebuild b/net-wireless/adm8211/adm8211-20060111.ebuild
new file mode 100644
index 00000000000..df9c975a56f
--- /dev/null
+++ b/net-wireless/adm8211/adm8211-20060111.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-mod
+
+S=${WORKDIR}/${PN}
+
+DESCRIPTION="IEEE 802.11 wireless LAN driver for adm8211 based cards"
+HOMEPAGE="http://aluminum.sourmilk.net/adm8211/"
+SRC_URI="http://aluminum.sourmilk.net/adm8211/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+RDEPEND="net-wireless/wireless-tools"
+
+BUILD_TARGETS="all"
+
+MODULE_NAMES="adm8211(net:)"
+
+CONFIG_CHECK="WIRELESS_EXT CRYPTO_ARC4"
+ERROR_WIRELESS_EXT="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions"
+ERROR_CRYPTO_ARC4="${P} requires support for ARC4 cipher algorithm (CONFIG_CRYPTO_ARC4)."
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is lt 2 6 10; then
+ eerror "${P} requires linux-2.6.9 or later."
+ die "${P} requires linux-2.6.9 or later"
+ fi
+
+ BUILD_PARAMS="KDIR=${KV_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/01-fix-up-build-breaks-from-2.6.19.patch
+ epatch ${FILESDIR}/02-Use-ieee80211_generic_get_stats.patch
+ epatch ${FILESDIR}/03-fix-work_struct-build-breakage.patch
+ epatch ${FILESDIR}/04-fix-set-essid-for-WE-21.patch
+ epatch ${FILESDIR}/05-update-email-address-from-jkmaline-cc.hut.fi-to.patch
+ kernel_is ge 2 6 22 && epatch ${FILESDIR}/06-adm8211-fix-build-breakage-from-skb-mac.raw.patch
+
+ convert_to_m ${S}/Makefile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc Changelog NOTES TODO
+}
diff --git a/net-wireless/adm8211/files/01-fix-up-build-breaks-from-2.6.19.patch b/net-wireless/adm8211/files/01-fix-up-build-breaks-from-2.6.19.patch
new file mode 100644
index 00000000000..1cf8f0a0ac1
--- /dev/null
+++ b/net-wireless/adm8211/files/01-fix-up-build-breaks-from-2.6.19.patch
@@ -0,0 +1,44 @@
+From 108f260412a71614665e8867a3356231af43f374 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville@tuxdriver.com>
+Date: Tue, 17 Oct 2006 13:02:27 -0400
+Subject: [PATCH] [PATCH] adm8211: fix-up build breaks from 2.6.19
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ adm8211/adm8211_hw.c | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/adm8211/adm8211_hw.c b/adm8211/adm8211_hw.c
+index a45c74d..f95d798 100644
+--- a/adm8211/adm8211_hw.c
++++ b/adm8211/adm8211_hw.c
+@@ -15,7 +15,6 @@
+ * more details.
+ */
+
+-#include <linux/config.h>
+ #include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+@@ -737,8 +736,7 @@ static void adm8211_interrupt_rci(struct net_device *dev)
+ }
+
+
+-static irqreturn_t adm8211_interrupt(int irq, void *dev_id,
+- struct pt_regs *regs)
++static irqreturn_t adm8211_interrupt(int irq, void *dev_id)
+ {
+ #define ADM8211_INT(x) if (unlikely(stsr & ADM8211_STSR_ ## x)) printk(KERN_DEBUG "%s: " #x "\n", dev->name)
+
+@@ -2041,7 +2039,7 @@ static int adm8211_open(struct net_device *dev)
+ adm8211_set_rx_mode(dev);
+
+ retval = request_irq(dev->irq, &adm8211_interrupt,
+- SA_SHIRQ, dev->name, dev);
++ IRQF_SHARED, dev->name, dev);
+ if (retval) {
+ printk(KERN_ERR "%s: failed to register IRQ handler\n",
+ dev->name);
+--
+1.5.2.1
+
diff --git a/net-wireless/adm8211/files/02-Use-ieee80211_generic_get_stats.patch b/net-wireless/adm8211/files/02-Use-ieee80211_generic_get_stats.patch
new file mode 100644
index 00000000000..4adfea7c94e
--- /dev/null
+++ b/net-wireless/adm8211/files/02-Use-ieee80211_generic_get_stats.patch
@@ -0,0 +1,43 @@
+From 192837172632b72c0da82ade708bb6b1ed649b8f Mon Sep 17 00:00:00 2001
+From: Daniel Drake <dsd@gentoo.org>
+Date: Wed, 22 Nov 2006 03:16:13 +0000
+Subject: [PATCH] [PATCH] adm8211: Use ieee80211_generic_get_stats
+
+adm8211 can also benefit from the generic get_stats implementation in my
+previous mail. I am sending the adm8211 patch separately because adm8211 is
+not in Linus' tree.
+
+Signed-off-by: Daniel Drake <dsd@gentoo.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ adm8211/adm8211_hw.c | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+diff --git a/adm8211/adm8211_hw.c b/adm8211/adm8211_hw.c
+index f95d798..a33d239 100644
+--- a/adm8211/adm8211_hw.c
++++ b/adm8211/adm8211_hw.c
+@@ -363,12 +363,6 @@ static void adm8211_clear_sram(struct net_device *dev)
+ ADM8211_CSR_WRITE(WEPCTL, reg);
+ }
+
+-static struct net_device_stats *adm8211_get_stats(struct net_device *dev)
+-{
+- struct ieee80211_device *ieee = netdev_priv(dev);
+- return &ieee->stats;
+-}
+-
+ static void adm8211_set_rx_mode(struct net_device *dev)
+ {
+ struct adm8211_priv *priv = ieee80211_priv(dev);
+@@ -2531,7 +2525,6 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
+ dev->features |= NETIF_F_LLTX;
+ dev->open = adm8211_open;
+ dev->stop = adm8211_stop;
+- dev->get_stats = adm8211_get_stats;
+ dev->set_multicast_list = adm8211_set_rx_mode;
+ dev->set_mac_address = adm8211_set_mac_address;
+
+--
+1.5.2.1
+
diff --git a/net-wireless/adm8211/files/03-fix-work_struct-build-breakage.patch b/net-wireless/adm8211/files/03-fix-work_struct-build-breakage.patch
new file mode 100644
index 00000000000..95eb22afd63
--- /dev/null
+++ b/net-wireless/adm8211/files/03-fix-work_struct-build-breakage.patch
@@ -0,0 +1,69 @@
+From e8c4bd51047c6f428474f9f0788375a3433684e7 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville@tuxdriver.com>
+Date: Mon, 11 Dec 2006 18:32:06 -0500
+Subject: [PATCH] [PATCH] adm8211: fix work_struct build breakage
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ adm8211/ieee80211_sta.c | 12 ++++++------
+ adm8211/ieee80211_sta.h | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/adm8211/ieee80211_sta.c b/adm8211/ieee80211_sta.c
+index 032d067..940f742 100644
+--- a/adm8211/ieee80211_sta.c
++++ b/adm8211/ieee80211_sta.c
+@@ -30,7 +30,7 @@
+ #define IEEE80211_MONITORING_INTERVAL (30 * HZ)
+ #define IEEE80211_LINKCHECK_INTERVAL (3 * HZ)
+
+-static void ieee80211_timer(void *ptr);
++static void ieee80211_timer(struct work_struct *work);
+
+ ParseRes ieee802_11_parse_elems(struct ieee80211_info_element *start, size_t len,
+ struct ieee802_11_elems *elems)
+@@ -818,12 +818,12 @@ void ieee80211_start_scan(struct ieee80211_data *data)
+ ieee80211_set_associated(data, 0);
+ data->scan_channel = 0;
+
+- schedule_work(&data->work);
++ schedule_work(&data->work.work);
+ }
+
+ void ieee80211_init(struct ieee80211_data *data)
+ {
+- INIT_WORK(&data->work, ieee80211_timer, data);
++ INIT_DELAYED_WORK(&data->work, ieee80211_timer);
+
+ data->listen_interval = 10;
+ data->ieee->state = IEEE80211_UNINITIALIZED;
+@@ -1187,10 +1187,10 @@ void ieee80211_rx_mgmt(struct ieee80211_data *data, struct sk_buff *skb,
+ dev_kfree_skb(skb);
+ }
+
+-
+-static void ieee80211_timer(void *ptr)
++static void ieee80211_timer(struct work_struct *work)
+ {
+- struct ieee80211_data *data = (struct ieee80211_data *) ptr;
++ struct ieee80211_data *data =
++ container_of(work, struct ieee80211_data, work.work);
+
+ switch (data->ieee->state) {
+ case IEEE80211_INITIALIZED:
+diff --git a/adm8211/ieee80211_sta.h b/adm8211/ieee80211_sta.h
+index b672936..75dc61b 100644
+--- a/adm8211/ieee80211_sta.h
++++ b/adm8211/ieee80211_sta.h
+@@ -47,7 +47,7 @@ struct ieee80211_data {
+ void (*link_monitor)(struct net_device *dev);
+ int (*set_channel)(struct net_device *dev, unsigned int channel);
+
+- struct work_struct work;
++ struct delayed_work work;
+
+ #define AUTO_ASSOCIATE (1<<0)
+ #define AUTO_RATE (1<<1)
+--
+1.5.2.1
+
diff --git a/net-wireless/adm8211/files/04-fix-set-essid-for-WE-21.patch b/net-wireless/adm8211/files/04-fix-set-essid-for-WE-21.patch
new file mode 100644
index 00000000000..dfe807b8868
--- /dev/null
+++ b/net-wireless/adm8211/files/04-fix-set-essid-for-WE-21.patch
@@ -0,0 +1,26 @@
+From 79259f536ba8fd8c500b4506b1a89b06c5264d06 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville@tuxdriver.com>
+Date: Tue, 27 Mar 2007 13:03:46 -0400
+Subject: [PATCH] [PATCH] adm8211: fix set essid for WE-21
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ adm8211/adm8211_ioctl.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/adm8211/adm8211_ioctl.c b/adm8211/adm8211_ioctl.c
+index 22850cc..7c0f6b6 100644
+--- a/adm8211/adm8211_ioctl.c
++++ b/adm8211_ioctl.c
+@@ -294,7 +294,7 @@ static int adm8211_ioctl_siwessid(struct net_device *dev,
+ if (dwrq->flags == 0 || dwrq->length < 1)
+ len = 0;
+ else
+- len = min(dwrq->length - 1, IW_ESSID_MAX_SIZE);
++ len = min(dwrq->length, IW_ESSID_MAX_SIZE);
+
+ memcpy(priv->ieee80211.ssid, essid, len);
+ priv->ieee80211.ssid_len = len;
+--
+1.5.2.1
+
diff --git a/net-wireless/adm8211/files/05-update-email-address-from-jkmaline-cc.hut.fi-to.patch b/net-wireless/adm8211/files/05-update-email-address-from-jkmaline-cc.hut.fi-to.patch
new file mode 100644
index 00000000000..be7561c6b78
--- /dev/null
+++ b/net-wireless/adm8211/files/05-update-email-address-from-jkmaline-cc.hut.fi-to.patch
@@ -0,0 +1,81 @@
+From 3e2d468ee087e4d60c007746b68731e08346d620 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 24 Mar 2007 17:15:30 -0700
+Subject: [PATCH] [PATCH] Update my email address from jkmaline@cc.hut.fi to j@w1.fi
+
+After 13 years of use, it looks like my email address is finally going
+to disappear. While this is likely to drop the amount of incoming spam
+greatly ;-), it may also affect more appropriate messages, so let's
+update my email address in various places. In addition, Host AP mailing
+list is subscribers-only and linux-wireless can also be used for
+discussing issues related to this driver which is now shown in
+MAINTAINERS.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ drivers/net/wireless/adm8211/adm8211_hw.c | 6 +++---
+ adm8211/adm8211_ioctl.c | 2 +-
+ adm8211/ieee80211_sta.c | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/adm8211/adm8211_hw.c b/adm8211/adm8211_hw.c
+index a33d239..2ec950d 100644
+--- a/adm8211/adm8211_hw.c
++++ b/adm8211/adm8211_hw.c
+@@ -2,7 +2,7 @@
+ /*
+ * Linux device driver for ADMtek ADM8211 (IEEE 802.11b MAC/BBP)
+ *
+- * Copyright (c) 2003, Jouni Malinen <jkmaline@cc.hut.fi>
++ * Copyright (c) 2003, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2005, Michael Wu <flamingice@sourmilk.net>
+ * Some parts copyright (c) 2003 by David Young <dyoung@pobox.com>
+ * and used with permission.
+@@ -43,7 +43,7 @@
+
+ #define RELEASE_DATE "20060414"
+
+-MODULE_AUTHOR("Jouni Malinen <jkmaline@cc.hut.fi>, Michael Wu <flamingice@sourmilk.net>");
++MODULE_AUTHOR("Jouni Malinen <j@w1.fi>, Michael Wu <flamingice@sourmilk.net>");
+ MODULE_DESCRIPTION("Driver for IEEE 802.11b wireless LAN cards based on ADMtek"
+ " ADM8211");
+ MODULE_SUPPORTED_DEVICE("ADM8211");
+@@ -58,7 +58,7 @@ module_param(rx_ring_size, uint, 0);
+ module_param(debug, int, 0);
+
+ static const char *version = KERN_INFO "adm8211: "
+-"Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi>; "
++"Copyright 2003, Jouni Malinen <j@w1.fi>; "
+ "Copyright 2004-2005, Michael Wu <flamingice@sourmilk.net>\n";
+
+
+diff --git a/adm8211/adm8211_ioctl.c b/adm8211/adm8211_ioctl.c
+index 7c0f6b6..7009dae 100644
+--- a/adm8211/adm8211_ioctl.c
++++ b/adm8211/adm8211_ioctl.c
+@@ -1,7 +1,7 @@
+ /*
+ * Linux driver for ADMtek ADM8211 (IEEE 802.11b wireless LAN card)
+ *
+- * Copyright (c) 2003, Jouni Malinen <jkmaline@cc.hut.fi>
++ * Copyright (c) 2003, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2005, Michael Wu <flamingice@sourmilk.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+diff --git a/adm8211/ieee80211_sta.c b/adm8211/ieee80211_sta.c
+index 940f742..3b57915 100644
+--- a/adm8211/ieee80211_sta.c
++++ b/adm8211/ieee80211_sta.c
+@@ -1,7 +1,7 @@
+ /*
+ * IEEE 802.11 station / management functionality
+ *
+- * Copyright (c) 2003, Jouni Malinen <jkmaline@cc.hut.fi>
++ * Copyright (c) 2003, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2005, Michael Wu <flamingice@sourmilk.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+--
+1.5.2.1
+
diff --git a/net-wireless/adm8211/files/06-adm8211-fix-build-breakage-from-skb-mac.raw.patch b/net-wireless/adm8211/files/06-adm8211-fix-build-breakage-from-skb-mac.raw.patch
new file mode 100644
index 00000000000..d3bb15d60cc
--- /dev/null
+++ b/net-wireless/adm8211/files/06-adm8211-fix-build-breakage-from-skb-mac.raw.patch
@@ -0,0 +1,53 @@
+>From 72c942ed694ef6249c0df84c0802e7378884e7c7 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville@tuxdriver.com>
+Date: Tue, 29 May 2007 14:21:23 -0400
+Subject: [PATCH] [PATCH] adm8211: fix build breakage from skb->mac.raw
+
+Use skb_mac_header and related functions instead.
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ drivers/net/wireless/adm8211/adm8211_hw.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/adm8211/adm8211_hw.c b/adm8211/adm8211_hw.c
+index 2ec950d..49d79cb 100644
+--- a/adm8211/adm8211_hw.c
++++ b/adm8211/adm8211_hw.c
+@@ -499,7 +499,7 @@ static void adm8211_rx_skb(struct net_device *dev, struct sk_buff *skb)
+ ieee->stats.rx_packets++;
+
+ skb->pkt_type = PACKET_OTHERHOST;
+- skb->mac.raw = skb->data;
++ skb_reset_mac_header(skb);
+
+ netif_rx(skb);
+ dev->last_rx = jiffies;
+@@ -717,7 +717,7 @@ static void adm8211_interrupt_rci(struct net_device *dev)
+ #endif
+ stat->rssi = rssi;
+ stat->rate = rate;
+- skb->mac.raw = skb->data;
++ skb_reset_mac_header(skb);
+ skb->protocol = __constant_htons(ETH_P_802_2);
+ skb_queue_tail(&priv->rx_queue, skb);
+ tasklet_schedule(&priv->rx_tasklet);
+@@ -2376,7 +2376,8 @@ static int adm8211_hard_start_xmit(struct ieee80211_txb *txb,
+
+ int adm8211_80211_header_parse(struct sk_buff *skb, unsigned char *haddr)
+ {
+- memcpy(haddr, skb->mac.raw + 10 + sizeof(struct avs_caphdr), ETH_ALEN); /* addr2 */
++ memcpy(haddr, skb_mac_header(skb) + 10 + sizeof(struct avs_caphdr),
++ ETH_ALEN); /* addr2 */
+ return ETH_ALEN;
+ }
+
+--
+1.5.2.1
+
+
+
+
+
+
+
diff --git a/net-wireless/adm8211/files/2.6.20-no-config_h.patch b/net-wireless/adm8211/files/2.6.20-no-config_h.patch
new file mode 100644
index 00000000000..d565eccca04
--- /dev/null
+++ b/net-wireless/adm8211/files/2.6.20-no-config_h.patch
@@ -0,0 +1,20 @@
+--- adm8211/wep.c.old 2007-06-13 11:06:07.778330430 +1000
++++ adm8211/wep.c 2007-06-13 11:06:16.442008732 +1000
+@@ -10,7 +10,6 @@
+ * more details.
+ */
+
+-#include <linux/config.h>
+ #include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+--- adm8211/adm8211_hw.c.old 2007-06-13 11:10:12.949927966 +1000
++++ adm8211/adm8211_hw.c 2007-06-13 11:10:23.838266881 +1000
+@@ -29,7 +29,6 @@
+ */
+
+
+-#include <linux/config.h>
+ #include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
diff --git a/net-wireless/adm8211/files/2.6.20.patch b/net-wireless/adm8211/files/2.6.20.patch
new file mode 100644
index 00000000000..10081fbcecb
--- /dev/null
+++ b/net-wireless/adm8211/files/2.6.20.patch
@@ -0,0 +1,27 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../adm8211/2.6.20.patch
+# Copyright (C) 2007 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+--- adm8211/wep.c.vanilla 2007-03-30 09:36:24.446241003 +0200
++++ adm8211/wep.c 2007-03-30 09:44:01.860307546 +0200
+@@ -22,6 +22,8 @@
+ #include <linux/crc32.h>
+ #include <asm/string.h>
+ #include <asm/scatterlist.h>
++#include <asm/page.h>
++#include <linux/mm.h>
+
+ #ifndef CONFIG_CRYPTO
+ #error CONFIG_CRYPTO required to build
diff --git a/net-wireless/adm8211/files/linux-2.6.17.patch b/net-wireless/adm8211/files/linux-2.6.17.patch
new file mode 100644
index 00000000000..f3a65428363
--- /dev/null
+++ b/net-wireless/adm8211/files/linux-2.6.17.patch
@@ -0,0 +1,10 @@
+--- adm8211/adm8211_hw.c.vanilla 2006-07-01 17:17:45.000000000 +0000
++++ adm8211/adm8211_hw.c 2006-07-01 17:20:10.000000000 +0000
+@@ -39,6 +39,7 @@
+ #include <linux/etherdevice.h>
+ #include <linux/ioport.h>
+ #include <linux/pci.h>
++#include <linux/dma-mapping.h>
+ #include <linux/if_arp.h>
+ #include <linux/delay.h>
+ #include <linux/crc32.h>
diff --git a/net-wireless/adm8211/files/linux-2.6.19.patch b/net-wireless/adm8211/files/linux-2.6.19.patch
new file mode 100644
index 00000000000..9a3f2e57d0a
--- /dev/null
+++ b/net-wireless/adm8211/files/linux-2.6.19.patch
@@ -0,0 +1,32 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../adm8211/linux-2.6.19.patch
+# Copyright (C) 2007 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+--- adm8211/adm8211_hw.c.orig 2005-03-23 12:12:02.000000000 +0100
++++ adm8211/adm8211_hw.c 2007-01-02 16:54:08.000000000 +0100
+@@ -2468,9 +2468,13 @@
+ dev->set_mac_address = adm8211_set_mac_address;
+ dev->hard_start_xmit = adm8211_hard_start_xmit;
+
++#if WIRELESS_EXT >= 12
++#if WIRELESS_EXT < 20
+ dev->get_wireless_stats = adm8211_get_wireless_stats;
++#endif
+ dev->wireless_handlers =
+ (struct iw_handler_def *) &adm8211_iw_handler_def;
++#endif
+
+ init_timer(&priv->timer);
+ priv->timer.data = (unsigned long) dev;
diff --git a/net-wireless/adm8211/metadata.xml b/net-wireless/adm8211/metadata.xml
new file mode 100644
index 00000000000..4538a68724a
--- /dev/null
+++ b/net-wireless/adm8211/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-wireless/aircrack-ng/Manifest b/net-wireless/aircrack-ng/Manifest
new file mode 100644
index 00000000000..80ce3f85a7a
--- /dev/null
+++ b/net-wireless/aircrack-ng/Manifest
@@ -0,0 +1,2 @@
+DIST aircrack-ng-1.2-rc1.tar.gz 2046476 SHA256 cf3134521e1c3d7aed4e384e3e5e7b6959e2d485bd1554474608a3a9328e35fd SHA512 897427c535846c0ede58b2f99ed469bc01f50f9b38fc70d5711261fca7342339192cc0c71a724fc04c99114db7534d825a44f09e7bc5754286ec44933a33e40d WHIRLPOOL 2f8df161c61b8dfa6f4bd5f4af677273f255f01ae84853a80fcde4c07f03e51dcad9dcf007afa5a1120521c641d35c23d07b1edfc51c90d7b8b216b179d27ea9
+DIST aircrack-ng-1.2-rc2.tar.gz 2046531 SHA256 ba5b3eda44254efc5b7c9f776eb756f7cc323ad5d0813c101e92edb483d157e9 SHA512 49794c80a76da20698d0372a81fdbd54f2defb694c23807369be7632e57d21cb09f14d3013b199f247663286c316714ee0fae8a6d302cabbe48ffa1e6ebefc56 WHIRLPOOL d0a221a840ab7541648b204bc8e38108fe125999167a8477cf5a1cfc309a892fd72c888bad28ab83fc049b46a5817b72e9da6d5e0c6ed9cea97ba4ea741765f3
diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.2_rc1-r1.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.2_rc1-r1.ebuild
new file mode 100644
index 00000000000..e627140751e
--- /dev/null
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.2_rc1-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit toolchain-funcs distutils-r1 flag-o-matic
+
+DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys"
+HOMEPAGE="http://www.aircrack-ng.org"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.aircrack-ng.org/trunk"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ MY_PV=${PV/_/-}
+ SRC_URI="http://download.${PN}.org/${PN}-${MY_PV}.tar.gz"
+ KEYWORDS="amd64 arm ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="+airdrop-ng +airgraph-ng kernel_linux kernel_FreeBSD +netlink +pcre +sqlite +unstable"
+
+DEPEND="net-libs/libpcap
+ dev-libs/openssl
+ netlink? ( dev-libs/libnl:3 )
+ pcre? ( dev-libs/libpcre )
+ airdrop-ng? ( ${PYTHON_DEPS} )
+ airgraph-ng? ( ${PYTHON_DEPS} )
+ sqlite? ( >=dev-db/sqlite-3.4 )
+ unstable? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ kernel_linux? (
+ net-wireless/iw
+ net-wireless/wireless-tools
+ sys-apps/ethtool
+ sys-apps/usbutils
+ sys-apps/pciutils )
+ sys-apps/hwids
+ airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} )
+ airgraph-ng? ( ${PYTHON_REQUIRED_USE} )"
+
+src_compile() {
+ if [[ $($(tc-getCC) --version) == clang* ]] ; then
+ die "Please use gcc, upstream bug http://trac.aircrack-ng.org/ticket/1144"
+ fi
+
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ LD="$(tc-getLD)" \
+ RANLIB="$(tc-getRANLIB)" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ unstable=$(usex unstable true false) \
+ ${liveflags}
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_compile
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake check \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ unstable=$(usex unstable true false) \
+ ${liveflags}
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ prefix="${ED}/usr" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ unstable=$(usex unstable true false) \
+ ${liveflags} \
+ install
+
+ dodoc AUTHORS ChangeLog INSTALLING README
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_install
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_install
+ fi
+
+ #we don't need aircrack-ng's oui updater, we have our own
+ rm "${ED}"/usr/sbin/airodump-ng-oui-update
+}
+
+pkg_postinst() {
+ # Message is (c) FreeBSD
+ # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
+ if use kernel_FreeBSD ; then
+ einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
+ einfo "mode of your wireless card. So do not care about what the manpages say about"
+ einfo "airmon-ng, airodump-ng sets monitor mode automatically."
+ echo
+ einfo "To return from monitor mode, issue the following command:"
+ einfo " ifconfig \${INTERFACE} -mediaopt monitor"
+ einfo
+ einfo "For aireplay-ng you need FreeBSD >= 7.0."
+ fi
+}
diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.2_rc2.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.2_rc2.ebuild
new file mode 100644
index 00000000000..b5693dde48e
--- /dev/null
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.2_rc2.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit toolchain-funcs distutils-r1 flag-o-matic
+
+DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys"
+HOMEPAGE="http://www.aircrack-ng.org"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.aircrack-ng.org/trunk"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ MY_PV=${PV/_/-}
+ SRC_URI="http://download.${PN}.org/${PN}-${MY_PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="+airdrop-ng +airgraph-ng kernel_linux kernel_FreeBSD +netlink +pcre +sqlite +experimental"
+
+DEPEND="net-libs/libpcap
+ dev-libs/openssl:0=
+ netlink? ( dev-libs/libnl:3 )
+ pcre? ( dev-libs/libpcre )
+ airdrop-ng? ( ${PYTHON_DEPS} )
+ airgraph-ng? ( ${PYTHON_DEPS} )
+ experimental? ( sys-libs/zlib )
+ sqlite? ( >=dev-db/sqlite-3.4 )"
+RDEPEND="${DEPEND}
+ kernel_linux? (
+ net-wireless/iw
+ net-wireless/wireless-tools
+ sys-apps/ethtool
+ sys-apps/usbutils
+ sys-apps/pciutils )
+ sys-apps/hwids
+ airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} )
+ airgraph-ng? ( ${PYTHON_REQUIRED_USE} )"
+
+src_compile() {
+ if [[ $($(tc-getCC) --version) == clang* ]] ; then
+ die "Please use gcc, upstream bug http://trac.aircrack-ng.org/ticket/1144"
+ fi
+
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ LD="$(tc-getLD)" \
+ RANLIB="$(tc-getRANLIB)" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags}
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_compile
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake check \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags}
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ prefix="${ED}/usr" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags} \
+ install
+
+ dodoc AUTHORS ChangeLog INSTALLING README
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_install
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_install
+ fi
+
+ #we don't need aircrack-ng's oui updater, we have our own
+ rm "${ED}"/usr/sbin/airodump-ng-oui-update
+}
+
+pkg_postinst() {
+ # Message is (c) FreeBSD
+ # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
+ if use kernel_FreeBSD ; then
+ einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
+ einfo "mode of your wireless card. So do not care about what the manpages say about"
+ einfo "airmon-ng, airodump-ng sets monitor mode automatically."
+ echo
+ einfo "To return from monitor mode, issue the following command:"
+ einfo " ifconfig \${INTERFACE} -mediaopt monitor"
+ einfo
+ einfo "For aireplay-ng you need FreeBSD >= 7.0."
+ fi
+}
diff --git a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild
new file mode 100644
index 00000000000..134a722b851
--- /dev/null
+++ b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit toolchain-funcs distutils-r1 flag-o-matic
+
+DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys"
+HOMEPAGE="http://www.aircrack-ng.org"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.aircrack-ng.org/trunk"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ #inherit versionator
+ #MY_P=${P/\_/-}
+ #MY_PV="$(replace_version_separator 2 '-')"
+ #SRC_URI="http://download.aircrack-ng.org/${PN}-${MY_PV}.tar.gz"
+ #KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+ #S="${WORKDIR}/${MY_P}"
+ MY_PV=${PV/_/-}
+ SRC_URI="http://download.${PN}.org/${PN}-${MY_PV}.tar.gz"
+ KEYWORDS="amd64 arm ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="+airdrop-ng +airgraph-ng kernel_linux kernel_FreeBSD +netlink +pcre +sqlite +experimental"
+
+DEPEND="net-libs/libpcap
+ dev-libs/openssl:0=
+ netlink? ( dev-libs/libnl:3 )
+ pcre? ( dev-libs/libpcre )
+ airdrop-ng? ( ${PYTHON_DEPS} )
+ airgraph-ng? ( ${PYTHON_DEPS} )
+ experimental? ( sys-libs/zlib )
+ sqlite? ( >=dev-db/sqlite-3.4 )"
+RDEPEND="${DEPEND}
+ kernel_linux? (
+ net-wireless/iw
+ net-wireless/wireless-tools
+ sys-apps/ethtool
+ sys-apps/usbutils
+ sys-apps/pciutils )
+ sys-apps/hwids
+ airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} )
+ airgraph-ng? ( ${PYTHON_REQUIRED_USE} )"
+
+src_compile() {
+ if [[ $($(tc-getCC) --version) == clang* ]] ; then
+ die "Please use gcc, upstream bug http://trac.aircrack-ng.org/ticket/1144"
+ fi
+
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ LD="$(tc-getLD)" \
+ RANLIB="$(tc-getRANLIB)" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags}
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_compile
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake check \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags}
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ liveflags=REVFLAGS=-D_REVISION="${ESVN_WC_REVISION}"
+ fi
+
+ emake \
+ prefix="${ED}/usr" \
+ libnl=$(usex netlink true false) \
+ pcre=$(usex pcre true false) \
+ sqlite=$(usex sqlite true false) \
+ experimental=$(usex experimental true false) \
+ ${liveflags} \
+ install
+
+ dodoc AUTHORS ChangeLog INSTALLING README
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_install
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_install
+ fi
+
+ #we don't need aircrack-ng's oui updater, we have our own
+ rm "${ED}"/usr/sbin/airodump-ng-oui-update
+}
+
+pkg_postinst() {
+ # Message is (c) FreeBSD
+ # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
+ if use kernel_FreeBSD ; then
+ einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
+ einfo "mode of your wireless card. So do not care about what the manpages say about"
+ einfo "airmon-ng, airodump-ng sets monitor mode automatically."
+ echo
+ einfo "To return from monitor mode, issue the following command:"
+ einfo " ifconfig \${INTERFACE} -mediaopt monitor"
+ einfo
+ einfo "For aireplay-ng you need FreeBSD >= 7.0."
+ fi
+}
diff --git a/net-wireless/aircrack-ng/metadata.xml b/net-wireless/aircrack-ng/metadata.xml
new file mode 100644
index 00000000000..21bff513b01
--- /dev/null
+++ b/net-wireless/aircrack-ng/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<herd>crypto</herd>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>Also on the upstream team</description>
+</maintainer>
+<longdescription>
+ aircrack is a set of tools for auditing wireless networks.
+ aircrack-ng is the next generation of aircrack with lots of new features.
+ (from http://www.aircrack-ng.org)
+</longdescription>
+<use>
+ <flag name="airdrop-ng">Build airdrop-ng</flag>
+ <flag name="airgraph-ng">Build airgraph-ng</flag>
+ <flag name="experimental">Build the "experimental" tools which may randomly fail to run properly</flag>
+ <flag name="netlink">Use netlink for channel control instead of WEXT</flag>
+ <flag name="unstable">Build the "unstable" tools which may randomly fail to run properly</flag>
+</use>
+</pkgmetadata>
diff --git a/net-wireless/airpwn/Manifest b/net-wireless/airpwn/Manifest
new file mode 100644
index 00000000000..eb77af35a0b
--- /dev/null
+++ b/net-wireless/airpwn/Manifest
@@ -0,0 +1 @@
+DIST airpwn-1.4.tgz 910109 SHA256 f689cd5a9038832cb0aaefa18cae0c282a6bfbeea38819cf47f306f14344e164 SHA512 c849740848289005eb2a72b09bbfade6bf078a3ff93d39300f6a65d328c527bbafbb2a325f2813064612f91a2da20a2daacb8508497e8410ad0befc4e28331e5 WHIRLPOOL f3e7f18578e8c19dd033567851abd9af3a5bd9b0c76bc60010b654735d8632fa02eb942350afbd9015b4b8ef25e9b3dd9e01f30c38358658e5b22a89a3c9b259
diff --git a/net-wireless/airpwn/airpwn-1.4-r2.ebuild b/net-wireless/airpwn/airpwn-1.4-r2.ebuild
new file mode 100644
index 00000000000..a8ca79f238d
--- /dev/null
+++ b/net-wireless/airpwn/airpwn-1.4-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic python-single-r1
+
+DESCRIPTION="Tool for generic packet injection on 802.11"
+HOMEPAGE="http://airpwn.sf.net"
+SRC_URI="mirror://sourceforge/airpwn/$P.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="+examples"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ dev-libs/libpcre
+ dev-libs/openssl:0=
+ net-libs/libnet:1.1=
+ net-libs/libpcap
+ net-wireless/lorcon-old"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf
+ sed -i "s/python2.4/${EPYTHON}/g" conf.h || die
+ sed -i "s|-lorcon -lpthread -lpcre -lpcap -lnet|-lorcon -lpthread -lpcre -lpcap -lnet -lcrypto -l${EPYTHON}|g" Makefile || die
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ ecvs_clean
+ sed -i "s#content/#/usr/share/${PN}/content/#" conf/* || die
+ doins -r conf content
+ fi
+}
diff --git a/net-wireless/airpwn/metadata.xml b/net-wireless/airpwn/metadata.xml
new file mode 100644
index 00000000000..a44f7d6df37
--- /dev/null
+++ b/net-wireless/airpwn/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">airpwn</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/airsnort/Manifest b/net-wireless/airsnort/Manifest
new file mode 100644
index 00000000000..0f1c6b168a6
--- /dev/null
+++ b/net-wireless/airsnort/Manifest
@@ -0,0 +1 @@
+DIST airsnort-0.2.7e.tar.gz 208383 SHA256 39910878a41b0a2acaba32d72cd76e65cdaa138555e5763140a5da7714f19a70
diff --git a/net-wireless/airsnort/airsnort-0.2.7e.ebuild b/net-wireless/airsnort/airsnort-0.2.7e.ebuild
new file mode 100644
index 00000000000..ea30ef7a360
--- /dev/null
+++ b/net-wireless/airsnort/airsnort-0.2.7e.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="802.11b Wireless Packet Sniffer/WEP Cracker"
+HOMEPAGE="http://airsnort.shmoo.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+RDEPEND="=x11-libs/gtk+-2*
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+ dodoc README README.decrypt AUTHORS ChangeLog TODO faq.txt
+}
+
+pkg_postinst() {
+ elog "Make sure to emerge linux-wlan-ng if you want support"
+ elog "for Prism2 based cards in airsnort."
+
+ elog "Make sure to emerge orinoco if you want support"
+ elog "for Orinoco based cards in airsnort."
+}
diff --git a/net-wireless/airsnort/metadata.xml b/net-wireless/airsnort/metadata.xml
new file mode 100644
index 00000000000..fc15de09a54
--- /dev/null
+++ b/net-wireless/airsnort/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">airsnort</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/airtraf/Manifest b/net-wireless/airtraf/Manifest
new file mode 100644
index 00000000000..71b78bc9bf9
--- /dev/null
+++ b/net-wireless/airtraf/Manifest
@@ -0,0 +1 @@
+DIST airtraf-1.1.tar.gz 136241 SHA256 10ad27d6cac5ac7fcfec04cd737a0d8a640d5bfeb6fa48a13268f9efbe6bfe53 SHA512 7f341abb25e15dbdf510805230ee2f186a7a66d5c1e486bfdb978d3d8534d8b8c2cc1b5e0e323357c65af1eedbcb1da3e3e5f3ac8299db5f203f54b4a868f90b WHIRLPOOL de40aca3c5cacd5e5047b175e2538dba3ef90af1afb14dcb9a9e1ffab66fa3ddc0aee75aa916183a25f82906c108f3a7e9a177a2228858b2909c44a15a5227c7
diff --git a/net-wireless/airtraf/airtraf-1.1-r3.ebuild b/net-wireless/airtraf/airtraf-1.1-r3.ebuild
new file mode 100644
index 00000000000..bd4dd8f70c1
--- /dev/null
+++ b/net-wireless/airtraf/airtraf-1.1-r3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="AirTraf 802.11b Wireless traffic sniffer"
+LICENSE="GPL-2"
+HOMEPAGE="http://www.elixar.com/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}.patch \
+ "${FILESDIR}"/${P}-off-by-one.patch \
+ "${FILESDIR}"/${P}-fprintf-format.patch
+
+ sed -i \
+ -e '/^LIBS/s|=.*|= $(shell $(PKG_CONFIG) --libs panel)|' \
+ src/libncurses/Makefile || die
+ sed -i \
+ -e 's|-lpanel -lncurses|$(shell $(PKG_CONFIG) --libs panel)|' \
+ src/sniffd/Makefile || die
+ tc-export PKG_CONFIG
+}
+
+src_compile() {
+ # parallel make (bug #297331)
+ emake -C src -j1 \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die
+}
+
+src_install () {
+ dobin src/airtraf
+ dodoc Authors COMPATIBILITY docs/airtraf_doc.html
+}
diff --git a/net-wireless/airtraf/files/airtraf-1.1-fprintf-format.patch b/net-wireless/airtraf/files/airtraf-1.1-fprintf-format.patch
new file mode 100644
index 00000000000..ac5d174c0d6
--- /dev/null
+++ b/net-wireless/airtraf/files/airtraf-1.1-fprintf-format.patch
@@ -0,0 +1,14 @@
+--- a/src/libcommon/logger.c
++++ b/src/libcommon/logger.c
+@@ -92,9 +92,9 @@
+
+ switch (type)
+ {
+- case CONNECT_LOG: status = fprintf(connect_log, text);
++ case CONNECT_LOG: status = fprintf(connect_log, "%s\n", text);
+ break;
+- case ERROR_LOG: status = fprintf(error_log, text);
++ case ERROR_LOG: status = fprintf(error_log, "%s\n", text);
+ break;
+ default: // do nothing?
+ break;
diff --git a/net-wireless/airtraf/files/airtraf-1.1-off-by-one.patch b/net-wireless/airtraf/files/airtraf-1.1-off-by-one.patch
new file mode 100644
index 00000000000..571532b603e
--- /dev/null
+++ b/net-wireless/airtraf/files/airtraf-1.1-off-by-one.patch
@@ -0,0 +1,29 @@
+--- a/src/sniffd/autoconfig.c
++++ b/src/sniffd/autoconfig.c
+@@ -68,7 +68,7 @@
+ struct ifreq ifr;
+
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+- ifr.ifr_name[IFNAMSIZ] = '\0';
++ ifr.ifr_name[IFNAMSIZ -1] = '\0';
+ if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0){
+ return (-1);
+ }
+@@ -89,7 +89,7 @@
+ struct ifreq ifr;
+
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+- ifr.ifr_name[IFNAMSIZ] = '\0';
++ ifr.ifr_name[IFNAMSIZ -1] = '\0';
+ if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0){
+ return (-1);
+ }
+@@ -129,7 +129,7 @@
+ {
+ /* Set device name */
+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ);
+- pwrq->ifr_name[IFNAMSIZ] = '\0';
++ pwrq->ifr_name[IFNAMSIZ -1] = '\0';
+
+ /* Do the request */
+ return(ioctl(skfd, request, pwrq));
diff --git a/net-wireless/airtraf/files/airtraf-1.1.patch b/net-wireless/airtraf/files/airtraf-1.1.patch
new file mode 100644
index 00000000000..e88ef52267c
--- /dev/null
+++ b/net-wireless/airtraf/files/airtraf-1.1.patch
@@ -0,0 +1,59 @@
+--- a/src/sniffd/autoconfig.c
++++ b/src/sniffd/autoconfig.c
+@@ -360,7 +360,7 @@
+ int check_drv_compat(char * drvname, int * id)
+ {
+ int i;
+- for (i=0; (int) compat_drivers[i] != -1; i++){
++ for (i=0; (long) compat_drivers[i] != -1; i++){
+ if (!strncmp(compat_drivers[i], drvname, DRVNAMSIZ +1)){
+ *id = i;
+ return (1); // just true...
+@@ -525,6 +525,7 @@
+ }
+ /* Close the socket. */
+ close(skfd);
++ return 0;
+ }
+
+ /**
+@@ -772,7 +773,7 @@
+ fclose(fh);
+ break;
+ case DRV_PRISM2:
+-
++ break;
+
+ }
+ /* update flag take off PROMISC */
+--- a/src/sniffd/gui_channel_scan.c
++++ b/src/sniffd/gui_channel_scan.c
+@@ -384,7 +384,7 @@
+ if (!beep()) flash();
+ wattrset(statuswin, STDATTR);
+ snprintf(message,100,"Detected new network '%s' (%s) on Channel %02d",
+- ((strlen(ap->ssid)==1)&&(!strncmp(" ",ap->ssid,1))) ? "<cloaked>" : ap->ssid,
++ ((strlen(ap->ssid)==1)&&(!strncmp(" ",(char *)ap->ssid,1))) ? "<cloaked>" : (char *)ap->ssid,
+ hexdump((__u8*)&ap->bssid,6), ap->channel);
+ print_status_msg(statuswin, location, message);
+ ap->status = AP_STATUS_ACTIVE;
+--- a/src/sniffd/server.c
++++ b/src/sniffd/server.c
+@@ -57,7 +57,7 @@
+
+ int process_command(int, char *);
+ int issue_get_cmd(int, char *);
+-int send_bss_info(int);
++ssize_t send_bss_info(int);
+ int send_ids_info(int);
+
+ /*=============================================================*/
+@@ -143,7 +143,7 @@
+ if (DEBUG) fprintf(stderr,"Error transmitting data\n");
+ }
+ } while (write_len == 0);
+- if (DEBUG) fprintf(stderr,"Data: %d bytes sent\n",length);
++ if (DEBUG) fprintf(stderr,"Data: %ld bytes sent\n",length);
+ }
+
+ /**
diff --git a/net-wireless/airtraf/metadata.xml b/net-wireless/airtraf/metadata.xml
new file mode 100644
index 00000000000..8c9992e713f
--- /dev/null
+++ b/net-wireless/airtraf/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+AirTraf 1.0 is a wireless sniffer that can detect and determine exactly what is
+being transmitted over 802.11 wireless networks. This open-source program
+tracks and identifies legitimate and rogue access points, keeps performance
+statistics on a by-user and by-protocol basis, measures the signal strength of
+network components, and more. Do you want to capture the sky?
+</longdescription>
+</pkgmetadata>
diff --git a/net-wireless/ap-utils/Manifest b/net-wireless/ap-utils/Manifest
new file mode 100644
index 00000000000..1dac692d6e2
--- /dev/null
+++ b/net-wireless/ap-utils/Manifest
@@ -0,0 +1,2 @@
+DIST ap-utils-1.4.tar.bz2 367750 SHA256 bc0e8606560421ac048a819458d51837d40ddf66dac82615455a6249ac91535a
+DIST ap-utils-1.5.tar.bz2 409480 SHA256 f01d068650f0f05c5b3753147ee0a5d3dfc07732c9788bb295683e66415a325d SHA512 ca875e0ce3d2e1c118f820483e649d419aff29c50db5c9ad88f19063f6d0f6ec1bae2e69339ea8dbded6ad4a7dcda81c78d45566ed058669acfb391499d4f3d9 WHIRLPOOL cb68458e7478447a432c3274059eeec2979b7b326357459088bbef1ef2bc79c5cb6f22dbd0c58397f201bce4e5a751982274a1b52b01265bdb35efed87f5664b
diff --git a/net-wireless/ap-utils/ap-utils-1.4.ebuild b/net-wireless/ap-utils/ap-utils-1.4.ebuild
new file mode 100644
index 00000000000..11d953dfd25
--- /dev/null
+++ b/net-wireless/ap-utils/ap-utils-1.4.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="nls"
+
+DESCRIPTION="Wireless Access Point Utilities for Unix"
+HOMEPAGE="http://ap-utils.polesye.net/"
+SRC_URI="mirror://sourceforge/ap-utils/${P}.tar.bz2"
+RESTRICT="mirror"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+DEPEND=">=sys-devel/bison-1.34"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${P}-ppc-fix.diff
+}
+
+src_compile() {
+ econf --build=${CHOST} `use_enable nls` || die
+ emake || die
+}
+
+src_install () {
+ einstall || die
+ dodoc ChangeLog NEWS README THANKS TODO
+}
diff --git a/net-wireless/ap-utils/ap-utils-1.5.ebuild b/net-wireless/ap-utils/ap-utils-1.5.ebuild
new file mode 100644
index 00000000000..48289570211
--- /dev/null
+++ b/net-wireless/ap-utils/ap-utils-1.5.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+IUSE="nls"
+
+DESCRIPTION="Wireless Access Point Utilities for Unix"
+HOMEPAGE="http://ap-utils.polesye.net/"
+SRC_URI="ftp://linux.zhitomir.net/ap-utils/ap-utils-1.5.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-1.34"
+
+src_configure() {
+ econf $(use_enable nls)
+}
diff --git a/net-wireless/ap-utils/files/ap-utils-1.4-ppc-fix.diff b/net-wireless/ap-utils/files/ap-utils-1.4-ppc-fix.diff
new file mode 100644
index 00000000000..4b0dc577f60
--- /dev/null
+++ b/net-wireless/ap-utils/files/ap-utils-1.4-ppc-fix.diff
@@ -0,0 +1,24 @@
+diff -aur ap-utils-1.4-orig/lib/wlan.c ap-utils-1.4/lib/wlan.c
+--- ap-utils-1.4-orig/lib/wlan.c 2003-10-31 12:15:00.000000000 -0500
++++ ap-utils-1.4/lib/wlan.c 2004-02-24 23:00:25.214209480 -0500
+@@ -140,6 +140,7 @@
+ _("Short"), _("Long")};
+ short __rates[4] = { 2, 4, 11, 22 };
+ int i, c = 0;
++ char ch;
+ unsigned int ap_regdomain;
+
+ if (ap_type == ATMEL12350) {
+@@ -508,10 +509,10 @@
+ i++;
+ }
+ if (m_essid) {
+- c = strlen(domain);
++ c = ch = strlen(domain);
+ varbinds[i].oid = operESSIDLength;
+ varbinds[i].len_oid = sizeof(operESSIDLength);
+- varbinds[i].value = (char *)&c;
++ varbinds[i].value = (char *)&ch;
+ varbinds[i].len_val = 1;
+ varbinds[i].type = INT_VALUE;
+ i++;
diff --git a/net-wireless/ap-utils/metadata.xml b/net-wireless/ap-utils/metadata.xml
new file mode 100644
index 00000000000..4538a68724a
--- /dev/null
+++ b/net-wireless/ap-utils/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-wireless/b43-fwcutter/Manifest b/net-wireless/b43-fwcutter/Manifest
new file mode 100644
index 00000000000..55ee0365aa5
--- /dev/null
+++ b/net-wireless/b43-fwcutter/Manifest
@@ -0,0 +1,2 @@
+DIST b43-fwcutter-018.tar.bz2 20314 SHA256 57b069dcd1a369ceb457ca397aab470be9b3fc537f400d27244e060fd425638f SHA512 dd2f8d3cb1c94e072489c602be2c4633f305ff0fb86702a0ff4109d64d5c9ccfc1b8442b8bc3d524c5deeb0a07b2a9b86225cb50291436110dcd68d3506bed9b WHIRLPOOL 7433393686e566e248853c8b7652cf0daf76747f5d4aafeb67fe2163588498505029fecf6c424e98230306f59aaacd7f4860bef54534d80a2966acca44a1a036
+DIST b43-fwcutter-019.tar.bz2 46769 SHA256 d6ea85310df6ae08e7f7e46d8b975e17fc867145ee249307413cfbe15d7121ce SHA512 2a439d1583d1ee7b13dd6a7526b78b216073e044c3934adf6615b8d2ca9a4b8c74db9791182d27baf1690b5c5ff6ce1a9c8dd4fb796e47939d055fef5bb37960 WHIRLPOOL c35799eae33323d97b61878ccce8183260a9730037f970ecd5f9a22511cccfa1e050bd77ea14febc8bb2ac296cdb9b9a621c20e20e6b07d16ff4d5069d27ddc7
diff --git a/net-wireless/b43-fwcutter/b43-fwcutter-018.ebuild b/net-wireless/b43-fwcutter/b43-fwcutter-018.ebuild
new file mode 100644
index 00000000000..866815226b9
--- /dev/null
+++ b/net-wireless/b43-fwcutter/b43-fwcutter-018.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Firmware Tool for Broadcom 43xx based wireless network devices
+using the mac80211 wireless stack"
+HOMEPAGE="http://bues.ch/b43/fwcutter"
+SRC_URI="http://bues.ch/b43/fwcutter/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+src_compile() {
+ MAKEOPTS+=" V=1"
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ # Install fwcutter
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc README
+}
+
+pkg_postinst() {
+ echo
+ einfo "Firmware may be downloaded from http://linuxwireless.org."
+ einfo "This version of fwcutter works with all b43 driver versions."
+ echo
+}
diff --git a/net-wireless/b43-fwcutter/b43-fwcutter-019.ebuild b/net-wireless/b43-fwcutter/b43-fwcutter-019.ebuild
new file mode 100644
index 00000000000..2e7fe336bbd
--- /dev/null
+++ b/net-wireless/b43-fwcutter/b43-fwcutter-019.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Firmware Tool for Broadcom 43xx based wireless network devices
+using the mac80211 wireless stack"
+HOMEPAGE="http://bues.ch/b43/fwcutter"
+SRC_URI="http://bues.ch/b43/fwcutter/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE=""
+
+src_compile() {
+ MAKEOPTS+=" V=1"
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ # Install fwcutter
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc README
+}
+
+pkg_postinst() {
+ echo
+ einfo "Firmware may be downloaded from http://linuxwireless.org."
+ einfo "This version of fwcutter works with all b43 driver versions."
+ echo
+}
diff --git a/net-wireless/b43-fwcutter/metadata.xml b/net-wireless/b43-fwcutter/metadata.xml
new file mode 100644
index 00000000000..4ef9e6d1908
--- /dev/null
+++ b/net-wireless/b43-fwcutter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>josejx@gentoo.org</email>
+ <name>Joseph Jezak</name>
+</maintainer>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/bcm43xx-fwcutter/Manifest b/net-wireless/bcm43xx-fwcutter/Manifest
new file mode 100644
index 00000000000..fa9259618be
--- /dev/null
+++ b/net-wireless/bcm43xx-fwcutter/Manifest
@@ -0,0 +1,2 @@
+DIST bcm43xx-fwcutter-005.tar.bz2 34646 SHA256 ed403870f7198991f2070a42be258d100a1770daa805e5d4569a28edbac92d3e
+DIST bcm43xx-fwcutter-006.tar.bz2 27525 SHA256 5153c94ab59ed9d3f1a6c4ed4764953be61cefbf27a9c6b04c24cca7d44034ce
diff --git a/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-005.ebuild b/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-005.ebuild
new file mode 100644
index 00000000000..19d67973b48
--- /dev/null
+++ b/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-005.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Firmware Tool for Broadcom 43xx based wireless network devices"
+HOMEPAGE="http://bcm43xx.berlios.de"
+SRC_URI="mirror://berlios/bcm43xx/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86 ~ppc64"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ # Install fwcutter
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc README
+}
+
+pkg_postinst() {
+ if ! [ -f /lib/firmware/${PN}_microcode2.fw ]; then
+ echo
+ einfo "You'll need to use bcm43xx-fwcutter to install the bcm43xx firmware."
+ einfo "Please read the bcm43xx-fwcutter readme for more details:"
+ einfo "README in /usr/share/doc/${P}/"
+ echo
+ fi
+
+ einfo "Please read this forum thread for help and troubleshooting:"
+ einfo "http://forums.gentoo.org/viewtopic-t-409194.html"
+ echo
+}
diff --git a/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-006.ebuild b/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-006.ebuild
new file mode 100644
index 00000000000..ca9100cb417
--- /dev/null
+++ b/net-wireless/bcm43xx-fwcutter/bcm43xx-fwcutter-006.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Firmware Tool for Broadcom 43xx based wireless network devices"
+HOMEPAGE="http://bcm43xx.berlios.de"
+SRC_URI="mirror://berlios/bcm43xx/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~ppc64 ~x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ # Install fwcutter
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc README
+}
+
+pkg_postinst() {
+ if ! [ -f /lib/firmware/${PN}_microcode2.fw ]; then
+ echo
+ einfo "You'll need to use bcm43xx-fwcutter to install the bcm43xx firmware."
+ einfo "Please read the bcm43xx-fwcutter readme for more details:"
+ einfo "README in /usr/share/doc/${P}"
+ echo
+ fi
+
+ einfo "Please read this forum thread for help and troubleshooting:"
+ einfo "http://forums.gentoo.org/viewtopic-t-409194.html"
+ echo
+}
diff --git a/net-wireless/bcm43xx-fwcutter/metadata.xml b/net-wireless/bcm43xx-fwcutter/metadata.xml
new file mode 100644
index 00000000000..4ef9e6d1908
--- /dev/null
+++ b/net-wireless/bcm43xx-fwcutter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>josejx@gentoo.org</email>
+ <name>Joseph Jezak</name>
+</maintainer>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/bladerf-firmware/Manifest b/net-wireless/bladerf-firmware/Manifest
new file mode 100644
index 00000000000..6093baacd4b
--- /dev/null
+++ b/net-wireless/bladerf-firmware/Manifest
@@ -0,0 +1,2 @@
+DIST bladeRF_fw_v1.7.1.img 122408 SHA256 9af2faa3b648e59f07b2c19d1e9ea2b91b47abd2b44c55e10bd2daed52943464 SHA512 9dc1f461bc48a7eb32957fef4818a2e3b50b13da0924385404abb972d653243c0de5717044bcac6eb44dac637ae429311e776a4f5aaa235a80193eb3ec7a0e7e WHIRLPOOL b15e158068bad1840c230f2fb9efbc5f8eef70cae4ac6ed69042293dcc7ecdcd830f1f445a452b0ee6f0ae40f425a9fd015fb311c11788b242067cf52b98bed7
+DIST bladeRF_fw_v1.8.0.img 122576 SHA256 3d8bb1bb2511d5d9b264b51c16cff7648c08fcaa7e7350127e6e82d80a695d02 SHA512 5cc8e69e550e60af0c9fbead9655c6af19a29afa18c352b0d010727e28b7c8fa015c6294054d19a65caa4a8ed2fb5096fa90f460561e4a7abaabb2b0bb15e366 WHIRLPOOL b71b3aec706e7fd6a92c913d1646fb31576dd97a6ad2c3a36965567d17e98e5035203d200e6d5b3da38ded00104a044027fb3bc63cdca760ccafa0112649b676
diff --git a/net-wireless/bladerf-firmware/bladerf-firmware-1.7.1.ebuild b/net-wireless/bladerf-firmware/bladerf-firmware-1.7.1.ebuild
new file mode 100644
index 00000000000..4e90fff53e9
--- /dev/null
+++ b/net-wireless/bladerf-firmware/bladerf-firmware-1.7.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FX3 firmware images"
+HOMEPAGE="http://nuand.com/fx3.php"
+
+#firmware is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="http://nuand.com/fx3/bladeRF_fw_v${PV}.img"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ doins bladeRF_fw_v${PV}.img
+}
diff --git a/net-wireless/bladerf-firmware/bladerf-firmware-1.8.0.ebuild b/net-wireless/bladerf-firmware/bladerf-firmware-1.8.0.ebuild
new file mode 100644
index 00000000000..4253360761c
--- /dev/null
+++ b/net-wireless/bladerf-firmware/bladerf-firmware-1.8.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FX3 firmware images"
+HOMEPAGE="http://nuand.com/fx3.php"
+
+#firmware is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="http://nuand.com/fx3/bladeRF_fw_v${PV}.img"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ doins bladeRF_fw_v${PV}.img
+}
+
+pkg_postinst() {
+ elog "Please remember you have to actually flash this onto"
+ elog "your bladerf with the following command:"
+ elog "bladeRF-cli -f /usr/share/Nuand/bladeRF/bladeRF_fw_v${PV}.img"
+}
diff --git a/net-wireless/bladerf-firmware/metadata.xml b/net-wireless/bladerf-firmware/metadata.xml
new file mode 100644
index 00000000000..1681f5f93bc
--- /dev/null
+++ b/net-wireless/bladerf-firmware/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>radio</herd>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
diff --git a/net-wireless/bladerf-fpga/Manifest b/net-wireless/bladerf-fpga/Manifest
new file mode 100644
index 00000000000..9720c8ac8ed
--- /dev/null
+++ b/net-wireless/bladerf-fpga/Manifest
@@ -0,0 +1,8 @@
+DIST hostedx115-0.1.1.rbf 3571462 SHA256 112b315efaa4aef4bdb15285fb637ff1c93aa24cc3aa98d86ebb4e02d2352aa6 SHA512 14a74942963d0a47b6c3a46540fb8fbedf0204d9e056e5ad8c87b3988441ab0e4d1f875196a6c2e7c8e462b5e091a18e7cbe5a7e5c3d3773952e43d7a4165e99 WHIRLPOOL 76b7e6157fe889abc6dec9d1e81656ff60b0de9d3a7c1405f2fc25166ef3ee963e4f37f93e9f52d881cb6b899ca33be90ff1920179b44bc12a7f7bd70963cda8
+DIST hostedx115-0.1.2.rbf 3571462 SHA256 3dea872433a4dc3410c3aa667dc18caa8c2fda0a616d325f95d6f2ef02221f90 SHA512 0c90a2e5add5443df549b2428e6ea2c043171b4c18bbbf953eb1c96ad3a2bb53f655212353eac6df1e7758366fd4ea5dabc355f85db3abdecdb16b4b2b85fd4d WHIRLPOOL 5065e033c6882c92e117444480b969e9f17ee99c794fbf16edccaa9396d1d1c804969463cbcf90a4c86abebee4a78349a3a8ebe40388a38a7e517bdd317de431
+DIST hostedx115-0.3.4.rbf 3571462 SHA256 fbbe05efcac213cc65aeb9b1235b2341595be08b11b0d3ea9ff0071ac60ad19c SHA512 8ab1373c7ac2de64962f619e0809e0bff7d0df82666ed9601cf51dae0de1914240e929c6ab3a8b34928b7f89c2906782522238cd6a8809f8201af4d1275d8e25 WHIRLPOOL 1d0151adc7a9361f96ded0ef80fe543904453e59bb12ee3ee672a5db7af898f20c6d6d05fad80a4b7dd28c1b20c26b2bd32acd6b3a8ac7e5947c5381a4d8e318
+DIST hostedx115.rbf 3571462 SHA256 1c145aee9555a84ecc065fe50e15b56835be2c3691ae747cb74e0c24a8fd1e4b SHA512 4df268602e662cd54a6da2b94d52cc355afdda8578c8342ea1be6a168ff874c095f92230f3cdfe5aada3d1c3237d8572e427c377c57f4a6d555f0ca49f85d6e4 WHIRLPOOL ea66c0779023eb6ef5b15bd4c34dc108cc1c624cbf2265adc5f2e0a64f70b1ac1011cce943bacbe8be09580fe0551493bf29ae130bdcb0e1e3baf09260c435ce
+DIST hostedx40-0.1.1.rbf 1191788 SHA256 48852d9d0a64f03331e0c3c1adf6dd56ee8ef77bf6ae93401bf845a1117714a8 SHA512 426aa48c588e02fe3a13c7310ab7f2a78f0c5aaba1925164c78f484cf99cfcfba103b8a738329a198c3b905fd23cb48fbe29fa4e08ded6d2fe5d70f90b850af1 WHIRLPOOL e39e3494e9e39798b3af00b145bf05c9544b995abf549a49f1f82af313efcdbc4bcfa923c6b6e6e7903c45331b94ab7d3a5bdfe73879d9986cd9da8318ab0b09
+DIST hostedx40-0.1.2.rbf 1191788 SHA256 85f2e237829476f6f15851a25ce96084dfc695820c37cd6751efee4c4806999a SHA512 9f06b5560d91ed65df14e48c729da04ae4c8720aae863d215f24db7efc4a353751840605aeb6b2ae9e4a71ffb9820d7f310bdca6dddad27768514e2edd7fc933 WHIRLPOOL 077c947b7f9558ab45193170374b6472187f1c26b874029a7eecc9823392ffbdcdab5d7f6461a5a391719311ff7e8aec3e4fd517a2c1aecdbc68357ca9776879
+DIST hostedx40-0.3.4.rbf 1191788 SHA256 517de44d7ad8cdc0e88b0d3d8945a580a1c9a25fb90ec9f0b1fd34fe30a2e8ff SHA512 0529bda4bf39ee83aa9d48dabc30af7333018e3a369e9968d030995a915e6f4ae67c17df22e55e0c4144eced0fbbac786d82dccb70d0393e8eee095e49792ade WHIRLPOOL d2dc1160536f7e4f4fa5b62f4485da2072ba34dd1426b295867f2a4e75b4820943206ca6e5e36111310bf2b97e9ceb5c8a1377ef882a1630c4bb2ee2233602e8
+DIST hostedx40.rbf 1191788 SHA256 206c7629d3191d4bb29e2826730c89a160cc565a7e54a7c2b2c2db05549e72cb SHA512 e56686a8dd4372cf11d3f373ef4262c3897f9adbd8952d82b3d737d38e77d8ddde9c427ddb6ba20364ff3748d57f29974044bd32c0f4177690ff37a600b210e9 WHIRLPOOL 0aeddf6169db1b05e8d722a1f1d5056621890a96301055e27d06c3fb928a11884ad89310c27c4c1cadde9be65c9a7c063416f2da0dd94ea28e535bd561e54a7a
diff --git a/net-wireless/bladerf-fpga/bladerf-fpga-0.0.6.ebuild b/net-wireless/bladerf-fpga/bladerf-fpga-0.0.6.ebuild
new file mode 100644
index 00000000000..dd727379106
--- /dev/null
+++ b/net-wireless/bladerf-fpga/bladerf-fpga-0.0.6.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FPGA bitstreams"
+HOMEPAGE="http://nuand.com/fpga.php"
+
+#fpga code is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="x40? ( http://nuand.com/fpga/v${PV}/hostedx40.rbf )
+ x115? ( http://nuand.com/fpga/v${PV}/hostedx115.rbf )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+x40 +x115"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ use x40 && doins hostedx40.rbf
+ use x115 && doins hostedx115.rbf
+}
diff --git a/net-wireless/bladerf-fpga/bladerf-fpga-0.1.1-r1.ebuild b/net-wireless/bladerf-fpga/bladerf-fpga-0.1.1-r1.ebuild
new file mode 100644
index 00000000000..d3a927ebd44
--- /dev/null
+++ b/net-wireless/bladerf-fpga/bladerf-fpga-0.1.1-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FPGA bitstreams"
+HOMEPAGE="http://nuand.com/fpga.php"
+
+#fpga code is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="x40? ( http://nuand.com/fpga/v${PV}/hostedx40.rbf -> hostedx40-${PV}.rbf )
+ x115? ( http://nuand.com/fpga/v${PV}/hostedx115.rbf -> hostedx115-${PV}.rbf )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+x40 +x115"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ use x40 && newins hostedx40-${PV}.rbf hostedx40.rbf
+ use x115 && newins hostedx115-${PV}.rbf hostedx115.rbf
+}
diff --git a/net-wireless/bladerf-fpga/bladerf-fpga-0.1.2.ebuild b/net-wireless/bladerf-fpga/bladerf-fpga-0.1.2.ebuild
new file mode 100644
index 00000000000..37a2de9b6f4
--- /dev/null
+++ b/net-wireless/bladerf-fpga/bladerf-fpga-0.1.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FPGA bitstreams"
+HOMEPAGE="http://nuand.com/fpga.php"
+
+#fpga code is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="x40? ( http://nuand.com/fpga/v${PV}/hostedx40.rbf -> hostedx40-${PV}.rbf )
+ x115? ( http://nuand.com/fpga/v${PV}/hostedx115.rbf -> hostedx115-${PV}.rbf )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+x40 +x115"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ use x40 && newins hostedx40-${PV}.rbf hostedx40.rbf
+ use x115 && newins hostedx115-${PV}.rbf hostedx115.rbf
+}
diff --git a/net-wireless/bladerf-fpga/bladerf-fpga-0.3.4.ebuild b/net-wireless/bladerf-fpga/bladerf-fpga-0.3.4.ebuild
new file mode 100644
index 00000000000..37a2de9b6f4
--- /dev/null
+++ b/net-wireless/bladerf-fpga/bladerf-fpga-0.3.4.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="bladeRF FPGA bitstreams"
+HOMEPAGE="http://nuand.com/fpga.php"
+
+#fpga code is open source, but uses a proprietary toolchain to build
+#automated builds from git are available, but likely unneeded
+#http://hoopycat.com/bladerf_builds/
+SRC_URI="x40? ( http://nuand.com/fpga/v${PV}/hostedx40.rbf -> hostedx40-${PV}.rbf )
+ x115? ( http://nuand.com/fpga/v${PV}/hostedx115.rbf -> hostedx115-${PV}.rbf )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+x40 +x115"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${DISTDIR}"
+
+src_install() {
+ insinto /usr/share/Nuand/bladeRF/
+ use x40 && newins hostedx40-${PV}.rbf hostedx40.rbf
+ use x115 && newins hostedx115-${PV}.rbf hostedx115.rbf
+}
diff --git a/net-wireless/bladerf-fpga/metadata.xml b/net-wireless/bladerf-fpga/metadata.xml
new file mode 100644
index 00000000000..ddbf40e23d3
--- /dev/null
+++ b/net-wireless/bladerf-fpga/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>radio</herd>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+<use>
+<flag name="x40">bitstream for the x40KLE Cyclone IV FPGA bladerf model"</flag>
+<flag name="x115">bitstream for the x115KLE Cyclone IV FPGA bladerf model"</flag>
+</use>
+</pkgmetadata>
diff --git a/net-wireless/bladerf/Manifest b/net-wireless/bladerf/Manifest
new file mode 100644
index 00000000000..f2ea47d1302
--- /dev/null
+++ b/net-wireless/bladerf/Manifest
@@ -0,0 +1,2 @@
+DIST bladerf-2015.02.tar.gz 1297072 SHA256 387855d38fa425e55247fbcba28b386b23d87168e5d49aa3911d02e448a18eb6 SHA512 04fa431232562cf589489961a5206022be59687531aeb118aac8b8b58f74862cac7fad5c55676c0cf3b33e19abbf9e2a1339237eade2fd96c5ecdb37b51e9603 WHIRLPOOL 733b5ec527aae1420f763274c0cad239a782e41f2624fdf5a583cbddd4dafed22fcde2b051931cb756922909f84240e7eeed899bd1b52182bdb752fd6e8a5558
+DIST bladerf-2015.07.tar.gz 1418766 SHA256 9e15911ab39ba1eb4aa1bcbf518a0eac5396207fc4a58c32b2550fe0a65f9d22 SHA512 01589bc9bd6ee2d4120597133c7a69ed91a80c74bc75b70fb4470a9a14328161fcf4ba7112ec91ea12bedb3de7325135ac125b26f09c22dc6e49d9c23247bec8 WHIRLPOOL fe5c5716d6777ef71d1a7b482ec31792d07d360a04cb319a04d5e712b82c345ab83fd4db100fcb62a5cec9ce1b0983234b2b2c8eb8999a0a806a80990ea6ba5a
diff --git a/net-wireless/bladerf/bladerf-2015.02.ebuild b/net-wireless/bladerf/bladerf-2015.02.ebuild
new file mode 100644
index 00000000000..fe1d6271922
--- /dev/null
+++ b/net-wireless/bladerf/bladerf-2015.02.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils udev
+
+DESCRIPTION="Libraries for supporing the BladeRF hardware from Nuand"
+HOMEPAGE="http://nuand.com/"
+
+#lib is LGPL and cli tools are GPL
+LICENSE="GPL-2+ LGPL-2.1+"
+
+SLOT="0/${PV}"
+
+#maintainer notes:
+#doc use flag, looks like it can't be disabled right now and will
+# always build if pandoc and help2man are installed
+# also ignores when deps are missing and just disables docs
+IUSE="doc +tecla"
+
+MY_PN="bladeRF"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Nuand/${MY_PN}.git"
+ KEYWORDS=""
+else
+ MY_PV=${PV/\_/-}
+ S="${WORKDIR}/${MY_PN}-${MY_PV}"
+ SRC_URI="https://github.com/Nuand/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+CDEPEND=">=dev-libs/libusb-1.0.16
+ tecla? ( dev-libs/libtecla )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+PDEPEND=">=net-wireless/bladerf-firmware-1.8.0
+ >=net-wireless/bladerf-fpga-0.1.2"
+
+src_configure() {
+ mycmakeargs=(
+ -DVERSION_INFO_OVERRIDE:STRING="${PV}"
+ $(cmake-utils_use_enable doc BUILD_DOCUMENTATION)
+ $(cmake-utils_use_enable tecla LIBTECLA)
+ -DTREAT_WARNINGS_AS_ERRORS=OFF
+ -DUDEV_RULES_PATH="$(get_udevdir)"/rules.d
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-wireless/bladerf/bladerf-2015.07.ebuild b/net-wireless/bladerf/bladerf-2015.07.ebuild
new file mode 100644
index 00000000000..04e504dbd75
--- /dev/null
+++ b/net-wireless/bladerf/bladerf-2015.07.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils udev
+
+DESCRIPTION="Libraries for supporing the BladeRF hardware from Nuand"
+HOMEPAGE="http://nuand.com/"
+
+#lib is LGPL and cli tools are GPL
+LICENSE="GPL-2+ LGPL-2.1+"
+
+SLOT="0/${PV}"
+
+#maintainer notes:
+#doc use flag, looks like it can't be disabled right now and will
+# always build if pandoc and help2man are installed
+# also ignores when deps are missing and just disables docs
+IUSE="doc +tecla"
+
+MY_PN="bladeRF"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Nuand/${MY_PN}.git"
+ KEYWORDS=""
+else
+ MY_PV=${PV/\_/-}
+ S="${WORKDIR}/${MY_PN}-${MY_PV}"
+ SRC_URI="https://github.com/Nuand/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+CDEPEND=">=dev-libs/libusb-1.0.16
+ tecla? ( dev-libs/libtecla )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+PDEPEND=">=net-wireless/bladerf-firmware-1.8.0
+ >=net-wireless/bladerf-fpga-0.3.4"
+
+src_configure() {
+ mycmakeargs=(
+ -DVERSION_INFO_OVERRIDE:STRING="${PV}"
+ $(cmake-utils_use_enable doc BUILD_DOCUMENTATION)
+ $(cmake-utils_use_enable tecla LIBTECLA)
+ -DTREAT_WARNINGS_AS_ERRORS=OFF
+ -DUDEV_RULES_PATH="$(get_udevdir)"/rules.d
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-wireless/bladerf/bladerf-9999.ebuild b/net-wireless/bladerf/bladerf-9999.ebuild
new file mode 100644
index 00000000000..04e504dbd75
--- /dev/null
+++ b/net-wireless/bladerf/bladerf-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils udev
+
+DESCRIPTION="Libraries for supporing the BladeRF hardware from Nuand"
+HOMEPAGE="http://nuand.com/"
+
+#lib is LGPL and cli tools are GPL
+LICENSE="GPL-2+ LGPL-2.1+"
+
+SLOT="0/${PV}"
+
+#maintainer notes:
+#doc use flag, looks like it can't be disabled right now and will
+# always build if pandoc and help2man are installed
+# also ignores when deps are missing and just disables docs
+IUSE="doc +tecla"
+
+MY_PN="bladeRF"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Nuand/${MY_PN}.git"
+ KEYWORDS=""
+else
+ MY_PV=${PV/\_/-}
+ S="${WORKDIR}/${MY_PN}-${MY_PV}"
+ SRC_URI="https://github.com/Nuand/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+CDEPEND=">=dev-libs/libusb-1.0.16
+ tecla? ( dev-libs/libtecla )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+PDEPEND=">=net-wireless/bladerf-firmware-1.8.0
+ >=net-wireless/bladerf-fpga-0.3.4"
+
+src_configure() {
+ mycmakeargs=(
+ -DVERSION_INFO_OVERRIDE:STRING="${PV}"
+ $(cmake-utils_use_enable doc BUILD_DOCUMENTATION)
+ $(cmake-utils_use_enable tecla LIBTECLA)
+ -DTREAT_WARNINGS_AS_ERRORS=OFF
+ -DUDEV_RULES_PATH="$(get_udevdir)"/rules.d
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-wireless/bladerf/metadata.xml b/net-wireless/bladerf/metadata.xml
new file mode 100644
index 00000000000..0ab524fad83
--- /dev/null
+++ b/net-wireless/bladerf/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <use>
+ <flag name="tecla">use libtecla for command line editing, tab completion, and history</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Nuand/bladeRF</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/bluedevil/Manifest b/net-wireless/bluedevil/Manifest
new file mode 100644
index 00000000000..ef39f773b57
--- /dev/null
+++ b/net-wireless/bluedevil/Manifest
@@ -0,0 +1,2 @@
+DIST bluedevil-2.0-rc1.tar.xz 162800 SHA256 9833076b43e3b955dde77a0eff69ca0844b8947f770c0b86d2a58e59b9304e2d SHA512 6a72637ce02d2a634cee05579bc6de601fbd6db97eb3b88fcdbe289f80ce735a66a966e7e78423a10d93136560a83e546e899a22cc77c6934a8e9f2779309952 WHIRLPOOL d13626e4dde5dd54046c9c841437b78af88956f1745a39307e9dfd1764b76359199bbf4b39dae40b62e725cff774635745d5ddd62ecc999183b10f55776432b6
+DIST bluedevil-2.1.1.tar.xz 162060 SHA256 f18dc3848363dd7f7cce61475f336426c17b83224260cff705a96a535d0b9de5 SHA512 c5908db65dc2b3971af01b8555cb244257ed80592fe85417f2778cf3d236e34da402e8bf9bb4beba796b6d1401a1dcb1b4a651db1f57422314e3d030199e8bc4 WHIRLPOOL 858c29b76ac36af75d47c894f5da1e088d821801aaae695df619c95f8fab97ff22247d0451d3a9e7ec2253db836b4a7c1bf54a5f1b218e75030ba80189a6a193
diff --git a/net-wireless/bluedevil/bluedevil-2.0_rc1.ebuild b/net-wireless/bluedevil/bluedevil-2.0_rc1.ebuild
new file mode 100644
index 00000000000..0fae390406f
--- /dev/null
+++ b/net-wireless/bluedevil/bluedevil-2.0_rc1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga gl
+hu it ja kk km ko lt mai mr ms nb nds nl pa pl pt pt_BR ro ru sk sl sr
+sr@ijekavian sr@ijekavianlatin sr@latin sv th tr ug uk zh_CN zh_TW"
+inherit kde4-base
+
+MY_P=${PN}-${PV/_/-}
+DESCRIPTION="Bluetooth stack for KDE"
+HOMEPAGE="http://projects.kde.org/projects/extragear/base/bluedevil"
+SRC_URI="mirror://kde/unstable/${PN}/${PV/_/-}/src/${MY_P}.tar.xz"
+
+LICENSE="GPL-2+"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+SLOT="4"
+IUSE="debug"
+
+DEPEND="
+ >=net-libs/libbluedevil-2:4
+ x11-misc/shared-mime-info
+"
+RDEPEND="${DEPEND}"
+S=${WORKDIR}/${MY_P}
diff --git a/net-wireless/bluedevil/bluedevil-2.1.1.ebuild b/net-wireless/bluedevil/bluedevil-2.1.1.ebuild
new file mode 100644
index 00000000000..798c567fb94
--- /dev/null
+++ b/net-wireless/bluedevil/bluedevil-2.1.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga gl
+hu it ja kk km ko lt mai mr ms nb nds nl pa pl pt pt_BR ro ru sk sl sr
+sr@ijekavian sr@ijekavianlatin sr@Latn sv th tr ug uk zh_CN zh_TW"
+inherit kde4-base
+
+DESCRIPTION="Bluetooth stack for KDE"
+HOMEPAGE="http://projects.kde.org/projects/extragear/base/bluedevil"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="4"
+KEYWORDS="amd64 ~arm ppc ~ppc64 x86"
+IUSE="debug"
+
+RDEPEND="
+ >=net-libs/libbluedevil-2.1:4
+ x11-misc/shared-mime-info
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
diff --git a/net-wireless/bluedevil/metadata.xml b/net-wireless/bluedevil/metadata.xml
new file mode 100644
index 00000000000..a23f444b67d
--- /dev/null
+++ b/net-wireless/bluedevil/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/net-wireless/blueman/Manifest b/net-wireless/blueman/Manifest
new file mode 100644
index 00000000000..bf3bc827449
--- /dev/null
+++ b/net-wireless/blueman/Manifest
@@ -0,0 +1,3 @@
+DIST blueman-1.23.tar.gz 1223094 SHA256 50b261bcdc2e99e176c7c194825da1259500aaacaccb92714d97af0209a4f011 SHA512 529a43dace73bf362baac69404a9e87d14f5bcb7b07b18194434c7a6c1dbc22f8fecdb4923c92a77b65656405a492b9e147e77cb7a161df4a93e8b78a003eba7 WHIRLPOOL 4070b4d86cbe743278730e4ee3022bcfdea590b5b76e545cc67912a3498de993ed0c62cb67ac2cd3ad3b8e3c17c5d5a8b1f8fa6e214234a64a784146c6d6d542
+DIST blueman-1.98_p20150105.tar.xz 1698524 SHA256 cb610b0c4799d87989a2f6147059fb850f71984909f761af875c3106f51d543a SHA512 c988ff6cf9769d7653be252bda59bb41388a4d41d7b1f5aa01df63278018fc637634ea96a08b183b78cb5b966c3d2dc189021f437eabf674e8f93812798d4a6b WHIRLPOOL 7070a1bff973fe682af3b0103c99424401e5c3c5bc5632aefbaa9b5c9835d3f001b0656a17893feaffdcc3bfe173aac0c17789b634f937c54906774c9acde22f
+DIST blueman-2.0.tar.xz 1941332 SHA256 81a5ca95124f12bfb62d2d2d0d265af70cdae1d43b0c6e4fc6d2bad8f82958f1 SHA512 44d3967d031f7482e7700674970eff08fee53d8cbeb96e46b2f97e2a2fb6b5790f663ed73129eab241545ebaa6c5748dc6cf6b90a2c4795b27e90b5399d71f80 WHIRLPOOL 394bac3e0b457fdbb79c69fe9181abafde3f9b1138ff71c4dc23bc78424b76284e3ad9cf02dc168848fa461541f86fa2bba5aee0f014e460f0852e1bfa163dae
diff --git a/net-wireless/blueman/blueman-1.23-r2.ebuild b/net-wireless/blueman/blueman-1.23-r2.ebuild
new file mode 100644
index 00000000000..ae5de7c75a9
--- /dev/null
+++ b/net-wireless/blueman/blueman-1.23-r2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_DEPEND="2:2.7"
+
+inherit eutils python gnome2-utils
+
+DESCRIPTION="GTK+ Bluetooth Manager, designed to be simple and intuitive for everyday bluetooth tasks"
+HOMEPAGE="https://github.com/blueman-project/blueman"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gconf sendto network nls policykit pulseaudio"
+
+CDEPEND="dev-libs/glib:2
+ >=x11-libs/gtk+-2.12:2
+ x11-libs/startup-notification
+ dev-python/pygobject:2
+ <net-wireless/bluez-5
+ >=net-wireless/bluez-4.21"
+DEPEND="${CDEPEND}
+ nls? ( dev-util/intltool sys-devel/gettext )
+ virtual/pkgconfig
+ >=dev-python/pyrex-0.9.8"
+RDEPEND="${CDEPEND}
+ >=app-mobilephone/obex-data-server-0.4.4
+ sys-apps/dbus
+ dev-python/pygtk
+ dev-python/notify-python
+ dev-python/dbus-python
+ x11-themes/hicolor-icon-theme
+ gconf? ( dev-python/gconf-python )
+ sendto? ( gnome-base/nautilus )
+ network? ( || ( net-dns/dnsmasq
+ net-misc/dhcp
+ >=net-misc/networkmanager-0.8 ) )
+ policykit? ( sys-auth/polkit )
+ pulseaudio? ( media-sound/pulseaudio )"
+
+pkg_setup() {
+ python_set_active_version 2.7
+ python_pkg_setup
+}
+
+src_prepare() {
+ # disable pyc compiling
+ ln -sf $(type -P true) py-compile
+
+ sed -i \
+ -e '/^Encoding/d' \
+ data/blueman-manager.desktop.in || die "sed failed"
+
+ epatch \
+ "${FILESDIR}/${P}-plugins-conf-file.patch" \
+ "${FILESDIR}/${P}-fix-broken-status-icon.patch" \
+ "${FILESDIR}/${P}-set-codeset-for-gettext-to-UTF-8-always.patch"
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable policykit polkit) \
+ $(use_enable sendto) \
+ --disable-hal \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ python_convert_shebangs 2.7 "${D}"/usr/bin/blueman-* "${D}/usr/libexec/blueman-mechanism"
+
+ rm "${D}"/$(python_get_sitedir)/*.la
+ use sendto && rm "${D}"/usr/lib*/nautilus-sendto/plugins/*.la
+
+ use gconf || rm "${D}"/$(python_get_sitedir)/${PN}/plugins/config/Gconf.py
+ use policykit || rm -rf "${D}"/usr/share/polkit-1
+ use pulseaudio || rm "${D}"/$(python_get_sitedir)/${PN}/{main/Pulse*.py,plugins/applet/Pulse*.py}
+
+ python_need_rebuild
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+ gnome2_icon_cache_update
+}
diff --git a/net-wireless/blueman/blueman-1.98_p20150105.ebuild b/net-wireless/blueman/blueman-1.98_p20150105.ebuild
new file mode 100644
index 00000000000..17d1594baf2
--- /dev/null
+++ b/net-wireless/blueman/blueman-1.98_p20150105.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1 gnome2-utils autotools
+
+DESCRIPTION="GTK+ Bluetooth Manager, designed to be simple and intuitive for everyday bluetooth tasks"
+HOMEPAGE="https://github.com/blueman-project/blueman"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}-project/${PN}.git"
+ KEYWORDS=""
+else
+ #SRC_URI="http://download.tuxfamily.org/${PN}/${P}.tar.gz"
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="gconf gnome network nls policykit pulseaudio thunar"
+
+CDEPEND="dev-libs/glib:2=
+ x11-libs/gtk+:3=
+ x11-libs/startup-notification:=
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3
+ >=net-wireless/bluez-4.61:=
+ ${PYTHON_DEPS}"
+DEPEND="${CDEPEND}
+ nls? ( dev-util/intltool sys-devel/gettext )
+ virtual/pkgconfig
+ dev-python/cython[${PYTHON_USEDEP}]"
+RDEPEND="${CDEPEND}
+ >=app-mobilephone/obex-data-server-0.4.4
+ sys-apps/dbus
+ x11-themes/hicolor-icon-theme
+ gconf? ( dev-python/gconf-python[${PYTHON_USEDEP}] )
+ gnome? ( gnome-base/nautilus )
+ network? ( || ( net-dns/dnsmasq
+ net-misc/dhcp
+ >=net-misc/networkmanager-0.8 ) )
+ policykit? ( sys-auth/polkit )
+ pulseaudio? ( media-sound/pulseaudio )
+ !net-wireless/gnome-bluetooth
+ x11-themes/gnome-icon-theme
+ thunar? ( xfce-base/thunar )
+"
+# See bug 455320 and https://github.com/blueman-project/blueman/issues/112 for reason for gnome-icon-theme dep
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ sed -i \
+ -e '/^Encoding/d' \
+ data/blueman-manager.desktop.in || die "sed failed"
+
+ epatch \
+ "${FILESDIR}/${PN}-9999-plugins-conf-file.patch" \
+ "${FILESDIR}/${P}-set-codeset-for-gettext-to-UTF-8-always.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable policykit polkit) \
+ $(use_enable gnome nautilus-sendto) \
+ $(use_enable nls) \
+ $(use_enable thunar thunar-sendto)
+}
+
+src_install() {
+ default
+
+ python_fix_shebang "${D}"
+
+ rm "${D}"/$(python_get_sitedir)/*.la || die
+ use gnome && { rm "${D}"/usr/lib*/nautilus-sendto/plugins/*.la || die; }
+
+ # Note: Python 3 support would need __pycache__ file removal too
+ use gconf || { rm "${D}"/$(python_get_sitedir)/${PN}/plugins/config/Gconf.py* || die; }
+ use policykit || { rm -rf "${D}"/usr/share/polkit-1 || die; }
+ use pulseaudio || { rm "${D}"/$(python_get_sitedir)/${PN}/{main/Pulse*.py*,plugins/manager/Pulse*.py*} || die; }
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-wireless/blueman/blueman-2.0.ebuild b/net-wireless/blueman/blueman-2.0.ebuild
new file mode 100644
index 00000000000..473715688d6
--- /dev/null
+++ b/net-wireless/blueman/blueman-2.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils gnome2-utils linux-info python-single-r1
+
+DESCRIPTION="GTK+ Bluetooth Manager, designed to be simple and intuitive for everyday bluetooth tasks"
+HOMEPAGE="https://github.com/blueman-project/blueman"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/blueman-project/blueman.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/blueman-project/${PN}/releases/download/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="appindicator network nls policykit pulseaudio thunar"
+
+COMMON_DEPEND="
+ dev-python/pygobject:3
+ >=net-wireless/bluez-4.61:=
+ ${PYTHON_DEPS}"
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ nls? ( dev-util/intltool sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ sys-apps/dbus
+ x11-libs/gtk+:3[introspection]
+ x11-libs/libnotify[introspection]
+ || (
+ x11-themes/faenza-icon-theme
+ x11-themes/gnome-icon-theme
+ x11-themes/mate-icon-theme
+ )
+ appindicator? ( dev-libs/libappindicator:3[introspection] )
+ network? (
+ net-dns/avahi[autoipd]
+ net-firewall/iptables
+ sys-apps/net-tools
+ || (
+ net-dns/dnsmasq
+ net-misc/dhcp
+ >=net-misc/networkmanager-0.8
+ )
+ )
+ policykit? ( sys-auth/polkit )
+ pulseaudio? ( media-sound/pulseaudio[bluetooth] )
+ thunar? ( xfce-base/thunar )
+ !net-wireless/gnome-bluetooth
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_pretend() {
+ if use network; then
+ local CONFIG_CHECK="~BRIDGE ~IP_NF_IPTABLES
+ ~IP_NF_NAT ~IP_NF_TARGET_MASQUERADE"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ pkg_pretend
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-set-codeset-for-gettext-to-UTF-8-always.patch"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-runtime-deps-check \
+ --disable-static \
+ $(use_enable policykit polkit) \
+ $(use_enable nls) \
+ $(use_enable thunar thunar-sendto)
+}
+
+src_install() {
+ default
+
+ python_fix_shebang "${D}"
+ rm "${D}"/$(python_get_sitedir)/*.la || die
+
+ use appindicator || { rm "${D}"/$(python_get_sitedir)/${PN}/plugins/applet/AppIndicator.py* || die; }
+ use pulseaudio || { rm "${D}"/$(python_get_sitedir)/${PN}/{main/Pulse*.py*,plugins/manager/Pulse*.py*} || die; }
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
diff --git a/net-wireless/blueman/blueman-9999.ebuild b/net-wireless/blueman/blueman-9999.ebuild
new file mode 100644
index 00000000000..caa2c00d0e8
--- /dev/null
+++ b/net-wireless/blueman/blueman-9999.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+inherit eutils gnome2-utils linux-info python-single-r1
+
+DESCRIPTION="GTK+ Bluetooth Manager, designed to be simple and intuitive for everyday bluetooth tasks"
+HOMEPAGE="https://github.com/blueman-project/blueman"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/blueman-project/blueman.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/blueman-project/${PN}/releases/download/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="appindicator network nls policykit pulseaudio thunar"
+
+COMMON_DEPEND="
+ dev-python/pygobject:3
+ >=net-wireless/bluez-5:=
+ ${PYTHON_DEPS}"
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ nls? ( dev-util/intltool sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ sys-apps/dbus
+ x11-libs/gtk+:3[introspection]
+ x11-libs/libnotify[introspection]
+ || (
+ x11-themes/faenza-icon-theme
+ x11-themes/gnome-icon-theme
+ x11-themes/mate-icon-theme
+ )
+ appindicator? ( dev-libs/libappindicator:3[introspection] )
+ network? (
+ net-dns/avahi[autoipd]
+ net-firewall/iptables
+ sys-apps/net-tools
+ || (
+ net-dns/dnsmasq
+ net-misc/dhcp
+ >=net-misc/networkmanager-0.8
+ )
+ )
+ policykit? ( sys-auth/polkit )
+ pulseaudio? ( media-sound/pulseaudio[bluetooth] )
+ thunar? ( xfce-base/thunar )
+ !net-wireless/gnome-bluetooth
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_pretend() {
+ if use network; then
+ local CONFIG_CHECK="~BRIDGE ~IP_NF_IPTABLES
+ ~IP_NF_NAT ~IP_NF_TARGET_MASQUERADE"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ pkg_pretend
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-9999-set-codeset-for-gettext-to-UTF-8-always.patch"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-runtime-deps-check \
+ --disable-static \
+ $(use_enable appindicator) \
+ $(use_enable policykit polkit) \
+ $(use_enable nls) \
+ $(use_enable pulseaudio) \
+ $(use_enable thunar thunar-sendto)
+}
+
+src_install() {
+ default
+
+ python_fix_shebang "${D}"
+ rm "${D}"/$(python_get_sitedir)/*.la || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
diff --git a/net-wireless/blueman/files/blueman-1.23-fix-broken-status-icon.patch b/net-wireless/blueman/files/blueman-1.23-fix-broken-status-icon.patch
new file mode 100644
index 00000000000..58931eba398
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-1.23-fix-broken-status-icon.patch
@@ -0,0 +1,34 @@
+From 4588e22cc486cf297517168f52f0274133577827 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Wed, 13 Jun 2012 09:52:40 +0200
+Subject: [PATCH] fix broken status icon
+
+---
+ blueman/plugins/applet/StatusIcon.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/blueman/plugins/applet/StatusIcon.py b/blueman/plugins/applet/StatusIcon.py
+index fb02593..ed352ea 100644
+--- a/blueman/plugins/applet/StatusIcon.py
++++ b/blueman/plugins/applet/StatusIcon.py
+@@ -68,7 +68,7 @@ class StatusIcon(AppletPlugin, gtk.StatusIcon):
+ entry.connect("changed", self.on_entry_changed, ic, image)
+
+ __options__ = {"icon": {"type": str,
+- "default": "blueman-tray",
++ "default": "blueman",
+ "name": _("Icon Name"),
+ "desc": _("Custom icon to use for the notification area"),
+ "decorator": widget_decorator
+@@ -166,7 +166,7 @@ class StatusIcon(AppletPlugin, gtk.StatusIcon):
+ self.QueryVisibility()
+
+ def on_status_icon_resized(self):
+- self.icon = "blueman-tray"
++ self.icon = "blueman"
+
+ #p = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, 22, 22)
+ #p.fill(0)
+--
+1.7.8.6
+
diff --git a/net-wireless/blueman/files/blueman-1.23-plugins-conf-file.patch b/net-wireless/blueman/files/blueman-1.23-plugins-conf-file.patch
new file mode 100644
index 00000000000..80cdad0c9a0
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-1.23-plugins-conf-file.patch
@@ -0,0 +1,30 @@
+diff --git a/blueman/plugins/config/File.py b/blueman/plugins/config/File.py
+index c5414c5..9a9e156 100644
+--- a/blueman/plugins/config/File.py
++++ b/blueman/plugins/config/File.py
+@@ -37,7 +37,12 @@ signal.signal(signal.SIGHUP, sighandler)
+
+ dbus.service.Object.SUPPORTS_MULTIPLE_OBJECT_PATHS = True
+
+-cfg_path = os.path.expanduser('~/.config/blueman/blueman.cfg')
++cfg_dir = os.path.expanduser('~/.config/blueman')
++
++if os.environ.has_key('XDG_CONFIG_HOME'):
++ cfg_dir = '%s/blueman' % os.environ['XDG_CONFIG_HOME']
++
++cfg_path = '%s/blueman.cfg' % cfg_dir
+
+ class Monitor(dbus.service.Object):
+ __id__ = 0
+@@ -89,9 +94,9 @@ class File(ConfigPlugin):
+ def on_load(self, section):
+
+ if not File.__db__:
+- if not os.path.exists(os.path.expanduser('~/.config/blueman')):
++ if not os.path.exists(os.path.expanduser(cfg_dir)):
+ try:
+- os.makedirs(os.path.expanduser('~/.config/blueman'))
++ os.makedirs(os.path.expanduser(cfg_dir))
+ except:
+ pass
+ try:
diff --git a/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch b/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch
new file mode 100644
index 00000000000..a7df10db506
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch
@@ -0,0 +1,266 @@
+From f585aea768ad98440d4967894aa9213cea6e6f14 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Tue, 19 Jun 2012 08:03:47 +0200
+Subject: [PATCH] Set codeset for gettext to UTF-8 always
+
+This fixes a segfault in g_markup_escape_text when loading the UI files
+with a non-UTF-8 locale since GTK+ expects all strings (including translation)
+to be in UTF-8.
+---
+ apps/blueman-adapters | 2 ++
+ apps/blueman-assistant | 2 ++
+ apps/blueman-manager | 2 ++
+ apps/blueman-sendto | 2 ++
+ apps/blueman-services | 2 ++
+ blueman/gui/GsmSettings.py | 2 ++
+ blueman/gui/applet/PluginDialog.py | 2 ++
+ blueman/main/applet/BluezAgent.py | 2 ++
+ blueman/plugins/applet/NetUsage.py | 2 ++
+ blueman/plugins/services/Audio.py | 2 ++
+ blueman/plugins/services/Network.py | 2 ++
+ blueman/plugins/services/Transfer.py | 2 ++
+ 12 files changed, 24 insertions(+), 0 deletions(-)
+
+diff --git a/apps/blueman-adapters b/apps/blueman-adapters
+index 6adc642..51325ad 100755
+--- a/apps/blueman-adapters
++++ b/apps/blueman-adapters
+@@ -26,6 +26,7 @@ import gobject
+ import pango
+ import os.path
+ import sys
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -47,6 +48,7 @@ class BluemanAdapters:
+
+ builder = gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH +"/adapters.ui")
+ self.dialog = builder.get_object("dialog")
+
+diff --git a/apps/blueman-assistant b/apps/blueman-assistant
+index 32d8bd8..c30f663 100755
+--- a/apps/blueman-assistant
++++ b/apps/blueman-assistant
+@@ -35,6 +35,7 @@ import gtk
+ import random
+ import dbus.glib
+ from optparse import OptionParser
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -74,6 +75,7 @@ class Assistant(Agent):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/assistant.ui")
+ self.assistant = self.Builder.get_object("assistant")
+ self.assistant.set_title(_("Bluetooth Assistant"))
+diff --git a/apps/blueman-manager b/apps/blueman-manager
+index e4a04e3..3aeb80f 100755
+--- a/apps/blueman-manager
++++ b/apps/blueman-manager
+@@ -25,6 +25,7 @@ import sys
+ import gtk
+ import dbus, dbus.glib
+ import gobject
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -56,6 +57,7 @@ class Blueman:
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/manager-main.ui")
+
+ self.window = self.Builder.get_object("window")
+diff --git a/apps/blueman-sendto b/apps/blueman-sendto
+index 72fcfa9..f8c082a 100755
+--- a/apps/blueman-sendto
++++ b/apps/blueman-sendto
+@@ -33,6 +33,7 @@ from optparse import OptionParser
+ import gettext
+ import urllib
+ import time
++from locale import bind_textdomain_codeset
+
+ from blueman.bluez.Adapter import Adapter
+ from blueman.main.Device import Device
+@@ -56,6 +57,7 @@ class Sender(gobject.GObject):
+ gobject.GObject.__init__(self)
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/send-dialog.ui")
+ self.window = self.Builder.get_object("window")
+
+diff --git a/apps/blueman-services b/apps/blueman-services
+index d6d4545..2c15f03 100755
+--- a/apps/blueman-services
++++ b/apps/blueman-services
+@@ -8,6 +8,7 @@ if os.path.exists(os.path.join(_dirname,"ChangeLog")):
+ sys.path.insert(0, _dirname)
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.gui.GenericList import GenericList
+
+ from blueman.Functions import *
+@@ -25,6 +26,7 @@ class BluemanServices:
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services.ui")
+
+ self.Config = Config()
+diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
+index 2e845ec..b4e1059 100644
+--- a/blueman/gui/GsmSettings.py
++++ b/blueman/gui/GsmSettings.py
+@@ -20,6 +20,7 @@ from blueman.main.Config import Config
+ from blueman.Functions import *
+ from blueman.Constants import *
+ import gtk
++from locale import bind_textdomain_codeset
+
+ class GsmSettings(gtk.Dialog):
+ def __init__(self, bd_address):
+@@ -29,6 +30,7 @@ class GsmSettings(gtk.Dialog):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/gsm-settings.ui")
+
+ vbox = self.Builder.get_object("vbox1")
+diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
+index 1d8cbec..299aa32 100644
+--- a/blueman/gui/applet/PluginDialog.py
++++ b/blueman/gui/applet/PluginDialog.py
+@@ -23,6 +23,7 @@ from blueman.Functions import *
+
+ from blueman.gui.GenericList import GenericList
+ import weakref
++from locale import bind_textdomain_codeset
+
+ class SettingsWidget(gtk.VBox):
+ def __init__(self, inst):
+@@ -118,6 +119,7 @@ class PluginDialog(gtk.Dialog):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/applet-plugins-widget.ui")
+
+ self.set_title(_("Plugins"))
+diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
+index 9c7f93e..377f84b 100644
+--- a/blueman/main/applet/BluezAgent.py
++++ b/blueman/main/applet/BluezAgent.py
+@@ -24,6 +24,7 @@ from blueman.Functions import get_icon, dprint
+ import gtk
+ import gobject
+ import cgi
++from locale import bind_textdomain_codeset
+ import blueman.bluez as Bluez
+ from blueman.Sdp import *
+ from blueman.Constants import *
+@@ -65,6 +66,7 @@ class CommonAgent(gobject.GObject, Agent):
+ builder = gtk.Builder()
+ builder.add_from_file(UI_PATH +"/applet-passkey.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ dialog = builder.get_object("dialog")
+
+ dialog.props.icon_name = "blueman"
+diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
+index 0cf15e8..bcebb44 100644
+--- a/blueman/plugins/applet/NetUsage.py
++++ b/blueman/plugins/applet/NetUsage.py
+@@ -33,6 +33,7 @@ import dbus
+ import time
+ import datetime
+ import gettext
++from locale import bind_textdomain_codeset
+
+ class MonitorBase(gobject.GObject):
+ __gsignals__ = {
+@@ -146,6 +147,7 @@ class Dialog:
+ builder = gtk.Builder()
+ builder.add_from_file(UI_PATH + "/net-usage.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+
+ self.dialog = builder.get_object("dialog")
+ self.dialog.connect("response", self.on_response)
+diff --git a/blueman/plugins/services/Audio.py b/blueman/plugins/services/Audio.py
+index a725923..6a67fb0 100644
+--- a/blueman/plugins/services/Audio.py
++++ b/blueman/plugins/services/Audio.py
+@@ -19,6 +19,7 @@
+
+ import gtk
+ import dbus
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -35,6 +36,7 @@ class Audio(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-audio.ui")
+ self.widget = self.Builder.get_object("audio")
+
+diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
+index d7b9f45..fc8a8f4 100644
+--- a/blueman/plugins/services/Network.py
++++ b/blueman/plugins/services/Network.py
+@@ -18,6 +18,7 @@
+ #
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.Functions import have, dprint, mask_ip4_address
+ from blueman.Lib import get_net_interfaces, get_net_address, get_net_netmask
+@@ -36,6 +37,7 @@ class Network(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-network.ui")
+ self.widget = self.Builder.get_object("network")
+
+diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
+index d8ba6be..5dd44f0 100644
+--- a/blueman/plugins/services/Transfer.py
++++ b/blueman/plugins/services/Transfer.py
+@@ -18,6 +18,7 @@
+ #
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -32,6 +33,7 @@ class Transfer(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-transfer.ui")
+ self.widget = self.Builder.get_object("transfer")
+
+--
+1.7.8.6
+
diff --git a/net-wireless/blueman/files/blueman-1.98_p20150105-set-codeset-for-gettext-to-UTF-8-always.patch b/net-wireless/blueman/files/blueman-1.98_p20150105-set-codeset-for-gettext-to-UTF-8-always.patch
new file mode 100644
index 00000000000..ce341c866cd
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-1.98_p20150105-set-codeset-for-gettext-to-UTF-8-always.patch
@@ -0,0 +1,239 @@
+diff --git a/apps/blueman-adapters b/apps/blueman-adapters
+index ed80a4f..9f27b9e 100755
+--- a/apps/blueman-adapters
++++ b/apps/blueman-adapters
+@@ -6,6 +6,7 @@ from gi.repository import Pango
+ import os.path
+ import sys
+ import signal
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -34,6 +35,7 @@ class BluemanAdapters:
+
+ builder = Gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH + "/adapters.ui")
+ self.dialog = builder.get_object("dialog")
+
+diff --git a/apps/blueman-assistant b/apps/blueman-assistant
+index 7e602c8..fab3355 100755
+--- a/apps/blueman-assistant
++++ b/apps/blueman-assistant
+@@ -16,6 +16,7 @@ import random
+ import signal
+ import dbus.glib
+ from optparse import OptionParser
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -62,6 +63,7 @@ class Assistant:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/assistant.ui")
+ self.assistant = self.Builder.get_object("assistant")
+ self.assistant.set_title(_("Bluetooth Assistant"))
+diff --git a/apps/blueman-manager b/apps/blueman-manager
+index b152044..395257b 100755
+--- a/apps/blueman-manager
++++ b/apps/blueman-manager
+@@ -7,6 +7,7 @@ import dbus, dbus.glib
+ from blueman.Constants import *
+ import gi
+ gi.require_version("Gtk", "3.0")
++from locale import bind_textdomain_codeset
+ from gi.repository import Gtk
+ from gi.repository import GObject
+ from blueman.bluez.BlueZInterface import BlueZInterface
+@@ -43,6 +44,7 @@ class Blueman:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/manager-main.ui")
+
+ self.window = self.Builder.get_object("window")
+diff --git a/apps/blueman-sendto b/apps/blueman-sendto
+index 852f99a..fdbff01 100755
+--- a/apps/blueman-sendto
++++ b/apps/blueman-sendto
+@@ -13,6 +13,7 @@ from optparse import OptionParser
+ import gettext
+ import urllib
+ import time
++from locale import bind_textdomain_codeset
+
+ from blueman.Constants import *
+ import gi
+@@ -46,6 +47,7 @@ class Sender(GObject.GObject):
+ GObject.GObject.__init__(self)
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/send-dialog.ui")
+ self.window = self.Builder.get_object("window")
+
+diff --git a/apps/blueman-services b/apps/blueman-services
+index 25a529b..4b4419c 100755
+--- a/apps/blueman-services
++++ b/apps/blueman-services
+@@ -2,6 +2,7 @@
+
+ import os
+ import sys
++from locale import bind_textdomain_codeset
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+ if os.path.exists(os.path.join(_dirname, "CHANGELOG.md")):
+@@ -29,6 +30,7 @@ class BluemanServices:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services.ui")
+
+ self.Config = Config()
+diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
+index ee07e62..e58277b 100644
+--- a/blueman/gui/GsmSettings.py
++++ b/blueman/gui/GsmSettings.py
+@@ -21,6 +21,7 @@ from blueman.Functions import *
+ from blueman.Constants import *
+
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+
+ class GsmSettings(Gtk.Dialog):
+ def __init__(self, bd_address):
+@@ -30,6 +31,7 @@ class GsmSettings(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/gsm-settings.ui")
+
+ vbox = self.Builder.get_object("vbox1")
+diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
+index f994cc9..84d6370 100644
+--- a/blueman/gui/applet/PluginDialog.py
++++ b/blueman/gui/applet/PluginDialog.py
+@@ -23,6 +23,7 @@ from blueman.Functions import *
+
+ from blueman.gui.GenericList import GenericList
+ import weakref
++from locale import bind_textdomain_codeset
+
+ class SettingsWidget(Gtk.VBox):
+ def __init__(self, inst):
+@@ -118,6 +119,7 @@ class PluginDialog(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/applet-plugins-widget.ui")
+
+ self.set_title(_("Plugins"))
+diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
+index 072958d..207659c 100644
+--- a/blueman/main/applet/BluezAgent.py
++++ b/blueman/main/applet/BluezAgent.py
+@@ -7,6 +7,7 @@ from gi.repository import Gtk
+ from gi.repository import GObject
+ from gi.types import GObjectMeta
+ import cgi
++from locale import bind_textdomain_codeset
+ import blueman.bluez as Bluez
+ from blueman.Sdp import *
+ from blueman.Constants import *
+@@ -50,6 +51,7 @@ class CommonAgent(GObject.GObject, Agent):
+ editable.stop_emission("insert-text")
+
+ builder = Gtk.Builder()
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH + "/applet-passkey.ui")
+ builder.set_translation_domain("blueman")
+ dialog = builder.get_object("dialog")
+diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
+index 9fd93c7..d6bc492 100644
+--- a/blueman/plugins/applet/NetUsage.py
++++ b/blueman/plugins/applet/NetUsage.py
+@@ -17,7 +17,7 @@ import dbus
+ import time
+ import datetime
+ import gettext
+-
++from locale import bind_textdomain_codeset
+
+ class MonitorBase(GObject.GObject):
+ __gsignals__ = {
+@@ -134,6 +134,7 @@ class Dialog:
+ builder = Gtk.Builder()
+ builder.add_from_file(UI_PATH + "/net-usage.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+
+ self.dialog = builder.get_object("dialog")
+ self.dialog.connect("response", self.on_response)
+diff --git a/blueman/plugins/services/Audio.py b/blueman/plugins/services/Audio.py
+index b44d6b5..4b13e8f 100644
+--- a/blueman/plugins/services/Audio.py
++++ b/blueman/plugins/services/Audio.py
+@@ -19,6 +19,7 @@
+
+ from gi.repository import Gtk
+ import dbus
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -35,6 +36,7 @@ class Audio(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-audio.ui")
+ self.widget = self.Builder.get_object("audio")
+
+diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
+index 5fab49a..0dd88d9 100644
+--- a/blueman/plugins/services/Network.py
++++ b/blueman/plugins/services/Network.py
+@@ -18,6 +18,7 @@
+ #
+
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.Functions import have, dprint, mask_ip4_address
+ from blueman.Lib import get_net_interfaces, get_net_address, get_net_netmask
+@@ -36,6 +37,7 @@ class Network(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-network.ui")
+ self.widget = self.Builder.get_object("network")
+
+diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
+index 189d0cc..8fa65d0 100644
+--- a/blueman/plugins/services/Transfer.py
++++ b/blueman/plugins/services/Transfer.py
+@@ -1,4 +1,5 @@
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -14,6 +15,7 @@ class Transfer(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services-transfer.ui")
+ self.widget = self.Builder.get_object("transfer")
+
diff --git a/net-wireless/blueman/files/blueman-2.0-set-codeset-for-gettext-to-UTF-8-always.patch b/net-wireless/blueman/files/blueman-2.0-set-codeset-for-gettext-to-UTF-8-always.patch
new file mode 100644
index 00000000000..02747d178d3
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-2.0-set-codeset-for-gettext-to-UTF-8-always.patch
@@ -0,0 +1,219 @@
+From aebfe594584e7c5cca30062d643618fc2ab8144b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 1 Mar 2015 23:08:02 +0100
+Subject: [PATCH] set codeset for gettext to utf-8
+
+---
+ apps/blueman-adapters | 2 ++
+ apps/blueman-assistant | 2 ++
+ apps/blueman-manager | 2 ++
+ apps/blueman-sendto | 2 ++
+ apps/blueman-services | 2 ++
+ blueman/gui/GsmSettings.py | 2 ++
+ blueman/gui/applet/PluginDialog.py | 4 +++-
+ blueman/plugins/applet/NetUsage.py | 3 ++-
+ blueman/plugins/services/Network.py | 3 ++-
+ blueman/plugins/services/Transfer.py | 2 ++
+ 11 files changed, 29 insertions(+), 6 deletions(-)
+
+diff --git a/apps/blueman-adapters b/apps/blueman-adapters
+index a961480..3759ba8 100755
+--- a/apps/blueman-adapters
++++ b/apps/blueman-adapters
+@@ -6,6 +6,7 @@ from gi.repository import Pango
+ import os.path
+ import sys
+ import signal
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -36,6 +37,7 @@ class BluemanAdapters:
+
+ builder = Gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH + "/adapters.ui")
+ self.dialog = builder.get_object("dialog")
+
+diff --git a/apps/blueman-assistant b/apps/blueman-assistant
+index 7d96ec7..c322256 100755
+--- a/apps/blueman-assistant
++++ b/apps/blueman-assistant
+@@ -16,6 +16,7 @@ import random
+ import signal
+ import dbus.glib
+ from optparse import OptionParser
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -62,6 +63,7 @@ class Assistant:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/assistant.ui")
+ self.assistant = self.Builder.get_object("assistant")
+ self.assistant.set_title(_("Bluetooth Assistant"))
+diff --git a/apps/blueman-manager b/apps/blueman-manager
+index 666f16c..af23015 100755
+--- a/apps/blueman-manager
++++ b/apps/blueman-manager
+@@ -8,6 +8,7 @@ from dbus.mainloop.glib import DBusGMainLoop
+ from blueman.Constants import *
+ import gi
+ gi.require_version("Gtk", "3.0")
++from locale import bind_textdomain_codeset
+ from gi.repository import Gtk
+ from gi.repository import GObject
+ from blueman.bluez.BlueZInterface import BlueZInterface
+@@ -46,6 +47,7 @@ class Blueman:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/manager-main.ui")
+
+ self.window = self.Builder.get_object("window")
+diff --git a/apps/blueman-sendto b/apps/blueman-sendto
+index 06ad626..a7099ab 100755
+--- a/apps/blueman-sendto
++++ b/apps/blueman-sendto
+@@ -13,6 +13,7 @@ from optparse import OptionParser
+ import gettext
+ import urllib
+ import time
++from locale import bind_textdomain_codeset
+
+ from blueman.Constants import *
+ import gi
+@@ -48,6 +49,7 @@ class Sender(GObject.GObject):
+ GObject.GObject.__init__(self)
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/send-dialog.ui")
+ self.window = self.Builder.get_object("window")
+
+diff --git a/apps/blueman-services b/apps/blueman-services
+index fb1428d..e3e708b 100755
+--- a/apps/blueman-services
++++ b/apps/blueman-services
+@@ -2,6 +2,7 @@
+
+ import os
+ import sys
++from locale import bind_textdomain_codeset
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+ if os.path.exists(os.path.join(_dirname, "CHANGELOG.md")):
+@@ -29,6 +30,7 @@ class BluemanServices:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services.ui")
+
+ self.Config = Config()
+diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
+index b12f77f..cc80492 100644
+--- a/blueman/gui/GsmSettings.py
++++ b/blueman/gui/GsmSettings.py
+@@ -3,6 +3,7 @@ from blueman.Functions import *
+ from blueman.Constants import *
+
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+
+
+ class GsmSettings(Gtk.Dialog):
+@@ -13,6 +14,7 @@ class GsmSettings(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/gsm-settings.ui")
+
+ vbox = self.Builder.get_object("vbox1")
+diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
+index 71dd742..3a1f932 100644
+--- a/blueman/gui/applet/PluginDialog.py
++++ b/blueman/gui/applet/PluginDialog.py
+@@ -1,4 +1,5 @@
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.Functions import *
+
+@@ -97,7 +98,8 @@ class PluginDialog(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
+- self.Builder.add_from_file(UI_PATH + "/applet-plugins-widget.ui")
++ bind_textdomain_codeset("blueman", "UTF-8")
++ self.Builder.add_from_file(UI_PATH + "/applet-plugins-widget.ui")
+
+ self.set_title(_("Plugins"))
+ self.props.icon_name = "blueman"
+diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
+index f6acb1f..5545112 100644
+--- a/blueman/plugins/applet/NetUsage.py
++++ b/blueman/plugins/applet/NetUsage.py
+@@ -17,7 +17,7 @@ import dbus
+ import time
+ import datetime
+ import gettext
+-
++from locale import bind_textdomain_codeset
+
+ class MonitorBase(GObject.GObject):
+ __gsignals__ = {
+@@ -134,6 +134,7 @@ class Dialog:
+ builder = Gtk.Builder()
+ builder.add_from_file(UI_PATH + "/net-usage.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+
+ self.dialog = builder.get_object("dialog")
+ self.dialog.connect("response", self.on_response)
+diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
+index 278121e..e688e68 100644
+--- a/blueman/plugins/services/Network.py
++++ b/blueman/plugins/services/Network.py
+@@ -1,4 +1,5 @@
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.Functions import have, dprint, mask_ip4_address
+ from blueman.Lib import get_net_interfaces, get_net_address, get_net_netmask
+@@ -19,7 +20,7 @@ class Network(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
+- self.Builder.add_from_file(UI_PATH + "/services-network.ui")
++ bind_textdomain_codeset("blueman", "UTF-8") self.Builder.add_from_file(UI_PATH + "/services-network.ui")
+ self.widget = self.Builder.get_object("network")
+
+ self.ignored_keys = []
+diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
+index d14d0eb..c3e71ad 100644
+--- a/blueman/plugins/services/Transfer.py
++++ b/blueman/plugins/services/Transfer.py
+@@ -1,4 +1,5 @@
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -14,6 +15,7 @@ class Transfer(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services-transfer.ui")
+ self.widget = self.Builder.get_object("transfer")
+
+--
+2.3.1
+
diff --git a/net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch b/net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch
new file mode 100644
index 00000000000..fa536b27c42
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch
@@ -0,0 +1,267 @@
+From a28a982ba05a3b84dcfed43e5bd6801067b5d0c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 8 Aug 2015 14:57:51 +0200
+Subject: [PATCH] Always set codeset for gettext to utf8
+
+---
+ apps/blueman-adapters | 2 ++
+ apps/blueman-assistant | 2 ++
+ apps/blueman-manager | 2 ++
+ apps/blueman-sendto | 2 ++
+ apps/blueman-services | 2 ++
+ blueman/gui/GsmSettings.py | 3 +++
+ blueman/gui/applet/PluginDialog.py | 3 +++
+ blueman/gui/manager/ManagerDeviceMenu.py | 2 ++
+ blueman/main/applet/BluezAgent.py | 2 ++
+ blueman/plugins/applet/NetUsage.py | 3 ++-
+ blueman/plugins/services/Network.py | 2 ++
+ blueman/plugins/services/Transfer.py | 3 +++
+ 12 files changed, 27 insertions(+), 1 deletion(-)
+
+diff --git a/apps/blueman-adapters b/apps/blueman-adapters
+index 4ac81fe..c8d8c06 100755
+--- a/apps/blueman-adapters
++++ b/apps/blueman-adapters
+@@ -11,6 +11,7 @@ from gi.repository import Pango
+ import os.path
+ import sys
+ import signal
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -40,6 +41,7 @@ class BluemanAdapters:
+
+ builder = Gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH + "/adapters.ui")
+ self.dialog = builder.get_object("dialog")
+
+diff --git a/apps/blueman-assistant b/apps/blueman-assistant
+index 0b8544b..b23150f 100755
+--- a/apps/blueman-assistant
++++ b/apps/blueman-assistant
+@@ -19,6 +19,7 @@ import os
+ import sys
+ import signal
+ from optparse import OptionParser
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -60,6 +61,7 @@ class Assistant:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/assistant.ui")
+ self.assistant = self.Builder.get_object("assistant")
+ self.assistant.set_title(_("Bluetooth Assistant"))
+diff --git a/apps/blueman-manager b/apps/blueman-manager
+index d276692..e272528 100755
+--- a/apps/blueman-manager
++++ b/apps/blueman-manager
+@@ -14,6 +14,7 @@ from blueman.Constants import *
+ import gi
+ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -47,6 +48,7 @@ class Blueman:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/manager-main.ui")
+
+ self.window = self.Builder.get_object("window")
+diff --git a/apps/blueman-sendto b/apps/blueman-sendto
+index 54e30b4..3f99d1e 100755
+--- a/apps/blueman-sendto
++++ b/apps/blueman-sendto
+@@ -17,6 +17,7 @@ from optparse import OptionParser
+ import gettext
+ import urllib
+ import time
++from locale import bind_textdomain_codeset
+
+ from blueman.Constants import *
+ import gi
+@@ -52,6 +53,7 @@ class Sender(GObject.GObject):
+ GObject.GObject.__init__(self)
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/send-dialog.ui")
+ self.window = self.Builder.get_object("window")
+
+diff --git a/apps/blueman-services b/apps/blueman-services
+index 3e343ca..5e41261 100755
+--- a/apps/blueman-services
++++ b/apps/blueman-services
+@@ -7,6 +7,7 @@ from __future__ import unicode_literals
+
+ import os
+ import sys
++from locale import bind_textdomain_codeset
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+ if os.path.exists(os.path.join(_dirname, "CHANGELOG.md")):
+@@ -35,6 +36,7 @@ class BluemanServices:
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services.ui")
+
+ self.Config = Config("org.blueman.general")
+diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
+index 2919a69..3cb7057 100644
+--- a/blueman/gui/GsmSettings.py
++++ b/blueman/gui/GsmSettings.py
+@@ -3,6 +3,8 @@ from __future__ import division
+ from __future__ import absolute_import
+ from __future__ import unicode_literals
+
++from locale import bind_textdomain_codeset
++
+ from blueman.main.Config import Config
+ from blueman.Functions import *
+ from blueman.Constants import *
+@@ -20,6 +22,7 @@ class GsmSettings(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/gsm-settings.ui")
+
+ vbox = self.Builder.get_object("vbox1")
+diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
+index eb70b45..def7e48 100644
+--- a/blueman/gui/applet/PluginDialog.py
++++ b/blueman/gui/applet/PluginDialog.py
+@@ -3,6 +3,8 @@ from __future__ import division
+ from __future__ import absolute_import
+ from __future__ import unicode_literals
+
++from locale import bind_textdomain_codeset
++
+ import gi
+ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+@@ -105,6 +107,7 @@ class PluginDialog(Gtk.Dialog):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/applet-plugins-widget.ui")
+
+ self.set_title(_("Plugins"))
+diff --git a/blueman/gui/manager/ManagerDeviceMenu.py b/blueman/gui/manager/ManagerDeviceMenu.py
+index f0dea5a..031b456 100644
+--- a/blueman/gui/manager/ManagerDeviceMenu.py
++++ b/blueman/gui/manager/ManagerDeviceMenu.py
+@@ -3,6 +3,7 @@ from __future__ import division
+ from __future__ import absolute_import
+ from __future__ import unicode_literals
+
++from locale import bind_textdomain_codeset
+ from operator import itemgetter
+ from blueman.Sdp import uuid128_to_uuid16, SERIAL_PORT_SVCLASS_ID, OBEX_OBJPUSH_SVCLASS_ID, OBEX_FILETRANS_SVCLASS_ID
+ from blueman.Functions import *
+@@ -312,6 +313,7 @@ class ManagerDeviceMenu(Gtk.Menu):
+
+ builder = Gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH + "/rename-device.ui")
+ dialog = builder.get_object("dialog")
+ dialog.set_transient_for(self.Blueman.window)
+diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
+index f49946d..e930963 100644
+--- a/blueman/main/applet/BluezAgent.py
++++ b/blueman/main/applet/BluezAgent.py
+@@ -6,6 +6,7 @@ from __future__ import unicode_literals
+ import dbus
+ from dbus.mainloop.glib import DBusGMainLoop
+ import dbus.service
++from locale import bind_textdomain_codeset
+ from blueman.Functions import get_icon, dprint
+
+ import gi
+@@ -68,6 +69,7 @@ class BluezAgent(_GObjectAgent, Agent, GObject.GObject):
+ builder = Gtk.Builder()
+ builder.add_from_file(UI_PATH + "/applet-passkey.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ dialog = builder.get_object("dialog")
+
+ dialog.props.icon_name = "blueman"
+diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
+index 1f3ad04..a498f98 100644
+--- a/blueman/plugins/applet/NetUsage.py
++++ b/blueman/plugins/applet/NetUsage.py
+@@ -24,7 +24,7 @@ import dbus
+ import time
+ import datetime
+ import gettext
+-
++from locale import bind_textdomain_codeset
+
+ class MonitorBase(GObject.GObject):
+ __gsignals__ = {
+@@ -135,6 +135,7 @@ class Dialog:
+ builder = Gtk.Builder()
+ builder.add_from_file(UI_PATH + "/net-usage.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+
+ self.dialog = builder.get_object("dialog")
+ self.dialog.connect("response", self.on_response)
+diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
+index 59e1da3..f36691a 100644
+--- a/blueman/plugins/services/Network.py
++++ b/blueman/plugins/services/Network.py
+@@ -18,6 +18,7 @@ from blueman.main.Mechanism import Mechanism
+ from blueman.main.AppletService import AppletService
+ from blueman.gui.Dialogs import NetworkErrorDialog
+ from random import randint
++from locale import bind_textdomain_codeset
+
+
+ class Network(ServicePlugin):
+@@ -27,6 +28,7 @@ class Network(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services-network.ui")
+ self.widget = self.Builder.get_object("network")
+
+diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
+index 61b9db1..4474e93 100644
+--- a/blueman/plugins/services/Transfer.py
++++ b/blueman/plugins/services/Transfer.py
+@@ -3,6 +3,8 @@ from __future__ import division
+ from __future__ import absolute_import
+ from __future__ import unicode_literals
+
++from locale import bind_textdomain_codeset
++
+ import gi
+ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+@@ -21,6 +23,7 @@ class Transfer(ServicePlugin):
+
+ self.Builder = Gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH + "/services-transfer.ui")
+ self.widget = self.Builder.get_object("transfer")
+
+--
+2.5.0
+
diff --git a/net-wireless/blueman/metadata.xml b/net-wireless/blueman/metadata.xml
new file mode 100644
index 00000000000..555ea971ea8
--- /dev/null
+++ b/net-wireless/blueman/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dev-zero@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="appindicator">Enable usage of <pkg>dev-libs/libappindicator</pkg> to export menu options</flag>
+ <flag name="gconf">Enable the GConf configuration backend</flag>
+ <flag name="network">Add functionality to setup (host) PAN connections using either <pkg>net-dns/dnsmasq</pkg> or <pkg>net-misc/dhcp</pkg></flag>
+ <flag name="sendto">Install the sendto-plugin for <pkg>gnome-base/nautilus</pkg></flag>
+ <flag name="gnome">Install the sendto-plugin for <pkg>gnome-base/nautilus</pkg></flag>
+ <flag name="thunar">Install the sendto-plugin for <pkg>xfce-base/thunar</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-wireless/bluez-hcidump/Manifest b/net-wireless/bluez-hcidump/Manifest
new file mode 100644
index 00000000000..80907a48a87
--- /dev/null
+++ b/net-wireless/bluez-hcidump/Manifest
@@ -0,0 +1 @@
+DIST bluez-hcidump-2.5.tar.xz 157072 SHA256 c2caf88c48c8fdfa1057decd7a33ee5581625cac0f28dc3cfaa5f3de5985332b SHA512 20e05bba1ea53fa774311fb0c24263c8837818b598ea8519539d0792cad7888330feb5c717c327630d6f6985eb0813de99a30994c3ef108fa128b484487ea3f2 WHIRLPOOL 579e1d5b9f86fea1df147910891992813548b29eee7be4067165a77e5126130f74ee69d9104e3233baa7e86382bc558658423f8cf1eb4a8d582312a8041eb186
diff --git a/net-wireless/bluez-hcidump/bluez-hcidump-2.5.ebuild b/net-wireless/bluez-hcidump/bluez-hcidump-2.5.ebuild
new file mode 100644
index 00000000000..5b9662939dd
--- /dev/null
+++ b/net-wireless/bluez-hcidump/bluez-hcidump-2.5.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Bluetooth HCI packet analyzer"
+HOMEPAGE="http://www.bluez.org/"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86"
+IUSE=""
+
+RDEPEND=">=net-wireless/bluez-4.98"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/xz-utils"
diff --git a/net-wireless/bluez-hcidump/metadata.xml b/net-wireless/bluez-hcidump/metadata.xml
new file mode 100644
index 00000000000..8a0f59154c4
--- /dev/null
+++ b/net-wireless/bluez-hcidump/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>
+ <email>pacho@gentoo.org</email>
+ <name>Pacho Ramos</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
new file mode 100644
index 00000000000..08cbee844ad
--- /dev/null
+++ b/net-wireless/bluez/Manifest
@@ -0,0 +1,5 @@
+DIST bluez-4.101-patches.tar.xz 12380 SHA256 ea4b837245080ebe904fe4f338cd3c8c1370e197cdfbcd42bd55430c940b5e13 SHA512 0ef3219ed923a0880b2fe7008c36c185ff631a8fe1b357cc3612888817d9a7eaa6624bd31ed00a8bbbb6739528cb777a0b9900a7db4930482d1cbc38417b89aa WHIRLPOOL b89729b2cb1ecd6c816210682605b275af396af056e85d9a8671192ede0470002c1f61931781f27ad988ce8bc137f69a6725008a5ea9fe743ae41bc2f5edc7e8
+DIST bluez-4.101.tar.xz 887236 SHA256 41f9578bef39b8c94a2d6ddeaa556afd22d136936d0f03100e422fe970a45a7d SHA512 c8a88fa6948e43c81687047856806c9dc576d3223371947b496f228dec2b2614d1c5a8ff587e9f26eec44843a50503c55861f9fa736fdba43b2364f663f0cb0d WHIRLPOOL 0c4f163e4f4d0ba8f7928f5330ac3fd5f204c299346c59e73b64ebb331b0887a2b01e8ed6f4e6ae91f826a0431df4f97fe3a0900fa6013ae66fd755aaa136196
+DIST bluez-5.25.tar.xz 1479312 SHA256 5ca62f3f45e2638a0f7a81658d6c8813ee01487436ae8e53e9fe395e23d1fd30 SHA512 2e13c552e771a9066c3170dfca43cca8a16b3afa3580b90ff065301e3a85d35ac47b145f5aa4db42001c466675994e9115d5c1909b7abe76c381114b7f4d872a WHIRLPOOL 28dfe9e7a6eb9a1cb81001f7183a26b3a3cf8d6383b4c6d17e0b851eeb87497e23c8262a07564cb1cc0fcec128627503ff266d17c86c7ebd8906b9c714dc5df1
+DIST bluez-5.32.tar.xz 1634844 SHA256 fe4f35e701cbec04478818adf014ed9bbd1f7d11e2603370f1b70a78106f57f7 SHA512 718d0e1132123b67acaf0cf91aaf0add1e56b5b79fbb3cc4a72299c6ae00bfab6e0096463969b6bc27fdbeb18d4b62823d59356f6ff661b0bbe2df8205775f28 WHIRLPOOL 9e45d2bc4f65f15a9f2fe01edb90411918d2787b1008859a08894a4330170901ecd02aa0d8c5ab8d0866c316272c4605b8ecb40a0d91596a059dbb16b34ed26d
+DIST bluez-5.33.tar.xz 1636808 SHA256 1801807a13506678cbfeb15c6a4b89ecb5739efe1067eb464da6641d731436d3 SHA512 6b91b7d232c2654985b4777162e14a750b2840ec8bea7f913fc22bb63c5b767f6e8a7c39645cc7d583f17c993bd772f836bf0ab491eb5c75950c08dd9291a3da WHIRLPOOL cf176fabc4689c6e0233005a95731977e177eefb84c1652cbb0ca70a6a484366c7f4c95f3086652a8e3f6ccc023f741cbf930844265cf7090685863dc38fc105
diff --git a/net-wireless/bluez/bluez-4.101-r9.ebuild b/net-wireless/bluez/bluez-4.101-r9.ebuild
new file mode 100644
index 00000000000..c0291711a18
--- /dev/null
+++ b/net-wireless/bluez/bluez-4.101-r9.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils multilib python-single-r1 readme.gentoo \
+ systemd user multilib-minimal
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="http://www.bluez.org/"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz
+ http://dev.gentoo.org/~pacho/bluez/${P}-patches.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 x86"
+IUSE="alsa cups debug gstreamer hid2hci pcmcia readline selinux test-programs usb"
+
+REQUIRED_USE="test-programs? ( ${PYTHON_REQUIRED_USE} )"
+
+# TODO: revisit USE=gstreamer once gstreamer is ported to multilib
+
+CDEPEND="
+ >=dev-libs/glib-2.28:2
+ >=sys-apps/dbus-1.6:=
+ >=sys-apps/hwids-20121202.2
+ >=virtual/udev-171
+ alsa? (
+ >=media-libs/alsa-lib-1.0.27.2:=[${MULTILIB_USEDEP},alsa_pcm_plugins_extplug(+),alsa_pcm_plugins_ioplug(+)]
+ media-libs/libsndfile:=
+ )
+ cups? ( net-print/cups:= )
+ gstreamer? (
+ >=media-libs/gstreamer-0.10:0.10
+ >=media-libs/gst-plugins-base-0.10:0.10
+ )
+ readline? ( sys-libs/readline:= )
+ selinux? ( sec-policy/selinux-bluetooth )
+ usb? ( virtual/libusb:0 )
+"
+DEPEND="${CDEPEND}
+ sys-devel/flex
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test-programs? ( >=dev-libs/check-0.9.6 )
+"
+RDEPEND="${CDEPEND}
+ test-programs? (
+ >=dev-python/dbus-python-1
+ dev-python/pygobject:2
+ dev-python/pygobject:3
+ ${PYTHON_DEPS}
+ )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )
+"
+
+DOCS=( AUTHORS ChangeLog README )
+
+DOC_CONTENTS="
+ If you want to use rfcomm as a normal user, you need to add the user
+ to the uucp group.
+"
+
+pkg_setup() {
+ enewgroup plugdev
+ use test-programs && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Fedora patches
+ epatch "${WORKDIR}/${P}-patches"/*.patch
+
+ # Use static group "plugdev" if there is no ConsoleKit (or systemd logind)
+ epatch "${FILESDIR}"/bluez-plugdev.patch
+
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+
+ eautoreconf
+
+ if use cups; then
+ sed -i \
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \
+ Makefile.{in,tools} || die
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=(
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
+ )
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # deps not used for the library
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' '
+ )
+ fi
+
+ # Missing flags: --enable-{sap,hidd,pand,dund,dbusoob,gatt}
+ # Keep this in ./configure --help order!
+ econf \
+ --localstatedir=/var \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-service \
+ --enable-health \
+ --enable-pnat \
+ $(multilib_native_use_enable gstreamer) \
+ $(use_enable alsa) \
+ $(multilib_native_use_enable usb) \
+ $(multilib_native_use_enable usb cable) \
+ --enable-tools \
+ --enable-bccmd \
+ $(use_enable pcmcia) \
+ $(multilib_native_use_enable hid2hci) \
+ --enable-dfutool \
+ $(multilib_native_use_enable cups) \
+ $(multilib_native_use_enable test-programs test) \
+ --enable-datafiles \
+ $(use_enable debug) \
+ --enable-maemo6 \
+ --enable-wiimote \
+ --disable-hal \
+ --with-ouifile=/usr/share/misc/oui.txt \
+ --with-systemdunitdir="$(systemd_get_unitdir)"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -f Makefile -f - libs \
+ <<<'libs: $(lib_LTLIBRARIES) $(alsa_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+ else
+ emake DESTDIR="${D}" \
+ install-includeHEADERS \
+ install-libLTLIBRARIES \
+ install-alsaLTLIBRARIES \
+ install-pkgconfigDATA
+ fi
+
+ if multilib_is_native_abi && use test-programs; then
+ pushd test >/dev/null
+ dobin simple-agent simple-service monitor-bluetooth
+ newbin list-devices list-bluetooth-devices
+ rm test-textfile.{c,o} || die #356529
+ local b
+ for b in hsmicro hsplay test-*; do
+ newbin "${b}" bluez-"${b}"
+ done
+ insinto /usr/share/doc/${PF}/test-services
+ doins service-*
+ python_fix_shebang "${ED}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_install_all() {
+ insinto /etc/bluetooth
+ local d
+ for d in input audio network serial; do
+ doins ${d}/${d}.conf
+ done
+
+ newinitd "${FILESDIR}"/bluetooth-init.d-r2 bluetooth
+ newinitd "${FILESDIR}"/rfcomm-init.d rfcomm
+ newconfd "${FILESDIR}"/rfcomm-conf.d rfcomm
+
+ readme.gentoo_create_doc
+
+ prune_libtool_files --modules
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ udevadm control --reload-rules
+
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp."
+
+ if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then
+ elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will only"
+ elog "be able to run bluetooth clients as root. If you want to be able to run bluetooth clientes as"
+ elog "a regular user, you need to enable the consolekit use flag for this package or"
+ elog "to add the user to the plugdev group."
+ fi
+}
diff --git a/net-wireless/bluez/bluez-5.25.ebuild b/net-wireless/bluez/bluez-5.25.ebuild
new file mode 100644
index 00000000000..c5568b301db
--- /dev/null
+++ b/net-wireless/bluez/bluez-5.25.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils multilib python-any-r1 readme.gentoo systemd udev user multilib-minimal
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="http://www.bluez.org"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/3"
+KEYWORDS="amd64 arm hppa ppc ppc64 x86"
+IUSE="cups debug +obex +readline selinux systemd test +udev"
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="
+ >=dev-libs/glib-2.28:2
+ >=sys-apps/dbus-1.6:=
+ >=sys-apps/hwids-20121202.2
+ cups? ( net-print/cups:= )
+ obex? ( dev-libs/libical )
+ readline? ( sys-libs/readline:= )
+ systemd? ( sys-apps/systemd )
+ udev? ( >=virtual/udev-172 )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ test? (
+ ${PYTHON_DEPS}
+ >=dev-python/dbus-python-1
+ dev-python/pygobject:2
+ dev-python/pygobject:3
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bluetooth )
+"
+DOC_CONTENTS="
+ If you want to use rfcomm as a normal user, you need to add the user
+ to the uucp group.
+"
+
+pkg_setup() {
+ enewgroup plugdev
+ use test && python-any-r1_pkg_setup
+
+ if ! use udev; then
+ ewarn
+ ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
+ ewarn "and hid2hci will not be available."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ # Use static group "plugdev" if there is no ConsoleKit (or systemd logind)
+ epatch "${FILESDIR}"/bluez-plugdev.patch
+
+ # Fedora patches
+ # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
+ epatch "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
+ epatch "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg41264.html
+ epatch "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch
+
+ # ???
+ epatch "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch
+
+ # Ubuntu workaround for bug #501120
+ epatch "${FILESDIR}"/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
+
+ if use cups; then
+ sed -i \
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
+ Makefile.{in,tools} || die
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # readline is automagic when client is enabled
+ # --enable-client always needs readline, bug #504038
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
+ )
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # deps not used for the library
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' '
+ )
+ fi
+
+ econf \
+ --localstatedir=/var \
+ --disable-android \
+ --enable-datafiles \
+ --enable-experimental \
+ --enable-optimization \
+ $(use_enable debug) \
+ --enable-pie \
+ --enable-threads \
+ --enable-library \
+ $(multilib_native_use_enable test) \
+ --enable-tools \
+ --enable-manpages \
+ --enable-monitor \
+ $(multilib_native_use_enable cups) \
+ $(multilib_native_use_enable obex) \
+ $(multilib_native_use_enable readline client) \
+ $(multilib_native_use_enable systemd) \
+ $(systemd_with_unitdir) \
+ $(multilib_native_use_enable udev) \
+ $(multilib_native_use_enable udev sixaxis)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -f Makefile -f - libs \
+ <<<'libs: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+
+ # Upstream don't install this, bug #524640
+ # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
+ # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
+ # gatttool is only built with readline, bug #530776
+ use readline && dobin attrib/gatttool
+ dobin tools/hex2hcd
+
+ # Unittests are not that useful once installed
+ if use test ; then
+ rm -r "${ED}"/usr/$(get_libdir)/bluez/test || die
+ fi
+ else
+ emake DESTDIR="${D}" \
+ install-includeHEADERS \
+ install-libLTLIBRARIES \
+ install-pkgconfigDATA
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+
+ keepdir /var/lib/bluetooth
+
+ # Upstream don't want people to play with them
+ # But we keep installing them due 'historical' reasons
+ insinto /etc/bluetooth
+ local d
+ for d in input network proximity; do
+ doins profiles/${d}/${d}.conf
+ done
+ doins src/main.conf
+ doins src/bluetooth.conf
+
+# FIXME:
+# Looks like upstream installs it only for systemd, probably not needed
+# insinto /usr/share/dbus-1/system-services
+# doins src/org.bluez.service
+
+ newinitd "${FILESDIR}"/bluetooth-init.d-r3 bluetooth
+ newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm
+
+ einstalldocs
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ use udev && udev_reload
+
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp."
+
+ if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then
+ elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will only"
+ elog "be able to run bluetooth clients as root. If you want to be able to run bluetooth clients as"
+ elog "a regular user, you need to add the user to the plugdev group."
+ fi
+}
diff --git a/net-wireless/bluez/bluez-5.32.ebuild b/net-wireless/bluez/bluez-5.32.ebuild
new file mode 100644
index 00000000000..a82c3c07090
--- /dev/null
+++ b/net-wireless/bluez/bluez-5.32.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils multilib python-any-r1 readme.gentoo systemd udev user multilib-minimal
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="http://www.bluez.org"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="cups debug +obex +readline selinux systemd test +udev"
+
+CDEPEND="
+ >=dev-libs/glib-2.28:2
+ >=sys-apps/dbus-1.6:=
+ >=sys-apps/hwids-20121202.2
+ cups? ( net-print/cups:= )
+ obex? ( dev-libs/libical:= )
+ readline? ( sys-libs/readline:= )
+ systemd? ( sys-apps/systemd )
+ udev? ( >=virtual/udev-172 )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )
+"
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep '
+ >=dev-python/dbus-python-1[${PYTHON_USEDEP}]
+ || (
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ )
+ ')
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bluetooth )
+"
+DOC_CONTENTS="
+ If you want to use rfcomm as a normal user, you need to add the user
+ to the uucp group.
+"
+
+pkg_setup() {
+ enewgroup plugdev
+ use test && python-any-r1_pkg_setup
+
+ if ! use udev; then
+ ewarn
+ ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
+ ewarn "and hid2hci will not be available."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ # Use static group "plugdev" if there is no ConsoleKit (or systemd logind)
+ epatch "${FILESDIR}"/bluez-plugdev.patch
+
+ # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
+ # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
+ epatch "${FILESDIR}"/bluez-udevadm-path.patch
+
+ # Fedora patches
+ # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
+ epatch "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
+ epatch "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg41264.html
+ epatch "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch
+
+ # ???
+ epatch "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch
+
+ # Ubuntu workaround for bug #501120
+ epatch "${FILESDIR}"/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
+
+ if use cups; then
+ sed -i \
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
+ Makefile.{in,tools} || die
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # readline is automagic when client is enabled
+ # --enable-client always needs readline, bug #504038
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
+ )
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # deps not used for the library
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' '
+ )
+ fi
+
+ econf \
+ --localstatedir=/var \
+ --disable-android \
+ --enable-datafiles \
+ --enable-experimental \
+ --enable-optimization \
+ $(use_enable debug) \
+ --enable-pie \
+ --enable-threads \
+ --enable-library \
+ $(multilib_native_use_enable test) \
+ --enable-tools \
+ --enable-manpages \
+ --enable-monitor \
+ $(multilib_native_use_enable cups) \
+ $(multilib_native_use_enable obex) \
+ $(multilib_native_use_enable readline client) \
+ $(multilib_native_use_enable systemd) \
+ $(systemd_with_unitdir) \
+ $(multilib_native_use_enable udev) \
+ $(multilib_native_use_enable udev sixaxis)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -f Makefile -f - libs \
+ <<<'libs: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+
+ # Upstream doesn't install this, bug #524640
+ # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
+ # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
+ # gatttool is only built with readline, bug #530776
+ use readline && dobin attrib/gatttool
+ dobin tools/hex2hcd
+
+ # Unittests are not that useful once installed
+ if use test ; then
+ rm -r "${ED}"/usr/$(get_libdir)/bluez/test || die
+ fi
+ else
+ emake DESTDIR="${D}" \
+ install-includeHEADERS \
+ install-libLTLIBRARIES \
+ install-pkgconfigDATA
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+
+ keepdir /var/lib/bluetooth
+
+ # Upstream don't want people to play with them
+ # But we keep installing them due to 'historical' reasons
+ insinto /etc/bluetooth
+ local d
+ for d in input network proximity; do
+ doins profiles/${d}/${d}.conf
+ done
+ doins src/main.conf
+ doins src/bluetooth.conf
+
+ newinitd "${FILESDIR}"/bluetooth-init.d-r3 bluetooth
+ newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm
+
+ einstalldocs
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ use udev && udev_reload
+
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp."
+
+ if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then
+ elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will"
+ elog "need to add the user to the plugdev group."
+ fi
+}
diff --git a/net-wireless/bluez/bluez-5.33.ebuild b/net-wireless/bluez/bluez-5.33.ebuild
new file mode 100644
index 00000000000..a82c3c07090
--- /dev/null
+++ b/net-wireless/bluez/bluez-5.33.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils multilib python-any-r1 readme.gentoo systemd udev user multilib-minimal
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="http://www.bluez.org"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="cups debug +obex +readline selinux systemd test +udev"
+
+CDEPEND="
+ >=dev-libs/glib-2.28:2
+ >=sys-apps/dbus-1.6:=
+ >=sys-apps/hwids-20121202.2
+ cups? ( net-print/cups:= )
+ obex? ( dev-libs/libical:= )
+ readline? ( sys-libs/readline:= )
+ systemd? ( sys-apps/systemd )
+ udev? ( >=virtual/udev-172 )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )
+"
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ test? (
+ $(python_gen_any_dep '
+ >=dev-python/dbus-python-1[${PYTHON_USEDEP}]
+ || (
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ )
+ ')
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bluetooth )
+"
+DOC_CONTENTS="
+ If you want to use rfcomm as a normal user, you need to add the user
+ to the uucp group.
+"
+
+pkg_setup() {
+ enewgroup plugdev
+ use test && python-any-r1_pkg_setup
+
+ if ! use udev; then
+ ewarn
+ ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
+ ewarn "and hid2hci will not be available."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ # Use static group "plugdev" if there is no ConsoleKit (or systemd logind)
+ epatch "${FILESDIR}"/bluez-plugdev.patch
+
+ # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
+ # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
+ epatch "${FILESDIR}"/bluez-udevadm-path.patch
+
+ # Fedora patches
+ # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
+ epatch "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
+ epatch "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+
+ # http://www.spinics.net/lists/linux-bluetooth/msg41264.html
+ epatch "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch
+
+ # ???
+ epatch "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch
+
+ # Ubuntu workaround for bug #501120
+ epatch "${FILESDIR}"/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
+
+ if use cups; then
+ sed -i \
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
+ Makefile.{in,tools} || die
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # readline is automagic when client is enabled
+ # --enable-client always needs readline, bug #504038
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
+ )
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # deps not used for the library
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' '
+ )
+ fi
+
+ econf \
+ --localstatedir=/var \
+ --disable-android \
+ --enable-datafiles \
+ --enable-experimental \
+ --enable-optimization \
+ $(use_enable debug) \
+ --enable-pie \
+ --enable-threads \
+ --enable-library \
+ $(multilib_native_use_enable test) \
+ --enable-tools \
+ --enable-manpages \
+ --enable-monitor \
+ $(multilib_native_use_enable cups) \
+ $(multilib_native_use_enable obex) \
+ $(multilib_native_use_enable readline client) \
+ $(multilib_native_use_enable systemd) \
+ $(systemd_with_unitdir) \
+ $(multilib_native_use_enable udev) \
+ $(multilib_native_use_enable udev sixaxis)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -f Makefile -f - libs \
+ <<<'libs: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+
+ # Upstream doesn't install this, bug #524640
+ # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
+ # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
+ # gatttool is only built with readline, bug #530776
+ use readline && dobin attrib/gatttool
+ dobin tools/hex2hcd
+
+ # Unittests are not that useful once installed
+ if use test ; then
+ rm -r "${ED}"/usr/$(get_libdir)/bluez/test || die
+ fi
+ else
+ emake DESTDIR="${D}" \
+ install-includeHEADERS \
+ install-libLTLIBRARIES \
+ install-pkgconfigDATA
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+
+ keepdir /var/lib/bluetooth
+
+ # Upstream don't want people to play with them
+ # But we keep installing them due to 'historical' reasons
+ insinto /etc/bluetooth
+ local d
+ for d in input network proximity; do
+ doins profiles/${d}/${d}.conf
+ done
+ doins src/main.conf
+ doins src/bluetooth.conf
+
+ newinitd "${FILESDIR}"/bluetooth-init.d-r3 bluetooth
+ newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm
+
+ einstalldocs
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ use udev && udev_reload
+
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp."
+
+ if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then
+ elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will"
+ elog "need to add the user to the plugdev group."
+ fi
+}
diff --git a/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
new file mode 100644
index 00000000000..1ea3e6f3e0c
--- /dev/null
+++ b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
@@ -0,0 +1,58 @@
+From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
+Date: Sat, 12 Oct 2013 17:45:25 +0200
+Subject: [PATCH] Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+---
+ Makefile.obexd | 4 ++--
+ obexd/src/org.bluez.obex.service | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+diff --git a/Makefile.obexd b/Makefile.obexd
+index 3760867..142e7c3 100644
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -2,12 +2,12 @@
+ if SYSTEMD
+ systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+
+ dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+
+ obex_plugindir = $(libdir)/obex/plugins
+
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
+deleted file mode 100644
+index a538088..0000000
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
+new file mode 100644
+index 0000000..9c815f2
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/obexd
++SystemdService=dbus-org.bluez.obex.service
+--
+1.8.3.1
+
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
new file mode 100644
index 00000000000..004a3895aa0
--- /dev/null
+++ b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
@@ -0,0 +1,38 @@
+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/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch b/net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
new file mode 100644
index 00000000000..55d5af654a9
--- /dev/null
+++ b/net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
@@ -0,0 +1,29 @@
+From aa73bf5039dfd2cf0a52dd6fd22501d955cc1a00 Mon Sep 17 00:00:00 2001
+From: Tommy <mesilliac@gmail.com>
+Date: Thu, 10 Jan 2013 09:18:43 +0100
+Subject: [PATCH] work around Logitech diNovo Edge keyboard firmware issue
+
+https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/269851
+---
+ tools/hid2hci.rules | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/tools/hid2hci.rules b/tools/hid2hci.rules
+index db6bb03..7db4572 100644
+--- a/tools/hid2hci.rules
++++ b/tools/hid2hci.rules
+@@ -11,7 +11,10 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt
+ RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1"
+
+ # Logitech devices
+-KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
++KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[5e]", \
++ RUN+="hid2hci --method=logitech-hid --devpath=%p"
++# Logitech, Inc. RAW communicating devices
++KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[34abc]|c71[34bc]", \
+ RUN+="hid2hci --method=logitech-hid --devpath=%p"
+
+ ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end"
+--
+1.8.0.1
+
diff --git a/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch b/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch
new file mode 100644
index 00000000000..68751ae7b60
--- /dev/null
+++ b/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch
@@ -0,0 +1,47 @@
+From c16ae7041c7511d8d1ed8441f696716fa6a9117e Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 19 Nov 2013 14:11:39 +0100
+Subject: [PATCH 2/5] autopair: Don't handle the iCade
+
+We can't easily enter digits other than 1 through 4 (inclusive)
+so leave it up to the agent to figure out a good passcode
+for the iCade.
+
+Note that we can not use the VID/PID of the device, as it is not
+yet known at that point.
+---
+ plugins/autopair.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/autopair.c b/plugins/autopair.c
+index 8c98c12..5d2f6f7 100644
+--- a/plugins/autopair.c
++++ b/plugins/autopair.c
+@@ -57,13 +57,23 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
+ {
+ char addr[18];
+ char pinstr[7];
++ char name[25];
+ uint32_t class;
+
+ ba2str(device_get_address(device), addr);
+
+ class = btd_device_get_class(device);
+
+- DBG("device %s 0x%x", addr, class);
++ device_get_name(device, name, sizeof(name));
++ name[sizeof(name) - 1] = 0;
++
++ DBG("device %s (%s) 0x%x", addr, name, class);
++
++ g_message ("vendor 0x%X product: 0x%X", btd_device_get_vendor (device), btd_device_get_product (device));
++
++ /* The iCade shouldn't use random PINs like normal keyboards */
++ if (name != NULL && strstr(name, "iCade") != NULL)
++ return 0;
+
+ /* This is a class-based pincode guesser. Ignore devices with an
+ * unknown class.
+--
+1.8.4.2
+
diff --git a/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch b/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch
new file mode 100644
index 00000000000..2746e0cdd2c
--- /dev/null
+++ b/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch
@@ -0,0 +1,25 @@
+From 67e5477687a2753d3f7b300bcfdc74464d8ad41f Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Mon, 9 Dec 2013 18:04:56 +0100
+Subject: [PATCH 4/5] agent: Assert possible infinite loop
+
+---
+ src/agent.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/agent.c b/src/agent.c
+index bcba969..b292881 100644
+--- a/src/agent.c
++++ b/src/agent.c
+@@ -203,6 +203,8 @@ void agent_unref(struct agent *agent)
+ if (agent->ref > 0)
+ return;
+
++ g_assert (agent->ref == 0);
++
+ if (agent->request) {
+ DBusError err;
+ agent_pincode_cb pincode_cb;
+--
+1.8.4.2
+
diff --git a/net-wireless/bluez/files/bluetooth-init.d-r2 b/net-wireless/bluez/files/bluetooth-init.d-r2
new file mode 100644
index 00000000000..7975cb558d0
--- /dev/null
+++ b/net-wireless/bluez/files/bluetooth-init.d-r2
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ after coldplug
+ need dbus localmount hostname
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/bluetoothd
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/bluetoothd
+ eend $?
+}
diff --git a/net-wireless/bluez/files/bluetooth-init.d-r3 b/net-wireless/bluez/files/bluetooth-init.d-r3
new file mode 100644
index 00000000000..3b9569ee737
--- /dev/null
+++ b/net-wireless/bluez/files/bluetooth-init.d-r3
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ after coldplug
+ need dbus localmount hostname
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --background --exec /usr/libexec/bluetooth/bluetoothd
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/libexec/bluetooth/bluetoothd
+ eend $?
+}
diff --git a/net-wireless/bluez/files/bluez-plugdev.patch b/net-wireless/bluez/files/bluez-plugdev.patch
new file mode 100755
index 00000000000..726838a5132
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-plugdev.patch
@@ -0,0 +1,14 @@
+diff -Nurp bluez-4.39.orig/src/bluetooth.conf bluez-4.39/src/bluetooth.conf
+--- bluez-4.39.orig/src/bluetooth.conf 2008-12-20 20:18:10.000000000 +0100
++++ bluez-4.39/src/bluetooth.conf 2009-09-05 13:30:34.411581498 +0200
+@@ -17,6 +17,10 @@
+ <allow send_destination="org.bluez"/>
+ </policy>
+
++ <policy group="plugdev">
++ <allow send_destination="org.bluez"/>
++ </policy>
++
+ <policy context="default">
+ <deny send_destination="org.bluez"/>
+ </policy>
diff --git a/net-wireless/bluez/files/bluez-udevadm-path.patch b/net-wireless/bluez/files/bluez-udevadm-path.patch
new file mode 100644
index 00000000000..a29193ebb19
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-udevadm-path.patch
@@ -0,0 +1,10 @@
+--- tools/hid2hci.rules~ 2012-12-24 18:46:55.000000000 +0100
++++ tools/hid2hci.rules 2015-04-04 13:13:29.360300000 +0200
+@@ -20,6 +20,7 @@
+ # Unfortunately the only event seen is the BT device disappearing, so the mouse
+ # device needs to be chased down on the USB bus.
+ ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \
++ ENV{REMOVE_CMD}="/usr/bin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" \
+ ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1"
+
+ # CSR devices
diff --git a/net-wireless/bluez/files/rfcomm-conf.d b/net-wireless/bluez/files/rfcomm-conf.d
new file mode 100644
index 00000000000..d87acdb282e
--- /dev/null
+++ b/net-wireless/bluez/files/rfcomm-conf.d
@@ -0,0 +1,5 @@
+# Bind rfcomm devices (allowed values are "true" and "false")
+RFCOMM_ENABLE=true
+
+# Config file for rfcomm
+RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
diff --git a/net-wireless/bluez/files/rfcomm-init.d b/net-wireless/bluez/files/rfcomm-init.d
new file mode 100644
index 00000000000..f2f737824cf
--- /dev/null
+++ b/net-wireless/bluez/files/rfcomm-init.d
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ after coldplug
+ need dbus localmount hostname
+}
+
+start() {
+ if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then
+ if [ -f "${RFCOMM_CONFIG}" ]; then
+ ebegin "Starting rfcomm"
+ /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all
+ eend $?
+ else
+ ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists"
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Shutting down rfcomm"
+ /usr/bin/rfcomm release all
+ eend $?
+}
diff --git a/net-wireless/bluez/files/rfcomm-init.d-r2 b/net-wireless/bluez/files/rfcomm-init.d-r2
new file mode 100755
index 00000000000..4a91916919c
--- /dev/null
+++ b/net-wireless/bluez/files/rfcomm-init.d-r2
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need bluetooth
+}
+
+checkconfig() {
+ if [ -z "${ADDRESS}" ]; then
+ eerror "ADDRESS must be set"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ local DEVICE=${RC_SVCNAME#*.}
+
+ checkconfig || return 1
+
+ ebegin "Starting ${RC_SVCNAME}"
+ rfcomm bind "${DEVICE}" "${ADDRESS}" ${CHANNEL}
+ eend $?
+}
+
+stop() {
+ local DEVICE=${RC_SVCNAME#*.}
+
+ ebegin "Shutting down ${RC_SVCNAME}"
+ rfcomm release "${DEVICE}"
+ eend $?
+}
diff --git a/net-wireless/bluez/metadata.xml b/net-wireless/bluez/metadata.xml
new file mode 100644
index 00000000000..de19c8b5539
--- /dev/null
+++ b/net-wireless/bluez/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pacho@gentoo.org</email>
+ <name>Pacho Ramos</name>
+ </maintainer>
+ <use>
+ <flag name="test-programs">Install tools for testing of
+ various Bluetooth functions</flag>
+ <flag name="hid2hci">The HID proxying makes the keyboard / mouse show up
+ as regular USB HID devices, but needs them to be
+ paired before enabling this, otherwise they won't be
+ detected</flag>
+ <flag name="obex">Enable OBEX transfer support.</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:bluez:bluez</remote-id>
+ <remote-id type="cpe">cpe:/a:bluez:bluez-libs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest
new file mode 100644
index 00000000000..97adc135c59
--- /dev/null
+++ b/net-wireless/broadcom-sta/Manifest
@@ -0,0 +1,7 @@
+DIST README-broadcom-sta-6.30.223.248.txt 16775 SHA256 e25eaa7e666a361abff679d7518c75200ee4d90f8e5cb16f69af3f033c68811a SHA512 e635629f0a75059fa13b2bd2a756397631bc0add43786b0064d3f0232c9bd42dae394b9631846bf602f6cea628a49928ec2344df453ec5075168736627494020 WHIRLPOOL 4b0923b276bca6c3a0f8b37c903e3cd1b3f9ea37b07ffe308b831e505c691f4b77489abd491cd2c7334fe692846fe797c7d4b0ac63e8786f4190f5c2791e6b46
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_amd64.deb 1779122 SHA256 de6529ae67f339aee185be93e3c12ffa944ef6b4807d176d6fda661de52136ba SHA512 93b17029538ec17be61902f1e5237a300f532dc88fd7475ac202c249a9cec099c5d170b0ebc043e1bda1987f6f925b6a28d4aa80748218f735a3790ded0565cd WHIRLPOOL 47f54a2fc286e58adef1383496fe3e65430ef643d8e7b8830cb87c0558319780f71944296211c62ccccaa4e3a216019fc5a29dd48903240362c656bb79ae55c2
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_i386.deb 1732452 SHA256 d689040ac2ef67b9947f892b52764cd94c2090499747b57d63c2b40c7bc8eabb SHA512 323db5e6c8fc702990d7137bd11d2e8bba7ed073ee8da00125d147872edf90dd051a959198dbdaf92808403cdcfd582f17afb8a6f5e741382d3a0cffd6ce130a WHIRLPOOL db24f078e2639f609021028304e7caf48b9a3737b6fdf4b2522ab74606c6cb0b11a94706978b1fd1acdf66c59e351a4a433cf9e500862931a1e9dce6e5562c01
+DIST hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz 1735911 SHA256 d57c33f6bf4ebe68cac67ffe39c2260b8990bb0f07413dfd021dd4db845199a7 SHA512 adb3d9d9375888df3317d6af3d6d45c53412a677e5431051cbfe8c9eac3b13760022fd9b970e77caaeb0fa010ee8bd32ad80076d7279b60719bfb8562c09951f WHIRLPOOL f037e26d7f85d9a1bf3f2638fa6d6bbda43384e24fb249e90afcfff792be8013f1e0f2a1876c4675e39911d4e4877f0ab785eab15f7a6460621fe14c21bab486
+DIST hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz 2824762 SHA256 b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad SHA512 9f067cf5e1be562c78252791c0b2324b568c8533903842e18e92f2b10c3277e1d15ed42a5925acbd443de373f5113d05447b885a8d52ef57695babe48d68a0ff WHIRLPOOL f3bfef5b3dcbf6d051facbda0078a9850a1cf2f851bca07fd7538ffc3d5c0bf118622d217bb7737fdd87825af73b61ddd2d9a52c3d13a8070be02d1a584a8b14
+DIST hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz 1786627 SHA256 5f37b2b879e29b220dc64ce2e93d922dc231d4241da03bcbab15ced10e649b4a SHA512 a83defe4553f680b984bf49788377436c5f563f2920c129d87a3930fb6501d0f833d353acf229fa4f67b761e4564428c62bc1c8e3e23c0727d01b8c4f797f6af WHIRLPOOL d1ddc19e29a6927ae0f172613d429a92d5009515b4db1bc188b0ced41ff39565512d4f85721bcf4ddd0a951afadfd7bc303219ed93a20f83e1936a9c82717e47
+DIST hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz 2875739 SHA256 3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022 SHA512 ce1e9f7f52cd98eaba5cf4ec0c7276bddf3ad906a0111eb236665daca72f36139ca4a8af72658cf91b0eaaa8479e54f5bb3bce77a0cc9bc1966f044b76b8295a WHIRLPOOL 6393507f340f4244d8e40c81102e37f9df0d5dbc0ce4e0fd3ed187ddde6faf3be9bfae59371eb307d031974b5b6d1417c7c11fbdd51b9f3b168ccd83d48276d9
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild
new file mode 100644
index 00000000000..099e4ae716b
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )"
+
+LICENSE="Broadcom"
+KEYWORDS="~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+# Makefile.patch: keep `emake install` working
+# linux-3.9.0.patch: add support for kernel 3.9.0
+# linux-3.10.0.patch: add support for kernel 3.10, bug #477372
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild
new file mode 100644
index 00000000000..2962110678b
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-license.patch" \
+ "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-recent.patch" \
+ "${FILESDIR}/${P}-eth-to-wlan.patch" \
+ "${FILESDIR}/${P}-gcc.patch" \
+ "${FILESDIR}/${P}-linux-3.15.patch"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild
new file mode 100644
index 00000000000..65dcb1c8fee
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+# Makefile.patch: keep `emake install` working
+# linux-3.9.0.patch: add support for kernel 3.9.0
+# linux-3.10.0.patch: add support for kernel 3.10, bug #477372
+ epatch "${FILESDIR}/${P}-license.patch"
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ epatch "${FILESDIR}/${P}-linux-recent.patch"
+ epatch "${FILESDIR}/${P}-eth-to-wlan.patch"
+ epatch "${FILESDIR}/${P}-gcc.patch"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild
new file mode 100644
index 00000000000..adf6ca55897
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${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.141-linux-3.15.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild
new file mode 100644
index 00000000000..e91828dcf87
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${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.141-linux-3.15.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-linux-3.17.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-linux-3.18.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild
new file mode 100644
index 00000000000..5a647f1950d
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info linux-mod
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php"
+SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+ amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${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.248-r3-linux-3.15-3.18.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-r3-linux-4.0.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
new file mode 100644
index 00000000000..e5cdaf839f0
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils linux-info linux-mod unpacker
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="https://launchpad.net/ubuntu/+source/bcmwl http://www.broadcom.com/support/802.11/linux_sta.php"
+BASE_URI="https://launchpad.net/~albertomilone/+archive/broadcom/+files"
+BASE_NAME="bcmwl-kernel-source_${PV}%2Bbdcom-0ubuntu1%7Eppa1_"
+SRC_URI="amd64? ( ${BASE_URI}/${BASE_NAME}amd64.deb )
+ x86? ( ${BASE_URI}/${BASE_NAME}i386.deb )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+#S="${WORKDIR}"
+S="${WORKDIR}/usr/src/bcmwl-${PV}+bdcom"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_unpack() {
+ local arch_suffix
+ if use amd64; then
+ arch_suffix="amd64"
+ else
+ arch_suffix="i386"
+ fi
+ unpack_deb "${BASE_NAME}${arch_suffix}.deb"
+}
+
+src_prepare() {
+# Filter the outdated patches here
+ EPATCH_FORCE="yes" EPATCH_EXCLUDE="0002* 0004* 0005*" EPATCH_SOURCE="${S}/patches" EPATCH_SUFFIX=patch epatch
+# Makefile.patch: keep `emake install` working
+# linux-3.9.0.patch: add support for kernel 3.9.0
+# linux-3.10.0.patch: add support for kernel 3.10, bug #477372
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.9.0.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+ mv "${S}/lib/wlc_hybrid.o_shipped_"* "${S}/lib/wlc_hybrid.o_shipped" \
+ || die "Where is the blob?"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch
new file mode 100644
index 00000000000..b320d977e8b
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch
@@ -0,0 +1,12 @@
+diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c
+--- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900
++++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900
+@@ -163,6 +163,8 @@
+ static void wl_free_if(wl_info_t *wl, wl_if_t *wlif);
+ static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info);
+
++MODULE_LICENSE("MIXED/Proprietary");
++
+ static struct pci_device_id wl_id_table[] = {
+ { PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch
new file mode 100644
index 00000000000..a915aee67fe
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch
@@ -0,0 +1,21 @@
+diff -Naur broadcom-sta-5.100.82.111.orig/Makefile broadcom-sta-5.100.82.111/Makefile
+--- broadcom-sta-5.100.82.111.orig/Makefile 2011-10-06 08:16:10.000000000 +0900
++++ broadcom-sta-5.100.82.111/Makefile 2011-10-24 08:54:26.000000000 +0900
+@@ -16,7 +16,7 @@
+ ifneq ($(KERNELRELEASE),)
+
+ LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
+- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
++ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
+ echo TRUE; \
+ else \
+ echo FALSE; \
+@@ -24,7 +24,7 @@
+ ))
+
+ LINUXVER_WEXT_ONLY:=$(strip $(shell \
+- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
++ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
+ echo FALSE; \
+ else \
+ echo TRUE; \
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch
new file mode 100644
index 00000000000..633b9c858d6
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch
@@ -0,0 +1,11 @@
+--- src/wl/sys/wl_cfg80211.c.orig 2011-10-31 07:57:38.000000000 -0400
++++ src/wl/sys/wl_cfg80211.c 2011-10-31 07:57:46.000000000 -0400
+@@ -1811,7 +1811,7 @@
+ notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
+ wl_get_ielen(wl);
+ freq = ieee80211_channel_to_frequency(notif_bss_info->channel
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ ,(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ
+ #endif
+ );
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
new file mode 100644
index 00000000000..c28bc0ee4ad
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
@@ -0,0 +1,14 @@
+--- src/wl/sys/wl_linux.c.old 2013-05-02 21:00:51.000000000 +0200
++++ src/wl/sys/wl_linux.c 2013-05-02 21:04:00.000000000 +0200
+@@ -385,7 +385,11 @@
+ #endif
+ .ndo_get_stats = wl_get_stats,
+ .ndo_set_mac_address = wl_set_mac_address,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+ .ndo_set_multicast_list = wl_set_multicast_list,
++#else
++ .ndo_set_rx_mode = wl_set_multicast_list,
++#endif
+ .ndo_do_ioctl = wl_ioctl
+ };
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
new file mode 100644
index 00000000000..2f1ad562cec
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
@@ -0,0 +1,12 @@
+--- src/wl/sys/wl_linux.c.old 2013-05-02 14:51:07.000000000 +0200
++++ src/wl/sys/wl_linux.c 2013-05-02 14:51:14.000000000 +0200
+@@ -40,7 +40,9 @@
+ #include <linux/pci_ids.h>
+ #define WLC_MAXBSSCFG 1
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
+ #include <asm/system.h>
++#endif
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/pgtable.h>
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
new file mode 100644
index 00000000000..17730dbe0c0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
@@ -0,0 +1,60 @@
+--- work.orig/src/wl/sys/wl_cfg80211.c 2012-11-05 21:12:30.402421835 +0100
++++ work/src/wl/sys/wl_cfg80211.c 2012-11-05 21:21:13.962421835 +0100
+@@ -40,9 +40,15 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_I
+
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+ enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+-static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++static s32 __wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid);
+-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++static s32 wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request);
+ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+@@ -496,10 +502,16 @@ wl_cfg80211_change_iface(struct wiphy *w
+ }
+
+ static s32
+-__wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++__wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request,
+ struct cfg80211_ssid *this_ssid)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev = request->wdev->netdev;
++#endif
+ struct wl_priv *wl = ndev_to_wl(ndev);
+ struct cfg80211_ssid *ssids;
+ struct wl_scan_req *sr = wl_to_sr(wl);
+@@ -570,13 +582,20 @@ scan_out:
+ }
+
+ static s32
+-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request)
+ {
+ s32 err = 0;
+
+ CHECK_SYS_UP();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ err = __wl_cfg80211_scan(wiphy, ndev, request, NULL);
++#else
++ err = __wl_cfg80211_scan(wiphy, request, NULL);
++#endif
+ if (err) {
+ WL_DBG(("scan error (%d)\n", err));
+ return err;
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
new file mode 100644
index 00000000000..da2ddcca437
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
@@ -0,0 +1,71 @@
+--- /src/include/bcmutils.h~ 2011-10-22 18:55:54.000000000 +0200
++++ /src/include/bcmutils.h 2013-02-21 09:08:19.947034424 +0100
+@@ -555,7 +555,11 @@ extern void printbig(char *buf);
+ extern void prhex(const char *msg, uchar *buf, uint len);
+
+ extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
++#else
++extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
++#endif
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
+
+ extern const char *bcmerrorstr(int bcmerror);
+--- /src/wl/sys/wl_cfg80211.c~ 2013-02-21 09:06:18.971297216 +0100
++++ /src/wl/sys/wl_cfg80211.c 2013-02-21 09:10:56.682019739 +0100
+@@ -744,7 +744,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiph
+ else
+ memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
+
+- wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
++#else
++ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
++#endif
+
+ err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
+ if (err) {
+@@ -2047,9 +2051,14 @@ static s32 wl_update_bss_info(struct wl_
+ struct bcm_tlv *tim;
+ u16 beacon_interval;
+ s32 dtim_period;
+- size_t ie_len;
+- u8 *ie;
+ s32 err = 0;
++ size_t ie_len;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ u8 *ie;
++#else
++ const u8 *ie;
++ const struct cfg80211_bss_ies *ies;
++#endif
+
+ ssid = &wl->profile->ssid;
+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+@@ -2079,8 +2088,22 @@ static s32 wl_update_bss_info(struct wl_
+ beacon_interval = cpu_to_le16(bi->beacon_period);
+ } else {
+ WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+- ie = bss->information_elements;
+- ie_len = bss->len_information_elements;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ ie = bss->information_elements;
++ ie_len = bss->len_information_elements;
++#else
++ rcu_read_lock();
++ ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
++ if (!ies) {
++ /* This should never happen */
++ rcu_read_unlock();
++ err = -EIO;
++ goto update_bss_info_out;
++ }
++ ie = ies->data;
++ ie_len = (size_t)(ies->len);
++ rcu_read_unlock();
++#endif
+ beacon_interval = bss->beacon_interval;
+ cfg80211_put_bss(bss);
+ }
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
new file mode 100644
index 00000000000..e1f168f1270
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
@@ -0,0 +1,14 @@
+--- src/wl/sys/wl_cfg80211.c.old 2013-05-02 17:10:36.000000000 +0200
++++ src/wl/sys/wl_cfg80211.c 2013-05-02 17:12:27.000000000 +0200
+@@ -2119,7 +2119,11 @@
+ rcu_read_unlock();
+ #endif
+ beacon_interval = bss->beacon_interval;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
+ cfg80211_put_bss(bss);
++#else
++ cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
+ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
new file mode 100644
index 00000000000..7f26746ee7a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
@@ -0,0 +1,32 @@
+diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c
+--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:45:02.520119025 +0400
++++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:46:52.116121834 +0400
+@@ -1581,11 +1581,7 @@
+ }
+
+ WL_LOCK(wl);
+- if (!capable(CAP_NET_ADMIN)) {
+- bcmerror = BCME_EPERM;
+- } else {
+- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+- }
++ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+ WL_UNLOCK(wl);
+
+ done1:
+
+diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c
+--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:45:33.268119813 +0400
++++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:55:30.184135098 +0400
+@@ -1466,7 +1466,10 @@
+ scb_val.val = 0;
+ err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
+ if (err) {
+- WL_ERR(("Could not get rssi (%d)\n", err));
++ if (err != -EINVAL) {
++ // Don't fill syslog with EINVAL error
++ WL_ERR(("Could not get rssi (%d)\n", err));
++ }
+ return err;
+ }
+ rssi = dtoh32(scb_val.val);
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch
new file mode 100644
index 00000000000..048565376d7
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch
@@ -0,0 +1,11 @@
+diff -Naur broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h
+--- broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h 2010-10-08 07:32:59.000000000 +0900
++++ broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h 2010-10-28 00:50:57.925351964 +0900
+@@ -15,6 +15,7 @@
+ #ifndef _wl_iw_h_
+ #define _wl_iw_h_
+
++#include <linux/semaphore.h>
+ #include <linux/wireless.h>
+
+ #include <typedefs.h>
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch
new file mode 100644
index 00000000000..b23914a0b3d
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch
@@ -0,0 +1,12 @@
+diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+--- a/src/wl/sys/wl_linux.c 2013-08-01 09:52:22.000000000 +0300
++++ b/src/wl/sys/wl_linux.c 2013-09-27 09:20:11.495023471 +0300
+@@ -235,7 +235,7 @@
+ #define to_str(s) #s
+ #define quote_str(s) to_str(s)
+
+-#define BRCM_WLAN_IFNAME eth%d
++#define BRCM_WLAN_IFNAME wlan%d
+
+ static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch
new file mode 100644
index 00000000000..b5d7e858d78
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch
@@ -0,0 +1,11 @@
+diff -urN a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h
+--- a/src/wl/sys/wl_iw.h 2013-08-01 09:52:22.000000000 +0300
++++ b/src/wl/sys/wl_iw.h 2013-09-27 09:36:07.808067913 +0300
+@@ -21,6 +21,7 @@
+ #ifndef _wl_iw_h_
+ #define _wl_iw_h_
+
++#include <linux/semaphore.h>
+ #include <linux/wireless.h>
+
+ #include <typedefs.h>
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch
new file mode 100644
index 00000000000..cd467090120
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch
@@ -0,0 +1,10 @@
+--- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200
++++ b/src/wl/sys/wl_linux.c 2013-09-13 14:26:42.613839899 +0200
+@@ -225,6 +225,7 @@
+
+ static int nompc = 0;
+ module_param(nompc, int, 0);
++MODULE_LICENSE("Mixed/Proprietary");
+
+ #ifdef quote_str
+ #undef quote_str
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
new file mode 100644
index 00000000000..c575f289a26
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
@@ -0,0 +1,102 @@
+diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
+--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
++++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
+@@ -3229,7 +3229,12 @@
+ wl_tkip_printstats(wl_info_t *wl, bool group_key)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ struct seq_file sfile;
++ struct seq_file *debug_buf = &sfile;
++#else
+ char debug_buf[512];
++#endif
+ int idx;
+ if (wl->tkipmodops) {
+ if (group_key) {
+@@ -3242,7 +3247,11 @@
+ wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
+ else
+ return;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
++#else
+ printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
++#endif
+ }
+ #endif
+ }
+@@ -3401,17 +3410,24 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
++#else
++static ssize_t
++wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int bcmerror, to_user;
+ int len;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#endif
+
+ if (!length) {
+ WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+@@ -3424,8 +3440,13 @@
+ return len;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++#else
++static ssize_t
++wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int from_user = 0;
+@@ -3455,19 +3476,34 @@
+ return length;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++static const struct file_operations wl_fops = {
++ .owner = THIS_MODULE,
++ .read = wl_proc_read,
++ .write = wl_proc_write,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
++#else
++ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
++ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++#endif
+ ASSERT(0);
+ return -1;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ wl->proc_entry->read_proc = wl_proc_read;
+ wl->proc_entry->write_proc = wl_proc_write;
+ wl->proc_entry->data = wl;
++#endif
+ return 0;
+ }
+ #ifdef WLOFFLD
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch
new file mode 100644
index 00000000000..5596c0ebcf2
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch
@@ -0,0 +1,17 @@
+Add channel parameter to cfg80211_ibss_joined call
+
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1841,7 +1841,12 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ wl_get_assoc_ies(wl);
+ memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
++#else
++ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid,
++ &wl->conf->channel, GFP_KERNEL);
++#endif
+ set_bit(WL_STATUS_CONNECTED, &wl->status);
+ wl->profile->active = true;
+ }
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch
new file mode 100644
index 00000000000..97a331a2bd7
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch
@@ -0,0 +1,126 @@
+--- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200
++++ b/src/wl/sys/wl_linux.c 2013-09-13 14:25:36.463020788 +0200
+@@ -910,7 +910,11 @@
+ pci_set_drvdata(pdev, NULL);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static struct pci_driver wl_pci_driver = {
++#else
++static struct pci_driver wl_pci_driver __refdata = {
++#endif
+ name: "wl",
+ probe: wl_pci_probe,
+ suspend: wl_suspend,
+@@ -3235,7 +3239,7 @@
+ void
+ wl_tkip_printstats(wl_info_t *wl, bool group_key)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ char debug_buf[512];
+ int idx;
+ if (wl->tkipmodops) {
+@@ -3408,6 +3412,7 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
+ {
+@@ -3462,19 +3467,90 @@
+ return length;
+ }
+
++#else
++
++static int
++wl_proc_read(struct seq_file *seq, void *offset)
++{
++ wl_info_t * wl = (wl_info_t *)seq->private;
++ int bcmerror, to_user;
++
++ WL_LOCK(wl);
++ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
++ WL_UNLOCK(wl);
++
++ seq_printf(seq, "%d\n", to_user);
++ return bcmerror;
++}
++
++static ssize_t wl_proc_write(struct file *file, const char __user *buff,
++ size_t length, loff_t *ppos)
++{
++ struct seq_file *seq = file->private_data;
++ wl_info_t * wl = (wl_info_t *)seq->private;
++ int bcmerror, from_user = 0;
++
++ if (length != 1) {
++ WL_ERROR(("%s: Invalid data length\n", __FUNCTION__));
++ return -EIO;
++ }
++
++ if (copy_from_user(&from_user, buff, 1)) {
++ WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
++ return -EFAULT;
++ }
++
++ if (from_user >= 0x30)
++ from_user -= 0x30;
++
++ WL_LOCK(wl);
++ bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
++ WL_UNLOCK(wl);
++
++ if (bcmerror < 0) {
++ WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
++ return -EIO;
++ }
++ *ppos += length;
++ return length;
++}
++
++static int wl_proc_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, wl_proc_read, PDE_DATA(inode));
++}
++
++static const struct file_operations wl_proc_fops = {
++ .owner = THIS_MODULE,
++ .open = wl_proc_open,
++ .read = seq_read,
++ .write = wl_proc_write,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
+- if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
++ wl->proc_entry = create_proc_entry(tmp, 0644, NULL);
++ if (wl->proc_entry) {
++ wl->proc_entry->read_proc = wl_proc_read;
++ wl->proc_entry->write_proc = wl_proc_write;
++ wl->proc_entry->data = wl;
++ }
++#else
++ wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_proc_fops, wl);
++#endif
++ if (!wl->proc_entry) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+ ASSERT(0);
+ return -1;
+ }
+- wl->proc_entry->read_proc = wl_proc_read;
+- wl->proc_entry->write_proc = wl_proc_write;
+- wl->proc_entry->data = wl;
+ return 0;
+ }
+ #ifdef WLOFFLD
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
new file mode 100644
index 00000000000..09c495d2a10
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
@@ -0,0 +1,14 @@
+--- Makefile.old 2013-04-28 22:42:59.000000000 +0200
++++ Makefile 2013-04-28 22:45:53.000000000 +0200
+@@ -128,9 +128,9 @@
+
+ EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+-KBASE ?= /lib/modules/`uname -r`
++KBASE ?= /lib/modules/${KV_FULL}
+ KBUILD_DIR ?= $(KBASE)/build
+-MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless
++MDEST_DIR ?= ${D}$(KBASE)/kernel/drivers/net/wireless
+
+ all:
+ KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
new file mode 100644
index 00000000000..6ee0092376b
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
@@ -0,0 +1,29 @@
+From 5f7db08c046bd31b162a102ca868fa334a0357b9 Mon Sep 17 00:00:00 2001
+From: Michael Marineau <mike@marineau.org>
+Date: Sat, 20 Sep 2014 12:49:43 -0700
+Subject: [PATCH] linux 3.17
+
+http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c835a677331495cf137a7f8a023463afd9f032f8
+---
+ src/wl/sys/wl_linux.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 1622127..11c4ec2 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1308,7 +1308,11 @@ wl_alloc_linux_if(wl_if_t *wlif)
+ dev->priv = priv_link;
+ #else
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
++#else
++ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN, ether_setup);
++#endif
+ if (!dev) {
+ WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
+ (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
+--
+1.8.5.5
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch
new file mode 100644
index 00000000000..4860912d9fe
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch
@@ -0,0 +1,30 @@
+From 5aae9ccfda6dfc680403b4a5ff9a36dcd5331dfd Mon Sep 17 00:00:00 2001
+From: Michael Marineau <mike@marineau.org>
+Date: Tue, 11 Nov 2014 15:17:46 -0800
+Subject: [PATCH] linux 3.18
+
+http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5bc8c1f2b070bab82ed738f98ecfac725e33c57f
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 514a892..e3ebef2 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2010,7 +2010,11 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
+
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
+- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
++ cbss = cfg80211_inform_bss(wiphy, channel,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
++ CFG80211_BSS_FTYPE_UNKNOWN,
++#endif
++ (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+
+--
+2.0.4
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
new file mode 100644
index 00000000000..f93e3f1d3a3
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2014-06-26 10:42:08.000000000 +0000
++++ b/Makefile 2014-07-17 22:44:01.662297228 +0000
+@@ -126,6 +126,8 @@
+ EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include
+ #EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR
+
++EXTRA_CFLAGS += -Wno-date-time
++
+ EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+ KBASE ?= /lib/modules/`uname -r`
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch
new file mode 100644
index 00000000000..7fe63199a0c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch
@@ -0,0 +1,350 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-01-22 01:43:25.378920452 +0100
+@@ -63,8 +63,13 @@
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ibss_params *params);
+ static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
+ struct net_device *dev, u8 *mac, struct station_info *sinfo);
++#else
++static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
++ struct net_device *dev, const u8 *mac, struct station_info *sinfo);
++#endif
+ static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, bool enabled, s32 timeout);
+ static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
+@@ -1387,7 +1392,7 @@
+ key_endian_to_host(&key);
+
+ params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
+- memcpy(params.key, key.data, params.key_len);
++ memcpy((char *)params.key, key.data, params.key_len);
+
+ if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) {
+ return err;
+@@ -1421,9 +1426,15 @@
+ return err;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32
+ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ u8 *mac, struct station_info *sinfo)
++#else
++static s32
++wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
++ const u8 *mac, struct station_info *sinfo)
++#endif
+ {
+ struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+ scb_val_t scb_val;
+@@ -2010,9 +2021,15 @@
+
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#else
++ cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
++ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
++ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#endif
+
+ if (unlikely(!cbss))
+ return -ENOMEM;
+@@ -2071,7 +2088,26 @@
+ wl_get_assoc_ies(wl);
+ memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
++ {
++ struct wl_bss_info *bi;
++ u16 bss_info_channel;
++ struct ieee80211_channel *channel;
++ u32 freq;
++
++ bi = (struct wl_bss_info *)(wl->extra_buf + 4);
++ bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec);
++
++ freq = ieee80211_channel_to_frequency(bss_info_channel,
++ (bss_info_channel <= CH_MAX_2G_CHANNEL) ?
++ IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
++
++ channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
++ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
++ }
++#else
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
++#endif
+ set_bit(WL_STATUS_CONNECTED, &wl->status);
+ wl->profile->active = true;
+ }
+@@ -2629,7 +2665,15 @@
+
+ void wl_cfg80211_detach(struct net_device *ndev)
+ {
+- struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
++ struct wl_cfg80211_priv *wl;
++ struct wireless_dev *wdev;
++
++ wdev = ndev->ieee80211_ptr;
++ if (wdev == NULL) {
++ printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev);
++ return;
++ }
++ wl = ndev_to_wl(ndev);
+
+ wl_deinit_cfg80211_priv(wl);
+ wl_free_wdev(wl);
+--- a/src/wl/sys/wl_dbg.h 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_dbg.h 2015-01-22 01:43:25.379920462 +0100
+@@ -55,10 +55,12 @@
+
+ #define WL_NONE(args)
+
++#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */
++
+ #ifdef BCMDBG_ERR
+ #define WL_ERROR(args) WL_PRINT(args)
+ #else
+-#define WL_ERROR(args)
++#define WL_ERROR(args) FORCE_TRACE_LEVEL args
+ #endif
+ #define WL_TRACE(args)
+ #define WL_APSTA_UPDN(args)
+--- a/src/wl/sys/wl_linux.c 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_linux.c 2015-01-22 01:44:58.580453805 +0100
+@@ -878,7 +878,7 @@
+ static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume);
+ #endif
+
+-static struct pci_driver wl_pci_driver = {
++static struct pci_driver wl_pci_driver __refdata = {
+ .name = "wl",
+ .probe = wl_pci_probe,
+ .remove = __devexit_p(wl_remove),
+@@ -1270,6 +1270,7 @@
+ MFREE(wl->osh, wlif->dev, sizeof(struct net_device));
+ #else
+ free_netdev(wlif->dev);
++ wlif->dev = NULL;
+ #endif
+ }
+
+@@ -1307,7 +1308,12 @@
+ dev->priv = priv_link;
+ #else
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
++#else
++ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
++ ether_setup);
++#endif
+ if (!dev) {
+ WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
+ (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
+@@ -1651,11 +1657,7 @@
+ }
+
+ WL_LOCK(wl);
+- if (!capable(CAP_NET_ADMIN)) {
+- bcmerror = BCME_EPERM;
+- } else {
+- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+- }
++ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+ WL_UNLOCK(wl);
+
+ done1:
+@@ -2157,8 +2159,8 @@
+ wlif = WL_DEV_IF(dev);
+ wl = WL_INFO(dev);
+
++ skb->prev = NULL;
+ if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+- skb->prev = NULL;
+
+ TXQ_LOCK(wl);
+
+@@ -2455,8 +2457,10 @@
+ p80211msg_t *phdr;
+
+ len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN;
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+ phdr = (p80211msg_t*)skb->data;
+@@ -2535,8 +2539,10 @@
+ rtap_len = sizeof(wl_radiotap_ht_brcm_2_t);
+
+ len = rtap_len + (oskb->len - D11_PHY_HDR_LEN);
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+
+@@ -2664,8 +2670,10 @@
+ len += amsdu_len;
+ }
+
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+
+@@ -2990,7 +2998,7 @@
+ }
+
+ void
+-wl_set_monitor(wl_info_t *wl, int val)
++wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */
+ {
+ const char *devname;
+ wl_if_t *wlif;
+@@ -3224,42 +3232,75 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
++{
++ wl_info_t * wl = (wl_info_t *)data;
+ #else
+ static ssize_t
+-wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data)
+-#endif
++wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
+ {
+- wl_info_t * wl = (wl_info_t *)data;
+- int to_user;
+- int len;
++ wl_info_t * wl = PDE_DATA(file_inode(filp));
++#endif
++ int bcmerror, len;
++ int to_user = 0;
++ char tmp[8];
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#else
++ if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */
++ return 0; /* 0 <=> EOF */
++ }
+ #endif
+
+- if (!length) {
+- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+- return 0;
+- }
+ WL_LOCK(wl);
+- wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+- len = sprintf(buffer, "%d\n", to_user);
+- WL_UNLOCK(wl);
+- return len;
++ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
++ WL_UNLOCK(wl);
++
++ if (bcmerror != BCME_OK) {
++ WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
++ return -EIO;
++ }
++
++ len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user);
++ tmp[ARRAY_SIZE(tmp) - 1] = '\0';
++ if (len >= ARRAY_SIZE(tmp)) {
++ printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
++ return -ERANGE;
++ }
++ else if (len < 0) {
++ printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
++ return len;
++ }
++ if (length < len) {
++ printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length);
++ return -EMSGSIZE;
++ }
++ if (copy_to_user(buffer, tmp, len) != 0) {
++ printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__);
++ return -EFAULT;
++ }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ *offp += len;
++#endif
++
++ return len;
+ }
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++{
++ wl_info_t * wl = (wl_info_t *)data;
+ #else
+ static ssize_t
+-wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data)
+-#endif
++wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
+ {
+- wl_info_t * wl = (wl_info_t *)data;
++ wl_info_t * wl = PDE_DATA(file_inode(filp));
++#endif
+ int from_user = 0;
+ int bcmerror;
+
+@@ -3270,7 +3311,11 @@
+ }
+ if (copy_from_user(&from_user, buff, 1)) {
+ WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
+- return -EIO;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
++ return -EIO;
++#else
++ return -EFAULT;
++#endif
+ }
+
+ if (from_user >= 0x30)
+@@ -3280,10 +3325,15 @@
+ bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
+ WL_UNLOCK(wl);
+
+- if (bcmerror < 0) {
++ if (bcmerror != BCME_OK) {
+ WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
+ return -EIO;
+ }
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */
++ *offp += length;
++#endif
++
+ return length;
+ }
+
+@@ -3304,8 +3354,8 @@
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+ #else
+- if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
+- WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++ if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
++ WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
+ #endif
+ ASSERT(0);
+ return -1;
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch
new file mode 100644
index 00000000000..6d18c19bd43
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch
@@ -0,0 +1,26 @@
+--- src/wl/sys/wl_cfg80211_hybrid.c.orig 2015-04-27 11:08:10.252439465 +0000
++++ src/wl/sys/wl_cfg80211_hybrid.c 2015-04-27 11:10:52.454433122 +0000
+@@ -1441,7 +1441,11 @@ wl_cfg80211_get_station(struct wiphy *wi
+ WL_DBG(("Could not get rate (%d)\n", err));
+ } else {
+ rate = dtoh32(rate);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ sinfo->filled |= STATION_INFO_TX_BITRATE;
++#else
++ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
++#endif
+ sinfo->txrate.legacy = rate * 5;
+ WL_DBG(("Rate %d Mbps\n", (rate / 2)));
+ }
+@@ -1454,7 +1458,11 @@ wl_cfg80211_get_station(struct wiphy *wi
+ return err;
+ }
+ rssi = dtoh32(scb_val.val);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ sinfo->filled |= STATION_INFO_SIGNAL;
++#else
++ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
++#endif
+ sinfo->signal = rssi;
+ WL_DBG(("RSSI %d dBm\n", rssi));
+ }
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
new file mode 100644
index 00000000000..c575f289a26
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
@@ -0,0 +1,102 @@
+diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
+--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
++++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
+@@ -3229,7 +3229,12 @@
+ wl_tkip_printstats(wl_info_t *wl, bool group_key)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ struct seq_file sfile;
++ struct seq_file *debug_buf = &sfile;
++#else
+ char debug_buf[512];
++#endif
+ int idx;
+ if (wl->tkipmodops) {
+ if (group_key) {
+@@ -3242,7 +3247,11 @@
+ wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
+ else
+ return;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
++#else
+ printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
++#endif
+ }
+ #endif
+ }
+@@ -3401,17 +3410,24 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
++#else
++static ssize_t
++wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int bcmerror, to_user;
+ int len;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#endif
+
+ if (!length) {
+ WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+@@ -3424,8 +3440,13 @@
+ return len;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++#else
++static ssize_t
++wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int from_user = 0;
+@@ -3455,19 +3476,34 @@
+ return length;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++static const struct file_operations wl_fops = {
++ .owner = THIS_MODULE,
++ .read = wl_proc_read,
++ .write = wl_proc_write,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
++#else
++ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
++ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++#endif
+ ASSERT(0);
+ return -1;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ wl->proc_entry->read_proc = wl_proc_read;
+ wl->proc_entry->write_proc = wl_proc_write;
+ wl->proc_entry->data = wl;
++#endif
+ return 0;
+ }
+ #ifdef WLOFFLD
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
new file mode 100644
index 00000000000..a6e3d3d1f9f
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
@@ -0,0 +1,17 @@
+--- src.orig/wl/sys/wl_cfg80211_hybrid.c
++++ src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2013,8 +2013,12 @@
+ ie_len = (size_t)(ies->len);
+ rcu_read_unlock();
+ #endif
+- cfg80211_put_bss(bss);
+- }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
++ cfg80211_put_bss(bss);
++#else
++ cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
++ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
+ if (tim) {
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
new file mode 100644
index 00000000000..09c495d2a10
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
@@ -0,0 +1,14 @@
+--- Makefile.old 2013-04-28 22:42:59.000000000 +0200
++++ Makefile 2013-04-28 22:45:53.000000000 +0200
+@@ -128,9 +128,9 @@
+
+ EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+-KBASE ?= /lib/modules/`uname -r`
++KBASE ?= /lib/modules/${KV_FULL}
+ KBUILD_DIR ?= $(KBASE)/build
+-MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless
++MDEST_DIR ?= ${D}$(KBASE)/kernel/drivers/net/wireless
+
+ all:
+ KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`
diff --git a/net-wireless/broadcom-sta/metadata.xml b/net-wireless/broadcom-sta/metadata.xml
new file mode 100644
index 00000000000..81110864a84
--- /dev/null
+++ b/net-wireless/broadcom-sta/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mattst88@gentoo.org</email>
+ <name>Matt Turner</name>
+ </maintainer>
+ <maintainer>
+ <email>mpagano@gentoo.org</email>
+ <name>Mike Pagano</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">~albertomilone</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/bss/Manifest b/net-wireless/bss/Manifest
new file mode 100644
index 00000000000..301aa1ce59f
--- /dev/null
+++ b/net-wireless/bss/Manifest
@@ -0,0 +1 @@
+DIST bss-0.8.tar.gz 25128 RMD160 195e210d05cab817acb39b3c46e353679891b3bb SHA1 6c5e028104c971e800424903581e246ffea3dfd2 SHA256 582a766ddf3ce1fb66df6763abc413c25de039daf8a68e9352c855ca21eb3251
diff --git a/net-wireless/bss/bss-0.8.ebuild b/net-wireless/bss/bss-0.8.ebuild
new file mode 100644
index 00000000000..739946227dc
--- /dev/null
+++ b/net-wireless/bss/bss-0.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Bluetooth stack smasher / fuzzer"
+HOMEPAGE="http://securitech.homeunix.org/blue/"
+SRC_URI="http://securitech.homeunix.org/blue/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="net-wireless/bluez"
+
+src_prepare() {
+ sed -i -e 's:/local::' Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ BSS_FLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ dosbin bss || die
+ dodoc AUTHOR BUGS CHANGELOG CONTRIB NOTES README TODO \
+ replay_packet/replay_l2cap_packet.c
+}
diff --git a/net-wireless/bss/metadata.xml b/net-wireless/bss/metadata.xml
new file mode 100644
index 00000000000..c6d862855eb
--- /dev/null
+++ b/net-wireless/bss/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/btcrack/btcrack-9999.ebuild b/net-wireless/btcrack/btcrack-9999.ebuild
new file mode 100644
index 00000000000..e7f062a2959
--- /dev/null
+++ b/net-wireless/btcrack/btcrack-9999.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="linux port of Thierry Zollers' BTCrack"
+HOMEPAGE="https://github.com/mikeryan/btcrack"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/mikeryan/btcrack.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ #SRC_URI=""
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+}
diff --git a/net-wireless/btcrack/metadata.xml b/net-wireless/btcrack/metadata.xml
new file mode 100644
index 00000000000..ceccf8106cb
--- /dev/null
+++ b/net-wireless/btcrack/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">mikeryan/btcrack</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/chillispot/Manifest b/net-wireless/chillispot/Manifest
new file mode 100644
index 00000000000..a38daa9d8fa
--- /dev/null
+++ b/net-wireless/chillispot/Manifest
@@ -0,0 +1 @@
+DIST chillispot-1.1.0.tar.gz 452749 SHA256 b505ab963af8423ef8ae844951ef05fe1554630b448f1174074e9881cb474a01 SHA512 f0ea3c50983cb1d23da542d63be989a6ccb1e81d5e3a20b143f66414fad035f54531174d4cec49d1f8c9d27f0cffc5a3ed0f4ca64f4cf8b58035d561ce59cab2 WHIRLPOOL 5ab73a04e3127570a0f1cffbf167cba877f3f0bbd45c094a3b1a01fa5ffac70efd2fbfbf9c3bebb064abaef90f6774f375f45bb8f1465bbf878d6ab54e200805
diff --git a/net-wireless/chillispot/chillispot-1.1.0.ebuild b/net-wireless/chillispot/chillispot-1.1.0.ebuild
new file mode 100644
index 00000000000..dfad3435693
--- /dev/null
+++ b/net-wireless/chillispot/chillispot-1.1.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="open source captive portal or wireless LAN access point controller"
+HOMEPAGE="http://www.chillispot.info/"
+SRC_URI="http://www.chillispot.info/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc s390 sh ~sparc x86"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ chmod 644 doc/*.conf
+ find . -exec chmod go-w '{}' \;
+
+ epatch "${FILESDIR}"/${P}-gcc44.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" STRIPPROG=true install || die "emake install failed"
+ cd doc && dodoc chilli.conf freeradius.users hotspotlogin.cgi firewall.iptables
+
+ # init script provided by Michele Beltrame bug #124698
+ newinitd "${FILESDIR}"/${PN} ${PN} || die
+}
diff --git a/net-wireless/chillispot/files/chillispot b/net-wireless/chillispot/files/chillispot
new file mode 100644
index 00000000000..9c6b6cb7663
--- /dev/null
+++ b/net-wireless/chillispot/files/chillispot
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net logger
+}
+
+
+checkconfig() {
+ if [ -f /etc/chilli.conf ]; then
+ return 0;
+ else
+ eerror "Error starting chillispot. Please create /etc/chilli.conf before."
+ return 1;
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Chillispot"
+
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/chilli
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Chillispot"
+ start-stop-daemon --stop --pidfile /var/run/chilli.pid --quiet
+ eend $?
+}
diff --git a/net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch b/net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch
new file mode 100644
index 00000000000..aa296b8828a
--- /dev/null
+++ b/net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch
@@ -0,0 +1,81 @@
+diff -NrU5 chillispot-1.1.0.original/src/tun.c chillispot-1.1.0/src/tun.c
+--- chillispot-1.1.0.original/src/tun.c 2009-07-18 20:50:38.000000000 +0000
++++ chillispot-1.1.0/src/tun.c 2009-07-18 21:06:53.000000000 +0000
+@@ -364,11 +364,11 @@
+ tun_sifflags(this, IFF_UP | IFF_RUNNING); /* TODO */
+ close(fd);
+ this->addrs++;
+ return 0;
+
+-#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+
+ int fd;
+ struct ifaliasreq areq;
+
+ /* TODO: Is this needed on FreeBSD? */
+@@ -443,11 +443,11 @@
+ ifr.ifr_dstaddr.sa_family = AF_INET;
+
+ #if defined(__linux__)
+ ifr.ifr_netmask.sa_family = AF_INET;
+
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len =
+ sizeof (struct sockaddr_in);
+ ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len =
+ sizeof (struct sockaddr_in);
+ #endif
+@@ -495,11 +495,11 @@
+ this->netmask.s_addr = netmask->s_addr;
+ #if defined(__linux__)
+ ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr =
+ netmask->s_addr;
+
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr =
+ netmask->s_addr;
+
+ #elif defined(__sun__)
+ ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr =
+@@ -583,11 +583,11 @@
+ }
+ }
+ close(fd);
+ return 0;
+
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+
+ struct {
+ struct rt_msghdr rt;
+ struct sockaddr_in dst;
+ struct sockaddr_in gate;
+@@ -672,11 +672,11 @@
+ {
+
+ #if defined(__linux__)
+ struct ifreq ifr;
+
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
+ int devnum;
+ struct ifaliasreq areq;
+ int fd;
+
+@@ -720,11 +720,11 @@
+ (*tun)->devname[IFNAMSIZ] = 0;
+
+ ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
+ return 0;
+
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+
+ /* Find suitable device */
+ for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */
+ snprintf(devname, sizeof(devname), "/dev/tun%d", devnum);
+ devname[sizeof(devname)] = 0;
diff --git a/net-wireless/chillispot/metadata.xml b/net-wireless/chillispot/metadata.xml
new file mode 100644
index 00000000000..8160ef2ff55
--- /dev/null
+++ b/net-wireless/chillispot/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+
+<longdescription>ChilliSpot is an open source captive portal or wireless
+LAN access point controller. It is used for authenticating users of a
+wireless LAN. It supports web based login which is today's standard for
+public HotSpots and it supports Wireless Protected Access (WPA) which is
+the standard of the future. Authentication, authorization and accounting
+(AAA) is handled by your favorite radius server.</longdescription>
+
+</pkgmetadata>
diff --git a/net-wireless/chirp/Manifest b/net-wireless/chirp/Manifest
new file mode 100644
index 00000000000..4fefe4dde90
--- /dev/null
+++ b/net-wireless/chirp/Manifest
@@ -0,0 +1 @@
+DIST chirp-0.4.1.tar.gz 416851 SHA256 8c9d652dc89dbab9e2a1a75c07aa7179ce403de078a4d02814365f89e183319e SHA512 13f36e96bb1608a41605cedd2fa3dfb46efc37e97437d09b75a0dd9ff10bb85c32ef3190d8db3fdb0360de8b85470588492df3ca5b3e2ecbdb813f3f11a9cc57 WHIRLPOOL 995c370a48b63fe4eb4d879b11f85385474a2ebcb5ea23f09db89661f42bdb0ad6867a172d4a15821eaf84d83469b55790b02d2fe4c4ce276e1a713022a5f49e
diff --git a/net-wireless/chirp/chirp-0.4.1.ebuild b/net-wireless/chirp/chirp-0.4.1.ebuild
new file mode 100644
index 00000000000..3ec9e14c9d5
--- /dev/null
+++ b/net-wireless/chirp/chirp-0.4.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ ${PV} == "9999" ]] ; then
+ SCM=mercurial
+ EHG_REPO_URI="http://d-rats.com/hg/chirp.hg"
+fi
+
+inherit distutils-r1 ${SCM}
+
+DESCRIPTION="Free open-source tool for programming your amateur radio"
+HOMEPAGE="http://chirp.danplanet.com"
+
+if [[ ${PV} == "9999" ]] ; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="http://chirp.danplanet.com/download/${PV}/${P}.tar.gz"
+ RESTRICT="test"
+fi
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-python/pyserial
+ dev-libs/libxml2[python]"
+RDEPEND="${DEPEND}
+ dev-python/pygtk"
+
+src_prepare() {
+ sed -i -e "/share\/doc\/chirp/d" setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ pushd tests > /dev/null
+ "${PYTHON}" run_tests || die
+ popd > /dev/null
+}
diff --git a/net-wireless/chirp/chirp-9999.ebuild b/net-wireless/chirp/chirp-9999.ebuild
new file mode 100644
index 00000000000..3ec9e14c9d5
--- /dev/null
+++ b/net-wireless/chirp/chirp-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+if [[ ${PV} == "9999" ]] ; then
+ SCM=mercurial
+ EHG_REPO_URI="http://d-rats.com/hg/chirp.hg"
+fi
+
+inherit distutils-r1 ${SCM}
+
+DESCRIPTION="Free open-source tool for programming your amateur radio"
+HOMEPAGE="http://chirp.danplanet.com"
+
+if [[ ${PV} == "9999" ]] ; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="http://chirp.danplanet.com/download/${PV}/${P}.tar.gz"
+ RESTRICT="test"
+fi
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-python/pyserial
+ dev-libs/libxml2[python]"
+RDEPEND="${DEPEND}
+ dev-python/pygtk"
+
+src_prepare() {
+ sed -i -e "/share\/doc\/chirp/d" setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ pushd tests > /dev/null
+ "${PYTHON}" run_tests || die
+ popd > /dev/null
+}
diff --git a/net-wireless/chirp/metadata.xml b/net-wireless/chirp/metadata.xml
new file mode 100644
index 00000000000..50b2373a3fe
--- /dev/null
+++ b/net-wireless/chirp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>radio</herd>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-wireless/cpyrit-cuda/Manifest b/net-wireless/cpyrit-cuda/Manifest
new file mode 100644
index 00000000000..09b06ec1781
--- /dev/null
+++ b/net-wireless/cpyrit-cuda/Manifest
@@ -0,0 +1 @@
+DIST cpyrit-cuda-0.4.0.tar.gz 22050 SHA256 6035f01874f699f010e460618694ec876f719bea475313b991f5dd3dd84d831b SHA512 c875c6aaa527251453369e43cd9596b5727032ff6a7bbbee7cc1c4efe56b71dd3151d39b8203a4d496e5f8addd21379486bf353e7893ac9ba11ad0614305fec1 WHIRLPOOL 3ae00515e44fa13d4172c3cc3cd569551831a4740a0e8c82b7962e82cc832c4c173507d65cd6d16d6eb575efc3ae1a6df4f4fcfd39898b25790f57672f9f1d31
diff --git a/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0-r1.ebuild b/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0-r1.ebuild
new file mode 100644
index 00000000000..4d50d569bf4
--- /dev/null
+++ b/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A sub-package that adds CUDA-capability to Pyrit"
+HOMEPAGE="http://code.google.com/p/pyrit/"
+SRC_URI="http://pyrit.googlecode.com/files/cpyrit-cuda-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl:=
+ net-libs/libpcap
+ dev-util/nvidia-cuda-toolkit"
+RDEPEND="${DEPEND}"
+PDEPEND="~net-wireless/pyrit-${PV}"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
diff --git a/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0.ebuild b/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0.ebuild
new file mode 100644
index 00000000000..347969869a6
--- /dev/null
+++ b/net-wireless/cpyrit-cuda/cpyrit-cuda-0.4.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.5"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils eutils
+
+DESCRIPTION="A sub-package that adds CUDA-capability to Pyrit"
+HOMEPAGE="http://code.google.com/p/pyrit/"
+SRC_URI="http://pyrit.googlecode.com/files/cpyrit-cuda-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl
+ net-libs/libpcap
+ dev-util/nvidia-cuda-toolkit"
+RDEPEND="${DEPEND}"
+PDEPEND="~net-wireless/pyrit-${PV}"
diff --git a/net-wireless/cpyrit-cuda/metadata.xml b/net-wireless/cpyrit-cuda/metadata.xml
new file mode 100644
index 00000000000..81f3a278efc
--- /dev/null
+++ b/net-wireless/cpyrit-cuda/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>oleg@kaa.org.ua</email>
+ <name>Oleg Kravchenko</name>
+</maintainer>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/cpyrit-opencl/Manifest b/net-wireless/cpyrit-opencl/Manifest
new file mode 100644
index 00000000000..8f18f47c208
--- /dev/null
+++ b/net-wireless/cpyrit-opencl/Manifest
@@ -0,0 +1 @@
+DIST cpyrit-opencl-0.4.0.tar.gz 22851 SHA256 aac593bce3f00ea7fd3d558083dbd7e168332a92736e51a621a0459d1bc042fa SHA512 105c735089c23850f46fc349d4393bc038ca676ed9437545af7d23d98786e52a6ed88a09eeb9b7e2ef3654eaa71e0172a64478f8a37177714b3060ad3af49e5a WHIRLPOOL 522311339e52e10eac4bb724e31e9b277dd831c85ad011121ea3e251a1314afdef45f518b4b47d1ad542b5b65a0f5abbeed47c6379b329fcc72aeded221041fe
diff --git a/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0-r1.ebuild b/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0-r1.ebuild
new file mode 100644
index 00000000000..88f58edbca9
--- /dev/null
+++ b/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A sub-package that adds OpenCL-capability to Pyrit"
+HOMEPAGE="http://code.google.com/p/pyrit/"
+SRC_URI="http://pyrit.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl:=
+ sys-libs/zlib
+ virtual/opencl"
+RDEPEND="${DEPEND}"
+PDEPEND="~net-wireless/pyrit-${PV}"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
diff --git a/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0.ebuild b/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0.ebuild
new file mode 100644
index 00000000000..326be8e253f
--- /dev/null
+++ b/net-wireless/cpyrit-opencl/cpyrit-opencl-0.4.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.5"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils eutils
+
+DESCRIPTION="A sub-package that adds OpenCL-capability to Pyrit"
+HOMEPAGE="http://code.google.com/p/pyrit/"
+SRC_URI="http://pyrit.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ virtual/opencl"
+RDEPEND="${DEPEND}"
+PDEPEND="~net-wireless/pyrit-${PV}"
diff --git a/net-wireless/cpyrit-opencl/metadata.xml b/net-wireless/cpyrit-opencl/metadata.xml
new file mode 100644
index 00000000000..81f3a278efc
--- /dev/null
+++ b/net-wireless/cpyrit-opencl/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>oleg@kaa.org.ua</email>
+ <name>Oleg Kravchenko</name>
+</maintainer>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/crackle/Manifest b/net-wireless/crackle/Manifest
new file mode 100644
index 00000000000..7db449d8bb9
--- /dev/null
+++ b/net-wireless/crackle/Manifest
@@ -0,0 +1 @@
+DIST crackle-0.1.tgz 27015 SHA256 07e31b5a67451b1d3baa3cde81cf5c945fd258df5b3df84fb12f01aaead4d5d6 SHA512 e60341e1fae6a3212028714a7bdba2c8f65d4b92d3d670194954df0e11e1f69a1bb6a5bcbdd5c4db54774cfe60955d50fbd2bfaff5fa615bf253f57283cfa17b WHIRLPOOL 837e3526d438b58473190e9e6f23e42e7f2d1b8d372b4aa3eeb47b245ac305e9e1f3fb49e03c648b802ecd128a5c88079026271dd8d07fdf50542040b19169e6
diff --git a/net-wireless/crackle/crackle-0.1.ebuild b/net-wireless/crackle/crackle-0.1.ebuild
new file mode 100644
index 00000000000..708032aa509
--- /dev/null
+++ b/net-wireless/crackle/crackle-0.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Crackle cracks BLE Encryption (AKA Bluetooth Smart)"
+HOMEPAGE="http://lacklustre.net/projects/crackle/"
+SRC_URI="http://lacklustre.net/projects/crackle/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/flags.patch
+}
+
+src_install() {
+ dobin crackle
+}
diff --git a/net-wireless/crackle/files/flags.patch b/net-wireless/crackle/files/flags.patch
new file mode 100644
index 00000000000..c1c0bd570d3
--- /dev/null
+++ b/net-wireless/crackle/files/flags.patch
@@ -0,0 +1,20 @@
+diff -Naur crackle-0.1/Makefile crackle-0.1-patched/Makefile
+--- crackle-0.1/Makefile 2013-02-15 01:04:24.000000000 -0500
++++ crackle-0.1-patched/Makefile 2014-03-05 11:30:20.907003818 -0500
+@@ -4,13 +4,13 @@
+
+ OBJS = crackle.o aes.o aes-ccm.o aes-enc.o test.o
+
+-CFLAGS = -Wall -Werror -g
+-LDFLAGS = -lpcap
++CFLAGS ?= -Wall -Werror -g
++LDFLAGS ?=
+
+ all: crackle
+
+ crackle: $(OBJS)
+- $(CC) -o crackle $(OBJS) $(LDFLAGS)
++ $(CC) $(CFLAGS) -o crackle $(OBJS) -lpcap $(LDFLAGS)
+
+ install: crackle
+ $(INSTALL) -m 0755 crackle $(INSTALL_DIR)
diff --git a/net-wireless/crackle/metadata.xml b/net-wireless/crackle/metadata.xml
new file mode 100644
index 00000000000..4b6b68191d8
--- /dev/null
+++ b/net-wireless/crackle/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
diff --git a/net-wireless/crda/Manifest b/net-wireless/crda/Manifest
new file mode 100644
index 00000000000..30890a731c5
--- /dev/null
+++ b/net-wireless/crda/Manifest
@@ -0,0 +1,3 @@
+DIST crda-1.1.2.tar.bz2 21754 SHA256 e469348a5d0bb933df31995869130f68901de9be02e666437f52125698851864 SHA512 cd0997fdafc63640cbac5cff57b617177c3693a6d05e2138f23ed8273502d5f485f8f60309ed4fec97fe2cd2d51ee4b7e2d9535efc1de44c08b9cc9d6fb7ecf3 WHIRLPOOL 35ef76fcb7f3760613135caba5b9c6b0c781bc560f948a60f6b09eaeb75f3538461d90ce353decc17795995795b63c124a282903d41a8e25680fda0b6498bea4
+DIST crda-1.1.3.tar.bz2 38697 SHA256 aa8a7fe92f0765986c421a5b6768a185375ac210393df0605ee132f6754825f0 SHA512 4ec37d3d51f5988af79c2eaadc1bce344f20d4d9833533838d308533ee02cb12d5ed193391679ae1231c8afe61b21defdb368614a6238f99fdc5824f6819cfed WHIRLPOOL bbcb31277b664243f9e494c494152cf0ebcb187360ba48aa07c8e96c83dd91098bc49f1edf0b196a9bf4071565ac389b2907fcc73e348780aa890e066895c282
+DIST crda-3.18.tar.xz 61516 SHA256 43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf SHA512 57ae6309159f396448f052c127f401c2f63d47f4193e87dca231c4b7bbbd7e69b5e5666f356fc76dfc8a6ae58ffa55c3794428d6eb34d9937df77c4276036588 WHIRLPOOL f2ee46b8e25509b6f78e508e62de3f1d0d85303b173b38d653f69f4f6e8f77ada2bc3330cd62646a1ce3819b0db834d9aecc9751cf3e7d35e2a67d3ffdfb1503
diff --git a/net-wireless/crda/crda-1.1.2-r3.ebuild b/net-wireless/crda/crda-1.1.2-r3.ebuild
new file mode 100644
index 00000000000..8b2e19921da
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.2-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs python
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ dev-libs/libnl
+ net-wireless/wireless-regdb"
+DEPEND="${RDEPEND}
+ dev-python/m2crypto
+ =dev-lang/python-2*
+ virtual/pkgconfig"
+RDEPEND="${RDEPEND}
+ >=virtual/udev-171"
+
+src_prepare() {
+ epatch "${FILESDIR}"/libnl31-support.diff
+
+ python_convert_shebangs 2 utils/key2pub.py
+
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ Makefile || die
+}
+
+src_compile() {
+ emake UDEV_RULE_DIR=/lib/udev/rules.d/ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin USE_OPENSSL=1 CC="$(tc-getCC)" all_noverify
+}
+
+src_test() {
+ emake USE_OPENSSL=1 CC="$(tc-getCC)" verify
+}
+
+src_install() {
+ emake UDEV_RULE_DIR=/lib/udev/rules.d/ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin USE_OPENSSL=1 DESTDIR="${D}" install
+ keepdir /etc/wireless-regdb/pubkeys
+}
diff --git a/net-wireless/crda/crda-1.1.2-r4.ebuild b/net-wireless/crda/crda-1.1.2-r4.ebuild
new file mode 100644
index 00000000000..c7ec1b7a2fe
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.2-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs python
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl:0
+ dev-libs/libnl:3
+ net-wireless/wireless-regdb
+ >=virtual/udev-171"
+DEPEND="${RDEPEND}
+ dev-python/m2crypto
+ =dev-lang/python-2*
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/libnl31-support.diff
+
+ python_convert_shebangs 2 utils/key2pub.py
+
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ UDEV_RULE_DIR="$($(tc-getPKG_CONFIG) --variable=udevdir udev)/rules.d" \
+ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin \
+ USE_OPENSSL=1 \
+ CC="$(tc-getCC)" \
+ all_noverify V=1
+}
+
+src_test() {
+ emake USE_OPENSSL=1 CC="$(tc-getCC)" verify
+}
+
+src_install() {
+ emake \
+ UDEV_RULE_DIR="$($(tc-getPKG_CONFIG) --variable=udevdir udev)/rules.d" \
+ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin \
+ USE_OPENSSL=1 \
+ DESTDIR="${D}" \
+ install
+
+ keepdir /etc/wireless-regdb/pubkeys
+}
diff --git a/net-wireless/crda/crda-1.1.3-r1.ebuild b/net-wireless/crda/crda-1.1.3-r1.ebuild
new file mode 100644
index 00000000000..4f63d6b34f0
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.3-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils toolchain-funcs python-any-r1 udev
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl:0
+ dev-libs/libnl:3
+ net-wireless/wireless-regdb"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')
+ virtual/pkgconfig"
+
+python_check_deps() {
+ has_version --host-root "dev-python/m2crypto[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-missing-include.patch
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ Makefile || die
+}
+
+_emake() {
+ # The source hardcodes /usr/lib/crda/ paths (ignoring all make vars
+ # that look like it should change it). We want to use /usr/lib/
+ # anyways as this file is not ABI specific and we want to share it
+ # among all ABIs rather than pointlessly duplicate it.
+ #
+ # The trailing slash on SBINDIR is required by the source.
+ emake \
+ PREFIX="${EPREFIX}/usr" \
+ SBINDIR='$(PREFIX)/sbin/' \
+ UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
+ REG_BIN=/usr/lib/crda/regulatory.bin \
+ USE_OPENSSL=1 \
+ CC="$(tc-getCC)" \
+ V=1 \
+ "$@"
+}
+
+src_compile() {
+ _emake all_noverify
+}
+
+src_test() {
+ _emake verify
+}
+
+src_install() {
+ _emake DESTDIR="${D}" install
+ keepdir /etc/wireless-regdb/pubkeys
+}
diff --git a/net-wireless/crda/crda-1.1.3.ebuild b/net-wireless/crda/crda-1.1.3.ebuild
new file mode 100644
index 00000000000..de5647a41a0
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs python udev
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl:0
+ dev-libs/libnl:3
+ net-wireless/wireless-regdb"
+DEPEND="${RDEPEND}
+ dev-python/m2crypto
+ =dev-lang/python-2*
+ virtual/pkgconfig"
+
+src_prepare() {
+ python_convert_shebangs 2 utils/key2pub.py
+
+ epatch "${FILESDIR}"/${P}-missing-include.patch
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
+ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin \
+ USE_OPENSSL=1 \
+ CC="$(tc-getCC)" \
+ all_noverify V=1
+}
+
+src_test() {
+ emake USE_OPENSSL=1 CC="$(tc-getCC)" verify
+}
+
+src_install() {
+ emake \
+ UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
+ REG_BIN=/usr/$(get_libdir)/crda/regulatory.bin \
+ USE_OPENSSL=1 \
+ DESTDIR="${D}" \
+ install
+
+ keepdir /etc/wireless-regdb/pubkeys
+}
diff --git a/net-wireless/crda/crda-3.18.ebuild b/net-wireless/crda/crda-3.18.ebuild
new file mode 100644
index 00000000000..f976625a92d
--- /dev/null
+++ b/net-wireless/crda/crda-3.18.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils toolchain-funcs python-any-r1 udev
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks"
+HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/crda"
+SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.xz
+ mirror://kernel/software/network/crda/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gcrypt"
+
+RDEPEND="!gcrypt? ( dev-libs/openssl:0 )
+ gcrypt? ( dev-libs/libgcrypt:0 )
+ dev-libs/libnl:3
+ net-wireless/wireless-regdb"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')
+ virtual/pkgconfig"
+
+python_check_deps() {
+ has_version --host-root "dev-python/m2crypto[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.18-no-ldconfig.patch
+ epatch "${FILESDIR}"/${PN}-3.18-no-werror.patch
+ epatch "${FILESDIR}"/${PN}-3.18-openssl.patch
+ epatch "${FILESDIR}"/${PN}-3.18-cflags.patch
+ epatch "${FILESDIR}"/${PN}-3.18-libreg-link.patch #542436
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ Makefile || die
+}
+
+_emake() {
+ # The source hardcodes /usr/lib/crda/ paths (ignoring all make vars
+ # that look like it should change it). We want to use /usr/lib/
+ # anyways as this file is not ABI specific and we want to share it
+ # among all ABIs rather than pointlessly duplicate it.
+ #
+ # The trailing slash on SBINDIR is required by the source.
+ emake \
+ PREFIX="${EPREFIX}/usr" \
+ SBINDIR='$(PREFIX)/sbin/' \
+ LIBDIR='$(PREFIX)/'"$(get_libdir)" \
+ UDEV_RULE_DIR="$(get_udevdir)/rules.d" \
+ REG_BIN="${SYSROOT}"/usr/lib/crda/regulatory.bin \
+ USE_OPENSSL=$(usex gcrypt 0 1) \
+ CC="$(tc-getCC)" \
+ V=1 \
+ WERROR= \
+ "$@"
+}
+
+src_compile() {
+ _emake all_noverify
+}
+
+src_test() {
+ _emake verify
+}
+
+src_install() {
+ _emake DESTDIR="${D}" install
+ keepdir /etc/wireless-regdb/pubkeys
+}
diff --git a/net-wireless/crda/files/crda-1.1.3-missing-include.patch b/net-wireless/crda/files/crda-1.1.3-missing-include.patch
new file mode 100644
index 00000000000..a472e238f66
--- /dev/null
+++ b/net-wireless/crda/files/crda-1.1.3-missing-include.patch
@@ -0,0 +1,11 @@
+diff --git a/reglib.c b/reglib.c
+index bc81974..1fafd37 100644
+--- a/reglib.c
++++ b/reglib.c
+@@ -9,6 +9,7 @@
+ #include <fcntl.h>
+ #include <stdbool.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include <arpa/inet.h> /* ntohl */
diff --git a/net-wireless/crda/files/crda-3.18-cflags.patch b/net-wireless/crda/files/crda-3.18-cflags.patch
new file mode 100644
index 00000000000..6edbded822c
--- /dev/null
+++ b/net-wireless/crda/files/crda-3.18-cflags.patch
@@ -0,0 +1,33 @@
+From c5b0741ea7fc12e9f6a2a309296ed412a999d0f7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 4 Mar 2015 14:09:50 -0500
+Subject: [PATCH] clean up CFLAGS handling
+
+Rather than append -O2 -g all the time to the user's CFLAGS (and thus
+clobbering whatever they have set up), initialize the default value to
+that and let the user override it entirely.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5f988f4..8e345a1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -26,9 +26,9 @@ PUBKEY_DIR?=pubkeys
+ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
+
+ WERROR = -Werror
+-CFLAGS += -O2 -fpic
++CFLAGS ?= -O2 -g
++CFLAGS += -fpic
+ CFLAGS += -std=gnu99 -Wall $(WERROR) -pedantic
+-CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+ LDLIBS += -lm
+--
+2.3.1
+
diff --git a/net-wireless/crda/files/crda-3.18-libreg-link.patch b/net-wireless/crda/files/crda-3.18-libreg-link.patch
new file mode 100644
index 00000000000..0aa1b6e87a3
--- /dev/null
+++ b/net-wireless/crda/files/crda-3.18-libreg-link.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/542436
+
+From f56ab87b25f2228a67ac592a1c18793c72dd03eb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 7 Mar 2015 22:29:33 -0500
+Subject: [PATCH crda] libreg: link against crypto libs
+
+Since libreg uses funcs from the crypto lib, make sure we link them.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8e345a1..77708e6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -117,7 +117,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(LIBREG): regdb.h reglib.h reglib.c
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(filter-out -lreg,$(LDLIBS))
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
+--
+2.3.1
+
diff --git a/net-wireless/crda/files/crda-3.18-no-ldconfig.patch b/net-wireless/crda/files/crda-3.18-no-ldconfig.patch
new file mode 100644
index 00000000000..a5cc42084d5
--- /dev/null
+++ b/net-wireless/crda/files/crda-3.18-no-ldconfig.patch
@@ -0,0 +1,28 @@
+From b11d83df189670defe4a29c624f2930351c13df2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 4 Mar 2015 13:56:36 -0500
+Subject: [PATCH] do not run ldconfig
+
+Let the distro/user deal with ldconfig updating. Running it blindly like
+this breaks DESTDIR installs as `ldconfig` only operates on system paths.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a3ead30..46c683d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -127,7 +127,6 @@ install-libreg:
+ $(NQ) ' INSTALL libreg'
+ $(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
+ $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
+- $(Q)ldconfig
+
+ %.o: %.c regdb.h $(LIBREG)
+ $(NQ) ' CC ' $@
+--
+2.3.1
+
diff --git a/net-wireless/crda/files/crda-3.18-no-werror.patch b/net-wireless/crda/files/crda-3.18-no-werror.patch
new file mode 100644
index 00000000000..6abb78c984e
--- /dev/null
+++ b/net-wireless/crda/files/crda-3.18-no-werror.patch
@@ -0,0 +1,32 @@
+From 37384d22ba0ab622a5848a9a794084e6064fc905 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 4 Mar 2015 14:03:44 -0500
+Subject: [PATCH] allow people to turn off -Werror
+
+Forcing -Werror at build time easily breaks across compiler settings,
+compiler versions, architectures, C libraries, etc... Add a knob so
+distro peeps can turn it off.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 46c683d..5f988f4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -25,8 +25,9 @@ UDEV_RULE_DIR?=/lib/udev/rules.d/
+ PUBKEY_DIR?=pubkeys
+ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
+
++WERROR = -Werror
+ CFLAGS += -O2 -fpic
+-CFLAGS += -std=gnu99 -Wall -Werror -pedantic
++CFLAGS += -std=gnu99 -Wall $(WERROR) -pedantic
+ CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+--
+2.3.1
+
diff --git a/net-wireless/crda/files/crda-3.18-openssl.patch b/net-wireless/crda/files/crda-3.18-openssl.patch
new file mode 100644
index 00000000000..9147e862ee5
--- /dev/null
+++ b/net-wireless/crda/files/crda-3.18-openssl.patch
@@ -0,0 +1,44 @@
+From af009b7599d705a1023d7bc95c485e5a8776d2b8 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 4 Mar 2015 14:07:37 -0500
+Subject: [PATCH] fix openssl generation
+
+This file uses BN_ULONG but doesn't include the openssl headers leading
+to build failures:
+keys-ssl.c:2:8: error: unknown type name 'BN_ULONG'
+ static BN_ULONG e_0[1] = {
+
+The large unqualified constants also break building:
+keys-ssl.c:8:2: warning: overflow in implicit constant conversion [-Woverflow]
+ 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b,
+ ^
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ utils/key2pub.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 3e84cd2..c504aca 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -24,7 +24,7 @@ def print_ssl_64(output, name, val):
+ for v1, v2, v3, v4, v5, v6, v7, v8 in vnew:
+ if not idx:
+ output.write('\t')
+- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
++ output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2xULL, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
+ idx += 1
+ if idx == 2:
+ idx = 0
+@@ -60,6 +60,7 @@ def print_ssl_32(output, name, val):
+ def print_ssl(output, name, val):
+ import struct
+ output.write('#include <stdint.h>\n')
++ output.write('#include <openssl/bn.h>\n')
+ if len(struct.pack('@L', 0)) == 8:
+ return print_ssl_64(output, name, val)
+ else:
+--
+2.3.1
+
diff --git a/net-wireless/crda/files/libnl31-support.diff b/net-wireless/crda/files/libnl31-support.diff
new file mode 100644
index 00000000000..56243ee9c69
--- /dev/null
+++ b/net-wireless/crda/files/libnl31-support.diff
@@ -0,0 +1,60 @@
+diff -aurp a/crda-1.1.2/crda.c b/crda-1.1.2/crda.c
+--- a/crda-1.1.2/crda.c 2011-11-07 19:52:28.884873650 +0000
++++ b/crda-1.1.2/crda.c 2011-11-07 19:53:30.501874372 +0000
+@@ -21,7 +21,7 @@
+ #include "regdb.h"
+ #include "reglib.h"
+
+-#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30)
++#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && !defined(CONFIG_LIBNL31)
+ /* libnl 2.0 compatibility code */
+ static inline struct nl_handle *nl_socket_alloc(void)
+ {
+@@ -44,7 +44,7 @@ static inline int __genl_ctrl_alloc_cach
+
+ #define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
+ #define nl_sock nl_handle
+-#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 */
++#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 && CONFIG_LIBNL31 */
+
+ struct nl80211_state {
+ struct nl_sock *nl_sock;
+diff -aurp a/crda-1.1.2/Makefile b/crda-1.1.2/Makefile
+--- a/crda-1.1.2/Makefile 2011-11-07 19:52:28.884873650 +0000
++++ b/crda-1.1.2/Makefile 2011-11-07 19:54:25.906872386 +0000
+@@ -48,19 +48,26 @@ INSTALL ?= install
+ NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
+ NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y)
+ NL3FOUND := $(shell pkg-config --atleast-version=3 libnl-3.0 && echo Y)
++NL31FOUND := $(shell pkg-config --atleast-version=3 libnl-3.1 && echo Y)
+
+-ifeq ($(NL3FOUND),Y)
++ifeq ($(NL31FOUND),Y)
+ CFLAGS += -DCONFIG_LIBNL30
+-NLLIBS += -lnl-genl
+-NLLIBNAME = libnl-3.0
++NLLIBS += $(shell pkg-config --libs libnl-genl-3.1)
++NLLIBNAME = libnl-3.1
+ else
+- ifeq ($(NL2FOUND),Y)
+- CFLAGS += -DCONFIG_LIBNL20
+- NLLIBS += -lnl-genl
+- NLLIBNAME = libnl-2.0
++ ifeq ($(NL3FOUND),Y)
++ CFLAGS += -DCONFIG_LIBNL30
++ NLLIBS += $(shell pkg-config --libs libnl-genl-3.0)
++ NLLIBNAME = libnl-3.0
+ else
+- ifeq ($(NL1FOUND),Y)
+- NLLIBNAME = libnl-1
++ ifeq ($(NL2FOUND),Y)
++ CFLAGS += -DCONFIG_LIBNL20
++ NLLIBS += -lnl-genl
++ NLLIBNAME = libnl-2.0
++ else
++ ifeq ($(NL1FOUND),Y)
++ NLLIBNAME = libnl-1
++ endif
+ endif
+ endif
+ endif
diff --git a/net-wireless/crda/metadata.xml b/net-wireless/crda/metadata.xml
new file mode 100644
index 00000000000..784df934cb0
--- /dev/null
+++ b/net-wireless/crda/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <use>
+ <flag name='gcrypt'>Use libgcrypt instead of openssl for key checking</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-wireless/dump1090/Manifest b/net-wireless/dump1090/Manifest
new file mode 100644
index 00000000000..fdb997c2292
--- /dev/null
+++ b/net-wireless/dump1090/Manifest
@@ -0,0 +1 @@
+DIST dump1090-0.0_p20140919.tar.xz 445108 SHA256 5c2248e092036a0f40cd719c79a5f6d7eb089c394ca7d3966c281985d16866e4 SHA512 4b7f915d5dd9c728da36298ecfe6c0e1da17bb9082e5f1c41376e6425dce429c099b0fd2d8436a966f5d3189788b818602f26fb0aea62e5dbe753e489bf0a760 WHIRLPOOL 046b8f70a68fc7b46a787e885e5323ce53ca216cf060f0f64081265d110a6353128191a99e7a1a4c539db3c547b0fcf81312badaf37f83e70bb71e55f91667bc
diff --git a/net-wireless/dump1090/dump1090-0.0_p20140919.ebuild b/net-wireless/dump1090/dump1090-0.0_p20140919.ebuild
new file mode 100644
index 00000000000..495ceb40f9d
--- /dev/null
+++ b/net-wireless/dump1090/dump1090-0.0_p20140919.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="simple Mode S decoder for RTLSDR devices"
+HOMEPAGE="https://github.com/antirez/dump1090"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/antirez/dump1090.git"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ S="${WORKDIR}/${PN}"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND="net-wireless/rtl-sdr"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/gmap_usr_share_mv.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ CFLAGS="$(pkg-config --cflags librtlsdr)" \
+ LIBS="${LDFLAGS} $(pkg-config --libs librtlsdr) -lm -lpthread" \
+ all
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc TODO README.md
+
+ insinto /usr/share/${PN}
+ doins gmap.html
+ doins tools/debug.html
+}
diff --git a/net-wireless/dump1090/dump1090-9999.ebuild b/net-wireless/dump1090/dump1090-9999.ebuild
new file mode 100644
index 00000000000..495ceb40f9d
--- /dev/null
+++ b/net-wireless/dump1090/dump1090-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="simple Mode S decoder for RTLSDR devices"
+HOMEPAGE="https://github.com/antirez/dump1090"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/antirez/dump1090.git"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ S="${WORKDIR}/${PN}"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND="net-wireless/rtl-sdr"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/gmap_usr_share_mv.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ CFLAGS="$(pkg-config --cflags librtlsdr)" \
+ LIBS="${LDFLAGS} $(pkg-config --libs librtlsdr) -lm -lpthread" \
+ all
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc TODO README.md
+
+ insinto /usr/share/${PN}
+ doins gmap.html
+ doins tools/debug.html
+}
diff --git a/net-wireless/dump1090/files/gmap_usr_share_mv.patch b/net-wireless/dump1090/files/gmap_usr_share_mv.patch
new file mode 100644
index 00000000000..e1450e19f1f
--- /dev/null
+++ b/net-wireless/dump1090/files/gmap_usr_share_mv.patch
@@ -0,0 +1,14 @@
+diff -Naur dump1090-orig/dump1090.c dump1090/dump1090.c
+--- dump1090-orig/dump1090.c 2014-11-17 13:23:59.518047332 -0500
++++ dump1090/dump1090.c 2014-11-17 13:24:33.876048252 -0500
+@@ -2233,8 +2233,8 @@
+ struct stat sbuf;
+ int fd = -1;
+
+- if (stat("gmap.html",&sbuf) != -1 &&
+- (fd = open("gmap.html",O_RDONLY)) != -1)
++ if (stat("/usr/share/dump1090/gmap.html",&sbuf) != -1 &&
++ (fd = open("/usr/share/dump1090/gmap.html",O_RDONLY)) != -1)
+ {
+ content = malloc(sbuf.st_size);
+ if (read(fd,content,sbuf.st_size) == -1) {
diff --git a/net-wireless/dump1090/metadata.xml b/net-wireless/dump1090/metadata.xml
new file mode 100644
index 00000000000..5c64bb297ea
--- /dev/null
+++ b/net-wireless/dump1090/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">antirez/dump1090</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/gnome-bluetooth/Manifest b/net-wireless/gnome-bluetooth/Manifest
new file mode 100644
index 00000000000..5e81e3de023
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/Manifest
@@ -0,0 +1,3 @@
+DIST gnome-bluetooth-3.14.0.tar.xz 1350300 SHA256 e2ef5e0036748eeb4756e8cb57e9909f10b771d290086dd1f377451d3fe18b09 SHA512 5df9367bf7ac08a896d2a34b855c06c0f9f2b8485f1f549659ee42b9ccea5db0983eef271b4611cfc234f590e4cca7485f353342efbe1e28e7068d4d6c2a0beb WHIRLPOOL 920ff7993a3f74bc5da0343097c7a8e1354ab95feda97cff1c8a87f991a6cae6259593a39f072199ae1ef320739b7dd074c5078e6fa66cbf23ed5874c22748ca
+DIST gnome-bluetooth-3.14.1.tar.xz 1355116 SHA256 3d2f6161c43d4c53af37979d6d7ff8714211676bffa80e211f168819e64bb4c9 SHA512 64ccc7fe32b9dce2513caca4e785133376d8ab776cdfe4d6a8146897b4a526cd4426f81d55fddec8971614b4b0a15523ebde9cde0f628aed10c807b2c1d9ad48 WHIRLPOOL 5bfbd131ca17f05a071dfccf627d488fb61e0375a172a627d96152e5bc82294d03a5e1b5cb04ca44921e440d774fd43219843ed1f6153d8a53deac567b8d08b0
+DIST gnome-bluetooth-3.16.1.tar.xz 1357388 SHA256 3feb202d6780a53bc4a570eab5b0179f9351b32c1d3f28151ac2d222453ae08b SHA512 811db04e1ab91585031e86cb55ee7764b0f0dfd88682afaee2e67f99af12619c540a48a3879afd8fb66e39cb35917f637b637e4b6f3ab8b8e908351426b77576 WHIRLPOOL 3019d80e64d5009f06480a65f19bf1b46daaeda4071345e0fea7da666d28301c51d6daf4a671c9582fbf64ff8e5b923444054e68c5a85d0a0e97351ed0bff648
diff --git a/net-wireless/gnome-bluetooth/files/61-gnome-bluetooth.rules b/net-wireless/gnome-bluetooth/files/61-gnome-bluetooth.rules
new file mode 100644
index 00000000000..50657408212
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/files/61-gnome-bluetooth.rules
@@ -0,0 +1,11 @@
+# Get access to /dev/rfkill for users
+# See https://bugzilla.redhat.com/show_bug.cgi?id=514798
+#
+# Updated for udev >= 154
+# http://bugs.debian.org/582188
+# https://bugzilla.redhat.com/show_bug.cgi?id=588660
+
+ENV{ACL_MANAGE}=="0", GOTO="gnome_bluetooth_end"
+ACTION!="add|change", GOTO="gnome_bluetooth_end"
+KERNEL=="rfkill", GROUP="plugdev", MODE="0664", TAG+="udev-acl"
+LABEL="gnome_bluetooth_end"
diff --git a/net-wireless/gnome-bluetooth/files/gnome-bluetooth-3.12.0-gold.patch b/net-wireless/gnome-bluetooth/files/gnome-bluetooth-3.12.0-gold.patch
new file mode 100644
index 00000000000..411e64b530d
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/files/gnome-bluetooth-3.12.0-gold.patch
@@ -0,0 +1,54 @@
+From 34f21eea0ae2b7bace570eb2d49cf868699e9213 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 25 Mar 2014 14:25:04 +0100
+Subject: [PATCH] build: Explicitely link to libm
+
+For the "pow()" call.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=726693
+---
+ configure.ac | 2 ++
+ gnome-bluetooth-1.0.pc.in | 2 +-
+ lib/Makefile.am | 2 +-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 31e47f7..f7a74ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,6 +51,8 @@ GLIB_GSETTINGS
+
+ AC_PATH_PROG([XMLLINT],[xmllint])
+
++AC_CHECK_LIB([m],[sin])
++
+ dnl gtk-doc checks
+ GTK_DOC_CHECK(1.9)
+
+diff --git a/gnome-bluetooth-1.0.pc.in b/gnome-bluetooth-1.0.pc.in
+index 4350bc8..46d7dc1 100644
+--- a/gnome-bluetooth-1.0.pc.in
++++ b/gnome-bluetooth-1.0.pc.in
+@@ -8,5 +8,5 @@ Description: Widgets for Bluetooth device selection
+ Version: @VERSION@
+ Requires: gtk+-3.0 gio-2.0
+ Requires.private: libudev
+-Libs: -L${libdir} -lgnome-bluetooth
++Libs: -L${libdir} -lgnome-bluetooth -lm
+ Cflags: -I${includedir}/gnome-bluetooth
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index c558d0c..c110c27 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -48,7 +48,7 @@ libgnome_bluetooth_la_SOURCES = \
+ $(libgnome_bluetooth_private_headers) \
+ $(libgnome_bluetooth_c_sources)
+
+-libgnome_bluetooth_la_LIBADD = $(LIBGNOMEBT_LIBS)
++libgnome_bluetooth_la_LIBADD = $(LIBGNOMEBT_LIBS) $(LIBS)
+
+ libgnome_bluetooth_la_LDFLAGS = \
+ -version-info $(GNOMEBT_LT_VERSION) \
+--
+2.0.0
+
diff --git a/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.0.ebuild b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.0.ebuild
new file mode 100644
index 00000000000..c46c91f0e43
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit eutils gnome2 udev user
+
+DESCRIPTION="Bluetooth graphical utilities integrated with GNOME"
+HOMEPAGE="https://wiki.gnome.org/GnomeBluetooth"
+
+LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
+SLOT="2/13" # subslot = libgnome-bluetooth soname version
+IUSE="+introspection"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.37.3:2
+ >=x11-libs/gtk+-3.11.2:3[introspection?]
+ virtual/udev
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=net-wireless/bluez-5
+ x11-themes/gnome-icon-theme-symbolic
+"
+DEPEND="${COMMON_DEPEND}
+ !net-wireless/bluez-gnome
+ app-text/docbook-xml-dtd:4.1.2
+ dev-libs/libxml2:2
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.9
+ >=dev-util/intltool-0.40.0
+ virtual/libudev
+ virtual/pkgconfig
+ x11-proto/xproto
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Regenerate gdbus-codegen files to allow using any glib version; bug #436236
+ rm -v lib/bluetooth-client-glue.{c,h} || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ --enable-documentation \
+ --disable-desktop-update \
+ --disable-icon-update \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+ udev_dorules "${FILESDIR}"/61-${PN}.rules
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ if ! has_version sys-auth/consolekit[acl] && ! has_version sys-apps/systemd[acl] ; then
+ elog "Don't forget to add yourself to the plugdev group "
+ elog "if you want to be able to control bluetooth transmitter."
+ fi
+}
diff --git a/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.1.ebuild b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.1.ebuild
new file mode 100644
index 00000000000..c46c91f0e43
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.14.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit eutils gnome2 udev user
+
+DESCRIPTION="Bluetooth graphical utilities integrated with GNOME"
+HOMEPAGE="https://wiki.gnome.org/GnomeBluetooth"
+
+LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
+SLOT="2/13" # subslot = libgnome-bluetooth soname version
+IUSE="+introspection"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.37.3:2
+ >=x11-libs/gtk+-3.11.2:3[introspection?]
+ virtual/udev
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=net-wireless/bluez-5
+ x11-themes/gnome-icon-theme-symbolic
+"
+DEPEND="${COMMON_DEPEND}
+ !net-wireless/bluez-gnome
+ app-text/docbook-xml-dtd:4.1.2
+ dev-libs/libxml2:2
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.9
+ >=dev-util/intltool-0.40.0
+ virtual/libudev
+ virtual/pkgconfig
+ x11-proto/xproto
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Regenerate gdbus-codegen files to allow using any glib version; bug #436236
+ rm -v lib/bluetooth-client-glue.{c,h} || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ --enable-documentation \
+ --disable-desktop-update \
+ --disable-icon-update \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+ udev_dorules "${FILESDIR}"/61-${PN}.rules
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ if ! has_version sys-auth/consolekit[acl] && ! has_version sys-apps/systemd[acl] ; then
+ elog "Don't forget to add yourself to the plugdev group "
+ elog "if you want to be able to control bluetooth transmitter."
+ fi
+}
diff --git a/net-wireless/gnome-bluetooth/gnome-bluetooth-3.16.1.ebuild b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.16.1.ebuild
new file mode 100644
index 00000000000..c1d6505cfbf
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.16.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit eutils gnome2 udev user
+
+DESCRIPTION="Bluetooth graphical utilities integrated with GNOME"
+HOMEPAGE="https://wiki.gnome.org/GnomeBluetooth"
+
+LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
+SLOT="2/13" # subslot = libgnome-bluetooth soname version
+IUSE="+introspection"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.38:2
+ >=x11-libs/gtk+-3.12:3[introspection?]
+ virtual/udev
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=net-wireless/bluez-5
+ x11-themes/gnome-icon-theme-symbolic
+"
+DEPEND="${COMMON_DEPEND}
+ !net-wireless/bluez-gnome
+ app-text/docbook-xml-dtd:4.1.2
+ dev-libs/libxml2:2
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.9
+ >=dev-util/intltool-0.40.0
+ virtual/libudev
+ virtual/pkgconfig
+ x11-proto/xproto
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Regenerate gdbus-codegen files to allow using any glib version; bug #436236
+ rm -v lib/bluetooth-client-glue.{c,h} || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ --enable-documentation \
+ --disable-desktop-update \
+ --disable-icon-update \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+ udev_dorules "${FILESDIR}"/61-${PN}.rules
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ if ! has_version sys-auth/consolekit[acl] && ! has_version sys-apps/systemd[acl] ; then
+ elog "Don't forget to add yourself to the plugdev group "
+ elog "if you want to be able to control bluetooth transmitter."
+ fi
+}
diff --git a/net-wireless/gnome-bluetooth/metadata.xml b/net-wireless/gnome-bluetooth/metadata.xml
new file mode 100644
index 00000000000..da6fd63d008
--- /dev/null
+++ b/net-wireless/gnome-bluetooth/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/net-wireless/gnuradio/Manifest b/net-wireless/gnuradio/Manifest
new file mode 100644
index 00000000000..ed80eb45de2
--- /dev/null
+++ b/net-wireless/gnuradio/Manifest
@@ -0,0 +1,3 @@
+DIST gnuradio-3.6.5.1.tar.gz 3150283 SHA256 0875d2f0a7da0f3bcc1771b528b0f98f79d9ab69aa1ef953651bbbe1f57b4621 SHA512 23a22aed482da11005b17e5197ee3ba24d442b30309522b0858e694b58f46b76cc050143d365623c7dd4241cdf8b9f988e1a4dabe2e1f98d0fd4cca71bbb82e8 WHIRLPOOL 7cf55be5fac7891a737d228d83718bbc43f9069c6275c5ac465ae11088559dca5e7fa31239e281271b529aa8b9ae1a0efe3850a16a40e53c0f1fe57e351ff2a8
+DIST gnuradio-3.7.6.1.tar.gz 3588833 SHA256 39dede70eec36f430c4895900bbd7ed266aa9e846d0a362987e806b7197c4c0b SHA512 88ec30b2bd93ca032c29f4606856a8e70b0123474fd84115657804429f381dea78f97a7523c9684acad6a27b357ddf876632e957de5c6e0170045dc38d121939 WHIRLPOOL 97d70e403fe46b0afbd1e6f0812f8d9de4ea506dcb2190a23d9a0f0499662f9e2bbaa86d1b624f7c621ae1675094f92cd295bc273db0759b2647e2dfb2a49b43
+DIST gnuradio-3.7.7.1.tar.gz 3845988 SHA256 2b27b13fc734ab5882e42c1661d433c0c097fd8b55b682f00626fa96c356584e SHA512 7be9568d19cbe03f3c229dbda5fc8d448a4a57d84bd9f8b91a400c65b526414539536c0a391b15d5f0e63bf22ef5675dc3ed8a6ed94ce3b1e4328948fa202ba1 WHIRLPOOL c54e26af37ecb27dd515d1ca320ccf363f6a9bbff61724f7d98f751d69a32ba21f2a631ce07caf273596f4297ff92359d2469768cd927ae9d680c8a8bbd25dbd
diff --git a/net-wireless/gnuradio/files/gnuradio-3.6.1-automagic-audio.patch b/net-wireless/gnuradio/files/gnuradio-3.6.1-automagic-audio.patch
new file mode 100644
index 00000000000..4fa1c664145
--- /dev/null
+++ b/net-wireless/gnuradio/files/gnuradio-3.6.1-automagic-audio.patch
@@ -0,0 +1,90 @@
+diff -ur a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
+--- a/gr-audio/lib/CMakeLists.txt 2012-06-11 17:55:20.000000000 +0200
++++ b/gr-audio/lib/CMakeLists.txt 2012-06-12 23:34:58.601611171 +0200
+@@ -38,7 +38,11 @@
+ ########################################################################
+ find_package(ALSA)
+
+-if(ALSA_FOUND)
++GR_REGISTER_COMPONENT("gr-audio-alsa" ENABLE_GR_AUDIO_ALSA
++ ALSA_FOUND
++)
++
++if(ALSA_FOUND AND ENABLE_GR_AUDIO_ALSA)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${ALSA_LIBRARIES})
+@@ -49,14 +53,18 @@
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf)
+
+-endif(ALSA_FOUND)
++endif(ALSA_FOUND AND ENABLE_GR_AUDIO_ALSA)
+
+ ########################################################################
+ ## OSS Support
+ ########################################################################
+ find_package(OSS)
+
+-if(OSS_FOUND)
++GR_REGISTER_COMPONENT("gr-audio-oss" ENABLE_GR_AUDIO_OSS
++ OSS_FOUND
++)
++
++if(OSS_FOUND AND ENABLE_GR_AUDIO_OSS)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS})
+ list(APPEND gr_audio_sources
+@@ -65,7 +73,7 @@
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf)
+
+-endif(OSS_FOUND)
++endif(OSS_FOUND AND ENABLE_GR_AUDIO_OSS)
+
+
+ ########################################################################
+@@ -73,7 +81,11 @@
+ ########################################################################
+ find_package(Jack)
+
+-if(JACK_FOUND)
++GR_REGISTER_COMPONENT("gr-audio-jack" ENABLE_GR_AUDIO_JACK
++ JACK_FOUND
++)
++
++if(JACK_FOUND AND ENABLE_GR_AUDIO_JACK)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${JACK_LIBRARIES})
+@@ -85,7 +97,7 @@
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf)
+
+-endif(JACK_FOUND)
++endif(JACK_FOUND AND ENABLE_GR_AUDIO_JACK)
+
+ ########################################################################
+ ## OSX Support
+@@ -115,7 +127,11 @@
+ ########################################################################
+ find_package(Portaudio)
+
+-if(PORTAUDIO_FOUND)
++GR_REGISTER_COMPONENT("gr-audio-portaudio" ENABLE_GR_AUDIO_PORTAUDIO
++ PORTAUDIO_FOUND
++)
++
++if(PORTAUDIO_FOUND AND ENABLE_GR_AUDIO_PORTAUDIO)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES})
+@@ -127,7 +143,7 @@
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf)
+
+-endif(PORTAUDIO_FOUND)
++endif(PORTAUDIO_FOUND AND ENABLE_GR_AUDIO_PORTAUDIO)
+
+ ########################################################################
+ ## Windows Support
diff --git a/net-wireless/gnuradio/files/gnuradio-3.7.4-include_stringh.patch b/net-wireless/gnuradio/files/gnuradio-3.7.4-include_stringh.patch
new file mode 100644
index 00000000000..1450e101cd0
--- /dev/null
+++ b/net-wireless/gnuradio/files/gnuradio-3.7.4-include_stringh.patch
@@ -0,0 +1,18 @@
+commit 09ba248d3fc6afbebb784edfaf5e61413cd05255
+Author: Tom Rondeau <tom@trondeau.com>
+Date: Sun Jul 27 10:50:17 2014 -0400
+
+ volk: adding string.h to puppet for memset calls.
+
+diff --git a/volk/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h b/volk/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h
+index fef9db5..8d31e46 100644
+--- a/volk/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h
++++ b/volk/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h
+@@ -3,6 +3,7 @@
+
+ #include <volk/volk.h>
+ #include <volk/volk_8u_x4_conv_k7_r2_8u.h>
++#include <string.h>
+
+ typedef union {
+ //decision_t is a BIT vector
diff --git a/net-wireless/gnuradio/files/gnuradio-3.7.6.1-qwt-with-qt5-support.patch b/net-wireless/gnuradio/files/gnuradio-3.7.6.1-qwt-with-qt5-support.patch
new file mode 100644
index 00000000000..f155ed51db7
--- /dev/null
+++ b/net-wireless/gnuradio/files/gnuradio-3.7.6.1-qwt-with-qt5-support.patch
@@ -0,0 +1,23 @@
+From b3bdd301debb2eb859473a25b23d068fa66f6cb1 Mon Sep 17 00:00:00 2001
+From: Zero_Chaos <sidhayn@gmail.com>
+Date: Fri, 20 Feb 2015 15:54:00 -0500
+Subject: [PATCH] Update FindQwt.cmake to support qwt6-qt4
+
+allow finding qwt6-qt4 library. Some distros have added support for both qt4 and qt5 in qwt6, the common name the library uses appears to be qwt6-qt4. The pre-existance of the qwt-qt4 entry suggests this naming convention is reasonably standard (or at least this isn't a unique hack)
+---
+ cmake/Modules/FindQwt.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake
+index 68f55bf..3ce49aa 100644
+--- a/cmake/Modules/FindQwt.cmake
++++ b/cmake/Modules/FindQwt.cmake
+@@ -22,7 +22,7 @@ find_path(QWT_INCLUDE_DIRS
+ )
+
+ find_library (QWT_LIBRARIES
+- NAMES qwt6 qwt qwt-qt4
++ NAMES qwt6 qwt6-qt4 qwt qwt-qt4
+ HINTS
+ ${CMAKE_INSTALL_PREFIX}/lib
+ ${CMAKE_INSTALL_PREFIX}/lib64
diff --git a/net-wireless/gnuradio/files/gnuradio-9999-build-type-nonfatal.patch b/net-wireless/gnuradio/files/gnuradio-9999-build-type-nonfatal.patch
new file mode 100644
index 00000000000..f4fcd982b8b
--- /dev/null
+++ b/net-wireless/gnuradio/files/gnuradio-9999-build-type-nonfatal.patch
@@ -0,0 +1,11 @@
+diff -Naur gnuradio-9999/cmake/Modules/GrBuildTypes.cmake gnuradio-9999-hacked/cmake/Modules/GrBuildTypes.cmake
+--- gnuradio-9999/cmake/Modules/GrBuildTypes.cmake 2014-07-26 01:54:47.645866658 -0400
++++ gnuradio-9999-hacked/cmake/Modules/GrBuildTypes.cmake 2014-07-26 01:56:47.193869859 -0400
+@@ -61,7 +61,6 @@
+ endif(${_settype} STREQUAL ${_btype})
+ endforeach(btype)
+ # Build type not found; error out
+- message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}")
+ endfunction(GR_CHECK_BUILD_TYPE)
+
+ ########################################################################
diff --git a/net-wireless/gnuradio/gnuradio-3.6.5.1-r2.ebuild b/net-wireless/gnuradio/gnuradio-3.6.5.1-r2.ebuild
new file mode 100644
index 00000000000..c958b9db163
--- /dev/null
+++ b/net-wireless/gnuradio/gnuradio-3.6.5.1-r2.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils fdo-mime python-single-r1
+
+DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
+HOMEPAGE="http://gnuradio.org/"
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://gnuradio.org/git/gnuradio.git"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="http://gnuradio.org/releases/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+IUSE="alsa +analog +digital doc examples fcd +filter grc jack oss pager performance-counters portaudio qt4 sdl uhd +utils wavelet wxwidgets"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ analog? ( filter )
+ digital? ( filter analog )
+ pager? ( filter analog )
+ qt4? ( filter )
+ uhd? ( filter analog )
+ fcd? ( || ( alsa oss ) )
+ wavelet? ( analog )
+ wxwidgets? ( filter analog )"
+
+# bug #348206
+# comedi? ( >=sci-electronics/comedilib-0.7 )
+# boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
+RDEPEND="${PYTHON_DEPS}
+ >=dev-lang/orc-0.4.12
+ dev-libs/boost:0=[${PYTHON_USEDEP}]
+ !<=dev-libs/boost-1.52.0-r6:0/1.52
+ dev-util/cppunit
+ sci-libs/fftw:3.0=
+ fcd? ( virtual/libusb:1 )
+ alsa? (
+ media-libs/alsa-lib[${PYTHON_USEDEP}]
+ )
+ grc? (
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ )
+ portaudio? (
+ >=media-libs/portaudio-19_pre
+ )
+ qt4? (
+ dev-python/PyQt4[X,opengl,${PYTHON_USEDEP}]
+ dev-python/pyqwt:5
+ dev-qt/qtgui:4
+ )
+ sdl? ( media-libs/libsdl )
+ uhd? ( >=net-wireless/uhd-3.4.3-r1:=[${PYTHON_USEDEP}] )
+ wavelet? (
+ sci-libs/gsl
+ )
+ wxwidgets? (
+ dev-python/wxpython:2.8[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ doc? (
+ >=app-doc/doxygen-1.5.7.1
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ grc? (
+ x11-misc/xdg-utils
+ )
+ oss? (
+ virtual/os-headers
+ )
+"
+
+src_prepare() {
+ # Useless UI element would require qt3support, bug #365019
+ sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
+ epatch "${FILESDIR}"/${PN}-3.6.1-automagic-audio.patch
+}
+
+src_configure() {
+ # TODO: docs are installed to /usr/share/doc/${PN} not /usr/share/doc/${PF}
+ # SYSCONFDIR/GR_PREFSDIR default to install below CMAKE_INSTALL_PREFIX
+ mycmakeargs=(
+ $(cmake-utils_use_enable alsa GR_AUDIO_ALSA) \
+ $(cmake-utils_use_enable analog GR_ANALOG) \
+ $(cmake-utils_use_enable digital GR_DIGITAL) \
+ $(cmake-utils_use_enable doc DOXYGEN) \
+ $(cmake-utils_use_enable doc SPHINX) \
+ $(cmake-utils_use_enable fcd GR_FCD) \
+ $(cmake-utils_use_enable filter GR_FILTER) \
+ $(cmake-utils_use_enable grc GRC) \
+ $(cmake-utils_use_enable jack GR_AUDIO_JACK) \
+ $(cmake-utils_use_enable oss GR_AUDIO_OSS) \
+ $(cmake-utils_use_enable pager GR_PAGER) \
+ $(cmake-utils_use_enable performance-counters ENABLE_PERFORMANCE_COUNTERS) \
+ $(cmake-utils_use_enable portaudio GR_AUDIO_PORTAUDIO) \
+ $(cmake-utils_use_enable uhd GR_UHD) \
+ $(cmake-utils_use_enable utils GR_UTILS) \
+ $(cmake-utils_use_enable wavelet GR_WAVELET) \
+ $(cmake-utils_use_enable wxwidgets GR_WXGUI) \
+ $(cmake-utils_use_enable qt4 GR_QTGUI) \
+ $(cmake-utils_use_enable sdl GR_VIDEO_SDL) \
+ -DENABLE_GR_CORE=ON \
+ -DSYSCONFDIR="${EPREFIX}"/etc \
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ )
+ use qt4 && mycmakeargs+=( -DQWT_INCLUDE_DIRS="${EPREFIX}"/usr/include/qwt5 )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ dodir /usr/share/doc/${PF}/
+ mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
+ else
+ # It seems that the examples are always installed
+ rm -rf "${ED}"/usr/share/${PN}/examples || die
+ fi
+
+ # We install the mimetypes to the correct locations from the ebuild
+ rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
+ rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
+
+ # Install icons, menu items and mime-types for GRC
+ if use grc ; then
+ local fd_path="${S}/grc/freedesktop"
+ insinto /usr/share/mime/packages
+ doins "${fd_path}/${PN}-grc.xml"
+
+ domenu "${fd_path}/"*.desktop
+ doicon "${fd_path}/"*.png
+ fi
+
+ python_fix_shebang "${ED}"
+}
+
+src_test()
+{
+ ctest -E qtgui
+}
+
+pkg_postinst()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
+ || die "icon resource installation failed"
+ xdg-icon-resource install --noupdate --context apps --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
+ || die "icon resource installation failed"
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
+
+pkg_postrm()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
+ application-gnuradio-grc || ewarn "icon uninstall failed"
+ xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
+ gnuradio-grc || ewarn "icon uninstall failed"
+
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
diff --git a/net-wireless/gnuradio/gnuradio-3.7.6.1-r2.ebuild b/net-wireless/gnuradio/gnuradio-3.7.6.1-r2.ebuild
new file mode 100644
index 00000000000..96c7965bdf6
--- /dev/null
+++ b/net-wireless/gnuradio/gnuradio-3.7.6.1-r2.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+CMAKE_BUILD_TYPE="None"
+inherit cmake-utils fdo-mime gnome2-utils python-single-r1 eutils
+
+DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
+HOMEPAGE="http://gnuradio.org/"
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://gnuradio.org/git/gnuradio.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="http://s3-dist.gnuradio.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+IUSE="+audio +alsa atsc +analog +digital channels doc dtv examples fcd fec +filter grc jack log noaa oss pager performance-counters portaudio +qt4 sdl test trellis uhd vocoder +utils wavelet wxwidgets zeromq"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ audio? ( || ( alsa oss jack portaudio ) )
+ alsa? ( audio )
+ oss? ( audio )
+ jack? ( audio )
+ portaudio? ( audio )
+ analog? ( filter )
+ digital? ( filter analog )
+ dtv? ( fec )
+ pager? ( filter analog )
+ qt4? ( filter )
+ uhd? ( filter analog )
+ fcd? ( || ( alsa oss ) )
+ wavelet? ( analog )
+ wxwidgets? ( filter analog )"
+
+# bug #348206
+# comedi? ( >=sci-electronics/comedilib-0.8 )
+# boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
+RDEPEND="${PYTHON_DEPS}
+ >=dev-lang/orc-0.4.12
+ dev-libs/boost:0=[${PYTHON_USEDEP}]
+ !<=dev-libs/boost-1.52.0-r6:0/1.52
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/fftw:3.0=
+ alsa? (
+ media-libs/alsa-lib[${PYTHON_USEDEP}]
+ )
+ fcd? ( virtual/libusb:1 )
+ filter? ( sci-libs/scipy )
+ grc? (
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
+ )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ )
+ log? ( dev-libs/log4cpp )
+ portaudio? (
+ >=media-libs/portaudio-19_pre
+ )
+ qt4? (
+ >=dev-python/PyQt4-4.4[X,opengl,${PYTHON_USEDEP}]
+ >=dev-python/pyqwt-5.2:5[${PYTHON_USEDEP}]
+ >=dev-qt/qtcore-4.4:4
+ >=dev-qt/qtgui-4.4:4
+ x11-libs/qwt:6
+ )
+ sdl? ( >=media-libs/libsdl-1.2.0 )
+ uhd? ( >=net-wireless/uhd-3.4.3-r1:=[${PYTHON_USEDEP}] )
+ utils? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ vocoder? ( media-sound/gsm )
+ wavelet? (
+ >=sci-libs/gsl-1.10
+ )
+ wxwidgets? (
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/wxpython:2.8[${PYTHON_USEDEP}]
+ )
+ zeromq? ( >=net-libs/zeromq-2.1.11 )
+ "
+
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ doc? (
+ >=app-doc/doxygen-1.5.7.1
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ grc? ( x11-misc/xdg-utils )
+ oss? ( virtual/os-headers )
+ test? ( >=dev-util/cppunit-1.9.14 )
+ zeromq? ( net-libs/cppzmq )
+"
+
+src_prepare() {
+ gnome2_environment_reset #534582
+
+ # Useless UI element would require qt3support, bug #365019
+ sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
+ epatch "${FILESDIR}/${P}-qwt-with-qt5-support.patch"
+ epatch_user
+}
+
+src_configure() {
+ # TODO: docs are installed to /usr/share/doc/${PN} not /usr/share/doc/${PF}
+ # SYSCONFDIR/GR_PREFSDIR default to install below CMAKE_INSTALL_PREFIX
+ #audio provider is still automagic
+ #zeromq missing deps isn't fatal
+ mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DENABLE_GNURADIO_RUNTIME=ON
+ -DENABLE_VOLK=ON
+ -DENABLE_PYTHON=ON
+ -DENABLE_GR_BLOCKS=ON
+ -DENABLE_GR_FFT=ON
+ -DENABLE_GR_AUDIO=ON
+ $(cmake-utils_use_enable alsa GR_AUDIO_ALSA) \
+ $(cmake-utils_use_enable analog GR_ANALOG) \
+ $(cmake-utils_use_enable atsc GR_ATSC) \
+ $(cmake-utils_use_enable channels GR_CHANNELS) \
+ $(cmake-utils_use_enable digital GR_DIGITAL) \
+ $(cmake-utils_use_enable doc DOXYGEN) \
+ $(cmake-utils_use_enable doc SPHINX) \
+ $(cmake-utils_use_enable dtv GR_DTV) \
+ $(cmake-utils_use_enable fcd GR_FCD) \
+ $(cmake-utils_use_enable fec GR_FEC) \
+ $(cmake-utils_use_enable filter GR_FILTER) \
+ $(cmake-utils_use_enable grc GRC) \
+ $(cmake-utils_use_enable jack GR_AUDIO_JACK) \
+ $(cmake-utils_use_enable log GR_LOG) \
+ $(cmake-utils_use_enable noaa GR_NOAA) \
+ $(cmake-utils_use_enable oss GR_AUDIO_OSS) \
+ $(cmake-utils_use_enable pager GR_PAGER) \
+ $(cmake-utils_use_enable performance-counters ENABLE_PERFORMANCE_COUNTERS) \
+ $(cmake-utils_use_enable portaudio GR_AUDIO_PORTAUDIO) \
+ $(cmake-utils_use_enable test TESTING) \
+ $(cmake-utils_use_enable trellis GR_TRELLIS) \
+ $(cmake-utils_use_enable uhd GR_UHD) \
+ $(cmake-utils_use_enable utils GR_UTILS) \
+ $(cmake-utils_use_enable vocoder GR_VOCODER) \
+ $(cmake-utils_use_enable wavelet GR_WAVELET) \
+ $(cmake-utils_use_enable wxwidgets GR_WXGUI) \
+ $(cmake-utils_use_enable qt4 GR_QTGUI) \
+ $(cmake-utils_use_enable sdl GR_VIDEO_SDL) \
+ $(cmake-utils_use_enable zeromq GR_ZEROMQ) \
+ -DENABLE_GR_CORE=ON \
+ -DSYSCONFDIR="${EPREFIX}"/etc \
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ )
+ use vocoder && mycmakeargs+=( -DGR_USE_SYSTEM_LIBGSM=TRUE )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ dodir /usr/share/doc/${PF}/
+ mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
+ else
+ # It seems that the examples are always installed
+ rm -rf "${ED}"/usr/share/${PN}/examples || die
+ fi
+
+ # We install the mimetypes to the correct locations from the ebuild
+ rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
+ rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
+
+ # Install icons, menu items and mime-types for GRC
+ if use grc ; then
+ local fd_path="${S}/grc/freedesktop"
+ insinto /usr/share/mime/packages
+ doins "${fd_path}/${PN}-grc.xml"
+
+ domenu "${fd_path}/"*.desktop
+ doicon "${fd_path}/"*.png
+ fi
+
+ python_fix_shebang "${ED}"
+}
+
+src_test()
+{
+ ctest -E qtgui
+}
+
+pkg_postinst()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
+ || die "icon resource installation failed"
+ xdg-icon-resource install --noupdate --context apps --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
+ || die "icon resource installation failed"
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
+
+pkg_postrm()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
+ application-gnuradio-grc || ewarn "icon uninstall failed"
+ xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
+ gnuradio-grc || ewarn "icon uninstall failed"
+
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
diff --git a/net-wireless/gnuradio/gnuradio-3.7.7.1.ebuild b/net-wireless/gnuradio/gnuradio-3.7.7.1.ebuild
new file mode 100644
index 00000000000..2933b8eb108
--- /dev/null
+++ b/net-wireless/gnuradio/gnuradio-3.7.7.1.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+CMAKE_BUILD_TYPE="None"
+inherit cmake-utils fdo-mime gnome2-utils python-single-r1 eutils
+
+DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
+HOMEPAGE="http://gnuradio.org/"
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://gnuradio.org/git/gnuradio.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="http://gnuradio.org/releases/gnuradio/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+IUSE="+audio +alsa atsc +analog +digital channels doc dtv examples fcd fec +filter grc jack log noaa oss pager performance-counters portaudio +qt4 sdl test trellis uhd vocoder +utils wavelet wxwidgets zeromq"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ audio? ( || ( alsa oss jack portaudio ) )
+ alsa? ( audio )
+ oss? ( audio )
+ jack? ( audio )
+ portaudio? ( audio )
+ analog? ( filter )
+ digital? ( filter analog )
+ dtv? ( fec )
+ pager? ( filter analog )
+ qt4? ( filter )
+ uhd? ( filter analog )
+ fcd? ( || ( alsa oss ) )
+ wavelet? ( analog )
+ wxwidgets? ( filter analog )"
+
+# bug #348206
+# comedi? ( >=sci-electronics/comedilib-0.8 )
+# boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
+RDEPEND="${PYTHON_DEPS}
+ >=dev-lang/orc-0.4.12
+ dev-libs/boost:0=[${PYTHON_USEDEP}]
+ !<=dev-libs/boost-1.52.0-r6:0/1.52
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/fftw:3.0=
+ alsa? (
+ media-libs/alsa-lib[${PYTHON_USEDEP}]
+ )
+ fcd? ( virtual/libusb:1 )
+ filter? ( sci-libs/scipy )
+ grc? (
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
+ )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ )
+ log? ( dev-libs/log4cpp )
+ portaudio? (
+ >=media-libs/portaudio-19_pre
+ )
+ qt4? (
+ >=dev-python/PyQt4-4.4[X,opengl,${PYTHON_USEDEP}]
+ >=dev-python/pyqwt-5.2:5[${PYTHON_USEDEP}]
+ >=dev-qt/qtcore-4.4:4
+ >=dev-qt/qtgui-4.4:4
+ x11-libs/qwt:6
+ )
+ sdl? ( >=media-libs/libsdl-1.2.0 )
+ uhd? ( >=net-wireless/uhd-3.4.3-r1:=[${PYTHON_USEDEP}] )
+ utils? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ vocoder? ( media-sound/gsm )
+ wavelet? (
+ >=sci-libs/gsl-1.10
+ )
+ wxwidgets? (
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/wxpython:2.8[${PYTHON_USEDEP}]
+ )
+ zeromq? ( >=net-libs/zeromq-2.1.11 )
+ "
+
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-3.0.5
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ doc? (
+ >=app-doc/doxygen-1.5.7.1
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ grc? ( x11-misc/xdg-utils )
+ oss? ( virtual/os-headers )
+ test? ( >=dev-util/cppunit-1.9.14 )
+ zeromq? ( net-libs/cppzmq )
+"
+
+src_prepare() {
+ gnome2_environment_reset #534582
+
+ # Useless UI element would require qt3support, bug #365019
+ sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
+ epatch_user
+}
+
+src_configure() {
+ # SYSCONFDIR/GR_PREFSDIR default to install below CMAKE_INSTALL_PREFIX
+ #audio provider is still automagic
+ #zeromq missing deps isn't fatal
+ mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DENABLE_GNURADIO_RUNTIME=ON
+ -DENABLE_VOLK=ON
+ -DENABLE_PYTHON=ON
+ -DENABLE_GR_BLOCKS=ON
+ -DENABLE_GR_FFT=ON
+ -DENABLE_GR_AUDIO=ON
+ $(cmake-utils_use_enable alsa GR_AUDIO_ALSA) \
+ $(cmake-utils_use_enable analog GR_ANALOG) \
+ $(cmake-utils_use_enable atsc GR_ATSC) \
+ $(cmake-utils_use_enable channels GR_CHANNELS) \
+ $(cmake-utils_use_enable digital GR_DIGITAL) \
+ $(cmake-utils_use_enable doc DOXYGEN) \
+ $(cmake-utils_use_enable doc SPHINX) \
+ $(cmake-utils_use_enable dtv GR_DTV) \
+ $(cmake-utils_use_enable fcd GR_FCD) \
+ $(cmake-utils_use_enable fec GR_FEC) \
+ $(cmake-utils_use_enable filter GR_FILTER) \
+ $(cmake-utils_use_enable grc GRC) \
+ $(cmake-utils_use_enable jack GR_AUDIO_JACK) \
+ $(cmake-utils_use_enable log GR_LOG) \
+ $(cmake-utils_use_enable noaa GR_NOAA) \
+ $(cmake-utils_use_enable oss GR_AUDIO_OSS) \
+ $(cmake-utils_use_enable pager GR_PAGER) \
+ $(cmake-utils_use_enable performance-counters ENABLE_PERFORMANCE_COUNTERS) \
+ $(cmake-utils_use_enable portaudio GR_AUDIO_PORTAUDIO) \
+ $(cmake-utils_use_enable test TESTING) \
+ $(cmake-utils_use_enable trellis GR_TRELLIS) \
+ $(cmake-utils_use_enable uhd GR_UHD) \
+ $(cmake-utils_use_enable utils GR_UTILS) \
+ $(cmake-utils_use_enable vocoder GR_VOCODER) \
+ $(cmake-utils_use_enable wavelet GR_WAVELET) \
+ $(cmake-utils_use_enable wxwidgets GR_WXGUI) \
+ $(cmake-utils_use_enable qt4 GR_QTGUI) \
+ $(cmake-utils_use_enable sdl GR_VIDEO_SDL) \
+ $(cmake-utils_use_enable zeromq GR_ZEROMQ) \
+ -DENABLE_GR_CORE=ON \
+ -DSYSCONFDIR="${EPREFIX}"/etc \
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DGR_PKG_DOC_DIR='${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}'-"${PVF}"
+ )
+ use vocoder && mycmakeargs+=( -DGR_USE_SYSTEM_LIBGSM=TRUE )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ dodir /usr/share/doc/${PF}/
+ mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
+ else
+ # It seems that the examples are always installed
+ rm -rf "${ED}"/usr/share/${PN}/examples || die
+ fi
+
+ # We install the mimetypes to the correct locations from the ebuild
+ rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
+ rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
+
+ # Install icons, menu items and mime-types for GRC
+ if use grc ; then
+ local fd_path="${S}/grc/freedesktop"
+ insinto /usr/share/mime/packages
+ doins "${fd_path}/${PN}-grc.xml"
+
+ domenu "${fd_path}/"*.desktop
+ doicon "${fd_path}/"*.png
+ fi
+
+ python_fix_shebang "${ED}"
+}
+
+src_test()
+{
+ ctest -E qtgui
+}
+
+pkg_postinst()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
+ || die "icon resource installation failed"
+ xdg-icon-resource install --noupdate --context apps --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
+ || die "icon resource installation failed"
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
+
+pkg_postrm()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
+ application-gnuradio-grc || ewarn "icon uninstall failed"
+ xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
+ gnuradio-grc || ewarn "icon uninstall failed"
+
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
diff --git a/net-wireless/gnuradio/gnuradio-9999.ebuild b/net-wireless/gnuradio/gnuradio-9999.ebuild
new file mode 100644
index 00000000000..2f9f15ca2cf
--- /dev/null
+++ b/net-wireless/gnuradio/gnuradio-9999.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+CMAKE_BUILD_TYPE="None"
+inherit cmake-utils fdo-mime gnome2-utils python-single-r1 eutils
+
+DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
+HOMEPAGE="http://gnuradio.org/"
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://gnuradio.org/git/gnuradio.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="http://s3-dist.gnuradio.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+IUSE="+audio +alsa atsc +analog +digital channels doc dtv examples fcd fec +filter grc jack log noaa oss pager performance-counters portaudio +qt4 sdl test trellis uhd vocoder +utils wavelet wxwidgets zeromq"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ audio? ( || ( alsa oss jack portaudio ) )
+ alsa? ( audio )
+ oss? ( audio )
+ jack? ( audio )
+ portaudio? ( audio )
+ analog? ( filter )
+ digital? ( filter analog )
+ dtv? ( fec )
+ pager? ( filter analog )
+ qt4? ( filter )
+ uhd? ( filter analog )
+ fcd? ( || ( alsa oss ) )
+ wavelet? ( analog )
+ wxwidgets? ( filter analog )"
+
+# bug #348206
+# comedi? ( >=sci-electronics/comedilib-0.8 )
+# boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
+RDEPEND="${PYTHON_DEPS}
+ >=dev-lang/orc-0.4.12
+ dev-libs/boost:0=[${PYTHON_USEDEP}]
+ !<=dev-libs/boost-1.52.0-r6:0/1.52
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/fftw:3.0=
+ alsa? (
+ media-libs/alsa-lib[${PYTHON_USEDEP}]
+ )
+ fcd? ( virtual/libusb:1 )
+ filter? ( sci-libs/scipy )
+ grc? (
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
+ )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ )
+ log? ( dev-libs/log4cpp )
+ portaudio? (
+ >=media-libs/portaudio-19_pre
+ )
+ qt4? (
+ >=dev-python/PyQt4-4.4[X,opengl,${PYTHON_USEDEP}]
+ >=dev-python/pyqwt-5.2:5[${PYTHON_USEDEP}]
+ >=dev-qt/qtcore-4.4:4
+ >=dev-qt/qtgui-4.4:4
+ x11-libs/qwt:6
+ )
+ sdl? ( >=media-libs/libsdl-1.2.0 )
+ uhd? ( >=net-wireless/uhd-3.4.3-r1:=[${PYTHON_USEDEP}] )
+ utils? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ vocoder? ( media-sound/gsm )
+ wavelet? (
+ >=sci-libs/gsl-1.10
+ )
+ wxwidgets? (
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/wxpython:2.8[${PYTHON_USEDEP}]
+ )
+ zeromq? ( >=net-libs/zeromq-2.1.11 )
+ "
+
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ doc? (
+ >=app-doc/doxygen-1.5.7.1
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ grc? ( x11-misc/xdg-utils )
+ oss? ( virtual/os-headers )
+ test? ( >=dev-util/cppunit-1.9.14 )
+ zeromq? ( net-libs/cppzmq )
+"
+
+src_prepare() {
+ gnome2_environment_reset #534582
+
+ # Useless UI element would require qt3support, bug #365019
+ sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
+ epatch_user
+}
+
+src_configure() {
+ # TODO: docs are installed to /usr/share/doc/${PN} not /usr/share/doc/${PF}
+ # SYSCONFDIR/GR_PREFSDIR default to install below CMAKE_INSTALL_PREFIX
+ #audio provider is still automagic
+ #zeromq missing deps isn't fatal
+ mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DENABLE_GNURADIO_RUNTIME=ON
+ -DENABLE_VOLK=ON
+ -DENABLE_PYTHON=ON
+ -DENABLE_GR_BLOCKS=ON
+ -DENABLE_GR_FFT=ON
+ -DENABLE_GR_AUDIO=ON
+ $(cmake-utils_use_enable alsa GR_AUDIO_ALSA) \
+ $(cmake-utils_use_enable analog GR_ANALOG) \
+ $(cmake-utils_use_enable atsc GR_ATSC) \
+ $(cmake-utils_use_enable channels GR_CHANNELS) \
+ $(cmake-utils_use_enable digital GR_DIGITAL) \
+ $(cmake-utils_use_enable doc DOXYGEN) \
+ $(cmake-utils_use_enable doc SPHINX) \
+ $(cmake-utils_use_enable dtv GR_DTV) \
+ $(cmake-utils_use_enable fcd GR_FCD) \
+ $(cmake-utils_use_enable fec GR_FEC) \
+ $(cmake-utils_use_enable filter GR_FILTER) \
+ $(cmake-utils_use_enable grc GRC) \
+ $(cmake-utils_use_enable jack GR_AUDIO_JACK) \
+ $(cmake-utils_use_enable log GR_LOG) \
+ $(cmake-utils_use_enable noaa GR_NOAA) \
+ $(cmake-utils_use_enable oss GR_AUDIO_OSS) \
+ $(cmake-utils_use_enable pager GR_PAGER) \
+ $(cmake-utils_use_enable performance-counters ENABLE_PERFORMANCE_COUNTERS) \
+ $(cmake-utils_use_enable portaudio GR_AUDIO_PORTAUDIO) \
+ $(cmake-utils_use_enable test TESTING) \
+ $(cmake-utils_use_enable trellis GR_TRELLIS) \
+ $(cmake-utils_use_enable uhd GR_UHD) \
+ $(cmake-utils_use_enable utils GR_UTILS) \
+ $(cmake-utils_use_enable vocoder GR_VOCODER) \
+ $(cmake-utils_use_enable wavelet GR_WAVELET) \
+ $(cmake-utils_use_enable wxwidgets GR_WXGUI) \
+ $(cmake-utils_use_enable qt4 GR_QTGUI) \
+ $(cmake-utils_use_enable sdl GR_VIDEO_SDL) \
+ $(cmake-utils_use_enable zeromq GR_ZEROMQ) \
+ -DENABLE_GR_CORE=ON \
+ -DSYSCONFDIR="${EPREFIX}"/etc \
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ )
+ use vocoder && mycmakeargs+=( -DGR_USE_SYSTEM_LIBGSM=TRUE )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ dodir /usr/share/doc/${PF}/
+ mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
+ else
+ # It seems that the examples are always installed
+ rm -rf "${ED}"/usr/share/${PN}/examples || die
+ fi
+
+ # We install the mimetypes to the correct locations from the ebuild
+ rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
+ rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
+
+ # Install icons, menu items and mime-types for GRC
+ if use grc ; then
+ local fd_path="${S}/grc/freedesktop"
+ insinto /usr/share/mime/packages
+ doins "${fd_path}/${PN}-grc.xml"
+
+ domenu "${fd_path}/"*.desktop
+ doicon "${fd_path}/"*.png
+ fi
+
+ python_fix_shebang "${ED}"
+}
+
+src_test()
+{
+ ctest -E qtgui
+}
+
+pkg_postinst()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
+ || die "icon resource installation failed"
+ xdg-icon-resource install --noupdate --context apps --size ${size} \
+ "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
+ || die "icon resource installation failed"
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
+
+pkg_postrm()
+{
+ local GRC_ICON_SIZES="32 48 64 128 256"
+
+ if use grc ; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ for size in ${GRC_ICON_SIZES} ; do
+ xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
+ application-gnuradio-grc || ewarn "icon uninstall failed"
+ xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
+ gnuradio-grc || ewarn "icon uninstall failed"
+
+ done
+ xdg-icon-resource forceupdate
+ fi
+}
diff --git a/net-wireless/gnuradio/metadata.xml b/net-wireless/gnuradio/metadata.xml
new file mode 100644
index 00000000000..a9d64fbfe5f
--- /dev/null
+++ b/net-wireless/gnuradio/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <use>
+ <flag name='analog'>enable analog signal processing blocks</flag>
+ <flag name='atsc'>enable ATSC (HDTV) transmitter and receiver blocks</flag>
+ <flag name='audio'>enable blocks to connect to audio sources (mic-in) and sinks (speaker-out) ports on a computer</flag>
+ <flag name='channels'>enable channel mode blocks</flag>
+ <flag name='digital'>enable digital signal processing blocks</flag>
+ <flag name='dtv'>enable digital tv signal processing blocks</flag>
+ <flag name='fcd'>enable Funcube Dongle source block</flag>
+ <flag name='fec'>enable block for convolutional encoding using the CCSDS standard polynomial ("Voyager")</flag>
+ <flag name='filter'>enable filter signal processing blocks</flag>
+ <flag name='grc'>enable GNU Radio Companion graphical tool to design signal processing flow graphs</flag>
+ <flag name='log'>enable logging to console and files</flag>
+ <flag name='noaa'>enable NOAA POES HRPT receiver blocks</flag>
+ <flag name='pager'>enable pager signal processing blocks</flag>
+ <flag name='performance-counters'>enable block performance counters</flag>
+ <flag name='trellis'>enable trellis blocks for FSM</flag>
+ <flag name='uhd'>install UHD source and sink blocks</flag>
+ <flag name='utils'>install scripts to enable viewing and analysis of files produced by flow graphs</flag>
+ <flag name='vocoder'>enable blocks for audio voice encoders</flag>
+ <flag name='wavelet'>enable wavelet signal processing blocks</flag>
+ <flag name='zeromq'>enable zeromq message passing blocks</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-wireless/gobi_loader/Manifest b/net-wireless/gobi_loader/Manifest
new file mode 100644
index 00000000000..cfee070bc00
--- /dev/null
+++ b/net-wireless/gobi_loader/Manifest
@@ -0,0 +1 @@
+DIST gobi_loader-0.7.tar.gz 5056 SHA256 78bdc255451cde1caa406e146b01a88828480c9c43272de8cffdb61627be754a SHA512 79b9a357a1dc11bf0eae5a7a964f8ffe4d09381384d0bfc0541bf0311bba9206055e5ef3d884648b12fa05286feec0118af11effa1db66626001ea2743a715a1 WHIRLPOOL cfc6a0f01aa9ee2b3b04004d5eb6bdd27ba66a60dcb34aef3cc8412572e1eecf5cb67be0f8a6d742b536de40bed4ebae506a11283213cef2c1390f2b0d379736
diff --git a/net-wireless/gobi_loader/files/gobi_loader-0.7-makefile.patch b/net-wireless/gobi_loader/files/gobi_loader-0.7-makefile.patch
new file mode 100644
index 00000000000..ec5b4a70631
--- /dev/null
+++ b/net-wireless/gobi_loader/files/gobi_loader-0.7-makefile.patch
@@ -0,0 +1,22 @@
+--- gobi_loader-0.7/Makefile
++++ gobi_loader-0.7/Makefile
+@@ -1,15 +1,14 @@
+ VERSION = 0.7
+
+ gobi_loader: gobi_loader.c
+- gcc -Wall gobi_loader.c -o gobi_loader
++ gcc ${CFLAGS} ${LDFLAGS} -Wall gobi_loader.c -o gobi_loader
+
+ all: gobi_loader
+
+ install: gobi_loader
+- install -D gobi_loader ${prefix}/lib/udev/gobi_loader
+- install -D 60-gobi.rules ${prefix}/lib/udev/rules.d/60-gobi.rules
+- mkdir -p ${prefix}/lib/firmware
+- -udevadm control --reload-rules
++ install -D gobi_loader ${D}%UDEVDIR%/gobi_loader
++ install -D 60-gobi.rules ${D}%UDEVDIR%/rules.d/60-gobi.rules
++ mkdir -p ${D}${prefix}/lib/firmware
+
+ uninstall:
+ -rm $(prefix)/lib/udev/gobi_loader
diff --git a/net-wireless/gobi_loader/gobi_loader-0.7-r2.ebuild b/net-wireless/gobi_loader/gobi_loader-0.7-r2.ebuild
new file mode 100644
index 00000000000..4a291bcd70d
--- /dev/null
+++ b/net-wireless/gobi_loader/gobi_loader-0.7-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils multilib udev
+
+DESCRIPTION="gobi_loader is a firmware loader for Qualcomm Gobi USB chipsets"
+HOMEPAGE="http://www.codon.org.uk/~mjg59/gobi_loader/"
+SRC_URI="http://www.codon.org.uk/~mjg59/${PN}/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ sed "s:%UDEVDIR%:$(get_udevdir):" -i Makefile || die
+}
+
+src_install() {
+ emake install || die
+}
+
+pkg_postinst() {
+ udevadm control --reload-rules
+ einfo
+ einfo "Put your firmware in /lib/firmware/gobi."
+ einfo
+}
diff --git a/net-wireless/gobi_loader/metadata.xml b/net-wireless/gobi_loader/metadata.xml
new file mode 100644
index 00000000000..b0008f01cbd
--- /dev/null
+++ b/net-wireless/gobi_loader/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>craig@gentoo.org</email>
+ <name>Stefan Behte</name>
+</maintainer>
+<maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ <description>Proxy maintainer for Stefan</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/gqrx/Manifest b/net-wireless/gqrx/Manifest
new file mode 100644
index 00000000000..811167a2076
--- /dev/null
+++ b/net-wireless/gqrx/Manifest
@@ -0,0 +1,2 @@
+DIST gqrx-2.3.1.tar.gz 1080929 SHA256 1756132f4958a63199396020c6d26658304a2cf7d940650e86764f9d8eea0f81 SHA512 7fd158b039ac593b73da069b6356bfb63e92b5f1d815663ebe59044b8006b4d206e877934e5ae4770d06d0d486bb1d2b47ad96055c369a08af9e2af701e9a307 WHIRLPOOL 367b20ba8c2ccc56f4111fd0ff9abf6110bc5de070d036b88d594bd03714e3615f52f2691144204e733fb597cd4d4eff63f21cff25710f9075daee0f65166605
+DIST gqrx-2.3.2.tar.gz 1080995 SHA256 2748ee14491dbfb5821efba32300124b5a2b0aabc810cdfda91e5f64bd3502cf SHA512 53b271a7b053ebf877152ddd4d6d96e2ae864c8a85a66f5dca5ce670301616fec770e0c2bb2352234fc8566d05679c8c3ef147e62ea5393635a6f57724fd8da0 WHIRLPOOL d36a8b8ab001d5a80a9aff47091c3f54b0026c45c1676341096dba9a06120a4f47110314b2377ea07f93a40eb5e99401c8256e4fb9ff1d90868f5adbbfa3e197
diff --git a/net-wireless/gqrx/files/no_qtsvg.patch b/net-wireless/gqrx/files/no_qtsvg.patch
new file mode 100644
index 00000000000..848f10c8a47
--- /dev/null
+++ b/net-wireless/gqrx/files/no_qtsvg.patch
@@ -0,0 +1,13 @@
+diff --git a/gqrx.pro b/gqrx.pro
+index 2998186..b1e7687 100644
+--- a/gqrx.pro
++++ b/gqrx.pro
+@@ -9,7 +9,7 @@
+ # BOOST_SUFFIX=-mt To link against libboost-xyz-mt (needed for pybombs)
+ #--------------------------------------------------------------------------------
+
+-QT += core gui svg network
++QT += core gui network
+ contains(QT_MAJOR_VERSION,5) {
+ QT += widgets
+ }
diff --git a/net-wireless/gqrx/gqrx-2.3.1.ebuild b/net-wireless/gqrx/gqrx-2.3.1.ebuild
new file mode 100644
index 00000000000..59e0a413fd4
--- /dev/null
+++ b/net-wireless/gqrx/gqrx-2.3.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="Software defined radio receiver powered by GNU Radio and Qt"
+HOMEPAGE="http://gqrx.dk/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/csete/gqrx.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/csete/gqrx/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="pulseaudio"
+
+DEPEND=">=net-wireless/gnuradio-3.7_rc:=[audio,analog,filter]
+ >=net-wireless/gr-osmosdr-0.1.0:=
+ dev-libs/boost:=
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ pulseaudio? ( media-sound/pulseaudio:= )"
+RDEPEND="${DEPEND}
+ dev-qt/qtsvg:4"
+
+src_prepare() {
+ if use !pulseaudio; then
+ sed -i 's/AUDIO_BACKEND = pulse/#AUDIO_BACKEND = pulse/' gqrx.pro || die
+ fi
+ epatch "${FILESDIR}"/no_qtsvg.patch
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ dobin gqrx
+}
diff --git a/net-wireless/gqrx/gqrx-2.3.2.ebuild b/net-wireless/gqrx/gqrx-2.3.2.ebuild
new file mode 100644
index 00000000000..59e0a413fd4
--- /dev/null
+++ b/net-wireless/gqrx/gqrx-2.3.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="Software defined radio receiver powered by GNU Radio and Qt"
+HOMEPAGE="http://gqrx.dk/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/csete/gqrx.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/csete/gqrx/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="pulseaudio"
+
+DEPEND=">=net-wireless/gnuradio-3.7_rc:=[audio,analog,filter]
+ >=net-wireless/gr-osmosdr-0.1.0:=
+ dev-libs/boost:=
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ pulseaudio? ( media-sound/pulseaudio:= )"
+RDEPEND="${DEPEND}
+ dev-qt/qtsvg:4"
+
+src_prepare() {
+ if use !pulseaudio; then
+ sed -i 's/AUDIO_BACKEND = pulse/#AUDIO_BACKEND = pulse/' gqrx.pro || die
+ fi
+ epatch "${FILESDIR}"/no_qtsvg.patch
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ dobin gqrx
+}
diff --git a/net-wireless/gqrx/gqrx-9999.ebuild b/net-wireless/gqrx/gqrx-9999.ebuild
new file mode 100644
index 00000000000..151dc86fca1
--- /dev/null
+++ b/net-wireless/gqrx/gqrx-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="Software defined radio receiver powered by GNU Radio and Qt"
+HOMEPAGE="http://gqrx.dk/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/csete/gqrx.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/csete/gqrx/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="pulseaudio"
+
+DEPEND=">=net-wireless/gnuradio-3.7_rc:=[audio,analog,filter]
+ >=net-wireless/gr-osmosdr-0.1.0:=
+ dev-libs/boost:=
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ pulseaudio? ( media-sound/pulseaudio:= )"
+RDEPEND="${DEPEND}
+ dev-qt/qtsvg:4"
+
+src_prepare() {
+ if use !pulseaudio; then
+ sed -i 's/AUDIO_BACKEND = pulse/#AUDIO_BACKEND = pulse/' gqrx.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ dobin gqrx
+}
diff --git a/net-wireless/gqrx/metadata.xml b/net-wireless/gqrx/metadata.xml
new file mode 100644
index 00000000000..a8431b1c075
--- /dev/null
+++ b/net-wireless/gqrx/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">csete/gqrx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/gr-baz/gr-baz-9999.ebuild b/net-wireless/gr-baz/gr-baz-9999.ebuild
new file mode 100644
index 00000000000..df39e837fb4
--- /dev/null
+++ b/net-wireless/gr-baz/gr-baz-9999.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils git-r3 python-single-r1
+
+DESCRIPTION="Gnuradio baz"
+HOMEPAGE="http://wiki.spench.net/wiki/Gr-baz"
+EGIT_REPO_URI="https://github.com/balint256/gr-baz.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="armadillo doc rtlsdr uhd"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="dev-libs/boost[threads,${PYTHON_USEDEP}]
+ >=net-wireless/gnuradio-3.7.0:=[${PYTHON_USEDEP}]
+ armadillo? ( sci-libs/armadillo )
+ rtlsdr? ( virtual/libusb:1 )
+ uhd? ( net-wireless/uhd[${PYTHON_USEDEP}] )
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+src_configure() {
+ mycmakeargs=(
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ )
+ cmake-utils_src_configure
+}
+src_install() {
+ cmake-utils_src_install
+ insinto /usr/share/${PN}
+ doins -r samples/*
+}
diff --git a/net-wireless/gr-baz/metadata.xml b/net-wireless/gr-baz/metadata.xml
new file mode 100644
index 00000000000..429b14a8c93
--- /dev/null
+++ b/net-wireless/gr-baz/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>radio</herd>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+<use>
+ <flag name='armadillo'>install MUSIC DOA estimator block</flag>
+ <flag name='rtlsdr'>install rtlsdr source block</flag>
+ <flag name='uhd'>install UHD aware blocks</flag>
+</use>
+</pkgmetadata>
+
diff --git a/net-wireless/gr-iqbal/Manifest b/net-wireless/gr-iqbal/Manifest
new file mode 100644
index 00000000000..7172b06c711
--- /dev/null
+++ b/net-wireless/gr-iqbal/Manifest
@@ -0,0 +1,2 @@
+DIST gr-iqbal-0.36.0.tar.xz 76504 SHA256 7715142d5fd478ade7536f015f6764a6a0c113c931b381e4536d1c681ad778d6 SHA512 1fd91f5ea2984e71826906437bb32b3518191e69411d74ecfcdd09b18b545c4b42d097366dae0d430f75e9c5dd72c7c0425cd1de3551c2a9eacae983f87d4204 WHIRLPOOL db5c54f226682aea33eb61952d1e2cea8be6c343c59d356539ed7f0379767a732bbca4d889f5caa320a4941a52589cef1101add34879fa9304b983e2f6e42e15
+DIST gr-iqbal-0.37.2.tar.xz 71340 SHA256 7b15b404634cf91209ff0e17350f87307ab88ab6b795f7d5a60ed009f5492824 SHA512 00037a535219ebe3b5244d4a09355cc74bf17aa6a935bff135e9d7c7c7f6bc1c8b7a29edc02132dbacda2c41efa3613c09e6fdc222472e58d88c4c076736842e WHIRLPOOL 2afdf6bc97d07d2aaf888336987c9f437b76a0216cef904d7319d98ce914565c28ced0c9397e35da1fcc65aabc852a81e8df3a81441fe0800ed03e65cd5ff125
diff --git a/net-wireless/gr-iqbal/files/add-pkgconfig-file.patch b/net-wireless/gr-iqbal/files/add-pkgconfig-file.patch
new file mode 100644
index 00000000000..c86cdfa458c
--- /dev/null
+++ b/net-wireless/gr-iqbal/files/add-pkgconfig-file.patch
@@ -0,0 +1,52 @@
+From 077397e65a8867fe3e93de0930d9556d39f10126 Mon Sep 17 00:00:00 2001
+From: Sylvain Munaut <tnt@246tNt.com>
+Date: Sun, 07 Jul 2013 19:54:23 +0000
+Subject: misc: Add a .pc file
+
+Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
+---
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a251954..10dc8c8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -158,3 +158,21 @@ add_subdirectory(python)
+ add_subdirectory(grc)
+ add_subdirectory(apps)
+ add_subdirectory(docs)
++
++########################################################################
++# Create Pkg Config File
++########################################################################
++file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" prefix)
++file(TO_NATIVE_PATH "\${prefix}" exec_prefix)
++file(TO_NATIVE_PATH "\${exec_prefix}/${GR_LIBRARY_DIR}" libdir)
++file(TO_NATIVE_PATH "\${prefix}/${GR_INCLUDE_DIR}" includedir)
++
++configure_file(
++ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-iqbalance.pc.in
++ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-iqbalance.pc
++@ONLY)
++
++install(
++ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-iqbalance.pc
++ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
++)
+diff --git a/gnuradio-iqbalance.pc.in b/gnuradio-iqbalance.pc.in
+new file mode 100644
+index 0000000..edde90d
+--- /dev/null
++++ b/gnuradio-iqbalance.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: gnuradio-iqbalance
++Description: gnuradio I/Q balancing
++URL: http://git.osmocom.org/gr-iqbal/
++Requires: gnuradio-runtime
++Libs: -L${libdir} -lgnuradio-iqbalance
++Cflags: -I${includedir}
+--
+cgit v0.9.1
diff --git a/net-wireless/gr-iqbal/gr-iqbal-0.36.0.ebuild b/net-wireless/gr-iqbal/gr-iqbal-0.36.0.ebuild
new file mode 100644
index 00000000000..c6033fd9cd9
--- /dev/null
+++ b/net-wireless/gr-iqbal/gr-iqbal-0.36.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_DEPEND="2"
+
+inherit cmake-utils python
+
+DESCRIPTION="gnuradio I/Q balancing"
+HOMEPAGE="http://git.osmocom.org/gr-iqbal/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE=""
+
+RDEPEND="<net-wireless/gnuradio-3.7_rc:0=
+ net-libs/libosmo-dsp:=
+ dev-libs/boost:="
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -q -r 2 "${S}"
+}
diff --git a/net-wireless/gr-iqbal/gr-iqbal-0.37.2.ebuild b/net-wireless/gr-iqbal/gr-iqbal-0.37.2.ebuild
new file mode 100644
index 00000000000..73f51852342
--- /dev/null
+++ b/net-wireless/gr-iqbal/gr-iqbal-0.37.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="gnuradio I/Q balancing"
+HOMEPAGE="http://git.osmocom.org/gr-iqbal/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE=""
+
+RDEPEND=">=net-wireless/gnuradio-3.7_rc:0=[${PYTHON_USEDEP}]
+ net-libs/libosmo-dsp:=
+ dev-libs/boost:=
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
diff --git a/net-wireless/gr-iqbal/gr-iqbal-9999.ebuild b/net-wireless/gr-iqbal/gr-iqbal-9999.ebuild
new file mode 100644
index 00000000000..73f51852342
--- /dev/null
+++ b/net-wireless/gr-iqbal/gr-iqbal-9999.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="gnuradio I/Q balancing"
+HOMEPAGE="http://git.osmocom.org/gr-iqbal/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE=""
+
+RDEPEND=">=net-wireless/gnuradio-3.7_rc:0=[${PYTHON_USEDEP}]
+ net-libs/libosmo-dsp:=
+ dev-libs/boost:=
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
diff --git a/net-wireless/gr-iqbal/metadata.xml b/net-wireless/gr-iqbal/metadata.xml
new file mode 100644
index 00000000000..044f1219431
--- /dev/null
+++ b/net-wireless/gr-iqbal/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<herd>radio</herd>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-wireless/gr-osmosdr/Manifest b/net-wireless/gr-osmosdr/Manifest
new file mode 100644
index 00000000000..2339d8dcd92
--- /dev/null
+++ b/net-wireless/gr-osmosdr/Manifest
@@ -0,0 +1,2 @@
+DIST gr-osmosdr-0.1.4.tar.xz 141500 SHA256 074dd3ad68c187948f05c33e025629acd4c8b62b5d1d1c212e3dabd8f080b16a SHA512 930a7f6065fba709fb770fd373f0fe7eba13abf09e49f6e839718d547ce69176d93d89d1b037ee3f0cdffda7060ac6c9ff4023dc835ec50ef456d51d383046ab WHIRLPOOL e8e78cbf320b64a1615b83cda396928fc1e6df47806607feeacc3e37a876bb9930b6d2ef420579f73a745b87b2b91a3276fca9552a13d48a92d0e414fff7c0aa
+DIST gr-osmosdr-0.1.4_p20150730.tar.xz 1148596 SHA256 b94e597d8042717d70f5f8c358fb8446ef64a91fa6ab2b362e0e7d37457bd961 SHA512 7e6847eba0d4e217ea71bb4b8105290b329bf8840a7193df013b3a0cd9c9ef57f3686252da48cb0df239288b5794c75178a8bb45ff2a2dd8b605f63fec2426d9 WHIRLPOOL db2df16796ab5974d22d4f606bd73aaec53693933fcc5c12e5126f14e4d3d2eadacd7cf2e28cb18a951caf9a16440c72f54177acfd3af16512febd97d6e0072c
diff --git a/net-wireless/gr-osmosdr/files/hackrf-safety.patch b/net-wireless/gr-osmosdr/files/hackrf-safety.patch
new file mode 100644
index 00000000000..fc04fc0c50e
--- /dev/null
+++ b/net-wireless/gr-osmosdr/files/hackrf-safety.patch
@@ -0,0 +1,34 @@
+commit 39230788d7f4b0a8d6d3ab32039073ed53e74af6
+Author: Dimitri Stolnikov <horiz0n@gmx.net>
+Date: Tue Oct 21 22:10:40 2014 +0200
+
+ hackrf: disable AMP gain stage by default to protect it from damage
+
+ patch proivided by Paul Connolly
+
+diff --git a/lib/hackrf/hackrf_sink_c.cc b/lib/hackrf/hackrf_sink_c.cc
+index 120b271..3a1e7da 100644
+--- a/lib/hackrf/hackrf_sink_c.cc
++++ b/lib/hackrf/hackrf_sink_c.cc
+@@ -213,7 +213,7 @@ hackrf_sink_c::hackrf_sink_c (const std::string &args)
+ set_sample_rate( get_sample_rates().start() );
+ set_bandwidth( 0 );
+
+- set_gain( 14 ); /* enable AMP gain stage by default */
++ set_gain( 0 ); /* disable AMP gain stage by default to protect full sprectrum pre-amp from physical damage */
+
+ set_if_gain( 16 ); /* preset to a reasonable default (non-GRC use case) */
+
+diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc
+index f647b80..e3b3ea4 100644
+--- a/lib/hackrf/hackrf_source_c.cc
++++ b/lib/hackrf/hackrf_source_c.cc
+@@ -168,7 +168,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args)
+ set_sample_rate( get_sample_rates().start() );
+ set_bandwidth( 0 );
+
+- set_gain( 14 ); /* enable AMP gain stage by default */
++ set_gain( 0 ); /* disable AMP gain stage by default to protect full sprectrum pre-amp from physical damage */
+
+ set_if_gain( 16 ); /* preset to a reasonable default (non-GRC use case) */
+
diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4.ebuild
new file mode 100644
index 00000000000..fb14eb8dca9
--- /dev/null
+++ b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
+HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ #git clone git://git.osmocom.org/gr-osmosdr.git
+ #cd gr-osmosdr
+ #git archive --format=tar --prefix=gr-osmosdr-${PV}/ v${PV} | xz > ../gr-osmosdr-${PV}.tar.xz
+ SRC_URI="http://cgit.osmocom.org/gr-osmosdr/snapshot/gr-osmosdr-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE="bladerf fcd hackrf iqbalance mirisdr python rtlsdr uhd"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-libs/boost:=
+ >=net-wireless/gnuradio-3.7_rc:0=[fcd?,${PYTHON_USEDEP}]
+ bladerf? ( net-wireless/bladerf:= )
+ hackrf? ( net-libs/libhackrf:= )
+ iqbalance? ( net-wireless/gr-iqbal:=[${PYTHON_USEDEP}] )
+ mirisdr? ( net-libs/libmirisdr:= )
+ rtlsdr? ( >=net-wireless/rtl-sdr-0.5.3:= )
+ uhd? ( net-wireless/uhd:=[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ dev-python/cheetah"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DENABLE_FILE=ON
+ $(cmake-utils_use_enable bladerf)
+ $(cmake-utils_use_enable fcd)
+ $(cmake-utils_use_enable hackrf)
+ $(cmake-utils_use_enable iqbalance)
+ $(cmake-utils_use_enable mirisdr MIRI)
+ $(cmake-utils_use_enable python)
+ $(cmake-utils_use_enable rtlsdr RTL)
+ $(cmake-utils_use_enable rtlsdr RTL_TCP)
+ $(cmake-utils_use_enable uhd)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ python_fix_shebang "${ED}"/usr/bin
+}
diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4_p20150730.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4_p20150730.ebuild
new file mode 100644
index 00000000000..dd7b0061a0e
--- /dev/null
+++ b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.4_p20150730.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
+HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ #git clone git://git.osmocom.org/gr-osmosdr.git
+ #cd gr-osmosdr
+ #git archive --format=tar --prefix=gr-osmosdr-${PV}/ v${PV} | xz > ../gr-osmosdr-${PV}.tar.xz
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/gr-osmosdr-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE="bladerf fcd hackrf iqbalance mirisdr python rtlsdr uhd"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-libs/boost:=
+ >=net-wireless/gnuradio-3.7_rc:0=[fcd?,${PYTHON_USEDEP}]
+ bladerf? ( net-wireless/bladerf:= )
+ hackrf? ( net-libs/libhackrf:= )
+ iqbalance? ( net-wireless/gr-iqbal:=[${PYTHON_USEDEP}] )
+ mirisdr? ( net-libs/libmirisdr:= )
+ rtlsdr? ( >=net-wireless/rtl-sdr-0.5.3:= )
+ uhd? ( net-wireless/uhd:=[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ dev-python/cheetah"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DENABLE_FILE=ON
+ $(cmake-utils_use_enable bladerf)
+ $(cmake-utils_use_enable fcd)
+ $(cmake-utils_use_enable hackrf)
+ $(cmake-utils_use_enable iqbalance)
+ $(cmake-utils_use_enable mirisdr MIRI)
+ $(cmake-utils_use_enable python)
+ $(cmake-utils_use_enable rtlsdr RTL)
+ $(cmake-utils_use_enable rtlsdr RTL_TCP)
+ $(cmake-utils_use_enable uhd)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ python_fix_shebang "${ED}"/usr/bin
+}
diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-9999.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-9999.ebuild
new file mode 100644
index 00000000000..fb14eb8dca9
--- /dev/null
+++ b/net-wireless/gr-osmosdr/gr-osmosdr-9999.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
+HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ #git clone git://git.osmocom.org/gr-osmosdr.git
+ #cd gr-osmosdr
+ #git archive --format=tar --prefix=gr-osmosdr-${PV}/ v${PV} | xz > ../gr-osmosdr-${PV}.tar.xz
+ SRC_URI="http://cgit.osmocom.org/gr-osmosdr/snapshot/gr-osmosdr-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+IUSE="bladerf fcd hackrf iqbalance mirisdr python rtlsdr uhd"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-libs/boost:=
+ >=net-wireless/gnuradio-3.7_rc:0=[fcd?,${PYTHON_USEDEP}]
+ bladerf? ( net-wireless/bladerf:= )
+ hackrf? ( net-libs/libhackrf:= )
+ iqbalance? ( net-wireless/gr-iqbal:=[${PYTHON_USEDEP}] )
+ mirisdr? ( net-libs/libmirisdr:= )
+ rtlsdr? ( >=net-wireless/rtl-sdr-0.5.3:= )
+ uhd? ( net-wireless/uhd:=[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ dev-python/cheetah"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEFAULT=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DENABLE_FILE=ON
+ $(cmake-utils_use_enable bladerf)
+ $(cmake-utils_use_enable fcd)
+ $(cmake-utils_use_enable hackrf)
+ $(cmake-utils_use_enable iqbalance)
+ $(cmake-utils_use_enable mirisdr MIRI)
+ $(cmake-utils_use_enable python)
+ $(cmake-utils_use_enable rtlsdr RTL)
+ $(cmake-utils_use_enable rtlsdr RTL_TCP)
+ $(cmake-utils_use_enable uhd)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ python_fix_shebang "${ED}"/usr/bin
+}
diff --git a/net-wireless/gr-osmosdr/metadata.xml b/net-wireless/gr-osmosdr/metadata.xml
new file mode 100644
index 00000000000..66351693a77
--- /dev/null
+++ b/net-wireless/gr-osmosdr/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+<use>
+ <flag name="bladerf">Build with Nuand BladeRF support</flag>
+ <flag name="fcd">Build with Funcube Dongle support</flag>
+ <flag name="hackrf">Build with Great Scott Gadgets HackRF support</flag>
+ <flag name="iqbalance">Enable support for I/Q balancing using gr-iqbal</flag>
+ <flag name="mirisdr">Build with Mirics MSi2500 + MSi001 SDR support</flag>
+ <flag name="rtlsdr">Build with Realtek RTL2832U (rtlsdr) support</flag>
+ <flag name="uhd">Build with Ettus Research USRP Hardware Driver support</flag>
+</use>
+</pkgmetadata>
+
diff --git a/net-wireless/gr-rds/gr-rds-9999.ebuild b/net-wireless/gr-rds/gr-rds-9999.ebuild
new file mode 100644
index 00000000000..9f43bc74024
--- /dev/null
+++ b/net-wireless/gr-rds/gr-rds-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="gnuradio FM RDS Receiver"
+HOMEPAGE="https://github.com/bastibl/gr-rds"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/bastibl/${PN}"
+ KEYWORDS=""
+#else
+# SRC_URI=""
+# KEYWORDS=""
+fi
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+
+RDEPEND=">=net-wireless/gnuradio-3.7_rc:0=[${PYTHON_USEDEP}]
+ dev-libs/boost:=[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ dev-lang/swig:0"
+#cppunit is listed in cmake, but only needed for tests and there are no tests
+# dev-util/cppunit"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ #although cppunit is not used, it fails if it isn't there, fix it
+ sed -i 's#FATAL_ERROR "CppUnit#MESSAGE "CppUnit#' CMakeLists.txt
+ sed -i '/${CPPUNIT_INCLUDE_DIRS}/d' CMakeLists.txt
+ sed -i '/${CPPUNIT_LIBRARY_DIRS}/d' CMakeLists.txt
+}
+
+src_configure() {
+ mycmakeargs=( -DPYTHON_EXECUTABLE="${PYTHON}" )
+ cmake-utils_src_configure
+}
diff --git a/net-wireless/gr-rds/metadata.xml b/net-wireless/gr-rds/metadata.xml
new file mode 100644
index 00000000000..01833ab8f4e
--- /dev/null
+++ b/net-wireless/gr-rds/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <upstream>
+ <remote-id type="github">bastibl/gr-rds</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/hackrf-tools/Manifest b/net-wireless/hackrf-tools/Manifest
new file mode 100644
index 00000000000..7efb28f31f9
--- /dev/null
+++ b/net-wireless/hackrf-tools/Manifest
@@ -0,0 +1,2 @@
+DIST hackrf-2014.08.1.tar.xz 14376904 SHA256 624c46163161896b8347a73e9edeb1188433f032df7cd00eda9a242c2a5bc98a SHA512 2bb2e9398479f635fc4cb73875d9728c689f5d29bfbdcaae661d98ecafe51d38ac8768dd4f38b87766195d9ed08757e76d790030edf6f6f572d547146287c073 WHIRLPOOL c33430279d0757e104f09ecafce2df859f33f8de9139dd6491a11d86ed3e241ba3ef298d1d0994113e695c46ab211daf573262815a8a1fc5349fd44642da3910
+DIST hackrf-2015.07.2.tar.xz 14415212 SHA256 5e3d9c36928b88cdbc0d66ee54e24e8682972dba478abfca0e31069515b870b6 SHA512 a4f7b7800ece9b260d5c8c374f5544aa55cd2e97e10c6a0b33cf476e2ad4811321ffb1308d9dfb2168b2624cd3af616d1c314ad86bcd6f4c3fd0897319fa2cbd WHIRLPOOL 8dfee4fb55be913f44d8ab905fc7c6b1fd703e16b01aa41191e97ab726a3b04d6a78670ae47c2d3bada64e38d42cabcf7f39b646fba55b436cbcab312be1f198
diff --git a/net-wireless/hackrf-tools/files/52-hackrf.rules b/net-wireless/hackrf-tools/files/52-hackrf.rules
new file mode 100644
index 00000000000..1ebb20db569
--- /dev/null
+++ b/net-wireless/hackrf-tools/files/52-hackrf.rules
@@ -0,0 +1 @@
+ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-%k", MODE="660", GROUP="plugdev"
diff --git a/net-wireless/hackrf-tools/hackrf-tools-2014.08.1.ebuild b/net-wireless/hackrf-tools/hackrf-tools-2014.08.1.ebuild
new file mode 100644
index 00000000000..22fb6f01e05
--- /dev/null
+++ b/net-wireless/hackrf-tools/hackrf-tools-2014.08.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="library for communicating with HackRF SDR platform"
+HOMEPAGE="http://greatscottgadgets.com/hackrf/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/mossmann/hackrf.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/hackrf"
+ S="${WORKDIR}/hackrf/host/hackrf-tools"
+else
+ S="${WORKDIR}/hackrf-${PV}/host/hackrf-tools"
+ SRC_URI="mirror://sourceforge/hackrf/hackrf-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="=net-libs/libhackrf-${PV}:="
+RDEPEND="${DEPEND}"
+
+src_install() {
+ cmake-utils_src_install
+ if [[ ${PV} != "9999" ]] ; then
+ insinto /usr/share/hackrf
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_rom_to_ram.bin" hackrf_jawbreaker_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_ram.dfu" hackrf_jawbreaker_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_rom_to_ram.bin" hackrf_one_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_ram.dfu" hackrf_one_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware/cpld/sgpio_if/default.xsvf" hackrf_cpld_default-${PV}.xsvf
+ else
+ ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
+ fi
+}
diff --git a/net-wireless/hackrf-tools/hackrf-tools-2015.07.2-r1.ebuild b/net-wireless/hackrf-tools/hackrf-tools-2015.07.2-r1.ebuild
new file mode 100644
index 00000000000..a1fd7f6b564
--- /dev/null
+++ b/net-wireless/hackrf-tools/hackrf-tools-2015.07.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="library for communicating with HackRF SDR platform"
+HOMEPAGE="http://greatscottgadgets.com/hackrf/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/mossmann/hackrf.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/hackrf"
+ S="${WORKDIR}/hackrf/host/hackrf-tools"
+else
+ S="${WORKDIR}/hackrf-${PV}/host/hackrf-tools"
+ SRC_URI="https://github.com/mossmann/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="=net-libs/libhackrf-${PV}:="
+RDEPEND="${DEPEND}"
+
+src_install() {
+ cmake-utils_src_install
+ if [[ ${PV} != "9999" ]] ; then
+ insinto /usr/share/hackrf
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_rom_to_ram.bin" hackrf_jawbreaker_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_ram.dfu" hackrf_jawbreaker_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_rom_to_ram.bin" hackrf_one_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_ram.dfu" hackrf_one_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware/cpld/sgpio_if/default.xsvf" hackrf_cpld_default-${PV}.xsvf
+ ln -s hackrf_one_usb_rom_to_ram-${PV}.bin "${ED}/usr/share/hackrf/hackrf_one_usb_rom_to_ram.bin"
+ ln -s hackrf_one_usb_ram-${PV}.dfu "${ED}/usr/share/hackrf/hackrf_one_usb_ram.dfu"
+ else
+ ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
+ fi
+}
diff --git a/net-wireless/hackrf-tools/hackrf-tools-2015.07.2.ebuild b/net-wireless/hackrf-tools/hackrf-tools-2015.07.2.ebuild
new file mode 100644
index 00000000000..cd9e614efb7
--- /dev/null
+++ b/net-wireless/hackrf-tools/hackrf-tools-2015.07.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="library for communicating with HackRF SDR platform"
+HOMEPAGE="http://greatscottgadgets.com/hackrf/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/mossmann/hackrf.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/hackrf"
+ S="${WORKDIR}/hackrf/host/hackrf-tools"
+else
+ S="${WORKDIR}/hackrf-${PV}/host/hackrf-tools"
+ SRC_URI="https://github.com/mossmann/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="=net-libs/libhackrf-${PV}:="
+RDEPEND="${DEPEND}"
+
+src_install() {
+ cmake-utils_src_install
+ if [[ ${PV} != "9999" ]] ; then
+ insinto /usr/share/hackrf
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_rom_to_ram.bin" hackrf_jawbreaker_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_ram.dfu" hackrf_jawbreaker_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_rom_to_ram.bin" hackrf_one_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_ram.dfu" hackrf_one_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware/cpld/sgpio_if/default.xsvf" hackrf_cpld_default-${PV}.xsvf
+ else
+ ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
+ fi
+}
diff --git a/net-wireless/hackrf-tools/hackrf-tools-9999.ebuild b/net-wireless/hackrf-tools/hackrf-tools-9999.ebuild
new file mode 100644
index 00000000000..a1fd7f6b564
--- /dev/null
+++ b/net-wireless/hackrf-tools/hackrf-tools-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="library for communicating with HackRF SDR platform"
+HOMEPAGE="http://greatscottgadgets.com/hackrf/"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/mossmann/hackrf.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/hackrf"
+ S="${WORKDIR}/hackrf/host/hackrf-tools"
+else
+ S="${WORKDIR}/hackrf-${PV}/host/hackrf-tools"
+ SRC_URI="https://github.com/mossmann/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="=net-libs/libhackrf-${PV}:="
+RDEPEND="${DEPEND}"
+
+src_install() {
+ cmake-utils_src_install
+ if [[ ${PV} != "9999" ]] ; then
+ insinto /usr/share/hackrf
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_rom_to_ram.bin" hackrf_jawbreaker_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_ram.dfu" hackrf_jawbreaker_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_rom_to_ram.bin" hackrf_one_usb_rom_to_ram-${PV}.bin
+ newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_ram.dfu" hackrf_one_usb_ram-${PV}.dfu
+ newins "${WORKDIR}/hackrf-${PV}/firmware/cpld/sgpio_if/default.xsvf" hackrf_cpld_default-${PV}.xsvf
+ ln -s hackrf_one_usb_rom_to_ram-${PV}.bin "${ED}/usr/share/hackrf/hackrf_one_usb_rom_to_ram.bin"
+ ln -s hackrf_one_usb_ram-${PV}.dfu "${ED}/usr/share/hackrf/hackrf_one_usb_ram.dfu"
+ else
+ ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
+ fi
+}
diff --git a/net-wireless/hackrf-tools/metadata.xml b/net-wireless/hackrf-tools/metadata.xml
new file mode 100644
index 00000000000..f347a49f850
--- /dev/null
+++ b/net-wireless/hackrf-tools/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">hackrf</remote-id>
+ <remote-id type="github">mossmann/hackrf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/hidclient/Manifest b/net-wireless/hidclient/Manifest
new file mode 100644
index 00000000000..54cc4809ae3
--- /dev/null
+++ b/net-wireless/hidclient/Manifest
@@ -0,0 +1 @@
+DIST hidclient-20120728.tar.bz2 12563 SHA256 c2e0a0b97f816b5303d06eef8e1d1230f2a96013b30bcad8b3375358280c253c SHA512 c928d5844c7ed0cb20421c9241a938d39bb7d65accf9493817c6d9e1de9049a5e8256838b086ff6a44023259656c0c985c2155ed125838c6a2d73439c21884d4 WHIRLPOOL 32aafac3bffc95e0f033353a132f0bd6226fc6d54dd06c766b459320bce8d5090a3f5d2f4d28dae9129aa2ce6f927d33032a2ada635547d136bee4ccd63f0359
diff --git a/net-wireless/hidclient/files/README b/net-wireless/hidclient/files/README
new file mode 100644
index 00000000000..20497fa7dc4
--- /dev/null
+++ b/net-wireless/hidclient/files/README
@@ -0,0 +1,16 @@
+Maintainer note: I copied this from the homepage for reference
+
+Command-line parameter "-l" to list input devices
+-e<NUM> to ONLY bind to device Number NUM (see -l List)
+-x will "mute" the device(s) for X11 so you can start hidclient while having a X11 session.
+-fFIFONAME will read data from a FIFO instead of event devices.
+
+You don't need to copy anything into /etc/bluetooth. Might be a good idea to edit /etc/bluetooth/main.conf and set "DisabledPlugins=input" there, and "Class=0x000540" - that helps
+identifying the device as a "keyboard". Now run
+sudo hidclient -l
+to list the available input devices. If you have for example two usb mice and want to export only one (while working locally on the other), select the ID number from the first column. Start
+hidclient with
+sudo hidclient -e4 -x
+where 4 is the number of your mouse. Hidclient will wait for bluetooth connections. The mouse should stop working on the local PC, so it will not interfere with your normal computer usage
+while it is connected to another device.
+With the -x parameter, you can ignore the "openvt" mentioned above.
diff --git a/net-wireless/hidclient/hidclient-20120728.ebuild b/net-wireless/hidclient/hidclient-20120728.ebuild
new file mode 100644
index 00000000000..97a7e7c1ae8
--- /dev/null
+++ b/net-wireless/hidclient/hidclient-20120728.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Use your machine as a bluetooh keyboard/mouse"
+HOMEPAGE="http://anselm.hoffmeister.be/computer/hidclient/"
+SRC_URI="http://anselm.hoffmeister.be/computer/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-wireless/bluez"
+RDEPEND="${DEPEND}
+ x11-apps/xinput"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ sed -i 's#gcc#$(CC)#' Makefile
+ sed -i 's#-O2#$(CFLAGS) $(LDFLAGS)#' Makefile
+}
+
+src_compile() {
+ emake hidclient
+}
+
+src_install() {
+ dosbin hidclient
+ dodoc "${FILESDIR}"/README
+}
diff --git a/net-wireless/hidclient/metadata.xml b/net-wireless/hidclient/metadata.xml
new file mode 100644
index 00000000000..5fcbf8e1851
--- /dev/null
+++ b/net-wireless/hidclient/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-wireless/horst/Manifest b/net-wireless/horst/Manifest
new file mode 100644
index 00000000000..76d4fe2414d
--- /dev/null
+++ b/net-wireless/horst/Manifest
@@ -0,0 +1 @@
+DIST horst-4.2.tar.gz 97976 SHA256 eab46330998a4c6d5abc9bfdad739b62b57c65049ac6f160e58ee3edd3260057 SHA512 a6fa50d6eb0d2c2ae83dfccf59359f8cd74334dbc2362f01f1a3787ebb3d34bcdb76c34899cb048e4a4abc7353d72e8dd846b567ba228f9930e3f418b3656c0a WHIRLPOOL 5209beb9259b1d4a8c151e5ed66bc38f7682918c9cbd3af944de4d62e75af53fc15b6afc730cef3b3642f6475e8f9e62379c89da6a65739f34ceb61214f63645
diff --git a/net-wireless/horst/horst-4.2.ebuild b/net-wireless/horst/horst-4.2.ebuild
new file mode 100644
index 00000000000..4774eab15ab
--- /dev/null
+++ b/net-wireless/horst/horst-4.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Small 802.11 wireless LAN analyzer"
+HOMEPAGE="http://br1.einfach.org/tech/horst/"
+SRC_URI="http://br1.einfach.org/${PN}_dl/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +pcap test"
+
+RDEPEND="sys-libs/ncurses
+ pcap? ( net-libs/libpcap )"
+DEPEND="${RDEPEND}
+ test? ( sys-devel/sparse )"
+
+#just semantic tests, no functional tests
+RESTRICT=test
+
+src_compile() {
+ tc-export CC
+ emake PCAP=$(usex pcap 1 0) DEBUG=$(usex debug 1 0)
+}
+
+src_install() {
+ dosbin ${PN}{,.sh}
+ dodoc README TODO
+ doman ${PN}.1
+}
diff --git a/net-wireless/horst/horst-9999.ebuild b/net-wireless/horst/horst-9999.ebuild
new file mode 100644
index 00000000000..e29591a5d7b
--- /dev/null
+++ b/net-wireless/horst/horst-9999.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs git-r3
+
+DESCRIPTION="Small 802.11 wireless LAN analyzer"
+HOMEPAGE="http://br1.einfach.org/tech/horst/"
+EGIT_REPO_URI="https://github.com/br101/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug +pcap test"
+
+RDEPEND="sys-libs/ncurses
+ pcap? ( net-libs/libpcap )"
+DEPEND="${RDEPEND}
+ test? ( sys-devel/sparse )"
+
+#just semantic tests, no functional tests
+RESTRICT=test
+
+src_compile() {
+ tc-export CC
+ emake PCAP=$(usex pcap 1 0) DEBUG=$(usex debug 1 0)
+}
+
+src_install() {
+ dosbin ${PN}{,.sh}
+ dodoc README TODO
+ doman ${PN}.1
+ insinto /etc
+ doins ${PN}.conf
+}
diff --git a/net-wireless/horst/metadata.xml b/net-wireless/horst/metadata.xml
new file mode 100644
index 00000000000..b6b141817fa
--- /dev/null
+++ b/net-wireless/horst/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<use>
+ <flag name="pcap">Add support for network packet capture via net-libs/libpcap</flag>
+</use>
+</pkgmetadata>
diff --git a/net-wireless/hostap-utils/Manifest b/net-wireless/hostap-utils/Manifest
new file mode 100644
index 00000000000..bba788616c6
--- /dev/null
+++ b/net-wireless/hostap-utils/Manifest
@@ -0,0 +1 @@
+DIST hostap-utils-0.4.7.tar.gz 60782 SHA256 c6f598d8e356c1620fa009eca0a700bf1105e16817eefd77d891994261009355 SHA512 1a54c5d84b02d2dc96c33d6463af775212e09a20ac85367184636d364f17a09e48f937417dd9c43148663d242b3fc5f2f13835ec5331bd0600ef31797c414d44 WHIRLPOOL 4e195921144640806d944ce2628dbd15fa1cf8c3b51d5ba761476fa5fc301478bca1b99f3f8cf401d3854492f4e8ed1ee9449469722b9f9030c1269cf63d1450
diff --git a/net-wireless/hostap-utils/files/hostap-utils-0.4.7-makefile.patch b/net-wireless/hostap-utils/files/hostap-utils-0.4.7-makefile.patch
new file mode 100644
index 00000000000..366a878b7b6
--- /dev/null
+++ b/net-wireless/hostap-utils/files/hostap-utils-0.4.7-makefile.patch
@@ -0,0 +1,31 @@
+--- Makefile.orig 2012-11-20 12:16:39.747881769 +0400
++++ Makefile 2012-11-20 12:17:39.248881307 +0400
+@@ -1,7 +1,3 @@
+-ifndef CFLAGS
+-CFLAGS = -O2 -Wall
+-endif
+-
+ # Include directory for CVS version
+ CFLAGS += -I../driver/modules
+
+@@ -14,17 +10,17 @@
+ hostap_crypt_conf: hostap_crypt_conf.c
+
+ hostap_diag: hostap_diag.o util.o
+- $(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o
++ $(CC) -o hostap_diag $(CFLAGS) $(LDFLAGS) hostap_diag.o util.o
+
+ hostap_diag.o: hostap_diag.c util.h
+
+ util.o: util.c util.h
+
+ hostap_io_debug: hostap_io_debug.c
+- $(CC) -o hostap_io_debug $(CFLAGS) hostap_io_debug.c
++ $(CC) -o hostap_io_debug $(CFLAGS) $(LDFLAGS) hostap_io_debug.c
+
+ hostap_rid: hostap_rid.o util.o
+- $(CC) -o hostap_rid $(CFLAGS) hostap_rid.o util.o
++ $(CC) -o hostap_rid $(CFLAGS) $(LDFLAGS) hostap_rid.o util.o
+
+ hostap_rid.o: hostap_rid.c util.h
+
diff --git a/net-wireless/hostap-utils/hostap-utils-0.4.7-r1.ebuild b/net-wireless/hostap-utils/hostap-utils-0.4.7-r1.ebuild
new file mode 100644
index 00000000000..9586f3b5288
--- /dev/null
+++ b/net-wireless/hostap-utils/hostap-utils-0.4.7-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Utilities for Intersil Prism2/2.5/3 based IEEE 802.11b wireless LAN products"
+HOMEPAGE="http://hostap.epitest.fi/"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin hostap_{crypt_conf,diag,fw_load,io_debug,rid}
+ dosbin prism2_{param,srec}
+ dosbin split_combined_hex
+
+ dodoc README
+}
diff --git a/net-wireless/hostap-utils/metadata.xml b/net-wireless/hostap-utils/metadata.xml
new file mode 100644
index 00000000000..c078bde811a
--- /dev/null
+++ b/net-wireless/hostap-utils/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+<longdescription>Utility programs for hostap-driver</longdescription>
+</pkgmetadata>
diff --git a/net-wireless/hostapd/Manifest b/net-wireless/hostapd/Manifest
new file mode 100644
index 00000000000..f9a5061af23
--- /dev/null
+++ b/net-wireless/hostapd/Manifest
@@ -0,0 +1 @@
+DIST hostapd-2.4.tar.gz 1658872 SHA256 6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f SHA512 37e648fe9cce92923ab1d1e23a4267e274c988785d7be5610f1affca425ffa86b438de81e37446926a0f9158d6b67ee83e6396c3f81d571545c973dddbf1ffe3 WHIRLPOOL 78484c7e09725ba967c8815c3d8b0ffcc0c56daaec4acc79bc15c7392084c8642a2b41156b2c6a6360badb7e9d23792699d452fe600b56e3d62dd569188b6c2c
diff --git a/net-wireless/hostapd/files/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch b/net-wireless/hostapd/files/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch
new file mode 100644
index 00000000000..36b4ca29469
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch
@@ -0,0 +1,49 @@
+From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Tue, 28 Apr 2015 17:08:33 +0300
+Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser
+
+strtoul() return value may end up overflowing the int h->chunk_size and
+resulting in a negative value to be stored as the chunk_size. This could
+result in the following memcpy operation using a very large length
+argument which would result in a buffer overflow and segmentation fault.
+
+This could have been used to cause a denial service by any device that
+has been authorized for network access (either wireless or wired). This
+would affect both the WPS UPnP functionality in a WPS AP (hostapd with
+upnp_iface parameter set in the configuration) and WPS ER
+(wpa_supplicant with WPS_ER_START control interface command used).
+
+Validate the parsed chunk length value to avoid this. In addition to
+rejecting negative values, we can also reject chunk size that would be
+larger than the maximum configured body length.
+
+Thanks to Kostya Kortchinsky of Google security team for discovering and
+reporting this issue.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/wps/httpread.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/wps/httpread.c b/src/wps/httpread.c
+index 2f08f37..d2855e3 100644
+--- a/src/wps/httpread.c
++++ b/src/wps/httpread.c
+@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx)
+ if (!isxdigit(*cbp))
+ goto bad;
+ h->chunk_size = strtoul(cbp, NULL, 16);
++ if (h->chunk_size < 0 ||
++ h->chunk_size > h->max_bytes) {
++ wpa_printf(MSG_DEBUG,
++ "httpread: Invalid chunk size %d",
++ h->chunk_size);
++ goto bad;
++ }
+ /* throw away chunk header
+ * so we have only real data
+ */
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch b/net-wireless/hostapd/files/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch
new file mode 100644
index 00000000000..79c5af8906f
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch
@@ -0,0 +1,41 @@
+From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Wed, 29 Apr 2015 02:21:53 +0300
+Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser
+
+The length of the WMM Action frame was not properly validated and the
+length of the information elements (int left) could end up being
+negative. This would result in reading significantly past the stack
+buffer while parsing the IEs in ieee802_11_parse_elems() and while doing
+so, resulting in segmentation fault.
+
+This can result in an invalid frame being used for a denial of service
+attack (hostapd process killed) against an AP with a driver that uses
+hostapd for management frame processing (e.g., all mac80211-based
+drivers).
+
+Thanks to Kostya Kortchinsky of Google security team for discovering and
+reporting this issue.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/ap/wmm.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ap/wmm.c b/src/ap/wmm.c
+index 6d4177c..314e244 100644
+--- a/src/ap/wmm.c
++++ b/src/ap/wmm.c
+@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd,
+ return;
+ }
+
++ if (left < 0)
++ return; /* not a valid WMM Action frame */
++
+ /* extract the tspec info element */
+ if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) {
+ hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch b/net-wireless/hostapd/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch
new file mode 100644
index 00000000000..91627fb7b7f
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch
@@ -0,0 +1,73 @@
+From dd2f043c9c43d156494e33d7ce22db96e6ef42c7 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 1 May 2015 16:37:45 +0300
+Subject: [PATCH 1/5] EAP-pwd peer: Fix payload length validation for Commit
+ and Confirm
+
+The length of the received Commit and Confirm message payloads was not
+checked before reading them. This could result in a buffer read
+overflow when processing an invalid message.
+
+Fix this by verifying that the payload is of expected length before
+processing it. In addition, enforce correct state transition sequence to
+make sure there is no unexpected behavior if receiving a Commit/Confirm
+message before the previous exchanges have been completed.
+
+Thanks to Kostya Kortchinsky of Google security team for discovering and
+reporting this issue.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/eap_peer/eap_pwd.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
+index f2b0926..a629437 100644
+--- a/src/eap_peer/eap_pwd.c
++++ b/src/eap_peer/eap_pwd.c
+@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
+ BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL;
+ u16 offset;
+ u8 *ptr, *scalar = NULL, *element = NULL;
++ size_t prime_len, order_len;
++
++ if (data->state != PWD_Commit_Req) {
++ ret->ignore = TRUE;
++ goto fin;
++ }
++
++ prime_len = BN_num_bytes(data->grp->prime);
++ order_len = BN_num_bytes(data->grp->order);
++
++ if (payload_len != 2 * prime_len + order_len) {
++ wpa_printf(MSG_INFO,
++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)",
++ (unsigned int) payload_len,
++ (unsigned int) (2 * prime_len + order_len));
++ goto fin;
++ }
+
+ if (((data->private_value = BN_new()) == NULL) ||
+ ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) ||
+@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
+ u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr;
+ int offset;
+
++ if (data->state != PWD_Confirm_Req) {
++ ret->ignore = TRUE;
++ goto fin;
++ }
++
++ if (payload_len != SHA256_MAC_LEN) {
++ wpa_printf(MSG_INFO,
++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)",
++ (unsigned int) payload_len, SHA256_MAC_LEN);
++ goto fin;
++ }
++
+ /*
+ * first build up the ciphersuite which is group | random_function |
+ * prf
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch b/net-wireless/hostapd/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch
new file mode 100644
index 00000000000..5dca20b2771
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch
@@ -0,0 +1,66 @@
+From e28a58be26184c2a23f80b410e0997ef1bd5d578 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 1 May 2015 16:40:44 +0300
+Subject: [PATCH 2/5] EAP-pwd server: Fix payload length validation for Commit
+ and Confirm
+
+The length of the received Commit and Confirm message payloads was not
+checked before reading them. This could result in a buffer read
+overflow when processing an invalid message.
+
+Fix this by verifying that the payload is of expected length before
+processing it. In addition, enforce correct state transition sequence to
+make sure there is no unexpected behavior if receiving a Commit/Confirm
+message before the previous exchanges have been completed.
+
+Thanks to Kostya Kortchinsky of Google security team for discovering and
+reporting this issue.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/eap_server/eap_server_pwd.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
+index 66bd5d2..3189105 100644
+--- a/src/eap_server/eap_server_pwd.c
++++ b/src/eap_server/eap_server_pwd.c
+@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data,
+ BIGNUM *x = NULL, *y = NULL, *cofactor = NULL;
+ EC_POINT *K = NULL, *point = NULL;
+ int res = 0;
++ size_t prime_len, order_len;
+
+ wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response");
+
++ prime_len = BN_num_bytes(data->grp->prime);
++ order_len = BN_num_bytes(data->grp->order);
++
++ if (payload_len != 2 * prime_len + order_len) {
++ wpa_printf(MSG_INFO,
++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)",
++ (unsigned int) payload_len,
++ (unsigned int) (2 * prime_len + order_len));
++ goto fin;
++ }
++
+ if (((data->peer_scalar = BN_new()) == NULL) ||
+ ((data->k = BN_new()) == NULL) ||
+ ((cofactor = BN_new()) == NULL) ||
+@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data,
+ u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr;
+ int offset;
+
++ if (payload_len != SHA256_MAC_LEN) {
++ wpa_printf(MSG_INFO,
++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)",
++ (unsigned int) payload_len, SHA256_MAC_LEN);
++ goto fin;
++ }
++
+ /* build up the ciphersuite: group | random_function | prf */
+ grp = htons(data->group_num);
+ ptr = (u8 *) &cs;
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch b/net-wireless/hostapd/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch
new file mode 100644
index 00000000000..4d2f9d8aefe
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch
@@ -0,0 +1,52 @@
+From 477c74395acd0123340457ba6f15ab345d42016e Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 2 May 2015 19:23:04 +0300
+Subject: [PATCH 3/5] EAP-pwd peer: Fix Total-Length parsing for fragment
+ reassembly
+
+The remaining number of bytes in the message could be smaller than the
+Total-Length field size, so the length needs to be explicitly checked
+prior to reading the field and decrementing the len variable. This could
+have resulted in the remaining length becoming negative and interpreted
+as a huge positive integer.
+
+In addition, check that there is no already started fragment in progress
+before allocating a new buffer for reassembling fragments. This avoid a
+potential memory leak when processing invalid message.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/eap_peer/eap_pwd.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
+index a629437..1d2079b 100644
+--- a/src/eap_peer/eap_pwd.c
++++ b/src/eap_peer/eap_pwd.c
+@@ -866,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret,
+ * if it's the first fragment there'll be a length field
+ */
+ if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
++ if (len < 2) {
++ wpa_printf(MSG_DEBUG,
++ "EAP-pwd: Frame too short to contain Total-Length field");
++ ret->ignore = TRUE;
++ return NULL;
++ }
+ tot_len = WPA_GET_BE16(pos);
+ wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose "
+ "total length = %d", tot_len);
+ if (tot_len > 15000)
+ return NULL;
++ if (data->inbuf) {
++ wpa_printf(MSG_DEBUG,
++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use");
++ ret->ignore = TRUE;
++ return NULL;
++ }
+ data->inbuf = wpabuf_alloc(tot_len);
+ if (data->inbuf == NULL) {
+ wpa_printf(MSG_INFO, "Out of memory to buffer "
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch b/net-wireless/hostapd/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch
new file mode 100644
index 00000000000..7edef099eb5
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch
@@ -0,0 +1,50 @@
+From 3035cc2894e08319b905bd6561e8bddc8c2db9fa Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 2 May 2015 19:26:06 +0300
+Subject: [PATCH 4/5] EAP-pwd server: Fix Total-Length parsing for fragment
+ reassembly
+
+The remaining number of bytes in the message could be smaller than the
+Total-Length field size, so the length needs to be explicitly checked
+prior to reading the field and decrementing the len variable. This could
+have resulted in the remaining length becoming negative and interpreted
+as a huge positive integer.
+
+In addition, check that there is no already started fragment in progress
+before allocating a new buffer for reassembling fragments. This avoid a
+potential memory leak when processing invalid message.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/eap_server/eap_server_pwd.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
+index 3189105..2bfc3c2 100644
+--- a/src/eap_server/eap_server_pwd.c
++++ b/src/eap_server/eap_server_pwd.c
+@@ -942,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
+ * the first fragment has a total length
+ */
+ if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
++ if (len < 2) {
++ wpa_printf(MSG_DEBUG,
++ "EAP-pwd: Frame too short to contain Total-Length field");
++ return;
++ }
+ tot_len = WPA_GET_BE16(pos);
+ wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total "
+ "length = %d", tot_len);
+ if (tot_len > 15000)
+ return;
++ if (data->inbuf) {
++ wpa_printf(MSG_DEBUG,
++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use");
++ return;
++ }
+ data->inbuf = wpabuf_alloc(tot_len);
+ if (data->inbuf == NULL) {
+ wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to "
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch b/net-wireless/hostapd/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch
new file mode 100644
index 00000000000..a601323f14d
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch
@@ -0,0 +1,32 @@
+From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 2 May 2015 19:26:28 +0300
+Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior
+
+The L (Length) and M (More) flags needs to be cleared before deciding
+whether the locally generated response requires fragmentation. This
+fixes an issue where these flags from the server could have been invalid
+for the following message. In some cases, this could have resulted in
+triggering the wpabuf security check that would terminate the process
+due to invalid buffer allocation.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/eap_peer/eap_pwd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
+index 1d2079b..e58b13a 100644
+--- a/src/eap_peer/eap_pwd.c
++++ b/src/eap_peer/eap_pwd.c
+@@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret,
+ /*
+ * we have output! Do we need to fragment it?
+ */
++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch);
+ len = wpabuf_len(data->outbuf);
+ if ((len + EAP_PWD_HDR_SIZE) > data->mtu) {
+ resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu,
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch b/net-wireless/hostapd/files/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch
new file mode 100644
index 00000000000..d03eb484fc2
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch
@@ -0,0 +1,29 @@
+From fc880b11ed70ff9dcf8be48621f75d354cc5094d Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Tue, 7 Jul 2015 15:33:55 +0300
+Subject: [PATCH] NFC: Avoid misaligned read of an NDEF field
+
+The 32-bit version of payload length field may not be 32-bit aligned in
+the message buffer, so use WPA_GET_BE32() to read it instead of ntohl().
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/wps/ndef.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wps/ndef.c b/src/wps/ndef.c
+index 8d1ce1e..5604b0a 100644
+--- a/src/wps/ndef.c
++++ b/src/wps/ndef.c
+@@ -47,7 +47,7 @@ static int ndef_parse_record(const u8 *data, u32 size,
+ } else {
+ if (size < 6)
+ return -1;
+- record->payload_length = ntohl(*(u32 *)pos);
++ record->payload_length = WPA_GET_BE32(pos);
+ pos += sizeof(u32);
+ }
+
+--
+1.7.9.5
+
diff --git a/net-wireless/hostapd/files/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch b/net-wireless/hostapd/files/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch
new file mode 100644
index 00000000000..1f624c8dad4
--- /dev/null
+++ b/net-wireless/hostapd/files/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch
@@ -0,0 +1,61 @@
+From df9079e72760ceb7ebe7fb11538200c516bdd886 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Tue, 7 Jul 2015 21:57:28 +0300
+Subject: [PATCH] NFC: Fix payload length validation in NDEF record parser
+
+It was possible for the 32-bit record->total_length value to end up
+wrapping around due to integer overflow if the longer form of payload
+length field is used and record->payload_length gets a value close to
+2^32. This could result in ndef_parse_record() accepting a too large
+payload length value and the record type filter reading up to about 20
+bytes beyond the end of the buffer and potentially killing the process.
+This could also result in an attempt to allocate close to 2^32 bytes of
+heap memory and if that were to succeed, a buffer read overflow of the
+same length which would most likely result in the process termination.
+In case of record->total_length ending up getting the value 0, there
+would be no buffer read overflow, but record parsing would result in an
+infinite loop in ndef_parse_records().
+
+Any of these error cases could potentially be used for denial of service
+attacks over NFC by using a malformed NDEF record on an NFC Tag or
+sending them during NFC connection handover if the application providing
+the NDEF message to hostapd/wpa_supplicant did no validation of the
+received records. While such validation is likely done in the NFC stack
+that needs to parse the NFC messages before further processing,
+hostapd/wpa_supplicant better be prepared for any data being included
+here.
+
+Fix this by validating record->payload_length value in a way that
+detects integer overflow. (CID 122668)
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/wps/ndef.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/wps/ndef.c b/src/wps/ndef.c
+index 5604b0a..50d018f 100644
+--- a/src/wps/ndef.c
++++ b/src/wps/ndef.c
+@@ -48,6 +48,8 @@ static int ndef_parse_record(const u8 *data, u32 size,
+ if (size < 6)
+ return -1;
+ record->payload_length = WPA_GET_BE32(pos);
++ if (record->payload_length > size - 6)
++ return -1;
+ pos += sizeof(u32);
+ }
+
+@@ -68,7 +70,8 @@ static int ndef_parse_record(const u8 *data, u32 size,
+ pos += record->payload_length;
+
+ record->total_length = pos - data;
+- if (record->total_length > size)
++ if (record->total_length > size ||
++ record->total_length < record->payload_length)
+ return -1;
+ return 0;
+ }
+--
+1.9.1
+
diff --git a/net-wireless/hostapd/files/hostapd-conf.d b/net-wireless/hostapd/files/hostapd-conf.d
new file mode 100644
index 00000000000..7d05735eb3b
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-conf.d
@@ -0,0 +1,9 @@
+# Space separated List of interfaces which needs to be started before
+# hostapd
+INTERFACES="wlan0"
+
+# Space separated list of configuration files
+CONFIGS="/etc/hostapd/hostapd.conf"
+
+# Extra options to pass to hostapd, see hostapd(8)
+OPTIONS=""
diff --git a/net-wireless/hostapd/files/hostapd-hlr_auc_gw-openssl.patch b/net-wireless/hostapd/files/hostapd-hlr_auc_gw-openssl.patch
new file mode 100644
index 00000000000..1e88859b8e0
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-hlr_auc_gw-openssl.patch
@@ -0,0 +1,43 @@
+From 58e115b86928000475b734a4345862afe11d6352 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Fri, 20 Mar 2015 12:56:31 +0000
+Subject: Fix hlr_auc_gw build with OpenSSL
+
+Commit 983c6a606bc839248ea0c69090e60c095a655bc6 ('OpenSSL: Replace
+internal HMAC-MD5 implementation') forgot to make inclusion of md5.o
+conditional for hlr_auc_gw build.
+
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+---
+diff --git a/hostapd/Android.mk b/hostapd/Android.mk
+index 5c69bd1..54b139c 100644
+--- a/hostapd/Android.mk
++++ b/hostapd/Android.mk
+@@ -795,8 +795,10 @@ OBJS += src/crypto/random.c
+ HOBJS += src/crypto/random.c
+ HOBJS += src/utils/eloop.c
+ HOBJS += $(SHA1OBJS)
++ifneq ($(CONFIG_TLS), openssl)
+ HOBJS += src/crypto/md5.c
+ endif
++endif
+
+ ifdef CONFIG_RADIUS_SERVER
+ L_CFLAGS += -DRADIUS_SERVER
+diff --git a/hostapd/Makefile b/hostapd/Makefile
+index 520ae89..d718c15 100644
+--- a/hostapd/Makefile
++++ b/hostapd/Makefile
+@@ -792,8 +792,10 @@ OBJS += ../src/crypto/random.o
+ HOBJS += ../src/crypto/random.o
+ HOBJS += ../src/utils/eloop.o
+ HOBJS += $(SHA1OBJS)
++ifneq ($(CONFIG_TLS), openssl)
+ HOBJS += ../src/crypto/md5.o
+ endif
++endif
+
+ ifdef CONFIG_RADIUS_SERVER
+ CFLAGS += -DRADIUS_SERVER
+--
+cgit v0.9.2
diff --git a/net-wireless/hostapd/files/hostapd-init.d b/net-wireless/hostapd/files/hostapd-init.d
new file mode 100644
index 00000000000..eafbc6046c7
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-init.d
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/sbin/hostapd"
+command_args="-P ${pidfile} -B ${OPTIONS} ${CONFIGS}"
+
+extra_started_commands="reload"
+
+depend() {
+ local myneeds=
+ for iface in ${INTERFACES}; do
+ myneeds="${myneeds} net.${iface}"
+ done
+
+ [ -n "${myneeds}" ] && need ${myneeds}
+ use logger
+}
+
+start_pre() {
+ local file
+
+ for file in ${CONFIGS}; do
+ if [ ! -r "${file}" ]; then
+ eerror "hostapd configuration file (${CONFIG}) not found"
+ return 1
+ fi
+ done
+}
+
+reload() {
+ start_pre || return 1
+
+ ebegin "Reloading ${SVCNAME} configuration"
+ kill -HUP $(cat ${pidfile}) > /dev/null 2>&1
+ eend $?
+}
diff --git a/net-wireless/hostapd/files/hostapd.service b/net-wireless/hostapd/files/hostapd.service
new file mode 100644
index 00000000000..8f0ee8e8f74
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/hostapd /etc/hostapd/hostapd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-wireless/hostapd/hostapd-2.4-r2.ebuild b/net-wireless/hostapd/hostapd-2.4-r2.ebuild
new file mode 100644
index 00000000000..82d4e65ea8f
--- /dev/null
+++ b/net-wireless/hostapd/hostapd-2.4-r2.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils systemd
+
+DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
+HOMEPAGE="http://hostap.epitest.fi"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc x86"
+IUSE="ipv6 logwatch netlink sqlite +ssl +wps +crda"
+
+DEPEND="ssl? ( dev-libs/openssl[-bindist] )
+ kernel_linux? (
+ dev-libs/libnl:3
+ crda? ( net-wireless/crda )
+ )
+ netlink? ( net-libs/libnfnetlink )
+ sqlite? ( >=dev-db/sqlite-3 )"
+
+RDEPEND="${DEPEND}"
+
+S="${S}/${PN}"
+
+src_prepare() {
+ cd ..
+
+ # bug (548744)
+ epatch "${FILESDIR}/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch"
+ epatch "${FILESDIR}/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch"
+ epatch "${FILESDIR}/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch"
+ epatch "${FILESDIR}/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch"
+ epatch "${FILESDIR}/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch"
+ epatch "${FILESDIR}/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch"
+ epatch "${FILESDIR}/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch"
+
+ cd "${PN}"
+
+ epatch "${FILESDIR}/${PN}-hlr_auc_gw-openssl.patch"
+
+ sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
+ "${S}/hostapd.conf" || die
+}
+
+src_configure() {
+ local CONFIG="${S}/.config"
+
+ # toolchain setup
+ echo "CC = $(tc-getCC)" > ${CONFIG}
+
+ # EAP authentication methods
+ echo "CONFIG_EAP=y" >> ${CONFIG}
+ echo "CONFIG_ERP=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
+
+ if use ssl; then
+ # SSL authentication methods
+ echo "CONFIG_EAP_FAST=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
+ echo "CONFIG_TLSV11=y" >> ${CONFIG}
+ echo "CONFIG_TLSV12=y" >> ${CONFIG}
+ fi
+
+ if use wps; then
+ # Enable Wi-Fi Protected Setup
+ echo "CONFIG_WPS=y" >> ${CONFIG}
+ echo "CONFIG_WPS2=y" >> ${CONFIG}
+ echo "CONFIG_WPS_UPNP=y" >> ${CONFIG}
+ echo "CONFIG_WPS_NFC=y" >> ${CONFIG}
+ einfo "Enabling Wi-Fi Protected Setup support"
+ fi
+
+ echo "CONFIG_EAP_IKEV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TNC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA_PRIME=y" >> ${CONFIG}
+ echo "CONFIG_EAP_EKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PAX=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SAKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PWD=y" >> ${CONFIG}
+
+ einfo "Enabling drivers: "
+
+ # drivers
+ echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
+ einfo " HostAP driver enabled"
+ echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
+ einfo " Wired driver enabled"
+ echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
+ einfo " Prism54 driver enabled"
+ echo "CONFIG_DRIVER_NONE=y" >> ${CONFIG}
+ einfo " None driver enabled"
+
+ einfo " nl80211 driver enabled"
+ echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
+
+ # misc
+ echo "CONFIG_DEBUG_FILE=y" >> ${CONFIG}
+ echo "CONFIG_PKCS12=y" >> ${CONFIG}
+ echo "CONFIG_RADIUS_SERVER=y" >> ${CONFIG}
+ echo "CONFIG_IAPP=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211R=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211W=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211N=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211AC=y" >> ${CONFIG}
+ echo "CONFIG_PEERKEY=y" >> ${CONFIG}
+ echo "CONFIG_RSN_PREAUTH=y" >> ${CONFIG}
+ echo "CONFIG_INTERWORKING=y" >> ${CONFIG}
+ echo "CONFIG_FULL_DYNAMIC_VLAN=y" >> ${CONFIG}
+ echo "CONFIG_HS20=y" >> ${CONFIG}
+ echo "CONFIG_WNM=y" >> ${CONFIG}
+ echo "CONFIG_ACS=y" >> ${CONFIG}
+
+ if use netlink; then
+ # Netlink support
+ echo "CONFIG_VLAN_NETLINK=y" >> ${CONFIG}
+ fi
+
+ if use ipv6; then
+ # IPv6 support
+ echo "CONFIG_IPV6=y" >> ${CONFIG}
+ fi
+
+ if use sqlite; then
+ # Sqlite support
+ echo "CONFIG_SQLITE=y" >> ${CONFIG}
+ fi
+
+ # If we are using libnl 2.0 and above, enable support for it
+ # Removed for now, since the 3.2 version is broken, and we don't
+ # support it.
+ if has_version ">=dev-libs/libnl-3.2"; then
+ echo "CONFIG_LIBNL32=y" >> .config
+ fi
+
+ # TODO: Add support for BSD drivers
+
+ default_src_configure
+}
+
+src_compile() {
+ emake V=1
+
+ if use ssl; then
+ emake V=1 nt_password_hash
+ emake V=1 hlr_auc_gw
+ fi
+}
+
+src_install() {
+ insinto /etc/${PN}
+ doins ${PN}.{conf,accept,deny,eap_user,radius_clients,sim_db,wpa_psk}
+
+ fperms -R 600 /etc/${PN}
+
+ dosbin ${PN}
+ dobin ${PN}_cli
+
+ use ssl && dobin nt_password_hash hlr_auc_gw
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ doman ${PN}{.8,_cli.1}
+
+ dodoc ChangeLog README
+ use wps && dodoc README-WPS
+
+ docinto examples
+ dodoc wired.conf
+
+ if use logwatch; then
+ insinto /etc/log.d/conf/services/
+ doins logwatch/${PN}.conf
+
+ exeinto /etc/log.d/scripts/services/
+ doexe logwatch/${PN}
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If you are running openRC you need to follow this instructions:"
+ einfo "In order to use ${PN} you need to set up your wireless card"
+ einfo "for master mode in /etc/conf.d/net and then start"
+ einfo "/etc/init.d/${PN}."
+ einfo
+ einfo "Example configuration:"
+ einfo
+ einfo "config_wlan0=( \"192.168.1.1/24\" )"
+ einfo "channel_wlan0=\"6\""
+ einfo "essid_wlan0=\"test\""
+ einfo "mode_wlan0=\"master\""
+ einfo
+ #if [ -e "${KV_DIR}"/net/mac80211 ]; then
+ # einfo "This package now compiles against the headers installed by"
+ # einfo "the kernel source for the mac80211 driver. You should "
+ # einfo "re-emerge ${PN} after upgrading your kernel source."
+ #fi
+
+ if use wps; then
+ einfo "You have enabled Wi-Fi Protected Setup support, please"
+ einfo "read the README-WPS file in /usr/share/doc/${P}"
+ einfo "for info on how to use WPS"
+ fi
+}
diff --git a/net-wireless/hostapd/hostapd-2.4-r3.ebuild b/net-wireless/hostapd/hostapd-2.4-r3.ebuild
new file mode 100644
index 00000000000..82fc20d92a1
--- /dev/null
+++ b/net-wireless/hostapd/hostapd-2.4-r3.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils systemd
+
+DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
+HOMEPAGE="http://hostap.epitest.fi"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+IUSE="ipv6 logwatch netlink sqlite +ssl +wps +crda"
+
+DEPEND="ssl? ( dev-libs/openssl[-bindist] )
+ kernel_linux? (
+ dev-libs/libnl:3
+ crda? ( net-wireless/crda )
+ )
+ netlink? ( net-libs/libnfnetlink )
+ sqlite? ( >=dev-db/sqlite-3 )"
+
+RDEPEND="${DEPEND}"
+
+S="${S}/${PN}"
+
+src_prepare() {
+ cd ..
+
+ # bug (548744)
+ epatch "${FILESDIR}/2015-2/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch"
+ epatch "${FILESDIR}/2015-3/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch"
+ epatch "${FILESDIR}/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch"
+ epatch "${FILESDIR}/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch"
+ epatch "${FILESDIR}/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch"
+ epatch "${FILESDIR}/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch"
+ epatch "${FILESDIR}/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch"
+
+ # bug (554862)
+ epatch "${FILESDIR}/2015-5/0001-NFC-Avoid-misaligned-read-of-an-NDEF-field.patch"
+ epatch "${FILESDIR}/2015-5/0002-NFC-Fix-payload-length-validation-in-NDEF-record-par.patch"
+
+ cd "${PN}"
+
+ epatch "${FILESDIR}/${PN}-hlr_auc_gw-openssl.patch"
+
+ sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
+ "${S}/hostapd.conf" || die
+}
+
+src_configure() {
+ local CONFIG="${S}/.config"
+
+ # toolchain setup
+ echo "CC = $(tc-getCC)" > ${CONFIG}
+
+ # EAP authentication methods
+ echo "CONFIG_EAP=y" >> ${CONFIG}
+ echo "CONFIG_ERP=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
+
+ if use ssl; then
+ # SSL authentication methods
+ echo "CONFIG_EAP_FAST=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
+ echo "CONFIG_TLSV11=y" >> ${CONFIG}
+ echo "CONFIG_TLSV12=y" >> ${CONFIG}
+ fi
+
+ if use wps; then
+ # Enable Wi-Fi Protected Setup
+ echo "CONFIG_WPS=y" >> ${CONFIG}
+ echo "CONFIG_WPS2=y" >> ${CONFIG}
+ echo "CONFIG_WPS_UPNP=y" >> ${CONFIG}
+ echo "CONFIG_WPS_NFC=y" >> ${CONFIG}
+ einfo "Enabling Wi-Fi Protected Setup support"
+ fi
+
+ echo "CONFIG_EAP_IKEV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TNC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA_PRIME=y" >> ${CONFIG}
+ echo "CONFIG_EAP_EKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PAX=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SAKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PWD=y" >> ${CONFIG}
+
+ einfo "Enabling drivers: "
+
+ # drivers
+ echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
+ einfo " HostAP driver enabled"
+ echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
+ einfo " Wired driver enabled"
+ echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
+ einfo " Prism54 driver enabled"
+ echo "CONFIG_DRIVER_NONE=y" >> ${CONFIG}
+ einfo " None driver enabled"
+
+ einfo " nl80211 driver enabled"
+ echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
+
+ # misc
+ echo "CONFIG_DEBUG_FILE=y" >> ${CONFIG}
+ echo "CONFIG_PKCS12=y" >> ${CONFIG}
+ echo "CONFIG_RADIUS_SERVER=y" >> ${CONFIG}
+ echo "CONFIG_IAPP=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211R=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211W=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211N=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211AC=y" >> ${CONFIG}
+ echo "CONFIG_PEERKEY=y" >> ${CONFIG}
+ echo "CONFIG_RSN_PREAUTH=y" >> ${CONFIG}
+ echo "CONFIG_INTERWORKING=y" >> ${CONFIG}
+ echo "CONFIG_FULL_DYNAMIC_VLAN=y" >> ${CONFIG}
+ echo "CONFIG_HS20=y" >> ${CONFIG}
+ echo "CONFIG_WNM=y" >> ${CONFIG}
+ echo "CONFIG_ACS=y" >> ${CONFIG}
+
+ if use netlink; then
+ # Netlink support
+ echo "CONFIG_VLAN_NETLINK=y" >> ${CONFIG}
+ fi
+
+ if use ipv6; then
+ # IPv6 support
+ echo "CONFIG_IPV6=y" >> ${CONFIG}
+ fi
+
+ if use sqlite; then
+ # Sqlite support
+ echo "CONFIG_SQLITE=y" >> ${CONFIG}
+ fi
+
+ # If we are using libnl 2.0 and above, enable support for it
+ # Removed for now, since the 3.2 version is broken, and we don't
+ # support it.
+ if has_version ">=dev-libs/libnl-3.2"; then
+ echo "CONFIG_LIBNL32=y" >> .config
+ fi
+
+ # TODO: Add support for BSD drivers
+
+ default_src_configure
+}
+
+src_compile() {
+ emake V=1
+
+ if use ssl; then
+ emake V=1 nt_password_hash
+ emake V=1 hlr_auc_gw
+ fi
+}
+
+src_install() {
+ insinto /etc/${PN}
+ doins ${PN}.{conf,accept,deny,eap_user,radius_clients,sim_db,wpa_psk}
+
+ fperms -R 600 /etc/${PN}
+
+ dosbin ${PN}
+ dobin ${PN}_cli
+
+ use ssl && dobin nt_password_hash hlr_auc_gw
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ doman ${PN}{.8,_cli.1}
+
+ dodoc ChangeLog README
+ use wps && dodoc README-WPS
+
+ docinto examples
+ dodoc wired.conf
+
+ if use logwatch; then
+ insinto /etc/log.d/conf/services/
+ doins logwatch/${PN}.conf
+
+ exeinto /etc/log.d/scripts/services/
+ doexe logwatch/${PN}
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If you are running openRC you need to follow this instructions:"
+ einfo "In order to use ${PN} you need to set up your wireless card"
+ einfo "for master mode in /etc/conf.d/net and then start"
+ einfo "/etc/init.d/${PN}."
+ einfo
+ einfo "Example configuration:"
+ einfo
+ einfo "config_wlan0=( \"192.168.1.1/24\" )"
+ einfo "channel_wlan0=\"6\""
+ einfo "essid_wlan0=\"test\""
+ einfo "mode_wlan0=\"master\""
+ einfo
+ #if [ -e "${KV_DIR}"/net/mac80211 ]; then
+ # einfo "This package now compiles against the headers installed by"
+ # einfo "the kernel source for the mac80211 driver. You should "
+ # einfo "re-emerge ${PN} after upgrading your kernel source."
+ #fi
+
+ if use wps; then
+ einfo "You have enabled Wi-Fi Protected Setup support, please"
+ einfo "read the README-WPS file in /usr/share/doc/${P}"
+ einfo "for info on how to use WPS"
+ fi
+}
diff --git a/net-wireless/hostapd/metadata.xml b/net-wireless/hostapd/metadata.xml
new file mode 100644
index 00000000000..ff83262e4c5
--- /dev/null
+++ b/net-wireless/hostapd/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <longdescription>
+ User space daemon for the hostap-driver.
+ Extended IEEE 802.11 management, IEEE 802.1X Authenticator,
+ RADIUS Authentication client, RADIUS Accounting client
+ </longdescription>
+ <use>
+ <flag name='crda'>Add CRDA support</flag>
+ <flag name='logwatch'>Install support files for
+ <pkg>sys-app/logwatch</pkg></flag>
+ <flag name='netlink'>Adding support for using netlink to create VLANs</flag>
+ <flag name='sqlite'>Adding sqlite support</flag>
+ <flag name='wps'>Add support for Wi-Fi Protected Setup</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-wireless/irda-utils/Manifest b/net-wireless/irda-utils/Manifest
new file mode 100644
index 00000000000..e71346dcec9
--- /dev/null
+++ b/net-wireless/irda-utils/Manifest
@@ -0,0 +1 @@
+DIST irda-utils-0.9.18.tar.gz 168390 SHA256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6 SHA512 493360b5c03f93063265663b86c8ef3ade714c51edf804390c4e713cb0aeea204c5cd06c8ceffb99b1531fca7272422e53d52e03b66ddc4bceb5503f4ab5f3ad WHIRLPOOL 8282478bb9f96eb4def9f60bd7db9d6471b65bcddbb9ff6d4a63698940cc6a11062541ff2f3619d6f11928aedd172053d424698288e7a2bce9f13119078d83a6
diff --git a/net-wireless/irda-utils/files/irda-setup.sh b/net-wireless/irda-utils/files/irda-setup.sh
new file mode 100644
index 00000000000..a7c781989c5
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-setup.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# irda-setup
+#
+# Initialize IrDA devices. Based on a Ubuntu init-script,
+# but adapted to be called directly from udev.
+#
+# params: sir/fir <module> <options>
+
+MODE="${1}"
+shift
+
+SYSFS="/sys"
+RESOURCES="${SYSFS}${DEVPATH}/resources"
+
+# Work out resource ranges, so we know which serial port to work with
+PORTS=$(/bin/sed -n 's/io \(.*\)-.*/\1/p' "${RESOURCES}")
+for PORT in ${PORTS}; do
+ case "${PORT}" in
+ 0x3f8)
+ PORT="/dev/ttyS0"
+ break;;
+ 0x2f8)
+ PORT="/dev/ttyS1"
+ break;;
+ 0x3e8)
+ PORT="/dev/ttyS2"
+ break;;
+ 0x2e8)
+ PORT="/dev/ttyS3"
+ break;;
+ default)
+ PORT="UNKNOWN";;
+ esac
+done
+
+# Handle FIR dongles
+if [ "${MODE}" = "fir" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ UART="unknown";
+ if [ "${PORT}" != "UNKNOWN" ]; then
+ # We should attempt to disable the UART. However, we need to store
+ # it - there's a chance that things could still go horribly wrong
+ UART=$(/bin/setserial ${PORT} | /bin/sed 's/.*UART: \(.*\), Port.*/\1/')
+ /bin/setserial ${PORT} uart none
+ fi
+
+ # Load FIR module
+ /sbin/modprobe -sq "${@}" && exit 0 # OK
+
+ # Try to recover
+ [ "${UART}" != "undefined" ] && /bin/setserial ${PORT} uart ${UART}
+fi
+
+# We'll only have got here if we have SIR or the FIR module has failed
+if [ "${PORT}" != "UNKNOWN" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ # The IRQ is not always set correctly, so try to deal with that
+ /bin/setserial ${PORT} $(/bin/grep -h '^irq ' "${RESOURCES}")
+fi
+
+exit 0 # never fail
diff --git a/net-wireless/irda-utils/files/irda-usb.sh b/net-wireless/irda-utils/files/irda-usb.sh
new file mode 100644
index 00000000000..d0250eab891
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-usb.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# irda-usb
+#
+# Hotplug IrDA-USB devices. Only USB devices are handled!
+# To initialize normal SIR/FIR dongles, please use /etc/init.d/irda
+
+SYSFS="/sys"
+
+checkusb() {
+ # quick check, but not always available
+ [ "${PHYSDEVBUS}" = "usb" ] && return 0
+
+ # alternative check via modalias
+ /bin/grep -q '^usb:' "${SYSFS}${DEVPATH}/device/modalias" 2>/dev/null
+}
+
+checkconfig() {
+ . /etc/conf.d/irda
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+}
+
+case "${ACTION}" in
+ add)
+ # We handle USB only
+ checkusb || exit 0
+
+ # Load config
+ checkconfig
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${INTERFACE} ${DISCOVERY}
+ ;;
+
+ remove)
+ # Unconditionally kill irattach instance
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${INTERFACE} ?"
+ ;;
+esac
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch
new file mode 100644
index 00000000000..26937a042c2
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch
@@ -0,0 +1,15 @@
+Fixing as-needed issues
+
+http://bugs.gentoo.org/show_bug.cgi?id=318135
+
+--- irdadump/Makefile
++++ irdadump/Makefile
+@@ -40,7 +40,7 @@
+
+ irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
++ $(ECMD)$(CC) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
+
+
+ .c.o:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch
new file mode 100644
index 00000000000..9c752407a36
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch
@@ -0,0 +1,26 @@
+--- a/Makefile
++++ b/Makefile
+@@ -31,19 +31,19 @@
+ CFLAGS= -O2 -W -Wall
+
+ all:
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ install:
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ clean:
+ $(prn_clean)
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ distclean:
+ $(prn_distclean)
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch
new file mode 100644
index 00000000000..1c40edc7cd7
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch
@@ -0,0 +1,11 @@
+--- tekram/Makefile.orig 2010-11-02 22:41:43.000000000 +0100
++++ tekram/Makefile 2010-11-02 22:41:53.000000000 +0100
+@@ -38,7 +38,7 @@
+ #
+ # System stuff
+ #
+-SYS_INCLUDES = -I/usr/src/linux/include -I/usr/include -I../include
++SYS_INCLUDES = -I/usr/include -I../include
+ SYS_LIBRARIES =
+ SYS_LIBPATH = -L/usr/lib -L/usr/local/lib
+
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff
new file mode 100644
index 00000000000..13de1f94400
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff
@@ -0,0 +1,48 @@
+diff -Naur irda-utils-0.9.18-orig/findchip/nsc.c irda-utils-0.9.18/findchip/nsc.c
+--- irda-utils-0.9.18-orig/findchip/nsc.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/nsc.c 2007-09-25 01:34:32.000000000 +0200
+@@ -33,7 +33,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/findchip/smc.c irda-utils-0.9.18/findchip/smc.c
+--- irda-utils-0.9.18-orig/findchip/smc.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/smc.c 2007-09-25 01:34:32.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/findchip/winbond.c irda-utils-0.9.18/findchip/winbond.c
+--- irda-utils-0.9.18-orig/findchip/winbond.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/winbond.c 2007-09-25 01:34:32.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/pcmcia/ircard_cs.c irda-utils-0.9.18/pcmcia/ircard_cs.c
+--- irda-utils-0.9.18-orig/pcmcia/ircard_cs.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/pcmcia/ircard_cs.c 2007-09-25 01:34:32.000000000 +0200
+@@ -41,7 +41,7 @@
+ #include <linux/timer.h>
+ #include <linux/delay.h>
+ #include <linux/ioport.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+ #include <asm/system.h>
+
+ #include <net/irda/irda.h>
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch
new file mode 100644
index 00000000000..d8548ed79ff
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch
@@ -0,0 +1,132 @@
+diff -uNr irda-utils-0.9.18.ORIG/findchip/Makefile irda-utils-0.9.18/findchip/Makefile
+--- irda-utils-0.9.18.ORIG/findchip/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/findchip/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -47,7 +47,7 @@
+
+ findchip: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(OBJS) $(CFLAGS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(OBJS) $(CFLAGS) -o $@
+
+
+ clean:
+@@ -65,5 +65,5 @@
+
+ gfindchip: gfindchip.c
+ $(prn_cc)
+- $(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
++ $(ECMD))$(CC) $(LDFLAGS) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
+
+diff -uNr irda-utils-0.9.18.ORIG/irattach/Makefile irda-utils-0.9.18/irattach/Makefile
+--- irda-utils-0.9.18.ORIG/irattach/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irattach/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -49,13 +49,13 @@
+
+ irattach: irattach.o util.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) irattach.o util.o -o $@
+
+
+
+ dongle_attach: dongle_attach.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) dongle_attach.o -o $@
+
+
+ install: $(TARGETS)
+diff -uNr irda-utils-0.9.18.ORIG/irdadump/Makefile irda-utils-0.9.18/irdadump/Makefile
+--- irda-utils-0.9.18.ORIG/irdadump/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irdadump/Makefile 2010-10-17 14:31:31.000000000 +0100
+@@ -40,7 +40,7 @@
+
+ irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
+
+
+ .c.o:
+diff -uNr irda-utils-0.9.18.ORIG/irdaping/Makefile irda-utils-0.9.18/irdaping/Makefile
+--- irda-utils-0.9.18.ORIG/irdaping/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irdaping/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -56,7 +56,7 @@
+
+ irdaping: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) -o $@
+
+
+ .c.o:
+diff -uNr irda-utils-0.9.18.ORIG/irnetd/Makefile irda-utils-0.9.18/irnetd/Makefile
+--- irda-utils-0.9.18.ORIG/irnetd/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irnetd/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -50,7 +50,7 @@
+
+ irnetd: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) -o $@
+
+
+ install: irnetd
+diff -uNr irda-utils-0.9.18.ORIG/irsockets/Makefile irda-utils-0.9.18/irsockets/Makefile
+--- irda-utils-0.9.18.ORIG/irsockets/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irsockets/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -54,7 +54,7 @@
+
+ %: %.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS)
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS)
+
+
+ %.o: %.c
+diff -uNr irda-utils-0.9.18.ORIG/psion/Makefile irda-utils-0.9.18/psion/Makefile
+--- irda-utils-0.9.18.ORIG/psion/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/psion/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -25,4 +25,4 @@
+ CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
+ irpsion5:
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
+\ No newline at end of file
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(PSION_SRC) -o $@
+diff -uNr irda-utils-0.9.18.ORIG/smcinit/Makefile irda-utils-0.9.18/smcinit/Makefile
+--- irda-utils-0.9.18.ORIG/smcinit/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/smcinit/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -26,17 +26,17 @@
+
+ smcinit: smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ tosh1800-smcinit: tosh1800-smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ tosh2450-smcinit: tosh2450-smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ %o: %c
+diff -uNr irda-utils-0.9.18.ORIG/tekram/Makefile irda-utils-0.9.18/tekram/Makefile
+--- irda-utils-0.9.18.ORIG/tekram/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/tekram/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -55,7 +55,7 @@
+
+ irkbd: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(OBJS) -o $@
+
+
+ .c.o:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff
new file mode 100644
index 00000000000..02e3b8909db
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff
@@ -0,0 +1,11 @@
+--- irda-utils-0.9.18-orig/irnetd/Makefile 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/irnetd/Makefile 2007-09-25 01:38:13.000000000 +0200
+@@ -55,7 +55,7 @@
+
+ install: irnetd
+ $(prn_install)
+- $(ECMD) install irnetd /usr/sbin/
++ $(ECMD) install irnetd $(ROOT)/usr/sbin/
+
+
+ clean:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
new file mode 100644
index 00000000000..dd06efec02a
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
@@ -0,0 +1,14 @@
+--- smcinit/smcinit.c.orig 2006-07-11 08:16:06.000000000 +0200
++++ smcinit/smcinit.c 2008-03-22 05:49:38.000000000 +0100
+@@ -292,9 +292,9 @@
+ }
+
+ twobyte = pci_read_word(dev, DID);
+- if ((twobyte != 0x24cc) & (twobyte != 0x248c)) {
++ if ((twobyte != 0x244c) & (twobyte != 0x24cc) & (twobyte != 0x248c)) {
+ fprintf(stderr,
+- "%s IO hub device %x not 82801CAM (0x248c or 0x24cc)\n",
++ "%s IO hub device %x not 82801BAM/82801CAM (0x24cc or 0x244c or 0x248c)\n",
+ PROGNAME, twobyte);
+ return 1;
+ }
diff --git a/net-wireless/irda-utils/files/irda-utils-rh1.patch b/net-wireless/irda-utils/files/irda-utils-rh1.patch
new file mode 100644
index 00000000000..6e4bfca618a
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-rh1.patch
@@ -0,0 +1,11 @@
+--- irda-utils-0.9.15/irattach/irattach.c.rh1 2003-11-24 17:30:21.000000000 +0100
++++ irda-utils-0.9.15/irattach/irattach.c 2003-11-24 17:34:51.000000000 +0100
+@@ -614,7 +614,7 @@
+ /* First arg is device name. Save it now, because in some cases
+ * getopt() will remove it... */
+ strncpy(device, argv[1], 20);
+- device[20] = '\0';
++ device[19] = '\0';
+
+ /* Look for options */
+ /* Do this before processing device, to handle "-h" and -v"
diff --git a/net-wireless/irda-utils/files/irda.confd b/net-wireless/irda-utils/files/irda.confd
new file mode 100644
index 00000000000..6b6ac85413a
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.confd
@@ -0,0 +1,27 @@
+# Set your startup settings for irattach, the IrDA-daemon, here.
+# please also look at /etc/modprobe.d/irda.conf
+
+# Set discovery mode which usually is a good idea for finding other devices.
+# If set 'yes' or 'no' irattach and sysctl are used to enable and disable
+# discovery mode. By default discover mode is disabled.
+DISCOVERY="yes"
+
+# Set IRDA device to access (e.g. /dev/ttyS1 or irda0). In case of irda0,
+# the proper module for FIR-mode has to be set in /etc/modprobe.d/irda.
+DEVICE="/dev/ttyS1"
+
+# Set dongle type, e.g. none, tekram, esi, actisys, actisys+, ep7211, girbil,
+# litelink, airport, old_belkin, mcp2120, act200l, ma600). You do not need
+# a dongle for FIR mode. See "man 8 irattach" for more information.
+DONGLE="none"
+
+# Set the serial device to quiet with setserial. This is only useful on some
+# machines in FIR-mode, so most people should leave it blank.
+#SETSERIAL="/dev/ttyS1"
+
+# Sets the maximum baud rate for the IrDA serial port.
+# Some devices (e.g. Nokia mobile phones) need this.
+#MAX_BAUD_RATE="115200"
+
+# Load extra modules
+#LOAD_MODULES="irlan irnet"
diff --git a/net-wireless/irda-utils/files/irda.initd b/net-wireless/irda-utils/files/irda.initd
new file mode 100644
index 00000000000..c515d12356e
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.initd
@@ -0,0 +1,86 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Id$
+
+# Hint: We don't use start-stop-daemon, because pidfile is the same
+# for every irattach instance. So it isn't reliable if we have more
+# than one IrDA device (i.e. with IrDA-USB).
+
+depend() {
+ use serial
+}
+
+checkconfig() {
+ if [ -z "${DEVICE}" ]; then
+ DEVICE="/dev/ttyS1"
+ fi
+
+ if [ -z "${DONGLE}" -o "${DONGLE}" = "none" ]; then
+ DONGLE=""
+ else
+ DONGLE="-d ${DONGLE}"
+ fi
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+
+ # Ensure that SIR driver is loaded (needed for pmac_zilog)
+ case "${DEVICE}" in
+ /dev/ttyS*) LOAD_MODULES="${LOAD_MODULES} irtty-sir";;
+ esac
+}
+
+remove_module() {
+ local CNT=0
+ while ! /sbin/modprobe -sqr ${1}; do
+ [ $((CNT++)) -eq 10 ] && break
+ sleep 0.25
+ done
+}
+
+start() {
+ checkconfig
+ ebegin "Starting IrDA"
+
+ # Needed for some machines in FIR-mode
+ [ -n "${SETSERIAL}" ] && /bin/setserial ${SETSERIAL} uart none port 0x0 irq 0
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${DEVICE} ${DONGLE} ${DISCOVERY}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Shutting down IrDA"
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${DEVICE} ?"
+ eend ${?}
+
+ # Try to remove IrDA driver
+ case "${DEVICE}" in
+ /dev/ttyS*) remove_module irtty-sir;;
+ irda[0-9]*) remove_module ${DEVICE};;
+ esac
+ return 0 # never fail
+}
diff --git a/net-wireless/irda-utils/files/irda.modsd b/net-wireless/irda-utils/files/irda.modsd
new file mode 100644
index 00000000000..a32c9a6829f
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.modsd
@@ -0,0 +1,48 @@
+# IrDA module configuration
+# please also look at /etc/conf.d/irda
+
+# IrDA over a normal serial port, or a serial port compatible IrDA port
+alias tty-ldisc-11 irtty
+
+# IrCOMM/IrLPT support (virtual serial/parallel over IrDA)
+alias char-major-161 ircomm-tty # Official allocation of IrCOMM
+
+# IrLAN support (Ethernet over IrDA)
+alias irlan0 irlan
+# Access type DIRECT=1, PEER=2, HOSTED=3 (int)
+#options irlan access=2
+
+# IrNET support (Synchronous PPP over IrDA)
+alias char-major-10-187 irnet # Official allocation of IrNET
+
+# Serial Dongles
+# These values are hard-coded in irattach (not instance order)
+alias irda-dongle-0 tekram # Tekram IrMate IR-210B
+alias irda-dongle-1 esi # ESI JetEye
+alias irda-dongle-2 actisys # Actisys IR-220L
+alias irda-dongle-3 actisys # Actisys IR-220L+
+alias irda-dongle-4 girbil # Greenwich GIrBIL
+alias irda-dongle-5 litelink # Parallax LiteLink (+ modern ESI)
+alias irda-dongle-6 airport # Adaptec Airport 1000 and 2000
+alias irda-dongle-7 old_belkin # Old Belkin (9600 baud only)
+alias irda-dongle-8 ep7211 # ???
+alias irda-dongle-9 mcp2120 # Crystal compatible chipset
+
+# To use the NSC driver on a Thinkpad laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x09
+
+# To use the NSC driver on a HP OB6000 laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x08
+
+# SMC driver
+#alias irda0 smsc-ircc2
+#options smsc-ircc2 ircc_dma=1 ircc_irq=10 ircc_fir=0x0130 ircc_sir=0x02f8
+
+# Some laptops (Toshiba Satellites and others with SMCS LPC47N227) require
+# running smcinit to initialize the irda device prior to use. If your device
+# is one of them, uncomment the required SMC-IRCC initializer.
+#install smsc-ircc2 /usr/sbin/smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh1800-smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh2450-smcinit && /sbin/modprobe -i smsc-ircc2
diff --git a/net-wireless/irda-utils/files/irda.rules b/net-wireless/irda-utils/files/irda.rules
new file mode 100644
index 00000000000..54dd3c2a4cf
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.rules
@@ -0,0 +1,18 @@
+# IrDA-PNP (autodetect and setup some known SIR/FIR devices)
+# you need to run /etc/init./irda to activate your device
+
+ACTION!="add", GOTO="irda_pnp_end"
+SUBSYSTEM!="pnp", GOTO="irda_pnp_end"
+
+ATTR{id}=="PNP0510", RUN+="irda-setup sir"
+ATTR{id}=="PNP0511", RUN+="irda-setup sir"
+ATTR{id}=="NSC*", RUN+="irda-setup fir nsc-ircc"
+ATTR{id}=="IBM0071", RUN+="irda-setup fir nsc-ircc dongle_id=0x09"
+ATTR{id}=="SMC*", RUN+="irda-setup fir smsc-ircc2"
+ATTR{id}=="ALI5123", RUN+="irda-setup fir ali-ircc"
+ATTR{id}=="VIA3076", RUN+="irda-setup fir via-ircc"
+
+LABEL="irda_pnp_end"
+
+# IrDA-USB (start/stop irattach automatically)
+KERNEL=="irda[0-9]*", SUBSYSTEM=="net", RUN+="irda-usb"
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild
new file mode 100644
index 00000000000..3de48eaa255
--- /dev/null
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic udev
+
+DESCRIPTION="IrDA management and handling utilities"
+HOMEPAGE="http://irda.sourceforge.net"
+SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ~sh x86"
+IUSE=""
+
+RDEPEND="=dev-libs/glib-2*
+ >=sys-apps/pciutils-2.2.7-r1
+ sys-process/procps
+ sys-apps/setserial
+ sys-apps/grep
+ virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !app-laptop/smcinit"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}"/irda-utils-rh1.patch \
+ "${FILESDIR}"/${P}-makefile.diff \
+ "${FILESDIR}"/${P}-smcinit.diff \
+ "${FILESDIR}"/${P}-io.h.diff \
+ "${FILESDIR}"/${P}-dofail.patch \
+ "${FILESDIR}"/${P}-asneeded.patch
+
+ # fix crosscompile, respect CFLAGS (Bug 200295)
+ sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^LD/s:ld:$(tc-getLD):" \
+ -e "/^AR/s:ar:$(tc-getAR):" \
+ -e "/^RANLIB/s:ranlib:$(tc-getRANLIB):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile */Makefile
+
+ # fix compile when pciutils is compiled with USE=zlib (Bug 200295)
+ sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile
+
+ # disable etc subdir in Makefile
+ sed -i -e "s:^\(DIRS.*=.* \)etc \(.*\):\1\2:g" Makefile
+
+ # disable write_pid(), because we don't need it
+ sed -i -e "s:\(write_pid();\):/* \1 */:g" irattach/util.c
+
+ append-flags "-fno-strict-aliasing"
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS}" RPM_BUILD_ROOT="${D}" ROOT="${D}" \
+ || die "emake failed"
+}
+
+src_install () {
+ dodir /usr/bin
+ dodir /usr/sbin
+
+ emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
+ MANDIR="${D}usr/share/man" || die "emake install failed"
+
+ newdoc ethereal/README README.wireshark
+ newdoc irattach/README README.irattach
+ newdoc irdadump/README README.irdadump
+ newdoc irdaping/README README.irdaping
+ newdoc irsockets/README README.irsockets
+ newdoc tekram/README README.tekram
+ newdoc smcinit/README README.smcinit
+ newdoc smcinit/README.Peri README.smcinit.Peri
+ newdoc smcinit/README.Rob README.smcinit.Rob
+ newdoc smcinit/README.Tom README.smcinit.Tom
+ newdoc irattach/ChangeLog ChangeLog.irattach
+ newdoc irdadump/ChangeLog ChangeLog.irdadump
+ newdoc smcinit/ChangeLog ChangeLog.smcinit
+ dohtml smcinit/RobMiller-irda.html
+ dodoc README
+
+ newconfd "${FILESDIR}/irda.confd" irda
+ newinitd "${FILESDIR}/irda.initd" irda
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/irda.modsd" irda.conf
+
+ udev_newrules "${FILESDIR}/irda.rules" 53-irda.rules
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}/irda-setup.sh" irda-setup
+ newexe "${FILESDIR}/irda-usb.sh" irda-usb
+}
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild
new file mode 100644
index 00000000000..589574b4f55
--- /dev/null
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic udev
+
+DESCRIPTION="IrDA management and handling utilities"
+HOMEPAGE="http://irda.sourceforge.net"
+SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib:2
+ >=sys-apps/pciutils-2.2.7-r1
+ sys-process/procps
+ sys-apps/setserial
+ sys-apps/grep
+ virtual/udev
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !app-laptop/smcinit
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/irda-utils-rh1.patch \
+ "${FILESDIR}"/${P}-makefile.diff \
+ "${FILESDIR}"/${P}-smcinit.diff \
+ "${FILESDIR}"/${P}-io.h.diff \
+ "${FILESDIR}"/${P}-dofail.patch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-headers.patch
+
+ # fix crosscompile, respect CFLAGS (Bug 200295)
+ sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^LD/s:ld:$(tc-getLD):" \
+ -e "/^AR/s:ar:$(tc-getAR):" \
+ -e "/^RANLIB/s:ranlib:$(tc-getRANLIB):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile */Makefile || die
+
+ # fix compile when pciutils is compiled with USE=zlib (Bug 200295)
+ sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile || die
+
+ # disable etc subdir in Makefile
+ sed -i -e "s:^\(DIRS.*=.* \)etc \(.*\):\1\2:g" Makefile || die
+
+ # disable write_pid(), because we don't need it
+ sed -i -e "s:\(write_pid();\):/* \1 */:g" irattach/util.c || die
+
+ append-flags "-fno-strict-aliasing" # bug????
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS}" RPM_BUILD_ROOT="${D}" ROOT="${D}"
+}
+
+src_install () {
+ dodir /usr/bin
+ dodir /usr/sbin
+
+ emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
+ MANDIR="${D}usr/share/man"
+
+ newdoc ethereal/README README.wireshark
+ newdoc irattach/README README.irattach
+ newdoc irdadump/README README.irdadump
+ newdoc irdaping/README README.irdaping
+ newdoc irsockets/README README.irsockets
+ newdoc tekram/README README.tekram
+ newdoc smcinit/README README.smcinit
+ newdoc smcinit/README.Peri README.smcinit.Peri
+ newdoc smcinit/README.Rob README.smcinit.Rob
+ newdoc smcinit/README.Tom README.smcinit.Tom
+ newdoc irattach/ChangeLog ChangeLog.irattach
+ newdoc irdadump/ChangeLog ChangeLog.irdadump
+ newdoc smcinit/ChangeLog ChangeLog.smcinit
+ dohtml smcinit/RobMiller-irda.html
+ dodoc README
+
+ newconfd "${FILESDIR}/irda.confd" irda
+ newinitd "${FILESDIR}/irda.initd" irda
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/irda.modsd" irda.conf
+
+ udev_newrules "${FILESDIR}/irda.rules" 53-irda.rules
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}/irda-setup.sh" irda-setup
+ newexe "${FILESDIR}/irda-usb.sh" irda-usb
+}
diff --git a/net-wireless/irda-utils/metadata.xml b/net-wireless/irda-utils/metadata.xml
new file mode 100644
index 00000000000..86b764ae9bc
--- /dev/null
+++ b/net-wireless/irda-utils/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">irda</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-wireless/iw/Manifest b/net-wireless/iw/Manifest
new file mode 100644
index 00000000000..11e6f1e2013
--- /dev/null
+++ b/net-wireless/iw/Manifest
@@ -0,0 +1,6 @@
+DIST iw-3.10.tar.xz 80476 SHA256 456ee212cfb728e292667caa508a7dff902666c78579814756a3012d68d64fe9 SHA512 8cf38664b3eb9cfaf5c2c0c70376fc35d069eb4615af7c706253e9a111811be11c8d44d6c4205e8299db490dd9713faf4029ad2167a28f7305606e4683ac9f1b WHIRLPOOL f87cc344c994b0caa2731b073fa785f075af2be73608a82a1326078e4c3150a6dac69a99e1577129d696d80c38f6b33a89a2670c35a7ea58348ac5739e8b5b68
+DIST iw-3.11.tar.xz 83456 SHA256 e90327323821a8219abac56298919076c4bac6636464ca91356f02cfe40530ff SHA512 2fc7402a090593a9ebaf12452c89bc39e5781194ecb3934c7722397cdb5d546893d72b92176be286d22b5f36c5d0f9a5314289c3cd7ff07ab6036712d01d6e65 WHIRLPOOL 6f5f6bb823d58ec46ac8184510d738d4de2024ea00167d21bf16af2ded3b1b3ab13b0e8663058c51aed5219b32a7f983b8bf78332b8cd818dc009899973cd1ed
+DIST iw-3.13.tar.xz 85724 SHA256 70c1c0f5145542b4d04dd52ad637920718515245e3dd3b4dc4c8e3b57b110dc6 SHA512 cbfa2ea8f4584e61060d56e52f405d1e67dc04d08b75179dde58d2ed20b78eae78b04650af1760265df97e559af0af6664e384d65109bf380391bc38b08a348d WHIRLPOOL 188342aa4f118bf377b5833c2f8fef08197983a4ecf7841a6443967f0c54656e4b9efac078f8ea5fcb3462d336167c170a60378e5a171892fd2352ab1f3cebf4
+DIST iw-3.14.tar.xz 87224 SHA256 871cb28aa554581ed3508b296071051cecbbbbdd8f62e95313e00840d908d999 SHA512 52526204f0b16b86eb001b50b60666d6b7a710cdad62359702c17ea9222a498dea987d400461be5886d81fec0bf5e6a331b70c0b3d6e778408babf1c157542a4 WHIRLPOOL dcc4b1a2a5d7aa4ea20a7c99b7746fd0f8e5d8cd32b29525aae9980d743684f4f45d59251634684de940fda894e69b580aa04c7ef9d2f23a9bbd7f3831ec9651
+DIST iw-3.17.tar.xz 91796 SHA256 48a62eb5cd8e757c9617749df96b01f133c184f6c107f18be660ee08f155fa93 SHA512 ac4779a88aacb9e2f4859cdb3e953bfba0a83b2e8140777092d61ced6799f09d8ec5628a359109cc23e6389e0ec0ab5a98b9da93c400b7cffedd930013c44f39 WHIRLPOOL 74225c1f29dd58d79e3af2ade0fdb7a2cb6c881bcaa2bd8571fc178bd6ad89fabb53389d1cdc3ac8d6f162314192427f8f3da7b343dca6612a8cb5c3e2a68bed
+DIST iw-4.0.tar.xz 97352 SHA256 2b4b7906d5ce89ce0ab523e5de8b619cddcc18fee7a2bfd6f9c62efab2d3bed6 SHA512 404852357166742f0104792a79ac7291c2d1e2b01f07f8bfe0efe14c8444eb87e045d00dd717e21fe9a27542e37f570b2d7bb44aee174091924455f3f3ef9e07 WHIRLPOOL 7194188f6fd11cf718764688ec4940a448017214812249654f3b5a985f14db1ff5c5f251db64a4b020630d1d0990895a2a8073baac1f9e41563de93b2020e666
diff --git a/net-wireless/iw/files/iw-3.10-versioncheck.patch b/net-wireless/iw/files/iw-3.10-versioncheck.patch
new file mode 100644
index 00000000000..a15931f5865
--- /dev/null
+++ b/net-wireless/iw/files/iw-3.10-versioncheck.patch
@@ -0,0 +1,30 @@
+From 2b60b435dd032572c556b064295a3e3607d00a55 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <fschmaus@gmail.com>
+Date: Sun, 1 Sep 2013 17:57:21 +0200
+Subject: [PATCH] Don't get iw version from git if there is no .git/
+
+The version.sh script should only try to get the version from git if the
+source actually resides in a git repository, i.e. .git/ exists. Doing
+otherwise in a non-git source repo results in git ascending until it
+finds a .git directory, which will cause problems in some source-based
+distributions ( https://bugs.gentoo.org/show_bug.cgi?id=482334 ).
+---
+ version.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/version.sh b/version.sh
+index 80e55ab..0f1aa1d 100755
+--- a/version.sh
++++ b/version.sh
+@@ -3,7 +3,7 @@
+ VERSION="3.11"
+ OUT="$1"
+
+-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
++if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
+ git update-index --refresh --unmerged > /dev/null
+ descr=$(git describe)
+
+--
+1.8.1.5
+
diff --git a/net-wireless/iw/iw-3.10-r1.ebuild b/net-wireless/iw/iw-3.10-r1.ebuild
new file mode 100644
index 00000000000..9ea5aeced77
--- /dev/null
+++ b/net-wireless/iw/iw-3.10-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+ epatch "${FILESDIR}/${P}-versioncheck.patch"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-3.10.ebuild b/net-wireless/iw/iw-3.10.ebuild
new file mode 100644
index 00000000000..204a6f187e7
--- /dev/null
+++ b/net-wireless/iw/iw-3.10.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-3.11.ebuild b/net-wireless/iw/iw-3.11.ebuild
new file mode 100644
index 00000000000..38a78024c2f
--- /dev/null
+++ b/net-wireless/iw/iw-3.11.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-3.13.ebuild b/net-wireless/iw/iw-3.13.ebuild
new file mode 100644
index 00000000000..bd39a824629
--- /dev/null
+++ b/net-wireless/iw/iw-3.13.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-3.14.ebuild b/net-wireless/iw/iw-3.14.ebuild
new file mode 100644
index 00000000000..bd39a824629
--- /dev/null
+++ b/net-wireless/iw/iw-3.14.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-3.17.ebuild b/net-wireless/iw/iw-3.17.ebuild
new file mode 100644
index 00000000000..313e82fb3b0
--- /dev/null
+++ b/net-wireless/iw/iw-3.17.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/iw-4.0.ebuild b/net-wireless/iw/iw-4.0.ebuild
new file mode 100644
index 00000000000..a1397cf35b0
--- /dev/null
+++ b/net-wireless/iw/iw-4.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
+HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
+SRC_URI="https://www.kernel.org/pub/software/network/${PN}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/libnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CC LD
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ emake V=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+}
diff --git a/net-wireless/iw/metadata.xml b/net-wireless/iw/metadata.xml
new file mode 100644
index 00000000000..e5ae030f575
--- /dev/null
+++ b/net-wireless/iw/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>co-maintainer, please cc on bugs</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-wireless/kismet-ubertooth/Manifest b/net-wireless/kismet-ubertooth/Manifest
new file mode 100644
index 00000000000..1ccd099852c
--- /dev/null
+++ b/net-wireless/kismet-ubertooth/Manifest
@@ -0,0 +1,3 @@
+DIST ubertooth-2012-10-R1.tar.xz 1677996 SHA256 e049d6f306c612d522c840ad296aa48b63c670665fac51425bcec2d6338ca1bd SHA512 51cf7debfe9ff2484924943484c54be38ad203d25390ddfeb242b06d1e27475763c6fdfe8706c85ed40f568c6502570289d2a04923d5e124c7b3d80359acbbd9 WHIRLPOOL dc30a1e9ad299c1c992cef1539dc5323133140d27544dbfadf44c379e9b70dddb5f5e9f097ef8e18f401a46a42da8ba359f7ae480ea821cd2a774da1e173dc6d
+DIST ubertooth-2014-04-R1.tar.xz 1762456 SHA256 0881b4bde755acea557851852bc830c100986801148ac1fcaf8ca898623edfaa SHA512 9cc415c7e7f4ce40703e7dcf916e8942325902ab3af470fb959de6bbe047a824ad62b41a09e95ead5a74a961674d2dd4d30e582db21e2ba47f648eb99462bf4a WHIRLPOOL 6c01402ebf004e782bbe4ad891c3b8ebee0040a5bfb6fcdeb2939a105646157b1786b90772a502b92e26a356a5674bafd6960ce83e3f81db819dd5575e6fc444
+DIST ubertooth-r534.tar.gz 2959832 SHA256 5e227872ee8c088fe2cdac936c4a30d1e12b8f7c6ac781c96004ad7528b44730 SHA512 b3e150b8f8a4335f65fd8b7b629316eae08cf0560269991af6632d48e360f17dd98742da975df33852760140cd5f4571f72f36d973fa5e6d8df47932561acfa6 WHIRLPOOL 7d7ea0db033b34cbf16f963ea42d05db9bf8f82f41d5d26dd6510a95ffe339dae3fef54f5cef5d71bfedb1e05531bf33998cbcabe88af611feeaecf1e22a7b10
diff --git a/net-wireless/kismet-ubertooth/files/kismet-ubertooth-0.0_p534-respect-cflags.patch b/net-wireless/kismet-ubertooth/files/kismet-ubertooth-0.0_p534-respect-cflags.patch
new file mode 100644
index 00000000000..570a5def788
--- /dev/null
+++ b/net-wireless/kismet-ubertooth/files/kismet-ubertooth-0.0_p534-respect-cflags.patch
@@ -0,0 +1,61 @@
+--- /var/tmp/portage/net-wireless/kismet-ubertooth-0.0_p534/work/ubertooth-r534/host/kismet/plugin-ubertooth-phyneutral/Makefile 2012-04-30 12:08:07.000000000 -0400
++++ host/kismet/plugin-ubertooth-phyneutral/Makefile 2012-07-23 12:50:07.883119040 -0400
+@@ -11,13 +11,12 @@
+
+ PLUGINLDFLAGS ?= $(LDFLAGS)
+ PLUGINLDFLAGS += -shared -rdynamic
+-LIBS += -lstdc++ -lusb-1.0 -lpthread -lbtbb
+-CFLAGS ?= $(CFLAGS) $(CPPFLAGS)
++LIBS += -lstdc++ -lusb-1.0 -lpthread -lbtbb
+ CFLAGS += -I$(KIS_INC_DIR) -I$(RXTX_INC_DIR) -g -fPIC
++CXXFLAGS += -I$(KIS_INC_DIR) -I$(RXTX_INC_DIR) -g -fPIC
+
+ SRVOBJS = packetsource_ubertooth.o packet_btbb_types.o \
+- phy_btbb.o kismet_ubertooth.o \
+- $(RXTX_SRC_DIR)/ubertooth.o
++ phy_btbb.o kismet_ubertooth.o
+ SRVOUT = ubertooth.so
+
+ all: $(SRVOUT)
+@@ -38,9 +37,9 @@
+ @-rm -f *.so
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $*.c -o $@
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@
+
+ .cc.o:
+- $(CXX) $(CFLAGS) -c $*.cc -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@
+
+ .SUFFIXES: .c .cc .o
+--- /var/tmp/portage/net-wireless/kismet-ubertooth-0.0_p534/work/ubertooth-r534/host/kismet/plugin-ubertooth/Makefile 2012-04-04 19:18:29.000000000 -0400
++++ host/kismet/plugin-ubertooth/Makefile 2012-07-23 12:50:07.890119040 -0400
+@@ -11,12 +11,12 @@
+
+ PLUGINLDFLAGS ?= $(LDFLAGS)
+ PLUGINLDFLAGS += -shared -rdynamic
+-LIBS += -lstdc++ -lusb-1.0 -lpthread -lbtbb
+-CFLAGS ?= $(CFLAGS) $(CPPFLAGS)
++LIBS += -lstdc++ -lusb-1.0 -lpthread -lbtbb
+ CFLAGS += -I/usr/include -I$(KIS_INC_DIR) -I$(RXTX_INC_DIR) -g -fPIC
++CXXFLAGS += -I/usr/include -I$(KIS_INC_DIR) -I$(RXTX_INC_DIR) -g -fPIC
+
+ SRVOBJS = packetsource_ubertooth.o packet_btbb.o packet_btbb_types.o \
+- tracker_btbb.o kismet_ubertooth.o $(RXTX_SRC_DIR)/ubertooth.o
++ tracker_btbb.o kismet_ubertooth.o
+ SRVOUT = ubertooth.so
+
+ CLIOBJS = ubertooth_ui.o
+@@ -48,9 +48,9 @@
+ @-rm -f *.so
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $*.c -o $@
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c -o $@
+
+ .cc.o:
+- $(CXX) $(CFLAGS) -c $*.cc -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cc -o $@
+
+ .SUFFIXES: .c .cc .o
diff --git a/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534-r1.ebuild b/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534-r1.ebuild
new file mode 100644
index 00000000000..bba3e9c8951
--- /dev/null
+++ b/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib
+
+DESCRIPTION="Provides basic bluetooth support in kismet"
+HOMEPAGE="http://ubertooth.sourceforge.net/"
+
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://ubertooth.svn.sourceforge.net/svnroot/ubertooth/trunk/host"
+ SRC_URI=""
+ inherit subversion
+ KEYWORDS=""
+else
+ MY_PV="${PV/p/r}"
+ MY_PV="${MY_PV/0.0_/}"
+ SRC_URI="mirror://sourceforge/ubertooth/ubertooth-${MY_PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+ S="${WORKDIR}/ubertooth-${MY_PV}/host/"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=net-wireless/kismet-2011.03.2-r1 \
+ >=net-libs/libbtbb-0.8 \
+ virtual/libusb:1"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-cflags.patch
+}
+
+src_compile() {
+ if has_version =net-wireless/kismet-9999; then
+ cd "${S}/kismet/plugin-ubertooth-phyneutral" || die
+ else
+ cd "${S}/kismet/plugin-ubertooth" || die
+ fi
+ emake KIS_SRC_DIR="/usr/include/kismet/"
+}
+
+src_install() {
+ if has_version =net-wireless/kismet-9999; then
+ cd "${S}/kismet/plugin-ubertooth-phyneutral" || die
+ else
+ cd "${S}/kismet/plugin-ubertooth" || die
+ fi
+ emake DESTDIR="${ED}" LIBDIR="/$(get_libdir)" KIS_SRC_DIR="/usr/include/kismet/" install
+}
+
+pkg_postinst() {
+ ewarn "This package must be rebuilt every time kismet is rebuilt. Or else."
+}
diff --git a/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534.ebuild b/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534.ebuild
new file mode 100644
index 00000000000..b880389fbcc
--- /dev/null
+++ b/net-wireless/kismet-ubertooth/kismet-ubertooth-0.0_p534.ebuild
@@ -0,0 +1,58 @@