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 /sys-block
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 'sys-block')
-rw-r--r--sys-block/afacli/Manifest1
-rw-r--r--sys-block/afacli/afacli-4.1.ebuild38
-rwxr-xr-xsys-block/afacli/files/afacli24
-rw-r--r--sys-block/afacli/metadata.xml7
-rw-r--r--sys-block/aoetools/Manifest2
-rw-r--r--sys-block/aoetools/aoetools-35.ebuild22
-rw-r--r--sys-block/aoetools/aoetools-36.ebuild22
-rw-r--r--sys-block/aoetools/files/aoetools-32-build.patch32
-rw-r--r--sys-block/aoetools/metadata.xml8
-rw-r--r--sys-block/arcconf/Manifest2
-rw-r--r--sys-block/arcconf/arcconf-1.2.20618.ebuild52
-rw-r--r--sys-block/arcconf/arcconf-1.7.21229.ebuild52
-rw-r--r--sys-block/arcconf/metadata.xml8
-rw-r--r--sys-block/blocks/Manifest1
-rw-r--r--sys-block/blocks/blocks-0.1.4_pre131210-r1.ebuild61
-rw-r--r--sys-block/blocks/blocks-9999.ebuild62
-rw-r--r--sys-block/blocks/metadata.xml14
-rw-r--r--sys-block/btrace/Manifest4
-rw-r--r--sys-block/btrace/btrace-1.0.0.ebuild45
-rw-r--r--sys-block/btrace/btrace-1.0.1-r1.ebuild46
-rw-r--r--sys-block/btrace/btrace-1.0.1.ebuild46
-rw-r--r--sys-block/btrace/btrace-1.0.3.ebuild46
-rw-r--r--sys-block/btrace/btrace-1.1.0.ebuild46
-rw-r--r--sys-block/btrace/files/btrace-1.0.0-parallel-make.patch20
-rw-r--r--sys-block/btrace/files/btrace-1.0.1-ldflags-parallel-make.patch91
-rw-r--r--sys-block/btrace/files/btrace-1.1.0-ldflags-parallel-make.patch105
-rw-r--r--sys-block/btrace/metadata.xml7
-rw-r--r--sys-block/buffer/Manifest1
-rw-r--r--sys-block/buffer/buffer-1.19-r2.ebuild33
-rw-r--r--sys-block/buffer/files/1.19-deb-gentoo.patch293
-rw-r--r--sys-block/buffer/metadata.xml5
-rw-r--r--sys-block/cec/Manifest1
-rw-r--r--sys-block/cec/cec-14.ebuild26
-rw-r--r--sys-block/cec/metadata.xml10
-rw-r--r--sys-block/dellmgr/Manifest1
-rw-r--r--sys-block/dellmgr/dellmgr-5.32-r1.ebuild39
-rwxr-xr-xsys-block/dellmgr/files/dellmgr-r224
-rw-r--r--sys-block/dellmgr/metadata.xml7
-rw-r--r--sys-block/devio/Manifest1
-rw-r--r--sys-block/devio/devio-1.2.ebuild19
-rw-r--r--sys-block/devio/metadata.xml8
-rw-r--r--sys-block/di/Manifest2
-rw-r--r--sys-block/di/di-4.35.ebuild37
-rw-r--r--sys-block/di/di-4.36.ebuild37
-rw-r--r--sys-block/di/files/di-4.33-build.patch40
-rw-r--r--sys-block/di/metadata.xml5
-rw-r--r--sys-block/disktype/Manifest1
-rw-r--r--sys-block/disktype/disktype-9.ebuild26
-rw-r--r--sys-block/disktype/metadata.xml88
-rw-r--r--sys-block/eject-bsd/Manifest1
-rw-r--r--sys-block/eject-bsd/eject-bsd-1.5.ebuild39
-rw-r--r--sys-block/eject-bsd/files/eject-bsd-1.5-devname.patch11
-rw-r--r--sys-block/eject-bsd/files/eject-bsd-1.5-manpage.patch11
-rw-r--r--sys-block/eject-bsd/metadata.xml5
-rw-r--r--sys-block/eject/Manifest1
-rw-r--r--sys-block/eject/eject-2.1.5-r2.ebuild41
-rw-r--r--sys-block/eject/files/eject-2.0.13-xmalloc.patch28
-rw-r--r--sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch21
-rw-r--r--sys-block/eject/files/eject-2.1.5-handle-spaces.patch57
-rw-r--r--sys-block/eject/files/eject-2.1.5-man-typo.patch18
-rw-r--r--sys-block/eject/files/eject-2.1.5-toggle.patch27
-rw-r--r--sys-block/eject/metadata.xml5
-rw-r--r--sys-block/endpoint/Manifest1
-rw-r--r--sys-block/endpoint/endpoint-0.1.0.ebuild31
-rw-r--r--sys-block/endpoint/files/endpoint-0.1.0-errormessages.patch47
-rw-r--r--sys-block/endpoint/metadata.xml12
-rw-r--r--sys-block/fio/Manifest7
-rw-r--r--sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch29
-rw-r--r--sys-block/fio/files/fio-2.1.10-json.patch32
-rw-r--r--sys-block/fio/files/fio-2.2.9-atomic-sync.patch140
-rw-r--r--sys-block/fio/fio-1.17.2.ebuild29
-rw-r--r--sys-block/fio/fio-1.99.10.ebuild44
-rw-r--r--sys-block/fio/fio-2.0.14-r1.ebuild52
-rw-r--r--sys-block/fio/fio-2.0.15.ebuild52
-rw-r--r--sys-block/fio/fio-2.1.9.ebuild81
-rw-r--r--sys-block/fio/fio-2.2.4-r1.ebuild85
-rw-r--r--sys-block/fio/fio-2.2.9.ebuild86
-rw-r--r--sys-block/fio/metadata.xml18
-rw-r--r--sys-block/fwdl/Manifest1
-rw-r--r--sys-block/fwdl/fwdl-1.2.3.ebuild28
-rw-r--r--sys-block/fwdl/metadata.xml5
-rw-r--r--sys-block/gpart/Manifest2
-rw-r--r--sys-block/gpart/files/gpart-0.1h-PIC.patch20
-rw-r--r--sys-block/gpart/files/gpart-0.1h-errno.patch20
-rw-r--r--sys-block/gpart/files/gpart-0.1h-l64seek.patch71
-rw-r--r--sys-block/gpart/files/gpart-0.1h-no-_syscall.patch15
-rw-r--r--sys-block/gpart/files/gpart-0.1h-ntfs.patch75
-rw-r--r--sys-block/gpart/files/gpart-0.1h-openmode.patch11
-rw-r--r--sys-block/gpart/files/gpart-0.1h-vfat.patch17
-rw-r--r--sys-block/gpart/gpart-0.1h-r1.ebuild35
-rw-r--r--sys-block/gpart/gpart-0.1h-r2.ebuild36
-rw-r--r--sys-block/gpart/metadata.xml5
-rw-r--r--sys-block/gparted/Manifest2
-rwxr-xr-xsys-block/gparted/files/gparted-pkexec2
-rw-r--r--sys-block/gparted/files/org.gentoo.pkexec.gparted.policy22
-rw-r--r--sys-block/gparted/gparted-0.21.0.ebuild90
-rw-r--r--sys-block/gparted/gparted-0.22.0.ebuild89
-rw-r--r--sys-block/gparted/metadata.xml38
-rw-r--r--sys-block/hdrecover/Manifest1
-rw-r--r--sys-block/hdrecover/hdrecover-0.4.ebuild23
-rw-r--r--sys-block/hdrecover/metadata.xml10
-rw-r--r--sys-block/hpacucli/Manifest2
-rw-r--r--sys-block/hpacucli/files/hpacucli-wrapper22
-rw-r--r--sys-block/hpacucli/hpacucli-9.30.15.0.ebuild69
-rw-r--r--sys-block/hpacucli/metadata.xml7
-rw-r--r--sys-block/iscsitarget/Manifest5
-rw-r--r--sys-block/iscsitarget/files/ietd-conf.d30
-rw-r--r--sys-block/iscsitarget/files/ietd-init.d-2106
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch20
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch82
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch40
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.30.patch37
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch23
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch42
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.19+linux-2.6.33.patch12
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags-v2.patch10
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch32
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.20.2_kernel-2.6.36.patch12
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch135
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch96
-rw-r--r--sys-block/iscsitarget/iscsitarget-0.4.17.ebuild62
-rw-r--r--sys-block/iscsitarget/iscsitarget-1.4.19.ebuild70
-rw-r--r--sys-block/iscsitarget/iscsitarget-1.4.20.2.ebuild71
-rw-r--r--sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild94
-rw-r--r--sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130821.ebuild94
-rw-r--r--sys-block/iscsitarget/iscsitarget-9999.ebuild94
-rw-r--r--sys-block/iscsitarget/metadata.xml10
-rw-r--r--sys-block/kvpm/Manifest2
-rw-r--r--sys-block/kvpm/kvpm-0.9.8.ebuild25
-rw-r--r--sys-block/kvpm/kvpm-0.9.9.ebuild25
-rw-r--r--sys-block/kvpm/metadata.xml8
-rw-r--r--sys-block/lio-utils/files/snmp-makefile.patch22
-rw-r--r--sys-block/lio-utils/files/target.initd137
-rw-r--r--sys-block/lio-utils/files/tools-makefile.patch8
-rw-r--r--sys-block/lio-utils/lio-utils-9999.ebuild104
-rw-r--r--sys-block/lio-utils/metadata.xml8
-rw-r--r--sys-block/lsiutil/Manifest1
-rw-r--r--sys-block/lsiutil/lsiutil-1.62-r1.ebuild45
-rw-r--r--sys-block/lsiutil/metadata.xml7
-rw-r--r--sys-block/mbuffer/Manifest5
-rw-r--r--sys-block/mbuffer/files/mbuffer-20121111-resolv-multi-order-issue.patch21
-rw-r--r--sys-block/mbuffer/mbuffer-20090113.ebuild34
-rw-r--r--sys-block/mbuffer/mbuffer-20110724.ebuild35
-rw-r--r--sys-block/mbuffer/mbuffer-20130220.ebuild37
-rw-r--r--sys-block/mbuffer/mbuffer-20140126.ebuild32
-rw-r--r--sys-block/mbuffer/mbuffer-20150412.ebuild32
-rw-r--r--sys-block/mbuffer/metadata.xml5
-rw-r--r--sys-block/megacli/Manifest3
-rwxr-xr-xsys-block/megacli/files/megacli-wrapper3
-rw-r--r--sys-block/megacli/megacli-8.02.21.ebuild80
-rw-r--r--sys-block/megacli/megacli-8.07.10.ebuild80
-rw-r--r--sys-block/megacli/megacli-8.07.14.ebuild80
-rw-r--r--sys-block/megacli/metadata.xml6
-rw-r--r--sys-block/megactl/Manifest1
-rw-r--r--sys-block/megactl/files/megactl-0.4.1-Makefile.patch26
-rw-r--r--sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch46
-rw-r--r--sys-block/megactl/files/megactl-0.4.1-tracefix.patch232
-rw-r--r--sys-block/megactl/files/megactl-0.4.1.patch21
-rw-r--r--sys-block/megactl/megactl-0.4.1-r1.ebuild35
-rw-r--r--sys-block/megactl/megactl-0.4.1-r2.ebuild37
-rw-r--r--sys-block/megactl/metadata.xml14
-rw-r--r--sys-block/megamgr/Manifest1
-rw-r--r--sys-block/megamgr/megamgr-5.20-r2.ebuild44
-rw-r--r--sys-block/megamgr/metadata.xml8
-rw-r--r--sys-block/megarc/Manifest1
-rw-r--r--sys-block/megarc/megarc-1.11-r1.ebuild44
-rw-r--r--sys-block/megarc/metadata.xml8
-rw-r--r--sys-block/metadata.xml36
-rw-r--r--sys-block/mpt-status/Manifest2
-rw-r--r--sys-block/mpt-status/files/mpt-status-1.2.0-gentoo.patch51
-rw-r--r--sys-block/mpt-status/metadata.xml7
-rw-r--r--sys-block/mpt-status/mpt-status-1.2.0-r1.ebuild34
-rw-r--r--sys-block/ms-sys/Manifest2
-rw-r--r--sys-block/ms-sys/metadata.xml11
-rw-r--r--sys-block/ms-sys/ms-sys-2.4.0.ebuild36
-rw-r--r--sys-block/ms-sys/ms-sys-2.5.0.ebuild36
-rw-r--r--sys-block/mtx/Manifest2
-rw-r--r--sys-block/mtx/metadata.xml8
-rw-r--r--sys-block/mtx/mtx-1.2.18.ebuild30
-rw-r--r--sys-block/mtx/mtx-1.3.12.ebuild18
-rw-r--r--sys-block/nbd/Manifest18
-rw-r--r--sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch59
-rw-r--r--sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch38
-rw-r--r--sys-block/nbd/metadata.xml8
-rw-r--r--sys-block/nbd/nbd-2.9.20.ebuild35
-rw-r--r--sys-block/nbd/nbd-2.9.21a.ebuild35
-rw-r--r--sys-block/nbd/nbd-2.9.22.ebuild35
-rw-r--r--sys-block/nbd/nbd-2.9.23.ebuild35
-rw-r--r--sys-block/nbd/nbd-2.9.24.ebuild34
-rw-r--r--sys-block/nbd/nbd-2.9.25.ebuild35
-rw-r--r--sys-block/nbd/nbd-3.0.ebuild35
-rw-r--r--sys-block/nbd/nbd-3.1.1.ebuild35
-rw-r--r--sys-block/nbd/nbd-3.10.ebuild29
-rw-r--r--sys-block/nbd/nbd-3.11.ebuild29
-rw-r--r--sys-block/nbd/nbd-3.2.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.3.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.4.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.5.ebuild43
-rw-r--r--sys-block/nbd/nbd-3.6.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.7.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.8.ebuild38
-rw-r--r--sys-block/nbd/nbd-3.9.1.ebuild29
-rw-r--r--sys-block/noflushd/Manifest4
-rw-r--r--sys-block/noflushd/files/noflushd.confd11
-rwxr-xr-xsys-block/noflushd/files/noflushd.rc631
-rw-r--r--sys-block/noflushd/metadata.xml8
-rw-r--r--sys-block/noflushd/noflushd-2.7.3.ebuild37
-rw-r--r--sys-block/noflushd/noflushd-2.7.4.ebuild37
-rw-r--r--sys-block/noflushd/noflushd-2.7.5.ebuild33
-rw-r--r--sys-block/noflushd/noflushd-2.8.ebuild33
-rw-r--r--sys-block/nwutil/Manifest3
-rw-r--r--sys-block/nwutil/files/1.4-errno.patch11
-rw-r--r--sys-block/nwutil/files/1.4-rename-debug.patch40
-rw-r--r--sys-block/nwutil/files/nwutil-1.4-temp.patch24
-rw-r--r--sys-block/nwutil/metadata.xml5
-rw-r--r--sys-block/nwutil/nwutil-1.4.ebuild41
-rw-r--r--sys-block/nwutil/nwutil-1.8.ebuild19
-rw-r--r--sys-block/open-iscsi/Manifest2
-rw-r--r--sys-block/open-iscsi/files/99-iscsi.rules1
-rw-r--r--sys-block/open-iscsi/files/initiatorname.iscsi31
-rw-r--r--sys-block/open-iscsi/files/iscsid-conf.d18
-rw-r--r--sys-block/open-iscsi/files/iscsid-init.d107
-rw-r--r--sys-block/open-iscsi/files/iscsidev.sh78
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d18
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch11
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch10
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1131
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch16
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch11
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch55
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch20
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch161
-rw-r--r--sys-block/open-iscsi/metadata.xml5
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild105
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild113
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.873.ebuild94
-rw-r--r--sys-block/parted/Manifest3
-rw-r--r--sys-block/parted/files/parted-2.4-no-gets.patch10
-rw-r--r--sys-block/parted/files/parted-2.4-readline.patch11
-rw-r--r--sys-block/parted/files/parted-3.1-readline.patch11
-rw-r--r--sys-block/parted/files/parted-3.1-zfs.patch170
-rw-r--r--sys-block/parted/files/parted-3.2-devmapper.patch60
-rw-r--r--sys-block/parted/files/parted-3.2-po4a-mandir.patch11
-rw-r--r--sys-block/parted/metadata.xml17
-rw-r--r--sys-block/parted/parted-2.4.ebuild56
-rw-r--r--sys-block/parted/parted-3.1-r1.ebuild82
-rw-r--r--sys-block/parted/parted-3.2.ebuild57
-rw-r--r--sys-block/partimage/Manifest2
-rw-r--r--sys-block/partimage/files/partimage-0.6.8-destdir.patch11
-rw-r--r--sys-block/partimage/files/partimage-0.6.8-openssl-1.patch30
-rw-r--r--sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch33
-rw-r--r--sys-block/partimage/files/partimaged.conf10
-rw-r--r--sys-block/partimage/files/partimaged.init29
-rw-r--r--sys-block/partimage/files/partimaged.init.229
-rw-r--r--sys-block/partimage/files/partimaged.pam11
-rw-r--r--sys-block/partimage/files/partimaged.pam.27
-rw-r--r--sys-block/partimage/files/servercert.cnf37
-rw-r--r--sys-block/partimage/metadata.xml11
-rw-r--r--sys-block/partimage/partimage-0.6.8.ebuild142
-rw-r--r--sys-block/partimage/partimage-0.6.9.ebuild139
-rw-r--r--sys-block/partitionmanager/Manifest2
-rw-r--r--sys-block/partitionmanager/metadata.xml5
-rw-r--r--sys-block/partitionmanager/partitionmanager-1.1.1.ebuild29
-rw-r--r--sys-block/partitionmanager/partitionmanager-1.2.1.ebuild39
-rw-r--r--sys-block/qla-fc-firmware/Manifest3
-rw-r--r--sys-block/qla-fc-firmware/metadata.xml12
-rw-r--r--sys-block/qla-fc-firmware/qla-fc-firmware-20071207-r1.ebuild40
-rw-r--r--sys-block/qla-fc-firmware/qla-fc-firmware-20080423.ebuild40
-rw-r--r--sys-block/qla-fc-firmware/qla-fc-firmware-20101015.ebuild40
-rw-r--r--sys-block/raid-check/Manifest1
-rw-r--r--sys-block/raid-check/files/raid-check-20140719-makefile.patch48
-rw-r--r--sys-block/raid-check/files/raid-check-20140719-path.patch9
-rw-r--r--sys-block/raid-check/metadata.xml15
-rw-r--r--sys-block/raid-check/raid-check-20140719-r1.ebuild34
-rw-r--r--sys-block/rts5229/Manifest1
-rw-r--r--sys-block/rts5229/files/rts5229-linux-3.10.patch53
-rw-r--r--sys-block/rts5229/files/rts5229-linux-3.8.patch29
-rw-r--r--sys-block/rts5229/metadata.xml12
-rw-r--r--sys-block/rts5229/rts5229-1.07-r5.ebuild40
-rw-r--r--sys-block/rts_pstor/Manifest1
-rw-r--r--sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch53
-rw-r--r--sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch29
-rw-r--r--sys-block/rts_pstor/metadata.xml12
-rw-r--r--sys-block/rts_pstor/rts_pstor-1.10-r4.ebuild38
-rw-r--r--sys-block/rtsadmin/metadata.xml10
-rw-r--r--sys-block/rtsadmin/rtsadmin-9999.ebuild36
-rw-r--r--sys-block/sas2ircu/Manifest2
-rw-r--r--sys-block/sas2ircu/metadata.xml11
-rw-r--r--sys-block/sas2ircu/sas2ircu-19.ebuild98
-rw-r--r--sys-block/sas3ircu/Manifest2
-rw-r--r--sys-block/sas3ircu/metadata.xml11
-rw-r--r--sys-block/sas3ircu/sas3ircu-5.ebuild71
-rw-r--r--sys-block/scsiadd/Manifest1
-rw-r--r--sys-block/scsiadd/metadata.xml12
-rw-r--r--sys-block/scsiadd/scsiadd-1.97.ebuild60
-rw-r--r--sys-block/scsiping/Manifest1
-rw-r--r--sys-block/scsiping/metadata.xml7
-rw-r--r--sys-block/scsiping/scsiping-0.0.1.ebuild30
-rw-r--r--sys-block/scsirastools/Manifest3
-rw-r--r--sys-block/scsirastools/files/scsirastools-1.5.6-glibc-2.10.patch87
-rw-r--r--sys-block/scsirastools/metadata.xml10
-rw-r--r--sys-block/scsirastools/scsirastools-1.5.4.ebuild61
-rw-r--r--sys-block/scsirastools/scsirastools-1.5.6.ebuild65
-rw-r--r--sys-block/scsirastools/scsirastools-1.5.7.ebuild65
-rw-r--r--sys-block/seekwatcher/Manifest4
-rw-r--r--sys-block/seekwatcher/files/seekwatcher-0.12_p20091015-dash-fix.patch26
-rw-r--r--sys-block/seekwatcher/metadata.xml7
-rw-r--r--sys-block/seekwatcher/seekwatcher-0.12.ebuild28
-rw-r--r--sys-block/seekwatcher/seekwatcher-0.12_p20091015.ebuild45
-rw-r--r--sys-block/seekwatcher/seekwatcher-0.6.ebuild28
-rw-r--r--sys-block/seekwatcher/seekwatcher-0.9.ebuild28
-rw-r--r--sys-block/smp_utils/Manifest2
-rw-r--r--sys-block/smp_utils/metadata.xml5
-rw-r--r--sys-block/smp_utils/smp_utils-0.97.ebuild20
-rw-r--r--sys-block/smp_utils/smp_utils-0.98.ebuild20
-rw-r--r--sys-block/spindown/Manifest1
-rw-r--r--sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch55
-rw-r--r--sys-block/spindown/files/spindownd.confd-r111
-rw-r--r--sys-block/spindown/files/spindownd.initd-r161
-rw-r--r--sys-block/spindown/metadata.xml10
-rw-r--r--sys-block/spindown/spindown-0.4.0-r4.ebuild46
-rw-r--r--sys-block/tapecat/Manifest1
-rw-r--r--sys-block/tapecat/metadata.xml9
-rw-r--r--sys-block/tapecat/tapecat-1.0.0.ebuild22
-rw-r--r--sys-block/targetcli/metadata.xml10
-rw-r--r--sys-block/targetcli/targetcli-9999.ebuild35
-rw-r--r--sys-block/tgt/Manifest4
-rw-r--r--sys-block/tgt/files/tgtd125
-rw-r--r--sys-block/tgt/files/tgtd-1.0.24.confd4
-rw-r--r--sys-block/tgt/files/tgtd-1.0.24.initd126
-rw-r--r--sys-block/tgt/files/tgtd.confd4
-rw-r--r--sys-block/tgt/files/tgtd.initd125
-rw-r--r--sys-block/tgt/metadata.xml21
-rw-r--r--sys-block/tgt/tgt-1.0.19.ebuild51
-rw-r--r--sys-block/tgt/tgt-1.0.22.ebuild60
-rw-r--r--sys-block/tgt/tgt-1.0.24-r1.ebuild65
-rw-r--r--sys-block/tgt/tgt-1.0.60.ebuild64
-rw-r--r--sys-block/thin-provisioning-tools/Manifest5
-rw-r--r--sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch214
-rw-r--r--sys-block/thin-provisioning-tools/metadata.xml15
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.2.8-r1.ebuild48
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r1.ebuild51
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.0.ebuild52
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.1.ebuild52
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.5.3.ebuild54
-rw-r--r--sys-block/tw_cli/Manifest36
-rw-r--r--sys-block/tw_cli/metadata.xml13
-rw-r--r--sys-block/tw_cli/tw_cli-10.1.ebuild99
-rw-r--r--sys-block/tw_cli/tw_cli-10.2.2.1.ebuild102
-rw-r--r--sys-block/tw_cli/tw_cli-10.2.ebuild107
-rw-r--r--sys-block/tw_cli/tw_cli-9.2.1.1.ebuild72
-rw-r--r--sys-block/tw_cli/tw_cli-9.3.0.2.ebuild70
-rw-r--r--sys-block/tw_cli/tw_cli-9.3.0.3.ebuild70
-rw-r--r--sys-block/tw_cli/tw_cli-9.3.0.4.ebuild70
-rw-r--r--sys-block/tw_cli/tw_cli-9.4.0.1.ebuild78
-rw-r--r--sys-block/tw_cli/tw_cli-9.4.0.ebuild75
-rw-r--r--sys-block/tw_cli/tw_cli-9.4.1.2.ebuild78
-rw-r--r--sys-block/tw_cli/tw_cli-9.4.2.ebuild78
-rw-r--r--sys-block/tw_cli/tw_cli-9.5.0.1.ebuild95
-rw-r--r--sys-block/tw_cli/tw_cli-9.5.0.ebuild100
-rw-r--r--sys-block/tw_cli/tw_cli-9.5.1.1.ebuild99
-rw-r--r--sys-block/tw_cli/tw_cli-9.5.2.ebuild102
-rw-r--r--sys-block/tw_cli/tw_cli-9.5.3.ebuild102
-rw-r--r--sys-block/vblade/Manifest3
-rw-r--r--sys-block/vblade/files/conf.d-vblade26
-rw-r--r--sys-block/vblade/files/init.d-vblade.vblade0120
-rw-r--r--sys-block/vblade/files/vbladed20
-rw-r--r--sys-block/vblade/metadata.xml8
-rw-r--r--sys-block/vblade/vblade-19.ebuild38
-rw-r--r--sys-block/vblade/vblade-20.ebuild37
-rw-r--r--sys-block/vblade/vblade-21.ebuild36
-rw-r--r--sys-block/viaideinfo/Manifest1
-rw-r--r--sys-block/viaideinfo/metadata.xml8
-rw-r--r--sys-block/viaideinfo/viaideinfo-0.5.ebuild19
-rw-r--r--sys-block/whdd/Manifest2
-rw-r--r--sys-block/whdd/metadata.xml16
-rw-r--r--sys-block/whdd/whdd-2.1.ebuild28
-rw-r--r--sys-block/whdd/whdd-2.2.ebuild28
-rw-r--r--sys-block/whdd/whdd-9999.ebuild22
-rw-r--r--sys-block/zram-init/Manifest2
-rw-r--r--sys-block/zram-init/metadata.xml11
-rw-r--r--sys-block/zram-init/zram-init-2.7-r1.ebuild39
-rw-r--r--sys-block/zram-init/zram-init-3.0.ebuild49
383 files changed, 13974 insertions, 0 deletions
diff --git a/sys-block/afacli/Manifest b/sys-block/afacli/Manifest
new file mode 100644
index 000000000000..0f9ff56b9c4b
--- /dev/null
+++ b/sys-block/afacli/Manifest
@@ -0,0 +1 @@
+DIST afa-apps-snmp.2807420-A04.tar.gz 966308 SHA256 0b7abd0308e8cff6824b47e435e81579f2464ddc5fb9a87d478eb87778176fd2
diff --git a/sys-block/afacli/afacli-4.1.ebuild b/sys-block/afacli/afacli-4.1.ebuild
new file mode 100644
index 000000000000..950d2753331a
--- /dev/null
+++ b/sys-block/afacli/afacli-4.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit rpm
+
+MY_PV=${PV}-0
+DESCRIPTION="Dell AACRAID-based PERC RAID controller management tool"
+HOMEPAGE="http://linux.dell.com/"
+SRC_URI="ftp://ftp.dell.com/scsi-raid/afa-apps-snmp.2807420-A04.tar.gz"
+
+LICENSE="Dell"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~x86"
+IUSE=""
+
+RESTRICT="strip mirror test"
+
+RDEPEND="sys-libs/lib-compat"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+ rpm_unpack "${S}"/afaapps-${MY_PV}.i386.rpm || die "failed to unpack RPM"
+}
+
+src_compile() {
+ echo "Nothing to compile."
+}
+
+src_install() {
+ dosbin "${FILESDIR}"/afacli
+ newsbin usr/sbin/afacli afacli.bin
+ dodoc usr/sbin/getcfg.afa
+}
diff --git a/sys-block/afacli/files/afacli b/sys-block/afacli/files/afacli
new file mode 100755
index 000000000000..5596094228c5
--- /dev/null
+++ b/sys-block/afacli/files/afacli
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Get the major number of the aac ioctl device node
+aacdev_major=$(egrep '[[:space:]]aac$' /proc/devices 2>/dev/null | awk '{print $1}' 2>/dev/null)
+aacdev_node=/dev/afa0
+
+# AACRAID device node major number found
+if [ -z "${aacdev_major}" ]; then
+ echo "ERROR: failed to determine device node major number"
+ exit 1
+fi
+if [ -e "${aacdev_node}" ]; then
+ if ! rm -f "${aacdev_node}"; then
+ echo "ERROR: failed to remove existing device node ${aacdev_node}"
+ exit 1
+ fi
+fi
+if ! mknod "${aacdev_node}" c "${aacdev_major}" 0; then
+ echo "ERROR: failed to create device node ${aacdev_node}"
+ exit 1
+fi
+
+# Start the real afacli binary
+"${0%/*}/afacli.bin" "${@}"
diff --git a/sys-block/afacli/metadata.xml b/sys-block/afacli/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/sys-block/afacli/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/aoetools/Manifest b/sys-block/aoetools/Manifest
new file mode 100644
index 000000000000..7b30ca08930a
--- /dev/null
+++ b/sys-block/aoetools/Manifest
@@ -0,0 +1,2 @@
+DIST aoetools-35.tar.gz 35500 SHA256 837684fd8c5ccd15ce82d8e01e5e68e59b3045df200d5d68dc09f458baf33c7c SHA512 1f40cb33a613953d05314037eb8183cea6e95f973b61c1205260cf48f97e3f10708c1e7c558e7732b89e6cfaf9792ea8e432bd609431af46eadbfc3595709f5a WHIRLPOOL 090e8218b7b4a7aa4c002986354b188b97d95122fe42ff21f50e33b4188b60c118dd1a5cce76ff7c55e05973f0d3831a0d3b75bb6c3dc947483efb1efad1743a
+DIST aoetools-36.tar.gz 36650 SHA256 fb5e2cd0de7644cc1ec04ee3aeb43211cf7445a0c19e13d6b3ed5a8fbdf215ff SHA512 ee23087bed87308e34d498af41fd0754b9867555822355103182e1194982645a18d59bd7ff5115b81fb40f8cbefbe5368199c9e5d531544e0e2375582be46ba1 WHIRLPOOL 80a4decbe2801130166821362fbe84e1998b155500d05c35375ab5629c2a10f8a1d0ae22567592a6d821a9f332d79443fe4714b5eed2ed35aae1c3241f8dda17
diff --git a/sys-block/aoetools/aoetools-35.ebuild b/sys-block/aoetools/aoetools-35.ebuild
new file mode 100644
index 000000000000..f54caaa52927
--- /dev/null
+++ b/sys-block/aoetools/aoetools-35.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tools for ATA over Ethernet (AoE) network storage protocol"
+HOMEPAGE="http://aoetools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE=""
+
+DOCS="NEWS README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-32-build.patch
+ tc-export CC
+}
diff --git a/sys-block/aoetools/aoetools-36.ebuild b/sys-block/aoetools/aoetools-36.ebuild
new file mode 100644
index 000000000000..ab119614cb7e
--- /dev/null
+++ b/sys-block/aoetools/aoetools-36.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tools for ATA over Ethernet (AoE) network storage protocol"
+HOMEPAGE="http://aoetools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE=""
+
+DOCS="NEWS README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-32-build.patch
+ tc-export CC
+}
diff --git a/sys-block/aoetools/files/aoetools-32-build.patch b/sys-block/aoetools/files/aoetools-32-build.patch
new file mode 100644
index 000000000000..abd2cce3d847
--- /dev/null
+++ b/sys-block/aoetools/files/aoetools-32-build.patch
@@ -0,0 +1,32 @@
+--- Makefile
++++ Makefile
+@@ -40,7 +40,7 @@
+ CONF_SCRIPTS = aoe-discover aoe-interfaces aoe-mkshelf aoe-revalidate aoe-flush aoe-stat
+ PROGS = aoeping aoecfg aoe-sancheck
+ COMMANDS := ${CONF_SCRIPTS} aoe-mkdevs aoe-version coraid-update ${PROGS}
+-CFLAGS = -Wall -O -g
++CFLAGS += $(CPPFLAGS)
+ SANCHECKLIBS = -lpthread
+
+ AOE_PING_OBJ = aoeping.o linux.o
+@@ -68,17 +68,17 @@
+ rm -f ${CONF_SCRIPTS} ${AOE_PING_OBJ} ${AOE_CFG_OBJ} ${SANCHECK_OBJ} ${PROGS}
+
+ aoeping : ${AOE_PING_OBJ}
+- ${CC} ${CFLAGS} -o $@ ${AOE_PING_OBJ}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_PING_OBJ}
+ aoeping.o : aoeping.c dat.h fns.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ linux.o : linux.c config.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ aoecfg: ${AOE_CFG_OBJ}
+- ${CC} ${CFLAGS} -o $@ ${AOE_CFG_OBJ}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_CFG_OBJ}
+ aoecfg.o : aoecfg.c dat.h fns.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ aoe-sancheck : ${SANCHECK_OBJ}
+- -$(CC) $(CFLAGS) -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
++ -$(CC) $(CFLAGS) ${LDFLAGS} -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
+ aoe-sancheck.o : aoe-sancheck.c
+ -$(CC) $(CFLAGS) -o $@ -c $<
+
diff --git a/sys-block/aoetools/metadata.xml b/sys-block/aoetools/metadata.xml
new file mode 100644
index 000000000000..1154867b1dab
--- /dev/null
+++ b/sys-block/aoetools/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>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">aoetools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/arcconf/Manifest b/sys-block/arcconf/Manifest
new file mode 100644
index 000000000000..77411aee9528
--- /dev/null
+++ b/sys-block/arcconf/Manifest
@@ -0,0 +1,2 @@
+DIST arcconf_v1_2_20618.zip 11920300 SHA256 ce5fe8ad97065ec90844c9e7d3778036e22a013eb029db2d6bda3ff3024734e4 SHA512 e8415e929cd7a8c8bca33f0de29bdadf3595da911bc3c0984226e02e01e6f4e9c822363dd8aa093efd524eea19f0689784e0300403513a99ead14ac08c487efe WHIRLPOOL 95399b80233fc1b8eac6c98156ad4b5d3f9597fddb7f413b4498886f1aa96eb623195e84b7ba97c4f84e4e8e555847b1650dc0092b64fdcf43ed22fdc01b3d6b
+DIST arcconf_v1_7_21229.zip 11056748 SHA256 b9ec025ed6e7167551dc2a034b39999f5b43a3a6544e3e8989f75a89dd99c7b3 SHA512 66a56ea66b8011c1f8f431b25f95050e541311ee415a0d4bdee6ef6416ff499be41d275819694384f66e5a1401b467da82ab15ce7c3fe49e1e013370293cf63a WHIRLPOOL bd566063d986ca4558e79759c1cfa96fe5e8ba4f44f5bf7828c4840d9634db69f897619b75b7d39a0d2102b8abbe4ad565b89136145af128636c0a40e4c3ce71
diff --git a/sys-block/arcconf/arcconf-1.2.20618.ebuild b/sys-block/arcconf/arcconf-1.2.20618.ebuild
new file mode 100644
index 000000000000..4b599527576d
--- /dev/null
+++ b/sys-block/arcconf/arcconf-1.2.20618.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Adaptec RAID Controller Command Line Utility"
+HOMEPAGE="http://www.adaptec.com/en-us/downloads/"
+SRC_URI="http://download.adaptec.com/raid/storage_manager/${PN}_v${PV//./_}.zip"
+
+LICENSE="Adaptec-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+RESTRICT="mirror bindist"
+# RESTRICT="fetch"
+
+QA_PRESTRIPPED="/opt/bin/arcconf"
+
+S="${WORKDIR}"
+
+# Maintainer notes:
+# * When going via the $HOMEPAGE one has to agree to the Adaptec-EULA as
+# referenced above.
+# * Despite that EULA, one can download the package seemingly without
+# restrictions from $SRC_URI.
+# * It is therefore assumed that the binary is made available for public
+# download. Even more so since the archive does not contain a license
+# agreement stating otherwise.
+
+#pkg_nofetch() {
+# einfo "Upstream has implemented a mandatory clickthrough EULA for distfile download"
+# einfo "Please visit $HOMEPAGE, choose a controller (for example the Series 7, 7805)"
+# einfo "and then navigate to Storage Manager Downloads for the ARCCONF Command Line Utility."
+# einfo "And place $A in ${DISTDIR}"
+#}
+
+# Maintainer notes:
+# * FreeBSD binaries would be available for FreeBSD 7..9, which ones do we need?
+src_install() {
+ exeinto /opt/bin
+
+ if use amd64 ; then
+ doexe linux_x64/arcconf
+ else
+ doexe linux_x86/arcconf
+ fi
+}
diff --git a/sys-block/arcconf/arcconf-1.7.21229.ebuild b/sys-block/arcconf/arcconf-1.7.21229.ebuild
new file mode 100644
index 000000000000..e033902fa240
--- /dev/null
+++ b/sys-block/arcconf/arcconf-1.7.21229.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Adaptec RAID Controller Command Line Utility"
+HOMEPAGE="http://www.adaptec.com/en-us/downloads/"
+SRC_URI="http://download.adaptec.com/raid/storage_manager/${PN}_v${PV//./_}.zip"
+
+LICENSE="Adaptec-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+RESTRICT="mirror bindist"
+# RESTRICT="fetch"
+
+QA_PRESTRIPPED="/opt/bin/arcconf"
+
+S="${WORKDIR}"
+
+# Maintainer notes:
+# * When going via the $HOMEPAGE one has to agree to the Adaptec-EULA as
+# referenced above.
+# * Despite that EULA, one can download the package seemingly without
+# restrictions from $SRC_URI.
+# * It is therefore assumed that the binary is made available for public
+# download. Even more so since the archive does not contain a license
+# agreement stating otherwise.
+
+#pkg_nofetch() {
+# einfo "Upstream has implemented a mandatory clickthrough EULA for distfile download"
+# einfo "Please visit $HOMEPAGE, choose a controller (for example the Series 7, 7805)"
+# einfo "and then navigate to Storage Manager Downloads for the ARCCONF Command Line Utility."
+# einfo "And place $A in ${DISTDIR}"
+#}
+
+# Maintainer notes:
+# * FreeBSD binaries would be available for FreeBSD 7..9, which ones do we need?
+src_install() {
+ exeinto /opt/bin
+
+ if use amd64 ; then
+ doexe linux_x64/cmdline/arcconf
+ else
+ doexe linux_x86/cmdline/arcconf
+ fi
+}
diff --git a/sys-block/arcconf/metadata.xml b/sys-block/arcconf/metadata.xml
new file mode 100644
index 000000000000..5b2a5c55470b
--- /dev/null
+++ b/sys-block/arcconf/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>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/blocks/Manifest b/sys-block/blocks/Manifest
new file mode 100644
index 000000000000..31cf423155d4
--- /dev/null
+++ b/sys-block/blocks/Manifest
@@ -0,0 +1 @@
+DIST blocks-0.1.4_pre131210.tar.xz 33684 SHA256 0e44b6b17ccf3e3c6ad79f5990f167bb6fa6355c6d0020e3bac7a5a926bd309b SHA512 05ad49f2ece5cdb92097f60b5f69cfbb7d409ac5e1ffb98488f26b51ad07ed7dad8eeb3fd302a06b3e199e816e45c2c69daecc13a19627252b8245372f324a58 WHIRLPOOL c48876b36ea51ae8ff8f85785a1fa9aef9264136442e13c198b58c0bbbbb18ef0c866c5fa53335f4d9b35052a77d5189470f1a64d08cfa0552da0a639dbfdbc1
diff --git a/sys-block/blocks/blocks-0.1.4_pre131210-r1.ebuild b/sys-block/blocks/blocks-0.1.4_pre131210-r1.ebuild
new file mode 100644
index 000000000000..b3e2d7a829d8
--- /dev/null
+++ b/sys-block/blocks/blocks-0.1.4_pre131210-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python3_{3,4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Conversion tools for block devices"
+HOMEPAGE="https://github.com/g2p/blocks"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-3+"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+minimal"
+
+DEPEND="
+ dev-python/maintboot
+ >=dev-python/pyparted-3.10[${PYTHON_USEDEP}]
+ >=dev-python/python-augeas-0.5.0[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ >=sys-block/parted-2.3
+ !minimal? (
+ sys-fs/btrfs-progs
+ sys-fs/lvm2
+ sys-fs/bcache-tools
+ sys-fs/nilfs-utils
+ sys-fs/cryptsetup
+ sys-fs/reiserfsprogs
+ sys-fs/xfsprogs
+ sys-fs/e2fsprogs
+ )
+"
+
+# NEVER, EVER run filesystem tests during build
+RESTRICT="test"
+
+python_test() {
+ cd tests || die
+ emake
+}
+
+pkg_postinst() {
+ if use minimal; then
+ einfo "For filesystem support you need to install:"
+ echo
+ einfo "btrfs: sys-fs/btrfs-progs"
+ einfo "LVM: sys-fs/lvm2"
+ einfo "bcache: sys-fs/bcache-tools"
+ einfo "NILFS: sys-fs/nilfs-utils"
+ einfo "crypted FS: sys-fs/cryptsetup"
+ einfo "reiser: sys-fs/reiserfsprogs"
+ einfo "XFS: sys-fs/xfsprogs"
+ einfo "EXT2/3/4: sys-fs/e2fsprogs"
+ echo
+ fi
+}
diff --git a/sys-block/blocks/blocks-9999.ebuild b/sys-block/blocks/blocks-9999.ebuild
new file mode 100644
index 000000000000..d61a412994e4
--- /dev/null
+++ b/sys-block/blocks/blocks-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python3_{3,4} )
+
+inherit distutils-r1 git-r3
+
+DESCRIPTION="Conversion tools for block devices"
+HOMEPAGE="https://github.com/g2p/blocks"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/g2p/blocks.git"
+
+SLOT="0"
+LICENSE="GPL-3+"
+KEYWORDS=""
+IUSE="+minimal"
+
+DEPEND="
+ dev-python/maintboot
+ >=dev-python/pyparted-3.10[${PYTHON_USEDEP}]
+ >=dev-python/python-augeas-0.5.0[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ >=sys-block/parted-2.3
+ !minimal? (
+ sys-fs/btrfs-progs
+ sys-fs/lvm2
+ sys-fs/bcache-tools
+ sys-fs/nilfs-utils
+ sys-fs/cryptsetup
+ sys-fs/reiserfsprogs
+ sys-fs/xfsprogs
+ sys-fs/e2fsprogs
+ )
+"
+
+# NEVER, EVER run filesystem tests during build
+RESTRICT="test"
+
+python_test() {
+ cd tests || die
+ emake
+}
+
+pkg_postinst() {
+ if use minimal; then
+ einfo "For filesystem support you need to install:"
+ echo
+ einfo "btrfs: sys-fs/btrfs-progs"
+ einfo "LVM: sys-fs/lvm2"
+ einfo "bcache: sys-fs/bcache-tools"
+ einfo "NILFS: sys-fs/nilfs-utils"
+ einfo "crypted FS: sys-fs/cryptsetup"
+ einfo "reiser: sys-fs/reiserfsprogs"
+ einfo "XFS: sys-fs/xfsprogs"
+ einfo "EXT2/3/4: sys-fs/e2fsprogs"
+ echo
+ fi
+}
diff --git a/sys-block/blocks/metadata.xml b/sys-block/blocks/metadata.xml
new file mode 100644
index 000000000000..25a6e85faa81
--- /dev/null
+++ b/sys-block/blocks/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Convert between raw partitions, logical volumes, and bcache devices without
+moving data. blocks shuffles blocks and sprouts superblocks.
+</longdescription>
+ <upstream>
+ <remote-id type="github">g2p/blocks</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/btrace/Manifest b/sys-block/btrace/Manifest
new file mode 100644
index 000000000000..dd6b9df42272
--- /dev/null
+++ b/sys-block/btrace/Manifest
@@ -0,0 +1,4 @@
+DIST blktrace-1.0.0.tar.bz2 1592300 SHA256 fb220463f55aaa6ead931991e2f7f6ddae18faaf5bfa65fe42f502a27afa0abf
+DIST blktrace-1.0.1.tar.bz2 292208 SHA256 fdd1481a69f14b916f8d835203c1189ee3076d4a5ff88163b6e6b1f27b087f6d SHA512 7faac50dd04ccc0b782f9d2e8909161e42614a348792af736fac8924680ab9eff6d0db0dea9717a0a468577cc03f8bb1314f4d61cb0f0d92423c000fce89c172 WHIRLPOOL 74559960ae7fd6b0eecc9457221f5133f46bbf23e6e096bc96226c85cee49999ae9cf67a3e8bff66722dca7cd43afaf910ac47dfe1d850f83c63e0db6f0ea70d
+DIST blktrace-1.0.3.tar.bz2 359325 SHA256 221b66a6008a46bc41b8e455cfb1ba924849ce660ac7c7f9dff0fb64c07becb2 SHA512 f20a33b5309146304277a5f8a4c7f2c61e804b2caa5c62d00425ef26fcd1cd628521067b2502d05c368e10d2cd38a98c246030705ba358f835e8a6921444f9a5 WHIRLPOOL 3de4ef8db992e6b6e697b35ae6a2e47b36e5a9157bc6fafc8fc0de206ee15e3e8ceb4dc3bf70c9dfaae16567bbf4c6d8e81f38a3f1619d804b1a680cbfa1ac81
+DIST blktrace-1.1.0.tar.bz2 395445 SHA256 54a2faaa06dd52fd4a56a6aafa2a251990eb8dcf1832bb8c2fb1fc13a74a9295 SHA512 52ed3b66e1ec62c2204d44037d4d13218fd0229ae694493a21f1e83bfc8aeb029edc96b2be83f39cc3e79500abad56cd5a71c8c4e6dd836661777662f3628355 WHIRLPOOL b2777e248533fee8ffe3d92e0311d5797f12f57e188dce94b39e4531b58350ed600a64b50cae590455b52e92b8727c098b56f2c92e58a0567641123201ec9085
diff --git a/sys-block/btrace/btrace-1.0.0.ebuild b/sys-block/btrace/btrace-1.0.0.ebuild
new file mode 100644
index 000000000000..cd919e3ca031
--- /dev/null
+++ b/sys-block/btrace/btrace-1.0.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic linux-info
+
+DESCRIPTION="btrace can show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/"
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+RDEPEND=""
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? ( virtual/latex-base app-text/dvipdfm )
+ dev-libs/libaio"
+S="${WORKDIR}/${MY_PN}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/${PN}-1.0.0-parallel-make.patch
+}
+
+src_compile() {
+ append-flags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "emake docs failed"
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" || die "emake install failed"
+ dodoc README
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/btrace/btrace-1.0.1-r1.ebuild b/sys-block/btrace/btrace-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..5f8f5362a5a6
--- /dev/null
+++ b/sys-block/btrace/btrace-1.0.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils toolchain-funcs flag-o-matic linux-info
+
+DESCRIPTION="btrace can show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/"
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+RDEPEND=""
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? ( virtual/latex-base app-text/dvipdfm )
+ dev-libs/libaio"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.1-ldflags-parallel-make.patch
+}
+
+src_compile() {
+ append-flags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "emake docs failed"
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" || die "emake install failed"
+ dodoc README
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/btrace/btrace-1.0.1.ebuild b/sys-block/btrace/btrace-1.0.1.ebuild
new file mode 100644
index 000000000000..a87e223f8097
--- /dev/null
+++ b/sys-block/btrace/btrace-1.0.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic linux-info
+
+DESCRIPTION="btrace can show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/"
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+RDEPEND=""
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? ( virtual/latex-base app-text/dvipdfm )
+ dev-libs/libaio"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${PN}-1.0.0-parallel-make.patch
+}
+
+src_compile() {
+ append-flags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "emake docs failed"
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" || die "emake install failed"
+ dodoc README
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/btrace/btrace-1.0.3.ebuild b/sys-block/btrace/btrace-1.0.3.ebuild
new file mode 100644
index 000000000000..9ce1119a4895
--- /dev/null
+++ b/sys-block/btrace/btrace-1.0.3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils toolchain-funcs flag-o-matic linux-info
+
+DESCRIPTION="btrace can show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/"
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+RDEPEND=""
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? ( virtual/latex-base app-text/dvipdfm )
+ dev-libs/libaio"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.1-ldflags-parallel-make.patch
+}
+
+src_compile() {
+ append-flags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "emake docs failed"
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" || die "emake install failed"
+ dodoc README
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/btrace/btrace-1.1.0.ebuild b/sys-block/btrace/btrace-1.1.0.ebuild
new file mode 100644
index 000000000000..27df22b5b8aa
--- /dev/null
+++ b/sys-block/btrace/btrace-1.1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic linux-info
+
+DESCRIPTION="btrace can show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/axboe/blktrace/"
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+RDEPEND=""
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? ( virtual/latex-base app-text/dvipdfm )
+ dev-libs/libaio"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.0-ldflags-parallel-make.patch
+}
+
+src_compile() {
+ append-flags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man"
+ dodoc README
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/btrace/files/btrace-1.0.0-parallel-make.patch b/sys-block/btrace/files/btrace-1.0.0-parallel-make.patch
new file mode 100644
index 000000000000..d3f42964c2b9
--- /dev/null
+++ b/sys-block/btrace/files/btrace-1.0.0-parallel-make.patch
@@ -0,0 +1,20 @@
+diff -Nuar blktrace.orig/Makefile blktrace/Makefile
+--- blktrace.orig/Makefile 2008-10-30 07:20:02.000000000 -0700
++++ blktrace/Makefile 2009-04-12 17:54:46.351588795 -0700
+@@ -10,13 +10,13 @@
+
+ all: $(ALL)
+
+-btt/btt:
++btt/btt: $(PROGS)
+ $(MAKE) -C btt
+
+-btreplay/btrecord:
++btreplay/btrecord: $(PROGS)
+ $(MAKE) -C btreplay
+
+-btreplay/btreplay:
++btreplay/btreplay: $(PROGS)
+ $(MAKE) -C btreplay
+
+ %.o: %.c
diff --git a/sys-block/btrace/files/btrace-1.0.1-ldflags-parallel-make.patch b/sys-block/btrace/files/btrace-1.0.1-ldflags-parallel-make.patch
new file mode 100644
index 000000000000..40c7d97d5dea
--- /dev/null
+++ b/sys-block/btrace/files/btrace-1.0.1-ldflags-parallel-make.patch
@@ -0,0 +1,91 @@
+diff -Nuar blktrace-1.0.1.orig/btreplay/Makefile blktrace-1.0.1/btreplay/Makefile
+--- blktrace-1.0.1.orig/btreplay/Makefile 2009-05-11 12:00:10.000000000 +0000
++++ blktrace-1.0.1/btreplay/Makefile 2011-02-03 03:01:41.161365886 +0000
+@@ -32,10 +32,10 @@
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ btreplay: btreplay.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ depend:
+ @$(CC) -MM $(CFLAGS) *.c 1> .depend
+diff -Nuar blktrace-1.0.1.orig/btt/Makefile blktrace-1.0.1/btt/Makefile
+--- blktrace-1.0.1.orig/btt/Makefile 2009-05-11 12:00:10.000000000 +0000
++++ blktrace-1.0.1/btt/Makefile 2011-02-03 03:01:41.161365886 +0000
+@@ -38,7 +38,7 @@
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btt: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ ifneq ($(wildcard .depend),)
+ include .depend
+diff -Nuar blktrace-1.0.1.orig/Makefile blktrace-1.0.1/Makefile
+--- blktrace-1.0.1.orig/Makefile 2009-05-11 12:00:10.000000000 +0000
++++ blktrace-1.0.1/Makefile 2011-02-03 03:03:32.713725832 +0000
+@@ -4,38 +4,35 @@
+ PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
+ LIBS = -lpthread
+ SCRIPTS = btrace
++SUBDIRS = btreplay btt
+
+-ALL = $(PROGS) $(SCRIPTS) btt/btt btreplay/btrecord btreplay/btreplay \
++ALL = $(PROGS) $(SCRIPTS)
++INSTALL_ALL = $(ALL) btt/btt btreplay/btrecord btreplay/btreplay \
+ btt/bno_plot.py
+
+-all: $(ALL)
++all: $(ALL) $(SUBDIRS)
++.PHONY: $(SUBDIRS)
+
+-btt/btt:
+- $(MAKE) -C btt
+-
+-btreplay/btrecord:
+- $(MAKE) -C btreplay
+-
+-btreplay/btreplay:
+- $(MAKE) -C btreplay
++$(SUBDIRS): $(PROGS)
++ $(MAKE) -C $@
+
+ %.o: %.c
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blktrace: blktrace.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ verify_blkparse: verify_blkparse.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkrawverify: blkrawverify.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkiomon: blkiomon.o rbtree.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
+
+ $(PROGS): | depend
+
+@@ -81,7 +78,7 @@
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 $(INSTALL_ALL) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8
+
diff --git a/sys-block/btrace/files/btrace-1.1.0-ldflags-parallel-make.patch b/sys-block/btrace/files/btrace-1.1.0-ldflags-parallel-make.patch
new file mode 100644
index 000000000000..f26799238feb
--- /dev/null
+++ b/sys-block/btrace/files/btrace-1.1.0-ldflags-parallel-make.patch
@@ -0,0 +1,105 @@
+--- blktrace-1.1.0/btreplay/Makefile
++++ blktrace-1.1.0/btreplay/Makefile
+@@ -32,10 +32,10 @@
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ btreplay: btreplay.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ depend:
+ @$(CC) -MM $(CFLAGS) *.c 1> .depend
+--- blktrace-1.1.0/btt/Makefile
++++ blktrace-1.1.0/btt/Makefile
+@@ -38,7 +38,7 @@
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btt: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ ifneq ($(wildcard .depend),)
+ include .depend
+--- blktrace-1.1.0/iowatcher/Makefile
++++ blktrace-1.1.0/iowatcher/Makefile
+@@ -19,7 +19,7 @@
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) -lm
+
+ depend:
+ @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
+--- blktrace-1.1.0/Makefile
++++ blktrace-1.1.0/Makefile
+@@ -4,41 +4,35 @@
+ PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
+ LIBS = -lpthread
+ SCRIPTS = btrace
++SUBDIRS = btreplay btt iowatcher
+
+-ALL = $(PROGS) $(SCRIPTS) btt/btt btreplay/btrecord btreplay/btreplay \
++ALL = $(PROGS) $(SCRIPTS)
++INSTALL_ALL = $(ALL) btt/btt btreplay/btrecord btreplay/btreplay \
+ btt/bno_plot.py iowatcher/iowatcher
+
+-all: $(ALL)
++all: $(ALL) $(SUBDIRS)
++.PHONY: $(SUBDIRS)
+
+-btt/btt:
+- $(MAKE) -C btt
+-
+-iowatcher/iowatcher:
+- $(MAKE) -C iowatcher
+-
+-btreplay/btrecord:
+- $(MAKE) -C btreplay
+-
+-btreplay/btreplay:
+- $(MAKE) -C btreplay
++$(SUBDIRS): $(PROGS)
++ $(MAKE) -C $@
+
+ %.o: %.c
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blktrace: blktrace.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ verify_blkparse: verify_blkparse.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkrawverify: blkrawverify.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkiomon: blkiomon.o rbtree.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
+
+ $(PROGS): | depend
+
+@@ -84,9 +78,10 @@
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 $(INSTALL_ALL) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8
++ $(INSTALL) -m 644 iowatcher/*.1 $(DESTDIR)$(mandir)/man1
+
+ ifneq ($(wildcard .depend),)
+ include .depend
diff --git a/sys-block/btrace/metadata.xml b/sys-block/btrace/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/sys-block/btrace/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/sys-block/buffer/Manifest b/sys-block/buffer/Manifest
new file mode 100644
index 000000000000..9d05522fc070
--- /dev/null
+++ b/sys-block/buffer/Manifest
@@ -0,0 +1 @@
+DIST buffer-1.19.tgz 34960 RMD160 f520d63aa3da22b505f8ecbcb779e6c59508918a SHA1 acb7c516c8fc41d7356db673057e34506fab7c23 SHA256 ec7da9f9737cd03c11a26f8380ab7d567b252b862b989da430b1e92db79b42c8
diff --git a/sys-block/buffer/buffer-1.19-r2.ebuild b/sys-block/buffer/buffer-1.19-r2.ebuild
new file mode 100644
index 000000000000..676a1b1df8ff
--- /dev/null
+++ b/sys-block/buffer/buffer-1.19-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="a tapedrive tool for speeding up reading from and writing to tape"
+HOMEPAGE="http://www.microwerks.net/~hugo/"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc sparc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-deb-gentoo.patch
+ sed -i -e 's/$(CFLAGS)/\0 $(LDFLAGS)/' Makefile || die
+ emake clean
+}
+
+src_compile() {
+ append-lfs-flags
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin buffer
+ dodoc README
+ newman buffer.man buffer.1
+}
diff --git a/sys-block/buffer/files/1.19-deb-gentoo.patch b/sys-block/buffer/files/1.19-deb-gentoo.patch
new file mode 100644
index 000000000000..66ea66433bc6
--- /dev/null
+++ b/sys-block/buffer/files/1.19-deb-gentoo.patch
@@ -0,0 +1,293 @@
+diff -ur buffer-1.19.orig/buffer.c buffer-1.19/buffer.c
+--- buffer-1.19.orig/buffer.c 2004-08-21 01:45:29.938082048 -0400
++++ buffer-1.19/buffer.c 2004-08-21 01:45:39.444118464 -0400
+@@ -109,6 +109,9 @@
+ * Initial revision
+ *
+ */
++#include <stdlib.h>
++#include <string.h>
++#include <limits.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <signal.h>
+@@ -120,6 +123,7 @@
+ #include <sys/shm.h>
+ #include <sys/sem.h>
+ #include <sys/wait.h>
++#include <sys/time.h>
+ #include "sem.h"
+
+ #ifndef lint
+@@ -127,8 +131,8 @@
+ #endif
+
+-#ifndef __alpha
++#ifndef __linux__
+ extern char *shmat();
+-#endif /* __alpha */
++#endif /* __linux__ */
+
+ /* General macros */
+ #define TRUE 1
+@@ -136,6 +140,14 @@
+ #define K *1024
+ #define M *1024*1024
+
++#if defined __GNUC__ || __STDC_VERSION__ >= 199901L
++#define NUM_K_TYPE unsigned long long
++#define NUM_K_FMT "llu"
++#else
++#define NUM_K_TYPE unsigned long
++#define NUM_K_FMT "lu"
++#endif
++
+ /* Some forward declarations */
+ void byee();
+ void start_reader_and_writer();
+@@ -250,7 +262,9 @@
+
+ char print_total = 0;
+ /* Number of K output */
+-unsigned long outk = 0;
++NUM_K_TYPE outk = 0;
++
++struct timeval starttime;
+
+ int
+ main( argc, argv )
+@@ -262,6 +276,8 @@
+ set_handlers();
+
+ buffer_allocate();
++
++ gettimeofday(&starttime, NULL);
+
+ start_reader_and_writer();
+
+@@ -384,8 +400,8 @@
+ fprintf( stderr, "Usage: %s [-B] [-t] [-S size] [-m memsize] [-b blocks] [-p percent] [-s blocksize] [-u pause] [-i infile] [-o outfile] [-z size]\n",
+ progname );
+ fprintf( stderr, "-B = blocked device - pad out last block\n" );
+- fprintf( stderr, "-t = show total amount writen at end\n" );
+- fprintf( stderr, "-S size = show amount writen every size bytes\n" );
++ fprintf( stderr, "-t = show total amount written at end\n" );
++ fprintf( stderr, "-S size = show amount written every size bytes\n" );
+ fprintf( stderr, "-m size = size of shared mem chunk to grab\n" );
+ fprintf( stderr, "-b num = number of blocks in queue\n" );
+ fprintf( stderr, "-p percent = don't start writing until percent blocks filled\n" );
+@@ -397,6 +413,11 @@
+ byee( -1 );
+ }
+ }
++
++ if (argc > optind) {
++ fprintf( stderr, "too many arguments\n" );
++ byee( -1 );
++ }
+
+ if (zflag) showevery = blocksize;
+
+@@ -507,9 +528,9 @@
+ get_buffer();
+
+ if( debug )
+- fprintf( stderr, "%s pbuffer is 0x%08x, buffer_size is %d [%d x %d]\n",
++ fprintf( stderr, "%s pbuffer is 0x%08lx, buffer_size is %d [%d x %d]\n",
+ proc_string,
+- (char *)pbuffer, buffer_size, blocks, blocksize );
++ (unsigned long)pbuffer, buffer_size, blocks, blocksize );
+
+ #ifdef SYS5
+ memset( (char *)pbuffer, '\0', buffer_size );
+@@ -528,7 +549,17 @@
+ pbuffer->blocks_free_lock = 1;
+ /* start this off so lock() can be called on it for each block
+ * till all the blocks are used up */
++ /* Initializing the semaphore to "blocks - 1" causes a hang when using option
++ * "-p 100" because it always keeps one block free, so we'll never reach 100% fill
++ * level. However, there doesn't seem to be a good reason to keep one block free,
++ * so we initialize the semaphore to "blocks" instead.
++ * <mbuck@debian.org> 2004-01-11
++ */
++#if 0
+ sem_set( pbuffer->semid, pbuffer->blocks_free_lock, blocks - 1 );
++#else
++ sem_set( pbuffer->semid, pbuffer->blocks_free_lock, blocks );
++#endif
+
+ /* Detattach the shared memory so the fork doesnt do anything odd */
+ shmdt( (char *)pbuffer );
+@@ -648,7 +679,7 @@
+ int
+ fill_block()
+ {
+- int bytes;
++ int bytes = 0;
+ char *start;
+ int toread;
+ static char eof_reached = 0;
+@@ -707,7 +738,7 @@
+ {
+ int filled = 0;
+ int maxfilled = (blocks * percent) / 100;
+- int first_block;
++ int first_block = 0;
+
+ if( debug )
+ fprintf( stderr, "\tW: Entering writer\n blocks = %d\n maxfilled = %d\n",
+@@ -742,7 +773,7 @@
+ }
+
+ if( print_total ){
+- fprintf( stderr, "Kilobytes Out %lu\n", outk );
++ fprintf( stderr, "Kilobytes Out %" NUM_K_FMT "\n", outk );
+ }
+
+ if( debug )
+@@ -783,14 +814,14 @@
+ void
+ write_block_to_stdout()
+ {
+- static unsigned long out = 0;
++ unsigned long out = 0;
+ static unsigned long last_gb = 0;
+- static unsigned long next_k = 0;
++ static NUM_K_TYPE next_k = 0;
+ int written;
+
+ if( next_k == 0 && showevery ){
+ if( debug > 3 )
+- fprintf( stderr, "W: next_k = %lu showevery = %d\n", next_k, showevery );
++ fprintf( stderr, "W: next_k = %" NUM_K_FMT " showevery = %d\n", next_k, showevery );
+ showevery = showevery / 1024;
+ next_k = showevery;
+ }
+@@ -798,7 +829,7 @@
+ if( (written = write( fdout, curr_block->data, curr_block->bytes )) != curr_block->bytes ){
+ report_proc();
+ perror( "write of data failed" );
+- fprintf( stderr, "bytes to write=%d, bytes written=%d, total written %10luK\n", curr_block->bytes, written, outk );
++ fprintf( stderr, "bytes to write=%d, bytes written=%d, total written %10" NUM_K_FMT "K\n", curr_block->bytes, written, outk );
+ byee( -1 );
+ }
+
+@@ -825,7 +856,7 @@
+ }
+ if( showevery ){
+ if( debug > 3 )
+- fprintf( stderr, "W: outk = %lu, next_k = %lu\n",
++ fprintf( stderr, "W: outk = %" NUM_K_FMT ", next_k = %" NUM_K_FMT "\n",
+ outk, next_k );
+ if( outk >= next_k ){
+ pr_out();
+@@ -914,13 +945,12 @@
+ do_size( arg )
+ char *arg;
+ {
+- char format[ 20 ];
+- int ret;
++ int ret = 0;
+
+- *format = '\0';
+- sscanf( arg, "%d%s", &ret, format );
++ char unit = '\0';
++ sscanf( arg, "%d%c", &ret, &unit );
+
+- switch( *format ){
++ switch( unit ){
+ case 'm':
+ case 'M':
+ ret = ret K K;
+@@ -941,7 +971,36 @@
+ void
+ pr_out()
+ {
+- fprintf( stderr, " %10luK\r", outk );
++ struct timeval now;
++ unsigned long ms_delta, k_per_s;
++
++ gettimeofday(&now, NULL);
++ ms_delta = (now.tv_sec - starttime.tv_sec) * 1000
++ + (now.tv_usec - starttime.tv_usec) / 1000;
++ if (ms_delta) {
++ /* Use increased accuracy for small amounts of data,
++ * decreased accuracy for *huge* throughputs > 4.1GB/s
++ * to avoid division by 0. This will overflow if your
++ * machine's throughput exceeds 4TB/s - you deserve to
++ * loose if you're still using 32 bit longs on such a
++ * beast ;-)
++ * <mbuck@debian.org>
++ */
++ if (outk < ULONG_MAX / 1000) {
++ k_per_s = (outk * 1000) / ms_delta;
++ } else if (ms_delta >= 1000) {
++ k_per_s = outk / (ms_delta / 1000);
++ } else {
++ k_per_s = (outk / ms_delta) * 1000;
++ }
++ fprintf( stderr, " %10" NUM_K_FMT "K, %10luK/s\r", outk, k_per_s );
++ } else {
++ if (outk) {
++ fprintf( stderr, " %10" NUM_K_FMT "K, ?K/s\r", outk );
++ } else {
++ fprintf( stderr, " 0K, 0K/s\r");
++ }
++ }
+ }
+
+ #ifdef SYS5
+diff -ur buffer-1.19.orig/buffer.man buffer-1.19/buffer.man
+--- buffer-1.19.orig/buffer.man 2004-08-21 01:45:29.935085504 -0400
++++ buffer-1.19/buffer.man 2004-08-21 01:45:39.441121920 -0400
+@@ -37,7 +37,8 @@
+ Use the given file as the output file. The default is stdout.
+ .TP
+ .B \-S size
+-After every chunk this size has been writen print out how much been writen so far.
++After every chunk of this size has been written, print out how much has
++been written so far. Also prints the total througput.
+ By default this is not set.
+ .TP
+ .B \-s size
+@@ -71,9 +72,9 @@
+ throughput on some drives.)
+ .TP
+ .B \-B
+-Force each block writen to be padded out to the blocksize. This is needed by some tape
++Force each block written to be padded out to the blocksize. This is needed by some tape
+ and cartridge drives. Defaults to unpadded. This only affects the
+-last block writen.
++last block written.
+ .TP
+ .B \-t
+ On exiting print to stderr a brief message showing the total number of
+@@ -82,7 +83,7 @@
+ .B \-Z
+ If reading/writing directly to a character device (like a tape drive)
+ then after each gigabyte perform an lseek to the start of the file.
+-Use this flag with extreme care. If can only be used on devices where
++Use this flag with extreme care. It can only be used on devices where
+ an lseek does not rewind the tape but does reset the kernels position
+ flags. It is used to allow more than 2 gigabytes to be written.
+ .PP
+diff -ur buffer-1.19.orig/sem.c buffer-1.19/sem.c
+--- buffer-1.19.orig/sem.c 2004-08-21 01:45:29.939080896 -0400
++++ buffer-1.19/sem.c 2004-08-21 01:47:41.265618240 -0400
+@@ -27,6 +27,7 @@
+ * semaphores */
+
+ #include <stdio.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ipc.h>
+@@ -95,7 +96,7 @@
+ return sem;
+ }
+
+-static
++static void
+ do_sem( sem_id, pbuf, err )
+ int sem_id;
+ struct sembuf *pbuf;
diff --git a/sys-block/buffer/metadata.xml b/sys-block/buffer/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/buffer/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/cec/Manifest b/sys-block/cec/Manifest
new file mode 100644
index 000000000000..81bb0ceda0ff
--- /dev/null
+++ b/sys-block/cec/Manifest
@@ -0,0 +1 @@
+DIST cec-14.tgz 22654 SHA256 f7f84c3b92cebd48ad8e19fa562043b1513acd7a3578ee06bc538a8fa3c9eb8a SHA512 b024c26badc7992c1d2804378119e214923bd7cfbac80de374efd22084595f74752db0edf3b83ac0e258db1847a3b49734958effc3961c9e086e61d5b806782c WHIRLPOOL 2239ac032501f21857bc84d14e38935c397e091f84df2426b8ee497871a2007a58bc5e5fba990a1bff1c5c4f3ef5f5040ef8202e864da7eb6b58b8fb5129e1a5
diff --git a/sys-block/cec/cec-14.ebuild b/sys-block/cec/cec-14.ebuild
new file mode 100644
index 000000000000..86a3fbf4ce40
--- /dev/null
+++ b/sys-block/cec/cec-14.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Coraid Ethernet Console client"
+HOMEPAGE="http://aoetools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin ${PN}
+ doman ${PN}.8
+ dodoc ${PN}.txt NEWS README
+}
diff --git a/sys-block/cec/metadata.xml b/sys-block/cec/metadata.xml
new file mode 100644
index 000000000000..ea792b8f60a9
--- /dev/null
+++ b/sys-block/cec/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">aoetools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/dellmgr/Manifest b/sys-block/dellmgr/Manifest
new file mode 100644
index 000000000000..607c26d35dd1
--- /dev/null
+++ b/sys-block/dellmgr/Manifest
@@ -0,0 +1 @@
+DIST perc-apps-A08.tar.gz 761709 SHA256 9e1700dbe72a4557c449829be6ac4ca94c241f87ac42c015091e36336c1a706a SHA512 0a29b9a29216e81740488718307a85aac9560384ef8ba0d4bebdaf91b48d366cf6c4e025b17656abf03a2b8074f18c4595d88f3929e03233a08863b08f9d2d85 WHIRLPOOL f92e6d7c269585ce62f666d2a7fab7d2819bb005b1f1a5e02793fb570bc8415b7348be6dec53bdfd3a7531681a910db65f4dbf67e3a2f8df6e4f9ceeb25b2a06
diff --git a/sys-block/dellmgr/dellmgr-5.32-r1.ebuild b/sys-block/dellmgr/dellmgr-5.32-r1.ebuild
new file mode 100644
index 000000000000..4e0378b3ff26
--- /dev/null
+++ b/sys-block/dellmgr/dellmgr-5.32-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit multilib rpm
+
+MY_PV=${PV}-0
+DESCRIPTION="Dell PERC 2/3/4 RAID controller management tool"
+HOMEPAGE="http://linux.dell.com/"
+SRC_URI="http://ftp.us.dell.com/scsi-raid/perc-apps-A08.tar.gz"
+
+LICENSE="Dell"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="strip mirror test"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ use amd64 && { has_multilib_profile || die "needs multilib profile on amd64"; }
+}
+
+src_unpack() {
+ unpack ${A}
+ rpm_unpack "${S}"/Dellmgr-${MY_PV}.i386.rpm || die "failed to unpack RPM"
+}
+
+src_compile() {
+ echo "Nothing to compile."
+}
+
+src_install() {
+ newsbin "${FILESDIR}"/dellmgr-r2 dellmgr
+ dosbin usr/sbin/dellmgr.bin
+}
diff --git a/sys-block/dellmgr/files/dellmgr-r2 b/sys-block/dellmgr/files/dellmgr-r2
new file mode 100755
index 000000000000..907a1168e37f
--- /dev/null
+++ b/sys-block/dellmgr/files/dellmgr-r2
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Get the major number of the megadev ioctl device node
+megadev_major=$(egrep '[[:space:]]megadev(_legacy)?$' /proc/devices 2>/dev/null | awk '{print $1}' 2>/dev/null)
+megadev_node=/dev/megadev0
+
+# MegaRAID device node major number found
+if [ -z "${megadev_major}" ]; then
+ echo "ERROR: failed to determine device node major number"
+ exit 1
+fi
+if [ -e "${megadev_node}" ]; then
+ if ! rm -f "${megadev_node}"; then
+ echo "ERROR: failed to remove existing device node ${megadev_node}"
+ exit 1
+ fi
+fi
+if ! mknod "${megadev_node}" c "${megadev_major}" 0; then
+ echo "ERROR: failed to create device node ${megadev_node}"
+ exit 1
+fi
+
+# Start the real dellmgr binary
+"${0%/*}/dellmgr.bin" "${@}"
diff --git a/sys-block/dellmgr/metadata.xml b/sys-block/dellmgr/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/sys-block/dellmgr/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/devio/Manifest b/sys-block/devio/Manifest
new file mode 100644
index 000000000000..b6e653846dbb
--- /dev/null
+++ b/sys-block/devio/Manifest
@@ -0,0 +1 @@
+DIST devio-1.2.tar.gz 88650 SHA256 a71e87f49f52cd90dbd45431f65e83d18e073fb2669f91c29c59019b175cd5a8 SHA512 7620a5144f13fb66252e9f689df2a790d3868877184d0a013ada6270b6c3fc4a87f20ed283f2a017285d0219418f87c6425b481f397f46f49fc1ebc374aa791f WHIRLPOOL f07bbcf76b273d66e689ae536c6b6f7a94061d492b8764787ac124927088bafcf9bd90033e8f57a7b91578b1ad813db41a7eb6750e10c91eca501e78d23d7412
diff --git a/sys-block/devio/devio-1.2.ebuild b/sys-block/devio/devio-1.2.ebuild
new file mode 100644
index 000000000000..22a5a4d10dc2
--- /dev/null
+++ b/sys-block/devio/devio-1.2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="correctly read (or write) a region of a block device"
+HOMEPAGE="http://devio.sourceforge.net/"
+SRC_URI="mirror://sourceforge/devio/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 arm x86"
+IUSE=""
+
+DEPEND=""
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/sys-block/devio/metadata.xml b/sys-block/devio/metadata.xml
new file mode 100644
index 000000000000..b147a1c47f71
--- /dev/null
+++ b/sys-block/devio/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>embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">devio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/di/Manifest b/sys-block/di/Manifest
new file mode 100644
index 000000000000..a159789e5748
--- /dev/null
+++ b/sys-block/di/Manifest
@@ -0,0 +1,2 @@
+DIST di-4.35.tar.gz 212325 SHA256 2cdfface7a85e3a359cb228277b090a0648cabe18520e43b09919bdaf67b71d2 SHA512 5b7e7bd347b1ea285c4410e864f29cf475015a560baf450e558d3f8e1994b10822d6c3e18c04447c6a229d6d5e991194a4a3b155f3b36a8acfee866c8d048cec WHIRLPOOL 2891f70976f5818aa73ec3a07dc4afda678ae02c63b5a018cfb538a78d25f0432d70a7104ef1fe5f6e23e8e5f301430f4cc39b1538a83ea35d1a4748d4e55929
+DIST di-4.36.tar.gz 212957 SHA256 eb03d2ac0a3df531cdcb64b3667dbaebede60a4d3a4626393639cecb954c6d86 SHA512 ce7d38d3e23e68caa70bc85b623b7f4f633e2abf11b5df66b7104be49f1a1b2e64754d51ed00dd9ae629409e2a4760424f781e0351697b077e6aafb64bedad78 WHIRLPOOL 8f2c486d02dbe3f41d74d8a4e1df006ef0fa690bd0e5f3d71c6c47813724a899088fe51da2cdbb5407c27626949b1d048dc0bc1f20a8d964288c0abd8bbdb058
diff --git a/sys-block/di/di-4.35.ebuild b/sys-block/di/di-4.35.ebuild
new file mode 100644
index 000000000000..fd98e770a081
--- /dev/null
+++ b/sys-block/di/di-4.35.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Disk Information Utility"
+HOMEPAGE="http://www.gentoo.com/di/"
+SRC_URI="http://www.gentoo.com/di/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE=""
+
+RESTRICT="test" #405205, #405471
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.33-build.patch
+}
+
+src_configure() {
+ emake checkbuild
+ emake -C C config.h
+}
+
+src_compile() {
+ emake prefix=/usr CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install prefix="${D}/usr"
+ # default symlink is broken
+ dosym di /usr/bin/mi
+ dodoc README
+}
diff --git a/sys-block/di/di-4.36.ebuild b/sys-block/di/di-4.36.ebuild
new file mode 100644
index 000000000000..5b4dc01395aa
--- /dev/null
+++ b/sys-block/di/di-4.36.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Disk Information Utility"
+HOMEPAGE="http://www.gentoo.com/di/"
+SRC_URI="http://www.gentoo.com/di/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RESTRICT="test" #405205, #405471
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.33-build.patch
+}
+
+src_configure() {
+ emake checkbuild
+ emake -C C config.h
+}
+
+src_compile() {
+ emake prefix=/usr CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install prefix="${D}/usr"
+ # default symlink is broken
+ dosym di /usr/bin/mi
+ dodoc README
+}
diff --git a/sys-block/di/files/di-4.33-build.patch b/sys-block/di/files/di-4.33-build.patch
new file mode 100644
index 000000000000..adefb4993885
--- /dev/null
+++ b/sys-block/di/files/di-4.33-build.patch
@@ -0,0 +1,40 @@
+These are the first errors occuring:
+
+di.h:82:4: error: unknown type name ‘error’
+di.h:82:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘/’ token
+di.h:143:5: error: unknown type name ‘_fs_size_t’
+
+Then there is a lot more errors after above.
+
+memcpy can't be detected normally due to:
+ http://gcc.gnu.org/PR55890
+
+--- C/di.h
++++ C/di.h
+@@ -9,6 +9,8 @@
+
+ #include "config.h"
+
++#include <string.h>
++
+ /*****************************************************/
+
+ #include <stdio.h>
+@@ -79,7 +81,7 @@
+
+ #if ! _lib_memcpy && ! _define_memcpy
+ # if ! _lib_bcopy && ! _define_bcopy
+- #error No_memcpy/bcopy_available.
++ //#error No_memcpy/bcopy_available.
+ # else
+ # define memcpy(dst, src, cnt) (bcopy((src), (dst), (cnt)), dst)
+ # endif
+@@ -87,7 +89,7 @@
+
+ #if ! _lib_memset && ! _define_memset
+ # if ! _lib_bzero && ! _define_bzero
+- #error No_memset/bzero_available.
++ //#error No_memset/bzero_available.
+ # else
+ # define memset(s,c,n) (bzero ((s), (n)), s)
+ # endif
diff --git a/sys-block/di/metadata.xml b/sys-block/di/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/di/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/disktype/Manifest b/sys-block/disktype/Manifest
new file mode 100644
index 000000000000..bd0b95c0352b
--- /dev/null
+++ b/sys-block/disktype/Manifest
@@ -0,0 +1 @@
+DIST disktype-9.tar.gz 43809 SHA256 b6701254d88412bc5d2db869037745f65f94b900b59184157d072f35832c1111
diff --git a/sys-block/disktype/disktype-9.ebuild b/sys-block/disktype/disktype-9.ebuild
new file mode 100644
index 000000000000..f16325faff15
--- /dev/null
+++ b/sys-block/disktype/disktype-9.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Detect the content format of a disk or disk image"
+HOMEPAGE="http://disktype.sourceforge.net/"
+SRC_URI="mirror://sourceforge/disktype/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ppc sh sparc x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin disktype
+ dodoc README HISTORY TODO
+ doman disktype.1
+}
diff --git a/sys-block/disktype/metadata.xml b/sys-block/disktype/metadata.xml
new file mode 100644
index 000000000000..f27b7d146f9d
--- /dev/null
+++ b/sys-block/disktype/metadata.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>forensics</herd>
+ <longdescription>
+The purpose of disktype is to detect the content format of a disk or disk image. It knows about common file systems,
+partition tables, and boot codes.
+
+As of version 7, disktype knows about the following formats. For more detailed information, please see the
+documentation.
+
+File systems:
+
+FAT12/FAT16/FAT32
+NTFS
+HPFS
+MFS, HFS, HFS Plus
+ISO9660
+UDF
+ext2/ext3
+Minix
+ReiserFS
+Linux romfs
+Linux cramfs
+Linux squashfs
+UFS (some variations)
+SysV FS (some variations)
+JFS
+XFS
+Amiga FS/FFS
+BeOS BFS
+QNX4 FS
+3DO CD-ROM FS
+Veritas VxFS
+
+
+ Partitioning:
+
+DOS/PC style
+Apple
+Amiga "Rigid Disk"
+ATARI ST (AHDI3)
+BSD disklabel
+Linux RAID physical disks
+Linux LVM physical volumes
+Solaris SPARC disklabel
+Solaris x86 disklabel (vtoc)
+
+ Other structures:
+
+Debian split floppy header
+Linux swap
+
+ Disk images:
+
+Raw CD image (.bin)
+Virtual PC hard disk image
+Apple UDIF disk image (limited)
+
+
+ Boot codes:
+
+LILO
+GRUB
+SYSLINUX
+ISOLINUX
+Linux kernel
+FreeBSD loader
+Sega Dreamcast (?)
+
+ Compression formats:
+
+gzip
+compress
+bzip2
+
+ Archive formats:
+
+tar
+cpio
+bar
+dump/restore
+
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">disktype</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/eject-bsd/Manifest b/sys-block/eject-bsd/Manifest
new file mode 100644
index 000000000000..7a777413a776
--- /dev/null
+++ b/sys-block/eject-bsd/Manifest
@@ -0,0 +1 @@
+DIST eject-1.5.tar.gz 4928 RMD160 32359541161c8d98d68ea00c6a67b51b0155c1e2 SHA1 334dd4f9f0097288f8414940af1ab3dd5bbb570c SHA256 768d97568f4b893a093f66968cb4791f2b20f87585c6d38aeed203de3a3b2597
diff --git a/sys-block/eject-bsd/eject-bsd-1.5.ebuild b/sys-block/eject-bsd/eject-bsd-1.5.ebuild
new file mode 100644
index 000000000000..c3aa8e1b8f7e
--- /dev/null
+++ b/sys-block/eject-bsd/eject-bsd-1.5.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils portability toolchain-funcs
+
+MY_P=eject-${PV}
+
+DESCRIPTION="eject command for FreeBSD systems"
+HOMEPAGE="http://www.freshports.org/sysutils/eject/"
+SRC_URI="ftp://ports.jp.FreeBSD.org/pub/FreeBSD-jp/OD/${MY_P}.tar.gz
+ ftp://ftp4.jp.FreeBSD.org/pub/FreeBSD-jp/OD/${MY_P}.tar.gz
+ ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/FreeBSD-jp/OD/${MY_P}.tar.gz
+ mirror://freebsd/ports/distfiles/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-manpage.patch
+ epatch "${FILESDIR}"/${P}-devname.patch
+}
+
+src_compile() {
+ $(get_bmake) CC="$(tc-getCC)" PREFIX=/usr eject || die
+}
+
+src_install() {
+ dobin "${S}"/eject || die
+ doman "${S}"/eject.1
+ dodoc "${S}"/README
+}
diff --git a/sys-block/eject-bsd/files/eject-bsd-1.5-devname.patch b/sys-block/eject-bsd/files/eject-bsd-1.5-devname.patch
new file mode 100644
index 000000000000..0f1efac8fed0
--- /dev/null
+++ b/sys-block/eject-bsd/files/eject-bsd-1.5-devname.patch
@@ -0,0 +1,11 @@
+--- eject.c.orig Tue May 3 14:59:19 2005
++++ eject.c Tue May 3 15:01:30 2005
+@@ -133,7 +133,7 @@
+ int sts;
+ struct stat sb;
+
+- if (asprintf(device, "/dev/%sc", name) == -1)
++ if (asprintf(device, "/dev/%s", name) == -1)
+ return sts;
+ if (vflag || nflag) {
+ printf("%s: using device %s\n", program, device);
diff --git a/sys-block/eject-bsd/files/eject-bsd-1.5-manpage.patch b/sys-block/eject-bsd/files/eject-bsd-1.5-manpage.patch
new file mode 100644
index 000000000000..3706f388e1e4
--- /dev/null
+++ b/sys-block/eject-bsd/files/eject-bsd-1.5-manpage.patch
@@ -0,0 +1,11 @@
+--- eject.1.orig Tue Jan 4 14:49:41 2000
++++ eject.1 Sun Feb 1 00:49:17 2004
+@@ -53,6 +53,8 @@
+ Not execute operation but print it.
+ .It Fl v
+ Verbose mode.
++.It Fl t
++Give drive tray close command.
+ .Sh ENVIRONMENT
+ If the following environment variable exists, it is used by
+ .Nm eject :
diff --git a/sys-block/eject-bsd/metadata.xml b/sys-block/eject-bsd/metadata.xml
new file mode 100644
index 000000000000..ecedda4aa2cc
--- /dev/null
+++ b/sys-block/eject-bsd/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>bsd</herd>
+</pkgmetadata>
diff --git a/sys-block/eject/Manifest b/sys-block/eject/Manifest
new file mode 100644
index 000000000000..7b51df3e576b
--- /dev/null
+++ b/sys-block/eject/Manifest
@@ -0,0 +1 @@
+DIST eject-2.1.5.tar.gz 123585 RMD160 6e2f161e1399f9f01f376e56593d6ca586c4c8ea SHA1 17986aa4732f1c33ecae15db32d1e379bbbd99f8 SHA256 ef9f7906484cfde4ba223b2682a37058f9a3c7d3bb1adda7a34a67402e2ffe55
diff --git a/sys-block/eject/eject-2.1.5-r2.ebuild b/sys-block/eject/eject-2.1.5-r2.ebuild
new file mode 100644
index 000000000000..41f9f09d7ea9
--- /dev/null
+++ b/sys-block/eject/eject-2.1.5-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="A command to eject a disc from the CD-ROM drive"
+HOMEPAGE="http://eject.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.13-xmalloc.patch
+ epatch "${FILESDIR}"/${PN}-2.1.4-scsi-rdwr.patch
+ epatch "${FILESDIR}"/${PN}-2.1.5-handle-spaces.patch #151257
+ epatch "${FILESDIR}"/${PN}-2.1.5-man-typo.patch #165248
+ epatch "${FILESDIR}"/${PN}-2.1.5-toggle.patch #261880
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls)
+}
+
+src_install() {
+ # PREFIX for po/Makefile, which hardcodes a prefix of "$(DESTDIR)/usr"
+ # it is not used in the other makefiles
+ emake DESTDIR="${D}" PREFIX="${ED}/usr" install || die
+ dodoc ChangeLog README PORTING TODO AUTHORS NEWS PROBLEMS
+}
diff --git a/sys-block/eject/files/eject-2.0.13-xmalloc.patch b/sys-block/eject/files/eject-2.0.13-xmalloc.patch
new file mode 100644
index 000000000000..f609da19d05f
--- /dev/null
+++ b/sys-block/eject/files/eject-2.0.13-xmalloc.patch
@@ -0,0 +1,28 @@
+Make sure the malloc's work.
+
+http://bugs.gentoo.org/91977
+
+--- eject.c
++++ eject.c
+@@ -304,2 +304,11 @@
+
++void *xmalloc(size_t size)
++{
++ void *ret = malloc(size);
++ if (!ret) {
++ fprintf(stderr, _("%s: could not allocate memory\n"), programName);
++ exit(1);
++ }
++ return ret;
++}
+
+@@ -324,3 +333,3 @@
+
+- buf = (char *) malloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */
++ buf = (char *) xmalloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */
+
+@@ -794,3 +803,3 @@
+ if (status == 0) {
+- result = (char *) malloc(strlen(name) + 25);
++ result = (char *) xmalloc(strlen(name) + 25);
+ strcpy(result, name);
diff --git a/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch b/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch
new file mode 100644
index 000000000000..cd5e497b9d9a
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch
@@ -0,0 +1,21 @@
+http://bugs.gentoo.org/116731
+
+--- eject-2.0.13/eject.c
++++ eject-2.0.13/eject.c
+@@ -657,7 +657,15 @@
+ /* Open a device file. */
+ static int OpenDevice(const char *fullName)
+ {
+- int fd = open(fullName, O_RDONLY|O_NONBLOCK);
++ int flags = O_NONBLOCK;
++ int fd;
++
++ if (s_option)
++ flags |= O_RDWR;
++ else
++ flags |= O_RDONLY;
++
++ fd = open(fullName, flags);
+ if (fd == -1) {
+ fprintf(stderr, _("%s: unable to open `%s'\n"), programName, fullName);
+ exit(1);
diff --git a/sys-block/eject/files/eject-2.1.5-handle-spaces.patch b/sys-block/eject/files/eject-2.1.5-handle-spaces.patch
new file mode 100644
index 000000000000..692368fa50b8
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-handle-spaces.patch
@@ -0,0 +1,57 @@
+http://bugs.gentoo.org/151257
+
+--- eject.c
++++ eject.c
+@@ -370,6 +370,30 @@ static int FileExists(const char *name,
+
+
+ /*
++ * Linux mangles spaces in mount points by changing them to an octal string
++ * of '\040'. So lets scan the mount point and fix it up by replacing all
++ * occurrences off '\0##' with the ASCII value of 0##. Requires a writable
++ * string as input as we mangle in place. Some of this was taken from the
++ * util-linux package.
++ */
++#define octalify(a) ((a) & 7)
++#define tooctal(s) (64*octalify(s[1]) + 8*octalify(s[2]) + octalify(s[3]))
++#define isoctal(a) (((a) & ~7) == '0')
++static char *DeMangleMount(char *s)
++{
++ char *tmp = s;
++ while ((tmp = strchr(tmp, '\\')) != NULL) {
++ if (isoctal(tmp[1]) && isoctal(tmp[2]) && isoctal(tmp[3])) {
++ tmp[0] = tooctal(tmp);
++ memmove(tmp+1, tmp+4, strlen(tmp)-3);
++ }
++ ++tmp;
++ }
++ return s;
++}
++
++
++/*
+ * Given name, such as foo, see if any of the following exist:
+ *
+ * foo (if foo starts with '.' or '/')
+@@ -884,8 +908,8 @@ static int MountedDevice(const char *nam
+ if (((strcmp(s1, name) == 0) || (strcmp(s2, name) == 0)) ||
+ ((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) {
+ FCLOSE(fp);
+- *deviceName = strdup(s1);
+- *mountName = strdup(s2);
++ *deviceName = DeMangleMount(strdup(s1));
++ *mountName = DeMangleMount(strdup(s2));
+ return 1;
+ }
+ }
+@@ -928,8 +952,8 @@ static int MountableDevice(const char *n
+ rc = sscanf(line, "%1023s %1023s", s1, s2);
+ if (rc >= 2 && s1[0] != '#' && strcmp(s2, name) == 0) {
+ FCLOSE(fp);
+- *deviceName = strdup(s1);
+- *mountName = strdup(s2);
++ *deviceName = DeMangleMount(strdup(s1));
++ *mountName = DeMangleMount(strdup(s2));
+ return 1;
+ }
+ }
diff --git a/sys-block/eject/files/eject-2.1.5-man-typo.patch b/sys-block/eject/files/eject-2.1.5-man-typo.patch
new file mode 100644
index 000000000000..2fecb745ce0f
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-man-typo.patch
@@ -0,0 +1,18 @@
+http://bugs.gentoo.org/165248
+
+Index: eject.1
+===================================================================
+RCS file: /cvsroot/eject/eject/eject/eject.1,v
+retrieving revision 1.5
+diff -u -p -r1.5 eject.1
+--- eject.1 11 Dec 2005 00:21:06 -0000 1.5
++++ eject.1 4 Feb 2007 23:11:15 -0000
+@@ -145,7 +145,7 @@ also passes the \-n option to umount(1).
+ .TP 0.5i
+ .B \-m
+ This option allows eject to work with device drivers which automatically
+-mount removable media and therefore must be always mount()ed.
++mount removable media and therefore must be always mount(1)ed.
+ The option tells eject to not try to unmount the given device,
+ even if it is mounted according to /etc/mtab or /proc/mounts.
+
diff --git a/sys-block/eject/files/eject-2.1.5-toggle.patch b/sys-block/eject/files/eject-2.1.5-toggle.patch
new file mode 100644
index 000000000000..30a96028fbd6
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-toggle.patch
@@ -0,0 +1,27 @@
+idea take from opensuse
+http://bugs.gentoo.org/261880
+
+--- a/eject.c
++++ b/eject.c
+@@ -576,6 +576,21 @@ static void ToggleTray(int fd)
+
+ #ifdef CDROMCLOSETRAY
+
++ /* Ask the CDROM for info, otherwise fall back to manual */
++ switch (ioctl(fd, CDROM_DRIVE_STATUS)) {
++ case CDS_TRAY_OPEN:
++ CloseTray(fd);
++ return;
++
++ case CDS_NO_DISC:
++ case CDS_DISC_OK:
++ if (ioctl(fd, CDROMEJECT, 0) < 0) {
++ perror("ioctl");
++ exit(1);
++ }
++ return;
++ }
++
+ /* Try to open the CDROM tray and measure the time therefor
+ * needed. In my experience the function needs less than 0.05
+ * seconds if the tray was already open, and at least 1.5 seconds
diff --git a/sys-block/eject/metadata.xml b/sys-block/eject/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/eject/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/endpoint/Manifest b/sys-block/endpoint/Manifest
new file mode 100644
index 000000000000..d691d35c927f
--- /dev/null
+++ b/sys-block/endpoint/Manifest
@@ -0,0 +1 @@
+DIST endpoint-0.1.0.tar.gz 121954 SHA256 53831b97f831dabd5694364d06b8ad2f33d1e73ab03f6c57bea3ad96fa7f510a
diff --git a/sys-block/endpoint/endpoint-0.1.0.ebuild b/sys-block/endpoint/endpoint-0.1.0.ebuild
new file mode 100644
index 000000000000..ddb5955e24ac
--- /dev/null
+++ b/sys-block/endpoint/endpoint-0.1.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Endpoint turns a Linux machine with one or more firewire cards into an SBP-2 device"
+HOMEPAGE="http://oss.oracle.com/projects/endpoint/"
+SRC_URI="http://oss.oracle.com/projects/endpoint/dist/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND=">=sys-libs/libraw1394-0.9
+ >=dev-libs/glib-2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/${P}-errormessages.patch
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${D}"
+ insinto /etc
+ newins docs/sample-endpoint.conf endpoint.conf
+ dodoc README AUTHORS ChangeLog
+}
diff --git a/sys-block/endpoint/files/endpoint-0.1.0-errormessages.patch b/sys-block/endpoint/files/endpoint-0.1.0-errormessages.patch
new file mode 100644
index 000000000000..17926bc70574
--- /dev/null
+++ b/sys-block/endpoint/files/endpoint-0.1.0-errormessages.patch
@@ -0,0 +1,47 @@
+diff -Naur endpoint-0.1.0/libjconfig/jconfig.c endpoint-0.1.0.new/libjconfig/jconfig.c
+--- endpoint-0.1.0/libjconfig/jconfig.c 2003-10-13 15:21:12.000000000 -0700
++++ endpoint-0.1.0.new/libjconfig/jconfig.c 2006-02-26 23:48:58.000000000 -0800
+@@ -1242,9 +1242,12 @@
+ cfc = j_config_new_context();
+ if (cfc)
+ {
++ j_config_context_set_verbose(cfc,TRUE);
+ cf = j_config_parse_file_with_context(cfc, filename);
+ j_config_context_free(cfc);
+- }
++ } else {
++ g_warning("Failed to get config context.\n");
++ }
+
+ return(cf);
+ } /* j_config_parse_file() */
+diff -Naur endpoint-0.1.0/src/main.c endpoint-0.1.0.new/src/main.c
+--- endpoint-0.1.0/src/main.c 2003-10-13 15:21:14.000000000 -0700
++++ endpoint-0.1.0.new/src/main.c 2006-02-26 23:44:42.000000000 -0800
+@@ -133,7 +133,7 @@
+
+ if (!app)
+ {
+- /* ERROR MESSAGE */
++ fprintf(stderr,"Failed to parse config file %s.\n",configfile);
+ exit (1);
+ }
+
+@@ -142,7 +142,7 @@
+
+ if (app->ps_len < strlen (MASTER_NAME))
+ {
+- /* ERROR MESSAGE */
++ fprintf(stderr,"Failed strlen(MASTER_NAME).\n");
+ exit (1);
+ }
+
+@@ -152,7 +152,7 @@
+
+ if (!wire_init ())
+ {
+- /* ERROR MESSAGE */
++ fprintf(stderr,"Failed wire_init.\n");
+ exit (1);
+ }
+
diff --git a/sys-block/endpoint/metadata.xml b/sys-block/endpoint/metadata.xml
new file mode 100644
index 000000000000..4272e6c8f629
--- /dev/null
+++ b/sys-block/endpoint/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>base-system</herd>
+ <longdescription lang="en">
+ Endpoint turns a Linux machine with one or more firewire cards into an SBP-2
+ device. The advantage is that you can use any file or device the linux
+ machine supports as storage, and that multiple clients can sit on separate
+ buses so they can get the full bandwidth of the bus.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/sys-block/fio/Manifest b/sys-block/fio/Manifest
new file mode 100644
index 000000000000..4ba9b13b876f
--- /dev/null
+++ b/sys-block/fio/Manifest
@@ -0,0 +1,7 @@
+DIST fio-1.17.2.tar.bz2 1155486 SHA256 1bf40fb709b7e7dbee778139cabae6b70ec6a89a43ddd83450a6b981bf813498 SHA512 99ea0da474f2d23d17a4c8775d1ec0421c020f072e2ccfbf920cbf52edac934e365dac38cdbd15993dfa72dd09b81540b0b9802f1896f031e8682fdfd805ee4b WHIRLPOOL 61da7007e3b591b148f3ffba45c3c1ecf646c47ad08d78c258cdca2906c441285fa0db738e5b0b0113a00ed178d99973b5b380a03690fe5d2e279a361cea0201
+DIST fio-1.99.10.tar.bz2 371892 SHA256 c6af6f685dfaa32c1f5779497f8d1b3dc1e18fc54bf35f0f3bb8120cf4ac2b3a SHA512 23bc2eaeed310d092a84cac06c701ccbe7c4ec45d98323f2e5ab3e4ccbea4b901edf2099dba1aed6fb31254c177228369e5983622a078ac33dc947a532693d87 WHIRLPOOL a4727121239f592f75f1a118f63370ee811c8f8b4396a253debd5ccc8a92641624d6bee65fb9b6c882e5dde41e5144d66457f47fef79942117a1a865f7183075
+DIST fio-2.0.14.tar.bz2 253574 SHA256 4bf01f1d2baf6d4fa905e5489e446e85e01979c427b2c38e2915e039248044e5 SHA512 f58024aeb38026e62cfec5a3ec9ceffb0bd1361a65cf89513a36615aa084974461c7f132ae803d49f02c36d36a6029c52f851e7f8b2cd1c66be0dcdc9fdcf115 WHIRLPOOL cb4812b34a59df41dfc6e293518becfe43515fa228b3dcb1400af987f465d7c1251b9d2645395fb7f2991728a67133bc1f1b0124db88963a1d9b11b29d949e26
+DIST fio-2.0.15.tar.bz2 258773 SHA256 3cc1b5e6c6955f9acad016b4d2ef619061ad9937874c7663e2a29777ed845ac4 SHA512 00289a0404cb44dd670614856932fbdf61cb1508e0eb672e5778c2ba3eba661b82892f7c969e4a82cf4fc487a744eb7411bfebf3b9612863de0197a28787f556 WHIRLPOOL 08b37573b63f812ea62c4ba323f05f510a9656e74f780117bd711bcc78e7fc7b5bef009212e7ec98f0ed153cc3786ece4d75d565845c0bc5eaba59afa1b037d8
+DIST fio-2.1.9.tar.bz2 429122 SHA256 4ae877939a1a1460ad4d93f7891a15bad8ca7295f441204b12c723758a0d4493 SHA512 91913941c0d83705c156eef550eb87b388368804ee722c8c99ea638481ee657960e333c58b54e720034e92c2c34e9a8bb901336399a209a87f5eaa1ad1dfde53 WHIRLPOOL 6f44cbfe601f436b1ed0173e1dfbcf3b342f1a191c947392f0167a2dba9c4806fa422ffaedf9475f83b49fab8832aa1076ba91d27a9f2bdbcae126fa4d708824
+DIST fio-2.2.4.tar.bz2 467312 SHA256 9e1c77216457d9e21e418a55fa28bc1f98c283723fe9dcccff6138e3fb25285b SHA512 91fa0d8f9dd8d950dd26ef5c778414acddd9d6deeb84caeecdfef08df7e00c7972566a76bd242b0d5aea33a7c588aa05cf2fdcd79ef5a475277a2139d1f111a1 WHIRLPOOL 4588601d5f44c1836f97cc223bf08cce3f29f5ea3421880c00a16dcd9e3cffd741bbdd2029518712f8808548469d7f44f1b0348189643419bfd2104eab980536
+DIST fio-2.2.9.tar.bz2 492404 SHA256 c881d9cf15500bd4436970d0467c356c5c021417131587931ba78845e965bf56 SHA512 e0cd26bb8a760ef5e40ddb73246671c1988f0c0886bd24fa510fcab93fe64d8853f120355f55fa109168c7fae0b081f63278f2233644f5ed20da4e4c3cb3f3fc WHIRLPOOL 4f5ada7f1140c7229fc3173fa0582a4ae7401121768d8dec828dcd42c1c22ec828e9c000c482b155ead4fd75ee15c4d7678fc7c6d18c8fbb9c749e83f87a4881
diff --git a/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch b/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch
new file mode 100644
index 000000000000..fa35e27c754e
--- /dev/null
+++ b/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch
@@ -0,0 +1,29 @@
+diff -Nuar fio-2.0.14.orig/arch/arch-x86-common.h fio-2.0.14/arch/arch-x86-common.h
+--- fio-2.0.14.orig/arch/arch-x86-common.h 2013-02-21 18:12:32.000000000 +0000
++++ fio-2.0.14/arch/arch-x86-common.h 2013-03-27 01:48:04.000000000 +0000
+@@ -6,10 +6,24 @@
+ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
+ unsigned int *ecx, unsigned int *edx)
+ {
++#ifdef __PIC__
++ /* 32-bit Hardened GCC (PIC) uses register EBX, so it must be preserved
++ * Fix ported from Gentoo's x86info-1.24-pic patch
++ * http://tuxion.com/2010/07/02/clobber-registers.html */
++ asm volatile(
++ "movl %%ebx,%%edi\n"
++ "cpuid\n"
++ "movl %%ebx,%1\n"
++ "movl %%edi,%%ebx\n"
++ : "=a" (*eax), "=m" (*ebx), "=c" (*ecx), "=d" (*edx)
++ : "0" (*eax), "2" (*ecx)
++ : "memory", "%edi");
++#else
+ asm volatile("cpuid"
+ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+ : "0" (*eax), "2" (*ecx)
+ : "memory");
++#endif
+ }
+
+ static inline void cpuid(unsigned int op,
+
diff --git a/sys-block/fio/files/fio-2.1.10-json.patch b/sys-block/fio/files/fio-2.1.10-json.patch
new file mode 100644
index 000000000000..526be9b76228
--- /dev/null
+++ b/sys-block/fio/files/fio-2.1.10-json.patch
@@ -0,0 +1,32 @@
+From a606a802173272002e37be6475802be8c37481d6 Mon Sep 17 00:00:00 2001
+From: Puthikorn Voravootivat <puthik@chromium.org>
+Date: Tue, 24 Jun 2014 15:59:53 -0700
+Subject: [PATCH] Cast input argument for json_object_add_value_int to long
+ long
+
+The latency related (and some other) variables type is uint32_t
+but the JSON integer type is long long. So we need to cast
+the numbers to long long type to make JSON output correctly.
+
+Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+---
+ json.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/json.h b/json.h
+index 081afd6..962c11c 100644
+--- a/json.h
++++ b/json.h
+@@ -52,7 +52,7 @@ void json_free_object(struct json_object *obj);
+
+ int json_object_add_value_type(struct json_object *obj, const char *name, int type, ...);
+ #define json_object_add_value_int(obj, name, val) \
+- json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (val))
++ json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) (val))
+ #define json_object_add_value_float(obj, name, val) \
+ json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val))
+ #define json_object_add_value_string(obj, name, val) \
+--
+2.0.0
+
diff --git a/sys-block/fio/files/fio-2.2.9-atomic-sync.patch b/sys-block/fio/files/fio-2.2.9-atomic-sync.patch
new file mode 100644
index 000000000000..a8b32022e44b
--- /dev/null
+++ b/sys-block/fio/files/fio-2.2.9-atomic-sync.patch
@@ -0,0 +1,140 @@
+fix from upstream
+
+From 2a2743361cf643b9dd2ba3e491da62e7cb83a101 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@fb.com>
+Date: Mon, 29 Jun 2015 09:34:39 -0600
+Subject: [PATCH] workqueue: make it work on platforms without
+ __sync_fetch_and_add()
+
+Signed-off-by: Jens Axboe <axboe@fb.com>
+---
+ configure | 22 ++++++++++++++++++++++
+ workqueue.c | 22 ++++++++++++++++++++++
+ workqueue.h | 1 +
+ 3 files changed, 45 insertions(+)
+
+diff --git a/configure b/configure
+index e459d63..e5cf34d 100755
+--- a/configure
++++ b/configure
+@@ -271,6 +271,7 @@ CYGWIN*)
+ output_sym "CONFIG_TCP_NODELAY"
+ output_sym "CONFIG_TLS_THREAD"
+ output_sym "CONFIG_IPV6"
++ output_sym "CONFIG_SFA"
+ echo "CC=$CC" >> $config_host_mak
+ echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
+ exit 0
+@@ -1492,6 +1493,24 @@ if compile_prog "" "" "getmntinfo"; then
+ fi
+ echo "getmntinfo $getmntinfo"
+
++##########################################
++# Check whether we have __sync_fetch_and_add()
++sfa=="no"
++cat > $TMPC << EOF
++#include <stdio.h>
++#include <stdlib.h>
++#include <inttypes.h>
++int main(int argc, char **argv)
++{
++ uint64_t dst = 1, src = 3;
++ __sync_fetch_and_add(&dst, src);
++}
++EOF
++if compile_prog "" "" "__sync_fetch_and_add"; then
++ sfa="yes"
++fi
++echo "__sync_fetch_and_add $sfa"
++
+ #############################################################################
+
+ if test "$wordsize" = "64" ; then
+@@ -1671,6 +1690,9 @@ fi
+ if test "$getmntinfo" = "yes" ; then
+ output_sym "CONFIG_GETMNTINFO"
+ fi
++if test "$sfa" = "yes" ; then
++ output_sym "CONFIG_SFA"
++fi
+
+ if test "$zlib" = "no" ; then
+ echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."
+diff --git a/workqueue.c b/workqueue.c
+index b9a967f..8f6963f 100644
+--- a/workqueue.c
++++ b/workqueue.c
+@@ -197,6 +197,7 @@ err:
+ return 1;
+ }
+
++#ifdef CONFIG_SFA
+ static void sum_val(uint64_t *dst, uint64_t *src)
+ {
+ if (*src) {
+@@ -204,15 +205,34 @@ static void sum_val(uint64_t *dst, uint64_t *src)
+ *src = 0;
+ }
+ }
++#else
++static void sum_val(uint64_t *dst, uint64_t *src)
++{
++ if (*src) {
++ *dst += *src;
++ *src = 0;
++ }
++}
++#endif
+
+ static void sum_ddir(struct thread_data *dst, struct thread_data *src,
+ enum fio_ddir ddir)
+ {
++#ifndef CONFIG_SFA
++ pthread_mutex_lock(&dst->io_wq.stat_lock);
++ pthread_mutex_lock(&src->io_wq.stat_lock);
++#endif
++
+ sum_val(&dst->io_bytes[ddir], &src->io_bytes[ddir]);
+ sum_val(&dst->io_blocks[ddir], &src->io_blocks[ddir]);
+ sum_val(&dst->this_io_blocks[ddir], &src->this_io_blocks[ddir]);
+ sum_val(&dst->this_io_bytes[ddir], &src->this_io_bytes[ddir]);
+ sum_val(&dst->bytes_done[ddir], &src->bytes_done[ddir]);
++
++#ifndef CONFIG_SFA
++ pthread_mutex_unlock(&src->io_wq.stat_lock);
++ pthread_mutex_unlock(&dst->io_wq.stat_lock);
++#endif
+ }
+
+ static void update_accounting(struct submit_worker *sw)
+@@ -355,6 +375,7 @@ void workqueue_exit(struct workqueue *wq)
+ free(wq->workers);
+ pthread_mutex_destroy(&wq->flush_lock);
+ pthread_cond_destroy(&wq->flush_cond);
++ pthread_mutex_destroy(&wq->stat_lock);
+ }
+
+ static int start_worker(struct workqueue *wq, unsigned int index)
+@@ -393,6 +414,7 @@ int workqueue_init(struct thread_data *td, struct workqueue *wq,
+ wq->next_free_worker = 0;
+ pthread_cond_init(&wq->flush_cond, NULL);
+ pthread_mutex_init(&wq->flush_lock, NULL);
++ pthread_mutex_init(&wq->stat_lock, NULL);
+
+ wq->workers = calloc(wq->max_workers, sizeof(struct submit_worker));
+
+diff --git a/workqueue.h b/workqueue.h
+index 5d47a5e..4e92449 100644
+--- a/workqueue.h
++++ b/workqueue.h
+@@ -17,6 +17,7 @@ struct workqueue {
+
+ pthread_cond_t flush_cond;
+ pthread_mutex_t flush_lock;
++ pthread_mutex_t stat_lock;
+ volatile int wake_idle;
+ };
+
+--
+2.4.4
+
diff --git a/sys-block/fio/fio-1.17.2.ebuild b/sys-block/fio/fio-1.17.2.ebuild
new file mode 100644
index 000000000000..1c4de44784e2
--- /dev/null
+++ b/sys-block/fio/fio-1.17.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc ppc64 x86"
+IUSE=""
+
+DEPEND="dev-libs/libaio"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ append-flags -W
+ emake CC="$(tc-getCC)" OPTFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" || die "emake install failed"
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+}
diff --git a/sys-block/fio/fio-1.99.10.ebuild b/sys-block/fio/fio-1.99.10.ebuild
new file mode 100644
index 000000000000..03ebe008a57b
--- /dev/null
+++ b/sys-block/fio/fio-1.99.10.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/libaio"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i \
+ -e '/filter /s:-o:$(LDFLAGS) -o:' \
+ -e '/: depend$/d' \
+ Makefile || die
+}
+
+src_compile() {
+ append-flags -W
+ emake CC="$(tc-getCC)" OPTFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" || die "emake install failed"
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+ doman fio.1
+}
diff --git a/sys-block/fio/fio-2.0.14-r1.ebuild b/sys-block/fio/fio-2.0.14-r1.ebuild
new file mode 100644
index 000000000000..47911275f3ad
--- /dev/null
+++ b/sys-block/fio/fio-2.0.14-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic eutils
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ia64 ~ppc ppc64 x86"
+IUSE=""
+
+DEPEND="dev-libs/libaio"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i \
+ -e '/filter /s:-o:$(LDFLAGS) -o:' \
+ -e '/: depend$/d' \
+ -e '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' \
+ Makefile || die
+ epatch "$FILESDIR"/fio-2.0.14-pic-clobber-fix.patch
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ : # not a real configure script
+ ./configure --extra-cflags="${CFLAGS}" --cc="$(tc-getCC)"
+}
+
+src_compile() {
+ append-flags -W
+ emake V=1
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man"
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+ doman fio.1
+}
diff --git a/sys-block/fio/fio-2.0.15.ebuild b/sys-block/fio/fio-2.0.15.ebuild
new file mode 100644
index 000000000000..628d3780dcdd
--- /dev/null
+++ b/sys-block/fio/fio-2.0.15.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic eutils
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Write job files matching the I/O load one wants to simulate"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/libaio"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i \
+ -e '/filter /s:-o:$(LDFLAGS) -o:' \
+ -e '/: depend$/d' \
+ -e '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' \
+ Makefile || die
+ epatch "$FILESDIR"/fio-2.0.14-pic-clobber-fix.patch
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ : # not a real configure script
+ ./configure --extra-cflags="${CFLAGS}" --cc="$(tc-getCC)"
+}
+
+src_compile() {
+ append-flags -W
+ emake V=1
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man"
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+ doman fio.1
+}
diff --git a/sys-block/fio/fio-2.1.9.ebuild b/sys-block/fio/fio-2.1.9.ebuild
new file mode 100644
index 000000000000..07dc69d0fe14
--- /dev/null
+++ b/sys-block/fio/fio-2.1.9.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-r1 toolchain-funcs
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="aio gnuplot gtk numa zlib"
+
+DEPEND="aio? ( dev-libs/libaio )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+ numa? ( sys-process/numactl )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ gnuplot? (
+ sci-visualization/gnuplot
+ ${PYTHON_DEPS}
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' Makefile || die
+ epatch_user
+
+ # Many checks don't have configure flags.
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e '/if compile_prog "" "-lz" "zlib" *; *then/ '"s::if $(usex zlib true false) ; then:" \
+ -e '/if compile_prog "" "-laio" "libaio" ; then/'"s::if $(usex aio true false) ; then:" \
+ configure || die
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ # not a real configure script
+ ./configure \
+ --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
+ --cc="$(tc-getCC)" \
+ $(usex gtk '--enable-gfio' '') \
+ $(usex numa '' '--disable-numa') \
+ || die 'configure failed'
+}
+
+src_compile() {
+ emake V=1 OPTFLAGS=
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
+
+ if use gnuplot ; then
+ python_replicate_script "${ED}/usr/bin/fio2gnuplot"
+ else
+ rm "${ED}"/usr/bin/{fio2gnuplot,fio_generate_plots} || die
+ rm "${ED}"/usr/share/man/man1/{fio2gnuplot,fio_generate_plots}.1 || die
+ rm "${ED}"/usr/share/fio/*.gpm || die
+ rmdir "${ED}"/usr/share/fio/ 2>/dev/null
+ fi
+
+ # This tool has security/parallel issues -- it hardcodes /tmp/template.fio.
+ rm "${ED}"/usr/bin/genfio || die
+
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+}
diff --git a/sys-block/fio/fio-2.2.4-r1.ebuild b/sys-block/fio/fio-2.2.4-r1.ebuild
new file mode 100644
index 000000000000..7294045a024e
--- /dev/null
+++ b/sys-block/fio/fio-2.2.4-r1.ebuild
@@ -0,0 +1,85 @@
+# 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-r1 toolchain-funcs
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="aio glusterfs gnuplot gtk numa rbd rdma zlib"
+
+DEPEND="aio? ( dev-libs/libaio )
+ glusterfs? ( !arm? ( sys-cluster/glusterfs ) )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+ numa? ( sys-process/numactl )
+ rbd? ( sys-cluster/ceph )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ gnuplot? (
+ sci-visualization/gnuplot
+ ${PYTHON_DEPS}
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' Makefile || die
+ epatch_user
+
+ # Many checks don't have configure flags.
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e '/if compile_prog "" "-lz" "zlib" *; *then/ '"s::if $(usex zlib true false) ; then:" \
+ -e '/if compile_prog "" "-laio" "libaio" ; then/'"s::if $(usex aio true false) ; then:" \
+ configure || die
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ # not a real configure script
+ ./configure \
+ --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
+ --cc="$(tc-getCC)" \
+ $(usex glusterfs '' '--disable-gfapi') \
+ $(usex gtk '--enable-gfio' '') \
+ $(usex numa '' '--disable-numa') \
+ $(usex rbd '' '--disable-rbd') \
+ || die 'configure failed'
+}
+
+src_compile() {
+ emake V=1 OPTFLAGS=
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
+
+ if use gnuplot ; then
+ python_replicate_script "${ED}/usr/bin/fio2gnuplot"
+ else
+ rm "${ED}"/usr/bin/{fio2gnuplot,fio_generate_plots} || die
+ rm "${ED}"/usr/share/man/man1/{fio2gnuplot,fio_generate_plots}.1 || die
+ rm "${ED}"/usr/share/fio/*.gpm || die
+ rmdir "${ED}"/usr/share/fio/ 2>/dev/null
+ fi
+
+ # This tool has security/parallel issues -- it hardcodes /tmp/template.fio.
+ rm "${ED}"/usr/bin/genfio || die
+
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+}
diff --git a/sys-block/fio/fio-2.2.9.ebuild b/sys-block/fio/fio-2.2.9.ebuild
new file mode 100644
index 000000000000..8e1c41a0bae8
--- /dev/null
+++ b/sys-block/fio/fio-2.2.9.ebuild
@@ -0,0 +1,86 @@
+# 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-r1 toolchain-funcs
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="aio glusterfs gnuplot gtk numa rbd rdma zlib"
+
+DEPEND="aio? ( dev-libs/libaio )
+ glusterfs? ( !arm? ( sys-cluster/glusterfs ) )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+ numa? ( sys-process/numactl )
+ rbd? ( sys-cluster/ceph )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ gnuplot? (
+ sci-visualization/gnuplot
+ ${PYTHON_DEPS}
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i '/^DEBUGFLAGS/s: -D_FORTIFY_SOURCE=2::g' Makefile || die
+ epatch "${FILESDIR}"/${P}-atomic-sync.patch
+ epatch_user
+
+ # Many checks don't have configure flags.
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e '/if compile_prog "" "-lz" "zlib" *; *then/ '"s::if $(usex zlib true false) ; then:" \
+ -e '/if compile_prog "" "-laio" "libaio" ; then/'"s::if $(usex aio true false) ; then:" \
+ configure || die
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ # not a real configure script
+ ./configure \
+ --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
+ --cc="$(tc-getCC)" \
+ $(usex glusterfs '' '--disable-gfapi') \
+ $(usex gtk '--enable-gfio' '') \
+ $(usex numa '' '--disable-numa') \
+ $(usex rbd '' '--disable-rbd') \
+ || die 'configure failed'
+}
+
+src_compile() {
+ emake V=1 OPTFLAGS=
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
+
+ if use gnuplot ; then
+ python_replicate_script "${ED}/usr/bin/fio2gnuplot"
+ else
+ rm "${ED}"/usr/bin/{fio2gnuplot,fio_generate_plots} || die
+ rm "${ED}"/usr/share/man/man1/{fio2gnuplot,fio_generate_plots}.1 || die
+ rm "${ED}"/usr/share/fio/*.gpm || die
+ rmdir "${ED}"/usr/share/fio/ 2>/dev/null
+ fi
+
+ # This tool has security/parallel issues -- it hardcodes /tmp/template.fio.
+ rm "${ED}"/usr/bin/genfio || die
+
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+}
diff --git a/sys-block/fio/metadata.xml b/sys-block/fio/metadata.xml
new file mode 100644
index 000000000000..76526f751f3b
--- /dev/null
+++ b/sys-block/fio/metadata.xml
@@ -0,0 +1,18 @@
+<?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>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="aio">Enable AIO ioengine</flag>
+ <flag name="glusterfs">Enable GlusterFS gfapi support via <pkg>sys-cluster/glusterfs</pkg></flag>
+ <flag name="gnuplot">Install tools for generating gnuplots</flag>
+ <flag name="numa">Enable numa support</flag>
+ <flag name="rbd">Enable Rados block device support via <pkg>sys-cluster/ceph</pkg></flag>
+ <flag name="rdma">Enable infiniband support via <pkg>sys-infiniband/librdmacm</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-block/fwdl/Manifest b/sys-block/fwdl/Manifest
new file mode 100644
index 000000000000..709ebfd44d10
--- /dev/null
+++ b/sys-block/fwdl/Manifest
@@ -0,0 +1 @@
+DIST fwdl-1.2.3.tar.gz 19452 RMD160 cdab35866680b4b8b08c2dff5d18feb877025274 SHA1 b76a4f91fe2fa9c0ac46d15493d9ea4c8ea3d535 SHA256 8bd7a71dd17b9c9f07df00d5a9ecabdd022aec07b78eb3b9de7325fab689b8ac
diff --git a/sys-block/fwdl/fwdl-1.2.3.ebuild b/sys-block/fwdl/fwdl-1.2.3.ebuild
new file mode 100644
index 000000000000..0959fe65c698
--- /dev/null
+++ b/sys-block/fwdl/fwdl-1.2.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Seagate Fibre-Channel disk firmware upgrade tool"
+HOMEPAGE="http://www.tc.umn.edu/~erick205/Projects/"
+SRC_URI="http://www.tc.umn.edu/~erick205/Projects/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE="debug"
+
+src_prepare() {
+ use debug || { sed -i -e "s/^EXTRA_DEFINES/#\0/" Makefile || die ; }
+}
+
+src_compile() {
+ emake COMPILE_LINUX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dosbin fwdl
+ dodoc CHANGES INSTALL README
+}
diff --git a/sys-block/fwdl/metadata.xml b/sys-block/fwdl/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/fwdl/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/gpart/Manifest b/sys-block/gpart/Manifest
new file mode 100644
index 000000000000..59881a7a306b
--- /dev/null
+++ b/sys-block/gpart/Manifest
@@ -0,0 +1,2 @@
+DIST gpart-0.1h-reiserfs-3.6.patch.gz 3658 RMD160 b049e0ba9d6e1c54877c54ac0d1f12f9f7d235e2 SHA1 4b1042bf0dcf570d2e7ed6bd34f5116879bca7b0 SHA256 769f5587853cb7d9c3ba4d0496bbb57d42d04ad561a42d24bcbe5f4723849a3c
+DIST gpart-0.1h.tar.gz 52352 RMD160 1cdfb1779801ee8755b05975ced24441a3a2b639 SHA1 23f66162e1d85977ea43bfe6b5e5bff0ad2d566e SHA256 b9fdb064efabf5d63d7db6f07605c2fca3d011ecfa05ab3723dd98b9bde3a2ff
diff --git a/sys-block/gpart/files/gpart-0.1h-PIC.patch b/sys-block/gpart/files/gpart-0.1h-PIC.patch
new file mode 100644
index 000000000000..e810bd99960d
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-PIC.patch
@@ -0,0 +1,20 @@
+--- gpart-0.1h/src/l64seek.c
++++ gpart-0.1h/src/l64seek.c
+@@ -26,7 +26,7 @@
+ } ostck[OSTACKLEN];
+ static int osptr = -1;
+
+-#if defined(__linux__) && defined(__i386__)
++#if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+ _syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
+ #endif
+
+@@ -36,7 +36,7 @@
+ {
+ off64_t ret = (off64_t)-1;
+
+-#if defined(__linux__) && defined(__i386__)
++#if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+ int iret;
+ unsigned long ohi, olo;
+
diff --git a/sys-block/gpart/files/gpart-0.1h-errno.patch b/sys-block/gpart/files/gpart-0.1h-errno.patch
new file mode 100644
index 000000000000..13041c20245d
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-errno.patch
@@ -0,0 +1,20 @@
+--- gpart-0.1h/src/l64seek.c
++++ gpart-0.1h-working/src/l64seek.c
+@@ -16,6 +16,7 @@
+
+ #include "l64seek.h"
+
++#include <errno.h>
+
+ #define OSTACKLEN 16
+ static struct
+--- gpart-0.1h/src/disku.c
++++ gpart-0.1h-working/src/disku.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include "gpart.h"
++#include <errno.h>
+
+ #if defined(__linux__)
+ #include <sys/mount.h>
diff --git a/sys-block/gpart/files/gpart-0.1h-l64seek.patch b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
new file mode 100644
index 000000000000..8a14411a5ccc
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
@@ -0,0 +1,71 @@
+--- gpart-0.1h.orig/src/l64seek.c
++++ gpart-0.1h/src/l64seek.c
+@@ -25,30 +25,11 @@
+ } ostck[OSTACKLEN];
+ static int osptr = -1;
+
+-#if defined(__linux__) && defined(__i386__)
+-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
+-#endif
+-
+-
+-
+ off64_t l64seek(int fd,off64_t offset,int whence)
+ {
+ off64_t ret = (off64_t)-1;
+
+-#if defined(__linux__) && defined(__i386__)
+- int iret;
+- unsigned long ohi, olo;
+-
+- ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
+- olo = (unsigned long)(offset & 0xFFFFFFFF);
+- iret = _llseek(fd,ohi,olo,&ret,whence);
+- if (iret == -1)
+- ret = (off64_t)-1;
+-#endif
+-
+-#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
+ ret = lseek(fd,offset,whence);
+-#endif
+
+ return (ret);
+ }
+--- gpart-0.1h.orig/src/l64seek.h
++++ gpart-0.1h/src/l64seek.h
+@@ -17,6 +17,8 @@
+ #ifndef _L64SEEK_H
+ #define _L64SEEK_H
+
++#include <sys/stat.h>
++#include <sys/types.h>
+ #include <unistd.h>
+
+ /*
+@@ -25,19 +27,7 @@
+ * offsets.
+ */
+
+-
+-#if defined(__linux__)
+-# include <linux/unistd.h>
+-# include <sys/types.h>
+- typedef int64_t off64_t;
+-#endif
+-
+-
+-#if defined(__FreeBSD__)
+- typedef off_t off64_t;
+-#endif
+-
+-
++typedef loff_t off64_t;
+ typedef off64_t s64_t;
+
+ off64_t l64seek(int fd, off64_t offset, int whence);
+@@ -45,5 +35,4 @@
+ int l64opush(int);
+ s64_t l64opop(int);
+
+-
+ #endif
diff --git a/sys-block/gpart/files/gpart-0.1h-no-_syscall.patch b/sys-block/gpart/files/gpart-0.1h-no-_syscall.patch
new file mode 100644
index 000000000000..fe68d08b6f4b
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-no-_syscall.patch
@@ -0,0 +1,15 @@
+use syscall() rather than _syscall#()
+
+http://bugs.gentoo.org/163800
+
+--- src/l64seek.c
++++ src/l64seek.c
+@@ -27,7 +27,7 @@
+ static int osptr = -1;
+
+ #if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
++#define _llseek(fd,hi,lo,res,wh) syscall(__NR__llseek,fd,hi,lo,res,wh)
+ #endif
+
+
diff --git a/sys-block/gpart/files/gpart-0.1h-ntfs.patch b/sys-block/gpart/files/gpart-0.1h-ntfs.patch
new file mode 100644
index 000000000000..1f887ac47135
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-ntfs.patch
@@ -0,0 +1,75 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_ntfs.h
++++ gpart-0.1h/src/gm_ntfs.h
+@@ -14,6 +14,9 @@
+ *
+ */
+
++#include <stdint.h>
++#include <asm/byteorder.h>
++
+ #ifndef _GM_NTFS_H
+ #define _GM_NTFS_H
+
+@@ -29,32 +32,38 @@
+ /* 'NTFS' in little endian */
+ #define NTFS_SUPER_MAGIC 0x5346544E
+
+-#if defined(i386) || defined(__i386__) || defined(__alpha__)
+-
+ /* unsigned integral types */
+ #ifndef NTFS_INTEGRAL_TYPES
+ #define NTFS_INTEGRAL_TYPES
+-typedef unsigned char ntfs_u8;
+-typedef unsigned short ntfs_u16;
+-typedef unsigned int ntfs_u32;
+-typedef s64_t ntfs_u64;
++typedef uint8_t ntfs_u8;
++typedef uint16_t ntfs_u16;
++typedef uint32_t ntfs_u32;
++typedef uint64_t ntfs_u64;
++typedef int8_t ntfs_s8;
++typedef int16_t ntfs_s16;
+ #endif /* NTFS_INTEGRAL_TYPES */
+-#endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */
+-
+-
+-/* Macros reading unsigned integers from a byte pointer */
+-/* these should work for all little endian machines */
+-#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
+-#define NTFS_GETU16(p) (*(ntfs_u16*)(p))
+-#define NTFS_GETU24(p) (NTFS_GETU32(p) & 0xFFFFFF)
+-#define NTFS_GETU32(p) (*(ntfs_u32*)(p))
+-#define NTFS_GETU64(p) (*(ntfs_u64*)(p))
+-
+-/* Macros reading signed integers, returning int */
+-#define NTFS_GETS8(p) ((int)(*(char*)(p)))
+-#define NTFS_GETS16(p) ((int)(*(short*)(p)))
+-#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) :
+-
+
++#define CPU_TO_LE16(a) __cpu_to_le16(a)
++#define CPU_TO_LE32(a) __cpu_to_le32(a)
++#define CPU_TO_LE64(a) __cpu_to_le64(a)
++
++#define LE16_TO_CPU(a) __cpu_to_le16(a)
++#define LE32_TO_CPU(a) __cpu_to_le32(a)
++#define LE64_TO_CPU(a) __cpu_to_le64(a)
++
++/* Macros reading unsigned integers */
++#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
++#define NTFS_GETU16(p) ((ntfs_u16)LE16_TO_CPU(*(ntfs_u16*)(p)))
++#define NTFS_GETU24(p) ((ntfs_u32)NTFS_GETU16(p) | \
++ ((ntfs_u32)NTFS_GETU8(((char*)(p)) + 2) << 16))
++#define NTFS_GETU32(p) ((ntfs_u32)LE32_TO_CPU(*(ntfs_u32*)(p)))
++#define NTFS_GETU64(p) ((ntfs_u64)LE64_TO_CPU(*(ntfs_u64*)(p)))
++
++/* Macros reading signed integers */
++#define NTFS_GETS8(p) ((*(ntfs_s8*)(p)))
++#define NTFS_GETS16(p) ((ntfs_s16)LE16_TO_CPU(*(short*)(p)))
++#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? \
++ (int)NTFS_GETU24(p) : \
++ (int)(NTFS_GETU24(p) - 0x1000000))
+
+ #endif /* _GM_NTFS_H */
diff --git a/sys-block/gpart/files/gpart-0.1h-openmode.patch b/sys-block/gpart/files/gpart-0.1h-openmode.patch
new file mode 100644
index 000000000000..ca13cc9420e6
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-openmode.patch
@@ -0,0 +1,11 @@
+--- gpart.orig/src/gpart.c 2008-10-19 15:06:06.000000000 +0000
++++ gpart/src/gpart.c 2008-11-25 07:34:47.000000000 +0000
+@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
+ {
+ int fd, ret = 0;
+
+- if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
++ if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+ return (ret);
+
+ if (write(fd,d->d_pt.t_boot,512) == 512)
diff --git a/sys-block/gpart/files/gpart-0.1h-vfat.patch b/sys-block/gpart/files/gpart-0.1h-vfat.patch
new file mode 100644
index 000000000000..7234ac689831
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-vfat.patch
@@ -0,0 +1,17 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_fat.h
++++ gpart-0.1h/src/gm_fat.h
+@@ -60,6 +60,10 @@
+ __u16 info_sector; /* filesystem info sector */
+ __u16 backup_boot; /* backup boot sector */
+ __u16 reserved2[6]; /* Unused */
+-};
+-
++} __attribute__ ((packed));
++/* "__attribute__ ((packed))"
++ added by davidc@debian.org,
++ as suggested by falk@zxmjz18.extern.uni-tuebingen.de
++ Fri Jul 07 18:04:15 2000
++ in debian bug report #66893 "FAT detection broken on Alpha" */
+ #endif /* _GM_FAT_H */
diff --git a/sys-block/gpart/gpart-0.1h-r1.ebuild b/sys-block/gpart/gpart-0.1h-r1.ebuild
new file mode 100644
index 000000000000..e7c807d33d71
--- /dev/null
+++ b/sys-block/gpart/gpart-0.1h-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Partition table rescue/guessing tool"
+HOMEPAGE="http://www.stud.uni-hannover.de/user/76201/gpart/"
+SRC_URI="http://www.stud.uni-hannover.de/user/76201/gpart/${P}.tar.gz
+ ftp://ftp.namesys.com/pub/misc-patches/gpart-0.1h-reiserfs-3.6.patch.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-amd64 ~hppa x86"
+IUSE=""
+
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-errno.patch
+ epatch "${FILESDIR}"/${P}-vfat.patch
+ epatch "${FILESDIR}"/${P}-ntfs.patch
+ epatch "${FILESDIR}"/${P}-PIC.patch
+ epatch "${FILESDIR}"/${P}-no-_syscall.patch
+ epatch "${WORKDIR}"/gpart-0.1h-reiserfs-3.6.patch
+ sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
+}
+
+src_install() {
+ dobin src/gpart || die
+ doman man/gpart.8
+ dodoc README Changes INSTALL LSM
+}
diff --git a/sys-block/gpart/gpart-0.1h-r2.ebuild b/sys-block/gpart/gpart-0.1h-r2.ebuild
new file mode 100644
index 000000000000..7b1d74272985
--- /dev/null
+++ b/sys-block/gpart/gpart-0.1h-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Partition table rescue/guessing tool"
+HOMEPAGE="http://www.stud.uni-hannover.de/user/76201/gpart/"
+SRC_URI="http://www.stud.uni-hannover.de/user/76201/gpart/${P}.tar.gz
+ ftp://ftp.namesys.com/pub/misc-patches/gpart-0.1h-reiserfs-3.6.patch.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE=""
+
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-errno.patch
+ epatch "${FILESDIR}"/${P}-vfat.patch
+ epatch "${FILESDIR}"/${P}-ntfs.patch
+ epatch "${WORKDIR}"/gpart-0.1h-reiserfs-3.6.patch
+ epatch "${FILESDIR}"/${P}-l64seek.patch
+ epatch "${FILESDIR}"/${P}-openmode.patch
+ sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
+ sed -i -e "/^LDFLAGS/s:=:=${LDFLAGS} :" make.defs
+}
+
+src_install() {
+ dobin src/gpart || die
+ doman man/gpart.8
+ dodoc README Changes INSTALL LSM
+}
diff --git a/sys-block/gpart/metadata.xml b/sys-block/gpart/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/gpart/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/gparted/Manifest b/sys-block/gparted/Manifest
new file mode 100644
index 000000000000..710ee3c55999
--- /dev/null
+++ b/sys-block/gparted/Manifest
@@ -0,0 +1,2 @@
+DIST gparted-0.21.0.tar.bz2 2123932 SHA256 398fc34ce8ffc3b3cfe6b423029646e7c7f40ed1a1bbb737b4d8524bef3565a9 SHA512 038ae6472e2499109559f4c1ed2314556dc3d7b1424a1448b684a1b5625ee6843703eda350d72ed1653d1cd516553a248dc41eee9627f5e4b18aee5bd62d38b1 WHIRLPOOL 778239331bead13e7f9e44e65509f06c057eb9c227ac12a881639153abf9125e21041208408cca8b06706dd64ad924635bb4f93e4a567f1564da1d7709cc5033
+DIST gparted-0.22.0.tar.bz2 2185652 SHA256 aa755e1a6e84c8eaac8b3c44416cbe9c202a4993ceaba22f293d20b83b2d6f27 SHA512 4cc6868dd182e00d1f3afc261009a5ebca81d1b7319f97c9b3c3267c5a11f043bbad644e14245a5c5b342971b2fd7705cbf7b159d8e800f7877de42c30c6581b WHIRLPOOL 4752197e8060dd24852a7c5ad2799cc19e9dde2e6694656392ce0703c6c2da1cfeffd2a3625f8da9ab02fdc3db66cb33608b3c52c9a6d369e0106a367efe7859
diff --git a/sys-block/gparted/files/gparted-pkexec b/sys-block/gparted/files/gparted-pkexec
new file mode 100755
index 000000000000..4405cf42a1ca
--- /dev/null
+++ b/sys-block/gparted/files/gparted-pkexec
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/sbin/gparted" "$@"
diff --git a/sys-block/gparted/files/org.gentoo.pkexec.gparted.policy b/sys-block/gparted/files/org.gentoo.pkexec.gparted.policy
new file mode 100644
index 000000000000..566712ce2b43
--- /dev/null
+++ b/sys-block/gparted/files/org.gentoo.pkexec.gparted.policy
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Gentoo</vendor>
+ <vendor_url>http://www.gentoo.org/</vendor_url>
+
+ <action id="org.gentoo.pkexec.gparted">
+ <message>Authentication is required to run the GParted Partition Editor</message>
+ <icon_name>gparted</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
diff --git a/sys-block/gparted/gparted-0.21.0.ebuild b/sys-block/gparted/gparted-0.21.0.ebuild
new file mode 100644
index 000000000000..6737d8175f32
--- /dev/null
+++ b/sys-block/gparted/gparted-0.21.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Gnome Partition Editor"
+HOMEPAGE="http://gparted.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="btrfs dmraid f2fs fat hfs jfs kde mdadm ntfs policykit reiserfs reiser4 xfs"
+
+# FIXME: add gpart support
+COMMON_DEPEND="
+ >=dev-cpp/glibmm-2.14:2
+ >=dev-cpp/gtkmm-2.22:2.4
+ >=dev-libs/glib-2:2
+ >=sys-block/parted-3.2:=
+"
+RDEPEND="${COMMON_DEPEND}
+ !policykit? (
+ kde? ( kde-apps/kdesu ) )
+ policykit? ( sys-auth/polkit )
+
+ >=sys-apps/util-linux-2.20
+ >=sys-fs/e2fsprogs-1.41
+ btrfs? ( sys-fs/btrfs-progs )
+ dmraid? (
+ >=sys-fs/lvm2-2.02.45
+ sys-fs/dmraid
+ sys-fs/multipath-tools )
+ f2fs? ( sys-fs/f2fs-tools )
+ fat? (
+ sys-fs/dosfstools
+ sys-fs/mtools )
+ hfs? (
+ sys-fs/diskdev_cmds
+ virtual/udev
+ sys-fs/hfsutils )
+ jfs? ( sys-fs/jfsutils )
+ mdadm? ( sys-fs/mdadm )
+ ntfs? ( >=sys-fs/ntfs3g-2011.4.12[ntfsprogs] )
+ reiserfs? ( sys-fs/reiserfsprogs )
+ reiser4? ( sys-fs/reiser4progs )
+ xfs? ( sys-fs/xfsprogs sys-fs/xfsdump )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/gnome-doc-utils
+ app-text/rarian
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i -e 's:Exec=@gksuprog@ :Exec=:' gparted.desktop.in.in || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --enable-doc \
+ --enable-online-resize \
+ GKSUPROG=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+
+ local _ddir="${D}"/usr/share/applications
+
+ if use policykit; then
+ sed -i -e 's:/usr/sbin/gparted %f:gparted-pkexec:' "${_ddir}"/gparted.desktop
+ insinto /usr/share/polkit-1/actions/
+ doins "${FILESDIR}"/org.gentoo.pkexec.gparted.policy
+ dobin "${FILESDIR}"/gparted-pkexec
+ else
+ if use kde; then
+ cp "${_ddir}"/gparted{,-kde}.desktop
+ sed -i -e 's:Exec=:Exec=kdesu :' "${_ddir}"/gparted-kde.desktop
+ echo 'OnlyShowIn=KDE;' >> "${_ddir}"/gparted-kde.desktop
+ fi
+ fi
+}
diff --git a/sys-block/gparted/gparted-0.22.0.ebuild b/sys-block/gparted/gparted-0.22.0.ebuild
new file mode 100644
index 000000000000..222d099531fa
--- /dev/null
+++ b/sys-block/gparted/gparted-0.22.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Gnome Partition Editor"
+HOMEPAGE="http://gparted.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="btrfs dmraid f2fs fat hfs jfs kde mdadm ntfs policykit reiserfs reiser4 xfs"
+
+# FIXME: add gpart support
+COMMON_DEPEND="
+ >=dev-cpp/glibmm-2.14:2
+ >=dev-cpp/gtkmm-2.22:2.4
+ >=dev-libs/glib-2:2
+ >=sys-block/parted-3.2:=
+"
+RDEPEND="${COMMON_DEPEND}
+ !policykit? (
+ kde? ( kde-apps/kdesu ) )
+ policykit? ( sys-auth/polkit )
+
+ >=sys-apps/util-linux-2.20
+ >=sys-fs/e2fsprogs-1.41
+ btrfs? ( sys-fs/btrfs-progs )
+ dmraid? (
+ >=sys-fs/lvm2-2.02.45
+ sys-fs/dmraid
+ sys-fs/multipath-tools )
+ f2fs? ( sys-fs/f2fs-tools )
+ fat? (
+ sys-fs/dosfstools
+ sys-fs/mtools )
+ hfs? (
+ sys-fs/diskdev_cmds
+ virtual/udev
+ sys-fs/hfsutils )
+ jfs? ( sys-fs/jfsutils )
+ mdadm? ( sys-fs/mdadm )
+ ntfs? ( >=sys-fs/ntfs3g-2011.4.12[ntfsprogs] )
+ reiserfs? ( sys-fs/reiserfsprogs )
+ reiser4? ( sys-fs/reiser4progs )
+ xfs? ( sys-fs/xfsprogs sys-fs/xfsdump )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/gnome-doc-utils
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i -e 's:Exec=@gksuprog@ :Exec=:' gparted.desktop.in.in || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --enable-doc \
+ --enable-online-resize \
+ GKSUPROG=$(type -P true)
+}
+
+src_install() {
+ gnome2_src_install
+
+ local _ddir="${D}"/usr/share/applications
+
+ if use policykit; then
+ sed -i -e 's:/usr/sbin/gparted %f:gparted-pkexec:' "${_ddir}"/gparted.desktop
+ insinto /usr/share/polkit-1/actions/
+ doins "${FILESDIR}"/org.gentoo.pkexec.gparted.policy
+ dobin "${FILESDIR}"/gparted-pkexec
+ else
+ if use kde; then
+ cp "${_ddir}"/gparted{,-kde}.desktop
+ sed -i -e 's:Exec=:Exec=kdesu :' "${_ddir}"/gparted-kde.desktop
+ echo 'OnlyShowIn=KDE;' >> "${_ddir}"/gparted-kde.desktop
+ fi
+ fi
+}
diff --git a/sys-block/gparted/metadata.xml b/sys-block/gparted/metadata.xml
new file mode 100644
index 000000000000..e06bfd6639f4
--- /dev/null
+++ b/sys-block/gparted/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <maintainer>
+ <email>eva@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ GParted is the Gnome Partition Editor. It can create, grow, shrink, move and
+ copy various filesystems.
+</longdescription>
+ <longdescription lang="fr">
+ GParted est l'éditeur de partition de Gnome. Il peut créer, redimensionner,
+ déplacer et copier différents systèmes de fichiers.
+</longdescription>
+ <use>
+ <flag name="btrfs">Include Btrfs support (<pkg>sys-fs/btrfs-progs</pkg>)</flag>
+ <flag name="dmraid">Support for dmraid devices, also known as ATA-RAID, or
+ Fake RAID.</flag>
+ <flag name="f2fs">Include F2FS support (<pkg>sys-fs/f2fs-tools</pkg>)
+ </flag>
+ <flag name="fat">Include FAT16/FAT32 support (<pkg>sys-fs/dosfstools</pkg>)
+ </flag>
+ <flag name="hfs">Include HFS support (<pkg>sys-fs/hfsutils</pkg>)</flag>
+ <flag name="jfs">Include JFS support (<pkg>sys-fs/jfsutils</pkg>)</flag>
+ <flag name="mdadm">Support for Linux software RAID.</flag>
+ <flag name="ntfs">Include NTFS support (<pkg>sys-fs/ntfs3g[ntfsprogs]</pkg>)</flag>
+ <flag name="reiser4">Include ReiserFS4 support
+ (<pkg>sys-fs/reiser4progs</pkg>)</flag>
+ <flag name="reiserfs">Include ReiserFS support
+ (<pkg>sys-fs/reiserfsprogs</pkg>)</flag>
+ <flag name="xfs">Include XFS support
+ (<pkg>sys-fs/xfsprogs</pkg>, <pkg>sys-fs/xfsdump</pkg>)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gparted</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/hdrecover/Manifest b/sys-block/hdrecover/Manifest
new file mode 100644
index 000000000000..7369431ea188
--- /dev/null
+++ b/sys-block/hdrecover/Manifest
@@ -0,0 +1 @@
+DIST hdrecover-0.4.tar.gz 85409 SHA256 609a0755dbda744e3dc89bffd1c673fd5c370448aa43e426d90ff35faa74a20d SHA512 280fb7b92172b3f92d358744d093e17462e2b118d2bcd7707cb9e1ceaf89010d565f60d490d8fc247887b6189fc76adbefd8d4aedce452e402d09fdde38a130e WHIRLPOOL 842384aad30072d9ea6ff5ff3991a19664a1d2c349c04310d2083e2b0837066f7d255b475da79521b98735a9fe7c5cd6a5ff750993e2a68872ec64bd458e940e
diff --git a/sys-block/hdrecover/hdrecover-0.4.ebuild b/sys-block/hdrecover/hdrecover-0.4.ebuild
new file mode 100644
index 000000000000..9170a7ec231a
--- /dev/null
+++ b/sys-block/hdrecover/hdrecover-0.4.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="Attempts to recover a hard disk that has bad blocks on it"
+HOMEPAGE="http://hdrecover.sourceforge.net/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_configure() {
+ # we don't want the command to be visible to non-root users.
+ econf --bindir=/usr/sbin
+}
diff --git a/sys-block/hdrecover/metadata.xml b/sys-block/hdrecover/metadata.xml
new file mode 100644
index 000000000000..fb6e5f5de2a8
--- /dev/null
+++ b/sys-block/hdrecover/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>flameeyes@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">hdrecover</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/hpacucli/Manifest b/sys-block/hpacucli/Manifest
new file mode 100644
index 000000000000..096dd390c184
--- /dev/null
+++ b/sys-block/hpacucli/Manifest
@@ -0,0 +1,2 @@
+DIST hpacucli-9.30-15.0.i386.rpm 6405071 SHA256 f1019a4a26c7d9adef1761fafb46b3add3034e77d48efe431bd499bbe5609312 SHA512 f628e5ca1f4e598700aaf8896e310e3ee59705d2ad9eae813179c0e873878b3ab6dd317fb34f738f901eb6972e8f4e9428b57a572dd1f8de73660b1c89213ce1 WHIRLPOOL cc41b16426a4298eafbf200a9c437501c8a2eb2456ca4e9d3f278bed64e203dade4e0de7c94a56e14ef20928a9c292440193c1e98071d9aaa661616c0ad6ea64
+DIST hpacucli-9.30-15.0.x86_64.rpm 6367162 SHA256 d25b4fc593e11e00f2ca2b83417b23d1b1e12e6bff3afcda5333b274dea89901 SHA512 ad53b7452feffc7457220b9f1df8fd435637e7d1d61b42bdaffe75e62c8245a127b7a80435a40ac5675f0a64e14cc9a99fa556dbecb0e37ae70dda51927afd6e WHIRLPOOL 0ba12328989bd5dce8eb5d83377768605f931ca78dd0e534bdbf65c93a17536499a7a9ea77816f4640ec86be8bdb620ae578fa14f7f7542c18ef95ac6efa3d27
diff --git a/sys-block/hpacucli/files/hpacucli-wrapper b/sys-block/hpacucli/files/hpacucli-wrapper
new file mode 100644
index 000000000000..c60c205f9cfc
--- /dev/null
+++ b/sys-block/hpacucli/files/hpacucli-wrapper
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+cmd="$(basename "$0")"
+
+HPACUCLI_BASEDIR="/opt/hp/hpacucli"
+HPACUCLI_LOCKDIR="/var/lock/$cmd"
+HPACUCLI_LOCK="${HPACUCLI_LOCKDIR}/CPQACU_MUTEX"
+HPACUCLI_BIN="${HPACUCLI_BASEDIR}/$cmd.bin"
+
+if pgrep -x "$cmd.bin"; then
+ echo "Another instance of $cmd is running! Stop it first."
+ exit 1
+fi
+
+if ! [ -f "${HPACUCLI_LOCK}" ]; then
+ mkdir -p -m 700 "${HPACUCLI_LOCKDIR}"
+ touch "${HPACUCLI_LOCK}"
+fi
+
+export LD_LIBRARY_PATH="${HPACUCLI_BASEDIR}"
+export ACUXE_LOCK_FILES_DIR="${HPACUCLI_LOCKDIR}/"
+exec setarch `uname -m` --uname-2.6 "${HPACUCLI_BIN}" "${@}"
diff --git a/sys-block/hpacucli/hpacucli-9.30.15.0.ebuild b/sys-block/hpacucli/hpacucli-9.30.15.0.ebuild
new file mode 100644
index 000000000000..f449b5ae6461
--- /dev/null
+++ b/sys-block/hpacucli/hpacucli-9.30.15.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit rpm versionator pax-utils
+
+MY_PV=$(replace_version_separator 2 '-')
+
+SRC_URI_BASE="ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux"
+AMD64_PID="1257348637"
+AMD64_VID="77370"
+X86_PID="414707558"
+X86_VID="77371"
+
+DESCRIPTION="HP Array Configuration Utility Command Line Interface (HPACUCLI, formerly CPQACUXE)"
+HOMEPAGE="http://h18000.www1.hp.com/products/servers/linux/documentation.html"
+SRC_URI="
+ amd64? ( ${SRC_URI_BASE}/p${AMD64_PID}/v${AMD64_VID}/${PN}-${MY_PV}.x86_64.rpm )
+ x86? ( ${SRC_URI_BASE}/p${X86_PID}/v${X86_VID}/${PN}-${MY_PV}.i386.rpm )"
+
+LICENSE="hp-proliant-essentials"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="sys-apps/coreutils
+ sys-process/procps
+ >=sys-apps/util-linux-2.20.1"
+
+S="${WORKDIR}"
+
+HPACUCLI_BASEDIR="/opt/hp/hpacucli"
+QA_PREBUILT="${HPACUCLI_BASEDIR}/*"
+
+src_install() {
+ local MY_S="${S}/opt/compaq/${PN}/bld"
+
+ newsbin "${FILESDIR}"/"${PN}-wrapper" hpacucli
+ dosym /usr/sbin/hpacucli /usr/sbin/hpacuscripting
+
+ exeinto "${HPACUCLI_BASEDIR}"
+ for bin in "${MY_S}"/.hp*; do
+ local basename=$(basename "${bin}")
+ newexe "${bin}" ${basename#.}.bin
+ done
+
+ insinto "${HPACUCLI_BASEDIR}"
+ doins "${MY_S}"/*.so
+
+ dodoc "${MY_S}"/*.txt
+ doman "${S}"/usr/man/man*/*
+
+ cat <<-EOF >"${T}"/45${PN}
+ LDPATH=${HPACUCLI_BASEDIR}
+ EOF
+ doenvd "${T}"/45${PN}
+
+ pax-mark m "${D}/opt/hp/hpacucli/"*
+}
+
+pkg_postinst() {
+ elog
+ elog "For more information regarding this utility, please read"
+ elog "/usr/share/doc/${P}/${PN}-${MY_PV}.noarch.txt"
+ elog
+}
diff --git a/sys-block/hpacucli/metadata.xml b/sys-block/hpacucli/metadata.xml
new file mode 100644
index 000000000000..9981c1918ef7
--- /dev/null
+++ b/sys-block/hpacucli/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>flameeyes@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/iscsitarget/Manifest b/sys-block/iscsitarget/Manifest
new file mode 100644
index 000000000000..9ed01954f52e
--- /dev/null
+++ b/sys-block/iscsitarget/Manifest
@@ -0,0 +1,5 @@
+DIST iscsitarget-0.4.17.tar.gz 107884 SHA256 bc554508174f2657c93ddb0501adad0256d1c6801a3c1ee54ff721bc92ff8778
+DIST iscsitarget-1.4.19.tar.gz 124288 SHA256 a9fc5e43a2806b8aa95513b2af06d97bb9181ef5fedc906d69144d93a86e664a
+DIST iscsitarget-1.4.20.2.tar.gz 138464 SHA256 0f3c8e2c2038fbbd7059d1efdd428260013212daca75c1d56abbeec33cb8d388 SHA512 e9853eb5b954f5cbb43f4ed568ac896616a845f3f9ae57841045f4ef6f6487704d94364cdf48da2c0171aef27aeffa7ca8a4653bfe956486d63578a0d4c32dc6 WHIRLPOOL a24148101fc0abbd19e762ae46b84838027180559e96168efeca2e6fbf355e43cf57219701c58dcab0cdc9b3423601bd066f2a91dae477ab7ff67110c6a63a41
+DIST iscsitarget-1.4.20.2_p20130103.tar.gz 147073 SHA256 ff86e0fc18e8a33b299c8438729613345a50b91f988383fc9cad240cd3f7c1c1 SHA512 7ed706c38a63b696ff344725308a5d476f8fc4ebee71456615274470afed4d9cb2985d0960a9e77d185e267771e6c7ece8707232d42affd11f7de76e0eaf7371 WHIRLPOOL d13a869e14d716558bf15b7291b0987c5561067faafc3af5e0fd0db0126add7fbc0621e53394ca912c55fb6a3aa9ff6d402aca52d18d7087b5c3d594e15021f4
+DIST iscsitarget-1.4.20.2_p20130821.tar.xz 115664 SHA256 e1f5ce48b9c51da98564addc76cd5ae512744d5899991892b7578325ec3f149c SHA512 7dcc0b0f670954f06a0018f4969122b4b264523c82dea25145fdbe25054b18909c5a4cd8b6945cc29dfd7ce8704f3d9df3f4ae23ec334e79da065158ae291fd1 WHIRLPOOL 897f181f9f18dec5ef85c644516200426b09ee5c4c45d0822e831ad7835d294b1af3e7da17544200b56a68c4e800cca6c803a60b4f422a4a61791a6a4cdfe4d5
diff --git a/sys-block/iscsitarget/files/ietd-conf.d b/sys-block/iscsitarget/files/ietd-conf.d
new file mode 100644
index 000000000000..bac2a3f426db
--- /dev/null
+++ b/sys-block/iscsitarget/files/ietd-conf.d
@@ -0,0 +1,30 @@
+# Copyright 1999-2006 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+# Address and port to listen on for connections.
+#ADDRESS="" # set this to non-empty to listen somewhere specific
+PORT=3260
+
+# Address of your SNS server
+# if available
+#ISNS=""
+
+# User and group to run as
+# You must ensure that the UID/GID have access to the files/devices you
+# have provided in your configuration.
+USER="root"
+GROUP="root"
+
+# Debug level - see ietd(8) for the levels
+#DEBUGLEVEL=
+
+# This setting disables the memory configuration warnings.
+# Upstream takes the general policy of forcing all of the memory settings that
+# they want, but that doesn't mesh with users that have it set higher.
+# Gentoo by default ignores the settings that are higher, but issues warnings
+# on those that are lower.
+# Uncomment the next line to disable those warnings.
+#DISABLE_MEMORY_WARNINGS=1
+
+# vim: filetype=gentoo-conf-d tw=72:
diff --git a/sys-block/iscsitarget/files/ietd-init.d-2 b/sys-block/iscsitarget/files/ietd-init.d-2
new file mode 100644
index 000000000000..39b9f8914737
--- /dev/null
+++ b/sys-block/iscsitarget/files/ietd-init.d-2
@@ -0,0 +1,106 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+MEM_SIZE=1048576
+DAEMON=/usr/sbin/ietd
+CONFIG_FILE=/etc/ietd.conf
+PID_FILE=/var/run/ietd.pid
+NAME="iSCSI Enterprise Target"
+
+ARGS=""
+[ -n "$USER" ] && ARGS="${ARGS} --uid=${USER}"
+[ -n "$GROUP" ] && ARGS="${ARGS} --gid=${GROUP}"
+[ -n "$ISNS" ] && ARGS="${ARGS} --isns=${ISNS}"
+[ -n "$PORT" ] && ARGS="${ARGS} --port=${PORT}"
+[ -n "$ADDRESS" ] && ARGS="${ARGS} --address=${ADDRESS}"
+[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} --debug=${DEBUGLEVEL}"
+
+depend() {
+ use net
+ after modules
+}
+checkconfig() {
+ if [ ! -f $CONFIG_FILE ]; then
+ eerror "Config file $CONFIG_FILE does not exist!"
+ return 1
+ fi
+ if [ -z "$DISABLE_MEMORY_WARNINGS" ]; then
+ check_memsize
+ fi
+}
+
+check_memsize() {
+ local wr md sysctl_key v k
+ for wr in r w; do
+ for md in max default; do
+ sysctl_key="net.core.${wr}mem_${md}"
+ v="$(sysctl -n ${sysctl_key})"
+ if [ "${v}" -lt "${MEM_SIZE}" ]; then
+ ewarn "$sysctl_key ($v) is lower than recommended ${MEM_SIZE}"
+ fi
+ done
+ done
+ for wr in "" r w; do
+ sysctl_key="net.ipv4.tcp_${wr}mem"
+ set -- $(sysctl -n ${sysctl_key})
+ for k in min default max ; do
+ if [ "${1}" -lt "${MEM_SIZE}" ]; then
+ ewarn "$sysctl_key:$k (${1}) is lower than recommended ${MEM_SIZE}"
+ fi
+ shift
+ done
+ done
+}
+
+do_modules() {
+ msg="$1"
+ shift
+ modules="$1"
+ shift
+ opts="$@"
+ for m in ${modules}; do
+ ebegin "${msg} - ${m}"
+ modprobe ${opts} $m
+ ret=$?
+ eend $ret
+ [ $ret -ne 0 ] && return $ret
+ done
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ do_modules 'Loading iSCSI-Target modules' 'iscsi_trgt'
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Removing ${NAME} devices"
+ # ugly, but ietadm does not allways provides correct exit values
+ RETURN="$(ietadm --op delete 2>&1)"
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then
+ eend 0
+ else
+ eend 1
+ eerror "ietadm failed - $RETURN"
+ return 1
+ fi
+
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE
+ ret=$?
+ eend $ret
+ [ $ret -ne 0 ] && return 1
+
+ # ugly, but pid file is not removed by ietd
+ rm -f $PID_FILE
+ do_modules 'Removing iSCSI-Target modules' 'iscsi_trgt' '-r'
+ return $?
+}
+
+# vim: tw=72:
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch
new file mode 100644
index 000000000000..47ca031a7469
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch
@@ -0,0 +1,20 @@
+http://bugs.gentoo.org/180619
+
+--- usr/isns.c
++++ usr/isns.c
+@@ -215,13 +215,13 @@
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define set_scn_flag(x) \
+-{ \
++({ \
+ x = (x & 0x55555555) << 1 | (x & 0xaaaaaaaa) >> 1; \
+ x = (x & 0x33333333) << 2 | (x & 0xcccccccc) >> 2; \
+ x = (x & 0x0f0f0f0f) << 4 | (x & 0xf0f0f0f0) >> 4; \
+ x = (x & 0x00ff00ff) << 8 | (x & 0xff00ff00) >> 8; \
+ x = (x & 0x0000ffff) << 16 | (x & 0xffff0000) >> 16; \
+-}
++})
+ #else
+ #define set_scn_flag(x) (x)
+ #endif
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch
new file mode 100644
index 000000000000..1f57afdba42c
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch
@@ -0,0 +1,82 @@
+From 57551cb0529b48411f8f63a002882b7e1cf792f8 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Diego=20E.=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Wed, 25 Mar 2009 16:14:26 +0100
+Subject: [PATCH 1/2] Fix building with Linux kernel 2.6.28 and later.
+
+With changeset 30c40d2c01f68c7eb1a41ab3552bdaf5dbf300d4 of the Linux
+kernel, the functions open_bdev_excl and close_bdev_excl were replaced with
+functionally-equivalent open_bdev_exclusive and close_bdev_exclusive.
+
+The new interface uses fmode_t instead of integer flags to carry on the
+opening mode for a block device, thus require some minor changes in the
+calls.
+---
+ kernel/block-io.c | 22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+diff --git a/kernel/block-io.c b/kernel/block-io.c
+index e4a25f7..af10c7e 100644
+--- a/kernel/block-io.c
++++ b/kernel/block-io.c
+@@ -13,11 +13,18 @@
+ #include <linux/blkdev.h>
+ #include <linux/parser.h>
+ #include <linux/buffer_head.h>
++#include <linux/version.h>
+
+ #include "iscsi.h"
+ #include "iscsi_dbg.h"
+ #include "iotype.h"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28)
++# define HAVE_OPEN_BDEV_EXCLUSIVE 1
++#else
++# define HAVE_OPEN_BDEV_EXCLUSIVE 0
++#endif
++
+ struct blockio_data {
+ char *path;
+ struct block_device *bdev;
+@@ -154,14 +161,22 @@ blockio_open_path(struct iet_volume *volume, const char *path)
+ {
+ struct blockio_data *bio_data = volume->private;
+ struct block_device *bdev;
++#if HAVE_OPEN_BDEV_EXCLUSIVE
++ fmode_t mode = FMODE_READ | ( LUReadonly(volume) ? 0 : FMODE_WRITE );
++#else
+ int flags = LUReadonly(volume) ? MS_RDONLY : 0;
++#endif
+ int err = 0;
+
+ bio_data->path = kstrdup(path, GFP_KERNEL);
+ if (!bio_data->path)
+ return -ENOMEM;
+
++#if HAVE_OPEN_BDEV_EXCLUSIVE
++ bdev = open_bdev_exclusive(path, mode, THIS_MODULE);
++#else
+ bdev = open_bdev_excl(path, flags, THIS_MODULE);
++#endif
+ if (IS_ERR(bdev)) {
+ err = PTR_ERR(bdev);
+ eprintk("Can't open device %s, error %d\n", path, err);
+@@ -323,9 +338,16 @@ static void
+ blockio_detach(struct iet_volume *volume)
+ {
+ struct blockio_data *bio_data = volume->private;
++#if HAVE_OPEN_BDEV_EXCLUSIVE
++ fmode_t mode = FMODE_READ | ( LUReadonly(volume) ? 0 : FMODE_WRITE );
++#endif
+
+ if (bio_data->bdev)
++#if HAVE_OPEN_BDEV_EXCLUSIVE
++ close_bdev_exclusive(bio_data->bdev, mode);
++#else
+ close_bdev_excl(bio_data->bdev);
++#endif
+ kfree(bio_data->path);
+
+ kfree(volume->private);
+--
+1.6.2
+
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch
new file mode 100644
index 000000000000..092fdc3fd9c4
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch
@@ -0,0 +1,40 @@
+From 81373580a641732a7e4610c3d39af0c68007b892 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Wed, 25 Mar 2009 16:14:46 +0100
+Subject: [PATCH 2/2] Fix building with Linux kernel 2.6.29 and later.
+
+When building for Linux 2.6.29 or later, instead of using the NIP6
+macro (that has been removed) use the new %p6 format specifier.
+---
+ kernel/conn.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/kernel/conn.c b/kernel/conn.c
+index f96e2b6..ab561f9 100644
+--- a/kernel/conn.c
++++ b/kernel/conn.c
+@@ -6,6 +6,7 @@
+
+ #include <linux/file.h>
+ #include <linux/ip.h>
++#include <linux/version.h>
+ #include <net/tcp.h>
+
+ #include "iscsi.h"
+@@ -47,8 +48,13 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session)
+ break;
+ case AF_INET6:
+ snprintf(buf, sizeof(buf),
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
++ "[%p6]",
++ &(inet6_sk(sk)->daddr));
++#else
+ "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
+ NIP6(inet6_sk(sk)->daddr));
++#endif
+ break;
+ default:
+ break;
+--
+1.6.2
+
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.30.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.30.patch
new file mode 100644
index 000000000000..fa420e97b375
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.30.patch
@@ -0,0 +1,37 @@
+From cb1b94ffa91d71aba8e07ed018e9f43064e05a49 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Wed, 10 Jun 2009 17:24:02 +0200
+Subject: [PATCH 3/3] Fix building with Linux kernel 2.6.30 and later.
+
+With commit 99b76233803beab302123d243eea9e41149804f3 the proc_dir_entry
+structure does not have an owner any longer, this just removes the
+assignment to make the code build with the newer kernel.
+---
+ kernel/config.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/kernel/config.c b/kernel/config.c
+index d6c4b5e..34681f5 100644
+--- a/kernel/config.c
++++ b/kernel/config.c
+@@ -5,6 +5,7 @@
+ */
+
+ #include <linux/proc_fs.h>
++#include <linux/version.h>
+
+ #include "iscsi.h"
+ #include "iscsi_dbg.h"
+@@ -43,7 +44,9 @@ int iet_procfs_init(void)
+ if (!(proc_iet_dir = proc_mkdir("iet", init_net.proc_net)))
+ goto err;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+ proc_iet_dir->owner = THIS_MODULE;
++#endif
+
+ for (i = 0; i < ARRAY_SIZE(iet_proc_entries); i++) {
+ ent = create_proc_entry(iet_proc_entries[i].name, 0, proc_iet_dir);
+--
+1.6.3.1
+
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch
new file mode 100644
index 000000000000..e984bd3ec374
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch
@@ -0,0 +1,23 @@
+--- usr/Makefile
++++ usr/Makefile
+@@ -1,16 +1,15 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
++CFLAGS ?= -O2 -fno-inline -g
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
++WARNFLAGS = -Wall -Wstrict-prototypes
++CFLAGS += $(WARNFLAGS) -I../include
+ PROGRAMS = ietd ietadm
+-LIBS = -lcrypto
++LDLIBS = -lcrypto
+
+ all: $(PROGRAMS)
+
+ ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o
+
+- $(CC) $^ -o $@ $(LIBS)
+-
+ ietadm: ietadm.o param.o
+- $(CC) $^ -o $@
+
+ clean:
+ rm -f *.o $(PROGRAMS)
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch
new file mode 100644
index 000000000000..f139e732e7de
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch
@@ -0,0 +1,42 @@
+From 43227c1624e919efcd0cd035516c1776be55ac08 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Sun, 18 Oct 2009 12:41:28 +0200
+Subject: [PATCH] Fix building with Linux kernel 2.6.32 and later.
+
+With commit 18f2ee705d98034b0f229a3202d827468d4bffd9 of the Linux kernel,
+the sync_page_range() function has been removed.
+
+This patch changes it to filemap_write_and_wait_range() as done for the XFS
+driver in the kernel (commit af0f4414f343429971d33b0dd8dccc85c1f3dcd2).
+---
+ kernel/file-io.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/kernel/file-io.c b/kernel/file-io.c
+index dbf7b1c..e4c3fea 100644
+--- a/kernel/file-io.c
++++ b/kernel/file-io.c
+@@ -8,6 +8,7 @@
+ #include <linux/blkdev.h>
+ #include <linux/parser.h>
+ #include <linux/writeback.h>
++#include <linux/version.h>
+
+ #include "iscsi.h"
+ #include "iscsi_dbg.h"
+@@ -88,7 +89,12 @@ static int fileio_sync(struct iet_volume *lu, struct tio *tio)
+ count = lu->blk_cnt << lu->blk_shift;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
+ res = sync_page_range(inode, mapping, ppos, count);
++#else
++ res = filemap_write_and_wait_range(mapping, ppos,
++ ppos + count -1);
++#endif
+ if (res) {
+ eprintk("I/O error: syncing pages failed: %d\n", res);
+ return -EIO;
+--
+1.6.5
+
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.19+linux-2.6.33.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.19+linux-2.6.33.patch
new file mode 100644
index 000000000000..3c2e4e426282
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.19+linux-2.6.33.patch
@@ -0,0 +1,12 @@
+diff -p -up iscsitarget-1.4.19-1mdv2010.1/kernel/conn.c.2.6.33 iscsitarget-1.4.19-1mdv2010.1/kernel/conn.c
+--- iscsitarget-1.4.19-1mdv2010.1/kernel/conn.c.2.6.33 2010-02-21 13:07:29.000000000 +0100
++++ iscsitarget-1.4.19-1mdv2010.1/kernel/conn.c 2010-02-21 13:41:38.641365087 +0100
+@@ -43,7 +43,7 @@ void conn_info_show(struct seq_file *seq
+ switch (sk->sk_family) {
+ case AF_INET:
+ snprintf(buf, sizeof(buf),
+- "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
++ "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
+ break;
+ case AF_INET6:
+ snprintf(buf, sizeof(buf), "[%pI6]",
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags-v2.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags-v2.patch
new file mode 100644
index 000000000000..b675afff08ae
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags-v2.patch
@@ -0,0 +1,10 @@
+Index: usr/Makefile
+===================================================================
+--- usr/Makefile (revision 446)
++++ usr/Makefile (working copy)
+@@ -1,4 +1,4 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -I../include
++CFLAGS += -fno-inline -Wall -Wstrict-prototypes -I../include
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
+ PROGRAMS = ietd ietadm
+ LIBS =
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch
new file mode 100644
index 000000000000..347650ab9407
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch
@@ -0,0 +1,32 @@
+--- a/Makefile
++++ b/Makefile
+@@ -26,7 +26,7 @@
+ endif
+ endif
+
+-KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | \
++KVER := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -E -dM $(VERSION_FILE) | \
+ grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
+
+ KMOD := /lib/modules/$(KVER)/extra
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -1,4 +1,4 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
++CFLAGS += -fno-inline -Wall -Wstrict-prototypes -I../include
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
+ PROGRAMS = ietd ietadm
+ LIBS =
+@@ -7,10 +7,10 @@
+
+ ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o md5.o sha1.o
+
+- $(CC) $^ -o $@ $(LIBS)
++ $(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ ietadm: ietadm.o param.o
+- $(CC) $^ -o $@
++ $(CC) $(LDFLAGS) $^ -o $@
+
+ clean:
+ rm -f *.o $(PROGRAMS)
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_kernel-2.6.36.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_kernel-2.6.36.patch
new file mode 100644
index 000000000000..63c50b093368
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_kernel-2.6.36.patch
@@ -0,0 +1,12 @@
+--- trunk/kernel/conn.c (revision 372)
++++ trunk/kernel/conn.c (working copy)
+@@ -44,7 +44,7 @@
+ switch (sk->sk_family) {
+ case AF_INET:
+ snprintf(buf, sizeof(buf),
+- "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
++ "%pI4", inet_sk(sk)->inet_daddr);
+ break;
+ case AF_INET6:
+ snprintf(buf, sizeof(buf), "[%pI6]",
+
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch
new file mode 100644
index 000000000000..d41751535d31
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch
@@ -0,0 +1,135 @@
+diff --git a/Makefile b/Makefile
+index df41642..f2f17c8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -46,18 +46,10 @@ kver_lt = $(shell [ $(KMAJ) -lt $(1) -o \
+ $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \
+ $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -lt $(3) ] && \
+ echo 1 || echo 0)
+-kver_le = $(shell [ $(KMAJ) -lt $(1) -o \
+- $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \
+- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -le $(3) ] && \
+- echo 1 || echo 0)
+-kver_gt = $(shell [ ( $(KMAJ) -gt $(1) ) -o \
++kver_gt = $(shell [ $(KMAJ) -gt $(1) -o \
+ $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \
+ $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -gt $(3) ] && \
+ echo 1 || echo 0)
+-kver_ge = $(shell [ ( $(KMAJ) -gt $(1) ) -o \
+- $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \
+- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -ge $(3) ] && \
+- echo 1 || echo 0)
+ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0)
+
+ #
+@@ -66,85 +58,93 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0)
+ # base first the earlier patch sets will not need to be modified.
+ #
+
+-ifeq ($(call kver_le,3,5,0),1)
++ifeq ($(call kver_lt,3,6,0),1)
+ PATCHES := $(PATCHES) compat-3.5.patch
+ endif
+
+-ifeq ($(call kver_le,3,4,0),1)
++ifeq ($(call kver_lt,3,5,0),1)
+ PATCHES := $(PATCHES) compat-3.2-3.4.patch
+ endif
+
+-ifeq ($(call kver_le,3,2,0),1)
++ifeq ($(call kver_lt,3,3,0),1)
+ PATCHES := $(PATCHES) compat-2.6.39-3.2.patch
+ endif
+
+-ifeq ($(call kver_le,2,6,38),1)
++ifeq ($(call kver_lt,2,6,39),1)
+ PATCHES := $(PATCHES) compat-2.6.38.patch
+ endif
+
+-ifeq ($(call kver_le,2,6,37),1)
++ifeq ($(call kver_lt,2,6,38),1)
+ PATCHES := $(PATCHES) compat-2.6.36-2.6.37.patch
+ endif
+
+ # Compatibility patch for kernels > 2.6.32 <= 2.6.35
+-ifeq ($(call kver_le,2,6,35),1)
++ifeq ($(call kver_lt,2,6,36),1)
++ifeq ($(call kver_gt,2,6,32),1)
+ PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch
+ endif
++endif
+
+ # Compatibility patch for kernels <= 2.6.32
+-ifeq ($(call kver_le,2,6,32),1)
++ifeq ($(call kver_lt,2,6,33),1)
+ PATCHES := $(PATCHES) compat-2.6.32.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.31
+-ifeq ($(call kver_le,2,6,31),1)
++ifeq ($(call kver_lt,2,6,32),1)
+ PATCHES := $(PATCHES) compat-2.6.31.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.30
+-ifeq ($(call kver_le,2,6,30),1)
++ifeq ($(call kver_lt,2,6,31),1)
+ PATCHES := $(PATCHES) compat-2.6.30.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.29
+-ifeq ($(call kver_le,2,6,29),1)
++ifeq ($(call kver_lt,2,6,30),1)
+ PATCHES := $(PATCHES) compat-2.6.29.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.28
+-ifeq ($(call kver_le,2,6,28),1)
++ifeq ($(call kver_lt,2,6,29),1)
+ PATCHES := $(PATCHES) compat-2.6.28.patch
+ endif
+
+ # Compatibility patch for kernels >= 2.6.25 and <= 2.6.27
+-ifeq ($(call kver_le,2,6,27),1)
++ifeq ($(call kver_lt,2,6,28),1)
++ifeq ($(call kver_gt,2,6,24),1)
+ PATCHES := $(PATCHES) compat-2.6.25-2.6.27.patch
+ endif
++endif
+
+ # Compatibility patch for kernels <= 2.6.24
+-ifeq ($(call kver_le,2,6,24),1)
++ifeq ($(call kver_lt,2,6,25),1)
+ PATCHES := $(PATCHES) compat-2.6.24.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.23
+-ifeq ($(call kver_le,2,6,23),1)
++ifeq ($(call kver_lt,2,6,24),1)
+ PATCHES := $(PATCHES) compat-2.6.23.patch
+ endif
+
+ # Compatibility patch for kernels <= 2.6.22
+-ifeq ($(call kver_le,2,6,22),1)
++ifeq ($(call kver_lt,2,6,23),1)
+ PATCHES := $(PATCHES) compat-2.6.22.patch
+ endif
+
+ # Compatibility patch for kernels >= 2.6.19 and <= 2.6.21
+-ifeq ($(call kver_le,2,6,21),1)
++ifeq ($(call kver_lt,2,6,22),1)
++ifeq ($(call kver_gt,2,6,18),1)
+ PATCHES := $(PATCHES) compat-2.6.19-2.6.21.patch
+ endif
++endif
+
+ # Compatibility patch for kernels >= 2.6.14 and <= 2.6.18
+-ifeq ($(call kver_le,2,6,18),1)
++ifeq ($(call kver_lt,2,6,19),1)
++ifeq ($(call kver_gt,2,6,13),1)
+ PATCHES := $(PATCHES) compat-2.6.14-2.6.18.patch
+ endif
++endif
+
+ # We don't support kernels < 2.6.14 except for explicit distros
+ ifeq ($(call kver_lt,2,6,14),1)
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch
new file mode 100644
index 000000000000..cc6a0b8c7e3c
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch
@@ -0,0 +1,96 @@
+diff --git a/kernel/iscsi.c b/kernel/iscsi.c
+index 9ad3047..37d7753 100644
+--- a/kernel/iscsi.c
++++ b/kernel/iscsi.c
+@@ -773,6 +773,7 @@ static void set_offset_and_length(const struct iet_volume *lu,
+ break;
+ case READ_16:
+ case WRITE_16:
++#ifdef WRITE_SAME_16
+ case WRITE_SAME_16:
+ *off = (u64)cmd[2] << 56 | (u64)cmd[3] << 48 |
+ (u64)cmd[4] << 40 | (u64)cmd[5] << 32 |
+@@ -781,6 +782,7 @@ static void set_offset_and_length(const struct iet_volume *lu,
+ *len = (u32)cmd[10] << 24 | (u32)cmd[11] << 16 |
+ (u32)cmd[12] << 8 | (u32)cmd[13];
+ break;
++#endif
+ case PERSISTENT_RESERVE_OUT:
+ {
+ const struct persistent_reserve_out *pr_out =
+@@ -1036,6 +1038,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req)
+ case WRITE_10:
+ case WRITE_16:
+ case WRITE_VERIFY:
++#ifdef WRITE_SAME_16
+ case WRITE_SAME_16:
+ {
+ struct iscsi_sess_param *param = &conn->session->param;
+@@ -1104,6 +1107,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req)
+ }
+ break;
+ }
++#endif
+ error:
+ default:
+ eprintk("Unsupported %x\n", req_hdr->scb[0]);
+diff --git a/kernel/iscsi_dbg.h b/kernel/iscsi_dbg.h
+index 8c9b928..ad5c6d4 100644
+--- a/kernel/iscsi_dbg.h
++++ b/kernel/iscsi_dbg.h
+@@ -12,7 +12,9 @@
+ #define D_IOMODE (1UL << 8)
+ #define D_UAC (1UL << 9)
+ #define D_PR (1UL << 10)
++#ifdef WRITE_SAME_16
+ #define D_VAAI (1UL << 11)
++#endif
+
+ #define D_DATA (D_READ | D_WRITE)
+
+diff --git a/kernel/target_disk.c b/kernel/target_disk.c
+index 6b1de2c..ca28e4e 100644
+--- a/kernel/target_disk.c
++++ b/kernel/target_disk.c
+@@ -408,6 +408,7 @@ static void build_write_response(struct iscsi_cmnd *cmnd)
+ iscsi_cmnd_set_sense(cmnd, MEDIUM_ERROR, 0x03, 0x0);
+ }
+
++#ifdef WRITE_SAME_16
+ static void build_write_same_response(struct iscsi_cmnd *cmnd) {
+ int err;
+ struct tio *target_tio;
+@@ -475,6 +476,7 @@ static void build_write_same_response(struct iscsi_cmnd *cmnd) {
+
+ tio_put(target_tio);
+ }
++#endif
+
+ static void build_sync_cache_response(struct iscsi_cmnd *cmnd)
+ {
+@@ -618,9 +620,11 @@ static int disk_execute_cmnd(struct iscsi_cmnd *cmnd)
+ case WRITE_VERIFY:
+ send_scsi_rsp(cmnd, build_write_response);
+ break;
++#ifdef WRITE_SAME_16
+ case WRITE_SAME_16:
+ send_scsi_rsp(cmnd, build_write_same_response);
+ break;
++#endif
+ case SYNCHRONIZE_CACHE:
+ send_scsi_rsp(cmnd, build_sync_cache_response);
+ break;
+diff --git a/kernel/volume.c b/kernel/volume.c
+index 8beeb1e..6ad2a3d 100644
+--- a/kernel/volume.c
++++ b/kernel/volume.c
+@@ -446,7 +446,9 @@ int is_volume_reserved(struct iet_volume *volume, u64 sid, u8 *scb)
+ case WRITE_10:
+ case WRITE_12:
+ case WRITE_16:
++#ifdef WRITE_SAME_16
+ case WRITE_SAME_16:
++#endif
+ case WRITE_VERIFY:
+ case SYNCHRONIZE_CACHE:
+ if (write_excl || excl_access)
diff --git a/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild
new file mode 100644
index 000000000000..1eb351bdd7c6
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-mod eutils flag-o-matic
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+CONFIG_CHECK="CRYPTO_CRC32C"
+ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619
+ epatch "${FILESDIR}"/${PN}-0.4.17-build.patch
+ epatch "${FILESDIR}"/${PN}-0.4.17+linux-2.6.28.patch #252608
+ epatch "${FILESDIR}"/${PN}-0.4.17+linux-2.6.29.patch
+ epatch "${FILESDIR}"/${PN}-0.4.17+linux-2.6.30.patch
+ convert_to_m "${S}"/Makefile
+}
+
+src_compile() {
+ emake usr || die "failed to build userspace"
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module"
+}
+
+src_install() {
+ einfo "Installing userspace"
+ dosbin usr/ietd usr/ietadm || die "dosbin failed"
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed"
+ # Upstream's provided Gentoo init script is out of date compared to
+ # their Debian init script. And isn't that nice.
+ #newinitd etc/initd/initd.gentoo ietd || die
+ newinitd "${FILESDIR}"/ietd-init.d-2 ietd || die "newinitd failed"
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed"
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny}
+
+ doman doc/manpages/*.[1-9] || die "manpages failed"
+ dodoc ChangeLog README || die "docs failed"
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die "modules failed"
+}
diff --git a/sys-block/iscsitarget/iscsitarget-1.4.19.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.19.ebuild
new file mode 100644
index 000000000000..fb1b1a6b2a73
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-1.4.19.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-mod eutils flag-o-matic
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+CONFIG_CHECK="CRYPTO_CRC32C"
+ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619
+ epatch "${FILESDIR}"/${PN}-0.4.17-build.patch
+ epatch "${FILESDIR}"/${PN}-1.4.18+linux-2.6.32.patch
+ if kernel_is ge 2 6 33; then
+ epatch "${FILESDIR}"/${PN}-1.4.19+linux-2.6.33.patch
+ fi
+ convert_to_m "${S}"/Makefile
+}
+
+src_compile() {
+ emake KSRC="${KERNEL_DIR}" usr || die "failed to build userspace"
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module"
+}
+
+src_install() {
+ einfo "Installing userspace"
+
+ # Install ietd into libexec; we don't need ietd to be in the path
+ # for ROOT, since it's just a service.
+ exeinto /usr/libexec
+ doexe usr/ietd || die "doexe ietd failed"
+
+ dosbin usr/ietadm || die "dosbin failed"
+
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.allow || die "doins failed"
+
+ # We moved ietd in /usr/libexec, so update the init script accordingly.
+ sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d
+ newinitd "${T}"/ietd-init.d ietd || die "newinitd failed"
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed"
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny}
+
+ doman doc/manpages/*.[1-9] || die "manpages failed"
+ dodoc ChangeLog README RELEASE_NOTES README.initiators README.vmware || die "docs failed"
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die "modules failed"
+}
diff --git a/sys-block/iscsitarget/iscsitarget-1.4.20.2.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.20.2.ebuild
new file mode 100644
index 000000000000..fcfa6e15b4d6
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-1.4.20.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-mod eutils flag-o-matic
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+CONFIG_CHECK="CRYPTO_CRC32C"
+ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619
+ # Respect LDFLAGS. Bug #350742
+ epatch "${FILESDIR}"/${P}-respect-flags.patch
+ # NIPQUAD removed in 2.6.36, #340449
+ if kernel_is ge 2 6 36; then
+ epatch "${FILESDIR}"/iscsitarget-1.4.20.2_kernel-2.6.36.patch
+ fi
+ convert_to_m "${S}"/Makefile
+}
+
+src_compile() {
+ emake KSRC="${KERNEL_DIR}" usr || die
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die
+}
+
+src_install() {
+ einfo "Installing userspace"
+
+ # Install ietd into libexec; we don't need ietd to be in the path
+ # for ROOT, since it's just a service.
+ exeinto /usr/libexec
+ doexe usr/ietd || die
+
+ dosbin usr/ietadm || die
+
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.allow || die
+
+ # We moved ietd in /usr/libexec, so update the init script accordingly.
+ sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d
+ newinitd "${T}"/ietd-init.d ietd || die
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.allow
+
+ doman doc/manpages/*.[1-9] || die
+ dodoc ChangeLog README RELEASE_NOTES README.initiators README.vmware || die
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die
+}
diff --git a/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild
new file mode 100644
index 000000000000..75c1bae0e40d
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit linux-mod eutils flag-o-matic
+
+if [ ${PV} == "9999" ] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.code.sf.net/p/iscsitarget/code/trunk"
+else
+ SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+fi
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+
+pkg_setup() {
+ CONFIG_CHECK="CRYPTO_CRC32C"
+ ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+ kernel_is ge 2 6 14 || die "Linux 2.6.14 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 6 || die "Linux 3.6 is the latest supported version."; }
+
+ linux-mod_pkg_setup
+}
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Fix build system to apply proper patches
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-fix-3.2-support.patch"
+
+ # Respect LDFLAGS. Bug #365735
+ epatch "${FILESDIR}/${PN}-1.4.20.2-respect-flags-v2.patch"
+
+ # Avoid use of WRITE_SAME_16 in Linux 2.6.32 and earlier
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch"
+ fi
+
+ # Apply kernel-specific patches
+ emake KSRC="${KERNEL_DIR}" patch || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake KSRC="${KERNEL_DIR}" usr || die
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die
+}
+
+src_install() {
+ einfo "Installing userspace"
+
+ # Install ietd into libexec; we don't need ietd to be in the path
+ # for ROOT, since it's just a service.
+ exeinto /usr/libexec
+ doexe usr/ietd || die
+
+ dosbin usr/ietadm || die
+
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.allow || die
+
+ # We moved ietd in /usr/libexec, so update the init script accordingly.
+ sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d
+ newinitd "${T}"/ietd-init.d ietd || die
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.allow
+
+ doman doc/manpages/*.[1-9] || die
+ dodoc ChangeLog README RELEASE_NOTES README.initiators README.mcs README.vmware || die
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die
+}
diff --git a/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130821.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130821.ebuild
new file mode 100644
index 000000000000..47386548e4dd
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130821.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit linux-mod eutils flag-o-matic
+
+if [ ${PV} == "9999" ] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.code.sf.net/p/iscsitarget/code/trunk"
+else
+ SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.xz"
+ KEYWORDS="amd64 ~ppc x86"
+fi
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+
+pkg_setup() {
+ CONFIG_CHECK="CRYPTO_CRC32C"
+ ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+ kernel_is ge 2 6 14 || die "Linux 2.6.14 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 11 || die "Linux 3.11 is the latest supported version."; }
+
+ linux-mod_pkg_setup
+}
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Fix build system to apply proper patches
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-fix-3.2-support.patch"
+
+ # Respect LDFLAGS. Bug #365735
+ epatch "${FILESDIR}/${PN}-1.4.20.2-respect-flags-v2.patch"
+
+ # Avoid use of WRITE_SAME_16 in Linux 2.6.32 and earlier
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch"
+ fi
+
+ # Apply kernel-specific patches
+ emake KSRC="${KERNEL_DIR}" patch || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake KSRC="${KERNEL_DIR}" usr || die
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die
+}
+
+src_install() {
+ einfo "Installing userspace"
+
+ # Install ietd into libexec; we don't need ietd to be in the path
+ # for ROOT, since it's just a service.
+ exeinto /usr/libexec
+ doexe usr/ietd || die
+
+ dosbin usr/ietadm || die
+
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.allow || die
+
+ # We moved ietd in /usr/libexec, so update the init script accordingly.
+ sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d
+ newinitd "${T}"/ietd-init.d ietd || die
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.allow
+
+ doman doc/manpages/*.[1-9] || die
+ dodoc ChangeLog README RELEASE_NOTES README.initiators README.mcs README.vmware || die
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die
+}
diff --git a/sys-block/iscsitarget/iscsitarget-9999.ebuild b/sys-block/iscsitarget/iscsitarget-9999.ebuild
new file mode 100644
index 000000000000..fe90194e9fdf
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-9999.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit linux-mod eutils flag-o-matic
+
+if [ ${PV} == "9999" ] ; then
+ inherit subversion
+ ESVN_REPO_URI="http://svn.code.sf.net/p/iscsitarget/code/trunk"
+else
+ SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.xz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+fi
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)"
+
+pkg_setup() {
+ CONFIG_CHECK="CRYPTO_CRC32C"
+ ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+ kernel_is ge 2 6 14 || die "Linux 2.6.14 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 11 || die "Linux 3.11 is the latest supported version."; }
+
+ linux-mod_pkg_setup
+}
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Fix build system to apply proper patches
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-fix-3.2-support.patch"
+
+ # Respect LDFLAGS. Bug #365735
+ epatch "${FILESDIR}/${PN}-1.4.20.2-respect-flags-v2.patch"
+
+ # Avoid use of WRITE_SAME_16 in Linux 2.6.32 and earlier
+ epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch"
+ fi
+
+ # Apply kernel-specific patches
+ emake KSRC="${KERNEL_DIR}" patch || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake KSRC="${KERNEL_DIR}" usr || die
+
+ unset ARCH
+ filter-ldflags -Wl,*
+ emake KSRC="${KERNEL_DIR}" kernel || die
+}
+
+src_install() {
+ einfo "Installing userspace"
+
+ # Install ietd into libexec; we don't need ietd to be in the path
+ # for ROOT, since it's just a service.
+ exeinto /usr/libexec
+ doexe usr/ietd || die
+
+ dosbin usr/ietadm || die
+
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.allow || die
+
+ # We moved ietd in /usr/libexec, so update the init script accordingly.
+ sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d
+ newinitd "${T}"/ietd-init.d ietd || die
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.allow
+
+ doman doc/manpages/*.[1-9] || die
+ dodoc ChangeLog README RELEASE_NOTES README.initiators README.mcs README.vmware || die
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die
+}
diff --git a/sys-block/iscsitarget/metadata.xml b/sys-block/iscsitarget/metadata.xml
new file mode 100644
index 000000000000..630808c221b3
--- /dev/null
+++ b/sys-block/iscsitarget/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <maintainer>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/kvpm/Manifest b/sys-block/kvpm/Manifest
new file mode 100644
index 000000000000..c5595f419d5f
--- /dev/null
+++ b/sys-block/kvpm/Manifest
@@ -0,0 +1,2 @@
+DIST kvpm-0.9.8.tar.gz 1311649 SHA256 9b2b75d79c44b266b20a08dfae0946e2af2e058cb4a9479f133fd1c6570e2c33 SHA512 9597dfa9e83160d3ac062ae6f7b7d8ba8344320c884d22a5c269a93ced4b5c6d2bb797a6d659a0200451b676a73a20792cc2e084fb79dbf3b05946385cb9e9d5 WHIRLPOOL 628e59f716e58a9081a25e20ba88e254199b323d0b2ac4519d39151bd1b9543a97ad609f44d4b31ac011331031ef4c85e75984c722b37bac7f84ad55cb9ee7c9
+DIST kvpm-0.9.9.tar.gz 1309747 SHA256 97f4a2f0632f9df7a9e3731c93088ba0725d942838603cdb4a4cba53c1c02604 SHA512 54ba626dd93fc6908fb08abd5c6c8c0614caf67c5abf3234e4a2ad39d0d37d2f2789a7bf222b17c806920633e1f8880f775f13138c6646166755ecd109fb63ca WHIRLPOOL da932b813055278d87377f98895ce3c4eec62e78b53a59642602d8f0b53bdb4bbb681297eecea7d187b2044342ad0e18aff8d9d0113972f7f1c8d3f1ef19899a
diff --git a/sys-block/kvpm/kvpm-0.9.8.ebuild b/sys-block/kvpm/kvpm-0.9.8.ebuild
new file mode 100644
index 000000000000..65a1b06adde5
--- /dev/null
+++ b/sys-block/kvpm/kvpm-0.9.8.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_DOC_DIRS="docbook"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE frontend for Linux LVM2 and GNU parted"
+HOMEPAGE="http://kvpm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ sys-apps/util-linux
+ >=sys-block/parted-2.3
+ >=sys-fs/lvm2-2.02.98
+"
+DEPEND="${RDEPEND}"
diff --git a/sys-block/kvpm/kvpm-0.9.9.ebuild b/sys-block/kvpm/kvpm-0.9.9.ebuild
new file mode 100644
index 000000000000..65a1b06adde5
--- /dev/null
+++ b/sys-block/kvpm/kvpm-0.9.9.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_DOC_DIRS="docbook"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE frontend for Linux LVM2 and GNU parted"
+HOMEPAGE="http://kvpm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ sys-apps/util-linux
+ >=sys-block/parted-2.3
+ >=sys-fs/lvm2-2.02.98
+"
+DEPEND="${RDEPEND}"
diff --git a/sys-block/kvpm/metadata.xml b/sys-block/kvpm/metadata.xml
new file mode 100644
index 000000000000..deeb517dba44
--- /dev/null
+++ b/sys-block/kvpm/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>kde</herd>
+ <upstream>
+ <remote-id type="sourceforge">kvpm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/lio-utils/files/snmp-makefile.patch b/sys-block/lio-utils/files/snmp-makefile.patch
new file mode 100644
index 000000000000..f9301ae7912b
--- /dev/null
+++ b/sys-block/lio-utils/files/snmp-makefile.patch
@@ -0,0 +1,22 @@
+--- mib-modules/Makefile.old 2011-06-21 00:26:30.000000000 +0400
++++ mib-modules/Makefile 2011-06-21 00:29:28.000000000 +0400
+@@ -18,8 +18,8 @@
+ iscsiAuthData.o
+
+ CC = gcc
+-CFLAGS = -I$(INCLDIR) -I$(INCLDIR)/agent -I$(INCLDIR)/agent/mibgroup -shared -fPIC
+-CFLAGS += -I../include -Wall -Werror
++INCLUDES = -I$(INCLDIR) -I$(INCLDIR)/agent -I$(INCLDIR)/agent/mibgroup
++INCLUDES += -I../include
+ #CFLAGS +=$(AUTO_CFLAGS)
+
+ LD = gcc -shared
+@@ -29,7 +29,7 @@
+ all: $(TARG)
+
+ %.o: %.c *.h
+- $(CC) $(CFLAGS) -o $@ -c $<
++ $(CC) -fPIC $(INCLUDES) $(CFLAGS) -o $@ -c $<
+
+ $(TARG): $(OBJS)
+ $(LD) -o $@ $(OBJS)
diff --git a/sys-block/lio-utils/files/target.initd b/sys-block/lio-utils/files/target.initd
new file mode 100644
index 000000000000..56bec1efe326
--- /dev/null
+++ b/sys-block/lio-utils/files/target.initd
@@ -0,0 +1,137 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Linux-iSCSI.org target"
+
+depend() {
+ after modules
+ use net
+}
+
+MODNAME="target_core_mod"
+
+TCM_CFS_DIR="/sys/kernel/config/target/core"
+LIO_CFS_DIR="/sys/kernel/config/target/iscsi"
+TCM_NODE="/usr/sbin/tcm_node"
+LIO_NODE="/usr/sbin/lio_node"
+TCM_FABRIC="/usr/sbin/tcm_fabric"
+CONFIGFS_SCRIPT_DIR="/etc/target"
+TCM_CONFIGFS_SCRIPT="/etc/target/tcm_start.sh"
+LIO_CONFIGFS_SCRIPT="/etc/target/lio_start.sh"
+TCM_CORE_MODULE="target_core_mod"
+TCM_CORE_IO_MODULES="target_core_iblock target_core_file target_core_pscsi"
+FABRICS_MODULES="tcm_fc tcm_loop ib_srpt"
+LIO_MODULE="iscsi_target_mod"
+
+checkconfig() {
+ if ! modinfo ${TCM_CORE_MODULE} > /dev/null 2>&1 ; then
+ eerror "Target Core modules not found!"
+ return 1
+ elif ! modinfo ${LIO_MODULE} > /dev/null 2>&1 ; then
+ eerror "Linux iSCSI modules not found!"
+ return 1
+ elif [ ! -f ${TCM_CONFIGFS_SCRIPT} ]; then
+ eerror "${TCM_CONFIGFS_SCRIPT} does not exist. run targetcli to configure your target!"
+ return 1
+ elif [ ! -f ${LIO_CONFIGFS_SCRIPT} ]; then
+ eerror "${LIO_CONFIGFS_SCRIPT} does not exist. run targetcli to configure your target!"
+ return 1
+ fi
+}
+
+fabrics_start() {
+ ebegin "Starting Targets: "
+ for module in ${FABRICS_MODULES}; do
+ if modinfo $module > /dev/null 2>&1 ; then
+ ebegin "Loading ${module}"
+ modprobe ${module}
+ eend $?
+ fi
+ done
+ for cfgscript in ${CONFIGFS_SCRIPT_DIR}/*.sh; do
+ if [ ! -f ${cfgscript} ]; then
+ continue
+ fi
+ # target core is handled in tcm_start
+ if [ ${cfgscript} == ${TCM_CONFIGFS_SCRIPT} ]; then
+ continue
+ fi
+ # iscsi-target fabric module is handled in lio_target_start
+ if [ ${cfgscript} == ${LIO_CONFIGFS_SCRIPT} ]; then
+ continue
+ fi
+ ebegin "Calling ConfigFS script $cfgscript: "
+ sh ${cfgscript} > /dev/null 2>&1
+ eend $?
+ done
+ eend $?
+}
+
+lio_target_start() {
+ ebegin "Loading iSCSI target modules: ${LIO_MODULE}"
+ modprobe ${LIO_MODULE}
+ eend $?
+ ebegin "Configuring iSCSI target iscsi_target_mod"
+ sh ${LIO_CONFIGFS_SCRIPT} > /dev/null 2>&1
+ eend $?
+}
+
+tcm_start() {
+ ebegin "Loading Target Core modules : ${TCM_CORE_MODULE}"
+ modprobe ${TCM_CORE_MODULE}
+ eend $?
+ ebegin "Loading Target Core backend modules: "
+ for module in ${TCM_CORE_IO_MODULES} ; do
+ ebegin "${module}"
+ modprobe ${module}
+ eend $?
+ done
+ eend $?
+ ebegin "Calling ConfigFS script $TCM_CONFIGFS_SCRIPT for target_core_mod"
+ sh ${TCM_CONFIGFS_SCRIPT} > /dev/null 2>&1
+ eend $?
+}
+
+lio_target_stop() {
+ ebegin "Unload Linux-iSCSI.org Fabric module"
+ ${LIO_NODE} --unload
+ eend $?
+}
+
+fabrics_stop() {
+ ebegin "Unloading misc fabric modules: "
+ ${TCM_FABRIC} --unloadall
+ eend $?
+}
+
+tcm_stop() {
+ ebegin "Unloading Target Core modules: "
+ $TCM_NODE --unload
+ eend $?
+}
+
+start() {
+ checkconfig
+ tcm_start
+ lio_target_start
+ fabrics_start
+}
+
+stop() {
+ lio_target_stop
+ fabrics_stop
+ tcm_stop
+}
+
+status() {
+ if [[ -d ${TCM_CFS_DIR} && -d ${LIO_CFS_DIR} ]]; then
+ einfo "Target core mode status"
+ ${TCM_NODE} --listhbas
+ einfo "Linux iSCSI status"
+ ${LIO_NODE} --listendpoints
+ else
+ einfo "Target not started (yet)"
+ fi
+}
diff --git a/sys-block/lio-utils/files/tools-makefile.patch b/sys-block/lio-utils/files/tools-makefile.patch
new file mode 100644
index 000000000000..d9ee0400d215
--- /dev/null
+++ b/sys-block/lio-utils/files/tools-makefile.patch
@@ -0,0 +1,8 @@
+--- tools/Makefile 2011-06-20 23:25:07.000000000 +0400
++++ tools/Makefile 2011-06-21 00:06:26.000000000 +0400
+@@ -12,4 +12,5 @@
+ rm -f $(ISCSI_NAME_OBJS) $(ISCSI_NAME)
+
+ install:
++ mkdir -p $(DESTDIR)/usr/sbin
+ install -m 0755 $(ISCSI_NAME) $(DESTDIR)/usr/sbin/iscsi-name
diff --git a/sys-block/lio-utils/lio-utils-9999.ebuild b/sys-block/lio-utils/lio-utils-9999.ebuild
new file mode 100644
index 000000000000..60e47632df04
--- /dev/null
+++ b/sys-block/lio-utils/lio-utils-9999.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+EGIT_REPO_URI="git://linux-iscsi.org/lio-utils.git"
+PYTHON_DEPEND="2"
+RESTRICT_PYTHON_ABIS="3.*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils distutils git-2 python linux-info
+
+DESCRIPTION="Tools for controlling target_core_mod/ConfigFS"
+HOMEPAGE="http://linux-iscsi.org/"
+SRC_URI=""
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="snmp"
+
+DEPEND="snmp? ( net-analyzer/net-snmp )"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~TARGET_CORE"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ python_pkg_setup
+}
+
+src_prepare(){
+ local module
+
+ for module in tcm-py lio-py; do
+ cd ${module}
+ distutils_src_prepare
+ cd ..
+ done
+ epatch "${FILESDIR}"/tools-makefile.patch
+ epatch "${FILESDIR}"/snmp-makefile.patch
+}
+
+src_compile(){
+ local module
+
+ for module in tcm-py lio-py; do
+ cd ${module}
+ distutils_src_compile
+ cd ..
+ done
+ cd tools/
+ emake || die "emake failed"
+ cd ..
+ if use snmp; then
+ cd mib-modules/
+ emake || die "emake snmp failed"
+ cd ..
+ fi
+}
+
+src_install(){
+ local module
+
+ for module in tcm-py lio-py; do
+ cd ${module}
+ distutils_src_install
+ cd ..
+ done
+ cd tools/
+ emake DESTDIR="${ED}" install || die "emake install failed"
+ cd ..
+
+ symlink_to_sbin(){
+ local ver=$(python_get_version) sitedir="$(python_get_sitedir)"
+ ln -s "${sitedir}"/lio_dump.py \
+ "${ED}"/usr/sbin/lio_dump-${ver}
+ python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_dump.py
+ ln -s "${sitedir}"/lio_node.py \
+ "${ED}"/usr/sbin/lio_node-${ver}
+ python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_node.py
+ ln -s "${sitedir}"/tcm_dump.py \
+ "${ED}"/usr/sbin/tcm_dump-${ver}
+ python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_dump.py
+ ln -s "${sitedir}"/tcm_node.py \
+ "${ED}"/usr/sbin/tcm_node-${ver}
+ python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_node.py
+ ln -s "${sitedir}"/tcm_fabric.py \
+ "${ED}"/usr/sbin/tcm_fabric-${ver}
+ python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_fabric.py
+ }
+ python_execute_function --action-message "Making symlinks to /usr/sbin" symlink_to_sbin
+ python_generate_wrapper_scripts "${ED}"/usr/sbin/{lio_dump,lio_node,tcm_node,tcm_dump,tcm_fabric}
+
+ if use snmp; then
+ cd mib-modules/
+ emake DESTDIR="${ED}" install || die "emake install snmp failed"
+ cd ..
+ fi
+
+ emake DESTDIR="${ED}" conf_install || die "emake conf_install failed"
+ newinitd "${FILESDIR}/target.initd" target
+}
diff --git a/sys-block/lio-utils/metadata.xml b/sys-block/lio-utils/metadata.xml
new file mode 100644
index 000000000000..ed404319e336
--- /dev/null
+++ b/sys-block/lio-utils/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>cluster</herd>
+<longdescription>
+ Tools for controlling target_core_mod/ConfigFS
+</longdescription>
+</pkgmetadata>
diff --git a/sys-block/lsiutil/Manifest b/sys-block/lsiutil/Manifest
new file mode 100644
index 000000000000..e1d8aab16e8e
--- /dev/null
+++ b/sys-block/lsiutil/Manifest
@@ -0,0 +1 @@
+DIST LSIUtil_1.62.zip 2544375 SHA256 f4b0aa56b30cd6bad0834097f5297bafaa72ed540b5e103cd5cec153b49eda68 SHA512 65f68cf584b109e557ccc021412a922f867149c82060289e126186ff168b183ba325dcf3421f8275a4b34585a90ff3ef2848d1e8bfb7b386816d2ae7f5e9dd08 WHIRLPOOL f8b48521b60f75df73b406852213ac3cb4757c236764037bfe3cdc4b1dfb2085fab488fea864f251f1944ff3ac9ee97b160e90fc6177666a19c85e7f82f3548b
diff --git a/sys-block/lsiutil/lsiutil-1.62-r1.ebuild b/sys-block/lsiutil/lsiutil-1.62-r1.ebuild
new file mode 100644
index 000000000000..2c11e6ea5aa5
--- /dev/null
+++ b/sys-block/lsiutil/lsiutil-1.62-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="LSI Logic Fusion MPT Command Line Interface management tool"
+HOMEPAGE="http://www.lsi.com/"
+SRC_URI="http://www.lsi.com/downloads/Public/Obsolete/Obsolete%20Common%20Files/LSIUtil_${PV}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE=""
+
+RESTRICT="fetch mirror bindist"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+QA_PRESTRIPPED="/opt/bin/lsiutil"
+
+S="${WORKDIR}"
+
+pkg_nofetch() {
+ einfo "Upstream has implemented a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI"
+ einfo "And place $A in ${DISTDIR}"
+}
+
+src_install() {
+ exeinto /opt/bin
+
+ if use x86; then
+ doexe Linux/lsiutil || die
+ elif use amd64; then
+ newexe Linux/lsiutil.x86_64 lsiutil
+ elif use ia64; then
+ newexe Linux/lsiutil.ia64 lsiutil
+ fi
+
+ dodoc changes.txt
+}
diff --git a/sys-block/lsiutil/metadata.xml b/sys-block/lsiutil/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/sys-block/lsiutil/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/mbuffer/Manifest b/sys-block/mbuffer/Manifest
new file mode 100644
index 000000000000..d9e8d06cdc4b
--- /dev/null
+++ b/sys-block/mbuffer/Manifest
@@ -0,0 +1,5 @@
+DIST mbuffer-20090113.tgz 106584 SHA256 f36988cafefe0489839ed183123a940ae688f5074a2bf97982f68df6d65314f0 SHA512 4bdb7c68fdc83e9c16bfb6f70ba1614fa255adb9a08bbe4e01eeebb7e8ca981421dc1020c0d6f1cc90b7c5d85380f969ec088ea07d2201a6a79c6f949a40b5b8 WHIRLPOOL fe8a894131af7ce7081a72d16465d08de4d0324489df2c55b07b83d2dfcdd8d77d0837d70a501d0551b9a583bdb38c12d85bc8420733a3f66e174e6faa6e11b9
+DIST mbuffer-20110724.tgz 117321 SHA256 7e69db02ce518f8583cd76c4c8b152c86d4b3527124518cbf450b7bc58cd3c74
+DIST mbuffer-20130220.tgz 120519 SHA256 1d549c3ac7e29c6064b63195141a61253095831cf5d16f419ae6cc342f12c512 SHA512 c7bc866fa465868ceced68c6089b4c666beee43ce5c79d1d712a0ef75559dc3e12c4809fc46bedfa0b44c4f75131c0770ece3cbb75356c860e441dbdd986b899 WHIRLPOOL 4adb204009555574e785cf5f949c802ee1352c6e3111e3126b21ad747e2ac5faeb3d328796d5eb6362dad786aaf7e823f6fbdef1fa97d2d8c0d3c28928dabb1e
+DIST mbuffer-20140126.tgz 122322 SHA256 33d60e2be120f51c04880c334eb5d38dab31129a181775185f7c83eb333659c8 SHA512 5b23637926e1d1c726fd93c0363fcea860c7636f9cec7a40a0b941baf2038663c19b444fcdfdaada21b911e220b6add1bbe7404b8b8f9fcf1f0eb9a3b36bb0ba WHIRLPOOL b686d5ab76b9e218d8bf03bcf16b03f3248da7bc2bcd41098bb3f49f22b6e806c068d8f2429e04f81699ee0c772854e7ed0d1e04ca41e850e08dd3314a29be18
+DIST mbuffer-20150412.tgz 122935 SHA256 0c78dcb194d1f0316c51f277ea09ec20efd175bbd45f0a3f81bf1202c33301e4 SHA512 cef64f1229872e2207e678aa77dc95e0c24f54e4a88a57a0e797d10b07a16d1f5fa96c8cfa3876ff65dd97c114eff87b683917fa1d39cdb4f08c864325e4223c WHIRLPOOL cdd82ef4d036438b36c4ecc0058e3757116e5f01897eee89870e08e73323dc135accf4d69fc57cac87082a2a78bfb1841af62bced56f93388870bc1c3b8590cd
diff --git a/sys-block/mbuffer/files/mbuffer-20121111-resolv-multi-order-issue.patch b/sys-block/mbuffer/files/mbuffer-20121111-resolv-multi-order-issue.patch
new file mode 100644
index 000000000000..08e0b83441b5
--- /dev/null
+++ b/sys-block/mbuffer/files/mbuffer-20121111-resolv-multi-order-issue.patch
@@ -0,0 +1,21 @@
+diff -u mbuffer-20121111.orig/Makefile.in mbuffer-20121111/Makefile.in
+--- mbuffer-20121111.orig/Makefile.in 2012-11-16 11:17:11.000000000 +0100
++++ mbuffer-20121111/Makefile.in 2012-12-04 22:43:00.186863737 +0100
+@@ -77,7 +77,7 @@
+ ./mbuffer -q -I :8000 -o $@.tar -o - | openssl md5 > $@.md5 & \
+ sleep 1; \
+ rm -f $@.tar; \
+- ./mbuffer -i test.tar -o /dev/null -O localhost:8000 -H; \
++ ./mbuffer -i test.tar -o /dev/null -O 127.0.0.1:8000 -H; \
+ wait
+ sync
+ diff $@.md5 test.md5
+@@ -92,7 +92,7 @@
+ ./mbuffer -q -6 -I :8000 | openssl md5 > $@.md5 & \
+ sleep 1; \
+ rm -f $@.tar; \
+- ./mbuffer -i test.tar -o /dev/null -6 -O localhost:8000 -o $@.tar -H; \
++ ./mbuffer -i test.tar -o /dev/null -6 -O ::1:8000 -o $@.tar -H; \
+ wait
+ sync
+ diff $@.md5 test.md5
diff --git a/sys-block/mbuffer/mbuffer-20090113.ebuild b/sys-block/mbuffer/mbuffer-20090113.ebuild
new file mode 100644
index 000000000000..784ecec7c855
--- /dev/null
+++ b/sys-block/mbuffer/mbuffer-20090113.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality"
+HOMEPAGE="http://www.maier-komor.de/mbuffer.html"
+SRC_URI="http://www.maier-komor.de/software/mbuffer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i 's:/bin/ksh:/bin/sh:' Makefile.in #258359
+ ln -s "${DISTDIR}"/${P}.tgz test.tar #258881
+}
+
+src_compile() {
+ econf \
+ $(use_enable ssl md5) \
+ $(use_enable debug) \
+ || die "econf failed"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS INSTALL NEWS README ChangeLog
+}
diff --git a/sys-block/mbuffer/mbuffer-20110724.ebuild b/sys-block/mbuffer/mbuffer-20110724.ebuild
new file mode 100644
index 000000000000..e16045995409
--- /dev/null
+++ b/sys-block/mbuffer/mbuffer-20110724.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality"
+HOMEPAGE="http://www.maier-komor.de/mbuffer.html"
+SRC_URI="http://www.maier-komor.de/software/mbuffer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i 's:/bin/ksh:/bin/sh:' Makefile.in #258359
+ ln -s "${DISTDIR}"/${P}.tgz test.tar #258881
+}
+
+src_compile() {
+ econf \
+ $(use_enable ssl md5) \
+ $(use_enable debug) \
+ || die "econf failed"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS INSTALL NEWS README ChangeLog
+}
diff --git a/sys-block/mbuffer/mbuffer-20130220.ebuild b/sys-block/mbuffer/mbuffer-20130220.ebuild
new file mode 100644
index 000000000000..cc6094394b25
--- /dev/null
+++ b/sys-block/mbuffer/mbuffer-20130220.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality"
+HOMEPAGE="http://www.maier-komor.de/mbuffer.html"
+SRC_URI="http://www.maier-komor.de/software/mbuffer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ ln -s "${DISTDIR}"/${P}.tgz test.tar #258881
+ # work around "multi off" in /etc/host.conf and "::1 localhost"
+ # *not* being the *first* "localhost" entry in /etc/hosts
+ epatch "${FILESDIR}/${PN}-20121111-resolv-multi-order-issue.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl md5) \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc AUTHORS INSTALL NEWS README ChangeLog
+}
diff --git a/sys-block/mbuffer/mbuffer-20140126.ebuild b/sys-block/mbuffer/mbuffer-20140126.ebuild
new file mode 100644
index 000000000000..36efb0ccf9cd
--- /dev/null
+++ b/sys-block/mbuffer/mbuffer-20140126.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality"
+HOMEPAGE="http://www.maier-komor.de/mbuffer.html"
+SRC_URI="http://www.maier-komor.de/software/mbuffer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ ln -s "${DISTDIR}"/${P}.tgz test.tar #258881
+ # work around "multi off" in /etc/host.conf and "::1 localhost"
+ # *not* being the *first* "localhost" entry in /etc/hosts
+ epatch "${FILESDIR}/${PN}-20121111-resolv-multi-order-issue.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl md5) \
+ $(use_enable debug)
+}
diff --git a/sys-block/mbuffer/mbuffer-20150412.ebuild b/sys-block/mbuffer/mbuffer-20150412.ebuild
new file mode 100644
index 000000000000..5c4565629a74
--- /dev/null
+++ b/sys-block/mbuffer/mbuffer-20150412.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="M(easuring)buffer is a replacement for buffer with additional functionality"
+HOMEPAGE="http://www.maier-komor.de/mbuffer.html"
+SRC_URI="http://www.maier-komor.de/software/mbuffer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ ln -s "${DISTDIR}"/${P}.tgz test.tar #258881
+ # work around "multi off" in /etc/host.conf and "::1 localhost"
+ # *not* being the *first* "localhost" entry in /etc/hosts
+ epatch "${FILESDIR}/${PN}-20121111-resolv-multi-order-issue.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl md5) \
+ $(use_enable debug)
+}
diff --git a/sys-block/mbuffer/metadata.xml b/sys-block/mbuffer/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/mbuffer/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/megacli/Manifest b/sys-block/megacli/Manifest
new file mode 100644
index 000000000000..347179176647
--- /dev/null
+++ b/sys-block/megacli/Manifest
@@ -0,0 +1,3 @@
+DIST 8.02.21_MegaCLI.zip 12939353 SHA256 e5fdaff341b3cd8c3b5bbe334f5e819f9eb167e141337ce92a47a73c3fd7ac0b
+DIST 8.07.10_MegaCLI_Linux.zip 1543709 SHA256 631b58c1a51815c1c01db4d4d7b7b8c1099e3dff2c7ae6f1c2bf32a9aae6aca4 SHA512 ee83910dac54b653f5c33703555c51d37b33e1672c6de6473950ca21ff19518b7de921cfa07a50e1c7f26054c7075c6bc241b52f89757cc1e0e0f4251a07bcd7 WHIRLPOOL 5a045a113aee047b9d30f58029ba5c039c721f16d7e6ce0958de2273d0024e475bc1aeee786dfee95342f595fc13c050a7bb45a374851cc73dee60b335c276be
+DIST 8.07.14_MegaCLI.zip 7939395 SHA256 d9b152ae3dab76a334b9251702dba3311ceed91b58aaf52d916eb4ba1c2ab6e9 SHA512 ee2b66b69dc41bb678e54f5ccf4908a51e6fde147b2118844ff6248127aa51f12af0e7562c74461d52ea8e9b4345877b21c87fc89210208d80cf2fd3402a93e3 WHIRLPOOL 6720e246590a89ca6914f38a87aea83fe78f3986cee931bc2b133185c686574b80cf298a805c0412de6fc8fdd4e14a56e70ea5591446a1547a15b5487af245ae
diff --git a/sys-block/megacli/files/megacli-wrapper b/sys-block/megacli/files/megacli-wrapper
new file mode 100755
index 000000000000..ec6e2b8dc9da
--- /dev/null
+++ b/sys-block/megacli/files/megacli-wrapper
@@ -0,0 +1,3 @@
+#!/bin/sh
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/megacli/lib"
+exec /opt/megacli/megacli "$@"
diff --git a/sys-block/megacli/megacli-8.02.21.ebuild b/sys-block/megacli/megacli-8.02.21.ebuild
new file mode 100644
index 000000000000..6457fa8a514f
--- /dev/null
+++ b/sys-block/megacli/megacli-8.02.21.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit rpm
+
+DESCRIPTION="LSI Logic MegaRAID Command Line Interface management tool"
+HOMEPAGE="http://www.lsi.com/"
+SRC_URI="http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/${PV}_MegaCLI.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ app-admin/chrpath"
+
+S="${WORKDIR}"
+
+RESTRICT="mirror fetch"
+
+QA_PRESTRIPPED="/opt/megacli/megacli"
+
+pkg_nofetch() {
+ einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI"
+ einfo "And place $A in ${DISTDIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ unpack ./${PV}_Linux_MegaCLI/MegaCliLin.zip
+ rpm_unpack ./MegaCli-${PV}-1.noarch.rpm
+ rpm_unpack ./Lib_Utils-1.00-09.noarch.rpm
+}
+
+src_install() {
+ exeinto /opt/megacli
+ libsysfs=libsysfs.so.2.0.2
+ case ${ARCH} in
+ amd64) MegaCli=MegaCli64 libsysfs=x86_64/${libsysfs};;
+ x86) MegaCli=MegaCli;;
+ *) die "invalid ARCH";;
+ esac
+ newexe opt/MegaRAID/MegaCli/${MegaCli} megacli
+
+ exeinto /opt/megacli/lib
+ doexe opt/lsi/3rdpartylibs/${libsysfs}
+
+ into /opt
+ newbin "${FILESDIR}"/${PN}-wrapper ${PN}
+ dosym ${PN} /opt/bin/MegaCli
+
+ dodoc ${PV}_MegaCLI.txt
+
+ # Remove DT_RPATH
+ chrpath -d "${D}"/opt/megacli/megacli
+}
+
+pkg_postinst() {
+ einfo
+ einfo "See /usr/share/doc/${PF}/${PV}_MegaCli.txt for a list of supported controllers"
+ einfo "(contains LSI model names only, not those sold by 3rd parties"
+ einfo "under custom names like Dell PERC etc)."
+ einfo
+ einfo "As there's no dedicated manual, you might want to have"
+ einfo "a look at the following cheat sheet (originally written"
+ einfo "for Dell PowerEdge Expandable RAID Controllers):"
+ einfo "http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"
+ einfo
+ einfo "For more information about working with Dell PERCs see:"
+ einfo "http://tools.rapidsoft.de/perc/"
+ einfo
+}
diff --git a/sys-block/megacli/megacli-8.07.10.ebuild b/sys-block/megacli/megacli-8.07.10.ebuild
new file mode 100644
index 000000000000..af5ad890bdd4
--- /dev/null
+++ b/sys-block/megacli/megacli-8.07.10.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit rpm
+MY_P=${PV}_MegaCLI_Linux
+
+DESCRIPTION="LSI Logic MegaRAID Command Line Interface management tool"
+HOMEPAGE="http://www.lsi.com/"
+SRC_URI="http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/${MY_P}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ app-admin/chrpath"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+RESTRICT="mirror fetch"
+QA_PREBUILT="/opt/${PN}/${PN}
+ /opt/${PN}/lib/*"
+
+pkg_nofetch() {
+ einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI"
+ einfo "And place $A in ${DISTDIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ rpm_unpack ./"Linux MegaCLI ${PV}"/MegaCli-${PV}-1.noarch.rpm
+}
+
+src_install() {
+ newdoc "Linux MegaCLI ${PV}.txt" RELEASE.txt
+
+ exeinto /opt/megacli
+ libsysfs=libstorelibir-2.so.14.07-0
+ case ${ARCH} in
+ amd64) MegaCli=MegaCli64;;
+ x86) MegaCli=MegaCli;;
+ *) die "invalid ARCH";;
+ esac
+ newexe opt/MegaRAID/MegaCli/${MegaCli} ${PN}
+
+ exeinto /opt/${PN}/lib
+ doexe opt/MegaRAID/MegaCli/${libsysfs}
+
+ into /opt
+ newbin "${FILESDIR}"/${PN}-wrapper ${PN}
+ dosym ${PN} /opt/bin/MegaCli
+
+ # Remove DT_RPATH
+ chrpath -d "${D}"/opt/${PN}/${PN}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "See /usr/share/doc/${PF}/RELEASE.txt for a list of supported controllers"
+ einfo "(contains LSI model names only, not those sold by 3rd parties"
+ einfo "under custom names like Dell PERC etc)."
+ einfo
+ einfo "As there's no dedicated manual, you might want to have"
+ einfo "a look at the following cheat sheet (originally written"
+ einfo "for Dell PowerEdge Expandable RAID Controllers):"
+ einfo "http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"
+ einfo
+ einfo "For more information about working with Dell PERCs see:"
+ einfo "http://tools.rapidsoft.de/perc/"
+ einfo
+}
diff --git a/sys-block/megacli/megacli-8.07.14.ebuild b/sys-block/megacli/megacli-8.07.14.ebuild
new file mode 100644
index 000000000000..805e6b18803c
--- /dev/null
+++ b/sys-block/megacli/megacli-8.07.14.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit rpm
+MY_P=${PV}_MegaCLI
+
+DESCRIPTION="LSI Logic MegaRAID Command Line Interface management tool"
+HOMEPAGE="http://www.lsi.com/"
+SRC_URI="http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/${MY_P}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ app-admin/chrpath"
+RDEPEND=""
+
+S=${WORKDIR}
+
+RESTRICT="mirror fetch"
+QA_PREBUILT="/opt/${PN}/${PN}
+ /opt/${PN}/lib/*"
+
+pkg_nofetch() {
+ einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI"
+ einfo "And place $A in ${DISTDIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ rpm_unpack ./Linux/MegaCli-${PV}-1.noarch.rpm
+}
+
+src_install() {
+ newdoc "${MY_P}.txt" RELEASE.txt
+
+ exeinto /opt/megacli
+ libsysfs=libstorelibir-2.so.14.07-0
+ case ${ARCH} in
+ amd64) MegaCli=MegaCli64;;
+ x86) MegaCli=MegaCli;;
+ *) die "invalid ARCH";;
+ esac
+ newexe opt/MegaRAID/MegaCli/${MegaCli} ${PN}
+
+ exeinto /opt/${PN}/lib
+ doexe opt/MegaRAID/MegaCli/${libsysfs}
+
+ into /opt
+ newbin "${FILESDIR}"/${PN}-wrapper ${PN}
+ dosym ${PN} /opt/bin/MegaCli
+
+ # Remove DT_RPATH
+ chrpath -d "${D}"/opt/${PN}/${PN}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "See /usr/share/doc/${PF}/RELEASE.txt for a list of supported controllers"
+ einfo "(contains LSI model names only, not those sold by 3rd parties"
+ einfo "under custom names like Dell PERC etc)."
+ einfo
+ einfo "As there's no dedicated manual, you might want to have"
+ einfo "a look at the following cheat sheet (originally written"
+ einfo "for Dell PowerEdge Expandable RAID Controllers):"
+ einfo "http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"
+ einfo
+ einfo "For more information about working with Dell PERCs see:"
+ einfo "http://tools.rapidsoft.de/perc/"
+ einfo
+}
diff --git a/sys-block/megacli/metadata.xml b/sys-block/megacli/metadata.xml
new file mode 100644
index 000000000000..62d09cfb13cf
--- /dev/null
+++ b/sys-block/megacli/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- used by infra, please do not non-maintainer drop -->
+ <herd>sysadmin</herd>
+</pkgmetadata>
diff --git a/sys-block/megactl/Manifest b/sys-block/megactl/Manifest
new file mode 100644
index 000000000000..65af2ba804f0
--- /dev/null
+++ b/sys-block/megactl/Manifest
@@ -0,0 +1 @@
+DIST megactl-0.4.1.tar.gz 179173 SHA256 d7aee98035c97a1ff098450192f073565c4f2355079763f6dc6202be121720e8 SHA512 65a97f03fbe1c76375d2e16016c1e57c7e4544bfd7185b13a330560819caf48ecad8e9f1feb1d448b45d4f862abf2799868bd357d120019a709088c90b58ac92 WHIRLPOOL 61094c1cec453b5ee4a2e0f72d95d6e0ce0dacb3b6d56f6dca51e13fdd70f969021eb4f39934c29dd6124f1768896076cb495e8a2397bae521bd387db3badf21
diff --git a/sys-block/megactl/files/megactl-0.4.1-Makefile.patch b/sys-block/megactl/files/megactl-0.4.1-Makefile.patch
new file mode 100644
index 000000000000..f1ee2f9bb2a4
--- /dev/null
+++ b/sys-block/megactl/files/megactl-0.4.1-Makefile.patch
@@ -0,0 +1,26 @@
+diff -urN megactl-0.4.1.orig/src/Makefile megactl-0.4.1/src/Makefile
+--- megactl-0.4.1.orig/src/Makefile 2007-08-21 09:19:53.000000000 +0200
++++ megactl-0.4.1/src/Makefile 2009-11-21 12:30:44.242501898 +0100
+@@ -1,11 +1,17 @@
+
+-SRCS= megactl.c adapter.c megaioctl.c megatrace.c callinfo.c dumpbytes.c logpage.c ntrim.c
++SRCS= megactl.c adapter.c megaioctl.c callinfo.c dumpbytes.c logpage.c ntrim.c
+ INC= -I./schily -Iincludes-hack
+ HDRS= mega.h adapter.h megaioctl.h callinfo.h logpage.h dumpbytes.h
+-ARCH= -m32
+-CFLAGS= -g -Wall $(INC) $(ARCH)
+-LDFLAGS= -g $(ARCH)
+-PROGRAMS= megactl megasasctl megatrace
++ARCH?= -m32
++CFLAGS?= -g -Wall
++CFLAGS+= $(INC) $(ARCH)
++LDFLAGS?= -g
++LDFLAGS+= $(ARCH)
++PROGRAMS= megactl megasasctl
++ifeq ($(ARCH),-m32)
++PROGRAMS+= megatrace
++SRCS+= megatrace.c
++endif
+
+ all: $(PROGRAMS)
+
diff --git a/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch b/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch
new file mode 100644
index 000000000000..7ea6e8cac453
--- /dev/null
+++ b/sys-block/megactl/files/megactl-0.4.1-gcc-fixes.patch
@@ -0,0 +1,46 @@
+diff -Nuar --exclude '*.swp' --exclude '*.o' megactl-0.4.1.orig/src/callinfo.c megactl-0.4.1/src/callinfo.c
+--- megactl-0.4.1.orig/src/callinfo.c 2007-08-21 00:19:53.000000000 -0700
++++ megactl-0.4.1/src/callinfo.c 2014-07-13 22:05:06.585598812 -0700
+@@ -255,7 +255,12 @@
+ { SYS_setfsgid32, 0, "setfsgid32" },
+ { SYS_pivot_root, 0, "pivot_root" },
+ { SYS_mincore, 0, "mincore" },
++#ifdef SYS_madvise
++ { SYS_madvise, 0, "madvise" },
++#endif
++#ifdef SYS_madvise1
+ { SYS_madvise1, 0, "madvise1" },
++#endif
+ { SYS_getdents64, 0, "getdents64" },
+ { SYS_fcntl64, 0, "fcntl64" },
+ { 222, 0, NULL },
+diff -Nuar --exclude '*.swp' --exclude '*.o' megactl-0.4.1.orig/src/logpage.c megactl-0.4.1/src/logpage.c
+--- megactl-0.4.1.orig/src/logpage.c 2007-08-21 00:19:53.000000000 -0700
++++ megactl-0.4.1/src/logpage.c 2014-07-13 21:58:34.010848677 -0700
+@@ -20,6 +20,8 @@
+ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
++#define __STDC_FORMAT_MACROS
++#include <inttypes.h>
+
+ #include "megaioctl.h"
+ #include "logpage.h"
+@@ -107,7 +109,7 @@
+
+ for (k = 0; (b >= 1024) && (k < sizeof (suffix) / sizeof (suffix[0]) - 1); ++k, b /= 1024)
+ ;
+- snprintf (bytes, sizeof bytes, "%3llu%s%s", b, suffix[k], unit);
++ snprintf (bytes, sizeof bytes, "%3" PRIu64 "%s%s", b, suffix[k], unit);
+ return bytes;
+ }
+
+@@ -378,7 +380,7 @@
+ default: result = "unknown result"; notice = 0; break;
+ }
+ if (verbosity > notice)
+- fprintf (f, " %2d: timestamp %4ud%02uh: %10s %-30s seg:%u lba:%-8lld sk:%u asc:%u ascq:%u vs:%u\n", k, t->timestamp / 24, t->timestamp % 24, test, result, t->number, t->lba, t->sense_key, t->additional_sense_code, t->additional_sense_code_qualifier, t->vendor_specific);
++ fprintf (f, " %2d: timestamp %4ud%02uh: %10s %-30s seg:%u lba:%-8"PRIu64" sk:%u asc:%u ascq:%u vs:%u\n", k, t->timestamp / 24, t->timestamp % 24, test, result, t->number, t->lba, t->sense_key, t->additional_sense_code, t->additional_sense_code_qualifier, t->vendor_specific);
+ }
+ }
+ break;
diff --git a/sys-block/megactl/files/megactl-0.4.1-tracefix.patch b/sys-block/megactl/files/megactl-0.4.1-tracefix.patch
new file mode 100644
index 000000000000..915cc2d2a20d
--- /dev/null
+++ b/sys-block/megactl/files/megactl-0.4.1-tracefix.patch
@@ -0,0 +1,232 @@
+diff -Nuar megactl-0.4.1.orig/src/megactl.c megactl-0.4.1/src/megactl.c
+--- megactl-0.4.1.orig/src/megactl.c 2007-08-21 00:19:53.000000000 -0700
++++ megactl-0.4.1/src/megactl.c 2014-07-14 11:15:14.538745305 -0700
+@@ -45,6 +45,9 @@
+
+ ********************************************************************/
+
++#define __STDC_FORMAT_MACROS
++#include <inttypes.h>
++
+ #include "mega.h"
+ #include "megaioctl.h"
+ #include "adapter.h"
+@@ -207,7 +210,7 @@
+
+ for (k = 0; (b >= 1024) && (k < sizeof (suffix) / sizeof (suffix[0]) - 1); ++k, b /= 1024)
+ ;
+- snprintf (bytes, sizeof bytes, "%3llu%s%s", b, suffix[k], unit);
++ snprintf (bytes, sizeof bytes, "%3"PRIu64"%s%s", b, suffix[k], unit);
+ return bytes;
+ }
+
+@@ -604,6 +607,8 @@
+ fprintf (stderr, "megaraid driver version %x too old.\n", driverVersion);
+ return 1;
+ }
++#else
++ driverVersion = 0;
+ #endif
+
+ if (megaGetNumAdapters (fd, &numAdapters, sas) < 0)
+diff -Nuar megactl-0.4.1.orig/src/megaioctl.c megactl-0.4.1/src/megaioctl.c
+--- megactl-0.4.1.orig/src/megaioctl.c 2014-07-14 11:30:03.590781305 -0700
++++ megactl-0.4.1/src/megaioctl.c 2014-07-14 11:31:36.410258930 -0700
+@@ -87,7 +87,11 @@
+ m->cmd = cmd;
+ m->opcode = opcode;
+ m->subopcode = subopcode;
++#ifdef __x86_64__
++ m->xferaddr = (uint64_t) data;
++#else
+ m->xferaddr = (uint32_t) data;
++#endif
+ if (data)
+ memset (data, 0, len);
+
+@@ -115,7 +119,11 @@
+ m->cmd = cmd;
+ m->opcode = opcode;
+ m->subopcode = subopcode;
++#ifdef __x86_64__
++ m->xferaddr = (uint64_t) data;
++#else
+ m->xferaddr = (uint32_t) data;
++#endif
+ if (data)
+ memset (data, 0, len);
+
+@@ -178,11 +186,19 @@
+ u.ui.fcs.adapno = MKADAP(adapter->adapno);
+ u.data = data;
+ m->cmd = MBOXCMD_PASSTHRU;
++#ifdef __x86_64__
++ m->xferaddr = (uint64_t) p;
++#else
+ m->xferaddr = (uint32_t) p;
++#endif
+ p->timeout = 3;
+ p->ars = 1;
+ p->target = target;
+- p->dataxferaddr = (uint32_t) data;
++#ifdef __x86_64__
++ p->dataxferaddr = (uint64_t) data;
++#else
++ p->dataxferaddr = (uint32_t) data;
++#endif
+ p->dataxferlen = len;
+ p->scsistatus = 239; /* HMMM */
+ memcpy (p->cdb, cdb, cdblen);
+diff -Nuar megactl-0.4.1.orig/src/megatrace.c megactl-0.4.1/src/megatrace.c
+--- megactl-0.4.1.orig/src/megatrace.c 2014-07-14 01:31:47.704312799 -0700
++++ megactl-0.4.1/src/megatrace.c 2014-07-14 11:37:20.570755832 -0700
+@@ -170,7 +170,11 @@
+ fprintf (stderr, "ptrace:getregs: %s\n", strerror (errno));
+ exit (1);
+ }
++#ifdef __x86_64__
++ call = r.orig_rax;
++#else
+ call = r.orig_eax;
++#endif
+ /*printthis = call == SYS_ioctl;*/
+
+ if (state == INBOUND)
+@@ -188,18 +192,30 @@
+ {
+ if ((call < 0) || (call > callmax) || (callinfo[call].name == NULL))
+ {
++#ifdef __x86_64__
++ fprintf (stderr, "= 0x%08llx\n", (unsigned long long) r.rax);
++#else
+ fprintf (stderr, "= 0x%08lx\n", (unsigned long) r.eax);
++#endif
+ }
+ else
+ {
+ if (callinfo[call].ptrval)
+ {
+ if (printcalls || printthis)
++#ifdef __x86_64__
++ fprintf (stderr, " = 0x%08llx\n", r.rax);
++#else
+ fprintf (stderr, " = 0x%08lx\n", r.eax);
++#endif
+ }
+ else
+ {
++#ifdef __x86_64__
++ long rv = r.rax;
++#else
+ long rv = r.eax;
++#endif
+ if (rv < 0)
+ {
+ if (printcalls || printthis)
+@@ -219,16 +235,22 @@
+ unsigned int len = 16;
+ unsigned char buf[65536];
+
++#ifdef __x86_64__
++ unsigned long long fd = r.rbx;
++ unsigned long long ioc = r.rcx;
++ unsigned long long arg = r.rdx;
++#else
+ unsigned long fd = r.ebx;
+-
+ unsigned long ioc = r.ecx;
++ unsigned long arg = r.edx;
++#endif
++
+ unsigned int iocdir = _IOC_DIR(ioc);
+ unsigned char ioctype = _IOC_TYPE(ioc);
+ unsigned int iocnr = _IOC_NR(ioc);
+ unsigned int iocsize = _IOC_SIZE(ioc);
+ char *iocdirname;
+
+- unsigned long arg = r.edx;
+
+ switch (iocdir)
+ {
+@@ -240,7 +262,11 @@
+
+ fprintf (stderr, "%s: ioctl(%ld, _IOC(\"%s\",'%c',0x%02x,0x%02x), 0x%08lx)", tbuf, fd, iocdirname, ioctype, iocnr, iocsize, arg);
+ if (state == OUTBOUND)
++#ifdef __x86_64__
++ fprintf (stderr, " = %lld\n", r.rax);
++#else
+ fprintf (stderr, " = %ld\n", r.eax);
++#endif
+ if (getenv ("LOG_INBOUND"))
+ fprintf (stderr, "\n");
+
+@@ -249,10 +275,18 @@
+ if (len > sizeof buf)
+ len = sizeof buf;
+
++#ifdef __x86_64__
++ if (printregs)
++ fprintf (stderr, " rbx=%08llx rcx=%08llx rdx=%08llx rsi=%08llx rdi=%08llx rbp=%08llx rax=%08llx ds=%08llx es=%08llx fs=%08llx gs=%08llx orig_rax=%08llx rip=%08llx cs=%08llx eflags=%08llx rsp=%08llx ss=%08llx\n", r.rbx, r.rcx, r.rdx, r.rsi, r.rdi, r.rbp, r.rax, r.ds, r.es, r.fs, r.gs, r.orig_rax, r.rip, r.cs, r.eflags, r.rsp, r.ss);
++
++ copyout (buf, len, pid, r.rdx);
++#else
+ if (printregs)
+ fprintf (stderr, " ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx eax=%08lx xds=%08lx xes=%08lx xfs=%08lx xgs=%08lx orig_eax=%08lx eip=%08lx xcs=%08lx eflags=%08lx esp=%08lx xss=%08lx\n", r.ebx, r.ecx, r.edx, r.esi, r.edi, r.ebp, r.eax, r.xds, r.xes, r.xfs, r.xgs, r.orig_eax, r.eip, r.xcs, r.eflags, r.esp, r.xss);
+
+ copyout (buf, len, pid, r.edx);
++#endif
++
+
+ if ((ioctype == 'm') && (iocnr == 0) && (iocsize == sizeof (struct uioctl_t)))
+ {
+@@ -405,7 +439,11 @@
+ else
+ {
+ fprintf (stderr, " host %d, off 0x%04x, count %d, sense_off 0x%08x, sense_len 0x%08x\n", iocp->host_no, iocp->sgl_off, iocp->sge_count, iocp->sense_off, iocp->sense_len);
++#ifdef __x86_64__
++ dumpbytes (stderr, buf, len, (void *) r.rdx, NULL);
++#else
+ dumpbytes (stderr, buf, len, (void *) r.edx, NULL);
++#endif
+ }
+ if (log)
+ {
+@@ -427,23 +465,38 @@
+ }
+ else
+ {
++#ifdef __x86_64__
++ dumpbytes (stderr, buf, len, (void *) r.rdx, NULL);
++#else
+ dumpbytes (stderr, buf, len, (void *) r.edx, NULL);
++#endif
+ }
+ fprintf (stderr, "\n");
+ }
+
+ switch (state)
+ {
++#ifdef __x86_64__
++ static u64 lastrip = 0;
++#else
+ static u32 lasteip = 0;
++#endif
++
+
+ case UNTRACED:
+ /* We don't know whether we were inbound or outbound on the first signal; this
+ appears to differ between kernels. So we defer until we see the same eip in
+ two successive traps, at which point we know we were outbound, so the next
+ trap is inbound. */
++#ifdef __x86_64__
++ if (lastrip == r.rip)
++ state = INBOUND;
++ lastrip = r.rip;
++#else
+ if (lasteip == r.eip)
+ state = INBOUND;
+ lasteip = r.eip;
++#endif
+ break;
+ case INBOUND: state = OUTBOUND; break;
+ case OUTBOUND: state = INBOUND; break;
diff --git a/sys-block/megactl/files/megactl-0.4.1.patch b/sys-block/megactl/files/megactl-0.4.1.patch
new file mode 100644
index 000000000000..3d857c9c1c57
--- /dev/null
+++ b/sys-block/megactl/files/megactl-0.4.1.patch
@@ -0,0 +1,21 @@
+diff -urN megactl-0.4.1.orig/src/megatrace.c megactl-0.4.1/src/megatrace.c
+--- megactl-0.4.1.orig/src/megatrace.c 2007-08-21 09:19:53.000000000 +0200
++++ megactl-0.4.1/src/megatrace.c 2008-02-10 21:27:24.416919438 +0100
+@@ -49,7 +49,7 @@
+ #include <signal.h>
+ #include <sys/ptrace.h>
+ #include <sys/wait.h>
+-#include <asm/user.h>
++#include <sys/user.h>
+ #include <sys/syscall.h>
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
+@@ -250,7 +250,7 @@
+ len = sizeof buf;
+
+ if (printregs)
+- fprintf (stderr, " ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx eax=%08lx ds=%04x __ds=%04x es=%04x __es=%04x fs=%04x __fs=%04x gs=%04x __gs=%04x orig_eax=%08lx eip=%08lx cs=%04x __cs=%04x eflags=%08lx esp=%08lx ss=%04x __ss=%04x\n", r.ebx, r.ecx, r.edx, r.esi, r.edi, r.ebp, r.eax, r.ds, r.__ds, r.es, r.__es, r.fs, r.__fs, r.gs, r.__gs, r.orig_eax, r.eip, r.cs, r.__cs, r.eflags, r.esp, r.ss, r.__ss);
++ fprintf (stderr, " ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx eax=%08lx xds=%08lx xes=%08lx xfs=%08lx xgs=%08lx orig_eax=%08lx eip=%08lx xcs=%08lx eflags=%08lx esp=%08lx xss=%08lx\n", r.ebx, r.ecx, r.edx, r.esi, r.edi, r.ebp, r.eax, r.xds, r.xes, r.xfs, r.xgs, r.orig_eax, r.eip, r.xcs, r.eflags, r.esp, r.xss);
+
+ copyout (buf, len, pid, r.edx);
+
diff --git a/sys-block/megactl/megactl-0.4.1-r1.ebuild b/sys-block/megactl/megactl-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..75feffe51724
--- /dev/null
+++ b/sys-block/megactl/megactl-0.4.1-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+IUSE=""
+DESCRIPTION="LSI MegaRAID control utility"
+HOMEPAGE="http://sourceforge.net/projects/megactl/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+}
+
+src_compile() {
+ cd src
+ use x86 && MY_MAKEOPTS="ARCH=-m32"
+ use amd64 && MY_MAKEOPTS="ARCH=-m64"
+ emake ${MY_MAKEOPTS} || die "make failed"
+}
+
+src_install() {
+ cd src
+ dosbin megactl megasasctl
+ use x86 && dosbin megatrace
+ use amd64 && ewarn "megatrace was not installed because it does not compile on amd64"
+ dodoc megarpt megasasrpt ../README
+}
diff --git a/sys-block/megactl/megactl-0.4.1-r2.ebuild b/sys-block/megactl/megactl-0.4.1-r2.ebuild
new file mode 100644
index 000000000000..73e8b9ba2eab
--- /dev/null
+++ b/sys-block/megactl/megactl-0.4.1-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+IUSE=""
+DESCRIPTION="LSI MegaRAID control utility"
+HOMEPAGE="http://sourceforge.net/projects/megactl/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+ epatch "${FILESDIR}"/${P}-gcc-fixes.patch
+ epatch "${FILESDIR}"/${P}-tracefix.patch
+}
+
+src_compile() {
+ cd src
+ use x86 && MY_MAKEOPTS="ARCH=-m32"
+ use amd64 && MY_MAKEOPTS="ARCH=-m64"
+ emake ${MY_MAKEOPTS} || die "make failed"
+}
+
+src_install() {
+ cd src
+ dosbin megactl megasasctl megarpt megasasrpt
+ # it's not quite fixed yet
+ [ -x megatrace ] && dosbin megatrace
+ dodoc ../README
+}
diff --git a/sys-block/megactl/metadata.xml b/sys-block/megactl/metadata.xml
new file mode 100644
index 000000000000..3591081b02d5
--- /dev/null
+++ b/sys-block/megactl/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- used by infra, please do not non-maintainer drop -->
+ <herd>sysadmin</herd>
+ <longdescription>
+This project is a small collection of programs for examining configuration and
+status of LSI megaraid adapters, especially Dell PERC RAID adapters, and
+attached storage devices.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">megactl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/megamgr/Manifest b/sys-block/megamgr/Manifest
new file mode 100644
index 000000000000..d5d3b05b3ad5
--- /dev/null
+++ b/sys-block/megamgr/Manifest
@@ -0,0 +1 @@
+DIST ut_linux_mgr_5.20.zip 253549 SHA256 e7313ed8f59897f132ffed55ed606f19dc72a5d529e6b647cb157a39f0d79123
diff --git a/sys-block/megamgr/megamgr-5.20-r2.ebuild b/sys-block/megamgr/megamgr-5.20-r2.ebuild
new file mode 100644
index 000000000000..450974bade25
--- /dev/null
+++ b/sys-block/megamgr/megamgr-5.20-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit multilib
+
+DESCRIPTION="LSI Logic MegaRAID Text User Interface management tool"
+HOMEPAGE="http://www.lsi.com"
+SRC_URI="http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/ut_linux_${PN##mega}_${PV}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+RESTRICT="mirror fetch"
+
+S="${WORKDIR}"
+
+QA_PRESTRIPPED="/opt/bin/megamgr"
+
+pkg_nofetch() {
+ einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI"
+ einfo "And place $A in ${DISTDIR}"
+}
+
+pkg_setup() {
+ use amd64 && { has_multilib_profile || die "needs multilib profile on amd64"; }
+}
+
+src_install() {
+ newdoc ut_linux_${PN##mega}_${PV}.txt ${PN}-release-${PV}.txt
+
+ exeinto /opt/bin
+ newexe megamgr.bin megamgr || die
+}
diff --git a/sys-block/megamgr/metadata.xml b/sys-block/megamgr/metadata.xml
new file mode 100644
index 000000000000..b71a8a2e034d
--- /dev/null
+++ b/sys-block/megamgr/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>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/megarc/Manifest b/sys-block/megarc/Manifest
new file mode 100644
index 000000000000..d148a98607f6
--- /dev/null
+++ b/sys-block/megarc/Manifest
@@ -0,0 +1 @@
+DIST ut_linux_megarc_1.11.zip 301703 SHA256 bba008e40c66b74a87e3ecf3c068d35ae8f464c332635400096cbb856c33eb4b
diff --git a/sys-block/megarc/megarc-1.11-r1.ebuild b/sys-block/megarc/megarc-1.11-r1.ebuild
new file mode 100644
index 000000000000..8a709aec34d7
--- /dev/null
+++ b/sys-block/megarc/megarc-1.11-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit multilib
+
+DESCRIPTION="LSI Logic MegaRAID Text User Interface management tool"
+HOMEPAGE="http://www.lsi.com"
+SRC_URI="http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/ut_linux_${PN}_${PV}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="app-arch/unzip
+ doc? ( app-text/antiword )"
+RDEPEND=""
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"
+
+QA_PRESTRIPPED="/opt/bin/megarc"
+
+pkg_setup() {
+ use amd64 && { has_multilib_profile || die "needs multilib profile on amd64"; }
+}
+
+src_compile() {
+ use doc && antiword ut_linux.doc > ${PN}-manual.txt
+}
+
+src_install() {
+ use doc && dodoc ${PN}-manual.txt
+ newdoc ut_linux_${PN}_${PV}.txt ${PN}-release-${PV}.txt
+
+ exeinto /opt/bin
+ newexe megarc.bin megarc || die
+}
diff --git a/sys-block/megarc/metadata.xml b/sys-block/megarc/metadata.xml
new file mode 100644
index 000000000000..b71a8a2e034d
--- /dev/null
+++ b/sys-block/megarc/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>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/metadata.xml b/sys-block/metadata.xml
new file mode 100644
index 000000000000..d54bebd2d4aa
--- /dev/null
+++ b/sys-block/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The sys-block category contains packages which work with block devices.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría sys-block contiene paquetes que trabajan con dispositivos
+ de bloque.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie sys-block enthält Pakete für die Arbeit mit Blockgeräten
+ (Festplatten, Disketten, CD-ROMs etc.).
+ </longdescription>
+ <longdescription lang="ja">
+ sys-blockカテゴリにはブロックデバイスと使用パッケージが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De sys-block categorie bevat gereedschappen voor het omgaan met blok-apparaten
+ zoals harde schijven, diskettes en CD-ROM's.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm sys-block chứa các gói hoạt động với thiết bị khối (block device).
+ </longdescription>
+ <longdescription lang="it">
+ La categoria sys-block contiene pacchetti per la gestione dei dispositivi a blocchi.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria sys-block contém pacotes que funcionam com
+ dispositivos de bloco.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria sys-block zawiera programy do pracy na urządzeniach blokowych.
+ </longdescription>
+</catmetadata>
+
diff --git a/sys-block/mpt-status/Manifest b/sys-block/mpt-status/Manifest
new file mode 100644
index 000000000000..9ad9b237bb5e
--- /dev/null
+++ b/sys-block/mpt-status/Manifest
@@ -0,0 +1,2 @@
+DIST mpt-status-1.2.0-linux-sources.tar.bz2 33155 SHA256 a57a52aaf5c7f9c4303dbaac231421965c1c48df48e61821c79e3e9584526c10 SHA512 f5155dba7125e658d2a4a500e0ca6cddbee0102f4e8b19908b9a1ea53ece06af8a97583efaca737486c67f8caefb08318efb8f8cde7bb2d6ce3bfa00a02ebb62 WHIRLPOOL f33797f9c33a8e9d92c7b44facbda034fe2fd20d6699d32f487287ecb45eb7715c051dd53a389d742ed03b436ccaad1c8e83b205bf459bf72917ee260f27f10c
+DIST mpt-status-1.2.0.tar.bz2 36060 SHA256 4457c2e3f7b493f20f9527f21dd4f26aa3fc14eaaaeb1ee1ba63a1024369bab4 SHA512 854c21aa2c6bda1683ff162342cac2139fd7a98de693edab345b053d6c2fc2dfe6db09f12237ad140cadf10e95f64c7f5fa773a4e4d063654eddede1ce52bbec WHIRLPOOL baee45b97d4b30491c9c21ed8a93379d4b4eefa4ceca93add581f885e92ed64e5f0e9fed98f3c3479606df1bd03ccf500ce381c902887fbe14e1127642052309
diff --git a/sys-block/mpt-status/files/mpt-status-1.2.0-gentoo.patch b/sys-block/mpt-status/files/mpt-status-1.2.0-gentoo.patch
new file mode 100644
index 000000000000..445868a2ef9d
--- /dev/null
+++ b/sys-block/mpt-status/files/mpt-status-1.2.0-gentoo.patch
@@ -0,0 +1,51 @@
+Patch for Gentoo distribution of mpt-status.
+ 1. -I../linux-sources/drivers/message/fusion for our inclusion of the mpt headers.
+ 2. Remove -O2, and use $(CFLAGS) from user instead.
+ 3. Use LDFLAGS
+ 4. -D flag to install is GNU specific.
+ 5. Remove sparc64 specific CFLAGS.
+ 6. Remember to make the sbin directory before installing to it.
+ 7. Don't strip the binary.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar mpt-status-1.2.0.orig/Makefile mpt-status-1.2.0/Makefile
+--- mpt-status-1.2.0.orig/Makefile 2006-11-01 19:02:30.000000000 +0000
++++ mpt-status-1.2.0/Makefile 2006-11-10 08:54:18.000000000 +0000
+@@ -3,28 +3,26 @@
+ KERNEL_PATH := /usr/src/linux
+ KERNEL_PATH_B := /lib/modules/`uname -r`/build
+ KERNEL_PATH_S := /lib/modules/`uname -r`/source
+-CFLAGS := -Iincl -Wall -W -O2 \
++CFLAGS := -Iincl -Wall -W \
++ -I../linux-sources/drivers/message/fusion \
+ -I${KERNEL_PATH}/drivers/message/fusion \
+ -I${KERNEL_PATH_B}/drivers/message/fusion \
+- -I${KERNEL_PATH_S}/drivers/message/fusion
++ -I${KERNEL_PATH_S}/drivers/message/fusion \
++ $(CFLAGS)
+ DFLAGS := #-DSANITIZED_KERNEL_HEADERS
+-LDFLAGS :=
++LDFLAGS := $(LDFLAGS)
+ DESTDIR :=
+ MANDIR := /usr/share/man
+ CC := gcc
+-INSTALL := install -D
++INSTALL := install
+ ARCH := $(shell uname -m)
+
+-ifeq "${ARCH}" "sparc64"
+- CFLAGS := -Iincl -Wall -W -O2 -m64 -pipe \
+- -mcpu=ultrasparc -mcmodel=medlow
+-endif
+-
+ ${PROG}: ${PROG}.c ${PROG}.h
+ ${CC} ${DFLAGS} ${CFLAGS} -o $@ $< ${LDFLAGS}
+
+ install: ${PROG}
+- ${INSTALL} -s -o root -g root -m 0500 $< \
++ ${INSTALL} -d ${DESTDIR}${PREFIX}/sbin/
++ ${INSTALL} -o root -g root -m 0500 $< \
+ ${DESTDIR}${PREFIX}/sbin
+
+ install_doc: man/${PROG}.8
diff --git a/sys-block/mpt-status/metadata.xml b/sys-block/mpt-status/metadata.xml
new file mode 100644
index 000000000000..aba833ed90e0
--- /dev/null
+++ b/sys-block/mpt-status/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/mpt-status/mpt-status-1.2.0-r1.ebuild b/sys-block/mpt-status/mpt-status-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..fb6720dfd363
--- /dev/null
+++ b/sys-block/mpt-status/mpt-status-1.2.0-r1.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 eutils toolchain-funcs
+
+DESCRIPTION="Query tool to access the running configuration and status of LSI SCSI HBAs"
+HOMEPAGE="http://www.drugphish.ch/~ratz/mpt-status/"
+SRC_URI="http://www.drugphish.ch/~ratz/mpt-status/${P}.tar.bz2
+ mirror://gentoo/${PN}-1.2.0-linux-sources.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.0-gentoo.patch"
+
+ sed -i -e 's,\(^.*linux/compiler\.h.*$\),,' mpt-status.h || die
+ sed -i -e '/KERNEL_PATH/d' Makefile || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/{AUTHORS,Changelog,DeveloperNotes,FAQ,README,ReleaseNotes,THANKS,TODO}
+}
diff --git a/sys-block/ms-sys/Manifest b/sys-block/ms-sys/Manifest
new file mode 100644
index 000000000000..d721e095b298
--- /dev/null
+++ b/sys-block/ms-sys/Manifest
@@ -0,0 +1,2 @@
+DIST ms-sys-2.4.0.tar.gz 46501 SHA256 afcfefb52350f632bbd4671c3f97df09e42a60d0de3e56d42682450c7ebf689e SHA512 17e2496d2e4815180b9f33fa0f206953fb3484e01c115a2e67d110fb04d421be7e694a434d991a7518579eadb9dce4e907dbd849dbaf6fb506758c425faa14ec WHIRLPOOL f85390ff016f42fd750e9b2d1fe34e132cb5e7cba141141863dc420bcca436fcc4bb5d2181d0c6e2f633ca2b10dc36f562ac2c1c0f688f3c320287dfab856cac
+DIST ms-sys-2.5.0.tar.gz 48383 SHA256 f2a4b3a39dce7fdcc871f011794ac26c1e161991a216124a8a3cde1e8c61a854 SHA512 306c39ed8c3c77047d3c0aaa2ce07edd00d8e6d358923910325d3c81252ac0f48ff64b87309c21197c063b7b4f67339af476bb3b6ae0bd5ac759ef26b3f74ea4 WHIRLPOOL cd4ef331b211ae7b61b1f26942018a3c896db34496f179ab76ec6b58799fcf789e2ed98bee995bc540b8e2a29c46a48d7ac9cee854e38591bae0a190c4ad27d4
diff --git a/sys-block/ms-sys/metadata.xml b/sys-block/ms-sys/metadata.xml
new file mode 100644
index 000000000000..0c1cdd4feb21
--- /dev/null
+++ b/sys-block/ms-sys/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ms-sys</remote-id>
+ <bugs-to>http://sourceforge.net/tracker/?group_id=59200</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/ms-sys/ms-sys-2.4.0.ebuild b/sys-block/ms-sys/ms-sys-2.4.0.ebuild
new file mode 100644
index 000000000000..7beb0356d022
--- /dev/null
+++ b/sys-block/ms-sys/ms-sys-2.4.0.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="A command-line program for writing Microsoft compatible boot records"
+HOMEPAGE="http://ms-sys.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="linguas_sv"
+
+DEPEND="sys-devel/gettext"
+RDEPEND="virtual/libintl"
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ local nls=""
+ if ! use linguas_sv ; then
+ nls='NLS_FILES='
+ fi
+
+ emake DESTDIR="${D}" MANDIR="/usr/share/man" \
+ PREFIX="/usr" ${nls} install
+
+ dodoc CHANGELOG CONTRIBUTORS FAQ README TODO
+}
diff --git a/sys-block/ms-sys/ms-sys-2.5.0.ebuild b/sys-block/ms-sys/ms-sys-2.5.0.ebuild
new file mode 100644
index 000000000000..839ab67e6f68
--- /dev/null
+++ b/sys-block/ms-sys/ms-sys-2.5.0.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="A command-line program for writing Microsoft compatible boot records"
+HOMEPAGE="http://ms-sys.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="linguas_sv"
+
+DEPEND="sys-devel/gettext"
+RDEPEND="virtual/libintl"
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ local nls=""
+ if ! use linguas_sv ; then
+ nls='NLS_FILES='
+ fi
+
+ emake DESTDIR="${D}" MANDIR="/usr/share/man" \
+ PREFIX="/usr" ${nls} install
+
+ dodoc CHANGELOG CONTRIBUTORS FAQ README TODO
+}
diff --git a/sys-block/mtx/Manifest b/sys-block/mtx/Manifest
new file mode 100644
index 000000000000..7fcfea872864
--- /dev/null
+++ b/sys-block/mtx/Manifest
@@ -0,0 +1,2 @@
+DIST mtx-1.2.18rel.tar.gz 167728 SHA256 d333f7bcc37029268fbb57e64ba375e849d348b65391447c62e7e153ba55eed2
+DIST mtx-1.3.12.tar.gz 235214 SHA256 0261c5e90b98b6138cd23dadecbc7bc6e2830235145ed2740290e1f35672d843
diff --git a/sys-block/mtx/metadata.xml b/sys-block/mtx/metadata.xml
new file mode 100644
index 000000000000..153df0098213
--- /dev/null
+++ b/sys-block/mtx/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>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">mtx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/mtx/mtx-1.2.18.ebuild b/sys-block/mtx/mtx-1.2.18.ebuild
new file mode 100644
index 000000000000..7a6862ed1095
--- /dev/null
+++ b/sys-block/mtx/mtx-1.2.18.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE=""
+
+DESCRIPTION="Utilities for controlling SCSI media changers and tape drives"
+HOMEPAGE="http://mtx.sourceforge.net"
+LICENSE="GPL-2"
+DEPEND=""
+SRC_URI="ftp://ftp.badtux.net/pub/storage/${PN}/${P}rel.tar.gz"
+KEYWORDS="x86 amd64 sparc alpha ppc hppa ppc64"
+SLOT="0"
+
+src_unpack() {
+ unpack ${A}
+ mv ${P}rel ${S}
+ sed -e 's:/usr/src/linux/include ::' -i ${S}/Makefile.in
+}
+
+src_compile() {
+ econf || die "Configure failed"
+ emake || die "Make failed"
+}
+
+src_install () {
+ dodoc CHANGES COMPATIBILITY FAQ README LICENSE TODO
+ dohtml mtxl.README.html
+ einstall || die "Install failed"
+}
diff --git a/sys-block/mtx/mtx-1.3.12.ebuild b/sys-block/mtx/mtx-1.3.12.ebuild
new file mode 100644
index 000000000000..191d428ff69e
--- /dev/null
+++ b/sys-block/mtx/mtx-1.3.12.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Utilities for controlling SCSI media changers and tape drives"
+HOMEPAGE="http://mtx.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mtx/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE=""
+
+src_install () {
+ einstall || die
+ dodoc CHANGES COMPATABILITY FAQ README TODO
+ dohtml mtxl.README.html
+}
diff --git a/sys-block/nbd/Manifest b/sys-block/nbd/Manifest
new file mode 100644
index 000000000000..031f767777ce
--- /dev/null
+++ b/sys-block/nbd/Manifest
@@ -0,0 +1,18 @@
+DIST nbd-2.9.20.tar.bz2 152395 SHA256 98f0de421f0b2f683d46dff3eb679a3409a41f08e6fad7c2f71f60c5d409939c SHA512 3fb7cc2cd134cc79c352a78875f0579d89eaa3c4d66dc9801126a88ee56e5ff422bce039dddc802bd08fad5b7450d9b95dd3f0590e2c5cb51b59ddf84a5183a6 WHIRLPOOL df0748fec272e74907f13ea4387ec0c80eae500704662792d8d8e48c8fef9396dac9853787bd2f9e1b0881d1c13ef0337dcb00dd0e5cc86e147de1492f91c5e2
+DIST nbd-2.9.21a.tar.bz2 154161 SHA256 9946dd7f4a63cf20ea8617100d0f599211d4a5fd5b6cfb8f50f8975431222bbd SHA512 20b1dacb1503664106e6c1c0a2eb884a104cd484b9bb9396d7b37e1458ef9f824ff1a280edfca37e854818bfa1269379b85d1085b8053349dee9b91e0ff26532 WHIRLPOOL ffd7f5feacea636264be356e6b9f2eae7430a9fb14e3cd253b22344ecf49f742e095e244c8ce13140d3b646270409b0bfff9ad43236dd025536a7bf542a19ecf
+DIST nbd-2.9.22.tar.bz2 490185 SHA256 f9e1a9db1663393fd1f2de2dd70cf15cc4fa17616853b717db7ca6c539f8787d SHA512 7d7d58ca06c9caa5f10836218b27d6889dbb63cd26358eeb84bc3f3c885a7721fbe91782b1fedc13e67e2e66db4c8114175bfb9b92271392ec4d10036be3f912 WHIRLPOOL 0c6598cc0449fb52fc0228ba7ea6aca8a9be10707878c5ef4bdc82adbe600eaabd3005bf3fcb4e4530c7d450b5fd17556d63ff72ba683d7831615e5e74a5c14f
+DIST nbd-2.9.23.tar.bz2 498413 SHA256 0ab44fe9e80c3f41bb1025ecda351a874affd46bf56ba4033ea03700c3b83803 SHA512 dc6e4ce050708fc66058daaf07c70d26ebb644387d7811666f232b33520de289ca6b1cb531c954702528056e78fc1642acf831af7b0eeea4a10d318546bd9388 WHIRLPOOL 737286b3849e24c4d35cde2561ca893f9018a1c69c9118483dd7f619eedb4efcb60a7802905a27aedc79f79c35c1a23f38ec284bd6e8e432829799395e32b949
+DIST nbd-2.9.24.tar.bz2 500247 SHA256 b8f69b3f4cf7961d5c247de9a5c202519563fa2e75b7ada430797166bac6ac08
+DIST nbd-2.9.25.tar.bz2 500483 SHA256 179548406aa2bcb0c6bff3aa0484dbb04136ec055aa385c84fefbe3c9ea96ba4 SHA512 740bf2ecfaedf2c4bda93b7ac9d3e4d8678f7450d6963f7ed97c367b6934684dd6c8100a07fcac6e1d330beeab1f5ca3d9b279c6fbf7867103be15592843fc1f WHIRLPOOL 386e25b0ed5353039036aefe4acd20e410bda63a2aee28a80e2a5b78f5aeb9ab42910e8416ddafd5fd8a56a458d60472d1715c6eb775c0e81205a988aeee2c2a
+DIST nbd-3.0.tar.bz2 505274 SHA256 f7210edfa858f5ae69bdbf76f5467ac9dcaa97074d945e55e2a683e7aa228b93 SHA512 1226ec9bee0148d6af7b6f6dd46382916045a71d87554aab20903aff040a2214286b7b7071f7f34fce12ffde82e660992cd8b75f43864ede64cbfb604ed1248e WHIRLPOOL 1a1567a9d477d60ae91addfcd262418689ff9801a7d801d20ba122bd2116ddeab11046abb99f69bb653d3f9e4797880d0d9a722eff39a1e620bd2d4a990f0757
+DIST nbd-3.1.1.tar.bz2 508444 SHA256 5cd150b874f966aacf4a9dfe1e9de9b2139b295241ce89bae9f70f9aa844220b SHA512 937db191b3cc0800c5a0c31b0d2b634059768f133d42bfd8b13628bb5d6de766b51c5ccc82726b5756e4f7c67878bb36307e04597d8891d175f5334a1b998386 WHIRLPOOL 2a376219f2be2689cccc6ce8277e541ed2154e4dbdd424a6482241b468d432c712b248db0971a7d99dd9aeeb3bd80f6e6b0460ebd824cb53a7c8127a0ec1ffbe
+DIST nbd-3.10.tar.xz 461508 SHA256 6fc53a7a67ab6c786586ee155b76b502d3ff14f4233e9077957968b3bf3847ce SHA512 39b0190e136783ba765079340858c82992392e5711ec046238eb47f9de07163f7d4289b6b1abd35d9d35e61c7ea53fefa3c9dfc7de0deba699663b392277cd4e WHIRLPOOL 81f28e0129291a31b03b0aa57c61acb5a463483f82802a542e0b9d953c7cb7a86337a6ee0145f28740a7e59d21068b8d72d45ad54ac1b6f15d0025387485a0ae
+DIST nbd-3.11.tar.xz 451992 SHA256 14420f74cb16dc609a9302ed1efd653064bed7a8357e9d73daabc33608e3f2a0 SHA512 8d0abf673c7a2a7fbc5a57e0ee1093c86ca205eb664ea08143ff4ce3c8fd94b81a0e89491145159d863d181f70e9ba109487b967097c91fc2399316226bcec0a WHIRLPOOL 23f29b0e82e4672f5edfa223b7b26552ceb7505b6ff43efa151e3357811a2d4f1b599d6b9553a89e07b90b7322a3ac88f256a66d5d7e850758ea5cee4125d849
+DIST nbd-3.2.tar.bz2 508734 SHA256 e297c1883133f04a55d8e9527a2e4344e577a54046cf81694ffabe13f73793db SHA512 dbb751ec74784d8ea89d4df273ba239d66cf1d6fca16fea44a77502d6241132b960bd41dfdde844854e2df68bf27763b215207c0518bde943a2f3c631e4f76ec WHIRLPOOL b863eb8cc0ef7368ac92b8f58748197bf10c93cad06741491cd2ca29eb1d3cab4947272f6a30ac360a054f641dad67f93031f05a609ffaf8636b9a8f34288946
+DIST nbd-3.3.tar.bz2 515909 SHA256 83105718dcab9eee7ea152d6e5f4928095f0d3e21dcf92e43eef183e29a80c19 SHA512 9e43f0f751172a18e9edf0e312ff4e8aee3b0ce303ed6f69308312a4565fb06d4b9e9e528f11470031c6490a8416d41266e18a0d6e249749305e01f200d0b608 WHIRLPOOL 97e994d953c046492216fcc09333b158304df80a310a28e3dceba581d3098962079af82fd3cf7d4816168a06e987b823bb1759be4afab35bd679ad5d4ac3ee91
+DIST nbd-3.4.tar.bz2 582959 SHA256 552a6dfdd69a13217a0c449892acf70fb3a1f0fce745c72ed6d83ee50a0a32cf SHA512 dd08dc2c238a23b3b6e3b0b4422b3b2bface007ed0b4230cff4bf0d2a3f628666d9b34a385883f4ab65d89be05fce3fe7d86598748f294760d61fd2b9bc969a7 WHIRLPOOL 998f2431e0fe580345b4c5ced94fd087aee8564fe7b3e4c48e57e2e33ddd7faf4768ab7433956f8bbdce14b45acb5152d5202f1df45dfd6e1b635b0b9e8bb600
+DIST nbd-3.5.tar.bz2 523049 SHA256 1d3f049d525f50584d012551d138bf6d291f605a92df7d6bb56085ca5a5d363b SHA512 96d055ce56aa2f2f9ed470168e959260c010b05fe8eee47d20a7a01b5c01734a2a85376279fc948e4a0b34a6cf4532d2e8e5b5e189db7830bebe7b96ee847a57 WHIRLPOOL bd5e85d2aea2fa53b72396c9bea046a2bb4230079636c633248e125f3e3e59ba794454560eac995914fa4f8c5d27316fca0636e4dba7e3722cf515b691373c67
+DIST nbd-3.6.tar.xz 454068 SHA256 a6f668a12756ae0cf24980653722a753c6b53553742ac57a309f27e1a9ded8cc SHA512 2ad307e7ce0a3b5b6dc27c19075b61edda384d82dca7f032db285f17c31bda2c5a29db2782ca59b2b34babe35a3d00fea2052df0214f021b4043b6c922160cb8 WHIRLPOOL 9ba42ba54505637f511667edb093f663c31de2b137d902dfa2f053fd93a62aef9f19932149cf43badae5ab96380aeb6f5ec5e7b232b25a122381568af4fde0da
+DIST nbd-3.7.tar.xz 448640 SHA256 0bb4915f468499b98237ec523b97d3f6eb0324c7a94de25159069397cbdb8bcc SHA512 110add829e306855cd981d6a3c8212186e179a9a4fb9cb30c1ae3f59328faf54230b40ad510b218dbf65a276a5b95bf0ffc25fa81296cc4d165e36ad7a6ba8db WHIRLPOOL 48062d84048b11939292f7eea1d81ff190ccc9b81973d6e78e061c34ca4a3d0f2a22d2e5a2d20bf86079310e4158c47e5b489eb4ff83485305c5af3e82cece2c
+DIST nbd-3.8.tar.xz 452624 SHA256 48a223770eb136603dc266587d9a37ed5024132e09e2c8484096d4c46cfed3e2 SHA512 55e0fd0e8c5d244daf82531dc263ddcace7148d0b7dce163cf339a46312ab75d313ea24674b8cb5b8dff4354a69d749f108f5aa79a74ac7fbbc128fbc9bb11de WHIRLPOOL 98342ea0ed0ff619fb3436dace43e3201fe10caa72fc5005599ee1dec1fc8f1e9a6c5b43f1d12c70663e93e7eae306d171b71409345155d38f47afd3747db16e
+DIST nbd-3.9.1.tar.xz 466120 SHA256 99052ff638f7c8ac0ceedc65e4dba78cc8ed0acf8ea7ae99e98cd8be5c1113a0 SHA512 dd8ab066af6761df9ab168e91f421b19a3ffdb230a480fe0d6c311fa356472fd9640d31b2b0e8487b6bb68025859ef31eaada216de6776a31625bd94111dfb5a WHIRLPOOL e32c34e35de3a0c93fa4138a52cccade85e441b484ab4399836225c4c0e0d609b807822ff282cf3bf42700235f1a30a784cfd35642dca20c66caba1d882bbf8a
diff --git a/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch b/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch
new file mode 100644
index 000000000000..eff90faa1962
--- /dev/null
+++ b/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch
@@ -0,0 +1,59 @@
+From 90024f17b682e20a34f35a6ccb437edc10eb5c3b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 2 Dec 2013 00:22:46 -0500
+Subject: [PATCH 1/2] gznbd: use PRId64 for printing 64bit types
+
+Gcc complains about printing these 64bit types:
+
+gznbd.c:199:1: warning: format '%Ld' expects argument of type 'long long int',
+ but argument 5 has type 'u64' [-Wformat]
+
+Use the standard defines from inttypes.h to avoid this issue.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ gznbd/gznbd.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/gznbd/gznbd.c b/gznbd/gznbd.c
+index 09f3d49..bb41156 100644
+--- a/gznbd/gznbd.c
++++ b/gznbd/gznbd.c
+@@ -40,6 +40,7 @@
+ #include <fcntl.h>
+ #include <syslog.h>
+ #include <unistd.h>
++#include <inttypes.h>
+
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+@@ -95,7 +96,7 @@ int main(int argc, char **argv)
+ fprintf(stderr,"%s: %s does not appear to be a valid size\n",argv[0],argv[3]);
+ exit(1);
+ }
+- printf("%s: file=%s, size=%Ld\n",argv[0],argv[2],size);
++ printf("%s: file=%s, size=%"PRId64"\n",argv[0],argv[2],size);
+ } else {
+ char buffer[BLOCK];
+ int result;
+@@ -110,7 +111,7 @@ int main(int argc, char **argv)
+ }
+
+ if(result==0){
+- printf("size=%Ld\n",size);
++ printf("size=%"PRId64"\n",size);
+ } else {
+ printf("failed\n");
+ if(result<0){
+@@ -195,7 +196,7 @@ int main(int argc, char **argv)
+ from=ntohll(request.from);
+
+ #ifdef TRACE
+-fprintf(stderr,"%s: len=%d, from=%Ld\n",argv[0],len,from);
++fprintf(stderr,"%s: len=%d, from=%"PRId64"\n",argv[0],len,from);
+ #endif
+
+ if(request.magic!=htonl(NBD_REQUEST_MAGIC)){
+--
+1.8.4.3
+
diff --git a/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch b/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch
new file mode 100644
index 000000000000..e4609e03ab7a
--- /dev/null
+++ b/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch
@@ -0,0 +1,38 @@
+From 172a5a7c5824237537051247f203a39cc39e3aef Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 2 Dec 2013 00:24:01 -0500
+Subject: [PATCH 2/2] gznbd: fix warning with newer zlib
+
+When you build against newer zlib, you get a lot of warnings like so:
+
+gznbd.c: In function 'main':
+gznbd.c:87:5: warning: assignment from incompatible pointer type [enabled by default]
+gznbd.c:109:5: warning: passing argument 1 of 'gzread' from incompatible pointer type [enabled by default]
+In file included from gznbd.c:37:0:
+/usr/include/zlib.h:1313:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s **'
+gznbd.c:118:9: warning: passing argument 1 of 'gzerror' from incompatible pointer type [enabled by default]
+
+This is because the zlib API uses just gzFile everywhere, not a pointer
+to a gzFile.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ gznbd/gznbd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gznbd/gznbd.c b/gznbd/gznbd.c
+index bb41156..803c1c1 100644
+--- a/gznbd/gznbd.c
++++ b/gznbd/gznbd.c
+@@ -68,7 +68,7 @@ int main(int argc, char **argv)
+ int pr[2];
+ int sk;
+ int nbd;
+- gzFile *gz;
++ gzFile gz;
+ int gzerr;
+
+ char chunk[CHUNK];
+--
+1.8.4.3
+
diff --git a/sys-block/nbd/metadata.xml b/sys-block/nbd/metadata.xml
new file mode 100644
index 000000000000..8ce88b90af59
--- /dev/null
+++ b/sys-block/nbd/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>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">nbd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/nbd/nbd-2.9.20.ebuild b/sys-block/nbd/nbd-2.9.20.ebuild
new file mode 100644
index 000000000000..e4057920af3c
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.20.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ emake || die
+ emake -C gznbd || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dobin gznbd/gznbd || die
+ dodoc README
+}
diff --git a/sys-block/nbd/nbd-2.9.21a.ebuild b/sys-block/nbd/nbd-2.9.21a.ebuild
new file mode 100644
index 000000000000..7f36380e502e
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.21a.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ emake || die
+ emake -C gznbd || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dobin gznbd/gznbd || die
+ dodoc README
+}
diff --git a/sys-block/nbd/nbd-2.9.22.ebuild b/sys-block/nbd/nbd-2.9.22.ebuild
new file mode 100644
index 000000000000..e4057920af3c
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.22.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ emake || die
+ emake -C gznbd || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dobin gznbd/gznbd || die
+ dodoc README
+}
diff --git a/sys-block/nbd/nbd-2.9.23.ebuild b/sys-block/nbd/nbd-2.9.23.ebuild
new file mode 100644
index 000000000000..7f36380e502e
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.23.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ emake || die
+ emake -C gznbd || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dobin gznbd/gznbd || die
+ dodoc README
+}
diff --git a/sys-block/nbd/nbd-2.9.24.ebuild b/sys-block/nbd/nbd-2.9.24.ebuild
new file mode 100644
index 000000000000..707fb257a232
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.24.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ emake
+ emake -C gznbd
+}
+
+src_install() {
+ default
+ dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-2.9.25.ebuild b/sys-block/nbd/nbd-2.9.25.ebuild
new file mode 100644
index 000000000000..9ec3117081b8
--- /dev/null
+++ b/sys-block/nbd/nbd-2.9.25.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.0.ebuild b/sys-block/nbd/nbd-3.0.ebuild
new file mode 100644
index 000000000000..9ec3117081b8
--- /dev/null
+++ b/sys-block/nbd/nbd-3.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.1.1.ebuild b/sys-block/nbd/nbd-3.1.1.ebuild
new file mode 100644
index 000000000000..9ec3117081b8
--- /dev/null
+++ b/sys-block/nbd/nbd-3.1.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.10.ebuild b/sys-block/nbd/nbd-3.10.ebuild
new file mode 100644
index 000000000000..3698be613bfe
--- /dev/null
+++ b/sys-block/nbd/nbd-3.10.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug) \
+ $(use_enable zlib gznbd)
+}
diff --git a/sys-block/nbd/nbd-3.11.ebuild b/sys-block/nbd/nbd-3.11.ebuild
new file mode 100644
index 000000000000..dd13e25c423c
--- /dev/null
+++ b/sys-block/nbd/nbd-3.11.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 ~sparc x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug) \
+ $(use_enable zlib gznbd)
+}
diff --git a/sys-block/nbd/nbd-3.2.ebuild b/sys-block/nbd/nbd-3.2.ebuild
new file mode 100644
index 000000000000..b5512bd929ee
--- /dev/null
+++ b/sys-block/nbd/nbd-3.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~sparc x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.3.ebuild b/sys-block/nbd/nbd-3.3.ebuild
new file mode 100644
index 000000000000..ca906ccc4e82
--- /dev/null
+++ b/sys-block/nbd/nbd-3.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.4.ebuild b/sys-block/nbd/nbd-3.4.ebuild
new file mode 100644
index 000000000000..ca906ccc4e82
--- /dev/null
+++ b/sys-block/nbd/nbd-3.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.5.ebuild b/sys-block/nbd/nbd-3.5.ebuild
new file mode 100644
index 000000000000..c59f8ed940c5
--- /dev/null
+++ b/sys-block/nbd/nbd-3.5.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~sparc x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gznbd-printf-u64.patch
+ epatch "${FILESDIR}"/${P}-gznbd-zlib.patch
+}
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.6.ebuild b/sys-block/nbd/nbd-3.6.ebuild
new file mode 100644
index 000000000000..929466b2f8f6
--- /dev/null
+++ b/sys-block/nbd/nbd-3.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.7.ebuild b/sys-block/nbd/nbd-3.7.ebuild
new file mode 100644
index 000000000000..929466b2f8f6
--- /dev/null
+++ b/sys-block/nbd/nbd-3.7.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.8.ebuild b/sys-block/nbd/nbd-3.8.ebuild
new file mode 100644
index 000000000000..929466b2f8f6
--- /dev/null
+++ b/sys-block/nbd/nbd-3.8.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ default
+ use zlib && emake -C gznbd CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ use zlib && dobin gznbd/gznbd
+}
diff --git a/sys-block/nbd/nbd-3.9.1.ebuild b/sys-block/nbd/nbd-3.9.1.ebuild
new file mode 100644
index 000000000000..3698be613bfe
--- /dev/null
+++ b/sys-block/nbd/nbd-3.9.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland client/server for kernel network block device"
+HOMEPAGE="http://nbd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nbd/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug zlib"
+
+RDEPEND=">=dev-libs/glib-2.0
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-lfs \
+ --enable-syslog \
+ $(use_enable debug) \
+ $(use_enable zlib gznbd)
+}
diff --git a/sys-block/noflushd/Manifest b/sys-block/noflushd/Manifest
new file mode 100644
index 000000000000..114cf9a9c67e
--- /dev/null
+++ b/sys-block/noflushd/Manifest
@@ -0,0 +1,4 @@
+DIST noflushd-2.7.3.tar.gz 145328 SHA256 d9ce71ba8603ed146b1066aca180746577910e75903dcda7e32276d99382f149
+DIST noflushd-2.7.4.tar.gz 149686 SHA256 4118451009808ba18bc773b872ac43f1e4244a09d39126210860f846248e2360
+DIST noflushd-2.8.tar.gz 180386 SHA256 aa9ab7e58d9c34e189ac63279fd8f5772564630d26c9f036b4943ecece54c278 SHA512 2bffb61aa380409efc43e7ff93d1efd93812dd2c66b4635101a608f1bd5094545e4db64e03fd318be3d3ac50be6e7278b17d9bb9ccd30c52f5e2e4337f749b50 WHIRLPOOL 950badd20e0e0d8cdd0211e1d30b1f426d3cd6922d823c50af1da4588c0e11e7387e951f046dcb24792979bba6c4bbe3dc8971c6010e16f3313c4c029bd8f2ab
+DIST noflushd_2.7.5.orig.tar.gz 149854 SHA256 f96aa8ec9e477725d5e23f5e4ab13b31d21ef190c4d28e3802f2f1a6894aadb7
diff --git a/sys-block/noflushd/files/noflushd.confd b/sys-block/noflushd/files/noflushd.confd
new file mode 100644
index 000000000000..846c8b27ef2c
--- /dev/null
+++ b/sys-block/noflushd/files/noflushd.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/noflushd
+
+#TIMEOUT=60
+#DISKS=/dev/discs/disc0/disc
+#EXTRA=
+#NOFLUSHD_OPTS="-n $TIMEOUT $DISKS $EXTRA"
+
diff --git a/sys-block/noflushd/files/noflushd.rc6 b/sys-block/noflushd/files/noflushd.rc6
new file mode 100755
index 000000000000..04d8c3cf8548
--- /dev/null
+++ b/sys-block/noflushd/files/noflushd.rc6
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# NB: Config is in /etc/conf.d/noflushd
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ -z "$NOFLUSHD_OPTS" ] ; then
+ eerror "You need to setup your NOFLUSHD_OPTS first"
+ eerror "Check that you've adjusted /etc/conf.d/noflushd for your needs"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting noflushd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/noflushd -- $NOFLUSHD_OPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping noflushd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/noflushd.pid
+ eend $?
+}
diff --git a/sys-block/noflushd/metadata.xml b/sys-block/noflushd/metadata.xml
new file mode 100644
index 000000000000..cab7039c0aaf
--- /dev/null
+++ b/sys-block/noflushd/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>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">noflushd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/noflushd/noflushd-2.7.3.ebuild b/sys-block/noflushd/noflushd-2.7.3.ebuild
new file mode 100644
index 000000000000..e4bc362b7462
--- /dev/null
+++ b/sys-block/noflushd/noflushd-2.7.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A daemon to spin down your disks and force accesses to be cached"
+HOMEPAGE="http://noflushd.sourceforge.net"
+SRC_URI="mirror://sourceforge/noflushd/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64 ppc"
+IUSE=""
+SLOT="0"
+
+src_compile() {
+ ./configure --prefix=/usr \
+ --host=${CHOST} \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-docdir=/usr/share/doc/${PF} || die "configure problem"
+ emake || die "compile problem"
+}
+
+src_install () {
+ dosbin src/noflushd
+ doman man/noflushd.8
+ dodoc README NEWS
+
+ newinitd "${FILESDIR}"/noflushd.rc6 noflushd
+ newconfd "${FILESDIR}"/noflushd.confd noflushd
+}
+
+pkg_postinst() {
+ einfo 'Run "rc-update add noflushd default" to add it to the'
+ einfo "default runlevel."
+
+ ewarn "noflushd works with IDE devices only."
+ ewarn "It has possible problems with reiserfs, too."
+}
diff --git a/sys-block/noflushd/noflushd-2.7.4.ebuild b/sys-block/noflushd/noflushd-2.7.4.ebuild
new file mode 100644
index 000000000000..439fc4a305ff
--- /dev/null
+++ b/sys-block/noflushd/noflushd-2.7.4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A daemon to spin down your disks and force accesses to be cached"
+HOMEPAGE="http://noflushd.sourceforge.net"
+SRC_URI="mirror://sourceforge/noflushd/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+SLOT="0"
+
+src_compile() {
+ ./configure --prefix=/usr \
+ --host=${CHOST} \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-docdir=/usr/share/doc/${PF} || die "configure problem"
+ emake || die "compile problem"
+}
+
+src_install () {
+ dosbin src/noflushd
+ doman man/noflushd.8
+ dodoc README NEWS
+
+ newinitd "${FILESDIR}"/noflushd.rc6 noflushd
+ newconfd "${FILESDIR}"/noflushd.confd noflushd
+}
+
+pkg_postinst() {
+ einfo 'Run "rc-update add noflushd default" to add it to the'
+ einfo "default runlevel."
+
+ ewarn "noflushd works with IDE devices only."
+ ewarn "It has possible problems with reiserfs, too."
+}
diff --git a/sys-block/noflushd/noflushd-2.7.5.ebuild b/sys-block/noflushd/noflushd-2.7.5.ebuild
new file mode 100644
index 000000000000..8598a589848e
--- /dev/null
+++ b/sys-block/noflushd/noflushd-2.7.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A daemon to spin down your disks and force accesses to be cached"
+HOMEPAGE="http://noflushd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/noflushd/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_compile() {
+ econf \
+ --with-docdir=/usr/share/doc/${PF} \
+ --with-initdir=/etc/init.d
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc NEWS
+ prepalldocs
+
+ newinitd "${FILESDIR}"/noflushd.rc6 noflushd
+ newconfd "${FILESDIR}"/noflushd.confd noflushd
+}
+
+pkg_postinst() {
+ ewarn "noflushd works with IDE devices only."
+ ewarn "It has possible problems with reiserfs, too."
+}
diff --git a/sys-block/noflushd/noflushd-2.8.ebuild b/sys-block/noflushd/noflushd-2.8.ebuild
new file mode 100644
index 000000000000..3e54d7df6806
--- /dev/null
+++ b/sys-block/noflushd/noflushd-2.8.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A daemon to spin down your disks and force accesses to be cached"
+HOMEPAGE="http://noflushd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/noflushd/${PN}-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_configure() {
+ econf \
+ --with-docdir=/usr/share/doc/${PF} \
+ --with-initdir=/etc/init.d
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc NEWS
+
+ newinitd "${FILESDIR}"/noflushd.rc6 noflushd
+ newconfd "${FILESDIR}"/noflushd.confd noflushd
+}
+
+pkg_postinst() {
+ ewarn "noflushd works with IDE devices only."
+ ewarn "It has possible problems with reiserfs, too."
+}
diff --git a/sys-block/nwutil/Manifest b/sys-block/nwutil/Manifest
new file mode 100644
index 000000000000..ea64f5c66168
--- /dev/null
+++ b/sys-block/nwutil/Manifest
@@ -0,0 +1,3 @@
+DIST nwutil-1.8.tar.gz 83877 RMD160 8969d0190b67d94fda95582ab9324611ed561b70 SHA1 98464d4b9ceebca7a85477df316e3d8e387e10b8 SHA256 8a73d7e78ba57a1b49577f6dfddec15ff20ecbb2e6d971f5a334ef4b0527c80c
+DIST nwutil_1.4-3.diff.gz 4795 RMD160 1bef3a2cf0529771a17f599dd09a8b1139b72cb2 SHA1 d00f5fd502c48efa20e236c603fda61cb69406ad SHA256 d32400cb7124bb3e7167c8f6b54469a890bf73a42b99493b9f7a27cf4f6fa37e
+DIST nwutil_1.4.orig.tar.gz 16587 RMD160 34dcb18e17372fc79efa66e77c9eb5e796235ce0 SHA1 1d1252ac37f095b3ed6b0791fdfdb31f33feb0d8 SHA256 9597a44da146e8ea5944b3bdade737801c21b4e405cf469f52f49bd0e3942efd
diff --git a/sys-block/nwutil/files/1.4-errno.patch b/sys-block/nwutil/files/1.4-errno.patch
new file mode 100644
index 000000000000..a78c2128b2fa
--- /dev/null
+++ b/sys-block/nwutil/files/1.4-errno.patch
@@ -0,0 +1,11 @@
+--- debug.c.orig 2004-06-26 04:21:23.881871000 +0000
++++ debug.c 2004-06-26 04:21:36.941871000 +0000
+@@ -52,7 +52,7 @@
+ #define UNLOCK outb(0x370, 0x87); outb(0x370, 0x87);
+ #define LOCK outb(0x370, 0xAA);
+
+-extern int errno;
++#include <errno.h>
+
+ int tmpSuperIO;
+
diff --git a/sys-block/nwutil/files/1.4-rename-debug.patch b/sys-block/nwutil/files/1.4-rename-debug.patch
new file mode 100644
index 000000000000..a5d09a57e5ef
--- /dev/null
+++ b/sys-block/nwutil/files/1.4-rename-debug.patch
@@ -0,0 +1,40 @@
+diff -ur work.orig/Makefile work/Makefile
+--- work.orig/Makefile 2004-06-27 21:29:50.711871000 +0000
++++ work/Makefile 2004-06-27 21:31:11.591871000 +0000
+@@ -2,8 +2,8 @@
+
+ CC = gcc
+ CFLAGS = -O2 -fsigned-char -omit-frame-pointer -Wall
+-OBJS = start_wdog set_therm fan_ctrl debug
+-MANPGS = start_wdog.8 set_therm.8 fan_ctrl.8 debug.8
++OBJS = start_wdog set_therm fan_ctrl nwdebug
++MANPGS = start_wdog.8 set_therm.8 fan_ctrl.8 nwdebug.8
+ PREFIX = $(DESTDIR)/usr
+
+ all: $(OBJS)
+diff -ur work.orig/debug.8 work/debug.8
+--- work.orig/debug.8 2004-06-27 21:29:50.711871000 +0000
++++ work/debug.8 2004-06-27 21:30:54.931871000 +0000
+@@ -1,8 +1,8 @@
+-.TH debug 8 "November 8 1998" "CCC" "Corel NetWinder Utilities"
++.TH nwdebug 8 "November 8 1998" "CCC" "Corel NetWinder Utilities"
+ .SH NAME
+-debug \- low-level hardware debugger utility
++nwdebug \- low-level hardware debugger utility
+ .SH SYNOPSIS
+-.B debug
++.B nwdebug
+ .SH DESCRIPTION
+ This program allows you to display and/or modify memory or I/O registers.
+ It bears some resemblance to the DOS program of the same name. This is not
+@@ -22,8 +22,8 @@
+ ie. what the CPU sees at one particular address will be addressed at a
+ different address if a PCI device needs to do DMA.
+ .SH FILES
+-.I /sbin/debug
+-.I /man/man8/debug.8
++.I /sbin/nwdebug
++.I /man/man8/nwdebug.8
+ .SH DIAGNOSTICS
+ The program must be run by the super-user or it will fail with a polite
+ error message. This is to avoid arbitrary users from writing values into
diff --git a/sys-block/nwutil/files/nwutil-1.4-temp.patch b/sys-block/nwutil/files/nwutil-1.4-temp.patch
new file mode 100644
index 000000000000..3a786fdfa64e
--- /dev/null
+++ b/sys-block/nwutil/files/nwutil-1.4-temp.patch
@@ -0,0 +1,24 @@
+Newer kernels name the device 'temp' so try both.
+
+--- fan_ctrl.c
++++ fan_ctrl.c
+@@ -73,6 +73,8 @@ main (int argc, char **argv)
+
+ fd = open ("/dev/temperature", O_RDWR);
+ if (fd < 0)
++ fd = open ("/dev/temp", O_RDWR);
++ if (fd < 0)
+ {
+ printf ("Error %d opening /dev/temperature\n", fd);
+ return EXIT_FAILURE;
+--- set_therm.c
++++ set_therm.c
+@@ -66,6 +66,8 @@ main (int argc, char **argv)
+
+ fd = open ("/dev/temperature", O_RDWR);
+ if (fd < 0)
++ fd = open ("/dev/temp", O_RDWR);
++ if (fd < 0)
+ {
+ printf ("Error %d opening /dev/temperature\n", fd);
+ return EXIT_FAILURE;
diff --git a/sys-block/nwutil/metadata.xml b/sys-block/nwutil/metadata.xml
new file mode 100644
index 000000000000..5454528f2093
--- /dev/null
+++ b/sys-block/nwutil/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>arm</herd>
+</pkgmetadata>
diff --git a/sys-block/nwutil/nwutil-1.4.ebuild b/sys-block/nwutil/nwutil-1.4.ebuild
new file mode 100644
index 000000000000..fce906c7d6ad
--- /dev/null
+++ b/sys-block/nwutil/nwutil-1.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DEB_VER=3
+DESCRIPTION="Netwinder hardware utilities"
+HOMEPAGE="http://packages.debian.org/stable/base/nwutil"
+SRC_URI="mirror://debian/pool/main/n/nwutil/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/n/nwutil/${PN}_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* arm"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_VER}.diff
+ epatch "${FILESDIR}"/${PV}-errno.patch
+ epatch "${FILESDIR}"/${PV}-rename-debug.patch
+ epatch "${FILESDIR}"/${P}-temp.patch
+ mv {,nw}debug.c
+ mv {,nw}debug.8
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" || die "emake main failed"
+ emake -C flashlogo || die "emake flashlogo failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "install main failed"
+ make DESTDIR="${D}" install -C flashlogo || die "install flashlogo failed"
+}
diff --git a/sys-block/nwutil/nwutil-1.8.ebuild b/sys-block/nwutil/nwutil-1.8.ebuild
new file mode 100644
index 000000000000..2a38f8221d0d
--- /dev/null
+++ b/sys-block/nwutil/nwutil-1.8.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Netwinder hardware utilities"
+HOMEPAGE="http://packages.debian.org/stable/base/nwutil"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* arm"
+IUSE=""
+
+DEPEND=""
+
+src_install() {
+ make DESTDIR="${D}" install || die "install main failed"
+ dodoc ChangeLog README
+}
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
new file mode 100644
index 000000000000..10492fa68361
--- /dev/null
+++ b/sys-block/open-iscsi/Manifest
@@ -0,0 +1,2 @@
+DIST open-iscsi-2.0-872.tar.gz 900081 SHA256 37753697a170223ac02a292b3a23a315a3c747b490c42480e4057b676c9f8d4f SHA512 d26c87772b0b1d13a8bd2eea9db86b3c61af83efbb788116c01ab6a914ff3de634a7b1bff56c1161b28965315543edbfc2735b6c7fbd3f7797471fde63b69cc0 WHIRLPOOL 4b04c8481c6c5f094ca6f7761828006a84eda7a22a6b3a4d65e7b3e4b39e73ef839ec710b491e7ca731b047fa8c74a9c03a17e85519a62dfbeb95222cfbdd935
+DIST open-iscsi-2.0-873.tar.gz 667069 SHA256 7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9 SHA512 4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b WHIRLPOOL 05af106f11da9f9f02c10edd5412d0f99816349e06e192059700eb1ae24a36027c3f0d7ed423aa7bb1c0b9d8b3aa1b6aa72a2aadb00f27762edf16b7f7d08c09
diff --git a/sys-block/open-iscsi/files/99-iscsi.rules b/sys-block/open-iscsi/files/99-iscsi.rules
new file mode 100644
index 000000000000..74c8e14bc540
--- /dev/null
+++ b/sys-block/open-iscsi/files/99-iscsi.rules
@@ -0,0 +1 @@
+KERNEL=="sd*", SUBSYSTEMS=="block", RUN{program}="/etc/udev/scripts/iscsidev.sh"
diff --git a/sys-block/open-iscsi/files/initiatorname.iscsi b/sys-block/open-iscsi/files/initiatorname.iscsi
new file mode 100644
index 000000000000..9a80438ee9d4
--- /dev/null
+++ b/sys-block/open-iscsi/files/initiatorname.iscsi
@@ -0,0 +1,31 @@
+# Copyright 1999-2005 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+#
+# This file must contain a InitiatorName entry!
+# white space is significent here!
+#InitiatorName=iqn.2005-09.tld.domain.hostname:openiscsi-initiator
+#InitiatorAlias=foobar
+
+# Sample documentation follows:
+
+# The InitiatorName should take the following format
+# iqn.${YEAR}-${MONTH}-${DOMAIN_REVERSED}.${HOSTNAME}:${UNIQUE_STRING}
+# Where YEAR and MONTH are the dates that your domain was registered.
+# You can use WHOIS to find when your domain was registered.
+# If you don't have a real domain in the outside world, invent one, but use
+# .local for your top-level.
+
+# Example case #1:
+# This assumes you own foobar.co.uk.
+# Domain name: foobar.co.uk.
+# Registration date: March 2001
+# Hostname: linux
+# InitiatorName=iqn.2001-03.uk.co.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216
+
+# Example case #2:
+# This assumes you don't have a domain of your own.
+# Domain name: foobar.local
+# Registration date: March 2001
+# Hostname: linux
+# InitiatorName=iqn.2001-03.local.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216
diff --git a/sys-block/open-iscsi/files/iscsid-conf.d b/sys-block/open-iscsi/files/iscsid-conf.d
new file mode 100644
index 000000000000..02e584fbce52
--- /dev/null
+++ b/sys-block/open-iscsi/files/iscsid-conf.d
@@ -0,0 +1,18 @@
+# /etc/conf.d/iscsid
+
+# config file to use
+CONFIG_FILE=/etc/iscsi/iscsid.conf
+
+# you need to specify an initiatorname in the file
+INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi
+
+# options to pass to iscsid
+OPTS="-i ${INITIATORNAME_FILE}"
+
+# Start automatic targets when iscsid is started
+AUTOSTARTTARGETS="yes"
+
+# if set to "strict", iscsid will stop, if connecting the
+# autostart targets failed
+# AUTOSTART="strict"
+
diff --git a/sys-block/open-iscsi/files/iscsid-init.d b/sys-block/open-iscsi/files/iscsid-init.d
new file mode 100644
index 000000000000..6bd49ab09afe
--- /dev/null
+++ b/sys-block/open-iscsi/files/iscsid-init.d
@@ -0,0 +1,107 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+command="/usr/sbin/iscsid"
+command_args="${OPTS}"
+start_stop_daemon_args="-w 100" # iscsid might fail e.g. when the iSCSI kernel modules aren't available
+pidfile=${PIDFILE:-/var/run/${SVCNAME}.pid}
+
+extra_started_commands="starttargets stoptargets"
+extra_commands="restarttargets"
+
+ISCSIADM=/usr/sbin/iscsiadm
+
+depend() {
+ after modules multipath
+ use net
+}
+
+checkconfig() {
+ if [ ! -e /etc/conf.d/${SVCNAME} ]; then
+ eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
+ return 1
+ fi
+ if [ ! -e "${CONFIG_FILE}" ]; then
+ eerror "Config file ${CONFIG_FILE} does not exist!"
+ return 1
+ fi
+
+ if [ -e ${INITIATORNAME_FILE} ]; then
+ . ${INITIATORNAME_FILE}
+ fi
+ if [ ! -e ${INITIATORNAME_FILE} -o -z "${InitiatorName}" ]; then
+ ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
+ local IQN=$(/usr/sbin/iscsi-iname)
+ ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
+ echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}"
+ eend $?
+ fi
+}
+
+starttargets() {
+ ebegin "Setting up iSCSI targets"
+ $ISCSIADM -m node --loginall=automatic
+ local ret=$?
+ eend $ret
+ return $ret
+}
+
+stoptargets() {
+ ebegin "Disconnecting iSCSI targets"
+ sync
+ $ISCSIADM -m node --logoutall=all
+ local ret=$?
+
+ if [ $ret -eq 21 ]; then
+ # See man iscsiadm(8)
+ einfo "No active sessions to disconnect"
+ eend 0
+ return 0
+ fi
+
+ eend $ret
+ return $ret
+}
+
+restarttargets() {
+ stoptargets
+ starttargets
+}
+
+status() {
+ ebegin "Showing current active iSCSI sessions"
+ $ISCSIADM -m session
+}
+
+
+start_pre() {
+ local ret=1
+
+ ebegin "Checking Open-iSCSI configuration"
+ checkconfig
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eend 1
+ return 1
+ fi
+ eend 0
+}
+
+start_post() {
+ # Start automatic targets when iscsid is started
+ if [ "${AUTOSTARTTARGETS}" = "yes" ]; then
+ starttargets
+ local ret=$?
+ if [ "${AUTOSTART}" = "strict" -a $ret -ne 0 ]; then
+ stop
+ return $ret
+ fi
+ fi
+ return 0
+}
+
+stop_pre() {
+ stoptargets
+}
diff --git a/sys-block/open-iscsi/files/iscsidev.sh b/sys-block/open-iscsi/files/iscsidev.sh
new file mode 100644
index 000000000000..d045fae570fc
--- /dev/null
+++ b/sys-block/open-iscsi/files/iscsidev.sh
@@ -0,0 +1,78 @@
+#!/usr/bin/env bash
+
+# KERNEL=="sd*", SUBSYSTEMS=="block", RUN{program}="/etc/udev/scripts/iscsidev.sh"
+
+# we only care about iscsi devices
+[[ $ID_VENDOR = "IET" ]] || exit 1
+
+# don't care about partitions either
+echo $DEVNAME | egrep -q "[0-9]$"
+status=$?
+[[ $status != 0 ]] || exit 1
+
+#ID_MODEL=VIRTUAL-DISK
+#ID_MODEL_ENC=VIRTUAL-DISK
+#ID_REVISION=0001
+#DEVTYPE=disk
+#ID_BUS=scsi
+#SUBSYSTEM=block
+#ID_SERIAL=1IET_00010001
+#DEVPATH=/devices/platform/host74/session68/target74:0:0/74:0:0:1/block/sde
+#ID_VENDOR_ENC=IET\x20\x20\x20\x20\x20
+#MINOR=64
+#ID_SCSI=1
+#ACTION=add
+#PWD=/
+#ID_PART_TABLE_UUID=54f71c65-a5d5-45cd-8915-5ffd5ff4fea6
+#ID_FS_TYPE=
+#USEC_INITIALIZED=999037905
+#MAJOR=8
+#ID_SCSI_SERIAL=beaf11
+#DEVLINKS=/dev/disk/by-id/scsi-1IET_00010001
+#DEVNAME=/dev/sde
+#SHLVL=1
+#ID_TYPE=disk
+#ID_PART_TABLE_TYPE=gpt
+#ID_VENDOR=IET
+#ID_SERIAL_SHORT=IET_00010001
+#SEQNUM=25775
+
+# do the removal
+if [[ $ACTION = 'remove' ]]; then
+ # nohup needed so this isn't constantly run...
+ nohup find -L /dev/disk/by-path/ -type l -lname ${DEVNAME} -exec rm "{}" + 2>/dev/null &
+ exit 0
+fi
+
+TARGET_NAME=$(lsscsi -t | grep "${DEVNAME}" | awk '{print $3}' | awk -F, '{print $1}')
+[[ $TARGET_NAME = '' ]] && exit 1
+
+# we don't know which host is correct
+declare -a POSSIBLE_HOSTS
+declare -a POSSIBLE_PORTS
+for item in $(cat /sys/class/iscsi_connection/connection*/address); do
+ POSSIBLE_HOSTS+=("${item}")
+done
+for item in $(cat /sys/class/iscsi_connection/connection*/port); do
+ POSSIBLE_PORTS+=("${item}")
+done
+
+#get correct ip and port
+for ((i=0;i<${#POSSIBLE_HOSTS[@]};++i)); do
+ printf "%s is in %s\n" "$POSSIBLE_HOSTS[i]}" "${POSSIBLE_PORTS[i]}"
+ iscsiadm --mode node --targetname "${TARGET_NAME}" -p "${POSSIBLE_HOSTS[i]}":"${POSSIBLE_PORTS[i]}"
+ status=$?
+ if [[ $status = 0 ]]; then
+ TARGET_IP="${POSSIBLE_HOSTS[i]}"
+ TARGET_PORT="${POSSIBLE_PORTS[i]}"
+ break
+ fi
+done
+
+# exit if not found
+[[ -z $TARGET_IP ]] && exit 1
+[[ -z $TARGET_PORT ]] && exit 1
+
+# actually create the link
+mkdir -p /dev/disk/by-path/
+ln -s "${DEVNAME}" "/dev/disk/by-path/ip-${TARGET_IP}:${TARGET_PORT}-iscsi-${TARGET_NAME}-lun-1"
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d b/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d
new file mode 100644
index 000000000000..02e584fbce52
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d
@@ -0,0 +1,18 @@
+# /etc/conf.d/iscsid
+
+# config file to use
+CONFIG_FILE=/etc/iscsi/iscsid.conf
+
+# you need to specify an initiatorname in the file
+INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi
+
+# options to pass to iscsid
+OPTS="-i ${INITIATORNAME_FILE}"
+
+# Start automatic targets when iscsid is started
+AUTOSTARTTARGETS="yes"
+
+# if set to "strict", iscsid will stop, if connecting the
+# autostart targets failed
+# AUTOSTART="strict"
+
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch
new file mode 100644
index 000000000000..185f1acd8373
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch
@@ -0,0 +1,11 @@
+--- open-iscsi-2.0-872.orig/Makefile
++++ open-iscsi-2.0-872/Makefile
+@@ -27,7 +27,7 @@ IFACEFILES = etc/iface.example
+ all: user kernel
+
+ user: ;
+- cd utils/open-isns; ./configure; $(MAKE)
++ cd utils/open-isns; $(MAKE)
+ $(MAKE) -C utils/sysdeps
+ $(MAKE) -C utils/fwparam_ibft
+ $(MAKE) -C usr
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch
new file mode 100644
index 000000000000..61717032940a
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch
@@ -0,0 +1,10 @@
+--- usr/iscsid.c 2010-10-10 23:06:37.000000000 +0200
++++ usr/iscsid.c 2010-10-10 23:07:55.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <sys/utsname.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
++#include <sys/stat.h>
+
+ #include "iscsid.h"
+ #include "mgmt_ipc.h"
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1 b/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1
new file mode 100644
index 000000000000..aa6cebf690e6
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1
@@ -0,0 +1,131 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+opts="${opts} starttargets stoptargets restarttargets"
+
+depend() {
+ after modules
+ use net
+}
+
+PIDFILE=${PIDFILE:-/var/run/${SVCNAME}.pid}
+BINARY="/usr/sbin/iscsid"
+
+checkconfig() {
+ if [ ! -e /etc/conf.d/${SVCNAME} ]; then
+ eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
+ return 1
+ fi
+ if [ ! -e "${CONFIG_FILE}" ]; then
+ eerror "Config file ${CONFIG_FILE} does not exist!"
+ return 1
+ fi
+ if [ ! -e ${INITIATORNAME_FILE} ] || [ ! "$(grep "^InitiatorName=iqn\." ${INITIATORNAME_FILE})" ]; then
+ ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
+ IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi
+ IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g')
+ ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
+ echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}"
+ eend $?
+ fi
+}
+
+do_modules() {
+ msg="$1"
+ shift
+ modules="${1}"
+ shift
+ modopts="$@"
+ for m in ${modules}
+ do
+ if modprobe --show --quiet "${m}"
+ then
+ ebegin "${msg} ${m}"
+ modprobe ${modopts} ${m}
+ ret=$?
+ eend ${ret}
+ if [ ${ret} -ne 0 ]; then
+ return ${ret}
+ fi
+ else
+ ebegin "${msg} ${m}: not found"
+ return 1
+ fi
+ done
+ return 0
+}
+
+start() {
+ ebegin "Checking open-iSCSI configuration"
+ checkconfig
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eend 1
+ return 1
+ fi
+ ebegin "Loading iSCSI modules"
+ do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eend 1
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec ${BINARY} -- ${OPTS}
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eend $?
+ return $?
+ fi
+
+ # Start automatic targets when iscsid is started
+ if [ "${AUTOSTARTTARGETS}" = "yes" ]; then
+ starttargets
+ ret=$?
+ if [ "${AUTOSTART}" = "strict" ] && [ $ret -ne 0 ]; then
+ stop
+ return $ret
+ fi
+ fi
+ return 0
+}
+
+stop() {
+ stoptargets
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec ${BINARY} --pidfile ${PIDFILE}
+ eend $?
+
+ do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi libiscsi' '-r'
+ eend $?
+}
+
+starttargets() {
+ ebegin "Setting up iSCSI targets"
+ /usr/sbin/iscsiadm -m node --loginall=automatic
+ ret=$?
+ eend $ret
+ return $ret
+}
+
+stoptargets() {
+ ebegin "Disconnecting iSCSI targets"
+ sync
+ /usr/sbin/iscsiadm -m node --logoutall=all
+ ret=$?
+ eend $ret
+ return $ret
+}
+
+restarttargets() {
+ stoptargets
+ starttargets
+}
+
+status() {
+ ebegin "Showing current active iSCSI sessions"
+ /usr/sbin/iscsiadm -m session
+}
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch
new file mode 100644
index 000000000000..db280a3dd862
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch
@@ -0,0 +1,16 @@
+diff -Nuar open-iscsi-2.0-872.orig/usr/Makefile open-iscsi-2.0-872/usr/Makefile
+--- open-iscsi-2.0-872.orig/usr/Makefile 2012-02-09 08:25:13.656604152 +0000
++++ open-iscsi-2.0-872/usr/Makefile 2012-02-09 08:26:28.960171260 +0000
+@@ -53,10 +53,10 @@
+
+ iscsid: $(ISCSI_LIB_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
+ iscsid.o session_mgmt.o discoveryd.o
+- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns $(SLP_LIBS) -lcrypto
+
+ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
+- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns $(SLP_LIBS) -lcrypto
+
+ iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
+ iscsistart.o statics.o
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch
new file mode 100644
index 000000000000..fc02cbcc1ec4
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch
@@ -0,0 +1,11 @@
+--- utils/Makefile 2011-05-31 01:30:27.302609540 +0200
++++ utils/Makefile 2011-05-31 01:32:50.229602790 +0200
+@@ -6,7 +6,7 @@
+ all: $(PROGRAMS)
+
+ iscsi-iname: md5.o iscsi-iname.o
+- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
+
+ clean:
+ rm -f *.o $(PROGRAMS) .depend
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch
new file mode 100644
index 000000000000..fb563d10e1bc
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch
@@ -0,0 +1,55 @@
+diff -NuarwbB open-iscsi-2.0-872/usr/Makefile open-iscsi-2.0-872.orig/usr/Makefile
+--- open-iscsi-2.0-872.orig/usr/Makefile 2012-02-09 08:58:04.402623915 +0000
++++ open-iscsi-2.0-872/usr/Makefile 2012-02-09 08:56:51.159070006 +0000
+@@ -65,6 +65,6 @@
+ rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
+
+ depend:
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+- gcc $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff -NuarwbB open-iscsi-2.0-872/utils/fwparam_ibft/Makefile open-iscsi-2.0-872.orig/utils/fwparam_ibft/Makefile
+--- open-iscsi-2.0-872.orig/utils/fwparam_ibft/Makefile 2012-02-09 08:57:58.579273051 +0000
++++ open-iscsi-2.0-872/utils/fwparam_ibft/Makefile 2010-08-11 15:27:07.000000000 +0000
+@@ -38,6 +38,6 @@
+ $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h
+
+ depend:
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+- gcc $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff -NuarwbB open-iscsi-2.0-872/utils/Makefile open-iscsi-2.0-872.orig/utils/Makefile
+--- open-iscsi-2.0-872.orig/utils/Makefile 2012-02-09 08:57:37.825877235 +0000
++++ open-iscsi-2.0-872/utils/Makefile 2012-02-09 08:56:51.145736633 +0000
+@@ -12,6 +12,6 @@
+ rm -f *.o $(PROGRAMS) .depend
+
+ depend:
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+- gcc $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff -NuarwbB open-iscsi-2.0-872/utils/open-isns/Makefile.in open-iscsi-2.0-872.orig/utils/open-isns/Makefile.in
+--- open-iscsi-2.0-872.orig/utils/open-isns/Makefile.in 2012-02-09 08:57:47.812573971 +0000
++++ open-iscsi-2.0-872/utils/open-isns/Makefile.in 2010-08-11 15:27:07.000000000 +0000
+@@ -77,6 +77,6 @@
+ ar cr $@ $(LIBOBJS)
+
+ depend:
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+- gcc $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff -NuarwbB open-iscsi-2.0-872/utils/sysdeps/Makefile open-iscsi-2.0-872.orig/utils/sysdeps/Makefile
+--- open-iscsi-2.0-872.orig/utils/sysdeps/Makefile 2012-02-09 08:57:43.459227530 +0000
++++ open-iscsi-2.0-872/utils/sysdeps/Makefile 2010-08-11 15:27:07.000000000 +0000
+@@ -10,6 +10,6 @@
+ rm -f *.o .depend
+
+ depend:
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+- gcc $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch
new file mode 100644
index 000000000000..b3e93f459fc2
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch
@@ -0,0 +1,20 @@
+--- usr/Makefile 2010-10-10 22:48:04.000000000 +0200
++++ usr/Makefile.ori 2010-10-10 22:48:34.000000000 +0200
+@@ -53,14 +53,14 @@
+
+ iscsid: $(ISCSI_LIB_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
+ iscsid.o session_mgmt.o discoveryd.o
+- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
+
+ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
+- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
+
+ iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
+ iscsistart.o statics.o
+- $(CC) $(CFLAGS) -static $^ -o $@
++ $(CC) $(CFLAGS) -static $(LDFLAGS) $^ -o $@
+ clean:
+ rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
+
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch
new file mode 100644
index 000000000000..db5d6d14ec5a
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch
@@ -0,0 +1,161 @@
+diff --git a/Makefile b/Makefile
+index c5d9700..4dbff18 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,8 +14,8 @@ mandir = $(prefix)/share/man
+ etcdir = /etc
+ initddir = $(etcdir)/init.d
+
+-MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8
+-PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname
++MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 doc/iscsistart.8 doc/iscsi-iname.8
++PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname usr/iscsistart
+ INSTALL = install
+ ETCFILES = etc/iscsid.conf
+ IFACEFILES = etc/iface.example
+@@ -84,11 +84,11 @@ install_programs: $(PROGRAMS)
+ # ugh, auto-detection is evil
+ # Gentoo maintains their own init.d stuff
+ install_initd:
+- if [ -f /etc/debian_version ]; then \
++ if [ -f $(DESTDIR)$(etcdir)/debian_version ]; then \
+ $(MAKE) install_initd_debian ; \
+- elif [ -f /etc/redhat-release ]; then \
++ elif [ -f $(DESTDIR)$(etcdir)/redhat-release ]; then \
+ $(MAKE) install_initd_redhat ; \
+- elif [ -f /etc/SuSE-release ]; then \
++ elif [ -f $(DESTDIR)$(etcdir)/SuSE-release ]; then \
+ $(MAKE) install_initd_suse ; \
+ fi
+
+@@ -115,7 +115,7 @@ install_iface: $(IFACEFILES)
+ $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces
+
+ install_etc: $(ETCFILES)
+- if [ ! -f /etc/iscsi/iscsid.conf ]; then \
++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \
+ $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \
+ $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \
+ fi
+@@ -128,11 +128,11 @@ install_kernel:
+ $(MAKE) -C kernel install_kernel
+
+ install_iname:
+- if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \
+- echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \
++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ]; then \
++ echo "InitiatorName=`$(DESTDIR)$(sbindir)/iscsi-iname`" > $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ; \
+ echo "***************************************************" ; \
+- echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \
+- echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \
++ echo "Setting InitiatorName to `cat $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi`" ; \
++ echo "To override edit $(etcdir)/iscsi/initiatorname.iscsi" ; \
+ echo "***************************************************" ; \
+ fi
+
+diff --git a/usr/Makefile b/usr/Makefile
+index 673b7f1..83507f3 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -54,18 +54,18 @@ all: $(PROGRAMS)
+
+ iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
+ iscsid.o session_mgmt.o discoveryd.o
+- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns
+
+ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
+- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns
+
+ iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
+ iscsistart.o statics.o
+- $(CC) $(CFLAGS) -static $^ -o $@
++ $(CC) $(CFLAGS) -static $(LDFLAGS) $^ -o $@
+ clean:
+- rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
++ $(RM) *.o $(PROGRAMS) .depend $(LIBSYS)
+
+ depend:
+- gcc $(CFLAGS) -M `ls *.c` > .depend
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff --git a/utils/Makefile b/utils/Makefile
+index 2c7e891..62c49fa 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -1,17 +1,18 @@
+ # This Makefile will work only with GNU make.
+
+-CFLAGS += $(OPTFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g
++OPTFLAGS ?= -O2 -g
++CFLAGS += $(OPTFLAGS) -fno-inline -Wall -Wstrict-prototypes
+ PROGRAMS = iscsi-iname
+
+ all: $(PROGRAMS)
+
+ iscsi-iname: md5.o iscsi-iname.o
+- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
+
+ clean:
+- rm -f *.o $(PROGRAMS) .depend
++ $(RM) *.o $(PROGRAMS) .depend
+
+ depend:
+- gcc $(CFLAGS) -M `ls *.c` > .depend
++ $(GCC) $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
+index c72bb7f..a36c2d2 100644
+--- a/utils/fwparam_ibft/Makefile
++++ b/utils/fwparam_ibft/Makefile
+@@ -26,18 +26,18 @@ OBJS := fw_entry.o fwparam_sysfs.o $(SYSDEPS_OBJS) ../../usr/iscsi_net_util.o
+ OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
+ CLEANFILES = $(OBJS) *.output *~
+
+-OPTFLAGS ?= -O2 -g -fPIC
++OPTFLAGS ?= -O2 -g
+ WARNFLAGS ?= -Wall -Wstrict-prototypes
+-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include -I../../usr -D_GNU_SOURCE
++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fPIC -I../../include -I../../usr -D_GNU_SOURCE
+
+ all: $(OBJS)
+
+ clean:
+- rm -f *.o $(CLEANFILES) .depend
++ $(RM) *.o $(CLEANFILES) .depend
+
+ $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h
+
+ depend:
+- gcc $(CFLAGS) -M `ls *.c` > .depend
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
+diff --git a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile
+index 53c10e5..19cfe19 100644
+--- a/utils/sysdeps/Makefile
++++ b/utils/sysdeps/Makefile
+@@ -1,15 +1,16 @@
+ # This Makefile will work only with GNU make.
+
+-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g
++OPTFLAGS ?= -O2 -g
++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fno-inline -Wall -Wstrict-prototypes
+
+ SYSDEPS_OBJS=sysdeps.o
+
+ all: $(SYSDEPS_OBJS)
+
+ clean:
+- rm -f *.o .depend
++ $(RM) *.o .depend
+
+ depend:
+- gcc $(CFLAGS) -M `ls *.c` > .depend
++ $(CC) $(CFLAGS) -M `ls *.c` > .depend
+
+ -include .depend
diff --git a/sys-block/open-iscsi/metadata.xml b/sys-block/open-iscsi/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/open-iscsi/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>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild
new file mode 100644
index 000000000000..a4244e993024
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit versionator linux-info eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
+HOMEPAGE="http://www.open-iscsi.org/"
+MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
+SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86"
+IUSE="debug slp"
+DEPEND="slp? ( net-libs/openslp )"
+RDEPEND="${DEPEND}
+ sys-apps/util-linux"
+
+S="${WORKDIR}/${MY_PV}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is -lt 2 6 16; then
+ die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
+ fi
+
+ # Needs to be done, as iscsid currently only starts, when having the iSCSI
+ # support loaded as module. Kernel builtion options don't work. See this for
+ # more information:
+ # http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
+ # If there's a new release, check whether this is still valid!
+ CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+}
+
+src_prepare() {
+ export EPATCH_OPTS="-d${S}"
+ epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup.patch
+ epatch "${FILESDIR}"/${P}-glibc212.patch
+ epatch "${FILESDIR}"/${P}-dont-call-configure.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-isns-slp.patch
+ epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup-pass2.patch
+}
+
+src_configure() {
+ cd utils/open-isns || die
+ econf $(use_with slp)
+}
+
+src_compile() {
+ use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
+
+ einfo "Building userspace"
+ local SLP_LIBS
+ use slp && SLP_LIBS="-lslp"
+ cd "${S}" && \
+ KSRC="${KV_DIR}" CFLAGS="" \
+ emake \
+ OPTFLAGS="${CFLAGS}" SLP_LIBS="${SLP_LIBS}" \
+ AR="$(tc-getAR)" CC="$(tc-getCC)" \
+ user \
+ || die "emake failed"
+}
+
+src_install() {
+ einfo "Installing userspace"
+ dosbin usr/iscsid usr/iscsiadm usr/iscsistart || die
+
+ einfo "Installing utilities"
+ dosbin utils/iscsi-iname utils/iscsi_discovery || die
+
+ einfo "Installing docs"
+ doman doc/*[1-8] || die
+ dodoc README THANKS || die
+ docinto test || die
+ dodoc test/* || die
+
+ einfo "Installing configuration"
+ insinto /etc/iscsi
+ doins etc/iscsid.conf || die
+ newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example || die
+ insinto /etc/iscsi/ifaces
+ doins etc/iface.example || die
+
+ newconfd "${FILESDIR}"/${P}-conf.d iscsid || die
+ newinitd "${FILESDIR}"/${P}-init.d-r1 iscsid || die
+
+ keepdir /var/db/iscsi
+ fperms 700 /var/db/iscsi || die
+ fperms 600 /etc/iscsi/iscsid.conf || die
+}
+
+pkg_postinst() {
+ in='/etc/iscsi/initiatorname.iscsi'
+ if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then
+ cp -f "${ROOT}${in}.example" "${ROOT}${in}"
+ fi
+}
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild
new file mode 100644
index 000000000000..f711d80bef50
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit versionator linux-info eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
+HOMEPAGE="http://www.open-iscsi.org/"
+MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
+SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug slp"
+DEPEND="slp? ( net-libs/openslp )"
+RDEPEND="${DEPEND}
+ virtual/udev
+ sys-fs/lsscsi
+ sys-apps/util-linux"
+
+S="${WORKDIR}/${MY_PV}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is -lt 2 6 16; then
+ die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
+ fi
+
+ # Needs to be done, as iscsid currently only starts, when having the iSCSI
+ # support loaded as module. Kernel builtion options don't work. See this for
+ # more information:
+ # http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
+ # If there's a new release, check whether this is still valid!
+ CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+}
+
+src_prepare() {
+ export EPATCH_OPTS="-d${S}"
+ epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup.patch
+ epatch "${FILESDIR}"/${P}-glibc212.patch
+ epatch "${FILESDIR}"/${P}-dont-call-configure.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-isns-slp.patch
+ epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup-pass2.patch
+}
+
+src_configure() {
+ cd utils/open-isns || die
+ econf $(use_with slp)
+}
+
+src_compile() {
+ use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
+
+ einfo "Building userspace"
+ local SLP_LIBS
+ use slp && SLP_LIBS="-lslp"
+ cd "${S}" && \
+ KSRC="${KV_DIR}" CFLAGS="" \
+ emake \
+ OPTFLAGS="${CFLAGS}" SLP_LIBS="${SLP_LIBS}" \
+ AR="$(tc-getAR)" CC="$(tc-getCC)" \
+ user \
+ || die "emake failed"
+}
+
+src_install() {
+ einfo "Installing userspace"
+ dosbin usr/iscsid usr/iscsiadm usr/iscsistart || die
+
+ einfo "Installing utilities"
+ dosbin utils/iscsi-iname utils/iscsi_discovery || die
+
+ einfo "Installing docs"
+ doman doc/*[1-8] || die
+ dodoc README THANKS || die
+ docinto test || die
+ dodoc test/* || die
+
+ einfo "Installing configuration"
+ insinto /etc/iscsi
+ doins etc/iscsid.conf || die
+ newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example || die
+ insinto /etc/iscsi/ifaces
+ doins etc/iface.example || die
+
+ newconfd "${FILESDIR}"/${P}-conf.d iscsid || die
+ newinitd "${FILESDIR}"/${P}-init.d-r1 iscsid || die
+
+ # udev pieces
+ insinto /etc/udev/scripts
+ doins "${FILESDIR}"/iscsidev.sh
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/99-iscsi.rules
+
+ keepdir /var/db/iscsi
+ fperms 700 /var/db/iscsi || die
+ fperms 600 /etc/iscsi/iscsid.conf || die
+}
+
+pkg_postinst() {
+ in='/etc/iscsi/initiatorname.iscsi'
+ if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then
+ cp -f "${ROOT}${in}.example" "${ROOT}${in}"
+ fi
+}
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild
new file mode 100644
index 000000000000..b0502a974ac8
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator linux-info eutils flag-o-matic toolchain-funcs
+
+MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
+
+DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
+HOMEPAGE="http://www.open-iscsi.org/"
+SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug slp"
+
+DEPEND="slp? ( net-libs/openslp )"
+RDEPEND="${DEPEND}
+ virtual/udev
+ sys-fs/lsscsi
+ sys-apps/util-linux"
+
+S="${WORKDIR}/${MY_PV}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is -lt 2 6 16; then
+ die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
+ fi
+
+ # Needs to be done, as iscsid currently only starts, when having the iSCSI
+ # support loaded as module. Kernel builtion options don't work. See this for
+ # more information:
+ # http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
+ # If there's a new release, check whether this is still valid!
+ CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
+ if linux_config_exists; then
+ for module in ${CONFIG_CHECK_MODULES}; do
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefiles.patch
+
+ sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die
+}
+
+src_configure() {
+ cd utils/open-isns || die
+
+ # SSL (--with-security) is broken
+ econf $(use_with slp) \
+ --without-security
+}
+
+src_compile() {
+ use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
+
+ KSRC="${KV_DIR}" CFLAGS="" \
+ emake \
+ OPTFLAGS="${CFLAGS}" \
+ AR="$(tc-getAR)" CC="$(tc-getCC)" \
+ user
+}
+
+src_install() {
+ emake DESTDIR="${D}" sbindir="${ROOT}usr/sbin/" install
+
+ dodoc README THANKS
+
+ docinto test/
+ dodoc test/*
+
+ insinto /etc/iscsi
+ newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
+ # udev pieces
+ insinto /etc/udev/scripts
+ doins "${FILESDIR}"/iscsidev.sh
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/99-iscsi.rules
+
+ newconfd "${FILESDIR}"/iscsid-conf.d iscsid
+ newinitd "${FILESDIR}"/iscsid-init.d iscsid
+
+ keepdir /var/db/iscsi
+ fperms 700 /var/db/iscsi
+ fperms 600 /etc/iscsi/iscsid.conf
+}
diff --git a/sys-block/parted/Manifest b/sys-block/parted/Manifest
new file mode 100644
index 000000000000..c023f25f914f
--- /dev/null
+++ b/sys-block/parted/Manifest
@@ -0,0 +1,3 @@
+DIST parted-2.4.tar.xz 1516412 SHA256 508ff75591b9c8cc9d06f1e0b1db1a082a4b0c1b9d4efaac48b4ca46370d9073 SHA512 1f7ac11079981b176c1157bd6d858e67394bb4be9b622f91d4e78412a41c696809ed60912b8b94f3a2a924b2f43638dd5d6cb6f4c28e8dc63a2d421380cb5477 WHIRLPOOL 688a44c88ffd99523f17eb5c8722cf4ee09bd0af105ab45a7bd08050682345288182f90bbebf6fed8bdbb1a4deac965084a0f430ef6490d154671de58de50574
+DIST parted-3.1.tar.xz 1524344 SHA256 5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15 SHA512 f29a67a16cf79f08abbfc5eeb6ad0480d834aa50e715378626dc89e3b12ce71f19202e9f38429e5521ebe877c4e74ff1e08f0b0ecbdbe79ba1c51fdcbef6e852 WHIRLPOOL 8e4c0b3f045405acbf5eab8d72d46450cb5c6adc50b9eba4ad4a9600da9ea203b412cf151d03782b045dc7f6232bd79ace85d01ce9d2faba458ee48b9df00de9
+DIST parted-3.2.tar.xz 1655244 SHA256 858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4 SHA512 4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4 WHIRLPOOL af928177b893150ac6d5e0efcef542b6fa0df6b135f975078f7d8d5f7a4b109ef4c1f8eeaf6afc5c34448ff662ce4cbe5289e084f4ec05257666503a0cd3c93f
diff --git a/sys-block/parted/files/parted-2.4-no-gets.patch b/sys-block/parted/files/parted-2.4-no-gets.patch
new file mode 100644
index 000000000000..efa6e00b8d45
--- /dev/null
+++ b/sys-block/parted/files/parted-2.4-no-gets.patch
@@ -0,0 +1,10 @@
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -735,7 +735,6 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+
+
diff --git a/sys-block/parted/files/parted-2.4-readline.patch b/sys-block/parted/files/parted-2.4-readline.patch
new file mode 100644
index 000000000000..5873ed1e5d43
--- /dev/null
+++ b/sys-block/parted/files/parted-2.4-readline.patch
@@ -0,0 +1,11 @@
+--- a/parted/ui.c
++++ b/parted/ui.c
+@@ -1440,7 +1440,7 @@
+ #ifdef HAVE_LIBREADLINE
+ if (!opt_script_mode) {
+ rl_initialize ();
+- rl_attempted_completion_function = (CPPFunction*) complete_function;
++ rl_attempted_completion_function = (rl_completion_func_t*) complete_function;
+ readline_state.in_readline = 0;
+ }
+ #endif
diff --git a/sys-block/parted/files/parted-3.1-readline.patch b/sys-block/parted/files/parted-3.1-readline.patch
new file mode 100644
index 000000000000..936ec00cbefc
--- /dev/null
+++ b/sys-block/parted/files/parted-3.1-readline.patch
@@ -0,0 +1,11 @@
+--- a/parted/ui.c
++++ b/parted/ui.c
+@@ -1474,7 +1474,7 @@
+ #ifdef HAVE_LIBREADLINE
+ if (!opt_script_mode) {
+ rl_initialize ();
+- rl_attempted_completion_function = (CPPFunction*) complete_function;
++ rl_attempted_completion_function = (rl_completion_func_t*) complete_function;
+ readline_state.in_readline = 0;
+ }
+ #endif
diff --git a/sys-block/parted/files/parted-3.1-zfs.patch b/sys-block/parted/files/parted-3.1-zfs.patch
new file mode 100644
index 000000000000..a87d6d346551
--- /dev/null
+++ b/sys-block/parted/files/parted-3.1-zfs.patch
@@ -0,0 +1,170 @@
+commit 65f838008107a688751dd5a2753c9073e9353daf
+Author: root <root@desktop.(none)>
+Date: Fri Jun 1 16:26:34 2012 -0400
+
+ Add ZFS Support
+
+diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am
+index 8d48ea1..51b4151 100644
+--- a/libparted/fs/Makefile.am
++++ b/libparted/fs/Makefile.am
+@@ -49,7 +49,8 @@ libfs_la_SOURCES = \
+ xfs/platform_defs.h \
+ xfs/xfs.c \
+ xfs/xfs_sb.h \
+- xfs/xfs_types.h
++ xfs/xfs_types.h \
++ zfs/zfs.c
+
+ lib_LTLIBRARIES = libparted-fs-resize.la
+
+diff --git a/libparted/fs/Makefile.in b/libparted/fs/Makefile.in
+index 4335eb1..e3a134b 100644
+--- a/libparted/fs/Makefile.in
++++ b/libparted/fs/Makefile.in
+@@ -1112,7 +1112,8 @@ libfs_la_SOURCES = \
+ xfs/platform_defs.h \
+ xfs/xfs.c \
+ xfs/xfs_sb.h \
+- xfs/xfs_types.h
++ xfs/xfs_types.h \
++ zfs/zfs.c
+
+ lib_LTLIBRARIES = libparted-fs-resize.la
+ EXTRA_DIST = hfs/DOC hfs/HISTORY hfs/TODO fsresize.sym
+diff --git a/libparted/fs/zfs/Makefile.am b/libparted/fs/zfs/Makefile.am
+new file mode 100644
+index 0000000..3273c6a
+--- /dev/null
++++ b/libparted/fs/zfs/zfs.c
+@@ -0,0 +1,81 @@
++/*
++ libparted - a library for manipulating disk partitions
++ Copyright (C) 2000, 2007, 2009-2010 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#include <config.h>
++
++#include <parted/parted.h>
++#include <parted/endian.h>
++
++#if ENABLE_NLS
++# include <libintl.h>
++# define _(String) dgettext (PACKAGE, String)
++#else
++# define _(String) (String)
++#endif /* ENABLE_NLS */
++
++#include <unistd.h>
++
++#define ZFS_BLOCK_SIZES ((int[2]){512, 0})
++
++#define ZFS_SIGNATURE 0x00bab10c
++
++struct zfs_uberblock
++{
++ uint64_t signature;
++ uint64_t version;
++};
++
++static PedGeometry*
++zfs_probe (PedGeometry* geom)
++{
++ uint8_t buf[512];
++ struct zfs_uberblock *uber = (void *) buf;
++
++ if (!ped_geometry_read (geom, buf, 256, 1))
++ return 0;
++
++ if ((le64toh (uber->signature) == ZFS_SIGNATURE
++ || be64toh (uber->signature) == ZFS_SIGNATURE)
++ && uber->version != 0)
++ return ped_geometry_new (geom->dev, geom->start, geom->length);
++ else
++ return NULL;
++}
++
++static PedFileSystemOps zfs_ops = {
++ probe: zfs_probe,
++};
++
++static PedFileSystemType zfs_type = {
++ next: NULL,
++ ops: &zfs_ops,
++ name: "zfs",
++ block_sizes: ZFS_BLOCK_SIZES
++};
++
++void
++ped_file_system_zfs_init ()
++{
++ ped_file_system_type_register (&zfs_type);
++}
++
++void
++ped_file_system_zfs_done ()
++{
++ ped_file_system_type_unregister (&zfs_type);
++}
+diff --git a/libparted/libparted.c b/libparted/libparted.c
+index a6d86f0..6545989 100644
+--- a/libparted/libparted.c
++++ b/libparted/libparted.c
+@@ -109,6 +109,7 @@ extern void ped_file_system_hfs_init (void);
+ extern void ped_file_system_fat_init (void);
+ extern void ped_file_system_ext2_init (void);
+ extern void ped_file_system_nilfs2_init (void);
++extern void ped_file_system_zfs_init (void);
+
+ static void
+ init_file_system_types ()
+@@ -124,6 +125,7 @@ init_file_system_types ()
+ ped_file_system_fat_init ();
+ ped_file_system_ext2_init ();
+ ped_file_system_nilfs2_init ();
++ ped_file_system_zfs_init ();
+ }
+
+ extern void ped_disk_aix_done ();
+@@ -186,6 +188,7 @@ extern void ped_file_system_reiserfs_done (void);
+ extern void ped_file_system_ufs_done (void);
+ extern void ped_file_system_xfs_done (void);
+ extern void ped_file_system_amiga_done (void);
++extern void ped_file_system_zfs_done (void);
+
+ static void
+ done_file_system_types ()
+@@ -201,6 +204,7 @@ done_file_system_types ()
+ ped_file_system_ufs_done ();
+ ped_file_system_xfs_done ();
+ ped_file_system_amiga_done ();
++ ped_file_system_zfs_done ();
+ }
+
+ static void _done() __attribute__ ((destructor));
+diff --git a/scripts/data/abi/baseline_symbols.txt b/scripts/data/abi/baseline_symbols.txt
+index 9162f1a..8bb87e6 100644
+--- a/scripts/data/abi/baseline_symbols.txt
++++ b/scripts/data/abi/baseline_symbols.txt
+@@ -344,6 +344,8 @@ FUNC:ped_file_system_ufs_done
+ FUNC:ped_file_system_ufs_init
+ FUNC:ped_file_system_xfs_done
+ FUNC:ped_file_system_xfs_init
++FUNC:ped_file_system_zfs_done
++FUNC:ped_file_system_zfs_init
+ FUNC:ped_geometry_check
+ FUNC:ped_geometry_destroy
+ FUNC:ped_geometry_duplicate
diff --git a/sys-block/parted/files/parted-3.2-devmapper.patch b/sys-block/parted/files/parted-3.2-devmapper.patch
new file mode 100644
index 000000000000..0cd3e0e3307f
--- /dev/null
+++ b/sys-block/parted/files/parted-3.2-devmapper.patch
@@ -0,0 +1,60 @@
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -2304,6 +2304,7 @@
+ return r < 0 ? NULL : resultp;
+ }
+
++#ifdef ENABLE_DEVICE_MAPPER
+ static char *
+ dm_canonical_path (PedDevice const *dev)
+ {
+@@ -2326,12 +2327,22 @@
+ err:
+ return NULL;
+ }
++#endif /* ENABLE_DEVICE_MAPPER */
+
+ static char*
+ _device_get_part_path (PedDevice const *dev, int num)
+ {
+- char *devpath = (dev->type == PED_DEVICE_DM
+- ? dm_canonical_path (dev) : dev->path);
++ char *devpath =
++#ifdef ENABLE_DEVICE_MAPPER
++ (
++ dev->type == PED_DEVICE_DM
++ ? dm_canonical_path (dev) :
++#endif /* ENABLE_DEVICE_MAPPER */
++ dev->path
++#ifdef ENABLE_DEVICE_MAPPER
++ )
++#endif /* ENABLE_DEVICE_MAPPER */
++ ;
+ size_t path_len = strlen (devpath);
+ char *result;
+ /* Check for devfs-style /disc => /partN transformation
+@@ -2945,12 +2956,14 @@
+ unsigned long long *length);
+
+
++#ifdef ENABLE_DEVICE_MAPPER
+ if (disk->dev->type == PED_DEVICE_DM) {
+ add_partition = _dm_add_partition;
+ remove_partition = _dm_remove_partition;
+ resize_partition = _dm_resize_partition;
+ get_partition_start_and_length = _dm_get_partition_start_and_length;
+ } else {
++#endif /* ENABLE_DEVICE_MAPPER */
+ add_partition = _blkpg_add_partition;
+ remove_partition = _blkpg_remove_partition;
+ #ifdef BLKPG_RESIZE_PARTITION
+@@ -2959,7 +2972,9 @@
+ resize_partition = NULL;
+ #endif
+ get_partition_start_and_length = _kernel_get_partition_start_and_length;
++#ifdef ENABLE_DEVICE_MAPPER
+ }
++#endif /* ENABLE_DEVICE_MAPPER */
+
+ /* lpn = largest partition number.
+ * for remove pass, use greater of device or label limit */
diff --git a/sys-block/parted/files/parted-3.2-po4a-mandir.patch b/sys-block/parted/files/parted-3.2-po4a-mandir.patch
new file mode 100644
index 000000000000..be0a9c69f403
--- /dev/null
+++ b/sys-block/parted/files/parted-3.2-po4a-mandir.patch
@@ -0,0 +1,11 @@
+--- a/doc/po4a.mk
++++ b/doc/po4a.mk
+@@ -23,7 +23,7 @@
+ # threshold is 80%), it won't be distributed, and the build won't fail.
+ #
+
+-mandir = $(mandir)/$(lang)
++mandir := $(mandir)/$(lang)
+
+ # Inform automake that we want to install some man pages in section 1, 5
+ # and 8.
diff --git a/sys-block/parted/metadata.xml b/sys-block/parted/metadata.xml
new file mode 100644
index 000000000000..57a676994422
--- /dev/null
+++ b/sys-block/parted/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>livecd</herd>
+<use>
+ <flag name='device-mapper'>
+ Enable device-mapper support from <pkg>sys-fs/lvm2</pkg> in parted
+ </flag>
+ <flag name="debug">
+ Enable debugging as encouraged by upstream: [The default configuration]
+ includes --enable-debug (by default), which contains many assertions.
+ Obviously, these "waste" space, but in the past, they have caught
+ potentially dangerous bugs before they would have done damage, so we think
+ it's worth it. Also, it means we get more bug reports ;)
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/sys-block/parted/parted-2.4.ebuild b/sys-block/parted/parted-2.4.ebuild
new file mode 100644
index 000000000000..2e7ae565ce87
--- /dev/null
+++ b/sys-block/parted/parted-2.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems"
+HOMEPAGE="http://www.gnu.org/software/parted"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86"
+IUSE="+debug device-mapper nls readline selinux static-libs"
+RESTRICT="test"
+
+# specific version for gettext needed
+# to fix bug 85999
+RDEPEND="
+ >=sys-fs/e2fsprogs-1.27
+ >=sys-libs/ncurses-5.2
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ readline? ( >=sys-libs/readline-5.2 )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12.1-r2 )
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-gets.patch
+ epatch "${FILESDIR}"/${P}-readline.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable device-mapper) \
+ $(use_enable nls) \
+ $(use_enable selinux) \
+ $(use_enable static-libs static) \
+ $(use_with readline) \
+ --disable-Werror \
+ --disable-rpath \
+ --disable-silent-rules
+}
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} )
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-block/parted/parted-3.1-r1.ebuild b/sys-block/parted/parted-3.1-r1.ebuild
new file mode 100644
index 000000000000..d060817beb4c
--- /dev/null
+++ b/sys-block/parted/parted-3.1-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems"
+HOMEPAGE="http://www.gnu.org/software/parted"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86"
+IUSE="+debug device-mapper nls readline selinux static-libs test"
+
+# specific version for gettext needed
+# to fix bug 85999
+RDEPEND="
+ >=sys-fs/e2fsprogs-1.27
+ >=sys-libs/ncurses-5.7-r7
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ readline? ( >=sys-libs/readline-5.2 )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12.1-r2 )
+ virtual/pkgconfig
+ test? (
+ >=dev-libs/check-0.9.3
+ dev-perl/Digest-CRC
+ )
+"
+
+src_prepare() {
+ # Remove tests known to FAIL instead of SKIP without OS/userland support
+ sed -i libparted/tests/Makefile.am \
+ -e 's|t3000-symlink.sh||g' || die "sed failed"
+ sed -i tests/Makefile.am \
+ -e '/t4100-msdos-partition-limits.sh/d' \
+ -e '/t4100-dvh-partition-limits.sh/d' \
+ -e '/t6000-dm.sh/d' || die "sed failed"
+ # there is no configure flag for controlling the dev-libs/check test
+ sed -i configure.ac \
+ -e "s:have_check=[a-z]*:have_check=$(usex test):g" || die
+
+ epatch "${FILESDIR}"/${PN}-3.1-zfs.patch
+ epatch "${FILESDIR}"/${PN}-3.1-readline.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable device-mapper) \
+ $(use_enable nls) \
+ $(use_enable selinux) \
+ $(use_enable static-libs static) \
+ $(use_with readline) \
+ --disable-rpath \
+ --disable-silent-rules
+}
+
+src_test() {
+ if use debug; then
+ # Do not die when tests fail - some requirements are not
+ # properly checked and should not lead to the ebuild failing.
+ emake check
+ else
+ ewarn "Skipping tests because USE=-debug is set."
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
+ dodoc doc/{API,FAT,USER.jp}
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/sys-block/parted/parted-3.2.ebuild b/sys-block/parted/parted-3.2.ebuild
new file mode 100644
index 000000000000..e89f3eb16737
--- /dev/null
+++ b/sys-block/parted/parted-3.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems"
+HOMEPAGE="http://www.gnu.org/software/parted"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="+debug device-mapper nls readline selinux static-libs"
+RESTRICT="test"
+
+# specific version for gettext needed
+# to fix bug 85999
+RDEPEND="
+ >=sys-fs/e2fsprogs-1.27
+ >=sys-libs/ncurses-5.7-r7
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ readline? ( >=sys-libs/readline-5.2 )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12.1-r2 )
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.2-devmapper.patch
+
+ epatch "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable device-mapper) \
+ $(use_enable nls) \
+ $(use_enable selinux) \
+ $(use_enable static-libs static) \
+ $(use_with readline) \
+ --disable-rpath \
+ --disable-silent-rules
+}
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} )
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-block/partimage/Manifest b/sys-block/partimage/Manifest
new file mode 100644
index 000000000000..811a0387acfb
--- /dev/null
+++ b/sys-block/partimage/Manifest
@@ -0,0 +1,2 @@
+DIST partimage-0.6.8.tar.bz2 631193 SHA256 98f91bf6baa108e390989ce963f75bc30f40ba9c6eb4e953abeedca9a6e6e4b4
+DIST partimage-0.6.9.tar.bz2 666522 SHA256 753a6c81f4be18033faed365320dc540fe5e58183eaadcd7a5b69b096fec6635 SHA512 252885921b23933fdcdf0bb6efa4b82066b08ca95cc653296912d384ae875b421c1d39f347a90115315139176d4eab4a930c24919c2d38cf00ed29c764cd14d9 WHIRLPOOL a4e30ea6240c89b568fd5959f4d72130e3737a409270d9336e45f2c4f85c2e6c1c66b5b60abdf47aa238ec4159010cbbcc75c02c6e5a1cb309e2fceee1df7750
diff --git a/sys-block/partimage/files/partimage-0.6.8-destdir.patch b/sys-block/partimage/files/partimage-0.6.8-destdir.patch
new file mode 100644
index 000000000000..12eb8c43c5a6
--- /dev/null
+++ b/sys-block/partimage/files/partimage-0.6.8-destdir.patch
@@ -0,0 +1,11 @@
+--- Makefile.am
++++ Makefile.am
+@@ -48,7 +48,7 @@
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo -n "#add only users allowed to " >> \
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+- echo "connect partimaged" >> ${sysconfdir}/partimaged/partimagedusers ;\
++ echo "connect partimaged" >> $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo "# (only one login per line)" >> \
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo "" >> $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
diff --git a/sys-block/partimage/files/partimage-0.6.8-openssl-1.patch b/sys-block/partimage/files/partimage-0.6.8-openssl-1.patch
new file mode 100644
index 000000000000..69268a99ff36
--- /dev/null
+++ b/sys-block/partimage/files/partimage-0.6.8-openssl-1.patch
@@ -0,0 +1,30 @@
+http://bugs.gentoo.org/326879
+
+--- src/client/netclient.h
++++ src/client/netclient.h
+@@ -35,7 +35,11 @@
+ #ifdef HAVE_SSL
+ SSL_CTX * ctx;
+ X509 * server_cert;
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD * meth;
++ #else
+ SSL_METHOD * meth;
++ #endif
+ #endif
+ bool m_bUseSSL;
+ bool m_bMustLogin;
+--- src/server/netserver.h
++++ src/server/netserver.h
+@@ -41,7 +41,11 @@
+ #ifdef HAVE_SSL
+ SSL_CTX * ctx;
+ X509 * client_cert;
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD * meth;
++ #else
+ SSL_METHOD * meth;
++ #endif
+ int err;
+ #endif
+
diff --git a/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch b/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch
new file mode 100644
index 000000000000..57f87a5d5225
--- /dev/null
+++ b/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch
@@ -0,0 +1,33 @@
+http://bugs.gentoo.org/405323
+
+--- src/client/imagefile.cpp
++++ src/client/imagefile.cpp
+@@ -783,7 +783,7 @@
+ else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+ {
+ showDebug(1, "open gzip\n");
+- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
++ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
+ if (m_gzImageFile == NULL)
+ {
+ showDebug(1, "error:%d %s\n", errno, strerror(errno));
+@@ -1098,7 +1098,7 @@
+ }
+ else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+ {
+- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
++ m_gzImageFile = gzdopen(m_nFdImage, "rb");
+ if (m_gzImageFile == NULL)
+ THROW(ERR_ERRNO, errno);
+ else
+--- src/client/imagefile.h
++++ src/client/imagefile.h
+@@ -41,7 +41,7 @@
+ COptions m_options;
+
+ FILE *m_fImageFile;
+- gzFile *m_gzImageFile;
++ gzFile m_gzImageFile;
+ BZFILE *m_bzImageFile;
+
+ int m_nFdImage;
diff --git a/sys-block/partimage/files/partimaged.conf b/sys-block/partimage/files/partimaged.conf
new file mode 100644
index 000000000000..032b1cb3d912
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.conf
@@ -0,0 +1,10 @@
+# Copyright 2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# You can define the following optional arguments:
+# -d <dest> Destination directory for the backup images
+# -pX Server port
+# -r <dest> Chroot directory for improved security
+
+#PARTIMAGED_OPTS=""
diff --git a/sys-block/partimage/files/partimaged.init b/sys-block/partimage/files/partimaged.init
new file mode 100644
index 000000000000..50a03e0d2357
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.init
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+PARTIMAGED="/usr/sbin/partimaged"
+
+failed_startup() {
+ eerror "The PartImage daemon did not start up correctly."
+ eerror "Perhaps you compiled it with SSL support but forgot to run the ebuild config?"
+ return 1
+}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting partimaged"
+ start-stop-daemon --start --quiet --exec ${PARTIMAGED} \
+ -- ${PARTIMAGED_OPTS} --daemon > /dev/null 2>&1
+ eend $? || failed_startup
+}
+
+stop() {
+ ebegin "Stopping partimaged"
+ start-stop-daemon --stop --exec ${PARTIMAGED}
+ eend $?
+}
diff --git a/sys-block/partimage/files/partimaged.init.2 b/sys-block/partimage/files/partimaged.init.2
new file mode 100644
index 000000000000..140f83c9c70f
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.init.2
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 2005-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+PARTIMAGED="/usr/sbin/partimaged"
+
+failed_startup() {
+ eerror "The PartImage daemon did not start up correctly."
+ eerror "Perhaps you compiled it with SSL support but forgot to run the ebuild config?"
+ return 1
+}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting partimaged"
+ start-stop-daemon --start --exec ${PARTIMAGED} \
+ -- ${PARTIMAGED_OPTS} --daemon
+ eend $? || failed_startup
+}
+
+stop() {
+ ebegin "Stopping partimaged"
+ start-stop-daemon --stop --exec ${PARTIMAGED}
+ eend $?
+}
diff --git a/sys-block/partimage/files/partimaged.pam b/sys-block/partimage/files/partimaged.pam
new file mode 100644
index 000000000000..6ffb16fdf80b
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.pam
@@ -0,0 +1,11 @@
+# PAM config file for Partimaged
+
+auth required pam_unix.so
+auth required pam_warn.so
+auth required pam_listfile.so \
+ onerr=fail item=user sense=allow \
+ file=/etc/partimaged/partimagedusers
+
+account include system-auth
+session include system-auth
+
diff --git a/sys-block/partimage/files/partimaged.pam.2 b/sys-block/partimage/files/partimaged.pam.2
new file mode 100644
index 000000000000..9ed5507a74f9
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.pam.2
@@ -0,0 +1,7 @@
+# PAM config file for Partimaged
+
+auth required pam_listfile.so onerr=fail item=user sense=allow file=/etc/partimaged/partimagedusers
+auth optional pam_warn.so
+auth include system-auth
+account include system-auth
+session include system-auth
diff --git a/sys-block/partimage/files/servercert.cnf b/sys-block/partimage/files/servercert.cnf
new file mode 100644
index 000000000000..cf6af7e7206a
--- /dev/null
+++ b/sys-block/partimage/files/servercert.cnf
@@ -0,0 +1,37 @@
+# $Id$
+# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003
+# This is the openssl config file to generate keys for partimage
+# It is read by mkservercert
+
+[ req ]
+# you can increase this value, but be aware that it will make things much slower
+# this should be a power of 2!
+default_bits = 1024
+# leave the rest of these alone!
+encrypt_key = yes
+distinguished_name = req_dn
+x509_extensions = cert_type
+prompt = no
+
+[ req_dn ]
+# 2-Letter ISO country code
+C=US
+# FULL name of state/province/district
+# NO abbreviations!
+ST=Alabama
+# FULL name of city
+# NO abbreviations!
+L=Mobile
+# Full Name of your organization
+# NO abbreviations!
+O=Foobar Systems
+# Leave this alone unless specifically need to change it!
+OU=Automatically-generated PartImage SSL key
+# This should be a FQDN that resolves to the IP of your server
+CN=localhost
+# This should be the email address for the administrator of the server
+emailAddress=root@localhost
+
+# Leave this alone!
+[ cert_type ]
+nsCertType = server
diff --git a/sys-block/partimage/metadata.xml b/sys-block/partimage/metadata.xml
new file mode 100644
index 000000000000..fba1621be868
--- /dev/null
+++ b/sys-block/partimage/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>base-system</herd>
+ <use>
+ <flag name="nologin">Do not include login support when connecting partimaged</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">partimage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/partimage/partimage-0.6.8.ebuild b/sys-block/partimage/partimage-0.6.8.ebuild
new file mode 100644
index 000000000000..6577a82a8905
--- /dev/null
+++ b/sys-block/partimage/partimage-0.6.8.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit autotools eutils flag-o-matic pam user
+
+DESCRIPTION="Console-based application to efficiently save raw partition data to an image file"
+HOMEPAGE="http://www.partimage.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="nls nologin pam ssl static"
+
+LIBS_DEPEND="app-arch/bzip2
+ >=dev-libs/newt-0.52
+ >=sys-libs/slang-2
+ sys-libs/zlib
+ ssl? ( dev-libs/openssl )"
+PAM_DEPEND="!static? ( pam? ( virtual/pam ) )"
+RDEPEND="${PAM_DEPEND}
+ !static? ( ${LIBS_DEPEND} )"
+DEPEND="${PAM_DEPEND}
+ ${LIBS_DEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ enewgroup partimag 91
+ enewuser partimag 91 -1 /var/lib/partimage partimag
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch \
+ "${FILESDIR}"/${P}-openssl-1.patch
+ eautoreconf
+}
+
+src_configure() {
+ # XXX: Do we still need these?
+ filter-flags -fno-exceptions
+ use ppc && append-flags -fsigned-char
+
+ local myconf
+
+ use nologin && myconf="${myconf} --disable-login"
+
+ if use pam && ! use static; then
+ myconf="${myconf} --enable-pam"
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --sysconfdir="${EPREFIX}"/etc \
+ $(use_enable nls) \
+ --disable-dependency-tracking \
+ $(use_enable ssl) \
+ --disable-pam \
+ $(use_enable static all-static) \
+ --with-log-dir="${EPREFIX}"/var/log/partimage \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc BOOT-ROOT.txt FORMAT FUTURE THANKS
+ prepalldocs
+
+ keepdir /var/lib/partimage
+ keepdir /var/log/partimage
+
+ insinto /etc/partimaged
+ doins "${FILESDIR}"/servercert.cnf || die
+
+ newinitd "${FILESDIR}"/partimaged.init partimaged || die
+ newconfd "${FILESDIR}"/partimaged.conf partimaged || die
+
+ if use pam; then
+ newpamd "${FILESDIR}"/partimaged.pam partimaged || die
+ fi
+}
+
+confdir=${ROOT}etc/partimaged
+privkey=${confdir}/partimaged.key
+cnf=${confdir}/servercert.cnf
+csr=${confdir}/partimaged.csr
+cert=${confdir}/partimaged.cert
+
+pkg_config() {
+ if use ssl; then
+ ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
+ ewarn "Press Ctrl-C to break now for it, or press enter to continue."
+ read
+ if [ ! -f ${privkey} ]; then
+ einfo "Generating unencrypted private key: ${privkey}"
+ openssl genrsa -out ${privkey} 1024 || die "Failed!"
+ else
+ einfo "Private key already exists: ${privkey}"
+ fi
+ if [ ! -f ${csr} ]; then
+ einfo "Generating certificate request: ${csr}"
+ openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die "Failed!"
+ else
+ einfo "Certificate request already exists: ${csr}"
+ fi
+ if [ ! -f ${cert} ]; then
+ einfo "Generating self-signed certificate: ${cert}"
+ openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die "Failed!"
+ else
+ einfo "Self-signed certifcate already exists: ${cert}"
+ fi
+ einfo "Setting permissions"
+ partimagesslperms || die "Failed!"
+ einfo "Done"
+ else
+ einfo "SSL is disabled, not building certificates"
+ fi
+}
+
+partimagesslperms() {
+ local ret=0
+ chmod 600 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown partimag:0 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chmod 644 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown root:0 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ return $ret
+}
+
+pkg_postinst() {
+ if use ssl; then
+ einfo "To create the required SSL certificates, please do:"
+ einfo "emerge --config =${PF}"
+ partimagesslperms
+ return 0
+ fi
+ chown partimag:0 "${ROOT}"etc/partimaged/partimagedusers || die
+}
diff --git a/sys-block/partimage/partimage-0.6.9.ebuild b/sys-block/partimage/partimage-0.6.9.ebuild
new file mode 100644
index 000000000000..56ba109c442c
--- /dev/null
+++ b/sys-block/partimage/partimage-0.6.9.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic pam user
+
+DESCRIPTION="Console-based application to efficiently save raw partition data to an image file"
+HOMEPAGE="http://www.partimage.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="nls nologin pam ssl static"
+
+LIBS_DEPEND="app-arch/bzip2
+ >=dev-libs/newt-0.52
+ >=sys-libs/slang-2
+ sys-libs/zlib
+ ssl? ( dev-libs/openssl )"
+PAM_DEPEND="!static? ( pam? ( virtual/pam ) )"
+RDEPEND="${PAM_DEPEND}
+ !static? ( ${LIBS_DEPEND} )"
+DEPEND="${PAM_DEPEND}
+ ${LIBS_DEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ enewgroup partimag 91
+ enewuser partimag 91 -1 /var/lib/partimage partimag
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-zlib-1.2.5.2.patch #405323
+}
+
+src_configure() {
+ # XXX: Do we still need these?
+ filter-flags -fno-exceptions
+ use ppc && append-flags -fsigned-char
+
+ local myconf
+
+ use nologin && myconf="${myconf} --disable-login"
+
+ if use pam && ! use static; then
+ myconf="${myconf} --enable-pam"
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --sysconfdir="${EPREFIX}"/etc \
+ $(use_enable nls) \
+ $(use_enable ssl) \
+ --disable-pam \
+ $(use_enable static all-static) \
+ --with-log-dir="${EPREFIX}"/var/log/partimage \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ keepdir /var/lib/partimage
+ keepdir /var/log/partimage
+
+ newinitd "${FILESDIR}"/partimaged.init.2 partimaged
+ newconfd "${FILESDIR}"/partimaged.conf partimaged
+
+ if use ssl; then
+ insinto /etc/partimaged
+ doins "${FILESDIR}"/servercert.cnf
+ fi
+
+ if use pam; then
+ newpamd "${FILESDIR}"/partimaged.pam.2 partimaged
+ fi
+}
+
+confdir=${EROOT}/etc/partimaged
+privkey=${confdir}/partimaged.key
+cnf=${confdir}/servercert.cnf
+csr=${confdir}/partimaged.csr
+cert=${confdir}/partimaged.cert
+
+pkg_config() {
+ if use ssl; then
+ ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
+ ewarn "Press Ctrl-C to break now for it, or press enter to continue."
+ read
+ if [ ! -f ${privkey} ]; then
+ einfo "Generating unencrypted private key: ${privkey}"
+ openssl genrsa -out ${privkey} 1024 || die
+ else
+ einfo "Private key already exists: ${privkey}"
+ fi
+ if [ ! -f ${csr} ]; then
+ einfo "Generating certificate request: ${csr}"
+ openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die
+ else
+ einfo "Certificate request already exists: ${csr}"
+ fi
+ if [ ! -f ${cert} ]; then
+ einfo "Generating self-signed certificate: ${cert}"
+ openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die
+ else
+ einfo "Self-signed certifcate already exists: ${cert}"
+ fi
+ einfo "Setting permissions"
+ partimagesslperms || die
+ einfo "Done"
+ else
+ einfo "SSL is disabled, not building certificates"
+ fi
+}
+
+partimagesslperms() {
+ local ret=0
+ chmod 600 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown partimag:0 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chmod 644 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown root:0 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ return $ret
+}
+
+pkg_postinst() {
+ if use ssl; then
+ einfo "To create the required SSL certificates, please do:"
+ einfo "emerge --config =${PF}"
+ partimagesslperms
+ return 0
+ fi
+ chown partimag:0 "${EROOT}"/etc/partimaged/partimagedusers || die
+}
diff --git a/sys-block/partitionmanager/Manifest b/sys-block/partitionmanager/Manifest
new file mode 100644
index 000000000000..5985734d25d8
--- /dev/null
+++ b/sys-block/partitionmanager/Manifest
@@ -0,0 +1,2 @@
+DIST partitionmanager-1.1.1.tar.xz 1738132 SHA256 4cf3fa71bd20b06755d36bb9aa7692fa4770a1d84ec8eb72654cb58fdea563de SHA512 3cae1d0c34c2d8a245094ff85131def5c48e4247462104a84c4dcac2230e115df61cc72b6acdf735b1755f921b8f17adb1b2a5f97a9b3fa9a0628619e7e34117 WHIRLPOOL b4bb73a8d7c5f157c7bd95ba1f907b81955206c283a09cd84397f5db5ad33ec25e55a9a5a0cb8742008396bb574b05a5b9df04030b24c0b76aaf064a31031bb2
+DIST partitionmanager-1.2.1.tar.xz 1794200 SHA256 eb5b8b00ab6f0a2c5ef494b1c70441100ff70bf691006c4aa95f39d00b43e4e0 SHA512 9d33847e307df65081966d4aea2b2efeb7e1befe911268c71e678d196bf0fb9160b9812c7df2021dca2a3a4a5e9efffcf435d242b3496e6e7c7b1d89fea15441 WHIRLPOOL 945676c27a5aa80b6551d75c8324ed3d85328fbfea6f2447e0345e0d1a5ba9d45165ce36332c444b3aea5076f80060b47f4568699fc5bb59e18222af0d7a56c7
diff --git a/sys-block/partitionmanager/metadata.xml b/sys-block/partitionmanager/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/sys-block/partitionmanager/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/sys-block/partitionmanager/partitionmanager-1.1.1.ebuild b/sys-block/partitionmanager/partitionmanager-1.1.1.ebuild
new file mode 100644
index 000000000000..29dca5dd7ed7
--- /dev/null
+++ b/sys-block/partitionmanager/partitionmanager-1.1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_HANDBOOK="optional"
+KDE_LINGUAS="ar bg bs ca ca@valencia cs da de el en_GB es et fi fr gl it lt nb
+nds nl pa pl pt pt_BR ro ru sk sl sr sr@ijekavian sr@ijekavianlatin sr@latin sv
+tr uk zh_CN zh_TW"
+inherit kde4-base
+
+DESCRIPTION="KDE utility for management of partitions and file systems"
+HOMEPAGE="https://www.kde.org/applications/system/kdepartitionmanager"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="
+ dev-libs/libatasmart
+ sys-apps/util-linux
+ >=sys-block/parted-3
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
diff --git a/sys-block/partitionmanager/partitionmanager-1.2.1.ebuild b/sys-block/partitionmanager/partitionmanager-1.2.1.ebuild
new file mode 100644
index 000000000000..ccf4c60d7c28
--- /dev/null
+++ b/sys-block/partitionmanager/partitionmanager-1.2.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_HANDBOOK="true"
+inherit kde5
+
+DESCRIPTION="KDE utility for management of partitions and file systems"
+HOMEPAGE="https://www.kde.org/applications/system/kdepartitionmanager"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+"
+RDEPEND="${DEPEND}
+ dev-libs/libatasmart
+ sys-apps/util-linux
+ >=sys-block/parted-3
+ !sys-block/partitionmanager:0
+"
diff --git a/sys-block/qla-fc-firmware/Manifest b/sys-block/qla-fc-firmware/Manifest
new file mode 100644
index 000000000000..67945123d6ec
--- /dev/null
+++ b/sys-block/qla-fc-firmware/Manifest
@@ -0,0 +1,3 @@
+DIST qla-fc-firmware-20071207.tar.bz2 910151 RMD160 17d68a99aabf26553cbeef51f8a12eb28ba8029e SHA1 57fe4e0add291b9a7eef8b6ed1e35ac8bc803bc7 SHA256 fc062041b8f82a72a8229075284280bbafd3d297d4b71dd05f787bcaeb8de58b
+DIST qla-fc-firmware-20080423.tar.bz2 1010881 RMD160 73e23391245e5d0268a5739bc246ceb24ab30a8f SHA1 1e9254426fbed1b06eeccc3c2f504b5cb9fc11f1 SHA256 6ecc88f97860717d42793e5ba7f672aa547b83151f176aefce9bbc8decee5497
+DIST qla-fc-firmware-20101015.tar.bz2 3237889 RMD160 dc7baf8c6733284fe0b38c499fb4c2a41c0af2b3 SHA1 afd6d4b413241d83ec2a1e8a38f0512a03421693 SHA256 e2951f8a130350ca38990afb60d16c4ea3262de5f9a7d9a75c88db04095bb6cb
diff --git a/sys-block/qla-fc-firmware/metadata.xml b/sys-block/qla-fc-firmware/metadata.xml
new file mode 100644
index 000000000000..de72ca25f268
--- /dev/null
+++ b/sys-block/qla-fc-firmware/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>base-system</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<longdescription>
+ QLogic Linux Fibre Channel HBA Firmware for ql2xxx cards.
+ This package contains snapshots of firmware releases from the QLogic FTP server.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-block/qla-fc-firmware/qla-fc-firmware-20071207-r1.ebuild b/sys-block/qla-fc-firmware/qla-fc-firmware-20071207-r1.ebuild
new file mode 100644
index 000000000000..cb62d6c97d6c
--- /dev/null
+++ b/sys-block/qla-fc-firmware/qla-fc-firmware-20071207-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="QLogic Linux Fibre Channel HBA Firmware for ql2xxx cards"
+HOMEPAGE="ftp://ftp.qlogic.com/outgoing/linux/firmware/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="qlogic-fibre-channel-firmware"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE=""
+
+# really depends on absolutely nothing
+DEPEND=""
+RDEPEND="!sys-kernel/linux-firmware"
+
+FW_BASENAME="ql2100_fw.bin ql2200_fw.bin ql2300_fw.bin ql2322_fw.bin ql2400_fw.bin ql2500_fw.bin ql6312_fw.bin"
+
+src_install() {
+ # We must install this, say QLogic's people.
+ # They have claimed to me that the /license/ directory isn't sufficient, as
+ # there is no guarantee it will be on a system - and it would not be in any
+ # binpkg either. If you do something else with the firmware blobs, you are
+ # thus strongly encouraged to keep a copy of the LICENSE file with them on
+ # the system.
+ dodoc LICENSE
+ dodoc README.* CURRENT_VERSIONS
+ insinto /lib/firmware
+ # some older firmware are always provided by upstream
+ # for reasons documented in CURRENT_VERSIONS.
+
+ # Please see README.* as to why we do not use the MID/MIDX versions by
+ # default if they are newer.
+ # TODO: Provide a means to get them for people that really want them.
+ for f in ${FW_BASENAME} ; do
+ doins ${f}.*
+ latest_f="$(ls ${f}.* |grep -v MID | sort -n | tail -n1)"
+ dosym ${latest_f} /lib/firmware/${f}
+ done
+}
diff --git a/sys-block/qla-fc-firmware/qla-fc-firmware-20080423.ebuild b/sys-block/qla-fc-firmware/qla-fc-firmware-20080423.ebuild
new file mode 100644
index 000000000000..ddcac4651f67
--- /dev/null
+++ b/sys-block/qla-fc-firmware/qla-fc-firmware-20080423.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="QLogic Linux Fibre Channel HBA Firmware for ql2xxx cards"
+HOMEPAGE="ftp://ftp.qlogic.com/outgoing/linux/firmware/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="qlogic-fibre-channel-firmware"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+# really depends on absolutely nothing
+DEPEND=""
+RDEPEND="!sys-kernel/linux-firmware"
+
+FW_BASENAME="ql2100_fw.bin ql2200_fw.bin ql2300_fw.bin ql2322_fw.bin ql2400_fw.bin ql2500_fw.bin ql6312_fw.bin"
+
+src_install() {
+ # We must install this, say QLogic's people.
+ # They have claimed to me that the /license/ directory isn't sufficient, as
+ # there is no guarantee it will be on a system - and it would not be in any
+ # binpkg either. If you do something else with the firmware blobs, you are
+ # thus strongly encouraged to keep a copy of the LICENSE file with them on
+ # the system.
+ dodoc LICENSE
+ dodoc README.* CURRENT_VERSIONS
+ insinto /lib/firmware
+ # some older firmware are always provided by upstream
+ # for reasons documented in CURRENT_VERSIONS.
+
+ # Please see README.* as to why we do not use the MID/MIDX versions by
+ # default if they are newer.
+ # TODO: Provide a means to get them for people that really want them.
+ for f in ${FW_BASENAME} ; do
+ doins ${f}.*
+ latest_f="$(ls ${f}.* |grep -v MID | sort -n | tail -n1)"
+ dosym ${latest_f} /lib/firmware/${f}
+ done
+}
diff --git a/sys-block/qla-fc-firmware/qla-fc-firmware-20101015.ebuild b/sys-block/qla-fc-firmware/qla-fc-firmware-20101015.ebuild
new file mode 100644
index 000000000000..e21cf1070a68
--- /dev/null
+++ b/sys-block/qla-fc-firmware/qla-fc-firmware-20101015.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="QLogic Linux Fibre Channel HBA Firmware for ql2xxx cards"
+HOMEPAGE="ftp://ftp.qlogic.com/outgoing/linux/firmware/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="qlogic-fibre-channel-firmware"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+# really depends on absolutely nothing
+DEPEND=""
+RDEPEND="!sys-kernel/linux-firmware"
+
+FW_BASENAME="ql2100_fw.bin ql2200_fw.bin ql2300_fw.bin ql2322_fw.bin ql2400_fw.bin ql2500_fw.bin ql6312_fw.bin"
+
+src_install() {
+ # We must install this, say QLogic's people.
+ # They have claimed to me that the /license/ directory isn't sufficient, as
+ # there is no guarantee it will be on a system - and it would not be in any
+ # binpkg either. If you do something else with the firmware blobs, you are
+ # thus strongly encouraged to keep a copy of the LICENSE file with them on
+ # the system.
+ dodoc LICENSE
+ dodoc README.* CURRENT_VERSIONS
+ insinto /lib/firmware
+ # some older firmware are always provided by upstream
+ # for reasons documented in CURRENT_VERSIONS.
+
+ # Please see README.* as to why we do not use the MID/MIDX versions by
+ # default if they are newer.
+ # TODO: Provide a means to get them for people that really want them.
+ for f in ${FW_BASENAME} ; do
+ doins ${f}.*
+ latest_f="$(ls ${f}.* |grep -v MID | sort -n | tail -n1)"
+ dosym ${latest_f} /lib/firmware/${f}
+ done
+}
diff --git a/sys-block/raid-check/Manifest b/sys-block/raid-check/Manifest
new file mode 100644
index 000000000000..861367b8d6d1
--- /dev/null
+++ b/sys-block/raid-check/Manifest
@@ -0,0 +1 @@
+DIST raid-check-20140719.tar.xz 4000 SHA256 6da3e52012411fe2de109f83f2557da21b2975060e78d992a9475b01a5de6348 SHA512 dc7b4c6e784b3ef2ca89e9dac0bbe3e47056439dfe48615b79922b47cb3b0df7f157ae52ab9de0b9abf5373bd769090088fc8712b492b0aa5327aeaeaee52edb WHIRLPOOL cb09a9d5fc17d68ca303c835d5cc458cada860f7fa6f9149f24fca31fc23f8c52f37b06bf8891beea84ac6e4e27dde83734309b4e2c56e6c6615837b85d1f88a
diff --git a/sys-block/raid-check/files/raid-check-20140719-makefile.patch b/sys-block/raid-check/files/raid-check-20140719-makefile.patch
new file mode 100644
index 000000000000..95c27ef8cc69
--- /dev/null
+++ b/sys-block/raid-check/files/raid-check-20140719-makefile.patch
@@ -0,0 +1,48 @@
+diff --git a/Makefile b/Makefile
+index 0c9ec8a..6bc0bb5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,6 @@
+ ### The project name
+ PROJECT=raid-check
+
+-### Dependencies
+-DEP_BINS=grep cat sleep awk ps renice ionice logger
+-
+ ### Destination Paths
+ D_BIN=/usr/local/sbin
+ D_CNF=/etc
+@@ -15,16 +12,11 @@ F_CONF=raid-check.conf raid-check.cron
+
+ all: install
+
+-install: test bin config
++bin install: $(PROJECT).sh config
+ # install the actual script
+- install -D --owner root --group root -m 0755 $(PROJECT).sh $(DESTDIR)$(D_BIN)/$(PROJECT)
++ install -D $(PROJECT).sh $(DESTDIR)$(D_BIN)/$(PROJECT)
+
+ test:
+- @echo "==> Checking for required external dependencies"
+- for bindep in $(DEP_BINS) ; do \
+- which $$bindep > /dev/null || { echo "$$bindep not found"; exit 1;} ; \
+- done
+-
+ @echo "==> Checking for valid script syntax"
+ bash -n raid-check.sh
+
+@@ -32,12 +24,8 @@ bin: $(PROJECT).sh test
+
+ config: $(F_CONF)
+ # Install (without overwriting) configuration files
+- if [ ! -e $(DESTDIR)$(D_CNF)/raid-check.conf ] ; then \
+- install -D -m 0644 raid-check.conf $(DESTDIR)$(D_CNF)/raid-check.conf ; \
+- fi
+- if [ ! -e $(DESTDIR)$(D_CNF)/cron.d/raid-check ] ; then \
+- install -D -m 0644 raid-check.cron $(DESTDIR)$(D_CNF)/cron.d/raid-check ; \
+- fi
++ install -D raid-check.conf $(DESTDIR)$(D_CNF)/raid-check.conf
++ install -D -m 0644 raid-check.cron $(DESTDIR)$(D_CNF)/cron.d/raid-check
+
+ uninstall:
+ rm -f $(DESTDIR)$(D_BIN)/$(PROJECT)
diff --git a/sys-block/raid-check/files/raid-check-20140719-path.patch b/sys-block/raid-check/files/raid-check-20140719-path.patch
new file mode 100644
index 000000000000..4c8680f4c01c
--- /dev/null
+++ b/sys-block/raid-check/files/raid-check-20140719-path.patch
@@ -0,0 +1,9 @@
+diff --git a/raid-check.cron b/raid-check.cron
+index 92aa48b..d7f23fd 100644
+--- a/raid-check.cron
++++ b/raid-check.cron
+@@ -1,3 +1,2 @@
+ # Run system wide raid-check once a week on Sunday at 1am by default
+-0 1 * * Sun root /usr/local/sbin/raid-check
+-
++0 1 * * Sun root /usr/sbin/raid-check
diff --git a/sys-block/raid-check/metadata.xml b/sys-block/raid-check/metadata.xml
new file mode 100644
index 000000000000..35f754ea2cec
--- /dev/null
+++ b/sys-block/raid-check/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>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <longdescription lang="en">
+ Script that should be run regularly on systems running software RAID (mdadm) to
+ perform "scrubbing" (http://en.wikipedia.org/wiki/Data_scrubbing#In_RAID)
+ </longdescription>
+ <upstream>
+ <remote-id type="github">fukawi2/raid-check</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/raid-check/raid-check-20140719-r1.ebuild b/sys-block/raid-check/raid-check-20140719-r1.ebuild
new file mode 100644
index 000000000000..9815affb01ed
--- /dev/null
+++ b/sys-block/raid-check/raid-check-20140719-r1.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 eutils
+
+DESCRIPTION="Script to do \"scrubbing\" on software RAID systems"
+HOMEPAGE="https://github.com/fukawi2/raid-check"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-path.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+}
+
+src_compile() { :; }
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake DESTDIR="${D}" D_BIN=/usr/sbin install
+}
diff --git a/sys-block/rts5229/Manifest b/sys-block/rts5229/Manifest
new file mode 100644
index 000000000000..ad14477a21b3
--- /dev/null
+++ b/sys-block/rts5229/Manifest
@@ -0,0 +1 @@
+DIST rts5229-1.07.tar.bz2 67175 SHA256 f6a3338cc41dc273567c0d074d331f401f45716769f987b4269951467331ea46 SHA512 8df0396d5a08a22507e3a0a56321de6b17d1ca90b5cbdaa9712f56f5f4db026d1b49b9dacf244407889d354cb8eeac4e771388a0fc6eb00295b81456459a4503 WHIRLPOOL 889c2a5de8ee6b5651734bb3fae70482065bde7be00b326dddf5cc55a2ff0437659bf068414990d075c1f99d59ba22ee2cf77f26dd73e6125d1f28eb9ca58922
diff --git a/sys-block/rts5229/files/rts5229-linux-3.10.patch b/sys-block/rts5229/files/rts5229-linux-3.10.patch
new file mode 100644
index 000000000000..5044234fe07d
--- /dev/null
+++ b/sys-block/rts5229/files/rts5229-linux-3.10.patch
@@ -0,0 +1,53 @@
+--- rts5229.a/rtsx.c 2013-07-03 05:24:40.728296993 +0530
++++ rts5229.b/rtsx.c 2013-07-03 05:20:56.452568592 +0530
+@@ -126,38 +126,18 @@
+
+
+ #undef SPRINTF
+-#define SPRINTF(args...) \
+- do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
++#define SPRINTF(args...) seq_printf(m, ##args)
+
+-static int proc_info (struct Scsi_Host *host, char *buffer,
+- char **start, off_t offset, int length, int inout)
++static int show_info(struct seq_file *m, struct Scsi_Host *host)
+ {
+- char *pos = buffer;
+
+-
+- if (inout)
+- return length;
+-
+-
+ SPRINTF(" Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME);
+-
+
+ SPRINTF(" Vendor: Realtek Corp.\n");
+ SPRINTF(" Product: RTS5229\n");
+ SPRINTF(" Version: %s\n", DRIVER_VERSION);
+ SPRINTF(" Build: %s, %s\n", __DATE__, __TIME__);
+-
+- /*
+- * Calculate start of next buffer, and return value.
+- */
+- *start = buffer + offset;
+-
+- if ((pos - buffer) < offset)
+- return (0);
+- else if ((pos - buffer - offset) < length)
+- return (pos - buffer - offset);
+- else
+- return (length);
++ return 0;
+ }
+
+
+@@ -263,7 +243,7 @@
+
+ .name = CR_DRIVER_NAME,
+ .proc_name = CR_DRIVER_NAME,
+- .proc_info = proc_info,
++ .show_info = show_info,
+ .info = host_info,
+
+
diff --git a/sys-block/rts5229/files/rts5229-linux-3.8.patch b/sys-block/rts5229/files/rts5229-linux-3.8.patch
new file mode 100644
index 000000000000..81779aef2767
--- /dev/null
+++ b/sys-block/rts5229/files/rts5229-linux-3.8.patch
@@ -0,0 +1,29 @@
+--- rts5229.a/rtsx.c 2012-03-21 07:10:18.000000000 +0530
++++ rts5229.b/rtsx.c 2013-05-29 01:06:32.333737569 +0530
+@@ -911,7 +911,7 @@
+ chip->support_mmc = 1;
+ }
+
+-static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
++static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
+ {
+ struct Scsi_Host *host;
+ struct rtsx_dev *dev;
+@@ -1066,7 +1066,7 @@
+ }
+
+
+-static void __devexit rtsx_remove(struct pci_dev *pci)
++static void rtsx_remove(struct pci_dev *pci)
+ {
+ struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
+
+@@ -1092,7 +1092,7 @@
+ .name = CR_DRIVER_NAME,
+ .id_table = rts5229_ids,
+ .probe = rtsx_probe,
+- .remove = __devexit_p(rtsx_remove),
++ .remove = rtsx_remove,
+ #ifdef CONFIG_PM
+ .suspend = rtsx_suspend,
+ .resume = rtsx_resume,
diff --git a/sys-block/rts5229/metadata.xml b/sys-block/rts5229/metadata.xml
new file mode 100644
index 000000000000..6ab6ec0a4040
--- /dev/null
+++ b/sys-block/rts5229/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>vikraman@gentoo.org</email>
+ <name>Vikraman Choudhury</name>
+ </maintainer>
+ <longdescription lang="en">
+ PCIE RTS5229 card reader driver for Linux.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/sys-block/rts5229/rts5229-1.07-r5.ebuild b/sys-block/rts5229/rts5229-1.07-r5.ebuild
new file mode 100644
index 000000000000..5d2fccb2c910
--- /dev/null
+++ b/sys-block/rts5229/rts5229-1.07-r5.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod
+
+DESCRIPTION="PCIE RTS5229 card reader driver for Linux"
+HOMEPAGE="http://www.realtek.com.tw/Downloads/downloadsView.aspx?PNid=15&PFid=25&Level=4&Conn=3&DownTypeID=3"
+SRC_URI="http://dev.gentoo.org/~vikraman/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+MODULE_NAMES="rts5229(misc/drivers/scsi)"
+BUILD_TARGETS="default"
+
+src_prepare() {
+ sed -e 's/\/lib\/modules\/\$(shell uname -r)\/build\//\$(KERNELDIR)/g' \
+ -i Makefile || die "Sed failed!"
+ ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 8 ])) \
+ && epatch "${FILESDIR}/${PN}-linux-3.8.patch"
+ ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 10 ])) \
+ && epatch "${FILESDIR}/${PN}-linux-3.10.patch"
+ sed -e '/__DATE__/d' \
+ -i rtsx.c || die "Sed failed!"
+}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
+}
diff --git a/sys-block/rts_pstor/Manifest b/sys-block/rts_pstor/Manifest
new file mode 100644
index 000000000000..dff8ce89ee00
--- /dev/null
+++ b/sys-block/rts_pstor/Manifest
@@ -0,0 +1 @@
+DIST rts_pstor-1.10.tar.bz2 79549 SHA256 21d819a9b89f029a86fdc807f212ca38ed903e071bed204b2ddb84b2a017a31f SHA512 26d29ccda55672adab8b96a8318e240d0c9d50ebf614853284cf218058c5788cc83b818ce118ac313c0ce6a67aef8ad13d93ed26212db7e05db51b8a7860b48d WHIRLPOOL 15d4cb19ababfffd41b95160531ca048cf2d1affc9ac8f846c7ea7e3c92289a47751e028908333e973c2a92e3ff18b606c92c8223ae8a48fdf5ef911e5c1d43c
diff --git a/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch b/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch
new file mode 100644
index 000000000000..0070549b88d8
--- /dev/null
+++ b/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch
@@ -0,0 +1,53 @@
+--- rts_pstor.a/rtsx.c 2013-07-03 05:39:26.316723407 +0530
++++ rts_pstor.b/rtsx.c 2013-07-03 05:28:28.584882761 +0530
+@@ -135,38 +135,18 @@
+
+
+ #undef SPRINTF
+-#define SPRINTF(args...) \
+- do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
++#define SPRINTF(args...) seq_printf(m, ##args)
+
+-static int proc_info (struct Scsi_Host *host, char *buffer,
+- char **start, off_t offset, int length, int inout)
++static int show_info(struct seq_file *m, struct Scsi_Host *host)
+ {
+- char *pos = buffer;
+-
+-
+- if (inout)
+- return length;
+-
+
+ SPRINTF(" Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME);
+-
+
+ SPRINTF(" Vendor: Realtek Corp.\n");
+ SPRINTF(" Product: PCIE Card Reader\n");
+ SPRINTF(" Version: %s\n", DRIVER_VERSION);
+ SPRINTF(" Build: %s\n", DRIVER_MAKE_TIME);
+-
+- /*
+- * Calculate start of next buffer, and return value.
+- */
+- *start = buffer + offset;
+-
+- if ((pos - buffer) < offset)
+- return (0);
+- else if ((pos - buffer - offset) < length)
+- return (pos - buffer - offset);
+- else
+- return (length);
++ return 0;
+ }
+
+
+@@ -272,7 +252,7 @@
+
+ .name = CR_DRIVER_NAME,
+ .proc_name = CR_DRIVER_NAME,
+- .proc_info = proc_info,
++ .show_info = show_info,
+ .info = host_info,
+
+
diff --git a/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch b/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch
new file mode 100644
index 000000000000..797b1088f31b
--- /dev/null
+++ b/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch
@@ -0,0 +1,29 @@
+--- rts_pstor.a/rtsx.c 2011-01-11 14:41:07.000000000 +0530
++++ rts_pstor.b/rtsx.c 2013-05-29 00:39:11.319267655 +0530
+@@ -913,7 +913,7 @@
+ chip->s3_pwr_off_delay = 1000;
+ }
+
+-static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
++static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
+ {
+ struct Scsi_Host *host;
+ struct rtsx_dev *dev;
+@@ -1077,7 +1077,7 @@
+ }
+
+
+-static void __devexit rtsx_remove(struct pci_dev *pci)
++static void rtsx_remove(struct pci_dev *pci)
+ {
+ struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
+
+@@ -1104,7 +1104,7 @@
+ .name = CR_DRIVER_NAME,
+ .id_table = rtsx_ids,
+ .probe = rtsx_probe,
+- .remove = __devexit_p(rtsx_remove),
++ .remove = rtsx_remove,
+ #ifdef CONFIG_PM
+ .suspend = rtsx_suspend,
+ .resume = rtsx_resume,
diff --git a/sys-block/rts_pstor/metadata.xml b/sys-block/rts_pstor/metadata.xml
new file mode 100644
index 000000000000..f7ecccc7cec2
--- /dev/null
+++ b/sys-block/rts_pstor/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>vikraman@gentoo.org</email>
+ <name>Vikraman Choudhury</name>
+ </maintainer>
+ <longdescription lang="en">
+ PCIE RTS5209 card reader driver for Linux.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/sys-block/rts_pstor/rts_pstor-1.10-r4.ebuild b/sys-block/rts_pstor/rts_pstor-1.10-r4.ebuild
new file mode 100644
index 000000000000..5b47781512cc
--- /dev/null
+++ b/sys-block/rts_pstor/rts_pstor-1.10-r4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod
+
+DESCRIPTION="PCIE RTS5209 card reader driver for Linux"
+HOMEPAGE="http://www.realtek.com.tw/Downloads/downloadsView.aspx?PNid=15&PFid=25&Level=4&Conn=3&DownTypeID=3"
+SRC_URI="http://dev.gentoo.org/~vikraman/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+MODULE_NAMES="rts_pstor(misc/drivers/scsi)"
+BUILD_TARGETS="default"
+
+src_prepare() {
+ sed -e 's/\/lib\/modules\/\$(shell uname -r)\/build\//\$(KERNELDIR)/g' \
+ -i Makefile || die "Sed failed!"
+ ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 8 ])) \
+ && epatch "${FILESDIR}/${PN}-linux-3.8.patch"
+ ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 10 ])) \
+ && epatch "${FILESDIR}/${PN}-linux-3.10.patch"
+}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
+}
diff --git a/sys-block/rtsadmin/metadata.xml b/sys-block/rtsadmin/metadata.xml
new file mode 100644
index 000000000000..59fc80b97cfa
--- /dev/null
+++ b/sys-block/rtsadmin/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/rtsadmin/rtsadmin-9999.ebuild b/sys-block/rtsadmin/rtsadmin-9999.ebuild
new file mode 100644
index 000000000000..0dc7c673d45e
--- /dev/null
+++ b/sys-block/rtsadmin/rtsadmin-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+EGIT_REPO_URI="git://linux-iscsi.org/${PN}.git"
+PYTHON_DEPEND="2"
+RESTRICT_PYTHON_ABIS="3.*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils distutils git-2 python linux-info
+
+DESCRIPTION="RTSAdmin Community Edition for target_core_mod/ConfigFS"
+HOMEPAGE="http://linux-iscsi.org/"
+SRC_URI=""
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="
+ dev-python/configshell
+ dev-python/rtslib
+ sys-block/lio-utils
+ "
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~TARGET_CORE"
+
+src_install() {
+ distutils_src_install
+ keepdir /var/target/
+ keepdir /var/target/fabric
+}
diff --git a/sys-block/sas2ircu/Manifest b/sys-block/sas2ircu/Manifest
new file mode 100644
index 000000000000..f221dd21b516
--- /dev/null
+++ b/sys-block/sas2ircu/Manifest
@@ -0,0 +1,2 @@
+DIST SAS2IRCU_P19.zip 2664125 SHA256 e5bb0bc37099016d6f7486f623cb74baeef9903afdd0610a7c8850331ff8b3d5 SHA512 99f5092e1344747912b081f4f9e22a1f22d55e5a951583f5482213a38a1faa7cd890b573fdeb50d4770bb862d970364ccaff982969813edd9581e80bc39e2bdf WHIRLPOOL 9e173c5f4ade04a7fecb994f98c4d7457375c559c7f0e9994d38e3a2b1847577084449ee0ab1a3ece06e5a57c74ae41294b135aeffa396aa56120d5a6a0ea37d
+DIST SAS2IRCU_User_Guide.pdf 794046 SHA256 b39867aab18d60180a21d34d01476216aa07d6b2af5368713f7bb16cba249506 SHA512 515869794be428ffbefcbfadac992912fb0eebab0cda640b315b4a231b5f25f1205978605f108b9009380015f3058c47e0ce4352c693ef23ab31980ea8b821a0 WHIRLPOOL 2ce68f5e2880d2c865164fde7d69669893b547da71d784c84194116a3aa491b2f2d72e932217ef0e265fbf1f67289bcb8d29bb010cf21a2ca2d8f1acb367774f
diff --git a/sys-block/sas2ircu/metadata.xml b/sys-block/sas2ircu/metadata.xml
new file mode 100644
index 000000000000..f2fe9421c297
--- /dev/null
+++ b/sys-block/sas2ircu/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+</maintainer>
+<use>
+ <flag name="efi">Install EFI variant as well</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-block/sas2ircu/sas2ircu-19.ebuild b/sys-block/sas2ircu/sas2ircu-19.ebuild
new file mode 100644
index 000000000000..2358ca2d1c52
--- /dev/null
+++ b/sys-block/sas2ircu/sas2ircu-19.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit mount-boot
+
+DESCRIPTION="LSI MPT-SAS2 controller management tool"
+HOMEPAGE="http://www.lsi.com/support/Pages/download-results.aspx?component=Storage+Component&productfamily=Host+Bus+Adapters&productcode=0&assettype=Miscellaneous&productname=&keyword=SAS2IRCU"
+LICENSE="LSI"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd ~ppc64 ~amd64-fbsd ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="efi doc"
+RESTRICT="strip fetch mirror"
+DEPEND=""
+RDEPEND=""
+QA_PREBUILT="opt/lsi/sas2ircu boot/efi/sas2ircu.efi"
+
+MY_PN=SAS2IRCU
+MY_P="${MY_PN}_P${PV}"
+
+DISTFILE_BIN=${MY_P}.zip
+DISTFILE_DOC=SAS2IRCU_User_Guide.pdf
+DOC_PV=12
+
+SRC_URI="
+http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/Host%20Bus%20Adapters%20Common%20Files/SAS_SATA_6G_P${PV}/$DISTFILE_BIN
+doc? ( http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/Host%20Bus%20Adapters%20Common%20Files/SAS_SATA_6G_P${DOC_PV}/SAS2IRCU_User_Guide.pdf )
+"
+
+LICENSE_URL="http://www.lsi.com/cm/License.do?url=&prodName=&subType=Miscellaneous&locale=EN"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_nofetch() {
+ elog "LSI has a mandatory click-through license on thier binaries."
+ elog "Please visit $HOMEPAGE and download ${DISTFILE_BIN} from the Miscellaneous section."
+ elog "After downloading, move ${MY_P} into $DISTDIR"
+ if use doc; then
+ elog "Please also download 'SAS-2 Integrated RAID Configuration Utility User Guide' (${DISTFILE_DOC}) "
+ elog "and also place it into $DISTDIR"
+ fi
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "LSI SAS 2004"
+ elog "LSI SAS 2008"
+ elog "LSI SAS 2108"
+ elog "LSI SAS 2208"
+ elog "LSI SAS 2304"
+ elog "LSI SAS 2308"
+ elog "Dell PERC H200, H700"
+ elog "IBM System x3200 M2 (4367, 4368)"
+ elog "IBM System x3200 M3 (7327, 7328)"
+ elog "IBM System x3250 M2 (4190, 4191, 4194)"
+ elog "IBM System x3250 M3 (4251, 4252, 4261)"
+ elog "IBM System x3350 (4192, 4193)"
+ elog "IBM System x3400 (7973, 7974, 7975, 7976)"
+ elog "IBM System x3400 M2 (7836, 7837)"
+ elog "IBM System x3455 (7940, 7941)"
+ elog "IBM System x3500 (7977)"
+ elog "IBM System x3500 M2 (7839)"
+ elog "IBM System x3550 (7978, 1913)"
+ elog "IBM System x3550 M2 (7946, 4198)"
+ elog "IBM System x3650 (7979, 1914)"
+ elog "IBM System x3650 M2 (7947, 4199)"
+ elog "IBM System x3650 NAS (7979)"
+ elog "IBM System x3655 (7985, 7943)"
+ elog "IBM System x3755 (8877, 7163)"
+ elog "IBM System x3850 M2 (7141, 7144, 7233, 7234)"
+ elog "IBM System x3850 X5 (7145, 7146)"
+ elog "IBM System x3950 M2 (7141, 7233, 7234)"
+ elog "IBM System x3950 X5 (7145)"
+}
+
+src_unpack() {
+ unpack ${DISTFILE_BIN}
+}
+
+src_install() {
+ exeinto /opt/lsi/
+ use amd64 || use x86 && doexe sas2ircu_linux_x86_rel/sas2ircu
+ use ppc64 && doexe sas2ircu_linux_x86_rel/sas2ircu
+ use amd64-fbsd && doexe sas2ircu_freebsd_amd64_rel/sas2ircu
+ use x86-fbsd && doexe sas2ircu_freebsd_i386_rel/sas2ircu
+ use x64-solaris || use x86-solaris && doexe sas2ircu_solaris_x86_rel/sas2ircu
+ use sparc-solaris && doexe sas2ircu_solaris_sparc_rel/sas2ircu
+ if use efi; then
+ exeinto /boot/efi/
+ doexe sas2ircu_efi_ebc_rel/sas2ircu.efi
+ fi
+ dodoc Readme_Release_Notes_SAS2IRCU_Phase_17.00.00.00.txt
+ dodoc SAS2IRCU_Phase${PV}.0-${PV}.00.00.00.pdf
+ use doc && dodoc "${DISTDIR}"/$DISTFILE_DOC
+}
diff --git a/sys-block/sas3ircu/Manifest b/sys-block/sas3ircu/Manifest
new file mode 100644
index 000000000000..6fd42d6fa366
--- /dev/null
+++ b/sys-block/sas3ircu/Manifest
@@ -0,0 +1,2 @@
+DIST SAS3IRCU_P5.zip 2655605 SHA256 8a05cefa544063c61a5eddd8030e48375545a74e0480c735ad5ed76a99c04d28 SHA512 233ec5ea8e32123652382a9072831fa35f496ce0755d8fd7113139f43e57837053e00eb7cae5f5273177510444f384fc6f08f7278232fe3d6601771ee214d9dc WHIRLPOOL 643f935d5b1162e91df6af820bf4b70930974630a89cb772cb003e3e30b98a50ca7c9c9c63a309eab5fdf4bd759cc7c11bf4bf925c10edbdd6fa92a600f61d5f
+DIST SAS3IRCU_UG.pdf 690245 SHA256 0920984018e0873d65c0587c1ee436d3e72e6de3558730d61c33b53f4fad64b4 SHA512 9e7a47f32bd19b708b1eedd63d7d7112a17c8da952b74630196dc2891cd14f758394dcc14b8be05666e6133a3bb10e77784bd62749fe4b1e2d7f7c71ae26fe2b WHIRLPOOL ef0f2dd0c5d807bd0f82ac56fcfec23d2c16b15a7567dc7a29d0c15b076d4b1f0aa160fe2d1c9cc679579eb41e51ab7b6639f1e35c3a5124ebf088536ba7d8df
diff --git a/sys-block/sas3ircu/metadata.xml b/sys-block/sas3ircu/metadata.xml
new file mode 100644
index 000000000000..f2fe9421c297
--- /dev/null
+++ b/sys-block/sas3ircu/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+</maintainer>
+<use>
+ <flag name="efi">Install EFI variant as well</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-block/sas3ircu/sas3ircu-5.ebuild b/sys-block/sas3ircu/sas3ircu-5.ebuild
new file mode 100644
index 000000000000..cd810bc58d8c
--- /dev/null
+++ b/sys-block/sas3ircu/sas3ircu-5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit mount-boot
+
+DESCRIPTION="LSI MPT-SAS3 controller management tool"
+HOMEPAGE="http://www.lsi.com/support/Pages/download-results.aspx?component=Storage+Component&productfamily=Host+Bus+Adapters&productcode=0&assettype=Miscellaneous&productname=&keyword=SAS3IRCU"
+LICENSE="LSI"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd ~ppc64 ~amd64-fbsd ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="efi doc"
+RESTRICT="strip fetch mirror"
+DEPEND=""
+RDEPEND=""
+QA_PREBUILT="opt/lsi/sas3ircu boot/efi/sas3ircu.efi"
+
+MY_PN=SAS3IRCU
+MY_P="${MY_PN}_P${PV}"
+
+DISTFILE_BIN=${MY_P}.zip
+DISTFILE_DOC=SAS3IRCU_UG.pdf
+
+SRC_URI="
+http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/Host%20Bus%20Adapters%20Common%20Files/SAS_SATA_12G_P${PV}/${DISTFILE_BIN}
+doc? ( http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/${DISTFILE_DOC} )
+"
+
+LICENSE_URL="http://www.lsi.com/cm/License.do?url=&prodName=&subType=Miscellaneous&locale=EN"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_nofetch() {
+ elog "LSI has a mandatory click-through license on thier binaries."
+ elog "Please visit $HOMEPAGE and download ${DISTFILE_BIN} from the Mangement Software section."
+ elog "After downloading, move ${MY_P} into $DISTDIR"
+ if use doc; then
+ elog "Please also download 'SAS-3 Integrated RAID Configuration Utility User Guide' (${DISTFILE_DOC}) "
+ elog "and also place it into $DISTDIR"
+ fi
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "LSI SAS 3004"
+ elog "LSI SAS 3008"
+}
+
+src_unpack() {
+ unpack ${DISTFILE_BIN}
+}
+
+src_install() {
+ exeinto /opt/lsi/
+ use amd64 || use x86 && doexe sas3ircu_linux_x86_rel/sas3ircu
+ use ppc64 && doexe sas3ircu_linux_x86_rel/sas3ircu
+ use amd64-fbsd && doexe sas3ircu_freebsd_amd64_rel/sas3ircu
+ use x86-fbsd && doexe sas3ircu_freebsd_i386_rel/sas3ircu
+ use x64-solaris || use x86-solaris && doexe sas3ircu_solaris_x86_rel/sas3ircu
+ use sparc-solaris && doexe sas3ircu_solaris_sparc_rel/sas3ircu
+ if use efi; then
+ exeinto /boot/efi/
+ doexe sas3ircu_udk_uefi__x64_rel/sas3ircu.efi
+ fi
+ dodoc IRCU_MPT_GEN3_Phase5.0-06.00.00.00.pdf
+ dodoc README_SAS3IRCU_P${PV}.txt
+ use doc && dodoc "${DISTDIR}"/$DISTFILE_DOC
+}
diff --git a/sys-block/scsiadd/Manifest b/sys-block/scsiadd/Manifest
new file mode 100644
index 000000000000..2d8b90607f9f
--- /dev/null
+++ b/sys-block/scsiadd/Manifest
@@ -0,0 +1 @@
+DIST scsiadd-1.97.tar.gz 43574 SHA256 7edbb0b2c9f0705b7ede7423f2e76bcf24ec533bdf7ea522b6495989e6c41cf1
diff --git a/sys-block/scsiadd/metadata.xml b/sys-block/scsiadd/metadata.xml
new file mode 100644
index 000000000000..e9e266426e29
--- /dev/null
+++ b/sys-block/scsiadd/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Add and remove SCSI devices from your Linux system during runtime.
+ No need to reboot your system, just because you have switched on
+ an external device.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-block/scsiadd/scsiadd-1.97.ebuild b/sys-block/scsiadd/scsiadd-1.97.ebuild
new file mode 100644
index 000000000000..8367682506e2
--- /dev/null
+++ b/sys-block/scsiadd/scsiadd-1.97.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit user toolchain-funcs flag-o-matic
+
+DESCRIPTION="Add and remove SCSI devices from your Linux system during runtime"
+HOMEPAGE="http://llg.cubic.org/tools/"
+SRC_URI="http://llg.cubic.org/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="suid"
+DEPEND=""
+
+pkg_setup() {
+ use suid && enewgroup scsi
+}
+
+src_prepare() {
+ # remove 'strip' command
+ sed -i -e "s:^\(.*strip.*\):#\1:g" Makefile.in
+
+ # convert docs to utf-8
+ if [ -x "$(type -p iconv)" ]; then
+ for X in NEWS README; do
+ iconv -f LATIN1 -t UTF8 -o "${X}~" "${X}" && mv -f "${X}~" "${X}" || rm -f "${X}~"
+ done
+ fi
+}
+
+src_compile() {
+ # extra safety for suid
+ append-ldflags -Wl,-z,now
+
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dosbin scsiadd || die "install failed"
+ if use suid; then
+ fowners root:scsi /usr/sbin/scsiadd
+ fperms 4710 /usr/sbin/scsiadd
+ fi
+ dodoc NEWS README TODO
+ doman scsiadd.8
+}
+
+pkg_postinst() {
+ if use suid; then
+ ewarn
+ ewarn "You have chosen to install ${PN} with the binary setuid root. This"
+ ewarn "means that if there any undetected vulnerabilities in the binary,"
+ ewarn "then local users may be able to gain root access on your machine."
+ ewarn
+ fi
+}
diff --git a/sys-block/scsiping/Manifest b/sys-block/scsiping/Manifest
new file mode 100644
index 000000000000..39992221ac09
--- /dev/null
+++ b/sys-block/scsiping/Manifest
@@ -0,0 +1 @@
+DIST scsiping-0.0.1.tgz 1633 RMD160 415513259d587b272a06d064370549e6d89940e1 SHA1 6317b33aeb6c48d4c7536f93868c598f2c46d294 SHA256 631902416fc4b175d3dd5e7023454721a07a07e00ef34a141f48815aa0c70c15
diff --git a/sys-block/scsiping/metadata.xml b/sys-block/scsiping/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/sys-block/scsiping/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/sys-block/scsiping/scsiping-0.0.1.ebuild b/sys-block/scsiping/scsiping-0.0.1.ebuild
new file mode 100644
index 000000000000..6a4868976bf4
--- /dev/null
+++ b/sys-block/scsiping/scsiping-0.0.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="SCSIPing pings a host on the SCSI-chain"
+HOMEPAGE="http://www.vanheusden.com/Linux/"
+SRC_URI="http://www.vanheusden.com/Linux/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ sed -i -e '/strip scsiping/d' ${S}/Makefile
+}
+
+src_compile() {
+ emake DEBUG='' CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin scsiping
+}
+
+pkg_postinst() {
+ ewarn "WARNING: using scsiping on a device with mounted partitions may be hazardous to your system!"
+}
diff --git a/sys-block/scsirastools/Manifest b/sys-block/scsirastools/Manifest
new file mode 100644
index 000000000000..eef964c770e5
--- /dev/null
+++ b/sys-block/scsirastools/Manifest
@@ -0,0 +1,3 @@
+DIST scsirastools-1.5.4.tar.gz 632340 SHA256 d22c4917d8d2277710ea6bd4742874a62fc5666154ee6715966216daa865297c
+DIST scsirastools-1.5.6.tar.gz 549895 SHA256 fc3663bdd78ef14c75cc45d1922329a1be80a433627b4936593175f728b5b48a
+DIST scsirastools-1.5.7.tar.gz 677348 SHA256 0b53e731cb03b4200e5f46b5e79b20e329939c276d65b15835ceba0a1fd4055a
diff --git a/sys-block/scsirastools/files/scsirastools-1.5.6-glibc-2.10.patch b/sys-block/scsirastools/files/scsirastools-1.5.6-glibc-2.10.patch
new file mode 100644
index 000000000000..de874bad2911
--- /dev/null
+++ b/sys-block/scsirastools/files/scsirastools-1.5.6-glibc-2.10.patch
@@ -0,0 +1,87 @@
+diff -ur scsirastools-1.5.6.orig/src/getmd.c scsirastools-1.5.6/src/getmd.c
+--- scsirastools-1.5.6.orig/src/getmd.c 2007-02-02 21:16:38.000000000 +0200
++++ scsirastools-1.5.6/src/getmd.c 2009-08-05 22:51:00.000000000 +0300
+@@ -81,7 +81,7 @@
+ } else return (-1); /*not found*/
+ }
+
+-static int getline(FILE * fd, char *buf, int len)
++static int get_line(FILE * fd, char *buf, int len)
+ {
+ int i;
+ int ch;
+@@ -119,7 +119,7 @@
+ sraidstr = strlen(raidstr);
+ strcpy(mdpart, "/dev/sda1"); /* default */
+ strcpy(rdev, "/dev/md0"); /* default */
+- while ((rlen = getline(fd, buf, 80)) > 0) { /* process each line */
++ while ((rlen = get_line(fd, buf, 80)) > 0) { /* process each line */
+ buf[rlen] = 0; /* stringify */
+ /* look for raiddev string */
+ i = findmatch(buf, rlen, raidstr, sraidstr, 0);
+diff -ur scsirastools-1.5.6.orig/src/sgraidmon.c scsirastools-1.5.6/src/sgraidmon.c
+--- scsirastools-1.5.6.orig/src/sgraidmon.c 2007-10-16 01:15:15.000000000 +0300
++++ scsirastools-1.5.6/src/sgraidmon.c 2009-08-05 22:51:00.000000000 +0300
+@@ -330,7 +330,7 @@
+ rdev[0] = 0; /* default rdev (mddev) */
+ strcpy(mdpart, "/dev/sdz1"); /* default mdpart */
+ foundit = 0;
+- while ((rlen = getline(fd, buf, 80)) > 0) { /* process each line */
++ while ((rlen = get_line(fd, buf, 80)) > 0) { /* process each line */
+ buf[rlen] = 0; /* stringify */
+ /* check for comment */
+ if (buf[0] == '#') continue;
+@@ -392,7 +392,7 @@
+ if (fd == NULL) return (np);
+ sraidstr = strlen(raidstr);
+ sdevstr = strlen(devstr);
+- while ((rlen = getline(fd, buf, 80)) > 0) { /* process each line */
++ while ((rlen = get_line(fd, buf, 80)) > 0) { /* process each line */
+ buf[rlen] = 0; /* stringify */
+ /* check for comment */
+ if (buf[0] == '#') continue;
+diff -ur scsirastools-1.5.6.orig/src/sgsafte.c scsirastools-1.5.6/src/sgsafte.c
+--- scsirastools-1.5.6.orig/src/sgsafte.c 2007-09-13 00:45:29.000000000 +0300
++++ scsirastools-1.5.6/src/sgsafte.c 2009-08-05 22:51:00.000000000 +0300
+@@ -231,7 +231,7 @@
+ rdev[0] = 0; /* default rdev (mddev) */
+ strcpy(mdpart, "/dev/sdz1"); /* default mdpart */
+ foundit = 0;
+- while ((rlen = getline(fd, buf, 80)) > 0) { /* process each line */
++ while ((rlen = get_line(fd, buf, 80)) > 0) { /* process each line */
+ buf[rlen] = 0; /* stringify */
+ /* look for raiddev string */
+ i = findmatch(buf, rlen, raidstr, sraidstr, 0);
+@@ -284,7 +284,7 @@
+ fd = fopen(raidfile, "r");
+ if (fd == NULL) return (np);
+ sraidstr = strlen(raidstr);
+- while ((rlen = getline(fd, buf, 80)) > 0) { /* process each line */
++ while ((rlen = get_line(fd, buf, 80)) > 0) { /* process each line */
+ buf[rlen] = 0; /* stringify */
+ /* look for raiddev string */
+ i = findmatch(buf, rlen, raidstr, sraidstr, 0);
+diff -ur scsirastools-1.5.6.orig/src/sgsubmon.c scsirastools-1.5.6/src/sgsubmon.c
+--- scsirastools-1.5.6.orig/src/sgsubmon.c 2007-10-16 17:03:39.000000000 +0300
++++ scsirastools-1.5.6/src/sgsubmon.c 2009-08-05 22:51:00.000000000 +0300
+@@ -159,7 +159,7 @@
+ return;
+ }
+
+-int getline(FILE * fd, char *buf, int len)
++int get_line(FILE * fd, char *buf, int len)
+ {
+ int i;
+ int ch;
+diff -ur scsirastools-1.5.6.orig/src/sgsubmon.h scsirastools-1.5.6/src/sgsubmon.h
+--- scsirastools-1.5.6.orig/src/sgsubmon.h 2007-09-13 00:38:28.000000000 +0300
++++ scsirastools-1.5.6/src/sgsubmon.h 2009-08-05 22:50:59.000000000 +0300
+@@ -124,7 +124,7 @@
+ void itoh(uchar * chp, int len, char *str);
+ void dumpbufr(FILE * fdout, uchar * bufp, int mlen, char *hdr);
+ void dump_buf(FILE * fdout, uchar * bufp, int mlen, char *hdr, char fascii);
+-int getline(FILE * fd, char *buf, int len) ;
++int get_line(FILE * fd, char *buf, int len) ;
+ int findmatch(char *buffer,int sbuf, char *pattern,int spattern,char figncase);
+ int fillstr(char *to, uchar *from,int len);
+ int IsSATA(int idev);
diff --git a/sys-block/scsirastools/metadata.xml b/sys-block/scsirastools/metadata.xml
new file mode 100644
index 000000000000..eba19a181423
--- /dev/null
+++ b/sys-block/scsirastools/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>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">scsirastools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/scsirastools/scsirastools-1.5.4.ebuild b/sys-block/scsirastools/scsirastools-1.5.4.ebuild
new file mode 100644
index 000000000000..2d4da1c58b2c
--- /dev/null
+++ b/sys-block/scsirastools/scsirastools-1.5.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools
+
+DESCRIPTION="Serviceability for SCSI Disks and Arrays"
+HOMEPAGE="http://scsirastools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE=""
+DEPEND="sys-apps/rescan-scsi-bus
+ sys-apps/sg3_utils"
+#RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ # this builds a really old mdadm
+ sed -i.orig \
+ -e '/^SUBDIRS/s,mdadm.d,,' \
+ -e '/^SUBDIRS/s,files,,' \
+ "${S}"/Makefile.am || die "sed Makefile.am failed"
+ cd "${S}"
+ eautoreconf
+ # i386 ELF binaries in tarball = bad
+ rm -f "${S}"/files/alarms*
+
+ # Fix up /sbin instances to be /usr/sbin instead
+ for i in src/sgraidmon.c src/sgdiskmon.c ; do
+ sed -i "${S}"/${i} \
+ -e '/evtcmd\[\].*\"\/sbin\//s,/sbin/,/usr/sbin/,' \
+ || die "Failed to set /sbin in sources"
+ done
+}
+
+src_compile() {
+ econf --sbindir=/usr/sbin \
+ || die "econf failed"
+ emake \
+ || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ docdir="/usr/share/doc/${PF}/"
+ emake install DESTDIR="${D}" datato="${D}${docdir}" \
+ || die "emake install failed"
+ dosbin files/sgevt
+ dosbin files/mdevt
+ # unneeded files
+ rm -f "${D}"${docdir}/{SCSIRAS,COPYING}
+ # install modepage files
+ insinto /usr/share/${PN}
+ doins files/*.mdf
+ # new docs
+ dodoc ChangeLog AUTHORS TODO
+ # ensure that other docs from the emake install are compressed too.
+ prepalldocs
+}
diff --git a/sys-block/scsirastools/scsirastools-1.5.6.ebuild b/sys-block/scsirastools/scsirastools-1.5.6.ebuild
new file mode 100644
index 000000000000..0c3d2c1ed749
--- /dev/null
+++ b/sys-block/scsirastools/scsirastools-1.5.6.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+DESCRIPTION="Serviceability for SCSI Disks and Arrays"
+HOMEPAGE="http://scsirastools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE=""
+
+RDEPEND="sys-apps/rescan-scsi-bus
+ sys-apps/sg3_utils"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ # this builds a really old mdadm
+ sed -i \
+ -e '/RPMB/d' \
+ -e '/^SUBDIRS/s,mdadm.d,,' \
+ -e '/^SUBDIRS/s,files,,' \
+ "${S}"/Makefile.am || die "sed Makefile.am failed"
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+ eautoreconf
+ # i386 ELF binaries in tarball = bad
+ rm -f "${S}"/files/alarms*
+
+ # Fix up /sbin instances to be /usr/sbin instead
+ for i in src/sgraidmon.c src/sgdiskmon.c ; do
+ sed -i "${S}"/${i} \
+ -e '/evtcmd\[\].*\"\/sbin\//s,/sbin/,/usr/sbin/,' \
+ || die "Failed to set /sbin in sources"
+ done
+}
+
+src_compile() {
+ econf --sbindir=/usr/sbin \
+ || die "econf failed"
+ emake \
+ || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ docdir="/usr/share/doc/${PF}/"
+ emake install DESTDIR="${D}" datato="${D}${docdir}" \
+ || die "emake install failed"
+ dosbin files/sgevt
+ dosbin files/mdevt
+ # unneeded files
+ rm -f "${D}"${docdir}/{SCSIRAS,COPYING}
+ # install modepage files
+ insinto /usr/share/${PN}
+ doins files/*.mdf
+ # new docs
+ dodoc ChangeLog AUTHORS TODO
+ # ensure that other docs from the emake install are compressed too.
+ prepalldocs
+}
diff --git a/sys-block/scsirastools/scsirastools-1.5.7.ebuild b/sys-block/scsirastools/scsirastools-1.5.7.ebuild
new file mode 100644
index 000000000000..fa1f40877aab
--- /dev/null
+++ b/sys-block/scsirastools/scsirastools-1.5.7.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+DESCRIPTION="Serviceability for SCSI Disks and Arrays"
+HOMEPAGE="http://scsirastools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="sys-apps/rescan-scsi-bus
+ sys-apps/sg3_utils"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # this builds a really old mdadm
+ sed -i \
+ -e '/RPMB/d' \
+ -e '/^SUBDIRS/s,mdadm.d,,' \
+ -e '/^SUBDIRS/s,files,,' \
+ Makefile.am || die "sed Makefile.am failed"
+ epatch "${FILESDIR}"/${PN}-1.5.6-glibc-2.10.patch
+ eautoreconf
+ # i386 ELF binaries in tarball = bad
+ rm -f "${S}"/files/alarms*
+
+ # Fix up /sbin instances to be /usr/sbin instead
+ for i in src/sgraidmon.c src/sgdiskmon.c ; do
+ sed -i "${S}"/${i} \
+ -e '/evtcmd\[\].*\"\/sbin\//s,/sbin/,/usr/sbin/,' \
+ || die "Failed to set /sbin in sources"
+ done
+}
+
+src_compile() {
+ econf --sbindir=/usr/sbin \
+ || die "econf failed"
+ emake \
+ || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ docdir="/usr/share/doc/${PF}/"
+ emake install DESTDIR="${D}" datato="${D}${docdir}" \
+ || die "emake install failed"
+ dosbin files/sgevt
+ dosbin files/mdevt
+ # unneeded files
+ rm -f "${D}"${docdir}/{SCSIRAS,COPYING}
+ # install modepage files
+ insinto /usr/share/${PN}
+ doins files/*.mdf
+ # new docs
+ dodoc ChangeLog AUTHORS TODO
+ # ensure that other docs from the emake install are compressed too.
+ prepalldocs
+}
diff --git a/sys-block/seekwatcher/Manifest b/sys-block/seekwatcher/Manifest
new file mode 100644
index 000000000000..dc90e7820917
--- /dev/null
+++ b/sys-block/seekwatcher/Manifest
@@ -0,0 +1,4 @@
+DIST seekwatcher-0.12.tar.bz2 16965 SHA256 fe8192fc0e5d63cc7ccbe68afbe85021d147a759464748507dababc4764116c5 SHA512 ac6a5469d418c640e1013bafc2097ae5f4e17cd8d720ea57ebee0350fb466abbeea90ac250989aab59061f4d00d487fc804c9171b218a21ece45f765a73a0a94 WHIRLPOOL e82c202425ec1edb3add996d54abc41327b5bbd93cfe49794d9e3800698a54ec1e068b55f9484a67ed54422e4b5f3554ceacad151ab9798e8fc3341ef0239f0a
+DIST seekwatcher-0.12_p20091015.tar.gz 105328 SHA256 e3e989ef1a978c1382d6762902813044a374598eb4c3288b634a3cf3784d4590 SHA512 fc35399900fac83bf2921a137059f1af23e65a778aad105a9cbb8bb869328723f7e2b3bb19b28e7eed04eca65a39cb637ba5932ee4f5f3a882a7b52715a9aded WHIRLPOOL 375484a490859b37ebe9704f0193ef4063c5de607c531d1be009e23c0df5fc440aaff74360fcc3b604cd139175a41be33a0cc64cd02eb7e6f76fc08da6ad7b86
+DIST seekwatcher-0.6.tar.bz2 14464 SHA256 51930792c4749886d807e2af5f6265e13fd8056656262d5a4da865c6a5435bf8 SHA512 544cca8a146deaabd17be0ec6f0e4413fa21fe162ff97676a6a7a44e46eae9d95f95b115a5cd194c9f0c1663da55dcd3d4de582ceebd0204eece2d17ec5b1277 WHIRLPOOL 7ad603b2c912a9e413ef44900279a5b600cb1f504aa620a8245f5fc5281e1a8453016e8388ceea68d83fed065fe18c7d13d7629a1d63e580f61a1e6e8759c35c
+DIST seekwatcher-0.9.tar.bz2 15909 SHA256 a46822d434193716aef366503b4897729148f11db4cec9412013a998cef3554f
diff --git a/sys-block/seekwatcher/files/seekwatcher-0.12_p20091015-dash-fix.patch b/sys-block/seekwatcher/files/seekwatcher-0.12_p20091015-dash-fix.patch
new file mode 100644
index 000000000000..0742fb9d5dff
--- /dev/null
+++ b/sys-block/seekwatcher/files/seekwatcher-0.12_p20091015-dash-fix.patch
@@ -0,0 +1,26 @@
+commit e594df5c73ab550fb76895f75f71109eb3640c41
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu Feb 23 22:28:28 2012 +0300
+
+ seekwatcher: fix failure when /bin/sh points to dash
+
+ Before the patch:
+ $ ./seekwatcher -t test.trace -o test.png -p 'sleep 5' -d /dev/sda2
+ > using tracefile ./test.trace
+ > sh: Syntax error: Bad fd number
+ > Empty blktrace run found, exiting
+
+Upstream status: sent, not applied yet
+diff --git a/cmd/seekwatcher b/cmd/seekwatcher
+index 7e96bd2..23cba1c 100755
+--- a/cmd/seekwatcher
++++ b/cmd/seekwatcher
+@@ -610,7 +610,7 @@ def run_blkparse(trace):
+ print "using tracefile %s" % os.path.join(trace_dir, x)
+ fh = tempfile.NamedTemporaryFile(dir=".")
+ os.system('blkparse -q -D ' + trace_dir + ' -i ' + x +
+- ' -d ' + fh.name + ' -O >& /dev/null')
++ ' -d ' + fh.name + ' -O > /dev/null 2>&1')
+ loaddata(fh, rd)
+ return rd
+
diff --git a/sys-block/seekwatcher/metadata.xml b/sys-block/seekwatcher/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/sys-block/seekwatcher/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/sys-block/seekwatcher/seekwatcher-0.12.ebuild b/sys-block/seekwatcher/seekwatcher-0.12.ebuild
new file mode 100644
index 000000000000..8595da7b628e
--- /dev/null
+++ b/sys-block/seekwatcher/seekwatcher-0.12.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Seekwatcher generates graphs from blktrace runs to help visualize IO patterns and performance"
+HOMEPAGE="http://oss.oracle.com/~mason/seekwatcher/"
+SRC_URI="http://oss.oracle.com/~mason/seekwatcher/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-python/matplotlib-0.90.1
+ >=sys-block/btrace-0.0.20070730162628"
+
+src_install() {
+ dobin seekwatcher
+ dohtml README.html
+}
+
+pkg_postinst() {
+ elog "If you want to generate IO-movies from captured data, you must"
+ elog "install at least one of the following packages:"
+ elog "- media-video/mplayer with USE=encode"
+ elog "- media-libs/libtheora with USE=examples"
+}
diff --git a/sys-block/seekwatcher/seekwatcher-0.12_p20091015.ebuild b/sys-block/seekwatcher/seekwatcher-0.12_p20091015.ebuild
new file mode 100644
index 000000000000..4d7916147bcd
--- /dev/null
+++ b/sys-block/seekwatcher/seekwatcher-0.12_p20091015.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+
+inherit eutils distutils
+
+DESCRIPTION="Seekwatcher generates graphs from blktrace runs to help visualize IO patterns and performance"
+HOMEPAGE="http://oss.oracle.com/~mason/seekwatcher/"
+#SRC_URI="http://oss.oracle.com/~mason/seekwatcher/${P}.tar.bz2"
+SRC_URI="http://dev.gentoo.org/~slyfox/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="dev-python/pyrex"
+RDEPEND="dev-python/matplotlib
+ dev-python/numpy
+ >=sys-block/btrace-0.0.20070730162628"
+
+S=${WORKDIR}/${PN}-b392aeaf693b # hg snapshot
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-dash-fix.patch
+
+ distutils_src_prepare
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ elog "If you want to generate IO-movies from captured data, you must"
+ elog "install at least one of the following packages:"
+ elog "- media-video/mplayer with USE=encode"
+ elog "- media-libs/libtheora with USE=examples"
+}
diff --git a/sys-block/seekwatcher/seekwatcher-0.6.ebuild b/sys-block/seekwatcher/seekwatcher-0.6.ebuild
new file mode 100644
index 000000000000..e00a2b7389ea
--- /dev/null
+++ b/sys-block/seekwatcher/seekwatcher-0.6.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Seekwatcher generates graphs from blktrace runs to help visualize IO patterns and performance"
+HOMEPAGE="http://oss.oracle.com/~mason/seekwatcher/"
+SRC_URI="http://oss.oracle.com/~mason/seekwatcher/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-python/matplotlib-0.90.1
+ >=sys-block/btrace-0.0.20070730162628"
+
+src_install() {
+ dobin seekwatcher
+ dohtml README.html
+}
+
+pkg_postinst() {
+ elog "If you want to generate IO-movies from captured data, you must"
+ elog "install at least one of the following packages:"
+ elog "- media-video/mplayer with USE=encode"
+ elog "- media-libs/libtheora with USE=examples"
+}
diff --git a/sys-block/seekwatcher/seekwatcher-0.9.ebuild b/sys-block/seekwatcher/seekwatcher-0.9.ebuild
new file mode 100644
index 000000000000..8595da7b628e
--- /dev/null
+++ b/sys-block/seekwatcher/seekwatcher-0.9.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Seekwatcher generates graphs from blktrace runs to help visualize IO patterns and performance"
+HOMEPAGE="http://oss.oracle.com/~mason/seekwatcher/"
+SRC_URI="http://oss.oracle.com/~mason/seekwatcher/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-python/matplotlib-0.90.1
+ >=sys-block/btrace-0.0.20070730162628"
+
+src_install() {
+ dobin seekwatcher
+ dohtml README.html
+}
+
+pkg_postinst() {
+ elog "If you want to generate IO-movies from captured data, you must"
+ elog "install at least one of the following packages:"
+ elog "- media-video/mplayer with USE=encode"
+ elog "- media-libs/libtheora with USE=examples"
+}
diff --git a/sys-block/smp_utils/Manifest b/sys-block/smp_utils/Manifest
new file mode 100644
index 000000000000..604cb1aecc05
--- /dev/null
+++ b/sys-block/smp_utils/Manifest
@@ -0,0 +1,2 @@
+DIST smp_utils-0.97.tgz 473489 SHA256 0e10d304cfa8789bcf16537e8f72d9afdf8838fca20ae68103c317432d00915b
+DIST smp_utils-0.98.tgz 497916 SHA256 eb1952a192992bc60c7c84301f43d57fd386d6dcc9eef3f018a94114a38bb7e0 SHA512 fae08a580219f3c7980f11a60863ca0eee3cea0ac582fc3a79cdf060bbe7251ad2a144c594d64c489e2681a0c437b02fe29362bfc7e1907a0504c965d6d74236 WHIRLPOOL ab7dc0e30cbdcd1b68de1b3e0287a16719175173a3bffebe03945274a5e45dbdfe199452d83800c3ab515d7da471ed2654237991a24d83660c0f04e477cc9db1
diff --git a/sys-block/smp_utils/metadata.xml b/sys-block/smp_utils/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/smp_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>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-block/smp_utils/smp_utils-0.97.ebuild b/sys-block/smp_utils/smp_utils-0.97.ebuild
new file mode 100644
index 000000000000..1fe77057ef43
--- /dev/null
+++ b/sys-block/smp_utils/smp_utils-0.97.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Utilities for SAS management protocol (SMP)"
+HOMEPAGE="http://sg.danny.cz/sg/smp_utils.html"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog COVERAGE CREDITS README )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
diff --git a/sys-block/smp_utils/smp_utils-0.98.ebuild b/sys-block/smp_utils/smp_utils-0.98.ebuild
new file mode 100644
index 000000000000..61c39fdbe328
--- /dev/null
+++ b/sys-block/smp_utils/smp_utils-0.98.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Utilities for SAS management protocol (SMP)"
+HOMEPAGE="http://sg.danny.cz/sg/smp_utils.html"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog COVERAGE CREDITS README )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
diff --git a/sys-block/spindown/Manifest b/sys-block/spindown/Manifest
new file mode 100644
index 000000000000..1b1c3c95afe8
--- /dev/null
+++ b/sys-block/spindown/Manifest
@@ -0,0 +1 @@
+DIST spindown-0.4.0.tar.gz 36837 SHA256 551167e3d0a20cb56d3729ae91cf831a4faae2d1287c7f205bbc2f1d011ec37b SHA512 12cfd63c2f2c1fe6c3082f824fea925e236a39ff68ef217178fc9798f1e0e1ef8aa9863f9c2c0babfa29ef7e21290d10914beefd2284ff73a2bb786ad4bc24dc WHIRLPOOL d57ab84555e9f14425ab98b67e0a6d754fe61293b3b08fcbd195ad6fc4292ff49aca0117495e38e4e6b070a415b9f22c53d0d8a0b66a64a8728b0bc1827ec933
diff --git a/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch b/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch
new file mode 100644
index 000000000000..9101fbadb59c
--- /dev/null
+++ b/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch
@@ -0,0 +1,55 @@
+diff -urN spindown-0.4.0.orig/Makefile spindown-0.4.0/Makefile
+--- spindown-0.4.0.orig/Makefile 2009-04-18 18:32:59.000000000 +0200
++++ spindown-0.4.0/Makefile 2012-03-11 00:22:07.684197769 +0100
+@@ -4,7 +4,8 @@
+ OBJS = main.o diskset.o disk.o spindown.o iniparser.o dictionary.o log.o spindownd.o\
+ exceptions.o
+ CC = g++
+-CFLAGS =-O1
++CFLAGS +=
++LDFLAGS +=
+ SRC = src/
+ INPARSER = $(SRC)ininiparser3.0b/
+ SRCDIR = spindown-$(VERSION)
+@@ -60,31 +61,31 @@
+ rm -d -r -f $(SRCDIR)
+
+ spindownd: $(OBJS)
+- g++ $(CFLAGS) -o spindownd $(OBJS)
++ g++ $(CFLAGS) $(LDFLAGS) -o spindownd $(OBJS)
+
+ main.o: $(SRC)main.cpp $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)main.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)main.cpp
+
+ diskset.o: $(SRC)diskset.cpp $(SRC)diskset.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)diskset.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)diskset.cpp
+
+ disk.o: $(SRC)disk.cpp $(SRC)disk.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)disk.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)disk.cpp
+
+ spindown.o: $(SRC)spindown.cpp $(SRC)spindown.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)spindown.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)spindown.cpp
+
+ spindownd.o: $(SRC)spindownd.cpp $(SRC)spindownd.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)spindownd.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)spindownd.cpp
+
+ log.o: $(SRC)log.cpp $(SRC)log.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)log.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)log.cpp
+
+ exceptions.o: $(SRC)exceptions.cpp $(SRC)exceptions.h $(SRC)general.h
+- g++ $(CFLAGS) -c $(SRC)exceptions.cpp
++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)exceptions.cpp
+
+ iniparser.o: $(INPARSER)iniparser.c
+- g++ $(CFLAGS) -c $(INPARSER)iniparser.c
++ g++ $(CFLAGS) $(LDFLAGS) -c $(INPARSER)iniparser.c
+
+ dictionary.o: $(INPARSER)dictionary.c
+- g++ $(CFLAGS) -c $(INPARSER)dictionary.c
++ g++ $(CFLAGS) $(LDFLAGS) -c $(INPARSER)dictionary.c
diff --git a/sys-block/spindown/files/spindownd.confd-r1 b/sys-block/spindown/files/spindownd.confd-r1
new file mode 100644
index 000000000000..cc1f37b86ea2
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.confd-r1
@@ -0,0 +1,11 @@
+# spindownd config file
+# default: /etc/spindown.conf
+#SPINDOWND_CFG=/etc/spindown.conf
+
+# spindownd pidfile
+# default: /var/run/spindown.pid
+#SPINDOWND_PID=/var/run/spindown.pid
+
+# spindownd fifo
+# default: /var/run/spindown.fifo
+#SPINDOWND_FIFO=/var/run/spindown.fifo
diff --git a/sys-block/spindown/files/spindownd.initd-r1 b/sys-block/spindown/files/spindownd.initd-r1
new file mode 100644
index 000000000000..f35908fe8479
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.initd-r1
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SPINDOWND_BIN="/usr/sbin/spindownd"
+SPINDOWND_CFG=${SPINDOWND_CFG:-/etc/spindown.conf}
+SPINDOWND_PID=${SPINDOWND_PID:-/var/run/spindown.pid}
+SPINDOWND_FIFO=${SPINDOWND_FIFO:-/var/run/spindown.fifo}
+
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+checkconfig() {
+ # check for config file
+ if [ ! -e "${SPINDOWND_CFG}" ]; then
+ eerror
+ eerror "The spindownd config file (${SPINDOWND_CFG})"
+ eerror "is missing!"
+ eerror
+ return 1
+ fi
+ # check for leftover pidfile
+ if [ -f "${SPINDOWND_PID}" ]; then
+ ewarn
+ ewarn "The spindownd pidfile (${SPINDOWND_PID})"
+ ewarn "exists although the service is not marked as started."
+ ewarn "Will remove the pidfile and start the service in 10s"
+ ewarn "if not interrupted..."
+ ewarn
+ sleep 10
+ if ! rm -f "${SPINDOWND_PID}"; then
+ eerror "Failed to remove the spindownd pidfile (${SPINDOWND_PID})"
+ return 1
+ fi
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting spindownd"
+ start-stop-daemon --start --exec ${SPINDOWND_BIN} \
+ -- -d -c ${SPINDOWND_CFG} -p ${SPINDOWND_PID} -f ${SPINDOWND_FIFO}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping spindownd"
+ start-stop-daemon --stop --exec ${SPINDOWND_BIN} --pidfile ${SPINDOWND_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading spindownd configuration"
+ start-stop-daemon --exec ${SPINDOWND_BIN} --pidfile ${SPINDOWND_PID} \
+ --signal HUP
+ eend $?
+}
diff --git a/sys-block/spindown/metadata.xml b/sys-block/spindown/metadata.xml
new file mode 100644
index 000000000000..8a38b8e43a00
--- /dev/null
+++ b/sys-block/spindown/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="google-code">spindown</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/spindown/spindown-0.4.0-r4.ebuild b/sys-block/spindown/spindown-0.4.0-r4.ebuild
new file mode 100644
index 000000000000..88739cc7b910
--- /dev/null
+++ b/sys-block/spindown/spindown-0.4.0-r4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Spindown is a daemon that can spin down idle disks"
+HOMEPAGE="http://code.google.com/p/spindown"
+SRC_URI="http://spindown.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-CFLAGS-LDFLAGS.patch
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /etc
+ newins spindown.conf.example spindown.conf
+ newinitd "${FILESDIR}"/spindownd.initd-r1 spindownd
+ newconfd "${FILESDIR}"/spindownd.confd-r1 spindownd
+ dosbin spindownd
+ dodoc CHANGELOG README TODO spindown.conf.example
+}
+
+pkg_postinst() {
+ elog "Before starting spindownd the first time"
+ elog "you should modify /etc/spindown.conf"
+ elog
+ elog "To start spindownd by default"
+ elog "you should add it to the default runlevel:"
+ elog " rc-update add spindownd default"
+}
diff --git a/sys-block/tapecat/Manifest b/sys-block/tapecat/Manifest
new file mode 100644
index 000000000000..ab1ef47077a1
--- /dev/null
+++ b/sys-block/tapecat/Manifest
@@ -0,0 +1 @@
+DIST tapecat-1.0.0.tar.bz2 15095 SHA256 84d882f87f913689a84c30ce253903009c654a95dc4eaac72fa9c290cc0c8fc4
diff --git a/sys-block/tapecat/metadata.xml b/sys-block/tapecat/metadata.xml
new file mode 100644
index 000000000000..70aaab5b294f
--- /dev/null
+++ b/sys-block/tapecat/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<herd>app-backup</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/tapecat/tapecat-1.0.0.ebuild b/sys-block/tapecat/tapecat-1.0.0.ebuild
new file mode 100644
index 000000000000..7d169dfe495a
--- /dev/null
+++ b/sys-block/tapecat/tapecat-1.0.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="tapecat is a tape utility used to describe the physical content of a tape"
+HOMEPAGE="http://www.inventivetechnology.at/tapecat/"
+SRC_URI="http://downloads.inventivetechnology.at/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+DEPEND="sys-apps/file"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -Wall -ansi"
+}
+
+src_install() {
+ dobin tapecat
+ doman tapecat.1
+}
diff --git a/sys-block/targetcli/metadata.xml b/sys-block/targetcli/metadata.xml
new file mode 100644
index 000000000000..59fc80b97cfa
--- /dev/null
+++ b/sys-block/targetcli/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-block/targetcli/targetcli-9999.ebuild b/sys-block/targetcli/targetcli-9999.ebuild
new file mode 100644
index 000000000000..e9948c906695
--- /dev/null
+++ b/sys-block/targetcli/targetcli-9999.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+EGIT_REPO_URI="git://linux-iscsi.org/${PN}.git"
+PYTHON_DEPEND="2"
+RESTRICT_PYTHON_ABIS="3.*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils distutils git-2 python linux-info
+
+DESCRIPTION="The targetcli administration shell"
+HOMEPAGE="http://linux-iscsi.org/"
+SRC_URI=""
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="
+ dev-python/configshell
+ dev-python/rtslib
+ sys-block/lio-utils
+ "
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~TARGET_CORE"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ python_pkg_setup
+}
diff --git a/sys-block/tgt/Manifest b/sys-block/tgt/Manifest
new file mode 100644
index 000000000000..9720de35c5e2
--- /dev/null
+++ b/sys-block/tgt/Manifest
@@ -0,0 +1,4 @@
+DIST tgt-1.0.19.tar.gz 241676 SHA256 69fd9e9528a70c272bcc3cd00ad6754edd819a0a1ce0fad21587d33c457c6f68
+DIST tgt-1.0.22.tar.gz 227522 SHA256 a23e97d9e1bd2b5f0be06c7f441f70b8fcc98ebf1ce61b57d0e81f60c1cbcc06
+DIST tgt-1.0.24.tar.gz 231583 SHA256 43758d81345c176774c9ec3b823295c6b090ab60406cd47c7a636d77af4362bc
+DIST tgt-1.0.60.tar.gz 295304 SHA256 619b5250e4bc63971a26c05a3eea353beb4009ed0ffa06aab5f8ee25346cfb0a SHA512 4abca297e89dd92d1d1480f26af39a80f1cb7cd67e54911f4bdf29db8531b1df51fe214af05e685270e439bf702d4805542773c29baecc7a94ef271b2a0b97fb WHIRLPOOL 26119b14f741f6094fc816f48a58f1694b47505e7a0963e10e2efdffd49782886735c9b2463850d7ad03c149293f4b31512ee1b994607a5bbd30f0cee56f68fd
diff --git a/sys-block/tgt/files/tgtd b/sys-block/tgt/files/tgtd
new file mode 100644
index 000000000000..bec70b821bf7
--- /dev/null
+++ b/sys-block/tgt/files/tgtd
@@ -0,0 +1,125 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ # Don't name this script "tgtd"...
+ TGTD_PROC=$(ps -C tgtd | grep -c tgtd)
+ if [ "$TGTD_PROC" -eq 2 ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/files/tgtd-1.0.24.confd b/sys-block/tgt/files/tgtd-1.0.24.confd
new file mode 100644
index 000000000000..fd4c098eaef2
--- /dev/null
+++ b/sys-block/tgt/files/tgtd-1.0.24.confd
@@ -0,0 +1,4 @@
+# Here you can specify options that are passed directly to tgt daemon
+TGTD_OPTS=""
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-block/tgt/files/tgtd-1.0.24.initd b/sys-block/tgt/files/tgtd-1.0.24.initd
new file mode 100644
index 000000000000..f5e903516034
--- /dev/null
+++ b/sys-block/tgt/files/tgtd-1.0.24.initd
@@ -0,0 +1,126 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd -- \
+ ${TGTD_OPTS}
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ # Don't name this script "tgtd"...
+ TGTD_PROC=$(ps -C tgtd | grep -c tgtd)
+ if [ "$TGTD_PROC" -eq 2 ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/files/tgtd.confd b/sys-block/tgt/files/tgtd.confd
new file mode 100644
index 000000000000..fd4c098eaef2
--- /dev/null
+++ b/sys-block/tgt/files/tgtd.confd
@@ -0,0 +1,4 @@
+# Here you can specify options that are passed directly to tgt daemon
+TGTD_OPTS=""
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-block/tgt/files/tgtd.initd b/sys-block/tgt/files/tgtd.initd
new file mode 100644
index 000000000000..f8b5a1d4e43d
--- /dev/null
+++ b/sys-block/tgt/files/tgtd.initd
@@ -0,0 +1,125 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd -- \
+ ${TGTD_OPTS}
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ TGTD_PROC=$(pidof -c -o $$ -o %PPID tgtd)
+ if [ -n "$TGTD_PROC" ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/metadata.xml b/sys-block/tgt/metadata.xml
new file mode 100644
index 000000000000..a8b121f2ed61
--- /dev/null
+++ b/sys-block/tgt/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription>
+iSCSI Target daemon with rdma support
+</longdescription>
+ <use>
+ <flag name="ibmvio">Add support for IBM Virtual I/O</flag>
+ <flag name="fcp">Add support for new FC protocol</flag>
+ <flag name="fcoe">Add support for FCoE protocol</flag>
+ <flag name="rbd">Add support for ceph block devices</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">fujita/tgt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/tgt/tgt-1.0.19.ebuild b/sys-block/tgt/tgt-1.0.19.ebuild
new file mode 100644
index 000000000000..d7c0173183df
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.19.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="http://stgt.sourceforge.net/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+DEPEND="dev-perl/Config-General
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+}
+
+src_configure() {
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ sed -e 's:\($(CC)\):\1 $(LDFLAGS):' -i usr/Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ doinitd "${FILESDIR}/tgtd"
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.22.ebuild b/sys-block/tgt/tgt-1.0.22.ebuild
new file mode 100644
index 000000000000..b7517dac4834
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.22.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info
+
+MY_TREE="3e216c9"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+DEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+S="${WORKDIR}"/fujita-tgt-"${MY_TREE}"
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\):\1 $(LDFLAGS):' usr/Makefile || die "sed failed"
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @install: all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ doinitd "${FILESDIR}/tgtd"
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.24-r1.ebuild b/sys-block/tgt/tgt-1.0.24-r1.ebuild
new file mode 100644
index 000000000000..cccaeb8cad23
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.24-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info toolchain-funcs
+
+MY_TREE="e039354"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+CDEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+S=${WORKDIR}/fujita-tgt-${MY_TREE}
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+ tc-export CC
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @& all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+ emake -C doc
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ newinitd "${FILESDIR}"/tgtd-${PV}.initd tgtd
+ newconfd "${FILESDIR}"/tgtd-${PV}.confd tgtd
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.60.ebuild b/sys-block/tgt/tgt-1.0.60.ebuild
new file mode 100644
index 000000000000..bb1d7a6fc9cc
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.60.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs
+
+MY_TREE="ab51727"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fcoe fcp ibmvio infiniband rbd"
+
+CDEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ rbd? ( sys-cluster/ceph )
+ infiniband? (
+ sys-infiniband/libibverbs:=
+ sys-infiniband/librdmacm:=
+ )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets"
+RDEPEND="${DEPEND}
+ dev-libs/libaio
+ sys-apps/sg3_utils"
+
+S=${WORKDIR}/fujita-tgt-${MY_TREE}
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @& all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+ use rbd && myconf="${myconf} CEPH_RBD=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+ emake -C doc
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" docdir=/usr/share/doc/${PF}
+ newinitd "${FILESDIR}"/tgtd.initd tgtd
+ newconfd "${FILESDIR}"/tgtd.confd tgtd
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/thin-provisioning-tools/Manifest b/sys-block/thin-provisioning-tools/Manifest
new file mode 100644
index 000000000000..1429ff0ea867
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/Manifest
@@ -0,0 +1,5 @@
+DIST thin-provisioning-tools-0.2.8.tar.gz 158332 SHA256 8a5d87b929095a383594b7141b89e51ae42046d7dd254d544330d789b6744344 SHA512 6534bf42ae936f6f32ce05b89eaeb731938b3761e74366d21282a69d74875d1f9d5084590b19969894c9908726e96f17714f051f050a040dd934533830eddfa9 WHIRLPOOL 16bcc268b450938ccec450323ce6dee97a4851c97438115c250c674b930ef8dfd0c7f6507d6c5204b72250da685d35ff57cf72f297abeec6704fb09520307ef2
+DIST thin-provisioning-tools-0.3.2.tar.gz 175049 SHA256 1b9d8e9269cffe06f3c87214d35436225e12599debefbf1a50194c69cc3404ca SHA512 d6e18c303769b39c5bd48ef30d2819adc57d2d87b3c9b56d5d72468fb35f9b7b2309d35c6c12eabc36d653dd85338b9ad2fca9eed5c738a87b932b71f3a6da4f WHIRLPOOL b1bd87aa1995ba0616001837247c962c492d0029cb8a89b97aa326eb63d8a89113905f5d34490593e0cfcca33ef074e02a50679d22c3b1859d8fe5b97368c608
+DIST thin-provisioning-tools-0.4.0.tar.gz 186925 SHA256 6af8b9d31013e1dc3e59b9bd90803cb25f60b3d2e0a44c3ee2e1fb6cdf63e7d0 SHA512 ebbb616e1a06b6437232058de007ad63c7711c78c8e47559280b27b0072087a8cd6ab5f3013247058add6a9e3e51f37a9b8ea3e86458ac3656a2f01fc6da1809 WHIRLPOOL 53679193f24c1216935f7f45107bf3642b66781b8170dca55a11646c82c46387796f76bd50578a6b2b149addcb497209586e79c1e261e267bf653da7d3496b69
+DIST thin-provisioning-tools-0.4.1.tar.gz 186979 SHA256 59c8a787df8d4828bf9ca1b6310584f2b7723068901e20aa609015ce85df1d46 SHA512 e148296b55f7ff4ab85dc3b4679c7eab0ee8d56e61415397fc2e46f17bcc16a6a582c17343381320f8582bc4f12311af622d43aabe60e7abb25a882446016b7e WHIRLPOOL a7e5da6879dfdc64d5e60e9072d43db21fb8f328d268366a6e4892cad9b2d55e907d564240f9bd67da0d726d80eab9d45e151bbe6d89272887703a8ae8b66c8c
+DIST thin-provisioning-tools-0.5.3.tar.gz 191431 SHA256 6d6856dbca2f0fcf23ece171a8e68a4a7054350a3810958da37615358695597e SHA512 c36f85fc59b98195b7b6fa635b0d18da06b5798d735887dfa3af96bf6fa88bac0d353968ceae00de5960eb5360db70bc166fdd254a88b2246c36f6868c190e6d WHIRLPOOL cc85ff4c0bd0a9f7010bbbdfb9e9dd08d9dd1370ce5ca6ebc60626e05a2bfc52dec187dca546a8e6f4d9eb5dc786ea7063322b1b2bbfaec7cd022022fe428c3f
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
new file mode 100644
index 000000000000..9dd978070312
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
@@ -0,0 +1,214 @@
+From e77e8715b0a91a60cf2c4b85933b1063385da122 Mon Sep 17 00:00:00 2001
+From: Joe Thornber <ejt@redhat.com>
+Date: Wed, 2 Jul 2014 08:19:20 +0000
+Subject: Remove ambiguity between boost::uint64_t and ::uint64_t.
+
+This has been causing people problems on uclibc builds.
+---
+ caching/cache_metadata_size.cc | 15 +++++++--------
+ caching/xml_format.cc | 7 +++----
+ era/superblock.cc | 5 ++---
+ era/writeset_tree.cc | 5 ++---
+ persistent-data/data-structures/bitset.cc | 7 +++----
+ thin-provisioning/device_tree.h | 4 +---
+ thin-provisioning/metadata_dumper.cc | 2 +-
+ 7 files changed, 19 insertions(+), 26 deletions(-)
+
+diff --git a/caching/cache_metadata_size.cc b/caching/cache_metadata_size.cc
+index 7584da6..5792c49 100644
+--- a/caching/cache_metadata_size.cc
++++ b/caching/cache_metadata_size.cc
+@@ -7,7 +7,6 @@
+ #include <stdint.h>
+ #include <stdexcept>
+
+-using namespace boost;
+ using namespace std;
+
+ //----------------------------------------------------------------
+@@ -18,9 +17,9 @@ namespace {
+ : max_hint_width(4) {
+ }
+
+- optional<uint64_t> device_size;
+- optional<uint32_t> block_size;
+- optional<uint64_t> nr_blocks;
++ boost::optional<uint64_t> device_size;
++ boost::optional<uint32_t> block_size;
++ boost::optional<uint64_t> nr_blocks;
+ uint32_t max_hint_width;
+ };
+
+@@ -58,19 +57,19 @@ namespace {
+ while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) {
+ switch (c) {
+ case 0:
+- fs.block_size = lexical_cast<uint32_t>(optarg);
++ fs.block_size = boost::lexical_cast<uint32_t>(optarg);
+ break;
+
+ case 1:
+- fs.device_size = lexical_cast<uint64_t>(optarg);
++ fs.device_size = boost::lexical_cast<uint64_t>(optarg);
+ break;
+
+ case 2:
+- fs.nr_blocks = lexical_cast<uint64_t>(optarg);
++ fs.nr_blocks = boost::lexical_cast<uint64_t>(optarg);
+ break;
+
+ case 3:
+- fs.max_hint_width = lexical_cast<uint32_t>(optarg);
++ fs.max_hint_width = boost::lexical_cast<uint32_t>(optarg);
+ break;
+
+ case 'h':
+diff --git a/caching/xml_format.cc b/caching/xml_format.cc
+index cb03018..84d6fc2 100644
+--- a/caching/xml_format.cc
++++ b/caching/xml_format.cc
+@@ -5,7 +5,6 @@
+ #include <boost/lexical_cast.hpp>
+ #include <expat.h>
+
+-using namespace boost;
+ using namespace caching;
+ using namespace persistent_data;
+ using namespace std;
+@@ -189,14 +188,14 @@ namespace {
+
+ block_address cblock = get_attr<uint64_t>(attr, "cache_block");
+ decoded_or_error doe = base64_decode(get_attr<string>(attr, "data"));
+- if (!get<vector<unsigned char> >(&doe)) {
++ if (!boost::get<vector<unsigned char> >(&doe)) {
+ ostringstream msg;
+ msg << "invalid base64 encoding of hint for cache block "
+- << cblock << ": " << get<string>(doe);
++ << cblock << ": " << boost::get<string>(doe);
+ throw runtime_error(msg.str());
+ }
+
+- e->hint(cblock, get<vector<unsigned char> >(doe));
++ e->hint(cblock, boost::get<vector<unsigned char> >(doe));
+ }
+
+ // FIXME: why passing e by ptr?
+diff --git a/era/superblock.cc b/era/superblock.cc
+index 1bd1a4f..c319e9b 100644
+--- a/era/superblock.cc
++++ b/era/superblock.cc
+@@ -4,7 +4,6 @@
+ #include "persistent-data/errors.h"
+
+ using namespace base;
+-using namespace boost;
+ using namespace era;
+ using namespace superblock_damage;
+ using namespace persistent_data;
+@@ -149,8 +148,8 @@ superblock_traits::unpack(disk_type const &disk, value_type &value)
+
+ block_address ms = to_cpu<uint64_t>(disk.metadata_snap);
+ value.metadata_snap = (ms == SUPERBLOCK_LOCATION) ?
+- optional<block_address>() :
+- optional<block_address>(ms);
++ boost::optional<block_address>() :
++ boost::optional<block_address>(ms);
+ }
+
+ void
+diff --git a/era/writeset_tree.cc b/era/writeset_tree.cc
+index 54aa6a1..4e2c478 100644
+--- a/era/writeset_tree.cc
++++ b/era/writeset_tree.cc
+@@ -2,7 +2,6 @@
+ #include "persistent-data/data-structures/btree_damage_visitor.h"
+ #include "persistent-data/data-structures/bitset.h"
+
+-using namespace boost;
+ using namespace era;
+ using namespace writeset_tree_detail;
+ using namespace persistent_data;
+@@ -90,8 +89,8 @@ namespace {
+ private:
+ template <typename T>
+ run<uint32_t> to_uint32(run<T> const &r) {
+- return run<uint32_t>(optional<uint32_t>(r.begin_),
+- optional<uint32_t>(r.end_));
++ return run<uint32_t>(boost::optional<uint32_t>(r.begin_),
++ boost::optional<uint32_t>(r.end_));
+ }
+
+ damage_visitor &v_;
+diff --git a/persistent-data/data-structures/bitset.cc b/persistent-data/data-structures/bitset.cc
+index 5851e28..e49e19f 100644
+--- a/persistent-data/data-structures/bitset.cc
++++ b/persistent-data/data-structures/bitset.cc
+@@ -2,7 +2,6 @@
+ #include "persistent-data/data-structures/bitset.h"
+ #include "persistent-data/math_utils.h"
+
+-using namespace boost;
+ using namespace persistent_data;
+ using namespace persistent_data::bitset_detail;
+ using namespace std;
+@@ -12,7 +11,7 @@ using namespace std;
+ namespace {
+ struct bitset_traits {
+ typedef base::le64 disk_type;
+- typedef uint64_t value_type;
++ typedef ::uint64_t value_type;
+ typedef no_op_ref_counter<uint64_t> ref_counter;
+
+ static void unpack(disk_type const &disk, value_type &value) {
+@@ -118,11 +117,11 @@ namespace persistent_data {
+ }
+
+ private:
+- optional<uint32_t> lifted_mult64(optional<uint32_t> const &m) {
++ boost::optional<uint32_t> lifted_mult64(boost::optional<uint32_t> const &m) {
+ if (!m)
+ return m;
+
+- return optional<uint32_t>(*m * 64);
++ return boost::optional<uint32_t>(*m * 64);
+ }
+
+ bitset_visitor &v_;
+diff --git a/thin-provisioning/device_tree.h b/thin-provisioning/device_tree.h
+index 320eb73..23ae924 100644
+--- a/thin-provisioning/device_tree.h
++++ b/thin-provisioning/device_tree.h
+@@ -4,8 +4,6 @@
+ #include "persistent-data/data-structures/btree.h"
+ #include "persistent-data/run.h"
+
+-using namespace boost;
+-
+ //----------------------------------------------------------------
+
+ namespace thin_provisioning {
+@@ -50,7 +48,7 @@ namespace thin_provisioning {
+
+ class damage_visitor {
+ public:
+- typedef shared_ptr<damage_visitor> ptr;
++ typedef boost::shared_ptr<damage_visitor> ptr;
+
+ virtual ~damage_visitor() {}
+
+diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
+index dfe18e0..0bd284e 100644
+--- a/thin-provisioning/metadata_dumper.cc
++++ b/thin-provisioning/metadata_dumper.cc
+@@ -226,7 +226,7 @@ thin_provisioning::metadata_dump(metadata::ptr md, emitter::ptr e, bool repair)
+ md->sb_.trans_id_,
+ md->sb_.data_block_size_,
+ md->data_sm_->get_nr_blocks(),
+- optional<block_address>());
++ boost::optional<block_address>());
+
+ {
+ mapping_tree_detail::damage_visitor::ptr md_policy(mapping_damage_policy(repair));
+--
+2.0.2
+
diff --git a/sys-block/thin-provisioning-tools/metadata.xml b/sys-block/thin-provisioning-tools/metadata.xml
new file mode 100644
index 000000000000..659c8f53d7d9
--- /dev/null
+++ b/sys-block/thin-provisioning-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>base-system</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <longdescription lang="en">
+A suite of tools for thin provisioning on Linux.
+</longdescription>
+ <upstream>
+ <remote-id type="github">jthornber/thin-provisioning-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.2.8-r1.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.2.8-r1.ebuild
new file mode 100644
index 000000000000..6354480a18b3
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.2.8-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
+EXT=.tar.gz
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}${EXT} -> ${P}${EXT}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="dev-libs/expat"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" MANDIR=/usr/share/man
+ dodoc README.md TODO.org
+}
+
+src_test() {
+ emake unit-test
+}
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r1.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r1.ebuild
new file mode 100644
index 000000000000..4f8b31ff1ef9
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="http://github.com/jthornber/thin-provisioning-tools"
+EXT=.tar.gz
+BASE_A=${P}${EXT}
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}${EXT} -> ${BASE_A}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="dev-libs/expat"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" MANDIR=/usr/share/man
+ dodoc README.md TODO.org
+}
+
+src_test() {
+ emake unit-test
+}
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.0.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.0.ebuild
new file mode 100644
index 000000000000..1c4163c4bd5f
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="http://github.com/jthornber/thin-provisioning-tools"
+EXT=.tar.gz
+BASE_A=${P}${EXT}
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}${EXT} -> ${BASE_A}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="dev-libs/expat
+ dev-libs/libaio"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ sed -i -e '/^INSTALL_PROGRAM/s:-s::' Makefile.in || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_install() {
+ emake DESTDIR="${D}" MANPATH="${D}"/usr/share/man install
+ dodoc README.md TODO.org
+}
+
+src_test() {
+ emake unit-test
+}
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.1.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.1.ebuild
new file mode 100644
index 000000000000..806065d31f42
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.4.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="http://github.com/jthornber/thin-provisioning-tools"
+EXT=.tar.gz
+BASE_A=${P}${EXT}
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}${EXT} -> ${BASE_A}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="dev-libs/expat
+ dev-libs/libaio"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ sed -i -e '/^INSTALL_PROGRAM/s:-s::' Makefile.in || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_install() {
+ emake DESTDIR="${D}" MANPATH="${D}"/usr/share/man install
+ dodoc README.md TODO.org
+}
+
+src_test() {
+ emake unit-test
+}
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.5.3.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.5.3.ebuild
new file mode 100644
index 000000000000..f82a378ea085
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.5.3.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 autotools eutils flag-o-matic
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="http://github.com/jthornber/thin-provisioning-tools"
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="static test"
+
+LIB_DEPEND="dev-libs/expat[static-libs(+)]
+ dev-libs/libaio[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ sed -i -e '/^INSTALL_PROGRAM/s:-s::' Makefile.in || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_test() {
+ emake unit-test
+}
+
+src_install() {
+ emake DESTDIR="${D}" DATADIR="${ED}/usr/share" install
+ dodoc README.md TODO.org
+}
diff --git a/sys-block/tw_cli/Manifest b/sys-block/tw_cli/Manifest
new file mode 100644
index 000000000000..162686451067
--- /dev/null
+++ b/sys-block/tw_cli/Manifest
@@ -0,0 +1,36 @@
+DIST CLI_freebsd-from_the_10.2.2.1_9.5.5.1_codesets.zip 1531484 SHA256 656eb4d1666447ef10b08f9145b93b4f3dab6a27479fe14a4ceea451d7057f97 SHA512 04738e9bd644561cf33d2f687159a0bcaf1ab56f340d19d88ecd0b038b89d5dd136b462189452c0578b90e1b276f9d0edc3204e5baebfc2730f319147b636708 WHIRLPOOL 7c2c3071994b27764a245a476da35041fd93535a2dcef6063d6024d382c80c06b5cd421aec48846a61a27c7f2926e145cc7e551418fa05e03119cc3c0938c4df
+DIST CLI_linux-from_the_10.2.2.1_9.5.5.1_codesets.zip 1878621 SHA256 6616ac4c32a9f6c6e810bcbf032d7277506fdb72437433948c5e24deb1f23d9e SHA512 e8a7f27401e7811d5f8533d839066bdf6d93eeb2cb1242b00af7fc559b0a34316f8e6dc80f68e869d97f44290ea32c9e65d1d857c1010009ad1a540252400e31 WHIRLPOOL 7ab832d43aeca8f067258adff35fac3e12c2db55653e7cf2e30249171bbcfd800740483d8181d32e31f51699f96a64d31eeb70c0ff94a9c262fc8cfd78182c7f
+DIST cli_freebsd_10.1.zip 1500092 SHA256 f5f0eaf4ae90ec67837fa42e4e94a3f97b0b8a7b3efd88e980761c270f96fd85 SHA512 b5463919975c53e191540b4b7c58d8b08ef45ad06f82fe61960f65a46c82230486bf53bc8c535a9fd8ef3e0698cc6676696a319f5e30b904211d7b614dd7a49d WHIRLPOOL c09a606273df20368866261b68f56c153e4c45c46a652b2f4cb016dc34c1ccab3b759c2681edccf7e3979605033229899c1bff7319344dc1bb09955332e61507
+DIST cli_freebsd_10.2.zip 1467421 SHA256 73ea166d2e569e8d9d3ecc8069fd4d6a06b1fedb9b56607360b93f393e8029b5 SHA512 2f47fd094b26415e71322ed1f1d0590988406a44fa5e7f09a45baae564ab1f391d3eb6f552a6d7c4e004ba10e707c8b415784445c379ad21ffc36ba2023006c8 WHIRLPOOL 5b43575f17e12330b99923aeb46013c6b6db806efa4ee9275d6ee01dba29104366b11fd5dfd2287e21072920b61c4783d5925cd403b9782121790164e0f325be
+DIST cli_linux_10.1.zip 1845534 SHA256 ae89aef7a309d37de76e870fc56c0dd0f08e5849eb3388e3c05a1f8b134b2be3 SHA512 8e424042f8892d4fb77664a444f2ee2a55406929013d19c79612e4d0347338b68ebf9e11cdcb2895544b53705ec9401f35581d27e34e6465e06c16a5cb60096e WHIRLPOOL 3bbcd22546cec3bf4c286b106209485a2392f8bc8c084eedec4d8c9068152fb22e5be7042b2d6ede4b7fb78cbb1b67bc9061112ad162c20c8da8879db527e700
+DIST cli_linux_10.2.zip 1813781 SHA256 405b07a2579117aa9d2866d6b449b26f716b07a07a11eb80bda910f6ff649385 SHA512 ce3446c93405fd7fec69d6b982db678a08d083d7385f392c160c794ee40ec8ed329b16e85d03f69e547e6b4b9d40882e8852dc2463b945e344443cdf8654efaa WHIRLPOOL 70e159d3c4366fbd272e1b6373d6ab3f2c54a5a71cfd46999f1277490d089043f649c9b5c0192be19a90e24ff30a91e3dc20fc730a2a2fc709a443b77e94a568
+DIST tw_cli-freebsd-x86-9.5.0.1.tgz 706413 SHA256 2f6c95d04aa583eb8d036c2ac5ca86521a04b0d979f91d01296cd2fd89c56087 SHA512 5d4638fe3ddc7cec8539757aefac10176d13e6d05a5f2d33108025032f9d75ddb492a5596c4e52508e9df4be92c4e276113d3e2122f89b48e0d240b2b084880d WHIRLPOOL 8401aa3b9efcb7ab1b87b039326c66dc0cdb3899e208d66ae729d2404709bedc7c5c493a954796465d356df7f2628b6d027f05c458b79da06d5007159aa15e3e
+DIST tw_cli-freebsd-x86-9.5.1.1.tgz 758920 SHA256 a2b99b460925df5ffa353569072e23422d92adc81ba84dcd016b8332fbdedf33 SHA512 379ec4b2a152394e2206226b955cd6e8ff904493a9c030b7b6ed2bf2fa73a273f62ea605bbe62962366b0987e5309e9b60414f5f121b548379bf1f1184ed4725 WHIRLPOOL 5c0a2d1eb9e33004d1c7ac2c0848f4fc033e45f40be89a0a9b98b75521d87cffe55a13ea75127bcd6106705b5095a435d841d133e6e8dcbbbfbfed38f1083635
+DIST tw_cli-freebsd-x86-9.5.2.tgz 785950 SHA256 a82c886066481b556d8ac415dce633352d28241a5ad84e03227225bb87234d9f SHA512 44181e6c2684637fe34cd4ad2143f713175d127bd2bc7fcf9c9a3563d939a3244da3e8b3620a123b2da173854bfc95bca91fe799261aee9913b5594a1569a8dd WHIRLPOOL cbea8c58129782db9f0b265b9035c7c09b4067622b4058acff597e2c9208f1029b3fd37f644f4e864c2189b9c75d2950d20a5aea7bdbf11956191eef089c2f06
+DIST tw_cli-freebsd-x86-9.5.3.tgz 793534 SHA256 546e5193de8cdaa267c1b29643f64865ebba04796d2c741d0b37a053402bb6b5 SHA512 ceeb072f2501c78ac56666ec13bcf0edaf047be399b16cdbd5a29b68574e10070d91611c41eb36251ca924c7532ed9df3fa397fd90b251ebf8d8a1e0befbd4d6 WHIRLPOOL 879e6ad510d5b4a6833375958e9159ce06fe3b2f55eefa6569328b5a504f08c764d945a6007b2fd032390fe0d0e2e107c234705e25587b4d395a3b217a77b142
+DIST tw_cli-linux-x86-9.2.1.1.tgz 709976 SHA256 10efc8892ce2bf68aec617449122316939435539793c53cca1fa3ab02395a46c SHA512 c706b8c710500f700736e161b8cefc821b91a9f726d1b07e74ab1114bb7d91300ebdcd59d2c0af40d98819fa9c839a03e3f4ee991e65550b0655d395a8cbb3b7 WHIRLPOOL 44851434702c5cd5e2744e114044be343b148c78ccef0a7aa7cb180e59109fa459d5401ca1a077431b2892cc326555e1f56c2668c6287e8588fd94d97c493686
+DIST tw_cli-linux-x86-9.3.0.2.tgz 848293 SHA256 4da040b77a2b1c5dd1bd12555595c067074023eeb39f817bb098b8d0a11cac4f SHA512 5409a4a3c2069d30b47534d8193e1aadfd4b29b600bf0dd94168b1099d0b00cd16e7178c8c99fab206e502098e1add2fb98b5a01f6776283d50a9881c319fb97 WHIRLPOOL a9a79efd1ac830518849905951e74ea4a97de4cfd82c9be0e878adfcee0bd0876013a1bc68ed32beaec1050c28e408ad27533673bd180e8e51c78a86a952adb1
+DIST tw_cli-linux-x86-9.3.0.3.tgz 814398 SHA256 8c49b9318154ba2ddf3af1ff978e438664e99f7beab227199aee0a4ce6055c6e SHA512 2921c628781eeffa88a9ebc04c8970d731e237de2bdde941fdd1418a6f8255bce426ef2b9ea409167577e39480407ce4dd5518813dc0dd2318ef1848170a4686 WHIRLPOOL a4147185b74d9481fc1449d7156093edd4080776ca5a6af39d0cca60d4526b788cd6eac1187cece59cbe09baae791939f328094b8a5d4034c0cf344fee16aa4c
+DIST tw_cli-linux-x86-9.3.0.4.tgz 794421 SHA256 86e8287d12c120f35a2d1e6a71b7f344c2d2750068cc4e1c9886a11b4efa235f SHA512 16539e9c486f583122a30c8dd1a7c6e5d05e7878a1ee44581f0109f8daf1a973c3549d163a4bea10b185d97b067a32f6b8c045db198e283581e949749b5588a3 WHIRLPOOL c3169d5b7cdeedca6e0e7b0c8469f41044c0e968e2962f857010afca5944457235827c62ef42d83287cf666f0d0dff48b9db59e23633edd717c130ef3c86d869
+DIST tw_cli-linux-x86-9.4.0.1.tgz 788933 SHA256 24f5beec04ac0c22ecdfef334ccb6c44a6d4587f6277cd684c50f4fca28d4be6 SHA512 d652fb4860c72b8640ba5abd9e3082f6a13de70e746f698cc37c5a5b099b4fb92ad43688f0f82175b1315a21f3b80c8d20610a16420b93858fc9dfc263371895 WHIRLPOOL 1185a8c90d6a6e71de01a900022410b625c1d8ce5be6a4dd3bde0abe6aa20749a2fd06f19be69a68b3f1f48674996e4b67ed4db6ea8769ab1ababf1f4821e2a9
+DIST tw_cli-linux-x86-9.4.0.tgz 788856 SHA256 445899d9034076ca4665183017db587dea76208dbb066ea05ec4932950b9b086 SHA512 8d4d9de59a22147d488ae4d238c8e0dd794b4ab14b7f176c17f7c6a212ed4f2129eaee633604242be28387310f49b90af82b26f36b5ba95c4baa52810a6cbe31 WHIRLPOOL 8daf77d80afbd099cd6198c7549756453b4f065c6295c3cb21388d9dc27ff91dfac54c5366031282e80383a0a0bf375a5c6417b55f11a0dd571272bf5892308d
+DIST tw_cli-linux-x86-9.4.1.2.tgz 798925 SHA256 45863a216125af3a451ee50bd47c29dfb59d19deba487469e6aa7621fd39abca SHA512 5b307c79d3fe75bb99b536b4dfa77ccd2a2a4d063c5bf492e1b429c4f4894e66b895392a9504e811a8886bc615ad0d7a06e178865c8c9a102a381f2e9341ac7a WHIRLPOOL 0103fb118cc24efd18e743998710975ecdab520a4bc489daec575faaa0ef23cd3d1c717f0c20594ba85203fad463d763a61f3ad3da899818510f9ad7d208c886
+DIST tw_cli-linux-x86-9.4.2.tgz 806428 SHA256 5197768f6a3453d7c10fbde0b0ac9f920c475d0a5525fc7ef5a4ef93594b0791 SHA512 b4a30c7e79f7ce966ca08968682e20777f43c2cecd8001caf0e6e36e3efb3418b8887a90730d88b99f9854add771bbdb9c55a217551fcb2edf49792aba8b1338 WHIRLPOOL b4fd0c85c7a7c4d7d95d73fa74c416221a02d517fd97a315afe17537ae43b6b7e5de662d3a26f6441c17bf68632b0f8baab69788438288911e30a0c932ffa0a1
+DIST tw_cli-linux-x86-9.5.0.1.tgz 866213 SHA256 a3d97622951d3eea426e18c9faa48d583376d44eee70b8765995b27e578921ab SHA512 0a80cd25ef53ac61a1eec6a916339a3d8a04d98e035809a673031676dfc46ba95957c5427f28296f5e292164117bfee5c0a3fd005d7c81b7230579321935b7f7 WHIRLPOOL f73c3e3671c900556250a4fb04b39b8a76c120c451f85518badb7cb46acdc774c6c6ef80824b555202ad33005c25e2a82b95d28009669b996d4cd8604937a6b3
+DIST tw_cli-linux-x86-9.5.0.tgz 855747 SHA256 6c0260897dd085976ce342cec02976356abe53ae9cc4f076ef113eb6c263b5ba SHA512 46d46a9200af951b553016cbf40dd2ddae05dec4f912ca229c37db1a33308ade76b27ab1e2b8d738d755401b034c98bbf82223ad3dfe39ebf019878d663180f3 WHIRLPOOL 1d4900b907031661dcf3dec3a7f5efbe0df9c397eef88806652b8ebaf44f6d05690d693b5354456cb73672df9e18dd85a8e6f4217faa0fc22c7c8ae2b3cbcb0d
+DIST tw_cli-linux-x86-9.5.1.1.tgz 920937 SHA256 5d6d9a46cc5a491f62373d372e94179e7205bbf67e0f76ea7aaafba3f3a075c0 SHA512 5b10225d451aa45491cdb355365385f9d49ebb5d8df35f8ee664f5332b01c992dd847a5b99e5e9d48fe17fcdc7dfd10372763aaf5e9a506943a9b2d811076450 WHIRLPOOL eb78aa1e6e8a1d03c8d1e41147b365b7e9d4a1b472854c79913e62b1868e8ca6790b5b20d425cbd35db99665d924eef9e3271997a0d1e6747f45435682a75c62
+DIST tw_cli-linux-x86-9.5.2.tgz 950535 SHA256 e40988424966d00c32859cd97f5b2f240464f138044139f3304fc51a77f59c3b SHA512 c10dbce0472afcc65e8cdabbf90b78c9de2a7f960582c17af667e6561524d1a63dbaeaf24bcd25ab5e602da8a3be9a100ca01b54c3387452a1a80458f5b5c077 WHIRLPOOL 02815b581eef0721985fecc67c1cbfdf79862257786257784b9db65f527664a2bdd799570e44a536bf69f84e8e7bd9ff9f38ba5fa497629aa746b2b8e464f1de
+DIST tw_cli-linux-x86-9.5.3.tgz 958837 SHA256 8330a18b782e383f518002e1d506e9298ce914609b8a37421156b4d633268127 SHA512 8f773df497b273ddcba04bface949903fa25a099d4a2d94ddb11317ce092226dee9eddebfed6be6798bdb58ebe39438acb6ed56cee57ce72b7ce34d9ab2f8094 WHIRLPOOL 179a20938f4e843d122ffe7e3ceaeed55ab1971c01970873a437e88a0589dc6daa22116edffbee1ac2775b49d1440faaa1902fe2b139dff8fe30e82e0fe9e96e
+DIST tw_cli-linux-x86_64-9.2.1.1.tgz 678634 SHA256 30fabb438c0f7e35a04a680a6bb1f17849d8d980278633dfb1538db9ffdeec85 SHA512 751a537c74383efaf004805e96c3f7edf29a18dab744f5531488ccc54b643e2929308bafea9f86751567120a803e1085315befe1b414d2eff6629e6bc0c8dab6 WHIRLPOOL 0f24d37b95a0655c0f04f271b21c55c3b46b1b614bab6cf8e03d342dbab8b94d896a0f90750c68c693afa60dc66347a29e90504a341e928f61e2ef34bae4c253
+DIST tw_cli-linux-x86_64-9.3.0.2.tgz 932845 SHA256 7b8f6c439642f7d1955a1d5f0a9d12cd108a85c8f70e974795093a74d574042f SHA512 b5fb1343dd8742ad5747c3dcc2bd2d736ee6e3312a15d20029a38d806811e15a6b1e5b28e735377d008557f7dbaf4b174a759bb902e6fd1c6968fd9da1cfca60 WHIRLPOOL 5f6c27496ce70fe7bf2ffa979d4f742c8198c41c07355c9e6bede5989216c326338d0938ac6768c171684156b5470485d295458dccc6803e98226bce585b287a
+DIST tw_cli-linux-x86_64-9.3.0.3.tgz 868867 SHA256 05e2be6a078629f542b050a67156364e67b1b1fea0cef6d3bc2533d10cab2286 SHA512 e0b66a87df63ab1e3408383936d0981853df1015448a1f16a86a3acf0dddbc282c200504b082ca9d0741edd8f8913546f3a002aa228c989dcd73e77087c5305a WHIRLPOOL fd002b14bb0136266febeb05fa6b3d4311f9ffabcdc45748b01c8b87cacf8d6f177ef63c7e46d538f55b15dd560ad13818e6246982ee5b980da5bb068c00b051
+DIST tw_cli-linux-x86_64-9.3.0.4.tgz 846293 SHA256 82cc7c4151f1fcf5b49666c2b439a992d531044c4ca590531fc27c66bc274716 SHA512 fde89108f347522487a4b47fd91332bb33566e6e3feb7818339f110c71ba89088acccbda47c4a081d04aa45e58a49483d82b4f2ab1296e1d9d8ebb178db58875 WHIRLPOOL 7a5471442be6875debd7a95c1ad5f8872ff1e1d2ec460cd859940fccd6c793731cbcaef0876cfc4015b0b77da09c4cbcdd6b5ec620f83cef2a5fecd27df6f876
+DIST tw_cli-linux-x86_64-9.4.0.1.tgz 820656 SHA256 c524ef56ad6357c13ee10b01f9d49b959c725da1b6553bfe9159c7f39fffe87b SHA512 196d5f68ae65306ebf9a9929cd1b9dec85baef071edf3a6f4076d0fdca5d9a089c531ab7914ac18a1fb8bf4a4deeb5bc4896c342d2ca19a6507a72fd354c044a WHIRLPOOL c8ef0dbbf157e3676eed8a1f71c63b4a8a287dc0a981c44adcd14d184c40703855d4bd3f9f0b3232156313e95dd941521ca747626149acd3184e01b58ab395ca
+DIST tw_cli-linux-x86_64-9.4.0.tgz 820535 SHA256 d91f861d447d49db97d24564f9458be2123ef20554ca2d2190e4b4c6fd2ff713 SHA512 97a37fbb21569bb9ab59d2668203747bf2670d37b4ef29d76b85ab25f56838100f926505875078b77161db4887a4b3d05bf259342c03d69a0cb8198be79bfb42 WHIRLPOOL e09dee4994dce7f371fc6faad62d0c79a4db9b2a223057d8bb57d60316bbb3c170141c25f4932801f899d5b97f8a3069c4cd6bf7dc7d803a707f95cfe9faa904
+DIST tw_cli-linux-x86_64-9.4.1.2.tgz 831001 SHA256 a5dafa136b48c72a92043aa4ab6381063266cfc7188f0054a1c8cd953d7a30a2 SHA512 15ca392105662f9c59c643b351672e922992350b973cceb946127b0a285fc93b7d36b6e67483010043b0f945bb256d4380ef99a8c404368a4113a8e297a07e79 WHIRLPOOL af571818e4a835b507c019ea549d91c2a1f2ec5f0263c1c68318b296937360e8e6d79f052b532d6d0b227aec8073fbd5349932af647f5b0b0e7d600ae173fbed
+DIST tw_cli-linux-x86_64-9.4.2.tgz 837638 SHA256 488f1c1b497541f199ef2de7f168c56e9142ed74d59ad3ce52c20a890c5ac0c3 SHA512 bf6b571c4620618be2099df526ebf347881280bd6e60f5b38051b16cf61d88f265ac58604a6d58d4c6c37f960ec8cb370c060cdf1feabcbb0253a4b6dff54050 WHIRLPOOL 09be39e56a1aaf8fb7932e4ac847e10af83c33da4696185d6df824db77d0f5eb529055211ba693bf53b97113d8ad33f7b7685cfa835d33384eab37bb5bf55af7
+DIST tw_cli-linux-x86_64-9.5.0.1.tgz 895959 SHA256 87e0476374a60dcb23308e0bf4f3a7f1978fd1a32a82c39152bdc3a93541d9b1 SHA512 6e2dd3c703a79d6e904235dd9442953ff3407a928bec4eaf663258515c473225ca0e8cda7c230f4d1b59ff2a4652139f831677202f8b3bb3b5e4acf196f8e6b4 WHIRLPOOL 22989ef41c85d3394303f99c7031b655a7ddc47aaf3c69dc19f1dfaf0322498b79212a5d8349282aadd38e2476960b5821ac9aa1ad2d2ec58227810c0c59a308
+DIST tw_cli-linux-x86_64-9.5.0.tgz 886882 SHA256 b7a8085621c599da5063ca459dbc9e823b6ee40c3c2f9543f01fbdaa1e128396 SHA512 e0c6595c709129c2ee9fe338913907a5cc6fd75862e50ab4729463ec2cccf4c92e75f5ecf148554a71b5612ec1c5f92c3d094813360c025745884c1f8b79f972 WHIRLPOOL a12480629050f422d7e05585350866d644b1e926d1ee88c846d7e8de19459256bcea776c3d0b35b377c5beefcd300d7617ad0d24a833a80b06b4662f91fe0a62
+DIST tw_cli-linux-x86_64-9.5.1.1.tgz 949532 SHA256 73c776364a3342db8d9dcbffd73c202b840f7c95d3e567f87133bf3acb71566f SHA512 bde92367cec871897b2618e09699be0a6d996e6a49fbaa67b1584a85e9ce59aaf2142ac5289c473bccdae260aa2538f87da0108ed5368ee6cc22426213f0d48f WHIRLPOOL 67a89c4677e0446ee1e90ac35bbb5e5d1e08ba99e0f9d390b756f775510b6900f2227fabb8df2c3de9bfb751336a5ac0dcd99eba436a58e21c29adadcf658248
+DIST tw_cli-linux-x86_64-9.5.2.tgz 979071 SHA256 2e00233fd4e591220d4732dbc766ae9af5655ba8c000cb4f24504a593455b437 SHA512 de0c71769933e18a9f8e6b12875f97856051bb8c7ec1fe7a365c74b8ddf5773aba6c89628f677b6d5116d3f2933c38ad14a83c289e2fc9a6ae91391b4db36191 WHIRLPOOL d5d9f56931ac3023ad85aa7927759630f37887f1264ebb9cb25181ab7014739a0c728b9a42634f99503a569d2badaeb813571d93743e22aa0bb2078d7d0c6f66
+DIST tw_cli-linux-x86_64-9.5.3.tgz 986751 SHA256 3fd481b69b3a90abafe32966bf30040db89c70836d9d9536f21e0ab641f64ce6 SHA512 5042c3b3499ae67ab0001212ee4906be2a4f8eeac55d1271f7a9880af656c5cb16b526c914b07993b950943eee677d814ee8c4dd9aabac2de8c213451ace5797 WHIRLPOOL 70eab6ea9716bb149489c3cb8567b281f35f3164ae5326d4f60e32d9705e2588deccaf03e7ba84b9300042449dffbe6326bd467fc2e8ca410f8babeb5c039207
diff --git a/sys-block/tw_cli/metadata.xml b/sys-block/tw_cli/metadata.xml
new file mode 100644
index 000000000000..61ca25c62c8b
--- /dev/null
+++ b/sys-block/tw_cli/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ <description>Primary maintainer, PATA controllers</description>
+</maintainer>
+<maintainer>
+ <email>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/tw_cli/tw_cli-10.1.ebuild b/sys-block/tw_cli/tw_cli-10.1.ebuild
new file mode 100644
index 000000000000..330160fb1a6d
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-10.1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="strip fetch"
+# binary packages
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="cli_${PN_KERNEL}_${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on 4 cards:
+# 7006-2 on x86.
+# 9500S-8 on amd64.
+# 9500S-4LP on amd64.
+# 9650SE-8LPML on amd64.
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+#HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+HW_VARIANT="3ware%20SAS%209750-8i%20Gentoo"
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.lsi.com/DistributionSystem/AssetDocument"
+SRC_URI_linux="${SRC_URI_BASE}/cli_linux_${PV}.zip"
+SRC_URI_fbsd="${SRC_URI_BASE}/cli_freebsd_${PV}.zip"
+SRC_URI="kernel_linux? ( ${SRC_URI_linux} )
+ kernel_FreeBSD? ( ${SRC_URI_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+SRC_URI_mine="${SRC_URI_BASE}/cli_${PN_KERNEL}_${PV}.zip"
+LICENSE_URL="http://www.lsi.com/lookup/License.aspx?url=${SRC_URI_mine}&prodName=${HW_VARIANT}&subType=Binary&locale="
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.zip
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA, 9750"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "3ware would like you to agree to the license:"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarballs manually into ${DISTDIR}"
+ einfo ""
+ einfo "Linux - ${SRC_URI_linux}"
+ einfo "FreeBSD - ${SRC_URI_fbsd}"
+ einfo ""
+ einfo "However, they have given permission to redistribute."
+ einfo "http://bugs.gentoo.org/show_bug.cgi?id=60690#c106"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin ${PN_ARCH}/tw_cli
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-10.2.2.1.ebuild b/sys-block/tw_cli/tw_cli-10.2.2.1.ebuild
new file mode 100644
index 000000000000..761774b734d9
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-10.2.2.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="3ware SATA/PATA/SAS RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.lsi.com/products/raid-controllers/pages/3ware-sas-9750-8i.aspx"
+
+# This is apparently what the upstream stuff was based on when LSI took over?
+ThreeDM2_PV="9.5.5.1"
+
+SRC_URI_BASE="http://www.lsi.com/downloads/Public/SATA/SATA%20Common%20Files/"
+SRC_URI_A_linux="CLI_linux-from_the_${PV}_${ThreeDM2_PV}_codesets.zip"
+SRC_URI_A_fbsd="CLI_freebsd-from_the_${PV}_${ThreeDM2_PV}_codesets.zip"
+SRC_URI="kernel_linux? ( ${SRC_URI_BASE}/${SRC_URI_A_linux} )
+ kernel_FreeBSD? ( ${SRC_URI_BASE}/${SRC_URI_A_fbsd} )"
+# the minor ver on the end changes...
+RELNOTES="${SRC_URI_BASE}/${PV}_Release_Notes.pdf"
+
+# Note: 3ware gave permission to redistribute the binaries before:
+# Ref: http://bugs.gentoo.org/show_bug.cgi?id=60690#c106
+#
+# Please note that the LSI-tw_cli license does allow redistribution, despite
+# being a EULA:
+# 2. Grant of Rights
+# 2.1 LSI Binary Code. Subject to the terms of this Agreement, LSI grants
+# to Licensee a non-exclusive, world-wide, revocable (for breach in
+# accordance with Section 7), non-transferable limited license, without
+# the right to sublicense except as expressly provided herein, solely to:
+# (c) Distribute the LSI Binary Code as incorporated in Licensee's
+# Products or for use with LSI Devices to its Subsequent Users;
+# (d) Distribute the Explanatory Materials related to LSI Binary Code only
+# for use with LSI Devices;
+#
+# 3. License Restrictions
+# 3.1. LSI Binary Code. The Licenses granted in Section 2.1 for LSI Binary
+# Code and related Explanatory Materials are subject to the following
+# restrictions:
+# (a) Licensee shall not use the LSI Binary Code and related Explanatory
+# Materials for any purpose other than as expressly provided in Article 2;
+# (b) Licensee shall reproduce all copyright notices and other proprietary
+# markings or legends contained within or on the LSI Binary Code and
+# related Explanatory Materials on any copies it makes; and
+LICENSE="LSI-tw_cli"
+SLOT="0"
+
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd ~amd64-fbsd"
+IUSE=""
+
+RESTRICT="strip primaryuri"
+QA_PREBUILT="/opt/tw_cli/tw_cli"
+
+# binary packages
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+# If you want to fetch it yourself (not from the mirrors), there is an IP-based
+# clickthrough to accept the EULA.
+pkg_nofetch() {
+ einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
+ einfo "Please visit $SRC_URI in your browser. The clickthrough is IP-based,"
+ einfo "so no wget is possible."
+ einfo "And place $A in ${DISTDIR}"
+}
+
+src_install() {
+ case ${ARCH} in
+ amd64) CLI_BIN=x86_64/tw_cli;;
+ x86) CLI_BIN=x86/tw_cli;;
+ *) die "unsupported ARCH";;
+ esac
+ exeinto /opt/tw_cli
+ # The names have varied in the past, sometimes there is a suffix
+ newexe ${CLI_BIN} tw_cli
+ dosym /opt/tw_cli/tw_cli /usr/sbin/tw_cli
+
+ newman ${PN}.8.nroff ${PN}.8
+ dohtml *.html
+ dodoc *.txt
+
+ # to comply with license requirement 3.1.b
+ insinto /opt/tw_cli
+ newins ${PORTDIR}/licenses/${LICENSE} LICENSE
+}
+
+pkg_postinst() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA, 9750"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${RELNOTES}"
+}
diff --git a/sys-block/tw_cli/tw_cli-10.2.ebuild b/sys-block/tw_cli/tw_cli-10.2.ebuild
new file mode 100644
index 000000000000..fdc06354b9a4
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-10.2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* amd64 x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="strip primaryuri"
+# binary packages
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="cli_${PN_KERNEL}_${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on 5 cards:
+# 9550SXU-4LP on amd64
+# 9650SE-{2LP,8LPML} on amd64.
+# 9690SA-{4I,8I} on amd64
+# - Robin H. Johnson <robbat2@gentoo.org> - 15 Nov 2010
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+#HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+HW_VARIANT="3ware%20SAS%209750-8i%20Gentoo"
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.lsi.com/DistributionSystem/AssetDocument"
+SRC_URI_SUFFIX="?prodName=${HW_VARIANT}"
+SRC_URI_A_linux="cli_linux_${PV}.zip"
+SRC_URI_A_fbsd="cli_freebsd_${PV}.zip"
+SRC_URI_linux="${SRC_URI_BASE}/${SRC_URI_A_linux}${SRC_URI_SUFFIX} -> ${SRC_URI_A_linux}"
+SRC_URI_fbsd="${SRC_URI_BASE}/${SRC_URI_A_fbsd}${SRC_URI_SUFFIX} -> ${SRC_URI_A_fbsd}"
+SRC_URI="kernel_linux? ( ${SRC_URI_linux} )
+ kernel_FreeBSD? ( ${SRC_URI_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+SRC_URI_mine="${SRC_URI_BASE}/cli_${PN_KERNEL}_${PV}.zip"
+LICENSE_URL="http://www.lsi.com/lookup/License.aspx?url=${SRC_URI_mine}&prodName=${HW_VARIANT}&subType=Binary&locale="
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.zip
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA, 9750"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "3ware would like you to agree to the license:"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarballs manually into ${DISTDIR}"
+ einfo ""
+ einfo "Linux - ${SRC_URI_linux}"
+ einfo "FreeBSD - ${SRC_URI_fbsd}"
+ einfo ""
+ einfo "However, they have given permission to redistribute."
+ einfo "http://bugs.gentoo.org/show_bug.cgi?id=60690#c106"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin ${PN_ARCH}/tw_cli
+ into /usr
+ # 10.2 is missing this
+ if [[ -f tw_cli.8.nroff ]]; then
+ newman tw_cli.8.nroff tw_cli.8
+ else
+ ewarn "Upstream's 10.2 release is missing the tw_cli manpage."
+ fi
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.2.1.1.ebuild b/sys-block/tw_cli/tw_cli-9.2.1.1.ebuild
new file mode 100644
index 000000000000..239785c86ad6
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.2.1.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+#set
+DESCRIPTION="3ware Command Line Interface Tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* x86 amd64"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+#DOWNLOAD_URL_BASE="http://www.3ware.com/support/download_${PV}.asp?SNO="
+#DOWNLOAD_URL="x86? ( ${DOWNLOAD_URL_BASE}499 )
+# amd64? ( ${DOWNLOAD_URL_BASE}501 )"
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+SRC_URI_BASE="http://www.3ware.com/download/Escalade9000Series/${PV}/${PN}-linux-"
+SRC_URI_X86="${SRC_URI_BASE}x86-${PV}.tgz"
+SRC_URI_AMD64="${SRC_URI_BASE}x86_64-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_X86} )
+ amd64? ( ${SRC_URI_AMD64} )"
+DOWNLOAD_URL_APP="http://www.3ware.com/support/dnload_agreeeng.asp?code=2&id=&softtype=CLI&os=Linux"
+
+#S="${WORKDIR}/${MY_P}"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ einfo "This binary supports all current cards, including, but not"
+ einfo "limited to:"
+ einfo "PATA: 7210, 7410, 7450, 7810, 7850, 7000-2, 7500-4, 7500-8,"
+ einfo " 7500-12, 7006-2, 7506-4, 7506-4LP, 7506-8, 7506-12"
+ einfo "SATA: 8500-4, 8500-8, 8500-12, 8006-2, 8506-4, 8506-12,"
+ einfo " 8506-8MI, 8506-12MI, 9500S-4LP, 9500S-8, 9500S-12,"
+ einfo " 9500S-8MI, 9500S-12MI"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at"
+ einfo "${DOWNLOAD_URL_APP}"
+ einfo "And then use one of the following URLs to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo "amd64: ${SRC_URI_AMD64}"
+ einfo "x86: ${SRC_URI_X86}"
+ einfo "Download the 32-bit version for x86 machines, or the"
+ einfo "64-bit version for amd64 machines."
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.3.0.2.ebuild b/sys-block/tw_cli/tw_cli-9.3.0.2.ebuild
new file mode 100644
index 000000000000..5e5f0efb007f
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.3.0.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~x86 ~amd64"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/Escalade9000Series/${PV}"
+SRC_URI="x86? ( ${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz )
+ amd64? ( ${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz )"
+# x86: http://3ware.com/support/download_9.3.0.2.asp?SNO=616
+# amd64: http://3ware.com/support/download_9.3.0.2.asp?SNO=617
+DOWNLOAD_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/Escalade9000Series/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ einfo "This binary supports all current cards, including, but not"
+ einfo "limited to:"
+ einfo ""
+ einfo "PATA: 7210, 7410, 7450, 7810, 7850, 7000-2, 7500-4, 7500-8,"
+ einfo " 7500-12, 7006-2, 7506-4, 7506-4LP, 7506-8, 7506-12"
+ einfo ""
+ einfo "SATA: 8500-4, 8500-8, 8500-12, 8006-2, 8506-4, 8506-12,"
+ einfo " 8506-8MI, 8506-12MI, 9500S-4LP, 9500S-8, 9500S-12,"
+ einfo " 9500S-8MI, 9500S-12MI"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${DOWNLOAD_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "\t${SRC_URI}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.3.0.3.ebuild b/sys-block/tw_cli/tw_cli-9.3.0.3.ebuild
new file mode 100644
index 000000000000..b2801049fa5b
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.3.0.3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~x86 ~amd64"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/Escalade7000Series/${PV}"
+SRC_URI="x86? ( ${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz )
+ amd64? ( ${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz )"
+# x86: http://3ware.com/support/download_9.3.0.2.asp?SNO=616
+# amd64: http://3ware.com/support/download_9.3.0.2.asp?SNO=617
+DOWNLOAD_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/Escalade7000Series/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ einfo "This binary supports should support ALL cards, including, but not"
+ einfo "limited to:"
+ einfo ""
+ einfo "PATA: 6xxx, 7210, 7410, 7450, 7810, 7850, 7000-2, 7500-4, 7500-8,"
+ einfo " 7500-12, 7006-2, 7506-4, 7506-4LP, 7506-8, 7506-12"
+ einfo ""
+ einfo "SATA: 8500-4, 8500-8, 8500-12, 8006-2, 8506-4, 8506-12,"
+ einfo " 8506-8MI, 8506-12MI, 9500S-4LP, 9500S-8, 9500S-12,"
+ einfo " 9500S-8MI, 9500S-12MI"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${DOWNLOAD_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "\t${SRC_URI}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.3.0.4.ebuild b/sys-block/tw_cli/tw_cli-9.3.0.4.ebuild
new file mode 100644
index 000000000000..b2801049fa5b
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.3.0.4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~x86 ~amd64"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/Escalade7000Series/${PV}"
+SRC_URI="x86? ( ${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz )
+ amd64? ( ${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz )"
+# x86: http://3ware.com/support/download_9.3.0.2.asp?SNO=616
+# amd64: http://3ware.com/support/download_9.3.0.2.asp?SNO=617
+DOWNLOAD_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/Escalade7000Series/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ einfo "This binary supports should support ALL cards, including, but not"
+ einfo "limited to:"
+ einfo ""
+ einfo "PATA: 6xxx, 7210, 7410, 7450, 7810, 7850, 7000-2, 7500-4, 7500-8,"
+ einfo " 7500-12, 7006-2, 7506-4, 7506-4LP, 7506-8, 7506-12"
+ einfo ""
+ einfo "SATA: 8500-4, 8500-8, 8500-12, 8006-2, 8506-4, 8506-12,"
+ einfo " 8506-8MI, 8506-12MI, 9500S-4LP, 9500S-8, 9500S-12,"
+ einfo " 9500S-8MI, 9500S-12MI"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${DOWNLOAD_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "\t${SRC_URI}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.4.0.1.ebuild b/sys-block/tw_cli/tw_cli-9.4.0.1.ebuild
new file mode 100644
index 000000000000..6665cec982c8
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.4.0.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )"
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE"
+ elog " 9550SXU, 9650SE"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.4.0.ebuild b/sys-block/tw_cli/tw_cli-9.4.0.ebuild
new file mode 100644
index 000000000000..cb4dd903f697
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.4.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="http://www.3ware.com/"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* amd64 x86"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI="x86? ( ${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz )
+ amd64? ( ${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz )"
+DOWNLOAD_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ einfo "This binary supports should support ALL cards, including, but not"
+ einfo "limited to the following series:"
+ einfo ""
+ einfo "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ einfo "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE"
+ einfo " 9550SXU, 9650SE"
+ einfo ""
+ einfo "Release notes for this version are available at:"
+ einfo "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${DOWNLOAD_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "\t${SRC_URI}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.4.1.2.ebuild b/sys-block/tw_cli/tw_cli-9.4.1.2.ebuild
new file mode 100644
index 000000000000..105596dd24bc
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.4.1.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* amd64 x86"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )"
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME}"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.4.2.ebuild b/sys-block/tw_cli/tw_cli-9.4.2.ebuild
new file mode 100644
index 000000000000..d35f5583c4bc
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.4.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+MY_P="${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI=""
+for i in x86 amd64 ; do
+ SRC_URI="${SRC_URI} ${i}? ( ${SRC_URI_BASE}/${PN}-linux-${i/amd64/x86_64}-${PV}.tgz )"
+done
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+S="${WORKDIR}/${PN}-linux-${ARCH/amd64/x86_64}-${PV}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME}"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.5.0.1.ebuild b/sys-block/tw_cli/tw_cli-9.5.0.1.ebuild
new file mode 100644
index 000000000000..a73a69761b1c
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.5.0.1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="${PN}-${PN_KERNEL}-${PN_ARCH}-${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI_x86_fbsd="${SRC_URI_BASE}/${PN}-freebsd-x86-${PV}.tgz"
+#SRC_URI_amd64_fbsd="${SRC_URI_BASE}/${PN}-x86_64-freebsd-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )
+ x86-fbsd? ( ${SRC_URI_x86_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo "x86-fbsd - ${SRC_URI_x86_fbsd}"
+ #einfo "amd64-fbsd - ${SRC_URI_amd64_fbsd}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.5.0.ebuild b/sys-block/tw_cli/tw_cli-9.5.0.ebuild
new file mode 100644
index 000000000000..2555c9046f3a
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.5.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+if [ "${PN_KERNEL}" == 'freebsd' ]; then
+ MY_P="${PN}-${PN_ARCH}-${PN_KERNEL}-${PV}"
+else
+ MY_P="${PN}-${PN_KERNEL}-${PN_ARCH}-${PV}"
+fi
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on two cards: 6200 (amd64) and 7006-2 (x86)
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+#SRC_URI_x86_fbsd="${SRC_URI_BASE}/${PN}-x86-freebsd-${PV}.tgz"
+#SRC_URI_amd64_fbsd="${SRC_URI_BASE}/${PN}-x86_64-freebsd-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )"
+ #x86-fbsd? ( ${SRC_URI_x86_fbsd} )
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ #einfo "x86-fbsd - ${SRC_URI_x86_fbsd}"
+ #einfo "amd64-fbsd - ${SRC_URI_amd64_fbsd}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ dosbin tw_sched
+ insinto /etc
+ doins tw_sched.cfg
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ newman tw_sched.8.nroff tw_sched.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.5.1.1.ebuild b/sys-block/tw_cli/tw_cli-9.5.1.1.ebuild
new file mode 100644
index 000000000000..63bff042fa21
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.5.1.1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="fetch strip mirror"
+# binary packages
+DEPEND=""
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="${PN}-${PN_KERNEL}-${PN_ARCH}-${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on 4 cards:
+# 7006-2 on x86.
+# 9500S-8 on amd64.
+# 9500S-4LP on amd64.
+# 9650SE-8LPML on amd64.
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI_x86_fbsd="${SRC_URI_BASE}/${PN}-freebsd-x86-${PV}.tgz"
+#SRC_URI_amd64_fbsd="${SRC_URI_BASE}/${PN}-x86_64-freebsd-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )
+ x86-fbsd? ( ${SRC_URI_x86_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "Please agree to the license at URL"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarball into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo "x86-fbsd - ${SRC_URI_x86_fbsd}"
+ #einfo "amd64-fbsd - ${SRC_URI_amd64_fbsd}"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.5.2.ebuild b/sys-block/tw_cli/tw_cli-9.5.2.ebuild
new file mode 100644
index 000000000000..e84bcbe415d0
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.5.2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* amd64 x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="strip"
+# binary packages
+DEPEND=""
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="${PN}-${PN_KERNEL}-${PN_ARCH}-${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on 4 cards:
+# 7006-2 on x86.
+# 9500S-8 on amd64.
+# 9500S-4LP on amd64.
+# 9650SE-8LPML on amd64.
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI_x86_fbsd="${SRC_URI_BASE}/${PN}-freebsd-x86-${PV}.tgz"
+#SRC_URI_amd64_fbsd="${SRC_URI_BASE}/${PN}-x86_64-freebsd-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )
+ x86-fbsd? ( ${SRC_URI_x86_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "3ware would like you to agree to the license:"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarballs manually into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo "x86-fbsd - ${SRC_URI_x86_fbsd}"
+ #einfo "amd64-fbsd - ${SRC_URI_amd64_fbsd}"
+ einfo ""
+ einfo "However, they have given permission to redistribute."
+ einfo "http://bugs.gentoo.org/show_bug.cgi?id=60690#c106"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ dohtml *.html
+}
diff --git a/sys-block/tw_cli/tw_cli-9.5.3.ebuild b/sys-block/tw_cli/tw_cli-9.5.3.ebuild
new file mode 100644
index 000000000000..2ee5e907a0c4
--- /dev/null
+++ b/sys-block/tw_cli/tw_cli-9.5.3.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="3ware SATA+PATA RAID controller Command Line Interface tool"
+HOMEPAGE="https://www.3ware.com/3warekb/article.aspx?id=14847"
+LICENSE="3ware"
+SLOT="0"
+# binary packages
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+# stripping seems to break this sometimes
+RESTRICT="strip"
+# binary packages
+DEPEND=""
+RDEPEND=""
+
+# Upstream has _FUN_ naming these
+# We are mostly prepared for the FreeBSD binaries at this point
+# They just aren't yet enabled here
+PN_KERNEL="${ARCH/*fbsd-*/freebsd}"
+[ "${PN_KERNEL}" != 'freebsd' ] && PN_KERNEL='linux'
+PN_ARCH="${ARCH/*-}"
+PN_ARCH="${PN_ARCH/amd64/x86_64}"
+
+# The naming of <=9.5.0 for freebsd was weird,
+# but 9.5.0.1 has it sanely.
+MY_P="${PN}-${PN_KERNEL}-${PN_ARCH}-${PV}"
+
+# Upstream actually only releases newer versions for new hardware
+# and doesn't release new major versions for old hardware
+# however their backwards compatibility is excellent.
+# I personally test tw_cli on 4 cards:
+# 7006-2 on x86.
+# 9500S-8 on amd64.
+# 9500S-4LP on amd64.
+# 9650SE-8LPML on amd64.
+# - Robin H. Johnson <robbat2@gentoo.org> - 23 Nov 2006
+#HW_VARIANT="Escalade7000Series" - for versions 9.3.0.*
+#HW_VARIANT="Escalade9650SE-Series" # for versions 9.4.0*
+HW_VARIANT="Escalade9690SA-Series" # for versions 9.5.0*
+# package has different tarballs for x86 and amd64
+SRC_URI_BASE="http://www.3ware.com/download/${HW_VARIANT}/${PV}"
+SRC_URI_x86="${SRC_URI_BASE}/${PN}-linux-x86-${PV}.tgz"
+SRC_URI_amd64="${SRC_URI_BASE}/${PN}-linux-x86_64-${PV}.tgz"
+SRC_URI_x86_fbsd="${SRC_URI_BASE}/${PN}-freebsd-x86-${PV}.tgz"
+#SRC_URI_amd64_fbsd="${SRC_URI_BASE}/${PN}-x86_64-freebsd-${PV}.tgz"
+SRC_URI="x86? ( ${SRC_URI_x86} )
+ amd64? ( ${SRC_URI_amd64} )
+ x86-fbsd? ( ${SRC_URI_x86_fbsd} )"
+ #amd64-fbsd? ( ${SRC_URI_amd64_fbsd} )
+LICENSE_URL="http://www.3ware.com/support/windows_agree.asp?path=/download/${HW_VARIANT}/${PV}/${MY_P}.tgz"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${MY_P}.tgz
+}
+
+supportedcards() {
+ elog "This binary supports should support ALL cards, including, but not"
+ elog "limited to the following series:"
+ elog ""
+ elog "PATA: 6xxx, 72xx, 74xx, 78xx, 7000, 7500, 7506"
+ elog "SATA: 8006, 8500, 8506, 9500S, 9550SX, 9590SE,"
+ elog " 9550SXU, 9650SE, 9650SE-{24M8,4LPME},"
+ elog " 9690SA"
+ elog ""
+ elog "Release notes for this version are available at:"
+ elog "${SRC_URI_BASE}/${PV}_Release_Notes_Web.pdf"
+}
+
+pkg_setup() {
+ supportedcards
+}
+
+pkg_nofetch() {
+ einfo "3ware would like you to agree to the license:"
+ einfo ""
+ einfo "\t${LICENSE_URL}"
+ einfo ""
+ einfo "And then use the following URL to download the"
+ einfo "correct tarballs manually into ${DISTDIR}"
+ einfo ""
+ einfo "x86 - ${SRC_URI_x86}"
+ einfo "amd64 - ${SRC_URI_amd64}"
+ einfo "x86-fbsd - ${SRC_URI_x86_fbsd}"
+ #einfo "amd64-fbsd - ${SRC_URI_amd64_fbsd}"
+ einfo ""
+ einfo "However, they have given permission to redistribute."
+ einfo "http://bugs.gentoo.org/show_bug.cgi?id=60690#c106"
+ einfo ""
+ supportedcards
+}
+
+src_install() {
+ into /
+ dosbin tw_cli
+ into /usr
+ newman tw_cli.8.nroff tw_cli.8
+ dohtml *.html
+}
diff --git a/sys-block/vblade/Manifest b/sys-block/vblade/Manifest
new file mode 100644
index 000000000000..d100ac97039a
--- /dev/null
+++ b/sys-block/vblade/Manifest
@@ -0,0 +1,3 @@
+DIST vblade-19.tgz 25539 SHA256 779c8c9e80ce09e8ef1737216c8438c6e614d7001e1a6f312e4a82191e34870e
+DIST vblade-20.tgz 26689 SHA256 c8fe2fc4f2fba8e07e5cfdf17335982584eef2cd5c78bf8b1db93f2b56e7121d
+DIST vblade-21.tgz 26434 SHA256 b5740bb7d57141769ba77baa3c690f134dd62069f1df310debc2520d416a1b92 SHA512 cf2826fd40a5c1377dd65149581b10460a55eb17f480a7fd3bdd35fbe8066a8c571b62ebb93dbfadad3aac569a03b142bff1df2c4a49efff98ad5ed084739d14 WHIRLPOOL e9555817ccaad19a3d36824efcb3339d67f5e5dbb6a39a5980eb2b17282a4ea173907d3917d98fb991b6816aac065ec36f6be6079d55b2786bfa22d03f35d16c
diff --git a/sys-block/vblade/files/conf.d-vblade b/sys-block/vblade/files/conf.d-vblade
new file mode 100644
index 000000000000..c8fb6cde4a69
--- /dev/null
+++ b/sys-block/vblade/files/conf.d-vblade
@@ -0,0 +1,26 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# If you intent to run only one vblade, you should edit config_vblade0
+# SYNTAX: SHELF SLOT NETIF SOURCE
+config_vblade0="0 0 eth0 /root/test.img"
+
+# SHELF is a numeric value >= 0
+# SLOT is a numeric value 0 <= X <= 15
+# NETIF is a network interface name
+# SOURCE is a file or block device
+
+# For additional vblades, run:
+# ln -s /etc/init.d/vblade.vblade0 /etc/init.d/vblade.$NAME
+# and define config_$NAME in this file.
+
+# Note that the combination of SHELF:SLOT:NETIF should be unique for your
+# network.
+
+# Some additional examples
+# config_vblade1="0 1 eth0 /root/test2.img"
+# config_foobar="0 1 eth1 /dev/md0"
+
+# vim: ft=filetype=gentoo-conf-d syntax=filetype=gentoo-conf-d :
+# vim: ai sw=2 sts=2 ts=2 :
diff --git a/sys-block/vblade/files/init.d-vblade.vblade0 b/sys-block/vblade/files/init.d-vblade.vblade0
new file mode 100644
index 000000000000..e29ccb19a6b8
--- /dev/null
+++ b/sys-block/vblade/files/init.d-vblade.vblade0
@@ -0,0 +1,120 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_commands="checkconfig"
+
+depend() {
+ need net
+}
+
+# bug #218043
+if [ ! -f /etc/init.d/sysfs ]; then
+ conf="$(add_suffix /etc/conf.d/vblade)"
+ [[ -e "${conf}" ]] && source "${conf}"
+ vblade_name="${myservice#*.}"
+else
+ conf="/etc/conf.d/vblade"
+ [[ -e "${conf}" ]] && source "${conf}"
+ vblade_name="${RC_SVCNAME#*.}"
+fi
+
+vblade_conf_variable="config_${vblade_name}"
+vblade_conf="${!vblade_conf_variable}"
+pidfile="/var/run/vblade-${vblade_name}.pid"
+srvname="vblade.${vblade_name}"
+
+getconfig() {
+ tmp="${vblade_conf}"
+ shelf="${tmp/ *}"
+ tmp="${tmp#* }"
+ slot="${tmp/ *}"
+ tmp="${tmp#* }"
+ netif="${tmp/ *}"
+ tmp="${tmp#* }"
+ src="${tmp}"
+ export shelf slot netif src
+}
+
+checkconfig() {
+ if [ -z "${vblade_conf}" ]; then
+ eerror "vblade configuration not specified for ${vblade_name}"
+ return 1
+ fi
+ getconfig
+
+ is_valid_numeric "${shelf}" 0
+ if [[ $? -ne 0 ]]; then
+ eerror "Shelf '${shelf}' is non-numeric or less than zero."
+ return 1
+ fi
+ is_valid_numeric "${slot}" 0 15
+ if [[ $? -ne 0 ]]; then
+ eerror "Slot '${slot}' is outside the valid range [0..15]."
+ return 1
+ fi
+
+ sysfs_base="/sys/class/net/"
+ procfs_base="/proc/sys/net/ipv4/conf/"
+ if test ! \( -e "${sysfs_base}${netif}" -o -e "${procfs_base}${netif}" \); then
+ eerror "Network interface '${netif}' does not exist"
+ return 1
+ fi
+
+ if test ! \( -f "${src}" -o -b "${src}" \) ; then
+ eerror "Source '${src}' must be a file or block device"
+ return 1
+ fi
+
+ if test ! \( -e "${src}" -a -r "${src}" \) ; then
+ eerror "Source '${src}' is not readable."
+ return 1
+ fi
+
+ return 0
+}
+
+is_valid_numeric() {
+ num="${1}"
+ min="${2}"
+ max="${3}"
+ # non-numeric
+ test "$num" -ge "0" 2>/dev/null
+ rc=$?
+ test "$rc" -eq 2 && return 2
+ # check for min
+ test -z "$min" && return 0
+ test "$num" -lt "$min" && return 1
+ # check for max
+ test -z "$max" && return 0
+ test "$num" -gt "$max" && return 1
+ # done
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ getconfig
+ ebegin "Starting ${srvname}: e${shelf}.${slot} on ${netif} using '${src}'"
+ export LOGTAG="${srvname}"
+ start-stop-daemon --start --quiet \
+ --pidfile ${pidfile} --background \
+ --make-pidfile --exec /usr/sbin/vbladed -- \
+ ${shelf} ${slot} ${netif} "${src}"
+ eend $?
+
+ #${shelf} ${slot} ${netif} "${src}" 2>&1 | logger -t ${srvname} &
+}
+
+stop() {
+ ebegin "Stopping ${srvname}"
+ #start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ getconfig
+ ps -Ao pid,args | egrep "^[[:space:]]*[[:digit:]]+ /usr/sbin/vbladed? ${shelf} ${slot}" | awk '{print $1}' | xargs kill
+ eend $?
+
+ #start-stop-daemon --stop --quiet --exec /usr/sbin/vblade
+}
+
+# vim: ft=gentoo-init-d syntax=gentoo-init-d :
+# vim: ai sw=4 sts=4 ts=4 :
diff --git a/sys-block/vblade/files/vbladed b/sys-block/vblade/files/vbladed
new file mode 100644
index 000000000000..7fdf8fb9f57d
--- /dev/null
+++ b/sys-block/vblade/files/vbladed
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+# run a vblade daemon using a logger process
+# output is directed to syslogd
+#
+# Although logging goes to syslog, let's going to
+# protect ourselves against the most common way or
+# calling vbladed: without arguments.
+if [ -z "$*" ]
+then
+ echo "Usage: vbladed <shelf> <slot> <ethn> <device>" >&2
+ exit 1
+fi
+
+[ -z "${LOGTAG}" ] && LOGTAG=vbladed
+
+/usr/sbin/vblade "${@}" </dev/null 2>&1 | /usr/bin/logger -t "${LOGTAG}"
diff --git a/sys-block/vblade/metadata.xml b/sys-block/vblade/metadata.xml
new file mode 100644
index 000000000000..1154867b1dab
--- /dev/null
+++ b/sys-block/vblade/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>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">aoetools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/vblade/vblade-19.ebuild b/sys-block/vblade/vblade-19.ebuild
new file mode 100644
index 000000000000..35766c1b2d71
--- /dev/null
+++ b/sys-block/vblade/vblade-19.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+#SRC_URI="mirror://sourceforge/aoetools/${P}.tar.gz"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}
+ sys-apps/util-linux"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # messy tarball
+ make clean || die "Failed to clean up source"
+ sed -i 's,^CFLAGS.*,CFLAGS += -Wall,' makefile || die "Failed to clean up makefile"
+}
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ doman vblade.8
+ dodoc HACKING NEWS README
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}
diff --git a/sys-block/vblade/vblade-20.ebuild b/sys-block/vblade/vblade-20.ebuild
new file mode 100644
index 000000000000..4dee0adaf132
--- /dev/null
+++ b/sys-block/vblade/vblade-20.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="sys-apps/util-linux"
+
+src_prepare() {
+ sed -i -e 's,^CFLAGS.*,CFLAGS += -Wall,' \
+ -e 's:-o vblade:${LDFLAGS} \0:' \
+ makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ doman vblade.8
+ dodoc HACKING NEWS README
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}
diff --git a/sys-block/vblade/vblade-21.ebuild b/sys-block/vblade/vblade-21.ebuild
new file mode 100644
index 000000000000..0c0607311ff6
--- /dev/null
+++ b/sys-block/vblade/vblade-21.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="sys-apps/util-linux"
+
+src_prepare() {
+ sed -i -e 's,^CFLAGS.*,CFLAGS += -Wall,' \
+ -e 's:-o vblade:${LDFLAGS} \0:' \
+ makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ doman vblade.8
+ dodoc HACKING NEWS README
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}
diff --git a/sys-block/viaideinfo/Manifest b/sys-block/viaideinfo/Manifest
new file mode 100644
index 000000000000..c6bcf1c88e98
--- /dev/null
+++ b/sys-block/viaideinfo/Manifest
@@ -0,0 +1 @@
+DIST viaideinfo-0.5.tar.gz 87428 SHA256 833247f29e16d1cd6b20095955a1986932121ddda6dc56802d0f9df778eb8bba SHA512 8b697f5192828db9393706bbc4b679c664a1f3f5668820bfad7aaf1b8767586e49fe428fdc61e9223ee4cc2a16601f6060a2ec206690c098a864e9f26915e7c2 WHIRLPOOL c729d33f540d3863f850b1d41a4b37e04aacfbe1ab408830e5de94238c2875e2a597ab4f857cb8841c19f036147eb8153576545e84865b3a3aed25708cb723e4
diff --git a/sys-block/viaideinfo/metadata.xml b/sys-block/viaideinfo/metadata.xml
new file mode 100644
index 000000000000..c3a21340a392
--- /dev/null
+++ b/sys-block/viaideinfo/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>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/viaideinfo/viaideinfo-0.5.ebuild b/sys-block/viaideinfo/viaideinfo-0.5.ebuild
new file mode 100644
index 000000000000..d922f692ed94
--- /dev/null
+++ b/sys-block/viaideinfo/viaideinfo-0.5.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Query VIA IDE controllers for various information"
+HOMEPAGE="http://www.reactivated.net/software/viaideinfo"
+SRC_URI="http://www.reactivated.net/software/viaideinfo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-apps/pciutils-2.2.0"
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc ChangeLog NEWS README THANKS
+}
diff --git a/sys-block/whdd/Manifest b/sys-block/whdd/Manifest
new file mode 100644
index 000000000000..3e106be9535a
--- /dev/null
+++ b/sys-block/whdd/Manifest
@@ -0,0 +1,2 @@
+DIST whdd-2.1.tar.gz 32363 SHA256 a5cdb289381a623b4f9aad9e8a736ae206a91b3c214942f2755e83865b2d4c7b SHA512 a43796acf359069e27c622b9816de3d041f87ff77a83167020796c445e65ca0c728c8fd3418814802d84fa8cb594a72c764dd5b11e85771a024ab9c8a43b26a0 WHIRLPOOL 6214f10c223ee661185954b2adfd7df2bf8ac60f19af638b6ccdce170264e03df6910e48eeabccc958a559cb3f929a32735a79d7ca23567bb1e2535c9eaeb205
+DIST whdd-2.2.tar.gz 33317 SHA256 49d615e46117f1271aac22a063703e87fab749e5357a0c5bb4a369e39d7c9241 SHA512 ab30c1e418cb7ba9881b1a91b99d0b1d5389172c4d5802be69d98cb9c16f1282ff7808e2b40bb937987a9d3ad9fa7f20e630d19307eb0aa1090cff531a904d4a WHIRLPOOL c7d9eee7a21e6390a0c1a5befe5bcb17bf326c0b17ae89164452d5e70a94567cb987ecaf17c90ca0631e3ef1f0d958f8d46881f65169179202c84bedb826719b
diff --git a/sys-block/whdd/metadata.xml b/sys-block/whdd/metadata.xml
new file mode 100644
index 000000000000..514413068c26
--- /dev/null
+++ b/sys-block/whdd/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andrey.krieger.utkin@gmail.com</email>
+ <name>Andrey Utkin</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">krieger-od/whdd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/whdd/whdd-2.1.ebuild b/sys-block/whdd/whdd-2.1.ebuild
new file mode 100644
index 000000000000..6998deac85d9
--- /dev/null
+++ b/sys-block/whdd/whdd-2.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="Diagnostic and recovery tool for block devices"
+HOMEPAGE="http://github.com/krieger-od/whdd"
+SRC_URI="http://github.com/krieger-od/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-util/dialog
+ sys-libs/ncurses[unicode]"
+RDEPEND="${DEPEND}
+ sys-apps/smartmontools"
+
+src_unpack() {
+ default
+ mv krieger-od-${PN}-* ${P}
+ echo ${PV} > "${S}"/VERSION || die
+}
diff --git a/sys-block/whdd/whdd-2.2.ebuild b/sys-block/whdd/whdd-2.2.ebuild
new file mode 100644
index 000000000000..1775f6d7702a
--- /dev/null
+++ b/sys-block/whdd/whdd-2.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="Diagnostic and recovery tool for block devices"
+HOMEPAGE="http://github.com/krieger-od/whdd"
+SRC_URI="http://github.com/krieger-od/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-util/dialog
+ sys-libs/ncurses[unicode]"
+RDEPEND="${DEPEND}
+ sys-apps/smartmontools"
+
+src_unpack() {
+ default
+ mv krieger-od-${PN}-* ${P}
+ echo ${PV} > "${S}"/VERSION || die
+}
diff --git a/sys-block/whdd/whdd-9999.ebuild b/sys-block/whdd/whdd-9999.ebuild
new file mode 100644
index 000000000000..21661b408085
--- /dev/null
+++ b/sys-block/whdd/whdd-9999.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+EGIT_REPO_URI="git://github.com/krieger-od/whdd.git"
+
+inherit cmake-utils git-2
+
+DESCRIPTION="Diagnostic and recovery tool for block devices"
+HOMEPAGE="http://github.com/krieger-od/whdd"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="
+ dev-util/dialog
+ sys-libs/ncurses[unicode]"
+RDEPEND="${DEPEND}
+ sys-apps/smartmontools"
diff --git a/sys-block/zram-init/Manifest b/sys-block/zram-init/Manifest
new file mode 100644
index 000000000000..f788715a52b3
--- /dev/null
+++ b/sys-block/zram-init/Manifest
@@ -0,0 +1,2 @@
+DIST zram-init-2.7.tar.gz 4821 SHA256 205765243bd36bf62c471363c4fddf8173275d37f5f919716b5b71afea0fe94d SHA512 db8dc5580b8405752d58996e5927573b687795b598c94948ccc51d038f7c7dfc47b64651d9554c1807d8f6453498c3f1efe6f2d34b82eb6b1df2d8f7e84980a5 WHIRLPOOL 1c677453567836db416b933e675df9c30f61797f8c5d32570693372df85729798aa3aa056dbee78ca5a3cf2a44c80ce4f8f54481751f35e03e01dbb0679dfc79
+DIST zram-init-3.0.tar.gz 5578 SHA256 a1b4bf7f90497a44388f349c3c766e13e575ff7b52168f74058e9b352244b71a SHA512 f962aaa9c5d7f8f7566e9e405de4709fcfd0b659c7dcf79008ca5b7b18ab44545f363e8a695bfff07068e0889ec79ce54af578493f82be3848ca306865d6555a WHIRLPOOL 6304d5192b81490e33962e3162f18729e5a8438bb3f10b90744045014c3ef91a18c2a65538b97f02811cc793d88fb7eddc7efa3129c3b150e70cddfb3694305f
diff --git a/sys-block/zram-init/metadata.xml b/sys-block/zram-init/metadata.xml
new file mode 100644
index 000000000000..664106308be1
--- /dev/null
+++ b/sys-block/zram-init/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>jauhien@gentoo.org</email>
+ <name>Jauhien Piatlicki</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">vaeth/zram-init</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/zram-init/zram-init-2.7-r1.ebuild b/sys-block/zram-init/zram-init-2.7-r1.ebuild
new file mode 100644
index 000000000000..6f2cf7a46597
--- /dev/null
+++ b/sys-block/zram-init/zram-init-2.7-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo systemd
+
+DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zram"
+HOMEPAGE="https://github.com/vaeth/zram-init/"
+SRC_URI="https://github.com/vaeth/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DISABLE_AUTOFORMATTING="true"
+DOC_CONTENTS="To use zram, activate it in your kernel and add it to default runlevel:
+ rc-config add zram default
+If you use systemd enable zram_swap, tmp, and/or var_tmp with systemctl.
+You might need to modify /etc/modprobe.d/zram.conf"
+
+src_prepare() {
+ use prefix || sed -i \
+ -e '1s"^#!/usr/bin/env sh$"#!'"${EPREFIX}/bin/sh"'"' \
+ -- sbin/* || die
+ epatch_user
+}
+
+src_install() {
+ dosbin sbin/*
+ doinitd openrc/init.d/*
+ doconfd openrc/conf.d/*
+ systemd_dounit systemd/system/*
+ insinto /etc/modprobe.d
+ doins modprobe.d/*
+ insinto /usr/share/zsh/site-functions
+ doins zsh/*
+ readme.gentoo_create_doc
+}
diff --git a/sys-block/zram-init/zram-init-3.0.ebuild b/sys-block/zram-init/zram-init-3.0.ebuild
new file mode 100644
index 000000000000..a800e640ec89
--- /dev/null
+++ b/sys-block/zram-init/zram-init-3.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info readme.gentoo systemd
+
+DESCRIPTION="Scripts to support compressed swap devices or ramdisks with zram"
+HOMEPAGE="https://github.com/vaeth/zram-init/"
+SRC_URI="https://github.com/vaeth/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DISABLE_AUTOFORMATTING="true"
+DOC_CONTENTS="To use zram, activate it in your kernel and add it to default runlevel:
+ rc-config add zram default
+If you use systemd enable zram_swap, tmp, and/or var_tmp with systemctl.
+You might need to modify /etc/modprobe.d/zram.conf"
+
+src_prepare() {
+ use prefix || sed -i \
+ -e '1s"^#!/usr/bin/env sh$"#!'"${EPREFIX}/bin/sh"'"' \
+ -- sbin/* || die
+ epatch_user
+}
+
+src_install() {
+ dosbin sbin/*
+ doinitd openrc/init.d/*
+ doconfd openrc/conf.d/*
+ systemd_dounit systemd/system/*
+ insinto /etc/modprobe.d
+ doins modprobe.d/*
+ insinto /usr/share/zsh/site-functions
+ doins zsh/*
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ if kernel_is -lt 3 15 ; then
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "sys-block/zram-init default config starting from version 3.0"
+ ewarn "requires a kernel >= 3.15.0."
+ ewarn "Make sure you have edited it, so it uses only functions"
+ ewarn "available for your kernel version (bug 525302)."
+ fi
+}