summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/accountsservice/Manifest10
-rw-r--r--sys-apps/accountsservice/accountsservice-0.6.43-r1.ebuild60
-rw-r--r--sys-apps/accountsservice/accountsservice-0.6.43.ebuild53
-rw-r--r--sys-apps/accountsservice/accountsservice-0.6.45.ebuild59
-rw-r--r--sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch51
-rw-r--r--sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch110
-rw-r--r--sys-apps/accountsservice/metadata.xml14
-rw-r--r--sys-apps/ack/Manifest6
-rw-r--r--sys-apps/ack/ack-2.18-r1.ebuild27
-rw-r--r--sys-apps/ack/files/ack-2.14-gentoo.patch22
-rw-r--r--sys-apps/ack/metadata.xml34
-rw-r--r--sys-apps/acl/Manifest5
-rw-r--r--sys-apps/acl/acl-2.2.52-r1.ebuild59
-rw-r--r--sys-apps/acl/metadata.xml10
-rw-r--r--sys-apps/adjtime/Manifest5
-rw-r--r--sys-apps/adjtime/adjtime-0.4-r2.ebuild42
-rw-r--r--sys-apps/adjtime/metadata.xml12
-rw-r--r--sys-apps/agedu/Manifest12
-rw-r--r--sys-apps/agedu/agedu-20151213.ebuild34
-rw-r--r--sys-apps/agedu/agedu-20160906.ebuild35
-rw-r--r--sys-apps/agedu/agedu-20160920.ebuild35
-rw-r--r--sys-apps/agedu/agedu-20170831.ebuild35
-rw-r--r--sys-apps/agedu/files/agedu-r9671-fix-automagic.patch44
-rw-r--r--sys-apps/agedu/metadata.xml8
-rw-r--r--sys-apps/aix-miscutils/Manifest5
-rw-r--r--sys-apps/aix-miscutils/aix-miscutils-0.1.1671.ebuild13
-rw-r--r--sys-apps/aix-miscutils/metadata.xml11
-rw-r--r--sys-apps/apmd/Manifest8
-rw-r--r--sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild78
-rw-r--r--sys-apps/apmd/files/apmd.confd3
-rw-r--r--sys-apps/apmd/files/apmd.rc628
-rw-r--r--sys-apps/apmd/metadata.xml5
-rw-r--r--sys-apps/apparmor-utils/Manifest6
-rw-r--r--sys-apps/apparmor-utils/apparmor-utils-2.11.0-r1.ebuild82
-rw-r--r--sys-apps/apparmor-utils/files/apparmor-utils-2.11-shebang.patch16
-rw-r--r--sys-apps/apparmor-utils/metadata.xml14
-rw-r--r--sys-apps/apparmor/Manifest8
-rw-r--r--sys-apps/apparmor/apparmor-2.11.0.ebuild59
-rw-r--r--sys-apps/apparmor/files/apparmor-2.10-dynamic-link.patch12
-rw-r--r--sys-apps/apparmor/files/apparmor-2.10-makefile.patch25
-rw-r--r--sys-apps/apparmor/files/apparmor-init91
-rw-r--r--sys-apps/apparmor/metadata.xml14
-rw-r--r--sys-apps/apply-default-acl/Manifest5
-rw-r--r--sys-apps/apply-default-acl/apply-default-acl-0.0.6.ebuild21
-rw-r--r--sys-apps/apply-default-acl/metadata.xml15
-rw-r--r--sys-apps/arrayprobe/Manifest7
-rw-r--r--sys-apps/arrayprobe/arrayprobe-2.0-r2.ebuild21
-rw-r--r--sys-apps/arrayprobe/files/2.0-ida_headers.patch647
-rw-r--r--sys-apps/arrayprobe/files/2.0-malloc-strlen.patch20
-rw-r--r--sys-apps/arrayprobe/metadata.xml11
-rw-r--r--sys-apps/attr/Manifest5
-rw-r--r--sys-apps/attr/attr-2.4.47-r2.ebuild70
-rw-r--r--sys-apps/attr/metadata.xml8
-rw-r--r--sys-apps/audio-entropyd/Manifest10
-rw-r--r--sys-apps/audio-entropyd/audio-entropyd-2.0.3-r1.ebuild37
-rw-r--r--sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-ldflags.patch13
-rw-r--r--sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-uclibc.patch27
-rw-r--r--sys-apps/audio-entropyd/files/audio-entropyd.conf-212
-rw-r--r--sys-apps/audio-entropyd/files/audio-entropyd.init-226
-rw-r--r--sys-apps/audio-entropyd/files/audio-entropyd.service8
-rw-r--r--sys-apps/audio-entropyd/metadata.xml5
-rw-r--r--sys-apps/baobab/Manifest7
-rw-r--r--sys-apps/baobab/baobab-3.22.1.ebuild36
-rw-r--r--sys-apps/baobab/baobab-3.24.0.ebuild36
-rw-r--r--sys-apps/baobab/metadata.xml8
-rw-r--r--sys-apps/bar/Manifest5
-rw-r--r--sys-apps/bar/bar-1.11.1.ebuild48
-rw-r--r--sys-apps/bar/metadata.xml11
-rw-r--r--sys-apps/baselayout-java/Manifest5
-rw-r--r--sys-apps/baselayout-java/baselayout-java-0.1.0.ebuild27
-rw-r--r--sys-apps/baselayout-java/metadata.xml8
-rw-r--r--sys-apps/baselayout-prefix/Manifest6
-rw-r--r--sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild104
-rw-r--r--sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch67
-rw-r--r--sys-apps/baselayout-prefix/metadata.xml7
-rw-r--r--sys-apps/baselayout/Manifest9
-rw-r--r--sys-apps/baselayout/baselayout-2.3.ebuild241
-rw-r--r--sys-apps/baselayout/baselayout-2.4.1-r2.ebuild247
-rw-r--r--sys-apps/baselayout/baselayout-9999.ebuild253
-rw-r--r--sys-apps/baselayout/metadata.xml12
-rw-r--r--sys-apps/biosdevname/Manifest5
-rw-r--r--sys-apps/biosdevname/biosdevname-0.7.2.ebuild24
-rw-r--r--sys-apps/biosdevname/metadata.xml14
-rw-r--r--sys-apps/biosdisk/Manifest5
-rw-r--r--sys-apps/biosdisk/biosdisk-0_p20100611-r1.ebuild45
-rw-r--r--sys-apps/biosdisk/metadata.xml13
-rw-r--r--sys-apps/bleachbit/Manifest7
-rw-r--r--sys-apps/bleachbit/bleachbit-1.12.ebuild62
-rw-r--r--sys-apps/bleachbit/bleachbit-1.17.ebuild63
-rw-r--r--sys-apps/bleachbit/metadata.xml18
-rw-r--r--sys-apps/busybox/Manifest27
-rw-r--r--sys-apps/busybox/busybox-1.25.1.ebuild302
-rw-r--r--sys-apps/busybox/busybox-1.26.2-r1.ebuild310
-rw-r--r--sys-apps/busybox/busybox-1.27.2.ebuild310
-rw-r--r--sys-apps/busybox/busybox-9999.ebuild308
-rw-r--r--sys-apps/busybox/files/busybox-1.19.0-bb.patch22
-rw-r--r--sys-apps/busybox/files/busybox-1.25.1-setfiles.patch34
-rw-r--r--sys-apps/busybox/files/busybox-1.26.2-bb.patch55
-rw-r--r--sys-apps/busybox/files/ginit.c124
-rw-r--r--sys-apps/busybox/files/klogd.confd9
-rw-r--r--sys-apps/busybox/files/klogd.initd11
-rw-r--r--sys-apps/busybox/files/mdev.initd52
-rw-r--r--sys-apps/busybox/files/mdev/dvbdev18
-rw-r--r--sys-apps/busybox/files/mdev/ide_links23
-rw-r--r--sys-apps/busybox/files/mdev/usbdev62
-rw-r--r--sys-apps/busybox/files/mdev/usbdisk_link34
-rw-r--r--sys-apps/busybox/files/ntpd.confd6
-rw-r--r--sys-apps/busybox/files/ntpd.initd12
-rw-r--r--sys-apps/busybox/files/syslogd.confd9
-rw-r--r--sys-apps/busybox/files/syslogd.initd12
-rw-r--r--sys-apps/busybox/files/watchdog.confd9
-rw-r--r--sys-apps/busybox/files/watchdog.initd7
-rw-r--r--sys-apps/busybox/metadata.xml19
-rw-r--r--sys-apps/byld/Manifest5
-rw-r--r--sys-apps/byld/byld-1.0.3.ebuild26
-rw-r--r--sys-apps/byld/metadata.xml11
-rw-r--r--sys-apps/cciss_vol_status/Manifest16
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.03.ebuild17
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.09-r1.ebuild21
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.09.ebuild19
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.10.ebuild21
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.11.ebuild21
-rw-r--r--sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild21
-rw-r--r--sys-apps/cciss_vol_status/files/cciss_vol_status.cron21
-rw-r--r--sys-apps/cciss_vol_status/files/cciss_vol_status.cron252
-rw-r--r--sys-apps/cciss_vol_status/metadata.xml14
-rw-r--r--sys-apps/ccs-tools/Manifest6
-rw-r--r--sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild61
-rw-r--r--sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-warnings.patch22
-rw-r--r--sys-apps/ccs-tools/metadata.xml8
-rw-r--r--sys-apps/checkpolicy/Manifest8
-rw-r--r--sys-apps/checkpolicy/checkpolicy-2.6.ebuild53
-rw-r--r--sys-apps/checkpolicy/checkpolicy-2.7.ebuild58
-rw-r--r--sys-apps/checkpolicy/checkpolicy-9999.ebuild58
-rw-r--r--sys-apps/checkpolicy/metadata.xml9
-rw-r--r--sys-apps/checkservice/Manifest5
-rw-r--r--sys-apps/checkservice/checkservice-1.2.0.ebuild49
-rw-r--r--sys-apps/checkservice/metadata.xml5
-rw-r--r--sys-apps/chname/Manifest8
-rw-r--r--sys-apps/chname/chname-1.0-r2.ebuild31
-rw-r--r--sys-apps/chname/chname-1.1.ebuild32
-rw-r--r--sys-apps/chname/files/chname-1.1-flags.patch28
-rw-r--r--sys-apps/chname/metadata.xml9
-rw-r--r--sys-apps/cinit/Manifest5
-rw-r--r--sys-apps/cinit/cinit-0.2.1.ebuild37
-rw-r--r--sys-apps/cinit/metadata.xml5
-rw-r--r--sys-apps/ckbcomp/Manifest3
-rw-r--r--sys-apps/ckbcomp/ckbcomp-1.164.ebuild33
-rw-r--r--sys-apps/ckbcomp/metadata.xml12
-rw-r--r--sys-apps/clrngd/Manifest7
-rw-r--r--sys-apps/clrngd/clrngd-1.0.3.ebuild26
-rw-r--r--sys-apps/clrngd/files/clrngd-conf.d8
-rw-r--r--sys-apps/clrngd/files/clrngd-init.d18
-rw-r--r--sys-apps/clrngd/metadata.xml7
-rw-r--r--sys-apps/cobalt-panel-utils/Manifest5
-rw-r--r--sys-apps/cobalt-panel-utils/cobalt-panel-utils-1.0.2.ebuild44
-rw-r--r--sys-apps/cobalt-panel-utils/metadata.xml8
-rw-r--r--sys-apps/collectl/Manifest14
-rw-r--r--sys-apps/collectl/collectl-3.7.4.ebuild36
-rw-r--r--sys-apps/collectl/collectl-4.0.5.ebuild36
-rw-r--r--sys-apps/collectl/collectl-4.1.0.ebuild36
-rw-r--r--sys-apps/collectl/collectl-4.1.3.ebuild36
-rw-r--r--sys-apps/collectl/collectl-4.2.0.ebuild45
-rw-r--r--sys-apps/collectl/files/collectl.initd-215
-rw-r--r--sys-apps/collectl/metadata.xml11
-rw-r--r--sys-apps/conspy/Manifest5
-rw-r--r--sys-apps/conspy/conspy-1.10.ebuild34
-rw-r--r--sys-apps/conspy/metadata.xml8
-rw-r--r--sys-apps/coreutils/Manifest19
-rw-r--r--sys-apps/coreutils/coreutils-8.25.ebuild183
-rw-r--r--sys-apps/coreutils/coreutils-8.26.ebuild183
-rw-r--r--sys-apps/coreutils/coreutils-8.27.ebuild183
-rw-r--r--sys-apps/coreutils/coreutils-8.28.ebuild183
-rw-r--r--sys-apps/coreutils/metadata.xml18
-rw-r--r--sys-apps/cpint/Manifest10
-rw-r--r--sys-apps/cpint/cpint-1.1.6.ebuild27
-rw-r--r--sys-apps/cpint/cpint-2.5.3.ebuild31
-rw-r--r--sys-apps/cpint/files/cpint-2.5.3-build.patch73
-rw-r--r--sys-apps/cpint/files/cpint-2.5.3-kernel.patch43
-rw-r--r--sys-apps/cpint/files/cpint-2.5.3-prototypes.patch43
-rw-r--r--sys-apps/cpint/metadata.xml9
-rw-r--r--sys-apps/cpuid/Manifest7
-rw-r--r--sys-apps/cpuid/cpuid-20170122.ebuild33
-rw-r--r--sys-apps/cpuid/files/cpuid-20170122-Makefile.patch28
-rw-r--r--sys-apps/cpuid/files/cpuid-20170122-missing-include-sysmacros.patch12
-rw-r--r--sys-apps/cpuid/metadata.xml12
-rw-r--r--sys-apps/cracklib-words/Manifest7
-rw-r--r--sys-apps/cracklib-words/cracklib-words-2.9.6.ebuild28
-rw-r--r--sys-apps/cracklib-words/cracklib-words-20080507.ebuild28
-rw-r--r--sys-apps/cracklib-words/metadata.xml12
-rw-r--r--sys-apps/crazydiskinfo/Manifest3
-rw-r--r--sys-apps/crazydiskinfo/crazydiskinfo-1.0.2.ebuild20
-rw-r--r--sys-apps/crazydiskinfo/metadata.xml11
-rw-r--r--sys-apps/daemonize/Manifest9
-rw-r--r--sys-apps/daemonize/daemonize-1.7.4.ebuild27
-rw-r--r--sys-apps/daemonize/daemonize-1.7.5.ebuild27
-rw-r--r--sys-apps/daemonize/daemonize-1.7.6.ebuild27
-rw-r--r--sys-apps/daemonize/metadata.xml11
-rw-r--r--sys-apps/daisydog/Manifest6
-rw-r--r--sys-apps/daisydog/daisydog-2014.05.30.ebuild34
-rw-r--r--sys-apps/daisydog/files/daisydog.conf.d4
-rwxr-xr-xsys-apps/daisydog/files/daisydog.init.d12
-rw-r--r--sys-apps/daisydog/metadata.xml7
-rw-r--r--sys-apps/darwin-miscutils/Manifest27
-rw-r--r--sys-apps/darwin-miscutils/darwin-miscutils-10.ebuild157
-rw-r--r--sys-apps/darwin-miscutils/darwin-miscutils-11.ebuild158
-rw-r--r--sys-apps/darwin-miscutils/darwin-miscutils-6-r1.ebuild139
-rw-r--r--sys-apps/darwin-miscutils/darwin-miscutils-8.ebuild134
-rw-r--r--sys-apps/darwin-miscutils/darwin-miscutils-9.ebuild131
-rw-r--r--sys-apps/darwin-miscutils/files/darwin-miscutils-5-error.patch14
-rw-r--r--sys-apps/darwin-miscutils/files/darwin-miscutils-5-stdlib.patch20
-rw-r--r--sys-apps/darwin-miscutils/files/darwin-miscutils-5-w.patch10
-rw-r--r--sys-apps/darwin-miscutils/files/darwin-miscutils-6-w64.patch17
-rw-r--r--sys-apps/darwin-miscutils/metadata.xml8
-rw-r--r--sys-apps/dbus-broker/Manifest8
-rw-r--r--sys-apps/dbus-broker/dbus-broker-4.ebuild65
-rw-r--r--sys-apps/dbus-broker/dbus-broker-9999.ebuild65
-rw-r--r--sys-apps/dbus-broker/metadata.xml11
-rw-r--r--sys-apps/dbus/Manifest12
-rw-r--r--sys-apps/dbus/dbus-1.10.18.ebuild274
-rw-r--r--sys-apps/dbus/dbus-1.10.22.ebuild270
-rw-r--r--sys-apps/dbus/dbus-1.10.24.ebuild272
-rw-r--r--sys-apps/dbus/files/80-dbus13
-rw-r--r--sys-apps/dbus/files/dbus-enable-elogind.patch73
-rw-r--r--sys-apps/dbus/files/dbus.initd-r136
-rw-r--r--sys-apps/dbus/metadata.xml15
-rw-r--r--sys-apps/dcfldd/Manifest5
-rw-r--r--sys-apps/dcfldd/dcfldd-1.3.4.1.ebuild25
-rw-r--r--sys-apps/dcfldd/metadata.xml8
-rw-r--r--sys-apps/dchroot/Manifest5
-rw-r--r--sys-apps/dchroot/dchroot-0.12.1.ebuild35
-rw-r--r--sys-apps/dchroot/metadata.xml5
-rw-r--r--sys-apps/debianutils/Manifest10
-rw-r--r--sys-apps/debianutils/debianutils-4.7.ebuild41
-rw-r--r--sys-apps/debianutils/debianutils-4.8.1.1.ebuild39
-rw-r--r--sys-apps/debianutils/debianutils-4.8.2.ebuild39
-rw-r--r--sys-apps/debianutils/files/debianutils-3.4.2-no-bs-namespace.patch30
-rw-r--r--sys-apps/debianutils/metadata.xml8
-rw-r--r--sys-apps/diffutils/Manifest10
-rw-r--r--sys-apps/diffutils/diffutils-3.3.ebuild48
-rw-r--r--sys-apps/diffutils/diffutils-3.5.ebuild49
-rw-r--r--sys-apps/diffutils/diffutils-3.6.ebuild41
-rw-r--r--sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch19
-rw-r--r--sys-apps/diffutils/metadata.xml8
-rw-r--r--sys-apps/dmapi/Manifest6
-rw-r--r--sys-apps/dmapi/dmapi-2.2.12-r1.ebuild48
-rw-r--r--sys-apps/dmapi/files/dmapi-2.2.12-headers.patch16
-rw-r--r--sys-apps/dmapi/metadata.xml8
-rw-r--r--sys-apps/dmidecode/Manifest10
-rw-r--r--sys-apps/dmidecode/dmidecode-2.12-r1.ebuild43
-rw-r--r--sys-apps/dmidecode/dmidecode-3.0.ebuild42
-rw-r--r--sys-apps/dmidecode/dmidecode-3.1.ebuild42
-rw-r--r--sys-apps/dmidecode/files/2.12-supported-smbios-version.patch55
-rw-r--r--sys-apps/dmidecode/metadata.xml8
-rw-r--r--sys-apps/dnotify/Manifest7
-rw-r--r--sys-apps/dnotify/dnotify-0.18.0.ebuild32
-rw-r--r--sys-apps/dnotify/files/dnotify-0.18.0-glibc-212.patch12
-rw-r--r--sys-apps/dnotify/files/dnotify-0.18.0-nls.patch10
-rw-r--r--sys-apps/dnotify/metadata.xml8
-rw-r--r--sys-apps/dog/Manifest9
-rw-r--r--sys-apps/dog/dog-1.7-r6.ebuild43
-rw-r--r--sys-apps/dog/files/1.7-manpage-touchup.patch18
-rw-r--r--sys-apps/dog/files/dog-1.7-64bit-goodness.patch33
-rw-r--r--sys-apps/dog/files/dog-1.7-check-ctime.diff53
-rw-r--r--sys-apps/dog/files/dog-1.7-strfry.patch13
-rw-r--r--sys-apps/dog/metadata.xml8
-rw-r--r--sys-apps/dstat/Manifest5
-rw-r--r--sys-apps/dstat/dstat-0.7.3.ebuild35
-rw-r--r--sys-apps/dstat/metadata.xml23
-rw-r--r--sys-apps/dtc/Manifest15
-rw-r--r--sys-apps/dtc/dtc-1.4.1-r1.ebuild46
-rw-r--r--sys-apps/dtc/dtc-1.4.1.ebuild48
-rw-r--r--sys-apps/dtc/dtc-1.4.2.ebuild50
-rw-r--r--sys-apps/dtc/dtc-1.4.3.ebuild52
-rw-r--r--sys-apps/dtc/dtc-1.4.4.ebuild52
-rw-r--r--sys-apps/dtc/dtc-9999.ebuild50
-rw-r--r--sys-apps/dtc/files/dtc-1.4.1-echo-n.patch95
-rw-r--r--sys-apps/dtc/files/dtc-1.4.1-missing-syms.patch30
-rw-r--r--sys-apps/dtc/metadata.xml11
-rw-r--r--sys-apps/duc/Manifest5
-rw-r--r--sys-apps/duc/duc-1.4.1-r1.ebuild86
-rw-r--r--sys-apps/duc/duc-9999.ebuild86
-rw-r--r--sys-apps/duc/metadata.xml20
-rw-r--r--sys-apps/ed/Manifest9
-rw-r--r--sys-apps/ed/ed-1.13.ebuild30
-rw-r--r--sys-apps/ed/ed-1.14.1a.ebuild30
-rw-r--r--sys-apps/ed/ed-1.14.2.ebuild30
-rw-r--r--sys-apps/ed/metadata.xml8
-rw-r--r--sys-apps/edac-utils/Manifest5
-rw-r--r--sys-apps/edac-utils/edac-utils-0.18.ebuild42
-rw-r--r--sys-apps/edac-utils/metadata.xml11
-rw-r--r--sys-apps/elfix/Manifest6
-rw-r--r--sys-apps/elfix/elfix-0.9.2.ebuild49
-rw-r--r--sys-apps/elfix/elfix-9999.ebuild49
-rw-r--r--sys-apps/elfix/metadata.xml16
-rw-r--r--sys-apps/elivepatch-client/Manifest3
-rw-r--r--sys-apps/elivepatch-client/elivepatch-client-0.1.ebuild23
-rw-r--r--sys-apps/elivepatch-client/metadata.xml10
-rw-r--r--sys-apps/elivepatch-server/Manifest3
-rw-r--r--sys-apps/elivepatch-server/elivepatch-server-0.1.ebuild29
-rw-r--r--sys-apps/elivepatch-server/metadata.xml10
-rw-r--r--sys-apps/entropy-server/Manifest5
-rw-r--r--sys-apps/entropy-server/entropy-server-302.ebuild35
-rw-r--r--sys-apps/entropy-server/metadata.xml17
-rw-r--r--sys-apps/entropy/Manifest5
-rw-r--r--sys-apps/entropy/entropy-302.ebuild111
-rw-r--r--sys-apps/entropy/metadata.xml14
-rw-r--r--sys-apps/epoch/Manifest13
-rw-r--r--sys-apps/epoch/epoch-1.2.1.ebuild73
-rw-r--r--sys-apps/epoch/epoch-1.2.2.ebuild73
-rw-r--r--sys-apps/epoch/epoch-1.3.0.ebuild74
-rw-r--r--sys-apps/epoch/epoch-9999.ebuild73
-rw-r--r--sys-apps/epoch/files/epoch-1.0-epoch.conf77
-rw-r--r--sys-apps/epoch/files/epoch-1.0-fix-CFLAGS.patch10
-rw-r--r--sys-apps/epoch/files/epoch-1.3.0-fix-main.patch13
-rw-r--r--sys-apps/epoch/metadata.xml24
-rw-r--r--sys-apps/etckeeper/Manifest13
-rw-r--r--sys-apps/etckeeper/etckeeper-1.18.1.ebuild74
-rw-r--r--sys-apps/etckeeper/etckeeper-1.18.6.ebuild71
-rw-r--r--sys-apps/etckeeper/files/99etckeeper1
-rw-r--r--sys-apps/etckeeper/files/bashrc4
-rw-r--r--sys-apps/etckeeper/files/bashrc-r14
-rw-r--r--sys-apps/etckeeper/files/etckeeper-1.18-gentoo.patch86
-rw-r--r--sys-apps/etckeeper/files/etckeeper-1.18.3-gentoo.patch78
-rw-r--r--sys-apps/etckeeper/files/etckeeper-1.18.6-gentoo.patch78
-rw-r--r--sys-apps/etckeeper/metadata.xml22
-rw-r--r--sys-apps/ethtool/Manifest21
-rw-r--r--sys-apps/ethtool/ethtool-3.10.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-3.16.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-3.18.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-3.4.2.ebuild13
-rw-r--r--sys-apps/ethtool/ethtool-4.0.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-4.10.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-4.11.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-4.5.ebuild14
-rw-r--r--sys-apps/ethtool/ethtool-4.8.ebuild14
-rw-r--r--sys-apps/ethtool/metadata.xml19
-rw-r--r--sys-apps/fakechroot/Manifest5
-rw-r--r--sys-apps/fakechroot/fakechroot-2.17.2.ebuild26
-rw-r--r--sys-apps/fakechroot/metadata.xml12
-rw-r--r--sys-apps/fakeroot-ng/Manifest10
-rw-r--r--sys-apps/fakeroot-ng/fakeroot-ng-0.17.ebuild21
-rw-r--r--sys-apps/fakeroot-ng/fakeroot-ng-0.18-r1.ebuild21
-rw-r--r--sys-apps/fakeroot-ng/fakeroot-ng-0.18.ebuild17
-rw-r--r--sys-apps/fakeroot-ng/files/fakeroot-ng-gcc-4.8.2.patch10
-rw-r--r--sys-apps/fakeroot-ng/metadata.xml15
-rw-r--r--sys-apps/fakeroot/Manifest17
-rw-r--r--sys-apps/fakeroot/fakeroot-1.18.4.ebuild37
-rw-r--r--sys-apps/fakeroot/fakeroot-1.19.ebuild36
-rw-r--r--sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild45
-rw-r--r--sys-apps/fakeroot/fakeroot-1.20.2.ebuild37
-rw-r--r--sys-apps/fakeroot/fakeroot-1.20.ebuild37
-rw-r--r--sys-apps/fakeroot/fakeroot-1.22.ebuild45
-rw-r--r--sys-apps/fakeroot/files/fakeroot-1.18.4-no-acl_h.patch35
-rw-r--r--sys-apps/fakeroot/files/fakeroot-1.19-no-acl_h.patch37
-rw-r--r--sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch32
-rw-r--r--sys-apps/fakeroot/metadata.xml8
-rw-r--r--sys-apps/fbset/Manifest6
-rw-r--r--sys-apps/fbset/fbset-2.1.ebuild35
-rw-r--r--sys-apps/fbset/files/fbset-2.1-build.patch21
-rw-r--r--sys-apps/fbset/metadata.xml8
-rw-r--r--sys-apps/file/Manifest6
-rw-r--r--sys-apps/file/file-5.32.ebuild119
-rw-r--r--sys-apps/file/file-9999.ebuild119
-rw-r--r--sys-apps/file/metadata.xml11
-rw-r--r--sys-apps/findutils/Manifest13
-rw-r--r--sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch26
-rw-r--r--sys-apps/findutils/files/findutils-4.4.2-selinux.diff464
-rw-r--r--sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch52
-rw-r--r--sys-apps/findutils/files/findutils-4.6.0-gnulib-mb.patch34
-rw-r--r--sys-apps/findutils/findutils-4.4.2-r2.ebuild55
-rw-r--r--sys-apps/findutils/findutils-4.5.18.ebuild54
-rw-r--r--sys-apps/findutils/findutils-4.6.0-r1.ebuild62
-rw-r--r--sys-apps/findutils/metadata.xml11
-rw-r--r--sys-apps/firejail-lts/Manifest4
-rw-r--r--sys-apps/firejail-lts/firejail-lts-0.9.38.10.ebuild36
-rw-r--r--sys-apps/firejail-lts/metadata.xml25
-rw-r--r--sys-apps/firejail/Manifest15
-rw-r--r--sys-apps/firejail/files/0.9.46-contrib-fix.patch57
-rw-r--r--sys-apps/firejail/files/0.9.48-contrib-fix.patch36
-rw-r--r--sys-apps/firejail/files/0.9.50-contrib-fix.patch36
-rw-r--r--sys-apps/firejail/firejail-0.9.44.10.ebuild46
-rw-r--r--sys-apps/firejail/firejail-0.9.44.8.ebuild46
-rw-r--r--sys-apps/firejail/firejail-0.9.46.ebuild49
-rw-r--r--sys-apps/firejail/firejail-0.9.48.ebuild49
-rw-r--r--sys-apps/firejail/firejail-0.9.50.ebuild49
-rw-r--r--sys-apps/firejail/metadata.xml39
-rw-r--r--sys-apps/fix-gnustack/Manifest4
-rw-r--r--sys-apps/fix-gnustack/fix-gnustack-0.1.ebuild17
-rw-r--r--sys-apps/fix-gnustack/metadata.xml11
-rw-r--r--sys-apps/flashrom/Manifest12
-rw-r--r--sys-apps/flashrom/flashrom-0.9.6.1.ebuild98
-rw-r--r--sys-apps/flashrom/flashrom-0.9.7.ebuild113
-rw-r--r--sys-apps/flashrom/flashrom-0.9.8.ebuild127
-rw-r--r--sys-apps/flashrom/flashrom-0.9.9.ebuild130
-rw-r--r--sys-apps/flashrom/flashrom-9999.ebuild130
-rw-r--r--sys-apps/flashrom/metadata.xml66
-rw-r--r--sys-apps/flock/Manifest5
-rw-r--r--sys-apps/flock/flock-2.19.ebuild19
-rw-r--r--sys-apps/flock/metadata.xml8
-rw-r--r--sys-apps/frandom/Manifest4
-rw-r--r--sys-apps/frandom/frandom-1.1.ebuild31
-rw-r--r--sys-apps/frandom/metadata.xml12
-rw-r--r--sys-apps/fwcrv/Manifest6
-rw-r--r--sys-apps/fwcrv/files/fwcrv-0.1.0-endian.patch47
-rw-r--r--sys-apps/fwcrv/fwcrv-0.1.0.ebuild29
-rw-r--r--sys-apps/fwcrv/metadata.xml8
-rw-r--r--sys-apps/fwts/Manifest7
-rw-r--r--sys-apps/fwts/fwts-15.12.00.ebuild44
-rw-r--r--sys-apps/fwts/fwts-17.02.00.ebuild45
-rw-r--r--sys-apps/fwts/metadata.xml8
-rw-r--r--sys-apps/fwupd/Manifest6
-rw-r--r--sys-apps/fwupd/files/fwupd-0.9-polkit_its_files.patch65
-rw-r--r--sys-apps/fwupd/fwupd-0.9.5-r1.ebuild84
-rw-r--r--sys-apps/fwupd/fwupd-0.9.6.ebuild80
-rw-r--r--sys-apps/fwupd/metadata.xml21
-rw-r--r--sys-apps/fwupdate/Manifest6
-rw-r--r--sys-apps/fwupdate/files/fwupdate-9-objcopy_detection.patch45
-rw-r--r--sys-apps/fwupdate/fwupdate-8.ebuild40
-rw-r--r--sys-apps/fwupdate/fwupdate-9.ebuild51
-rw-r--r--sys-apps/fwupdate/metadata.xml11
-rw-r--r--sys-apps/fxload/Manifest5
-rw-r--r--sys-apps/fxload/fxload-20081013-r1.ebuild35
-rw-r--r--sys-apps/fxload/metadata.xml8
-rw-r--r--sys-apps/gawk/Manifest14
-rw-r--r--sys-apps/gawk/files/filefuncs/Makefile56
-rw-r--r--sys-apps/gawk/files/filefuncs/filefuncs.c484
-rw-r--r--sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch63
-rw-r--r--sys-apps/gawk/gawk-3.1.8.ebuild77
-rw-r--r--sys-apps/gawk/gawk-4.0.2.ebuild73
-rw-r--r--sys-apps/gawk/gawk-4.1.3.ebuild76
-rw-r--r--sys-apps/gawk/gawk-4.1.4.ebuild79
-rw-r--r--sys-apps/gawk/metadata.xml11
-rw-r--r--sys-apps/gcp/Manifest4
-rw-r--r--sys-apps/gcp/gcp-0.1.3.ebuild28
-rw-r--r--sys-apps/gcp/metadata.xml7
-rw-r--r--sys-apps/gentoo-functions/Manifest6
-rw-r--r--sys-apps/gentoo-functions/gentoo-functions-0.12.ebuild30
-rw-r--r--sys-apps/gentoo-functions/gentoo-functions-9999.ebuild30
-rw-r--r--sys-apps/gentoo-functions/metadata.xml21
-rw-r--r--sys-apps/gentoo-systemd-integration/Manifest6
-rw-r--r--sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-7.ebuild36
-rw-r--r--sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-9999.ebuild36
-rw-r--r--sys-apps/gentoo-systemd-integration/metadata.xml11
-rw-r--r--sys-apps/gnome-disk-utility/Manifest7
-rw-r--r--sys-apps/gnome-disk-utility/gnome-disk-utility-3.22.1.ebuild45
-rw-r--r--sys-apps/gnome-disk-utility/gnome-disk-utility-3.24.1.ebuild45
-rw-r--r--sys-apps/gnome-disk-utility/metadata.xml12
-rw-r--r--sys-apps/gpet/Manifest5
-rw-r--r--sys-apps/gpet/gpet-0.4.ebuild22
-rw-r--r--sys-apps/gpet/metadata.xml10
-rw-r--r--sys-apps/gptfdisk/Manifest7
-rw-r--r--sys-apps/gptfdisk/gptfdisk-1.0.1.ebuild47
-rw-r--r--sys-apps/gptfdisk/gptfdisk-1.0.3.ebuild53
-rw-r--r--sys-apps/gptfdisk/metadata.xml11
-rw-r--r--sys-apps/gradm/Manifest12
-rw-r--r--sys-apps/gradm/files/respect-gentoo-env-r3.patch42
-rw-r--r--sys-apps/gradm/gradm-3.1.201603152148.ebuild48
-rw-r--r--sys-apps/gradm/gradm-3.1.201607172312.ebuild48
-rw-r--r--sys-apps/gradm/gradm-3.1.201608131257.ebuild48
-rw-r--r--sys-apps/gradm/gradm-3.1.201708012022.ebuild48
-rw-r--r--sys-apps/gradm/metadata.xml12
-rw-r--r--sys-apps/grep/Manifest10
-rw-r--r--sys-apps/grep/files/grep-2.27-splice.patch60
-rw-r--r--sys-apps/grep/grep-2.27-r1.ebuild46
-rw-r--r--sys-apps/grep/grep-3.0.ebuild45
-rw-r--r--sys-apps/grep/grep-3.1.ebuild45
-rw-r--r--sys-apps/grep/metadata.xml11
-rw-r--r--sys-apps/grepcidr/Manifest4
-rw-r--r--sys-apps/grepcidr/grepcidr-2.0.ebuild28
-rw-r--r--sys-apps/grepcidr/metadata.xml8
-rw-r--r--sys-apps/groff/Manifest11
-rw-r--r--sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch24
-rw-r--r--sys-apps/groff/files/groff-1.22.2-parallel-mom.patch96
-rw-r--r--sys-apps/groff/files/groff-1.22.3-parallel-mom.patch11
-rw-r--r--sys-apps/groff/groff-1.22.2.ebuild95
-rw-r--r--sys-apps/groff/groff-1.22.3.ebuild86
-rw-r--r--sys-apps/groff/metadata.xml8
-rw-r--r--sys-apps/gscanbus/Manifest5
-rw-r--r--sys-apps/gscanbus/gscanbus-0.8.ebuild20
-rw-r--r--sys-apps/gscanbus/metadata.xml11
-rw-r--r--sys-apps/gsmartcontrol/Manifest13
-rw-r--r--sys-apps/gsmartcontrol/gsmartcontrol-0.8.7.ebuild47
-rw-r--r--sys-apps/gsmartcontrol/gsmartcontrol-0.9.0.ebuild47
-rw-r--r--sys-apps/gsmartcontrol/gsmartcontrol-1.0.2.ebuild47
-rw-r--r--sys-apps/gsmartcontrol/gsmartcontrol-1.1.0.ebuild47
-rw-r--r--sys-apps/gsmartcontrol/gsmartcontrol-1.1.1.ebuild47
-rw-r--r--sys-apps/gsmartcontrol/metadata.xml11
-rw-r--r--sys-apps/guix/Manifest14
-rw-r--r--sys-apps/guix/files/guix-0.12.0-AR.patch8
-rw-r--r--sys-apps/guix/files/guix-0.12.0-no-json-crate.patch38
-rw-r--r--sys-apps/guix/files/guix-0.13.0-default-daemon.patch74
-rw-r--r--sys-apps/guix/files/guix-daemon.initd15
-rw-r--r--sys-apps/guix/guix-0.12.0-r3.ebuild139
-rw-r--r--sys-apps/guix/guix-0.13.0.ebuild138
-rw-r--r--sys-apps/guix/metadata.xml8
-rw-r--r--sys-apps/habitat/Manifest4
-rw-r--r--sys-apps/habitat/habitat-0.28.0.ebuild35
-rw-r--r--sys-apps/habitat/metadata.xml11
-rw-r--r--sys-apps/hardened-shadow/Manifest5
-rw-r--r--sys-apps/hardened-shadow/hardened-shadow-0.9.2.ebuild35
-rw-r--r--sys-apps/hardened-shadow/metadata.xml8
-rw-r--r--sys-apps/haveged/Manifest9
-rw-r--r--sys-apps/haveged/files/haveged-conf.d9
-rw-r--r--sys-apps/haveged/files/haveged-init.d.316
-rw-r--r--sys-apps/haveged/files/haveged.conf6
-rw-r--r--sys-apps/haveged/files/service.gentoo12
-rw-r--r--sys-apps/haveged/haveged-1.9.1.ebuild44
-rw-r--r--sys-apps/haveged/metadata.xml12
-rw-r--r--sys-apps/hbaapi/Manifest8
-rw-r--r--sys-apps/hbaapi/files/hba.conf43
-rw-r--r--sys-apps/hbaapi/files/hbaapi-2.2-qa.patch37
-rw-r--r--sys-apps/hbaapi/hbaapi-2.2.ebuild46
-rw-r--r--sys-apps/hbaapi/metadata.xml11
-rw-r--r--sys-apps/hdparm/Manifest12
-rw-r--r--sys-apps/hdparm/files/hdparm-9.48-sysmacros.patch23
-rw-r--r--sys-apps/hdparm/files/hdparm-9.50-build.patch32
-rw-r--r--sys-apps/hdparm/files/hdparm-9.51-build.patch32
-rw-r--r--sys-apps/hdparm/files/hdparm-conf.d.326
-rw-r--r--sys-apps/hdparm/files/hdparm-init-860
-rw-r--r--sys-apps/hdparm/hdparm-9.51.ebuild44
-rw-r--r--sys-apps/hdparm/hdparm-9.52.ebuild44
-rw-r--r--sys-apps/hdparm/metadata.xml11
-rw-r--r--sys-apps/heirloom-tools/Manifest5
-rw-r--r--sys-apps/heirloom-tools/heirloom-tools-070715.ebuild41
-rw-r--r--sys-apps/heirloom-tools/metadata.xml11
-rw-r--r--sys-apps/help2man/Manifest10
-rw-r--r--sys-apps/help2man/files/help2man-1.46.1-linguas.patch67
-rw-r--r--sys-apps/help2man/help2man-1.46.6.ebuild32
-rw-r--r--sys-apps/help2man/help2man-1.47.4.ebuild40
-rw-r--r--sys-apps/help2man/help2man-1.47.5.ebuild39
-rw-r--r--sys-apps/help2man/metadata.xml8
-rw-r--r--sys-apps/hexdump-esr/Manifest5
-rw-r--r--sys-apps/hexdump-esr/hexdump-esr-1.8.ebuild36
-rw-r--r--sys-apps/hexdump-esr/metadata.xml5
-rw-r--r--sys-apps/highway/Manifest4
-rw-r--r--sys-apps/highway/highway-1.1.0.ebuild21
-rw-r--r--sys-apps/highway/metadata.xml19
-rw-r--r--sys-apps/hotplug2stdout/Manifest5
-rw-r--r--sys-apps/hotplug2stdout/hotplug2stdout-1.2.1.ebuild19
-rw-r--r--sys-apps/hotplug2stdout/metadata.xml4
-rw-r--r--sys-apps/hponcfg/Manifest5
-rw-r--r--sys-apps/hponcfg/hponcfg-4.6.0.0.ebuild43
-rw-r--r--sys-apps/hponcfg/metadata.xml8
-rw-r--r--sys-apps/hprofile/Manifest11
-rw-r--r--sys-apps/hprofile/hprofile-3.0.6.ebuild18
-rw-r--r--sys-apps/hprofile/hprofile-3.1.1.ebuild18
-rw-r--r--sys-apps/hprofile/hprofile-3.2.2.ebuild18
-rw-r--r--sys-apps/hprofile/hprofile-6.1.3.ebuild18
-rw-r--r--sys-apps/hprofile/metadata.xml11
-rw-r--r--sys-apps/hwdata-gentoo/Manifest6
-rw-r--r--sys-apps/hwdata-gentoo/files/0.4-openchrome.patch22
-rw-r--r--sys-apps/hwdata-gentoo/hwdata-gentoo-0.4.ebuild40
-rw-r--r--sys-apps/hwdata-gentoo/metadata.xml12
-rw-r--r--sys-apps/hwdata-redhat/Manifest6
-rw-r--r--sys-apps/hwdata-redhat/files/hwdata-redhat-0.217-python-3.patch13
-rw-r--r--sys-apps/hwdata-redhat/hwdata-redhat-0.217.ebuild38
-rw-r--r--sys-apps/hwdata-redhat/metadata.xml5
-rw-r--r--sys-apps/hwids/Manifest10
-rw-r--r--sys-apps/hwids/hwids-20170328.ebuild74
-rw-r--r--sys-apps/hwids/hwids-20170715.ebuild74
-rw-r--r--sys-apps/hwids/hwids-20171003.ebuild89
-rw-r--r--sys-apps/hwids/hwids-99999999.ebuild92
-rw-r--r--sys-apps/hwids/metadata.xml20
-rw-r--r--sys-apps/hwinfo/Manifest11
-rw-r--r--sys-apps/hwinfo/hwinfo-19.1.ebuild56
-rw-r--r--sys-apps/hwinfo/hwinfo-20.0.ebuild61
-rw-r--r--sys-apps/hwinfo/hwinfo-21.23.ebuild56
-rw-r--r--sys-apps/hwinfo/hwinfo-21.4.ebuild63
-rw-r--r--sys-apps/hwinfo/metadata.xml8
-rw-r--r--sys-apps/hwloc/Manifest8
-rw-r--r--sys-apps/hwloc/files/hwloc-1.8.1-gl.patch11
-rw-r--r--sys-apps/hwloc/hwloc-1.11.2-r1.ebuild70
-rw-r--r--sys-apps/hwloc/hwloc-1.11.7.ebuild70
-rw-r--r--sys-apps/hwloc/metadata.xml23
-rw-r--r--sys-apps/hwsetup/Manifest10
-rw-r--r--sys-apps/hwsetup/files/1.2-3-fastprobe.patch74
-rw-r--r--sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch62
-rw-r--r--sys-apps/hwsetup/files/1.2-7-gentoo.patch20
-rw-r--r--sys-apps/hwsetup/files/1.2-7-openchrome.patch11
-rw-r--r--sys-apps/hwsetup/files/1.2-strip.patch11
-rw-r--r--sys-apps/hwsetup/hwsetup-1.2-r3.ebuild69
-rw-r--r--sys-apps/hwsetup/metadata.xml8
-rw-r--r--sys-apps/i2c-tools/Manifest6
-rw-r--r--sys-apps/i2c-tools/files/i2c-tools-3.1.1-python-3.patch129
-rw-r--r--sys-apps/i2c-tools/i2c-tools-3.1.1-r1.ebuild62
-rw-r--r--sys-apps/i2c-tools/metadata.xml7
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/Manifest11
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-remove-doc.patch14
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch23
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.6-removeinitandvscsis.patch27
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis69
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.0.ebuild45
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.6.ebuild36
-rw-r--r--sys-apps/ibm-powerpc-utils-papr/metadata.xml8
-rw-r--r--sys-apps/ibm-powerpc-utils/Manifest14
-rw-r--r--sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.1.0-remove-doc.patch23
-rw-r--r--sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.1.0.ebuild37
-rw-r--r--sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.12.ebuild29
-rw-r--r--sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.2.ebuild31
-rw-r--r--sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.25.ebuild29
-rw-r--r--sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.26.ebuild29
-rw-r--r--sys-apps/ibm-powerpc-utils/metadata.xml14
-rw-r--r--sys-apps/idle3-tools/Manifest5
-rw-r--r--sys-apps/idle3-tools/idle3-tools-0.9.1.ebuild22
-rw-r--r--sys-apps/idle3-tools/metadata.xml15
-rw-r--r--sys-apps/ifd-gempc/Manifest6
-rw-r--r--sys-apps/ifd-gempc/files/reader.conf11
-rw-r--r--sys-apps/ifd-gempc/ifd-gempc-1.0.7.ebuild58
-rw-r--r--sys-apps/ifd-gempc/metadata.xml12
-rw-r--r--sys-apps/ifplugd/Manifest12
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-interface.patch13
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-musl.patch19
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff12
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-noip.patch21
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch63
-rw-r--r--sys-apps/ifplugd/files/ifplugd.action55
-rw-r--r--sys-apps/ifplugd/ifplugd-0.28-r10.ebuild48
-rw-r--r--sys-apps/ifplugd/ifplugd-0.28-r9.ebuild70
-rw-r--r--sys-apps/ifplugd/metadata.xml11
-rw-r--r--sys-apps/input-utils/Manifest7
-rw-r--r--sys-apps/input-utils/input-utils-1.2.ebuild36
-rw-r--r--sys-apps/input-utils/input-utils-1.3.ebuild27
-rw-r--r--sys-apps/input-utils/metadata.xml14
-rw-r--r--sys-apps/install-xattr/Manifest7
-rw-r--r--sys-apps/install-xattr/install-xattr-0.5-r1.ebuild45
-rw-r--r--sys-apps/install-xattr/install-xattr-0.5.ebuild43
-rw-r--r--sys-apps/install-xattr/install-xattr-9999.ebuild45
-rw-r--r--sys-apps/install-xattr/metadata.xml11
-rw-r--r--sys-apps/intel-performance-counter-monitor/Manifest7
-rw-r--r--sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.10.ebuild49
-rw-r--r--sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.8.ebuild49
-rw-r--r--sys-apps/intel-performance-counter-monitor/metadata.xml13
-rw-r--r--sys-apps/intel-sa-00075-tools/Manifest4
-rw-r--r--sys-apps/intel-sa-00075-tools/files/intel-sa-00075-tools-makefile.patch24
-rw-r--r--sys-apps/intel-sa-00075-tools/intel-sa-00075-tools-1.0.ebuild24
-rw-r--r--sys-apps/intel-sa-00075-tools/metadata.xml19
-rw-r--r--sys-apps/inxi/Manifest15
-rw-r--r--sys-apps/inxi/inxi-2.3.0_p20160807-r1.ebuild28
-rw-r--r--sys-apps/inxi/inxi-2.3.34_p20170805.ebuild29
-rw-r--r--sys-apps/inxi/inxi-2.3.36_p20170816.ebuild29
-rw-r--r--sys-apps/inxi/inxi-2.3.37.ebuild29
-rw-r--r--sys-apps/inxi/inxi-2.3.4_p20161104-r1.ebuild28
-rw-r--r--sys-apps/inxi/inxi-2.3.8_p20170114.ebuild27
-rw-r--r--sys-apps/inxi/metadata.xml12
-rw-r--r--sys-apps/iotools/Manifest9
-rw-r--r--sys-apps/iotools/files/iotools-1.4-cpuid-pic.patch22
-rw-r--r--sys-apps/iotools/files/iotools-1.4-ldflags.patch13
-rw-r--r--sys-apps/iotools/iotools-1.4.ebuild51
-rw-r--r--sys-apps/iotools/iotools-1.5.ebuild53
-rw-r--r--sys-apps/iotools/metadata.xml10
-rw-r--r--sys-apps/ipmitool/Manifest14
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.confd22
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.initd24
-rw-r--r--sys-apps/ipmitool/ipmitool-1.8.14-r1.ebuild82
-rw-r--r--sys-apps/ipmitool/ipmitool-1.8.17-r1.ebuild83
-rw-r--r--sys-apps/ipmitool/ipmitool-1.8.18-r1.ebuild84
-rw-r--r--sys-apps/ipmitool/metadata.xml16
-rw-r--r--sys-apps/ipmiutil/Manifest9
-rw-r--r--sys-apps/ipmiutil/files/ipmiutil-2.9.8-flags.patch20
-rw-r--r--sys-apps/ipmiutil/files/ipmiutil-2.9.9-lib_symlink.patch11
-rw-r--r--sys-apps/ipmiutil/ipmiutil-3.0.6.ebuild55
-rw-r--r--sys-apps/ipmiutil/ipmiutil-3.0.7.ebuild55
-rw-r--r--sys-apps/ipmiutil/metadata.xml11
-rw-r--r--sys-apps/iproute2/Manifest29
-rw-r--r--sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch48
-rw-r--r--sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch37
-rw-r--r--sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch38
-rw-r--r--sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch37
-rw-r--r--sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch42
-rw-r--r--sys-apps/iproute2/iproute2-4.10.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-4.11.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-4.12.0.ebuild150
-rw-r--r--sys-apps/iproute2/iproute2-4.13.0.ebuild150
-rw-r--r--sys-apps/iproute2/iproute2-4.4.0.ebuild128
-rw-r--r--sys-apps/iproute2/iproute2-4.5.0.ebuild128
-rw-r--r--sys-apps/iproute2/iproute2-4.6.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-4.7.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-4.8.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-4.9.0.ebuild138
-rw-r--r--sys-apps/iproute2/iproute2-9999.ebuild135
-rw-r--r--sys-apps/iproute2/metadata.xml13
-rw-r--r--sys-apps/irqbalance/Manifest14
-rw-r--r--sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch32
-rw-r--r--sys-apps/irqbalance/files/irqbalance.confd-119
-rw-r--r--sys-apps/irqbalance/files/irqbalance.init.327
-rw-r--r--sys-apps/irqbalance/files/irqbalance.init.420
-rw-r--r--sys-apps/irqbalance/files/irqbalance.service.18
-rw-r--r--sys-apps/irqbalance/irqbalance-1.0.9-r1.ebuild48
-rw-r--r--sys-apps/irqbalance/irqbalance-1.1.0.ebuild56
-rw-r--r--sys-apps/irqbalance/irqbalance-1.2.0.ebuild63
-rw-r--r--sys-apps/irqbalance/metadata.xml15
-rw-r--r--sys-apps/isapnptools/Manifest7
-rw-r--r--sys-apps/isapnptools/files/isapnp.rc25
-rw-r--r--sys-apps/isapnptools/files/isapnptools-1.27-include.patch10
-rw-r--r--sys-apps/isapnptools/isapnptools-1.27.ebuild32
-rw-r--r--sys-apps/isapnptools/metadata.xml8
-rw-r--r--sys-apps/iucode_tool/Manifest6
-rw-r--r--sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild15
-rw-r--r--sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild15
-rw-r--r--sys-apps/iucode_tool/metadata.xml8
-rw-r--r--sys-apps/kbd/Manifest12
-rw-r--r--sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch90
-rw-r--r--sys-apps/kbd/files/kbd-2.0.0-tests.patch34
-rw-r--r--sys-apps/kbd/kbd-1.15.5-r1.ebuild49
-rw-r--r--sys-apps/kbd/kbd-2.0.3.ebuild62
-rw-r--r--sys-apps/kbd/kbd-2.0.4.ebuild63
-rw-r--r--sys-apps/kbd/kbd-9999.ebuild61
-rw-r--r--sys-apps/kbd/metadata.xml11
-rw-r--r--sys-apps/kcheck/Manifest4
-rw-r--r--sys-apps/kcheck/kcheck-0.0.2.ebuild30
-rw-r--r--sys-apps/kcheck/kcheck-9999.ebuild30
-rw-r--r--sys-apps/kcheck/metadata.xml13
-rw-r--r--sys-apps/kexec-tools/Manifest22
-rw-r--r--sys-apps/kexec-tools/files/90_kexec9
-rw-r--r--sys-apps/kexec-tools/files/README.Gentoo33
-rw-r--r--sys-apps/kexec-tools/files/kexec-tools-2.0.0-respect-LDFLAGS.patch11
-rw-r--r--sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch17
-rw-r--r--sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch24
-rw-r--r--sys-apps/kexec-tools/files/kexec.conf16
-rw-r--r--sys-apps/kexec-tools/files/kexec.conf-2.0.434
-rw-r--r--sys-apps/kexec-tools/files/kexec.init-2.0.12174
-rw-r--r--sys-apps/kexec-tools/files/kexec.init-2.0.13-r1186
-rw-r--r--sys-apps/kexec-tools/files/kexec.init-2.0.4-r2164
-rw-r--r--sys-apps/kexec-tools/files/kexec.init-2.0.4-r3164
-rw-r--r--sys-apps/kexec-tools/files/kexec.service16
-rw-r--r--sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild76
-rw-r--r--sys-apps/kexec-tools/kexec-tools-2.0.15.ebuild81
-rw-r--r--sys-apps/kexec-tools/kexec-tools-2.0.4-r2.ebuild72
-rw-r--r--sys-apps/kexec-tools/kexec-tools-9999.ebuild81
-rw-r--r--sys-apps/kexec-tools/metadata.xml13
-rw-r--r--sys-apps/keyutils/Manifest15
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch51
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch25
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch27
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch51
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch43
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch38
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.9-header-extern-c.patch43
-rw-r--r--sys-apps/keyutils/keyutils-1.5.10.ebuild96
-rw-r--r--sys-apps/keyutils/keyutils-1.5.9-r1.ebuild81
-rw-r--r--sys-apps/keyutils/keyutils-1.5.9-r4.ebuild96
-rw-r--r--sys-apps/keyutils/metadata.xml11
-rw-r--r--sys-apps/kmod/Manifest9
-rw-r--r--sys-apps/kmod/files/kmod-static-nodes-r118
-rw-r--r--sys-apps/kmod/kmod-23.ebuild189
-rw-r--r--sys-apps/kmod/kmod-24.ebuild189
-rw-r--r--sys-apps/kmod/kmod-9999.ebuild189
-rw-r--r--sys-apps/kmod/metadata.xml16
-rw-r--r--sys-apps/lcdsplash/Manifest5
-rw-r--r--sys-apps/lcdsplash/lcdsplash-0.3.ebuild30
-rw-r--r--sys-apps/lcdsplash/metadata.xml8
-rw-r--r--sys-apps/lcdtest/Manifest6
-rw-r--r--sys-apps/lcdtest/files/1.18-build-system.patch62
-rw-r--r--sys-apps/lcdtest/lcdtest-1.18.ebuild60
-rw-r--r--sys-apps/lcdtest/metadata.xml11
-rw-r--r--sys-apps/lcdutils/Manifest6
-rw-r--r--sys-apps/lcdutils/files/include-stdlib.h-for-exit.patch50
-rw-r--r--sys-apps/lcdutils/lcdutils-0.2.ebuild33
-rw-r--r--sys-apps/lcdutils/metadata.xml12
-rw-r--r--sys-apps/less/Manifest13
-rw-r--r--sys-apps/less/files/README.Gentoo22
-rw-r--r--sys-apps/less/files/code2color-0.2.patch26
-rw-r--r--sys-apps/less/files/less.envd2
-rwxr-xr-xsys-apps/less/files/lesspipe.sh281
-rw-r--r--sys-apps/less/less-487.ebuild46
-rw-r--r--sys-apps/less/less-497.ebuild42
-rw-r--r--sys-apps/less/less-520.ebuild42
-rw-r--r--sys-apps/less/metadata.xml8
-rw-r--r--sys-apps/likwid/Manifest13
-rw-r--r--sys-apps/likwid/files/likwid-4.1.1-Makefile.patch19
-rw-r--r--sys-apps/likwid/files/likwid-4.1.1-config.mk.patch43
-rw-r--r--sys-apps/likwid/files/likwid-4.1.1-fix-gnustack.patch31
-rw-r--r--sys-apps/likwid/files/likwid-4.1.2-Makefile.patch19
-rw-r--r--sys-apps/likwid/files/likwid-4.1.2-config.mk.patch43
-rw-r--r--sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch31
-rw-r--r--sys-apps/likwid/likwid-4.1.1.ebuild97
-rw-r--r--sys-apps/likwid/likwid-4.1.2.ebuild104
-rw-r--r--sys-apps/likwid/metadata.xml16
-rw-r--r--sys-apps/linux-misc-apps/Manifest14
-rw-r--r--sys-apps/linux-misc-apps/files/freefall.confd6
-rw-r--r--sys-apps/linux-misc-apps/files/freefall.initd44
-rw-r--r--sys-apps/linux-misc-apps/files/hpfall.confd6
-rw-r--r--sys-apps/linux-misc-apps/files/hpfall.initd44
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild172
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild184
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild216
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild183
-rw-r--r--sys-apps/linux-misc-apps/metadata.xml10
-rw-r--r--sys-apps/lkcdutils/Manifest10
-rw-r--r--sys-apps/lkcdutils/files/lkcdutils-6.2.0-build.patch24
-rw-r--r--sys-apps/lkcdutils/lkcdutils-4.1.1.ebuild66
-rw-r--r--sys-apps/lkcdutils/lkcdutils-6.2.0.ebuild34
-rw-r--r--sys-apps/lkcdutils/metadata.xml10
-rw-r--r--sys-apps/lm_sensors/Manifest16
-rw-r--r--sys-apps/lm_sensors/files/fancontrol.confd16
-rw-r--r--sys-apps/lm_sensors/files/fancontrol.initd21
-rw-r--r--sys-apps/lm_sensors/files/fancontrol.service-r19
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3.4.0-sensors-detect-gentoo.patch342
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors.confd4
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors.initd21
-rw-r--r--sys-apps/lm_sensors/files/sensord.confd19
-rw-r--r--sys-apps/lm_sensors/files/sensord.initd19
-rw-r--r--sys-apps/lm_sensors/files/sensord.service-r19
-rw-r--r--sys-apps/lm_sensors/lm_sensors-3.4.0_p20160725.ebuild210
-rw-r--r--sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild215
-rw-r--r--sys-apps/lm_sensors/metadata.xml31
-rw-r--r--sys-apps/lmctfy/Manifest12
-rw-r--r--sys-apps/lmctfy/lmctfy-0.2.0.ebuild34
-rw-r--r--sys-apps/lmctfy/lmctfy-0.3.0.ebuild34
-rw-r--r--sys-apps/lmctfy/lmctfy-0.3.1.ebuild34
-rw-r--r--sys-apps/lmctfy/lmctfy-0.5.0-r1.ebuild37
-rw-r--r--sys-apps/lmctfy/lmctfy-0.5.0.ebuild34
-rw-r--r--sys-apps/lmctfy/metadata.xml11
-rw-r--r--sys-apps/lnxhc/Manifest7
-rw-r--r--sys-apps/lnxhc/files/lnxhc-1.2-ifconfig-path.patch23
-rw-r--r--sys-apps/lnxhc/files/lnxhc-1.2-usrlocal.patch43
-rw-r--r--sys-apps/lnxhc/lnxhc-1.2-r1.ebuild22
-rw-r--r--sys-apps/lnxhc/metadata.xml11
-rw-r--r--sys-apps/logwatch/Manifest7
-rw-r--r--sys-apps/logwatch/files/logwatch6
-rw-r--r--sys-apps/logwatch/files/logwatch-7.4.2-openssh-hpn.patch16
-rw-r--r--sys-apps/logwatch/logwatch-7.4.3.ebuild84
-rw-r--r--sys-apps/logwatch/metadata.xml11
-rw-r--r--sys-apps/lomoco/Manifest9
-rw-r--r--sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch287
-rw-r--r--sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch95
-rw-r--r--sys-apps/lomoco/files/lomoco-pm-utils-r17
-rw-r--r--sys-apps/lomoco/files/lomoco.conf9
-rw-r--r--sys-apps/lomoco/lomoco-1.0-r9.ebuild52
-rw-r--r--sys-apps/lomoco/metadata.xml13
-rw-r--r--sys-apps/lsadb/Manifest6
-rw-r--r--sys-apps/lsadb/files/lsadb-makefile.patch10
-rw-r--r--sys-apps/lsadb/lsadb-0.1.3.ebuild31
-rw-r--r--sys-apps/lsadb/metadata.xml8
-rw-r--r--sys-apps/lsb-release/Manifest9
-rw-r--r--sys-apps/lsb-release/files/lsb-release-1.4-os-release.patch10
-rw-r--r--sys-apps/lsb-release/lsb-release-1.4-r1.ebuild32
-rw-r--r--sys-apps/lsb-release/lsb-release-1.4-r2.ebuild35
-rw-r--r--sys-apps/lsb-release/lsb-release-1.4-r3.ebuild38
-rw-r--r--sys-apps/lsb-release/lsb-release-1.4.ebuild28
-rw-r--r--sys-apps/lsb-release/metadata.xml22
-rw-r--r--sys-apps/lshw/Manifest10
-rw-r--r--sys-apps/lshw/files/lshw-02.16b-gentoo.patch161
-rw-r--r--sys-apps/lshw/files/lshw-02.18b-gentoo.patch161
-rw-r--r--sys-apps/lshw/files/lshw-02.18b-gettext-array.patch31
-rw-r--r--sys-apps/lshw/lshw-02.16b-r2.ebuild69
-rw-r--r--sys-apps/lshw/lshw-02.18b.ebuild72
-rw-r--r--sys-apps/lshw/metadata.xml8
-rw-r--r--sys-apps/lssbus/Manifest5
-rw-r--r--sys-apps/lssbus/lssbus-0.1.ebuild19
-rw-r--r--sys-apps/lssbus/metadata.xml11
-rw-r--r--sys-apps/makedev/Manifest6
-rw-r--r--sys-apps/makedev/files/makedev-3.23.1-headers.patch25
-rw-r--r--sys-apps/makedev/makedev-3.23.1.ebuild52
-rw-r--r--sys-apps/makedev/metadata.xml8
-rw-r--r--sys-apps/man-db/Manifest6
-rw-r--r--sys-apps/man-db/files/man-db.cron11
-rw-r--r--sys-apps/man-db/man-db-2.7.6.1-r2.ebuild108
-rw-r--r--sys-apps/man-db/metadata.xml11
-rw-r--r--sys-apps/man-pages-posix/Manifest5
-rw-r--r--sys-apps/man-pages-posix/man-pages-posix-2013a.ebuild32
-rw-r--r--sys-apps/man-pages-posix/metadata.xml8
-rw-r--r--sys-apps/man-pages/Manifest14
-rw-r--r--sys-apps/man-pages/man-pages-4.09.ebuild52
-rw-r--r--sys-apps/man-pages/man-pages-4.10.ebuild53
-rw-r--r--sys-apps/man-pages/man-pages-4.11.ebuild54
-rw-r--r--sys-apps/man-pages/man-pages-4.12.ebuild54
-rw-r--r--sys-apps/man-pages/man-pages-4.13.ebuild54
-rw-r--r--sys-apps/man-pages/metadata.xml8
-rw-r--r--sys-apps/man/Manifest20
-rw-r--r--sys-apps/man/files/makewhatis.cron5
-rw-r--r--sys-apps/man/files/man-1.5m2-apropos.patch16
-rw-r--r--sys-apps/man/files/man-1.6-cross-compile.patch61
-rw-r--r--sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch83
-rw-r--r--sys-apps/man/files/man-1.6e-headers.patch13
-rw-r--r--sys-apps/man/files/man-1.6f-makewhatis-compression-cleanup.patch69
-rw-r--r--sys-apps/man/files/man-1.6f-man2html-compression-2.patch61
-rw-r--r--sys-apps/man/files/man-1.6f-parallel-build.patch78
-rw-r--r--sys-apps/man/files/man-1.6f-so-search-2.patch34
-rw-r--r--sys-apps/man/files/man-1.6f-unicode.patch28
-rw-r--r--sys-apps/man/files/man-1.6g-compress.patch17
-rw-r--r--sys-apps/man/files/man-1.6g-echo-escape.patch15
-rw-r--r--sys-apps/man/files/man-1.6g-fbsd.patch15
-rw-r--r--sys-apps/man/files/man-1.6g-xz.patch53
-rw-r--r--sys-apps/man/man-1.6g-r1.ebuild128
-rw-r--r--sys-apps/man/man-1.6g.ebuild127
-rw-r--r--sys-apps/man/metadata.xml8
-rw-r--r--sys-apps/man2html/Manifest7
-rw-r--r--sys-apps/man2html/files/man-1.6-cross-compile.patch61
-rw-r--r--sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch61
-rw-r--r--sys-apps/man2html/files/man-1.6g-compress.patch17
-rw-r--r--sys-apps/man2html/man2html-1.6g.ebuild55
-rw-r--r--sys-apps/man2html/metadata.xml8
-rw-r--r--sys-apps/mawk/Manifest9
-rw-r--r--sys-apps/mawk/mawk-1.3.4_p20150503.ebuild42
-rw-r--r--sys-apps/mawk/mawk-1.3.4_p20160615.ebuild42
-rw-r--r--sys-apps/mawk/mawk-1.3.4_p20161120.ebuild43
-rw-r--r--sys-apps/mawk/metadata.xml8
-rw-r--r--sys-apps/mcstrans/Manifest5
-rwxr-xr-xsys-apps/mcstrans/files/mcstransd.init31
-rw-r--r--sys-apps/mcstrans/mcstrans-2.7.ebuild57
-rw-r--r--sys-apps/mcstrans/mcstrans-9999.ebuild57
-rw-r--r--sys-apps/mcstrans/metadata.xml14
-rw-r--r--sys-apps/memtest86+/Manifest29
-rw-r--r--sys-apps/memtest86+/files/39_memtest86+67
-rw-r--r--sys-apps/memtest86+/files/39_memtest86+-r169
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy111
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy.139
-rw-r--r--sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch11
-rw-r--r--sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch30
-rw-r--r--sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch30
-rw-r--r--sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch30
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch33
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch16
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch31
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch49
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch19
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch14
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch15
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch21
-rw-r--r--sys-apps/memtest86+/memtest86+-2.01.ebuild55
-rw-r--r--sys-apps/memtest86+/memtest86+-4.00.ebuild74
-rw-r--r--sys-apps/memtest86+/memtest86+-4.20-r1.ebuild87
-rw-r--r--sys-apps/memtest86+/memtest86+-4.20-r3.ebuild73
-rw-r--r--sys-apps/memtest86+/memtest86+-5.01-r2.ebuild92
-rw-r--r--sys-apps/memtest86+/memtest86+-5.01-r3.ebuild90
-rw-r--r--sys-apps/memtest86+/metadata.xml13
-rw-r--r--sys-apps/memtest86/Manifest12
-rw-r--r--sys-apps/memtest86/files/39_memtest8618
-rw-r--r--sys-apps/memtest86/files/39_memtest86-r169
-rw-r--r--sys-apps/memtest86/files/memtest86-4.3.3-build-nopie.patch47
-rw-r--r--sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch29
-rw-r--r--sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch16
-rw-r--r--sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch13
-rw-r--r--sys-apps/memtest86/memtest86-4.3.7-r1.ebuild71
-rw-r--r--sys-apps/memtest86/memtest86-4.3.7.ebuild67
-rw-r--r--sys-apps/memtest86/metadata.xml11
-rw-r--r--sys-apps/memtester/Manifest7
-rw-r--r--sys-apps/memtester/memtester-4.2.2.ebuild27
-rw-r--r--sys-apps/memtester/memtester-4.3.0.ebuild27
-rw-r--r--sys-apps/memtester/metadata.xml8
-rw-r--r--sys-apps/metadata.xml45
-rw-r--r--sys-apps/microcode-ctl/Manifest13
-rw-r--r--sys-apps/microcode-ctl/files/microcode_ctl.conf.d11
-rw-r--r--sys-apps/microcode-ctl/files/microcode_ctl.rc24
-rw-r--r--sys-apps/microcode-ctl/files/microcode_ctl.rc-r124
-rw-r--r--sys-apps/microcode-ctl/metadata.xml8
-rw-r--r--sys-apps/microcode-ctl/microcode-ctl-1.23.ebuild50
-rw-r--r--sys-apps/microcode-ctl/microcode-ctl-1.27.ebuild50
-rw-r--r--sys-apps/microcode-ctl/microcode-ctl-1.28-r1.ebuild42
-rw-r--r--sys-apps/microcode-ctl/microcode-ctl-1.28.ebuild50
-rw-r--r--sys-apps/miller/Manifest4
-rw-r--r--sys-apps/miller/metadata.xml8
-rw-r--r--sys-apps/miller/miller-4.2.0.ebuild60
-rw-r--r--sys-apps/minised/Manifest5
-rw-r--r--sys-apps/minised/metadata.xml12
-rw-r--r--sys-apps/minised/minised-1.15.ebuild19
-rw-r--r--sys-apps/miscfiles/Manifest6
-rw-r--r--sys-apps/miscfiles/metadata.xml8
-rw-r--r--sys-apps/miscfiles/miscfiles-1.5-r1.ebuild61
-rw-r--r--sys-apps/mlocate/Manifest8
-rw-r--r--sys-apps/mlocate/files/mlocate-cron.conf9
-rw-r--r--sys-apps/mlocate/files/mlocate.cron-r351
-rw-r--r--sys-apps/mlocate/files/updatedb.conf16
-rw-r--r--sys-apps/mlocate/metadata.xml8
-rw-r--r--sys-apps/mlocate/mlocate-0.26-r2.ebuild62
-rw-r--r--sys-apps/modutils/Manifest9
-rw-r--r--sys-apps/modutils/files/modutils-2.4.27-alias.patch86
-rw-r--r--sys-apps/modutils/files/modutils-2.4.27-flex.patch37
-rw-r--r--sys-apps/modutils/files/modutils-2.4.27-gcc.patch280
-rw-r--r--sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch43
-rw-r--r--sys-apps/modutils/metadata.xml8
-rw-r--r--sys-apps/modutils/modutils-2.4.27-r1.ebuild39
-rw-r--r--sys-apps/moreutils/Manifest7
-rw-r--r--sys-apps/moreutils/metadata.xml11
-rw-r--r--sys-apps/moreutils/moreutils-0.60-r1.ebuild64
-rw-r--r--sys-apps/moreutils/moreutils-0.61.ebuild64
-rw-r--r--sys-apps/most/Manifest7
-rw-r--r--sys-apps/most/files/most-5.0.0a-donot-hardcode-path.patch33
-rw-r--r--sys-apps/most/files/most-5.0.0a-no-explicit-termcap.patch216
-rw-r--r--sys-apps/most/metadata.xml8
-rw-r--r--sys-apps/most/most-5.0.0a-r1.ebuild35
-rw-r--r--sys-apps/mount-gtk/Manifest6
-rw-r--r--sys-apps/mount-gtk/files/mount-gtk-1.4.2-c++11.patch31
-rw-r--r--sys-apps/mount-gtk/metadata.xml11
-rw-r--r--sys-apps/mount-gtk/mount-gtk-1.4.2.ebuild36
-rw-r--r--sys-apps/mouseemu/Manifest11
-rw-r--r--sys-apps/mouseemu/files/mouseemu-0.12-fix.diff48
-rw-r--r--sys-apps/mouseemu/files/mouseemu-0.13-fix.patch14
-rw-r--r--sys-apps/mouseemu/files/mouseemu-0.15-build.patch9
-rw-r--r--sys-apps/mouseemu/files/mouseemu-0.15-openrc.patch8
-rw-r--r--sys-apps/mouseemu/metadata.xml8
-rw-r--r--sys-apps/mouseemu/mouseemu-0.12.ebuild36
-rw-r--r--sys-apps/mouseemu/mouseemu-0.15.ebuild40
-rw-r--r--sys-apps/msr-tools/Manifest5
-rw-r--r--sys-apps/msr-tools/metadata.xml7
-rw-r--r--sys-apps/msr-tools/msr-tools-1.3.ebuild29
-rw-r--r--sys-apps/mtree/Manifest7
-rw-r--r--sys-apps/mtree/metadata.xml11
-rw-r--r--sys-apps/mtree/mtree-1.0.1.ebuild27
-rw-r--r--sys-apps/mtree/mtree-1.0.3.ebuild30
-rw-r--r--sys-apps/nawk/Manifest7
-rw-r--r--sys-apps/nawk/files/nawk-20121220-parallel-build.patch61
-rw-r--r--sys-apps/nawk/metadata.xml11
-rw-r--r--sys-apps/nawk/nawk-20121220-r2.ebuild49
-rw-r--r--sys-apps/nawk/nawk-20121220-r3.ebuild62
-rw-r--r--sys-apps/nca/Manifest6
-rw-r--r--sys-apps/nca/files/ncad.initd15
-rw-r--r--sys-apps/nca/metadata.xml14
-rw-r--r--sys-apps/nca/nca-0.9.0-r1.ebuild43
-rw-r--r--sys-apps/net-tools/Manifest9
-rw-r--r--sys-apps/net-tools/files/net-tools-1.60_p20161110235919-fix-building-w-older-linux-headers.patch33
-rw-r--r--sys-apps/net-tools/metadata.xml17
-rw-r--r--sys-apps/net-tools/net-tools-1.60_p20160215155418.ebuild91
-rw-r--r--sys-apps/net-tools/net-tools-1.60_p20161110235919.ebuild95
-rw-r--r--sys-apps/net-tools/net-tools-9999.ebuild91
-rw-r--r--sys-apps/netboot-base/Manifest5
-rw-r--r--sys-apps/netboot-base/metadata.xml8
-rw-r--r--sys-apps/netboot-base/netboot-base-20050110.ebuild45
-rw-r--r--sys-apps/netkit-base/Manifest9
-rw-r--r--sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch11
-rw-r--r--sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch54
-rw-r--r--sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch26
-rw-r--r--sys-apps/netkit-base/files/inetd.rc623
-rw-r--r--sys-apps/netkit-base/metadata.xml8
-rw-r--r--sys-apps/netkit-base/netkit-base-0.17-r9.ebuild42
-rw-r--r--sys-apps/netloc/Manifest5
-rw-r--r--sys-apps/netloc/metadata.xml11
-rw-r--r--sys-apps/netloc/netloc-0.5.ebuild28
-rw-r--r--sys-apps/netplug/Manifest10
-rw-r--r--sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch37
-rw-r--r--sys-apps/netplug/files/netplug-1.2.9-remove-nest.patch187
-rw-r--r--sys-apps/netplug/files/netplug-1.2.9.2-downandout.patch13
-rw-r--r--sys-apps/netplug/files/netplug-243
-rw-r--r--sys-apps/netplug/metadata.xml11
-rw-r--r--sys-apps/netplug/netplug-1.2.9.2-r1.ebuild63
-rw-r--r--sys-apps/netplug/netplug-1.2.9.2-r2.ebuild70
-rw-r--r--sys-apps/newrelic-sysmond/Manifest6
-rw-r--r--sys-apps/newrelic-sysmond/files/newrelic-sysmond.rc23
-rw-r--r--sys-apps/newrelic-sysmond/metadata.xml6
-rw-r--r--sys-apps/newrelic-sysmond/newrelic-sysmond-1.1.2.124-r1.ebuild56
-rw-r--r--sys-apps/nix/Manifest14
-rw-r--r--sys-apps/nix/files/60nix-remote-daemon1
-rw-r--r--sys-apps/nix/files/nix-1.11.12-etc-fixes.patch24
-rw-r--r--sys-apps/nix/files/nix-1.11.14-etc-fixes.patch8
-rw-r--r--sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch16
-rw-r--r--sys-apps/nix/files/nix-1.11.6-per-user.patch11
-rw-r--r--sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch9
-rw-r--r--sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch36
-rw-r--r--sys-apps/nix/files/nix-1.11.6-systemd.patch10
-rw-r--r--sys-apps/nix/files/nix-daemon.initd15
-rw-r--r--sys-apps/nix/metadata.xml13
-rw-r--r--sys-apps/nix/nix-1.11.14.ebuild135
-rw-r--r--sys-apps/nix/nix-1.11.15.ebuild134
-rw-r--r--sys-apps/noexec/Manifest5
-rw-r--r--sys-apps/noexec/metadata.xml8
-rw-r--r--sys-apps/noexec/noexec-1.1.0-r1.ebuild14
-rw-r--r--sys-apps/nvme-cli/Manifest8
-rw-r--r--sys-apps/nvme-cli/metadata.xml10
-rw-r--r--sys-apps/nvme-cli/nvme-cli-1.1.ebuild25
-rw-r--r--sys-apps/nvme-cli/nvme-cli-1.2.ebuild26
-rw-r--r--sys-apps/nvme-cli/nvme-cli-1.3.ebuild26
-rw-r--r--sys-apps/openrc/Manifest24
-rw-r--r--sys-apps/openrc/files/openrc-9999-msg-style.patch81
-rw-r--r--sys-apps/openrc/files/openrc-9999-pause.patch29
-rw-r--r--sys-apps/openrc/files/openrc.logrotate4
-rw-r--r--sys-apps/openrc/files/start-stop-daemon.pam2
-rw-r--r--sys-apps/openrc/metadata.xml15
-rw-r--r--sys-apps/openrc/openrc-0.27.2.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.28.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.29.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.30.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.31.1.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.31.2.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.31.ebuild329
-rw-r--r--sys-apps/openrc/openrc-0.32.ebuild329
-rw-r--r--sys-apps/openrc/openrc-9999.ebuild329
-rw-r--r--sys-apps/opentmpfiles/Manifest9
-rw-r--r--sys-apps/opentmpfiles/metadata.xml15
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-0.1.1.ebuild44
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-0.1.2.ebuild47
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-0.1.3.ebuild47
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-9999.ebuild47
-rw-r--r--sys-apps/osinfo-db-tools/Manifest3
-rw-r--r--sys-apps/osinfo-db-tools/metadata.xml8
-rw-r--r--sys-apps/osinfo-db-tools/osinfo-db-tools-1.1.0.ebuild31
-rw-r--r--sys-apps/osinfo-db/Manifest7
-rw-r--r--sys-apps/osinfo-db/metadata.xml8
-rw-r--r--sys-apps/osinfo-db/osinfo-db-20170326.ebuild27
-rw-r--r--sys-apps/osinfo-db/osinfo-db-20170423.ebuild27
-rw-r--r--sys-apps/osinfo-db/osinfo-db-20170813.ebuild27
-rw-r--r--sys-apps/pacman/Manifest5
-rw-r--r--sys-apps/pacman/metadata.xml21
-rw-r--r--sys-apps/pacman/pacman-5.0.2.ebuild86
-rw-r--r--sys-apps/paludis/Manifest8
-rw-r--r--sys-apps/paludis/metadata.xml17
-rw-r--r--sys-apps/paludis/paludis-2.6.0.ebuild150
-rw-r--r--sys-apps/paludis/paludis-3.0.0_pre20170219.ebuild146
-rw-r--r--sys-apps/paludis/paludis-9999.ebuild145
-rw-r--r--sys-apps/paxctl/Manifest9
-rw-r--r--sys-apps/paxctl/metadata.xml12
-rw-r--r--sys-apps/paxctl/paxctl-0.7-r2.ebuild37
-rw-r--r--sys-apps/paxctl/paxctl-0.8.ebuild37
-rw-r--r--sys-apps/paxctl/paxctl-0.9.ebuild37
-rw-r--r--sys-apps/paxctld/Manifest9
-rw-r--r--sys-apps/paxctld/metadata.xml12
-rw-r--r--sys-apps/paxctld/paxctld-1.1.ebuild35
-rw-r--r--sys-apps/paxctld/paxctld-1.2.1.ebuild35
-rw-r--r--sys-apps/paxctld/paxctld-1.2.ebuild35
-rw-r--r--sys-apps/pciutils/Manifest12
-rw-r--r--sys-apps/pciutils/files/conf.d-pciparm28
-rw-r--r--sys-apps/pciutils/files/init.d-pciparm79
-rw-r--r--sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch13
-rw-r--r--sys-apps/pciutils/metadata.xml13
-rw-r--r--sys-apps/pciutils/pciutils-3.4.1.ebuild112
-rw-r--r--sys-apps/pciutils/pciutils-3.5.4.ebuild112
-rw-r--r--sys-apps/pciutils/pciutils-3.5.5.ebuild120
-rw-r--r--sys-apps/pcmciautils/Manifest8
-rw-r--r--sys-apps/pcmciautils/files/pcmciautils-018_p8-flex-2.6.3-fix.patch27
-rw-r--r--sys-apps/pcmciautils/metadata.xml8
-rw-r--r--sys-apps/pcmciautils/pcmciautils-018_p8-r1.ebuild75
-rw-r--r--sys-apps/pcmciautils/pcmciautils-018_p8.ebuild72
-rw-r--r--sys-apps/pcsc-lite/Manifest12
-rw-r--r--sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules6
-rw-r--r--sys-apps/pcsc-lite/files/pcsc-lite-1.8.11-polkit-pcscd.patch20
-rw-r--r--sys-apps/pcsc-lite/files/pcscd-init.722
-rw-r--r--sys-apps/pcsc-lite/metadata.xml32
-rw-r--r--sys-apps/pcsc-lite/pcsc-lite-1.8.20.ebuild108
-rw-r--r--sys-apps/pcsc-lite/pcsc-lite-1.8.21.ebuild108
-rw-r--r--sys-apps/pcsc-lite/pcsc-lite-1.8.22.ebuild108
-rw-r--r--sys-apps/pcsc-slb-rf72-drv/Manifest7
-rw-r--r--sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch41
-rw-r--r--sys-apps/pcsc-slb-rf72-drv/files/reader.conf11
-rw-r--r--sys-apps/pcsc-slb-rf72-drv/metadata.xml8
-rw-r--r--sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild70
-rw-r--r--sys-apps/pcsc-tools/Manifest6
-rw-r--r--sys-apps/pcsc-tools/files/smartcard.cron15
-rw-r--r--sys-apps/pcsc-tools/metadata.xml13
-rw-r--r--sys-apps/pcsc-tools/pcsc-tools-1.4.27.ebuild69
-rw-r--r--sys-apps/pick/Manifest7
-rw-r--r--sys-apps/pick/files/pick-1.8.0-cflags.patch10
-rw-r--r--sys-apps/pick/files/pick-1.8.0-tinfo.patch24
-rw-r--r--sys-apps/pick/metadata.xml11
-rw-r--r--sys-apps/pick/pick-1.8.0.ebuild29
-rw-r--r--sys-apps/pick/pick-1.9.0.ebuild28
-rw-r--r--sys-apps/pkgcore/Manifest8
-rw-r--r--sys-apps/pkgcore/metadata.xml14
-rw-r--r--sys-apps/pkgcore/pkgcore-0.9.4.ebuild58
-rw-r--r--sys-apps/pkgcore/pkgcore-0.9.7.ebuild62
-rw-r--r--sys-apps/pkgcore/pkgcore-9999.ebuild62
-rw-r--r--sys-apps/pmount-gui/Manifest5
-rw-r--r--sys-apps/pmount-gui/metadata.xml8
-rw-r--r--sys-apps/pmount-gui/pmount-gui-0_pre20130806.ebuild37
-rw-r--r--sys-apps/pmount/Manifest9
-rw-r--r--sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch43
-rw-r--r--sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch22
-rw-r--r--sys-apps/pmount/files/pmount.bash-completion94
-rw-r--r--sys-apps/pmount/metadata.xml8
-rw-r--r--sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild82
-rw-r--r--sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild85
-rw-r--r--sys-apps/policycoreutils/Manifest18
-rw-r--r--sys-apps/policycoreutils/files/0010-remove-sesandbox-support.patch9
-rw-r--r--sys-apps/policycoreutils/files/0020-disable-autodetection-of-pam-and-audit.patch108
-rw-r--r--sys-apps/policycoreutils/files/0030-make-inotify-check-use-flag-triggered.patch14
-rw-r--r--sys-apps/policycoreutils/files/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch11
-rw-r--r--sys-apps/policycoreutils/files/0110-build-mcstrans-bug-472912.patch64
-rw-r--r--sys-apps/policycoreutils/files/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch11
-rw-r--r--sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch13
-rw-r--r--sys-apps/policycoreutils/files/policycoreutils-2.7_rc1-0001-newrole-not-suid.patch13
-rw-r--r--sys-apps/policycoreutils/metadata.xml27
-rw-r--r--sys-apps/policycoreutils/policycoreutils-2.6-r1.ebuild187
-rw-r--r--sys-apps/policycoreutils/policycoreutils-2.7.ebuild181
-rw-r--r--sys-apps/policycoreutils/policycoreutils-9999.ebuild181
-rw-r--r--sys-apps/portage/Manifest14
-rw-r--r--sys-apps/portage/files/README.RESCUE2
-rw-r--r--sys-apps/portage/metadata.xml27
-rw-r--r--sys-apps/portage/portage-2.3.10.ebuild250
-rw-r--r--sys-apps/portage/portage-2.3.11.ebuild250
-rw-r--r--sys-apps/portage/portage-2.3.6.ebuild277
-rw-r--r--sys-apps/portage/portage-2.3.8.ebuild250
-rw-r--r--sys-apps/portage/portage-9999.ebuild237
-rw-r--r--sys-apps/powerpc-utils/Manifest7
-rw-r--r--sys-apps/powerpc-utils/metadata.xml8
-rw-r--r--sys-apps/powerpc-utils/powerpc-utils-1.1.3.18-r2.ebuild52
-rw-r--r--sys-apps/prctl/Manifest8
-rw-r--r--sys-apps/prctl/files/prctl-1.6-no-implicits.patch20
-rw-r--r--sys-apps/prctl/metadata.xml15
-rw-r--r--sys-apps/prctl/prctl-1.5.ebuild27
-rw-r--r--sys-apps/prctl/prctl-1.6.ebuild29
-rw-r--r--sys-apps/prefix-chain-utils/Manifest6
-rw-r--r--sys-apps/prefix-chain-utils/files/prefix-chain-wrapper.in83
-rw-r--r--sys-apps/prefix-chain-utils/files/startprefix.in45
-rw-r--r--sys-apps/prefix-chain-utils/metadata.xml8
-rw-r--r--sys-apps/prefix-chain-utils/prefix-chain-utils-0.2-r7.ebuild64
-rw-r--r--sys-apps/preload/Manifest14
-rw-r--r--sys-apps/preload/files/00-patch-configure.diff15
-rw-r--r--sys-apps/preload/files/0001-Early-restart-of-forking-readahead-children.patch64
-rw-r--r--sys-apps/preload/files/0002-Create-short-overlapping-io-bursts.patch29
-rw-r--r--sys-apps/preload/files/0003-Fix-wait_for_children-loop.patch27
-rw-r--r--sys-apps/preload/files/02-patch-preload_conf.diff21
-rw-r--r--sys-apps/preload/files/02-patch-preload_sysconfig.diff39
-rw-r--r--sys-apps/preload/files/preload-0.6.4-use-help2man-as-usual.patch31
-rw-r--r--sys-apps/preload/files/preload-0.6.4-use-make-dependencies.patch21
-rw-r--r--sys-apps/preload/files/preload-0.6.4.init.in-r266
-rw-r--r--sys-apps/preload/metadata.xml8
-rw-r--r--sys-apps/preload/preload-0.6.4-r3.ebuild63
-rw-r--r--sys-apps/progress/Manifest4
-rw-r--r--sys-apps/progress/metadata.xml11
-rw-r--r--sys-apps/progress/progress-0.13.ebuild31
-rw-r--r--sys-apps/proot/Manifest17
-rw-r--r--sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch19
-rw-r--r--sys-apps/proot/files/proot-3.2.1-makefile.patch11
-rw-r--r--sys-apps/proot/files/proot-3.2.2-build-care.patch20
-rw-r--r--sys-apps/proot/files/proot-4.0.1-argv.patch125
-rw-r--r--sys-apps/proot/metadata.xml24
-rw-r--r--sys-apps/proot/proot-3.2.2-r1.ebuild72
-rw-r--r--sys-apps/proot/proot-4.0.1.ebuild67
-rw-r--r--sys-apps/proot/proot-4.0.3.ebuild68
-rw-r--r--sys-apps/proot/proot-5.0.0.ebuild68
-rw-r--r--sys-apps/proot/proot-5.1.0.ebuild68
-rw-r--r--sys-apps/pv/Manifest7
-rw-r--r--sys-apps/pv/metadata.xml11
-rw-r--r--sys-apps/pv/pv-1.6.0-r1.ebuild51
-rw-r--r--sys-apps/pv/pv-1.6.6.ebuild54
-rw-r--r--sys-apps/pyrenamer/Manifest5
-rw-r--r--sys-apps/pyrenamer/metadata.xml11
-rw-r--r--sys-apps/pyrenamer/pyrenamer-0.6.0-r2.ebuild34
-rw-r--r--sys-apps/qcontrol/Manifest9
-rw-r--r--sys-apps/qcontrol/files/0.4.2-Makefile.patch22
-rw-r--r--sys-apps/qcontrol/files/conf.d5
-rw-r--r--sys-apps/qcontrol/files/init.d74
-rw-r--r--sys-apps/qcontrol/metadata.xml12
-rw-r--r--sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild61
-rw-r--r--sys-apps/qdirstat/Manifest4
-rw-r--r--sys-apps/qdirstat/metadata.xml27
-rw-r--r--sys-apps/qdirstat/qdirstat-1.4.ebuild37
-rw-r--r--sys-apps/qdiskusage/Manifest5
-rw-r--r--sys-apps/qdiskusage/metadata.xml8
-rw-r--r--sys-apps/qdiskusage/qdiskusage-1.0.4.ebuild30
-rw-r--r--sys-apps/qingy/Manifest12
-rw-r--r--sys-apps/qingy/files/50qingy-gentoo.el7
-rw-r--r--sys-apps/qingy/files/qingy-1.0.0-tinfo.patch42
-rw-r--r--sys-apps/qingy/files/qingy-logrotate6
-rw-r--r--sys-apps/qingy/files/qingy_at.service21
-rw-r--r--sys-apps/qingy/metadata.xml15
-rw-r--r--sys-apps/qingy/qingy-1.0.0-r2.ebuild134
-rw-r--r--sys-apps/raidutils/Manifest7
-rw-r--r--sys-apps/raidutils/files/raidutils-0.0.6-gcc45.patch14
-rw-r--r--sys-apps/raidutils/metadata.xml12
-rw-r--r--sys-apps/raidutils/raidutils-0.0.6-r2.ebuild40
-rw-r--r--sys-apps/razercfg/Manifest11
-rw-r--r--sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch21
-rw-r--r--sys-apps/razercfg/files/razerd.init.d-r125
-rw-r--r--sys-apps/razercfg/files/razerd.init.d-r225
-rw-r--r--sys-apps/razercfg/metadata.xml19
-rw-r--r--sys-apps/razercfg/razercfg-0.23.ebuild55
-rw-r--r--sys-apps/razercfg/razercfg-0.39-r1.ebuild91
-rw-r--r--sys-apps/razercfg/razercfg-0.39.ebuild82
-rw-r--r--sys-apps/readahead-list/Manifest13
-rw-r--r--sys-apps/readahead-list/files/conf.d-readahead-list15
-rw-r--r--sys-apps/readahead-list/files/init.d-readahead-list22
-rw-r--r--sys-apps/readahead-list/files/init.d-readahead-list-early22
-rw-r--r--sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc-4.3.patch10
-rw-r--r--sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc6.patch15
-rw-r--r--sys-apps/readahead-list/metadata.xml12
-rw-r--r--sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild58
-rw-r--r--sys-apps/readahead-list/readahead-list-1.20060421.1016-r2.ebuild60
-rw-r--r--sys-apps/readahead-list/readahead-list-1.20060421.1016-r3.ebuild60
-rw-r--r--sys-apps/readahead-list/readahead-list-1.20060421.1016.ebuild60
-rw-r--r--sys-apps/rename/Manifest10
-rw-r--r--sys-apps/rename/files/rename-1.3-build.patch11
-rw-r--r--sys-apps/rename/files/rename-1.3-gcc44.patch16
-rw-r--r--sys-apps/rename/files/rename-1.3-rename.patch95
-rw-r--r--sys-apps/rename/metadata.xml11
-rw-r--r--sys-apps/rename/rename-1.3-r1.ebuild41
-rw-r--r--sys-apps/rename/rename-1.3-r2.ebuild42
-rw-r--r--sys-apps/rename/rename-1.3.ebuild37
-rw-r--r--sys-apps/renameutils/Manifest7
-rw-r--r--sys-apps/renameutils/files/renameutils-0.12.0-autopoint.patch12
-rw-r--r--sys-apps/renameutils/files/renameutils-0.12.0-typo.patch13
-rw-r--r--sys-apps/renameutils/metadata.xml7
-rw-r--r--sys-apps/renameutils/renameutils-0.12.0.ebuild28
-rw-r--r--sys-apps/rescan-scsi-bus/Manifest10
-rw-r--r--sys-apps/rescan-scsi-bus/metadata.xml11
-rw-r--r--sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.29.ebuild40
-rw-r--r--sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.56.ebuild40
-rw-r--r--sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57-r1.ebuild35
-rw-r--r--sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57.ebuild34
-rw-r--r--sys-apps/restartd/Manifest5
-rw-r--r--sys-apps/restartd/metadata.xml5
-rw-r--r--sys-apps/restartd/restartd-0.2.2.ebuild29
-rw-r--r--sys-apps/restorecond/Manifest5
-rwxr-xr-xsys-apps/restorecond/files/restorecond.init30
-rw-r--r--sys-apps/restorecond/metadata.xml14
-rw-r--r--sys-apps/restorecond/restorecond-2.7.ebuild57
-rw-r--r--sys-apps/restorecond/restorecond-9999.ebuild57
-rw-r--r--sys-apps/ripgrep/Manifest43
-rw-r--r--sys-apps/ripgrep/metadata.xml11
-rw-r--r--sys-apps/ripgrep/ripgrep-0.5.2.ebuild40
-rw-r--r--sys-apps/ripgrep/ripgrep-0.6.0-r1.ebuild71
-rw-r--r--sys-apps/rkflashtool/Manifest9
-rw-r--r--sys-apps/rkflashtool/files/rkflashtool-5.1-missing-version.h5
-rw-r--r--sys-apps/rkflashtool/files/rkflashtool-6.1-missing-version.h5
-rw-r--r--sys-apps/rkflashtool/metadata.xml11
-rw-r--r--sys-apps/rkflashtool/rkflashtool-5.1.ebuild33
-rw-r--r--sys-apps/rkflashtool/rkflashtool-6.1.ebuild33
-rw-r--r--sys-apps/rng-tools/Manifest16
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch45
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch100
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch17
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch15
-rw-r--r--sys-apps/rng-tools/files/rng-tools-6-fix-noctty.patch45
-rw-r--r--sys-apps/rng-tools/files/rngd-confd-4.122
-rw-r--r--sys-apps/rng-tools/files/rngd-initd-r1-4.116
-rw-r--r--sys-apps/rng-tools/files/rngd.service8
-rw-r--r--sys-apps/rng-tools/files/test-for-argp.patch43
-rw-r--r--sys-apps/rng-tools/metadata.xml15
-rw-r--r--sys-apps/rng-tools/rng-tools-5-r2.ebuild40
-rw-r--r--sys-apps/rng-tools/rng-tools-6.ebuild46
-rw-r--r--sys-apps/roccat-tools/Manifest8
-rw-r--r--sys-apps/roccat-tools/files/README.gentoo17
-rw-r--r--sys-apps/roccat-tools/metadata.xml22
-rw-r--r--sys-apps/roccat-tools/roccat-tools-5.1.1.ebuild88
-rw-r--r--sys-apps/roccat-tools/roccat-tools-5.7.0.ebuild108
-rw-r--r--sys-apps/s390-tools/Manifest10
-rw-r--r--sys-apps/s390-tools/files/s390-tools-1.23.1-build.patch153
-rw-r--r--sys-apps/s390-tools/metadata.xml21
-rw-r--r--sys-apps/s390-tools/s390-tools-1.23.1.ebuild56
-rw-r--r--sys-apps/s390-tools/s390-tools-1.36.1.ebuild51
-rw-r--r--sys-apps/s6-linux-init/Manifest12
-rw-r--r--sys-apps/s6-linux-init/metadata.xml17
-rw-r--r--sys-apps/s6-linux-init/s6-linux-init-0.0.1.4.ebuild54
-rw-r--r--sys-apps/s6-linux-init/s6-linux-init-0.1.0.0.ebuild54
-rw-r--r--sys-apps/s6-linux-init/s6-linux-init-0.2.0.0.ebuild56
-rw-r--r--sys-apps/s6-linux-init/s6-linux-init-0.3.0.0.ebuild59
-rw-r--r--sys-apps/s6-linux-init/s6-linux-init-0.3.1.0.ebuild62
-rw-r--r--sys-apps/s6-linux-utils/Manifest14
-rw-r--r--sys-apps/s6-linux-utils/metadata.xml17
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.0.2.3.ebuild49
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.1.0.0.ebuild47
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.2.0.0.ebuild48
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.3.0.0.ebuild48
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.0.ebuild51
-rw-r--r--sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.1.ebuild51
-rw-r--r--sys-apps/s6-portable-utils/Manifest14
-rw-r--r--sys-apps/s6-portable-utils/metadata.xml17
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.0.5.3.ebuild49
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.0.6.0.ebuild47
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.1.0.0.ebuild48
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.2.0.0.ebuild48
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.0.ebuild51
-rw-r--r--sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.1.ebuild51
-rw-r--r--sys-apps/s6-rc/Manifest14
-rw-r--r--sys-apps/s6-rc/metadata.xml17
-rw-r--r--sys-apps/s6-rc/s6-rc-0.0.2.1.ebuild60
-rw-r--r--sys-apps/s6-rc/s6-rc-0.0.3.0.ebuild60
-rw-r--r--sys-apps/s6-rc/s6-rc-0.1.0.0.ebuild61
-rw-r--r--sys-apps/s6-rc/s6-rc-0.2.0.0.ebuild61
-rw-r--r--sys-apps/s6-rc/s6-rc-0.2.0.1.ebuild64
-rw-r--r--sys-apps/s6-rc/s6-rc-0.2.1.2.ebuild64
-rw-r--r--sys-apps/s6/Manifest17
-rw-r--r--sys-apps/s6/metadata.xml12
-rw-r--r--sys-apps/s6/s6-2.1.3.0.ebuild66
-rw-r--r--sys-apps/s6/s6-2.2.4.3.ebuild57
-rw-r--r--sys-apps/s6/s6-2.3.0.0.ebuild57
-rw-r--r--sys-apps/s6/s6-2.4.0.0.ebuild57
-rw-r--r--sys-apps/s6/s6-2.5.0.0.ebuild57
-rw-r--r--sys-apps/s6/s6-2.5.1.0.ebuild60
-rw-r--r--sys-apps/s6/s6-2.6.1.0.ebuild60
-rw-r--r--sys-apps/salinfo/Manifest6
-rw-r--r--sys-apps/salinfo/files/salinfo-1.2-build.patch47
-rw-r--r--sys-apps/salinfo/metadata.xml8
-rw-r--r--sys-apps/salinfo/salinfo-1.2.ebuild28
-rw-r--r--sys-apps/sandbox/Manifest13
-rw-r--r--sys-apps/sandbox/files/09sandbox1
-rw-r--r--sys-apps/sandbox/files/sandbox-2.10-disable-same.patch77
-rw-r--r--sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch79
-rw-r--r--sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch42
-rw-r--r--sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch124
-rw-r--r--sys-apps/sandbox/metadata.xml8
-rw-r--r--sys-apps/sandbox/sandbox-2.10-r3.ebuild84
-rw-r--r--sys-apps/sandbox/sandbox-2.10-r4.ebuild85
-rw-r--r--sys-apps/sandbox/sandbox-2.12.ebuild76
-rw-r--r--sys-apps/sdparm/Manifest5
-rw-r--r--sys-apps/sdparm/metadata.xml11
-rw-r--r--sys-apps/sdparm/sdparm-1.10.ebuild34
-rw-r--r--sys-apps/secilc/Manifest8
-rw-r--r--sys-apps/secilc/metadata.xml15
-rw-r--r--sys-apps/secilc/secilc-2.6.ebuild38
-rw-r--r--sys-apps/secilc/secilc-2.7.ebuild44
-rw-r--r--sys-apps/secilc/secilc-9999.ebuild44
-rw-r--r--sys-apps/sed/Manifest13
-rw-r--r--sys-apps/sed/files/sed-4.1.5-alloca.patch14
-rw-r--r--sys-apps/sed/files/sed-4.3-dfa-segv-1.patch175
-rw-r--r--sys-apps/sed/files/sed-4.3-dfa-segv-2.patch112
-rw-r--r--sys-apps/sed/files/sed-4.3-dfa-segv-3.patch146
-rw-r--r--sys-apps/sed/metadata.xml11
-rw-r--r--sys-apps/sed/sed-4.2.2.ebuild63
-rw-r--r--sys-apps/sed/sed-4.3-r1.ebuild62
-rw-r--r--sys-apps/sed/sed-4.4.ebuild61
-rw-r--r--sys-apps/selinux-python/Manifest5
-rw-r--r--sys-apps/selinux-python/metadata.xml19
-rw-r--r--sys-apps/selinux-python/selinux-python-2.7.ebuild97
-rw-r--r--sys-apps/selinux-python/selinux-python-9999.ebuild97
-rw-r--r--sys-apps/semodule-utils/Manifest5
-rw-r--r--sys-apps/semodule-utils/metadata.xml15
-rw-r--r--sys-apps/semodule-utils/semodule-utils-2.7.ebuild53
-rw-r--r--sys-apps/semodule-utils/semodule-utils-9999.ebuild53
-rw-r--r--sys-apps/servicelog/Manifest11
-rw-r--r--sys-apps/servicelog/metadata.xml11
-rw-r--r--sys-apps/servicelog/servicelog-1.0.1.ebuild31
-rw-r--r--sys-apps/servicelog/servicelog-1.1.11.ebuild31
-rw-r--r--sys-apps/servicelog/servicelog-1.1.13.ebuild31
-rw-r--r--sys-apps/servicelog/servicelog-1.1.14.ebuild21
-rw-r--r--sys-apps/setserial/Manifest13
-rw-r--r--sys-apps/setserial/files/serial-2.17-r422
-rw-r--r--sys-apps/setserial/files/setserial-2.17-build.patch11
-rw-r--r--sys-apps/setserial/files/setserial-2.17-darwin.patch33
-rw-r--r--sys-apps/setserial/files/setserial-2.17-hayes-esp.patch15
-rw-r--r--sys-apps/setserial/files/setserial-2.17-headers.patch12
-rw-r--r--sys-apps/setserial/files/setserial-2.17-manpage-updates.patch36
-rw-r--r--sys-apps/setserial/files/setserial-2.17-spelling.patch7
-rw-r--r--sys-apps/setserial/metadata.xml11
-rw-r--r--sys-apps/setserial/setserial-2.17-r4.ebuild45
-rw-r--r--sys-apps/setserial/setserial-2.17-r5.ebuild44
-rw-r--r--sys-apps/sg3_utils/Manifest11
-rw-r--r--sys-apps/sg3_utils/files/sg3_utils-1.26-stdint.patch31
-rw-r--r--sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch31
-rw-r--r--sys-apps/sg3_utils/metadata.xml8
-rw-r--r--sys-apps/sg3_utils/sg3_utils-1.40.ebuild43
-rw-r--r--sys-apps/sg3_utils/sg3_utils-1.41.ebuild43
-rw-r--r--sys-apps/sg3_utils/sg3_utils-1.42.ebuild44
-rw-r--r--sys-apps/shadow/Manifest15
-rw-r--r--sys-apps/shadow/files/default/useradd7
-rw-r--r--sys-apps/shadow/files/pam.d-include/passwd8
-rw-r--r--sys-apps/shadow/files/pam.d-include/shadow8
-rw-r--r--sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch10
-rw-r--r--sys-apps/shadow/files/shadow-4.4-CVE-2017-2616.patch62
-rw-r--r--sys-apps/shadow/files/shadow-4.4-load_defaults.patch37
-rw-r--r--sys-apps/shadow/files/shadow-4.4-prototypes.patch42
-rw-r--r--sys-apps/shadow/files/shadow-4.4-su-snprintf.patch29
-rw-r--r--sys-apps/shadow/metadata.xml17
-rw-r--r--sys-apps/shadow/shadow-4.4-r2.ebuild214
-rw-r--r--sys-apps/shadow/shadow-4.5.ebuild210
-rw-r--r--sys-apps/smartmontools/Manifest12
-rw-r--r--sys-apps/smartmontools/files/smartd-r1.rc28
-rw-r--r--sys-apps/smartmontools/files/smartd.confd4
-rw-r--r--sys-apps/smartmontools/files/smartmontools-update-drivedb3
-rw-r--r--sys-apps/smartmontools/metadata.xml15
-rw-r--r--sys-apps/smartmontools/smartmontools-6.4-r1.ebuild97
-rw-r--r--sys-apps/smartmontools/smartmontools-6.4.ebuild65
-rw-r--r--sys-apps/smartmontools/smartmontools-6.5.ebuild103
-rw-r--r--sys-apps/smartmontools/smartmontools-9999.ebuild103
-rw-r--r--sys-apps/sparc-utils/Manifest7
-rw-r--r--sys-apps/sparc-utils/files/audioctl.init22
-rw-r--r--sys-apps/sparc-utils/metadata.xml12
-rw-r--r--sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild75
-rw-r--r--sys-apps/spu-tools/Manifest7
-rw-r--r--sys-apps/spu-tools/files/spu-tools-2.3.0.136-buildsystem.patch32
-rw-r--r--sys-apps/spu-tools/files/spu-tools-2.3.0.136-format-security.patch16
-rw-r--r--sys-apps/spu-tools/metadata.xml10
-rw-r--r--sys-apps/spu-tools/spu-tools-2.3.0.136.ebuild37
-rw-r--r--sys-apps/stroke/Manifest5
-rw-r--r--sys-apps/stroke/metadata.xml11
-rw-r--r--sys-apps/stroke/stroke-0.1.3-r1.ebuild15
-rw-r--r--sys-apps/superiotool/Manifest7
-rwxr-xr-xsys-apps/superiotool/files/make-tarball.sh34
-rw-r--r--sys-apps/superiotool/metadata.xml10
-rw-r--r--sys-apps/superiotool/superiotool-6637.ebuild47
-rw-r--r--sys-apps/superiotool/superiotool-99999999.ebuild47
-rw-r--r--sys-apps/sydbox/Manifest3
-rw-r--r--sys-apps/sydbox/metadata.xml8
-rw-r--r--sys-apps/sydbox/sydbox-1.0.7.ebuild32
-rw-r--r--sys-apps/syscriptor/Manifest5
-rw-r--r--sys-apps/syscriptor/metadata.xml11
-rw-r--r--sys-apps/syscriptor/syscriptor-1.5.15.ebuild18
-rw-r--r--sys-apps/syslog-notify/Manifest5
-rw-r--r--sys-apps/syslog-notify/metadata.xml8
-rw-r--r--sys-apps/syslog-notify/syslog-notify-0.2.ebuild40
-rw-r--r--sys-apps/systemd-readahead/Manifest5
-rw-r--r--sys-apps/systemd-readahead/metadata.xml8
-rw-r--r--sys-apps/systemd-readahead/systemd-readahead-216.ebuild160
-rw-r--r--sys-apps/systemd/Manifest27
-rw-r--r--sys-apps/systemd/files/218-Dont-enable-audit-by-default.patch30
-rw-r--r--sys-apps/systemd/files/228-noclean-tmp.patch28
-rw-r--r--sys-apps/systemd/files/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch456
-rw-r--r--sys-apps/systemd/files/233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch117
-rw-r--r--sys-apps/systemd/files/233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch339
-rw-r--r--sys-apps/systemd/files/233-CVE-2017-9445.patch149
-rw-r--r--sys-apps/systemd/files/233-format-warnings.patch84
-rw-r--r--sys-apps/systemd/files/233-systemd-user-pam.patch16
-rw-r--r--sys-apps/systemd/files/234-0002-cryptsetup-fix-infinite-timeout-6486.patch43
-rw-r--r--sys-apps/systemd/files/234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch92
-rw-r--r--sys-apps/systemd/files/234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch29
-rw-r--r--sys-apps/systemd/files/234-uucp-group.patch11
-rw-r--r--sys-apps/systemd/files/235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch44
-rw-r--r--sys-apps/systemd/files/235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch47
-rw-r--r--sys-apps/systemd/files/generator-path.patch27
-rw-r--r--sys-apps/systemd/files/nsswitch.conf27
-rw-r--r--sys-apps/systemd/metadata.xml36
-rw-r--r--sys-apps/systemd/systemd-233-r4.ebuild460
-rw-r--r--sys-apps/systemd/systemd-234-r4.ebuild450
-rw-r--r--sys-apps/systemd/systemd-235.ebuild446
-rw-r--r--sys-apps/systemd/systemd-9999.ebuild444
-rw-r--r--sys-apps/sysvinit/Manifest13
-rw-r--r--sys-apps/sysvinit/files/inittab-2.8859
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch142
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch36
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch60
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch38
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch65
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-sysmacros.patch12
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-ttydefaults.patch10
-rw-r--r--sys-apps/sysvinit/metadata.xml8
-rw-r--r--sys-apps/sysvinit/sysvinit-2.88-r9.ebuild122
-rw-r--r--sys-apps/tcp-wrappers/Manifest9
-rw-r--r--sys-apps/tcp-wrappers/files/hosts.allow.example17
-rw-r--r--sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch295
-rw-r--r--sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch35
-rw-r--r--sys-apps/tcp-wrappers/metadata.xml14
-rw-r--r--sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild97
-rw-r--r--sys-apps/texinfo/Manifest11
-rw-r--r--sys-apps/texinfo/metadata.xml8
-rw-r--r--sys-apps/texinfo/texinfo-6.1.ebuild40
-rw-r--r--sys-apps/texinfo/texinfo-6.3.ebuild40
-rw-r--r--sys-apps/texinfo/texinfo-6.4.ebuild40
-rw-r--r--sys-apps/texinfo/texinfo-6.5.ebuild42
-rw-r--r--sys-apps/the_silver_searcher/Manifest7
-rw-r--r--sys-apps/the_silver_searcher/metadata.xml11
-rw-r--r--sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild45
-rw-r--r--sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild45
-rw-r--r--sys-apps/timer_entropyd/Manifest9
-rw-r--r--sys-apps/timer_entropyd/files/timer_entropyd-0.1-syslog.patch28
-rw-r--r--sys-apps/timer_entropyd/files/timer_entropyd.initd.113
-rw-r--r--sys-apps/timer_entropyd/metadata.xml8
-rw-r--r--sys-apps/timer_entropyd/timer_entropyd-0.2.ebuild42
-rw-r--r--sys-apps/timer_entropyd/timer_entropyd-0.3.ebuild42
-rw-r--r--sys-apps/tomoyo-tools/Manifest6
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch22
-rw-r--r--sys-apps/tomoyo-tools/metadata.xml10
-rw-r--r--sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild67
-rw-r--r--sys-apps/toybox/Manifest21
-rw-r--r--sys-apps/toybox/files/toybox-0.7.0-includes.patch24
-rw-r--r--sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch40
-rw-r--r--sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch28
-rw-r--r--sys-apps/toybox/metadata.xml8
-rw-r--r--sys-apps/toybox/toybox-0.6.0.ebuild59
-rw-r--r--sys-apps/toybox/toybox-0.6.1.ebuild57
-rw-r--r--sys-apps/toybox/toybox-0.7.0.ebuild60
-rw-r--r--sys-apps/toybox/toybox-0.7.1.ebuild57
-rw-r--r--sys-apps/toybox/toybox-0.7.2.ebuild57
-rw-r--r--sys-apps/toybox/toybox-0.7.3.ebuild57
-rw-r--r--sys-apps/toybox/toybox-0.7.4.ebuild57
-rw-r--r--sys-apps/toybox/toybox-9999.ebuild57
-rw-r--r--sys-apps/tuned/Manifest12
-rw-r--r--sys-apps/tuned/files/tuned-2.7.0-upstream.patch39
-rw-r--r--sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch19
-rw-r--r--sys-apps/tuned/files/tuned-2.7.1-sysctl.patch11
-rw-r--r--sys-apps/tuned/files/tuned.initd16
-rw-r--r--sys-apps/tuned/metadata.xml12
-rw-r--r--sys-apps/tuned/tuned-2.7.0.ebuild49
-rw-r--r--sys-apps/tuned/tuned-2.7.1-r2.ebuild51
-rw-r--r--sys-apps/tuned/tuned-2.7.1-r3.ebuild58
-rw-r--r--sys-apps/tuxonice-userui/Manifest7
-rw-r--r--sys-apps/tuxonice-userui/files/tuxonice-userui-1.1-freetype-2.5.patch38
-rw-r--r--sys-apps/tuxonice-userui/metadata.xml18
-rw-r--r--sys-apps/tuxonice-userui/tuxonice-userui-1.1-r2.ebuild62
-rw-r--r--sys-apps/uam/Manifest10
-rw-r--r--sys-apps/uam/metadata.xml21
-rw-r--r--sys-apps/uam/uam-0.3.1.ebuild44
-rw-r--r--sys-apps/uam/uam-0.3.2.ebuild44
-rw-r--r--sys-apps/uam/uam-0.3.ebuild50
-rw-r--r--sys-apps/uam/uam-9999.ebuild56
-rw-r--r--sys-apps/ucspi-proxy/Manifest9
-rw-r--r--sys-apps/ucspi-proxy/metadata.xml12
-rw-r--r--sys-apps/ucspi-proxy/ucspi-proxy-0.97.ebuild29
-rw-r--r--sys-apps/ucspi-proxy/ucspi-proxy-0.98.ebuild36
-rw-r--r--sys-apps/ucspi-proxy/ucspi-proxy-0.99.ebuild31
-rw-r--r--sys-apps/ucspi-ssl/Manifest11
-rw-r--r--sys-apps/ucspi-ssl/metadata.xml21
-rw-r--r--sys-apps/ucspi-ssl/ucspi-ssl-0.94-r1.ebuild52
-rw-r--r--sys-apps/ucspi-ssl/ucspi-ssl-0.97.ebuild56
-rw-r--r--sys-apps/ucspi-ssl/ucspi-ssl-0.98b.ebuild56
-rw-r--r--sys-apps/ucspi-ssl/ucspi-ssl-0.99.ebuild55
-rw-r--r--sys-apps/ucspi-tcp/Manifest23
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch27
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-bigendian.patch18
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-errno.patch13
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-exit.patch10
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-large-responses.patch26
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch89
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch36
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch11
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-protos.patch544
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-rblsmtpd-ignore-on-RELAYCLIENT.patch25
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-tcprules.patch16
-rw-r--r--sys-apps/ucspi-tcp/files/0.88-uint-headers.patch133
-rw-r--r--sys-apps/ucspi-tcp/files/tcprules-Makefile11
-rw-r--r--sys-apps/ucspi-tcp/metadata.xml16
-rw-r--r--sys-apps/ucspi-tcp/ucspi-tcp-0.88-r17.ebuild90
-rw-r--r--sys-apps/ucspi-tcp/ucspi-tcp-0.88-r18.ebuild74
-rw-r--r--sys-apps/ucspi-unix/Manifest10
-rw-r--r--sys-apps/ucspi-unix/files/ucspi-unix-0.36-fix-parallel-build.patch19
-rw-r--r--sys-apps/ucspi-unix/files/ucspi-unix-0.36-include-sys_socket.h.patch11
-rw-r--r--sys-apps/ucspi-unix/files/ucspi-unix-gentoo-head.patch33
-rw-r--r--sys-apps/ucspi-unix/metadata.xml12
-rw-r--r--sys-apps/ucspi-unix/ucspi-unix-0.36-r2.ebuild34
-rw-r--r--sys-apps/ucspi-unix/ucspi-unix-0.36-r3.ebuild36
-rw-r--r--sys-apps/ucspi-unix/ucspi-unix-0.36-r4.ebuild40
-rw-r--r--sys-apps/udevil/Manifest11
-rw-r--r--sys-apps/udevil/files/udevil-0.4.3-flags.patch46
-rw-r--r--sys-apps/udevil/files/udevil-0.4.4-include-sysmacros-r1.patch27
-rw-r--r--sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch15
-rw-r--r--sys-apps/udevil/files/udevil-0.4.4-stat.patch11
-rw-r--r--sys-apps/udevil/metadata.xml15
-rw-r--r--sys-apps/udevil/udevil-0.4.4-r1.ebuild72
-rw-r--r--sys-apps/udevil/udevil-0.4.4-r2.ebuild74
-rw-r--r--sys-apps/udevil/udevil-0.4.4-r3.ebuild74
-rw-r--r--sys-apps/ultracopier/Manifest5
-rw-r--r--sys-apps/ultracopier/metadata.xml5
-rw-r--r--sys-apps/ultracopier/ultracopier-0.2.0.16.ebuild39
-rw-r--r--sys-apps/unscd/Manifest8
-rw-r--r--sys-apps/unscd/files/unscd-tmpfiles.conf1
-rw-r--r--sys-apps/unscd/files/unscd.initd-r115
-rw-r--r--sys-apps/unscd/files/unscd.service18
-rw-r--r--sys-apps/unscd/metadata.xml8
-rw-r--r--sys-apps/unscd/unscd-0.52-r2.ebuild36
-rw-r--r--sys-apps/usb_modeswitch/Manifest13
-rw-r--r--sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch18
-rw-r--r--sys-apps/usb_modeswitch/metadata.xml15
-rw-r--r--sys-apps/usb_modeswitch/usb_modeswitch-2.2.6.ebuild66
-rw-r--r--sys-apps/usb_modeswitch/usb_modeswitch-2.3.0.ebuild66
-rw-r--r--sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild67
-rw-r--r--sys-apps/usbmon/Manifest8
-rw-r--r--sys-apps/usbmon/files/usbmon-6-sysmacros.patch38
-rw-r--r--sys-apps/usbmon/metadata.xml7
-rw-r--r--sys-apps/usbmon/usbmon-6-r1.ebuild32
-rw-r--r--sys-apps/usbmon/usbmon-6.1.ebuild27
-rw-r--r--sys-apps/usbredir/Manifest9
-rw-r--r--sys-apps/usbredir/metadata.xml12
-rw-r--r--sys-apps/usbredir/usbredir-0.7.1_p20170503.ebuild44
-rw-r--r--sys-apps/usbredir/usbredir-0.7.ebuild35
-rw-r--r--sys-apps/usbredir/usbredir-9999.ebuild41
-rw-r--r--sys-apps/usbutils/Manifest6
-rw-r--r--sys-apps/usbutils/files/usbutils-006-stdint.patch32
-rw-r--r--sys-apps/usbutils/metadata.xml8
-rw-r--r--sys-apps/usbutils/usbutils-008-r1.ebuild50
-rw-r--r--sys-apps/usermode-utilities/Manifest8
-rw-r--r--sys-apps/usermode-utilities/files/usermode-utilities-20070815-headers.patch27
-rw-r--r--sys-apps/usermode-utilities/files/usermode-utilities-20070815-humfsify-owner.patch12
-rw-r--r--sys-apps/usermode-utilities/files/usermode-utilities-20070815-rollup.patch101
-rw-r--r--sys-apps/usermode-utilities/metadata.xml11
-rw-r--r--sys-apps/usermode-utilities/usermode-utilities-20070815-r3.ebuild41
-rw-r--r--sys-apps/utempter/Manifest8
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-build.patch11
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch38
-rw-r--r--sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch22
-rw-r--r--sys-apps/utempter/metadata.xml12
-rw-r--r--sys-apps/utempter/utempter-0.5.5.6.ebuild56
-rw-r--r--sys-apps/util-linux/Manifest20
-rw-r--r--sys-apps/util-linux/files/runuser-l.pamd5
-rw-r--r--sys-apps/util-linux/files/runuser.pamd8
-rw-r--r--sys-apps/util-linux/files/util-linux-2.30-pylibmount_segfault.patch25
-rw-r--r--sys-apps/util-linux/metadata.xml23
-rw-r--r--sys-apps/util-linux/util-linux-2.28.2.ebuild182
-rw-r--r--sys-apps/util-linux/util-linux-2.29.2-r1.ebuild200
-rw-r--r--sys-apps/util-linux/util-linux-2.30.1.ebuild201
-rw-r--r--sys-apps/util-linux/util-linux-2.30.2.ebuild201
-rw-r--r--sys-apps/util-linux/util-linux-2.31_rc1.ebuild203
-rw-r--r--sys-apps/util-linux/util-linux-2.31_rc2.ebuild209
-rw-r--r--sys-apps/util-linux/util-linux-9999.ebuild203
-rw-r--r--sys-apps/vbetool/Manifest6
-rw-r--r--sys-apps/vbetool/files/vbetool-1.0-build.patch18
-rw-r--r--sys-apps/vbetool/metadata.xml11
-rw-r--r--sys-apps/vbetool/vbetool-1.1.ebuild30
-rw-r--r--sys-apps/watchdog/Manifest13
-rw-r--r--sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch27
-rw-r--r--sys-apps/watchdog/files/watchdog-5.15-musl.patch23
-rw-r--r--sys-apps/watchdog/files/watchdog-conf.d5
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d47
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d-r143
-rw-r--r--sys-apps/watchdog/files/watchdog.service10
-rw-r--r--sys-apps/watchdog/metadata.xml14
-rw-r--r--sys-apps/watchdog/watchdog-5.14.ebuild37
-rw-r--r--sys-apps/watchdog/watchdog-5.15.ebuild42
-rw-r--r--sys-apps/which/Manifest5
-rw-r--r--sys-apps/which/metadata.xml8
-rw-r--r--sys-apps/which/which-2.21.ebuild24
-rw-r--r--sys-apps/x86info/Manifest9
-rw-r--r--sys-apps/x86info/files/1.21-pic.patch15
-rw-r--r--sys-apps/x86info/files/x86info-1.24-pic.patch33
-rw-r--r--sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch13
-rw-r--r--sys-apps/x86info/files/x86info-modules.conf-rc8
-rw-r--r--sys-apps/x86info/metadata.xml11
-rw-r--r--sys-apps/x86info/x86info-1.30.ebuild61
-rw-r--r--sys-apps/xinetd/Manifest14
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch27
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-config.patch9
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch24
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15-config.patch22
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15-creds.patch17
-rw-r--r--sys-apps/xinetd/files/xinetd.confd3
-rw-r--r--sys-apps/xinetd/files/xinetd.rc632
-rw-r--r--sys-apps/xinetd/files/xinetd.service10
-rw-r--r--sys-apps/xinetd/metadata.xml14
-rw-r--r--sys-apps/xinetd/xinetd-2.3.15-r2.ebuild54
-rw-r--r--sys-apps/xinetd/xinetd-2.3.15-r3.ebuild54
-rw-r--r--sys-apps/xmbmon/Manifest11
-rw-r--r--sys-apps/xmbmon/files/mbmon.confd10
-rw-r--r--sys-apps/xmbmon/files/mbmon.rc19
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch24
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch40
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch31
-rw-r--r--sys-apps/xmbmon/metadata.xml8
-rw-r--r--sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild73
-rw-r--r--sys-apps/yarn/Manifest10
-rw-r--r--sys-apps/yarn/metadata.xml8
-rw-r--r--sys-apps/yarn/yarn-0.27.5.ebuild31
-rw-r--r--sys-apps/yarn/yarn-1.0.1.ebuild31
-rw-r--r--sys-apps/yarn/yarn-1.0.2.ebuild31
-rw-r--r--sys-apps/yarn/yarn-1.1.0.ebuild31
-rw-r--r--sys-apps/yum/Manifest5
-rw-r--r--sys-apps/yum/metadata.xml11
-rw-r--r--sys-apps/yum/yum-3.4.3_p20170619.ebuild46
-rw-r--r--sys-apps/zorroutils/Manifest7
-rw-r--r--sys-apps/zorroutils/files/zorroutils-0.04-20021014.diff62
-rw-r--r--sys-apps/zorroutils/files/zorroutils-gentoo.diff6
-rw-r--r--sys-apps/zorroutils/metadata.xml15
-rw-r--r--sys-apps/zorroutils/zorroutils-0.04.ebuild34
1730 files changed, 73002 insertions, 0 deletions
diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
new file mode 100644
index 000000000000..fabed385d9b5
--- /dev/null
+++ b/sys-apps/accountsservice/Manifest
@@ -0,0 +1,10 @@
+AUX accountsservice-0.6.35-gentoo-system-users.patch 1122 SHA256 f1a308a364db53ec939505daf1435fb99cf2899789976e21080464720b78297f SHA512 e8ac404aed1da3ab4bb092b476cbb18f2ae7d209bcbe6a30cb9058f50dce0f70d64a3de593108ef5588132389d522d19975384eb1b8414119cb622bc7d738931 WHIRLPOOL 35d8756e1fcff2c08926ecc2864bacccad5542d59a028b0969a4429a4855528d9b607f4cfe5849d04f131db2e142dd1bf9531ca6b79b404e55d97ba0fd6162f8
+AUX accountsservice-0.6.43-elogind.patch 3677 SHA256 b78dec4892c0e63e5348d1a2ce401583ccf9b46e85c626f5f19f2cd7ac147f5d SHA512 bbdbc77918de27d17c3c0effd1a1f0319f338f312408136563aab5633f5e7f9b705d3348462b3dfb88996d2f40ff382ed6faeecd25b717a2d25d72c44087f7c0 WHIRLPOOL 67105abf3070eb5d86c04b1aaa6fd89135fa7006f2758ced7179ebebe5c136ba8f77dbdc4488b558f78f5d778245c1f0606321a64a2b5697622d1534663f5682
+DIST accountsservice-0.6.43.tar.xz 381008 SHA256 ed3ba94aa38ceb822a0e1a1ac71bf1a8123babf90be049397b3a00900e48d6cc SHA512 0673430b7e5fd726397a9358d60d5c34542afaa786b795d3c8b544dc2bdab151c74f9a3daa4bcd94dc7669400a78cd4cddc453cad78ee8e431bf7c1f417138e2 WHIRLPOOL e704d9dcb5b7c0c6ee7c1ab5ed310ab2428e94d061663367f213c5903f68768680492d651524ef1e7594417335de529463d63b8d8a4d1cc8b6445358f1b97a33
+DIST accountsservice-0.6.45.tar.xz 382740 SHA256 fb0fc293aa75d59f5ef5db719d37a21831c4dd74a97526ee7e51ce936311ef26 SHA512 09975f9fa03a3177d923de6d6f6e6acfffeb2ff4924c45eaac78c994c16974427c8e936a87034747ba494d2bb3df6e8a92ff44db387761b06e06e311d7cf105a WHIRLPOOL 5dce6fc957da0d039f03ba0f9bf06710ecf4d39d81cd6d745bea5358b7bfb582d124a43f7df7603b61d699337ff29c7b0e3c8296da865aa6f260f566e8f86145
+EBUILD accountsservice-0.6.43-r1.ebuild 1538 SHA256 c107ca21b7a4d0844cfc5e8f39ccde2a9498fc9369edf82ded479e77db47f25d SHA512 1e4b22e1ec47f4617493d47a21d8e4ae99157384200571b65cfb246679c2856f481ee5b1ca17a76765c9f07b1c85cb57378b5db3663342a14dd43f316f71fe63 WHIRLPOOL 4aef63e1770e1805533a529cb2d96ef116c997d9de45830f67a84e401788825db03b880ffa317ba3c6bcf99d2260e2da8a76fad39c261c285cae923620276445
+EBUILD accountsservice-0.6.43.ebuild 1350 SHA256 c28aede58cd4c3f4b4c5b122cf1df93c1329bc9610f82b779aa32a364be325ff SHA512 e73282aa0ac8272e653a2c249a691702e0eb71cce80dacdc89c9b3650b23e1fafd5dd6a1cd915a39e2a8bdcd76eac0188a00bef02948d622b4cdba3afa815660 WHIRLPOOL abac720ecb05bd04f00212c32362546e39c03455da1a9b8ca93e9c582bc9e505933ef16990e754e71dba950db0839036b35926465966daf18501fa95b524e6df
+EBUILD accountsservice-0.6.45.ebuild 1548 SHA256 5074cb1fa2695a51c57e7b4c571e4014a236c070e6a95041e44ccf841840508b SHA512 9e271fabe2a6cee6c1837528c359eceabe95716fbd701e0262bf48f25daa987ab91220e0ee74efaaf8253dec77e0323b1da51687a7563a869dfd696de98f2591 WHIRLPOOL 68838f7362182a1ccb7d0407b941a423c9811011f05a63399b185e6c95e73dc4970ba62cbe659e06890f43f3525b34c32ba668aebd0250818b65e55e8f9fd461
+MISC ChangeLog 4660 SHA256 75aa7970a9f01c40b551539d2acd056606172c27b1172adb97f4be7ef3fad5da SHA512 56ee730dac1b25cd14d3d018a8b362cb80c333add0f832a573030e0576ebf93014211a64ca6106801e768401af9e8de4ab5652952848ff0065b4a0e2ac4ee994 WHIRLPOOL 31471be4823697718fb82a1061b5cbf7a77cb864df07ea72ca100cb756acd5cd5bf15bde5091b32c554c3e365d0cc656fb61b32205b884b5183d5664f7cc2229
+MISC ChangeLog-2015 10553 SHA256 3447f0c217130cf71afaa81fe09c153cc5ead192811825a4c3b5d84b1462e218 SHA512 dcedeaed8b2ae2498e9bf69315e1f1cc10681e26a9417300dd2bce763fba9c4cf3846c5c54a45801e0333cd977d9374307c86ca3cd5aca599ad1a513958f63a9 WHIRLPOOL ab3202c4e0f174029916b89e676e95b6ca1b86c2820ce58941933d4ad059add5be5f5a15cc96b97c28fc842071ae5fd25f47214e1b82310c13cbd76f80882354
+MISC metadata.xml 524 SHA256 c1df2efad39b5d939c4fc58523088160d252a5a23eedabf675261fb4a10e2a3b SHA512 a0c662b3c0c45df43780f160b6db6db67561a1b2c84ce60929707d94cd9f1bf76588420189b91e0eafe58001a61d8a313f2a4b421b980a7c7f988c95e782ee07 WHIRLPOOL 6584ed3c6ba861aa01f56ef558ba5f4a8852243b7fd72e454d1ec3bf2edc1f61313bca357ebbb56f91919cdaf7917710fa3060542c91fe8485511d44d310880c
diff --git a/sys-apps/accountsservice/accountsservice-0.6.43-r1.ebuild b/sys-apps/accountsservice/accountsservice-0.6.43-r1.ebuild
new file mode 100644
index 000000000000..48024bd413af
--- /dev/null
+++ b/sys-apps/accountsservice/accountsservice-0.6.43-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GNOME2_EAUTORECONF="yes"
+inherit gnome2 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+IUSE="doc elogind +introspection selinux systemd"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+CDEPEND="
+ >=dev-libs/glib-2.37.3:2
+ sys-auth/polkit
+ elogind? ( >=sys-auth/elogind-229.4 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+ systemd? ( >=sys-apps/systemd-186:0= )
+ !systemd? ( !elogind? ( sys-auth/consolekit ) )
+"
+DEPEND="${CDEPEND}
+ dev-libs/libxslt
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.15
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.35-gentoo-system-users.patch"
+ "${FILESDIR}/${P}-elogind.patch"
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --disable-more-warnings \
+ --localstatedir="${EPREFIX}"/var \
+ --enable-admin-group="wheel" \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(use_enable doc docbook-docs) \
+ $(use_enable elogind) \
+ $(use_enable introspection) \
+ $(use_enable systemd)
+}
diff --git a/sys-apps/accountsservice/accountsservice-0.6.43.ebuild b/sys-apps/accountsservice/accountsservice-0.6.43.ebuild
new file mode 100644
index 000000000000..86a4a8472f8d
--- /dev/null
+++ b/sys-apps/accountsservice/accountsservice-0.6.43.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~sparc x86"
+
+IUSE="doc +introspection selinux systemd"
+
+CDEPEND="
+ >=dev-libs/glib-2.37.3:2
+ sys-auth/polkit
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+ systemd? ( >=sys-apps/systemd-186:0= )
+ !systemd? ( sys-auth/consolekit )
+"
+DEPEND="${CDEPEND}
+ dev-libs/libxslt
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.15
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.35-gentoo-system-users.patch"
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --disable-more-warnings \
+ --localstatedir="${EPREFIX}"/var \
+ --enable-admin-group="wheel" \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(use_enable doc docbook-docs) \
+ $(use_enable introspection) \
+ $(use_enable systemd)
+}
diff --git a/sys-apps/accountsservice/accountsservice-0.6.45.ebuild b/sys-apps/accountsservice/accountsservice-0.6.45.ebuild
new file mode 100644
index 000000000000..fb05d15bebcc
--- /dev/null
+++ b/sys-apps/accountsservice/accountsservice-0.6.45.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_EAUTORECONF="yes"
+
+inherit gnome2 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="doc elogind +introspection selinux systemd"
+REQUIRED_USE="?? ( elogind systemd )"
+
+CDEPEND="
+ >=dev-libs/glib-2.37.3:2
+ sys-auth/polkit
+ elogind? ( >=sys-auth/elogind-229.4 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+ systemd? ( >=sys-apps/systemd-186:0= )
+ !systemd? ( !elogind? ( sys-auth/consolekit ) )
+"
+DEPEND="${CDEPEND}
+ dev-libs/libxslt
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.15
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.6.35-gentoo-system-users.patch
+ "${FILESDIR}"/${PN}-0.6.43-elogind.patch
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --disable-more-warnings \
+ --localstatedir="${EPREFIX}"/var \
+ --enable-admin-group="wheel" \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(use_enable doc docbook-docs) \
+ $(use_enable elogind) \
+ $(use_enable introspection) \
+ $(use_enable systemd)
+}
diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch b/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
new file mode 100644
index 000000000000..39ebf42ea6ac
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
@@ -0,0 +1,51 @@
+--- a/src/user-classify.c.old 2013-12-04 20:29:48.944454769 +0100
++++ b/src/user-classify.c 2013-12-04 20:32:59.728283477 +0100
+@@ -55,6 +55,48 @@
+ "at",
+ "gdm",
+ "gnome-initial-setup"
++ /* Additional Gentoo system users with non-trivial login shell */
++ "amanda",
++ "backuppc",
++ "drqueue",
++ "firebird",
++ "flexlm",
++ "foldingathome",
++ "geneweb",
++ "git",
++ "gnump3d",
++ "hacluster",
++ "hg",
++ "hsqldb",
++ "infinote",
++ "foldingathome",
++ "geneweb",
++ "git",
++ "gnump3d",
++ "hacluster",
++ "hg",
++ "hsqldb",
++ "infinote",
++ "jffnms",
++ "klive",
++ "mailman",
++ "mpd",
++ "mythtv",
++ "nagios",
++ "nx",
++ "oneadmin",
++ "openvpn",
++ "p2p",
++ "phxd",
++ "resin",
++ "rplayd",
++ "scponly",
++ "secoff",
++ "tinyproxy",
++ "ttrssd",
++ "vboxguest",
++ "vdr",
++ "vdradmin",
+ };
+
+ #define PATH_NOLOGIN "/sbin/nologin"
diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch b/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
new file mode 100644
index 000000000000..cd3510eab863
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
@@ -0,0 +1,110 @@
+From 9fdd1d95ec094a0df6d8d3dd9c8f04fa8499b845 Mon Sep 17 00:00:00 2001
+From: Sven Eden <sven.eden@gmx.de>
+Date: Tue, 6 Jun 2017 10:17:33 -0400
+Subject: configure: elogind on non-systemd systems
+
+This commit adds some configure goo to make accountsservice use
+elogind if explicitly requested for systems that don't have
+systemd.
+
+diff --git a/configure.ac b/configure.ac
+index b255e72..4b21477 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -264,22 +264,24 @@ dnl Check for xsltproc
+ dnl ---------------------------------------------------------------------------
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+-# systemd
++# systemd or elogind
++
++have_systemd=no
++
++AC_MSG_CHECKING([whether to use systemd])
+
+ AC_ARG_ENABLE([systemd],
+ AS_HELP_STRING([--enable-systemd], [Use systemd]),
+ [enable_systemd=$enableval],
+ [enable_systemd=auto])
+
++AC_MSG_RESULT($enable_systemd)
++
+ if test x$enable_systemd != xno; then
+- PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
+- [have_systemd=yes], [have_systemd=no])
+-else
+- have_systemd=no
++ PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
++ [have_systemd=yes])
+ fi
+
+-AC_MSG_CHECKING([whether to use systemd])
+-
+ if test x$enable_systemd = xauto ; then
+ if test x$have_systemd = xno ; then
+ enable_systemd=no
+@@ -288,21 +290,54 @@ if test x$enable_systemd = xauto ; then
+ fi
+ fi
+
+-AC_MSG_RESULT($enable_systemd)
++have_elogind=no
++
++AC_MSG_CHECKING([whether to use elogind])
++
++AC_ARG_ENABLE([elogind],
++ AS_HELP_STRING([--enable-elogind], [Use elogind]),
++ [enable_elogind=$enableval],
++ [enable_elogind=no])
++
++AC_MSG_RESULT($enable_elogind)
+
+ if test x$enable_systemd = xyes; then
+ if test x$have_systemd = xno; then
+- AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
++ AC_MSG_ERROR([Systemd support explicitly requested, but libsystemd not found])
++ fi
++
++ dnl Requesting to use the elogind session tracker makes no sense where
++ dnl systemd-login is (or might be) running.
++ if test x$enable_elogind = xyes; then
++ AC_MSG_WARN([elogind support requested, but systemd was found.])
++ AC_MSG_ERROR([Disable either elogind or systemd support.])
+ fi
++
++ AC_SUBST(SYSTEMD_CFLAGS)
++ AC_SUBST(SYSTEMD_LIBS)
++
++ LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
++ LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
++
+ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used])
+ fi
+-AC_SUBST(SYSTEMD_CFLAGS)
+-AC_SUBST(SYSTEMD_LIBS)
+
+-LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
+-LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
++if test "x$enable_elogind" != "xno"; then
++ PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4],
++ [have_elogind=yes])
++
++ if test "x$have_elogind" != "xyes"; then
++ AC_MSG_ERROR([elogind support requested, but libelogind not found])
++ else
++ AC_SUBST(ELOGIND_CFLAGS)
++ AC_SUBST(ELOGIND_LIBS)
++
++ LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS"
++ LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS"
++ fi
++fi
+
+-if test "x$have_systemd" != "xno" ; then
++if test "x${have_systemd}" != "xno" -o "x${have_elogind}" != "xno" ; then
+ AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support])
+ fi
+
+--
+cgit v0.10.2
+
diff --git a/sys-apps/accountsservice/metadata.xml b/sys-apps/accountsservice/metadata.xml
new file mode 100644
index 000000000000..69657d082aea
--- /dev/null
+++ b/sys-apps/accountsservice/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 type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+ <use>
+ <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> instead of
+ <pkg>sys-auth/consolekit</pkg> for session tracking</flag>
+ <flag name="systemd">Use <pkg>sys-apps/systemd</pkg> instead of
+ <pkg>sys-auth/consolekit</pkg> for session tracking</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/ack/Manifest b/sys-apps/ack/Manifest
new file mode 100644
index 000000000000..3f3199152974
--- /dev/null
+++ b/sys-apps/ack/Manifest
@@ -0,0 +1,6 @@
+AUX ack-2.14-gentoo.patch 431 SHA256 7da2f216647e650c63c27b9ff116e977b43a4665b7fea2a44c10b60491f0dd38 SHA512 5eeceda1a764358b4d7f8836cce41d21cdb895f2763325ddfd7ad7456af3d55807113a3702834f097fd513fef20db8de4003344d9ea73a58dac64d4c68e0e99b WHIRLPOOL 7b3e57c7bd937cdfd35038de94db500bd06c9bfd83097b22d8dfc17f2e2baaafd51a4999e296ae83d449b1c668d9eb6e7f21cf812397c2f5e6913eb1c0ae374f
+DIST ack-2.18.tar.gz 232279 SHA256 fb4a0a11a5411cba5764163b8d074a447c2a753758821151b31dc7533663f058 SHA512 4147161baa8d82fb84b29980d5eac7cf3197733192ca827d3fa4e8f55fa9df29d92b2ac21beb69df00186eea03c7ae6fcb85d6e4334a0a21c232ddeb4933bcf5 WHIRLPOOL 03354c31968f39b72b1c88649e4c3ce00619fa1e86540c12ec6f4f9a819e67e5e431358818526c931baabcf3ad8292acfc87c951f8c227aa2acd8487a85f5241
+EBUILD ack-2.18-r1.ebuild 779 SHA256 55a4c2ec1434cbd7c0503dd6460f990da20314ed83e457fb05bd0eb059494db9 SHA512 425f9a474dba32f7871224806905a7fb553110c50c7d7546a9b42209227b495ae2b8e839b097f71e15b7a1f3bae19336b32522eedde483975cd7b428a82edd4c WHIRLPOOL 235c653ccfcea93db4e679ebb94bae554926f8845026ba9e71d1ee82a23029f662220aed3d2d1f00d706ee66a0c16d6165c1097e2de3a5ad822cefa7ab90466e
+MISC ChangeLog 2192 SHA256 d1231d87436e984d2cf3e5c90a31c4211aa2774554d2a39341cd4f3610f83303 SHA512 b0159a5e1bbc8f84db3474e3f0f3ba6f67965144f043a99de0fd521ffd94239cd8d3d74071f2e7b7550aedffe61c4289ddd545458d12ebff779e88cffbf4f66c WHIRLPOOL 694c1b633a6a506bca68659d8a236957cf73320dbd744d5b9dcc371812532c7e32d9a3ae8a502dc570e283c33e78bf52355c0f9d20cd0fb9403ee57106fb32a3
+MISC ChangeLog-2015 5290 SHA256 4347b335ae56dfd45f6f753a174223b59c8d472d839587e64b026c7aea741ae0 SHA512 3eb6609c018d0faed1c791280f1d95130c3d66c682f585d5445d77fec07da5a33f8cdddf2a9c5b5ba36198d22272cfedfb817a41daf0461f71c3cd31db8ca1f6 WHIRLPOOL 6170df88e4ac50b99eaae35f71245a7d25f357458b2e35f0fb34920098e7d8150b87c386aa24c2b8c8117672fbb3a4d742967d7e408608d05cb3dd10fe52422c
+MISC metadata.xml 1725 SHA256 ea17e6f8fec12500f0de51c0d6b7886fb1a414bac570af8bbc594ec893376d8a SHA512 9ceab2bd4b599aa83b1b780b322b753a5bdfb51b4883aa804907f5d5d8420276c75a04ae717f8520778cb3fc25ba4c4a710a64ddd49193f050992436c0faeb8f WHIRLPOOL b863ba820547021aa6ca1ac215c39c03dd4c948de3fd99da5b1f785e4b787403a8dc490e6f5399127b3992f881a03d5e0aeec56463c753a17d72a4905afe9c2b
diff --git a/sys-apps/ack/ack-2.18-r1.ebuild b/sys-apps/ack/ack-2.18-r1.ebuild
new file mode 100644
index 000000000000..b2905c70da31
--- /dev/null
+++ b/sys-apps/ack/ack-2.18-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+DIST_AUTHOR=PETDANCE
+inherit perl-module
+
+DESCRIPTION="ack is a tool like grep, optimized for programmers"
+HOMEPAGE="http://betterthangrep.com/ ${HOMEPAGE}"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="test"
+
+RDEPEND=">=dev-perl/File-Next-1.160.0"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/IO-Tty )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.14-gentoo.patch )
+
+src_test() {
+ # Tests fail when run in parallel and if dev-perl/IO-Tty is installed
+ # which enables interactive tests that need to read from stdin. If IO-Tty
+ # is not installed the related tests are skipped.
+ MAKEOPTS+=" -j1" perl-module_src_test
+}
diff --git a/sys-apps/ack/files/ack-2.14-gentoo.patch b/sys-apps/ack/files/ack-2.14-gentoo.patch
new file mode 100644
index 000000000000..80f0747deef9
--- /dev/null
+++ b/sys-apps/ack/files/ack-2.14-gentoo.patch
@@ -0,0 +1,22 @@
+--- ack-2.14/ConfigDefault.pm
++++ ack-2.14/ConfigDefault.pm
+@@ -252,6 +252,9 @@
+ # http://en.wikipedia.org/wiki/Fortran
+ --type-add=fortran:ext:f,f77,f90,f95,f03,for,ftn,fpp
+
++# Gentoo http://www.gentoo.org/
++--type-add=gentoo:ext:ebuild,eclass
++
+ # Go
+ # http://golang.org/
+ --type-add=go:ext:go
+--- ack-2.14/t/ack-filetypes.t
++++ ack-2.14/t/ack-filetypes.t
+@@ -26,6 +26,7 @@
+ elisp
+ erlang
+ fortran
++gentoo
+ go
+ groovy
+ haskell
diff --git a/sys-apps/ack/metadata.xml b/sys-apps/ack/metadata.xml
new file mode 100644
index 000000000000..d1ff84260b81
--- /dev/null
+++ b/sys-apps/ack/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpan">ack</remote-id>
+ <remote-id type="cpan-module">App::Ack</remote-id>
+ <remote-id type="cpan-module">App::Ack::ConfigDefault</remote-id>
+ <remote-id type="cpan-module">App::Ack::ConfigFinder</remote-id>
+ <remote-id type="cpan-module">App::Ack::ConfigLoader</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Collection</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Default</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Extension</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::ExtensionGroup</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::FirstLineMatch</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Inverse</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Is</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::IsGroup</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::IsPath</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::IsPathGroup</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::Match</remote-id>
+ <remote-id type="cpan-module">App::Ack::Filter::MatchGroup</remote-id>
+ <remote-id type="cpan-module">App::Ack::Resource</remote-id>
+ <remote-id type="cpan-module">App::Ack::Resources</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/acl/Manifest b/sys-apps/acl/Manifest
new file mode 100644
index 000000000000..6d0517690579
--- /dev/null
+++ b/sys-apps/acl/Manifest
@@ -0,0 +1,5 @@
+DIST acl-2.2.52.src.tar.gz 386604 SHA256 179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23 SHA512 59973199d371cd0b2368e95bc829a1b47f04e808a174fefba4c6854e766158bd19a71d9dbcc8d6fdc1573a1f971cdda39c453f7fa243bce02c1ab97c6e7c72e7 WHIRLPOOL 19bcc46e56ce0226e084bb6f86e411b09418d53f094f478afd60c3c568cf2066d9f0352a4da20f6f41d6e08c13412a182a7306aa3fbe2a248d1f6388856f63a2
+EBUILD acl-2.2.52-r1.ebuild 1533 SHA256 7577d764a37ccf6becc65566406ccfc118c35ab5fb81ec4ece2d49160ca13091 SHA512 ecd38a5958715e40c23390f7d38f29aa604fd4219a56293e87b2dabfab83462fa803a909dbc6d9105541535db6c63f5331d757a06d92874f59b4c044881dd81c WHIRLPOOL 76cc38be081bad260e747cf1a7fca7b19c4c0da4fc597dd0e8639df3aa94cd07f8aa7649d06729498409a290abd7286381c09ff98100caae4fd6c2a8df1fb4aa
+MISC ChangeLog 4106 SHA256 674d344b5e9cdb385e379961972758bd2cbc30933e4afbf5fae4cbed481fcb6e SHA512 8ff8349dc3e26666bb41697d217fe47c81a7dc7cc7e9eaca82542e021a60c6048650c4615cd743dbfc12f096ab2c27036b8cc6ea7b9a9bc59d92852d453ba5dd WHIRLPOOL 9b809d7ca485c69d4eb506fbf49937f3bf0a8522bfab0d94a309a1157cff9b7f7c3c9d98579027ee2e6499f536f5cdd913bea35e68fecabd574140e08191ac1c
+MISC ChangeLog-2015 17075 SHA256 b3245afbc8451740e14ac7ff0567016824df6bf0abb18e558f59aecb3f7598fa SHA512 d32e55c6a849c4889f252169fad7c43d5b2231e8647ffad55915fbee7a8350ed1c433d20bb3a45f2598dff597e275711d4bf4e77565276fc048f91d154b93f06 WHIRLPOOL cd3e23dc4b01618aea7ffcafc2765b8e6f1319dec9bdbbc294323f1aaf5c765c659611f95b91f9ef280f722c8af9b1a263e36eafc347ad053749da60fcceeea3
+MISC metadata.xml 293 SHA256 64c9f2ce9e6a4f9a73ad74091a70c036fa5732c13888071923a8bf98808e2970 SHA512 1e61b3f2d76e95eca037de073678326400b069526c8a308ca4169ce67d3e47c8cd199cca59f83fa245bb5fcbaa9efe7f31e34cf8588d69383ed0da78ab54cfaa WHIRLPOOL 8e053c7a72febcdaa4c2ea200e06d30595c4243451072f1303ce2dce9b7a462b09cbe30b1f777127aec31dcb70a225d117744602547b089ec384e5c176fb7b89
diff --git a/sys-apps/acl/acl-2.2.52-r1.ebuild b/sys-apps/acl/acl-2.2.52-r1.ebuild
new file mode 100644
index 000000000000..3420a6f7fc2d
--- /dev/null
+++ b/sys-apps/acl/acl-2.2.52-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="access control list utilities, libraries and headers"
+HOMEPAGE="https://savannah.nongnu.org/projects/acl"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="nls static-libs"
+
+RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ -e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \
+ include/builddefs.in \
+ || die
+ strip-linguas po
+ elibtoolize #580792
+
+ # same as https://savannah.nongnu.org/bugs/index.php?39736
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ unset PLATFORM #184564
+ export OPTIMIZER=${CFLAGS}
+ export DEBUG=-DNDEBUG
+
+ econf \
+ $(use_enable nls gettext) \
+ --enable-shared $(use_enable static-libs static) \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+ --bindir="${EPREFIX}"/bin
+}
+
+multilib_src_install() {
+ emake DIST_ROOT="${D}" install install-dev install-lib
+
+ # move shared libs to /
+ gen_usr_ldscript -a acl
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files --all
+}
diff --git a/sys-apps/acl/metadata.xml b/sys-apps/acl/metadata.xml
new file mode 100644
index 000000000000..ede75b33fdb6
--- /dev/null
+++ b/sys-apps/acl/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 type="project">
+ <email>base-system@gentoo.org</email>
+</maintainer>
+<upstream>
+ <remote-id type="cpe">cpe:/a:xfs:acl</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/adjtime/Manifest b/sys-apps/adjtime/Manifest
new file mode 100644
index 000000000000..f57d5ad7bf27
--- /dev/null
+++ b/sys-apps/adjtime/Manifest
@@ -0,0 +1,5 @@
+DIST adjtime.zip 2805 SHA256 64d0ffe0510ce727c3ead8bbc1e3c923a463253b375579b31040815cb6014800 SHA512 cc0f16ca19fea240300f9e0a9eddcefa07cb21f59fe4da8e7132dc75ec26ecaf7036ee6d282f8a488005b40077931e1cadc5634095aa0ff402f375bc0e83a1c0 WHIRLPOOL be5bec263c81fbbf97fb90dbe2df8351181a3c42dba00759700d71798dea93327731cc0647049781cdc0177bb943ae6b457299fe9cf32d4b77d6c88776216e16
+EBUILD adjtime-0.4-r2.ebuild 1241 SHA256 e5547f39b75059656dfc6b67034309ead95b3426ea4f78ea98ea6e7c310f61c7 SHA512 7a98a10acfbb9f2a30d5c6e519e07296d4ea114c08474333cf3cb6d240c8dd4b0ee1fdf450a6cc639213e3996c27926bfe9aa6ecaf68c7b763e906ddc31e939a WHIRLPOOL 8d0870d833b1f14c3d18253fb8f5310f3bc279920a9538465125b909f87c3ac2c724a0897b0965beeb64085a9c6a9d0ed2741a78fc90bb0082728779f99a7a8e
+MISC ChangeLog 2429 SHA256 0ff78a70c2dae6c1297d65a14d22673299bfe75b9f9c0b0428bf940ec519e527 SHA512 3b23f2ca69531e12e99593b21162bf6b8d2a624c66356c1d12aefbce0b9e2d233f9a0e5166bc39d81d6a79e1530160f141cc1051074f6616e0d550ed454fa9e9 WHIRLPOOL a290d7f3200b7bbcd21641daa766395bf923a2bc2ac0e8a40f0978a1c4a185e7063294e0183466ffbdb49993875e60fa1161ebf8284df06ddd0c57f58056bef1
+MISC ChangeLog-2015 1644 SHA256 41c67a870a96e8cbadeade3ba04137098b00785da893876d342924e44ac2266d SHA512 6c7a37c9f7bfa109058a876b128f480024ab7961142d49996e122adcadacb6f1e11287f5601ce1cd931a77c1c4a4cd1e27f8495387f7505a511a05785e76e1ed WHIRLPOOL 56c07b5a34462f73bd735d60d1d98a6c6efdaecbe0a4bc983f9bb732c3278ceda4fd91aed9a71994d3df563b87a33c0bc8f73428adb7803b13b0decbf04ef8cb
+MISC metadata.xml 455 SHA256 0f482d17bdf5da7ed98f6c8154a4bf959e2d3bb838660d16330cd86be150401a SHA512 56fbcfffe514b2ec0cf553fc2ed76ad73b4cbabad137b2d746c55b7ec4504cabdda1dfb4985ea434ee9d100d18cbf9f9ac795472380189d3386d9c2eea863221 WHIRLPOOL d3011fd79024b2fbb7aa5f81e0eb785b5e2bc70e2b135cc3d72d47ad0f6d04cb94e181fde02789a6c35f19322d3fb8f4d67411756e315b1ca2bcb4e28081a720
diff --git a/sys-apps/adjtime/adjtime-0.4-r2.ebuild b/sys-apps/adjtime/adjtime-0.4-r2.ebuild
new file mode 100644
index 000000000000..cae97c111c48
--- /dev/null
+++ b/sys-apps/adjtime/adjtime-0.4-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="A perl script to adjust the clock tick of the hardware clock on the system board"
+HOMEPAGE="https://groups.yahoo.com/neo/groups/LinkStation_General/info"
+SRC_URI="http://www.gentoogeek.org/files/${PN}.zip"
+
+LICENSE="all-rights-reserved" #441922
+SLOT="0"
+KEYWORDS="ppc"
+RESTRICT="mirror bindist"
+
+DEPEND="app-arch/unzip"
+RDEPEND="dev-lang/perl
+ >=net-misc/ntp-4.2"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ sed -i -e 's:/usr/sbin/tickadj:/usr/bin/tickadj:' adjtime.pl || die
+}
+
+src_install() {
+ dosbin adjtime.pl
+}
+
+pkg_postinst() {
+ ewarn "There have been issues with running adjtime as an init script"
+ ewarn "(the shell environment for perl is dorked up). The suggested"
+ ewarn "method is to use ntp-date rather than ntpd at startup, and"
+ ewarn "add the following two lines to local.start instead:"
+ ewarn
+ ewarn "/usr/bin/perl /usr/sbin/adjtime.pl -v -s ntp_host -i 60"
+ ewarn
+ ewarn "/etc/init.d/ntpd start"
+ ewarn
+ ewarn "replacing ntp_host with your preferred ntp server. Remember,"
+ ewarn "since adjtime uses ntp-date, ntpd must be stopped (or not yet"
+ ewarn "started) prior to running the adjtime script."
+}
diff --git a/sys-apps/adjtime/metadata.xml b/sys-apps/adjtime/metadata.xml
new file mode 100644
index 000000000000..f1525a5b549b
--- /dev/null
+++ b/sys-apps/adjtime/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 type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+</maintainer>
+<longdescription>A perl script to adjust the tick on the Kurobox and
+ LinkStation hardware clock (required to keep an accurate clock).
+ Should work on most hardware platforms.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/agedu/Manifest b/sys-apps/agedu/Manifest
new file mode 100644
index 000000000000..9ee944cddf81
--- /dev/null
+++ b/sys-apps/agedu/Manifest
@@ -0,0 +1,12 @@
+AUX agedu-r9671-fix-automagic.patch 1847 SHA256 64230e46ec27d5da72f50ca455af46e4ac4dfbf922a8b9f89859c1d109eb321c SHA512 a85805f0d8bbb61964719d246d033c9423fa90f4b7a29fa4d48bd0ef69ee58304b6fa45b9c0a6024f0f05ff64dd164d23cb93791e0f1611363a51bfc993d00e0 WHIRLPOOL 7d8be526757f483ff8625e8f6ce3d07e9533f8becaf841157feafd27342c264dd279cc09ea7870f1ee6eefb63f19bcf3697c8fac5a29d418ffb81d6b7ebefbce
+DIST agedu-20151213.59b0ed3.tar.gz 164928 SHA256 c24eaa0b0e9f9c3474fa6a4aad7baff3b557a82e7b72276b2a557e37afafb612 SHA512 757e19397b6e26e6542b21b8f7cfafd29ef263e6892ff0d76ee52ac40b4af8b88c5af3be46340619358866537d97a31a36dd473cd6d660a7e41d6dfb58428a41 WHIRLPOOL 2c20ef719326187e4d3d6d91606e908a05683033c357d7880d22528ced599b1abbca8a9d320741b6e4fc64c4335aec3727192b7e3d60c753249a73c7ac0674a9
+DIST agedu-20160906.853cea9.tar.gz 166835 SHA256 da0ebafbac9075e2a4aa81ae70387aceea591a58fa499699d58b30c5b8c46dac SHA512 a5b0b7c5ba4acb2b60def43ab661ef25f0fa5622a080e132b80c918a6800f0c12b9cf2688b604693559fcd8a0e6c50c8bdff6142b8be11d06ac0c1743936fbf1 WHIRLPOOL b473291d7fc5790226b2830d6620c435c4ecbbb3ee406fb8f33f47891a7b518d335bb0dafb00153117b5fd97016ea4ecface5fec3d796404d9744bc5738767db
+DIST agedu-20160920.853cea9.tar.gz 176763 SHA256 9c52eefe4932a4c07a30a79dbf2089982443817002ab9eabb478063113df5e18 SHA512 494dcdaece7ebe69ffd050f1abe8b0f7722cf9e26bfc0819fef992f08d62ce9557a7e0325a16e69adf7ea102eb3a416628457f8841a00f0086a51ed69e2aa36b WHIRLPOOL bf7f7d38ec8ba7c5a6007da6a0bc65d155fd45c19364ba18b4bf52066e5ea1f56cb05e7910cc42f07bd4e237deeddf44958646ed462005da711a7b7a1960d2a3
+DIST agedu-20170831.fc6b2b5.tar.gz 175900 SHA256 dd2e6f82270c5bf6083c0d275251207607d8b68955511b3083cec477279267bf SHA512 6e9255776b668de33209486d6fcdcf68e1d4785bd84e2d5392ac71d13e54c7b156d9959e681fefc9b965b43727fbab13ef0b1e1e7587fd56d8dea29568dd0e75 WHIRLPOOL 736bc07dedad0653cf250a0efac987d9e4123cec0ee45d278b70a2d020f80c60c9d40840228442083ac109f2bc6f5b196f59d64fada3331a5a92b134b8f6c320
+EBUILD agedu-20151213.ebuild 827 SHA256 503e102523131c59b80b18dda2af4771a2b892fd5a7d265c4c4361c6b09e690d SHA512 e16b7aabfcdc5cd0c0fe2ef870a073544bf5fff557d8a07caee87877617da3d75dc621c43f041e11078896f6527e3949ef48db31ae09b4b9317dd0c83493d5c9 WHIRLPOOL 6dbeb233d9557c65d0aba7698b2a3c72b6bc3fed702592c28567465724d4409d567d57718c8a5d3d8335840f08af98764212723556d715e80c6f6c20ac1c2b39
+EBUILD agedu-20160906.ebuild 840 SHA256 b7c82be8a76e5ca0ea58997a312c0190618ccdee051c03631a9480563971952a SHA512 6ae943e5261cce091ef4900366428709a931dd99da50e690853e295921f6f0cc94354b118df115b91997f790861d8dfad4ec4424c18d91f55d9b05dff17ab1eb WHIRLPOOL 928921525e6b98751e9f02aae6a7a19b6d658aa1187cb1e064fa914bc244f5c90e9aea7f95a7231da6ef178e5fcd6c9b2670f63f2e1ce47ae2603423cd694bf2
+EBUILD agedu-20160920.ebuild 840 SHA256 46a26b3cbdb774bfb8cf30513ea27384d32ea4a19ad99b8ac2d331d2c0dfc69e SHA512 5950f9ddd1160e222c3980012f87d71d87c2385f383c4d1a97315cfacb19a9d2f73da4000bce237a94dc6ac667c65acc6e21fe494799b8218ff6d189825a5176 WHIRLPOOL e1e55868457b31bfcdf4b51ac1c57229ca136c4c2f6c04de9fe61b173677070e663357c2ad234f7870ce9511fa7631dc5fb8a811a2eaa4d79397d58d31aec879
+EBUILD agedu-20170831.ebuild 840 SHA256 64e020fc56e5cbe0db50d096a9f0676c1cab98f1a752c6d72caee1d082d65252 SHA512 417a5192d96169e5def5c72697971a10c9e430d91a1f15cd45dfe44396b730ec7c27b7910b7cef49345bcc9b5d8935344431bcab90206aee317951dcabf8b2b8 WHIRLPOOL d53e2a53757a5a836e470e96cefdda73683dcc2111e3fd5453d9095b5c590733599a9403336910b6f2d34a74833d17d731dec5f401a6a4e7509c39d1f679c69e
+MISC ChangeLog 3224 SHA256 51dd74b822694d83ebd22ffb4ab3e12cafb108b6724b54306bfbb081533b52bf SHA512 71d2f09808d105addf4bb5d2f94b40a2cbb1f430c23e70074d310597e7fab205aa12bb6fd9dd613dbb2680041421545ac9e47df8573a634df36350e8762b0b75 WHIRLPOOL b4ad9dcdf0edb00d23389623d398be731f43cb62699c2a996f29ca7e0d00c07b79378d946abbd44b7ed0d52b5644829b6bb0ddc6e5cb430544d27e5328118a44
+MISC ChangeLog-2015 1261 SHA256 b2daf3dc7f0215fcd5277f4d63991af0ca5ba633436c67c22f0f9555ebd92cd6 SHA512 a170dea7e4779bf1a47f48ff1a6dc4632981d821cd77f77c0c31058d0743430f45939d8c0c007b1bce36f865befeb9810195a26a91c6adb599cdacf5e62c6e49 WHIRLPOOL d328e04898828db3e823a4d4e14d5d6d6757a1e478054ec53337f6d96cf81910100266098ce34761ab25913aebff9193acd7fe6bb467aec6ec5b6e0072edb253
+MISC metadata.xml 252 SHA256 a590e5133cd97a615db4f977b0e28e5c60c56cac76eb3d339109cdf379003b60 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65 WHIRLPOOL b209a730a169969b9e3c4d4612368bc5b30bfa5fae275d98d83ba96fd0ad01d308a8fed4f7d67a7c9fa417c624dfeb23ce89ab58923a8a0b5b1bd68ee73f288c
diff --git a/sys-apps/agedu/agedu-20151213.ebuild b/sys-apps/agedu/agedu-20151213.ebuild
new file mode 100644
index 000000000000..4a021c7748ca
--- /dev/null
+++ b/sys-apps/agedu/agedu-20151213.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils
+
+# agedu-20151213.59b0ed3.ebuild is not a legitimate name
+# so we'll drop versionator and just set MY_P manually.
+MY_P="${PN}"-20151213.59b0ed3
+
+DESCRIPTION="A utility for tracking down wasted disk space"
+HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/agedu/"
+SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/agedu/${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ipv6"
+
+DEPEND="doc? ( app-doc/halibut )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-r9671-fix-automagic.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-ipv4 \
+ $(use_enable doc halibut) \
+ $(use_enable ipv6)
+}
diff --git a/sys-apps/agedu/agedu-20160906.ebuild b/sys-apps/agedu/agedu-20160906.ebuild
new file mode 100644
index 000000000000..ddf32f62b617
--- /dev/null
+++ b/sys-apps/agedu/agedu-20160906.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils
+
+# agedu-20151213.59b0ed3.ebuild is not a legitimate name
+# so we'll drop versionator and just set MY_P manually.
+MY_P="${PN}"-20160906.853cea9
+
+DESCRIPTION="A utility for tracking down wasted disk space"
+HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/agedu/"
+SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/agedu/${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ipv6"
+
+DEPEND="doc? ( app-doc/halibut )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-r9671-fix-automagic.patch"
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-ipv4 \
+ $(use_enable doc halibut) \
+ $(use_enable ipv6)
+}
diff --git a/sys-apps/agedu/agedu-20160920.ebuild b/sys-apps/agedu/agedu-20160920.ebuild
new file mode 100644
index 000000000000..6a605001694a
--- /dev/null
+++ b/sys-apps/agedu/agedu-20160920.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils
+
+# agedu-20151213.59b0ed3.ebuild is not a legitimate name
+# so we'll drop versionator and just set MY_P manually.
+MY_P="${PN}"-20160920.853cea9
+
+DESCRIPTION="A utility for tracking down wasted disk space"
+HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/agedu/"
+SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/agedu/${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ipv6"
+
+DEPEND="doc? ( app-doc/halibut )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-r9671-fix-automagic.patch"
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-ipv4 \
+ $(use_enable doc halibut) \
+ $(use_enable ipv6)
+}
diff --git a/sys-apps/agedu/agedu-20170831.ebuild b/sys-apps/agedu/agedu-20170831.ebuild
new file mode 100644
index 000000000000..7ee036858146
--- /dev/null
+++ b/sys-apps/agedu/agedu-20170831.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils
+
+# agedu-20151213.59b0ed3.ebuild is not a legitimate name
+# so we'll drop versionator and just set MY_P manually.
+MY_P="${PN}"-20170831.fc6b2b5
+
+DESCRIPTION="A utility for tracking down wasted disk space"
+HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/agedu/"
+SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/agedu/${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ipv6"
+
+DEPEND="doc? ( app-doc/halibut )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-r9671-fix-automagic.patch"
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-ipv4 \
+ $(use_enable doc halibut) \
+ $(use_enable ipv6)
+}
diff --git a/sys-apps/agedu/files/agedu-r9671-fix-automagic.patch b/sys-apps/agedu/files/agedu-r9671-fix-automagic.patch
new file mode 100644
index 000000000000..8e0c6ea2969e
--- /dev/null
+++ b/sys-apps/agedu/files/agedu-r9671-fix-automagic.patch
@@ -0,0 +1,44 @@
+diff -Naur agedu-r9671.orig/configure.ac agedu-r9671/configure.ac
+--- agedu-r9671.orig/configure.ac 2012-10-20 21:20:47.000000000 -0400
++++ agedu-r9671/configure.ac 2012-10-21 15:13:08.000000000 -0400
+@@ -10,8 +10,6 @@
+ AC_PROG_CC
+ AC_PROG_CC_C99
+ AC_PROG_INSTALL
+-AC_CHECK_PROG([HALIBUT],[halibut],[yes],[no])
+-AM_CONDITIONAL([HAVE_HALIBUT],[test "x$HALIBUT" = "xyes"])
+
+ # Checks for libraries.
+
+@@ -43,13 +41,28 @@
+
+ AC_CHECK_FUNCS([ftruncate fdopendir lstat64 stat64 memchr munmap select socket strcasecmp strchr strcspn strerror strrchr strspn strtoul strtoull connect inet_ntoa inet_addr gethostbyname getaddrinfo])
+
++AC_ARG_ENABLE([halibut],
++ AS_HELP_STRING([--disable-halibut],
++ [disable documentation with halibut (default off)]),
++ [halibut=$enableval],[halibut=no])
++
++if test "$halibut" = "no"; then
++ AM_CONDITIONAL([HAVE_HALIBUT],[false])
++else
++ AC_CHECK_PROG([have_halibut],[halibut],[yes],[no])
++ if test "$have_halibut" = "no"; then
++ AC_MSG_ERROR([halibut configured but not found])
++ fi
++ AM_CONDITIONAL([HAVE_HALIBUT],[true])
++fi
++
+ AC_ARG_ENABLE([ipv6],
+ AS_HELP_STRING([--disable-ipv6],
+- [disable IPv6 in the built-in web server]),
+- [ipv6=$enableval],[ipv6=$ac_cv_func_getaddrinfo])
++ [disable IPv6 in the built-in web server (default off)]),
++ [ipv6=$enableval],[ipv6=no])
+ AC_ARG_ENABLE([ipv4],
+ AS_HELP_STRING([--disable-ipv4],
+- [disable IPv4 in the built-in web server]),
++ [disable IPv4 in the built-in web server (default on)]),
+ [ipv4=$enableval],[ipv4=yes])
+ if test "$ipv6" = "no"; then
+ AC_DEFINE([NO_IPV6], [1], [define if IPv6 is disabled at configure time])
diff --git a/sys-apps/agedu/metadata.xml b/sys-apps/agedu/metadata.xml
new file mode 100644
index 000000000000..d920e3ba3e56
--- /dev/null
+++ b/sys-apps/agedu/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/aix-miscutils/Manifest b/sys-apps/aix-miscutils/Manifest
new file mode 100644
index 000000000000..f1cc7272d343
--- /dev/null
+++ b/sys-apps/aix-miscutils/Manifest
@@ -0,0 +1,5 @@
+DIST aix-miscutils-0.1.1671.tar.bz2 84825 SHA256 3ba79107ddf0ae39263ad864471c438b920ac2845c25e86c546b198450a19304 SHA512 36808b2618471a7daa4599f1df3af509351465a9339ca23e11ad5da3fa4a617e9a17746cb72c4ae96c39d505ebb595a5a7293fe8cc876976e96cdcc5749fa914 WHIRLPOOL 19026cf76fb07cc40ead49cdb1ab26977d6a9a87c157c77fe6705ea38c6a74be6ea2f441cca1118eb542895fab96fb5f254090328ac8f3bc0af9238bab96f829
+EBUILD aix-miscutils-0.1.1671.ebuild 335 SHA256 31bac8521335d991c008d3ec9e3dc588b6193d8a0c5c3ef07c0f56f22c452853 SHA512 c8e8ecd7ab3cc5ed8e704f484acf256a53fb30f9989ab26b92ac094bb8356b0e4bdd6074c89175ed266fede472791b928013919067bcf7176f3477388197c24c WHIRLPOOL 7739214d846d9cd442546a31262c829d116dadb727570b836daab00f9b7c6ac2f0a1e5dd2d5d6efc307b820edd87049c7b5e01fa9cb30595e035c6d5e5342ba7
+MISC ChangeLog 2484 SHA256 316040b300b62eff70b27e26d0d3f451dd5354ec9c7c9034660434010ca721f3 SHA512 1eaae5253e19cf5741b9db51a6d393c05abb010f51f3a17e6884fb6c532f6828bdab91e6b9fd00e0b838fd2385f07fab979ec6de61909a053f5f8527268a76d7 WHIRLPOOL d82b148f248bc3d31b57665ed50b65c40d2d24e7581250e510afda86f83fbfed0b3923bf357e5284f954c5cd5ec9c90d67faa825318315e5dc84a8e475780be2
+MISC ChangeLog-2015 1497 SHA256 b553b4063b933e315c250b766169ce6a891848560996a3dd030c8cd26b18a987 SHA512 8b7eac2421578373d755885a81175fb9ddf7281610d55577309bb78373dce0097fdedce6398cf091f2ef7bd96fda3a73db1b4e8d6bad518c90c25ac06712189c WHIRLPOOL 83a085615e83c7feb5df09d91b6f58a7f4999559fa0d29f5bcbf3c646bd896a96ba188946ddce69414a057edb350b2ea14b87cda5c04169a94a24da77f672ad7
+MISC metadata.xml 320 SHA256 598e85006c2292675ed98a406388d20e7079dde52103a6a945e1c36c9769897c SHA512 9b61e78760fff865c717165ba67ae1cae5f2bbcac95252174c150e93730f785ffb53dc9f8d7272b355a820fbc79c109805d29997c7250e5dc1551ca50f8939eb WHIRLPOOL 58773ad85f4daa909286c06a6898eed6bc7a9c6820ddda30508997e4f3755efc4d8aee41dcc2b5011d14da60b0eb30ff85641aa9dd4c0484889c9d8e2f582991
diff --git a/sys-apps/aix-miscutils/aix-miscutils-0.1.1671.ebuild b/sys-apps/aix-miscutils/aix-miscutils-0.1.1671.ebuild
new file mode 100644
index 000000000000..f41232735e06
--- /dev/null
+++ b/sys-apps/aix-miscutils/aix-miscutils-0.1.1671.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Miscellaneous helpers for AIX (currently just ldd)"
+HOMEPAGE="https://prefix.gentoo.org"
+SRC_URI="https://dev.gentoo.org/~haubi/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc-aix"
+IUSE=""
diff --git a/sys-apps/aix-miscutils/metadata.xml b/sys-apps/aix-miscutils/metadata.xml
new file mode 100644
index 000000000000..22206137f6f8
--- /dev/null
+++ b/sys-apps/aix-miscutils/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 type="person">
+ <email>haubi@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>prefix@gentoo.org</email>
+ <name>Gentoo Prefix</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/apmd/Manifest b/sys-apps/apmd/Manifest
new file mode 100644
index 000000000000..872a0aad11d4
--- /dev/null
+++ b/sys-apps/apmd/Manifest
@@ -0,0 +1,8 @@
+AUX apmd.confd 56 SHA256 617793dc608a9bec720c6979746e83a8f0cdc8fd38e926f323e82741adfc3ad8 SHA512 8e3832c3156681b8d3b69bbbf0958e3097a465364e665bee7d7cd7f696540af9b716e48e6cfc7fbdbfd6f55eb52cda965584ef44a98c011b858b32b2a7d340d3 WHIRLPOOL b8f32e929637c44cf14f86827286dd55aa03cb40a908bace8b9a026f13121ac043a2252e6112e3b9ddec1c202f3114119a1295f129513f9bd91f0530c5cecc57
+AUX apmd.rc6 568 SHA256 879c2c89061b91661a79be9165348a9e66ee04d2276811916b6f68568731ce1c SHA512 ac4578dd1b49207b8d1c50f3481a3652d8cfb83ea3c1984a553aa5acefd17fee5fa71a903fa9dca4d1991c47c6b14d6901352fc03df741cae0aed337ee55cf14 WHIRLPOOL e1cdd5dfcb4e80880ab670a48224177e350de7254b85c99613747e0022c95bea214a1e9a1c9dc0094f5eacda205f9bd10b8dcf44e46edcb072c9f62dce765e63
+DIST apmd_3.2.2-14.diff.gz 19195 SHA256 7905ff96be93d725544d0040e425c42f9c05580db3c272f11cff75b9aa89d430 SHA512 a3578d0c43950f832fb437a744f8a4c3058c731649decb90f7b42c901b06f4df5f9a75599b4278e15af1c8a30d8043b0d76eb7d2cb67b05bf6bb210d5912a16d WHIRLPOOL 300ef81d426fffa0c3ce944d523245745a9388013672f756d4f298f5e2d0b136d962b6d635d6fc787bdd2aa351097ac682ebe0b9ee41fc32e19c74b69601712b
+DIST apmd_3.2.2.orig.tar.gz 72757 SHA256 7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d SHA512 fdc74703e75a700397bb2c907986f0cf0792ee4128d7a7ae08adf090bff0ea595044ba7a935d34929745bb702eb8bfe232e0ee9156efd23a995dc087f1b20bf4 WHIRLPOOL 4fbb0f6d99215ce754686c2748b7ad7bcbe219ddafa190a05f9c345957f7bebd51b04e26e23ec4bdb8c49cba6e89fabbb3dbf631fd4342a5dc4bd1148e4b7b63
+EBUILD apmd-3.2.2_p14-r1.ebuild 1816 SHA256 01deae1ecc8ca3a634c6acc8b276700657d5071b532d35cded18e24b0b813724 SHA512 48003312c87fc75bed146cfa833e4d6e9ac7c162309cb839c7798178506eea9357a0fecfc7ff378b683c1992504cee3558a27b1b22acafba509bcba32478c09f WHIRLPOOL 56a6d0019d4a03fdaffb1a67172f35c78a1af4a7fc4e8d18b56826ee889c5acb057deaf371f1f2a4da3eb7705264a3786fc1cd5bafb5a87dd74ae8670f323feb
+MISC ChangeLog 2826 SHA256 51a4057fa0321431c559db74e65bcc5679c2a8b98c3e1372e73a2bd1ce108f0c SHA512 cfba4a4065111c50a840aeccf14da86b4ae1f5bcf9864b0950fc756cccf0e49ac9351cb2338f945efac9c618bb9d3fe73bdb54ff8dff7487d2f75bb18a6444ce WHIRLPOOL 6b42f0477292aa384c8ec5067dce59472f1099323f7b20b15768b89fcb0cd874f13a9a1d9bdd05df543bf0d79b940fbf08eaaf87275feb563a0e09a671e1b85b
+MISC ChangeLog-2015 6867 SHA256 3725c4f0caa3bd58b697a536c9459099ef907c897d69c35e887c8390364f224f SHA512 874a05bcc66c84eff5fa9dbab2e53f12616e331dff5252869fa0119485646ee07b9dd18717941896a5e071676156bd9e4f741550cc19b443f7a784ed4236f728 WHIRLPOOL 6ec09aa062de0d3e799510440e82007af9f78870e37a01d8f12c299cf606e328e28cfa39f20d713d2674a2ad5478b904cc5819136e3fe9fdac64505e5a111e07
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild b/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild
new file mode 100644
index 000000000000..166a03b1cf8e
--- /dev/null
+++ b/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+MY_PV=${PV%_p*}
+MY_P=${PN}_${MY_PV}
+PATCHV=${PV#*_p}
+
+DESCRIPTION="Advanced Power Management Daemon"
+HOMEPAGE="https://packages.qa.debian.org/a/apmd.html"
+SRC_URI="mirror://debian/pool/main/a/apmd/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/a/apmd/${MY_P}-${PATCHV}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86"
+IUSE="nls X"
+
+RDEPEND=">=sys-apps/debianutils-1.16
+ >=sys-power/powermgmt-base-1.31
+ X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXt
+ x11-libs/libXext )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+ virtual/os-headers"
+
+S=${WORKDIR}/${PN}-${MY_PV}.orig
+
+src_prepare() {
+ epatch "${WORKDIR}"/${MY_P}-${PATCHV}.diff
+
+ if ! use X; then
+ sed -i \
+ -e 's:\(EXES=.*\)xapm:\1:' \
+ -e 's:\(.*\)\$(LT_INSTALL).*xapm.*$:\1echo:' \
+ Makefile || die
+ fi
+
+ # use system headers and skip on_ac_power
+ rm -f on_ac_power*
+
+ sed -i \
+ -e '/on_ac_power/d' \
+ -e 's:-I/usr/src/linux/include -I/usr/X11R6/include::' \
+ -e 's:-L/usr/X11R6/lib::' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dodir /usr/sbin
+ emake DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/$(get_libdir) install
+
+ keepdir /etc/apm/{event.d,suspend.d,resume.d,other.d,scripts.d}
+ exeinto /etc/apm
+ doexe debian/apmd_proxy
+ dodoc AUTHORS {,apmsleep.}README debian/{changelog,README.Debian}
+
+ doman *.{1,8}
+
+ # note: apmd_proxy.conf is currently disabled and not used, thus
+ # not installed - liquidx (01 Mar 2004)
+
+ newconfd "${FILESDIR}"/apmd.confd apmd
+ newinitd "${FILESDIR}"/apmd.rc6 apmd
+
+ use nls || rm -rf "${D}"/usr/share/man/fr
+}
diff --git a/sys-apps/apmd/files/apmd.confd b/sys-apps/apmd/files/apmd.confd
new file mode 100644
index 000000000000..7025e822dedc
--- /dev/null
+++ b/sys-apps/apmd/files/apmd.confd
@@ -0,0 +1,3 @@
+# /etc/init.d/apmd:
+
+APMD_OPTS="-P /etc/apm/apmd_proxy"
diff --git a/sys-apps/apmd/files/apmd.rc6 b/sys-apps/apmd/files/apmd.rc6
new file mode 100644
index 000000000000..cce594a57df7
--- /dev/null
+++ b/sys-apps/apmd/files/apmd.rc6
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /proc/apm ] ; then
+ eerror "APM support has not been compiled into the kernel"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting apmd"
+ start-stop-daemon --start --quiet --pidfile /var/run/apmd.pid \
+ --startas /usr/sbin/apmd -- ${APMD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping apmd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/apmd.pid
+ eend $?
+}
diff --git a/sys-apps/apmd/metadata.xml b/sys-apps/apmd/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/apmd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/apparmor-utils/Manifest b/sys-apps/apparmor-utils/Manifest
new file mode 100644
index 000000000000..30c93ea3ec37
--- /dev/null
+++ b/sys-apps/apparmor-utils/Manifest
@@ -0,0 +1,6 @@
+AUX apparmor-utils-2.11-shebang.patch 613 SHA256 34331002e209aaf17903bef5b8d4cb69d8dfcb37fbce8aeff6203465520e763a SHA512 6e94b4a48dee68dc2c321115744fa2ba6be33cd1f6f13cf3c97a4bb1f206d8c990e8dded7c81e8cf53107fdc2afcf208ab664f6438725d17ef652f5accb8cc76 WHIRLPOOL ab01bff5ecf10af481892590159c1cb690005c83a0b6128cd3f8980c3f048fc3a9f25cc9dbbce71b19f06ac4a7d63f35eef14e81f004a46a720fce1cc6e13537
+DIST apparmor-2.11.0.tar.gz 5013297 SHA256 b1c489ea11e7771b8e6b181532cafbf9ebe6603e3cb00e2558f21b7a5bdd739a SHA512 86b33c1cbbd256028dd5fdfaddc764c225845acd19c833223fce5cdd6164f997fe010d7b642791f834a3417b4ea847d77175fdfd89ea99ab2111933790d42b55 WHIRLPOOL 2a3ca9a943694fba0f225cffc2bac3782545c0970b490189585a87cccf18047128eaab754e53003e03d535a5851a3198b0738a89c6547e88d081f6ad31f066d5
+EBUILD apparmor-utils-2.11.0-r1.ebuild 2070 SHA256 c748fe5021e6c07aeeb7f32438d335fb58083ee3b487738cf1af5637f0181dbf SHA512 ecf22feb4d53df6c77989c19e15c70fbd6bc8b8415965410584de66682ca048fde5dbe2590bc929689da9105f1529917479d8fee08f6ac6064bb47094deabcd6 WHIRLPOOL 757fbb460e9c2a828d1126b43c996d85895f14d7214315f6f516c9a01108f0bfb4708801ffea36c1105f291c79c69eb9b8112e5d1502dc9e0b69e41401a017ba
+MISC ChangeLog 3592 SHA256 fc1b6f0f45401794a893a0051a09c4043925da0ac60339ea4c426e95f5972736 SHA512 979595a1ef0da2d5ae9675c6581702a055fd341b6719b1a6306dd70706ac4d14af4b1fd46528e3bb667e7f648d93a0bfe95f1ba160982b582826e0c1031c8756 WHIRLPOOL 04fd96ac8ac2db1cfabce6b2dac43066758f820aa4b00cac4731ae12321c83b7bd2632e54966c45102f49050a02f033ed5019ddb019ae2a5ccb738f81044f6df
+MISC ChangeLog-2015 1112 SHA256 d7a9ee2a4f8027c475ff1b783cc11345edc8cd4943396ae4e0fd73fe11507375 SHA512 1e85e3b7e74a3fa517ff9e0bfddbca76eb8e1676259f868998ad6249a554b668ca4e99ba7b043629450f99eba87fc28dfe65511c0b9dfed99ed54384e87999c7 WHIRLPOOL 5b6396b9ef0ab8be3dd4c4814d6070e0f928c753a691da5f90cc443e7d201b532aa30c50b2481f94861818c6126176b13b92ef0703c9e6c6c91f9c205e7cd4e8
+MISC metadata.xml 409 SHA256 27d6c61ee1f7b16893f71239f855cc6372d360da930c827c62d13eba916a7d90 SHA512 a66647c5e40f2593017942c12786dc30995e7980fdb58c1de0b9ae34069434cb5a4c70b2bd268a239df82edfcc1e7288e8033bf57609f757a321639afd5e78b8 WHIRLPOOL b04b32e375e63f62604cd77898ffaf60726f8ee6cf528861969a45028586e6676ee0dd06e295f90da8da0312e63ebb428fa8f41be8e6fc93998d5112864f6687
diff --git a/sys-apps/apparmor-utils/apparmor-utils-2.11.0-r1.ebuild b/sys-apps/apparmor-utils/apparmor-utils-2.11.0-r1.ebuild
new file mode 100644
index 000000000000..8d9f092107ec
--- /dev/null
+++ b/sys-apps/apparmor-utils/apparmor-utils-2.11.0-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+inherit perl-module python-r1 toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Additional userspace utils to assist with AppArmor profile management"
+HOMEPAGE="http://apparmor.net/"
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${MY_PV}/+download/apparmor-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test"
+
+DEPEND="dev-lang/perl
+ ${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ ~sys-libs/libapparmor-${PV}[perl,python]
+ ~sys-apps/apparmor-${PV}
+ dev-perl/Locale-gettext
+ dev-perl/RPC-XML
+ dev-perl/TermReadKey
+ virtual/perl-Data-Dumper
+ virtual/perl-Getopt-Long"
+
+S=${WORKDIR}/apparmor-${PV}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.11-shebang.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -i binutils/Makefile \
+ -e 's/Bstatic/Bdynamic/g' \
+ -e 's/EXTRA_CFLAGS = /& ${CFLAGS}/' || die
+}
+
+src_compile() {
+ python_setup
+
+ pushd utils > /dev/null || die
+ # launches non-make subprocesses causing "make jobserver unavailable"
+ # error messages to appear in generated code
+ emake -j1
+ popd > /dev/null || die
+
+ pushd binutils > /dev/null || die
+ export EXTRA_CFLAGS="${CFLAGS}"
+ emake CC="$(tc-getCC)" USE_SYSTEM=1
+ popd > /dev/null || die
+}
+
+src_install() {
+ pushd utils > /dev/null || die
+ perl_set_version
+ emake DESTDIR="${D}" PERLDIR="${D}/${VENDOR_LIB}/Immunix" \
+ VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install
+
+ install_python() {
+ "${PYTHON}" "${S}"/utils/python-tools-setup.py install --prefix=/usr \
+ --root="${D}" --version="${PV}"
+ }
+
+ python_foreach_impl install_python
+ python_replicate_script "${D}"/usr/bin/aa-easyprof "${D}"/usr/sbin/apparmor_status \
+ "${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,status,unconfined}
+ popd > /dev/null || die
+
+ pushd binutils > /dev/null || die
+ emake install DESTDIR="${D}" USE_SYSTEM=1
+ popd > /dev/null || die
+}
diff --git a/sys-apps/apparmor-utils/files/apparmor-utils-2.11-shebang.patch b/sys-apps/apparmor-utils/files/apparmor-utils-2.11-shebang.patch
new file mode 100644
index 000000000000..3dce7c261688
--- /dev/null
+++ b/sys-apps/apparmor-utils/files/apparmor-utils-2.11-shebang.patch
@@ -0,0 +1,16 @@
+Avoid rewriting the shebang.
+
+The ebuild will take care of this when replicating the script for each of the
+supported python implementations.
+
+--- a/utils/python-tools-setup.py
++++ b/utils/python-tools-setup.py
+@@ -43,7 +43,7 @@
+ f = prefix + s
+ # If we have a defined python version, use it instead of the system
+ # default
+- if 'PYTHON' in os.environ:
++ if False:
+ lines = open(os.path.basename(s)).readlines()
+ lines[0] = '#! /usr/bin/env %s\n' % os.environ['PYTHON']
+ open(f, 'w').write("".join(lines))
diff --git a/sys-apps/apparmor-utils/metadata.xml b/sys-apps/apparmor-utils/metadata.xml
new file mode 100644
index 000000000000..42d1e8f65243
--- /dev/null
+++ b/sys-apps/apparmor-utils/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 type="person">
+ <email>kensington@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">apparmor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/apparmor/Manifest b/sys-apps/apparmor/Manifest
new file mode 100644
index 000000000000..810e60db6152
--- /dev/null
+++ b/sys-apps/apparmor/Manifest
@@ -0,0 +1,8 @@
+AUX apparmor-2.10-dynamic-link.patch 381 SHA256 527e91364b3482a9063a8e6802eec87c6e73fe3727960119dca6fcaa588f004d SHA512 b407e5a58ac52d6c69ddc5dd91cc1e65676fd3fbd91bd0d0591b926d6804a1d893b06bec09f2955ad77324e3177ebd05838b50b5be0eeda613378b9246ded47d WHIRLPOOL 4e746d9d43f13cbba54305479c8998a387814fac4399d01e7a5ec583a41b61db86ac3b89f13b07e6f36c9fda969db4e563a0844d597028b55749bbb98c554a7d
+AUX apparmor-2.10-makefile.patch 859 SHA256 f096dddaa00930585f50f5d0f22fb5ec1df1e3c2b91cfb9090bca2c07f15b2bd SHA512 dee07ecd82d1336692c9621688dc5bad3d17787544ff05e7a6f2d20f396071a33a093bdcc5d987f91df14af34bc8cdf3362cf38d0ce5e804afe76511d9da5eee WHIRLPOOL e92107009590906bc1cc831d6d27c47f83631186ec5c0edb1d8723c83ebf4248d2aa4795fa58da7ce79894b3d82e7625b8da9d8992c2ddd824c8cf1af7f87a1e
+AUX apparmor-init 1284 SHA256 6357f9645587de19c46d824215ca4c3be99c488e8da9bd0e403b69e33ba8ed07 SHA512 4ee4747ec98a0828beb690bf5e01bc112d958bff4c68d60fc0cbb9f0707bd8daecc011dba3916aa6e6368f460eedce7f2ce42aad9ccea49a5d898dcae3d01148 WHIRLPOOL bf4da39d477c32ca5bad91ffda9938280694631cc80c4191e6ab42844b9f0e867f9c39a98a92b1a2b5a52d25c93e21142dba745026efd3e2c60ee6d8d0e61bff
+DIST apparmor-2.11.0.tar.gz 5013297 SHA256 b1c489ea11e7771b8e6b181532cafbf9ebe6603e3cb00e2558f21b7a5bdd739a SHA512 86b33c1cbbd256028dd5fdfaddc764c225845acd19c833223fce5cdd6164f997fe010d7b642791f834a3417b4ea847d77175fdfd89ea99ab2111933790d42b55 WHIRLPOOL 2a3ca9a943694fba0f225cffc2bac3782545c0970b490189585a87cccf18047128eaab754e53003e03d535a5851a3198b0738a89c6547e88d081f6ad31f066d5
+EBUILD apparmor-2.11.0.ebuild 1255 SHA256 c5f5110b8eee16e980c7c9a29d8e3e6802ef462ed0d649542ee1ea0ab2be4bdc SHA512 ac04e8a3b26c02a9180b237c2530dbe88d1d80c7096b53b20068a9fbfe7b431d0b4807292441d1874ae6502235659be0d033d3c5854d1df5c318ad6098595f83 WHIRLPOOL 6c8fbb727c7cacd34d4eec97cdd2b8a566245be81a51725a3af704314eeaa863809093b903a62211b7ecfaba8285406b07d380df2832c3c667541fc1bf84b53f
+MISC ChangeLog 3741 SHA256 e993988739c1edd3e6ad61e06dbd2dac5b0967595e44dca8d07185111b7efef0 SHA512 0d88c7d17aca58058cd07419085dd3bf45fe7738400c3ef0e6638841df198447885a17df6f279f881133945e3c2662c3186b1831dca4ddc45fc55430aa385d96 WHIRLPOOL 87421359cc81feab9dc70d519a65de5b70acf544b25c75e9c0dde7f855317e174372f4e978e10f54ee2686a4696cbd507263e16cd99443bb88e22ff8333ce2d1
+MISC ChangeLog-2015 816 SHA256 8adb7825141984a46d9827b45c51f963a65df2ff9e3c75932d8e202987a206be SHA512 9347843cd3c7414100e3efc03d4b54d37e7748a3da6b2edc8ba26d5af6c33956282a5ecb37c0c6d8f8f89477c2ec892065f93e29215da56800dc5278a64945cf WHIRLPOOL 2bb135bb2d4dd51e2a17982accda85ca30eaa00353f1239bb757f37e33172f91555508901784ff9043b8216448bbec763ab9ec84d1307a75ec613e7e3fe006f9
+MISC metadata.xml 409 SHA256 27d6c61ee1f7b16893f71239f855cc6372d360da930c827c62d13eba916a7d90 SHA512 a66647c5e40f2593017942c12786dc30995e7980fdb58c1de0b9ae34069434cb5a4c70b2bd268a239df82edfcc1e7288e8033bf57609f757a321639afd5e78b8 WHIRLPOOL b04b32e375e63f62604cd77898ffaf60726f8ee6cf528861969a45028586e6676ee0dd06e295f90da8da0312e63ebb428fa8f41be8e6fc93998d5112864f6687
diff --git a/sys-apps/apparmor/apparmor-2.11.0.ebuild b/sys-apps/apparmor/apparmor-2.11.0.ebuild
new file mode 100644
index 000000000000..99787fd94be7
--- /dev/null
+++ b/sys-apps/apparmor/apparmor-2.11.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system"
+HOMEPAGE="http://apparmor.net/"
+SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${MY_PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+RDEPEND="~sys-libs/libapparmor-${PV}"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-tex/latex2html )
+"
+
+S=${WORKDIR}/apparmor-${PV}/parser
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.10-makefile.patch"
+ "${FILESDIR}/${PN}-2.10-dynamic-link.patch"
+)
+
+src_prepare() {
+ default
+
+ # remove warning about missing file that controls features
+ # we don't currently support
+ sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" USE_SYSTEM=1 arch manpages
+ use doc && emake pdf
+}
+
+src_test() {
+ emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check
+}
+
+src_install() {
+ emake DESTDIR="${D}" USE_SYSTEM=1 install
+
+ dodir /etc/apparmor.d/disable
+
+ newinitd "${FILESDIR}"/${PN}-init ${PN}
+
+ use doc && dodoc techdoc.pdf
+}
diff --git a/sys-apps/apparmor/files/apparmor-2.10-dynamic-link.patch b/sys-apps/apparmor/files/apparmor-2.10-dynamic-link.patch
new file mode 100644
index 000000000000..24263d0892b2
--- /dev/null
+++ b/sys-apps/apparmor/files/apparmor-2.10-dynamic-link.patch
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -87,7 +87,7 @@
+ AAREOBJECT = ${AAREDIR}/libapparmor_re.a
+ AAREOBJECTS = $(AAREOBJECT)
+ AARE_LDFLAGS = -static-libgcc -static-libstdc++ -L.
+-AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
++AALIB = -Wl,-Bdynamic -lapparmor -Wl,-Bdynamic -lpthread
+
+ ifdef USE_SYSTEM
+ # Using the system libapparmor so Makefile dependencies can't be used
+
diff --git a/sys-apps/apparmor/files/apparmor-2.10-makefile.patch b/sys-apps/apparmor/files/apparmor-2.10-makefile.patch
new file mode 100644
index 000000000000..397534aa7331
--- /dev/null
+++ b/sys-apps/apparmor/files/apparmor-2.10-makefile.patch
@@ -0,0 +1,25 @@
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@
+ CONFDIR=/etc/apparmor
+ INSTALL_CONFDIR=${DESTDIR}${CONFDIR}
+ LOCALEDIR=/usr/share/locale
+-MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5
++MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8
+
+ YACC := /usr/bin/bison
+ YFLAGS := -d
+@@ -284,11 +284,9 @@
+ .PHONY: install-indep
+ install-indep:
+ install -m 755 -d $(INSTALL_CONFDIR)
+- install -m 644 subdomain.conf $(INSTALL_CONFDIR)
++ install -m 755 -d ${DESTDIR}/usr/libexec
+ install -m 644 parser.conf $(INSTALL_CONFDIR)
+- install -m 755 -d ${DESTDIR}/var/lib/apparmor
+- install -m 755 -d $(APPARMOR_BIN_PREFIX)
+- install -m 755 rc.apparmor.functions $(APPARMOR_BIN_PREFIX)
++ install -m 755 rc.apparmor.functions ${DESTDIR}/usr/libexec
+ $(MAKE) -C po install NAME=${NAME} DESTDIR=${DESTDIR}
+ $(MAKE) install_manpages DESTDIR=${DESTDIR}
+
diff --git a/sys-apps/apparmor/files/apparmor-init b/sys-apps/apparmor/files/apparmor-init
new file mode 100644
index 000000000000..48877e4b6117
--- /dev/null
+++ b/sys-apps/apparmor/files/apparmor-init
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Load all configured profiles for the AppArmor security module."
+description_reload="Reload all profiles"
+
+extra_started_commands="reload"
+
+aa_action() {
+ local arg=$1
+ local return
+
+ shift
+ $*
+ return=$?
+
+ if [ ${return} -eq 0 ]; then
+ aa_log_success_msg $arg
+ else
+ aa_log_failure_msg arg
+ fi
+
+ return $return
+}
+
+aa_log_action_start() {
+ ebegin $1
+}
+
+aa_log_action_end() {
+ eend $1
+}
+
+aa_log_success_msg() {
+ einfo $1
+}
+
+aa_log_warning_msg() {
+ ewarn $1
+}
+
+aa_log_failure_msg() {
+ eerror $1
+}
+
+aa_log_skipped_msg() {
+ einfo $1
+}
+
+aa_log_daemon_msg() {
+ einfo $1
+}
+
+aa_log_end_msg() {
+ eend $1
+}
+
+. /usr/libexec/rc.apparmor.functions
+
+start() {
+ ebegin "Starting AppArmor"
+ eindent
+
+ if ! is_apparmor_loaded ; then
+ load_module
+ if [ $? -ne 0 ]; then
+ eerror "AppArmor kernel support is not present"
+ eend 1
+ return 1
+ fi
+ fi
+
+ parse_profiles load
+
+ eoutdent
+}
+
+stop() {
+ ebegin "Stopping AppArmor"
+ eindent
+ apparmor_stop
+ eoutdent
+}
+
+reload() {
+ # todo: split out clean_profiles into its own function upstream
+ # so we can do parse_profiles reload && clean_profiles
+ # and do a proper reload instead of restart
+ apparmor_restart
+}
diff --git a/sys-apps/apparmor/metadata.xml b/sys-apps/apparmor/metadata.xml
new file mode 100644
index 000000000000..42d1e8f65243
--- /dev/null
+++ b/sys-apps/apparmor/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 type="person">
+ <email>kensington@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">apparmor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/apply-default-acl/Manifest b/sys-apps/apply-default-acl/Manifest
new file mode 100644
index 000000000000..b0d79e82801d
--- /dev/null
+++ b/sys-apps/apply-default-acl/Manifest
@@ -0,0 +1,5 @@
+DIST apply-default-acl-0.0.6.tar.gz 112220 SHA256 49cfcee8f22c6853e0d8dda772317220d553ba2add835139fe73ca14dfdbc038 SHA512 6034de13db1867372b8529e29e8b1a3d002619d4522a5eab346a7940946a1c74adc3eec952bc72bf62c736ae89d5631748153a87feb45353af27ec46c71176f3 WHIRLPOOL e2a0443cd69daf0d83a8e2c985c9bed9364c6123c7084a74e69e5c36d09d94f2c12a389438ef8ebaf563b5514ddbc96dff48b70d19f119b2e4643e785a70e84d
+EBUILD apply-default-acl-0.0.6.ebuild 523 SHA256 775fd3e3e0c4f2e0ea49450e83855936c4d5a8df091ecf8c231bf7f0b95112bd SHA512 be23e98716900ddbc133417b4e033d9963b1410a4b9206a0df963fc623ee1c452adb0621b851521755aa167e2846454195eaf7fad39c56fca43828f26ddaf80a WHIRLPOOL 093567b51251629590892cd7ddcb1dd0e53ac41244fe60fe334d3b80fb19fb510c16704ff5d3f7a59c8c43c8b7dc383c9eb2eebc92c8ccd361590d351c907bd0
+MISC ChangeLog 3476 SHA256 b8fa36fc4954253e7a1354da46edbb4614b62e9b8c683dbddd550ffd416d1fc2 SHA512 c554349df14ab61d139201e99acd31f076bef5fed5625a73dbc4bcf789368c5be079e6cb80779f95f84591f2f732cc1ace42c3afe5a3ed123bdc6ace841d79a3 WHIRLPOOL a3a53dc1d4a736f3da1f13248d8ac114fa493131d9538f8f7783cda7aa66c6b14027504222b3aaa2546037149ffbcd8aa5feb9e27801b2aad214bf459c98002c
+MISC ChangeLog-2015 1276 SHA256 6fd494728917c89a5ae72cdcba0aac0bbf486935a59dfdc42ca23bd5a5765b13 SHA512 73899d4c269dbe6ee705e096920e5d1a3688ce0a38a844777913170937947906bcf5c30070c50bb078dbd00dc53e73d84296bf0e381e2aeb3453660f55669109 WHIRLPOOL 8ebd992222b6cc0fe8d93407211e97ade64de8aa433a75bc137a0c4ed73ead91b699010280321a681f700858b4da2f29a9fa598c7b3499138e1144a676e20158
+MISC metadata.xml 409 SHA256 9cec1474e490332c708c4387e5bd7f21c0d0da9af7ca10bdab29a565cee8b9f2 SHA512 ccf6bafbdfc01736cd151ee30fe4d2e7124ee633463052aa41e0a8ef687793d358825b53b01d21aa9cc9a64633ec37b2bd2b7a27aac20a6d56b12f79eff56b18 WHIRLPOOL bda89597459d685a513966b8e811e1138adea18bfda1197d6b4b0b5b12a877aefbf633a30d7955c9882230109fdb009d1ae3aef5ac562bdd374b717fa4f0730d
diff --git a/sys-apps/apply-default-acl/apply-default-acl-0.0.6.ebuild b/sys-apps/apply-default-acl/apply-default-acl-0.0.6.ebuild
new file mode 100644
index 000000000000..f721fca72c1a
--- /dev/null
+++ b/sys-apps/apply-default-acl/apply-default-acl-0.0.6.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Apply default POSIX ACLs to files and directories"
+HOMEPAGE="http://michael.orlitzky.com/code/apply-default-acl.xhtml"
+SRC_URI="http://michael.orlitzky.com/code/releases/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="sys-apps/acl"
+RDEPEND="${DEPEND}"
+
+DOCS=( doc/README )
+
+# tests need to be executed on filesystem with ACL support
+# skipping them for now
+RESTRICT="test"
diff --git a/sys-apps/apply-default-acl/metadata.xml b/sys-apps/apply-default-acl/metadata.xml
new file mode 100644
index 000000000000..91aab5775d4a
--- /dev/null
+++ b/sys-apps/apply-default-acl/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 type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+
+ <upstream>
+ <maintainer status="active">
+ <email>michael@orlitzky.com</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/arrayprobe/Manifest b/sys-apps/arrayprobe/Manifest
new file mode 100644
index 000000000000..be406d483d75
--- /dev/null
+++ b/sys-apps/arrayprobe/Manifest
@@ -0,0 +1,7 @@
+AUX 2.0-ida_headers.patch 16391 SHA256 3d15c33bd0f27754a631f8afdcfb7c4c4ca7ef03b6b425f1f3cada1fcb6d4d56 SHA512 ff3e06dce610866362a020137b4c9c45802ce4a2566bcf01930c6351ef51aa60a2ad80bc97a7207f8644f58a5c1fe7722d0ccd20f7740eb06ebac8c896f9ebab WHIRLPOOL feca6721b5da512f98c5291348a1830ad2ffd46c1a73a0a846411381541654dd4b14c67bba27087a0a9d52b11a58997dce01b87079672725b6b1e7f091edfc07
+AUX 2.0-malloc-strlen.patch 1152 SHA256 6e2db6d203650800b392b600f592bf51bd27ddaf6fa0596415daf5f09a72b481 SHA512 19f112d1e830ebe769025f3327e793d79d9f943324393a5d466bbda852a319201525a469d0f41bbc0d4d4d2ef8212c525d6300c80d5fc994df444b96f3729bc6 WHIRLPOOL 3d0332663b5ecfead0e71bf4846937d089d8652630730d59d1c62a89648d823ddc721c99b56e1e73a42528ae65bac7a7bc088e80b1b0717e9b331d757c228ba9
+DIST arrayprobe-2.0.tar.gz 83831 SHA256 ccb560b5c7e8b378d110cad6e9245884e7e673acfa3c4016ef33acd699f1f4d0 SHA512 4664e20604697edf2f848447419b26ff860dd302b3d3e5aa0f3977855c590b5acbe23c39b684a2ecb1603c86cf7762e86bfc7125421ccad7f322e387c4178870 WHIRLPOOL 56eec2322f806f25e411614e12e9c584208202203f6d070846c73d04c0b379103ad2c45d3a6638a8cf6d66ea51173fbf0dcd91af3b01702a39848bb8a503cd34
+EBUILD arrayprobe-2.0-r2.ebuild 579 SHA256 86e6fe0956813f46a260a2200f4383b62871e8bfcbcf7dc460cf14252d258a21 SHA512 4e826c92ca4092438f66089758c8d409bef0d5931fb3c8996f6018811fe4786e7ffd74e899f9e57aa098ecc9e6c92ca8da284c4d9bd772c93b5e831c5d2eee6c WHIRLPOOL ab98f6410561d5b31f0bec16748836eea996add1dde68eca8084bece85bd303358d50f9555673c2f335707f742092d56e3425c3bee208df9f9a294e61b7cfa2d
+MISC ChangeLog 3001 SHA256 d48f0cbe3004f05d5f91dee6176463ed5b8047d211398cf6165473b9ce75f158 SHA512 6b7d3ec012f5d0edc73e5c3772044ebe7b89911a1b49366d68f31ed3df98149f4e0dd60e30c5d493f7d4989a7a4d3820a58ec405f7b889cf58830efc81108b8e WHIRLPOOL 079fa25e7c3655403c5955d19e86a879d91fe608175eee9b2064ba53f4221f9321e8635242507577d8b810417fc4c04591ce684ae668a23f78cfd5f185807842
+MISC ChangeLog-2015 1930 SHA256 b5b1daff55dfc5d3c0cb3d09b95d5d3f3df08f4a7b7e39ef38b19a6a7c370ce5 SHA512 a1ef9e251bb2f42ba434dc0769f9a6d31dc95b1939e6105fea661d5f4681653ac7ae92d8fb317b982468c5b53b9c00c368e4db1cb27c624c1ec99114f9ae7dba WHIRLPOOL e2fa6b90b79824c965f17b285047d479a14f8d8dbead6d35e9c1c61f8f5601b4b7a879c3b6bf561bb0c32280e3c666b841ebb111d2c5dfd65e3a0632213c2159
+MISC metadata.xml 330 SHA256 da90112f2bba96098e9dbd0c7d785494b251a43ba360aebbb7a672cf5041517f SHA512 a7b0f31767ddd2a38acc2af4700f6129e6a78553f6bee63827d7706064570dccd5e5bf48b407b9e534bef4bbc6b384c326a79121079e68d25e3494601b3b0e1b WHIRLPOOL 8bbedca7137a6fd099bc66ec092ce47e34807cebb02a98101267b5156bcae7fce17a715bd7db346282b80c83b97d2ec61ded07e3fa1a14bb205737f528da6bc0
diff --git a/sys-apps/arrayprobe/arrayprobe-2.0-r2.ebuild b/sys-apps/arrayprobe/arrayprobe-2.0-r2.ebuild
new file mode 100644
index 000000000000..de2a25c918d1
--- /dev/null
+++ b/sys-apps/arrayprobe/arrayprobe-2.0-r2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils autotools
+
+DESCRIPTION="CLI utility that reports the status of a HP (Compaq) array controller (both IDA & CCISS supported)"
+HOMEPAGE="http://www.strocamp.net/opensource/arrayprobe.php"
+SRC_URI="http://www.strocamp.net/opensource/compaq/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-malloc-strlen.patch"
+ epatch "${FILESDIR}/${PV}-ida_headers.patch"
+ eautoreconf
+}
diff --git a/sys-apps/arrayprobe/files/2.0-ida_headers.patch b/sys-apps/arrayprobe/files/2.0-ida_headers.patch
new file mode 100644
index 000000000000..fbdb20b87ea6
--- /dev/null
+++ b/sys-apps/arrayprobe/files/2.0-ida_headers.patch
@@ -0,0 +1,647 @@
+diff -Naur arrayprobe-2.0.old/cciss_events.h arrayprobe-2.0/cciss_events.h
+--- arrayprobe-2.0.old/cciss_events.h 2005-12-27 10:51:29.000000000 +0100
++++ arrayprobe-2.0/cciss_events.h 2010-01-13 15:46:53.000000000 +0100
+@@ -27,8 +27,12 @@
+ #define QWORD __u64
+
+ /* from cciss_cmd.h */
++#ifndef CISS_MAX_LUN
+ #define CISS_MAX_LUN 16
++#endif
++#ifndef CISS_MAX_PHYS_LUN
+ #define CISS_MAX_PHYS_LUN 1024
++#endif
+
+ #define CompareEvent(event,par_class,par_subclass,par_detail) \
+ ((event.class.class==par_class) && \
+diff -Naur arrayprobe-2.0.old/configure.ac arrayprobe-2.0/configure.ac
+--- arrayprobe-2.0.old/configure.ac 2006-01-03 13:58:31.000000000 +0100
++++ arrayprobe-2.0/configure.ac 2010-01-13 15:42:49.000000000 +0100
+@@ -19,38 +19,6 @@
+ dnl Check for compile.h (2.6.x kernels only?
+ AC_CHECK_HEADERS(linux/compiler.h)
+
+-dnl Check for kernel sources
+-AC_MSG_CHECKING(for kernel sources)
+-found_kernel_dir=""
+-for kernel_dir in /usr/src/linux /usr/src/linux-2.4
+-do
+- if test -d $kernel_dir/drivers/block ; then
+- CFLAGS="$CFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+- CPPFLAGS="$CPPFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+- found_kernel_dir="$kernel_dir"
+- fi
+-done
+-
+-if test "$found_kernel_dir" != "" ; then
+- AC_MSG_RESULT(found $found_kernel_dir )
+-else
+- AC_MSG_ERROR(Kernel sources not found)
+-fi
+-
+-dnl Check Headers
+-AC_CHECK_HEADERS(ida_ioctl.h ida_cmd.h cpqarray.h,,
+- AC_MSG_ERROR(You need to have the complete kernel sources.),[[#include <linux/compiler.h>
+- #include <unistd.h>]])
+-
+-dnl Check version of SmartArray driver
+-AC_MSG_CHECKING(SmartArray driver version)
+-AC_EGREP_HEADER(blk_cnt, ida_ioctl.h,AC_MSG_RESULT(ok),
+- AC_MSG_ERROR(You need to have the SmartArray driver version 1.0.1 or higher installed.))
+-
+-dnl Check for CCISS header file
+-AC_CHECK_HEADERS(linux/cciss_ioctl.h,,
+- AC_MSG_ERROR(You need to have the CCISS driver in the kernel.),[[#include <linux/compiler.h>]])
+-
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+
+diff -Naur arrayprobe-2.0.old/cpqarray.h arrayprobe-2.0/cpqarray.h
+--- arrayprobe-2.0.old/cpqarray.h 1970-01-01 01:00:00.000000000 +0100
++++ arrayprobe-2.0/cpqarray.h 2010-01-13 15:40:11.000000000 +0100
+@@ -0,0 +1,126 @@
++/*
++ * Disk Array driver for Compaq SMART2 Controllers
++ * Copyright 1998 Compaq Computer Corporation
++ *
++ * 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 2 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, GOOD TITLE or
++ * NON INFRINGEMENT. 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, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ * Questions/Comments/Bugfixes to iss_storagedev@hp.com
++ *
++ * If you want to make changes, improve or add functionality to this
++ * driver, you'll probably need the Compaq Array Controller Interface
++ * Specificiation (Document number ECG086/1198)
++ */
++#ifndef CPQARRAY_H
++#define CPQARRAY_H
++
++#ifdef __KERNEL__
++#include <linux/blkdev.h>
++#include <linux/slab.h>
++#include <linux/proc_fs.h>
++#include <linux/timer.h>
++#endif
++
++#include "ida_cmd.h"
++
++#define IO_OK 0
++#define IO_ERROR 1
++#define NWD 16
++#define NWD_SHIFT 4
++
++#define IDA_TIMER (5*HZ)
++#define IDA_TIMEOUT (10*HZ)
++
++#define MISC_NONFATAL_WARN 0x01
++
++typedef struct {
++ unsigned blk_size;
++ unsigned nr_blks;
++ unsigned cylinders;
++ unsigned heads;
++ unsigned sectors;
++ int usage_count;
++} drv_info_t;
++
++#ifdef __KERNEL__
++
++struct ctlr_info;
++typedef struct ctlr_info ctlr_info_t;
++
++struct access_method {
++ void (*submit_command)(ctlr_info_t *h, cmdlist_t *c);
++ void (*set_intr_mask)(ctlr_info_t *h, unsigned long val);
++ unsigned long (*fifo_full)(ctlr_info_t *h);
++ unsigned long (*intr_pending)(ctlr_info_t *h);
++ unsigned long (*command_completed)(ctlr_info_t *h);
++};
++
++struct board_type {
++ __u32 board_id;
++ char *product_name;
++ struct access_method *access;
++};
++
++struct ctlr_info {
++ int ctlr;
++ char devname[8];
++ __u32 log_drv_map;
++ __u32 drv_assign_map;
++ __u32 drv_spare_map;
++ __u32 mp_failed_drv_map;
++
++ char firm_rev[4];
++ int ctlr_sig;
++
++ int log_drives;
++ int phys_drives;
++
++ struct pci_dev *pci_dev; /* NULL if EISA */
++ __u32 board_id;
++ char *product_name;
++
++ void __iomem *vaddr;
++ unsigned long paddr;
++ unsigned long io_mem_addr;
++ unsigned long io_mem_length;
++ int intr;
++ int usage_count;
++ drv_info_t drv[NWD];
++ struct proc_dir_entry *proc;
++
++ struct access_method access;
++
++ cmdlist_t *reqQ;
++ cmdlist_t *cmpQ;
++ cmdlist_t *cmd_pool;
++ dma_addr_t cmd_pool_dhandle;
++ unsigned long *cmd_pool_bits;
++ struct request_queue *queue;
++ spinlock_t lock;
++
++ unsigned int Qdepth;
++ unsigned int maxQsinceinit;
++
++ unsigned int nr_requests;
++ unsigned int nr_allocs;
++ unsigned int nr_frees;
++ struct timer_list timer;
++ unsigned int misc_tflags;
++};
++
++#define IDA_LOCK(i) (&hba[i]->lock)
++
++#endif
++
++#endif /* CPQARRAY_H */
+diff -Naur arrayprobe-2.0.old/ida_cmd.h arrayprobe-2.0/ida_cmd.h
+--- arrayprobe-2.0.old/ida_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ arrayprobe-2.0/ida_cmd.h 2010-01-13 15:40:29.000000000 +0100
+@@ -0,0 +1,349 @@
++/*
++ * Disk Array driver for Compaq SMART2 Controllers
++ * Copyright 1998 Compaq Computer Corporation
++ *
++ * 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 2 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, GOOD TITLE or
++ * NON INFRINGEMENT. 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, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ * Questions/Comments/Bugfixes to iss_storagedev@hp.com
++ *
++ */
++#ifndef ARRAYCMD_H
++#define ARRAYCMD_H
++
++/*#include <asm/types.h>*/
++#if 0
++#include <linux/blkdev.h>
++#endif
++
++/* for the Smart Array 42XX cards */
++#define S42XX_REQUEST_PORT_OFFSET 0x40
++#define S42XX_REPLY_INTR_MASK_OFFSET 0x34
++#define S42XX_REPLY_PORT_OFFSET 0x44
++#define S42XX_INTR_STATUS 0x30
++
++#define S42XX_INTR_OFF 0x08
++#define S42XX_INTR_PENDING 0x08
++
++#define COMMAND_FIFO 0x04
++#define COMMAND_COMPLETE_FIFO 0x08
++#define INTR_MASK 0x0C
++#define INTR_STATUS 0x10
++#define INTR_PENDING 0x14
++
++#define FIFO_NOT_EMPTY 0x01
++#define FIFO_NOT_FULL 0x02
++
++#define BIG_PROBLEM 0x40
++#define LOG_NOT_CONF 2
++
++#pragma pack(1)
++typedef struct {
++ __u32 size;
++ __u32 addr;
++} sg_t;
++
++#define RCODE_NONFATAL 0x02
++#define RCODE_FATAL 0x04
++#define RCODE_INVREQ 0x10
++typedef struct {
++ __u16 next;
++ __u8 cmd;
++ __u8 rcode;
++ __u32 blk;
++ __u16 blk_cnt;
++ __u8 sg_cnt;
++ __u8 reserved;
++} rhdr_t;
++
++#define SG_MAX 32
++typedef struct {
++ rhdr_t hdr;
++ sg_t sg[SG_MAX];
++ __u32 bp;
++} rblk_t;
++
++typedef struct {
++ __u8 unit;
++ __u8 prio;
++ __u16 size;
++} chdr_t;
++
++#define CMD_RWREQ 0x00
++#define CMD_IOCTL_PEND 0x01
++#define CMD_IOCTL_DONE 0x02
++
++typedef struct cmdlist {
++ chdr_t hdr;
++ rblk_t req;
++ __u32 size;
++ int retry_cnt;
++ __u32 busaddr;
++ int ctlr;
++ struct cmdlist *prev;
++ struct cmdlist *next;
++ struct request *rq;
++ int type;
++} cmdlist_t;
++
++#define ID_CTLR 0x11
++typedef struct {
++ __u8 nr_drvs;
++ __u32 cfg_sig;
++ __u8 firm_rev[4];
++ __u8 rom_rev[4];
++ __u8 hw_rev;
++ __u32 bb_rev;
++ __u32 drv_present_map;
++ __u32 ext_drv_map;
++ __u32 board_id;
++ __u8 cfg_error;
++ __u32 non_disk_bits;
++ __u8 bad_ram_addr;
++ __u8 cpu_rev;
++ __u8 pdpi_rev;
++ __u8 epic_rev;
++ __u8 wcxc_rev;
++ __u8 marketing_rev;
++ __u8 ctlr_flags;
++ __u8 host_flags;
++ __u8 expand_dis;
++ __u8 scsi_chips;
++ __u32 max_req_blocks;
++ __u32 ctlr_clock;
++ __u8 drvs_per_bus;
++ __u16 big_drv_present_map[8];
++ __u16 big_ext_drv_map[8];
++ __u16 big_non_disk_map[8];
++ __u16 task_flags;
++ __u8 icl_bus;
++ __u8 red_modes;
++ __u8 cur_red_mode;
++ __u8 red_ctlr_stat;
++ __u8 red_fail_reason;
++ __u8 reserved[403];
++} id_ctlr_t;
++
++typedef struct {
++ __u16 cyl;
++ __u8 heads;
++ __u8 xsig;
++ __u8 psectors;
++ __u16 wpre;
++ __u8 maxecc;
++ __u8 drv_ctrl;
++ __u16 pcyls;
++ __u8 pheads;
++ __u16 landz;
++ __u8 sect_per_track;
++ __u8 cksum;
++} drv_param_t;
++
++#define ID_LOG_DRV 0x10
++typedef struct {
++ __u16 blk_size;
++ __u32 nr_blks;
++ drv_param_t drv;
++ __u8 fault_tol;
++ __u8 reserved;
++ __u8 bios_disable;
++} id_log_drv_t;
++
++#define ID_LOG_DRV_EXT 0x18
++typedef struct {
++ __u32 log_drv_id;
++ __u8 log_drv_label[64];
++ __u8 reserved[418];
++} id_log_drv_ext_t;
++
++#define SENSE_LOG_DRV_STAT 0x12
++typedef struct {
++ __u8 status;
++ __u32 fail_map;
++ __u16 read_err[32];
++ __u16 write_err[32];
++ __u8 drv_err_data[256];
++ __u8 drq_timeout[32];
++ __u32 blks_to_recover;
++ __u8 drv_recovering;
++ __u16 remap_cnt[32];
++ __u32 replace_drv_map;
++ __u32 act_spare_map;
++ __u8 spare_stat;
++ __u8 spare_repl_map[32];
++ __u32 repl_ok_map;
++ __u8 media_exch;
++ __u8 cache_fail;
++ __u8 expn_fail;
++ __u8 unit_flags;
++ __u16 big_fail_map[8];
++ __u16 big_remap_map[128];
++ __u16 big_repl_map[8];
++ __u16 big_act_spare_map[8];
++ __u8 big_spar_repl_map[128];
++ __u16 big_repl_ok_map[8];
++ __u8 big_drv_rebuild;
++ __u8 reserved[36];
++} sense_log_drv_stat_t;
++
++#define START_RECOVER 0x13
++
++#define ID_PHYS_DRV 0x15
++typedef struct {
++ __u8 scsi_bus;
++ __u8 scsi_id;
++ __u16 blk_size;
++ __u32 nr_blks;
++ __u32 rsvd_blks;
++ __u8 drv_model[40];
++ __u8 drv_sn[40];
++ __u8 drv_fw[8];
++ __u8 scsi_iq_bits;
++ __u8 compaq_drv_stmp;
++ __u8 last_fail;
++ __u8 phys_drv_flags;
++ __u8 phys_drv_flags1;
++ __u8 scsi_lun;
++ __u8 phys_drv_flags2;
++ __u8 reserved;
++ __u32 spi_speed_rules;
++ __u8 phys_connector[2];
++ __u8 phys_box_on_bus;
++ __u8 phys_bay_in_box;
++} id_phys_drv_t;
++
++#define BLINK_DRV_LEDS 0x16
++typedef struct {
++ __u32 blink_duration;
++ __u32 reserved;
++ __u8 blink[256];
++ __u8 reserved1[248];
++} blink_drv_leds_t;
++
++#define SENSE_BLINK_LEDS 0x17
++typedef struct {
++ __u32 blink_duration;
++ __u32 btime_elap;
++ __u8 blink[256];
++ __u8 reserved1[248];
++} sense_blink_leds_t;
++
++#define IDA_READ 0x20
++#define IDA_WRITE 0x30
++#define IDA_WRITE_MEDIA 0x31
++#define RESET_TO_DIAG 0x40
++#define DIAG_PASS_THRU 0x41
++
++#define SENSE_CONFIG 0x50
++#define SET_CONFIG 0x51
++typedef struct {
++ __u32 cfg_sig;
++ __u16 compat_port;
++ __u8 data_dist_mode;
++ __u8 surf_an_ctrl;
++ __u16 ctlr_phys_drv;
++ __u16 log_unit_phys_drv;
++ __u16 fault_tol_mode;
++ __u8 phys_drv_param[16];
++ drv_param_t drv;
++ __u32 drv_asgn_map;
++ __u16 dist_factor;
++ __u32 spare_asgn_map;
++ __u8 reserved[6];
++ __u16 os;
++ __u8 ctlr_order;
++ __u8 extra_info;
++ __u32 data_offs;
++ __u8 parity_backedout_write_drvs;
++ __u8 parity_dist_mode;
++ __u8 parity_shift_fact;
++ __u8 bios_disable_flag;
++ __u32 blks_on_vol;
++ __u32 blks_per_drv;
++ __u8 scratch[16];
++ __u16 big_drv_map[8];
++ __u16 big_spare_map[8];
++ __u8 ss_source_vol;
++ __u8 mix_drv_cap_range;
++ struct {
++ __u16 big_drv_map[8];
++ __u32 blks_per_drv;
++ __u16 fault_tol_mode;
++ __u16 dist_factor;
++ } MDC_range[4];
++ __u8 reserved1[248];
++} config_t;
++
++#define BYPASS_VOL_STATE 0x52
++#define SS_CREATE_VOL 0x53
++#define CHANGE_CONFIG 0x54
++#define SENSE_ORIG_CONF 0x55
++#define REORDER_LOG_DRV 0x56
++typedef struct {
++ __u8 old_units[32];
++} reorder_log_drv_t;
++
++#define LABEL_LOG_DRV 0x57
++typedef struct {
++ __u8 log_drv_label[64];
++} label_log_drv_t;
++
++#define SS_TO_VOL 0x58
++
++#define SET_SURF_DELAY 0x60
++typedef struct {
++ __u16 delay;
++ __u8 reserved[510];
++} surf_delay_t;
++
++#define SET_OVERHEAT_DELAY 0x61
++typedef struct {
++ __u16 delay;
++} overhead_delay_t;
++
++#define SET_MP_DELAY
++typedef struct {
++ __u16 delay;
++ __u8 reserved[510];
++} mp_delay_t;
++
++#define PASSTHRU_A 0x91
++typedef struct {
++ __u8 target;
++ __u8 bus;
++ __u8 lun;
++ __u32 timeout;
++ __u32 flags;
++ __u8 status;
++ __u8 error;
++ __u8 cdb_len;
++ __u8 sense_error;
++ __u8 sense_key;
++ __u32 sense_info;
++ __u8 sense_code;
++ __u8 sense_qual;
++ __u32 residual;
++ __u8 reserved[4];
++ __u8 cdb[12];
++} scsi_param_t;
++
++#define RESUME_BACKGROUND_ACTIVITY 0x99
++#define SENSE_CONTROLLER_PERFORMANCE 0xa8
++#define FLUSH_CACHE 0xc2
++#define COLLECT_BUFFER 0xd2
++#define READ_FLASH_ROM 0xf6
++#define WRITE_FLASH_ROM 0xf7
++#pragma pack()
++
++#endif /* ARRAYCMD_H */
+diff -Naur arrayprobe-2.0.old/ida_ioctl.h arrayprobe-2.0/ida_ioctl.h
+--- arrayprobe-2.0.old/ida_ioctl.h 1970-01-01 01:00:00.000000000 +0100
++++ arrayprobe-2.0/ida_ioctl.h 2010-01-13 15:44:46.000000000 +0100
+@@ -0,0 +1,87 @@
++/*
++ * Disk Array driver for Compaq SMART2 Controllers
++ * Copyright 1998 Compaq Computer Corporation
++ *
++ * 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 2 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, GOOD TITLE or
++ * NON INFRINGEMENT. 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, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ * Questions/Comments/Bugfixes to iss_storagedev@hp.com
++ *
++ */
++#ifndef IDA_IOCTL_H
++#define IDA_IOCTL_H
++
++#include "ida_cmd.h"
++#include "cpqarray.h"
++
++#define IDAGETDRVINFO 0x27272828
++#define IDAPASSTHRU 0x28282929
++#define IDAGETCTLRSIG 0x29293030
++#define IDAREVALIDATEVOLS 0x30303131
++#define IDADRIVERVERSION 0x31313232
++#define IDAGETPCIINFO 0x32323333
++
++typedef struct _ida_pci_info_struct
++{
++ unsigned char bus;
++ unsigned char dev_fn;
++ __u32 board_id;
++} ida_pci_info_struct;
++/*
++ * Normally, the ioctl determines the logical unit for this command by
++ * the major,minor number of the fd passed to ioctl. If you need to send
++ * a command to a different/nonexistant unit (such as during config), you
++ * can override the normal behavior by setting the unit valid bit. (Normally,
++ * it should be zero) The controller the command is sent to is still
++ * determined by the major number of the open device.
++ */
++
++#define UNITVALID 0x80
++typedef struct {
++ __u8 cmd;
++ __u8 rcode;
++ __u8 unit;
++ __u32 blk;
++ __u16 blk_cnt;
++
++/* currently, sg_cnt is assumed to be 1: only the 0th element of sg is used */
++ struct {
++ void *addr;
++ size_t size;
++ } sg[SG_MAX];
++ int sg_cnt;
++
++ union ctlr_cmds {
++ drv_info_t drv;
++ unsigned char buf[1024];
++
++ id_ctlr_t id_ctlr;
++ drv_param_t drv_param;
++ id_log_drv_t id_log_drv;
++ id_log_drv_ext_t id_log_drv_ext;
++ sense_log_drv_stat_t sense_log_drv_stat;
++ id_phys_drv_t id_phys_drv;
++ blink_drv_leds_t blink_drv_leds;
++ sense_blink_leds_t sense_blink_leds;
++ config_t config;
++ reorder_log_drv_t reorder_log_drv;
++ label_log_drv_t label_log_drv;
++ surf_delay_t surf_delay;
++ overhead_delay_t overhead_delay;
++ mp_delay_t mp_delay;
++ scsi_param_t scsi_param;
++ } c;
++} ida_ioctl_t;
++
++#endif /* IDA_IOCTL_H */
+diff -Naur arrayprobe-2.0.old/probe.c arrayprobe-2.0/probe.c
+--- arrayprobe-2.0.old/probe.c 2006-01-03 14:11:17.000000000 +0100
++++ arrayprobe-2.0/probe.c 2010-01-13 15:45:22.000000000 +0100
+@@ -33,10 +33,9 @@
+ #include <getopt.h>
+ #include <errno.h>
+
+-#include <linux/compiler.h>
+ #include <linux/cciss_ioctl.h>
+
+-#include <ida_ioctl.h>
++#include "ida_ioctl.h"
+
+ #include "cciss_events.h"
+
diff --git a/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch b/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch
new file mode 100644
index 000000000000..8d955a8f933d
--- /dev/null
+++ b/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch
@@ -0,0 +1,20 @@
+--- probe.c.old 2010-01-13 12:15:32.000000000 +0100
++++ probe.c 2010-01-13 12:16:44.000000000 +0100
+@@ -354,7 +354,7 @@
+ int drivenum = event.detail.logstatchange.logicaldrivenumber;
+ logdrvs[drivenum].state.state = event.detail.logstatchange.newlogicaldrivestate;
+ logdrvs[drivenum].state.severity = logicaldrivestatusseverity[event.detail.logstatchange.newlogicaldrivestate];
+- logdrvs[drivenum].state.message = (char *)malloc(strlen(logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate] + 1));
++ logdrvs[drivenum].state.message = (char *)malloc(strlen(logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate]) + 1);
+ strcpy (logdrvs[drivenum].state.message, logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate]);
+ }
+ if (verbose) {
+@@ -479,7 +479,7 @@
+ int ida_device = 0; /* only for use with -f , used to determine protocol to use */
+ int max_logical = 64; /* hardcoded */
+ int cur_logical = 0; /* number of drives detected */
+- logdrv *logdrvs = (logdrv *)malloc(sizeof(logdrv)*max_logical);
++ logdrv *logdrvs;
+ int worst_disk;
+ int worst_sev = SEV_NORMAL;
+ int cntr;
diff --git a/sys-apps/arrayprobe/metadata.xml b/sys-apps/arrayprobe/metadata.xml
new file mode 100644
index 000000000000..f35b285c1eee
--- /dev/null
+++ b/sys-apps/arrayprobe/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 type="person">
+ <email>chainsaw@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/attr/Manifest b/sys-apps/attr/Manifest
new file mode 100644
index 000000000000..f3765cbd45f7
--- /dev/null
+++ b/sys-apps/attr/Manifest
@@ -0,0 +1,5 @@
+DIST attr-2.4.47.src.tar.gz 343692 SHA256 25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859 SHA512 2a333f63655758298650cf8f89c175efdc0112dcc4013e8d023e2a9a69f177e4bcb1f1d10b6666d6f2027dca4dec0833d54749952ab153d28367e1a72e6e2831 WHIRLPOOL a012f7a0225e63d4d195fae7027e64c0c92edb039622bfdec611b2facbcde83eb5fc921ecfe95c50f54f7c9b518f57a0555dcedc148cc8ff6e73371668a40557
+EBUILD attr-2.4.47-r2.ebuild 1849 SHA256 faa31f91c4d02691facb41c1f295130dac51fed6c6c173d15a06c9dab05ac82b SHA512 23f6808bedd1beb0267c81a60703cedebb3c64ebf5c27f5846aec20cc1187bd75a5e13a35a91c802abbd6f97b30f16e806d2569513a4b4f58a73ddbb213485ee WHIRLPOOL 82af7711de6fe7af40b2d041d37f5dd41cf25d2fa2ed4e38ecb283e1da7753d0ed377a8428ebc41bc26b7260636dfd5bc7bcd3acb188ee8551bdbd7fbb7e692c
+MISC ChangeLog 3860 SHA256 febe8a5c93776169d7e0fa12b6ef6b0797d288d5db3a2ef9f9eb865f9fd075f8 SHA512 6dd743c31d4ae6d8bc548bb7acf3625c0f63f937fdd3c58ebc479c3440f8e6b6bbf0393ab76253e26f2f0d2393e32efc65da63abb4df91484b7c21b145b7a262 WHIRLPOOL eb9029c944a2f3540d44f067928d0814e27a0d86906be94bc414d976e1808d9a0bb663be38d5dd73e419412baee778f6e47deac6e70469485e0a3905900d7a23
+MISC ChangeLog-2015 22372 SHA256 43d0533b17bdcc17c59ca88346255cd49c23c4c1f63eb6810ae468bb0f6b773e SHA512 08af9343dd7e667b99facd1cb6e41a8272a1b4c97889cf2ba0254567bdd7c0b4792584e8e8cb8e95c0dbd42f72ca0e63329ba801d226f716e196d891b4702807 WHIRLPOOL e66d1ceb163a8841e3300e4349bc8f1abfe4f8d19236b7b22207cf7614e26322a8feba752e9f9ac104c016e8855eeefceb1d2d7d3cf127c5a6d0938a7fcd4c7f
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/attr/attr-2.4.47-r2.ebuild b/sys-apps/attr/attr-2.4.47-r2.ebuild
new file mode 100644
index 000000000000..6dfcf00898c3
--- /dev/null
+++ b/sys-apps/attr/attr-2.4.47-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="Extended attributes tools"
+HOMEPAGE="https://savannah.nongnu.org/projects/attr"
+SRC_URI="mirror://nongnu/${PN}/${P}.src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="nls static-libs"
+
+DEPEND="nls? ( sys-devel/gettext )
+ sys-devel/autoconf"
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ -e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \
+ include/builddefs.in \
+ || die
+ strip-linguas -u po
+ elibtoolize #580792
+
+ multilib_copy_sources # https://savannah.nongnu.org/bugs/index.php?39736
+}
+
+multilib_src_configure() {
+ unset PLATFORM #184564
+ export OPTIMIZER=${CFLAGS}
+ export DEBUG=-DNDEBUG
+
+ econf \
+ $(use_enable nls gettext) \
+ --enable-shared $(use_enable static-libs static) \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+ --bindir="${EPREFIX}"/bin
+}
+
+multilib_src_compile() {
+ emake $(multilib_is_native_abi || echo TOOL_SUBDIRS=)
+}
+
+multilib_src_install() {
+ emake \
+ $(multilib_is_native_abi || echo TOOL_SUBDIRS=) \
+ DIST_ROOT="${D}" \
+ install install-lib install-dev
+
+ if multilib_is_native_abi; then
+ # we install attr into /bin, so we need the shared lib with it
+ gen_usr_ldscript -a attr
+ # the man-pages packages provides the man2 files
+ # note: man-pages are installed by TOOL_SUBDIRS
+ rm -r "${ED}"/usr/share/man/man2 "${ED}"/usr/share/man/man5/attr.5 || die
+ fi
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files --all
+ einstalldocs
+}
diff --git a/sys-apps/attr/metadata.xml b/sys-apps/attr/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/attr/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/audio-entropyd/Manifest b/sys-apps/audio-entropyd/Manifest
new file mode 100644
index 000000000000..4fb99b4842b7
--- /dev/null
+++ b/sys-apps/audio-entropyd/Manifest
@@ -0,0 +1,10 @@
+AUX audio-entropyd-2.0.1-ldflags.patch 358 SHA256 466eb7a2e2513708ef11ac9dbf54773ee8861b94ff0c111e6e89ed69dedee479 SHA512 0a1456d0580a08193e2b4e2a408405a0b412de0c54838ce950e6dc2490bc3f45276a86f53f2e7489b3f47343afddcb250d906ef0cb5ddce65f6b51bcab57d2e0 WHIRLPOOL 92656f7e399289403cfd53023c85de7ebc3ac494386b0850136d58f947cd7cc6784a141d15e18c3fb3bbc2e42ae85d393733f03cdd45c0f6b9445954279f4663
+AUX audio-entropyd-2.0.1-uclibc.patch 708 SHA256 78d5f8cf969cc199c8651f6b2d4f451c9b79afba457e5253edffedd7c4f5cc49 SHA512 9e78deb5a813307f1cc87cef0cd10121c0a48b9fcda573a868687b307f95ce4f318a8dc845699c054dda9acb71a1ba0d16bb545c0f0f2ebf38ec834d58eaea3e WHIRLPOOL 8870929374af4edd758117ce8286da6c1a9eb7882811a9ebc032c91ec926fd7d1ffb81ef5c607feeceeb426814c37905ac12e2ff1e9fa285efd14a7e750cfe27
+AUX audio-entropyd.conf-2 340 SHA256 f1be5b6b5b6c46e9ecbdc1ca2a78400edf3873e849c3881009f42d84f425006d SHA512 9922bcdf6e5be49dd158ccd2e14328b1d314d756a9b61bd5c262baef25136e56517c9087097e22808106b09c5e877fe143d024f2c63ae8b12d2d316b6d371dd0 WHIRLPOOL 65cdeeb0c386a9dcf8c6adb0dc5a170429ae596375c45e515ec56c64b7ff6c356cc469389d60c8af375bdfe37cd08aae3f18329f9820163fbf471f47abc3b42d
+AUX audio-entropyd.init-2 651 SHA256 5902c62b62fffd8592a6c06b37f02625ab36f08ebbe522bd7b88c6324bad9ad4 SHA512 61ff99fca907c555f45312c0250511a7c0f7bb757ea7da3d7c6c33932884d9bfdc2148dac466d96fb023ab10bb0d78c3134f488a8486bc38da3743ec2200df57 WHIRLPOOL 238bce9c6a50577df8746444a932fbb7b3e842e0d891111c1016b5d8aaa566c70f32ba6da1da5842367eafcbf0d18e49db283e3074fce5d7244d0b8eb760d17d
+AUX audio-entropyd.service 127 SHA256 6dd1ead6fb1409798b9e2022b387158e3bdf95c9b3e756ac868fdd7b4583564b SHA512 991948b7638f90a7f909492374b70a0f6964a3406df1f5794c25b46523e3c09b2a1d89dfd3c08e6f2925fe5d94a59b5645c0a9bee4746e7d670bacb5831f4001 WHIRLPOOL 281d6d0e0ab97c841e2f95ac5d284fb501c2ded5d1e13b6d9f1fbba8e8f9bd6fbf7351fe130d88c5c65cd91fedadf8c9b55e3098878fc8032b4545339fee97bd
+DIST audio-entropyd-2.0.3.tgz 16681 SHA256 6fbaf1c4f77e988f4656cd079309d5eb6bd36cbae89c2ee01324c5690adaf3ff SHA512 d21c2d547235accdd460bcaf1ff5f5696db2988d385c3c52aad0d651865386409682f8747d1823765f0c0925bf28f38abdfc0b114d239f494c7eb699c5ed3ebf WHIRLPOOL e653b7cccda00323b5f17a675d72cef1a9adf9915dcd27041e63993073a378d92ab5779d25434ecd48ecbb74b45abc4217e4b629c98ba3885589727ef90edf6d
+EBUILD audio-entropyd-2.0.3-r1.ebuild 934 SHA256 ea591cab6d7ca76ae632fd0a87449bb3728fa1f1a0ebe0c24c4e056460d4e29e SHA512 131e1cb96b30b19aaa64ffa8d6c9af98127a6f11621e13e447135164f2bdfe510429671b9f9081c61c6be5cc883777ea7e4352a905721d037a98cdb0c54f7b17 WHIRLPOOL d967f16b3e15e78edaf7766e672d20448ef07f76003daa82fb67c1c020826ed4acec4a5e85f05a15779b9783ee7f81c3494ae15e6647d9aadc6d9172d06a8552
+MISC ChangeLog 2855 SHA256 2a5ff3dcee2700ed70fcb6ae3c17ee4fcd3c2561885989d893b002909f3dd64b SHA512 31c04d051e75dab09ae5898cb1da121ac88c366a4c549a396ad5a8a51d90d80be65cbb2660ddc3f52d369a86335080cdc1aeefc62dbad83df18523e96103337e WHIRLPOOL 642218d7659cee760d64f864dd2f4d0964edfb50f33d05b663db5513bc500f5b8399a7630682254b4250ac8c80a7a9fe868233cfb98bde115ec5ccab5d21a4f5
+MISC ChangeLog-2015 7020 SHA256 80dc6774200dea3ae14dc0904de67acccbb5b81286b4653373ff5fe54afdccc1 SHA512 a0da02cae8be468204573d4d5d6d9f2bd0632ef588b480af0802d2cb0ac914272c8ad170a9a289fb42fddd7ddaaf956b70879119f5d1ea691d0caf925abe0b03 WHIRLPOOL b8ffab0060348456ac4e395d703c817bdcdf5c2eee6a6299a1e2d3672d32e54f1df2efac75e93184643ada39e4069e0b84b65c817030809478ca5a68ce41b4fd
+MISC metadata.xml 241 SHA256 0f2e37b698efda33b2d447f810b2f84882ce2fea989e1f5bf752a8388b5d891a SHA512 dafca7f08962c7d0cc66f603d499915103b4994e2453329857da0d3456363a80bc69c6c35ee537ca013b9969c44ac61d99bab5150a0474b8b970d08d11ad6b56 WHIRLPOOL 3e54a6fdd50ddd37ef0cca85140bd5a3d329e338dc379ee09e6fd50685775c24e783e01ae56d3cff0d31c3205657268140afddee3dce5e093262b6e93533d983
diff --git a/sys-apps/audio-entropyd/audio-entropyd-2.0.3-r1.ebuild b/sys-apps/audio-entropyd/audio-entropyd-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..5e5a60fb72c6
--- /dev/null
+++ b/sys-apps/audio-entropyd/audio-entropyd-2.0.3-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Audio-entropyd generates entropy-data for the /dev/random device"
+HOMEPAGE="http://www.vanheusden.com/aed/"
+SRC_URI="http://www.vanheusden.com/aed/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-entropyd )
+ media-sound/alsa-utils
+ media-libs/alsa-lib"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.0.1-uclibc.patch" \
+ "${FILESDIR}/${PN}-2.0.1-ldflags.patch"
+ sed -i -e "s:^OPT_FLAGS=.*:OPT_FLAGS=${CFLAGS}:" \
+ -e "/^WARNFLAGS/s: -g::" Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin audio-entropyd
+ dodoc README TODO
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ newinitd "${FILESDIR}/${PN}.init-2" ${PN}
+ newconfd "${FILESDIR}/${PN}.conf-2" ${PN}
+}
diff --git a/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-ldflags.patch b/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-ldflags.patch
new file mode 100644
index 000000000000..870e9121140d
--- /dev/null
+++ b/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 95a84a6..340f95f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ TARGETS=audio-entropyd
+ all: $(TARGETS)
+
+ audio-entropyd: audio-entropyd.o error.o proc.o val.o RNGTEST.o error.o
+- $(CC) -o $@ $^ $(LFLAGS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LFLAGS)
+
+ install: audio-entropyd
+ cp audio-entropyd /usr/local/sbin/
diff --git a/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-uclibc.patch b/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-uclibc.patch
new file mode 100644
index 000000000000..bdf5adeff825
--- /dev/null
+++ b/sys-apps/audio-entropyd/files/audio-entropyd-2.0.1-uclibc.patch
@@ -0,0 +1,27 @@
+--- audio-entropyd-1.0.1.orig/error.c 2008-01-22 09:50:28 +0000
++++ audio-entropyd-1.0.1/error.c 2008-01-22 09:53:51 +0000
+@@ -9,13 +9,13 @@
+ #include <signal.h>
+ #include <syslog.h>
+ #include <regex.h>
+-#if defined(__GLIBC__)
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>
+ #endif
+
+ void print_trace(void)
+ {
+-#if defined(__GLIBC__)
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ void *array[MAX_BACKTRACE_LENGTH];
+ size_t size;
+
+@@ -39,7 +39,7 @@
+ printf("\n\n\nDebug information:\n");
+ if (errno) fprintf(stderr, "errno: %d=%s (if applicable)\n", errno, strerror(errno));
+
+-#if defined(__GLIBC__)
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ print_trace();
+ #endif
+
diff --git a/sys-apps/audio-entropyd/files/audio-entropyd.conf-2 b/sys-apps/audio-entropyd/files/audio-entropyd.conf-2
new file mode 100644
index 000000000000..d39ddfca29fa
--- /dev/null
+++ b/sys-apps/audio-entropyd/files/audio-entropyd.conf-2
@@ -0,0 +1,12 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/audio-entropyd
+
+# The acceptable values are DEVICE, READSIZE and SAMPLERATE
+# These defaults give the optimum entropy
+
+#DEVICE="hw:0"
+
+#SAMPLERATE must be a valid sampling rate of your audio source
+SAMPLERATE="44050"
diff --git a/sys-apps/audio-entropyd/files/audio-entropyd.init-2 b/sys-apps/audio-entropyd/files/audio-entropyd.init-2
new file mode 100644
index 000000000000..ff59a659022d
--- /dev/null
+++ b/sys-apps/audio-entropyd/files/audio-entropyd.init-2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need modules
+ use alsasound
+ provide entropy
+}
+
+start() {
+ local params=""
+ [ -n "$DEVICE" ] && params="$params -d $DEVICE"
+ [ -n "$SAMPLERATE" ] && params="$params -N $SAMPLERATE"
+
+ ebegin "Starting audio entropy gathering daemon"
+ start-stop-daemon --start --quiet --pidfile /var/run/audio-entropyd.pid \
+ --exec /usr/sbin/audio-entropyd -- ${params}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping audio entropy gathering daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/audio-entropyd.pid
+ eend ${?}
+}
diff --git a/sys-apps/audio-entropyd/files/audio-entropyd.service b/sys-apps/audio-entropyd/files/audio-entropyd.service
new file mode 100644
index 000000000000..849ad0131c63
--- /dev/null
+++ b/sys-apps/audio-entropyd/files/audio-entropyd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Audio Entropy Daemon
+
+[Service]
+ExecStart=/usr/sbin/audio-entropyd -n
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/audio-entropyd/metadata.xml b/sys-apps/audio-entropyd/metadata.xml
new file mode 100644
index 000000000000..d53949a351ff
--- /dev/null
+++ b/sys-apps/audio-entropyd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<longdescription>Audio-entropyd generates entropy-data for the /dev/random device.</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/baobab/Manifest b/sys-apps/baobab/Manifest
new file mode 100644
index 000000000000..7b0621227c31
--- /dev/null
+++ b/sys-apps/baobab/Manifest
@@ -0,0 +1,7 @@
+DIST baobab-3.22.1.tar.xz 947932 SHA256 5bebcb1797888503d75c9985404e534940c211ffc37e5c7de09eed058dfc97ff SHA512 6fae974ef79dc9b61269cc07fcdb4f6d8f043cf3eb8239c2408a7ccb1445800c1beda85da8ae9e0da1a39604e4896a6aab0ab04391286df20c20783d208c6c36 WHIRLPOOL eef62d8bbc8e7e33337e527178ae905510239cc5ef8995c756528883fe61eb9fa72077a12b6a9fd5845098cc82c1559ac271078bfafbadf975ac3bc674a1375e
+DIST baobab-3.24.0.tar.xz 970636 SHA256 5980e96df9f3d1751a969869ec07bc184ae3ad667d5a3eb06cf1297091fdfc3f SHA512 7a16cdc7b4e77e8bad23bccc171b4e552b2eb33a43822579cdf4b1d5ac76526955c0efeadf355fcda3a72b1fd6f8dbf2a6088406b5a21b8ecc4d06ff525baa17 WHIRLPOOL 5d5b266f563a42a58d3115adf732f06a96c1faeb50c82085271eca96580235746f9b503fe0fa629a4e52d4d2a8abc420ad162652be79c21fab2e4dc8df47562e
+EBUILD baobab-3.22.1.ebuild 826 SHA256 98353eb36d7a079ae341f8d901bfc40c5a65aa17a7e5d8c25757f2f83bdef5e1 SHA512 9f7237475393c82e795a34f2e52bc7104b0200d435643ab54eeca2bde42c059282fbb224c4aa655bda6ffa66dd2c910ce9e5e3519a5c11cea0037443b5424690 WHIRLPOOL c2632b73fe7f39e87c8a4742c6bc384b4912a83899ba047647f66cf257a9738c96117ad7d536f6039b7f532f9adab8f26075fef740d5d19f7bf3ff75ef000b4d
+EBUILD baobab-3.24.0.ebuild 828 SHA256 caadd33d04e9a559487c45ca15343e6b33feb56d95fcad71dfd21b0b786147d1 SHA512 748a5e5dbb070407baba99f1e555895f425c6e2419eafa4e89c1f1ef80b22609af4f6d994e43c2e15587001c070c61412d0b7950bbe909b876f722d34dce09f2 WHIRLPOOL b8d98e5afb9d09425bceff1519a80767de76afbc8c6ec8366a5a32ff5caaf47f02d4907b7ab7c04638dcee94c7380248bbb00c22b8e6b24f674126c8706bdb08
+MISC ChangeLog 4686 SHA256 92840c47ba8b8d0370a29d7e2ee973d7d3700066c078cf6eeb4263756610d3d9 SHA512 a7a28d0ffeb32e1be85cef8687637280ac1be85865726bc0c970a619a65d2cf85aa2e96227f7e28ce9ef7c22409a7ab453935a6f8979f44973bc9b82908ed84f WHIRLPOOL b798e1d7a2f94158be4a8d4fafd79aa3d7258c1755bcfd1b7452bdeeae8f399d6bbc8d6f06597aa1c3e9614c2ca2204b9a9f1a8f6b8a7a97eb7563f8b58a31fc
+MISC ChangeLog-2015 3750 SHA256 6e5115cf69a56498b411c8c5ede316ece020aeb42378538f3124860259a600b0 SHA512 a4c8d5009f9d2ae39126b13b4994643996010dfe464f0a89ba6f3f5e6009e7097c9cf126eac94f4abdc6838a469ddaf7a6b8b3e9d98695e2fe872cbdc4efb96b WHIRLPOOL 3c4e5c93a3f9d838e8fd0fa8755245f82e219736fc4f1cc63ac4ddd0a6a76e8829845895013098a32d1e5cab1c463a074d179f4c3afa073de5fae68dac59e969
+MISC metadata.xml 249 SHA256 4505b0bfeadff287958620b7dc7b7209699065a8f17139a237a5dd409a726a97 SHA512 c40662134899a5c9f0369a1017806f35adf3280a0b3c91726f7a8ca6012a073a8b471583f5bfb6fe95faac1dcf607e8e2e43f8c91d48ec46f4a8824e2f551506 WHIRLPOOL 333a938ee1d2124595596c572697bf5ebad523a92ba12005cfb12e6bb6270881a94a911f0cc9c1cf2bb571559e8271e07dfd307dabe50058236dbe7103562b92
diff --git a/sys-apps/baobab/baobab-3.22.1.ebuild b/sys-apps/baobab/baobab-3.22.1.ebuild
new file mode 100644
index 000000000000..25b752e2597a
--- /dev/null
+++ b/sys-apps/baobab/baobab-3.22.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Disk usage browser for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Baobab"
+
+LICENSE="GPL-2+ FDL-1.1+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.40:2[dbus]
+ >=x11-libs/gtk+-3.19.1:3
+"
+RDEPEND="${COMMON_DEPEND}
+ gnome-base/gsettings-desktop-schemas
+ x11-themes/adwaita-icon-theme
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ VALAC=$(type -P true) \
+ VAPIGEN=$(type -P true)
+}
diff --git a/sys-apps/baobab/baobab-3.24.0.ebuild b/sys-apps/baobab/baobab-3.24.0.ebuild
new file mode 100644
index 000000000000..fae7e7cb7c50
--- /dev/null
+++ b/sys-apps/baobab/baobab-3.24.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Disk usage browser for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Baobab"
+
+LICENSE="GPL-2+ FDL-1.1+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.40:2[dbus]
+ >=x11-libs/gtk+-3.19.1:3
+"
+RDEPEND="${COMMON_DEPEND}
+ gnome-base/gsettings-desktop-schemas
+ x11-themes/adwaita-icon-theme
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ VALAC=$(type -P true) \
+ VAPIGEN=$(type -P true)
+}
diff --git a/sys-apps/baobab/metadata.xml b/sys-apps/baobab/metadata.xml
new file mode 100644
index 000000000000..39980802b1da
--- /dev/null
+++ b/sys-apps/baobab/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/bar/Manifest b/sys-apps/bar/Manifest
new file mode 100644
index 000000000000..adf650bbf0b9
--- /dev/null
+++ b/sys-apps/bar/Manifest
@@ -0,0 +1,5 @@
+DIST bar_1.11.1.tar.gz 187144 SHA256 fa0f5ec5c8400316c2f4debdc6cdcb80e186e668c2e4471df4fec7bfcd626503 SHA512 18a0cf1946155252fc84bce64a1789a2a497c8a870a8494e4b2caecde567121dc6404855c021900358659702a33f8c4f749e9cd0bb1eb761cd650e2c56347035 WHIRLPOOL b5e144841d92af9f23cc66ba81ad921a81729d58189ef8e82694b124e9f77fb36dc2f8f379a957c699b09ed405b5cf9891adb50f89a62e1ce2477ce48fe3ae5c
+EBUILD bar-1.11.1.ebuild 908 SHA256 9c5656f9e42e0fe0f9ff8b15fbda3d03f51323d314761e5350875d8cf9ae3ade SHA512 9642be469d7cea827c41ff7404089f4c6fcef742192dbdededfab69e76643f74076b146f98c810c8788242cc7c85ba4028a0ba0f736b72bf284b9e51ef14b054 WHIRLPOOL 46d0fba44167f08e21766f50d71038339cf22a6f708ce31d2092fb57de8856be8b02b3d1cae8a0cf26cd177b001568cb82b2d08e7d22293e7d90dade1bce8ba9
+MISC ChangeLog 2417 SHA256 986ff3fca1751f88f3170615f2888c5fa1f259737c5459535d65526890d05773 SHA512 b9f34663891fd7e7bfea50fb06fd2f00bbea5109260e6a66e3b4298e476c4cdfd23069f336e11c3d300ae5bddd89fb63148847fe3c95722111644d0df2af4a5b WHIRLPOOL 479756909c0c3ca9a1cbffd195509bc80d45fbe284108251e291871a8b7794693e08f24e465f8516b05cf0263c935caf3289aa1f04371cbd123c96c1f0d56406
+MISC ChangeLog-2015 3729 SHA256 71f85cab8b01805be33630e3b5a1490e86b9689e31786a8ea7eadc4c35f99f10 SHA512 1a2bbe83527623251ad461f0379deed090b208444fba8e44f77174470e27b11691b08eaaf6502a07534452e8167a81701e6008b1c1acaddd2922ff0a4f7d7cef WHIRLPOOL 3c3ad7698932e411ed0aedb107e2d75c0109a3e95f599ea8df37e7caed1127453ea1d53986d433cf400fabbc3a196a228506511e5b515e5be301cfc3c21a7852
+MISC metadata.xml 341 SHA256 e6b6d743fc25fd36dd81f94ad2cfcc6687b54be438f8c867c225668e0c63d8ba SHA512 fd71a4c90f9480d279e8a7198ca518856b379173f977a165a28782dced3f49110f869a87c8f5a9923f1b1486bbb064147ea69ded5ab2a4f458ebcfd450ac1c7e WHIRLPOOL 35456e75d86728a08eabdd639ba2fb7ed7524b18994a33263aadf58b15154a165bf5f25e01520000764cbda900acc51604b48d688b5e925f741315dc20700ab2
diff --git a/sys-apps/bar/bar-1.11.1.ebuild b/sys-apps/bar/bar-1.11.1.ebuild
new file mode 100644
index 000000000000..ff678910027e
--- /dev/null
+++ b/sys-apps/bar/bar-1.11.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools
+
+DESCRIPTION="Console Progress Bar"
+HOMEPAGE="http://clpbar.sourceforge.net/"
+SRC_URI="mirror://sourceforge/clpbar/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc"
+
+DEPEND="doc? ( >=app-doc/doxygen-1.3.5 )"
+RDEPEND=""
+
+src_prepare() {
+ sed -e '/^LDFLAGS/d' \
+ -e '/cd $(WEB_DIR) && $(MAKE)/d' -i Makefile.am || die
+ eautomake
+}
+
+src_configure() {
+ local myconf
+
+ # Fix wrt #113392
+ use sparc && myconf="${myconf} --disable-use-memalign"
+ econf ${myconf}
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+ if use doc; then
+ mkdir -p ../www/doxygen/${PV}
+ emake update-www
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS TODO TROUBLESHOOTING debian/changelog
+ if use doc ; then
+ dohtml -r ../www/doxygen/${PV}/html/*
+ fi
+}
diff --git a/sys-apps/bar/metadata.xml b/sys-apps/bar/metadata.xml
new file mode 100644
index 000000000000..19655510512a
--- /dev/null
+++ b/sys-apps/bar/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 type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">clpbar</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/baselayout-java/Manifest b/sys-apps/baselayout-java/Manifest
new file mode 100644
index 000000000000..1d478f9302bd
--- /dev/null
+++ b/sys-apps/baselayout-java/Manifest
@@ -0,0 +1,5 @@
+DIST baselayout-java-0.1.0.tar.gz 72571 SHA256 da5dd2210597e3aa4e2ff437cd25cadc9999fdcfdb31ca459395243695c9e2c7 SHA512 6f5b6ff1ed07406711e15a768f5abdf9f7edef1b31e094760f265863aa8991bf60ff71c8b10003265d8ec1aa7c94a611bede96980d25c819908b705b4d2d1062 WHIRLPOOL 9a3111a64d04bd6f274c13f5ed3c641fa1dbbd8d8cf1ff152df7a55771148d80fdcd3c3dc5a7394675723a58aa51ce680fef20c6209380dde4ec0fe1c18a3fac
+EBUILD baselayout-java-0.1.0.ebuild 700 SHA256 6b17448ab4cd8899df4a79b83eb07bd10273a943d4890a846d28028e25a938f4 SHA512 5e2e23faaef23e77f7f268d8237df8bdcabc71e37ea4f2e5f0f1c481642bc10c2d37a9aacc1633c33ac7bf631539bf832ba4ce595fe2f7a6ddd5d8e76efa2759 WHIRLPOOL 5681ccfd902569629aa239b40efdc28f876500c487222cc8e22c17ca49e6b5fba6e73294ff9c18402f1d0970b07424672c71280a4d2303eaaa32b868ea03704f
+MISC ChangeLog 2806 SHA256 09fe57e2ff23823d6d7db6d188381cdf3d28afaf7d2f7d9831255c0127b0d7f6 SHA512 5c442e7b26e712d6be6dcfdcc0b0326552fc4096ec92520e4c06d59e54cfd9094ec7c51cfacbdd070c61919439df5d5f92af7ed09ad32bed262013112ccd0d7f WHIRLPOOL 4b4f2b8aaeba9ad0bc8b600c0dc9457eeaab729600eefdd4448a61bb2570c867070856933a9e43122cb1073c9722b20ee48c45acb222c396ada84ac51c5bbea1
+MISC ChangeLog-2015 1542 SHA256 e304c40d7c89242f547071495dc18928442546274419fa8edd1abad282686c39 SHA512 84782fad786e8b85f6cbcc9df3b25486cd8b8327ecd000be23ffc6c43a8031b0b2add39b506303e2da0bb293ff1019878264375aa0307ba2dd075788899e6872 WHIRLPOOL 95ef0934d62cbec80a2980df80ef6d048a74d1900a9b38586b0d404ec7d4441a46361624a813d065c3be2a2d2638ddbba86a3a7fa5cc44317b9e90731f96d3e8
+MISC metadata.xml 232 SHA256 0c8d91b3d514ac42d0eaca567346ab909c0f947049c85c25a380ec2400f1b3fb SHA512 00beaf2c81112ff757c4395f4ea47e85f2d48e369e241f10ddf200090dd6513d52ae2b1aef6d28b7417f1cf34608a7258a167eb307d5670323a2190f3710f893 WHIRLPOOL 3a1a6d054edc9177d85ca868f9b0a6e84ee51bab4fbdbb9b1ead1a03874036bcc3f96e903fb751dc4d29fdb7d6b5f3d8dbe7b042fc697c887e23f41cc9c8c4ac
diff --git a/sys-apps/baselayout-java/baselayout-java-0.1.0.ebuild b/sys-apps/baselayout-java/baselayout-java-0.1.0.ebuild
new file mode 100644
index 000000000000..66a5be953e3f
--- /dev/null
+++ b/sys-apps/baselayout-java/baselayout-java-0.1.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit fdo-mime gnome2-utils
+
+DESCRIPTION="Baselayout for Java"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Java"
+SRC_URI="https://dev.gentoo.org/~sera/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~ia64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="!<dev-java/java-config-2.2"
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/sys-apps/baselayout-java/metadata.xml b/sys-apps/baselayout-java/metadata.xml
new file mode 100644
index 000000000000..2444066aa02b
--- /dev/null
+++ b/sys-apps/baselayout-java/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/baselayout-prefix/Manifest b/sys-apps/baselayout-prefix/Manifest
new file mode 100644
index 000000000000..f3d3313eeef2
--- /dev/null
+++ b/sys-apps/baselayout-prefix/Manifest
@@ -0,0 +1,6 @@
+AUX baselayout-2.2-prefix-chaining.patch 2060 SHA256 0f42eeb6d7ea700f14d30f0c0f11856caeffd46ae8b9d68a9761237b6251222b SHA512 6ad809a735250efebf2052736a095e6573cdc1650f54c2d636053e05add9e71045d2e14ad1788eadaef5eff76a4bdea9ac58db67ffcb67ba5bf16f1883186aca WHIRLPOOL 5363a11e7ff8661655f319be92caee5a540bccbfac6390b4230ac461adec9b66158ddd8feec25ee37469caa70e991d461a2b4bd4c93e7171e106f31b16850c92
+DIST baselayout-2.2.tar.bz2 40744 SHA256 11d4a223b06da545c3e59e07c9195570f334b5b1be05d995df0ebc8ea2203e98 SHA512 a5199c42e835d9f2683cc94f3c4c47ecdc392316c24e0932845736e2e90479b0c5c8ad72ead8e0537f097405b7d7548d00b87b7ff8c9e3651486e3c5c0970b36 WHIRLPOOL 60cc4f7f76c5a45c15303e526decffb3bad2b50ac659b1dd072d2ed4b0eb0b31929a1a733ddb03a31ee5882b889a4efb87206f63ffaa2b11e26d36afd0933a95
+EBUILD baselayout-prefix-2.2-r5.ebuild 3557 SHA256 457d848d454dcc98dc791e6a4df20e7dc094003fb19b11029ded82e69bca4205 SHA512 9ed29ada5260ad9dd26b83ab55ce73558e31bfe883824a54f8e6526bfb12a8dd3f894b66559cf10762c0ba1bf64b39351c06f72e540eab42fbec10f820d23165 WHIRLPOOL 4e71c1c9e1821c2e209418d8b73903df40f41c4dea030edc459dd218801fc4eddd1cceaeb82f59a888f96cdaa624462400e7efebda9a8ed8c3876d9fc3ede53a
+MISC ChangeLog 4492 SHA256 a903762f55c7c89615b4142e192aacc28dbfead257a1aa809eaffc047618120a SHA512 2ffd2b5d606ce1e9ba7943929aa240eff843eadb84d11b7f9cc941ee43f1dd2fc2c260cd06d82952694489b56ed103a28b8bfed80400bdfc0ff493b87540be7c WHIRLPOOL c91eb735a3e704c4ffe28ec714ca2da4ace3b164d2c424f6443ce445f5e35d2dbcc15eb8d3d30053257e439632f63960e658ecb0e21e59f70ac7f637f160b399
+MISC ChangeLog-2015 11812 SHA256 5de6c002b02ad2ee0eeef423408f0a471e212b7a71afb36ae1d066dea783d944 SHA512 16e6a769e3358607354f76b8784c615935feb99bf0c1421070879b67b7a31def196a51685fe2ba4e9ae853787a45ace6a5016607d1b0bf21427089eb4801c303 WHIRLPOOL 4fcf8b04eccead2cdff3a36cdb88f04feef83f35cd9844a31d092a2012d1413bae2dacf8f3a03f5e1cd06cc503293ded0cf995d0323e5117412bf7ffaf4df77f
+MISC metadata.xml 218 SHA256 095b5605ce3ed9f39ba42cc3aec76060b662da5402f401d6da98ca2cc115df7e SHA512 5f03bbfedc0f66afc7bc45f1aeeccdfc3c775dd337fb280bb7e80e29f618898ce92a05c66c126e79333e33ce7f422169c5ff1cdeeb30b58475c712e9bdc4e79f WHIRLPOOL c48b1cc98e9fa71f4c4701aed44626b08a7fb1543477d77b04ecb39d0afe86e486cada91da268884f89f12e15b63e502d61d07b5417a38c49d94ee44df85c5b5
diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild
new file mode 100644
index 000000000000..9f59ae36b38f
--- /dev/null
+++ b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib libtool
+
+MY_P=${P/-prefix/} # just use "upstream" sources
+DESCRIPTION="Minimal baselayout for Gentoo Prefix installs"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~arm ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+
+RDEPEND="sys-apps/gentoo-functions"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_preinst() {
+ # This is written in src_install (so it's in CONTENTS), but punt all
+ # pending updates to avoid user having to do etc-update (and make the
+ # pkg_postinst logic simpler).
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release
+}
+
+src_prepare() {
+ if use prefix-chain; then
+ epatch "${FILESDIR}"/baselayout-${PV}-prefix-chaining.patch
+
+ # need to set the PKG_CONFIG_PATH globally for this prefix, when
+ # chaining is enabled, since pkg-config may not be installed locally,
+ # but still .pc files should be found for all RDEPENDable prefixes in
+ # the chain.
+ echo "PKG_CONFIG_PATH=\"/usr/lib/pkgconfig:/usr/share/pkgconfig\"" >> etc/env.d/00basic
+ echo "PORTAGE_OVERRIDE_EPREFIX=\"${EPREFIX}\"" >> etc/env.d/00basic
+ echo "PORTAGE_CONFIGROOT=\"${EPREFIX}\"" >> etc/env.d/00basic
+ echo "EPREFIX=\"${EPREFIX}\"" >> etc/env.d/00basic
+ fi
+ default
+}
+
+src_install() {
+ # make functions.sh available in /etc/init.d (from gentoo-functions)
+ # Note: we cannot replace the symlink with a file here, or Portage will
+ # config-protect it, and etc-update can't handle symlink to file updates
+ dodir etc/init.d
+ dosym ../../lib/gentoo/functions.sh /etc/init.d/functions.sh
+
+ dodir etc
+ sed \
+ -e "/PATH=/!s:/\(etc\|usr/bin\|bin\):\"${EPREFIX}\"/\1:g" \
+ -e "/PATH=/s|\([:\"]\)/|\1${EPREFIX}/|g" \
+ etc/profile > "${ED}"/etc/profile || die
+ if ! use prefix-chain; then
+ sed \
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
+ -i "${ED}"/etc/profile || die
+ fi
+ dodir etc/env.d
+ sed \
+ -e "s:/\(etc/env.d\|opt\|usr\):${EPREFIX}/\1:g" \
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
+ etc/env.d/00basic > "${ED}"/etc/env.d/00basic || die
+ dodoc ChangeLog.svn
+
+ # add the host OS MANPATH
+ if [[ -d "${ROOT}"/usr/share/man ]] ; then
+ echo 'MANPATH="/usr/share/man"' > "${ED}"/etc/env.d/99basic || die
+ fi
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Prefix Base System release ${PV}" > "${ED}"/etc/gentoo-release
+
+ # FHS compatibility symlinks stuff
+ dosym /var/tmp /usr/tmp
+
+ # add a dummy to avoid Portage shebang errors
+ dodir sbin
+ cat > "${ED}"/sbin/runscript <<- EOF
+ #!/usr/bin/env sh
+ source "${EPREFIX}/lib/gentoo/functions.sh"
+
+ eerror "runscript/openrc-run not supported by Gentoo Prefix Base System release ${PV}" 1>&2
+ exit 1
+ EOF
+ chmod 755 "${ED}"/sbin/runscript || die
+ cp "${ED}"/sbin/{runscript,openrc-run} || die
+}
+
+pkg_postinst() {
+ # Take care of the etc-update for the user
+ if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release
+ fi
+
+ # baselayout leaves behind a lot of .keep files, so let's clean them up
+ find "${EROOT}"/lib/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"/lib/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+}
diff --git a/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch b/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch
new file mode 100644
index 000000000000..98e41b95bb91
--- /dev/null
+++ b/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch
@@ -0,0 +1,67 @@
+--- baselayout-2.2/etc/profile.orig 2017-03-23 16:46:29.922123300 +0100
++++ baselayout-2.2/etc/profile 2017-03-23 16:58:43.578360900 +0100
+@@ -4,6 +4,46 @@
+ # environment for login shells.
+ #
+
++#
++# for prefix-chaining, the very first thing to do is to load
++# the profiles for all chained instances above.
++#
++# TODO: is it safe in any case to shell source make.conf?
++# don't do any recursive expansion here. if the parent can
++# use READONLY_EPREFIX's, it has to have the same profile as
++# we have here, and thus it will source parents before
++# evaluating anything from itself.
++#
++if [[ -r /etc/portage/make.conf ]]; then
++ _ro_root=$(. /etc/portage/make.conf && echo $READONLY_EPREFIX)
++elif [[ -r /etc/make.conf ]]; then
++ _ro_root=$(. /etc/make.conf && echo $READONLY_EPREFIX)
++else
++ echo "Failed to read" /etc/portage/make.conf >&2
++fi
++_ro_deps=${_ro_root#*:}
++_ro_root=${_ro_root%:*}
++if [ -n "${_ro_root}" -a -f "${_ro_root}/"etc/profile ]; then
++ . "${_ro_root}/"etc/profile
++fi
++
++#
++# With prefix-chaining we want another set of variables that
++# should be retained for all prefixes. for example it is ok
++# to retain PKG_CONFIG_PATH if the parent of the chain can
++# be used to resolve RDEPEND...
++#
++if [[ -n "${_ro_root}" ]]; then
++ _ro_chained_path_vars="PATH MANPATH"
++
++ [[ ${_ro_deps} == *RDEPEND* ]] &&
++ _ro_chained_path_vars="${_ro_chained_path_vars} PKG_CONFIG_PATH"
++
++ for var in ${_ro_chained_path_vars}; do
++ eval "_ro_backupenv_paths_${var}=\${${var}}"
++ done
++fi
++
+ # Load environment settings from profile.env, which is created by
+ # env-update from the files in /etc/env.d
+ if [ -e /etc/profile.env ] ; then
+@@ -61,3 +101,17 @@
+ [ -r "$sh" ] && . "$sh"
+ done
+ unset sh
++
++#
++# finally chain the save variables for previous prefixes in the chain.
++#
++if [[ -n "${_ro_chained_path_vars}" ]]; then
++ for var in ${_ro_chained_path_vars}; do
++ eval "export ${var}=\${${var}}:\${_ro_backupenv_paths_${var}}"
++ eval "unset _ro_backupenv_paths_${var}"
++ done
++fi
++
++unset _ro_root
++unset _ro_deps
++unset _ro_chained_path_vars
diff --git a/sys-apps/baselayout-prefix/metadata.xml b/sys-apps/baselayout-prefix/metadata.xml
new file mode 100644
index 000000000000..91e2eccbc46d
--- /dev/null
+++ b/sys-apps/baselayout-prefix/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 type="project">
+ <email>prefix@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
new file mode 100644
index 000000000000..f05554ea793d
--- /dev/null
+++ b/sys-apps/baselayout/Manifest
@@ -0,0 +1,9 @@
+DIST baselayout-2.3.tar.bz2 32266 SHA256 e7bbd7d71ede6820a37738fd2e9010d54545fbd73c16ee686663dee2075c5d4c SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb WHIRLPOOL 92e88f5ff0eddd56698977bb6578ee53f62755bfdd9023fc7151415fce4a87952b539e0da3a7056a0f90c668a5a1c4fe2b43af0359fe9c40b4dc7b50568711d7
+DIST baselayout-2.4.1.tar.bz2 31307 SHA256 d75ae329ba47f26e7c41c6e060f57a8f1f1a97420d39e6a49ab2bdb86c4a2c00 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1 WHIRLPOOL 9057ab259c8ef61bb56d13b237e343f6a7aec8fef61a0a9872fc7e0aa34a7dc772cd4701a76341d170eaa3ba328ad0b693d098189ca7f4aa9e5e32232f1d1801
+EBUILD baselayout-2.3.ebuild 8346 SHA256 f81ee2b6b46b6ddd2f1098f02d31095d8a76b030b20395654dc5967cb5617bed SHA512 c2efae56623e39a6dcb13a064810c900bb22bdd9b04f31b1837c4a56a48cf2135eaaa3340c72e2ebf4ac5800d8ba2ee03083d2edf0c3181ff465b6a87cc7d4c1 WHIRLPOOL 4b6783f5b2204cc1b2efa2e29b0d1b4eb41864b47bbfff7d67b4fa5200ec2b6cbe22696c1bdabfc49c696bbeb9753f2f7b56a1265187bd6b6a93ef805cafefe5
+EBUILD baselayout-2.4.1-r2.ebuild 8567 SHA256 26630dedefe8ef21c3ebcffe7afe2aeb43cd757f687bfb8a6d51aa2bc5a18a02 SHA512 54b918555d24639073a1526324fbd12273e5e8f799e7a2a591c5c1eb4e70bbbc161e4056b62a2de2ade1d912b5d1b2736e84a5c4cb552b7ffca7dc1427ee781b WHIRLPOOL 0bb44976d077bbba1489c7b77762596276c75adfb5767c48960892bb0bf990e5fbe179c636115a831aaee4878a25d590ad6640f45525b6e6bd0d550820e8e09d
+EBUILD baselayout-9999.ebuild 8688 SHA256 965513b4fb9f6396d8bfe457de1890af36a130a84b3935189f87c1c39ff67b15 SHA512 0e36fe35bcfef3e6df92c43b3eb7111c8a5fa1003264529ce56332972cb5fbcda5db94f64f0f5fca74145eff953bea80685d053ff0ae265672912bff0c5278af WHIRLPOOL d945dac37e2ea93e4cdae684f9f4b1b8e3b8c2a667bea933be8da98962a14757a28ef2a80b5b2a8691e047e220200b9564b35c8da0650c8d5ee21f735b13d486
+MISC ChangeLog 4857 SHA256 f10de10caa066cb3c6f2471c29bdaf6bad0de254216efda4ad288e46b254b970 SHA512 bae6a38f8780a29d06fb12b39479f36403392a63600ebd9032c8490fc51aa3bb1d162cf7a472fd38e0aa87770088e12a1d4df8d9591b8a28275bbf690fa62f4f WHIRLPOOL ec46fb22de2a7b079d4d1090526baa50519fb23575953a19651674ddec808318664eb3d462c2e89bcc6309cbb47211fb07f5a88e95819b4518c8e76c7529442b
+MISC ChangeLog-2008 101952 SHA256 cb360ccdd6458e3faa54214ea6370ade92265bafa1b1aa7789165b5dfee3e5c8 SHA512 d888de07f955094603497e06a083ffe33d3bfeeed7aede59bca5cd60a6c1d5334d691a8d0a7ae7534af6e82fcd8dbf522f9ac3024a468f5035a9245024cc726f WHIRLPOOL 97ee6ca2c4b9a3fc0a919cd6f286165b1eec32e32acb7f2c81e04464fd7a34cc5847e7087795479a5475bc25eaea89ae28b56bcfd11f3d51c6153d83c26f9bdb
+MISC ChangeLog-2015 10095 SHA256 a8ecc0cc040723fa4d9a740e520286b574cf05ef977c06ca6cfb10ab27bbcfae SHA512 106ae36b21ec3806f06ed2b1e3a39e4e88f2dd004915e3b56765bbe43751a00d14188c066ff31a8465684db9fd918d3b6046686a1708435a2c91eb6fec754a07 WHIRLPOOL 2e154d06840d6b39ed1a968820352dfd713d257abb2e2e97a5db53c6c4816a4a9ad2288e6cfc61388d22b22049503855a9e6402c576785f53fb62a506bf6e6c4
+MISC metadata.xml 358 SHA256 b31b751b50e8a91d4e0569671cf55e89dca561c724db408f3015d544d66852b7 SHA512 37306b4ebf69803889059875a22ceccde18725cc21e5a598496c30a377e6cb1d3d9ca88123121b2a70c2436b3a77530415169b53165de93ea8510cc41fbb589f WHIRLPOOL c1d2fd649ef108432ddc6c251df0afcc444b14b90da75a48e93bd6eb0b04c3f35bf703bdc9371e5537144ee8392c7c7868895b50ec0a815c4e1403c898a2283c
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
new file mode 100644
index 000000000000..c7cac095dbf5
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -0,0 +1,241 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build kernel_linux"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
+
+ # figure out which paths should be symlinks and which should be directories
+ local dirs syms exp d
+ for libdir in ${libdirs} ; do
+ exp=( {,usr/,usr/local/}${libdir} )
+ for d in "${exp[@]}" ; do
+ # most things should be dirs
+ if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
+ [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
+ else
+ [ -h "${d}" ] && syms+=" ${d}"
+ fi
+ done
+ done
+ if [ -n "${syms}${dirs}" ] ; then
+ ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
+ ewarn "have these paths configured as follows:"
+ [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
+ [ -n "${syms}" ] && ewarn "directories:${syms}"
+ ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
+ ewarn "If things fail, you will need to manually create/move the directories."
+ echo
+ fi
+
+ # setup symlinks and dirs where we expect them to be; do not migrate
+ # data ... just fall over in that case.
+ local prefix
+ for prefix in "${EROOT}"{,usr/,usr/local/} ; do
+ if [ "${SYMLINK_LIB}" = yes ] ; then
+ # we need to make sure "lib" points to the native libdir
+ if [ -h "${prefix}lib" ] ; then
+ # it's already a symlink! assume it's pointing to right place ...
+ continue
+ elif [ -d "${prefix}lib" ] ; then
+ # "lib" is a dir, so need to convert to a symlink
+ ewarn "Converting ${prefix}lib from a dir to a symlink"
+ rm -f "${prefix}lib"/.keep
+ if rmdir "${prefix}lib" 2>/dev/null ; then
+ ln -s ${def_libdir} "${prefix}lib" || die
+ else
+ die "non-empty dir found where we needed a symlink: ${prefix}lib"
+ fi
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a symlink"
+ mkdir -p "${prefix}" || die
+ rm -f "${prefix}lib" || die
+ ln -s ${def_libdir} "${prefix}lib" || die
+ mkdir -p "${prefix}${def_libdir}" #423571
+ fi
+ else
+ # we need to make sure "lib" is a dir
+ if [ -h "${prefix}lib" ] ; then
+ # "lib" is a symlink, so need to convert to a dir
+ ewarn "Converting ${prefix}lib from a symlink to a dir"
+ rm -f "${prefix}lib" || die
+ if [ -d "${prefix}lib32" ] ; then
+ ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
+ mv "${prefix}lib32" "${prefix}lib" || die
+ else
+ mkdir -p "${prefix}lib" || die
+ fi
+ elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
+ # make sure the old "lib" ABI location does not exist; we
+ # only symlinked the lib dir on systems where we moved it
+ # to "lib32" ...
+ case ${CHOST} in
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [ -d "${prefix}lib32" ] ; then
+ rm -f "${prefix}lib32"/.keep
+ if ! rmdir "${prefix}lib32" 2>/dev/null ; then
+ ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
+ die "non-empty dir found where there should be none: ${prefix}lib32"
+ fi
+ fi
+ ;;
+ esac
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a dir"
+ mkdir -p "${prefix}lib" || die
+ fi
+ fi
+ done
+}
+
+pkg_preinst() {
+ # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
+ # the baselayout-1.x ebuild copies all the real configs from the user's
+ # /etc/conf.d into ${D}, it makes them all appear to be the default
+ # versions. In order to protect them from being unmerged after this
+ # upgrade, modify their timestamps.
+ touch "${EROOT}"/etc/conf.d/* 2>/dev/null
+
+ # This is written in src_install (so it's in CONTENTS), but punt all
+ # pending updates to avoid user having to do etc-update (and make the
+ # pkg_postinst logic simpler).
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release
+
+ # We need to install directories and maybe some dev nodes when building
+ # stages, but they cannot be in CONTENTS.
+ # Also, we cannot reference $S as binpkg will break so we do this.
+ multilib_layout
+ if use build ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ if use prefix; then
+ sed -i -r\
+ -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
+ -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
+ etc/profile || die
+ sed -i -r \
+ -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
+ etc/env.d/00basic || die
+ sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
+ sed -i -r \
+ -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
+ share.Linux/passwd || die
+ fi
+
+ # handle multilib paths. do it here because we want this behavior
+ # regardless of the C library that you're using. we do explicitly
+ # list paths which the native ldconfig searches, but this isn't
+ # problematic as it doesn't change the resulting ld.so.cache or
+ # take longer to generate. similarly, listing both the native
+ # path and the symlinked path doesn't change the resulting cache.
+ local libdir ldpaths
+ for libdir in $(get_all_libdirs) ; do
+ ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+pkg_postinst() {
+ local x
+
+ # We installed some files to /usr/share/baselayout instead of /etc to stop
+ # (1) overwriting the user's settings
+ # (2) screwing things up when attempting to merge files
+ # (3) accidentally packaging up personal files with quickpkg
+ # If they don't exist then we install them
+ for x in master.passwd passwd shadow group fstab ; do
+ [ -e "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # Take care of the etc-update for the user
+ if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # baselayout leaves behind a lot of .keep files, so let's clean them up
+ find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT}"proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+ fi
+}
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
new file mode 100644
index 000000000000..d137c15e5274
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build kernel_linux"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
+
+ # figure out which paths should be symlinks and which should be directories
+ local dirs syms exp d
+ for libdir in ${libdirs} ; do
+ exp=( {,usr/,usr/local/}${libdir} )
+ for d in "${exp[@]}" ; do
+ # most things should be dirs
+ if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
+ [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
+ else
+ [ -h "${d}" ] && syms+=" ${d}"
+ fi
+ done
+ done
+ if [ -n "${syms}${dirs}" ] ; then
+ ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
+ ewarn "have these paths configured as follows:"
+ [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
+ [ -n "${syms}" ] && ewarn "directories:${syms}"
+ ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
+ ewarn "If things fail, you will need to manually create/move the directories."
+ echo
+ fi
+
+ # setup symlinks and dirs where we expect them to be; do not migrate
+ # data ... just fall over in that case.
+ local prefix
+ for prefix in "${EROOT}"{,usr/,usr/local/} ; do
+ if [ "${SYMLINK_LIB}" = yes ] ; then
+ # we need to make sure "lib" points to the native libdir
+ if [ -h "${prefix}lib" ] ; then
+ # it's already a symlink! assume it's pointing to right place ...
+ continue
+ elif [ -d "${prefix}lib" ] ; then
+ # "lib" is a dir, so need to convert to a symlink
+ ewarn "Converting ${prefix}lib from a dir to a symlink"
+ rm -f "${prefix}lib"/.keep
+ if rmdir "${prefix}lib" 2>/dev/null ; then
+ ln -s ${def_libdir} "${prefix}lib" || die
+ else
+ die "non-empty dir found where we needed a symlink: ${prefix}lib"
+ fi
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a symlink"
+ mkdir -p "${prefix}" || die
+ rm -f "${prefix}lib" || die
+ ln -s ${def_libdir} "${prefix}lib" || die
+ mkdir -p "${prefix}${def_libdir}" #423571
+ fi
+ else
+ # we need to make sure "lib" is a dir
+ if [ -h "${prefix}lib" ] ; then
+ # "lib" is a symlink, so need to convert to a dir
+ ewarn "Converting ${prefix}lib from a symlink to a dir"
+ rm -f "${prefix}lib" || die
+ if [ -d "${prefix}lib32" ] ; then
+ ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
+ mv "${prefix}lib32" "${prefix}lib" || die
+ else
+ mkdir -p "${prefix}lib" || die
+ fi
+ elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
+ # make sure the old "lib" ABI location does not exist; we
+ # only symlinked the lib dir on systems where we moved it
+ # to "lib32" ...
+ case ${CHOST} in
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [ -d "${prefix}lib32" ] ; then
+ rm -f "${prefix}lib32"/.keep
+ if ! rmdir "${prefix}lib32" 2>/dev/null ; then
+ ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
+ die "non-empty dir found where there should be none: ${prefix}lib32"
+ fi
+ fi
+ ;;
+ esac
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a dir"
+ mkdir -p "${prefix}lib" || die
+ fi
+ fi
+ done
+}
+
+pkg_preinst() {
+ # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
+ # the baselayout-1.x ebuild copies all the real configs from the user's
+ # /etc/conf.d into ${D}, it makes them all appear to be the default
+ # versions. In order to protect them from being unmerged after this
+ # upgrade, modify their timestamps.
+ touch "${EROOT}"/etc/conf.d/* 2>/dev/null
+
+ # This is written in src_install (so it's in CONTENTS), but punt all
+ # pending updates to avoid user having to do etc-update (and make the
+ # pkg_postinst logic simpler).
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release
+
+ # We need to install directories and maybe some dev nodes when building
+ # stages, but they cannot be in CONTENTS.
+ # Also, we cannot reference $S as binpkg will break so we do this.
+ multilib_layout
+ if use build ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # handle multilib paths. do it here because we want this behavior
+ # regardless of the C library that you're using. we do explicitly
+ # list paths which the native ldconfig searches, but this isn't
+ # problematic as it doesn't change the resulting ld.so.cache or
+ # take longer to generate. similarly, listing both the native
+ # path and the symlinked path doesn't change the resulting cache.
+ local libdir ldpaths
+ for libdir in $(get_all_libdirs) ; do
+ ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+pkg_postinst() {
+ local x
+
+ # We installed some files to /usr/share/baselayout instead of /etc to stop
+ # (1) overwriting the user's settings
+ # (2) screwing things up when attempting to merge files
+ # (3) accidentally packaging up personal files with quickpkg
+ # If they don't exist then we install them
+ for x in master.passwd passwd shadow group fstab ; do
+ [ -e "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # Take care of the etc-update for the user
+ if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # baselayout leaves behind a lot of .keep files, so let's clean them up
+ find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${v}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update and . /etc/profile"
+ break
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
new file mode 100644
index 000000000000..98795ba6d00f
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_linux"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
+
+ # figure out which paths should be symlinks and which should be directories
+ local dirs syms exp d
+ for libdir in ${libdirs} ; do
+ exp=( {,usr/,usr/local/}${libdir} )
+ for d in "${exp[@]}" ; do
+ # most things should be dirs
+ if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
+ [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
+ else
+ [ -h "${d}" ] && syms+=" ${d}"
+ fi
+ done
+ done
+ if [ -n "${syms}${dirs}" ] ; then
+ ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
+ ewarn "have these paths configured as follows:"
+ [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
+ [ -n "${syms}" ] && ewarn "directories:${syms}"
+ ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
+ ewarn "If things fail, you will need to manually create/move the directories."
+ echo
+ fi
+
+ # setup symlinks and dirs where we expect them to be; do not migrate
+ # data ... just fall over in that case.
+ local prefix
+ for prefix in "${EROOT}"{,usr/,usr/local/} ; do
+ if [ "${SYMLINK_LIB}" = yes ] ; then
+ # we need to make sure "lib" points to the native libdir
+ if [ -h "${prefix}lib" ] ; then
+ # it's already a symlink! assume it's pointing to right place ...
+ continue
+ elif [ -d "${prefix}lib" ] ; then
+ # "lib" is a dir, so need to convert to a symlink
+ ewarn "Converting ${prefix}lib from a dir to a symlink"
+ rm -f "${prefix}lib"/.keep
+ if rmdir "${prefix}lib" 2>/dev/null ; then
+ ln -s ${def_libdir} "${prefix}lib" || die
+ else
+ die "non-empty dir found where we needed a symlink: ${prefix}lib"
+ fi
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a symlink"
+ mkdir -p "${prefix}" || die
+ rm -f "${prefix}lib" || die
+ ln -s ${def_libdir} "${prefix}lib" || die
+ mkdir -p "${prefix}${def_libdir}" #423571
+ fi
+ else
+ # we need to make sure "lib" is a dir
+ if [ -h "${prefix}lib" ] ; then
+ # "lib" is a symlink, so need to convert to a dir
+ ewarn "Converting ${prefix}lib from a symlink to a dir"
+ rm -f "${prefix}lib" || die
+ if [ -d "${prefix}lib32" ] ; then
+ ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
+ mv "${prefix}lib32" "${prefix}lib" || die
+ else
+ mkdir -p "${prefix}lib" || die
+ fi
+ elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
+ # make sure the old "lib" ABI location does not exist; we
+ # only symlinked the lib dir on systems where we moved it
+ # to "lib32" ...
+ case ${CHOST} in
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [ -d "${prefix}lib32" ] ; then
+ rm -f "${prefix}lib32"/.keep
+ if ! rmdir "${prefix}lib32" 2>/dev/null ; then
+ ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
+ die "non-empty dir found where there should be none: ${prefix}lib32"
+ fi
+ fi
+ ;;
+ esac
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a dir"
+ mkdir -p "${prefix}lib" || die
+ fi
+ fi
+ done
+}
+
+pkg_preinst() {
+ # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
+ # the baselayout-1.x ebuild copies all the real configs from the user's
+ # /etc/conf.d into ${D}, it makes them all appear to be the default
+ # versions. In order to protect them from being unmerged after this
+ # upgrade, modify their timestamps.
+ touch "${EROOT}"/etc/conf.d/* 2>/dev/null
+
+ # This is written in src_install (so it's in CONTENTS), but punt all
+ # pending updates to avoid user having to do etc-update (and make the
+ # pkg_postinst logic simpler).
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release
+
+ # We need to install directories and maybe some dev nodes when building
+ # stages, but they cannot be in CONTENTS.
+ # Also, we cannot reference $S as binpkg will break so we do this.
+ multilib_layout
+ if use build ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # handle multilib paths. do it here because we want this behavior
+ # regardless of the C library that you're using. we do explicitly
+ # list paths which the native ldconfig searches, but this isn't
+ # problematic as it doesn't change the resulting ld.so.cache or
+ # take longer to generate. similarly, listing both the native
+ # path and the symlinked path doesn't change the resulting cache.
+ local libdir ldpaths
+ for libdir in $(get_all_libdirs) ; do
+ ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+pkg_postinst() {
+ local x
+
+ # We installed some files to /usr/share/baselayout instead of /etc to stop
+ # (1) overwriting the user's settings
+ # (2) screwing things up when attempting to merge files
+ # (3) accidentally packaging up personal files with quickpkg
+ # If they don't exist then we install them
+ for x in master.passwd passwd shadow group fstab ; do
+ [ -e "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # Take care of the etc-update for the user
+ if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # baselayout leaves behind a lot of .keep files, so let's clean them up
+ find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${v}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update and . /etc/profile"
+ break
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
new file mode 100644
index 000000000000..53e04953d604
--- /dev/null
+++ b/sys-apps/baselayout/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 type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/biosdevname/Manifest b/sys-apps/biosdevname/Manifest
new file mode 100644
index 000000000000..f1f5aee1843a
--- /dev/null
+++ b/sys-apps/biosdevname/Manifest
@@ -0,0 +1,5 @@
+DIST biosdevname-0.7.2.tar.gz 193926 SHA256 954575f482ff5de2d49c335b563990859a3eb3506e8fa976f6915eba870d71f6 SHA512 2b71d33b3c7ab6c19f6129763a4c044f9cb4cbc43aec0e0d2a83177d8edb1440c17ffc4ab2eae448ae997dcb4b52315f8266c2e4010367f9690e4552cba89502 WHIRLPOOL 8b04da13314ca391075939905b1ab9b072f249cc5e37d3a341bc187cc34c80f798e0134689d1877d6d334e760c46eab56dfa2cb50515571f6b4d4fdf3856a4fe
+EBUILD biosdevname-0.7.2.ebuild 610 SHA256 b915b84412175ceb5e52b701c32b8e527224c4a37195cfe3f43e30779128f68e SHA512 48a3dfb359d1b76f23ebed71d169da6f8eb0712cd5a7f60feb8effe296779b61a176b62ae32ae8d926c6b56171ee0f8847459861d35d24d4d5605e2e1634c909 WHIRLPOOL 4a5069713d1e9282d6fdb1ec1362121562f6fd5f26a30cd071540af39d1a8cff6033f6a6fb0315f2fd75bb833d4bf3b9f567cd3d95a6b0fc10b166d309b4bd59
+MISC ChangeLog 3699 SHA256 fe3736152c6951bc2d39315154c68f7299e0881512149cbec31376890bba63a0 SHA512 7a67b357096537c371df67c9dffde865f346448b38545a08cc20f9e3eeeae811bafe7932d50c2e14aefb248e78aaf70839a5395df94c0a72f35e5430b2a7d291 WHIRLPOOL c803c372afd5f3c26a99b57d81cbc78c70d192c9d65abc723c94022186a9cae0644dadca2f2f6fcb5cea2a1ea3e8f9b34e69c5f8cc8bda1e17e5f29203b93daa
+MISC ChangeLog-2015 3184 SHA256 887ec47dc0e09b8bbf10884e8700f2ad9f22a6dfcec8ae5762f7ef40a553155d SHA512 c7bae78175b236381c0416a7b680e5e9a48e819d2c990b6c6e25347d0b1884bdf048bab37ffe5493975f6c291d082df3ef8d4d3f4c573c57c114595ea4be937e WHIRLPOOL e41922538714f3a629bb415dadb628457c6591caa814ec91d40f3aa461cc46354b8a60a18d6e02999a28cc58a11eedb07567cf2a7b2b068ee4740cdf2d47aabd
+MISC metadata.xml 600 SHA256 ff087c0b2e3bb02d02e7d661c4d4167b2ac7b32940b29083bec34349d43d43dc SHA512 ce873c047cb223fc6ee65be31d373f23cff1b6b3a607497a4176315247756d0d9e642faa75b7de5176ad3cdb7870d2450246df05a15159a30ad6764065a61d91 WHIRLPOOL b25b5ca183089541434f797692020b834efbdf3ad09e4fbda07dbe56f4f500173989c174b6f230b74df70d34339d7e2e11f8539f5c2d662af758fc875db05e51
diff --git a/sys-apps/biosdevname/biosdevname-0.7.2.ebuild b/sys-apps/biosdevname/biosdevname-0.7.2.ebuild
new file mode 100644
index 000000000000..bfccd3161ba9
--- /dev/null
+++ b/sys-apps/biosdevname/biosdevname-0.7.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit udev
+
+DESCRIPTION="Sets BIOS-given device names instead of kernel eth* names"
+HOMEPAGE="http://linux.dell.com/biosdevname/"
+SRC_URI="http://linux.dell.com/biosdevname/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+CDEPEND="virtual/udev"
+DEPEND="${CDEPEND}
+ sys-apps/pciutils"
+RDEPEND="${CDEPEND}"
+
+src_prepare() {
+ sed -i -e 's|/sbin/biosdevname|/usr\0|g' biosdevname.rules.in || die
+ sed -i -e "/RULEDEST/s:/lib/udev:$(get_udevdir):" configure{,.ac} || die
+}
diff --git a/sys-apps/biosdevname/metadata.xml b/sys-apps/biosdevname/metadata.xml
new file mode 100644
index 000000000000..c605f311bfad
--- /dev/null
+++ b/sys-apps/biosdevname/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 type="person">
+ <email>aidecoe@gentoo.org</email>
+ <name>Amadeusz Żołnowski</name>
+</maintainer>
+<longdescription lang="en">
+biosdevname in its simplest form takes a kernel device name as an argument, and
+returns the BIOS-given name it "should" be. This is necessary on systems where
+the BIOS name for a given device (e.g. the label on the chassis is "Gb1")
+doesn't map directly and obviously to the kernel name (e.g. eth0).
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/biosdisk/Manifest b/sys-apps/biosdisk/Manifest
new file mode 100644
index 000000000000..2b6c27a45cb9
--- /dev/null
+++ b/sys-apps/biosdisk/Manifest
@@ -0,0 +1,5 @@
+DIST biosdisk-git-06112010.tar.gz 1195889 SHA256 3319207abb6715ca032852190c64a2b27a227364f848eccd362ecdf1d3102478 SHA512 ade60e0e1ebb069e7f8d2046eff479cdb5186e54e0408b7fe65ac803476c9e325f9771617bbbcd60471d6b2d637aaef20c68af89c16c4ea26e04cfe501e4a310 WHIRLPOOL ca5340c25ab4a1eb579d180d404a0e4314500d85a309acdf36d0359d145b2266c76fcb446ff10212efb926034640e041e448bedf94a868a013a76dcdd4063cdc
+EBUILD biosdisk-0_p20100611-r1.ebuild 1071 SHA256 79d9be9f0fc491914863a780ee69c4c0aa71e6b591362a327db28d8d2a6cad4e SHA512 2f4acf96a27355c8a9f0c25b825a5e524cd00a255cd86ec778e940ed17f387b413e9fc455954b351032c37963d9c70922b3937188391aa6c84eb6ca57604d46a WHIRLPOOL 4350cd020b98ab3bd275e2ffee5c7efed8d7c7c2d000abb73d0993bb19cf0500bcf3ddf9e47075ad7ba68b3500f2fbc6efc74104b1d636e26372df8b55843898
+MISC ChangeLog 2448 SHA256 f5e5e93e1a8df68ba43af0586133373361542cabcf38c9af244c4bb0c40e9ff5 SHA512 dfc6554e1b1c5b8eefe26cc3515d74e88eb71a89dd30db3df7d94c0ff7d8eeabae0726064c3ce879446d21c3899bd7e40a0ee6dbc9e20b4237037ebefefc5361 WHIRLPOOL 37fb6c6f011e8b137b0192aed10cc5b0be72da2fbd5ae77034cd901357887b96083d16d10a0f808d0caa04c888985be116bd08cae7ab5b58253306a9186fe103
+MISC ChangeLog-2015 2297 SHA256 ecae45eff3a8d9cb90a859373a4215c3602ae5a170280aca9f7a74d0e0271736 SHA512 1bcbb9acecfe89efd6c8c0706ce39a8a07fd98526dd4052b4f20292324b090c85c7f4b7c33eda08a89b562254b43d0447cd2dbdbe61bfdf73ba197739652679e WHIRLPOOL 316eb34c4b5a87c682496c3eb686acd73af12a788d127cceef565176594295cb8bde699f983173464edbdc67267b3e70ebb28ce6bd34abb339795c98ef89e2dd
+MISC metadata.xml 404 SHA256 90f52c3d71142dc1d7f62ffe0bcaf5aecb4022e4aaa7182384a5f058ea423ac3 SHA512 1209b6e2eb33bacae6588a135b4ba5c93a7d6b9f6ed6bc0f3401b00feb8e9f6d8f4e95a0d9632cc2584dc6adb71f4319aeb9e5883edb7764a23044f35360a191 WHIRLPOOL f05d1597bbdb88fcb08239a6155b13633f6ee44af6a93c543e9649fde19d53af19a0660c3ccb48d67bf3c0d349409ebdba925a6651bd91906fe3e9e6b7220bba
diff --git a/sys-apps/biosdisk/biosdisk-0_p20100611-r1.ebuild b/sys-apps/biosdisk/biosdisk-0_p20100611-r1.ebuild
new file mode 100644
index 000000000000..7ef0db6c40f9
--- /dev/null
+++ b/sys-apps/biosdisk/biosdisk-0_p20100611-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit versionator python-single-r1
+
+MY_PV=$(get_version_component_range 2)
+MY_PV_YEAR=${MY_PV:1:4}
+MY_PV_MONTH=${MY_PV:5:2}
+MY_PV_DAY=${MY_PV:7:2}
+MY_PV="${MY_PV_MONTH}${MY_PV_DAY}${MY_PV_YEAR}"
+
+S=${WORKDIR}/${PN}
+DESCRIPTION="A script that creates floppy boot images to flash Dell BIOSes"
+HOMEPAGE="http://en.community.dell.com/techcenter/os-applications/w/wiki/linux-projects.aspx"
+SRC_URI="http://linux.dell.com/biosdisk/${PN}-git-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RDEPEND="
+ >=app-text/dos2unix-5.0
+ sys-boot/syslinux
+ ${PYTHON_DEPS}
+"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_install() {
+ python_fix_shebang blconf
+
+ dosbin biosdisk blconf
+
+ dodoc AUTHORS README README.dosdisk TODO VERSION
+ doman biosdisk.8.gz
+
+ insinto /usr/share/biosdisk
+ doins dosdisk.img dosdisk{288,8192}.img biosdisk-mkrpm-{fedora,redhat,generic}-template.spec
+
+ insinto /etc
+ doins biosdisk.conf
+}
diff --git a/sys-apps/biosdisk/metadata.xml b/sys-apps/biosdisk/metadata.xml
new file mode 100644
index 000000000000..2e67e478e9f3
--- /dev/null
+++ b/sys-apps/biosdisk/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 type="person">
+ <email>mattsch@gmail.com</email>
+ <name>Matthew Schultz</name>
+ <description>Assign bugs to him</description>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/bleachbit/Manifest b/sys-apps/bleachbit/Manifest
new file mode 100644
index 000000000000..658dbf1dddca
--- /dev/null
+++ b/sys-apps/bleachbit/Manifest
@@ -0,0 +1,7 @@
+DIST bleachbit-1.12.tar.bz2 396838 SHA256 55188debde6ccb9d83ebf5bb9f8c821c616fa0dfe309779d3d87059c04b1a8f4 SHA512 b9c13a75b86eebbedaf928394714ac4d7847b8d53d345a4884acee68cd9c46ff1d5f4108479d7695109bad03c0fcdbb6f89e77d8794a60697fd5c6acdb34530c WHIRLPOOL e0df98dec3948eb6e8035911e82988a14876f07828e58e8badb4042b921e57d544bf060cb542fbd66e68b7c5652d3f9f08dbec2c9ae8a30ecb6df9431aae5d4b
+DIST bleachbit-1.17.tar.gz 867671 SHA256 fe76f43d7cc1347ca6fba1902b35ced454d7a0b45a6ac983d8b63987d4e94fa0 SHA512 c1d7d266e7baef532a9826ce1a0fb8cd247136a335c3236ba7cf6e4f7af4420e4f0f424fb98579c5433ebd55138860657a3fad3ad56ed4f4a3f8163526a73e95 WHIRLPOOL f06b0ac02d80a0dd8cd3f343b60a8af46abad5d6e96cc716d9e6b32539e9deb56574ffeb99285b3b7f1e16987b869275935cfae9b61e42708f176f1e1f9597b6
+EBUILD bleachbit-1.12.ebuild 1497 SHA256 57603aee0f103841863433e839cde911af1650905295909f8792b92e6364cfa8 SHA512 4083aa52a3ae8091bb2532496ad1aa8c7aa48c68c371e8d681fb85c6e6d3745d76ccdb5181f15c61d8a4b07d3ea6220dde37f66848fe2753597da921841ef4fd WHIRLPOOL f59a78b96023d31436f61bb4e92e373b03dabdee73fd046f4081cd7a90f2703f6a9634b52a3b9ab29b77ac363aa79a59525a5158e11ebfdc4e481eece356b729
+EBUILD bleachbit-1.17.ebuild 1534 SHA256 0942b7d04dd0554439542c6e8f926acefc2c00acf6611bdde8dd2196a1053423 SHA512 f0b91c0bc386651ca27a29529cbcc548b3ce2eebbf519b7f5c2d1333eea843eaa689f23da72be3903a663e306b21fc3ab24030e76e906275b186330fe357daa0 WHIRLPOOL 95b0bf2981bb7ad3d62281ec75e7e81da7d58cb533dd06077573e9137700396b43b45c832d7460b3f6354304229ec98e6a3ca17d8c0820726a076d12798abe72
+MISC ChangeLog 4531 SHA256 ce9be2976e1fb551276cc4d0253013dec38248079cf4382d78eea53f69a0f35b SHA512 59b40345748f488c3e2afa3bdf9d7a35020354e88b7a184d3d3e25bd4f9c33aee28b9ebe6ac0db0bc4c478794309f05172eb77747e999729717f7eda3d6273c1 WHIRLPOOL ad2d383907eaa5c0d624e7322c039c7498269729efa61721f083338f13fd46cfbc6189c853f4b9c5be33b01ea42cd3195ac92578927ddf12fbae6a26bb50bfcf
+MISC ChangeLog-2015 4420 SHA256 67d698e5621feb8289f2bbf1c535211b1fad3bc76ae81f7a9bd2eec29ea04ede SHA512 4230bc002dc89233ddff2fcb520a79096ca181bef814004f85c20b0726eb1c573989e7a2ba6b1cf067196f4f10fa0f6630810402bea2283f8ab68ba30f1f020d WHIRLPOOL e6547d10b825ef7991180759fe247d7909c2d7171855d92c4ae22e30bd945be9e08d55f4bf32410dc965458875f81964b8e20d2ff6671d7ba279f7cc0cd84491
+MISC metadata.xml 617 SHA256 557d36d059e86ebba88647cdcfee287dd1850f97ed30ff9b4df8ef0d1a3b4a65 SHA512 d33574458859889b096a77c7855cbf02d294abe9ef6c8b01aca43d33dafa41ea4da409483cca276ff2fe5fa96875cc53db8e0c18108116f4c5c4e9f8dda9f212 WHIRLPOOL be8bb5b9cce1a7b7da4ccbc65b240930dfae70093df343f159a2894188ecc113d8fe3eb706d75bb84ded390f4044ee838e104ab7615c9bb51ae8c1cbf493925b
diff --git a/sys-apps/bleachbit/bleachbit-1.12.ebuild b/sys-apps/bleachbit/bleachbit-1.12.ebuild
new file mode 100644
index 000000000000..927359b5e594
--- /dev/null
+++ b/sys-apps/bleachbit/bleachbit-1.12.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="ar ast be bg bn bs ca cs da de el en_AU en_CA en_GB eo es et eu fa fi fo fr gl he hi hr hu hy ia id it ja ko ku ky lt lv
+ms my nb nds nl nn pl pt_BR pt ro ru se si sk sl sr sv ta te th tr ug uk uz vi zh_CN zh_TW"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 eutils l10n
+
+DESCRIPTION="Clean junk to free disk space and to maintain privacy"
+HOMEPAGE="https://www.bleachbit.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+gtk nls"
+
+RDEPEND="
+ dev-python/notify-python[$PYTHON_USEDEP]
+ gtk? ( dev-python/pygtk:2[$PYTHON_USEDEP] )"
+
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+DOCS=( README.md )
+
+python_prepare_all() {
+ rem_locale() {
+ rm "po/${1}.po" || die "removing of ${1}.po failed"
+ }
+
+ l10n_find_plocales_changes po "" ".po"
+ l10n_for_each_disabled_locale_do rem_locale
+
+ # choose correct Python implementation, bug #465254
+ sed -i -e 's/python/$(PYTHON)/g' po/Makefile || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use nls && emake -C po
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use nls && emake -C po DESTDIR="${D}" install
+
+ # https://bugs.gentoo.org/388999
+ insinto /usr/share/${PN}/cleaners
+ doins cleaners/*.xml
+
+ newbin ${PN}.py ${PN}
+ python_replicate_script "${D}/usr/bin/${PN}"
+
+ doicon ${PN}.png
+ domenu ${PN}.desktop
+}
diff --git a/sys-apps/bleachbit/bleachbit-1.17.ebuild b/sys-apps/bleachbit/bleachbit-1.17.ebuild
new file mode 100644
index 000000000000..997d4a6fd02d
--- /dev/null
+++ b/sys-apps/bleachbit/bleachbit-1.17.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="ar ast be bg bn bs ca cs da de el en_AU en_CA en_GB eo es et eu \
+fa fi fo fr gl he hi hr hu hy ia id it ja ko ku ky lt lv ms my nb nds nl nn \
+pl pt pt_BR ro ru se si sk sl sq sr sv ta te th tr ug uk uz vi zh_CN zh_TW"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 eutils l10n
+
+DESCRIPTION="Clean junk to free disk space and to maintain privacy"
+HOMEPAGE="https://www.bleachbit.org"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+gtk nls"
+
+RDEPEND="
+ dev-python/notify-python[$PYTHON_USEDEP]
+ gtk? ( dev-python/pygtk:2[$PYTHON_USEDEP] )"
+
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+DOCS=( README.md )
+
+python_prepare_all() {
+ rem_locale() {
+ rm "po/${1}.po" || die "removing of ${1}.po failed"
+ }
+
+ l10n_find_plocales_changes po "" ".po"
+ l10n_for_each_disabled_locale_do rem_locale
+
+ # choose correct Python implementation, bug #465254
+ sed -i -e 's/python/$(PYTHON)/g' po/Makefile || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use nls && emake -C po
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use nls && emake -C po DESTDIR="${D}" install
+
+ # https://bugs.gentoo.org/388999
+ insinto /usr/share/${PN}/cleaners
+ doins cleaners/*.xml
+
+ newbin ${PN}.py ${PN}
+ python_replicate_script "${D}/usr/bin/${PN}"
+
+ doicon ${PN}.png
+ domenu ${PN}.desktop
+}
diff --git a/sys-apps/bleachbit/metadata.xml b/sys-apps/bleachbit/metadata.xml
new file mode 100644
index 000000000000..5c059a4ab560
--- /dev/null
+++ b/sys-apps/bleachbit/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 type="person">
+ <email>christian.tietz@mailbox.org</email>
+ <name>Christian Tietz</name>
+ <description>Proxy Maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bleachbit/bleachbit</remote-id>
+ <bugs-to>https://bugs.launchpad.net/bleachbit</bugs-to>
+ <remote-id type="sourceforge">bleachbit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
new file mode 100644
index 000000000000..9b4ea245c562
--- /dev/null
+++ b/sys-apps/busybox/Manifest
@@ -0,0 +1,27 @@
+AUX busybox-1.19.0-bb.patch 908 SHA256 98f92c2edbcf61d1bacef783ea8b08cce07051b0a4489ed3f4579296846f89f1 SHA512 d4024e531ce7113cf554646608b1ef356e51691e3e21d165621b3690c82b56a319867b90d9daba548b635d9dbd41be5efea63181b7123d4505e529d863a8214c WHIRLPOOL b0d6d9b08ad0930e5243c7addc8a6db61505e95ed8e72c64fbfd734cb6ff9e303b3eb8ea6ec4790b2be567783664230cf278eb3e673fa0844c3881cf993f7cb8
+AUX busybox-1.25.1-setfiles.patch 1153 SHA256 bd0f75f3d3eeab0d140cd7497617875330b5f70de14c04b78047e76aa1c08611 SHA512 2b3b4aba3be49437b1875ce00887e385abae275cc269ca0e80af797a6a6acfa2f20ea4bcf195e67490d8fe691c1ca7493adbf7e097bd4f6f0e1d7e07e493dca4 WHIRLPOOL 9442abafe26be8a1b2e60b81df2446957e6d135f2d7038ea71eba55f10e1ed3677743d93b2ffd7a1977d214d7ec3916ca4ec40c9cd46d16f5ba47ea3198357ec
+AUX busybox-1.26.2-bb.patch 2416 SHA256 260bc0e35c808fc71d73982adb29161c2649b76ed0afa23b66f148c6ebf09d95 SHA512 cb767a613ede504a7b1a87da3270992ffa44d3b6f76eebefceffc8a5a49119a99333c482420efab9d1e5a92a26280376c7e9ec62fcb2193d9172f4e7bc19f50e WHIRLPOOL 31a9278cad767fcf455b45ccf756f5e69e79f0d4ccafb4d8d42317e1226b638ce4df8df19d0497925e54bf8a145f1ac562f5650678bd715018d99407f1a36042
+AUX ginit.c 3097 SHA256 fd6a4715d3dd10f6db479020433da3997d397658301335c847fb779129238b8c SHA512 8bf70f13db0fbeecedf9a9f862c5391c0d8b7aa3ddd2ec85cda9b360c3117a01e32b01017b8c30197f587e521ba360ff70d1caf8d0f69d5c3a27f37ecc252e7c WHIRLPOOL a1ec3ccc296033d88a9504b693c7d249d0bd11b1d75e3f59a62137c5e4b4c914fe2b8971c86dbca2cc8ccc0d86f3f8c2c45bb44cec85a3628c44f091476baa92
+AUX klogd.confd 218 SHA256 737b78745964e110da2fd3357c6d5fb80ccacf979039b8d40c03cf1cb969e5f3 SHA512 3348d5376b368b28d1431692a93868cd4550be12ad729340c5f78da35a5bd295e7613d70ce8ccde5029ad6d87a41c2f24155180f3570de8a9174dd63dece143f WHIRLPOOL ea28c1d926e36fba0ab69de8ddfd2503889b7cfa3a4ada347a9d22d9894fe30be068c0ed55f899b952e62b8de3cb69e1a4209f7864787988ded28ede10c7445a
+AUX klogd.initd 245 SHA256 c8d6f43e5b658eeb54892fea21c0afaa15447e903c55c3bd3d011773f20bb773 SHA512 6c28b5f2db40eeeae14f859f56a5e4f96a034b69639f38da3a437eabd1f74f61240b87eac2f7e5ca9a3377ceb9a37e939ab69b7db6a70c962062e5ae29f7e835 WHIRLPOOL 949802460f708c3db1633fa4e070aa01c243912b437c3999e9c22887d8111195efc1b9f29cfcaeaa6ee5e5ccdd7fb37f89c5ebb3f035388a6ea0d8b5e5f611e2
+AUX mdev.initd 869 SHA256 1ad1fb4d9d92e804a4042ec27534970351516ac5d4367e759a77de8b9f6208f6 SHA512 d7c7074384e8fcc6c8e7e55f94103bc575b101426ed8012a352546e8c741e90dd224869a9308a29e21491021d4372a4fab73c0f0d4453c6a53ea8ae537ca8e7a WHIRLPOOL a401aee17e7359582261ddca204336bbd0d1b5d5b217c3a587e20298af05c094e967f234eee5964a0402c3d4f0a2fdfef228f2a4328d5e6b05f14e10933876b5
+AUX mdev/dvbdev 356 SHA256 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de SHA512 ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d4e8f4294545d3a9ab6708ae2e77c5b108b5f091bbce8f94a WHIRLPOOL ec24a4afe8333e2d4d856fe3853b844d113057daf3fe536a4c8ef481a5ec925254c7daeb09df378922fabb96400440f4bde40979417b7c35467934d7e2235739
+AUX mdev/ide_links 440 SHA256 3fccc9ee437e3dcc8ac73bfe3713334a7156a112fe442e052fff4f26ff0f6a88 SHA512 0142234d0bda86ad1e5f88f1da34669e5fda46a0fd52ce507bd49ce74d2b7c12c323e8db863bccb924e6d632b568db8b243361b217c5b2e1d92a25feb6e62dec WHIRLPOOL ce02358a65ad2beeab12485379e322736c7b6b58ff44a20b880d9bab8806e04890a385b94228f2db685150dfe0a3c716f842ce5c1c7f579c8208ab4e9a6ae852
+AUX mdev/usbdev 1624 SHA256 113ecaa722fa1f4e1c76489e2a7b24099778615a5bccd443aa9cbab28c6d05d0 SHA512 f2d98050eeeb2fbb299298e221f47182a74ed901d2c8c848aa297ebd461c62c30d2fb968bb3eb723a6d9c268fac4a3c40a18aa59ed934043d42c38a1f6b9f5a2 WHIRLPOOL 9b773cb41827bf5777061ec7ed432315bc5bf070768a44ceec7c893af2266d8c06ea4c061711b2696a8228d72c7222fbf52d26fb92b4112158716727b3bc1e38
+AUX mdev/usbdisk_link 984 SHA256 c72cdf4bfde9a8f8334a9d6bfce2a468c926a5530532b8a16a13a63d798abeb3 SHA512 05bc589f067cf988f97f10def3c05e139ac4f4ebe045bdb4c2f5453f5e672bf61d3dc1636974c5680c8c9cf22498bee9cfa28a8f4a264d9f5b10a72a9da0ca16 WHIRLPOOL 03f71c6ce87ea19d9b78615e06adbb5ad73e05b2e3dd69d28092df5e961aea2d06db6c97389d000d20b42b0df241a5e8a7f23056d0f40c5cde0557ce7fdf1fcc
+AUX ntpd.confd 186 SHA256 4bff7f5c66f4eece52e4381fd2706e591f10eb50f3c3a4132344d34150dc54de SHA512 b0ef111ea7dd6a096acf711d2d84a7c3d38e7e8c181f734053d38c565ab44ecf843ef32c0de0c4e7ecec990e97468a2545f83821beedb125cd6723ed74c67ad8 WHIRLPOOL a1b228ae22c61de6ecc7fa58edcd4c3941b3762a45fcc38d05bd1c9428bc553b1a158c101d65a99ba63d4bc19b269e834b3f0eba40a5a1c81e0ae876a2ecb42c
+AUX ntpd.initd 259 SHA256 50ebc260adc5fafa283039ed44ccab7d81762470b33c3876e1b4f66e3883c6b6 SHA512 bdae71e811af7165f014bd9a918824ee1b0c68df78f3457296d6be36e85c5e6d813610979f6d6b9af3c9e2fd4c95a451a63900461a948cbe88d7b6e3201cf03a WHIRLPOOL d0caae91e26f55afbdcff890cce38d2d2b5be45efbc7a4fe958a31741aba68b35f6b698c50c8f71f6a45315e0dff5e3f2a792d51d3d41ba59e4e1eb4e801a385
+AUX syslogd.confd 234 SHA256 65166088cb173582200b8c0d3bc6ea339b5929dbafa816780bfaf50e3514bc25 SHA512 01a2ecf89c49e3e06dd1b6f6673fca16d0f2dd01ff27c0d609c803bc2c81b5ced8245b6388e48ffa2f05ff4e8c1824af73df6364bbebebc722166447bd412f52 WHIRLPOOL b0a9e82225968d44446025242ac6c9429dc2e01a3720d94349756f71ec3a11c3ff2217bce7c4f1a1ea8a2a8baecd3265c3cce01675138674c05a9f2a96ade2ae
+AUX syslogd.initd 267 SHA256 e8dff11a6756650efccd7071331462026d3b1f3008a0f2d08c82654a70052eb7 SHA512 856dd97ed46b08fdd13e497737f1eb192594e33bfc5d395d7ca6eed2e6bc212cf0cf33518b36a6f9a18d6962d462430c7b50c07e9dc08e85606ef68b240b1211 WHIRLPOOL 5d91dab5443c3555a34b27d1a9f921fdf957d3ce97c7c85e9ceeab503f281b5edd6fb465a94c8979d796db3822ce965f4fa75f49ed513f1f2878301f6e2e2a7b
+AUX watchdog.confd 232 SHA256 786d9497ad55c29d6fff231709e71ecad94f2ee1de3b45b461deb29c3eba1c63 SHA512 8fd7121075535195f3e5d43ec773713c883fb7865cd5e5927b3b20c2605c50acb81d50461bd1a246c1282006ce74b11932ac1cec67ddc2be15da2f9aa8674232 WHIRLPOOL 8ea0f6b759198c978f10bf0b2b00cc73343e72401a05edf257b9c5e1032e8a619328aaa02936b5b5a717a021baa84b5653b8c9826e14e5c07c7b7af98f878767
+AUX watchdog.initd 219 SHA256 68831d9e8c460a605f20c2e476ff6f80dcf977412e509f4fcb5ee1f4f3b5d813 SHA512 d329fb72ce078a95a1fb77b72321dee56d19c76b45cb78a7a57a46d9fa385b982a114be49dd8696c2d4fc2b2dd90a17ee728ef2938172cc2f8b12b5a9ebd62f5 WHIRLPOOL 69de35443fb58b3188b026787ded43997ca9fb6cafe6d971e72546d9fed4b17eef635fc400d2b3ee1a918eadb8e1dedc051e616f8d418687a8a933dd67865f4b
+DIST busybox-1.25.1.tar.bz2 2103070 SHA256 27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e SHA512 9648877ed11e5a55213cd14fd64f6fc64dbd17013fbfaa4e67f4fd433f59e9231ed78a88e6e8100a4794d833f1d9863bb86f75faae093418866770804bf873cb WHIRLPOOL 4b7bc6d3a88559812797feb4574975b9fdeb6eac6ac7a0fe51e4750a3b05a614ecb8bd9d58547047cdf1e0b66d9bcd189c8a4193fc2f3b491a6268bc06761ad1
+DIST busybox-1.26.2.tar.bz2 2120931 SHA256 da3e44913fc1a9c9b7c5337ea5292da518683cbff32be630777f565d6036af16 SHA512 9926d211d0b4f34b513d934d7b111ebbf933c2dc31206bdd80426a62d47d5b1475b70bec5aaa14a26b94a202ab1465d994062a002750a312dcb8167096eb3719 WHIRLPOOL 64fdbd3ede8e382d0237b1576000555f563c4ca93d58cfbb72f71374b662e3201863110a069f0e4a27dab7c0a6102d98ccfd4d57f1dfe44c9b12a17c6a30128a
+DIST busybox-1.27.2.tar.bz2 2216527 SHA256 9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df SHA512 d99e86b652562ebe1a5d50e1ba3877a1d1612997c17cb8d8e4212da181211a9b741a881cb051f14cb3ee8aea40226cf2cde80a076baed265d3bc0a4e96a5031c WHIRLPOOL 56002a144710aa00ee17c46e3ac471537f58bee6b9d4da6cefc0afb4f75cf13dcaaadf1e6610d0e10c7b808b0c33c24743e21c683c478582eb0eb149a869f9a7
+EBUILD busybox-1.25.1.ebuild 8597 SHA256 0fef93c8aa0e1113692b573e57fc4628a159ee6fb7ef8e5e48b13a99a7163ee7 SHA512 40c4af782f391f44a05bdde056c1c3d8935369dbfdad7b464f6883c4a4f82a4dc821427f7109da73a703891c0cb5ed65723c0b2c373fdf54155e7fafcb58553f WHIRLPOOL 3f8d150c427e33e7cddefae359f68d4c50ea90e956149caa77d920a9ed98253c91fce44a227f2f882e26114d3d55b357ec83a80783cb32486d5c7c12193bceb3
+EBUILD busybox-1.26.2-r1.ebuild 8934 SHA256 72fce1366ca66f62e303fe553bf7c1c2c27be5d610f824f6e7daeac85c14c4d5 SHA512 d5320f05e15b3b62e720d0fab274575a4ce4c18eca66b811e271c3dd7bafe2bcf9160fcb32d14a36849904f79623b9c1f4817029e813c51f2ef1aecb04375737 WHIRLPOOL c012e41cede84bbd8545c16d4002f94dfb7b7eda0ff4dd166fdb2cd4e05a226c2e92b028be2fd2c51d8fee736d9e20e0300527939faa66d6223d4f041ee900e6
+EBUILD busybox-1.27.2.ebuild 8934 SHA256 fea7b4aa2f0d1e0bd33640f1062a0fba7c86966c403ef010c84d9a6425648483 SHA512 28543dc9a553778bdcf7dbae63cd4a726a326bd679658f634927a12a8008d2fb2f421acbb734fb780163773d55ba7f5afe4d6d63abcd9124d273c0bd2a3bb534 WHIRLPOOL 8e13c61f69e6ff94a5141a5853c9eda3de4adc018f0fecc9370bc6009d9038dc5ead47a89f7d15bd5ef25f7e7dad9a5d8afafbfb9c00ef6605940bdccd94ae51
+EBUILD busybox-9999.ebuild 8865 SHA256 5891e846d5b0e5617029492e9d45d13ac684e21b37c4f2175a02081a26b3566c SHA512 e7d943086a26ec8ad53f37b08fb71a50106fa35fdcd7e45770f47ad8c0d05ff9a66e9b3aa4bfeb3008c2dd91c30a7bcab7f6f3c9f33608d2fb67e2b79451e13c WHIRLPOOL 949c8527b5b87b087228475f33a1c997a40b7a964f3bff178292b252621c728719d00cd702b10ac3ec742b69fc3213b6eac7ce606598737fd5ed1dd54f0a1fef
+MISC ChangeLog 11845 SHA256 bf23cb00b0102d42a4a4d190c674ca006b3912811913c93f53f1be519c4245a2 SHA512 c05fe5d0c3950c0f5ff6a280c35e512656d5215dbd52e13c10c64092f58a8cc89e36f13a24ec1c3c2daaef340b1ae7861893a749d859681934fd34d16be5c2fd WHIRLPOOL 0cf472cde38d4a7ed817ce5e9217ef4391a314fbdf3f1c7746edb9ad89547c9db43f5ff78d426e790cf08aa054066d3d8108786d5c61f3f5de3382fef9955e23
+MISC ChangeLog-2015 60228 SHA256 f2b582e8a11ce92972cd2a2d6ff2a70bd5d853f722532c40e645e376d48df9d9 SHA512 57ca645c150c17f0d952c36dfe6cfc5c69d1432a986702e335fdbd5ada4e536798b34e4d8cbd457d4ea0064b105cba325c1c9e01be04883001ae9201008ff0b9 WHIRLPOOL 47a4f86ad298c4e8e593a7965b7c5ceecdaa0f02bef45a9d6bc9ace96ae3e5ff3e186fe5652f44a89e282cd2de455e5643c7cbd3130ef9bddb059635b7120eb8
+MISC metadata.xml 872 SHA256 1cf483a8d55e8cbe20edb30261276d71e0ba0a1b06d73621f849496d1f6c4a17 SHA512 c0b3f8b9348553d8a4db25c1c51ef5a82bcd14a09251568c0709b392e2dea9bc35dced96377d11a32ad53ba09052603781caebf754428debf7acb0aaedafbf07 WHIRLPOOL 91b126a39ecd6937e6058814b88043e9fbbf7b434854e25a4e4a7ad8e666de37978b8bac0c8dca0255096a42af9afed412bb5bbccdffaf03ba75c2fd2e4b3428
diff --git a/sys-apps/busybox/busybox-1.25.1.ebuild b/sys-apps/busybox/busybox-1.25.1.ebuild
new file mode 100644
index 000000000000..373d932ae1a4
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.25.1.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
+
+EAPI="5"
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="https://www.busybox.net/"
+if [[ ${PV} == "9999" ]] ; then
+ MY_P=${PN}
+ EGIT_REPO_URI="git://busybox.net/busybox.git"
+ inherit git-2
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
+REQUIRED_USE="pam? ( !static )"
+RESTRICT="test"
+
+COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
+ pam? ( sys-libs/pam )"
+DEPEND="${COMMON_DEPEND}
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
+ >=sys-kernel/linux-headers-2.6.39"
+RDEPEND="${COMMON_DEPEND}
+ mdev? ( !<sys-apps/openrc-0.13 )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ local flag=$1 ; shift
+ if [[ ${flag} != [yn] ]] ; then
+ busybox_config_option $(usex ${flag} y n) "$@"
+ return
+ fi
+ while [[ $# -gt 0 ]] ; do
+ if [[ ${flag} == "y" ]] ; then
+ sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
+ else
+ sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
+ fi
+ einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
+ shift
+ done
+}
+
+busybox_config_enabled() {
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
+ case ${val} in
+ "") return 1 ;;
+ y) return 0 ;;
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
+ esac
+}
+
+src_prepare() {
+ unset KBUILD_OUTPUT #88088
+ append-flags -fno-strict-aliasing #310413
+ use ppc64 && append-flags -mminimal-toc #130943
+
+ # patches go here!
+ epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
+ epatch "${FILESDIR}"/${P}-*.patch
+ cp "${FILESDIR}"/ginit.c init/ || die
+
+ # flag cleanup
+ sed -i -r \
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
+ Makefile.flags || die
+ #sed -i '/bbsh/s:^//::' include/applets.h
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i \
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
+ Makefile || die
+ sed -i \
+ -e 's:-static-libgcc::' \
+ Makefile.flags || die
+}
+
+src_configure() {
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+
+ restore_config .config
+ if [ -f .config ]; then
+ yes "" | emake -j1 -s oldconfig >/dev/null
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ emake -j1 -s allyesconfig >/dev/null
+ # nommu forces a bunch of things off which we want on #387555
+ busybox_config_option n NOMMU
+ sed -i '/^#/d' .config
+ yes "" | emake -j1 -s oldconfig >/dev/null
+
+ # now turn off stuff we really don't want
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+ busybox_config_option n FEATURE_CLEAN_UP
+ busybox_config_option n MONOTONIC_SYSCALL
+ busybox_config_option n USE_PORTABLE_CODE
+ busybox_config_option n WERROR
+ # triming the BSS size may be dangerous
+ busybox_config_option n FEATURE_USE_BSS_TAIL
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y ASH
+ busybox_config_option n HUSH
+
+ # disable ipv6 applets
+ if ! use ipv6; then
+ busybox_config_option n FEATURE_IPV6
+ busybox_config_option n TRACEROUTE6
+ busybox_config_option n PING6
+ busybox_config_option n UDHCPC6
+ fi
+
+ busybox_config_option pam PAM
+ busybox_config_option static STATIC
+ busybox_config_option syslog {K,SYS}LOGD LOGGER
+ busybox_config_option systemd FEATURE_SYSTEMD
+ busybox_config_option math FEATURE_AWK_LIBM
+
+ # all the debug options are compiler related, so punt them
+ busybox_config_option n DEBUG_SANITIZE
+ busybox_config_option n DEBUG
+ busybox_config_option y NO_DEBUG_LIB
+ busybox_config_option n DMALLOC
+ busybox_config_option n EFENCE
+ busybox_config_option $(usex debug y n) TFTP_DEBUG
+
+ busybox_config_option selinux SELINUX
+
+ # this opt only controls mounting with <linux-2.6.23
+ busybox_config_option n FEATURE_MOUNT_NFS
+
+ # default a bunch of uncommon options to off
+ local opt
+ for opt in \
+ ADD_SHELL \
+ BEEP BOOTCHARTD \
+ CRONTAB \
+ DC DEVFSD DNSD DPKG{,_DEB} \
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
+ FEATURE_DEVFS \
+ HOSTID HUSH \
+ INETD INOTIFYD IPCALC \
+ LOCALE_SUPPORT LOGNAME LPD \
+ MAKEMIME MKFS_MINIX MSH \
+ OD \
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
+ TASKSET TCPSVD \
+ RPM RPM2CPIO \
+ UDPSVD UUDECODE UUENCODE
+ do
+ busybox_config_option n ${opt}
+ done
+
+ emake -j1 oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+ export SKIP_STRIP=y
+
+ emake V=1 busybox
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+ save_config .config
+
+ into /
+ dodir /bin
+ if use sep-usr ; then
+ # install /ginit to take care of mounting stuff
+ exeinto /
+ newexe busybox_unstripped ginit
+ dosym /ginit /bin/bb
+ dosym bb /bin/busybox
+ else
+ newbin busybox_unstripped busybox
+ dosym busybox /bin/bb
+ fi
+ if use mdev ; then
+ dodir /$(get_libdir)/mdev/
+ use make-symlinks || dosym /bin/bb /sbin/mdev
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ newinitd "${FILESDIR}"/mdev.initd mdev
+ fi
+ if use livecd ; then
+ dosym busybox /bin/vi
+ fi
+
+ # add busybox daemon's, bug #444718
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then
+ newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
+ newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
+ fi
+ if busybox_config_enabled SYSLOGD; then
+ newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
+ newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
+ fi
+ if busybox_config_enabled KLOGD; then
+ newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
+ newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
+ fi
+ if busybox_config_enabled WATCHDOG; then
+ newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
+ newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
+ fi
+ if busybox_config_enabled UDHCPC; then
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
+ exeinto "${path%/*}"
+ newexe examples/udhcp/simple.script "${path##*/}"
+ fi
+ if busybox_config_enabled UDHCPD; then
+ insinto /etc
+ doins examples/udhcp/udhcpd.conf
+ fi
+
+ # bundle up the symlink files for use later
+ emake DESTDIR="${ED}" install
+ rm _install/bin/busybox
+ # for compatibility, provide /usr/bin/env
+ mkdir -p _install/usr/bin
+ ln -s /bin/env _install/usr/bin/env
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ use make-symlinks && doins busybox-links.tar
+
+ dodoc AUTHORS README TODO
+
+ cd docs
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html
+
+ cd ../examples
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ savedconfig_pkg_postinst
+
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use sep-usr ; then
+ elog "In order to use the sep-usr support, you have to update your"
+ elog "kernel command line. Add the option:"
+ elog " init=/ginit"
+ elog "To launch a different init than /sbin/init, use:"
+ elog " init=/ginit /sbin/yourinit"
+ elog "To get a rescue shell, you may boot with:"
+ elog " init=/ginit bb"
+ fi
+}
diff --git a/sys-apps/busybox/busybox-1.26.2-r1.ebuild b/sys-apps/busybox/busybox-1.26.2-r1.ebuild
new file mode 100644
index 000000000000..19d62510f287
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.26.2-r1.ebuild
@@ -0,0 +1,310 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
+
+EAPI="5"
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="https://www.busybox.net/"
+if [[ ${PV} == "9999" ]] ; then
+ MY_P=${PN}
+ EGIT_REPO_URI="git://busybox.net/busybox.git"
+ inherit git-2
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
+REQUIRED_USE="pam? ( !static )"
+RESTRICT="test"
+
+COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
+ pam? ( sys-libs/pam )"
+DEPEND="${COMMON_DEPEND}
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
+ >=sys-kernel/linux-headers-2.6.39"
+RDEPEND="${COMMON_DEPEND}
+ mdev? ( !<sys-apps/openrc-0.13 )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ local flag=$1 ; shift
+ if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
+ busybox_config_option $(usex ${flag} y n) "$@"
+ return
+ fi
+ local expr
+ while [[ $# -gt 0 ]] ; do
+ case ${flag} in
+ y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
+ n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
+ *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
+ esac
+ sed -i -e "${expr}" .config || die
+ einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
+ shift
+ done
+}
+
+busybox_config_enabled() {
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
+ case ${val} in
+ "") return 1 ;;
+ y) return 0 ;;
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
+ esac
+}
+
+src_prepare() {
+ unset KBUILD_OUTPUT #88088
+ append-flags -fno-strict-aliasing #310413
+ use ppc64 && append-flags -mminimal-toc #130943
+
+ # patches go here!
+ epatch "${FILESDIR}"/${PN}-1.26.2-bb.patch
+# epatch "${FILESDIR}"/${P}-*.patch
+ cp "${FILESDIR}"/ginit.c init/ || die
+
+ # flag cleanup
+ sed -i -r \
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
+ Makefile.flags || die
+ #sed -i '/bbsh/s:^//::' include/applets.h
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i \
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
+ Makefile || die
+ sed -i \
+ -e 's:-static-libgcc::' \
+ Makefile.flags || die
+}
+
+src_configure() {
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+
+ restore_config .config
+ if [ -f .config ]; then
+ yes "" | emake -j1 -s oldconfig >/dev/null
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ emake -j1 -s allyesconfig >/dev/null
+ # nommu forces a bunch of things off which we want on #387555
+ busybox_config_option n NOMMU
+ sed -i '/^#/d' .config
+ yes "" | emake -j1 -s oldconfig >/dev/null
+
+ # now turn off stuff we really don't want
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_2_4_MODULES #607548
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+ busybox_config_option n FEATURE_CLEAN_UP
+ busybox_config_option n MONOTONIC_SYSCALL
+ busybox_config_option n USE_PORTABLE_CODE
+ busybox_config_option n WERROR
+ # triming the BSS size may be dangerous
+ busybox_config_option n FEATURE_USE_BSS_TAIL
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y ASH
+ busybox_config_option y SH_IS_ASH
+ busybox_config_option n HUSH
+ busybox_config_option n SH_IS_HUSH
+
+ busybox_config_option '"/run"' PID_FILE_PATH
+ busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
+
+ # disable ipv6 applets
+ if ! use ipv6; then
+ busybox_config_option n FEATURE_IPV6
+ busybox_config_option n TRACEROUTE6
+ busybox_config_option n PING6
+ busybox_config_option n UDHCPC6
+ fi
+
+ busybox_config_option pam PAM
+ busybox_config_option static STATIC
+ busybox_config_option syslog {K,SYS}LOGD LOGGER
+ busybox_config_option systemd FEATURE_SYSTEMD
+ busybox_config_option math FEATURE_AWK_LIBM
+
+ # all the debug options are compiler related, so punt them
+ busybox_config_option n DEBUG_SANITIZE
+ busybox_config_option n DEBUG
+ busybox_config_option y NO_DEBUG_LIB
+ busybox_config_option n DMALLOC
+ busybox_config_option n EFENCE
+ busybox_config_option $(usex debug y n) TFTP_DEBUG
+
+ busybox_config_option selinux SELINUX
+
+ # this opt only controls mounting with <linux-2.6.23
+ busybox_config_option n FEATURE_MOUNT_NFS
+
+ # default a bunch of uncommon options to off
+ local opt
+ for opt in \
+ ADD_SHELL \
+ BEEP BOOTCHARTD \
+ CRONTAB \
+ DC DEVFSD DNSD DPKG{,_DEB} \
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
+ FEATURE_DEVFS \
+ HOSTID HUSH \
+ INETD INOTIFYD IPCALC \
+ LOCALE_SUPPORT LOGNAME LPD \
+ MAKEMIME MKFS_MINIX MSH \
+ OD \
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
+ TASKSET TCPSVD \
+ RPM RPM2CPIO \
+ UDPSVD UUDECODE UUENCODE
+ do
+ busybox_config_option n ${opt}
+ done
+
+ emake -j1 oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+ export SKIP_STRIP=y
+
+ emake V=1 busybox
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+ save_config .config
+
+ into /
+ dodir /bin
+ if use sep-usr ; then
+ # install /ginit to take care of mounting stuff
+ exeinto /
+ newexe busybox_unstripped ginit
+ dosym /ginit /bin/bb
+ dosym bb /bin/busybox
+ else
+ newbin busybox_unstripped busybox
+ dosym busybox /bin/bb
+ fi
+ if use mdev ; then
+ dodir /$(get_libdir)/mdev/
+ use make-symlinks || dosym /bin/bb /sbin/mdev
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ newinitd "${FILESDIR}"/mdev.initd mdev
+ fi
+ if use livecd ; then
+ dosym busybox /bin/vi
+ fi
+
+ # add busybox daemon's, bug #444718
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then
+ newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
+ newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
+ fi
+ if busybox_config_enabled SYSLOGD; then
+ newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
+ newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
+ fi
+ if busybox_config_enabled KLOGD; then
+ newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
+ newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
+ fi
+ if busybox_config_enabled WATCHDOG; then
+ newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
+ newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
+ fi
+ if busybox_config_enabled UDHCPC; then
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
+ exeinto "${path%/*}"
+ newexe examples/udhcp/simple.script "${path##*/}"
+ fi
+ if busybox_config_enabled UDHCPD; then
+ insinto /etc
+ doins examples/udhcp/udhcpd.conf
+ fi
+
+ # bundle up the symlink files for use later
+ emake DESTDIR="${ED}" install
+ rm _install/bin/busybox
+ # for compatibility, provide /usr/bin/env
+ mkdir -p _install/usr/bin
+ ln -s /bin/env _install/usr/bin/env
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ use make-symlinks && doins busybox-links.tar
+
+ dodoc AUTHORS README TODO
+
+ cd docs
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html
+
+ cd ../examples
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ savedconfig_pkg_postinst
+
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use sep-usr ; then
+ elog "In order to use the sep-usr support, you have to update your"
+ elog "kernel command line. Add the option:"
+ elog " init=/ginit"
+ elog "To launch a different init than /sbin/init, use:"
+ elog " init=/ginit /sbin/yourinit"
+ elog "To get a rescue shell, you may boot with:"
+ elog " init=/ginit bb"
+ fi
+}
diff --git a/sys-apps/busybox/busybox-1.27.2.ebuild b/sys-apps/busybox/busybox-1.27.2.ebuild
new file mode 100644
index 000000000000..80b530dc184a
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.27.2.ebuild
@@ -0,0 +1,310 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
+
+EAPI="5"
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="https://www.busybox.net/"
+if [[ ${PV} == "9999" ]] ; then
+ MY_P=${P}
+ EGIT_REPO_URI="git://busybox.net/busybox.git"
+ inherit git-r3
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
+REQUIRED_USE="pam? ( !static )"
+RESTRICT="test"
+
+COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
+ pam? ( sys-libs/pam )"
+DEPEND="${COMMON_DEPEND}
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
+ >=sys-kernel/linux-headers-2.6.39"
+RDEPEND="${COMMON_DEPEND}
+ mdev? ( !<sys-apps/openrc-0.13 )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ local flag=$1 ; shift
+ if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
+ busybox_config_option $(usex ${flag} y n) "$@"
+ return
+ fi
+ local expr
+ while [[ $# -gt 0 ]] ; do
+ case ${flag} in
+ y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
+ n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
+ *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
+ esac
+ sed -i -e "${expr}" .config || die
+ einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
+ shift
+ done
+}
+
+busybox_config_enabled() {
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
+ case ${val} in
+ "") return 1 ;;
+ y) return 0 ;;
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
+ esac
+}
+
+src_prepare() {
+ unset KBUILD_OUTPUT #88088
+ append-flags -fno-strict-aliasing #310413
+ use ppc64 && append-flags -mminimal-toc #130943
+
+ # patches go here!
+ epatch "${FILESDIR}"/${PN}-1.26.2-bb.patch
+# epatch "${FILESDIR}"/${P}-*.patch
+ cp "${FILESDIR}"/ginit.c init/ || die
+
+ # flag cleanup
+ sed -i -r \
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
+ Makefile.flags || die
+ #sed -i '/bbsh/s:^//::' include/applets.h
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i \
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
+ Makefile || die
+ sed -i \
+ -e 's:-static-libgcc::' \
+ Makefile.flags || die
+}
+
+src_configure() {
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+
+ restore_config .config
+ if [ -f .config ]; then
+ yes "" | emake -j1 -s oldconfig >/dev/null
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ emake -j1 -s allyesconfig >/dev/null
+ # nommu forces a bunch of things off which we want on #387555
+ busybox_config_option n NOMMU
+ sed -i '/^#/d' .config
+ yes "" | emake -j1 -s oldconfig >/dev/null
+
+ # now turn off stuff we really don't want
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_2_4_MODULES #607548
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+ busybox_config_option n FEATURE_CLEAN_UP
+ busybox_config_option n MONOTONIC_SYSCALL
+ busybox_config_option n USE_PORTABLE_CODE
+ busybox_config_option n WERROR
+ # triming the BSS size may be dangerous
+ busybox_config_option n FEATURE_USE_BSS_TAIL
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y ASH
+ busybox_config_option y SH_IS_ASH
+ busybox_config_option n HUSH
+ busybox_config_option n SH_IS_HUSH
+
+ busybox_config_option '"/run"' PID_FILE_PATH
+ busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
+
+ # disable ipv6 applets
+ if ! use ipv6; then
+ busybox_config_option n FEATURE_IPV6
+ busybox_config_option n TRACEROUTE6
+ busybox_config_option n PING6
+ busybox_config_option n UDHCPC6
+ fi
+
+ busybox_config_option pam PAM
+ busybox_config_option static STATIC
+ busybox_config_option syslog {K,SYS}LOGD LOGGER
+ busybox_config_option systemd FEATURE_SYSTEMD
+ busybox_config_option math FEATURE_AWK_LIBM
+
+ # all the debug options are compiler related, so punt them
+ busybox_config_option n DEBUG_SANITIZE
+ busybox_config_option n DEBUG
+ busybox_config_option y NO_DEBUG_LIB
+ busybox_config_option n DMALLOC
+ busybox_config_option n EFENCE
+ busybox_config_option $(usex debug y n) TFTP_DEBUG
+
+ busybox_config_option selinux SELINUX
+
+ # this opt only controls mounting with <linux-2.6.23
+ busybox_config_option n FEATURE_MOUNT_NFS
+
+ # default a bunch of uncommon options to off
+ local opt
+ for opt in \
+ ADD_SHELL \
+ BEEP BOOTCHARTD \
+ CRONTAB \
+ DC DEVFSD DNSD DPKG{,_DEB} \
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
+ FEATURE_DEVFS \
+ HOSTID HUSH \
+ INETD INOTIFYD IPCALC \
+ LOCALE_SUPPORT LOGNAME LPD \
+ MAKEMIME MKFS_MINIX MSH \
+ OD \
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
+ TASKSET TCPSVD \
+ RPM RPM2CPIO \
+ UDPSVD UUDECODE UUENCODE
+ do
+ busybox_config_option n ${opt}
+ done
+
+ emake -j1 oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+ export SKIP_STRIP=y
+
+ emake V=1 busybox
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+ save_config .config
+
+ into /
+ dodir /bin
+ if use sep-usr ; then
+ # install /ginit to take care of mounting stuff
+ exeinto /
+ newexe busybox_unstripped ginit
+ dosym /ginit /bin/bb
+ dosym bb /bin/busybox
+ else
+ newbin busybox_unstripped busybox
+ dosym busybox /bin/bb
+ fi
+ if use mdev ; then
+ dodir /$(get_libdir)/mdev/
+ use make-symlinks || dosym /bin/bb /sbin/mdev
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ newinitd "${FILESDIR}"/mdev.initd mdev
+ fi
+ if use livecd ; then
+ dosym busybox /bin/vi
+ fi
+
+ # add busybox daemon's, bug #444718
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then
+ newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
+ newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
+ fi
+ if busybox_config_enabled SYSLOGD; then
+ newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
+ newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
+ fi
+ if busybox_config_enabled KLOGD; then
+ newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
+ newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
+ fi
+ if busybox_config_enabled WATCHDOG; then
+ newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
+ newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
+ fi
+ if busybox_config_enabled UDHCPC; then
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
+ exeinto "${path%/*}"
+ newexe examples/udhcp/simple.script "${path##*/}"
+ fi
+ if busybox_config_enabled UDHCPD; then
+ insinto /etc
+ doins examples/udhcp/udhcpd.conf
+ fi
+
+ # bundle up the symlink files for use later
+ emake DESTDIR="${ED}" install
+ rm _install/bin/busybox
+ # for compatibility, provide /usr/bin/env
+ mkdir -p _install/usr/bin
+ ln -s /bin/env _install/usr/bin/env
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ use make-symlinks && doins busybox-links.tar
+
+ dodoc AUTHORS README TODO
+
+ cd docs
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html
+
+ cd ../examples
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ savedconfig_pkg_postinst
+
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use sep-usr ; then
+ elog "In order to use the sep-usr support, you have to update your"
+ elog "kernel command line. Add the option:"
+ elog " init=/ginit"
+ elog "To launch a different init than /sbin/init, use:"
+ elog " init=/ginit /sbin/yourinit"
+ elog "To get a rescue shell, you may boot with:"
+ elog " init=/ginit bb"
+ fi
+}
diff --git a/sys-apps/busybox/busybox-9999.ebuild b/sys-apps/busybox/busybox-9999.ebuild
new file mode 100644
index 000000000000..3abfee0f8026
--- /dev/null
+++ b/sys-apps/busybox/busybox-9999.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
+
+EAPI="5"
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="https://www.busybox.net/"
+if [[ ${PV} == "9999" ]] ; then
+ MY_P=${P}
+ EGIT_REPO_URI="https://git.busybox.net/busybox"
+ inherit git-r3
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
+REQUIRED_USE="pam? ( !static )"
+RESTRICT="test"
+
+COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
+ pam? ( sys-libs/pam )"
+DEPEND="${COMMON_DEPEND}
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
+ >=sys-kernel/linux-headers-2.6.39"
+RDEPEND="${COMMON_DEPEND}
+ mdev? ( !<sys-apps/openrc-0.13 )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ local flag=$1 ; shift
+ if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
+ busybox_config_option $(usex ${flag} y n) "$@"
+ return
+ fi
+ local expr
+ while [[ $# -gt 0 ]] ; do
+ case ${flag} in
+ y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
+ n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
+ *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
+ esac
+ sed -i -e "${expr}" .config || die
+ einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
+ shift
+ done
+}
+
+busybox_config_enabled() {
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
+ case ${val} in
+ "") return 1 ;;
+ y) return 0 ;;
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
+ esac
+}
+
+src_prepare() {
+ unset KBUILD_OUTPUT #88088
+ append-flags -fno-strict-aliasing #310413
+ use ppc64 && append-flags -mminimal-toc #130943
+
+ # patches go here!
+ epatch "${FILESDIR}"/${PN}-1.26.2-bb.patch
+# epatch "${FILESDIR}"/${P}-*.patch
+ cp "${FILESDIR}"/ginit.c init/ || die
+
+ # flag cleanup
+ sed -i -r \
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
+ Makefile.flags || die
+ #sed -i '/bbsh/s:^//::' include/applets.h
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i \
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
+ Makefile || die
+ sed -i \
+ -e 's:-static-libgcc::' \
+ Makefile.flags || die
+}
+
+src_configure() {
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+
+ restore_config .config
+ if [ -f .config ]; then
+ yes "" | emake -j1 -s oldconfig >/dev/null
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ emake -j1 -s allyesconfig >/dev/null
+ # nommu forces a bunch of things off which we want on #387555
+ busybox_config_option n NOMMU
+ sed -i '/^#/d' .config
+ yes "" | emake -j1 -s oldconfig >/dev/null
+
+ # now turn off stuff we really don't want
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_2_4_MODULES #607548
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+ busybox_config_option n FEATURE_CLEAN_UP
+ busybox_config_option n MONOTONIC_SYSCALL
+ busybox_config_option n USE_PORTABLE_CODE
+ busybox_config_option n WERROR
+ # triming the BSS size may be dangerous
+ busybox_config_option n FEATURE_USE_BSS_TAIL
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y ASH
+ busybox_config_option n HUSH
+
+ busybox_config_option '"/run"' PID_FILE_PATH
+ busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
+
+ # disable ipv6 applets
+ if ! use ipv6; then
+ busybox_config_option n FEATURE_IPV6
+ busybox_config_option n TRACEROUTE6
+ busybox_config_option n PING6
+ busybox_config_option n UDHCPC6
+ fi
+
+ busybox_config_option pam PAM
+ busybox_config_option static STATIC
+ busybox_config_option syslog {K,SYS}LOGD LOGGER
+ busybox_config_option systemd FEATURE_SYSTEMD
+ busybox_config_option math FEATURE_AWK_LIBM
+
+ # all the debug options are compiler related, so punt them
+ busybox_config_option n DEBUG_SANITIZE
+ busybox_config_option n DEBUG
+ busybox_config_option y NO_DEBUG_LIB
+ busybox_config_option n DMALLOC
+ busybox_config_option n EFENCE
+ busybox_config_option $(usex debug y n) TFTP_DEBUG
+
+ busybox_config_option selinux SELINUX
+
+ # this opt only controls mounting with <linux-2.6.23
+ busybox_config_option n FEATURE_MOUNT_NFS
+
+ # default a bunch of uncommon options to off
+ local opt
+ for opt in \
+ ADD_SHELL \
+ BEEP BOOTCHARTD \
+ CRONTAB \
+ DC DEVFSD DNSD DPKG{,_DEB} \
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
+ FEATURE_DEVFS \
+ HOSTID HUSH \
+ INETD INOTIFYD IPCALC \
+ LOCALE_SUPPORT LOGNAME LPD \
+ MAKEMIME MKFS_MINIX MSH \
+ OD \
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
+ TASKSET TCPSVD \
+ RPM RPM2CPIO \
+ UDPSVD UUDECODE UUENCODE
+ do
+ busybox_config_option n ${opt}
+ done
+
+ emake -j1 oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+ export SKIP_STRIP=y
+
+ emake V=1 busybox
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+ save_config .config
+
+ into /
+ dodir /bin
+ if use sep-usr ; then
+ # install /ginit to take care of mounting stuff
+ exeinto /
+ newexe busybox_unstripped ginit
+ dosym /ginit /bin/bb
+ dosym bb /bin/busybox
+ else
+ newbin busybox_unstripped busybox
+ dosym busybox /bin/bb
+ fi
+ if use mdev ; then
+ dodir /$(get_libdir)/mdev/
+ use make-symlinks || dosym /bin/bb /sbin/mdev
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ newinitd "${FILESDIR}"/mdev.initd mdev
+ fi
+ if use livecd ; then
+ dosym busybox /bin/vi
+ fi
+
+ # add busybox daemon's, bug #444718
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then
+ newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
+ newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
+ fi
+ if busybox_config_enabled SYSLOGD; then
+ newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
+ newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
+ fi
+ if busybox_config_enabled KLOGD; then
+ newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
+ newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
+ fi
+ if busybox_config_enabled WATCHDOG; then
+ newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
+ newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
+ fi
+ if busybox_config_enabled UDHCPC; then
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
+ exeinto "${path%/*}"
+ newexe examples/udhcp/simple.script "${path##*/}"
+ fi
+ if busybox_config_enabled UDHCPD; then
+ insinto /etc
+ doins examples/udhcp/udhcpd.conf
+ fi
+
+ # bundle up the symlink files for use later
+ emake DESTDIR="${ED}" install
+ rm _install/bin/busybox
+ # for compatibility, provide /usr/bin/env
+ mkdir -p _install/usr/bin
+ ln -s /bin/env _install/usr/bin/env
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ use make-symlinks && doins busybox-links.tar
+
+ dodoc AUTHORS README TODO
+
+ cd docs
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html
+
+ cd ../examples
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ savedconfig_pkg_postinst
+
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use sep-usr ; then
+ elog "In order to use the sep-usr support, you have to update your"
+ elog "kernel command line. Add the option:"
+ elog " init=/ginit"
+ elog "To launch a different init than /sbin/init, use:"
+ elog " init=/ginit /sbin/yourinit"
+ elog "To get a rescue shell, you may boot with:"
+ elog " init=/ginit bb"
+ fi
+}
diff --git a/sys-apps/busybox/files/busybox-1.19.0-bb.patch b/sys-apps/busybox/files/busybox-1.19.0-bb.patch
new file mode 100644
index 000000000000..a66b45a5e21d
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.19.0-bb.patch
@@ -0,0 +1,22 @@
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -75,6 +75,8 @@
+ //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP))
+ //applet:IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, sh))
+ //applet:IF_FEATURE_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, bash))
++//applet:IF_ASH(APPLET_ODDNAME(bb, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
++//applet:IF_ASH(APPLET_ODDNAME(bbsh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
+
+ //kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o
+ //kbuild:lib-$(CONFIG_ASH_RANDOM_SUPPORT) += random.o
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -7255,6 +7255,8 @@
+ }
+ /* re-exec ourselves with the new arguments */
+ execve(bb_busybox_exec_path, argv, envp);
++ execve("/bin/busybox.static", argv, envp);
++ execve("/bin/busybox", argv, envp);
+ /* If they called chroot or otherwise made the binary no longer
+ * executable, fall through */
+ }
diff --git a/sys-apps/busybox/files/busybox-1.25.1-setfiles.patch b/sys-apps/busybox/files/busybox-1.25.1-setfiles.patch
new file mode 100644
index 000000000000..3a5f5ed9d3a6
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.25.1-setfiles.patch
@@ -0,0 +1,34 @@
+From c1704a34745f8e49373eb2cbe1c83199ab2d0091 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 9 Dec 2016 18:14:12 -0500
+Subject: [PATCH] setfiles: fix build failure after common_bufsiz change
+
+Commit 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 ("*: add most of the
+required setup_common_bufsiz() calls") switched this tool over to use
+the common_bufsiz logic but missed including the header leading to a
+build failure when enabled:
+selinux/setfiles.c:80:30: error: 'bb_common_bufsiz1' undeclared (first use in this function)
+
+URL: https://bugs.gentoo.org/600106
+Reported-by: Jonas Jelten <jj@stusta.net>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+(cherry picked from commit 1cda8790803a6fb072375c8fa53273333d2d4607)
+---
+ selinux/setfiles.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/selinux/setfiles.c b/selinux/setfiles.c
+index 51a7e63bd741..d8083d4fd580 100644
+--- a/selinux/setfiles.c
++++ b/selinux/setfiles.c
+@@ -46,6 +46,7 @@
+ //usage: "\n if it has changed"
+
+ #include "libbb.h"
++#include "common_bufsiz.h"
+ #if ENABLE_FEATURE_SETFILES_CHECK_OPTION
+ #include <sepol/sepol.h>
+ #endif
+--
+2.11.0.rc2
+
diff --git a/sys-apps/busybox/files/busybox-1.26.2-bb.patch b/sys-apps/busybox/files/busybox-1.26.2-bb.patch
new file mode 100644
index 000000000000..5e2405c3a670
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.26.2-bb.patch
@@ -0,0 +1,55 @@
+add `bb` and `bbsh` shortcuts as aliases to the main shell so we can install
+symlinks in Gentoo at /bin/bb as our recovery shell.
+
+we also add fallbacks to /bin/busybox and /bin/busybox.static in case /proc
+is not yet mounted during early boot.
+
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -144,6 +144,8 @@
+ //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP))
+ //applet:IF_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
+ //applet:IF_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
++//applet:IF_ASH(APPLET_ODDNAME(bb, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
++//applet:IF_ASH(APPLET_ODDNAME(bbsh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
+
+ //kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o
+ //kbuild:lib-$(CONFIG_SH_IS_ASH) += ash.o ash_ptr_hack.o shell_common.o
+@@ -7572,6 +7574,8 @@
+ }
+ /* re-exec ourselves with the new arguments */
+ execve(bb_busybox_exec_path, argv, envp);
++ execve("/bin/busybox.static", argv, envp);
++ execve("/bin/busybox", argv, envp);
+ /* If they called chroot or otherwise made the binary no longer
+ * executable, fall through */
+ }
+--- a/shell/hush.c
++++ b/shell/hush.c
+@@ -221,6 +221,8 @@
+ //applet:IF_MSH(APPLET_ODDNAME(msh, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
+ //applet:IF_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
+ //applet:IF_BASH_IS_HUSH(APPLET_ODDNAME(bash, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
++//applet:IF_HUSH(APPLET_ODDNAME(bb, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
++//applet:IF_HUSH(APPLET_ODDNAME(bbsh, hush, BB_DIR_BIN, BB_SUID_DROP, hush))
+
+ //kbuild:lib-$(CONFIG_HUSH) += hush.o match.o shell_common.o
+ //kbuild:lib-$(CONFIG_SH_IS_HUSH) += hush.o match.o shell_common.o
+@@ -6073,6 +6075,8 @@
+ if (SPECIAL_JOBSTOP_SIGS != 0)
+ switch_off_special_sigs(G.special_sig_mask & SPECIAL_JOBSTOP_SIGS);
+ execve(bb_busybox_exec_path, argv, pp);
++ execve("/bin/busybox.static", argv, pp);
++ execve("/bin/busybox", argv, pp);
+ /* Fallback. Useful for init=/bin/hush usage etc */
+ if (argv[0][0] == '/')
+ execve(argv[0], argv, pp);
+@@ -6931,6 +6931,8 @@
+ if (SPECIAL_JOBSTOP_SIGS != 0)
+ switch_off_special_sigs(G.special_sig_mask & SPECIAL_JOBSTOP_SIGS);
+ execv(bb_busybox_exec_path, argv);
++ execv("/bin/busybox.static", argv);
++ execv("/bin/busybox", argv);
+ /* If they called chroot or otherwise made the binary no longer
+ * executable, fall through */
+ }
diff --git a/sys-apps/busybox/files/ginit.c b/sys-apps/busybox/files/ginit.c
new file mode 100644
index 000000000000..de98e4ac4110
--- /dev/null
+++ b/sys-apps/busybox/files/ginit.c
@@ -0,0 +1,124 @@
+/*
+ * simple init to bootstrap sep-/usr
+ *
+ * Copyright (C) 2012-2013 Mike Frysinger <vapier@gentoo.org>
+ *
+ * Licensed under GPLv2 or later
+ */
+
+//applet:IF_GINIT(APPLET(ginit, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_GINIT) += ginit.o
+
+//config:config GINIT
+//config: bool "ginit"
+//config: default y
+//config: select MKDIR
+//config: select MDEV
+//config: select MOUNT
+//config: select MOUNTPOINT
+//config: help
+//config: sep-/usr bootstrapper
+
+//usage:#define ginit_trivial_usage NOUSAGE_STR
+//usage:#define ginit_full_usage ""
+
+#include "libbb.h"
+
+#define eprintf(fmt, args...) printf("%s" fmt, "sep-usr init: ", ## args)
+
+static void process_args(char **args)
+{
+ size_t i;
+
+ eprintf("running: ");
+ for (i = 0; args[i]; ++i) {
+ /* String needs to be writable, so dupe it */
+ args[i] = xstrdup(args[i]);
+ printf("'%s' ", args[i]);
+ }
+ printf("\n");
+}
+
+int ginit_main(int argc UNUSED_PARAM, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int ginit_main(int argc UNUSED_PARAM, char **argv)
+{
+ FILE *mntlist;
+ bool ismnted_dev, ismnted_sys, ismnted_usr;
+ struct mntent *mntent;
+
+ /*
+ int fd = open("/dev/console", O_RDWR);
+ if (fd >= 0) {
+ dup2(fd, 0);
+ dup2(fd, 1);
+ dup2(fd, 2);
+ }
+ */
+
+ /* If given an argv[] with an applet name, run it instead.
+ * Makes recovering simple by doing: init=/ginit bb
+ */
+ if (argv[1] && argv[1][0] != '/') {
+ eprintf("running user requested applet %s\n", argv[1]);
+ return spawn_and_wait(argv+1);
+ }
+
+#define saw(argv...) \
+ ({ \
+ static const char *args[] = { argv, NULL }; \
+ /* These casts are fine -- see process_args for mem setup */ \
+ process_args((void *)args); \
+ spawn_and_wait((void *)args); \
+ })
+
+ /* First setup basic /dev */
+ if (saw("mountpoint", "-q", "/dev") != 0) {
+ /* Try /etc/fstab */
+ if (saw("mount", "-n", "/dev"))
+ /* Then devtmpfs */
+ if (saw("mount", "-n", "-t", "devtmpfs", "devtmpfs", "/dev"))
+ /* Finally normal tmpfs */
+ saw("mount", "-n", "-t", "tmpfs", "dev", "/dev");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/dev");
+ }
+
+ /* If /dev is empty (e.g. tmpfs), run mdev to seed things */
+ if (access("/dev/console", F_OK) != 0) {
+ if (saw("mountpoint", "-q", "/sys") != 0) {
+ if (saw("mount", "-n", "/sys"))
+ saw("mount", "-n", "-t", "sysfs", "sysfs", "/sys");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/sys");
+ }
+
+ /* Mount /proc as mdev will fork+exec /proc/self/exe */
+ if (saw("mountpoint", "-q", "/proc") != 0) {
+ /* Try /etc/fstab */
+ if (saw("mount", "-n", "/proc"))
+ saw("mount", "-n", "-t", "proc", "proc", "/proc");
+ }
+
+ saw("mdev", "-s");
+ }
+
+ /* Then seed the stuff we care about */
+ saw("mkdir", "-p", "/dev/pts", "/dev/shm");
+
+ /* Then mount /usr */
+ if (saw("mountpoint", "-q", "/usr") != 0) {
+ saw("mount", "-n", "/usr", "-o", "ro");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/usr");
+ }
+
+ /* Now that we're all done, exec the real init */
+ if (!argv[1]) {
+ argv[0] = (void *)"/sbin/init";
+ argv[1] = NULL;
+ } else
+ ++argv;
+ process_args(argv);
+ return execv(argv[0], argv);
+}
diff --git a/sys-apps/busybox/files/klogd.confd b/sys-apps/busybox/files/klogd.confd
new file mode 100644
index 000000000000..4c16096a4e15
--- /dev/null
+++ b/sys-apps/busybox/files/klogd.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-sysklogd
+
+# run "/sbin/klogd --help" to see all possible options.
+
+# activate if you need remote logging
+#rc_need="net"
+
+# send warnings and above to the console
+KLOGD_OPTS="-c 3"
diff --git a/sys-apps/busybox/files/klogd.initd b/sys-apps/busybox/files/klogd.initd
new file mode 100644
index 000000000000..95d5eb030d51
--- /dev/null
+++ b/sys-apps/busybox/files/klogd.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox klogd"
+command_args="${KLOGD_OPTS}"
+pidfile="/run/klogd.pid"
+
+depend() {
+ need clock hostname
+}
diff --git a/sys-apps/busybox/files/mdev.initd b/sys-apps/busybox/files/mdev.initd
new file mode 100644
index 000000000000..114570743900
--- /dev/null
+++ b/sys-apps/busybox/files/mdev.initd
@@ -0,0 +1,52 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend()
+{
+ provide dev
+ need dev-mount sysfs
+}
+
+find_mdev()
+{
+ if [ -x /sbin/mdev ] ; then
+ echo "/sbin/mdev"
+ else
+ echo "/bin/busybox mdev"
+ fi
+}
+
+populate_mdev()
+{
+ ebegin "Populating /dev with existing devices with mdev -s"
+ $(find_mdev) -s
+ eend $?
+ return 0
+}
+
+seed_dev()
+{
+ # copy over any persistent things
+ if [ -d /lib/mdev/devices ] ; then
+ cp -RPp /lib/mdev/devices/* /dev 2>/dev/null
+ fi
+}
+
+start()
+{
+ seed_dev
+
+ # Setup hotplugging (if possible)
+ if [ -e /proc/sys/kernel/hotplug ] ; then
+ ebegin "Setting up mdev as hotplug agent"
+ echo $(find_mdev) > /proc/sys/kernel/hotplug
+ eend 0
+ fi
+
+ if get_bootparam "nocoldplug" ; then
+ ewarn "Skipping mdev coldplug as requested in kernel cmdline"
+ else
+ populate_mdev
+ fi
+}
diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev
new file mode 100644
index 000000000000..f0186c176cd8
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/dvbdev
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0
+ADAPTER=${MDEV%.*}
+N=${ADAPTER#dvb}
+# MDEV=dvb0.demux1 -> DEVB_DEV=demux1
+DVB_DEV=${MDEV#*.}
+
+case "$ACTION" in
+ add|"")
+ mkdir -p dvb/adapter${N}
+ mv ${MDEV} dvb/adapter${N}/${DVB_DEV}
+ ;;
+ remove)
+ rm -f dvb/adapter${N}/${DVB_DEV}
+ rmdir dvb/adapter${N} 2>/dev/null
+ rmdir dvb/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links
new file mode 100644
index 000000000000..be0c95aa9c0e
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/ide_links
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+[ -f /proc/ide/$MDEV/media ] || exit
+
+media=`cat /proc/ide/$MDEV/media`
+for i in $media $media[0-9]* ; do
+ if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then
+ LINK=$i
+ break
+ fi
+done
+
+# link exist, remove if necessary and exit
+if [ "$LINK" ] ; then
+ [ "$ACTION" = remove ] && rm $LINK
+ exit
+fi
+
+# create a link
+num=`ls $media[0-9]* 2>/dev/null | wc -l`
+ln -sf $MDEV "$media`echo $num`"
+[ -e "$media" ] || ln -sf $MDEV "$media"
+
diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev
new file mode 100644
index 000000000000..ea5b9155736c
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdev
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# script is buggy; until patched just do exit 0
+#exit 0
+
+# add zeros to device or bus
+add_zeros () {
+ case "$(echo $1 | wc -L)" in
+ 1) echo "00$1" ;;
+ 2) echo "0$1" ;;
+ *) echo "$1"
+ esac
+ exit 0
+}
+
+
+# bus and device dirs in /sys
+USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
+USB_PATH=$(find /sys/devices -type d -name "$USB_PATH")
+USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
+
+# dir names in /dev
+BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
+USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
+
+
+# try to load the proper driver for usb devices
+case "$ACTION" in
+ add|"")
+ # load usb bus driver
+ for i in $USB_PATH/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ # load usb device driver if existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ fi
+ # move usb device file
+ mkdir -p bus/usb/$BUS
+ mv $MDEV bus/usb/$BUS/$USB_DEV
+ ;;
+ remove)
+ # unload device driver, if device dir is existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ fi
+ # unload usb bus driver. Does this make sense?
+ # what happens, if two usb devices are plugged in
+ # and one is removed?
+ for i in $USB_PATH/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ # remove device file and possible empty dirs
+ rm -f bus/usb/$BUS/$USB_DEV
+ rmdir bus/usb/$BUS/ 2>/dev/null
+ rmdir bus/usb/ 2>/dev/null
+ rmdir bus/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link
new file mode 100644
index 000000000000..6bb069243f4c
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdisk_link
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
+
+current=$(readlink usbdisk)
+
+if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
+ rm -f usbdisk usba1
+fi
+[ -n "$current" ] && exit
+
+if [ -e /sys/block/$MDEV ]; then
+ SYSDEV=$(readlink -f /sys/block/$MDEV/device)
+ # if /sys device path contains '/usb[0-9]' then we assume its usb
+ # also, if it's a usb without partitions we require FAT
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ # do not create link if there is not FAT
+ dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
+
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+
+elif [ -e /sys/block/*/$MDEV ] ; then
+ PARENT=$(dirname /sys/block/*/$MDEV)
+ SYSDEV=$(readlink -f $PARENT/device)
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+fi
+
diff --git a/sys-apps/busybox/files/ntpd.confd b/sys-apps/busybox/files/ntpd.confd
new file mode 100644
index 000000000000..f50d4c2e9179
--- /dev/null
+++ b/sys-apps/busybox/files/ntpd.confd
@@ -0,0 +1,6 @@
+# Config file for /etc/init.d/busybox-ntpd
+
+# run "/sbin/ntpd --help" to see all possible options.
+
+# Get time from specified server and run in background
+NTPD_OPTS="-N -p pool.ntp.org"
diff --git a/sys-apps/busybox/files/ntpd.initd b/sys-apps/busybox/files/ntpd.initd
new file mode 100644
index 000000000000..dffea3bcde39
--- /dev/null
+++ b/sys-apps/busybox/files/ntpd.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox ntpd"
+command_args="${NTPD_OPTS}"
+pidfile="/run/ntpd.pid"
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
diff --git a/sys-apps/busybox/files/syslogd.confd b/sys-apps/busybox/files/syslogd.confd
new file mode 100644
index 000000000000..7df6885cedbb
--- /dev/null
+++ b/sys-apps/busybox/files/syslogd.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-sysklogd
+
+# run "/sbin/syslogd --help" to see all possible options.
+
+# activate if you need remote logging
+#rc_need="net"
+
+# Log to shared mem buffer (use logread to read it)
+SYSLOGD_OPTS="-C128"
diff --git a/sys-apps/busybox/files/syslogd.initd b/sys-apps/busybox/files/syslogd.initd
new file mode 100644
index 000000000000..b2ac5ac17221
--- /dev/null
+++ b/sys-apps/busybox/files/syslogd.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox syslogd"
+command_args="${SYSLOGD_OPTS}"
+pidfile="/run/syslogd.pid"
+
+depend() {
+ need clock hostname
+ provide logger
+}
diff --git a/sys-apps/busybox/files/watchdog.confd b/sys-apps/busybox/files/watchdog.confd
new file mode 100644
index 000000000000..bd6aec0a7068
--- /dev/null
+++ b/sys-apps/busybox/files/watchdog.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-watchdog
+
+# run "/sbin/watchdog --help" to see all possible options.
+
+# Periodically write to watchdog device
+WATCHDOG_OPTS="/dev/watchdog"
+
+# optionally set the nice-level
+#SSD_NICELEVEL="-20"
diff --git a/sys-apps/busybox/files/watchdog.initd b/sys-apps/busybox/files/watchdog.initd
new file mode 100644
index 000000000000..89043738a7e2
--- /dev/null
+++ b/sys-apps/busybox/files/watchdog.initd
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox watchdog"
+command_args="${WATCHDOG_OPTS}"
+pidfile="/run/watchdog.pid"
diff --git a/sys-apps/busybox/metadata.xml b/sys-apps/busybox/metadata.xml
new file mode 100644
index 000000000000..66da6627b150
--- /dev/null
+++ b/sys-apps/busybox/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>embedded@gentoo.org</email>
+<name>Embedded Gentoo</name>
+</maintainer>
+<use>
+<flag name="make-symlinks">Create all the appropriate symlinks in /bin and /sbin.</flag>
+<flag name="math">Enable math support in gawk (requires libm)</flag>
+<flag name="mdev">Create the appropriate symlink in /sbin and install mdev.conf and support files</flag>
+<flag name="sep-usr">Support a separate /usr without needing an initramfs by booting with init=/ginit</flag>
+<flag name="static">Make the system rescue shell (/bin/bb) static so you can recover even when glibc is broken</flag>
+<flag name="systemd">Support systemd</flag>
+</use>
+<upstream>
+<remote-id type="cpe">cpe:/a:busybox:busybox</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/byld/Manifest b/sys-apps/byld/Manifest
new file mode 100644
index 000000000000..2b9cf68022b2
--- /dev/null
+++ b/sys-apps/byld/Manifest
@@ -0,0 +1,5 @@
+DIST byld-1_0_3.tgz 1128317 SHA256 f5206f6eb0d85f6b9435c24e554262b69dede6dd7d24acd9faea1dc77549cde3 SHA512 ec141b5c7f636e611fd43bbfa69c8a06ebbfb766e5f58086ce4c0fce1271b8a0cd76333b748322efb19e46aaf2ed150cb3a5fc09c91aef55e10f80b1d1551eb0 WHIRLPOOL f2d43ba2c8820f16dcf6beda530e0c4fe3887fa4039b90d920516b4cf9ef25b736ef14133b0ed2924db0328362896eb6583b0ef2fd5d2c0e84b614d8b120de98
+EBUILD byld-1.0.3.ebuild 688 SHA256 34e12c479e29fd9c85cf0953c9f419ddd33611526f0a431f9afdb8d6d60d7afa SHA512 587210add8869bfd8b41ac626b244d37ed647e000a90208e2185ddbf9b3d317404cfec054a478fe1f170d6412a3ca3b0972892688dce2eec4d9edd282b14ec53 WHIRLPOOL 7427467d2cdd58cc9c4eeecc18bcfad41a4ce2523713bffbff429eae977ad632a32ee1d014e449e91bb68bd6922cb3f8fb117f26b2bc3bb06288204a74e190b0
+MISC ChangeLog 2917 SHA256 ea21df90d620112f9fd8690833d95c3c27e11c67157e2fa19cacf064635092a3 SHA512 e8b4b5f1c146919f15e0a5d58e92f97c9812d0293f80548ee0ef5b83753aaff6a1c2bfac48bfc3b03c84c4d3000b265a0a674c23b526747ec6c83114faaa1986 WHIRLPOOL 213a80d557ed7e24ff6cefa5ab70f982c95f6ab3256d7c2c587719223ebc0865e666f3833173b1e8e34def822050dd11fed9d5ad1fbcb52db12a7118df38afb8
+MISC ChangeLog-2015 643 SHA256 d2b6f15579573a595da1708084e89c471fae6fe6e23aa4ea521062b6001b6245 SHA512 d3814db16e5c2a98563490ae7df756d8d6ec4bfa36d484090814010d904a5710f2907244d0dcff896f06f23c328d43ea41c062d95fe9355dd8e76348f058477c WHIRLPOOL a5a2f8a6c8aebf390a85e115d91177fcc97e107908ccdb6abba25712307302bd0d7640692b98887ce835b23440c7703037324b6928727740d01aeb38e270075a
+MISC metadata.xml 324 SHA256 7f49becbff36e2d13457d834a757b9037442c635459ebb25b6cb5730af0c339a SHA512 51f62e5258feee75a0953d3f27dc8a990096d5289c7dbf2977fe0202e23b251bd635a29b00398a3dcc8c42c80d32fc58c566a90f0aefa971568c54bb7dfd1b91 WHIRLPOOL 7feb95b99be726d05e0d63f7473fd28c664af216a625b1da9e0dca82f5492640b78c538b0557e1a18bb722127aef6fb1b6200563d9cccfd0b864a181ef9711b5
diff --git a/sys-apps/byld/byld-1.0.3.ebuild b/sys-apps/byld/byld-1.0.3.ebuild
new file mode 100644
index 000000000000..2359a6e8dd48
--- /dev/null
+++ b/sys-apps/byld/byld-1.0.3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="build a Linux distribution on a single floppy"
+HOMEPAGE="http://byld.sourceforge.net/"
+SRC_URI="mirror://sourceforge/byld/byld-${PV//./_}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RESTRICT="strip" #252054
+
+RDEPEND="sys-apps/util-linux"
+
+src_install() {
+ dodoc BYLDING CREDITS README INSTALL FHS PAKING
+ rm MAKEDEV.8 BYLDING CREDITS README INSTALL FHS LICENSE PAKING
+ dodir /usr/lib/${PN}
+ cp -rf * ${D}/usr/lib/${PN}/
+}
+
+pkg_postinst() {
+ einfo "The build scripts have been placed in /usr/lib/${PN}"
+ einfo "For documentation, see /usr/share/doc/${PF}"
+}
diff --git a/sys-apps/byld/metadata.xml b/sys-apps/byld/metadata.xml
new file mode 100644
index 000000000000..81c1d4e6b66b
--- /dev/null
+++ b/sys-apps/byld/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">byld</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/cciss_vol_status/Manifest b/sys-apps/cciss_vol_status/Manifest
new file mode 100644
index 000000000000..e095acb0bc36
--- /dev/null
+++ b/sys-apps/cciss_vol_status/Manifest
@@ -0,0 +1,16 @@
+AUX cciss_vol_status.cron 646 SHA256 55fc6c33788c9846f758555be7316248d4054ed10738e8a0e3e6245ffcc0dd74 SHA512 658004668f6d1914c1526e07113eaee9a24e8d1945ab378a27537e9fd421e5b39eeb5f56610d59bebcbc6d7b2addfce65fee697b6877d164775b696930591a56 WHIRLPOOL 130108e1d029882460d26ad6ac925520824e059c626364097eedc812662d2fd737ed78717873dd7db2a7ca0fb847264b1997ab580f8cc041522c0d19dc851adb
+AUX cciss_vol_status.cron2 1611 SHA256 4eb9de49b37e2e3e2ea34672f3d052b5e8a159975a554476104957bab271ec80 SHA512 b0ca78c96dad516abe49be96a1ca0956a5dcc5f721bd5088422da9327a783e5483798f96d2f4eb9bd8484fd07c94e86305be7a88ba0b503f5771634b31a7ac68 WHIRLPOOL 7ab5f8de8a923abb0833d6c895d981c7bf93565dbf622a96e4e6f756a7134a8fb70b041ce6b2bd36912c54566fd99e44c2fb5e68c7ab42c74fb56af9ccb03867
+DIST cciss_vol_status-1.03.tar.gz 86581 SHA256 b3cdcadba4dc8637c70aac9d594e32acbbe2bc323915cce5b2722e631c05c8c0 SHA512 8804c65c3eefd04b4e9ddcfb132e3ebfafdb24469e481539743911b65207872696e1d2772b2402db87b35a2dcde20a3ff72928700bb56803e1b98e62d21940a4 WHIRLPOOL e471ddacf8d3b70cbf3adda46501c8e4f31012c8e8127d7c466d076b5885fd2473b80ffb87e535f9d5bee3f3fbe746d52fb898bcae00fefdb337c07c9260d41d
+DIST cciss_vol_status-1.09.tar.gz 104978 SHA256 93520050c3b1742288b92314585d1c0d4eaed9799747b8fc0c06977bbf5b74e4 SHA512 c773c6addcb26a3c635c28f9ebad7b9a5c2457516ffa87548fe0d3cee5ff864267dbe7c4dfccef0ed1c40d0273a833475ce4c96ba51f755776059daee892d114 WHIRLPOOL a3dcd382d5100c41bd0ff9900a3c6edba5e23a40711fbf9ec2762f596580947e51e31795b3d5a2daf4a299d68f798bba7500b5cb7e607a05f9cc39788abd0f48
+DIST cciss_vol_status-1.10.tar.gz 107233 SHA256 803110bf3f7d49f3b03e299e9a5209eba2661631bd07630672e497a6e182a504 SHA512 2010a9fd90b3e4c1d21ae6946c8085df96d15e4d4ce732d6488034e96f1d029f48d6226190c7422f9d99ab2994315c0514c534bb79aafd52b52bd27498428461 WHIRLPOOL a3b80b9f914621fbcc8251c942638d7eef35dad40fdfe9f795ed2693045e36f3e5c5bf8559f49320679114b9fbde88b75b26cda33d13cdb80c36629df2380478
+DIST cciss_vol_status-1.11.tar.gz 112316 SHA256 98c3c798cd8f322af8c8f18b19be069a137af15fce9e4022edee3ea7371df919 SHA512 20a80367a794a7f805f3b40184e93bd4f85e8ce2a7784eba1d2d68cbffc8299cbe121f9bf25e7112abec1269802f8146f3fc36501fb72536b1aee384e8d32064 WHIRLPOOL 70e7f5aa2f72e14e75df3c98b92bc03505ac770776bce1730c972bdf7f84808467275da93cf89e6eeab3e6af1096d8f51e35ef030a98d45ddcb3394d450fecaf
+DIST cciss_vol_status-1.12.tar.gz 120346 SHA256 a49abbfde6369416ac3d71bca6f60f342584eb99c786c080f8722ad19a17f91f SHA512 f9fa8b98bd42810932f03f514b4b8c6cea690378f065a6c9788ddb78612c7ca2aa9a7fefa8a40634cfe247600fb6d3f11f0b687fba77d1423087a2b319773d69 WHIRLPOOL 194a9edaea1c2e9b4a6a4681f583d3b665b84c432b4dfa26be9d96ea73ab7a7d632db0c7dc6a9c7d5b4b029f3e2bd78212feefa3789dd659e2e2d832034e3f9c
+EBUILD cciss_vol_status-1.03.ebuild 479 SHA256 ac88a42640b11ae5d6fad750188309f523d3a959f7109ea274ffcce97fdbb0c3 SHA512 90a44c912e04b45f8a70b9b5cc57b37122487d7f7186a9e4b27557b8539086da21265bcba959dc450c4be508df0454aadf6c30cb4a8069dfc40628b367e4f545 WHIRLPOOL 0777e16c44f8e8466b9f6a4dd3b45c8d11b5dd136ee094d8f0b9e94c449e59c57d6528422eb6756fa9ed4fcb51667084fa7bf34631cce9d51825e50dfe9e63cb
+EBUILD cciss_vol_status-1.09-r1.ebuild 573 SHA256 18a1c69a5428badf394907dbd829fd8aa5f26e23487a8af0a57ae1e84b44b560 SHA512 154a32c2e2b11f26fee121ca10fbcc2813406edc8390166ae2eabd5925d07908df536602268cbcdfc632e9e938aa7df6bdf7396befa563868a164d79a6c1acdc WHIRLPOOL c827073e6f8b4f339ddcdac28d5a374e0b869a1ed63cbb251c85b8ae3defe1d04d6e79c2df31acd362b11e2a2c6532cbd4db5c6d7496a8e3ac9460be08c6e221
+EBUILD cciss_vol_status-1.09.ebuild 489 SHA256 914dd9817b0e10fcc327f5520b305ea0f03686af57c7d39f36c3e16b9ff721b0 SHA512 89900c2cbdb5475bd58ae18aecfd18004399d23377e651eb2cc2e9fed5978990c55491a1522d2b07bbc48bc6223a64613e988f474e51f1d884897b0ca2e97caf WHIRLPOOL 5ef5b3ff06a7b884c55fdce1888b546ab463a780fe4e1eb54501a17be2876459367613a35a13d72e0ac490a430cd5382bc265e41c065017c1fa1df057f1b65d7
+EBUILD cciss_vol_status-1.10.ebuild 580 SHA256 1473a70f2a93d9a25fd9859eb278f32286939ab13339e108989563351d327b90 SHA512 dac844657219934fe6e1928c635864ae76e52eadc225e2c7792baa355efbd7d74c036fe8b687ab99261ec49cbb813479b3f3125aed98a45f4605a5e459c4b508 WHIRLPOOL bdf122698a27038a2d1325f051a979c618ffd5e340d4c6b3dae85a6d32a2f59b1d241285ec6752be984e03fd92f81f021405e0d45492c47d20a898a3dc09efca
+EBUILD cciss_vol_status-1.11.ebuild 579 SHA256 1902e4a889e1848639ef4cb0f9efa6d32b1ab7089afbf031b44b61f54e247d07 SHA512 f3369ced663b6d538842dc4423da3917d7ee2d97dd0bd7395dcf843f30bef1a5d661a5ab2ede8c9fccecc7e1082c860a48f470fc407d79ed3b2af6ac80d3f164 WHIRLPOOL 9a2c48ba39458ef6ed4235102fc28e5ce21944f5867e1b5739cbbe5582ff4eba35312391f23bb5412de258dc11f500891309c076bfd7e848ef5ac30c53b90451
+EBUILD cciss_vol_status-1.12.ebuild 583 SHA256 f4eeaffbec8c2266706754ba2626f16444b6037317fc94ecbcd800b2f36f5ed6 SHA512 833dd7f13ca2b8bbe39afc33e2e009e66ddd245d339301399dfcf4d5499dd362ee31a82b3eaa497fd41d1fbff6bfdfe8ac06ab1e22dacdde4d72de8ddb84f4fc WHIRLPOOL 99412f646be1c8161ed060b3ffb87bb8add27fcf2ee38b196a59363f311ba8f5909e8343e3bb7a50afd0d85994376b45b955724aaf3d6368a474b23199cd8b88
+MISC ChangeLog 3909 SHA256 bcfdee866f3dfe49a88ab748e9125b47a8de8086cac6021caff06d585b3fe014 SHA512 f2431ed0e46bf5419c0c064a0ef8019da7945c3183ec3725767b6bc4c1ccab23845328ad25ede9b46bc6817dc36055d3690bf1cf49f7282e0f60e33c55733bbe WHIRLPOOL 9d4122e560c079e1de6dea776c32c3d4d6ecb1f265fa30d07e6c9217f737713a725aa4635178c60fb2d7a7ec3c3e5af41ad3aea8c12b97eec62b7666f676fdac
+MISC ChangeLog-2015 4125 SHA256 3b7ff3c6d9cd63065823f4013a20875c96d7a194f2c4b61185b5ccd4f80dba52 SHA512 78195e78e90c1014314699b7165ef6966ad408fb7dac90149f80933b49fe6092210d9a5a6cf10acd141fda7453c9786563130b7ab41ab96d6ee1c8b2db97d0a2 WHIRLPOOL 7cd9d209f87a317ff309ea8d3dae619360bd21c00f221f2f69b091cec21e2f50d282b1e08e0dc6a3c34f20f2de2eafb4ef6a29fc6c754315eee111060a953433
+MISC metadata.xml 402 SHA256 7040e33070451b58cb3678e84c3f7bc89302911a861f332933d7838aee371e69 SHA512 346a18ccc25fd45f14252b81a275cc1d3b18568d9a2b8404a7b80c53f05a36d8af0926ef50fca2b92b693d38deec31419f1a1d284a8f4b8506ea8f8cc149062d WHIRLPOOL b6e4ac25dfccddc728d87a6b2c95b718029491ef1dca612eecb399edf4c7ffc3e5d4fd0ad53603b3a9da639a5520523dd42f17d1c608e40afd99b5f69c0c9953
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.03.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.03.ebuild
new file mode 100644
index 000000000000..d4e68c5685d4
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.03.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="amd64 x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.09-r1.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.09-r1.ebuild
new file mode 100644
index 000000000000..1fd645df1206
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.09-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="amd64 x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/cciss_vol_status.cron" cciss_vol_status
+}
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.09.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.09.ebuild
new file mode 100644
index 000000000000..60698e539bf2
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.09.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.10.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.10.ebuild
new file mode 100644
index 000000000000..bcf3f921dba5
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.10.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="amd64 ~ia64 x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}/cciss_vol_status.cron" cciss_vol_status
+}
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.11.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.11.ebuild
new file mode 100644
index 000000000000..a8dce9e1ba54
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.11.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="amd64 ia64 x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}/cciss_vol_status.cron" cciss_vol_status
+}
diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild
new file mode 100644
index 000000000000..b70b2f6a0b91
--- /dev/null
+++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+IUSE=""
+DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
+HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
+KEYWORDS="~amd64 ~ia64 ~x86"
+SLOT="0"
+RDEPEND=""
+DEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}/cciss_vol_status.cron2" cciss_vol_status
+}
diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron
new file mode 100644
index 000000000000..8d1175b45678
--- /dev/null
+++ b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+test -x /usr/bin/cciss_vol_status || exit 0
+
+STATUS=0
+
+if [ -d /proc/driver/cciss ]; then
+ DEVS=`awk -F: '/^cciss\/c.*d0/{print "/dev/" $1}' /proc/driver/cciss/cciss*`
+ OUTPUT=`/usr/bin/cciss_vol_status $DEVS`
+ if [ $? -ne 0 ]; then
+ printf "%s\n" "$OUTPUT"
+ exit 1
+ fi
+fi
+# FIXME: This cronjob should also look at the scsi generic nodes
+# (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family
+# devices, orthehpahcisr software RAID driver (see cciss_vol_status(8)
+# about how to choose the correct nodes -- i don't use these other
+# devices, so i cannot verify how to check them cleanly)
+#
+exit 0
diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2
new file mode 100644
index 000000000000..43731b48e0ca
--- /dev/null
+++ b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+test -x /usr/bin/cciss_vol_status || exit 0
+
+# WARNING: For the hpsa driver, we only support /dev/sda through
+# /dev/sdz and /dev/sg0 through /dev/sg9.
+DEVICES=$(find /dev -type b \( -path '/dev/cciss/c*d0' \
+ -or \
+ -path '/dev/sd[a-z]' \
+ -or \
+ -path '/dev/sg[0-9]' \))
+
+if [ -n "${DEVICES}" ]; then
+ #
+ # Unsupported devices will generate an error (to stderr) of the form,
+ #
+ # cciss_vol_status: /dev/sda: Unknown SCSI device.
+ #
+ # We want to ignore these, and fortunately, an exit code of zero
+ # is returned in this case. So we need only hide the output by
+ # redirecting stderr elsewhere. But, that also hides errors of the
+ # form,
+ #
+ # cciss_vol_status: open /dev/sda: Permission denied
+ #
+ # which we DO want to present to the user. So instead of sending
+ # stderr to stdout, we redirect it to a temporary file. We then
+ # show the content of the temporary file to the user if it
+ # contains errors other than "Unknown SCSI device."
+ #
+ TMPFILE=$( mktemp )
+ if [ $? -ne 0 ] || [ ! -f "${TMPFILE}" ]; then
+ echo "${0}: error creating temporary file." >&2
+ exit 2
+ fi
+
+ OUTPUT=$( /usr/bin/cciss_vol_status ${DEVICES} 2> "${TMPFILE}" )
+ if [ $? -ne 0 ]; then
+ printf "%s\n" "$OUTPUT"
+ rm -f "${TMPFILE}"
+ exit 1
+ fi
+
+ ERRORS=$( GREP_OPTIONS="" grep -v "Unknown SCSI device" "${TMPFILE}" )
+ rm -f "${TMPFILE}"
+ if [ -n "${ERRORS}" ]; then
+ echo "${ERRORS}" >&2
+ exit 3
+ fi
+fi
+
+exit 0
diff --git a/sys-apps/cciss_vol_status/metadata.xml b/sys-apps/cciss_vol_status/metadata.xml
new file mode 100644
index 000000000000..de3e2e4eb2fc
--- /dev/null
+++ b/sys-apps/cciss_vol_status/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 type="person">
+ <email>chainsaw@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">cciss</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/ccs-tools/Manifest b/sys-apps/ccs-tools/Manifest
new file mode 100644
index 000000000000..1f90d71e388e
--- /dev/null
+++ b/sys-apps/ccs-tools/Manifest
@@ -0,0 +1,6 @@
+AUX ccs-tools-1.8.3_p20130214-warnings.patch 814 SHA256 d909698fe20d568efbb28828f261a4316c05725180ace3b1d1841a13a134eda4 SHA512 947caa5ce7f2c80e7e0b40042b09568c4fed731b530cf70c1fa24fa0f1a382dd41443f3db82a6aa6444c0ebcd25fd7de657c0f1990d69579e4645f3efa561e10 WHIRLPOOL 11a771b7857e37df98c289c11e79daed573bcbf56068d855d5511bfd7c16a8bbb60d98670862c1500d9246aa3fc4ca4a95e2b724a919b9dfd73c13142e0f60ee
+DIST ccs-tools-1.8.3-20130214.tar.gz 227657 SHA256 56bb03f1977346f4c7dc3a0c5da8df4a0451a79558c26564478cb87fbf3e3ade SHA512 256adf873dd99b811f5cf55e6b74e1ccdc2e54a2399724b694f22825c4d5e3167e7768bddc4952363ef835ec2b8405d5704572a9b9e214f3102bf594374325ba WHIRLPOOL d7f200842a10ca2c83a46a933beb7c70436ea36c8aad3569c33392a11360b88dbf7589ac720994fec9d5c49c46f1e1c9f97ec320d2057680a6bb0edf13c066eb
+EBUILD ccs-tools-1.8.3_p20130214.ebuild 1419 SHA256 3769083d5e15697e911cdc66236a6bc59e62a8f2d3aa40f281fcb8ccc7150e11 SHA512 89fb1d587f3280fc687eb16694c41547ac48f3e79bfd71294992b3e0b2db151198352ee0648c7a361e1ddf45f6c01c7394da0eca108584e41f9ed9db16c6ccfc WHIRLPOOL 7137944bef02ef75dc87c8df9428bc68449f6ecdd4e60ac7e1db9c55d8b74433cf1fcdc9ebea874057efeeb09f29d5addc98c834c688e27d01cc987e98cb29e4
+MISC ChangeLog 2599 SHA256 1f1dcf75c3c526a4e5ac859786a42534651f84aa1c49407fd4731d0e12968980 SHA512 9de585cfd753bb82e15bd67ce5718886411a7d66215c87e3e06d148a79fc328c1bb2aa4282318f8c74bd6c40a0b996891545c78391762b108df3951af2677ec3 WHIRLPOOL a4e9649f425fe2c03d0b550d207c565f5365264399bf2432cadda91eeb79bb4b0076c18e685b6702865bd15fd7a56b99e1f238228234892f9bbd04a2840d7549
+MISC ChangeLog-2015 3709 SHA256 75fe5f1e92fbaf83916d275bdc67cd2804a6cacacff59c9e7de836679243fc01 SHA512 80c1aac878dd27b67267e4d9a242a4d0e2046a0340b44e9b02ac08e07d40f1c57a703bb7a62226e0ee8b28bbc60e8b08d022f65ee5ec0d389cab164f25be7d75 WHIRLPOOL efbb72443f3a6f47fcf8dbe7f5650eef7ccf2ea859f4d9b550efd8d76c1bcbf16f20226936cc8b4190a31f23c7071ae46a10e81d5e6a867bbce87864c618ed8a
+MISC metadata.xml 246 SHA256 a5d1060f2ee64096ddf62d35b034d10eb229d3fd77bc06cec84ade0ab9cd3db2 SHA512 eb0505da84a5318fcae56426b5bd7228ff9115fec909f6482ec9c4030135a465e01fc0ed55426e53d54058cf2fcfa039f52201559340048fa1e7d4a0cf3984f9 WHIRLPOOL 3551c689f2b657e20c58cd3b048f70c3e0165b26a2da603352bf98d0e1283e86257be0dbc088c4090e8ba74015c0ac070eedb743a93e25b27a4e8e3c85c8643c
diff --git a/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild b/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild
new file mode 100644
index 000000000000..d39fc9d54c65
--- /dev/null
+++ b/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/49693/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="sys-libs/ncurses
+ sys-libs/readline"
+RDEPEND="${DEPEND}
+ sys-apps/which"
+
+S="${WORKDIR}/ccs-tools"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-warnings.patch
+ sed -i \
+ -e "s:gcc:$(tc-getCC):" \
+ -e "s/\(CFLAGS.*:=\).*/\1 ${CFLAGS}/" \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ -e "s:= /:= ${EPREFIX}/:g" \
+ Include.make || die
+}
+
+src_test() {
+ cd "${S}/kernel_test"
+ emake || die
+ ./testall.sh || die
+}
+
+src_install() {
+ emake INSTALLDIR="${D}" install || die
+ dodoc README.ccs
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial policy configuration:"
+ elog
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog
+ elog "For more information, please visit http://tomoyo.sourceforge.jp/1.8/"
+ elog
+ elog "This tools are for ccs-patch'ed kernels. There are also sys-apps/tomoyo-tools"
+ elog "which works with TOMOYO 2.x.x versions (already merged into Linux kernel)."
+ elog "If you'd like to try them, please emerge sys-apps/tomoyo-tools instead."
+}
+
+pkg_config() {
+ /usr/$(get_libdir)/ccs/init_policy
+}
diff --git a/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-warnings.patch b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-warnings.patch
new file mode 100644
index 000000000000..8201093bbecb
--- /dev/null
+++ b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-warnings.patch
@@ -0,0 +1,22 @@
+diff --git a/usr_sbin/editpolicy_offline.c b/usr_sbin/editpolicy_offline.c
+index dbbd11e..e699cf4 100644
+--- a/usr_sbin/editpolicy_offline.c
++++ b/usr_sbin/editpolicy_offline.c
+@@ -2882,7 +2882,7 @@ static bool ccs_parse_ipaddr_union(struct ccs_acl_param *param,
+ struct ccs_ipaddr_union *ptr)
+ {
+ struct ccs_ip_address_entry e;
+- memset(ptr, 0, sizeof(ptr));
++ memset(ptr, 0, sizeof(*ptr));
+ if (ccs_parse_ip(ccs_read_token(param), &e) == 0) {
+ memmove(&ptr->ip[0], e.min, sizeof(ptr->ip[0]));
+ memmove(&ptr->ip[1], e.max, sizeof(ptr->ip[1]));
+@@ -4745,7 +4745,7 @@ static void ccs_write_control(char *buffer, const size_t buffer_len)
+ *
+ * Returns nothing.
+ */
+-static void ccs_editpolicy_offline_init(coid)
++static void ccs_editpolicy_offline_init(void)
+ {
+ static _Bool first = true;
+ int i;
diff --git a/sys-apps/ccs-tools/metadata.xml b/sys-apps/ccs-tools/metadata.xml
new file mode 100644
index 000000000000..112e5a8833a8
--- /dev/null
+++ b/sys-apps/ccs-tools/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge-jp">tomoyo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/checkpolicy/Manifest b/sys-apps/checkpolicy/Manifest
new file mode 100644
index 000000000000..5ee4ab19f269
--- /dev/null
+++ b/sys-apps/checkpolicy/Manifest
@@ -0,0 +1,8 @@
+DIST checkpolicy-2.6.tar.gz 69748 SHA256 0bebd18688ca8027b1b3b4ff1532c0626f1fe49883ae6cb74d9d385940e74157 SHA512 1d8361a5735410909be7fe5a54740e0e1b6339d0fbad9965f3ae2902e7eaaec7531fec1dd73bb57b28ad933773778ab50b97db3d92aacf5fac3b63d1ed364b46 WHIRLPOOL ac5407796114f54b11fb96220dad47706a111d99ad072bfb29868fd4646106c647b33631fa4b6d250e3f01550f79e369a8de14523dab861d1c13e45c91041ac2
+DIST checkpolicy-2.7.tar.gz 65967 SHA256 5413479f1dcde866c19896b4dbfec315d822aa431606e1d03c944408984c3201 SHA512 fba8a4132f90c98f8222de563dc15aac1b739d3a6207779b6a4715d2813e7553081351c54f42371a1b704a1f5038d40821b61213c4ad53eb705823975858cf7f WHIRLPOOL 71ea60ebcfd2b46ab5c24bb2a5197af8382fe3aa7b38946976ea3dff33a08f809d8b366e58fa2ceca13bdea8c99e9f8b8e5a9b54125664a4cec5e27b6471c1fc
+EBUILD checkpolicy-2.6.ebuild 1170 SHA256 7c79e0b42eb65d0d95ab5ad84f315094967ae7382698f506aec8273a71f277bf SHA512 756f3191add673f5ae35e27997f88584d026a663ef12c943f3bdc57a1c0679c18cf0f26300d0e568b8c2f707fd7e3001f5c79cbe6fcfda0f509cee200660cf84 WHIRLPOOL 3243ce95ea8d7addd19acb1f2806b1485e879f6e177150a54916b732df171bff4292469b7aa78dea06896fd1952fbddd38235e2b40804fb60f93470c473d57df
+EBUILD checkpolicy-2.7.ebuild 1232 SHA256 c3d100f696a8c8fccf55e44a4913f3f258a757485eedbae4cf00f0635dcf1bf7 SHA512 b671810da7baedcd74e6456f53cdd63afdf73cbedab7d5f942023534d863aef4d536ff8e6acf370964352707a86c0b72bd3530601025aa27f96395b29ff3c1f8 WHIRLPOOL 2e0870813ef85177d63074de481aed7057eeb9dc80ccab5ac3741d6162d1ac4d0387cf8d93070f6e64f15fa04c8878fdf51998882e889192cee4b78d417975f1
+EBUILD checkpolicy-9999.ebuild 1234 SHA256 bc3b25305a19178a5889de57ed927a6f0f83890b2f95963a35253871f2463516 SHA512 182644845d4bca1d031ea6077dc55d5181ebf63ec3f89789a53f6d6b8cd6e53ef240bef1411cf9ac3ba6b9acea5e0ba8c4d568262eb29c67b9850883977b5ee6 WHIRLPOOL ace194b8498cb1d19a4a5231447a8c71e59647d17cdaffd7fcd547fd74c9f8afae715da98eb71bcca916bfb5629d20cbffafe2370a919e149410590149484dfe
+MISC ChangeLog 4040 SHA256 9e48e3748991a4fe8d3bcf4cc2d82f02cae6af2cc39e3c2f0db13b453bcc37b5 SHA512 fd6d9d5a343f133d6936b8cb08c0136608bf2227147d75e0f20ce8fc389471fa5e6eae1393269f286c38608b79a3203190619220b65bd160f9504e9ac72b80d4 WHIRLPOOL eae6a4125c115fb6de043df36ef3c08a072eaeac08afbd9502081f86314e20af24d8de32dcaead203f98243f3c38d28a86a55983ec3ff8674c3c25188753c37a
+MISC ChangeLog-2015 11441 SHA256 f12a3aab8bc77da0cc4b2fb84cd8a41e3824632157f4cf8133920c0c0bca4d9b SHA512 e408593bb24513ad663768838d5e9d2b3a7e918d63f161e6432e9d459cd463276f0662cfe0cfb667bb2160015282f0366e04627f13cececda35e0a80dd11e588 WHIRLPOOL 14356c428d724416dc500a4200feb8be3521923e9e6a0f8ee7f1032e52b683bd238450db432beae2880e57285cb6d792319f9f75fd343cfd4928412fac62d7b7
+MISC metadata.xml 308 SHA256 e18ad84d03bc0569121d1a2a228843f85913376e162435e979a1888ea9a976ff SHA512 e07f79eaa348cc35ebb4eac966f6b59ff87cde6c2b9694ac996da971c45aed834f34b8a9325b205fdfe590d7add0d46013cc551af166a9ca2ca59e0feffbc9bb WHIRLPOOL 9b2dc03d3db3f486141b4c49914fce11b3f31253a9f4b400e3bea315d70409fb9a882537c1667113499defa92868f30ec8e9a6533f99910fafcc3f7e194f1d2c
diff --git a/sys-apps/checkpolicy/checkpolicy-2.6.ebuild b/sys-apps/checkpolicy/checkpolicy-2.6.ebuild
new file mode 100644
index 000000000000..9f6ccc4d75b2
--- /dev/null
+++ b/sys-apps/checkpolicy/checkpolicy-2.6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20161014"
+
+SEPOL_VER="${PV}"
+SEMNG_VER="${PV}"
+
+DESCRIPTION="SELinux policy compiler"
+HOMEPAGE="http://userspace.selinuxproject.org"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}
+ >=sys-libs/libsemanage-${SEMNG_VER}
+ sys-devel/flex
+ sys-devel/bison"
+
+RDEPEND=">=sys-libs/libsemanage-${SEMNG_VER}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" YACC="bison -y" LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use debug; then
+ dobin "${S}/test/dismod"
+ dobin "${S}/test/dispol"
+ fi
+}
+
+pkg_postinst() {
+ einfo "This checkpolicy can compile version `checkpolicy -V |cut -f 1 -d ' '` policy."
+}
diff --git a/sys-apps/checkpolicy/checkpolicy-2.7.ebuild b/sys-apps/checkpolicy/checkpolicy-2.7.ebuild
new file mode 100644
index 000000000000..812e63ad518e
--- /dev/null
+++ b/sys-apps/checkpolicy/checkpolicy-2.7.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20170804"
+
+SEPOL_VER="${PV}"
+SEMNG_VER="${PV}"
+
+DESCRIPTION="SELinux policy compiler"
+HOMEPAGE="http://userspace.selinuxproject.org"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}
+ >=sys-libs/libsemanage-${SEMNG_VER}
+ sys-devel/flex
+ sys-devel/bison"
+
+RDEPEND=">=sys-libs/libsemanage-${SEMNG_VER}"
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ YACC="bison -y" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+
+ if use debug; then
+ dobin "${S}/test/dismod"
+ dobin "${S}/test/dispol"
+ fi
+}
+
+pkg_postinst() {
+ einfo "This checkpolicy can compile version `checkpolicy -V |cut -f 1 -d ' '` policy."
+}
diff --git a/sys-apps/checkpolicy/checkpolicy-9999.ebuild b/sys-apps/checkpolicy/checkpolicy-9999.ebuild
new file mode 100644
index 000000000000..a354cf27e267
--- /dev/null
+++ b/sys-apps/checkpolicy/checkpolicy-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20170804"
+
+SEPOL_VER="${PV}"
+SEMNG_VER="${PV}"
+
+DESCRIPTION="SELinux policy compiler"
+HOMEPAGE="http://userspace.selinuxproject.org"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}
+ >=sys-libs/libsemanage-${SEMNG_VER}
+ sys-devel/flex
+ sys-devel/bison"
+
+RDEPEND=">=sys-libs/libsemanage-${SEMNG_VER}"
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ YACC="bison -y" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+
+ if use debug; then
+ dobin "${S}/test/dismod"
+ dobin "${S}/test/dispol"
+ fi
+}
+
+pkg_postinst() {
+ einfo "This checkpolicy can compile version `checkpolicy -V |cut -f 1 -d ' '` policy."
+}
diff --git a/sys-apps/checkpolicy/metadata.xml b/sys-apps/checkpolicy/metadata.xml
new file mode 100644
index 000000000000..b5ba8a9fac57
--- /dev/null
+++ b/sys-apps/checkpolicy/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>SELinux policy compilier</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/checkservice/Manifest b/sys-apps/checkservice/Manifest
new file mode 100644
index 000000000000..f5af9b90997a
--- /dev/null
+++ b/sys-apps/checkservice/Manifest
@@ -0,0 +1,5 @@
+DIST checkservice-1.2.0.tar.gz 40614 SHA256 f949efac9cc03e4fbe2bf6da5322c1e81077376e54297a32d00f73c0cfa5e18a SHA512 2548936ab8cc9f3dfd65ee74f0c583b48994f5d5aae4efadb7ba978b691c4d2105c999c368b381b5f823c7623183c59507259f602f3832cf4713979f34ed4f90 WHIRLPOOL 830da97b22da5e3d21d29171f7ff406295d96ce52169612f59db000933ccab217cea82cd6703cfabbfc98f06c9d6debbdda330942b188632a04170e590324264
+EBUILD checkservice-1.2.0.ebuild 1301 SHA256 7c0aa8066a4f997d456903a32e204e265ef06b3b406904c11a54ec987a98d41f SHA512 6eaf5fed57e1f4840a9b1b38243ce8d123c9c1baf561d9a79c9dfe96fcc8a8b5d8f8bb7005b26a85f0709e43992e3986b4b7c22ddc84ace5a92958e70e6b86f4 WHIRLPOOL d655552f0bc773b6d0d25a40dc141403844a8daaab16a5114345671f64ab3f3f468b361c527ed2fc0ca1512704563b0f8de180aefc6eeef1affe76d2cdd99b49
+MISC ChangeLog 2537 SHA256 c9725dd20b7ba395666979d2b87b69a9eb9a877b333a763cd1f0806113433c68 SHA512 76feb270e93ea7019a553c0494d4263679c7d810e9d7af8cc4f69c86bfef8aaed486901953252a91662d55fd0000d2f4765d794f0350e964d49e8da622cf7e3f WHIRLPOOL 1e58444c149431b6fff7de9ca81b6d2ed1ff55d017c017a57c1dd6abf4f77eb622a4f307a7bd3b9426e64783e513cd2d0fdf7b66e1a6525c0cab4e267aabf470
+MISC ChangeLog-2015 794 SHA256 3c450458fb8690c453388182f75635865daeb246e9c48379d921b1ece144b8e3 SHA512 17fea3dd52f3c72366777595df330ae08c6120e433a23da9d3edf99e3f88c1978acf72cdbb34c12e8c6b205cc4acb676bd08a8a6c2015d7c7bc625ee77bd4629 WHIRLPOOL 2500ce060537352faea595b383464289b1258f9cd81824fd3a937e1ba2fe2ca61497bcc3af51e762207d24a51754f26b929430c3d86c69d909c4c216421ae150
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/checkservice/checkservice-1.2.0.ebuild b/sys-apps/checkservice/checkservice-1.2.0.ebuild
new file mode 100644
index 000000000000..da5e9876bc30
--- /dev/null
+++ b/sys-apps/checkservice/checkservice-1.2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Check the status of services running on local/remote machines"
+HOMEPAGE="http://www.linvision.com/checkservice/"
+SRC_URI="http://www.linvision.com/checkservice/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8
+ >=dev-perl/MailTools-1.58
+ >=dev-perl/File-Find-Rule-0.26
+ >=virtual/perl-Getopt-Long-2.34"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i -e 's:/usr/local:/usr:g' $(grep -rl /usr/local *) || die "sed /usr/local"
+}
+
+src_install() {
+ dodir /var/{log,lock,cache}/checkservice
+ dobin checkservice || die
+
+ insinto /usr/lib/checkservice/check
+ doins plugins/check/* || die "check"
+ insinto /usr/lib/checkservice/warning
+ doins plugins/warning/* || die "warning"
+
+ insinto /usr/lib/perl5/vendor_perl/CS
+ doins lib/CS/* || die "perl5"
+
+ insinto /etc/checkservice/config
+ doins config/{*.mail,*.conf}
+ insinto /etc/checkservice/config/plugins/warning
+ doins config/plugins/warning/*
+
+ doman man/*
+ dodoc INSTALL README TODO checkservice.php cron/checkservice
+}
+
+pkg_postinst() {
+ einfo "If you want a php status page or cron checkservice"
+ einfo "read the INSTALL file in docs directory all files"
+ einfo "and info are there"
+}
diff --git a/sys-apps/checkservice/metadata.xml b/sys-apps/checkservice/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/checkservice/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/chname/Manifest b/sys-apps/chname/Manifest
new file mode 100644
index 000000000000..ea1b06190ed4
--- /dev/null
+++ b/sys-apps/chname/Manifest
@@ -0,0 +1,8 @@
+AUX chname-1.1-flags.patch 595 SHA256 24b66ce58f2e284540c8dc954cac847a385f11b16853bbf97496458279938a77 SHA512 687ea7ad9586ac58bc330cc4256b8452c22306c90c591943ed778543f1a74a8323b2c3fb560e16cf48a7b2a3b274e5f479055085a653d44f32d81c9ff340f6cd WHIRLPOOL 9c0a2b836f1cc52d41b7f5c06d830a62414cc5d9bb23fb3c086ba72b3e952a7fa44e5cc0791f3fae643d622dc27f616235536015628f012934e840f743a83ca1
+DIST chname-1.0.tar.gz 998 SHA256 a94d24870491f3a5671292379ba0fee7130a1ff2f7bc99dad04a4daacccb98d5 SHA512 9c36c779e39b2051f84af5cb728a6810b5ede4134dee6156eff02c689dd4184c537d1502b35f9d7792d3e1babbf66bc7192d006d957b188c61f915fc93c515d7 WHIRLPOOL ef7f93b686b66eeb65d7b244f447c4f07df35863c5df3d1c32ebc82e6339c2859b1ba8195fec4a317d86d0aa83025454b9a481bcf0c5f252061008d87879af6e
+DIST chname-1.1.tar.gz 8010 SHA256 4dd3961c641d79a9700b118c1fde8ecd2be5122470bef51d39ecbc601e5090fd SHA512 4194b48189f949a95a1f8037638acbdd4bd3734dbc1cd3eb7642a0a2acaa8ba75e48d43ff01029b64da34b36683da917f52809915108e61973cb1e097b2a0993 WHIRLPOOL 89667a366e506afec00ce2d04a364acd491ca2165fb2b8a9e6c022370978a43cd9eb36d6fee96b7e06d6cc0d0f130d44c9b8775d460a52c5379782f2835da58f
+EBUILD chname-1.0-r2.ebuild 651 SHA256 b851792c9625b8e22b4466edcf6bb86de9fd8a355a0c3010fc28b8ae990eed9b SHA512 2dc917865870b1bd8734fb6b0ff6f0c736e5d35714e7d9b0dbc63d27a25546e7e282fcf7284204dc41dfeeffcec7905aabc4702deca4c9b0e47ceaaa86257fcd WHIRLPOOL 238711ff84bc8d8d61ec733e6fda393bd3232fe90c9c00074552839e79f5026760d53ebae7a2163e9815a925f56ecdeaa802e7fc0c266582b19b1e7b7bad3ef2
+EBUILD chname-1.1.ebuild 583 SHA256 35eca4d2f14e4925eff4515a260378336fd7429a972b644d34202a84b3a2b275 SHA512 04ebba2c24a9b9167419c78457bafc01495e0a0075d4374d72f59cba9f2f619b669ea8ed7bd3fa3f040d7914511130a7d10805262d5e489e44ad46e6c4fa6baa WHIRLPOOL cfc8f050c22560d4fbdb9fd51fbf50ab29b2002928696eefb61f439d05f3167684bfcb93a64668693ab92e215c50ab92730a18a0aea04528eb4a06ed46d9cd54
+MISC ChangeLog 3439 SHA256 7c5041afb0eaf6dceac76a04adb5f34735aced2b3c5f816fe6187e9f7cb15541 SHA512 ef034f4c303d6b9ce61c995aacb40281c922256f78e68e579fd3c2cdc0e486fa1d257c37d936fcdfc822f2ffb4be5f261e443bf50194e40a91f305959eed7ee1 WHIRLPOOL b9ea72598bbdd9d9e5a78dbaceda46b4260dd1cf375b4606708588f7d01415f1d31175d916cf7016fb7aa9c5fbbdb36df76e501fff54f74390f91e3ddf73ae81
+MISC ChangeLog-2015 1102 SHA256 02ad7bcb73a1f3150f533b8ef62fa6989e7ef0fe04621aa5761fab52f415041c SHA512 0c391b8291e583f1f8ab1ec0666bde38f3366017d2093bd0298e042800b928fe3b96b307ac26c8e30ccbaf48cdf168e8efed65219afc72c4f8ceb9fba183fcba WHIRLPOOL 02737f066bf5c58de2e8b9ddbbdbdcc732ac2e3eaa24d9e6d07bace27180f633de0179f4d1779e244833fc463385b2aad9d9e98ac2c768aed5ddfe6c2ca62cd4
+MISC metadata.xml 364 SHA256 ab984ddd580b8637089624d23ccb1cf1db55cbff84bdda5646a7abb2723f73ae SHA512 13db11537c2863b19ee9f5088cf0d2202e0bb44d44092e63567e79a8f990f627e3fb7e3324c88e6442baf57f8e40f67d42cc785b4933735c35ca00a6f2f15dba WHIRLPOOL 8936255da817e2835bb50de391b44a3fbd661c8f19891825f915d85c6db320a4a9209fbea202e40683c914fe19b3bb0051c546c275b2a98e5f0f90c62768c5b7
diff --git a/sys-apps/chname/chname-1.0-r2.ebuild b/sys-apps/chname/chname-1.0-r2.ebuild
new file mode 100644
index 000000000000..090f232e0c4c
--- /dev/null
+++ b/sys-apps/chname/chname-1.0-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Run a command with a new system hostname"
+HOMEPAGE="https://github.com/marineam/chname"
+SRC_URI="https://github.com/marineam/${PN}/archive/v1.0.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.16"
+RDEPEND=""
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS} ${LDFLAGS}" "${PN}"
+}
+
+src_install() {
+ dobin "${PN}"
+ doman "${PN}.1"
+}
+
+pkg_postinst() {
+ elog "Note: chname requires a or later kernel with CONFIG_UTS_NS=y."
+}
diff --git a/sys-apps/chname/chname-1.1.ebuild b/sys-apps/chname/chname-1.1.ebuild
new file mode 100644
index 000000000000..9f29b7b44a53
--- /dev/null
+++ b/sys-apps/chname/chname-1.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Run a command with a new system hostname"
+HOMEPAGE="https://github.com/marineam/chname"
+SRC_URI="https://github.com/marineam/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=sys-kernel/linux-headers-2.6.16"
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-flags.patch
+)
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ dobin "${PN}"
+ doman "${PN}.1"
+ dodoc README*
+}
diff --git a/sys-apps/chname/files/chname-1.1-flags.patch b/sys-apps/chname/files/chname-1.1-flags.patch
new file mode 100644
index 000000000000..2824b0f53ee2
--- /dev/null
+++ b/sys-apps/chname/files/chname-1.1-flags.patch
@@ -0,0 +1,28 @@
+From e835e6a379969f5f188d02843257fa581ade083b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 21 Feb 2017 21:56:10 -0500
+Subject: [PATCH] fix handling of compiler settings
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 77e5731641ac..5b8485b6d849 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,9 @@
+-CFLAGS:=-Wall
++CFLAGS += -Wall
+
+ all: chname
+
+ chname: chname.c
+- $(CC) $(CFLAGS) -o chname chname.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o chname chname.c
+
+ clean:
+ $(RM) chname
+--
+2.11.1
+
diff --git a/sys-apps/chname/metadata.xml b/sys-apps/chname/metadata.xml
new file mode 100644
index 000000000000..55a2aa03204a
--- /dev/null
+++ b/sys-apps/chname/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">Run a command with a new system hostname. Requires utsname namespaces.</longdescription>
+ <upstream>
+ <remote-id type="github">marineam/chname</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/cinit/Manifest b/sys-apps/cinit/Manifest
new file mode 100644
index 000000000000..1fb9c96e9ba5
--- /dev/null
+++ b/sys-apps/cinit/Manifest
@@ -0,0 +1,5 @@
+DIST cinit-0.2.1.tar.bz2 63545 SHA256 a418d8c4df58ea76130561031d765e1fbfba831d4e10f9c50445de7193b830ab SHA512 fce6a0c06b11a252023f7f0159fdfe4f9f4dc3c1545708997c148ed2f0a451bb68a5b98518fc48083e3518959d28b32b1719a9b89d00af7a997854230fca09d7 WHIRLPOOL fe479f8c4ef27496604079602056eada3a580903bcfa380db7e1aae2e08f5ca5f1fdc12343f8eaa8bd537a419b4c0f69e0c1d29c681a2eb30e23eaeaddeea82a
+EBUILD cinit-0.2.1.ebuild 840 SHA256 13396bc7ddacc3164af2740266b03bd281f213a4c207170a95083db2e65e9e33 SHA512 87796d60d8647d110bb91a404fe27e97c4ebbd8044e2ebe8dea968800c1d7d17d3f217cb5112d1bc0e135324965143e8806aa4a7e45c0d87833ed38f680185f2 WHIRLPOOL a6434a1ad238d7efef75e47785841fefdc34cd5d1b3b2fa006638a5ed2f183f1e9a6e10b0fd767e5a0645072c37dcb8829a1aadcc2638c2dd00c19aa1f0a64f7
+MISC ChangeLog 2909 SHA256 c444be051041986b0c91b76478536ad18c9d44035f920ce6744ae32c14dbb399 SHA512 95accad2a238421fd9973f14ef2f2fee55d1363cd3bc533f68efe85817f5890e8e2c43cc30363861b841bd538144f72b8680b05efc8822062dc1fa39e6e1f115 WHIRLPOOL 0ce32433926a1b0f818322f4c4d0dea5a0762125b5b9e0af2bed870cf0d312226a2d57a047e9c902e82e40ac878a25bf0b74da42e6b9eda141ee8c5954e90673
+MISC ChangeLog-2015 1612 SHA256 8b96fc18a5967608d1edb3a954dd4dc340cee3550cbc21201c5c430abd0f14f6 SHA512 bf5d7155873872d4104072d0ed553b559b4e97cbd8bbfe96bda0fa13cb4e90cec6c28c977d1955f9996cbd104d0ac9385c1aad5867d7ded1ceffa8798f2d3bc5 WHIRLPOOL a830483aa924beb181d5b1d2ed63e2e982f7c0170764c3d7cc4fc8618e68472727240611d6057f9743b9a9c0fea16ceece6ddd619a77a5b684f7d8c733a732e9
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/cinit/cinit-0.2.1.ebuild b/sys-apps/cinit/cinit-0.2.1.ebuild
new file mode 100644
index 000000000000..c52fcc2f6738
--- /dev/null
+++ b/sys-apps/cinit/cinit-0.2.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="a fast, small and simple init with support for profiles"
+HOMEPAGE="http://linux.schottelius.org/cinit/"
+SRC_URI="http://linux.schottelius.org/${PN}/archives/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="doc"
+
+src_prepare() {
+ sed -i "/contrib+tools/d" Makefile || die
+ sed -i "/^STRIP/s/strip.*/true/" Makefile.include || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} -I." \
+ LDFLAGS="${LDFLAGS}" \
+ STRIP=/bin/true \
+ all
+}
+
+src_install() {
+ emake LD=$(tc-getCC) DESTDIR="${D}" install
+ rm -f "${D}"/sbin/{init,shutdown,reboot}
+ dodoc Changelog CHANGES CREDITS README TODO
+ use doc && dodoc -r doc
+}
diff --git a/sys-apps/cinit/metadata.xml b/sys-apps/cinit/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/cinit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/ckbcomp/Manifest b/sys-apps/ckbcomp/Manifest
new file mode 100644
index 000000000000..2e3651eb81ac
--- /dev/null
+++ b/sys-apps/ckbcomp/Manifest
@@ -0,0 +1,3 @@
+DIST ckbcomp-1.164.tar.gz 3044072 SHA256 6ce7987ee7953e3871adbc5c93e6836baa16f15914a6999ef7f444241361c742 SHA512 b2a71c7c34ff677f555bdb76bc329ae06740c4d0fa5516356dcd833fc9f97c0c560b26b4497fd7e3e0a60acb975a461a75ecc765c3f0fa1250f8b2e0f01c4e40 WHIRLPOOL 1ef71aadd27300891559dd0cdc8a02525742e9952ec5fb5410970e8870dd0aa6691d55b262c303d3d785bd776356d3cb03b379862f4b048dae2bccab350024ea
+EBUILD ckbcomp-1.164.ebuild 733 SHA256 84e85e55525dfa7ffce518b35ef668fc562833805cbac75484f9b41a0a9cf07d SHA512 8cc85ff92d2e630c22f421f2af713936a5471a32e8032cffea637ca26fbdf43bf60f24194acdfa6df9d7361e62d9c445a624aa485f2f26ee740b58034bd6b3c6 WHIRLPOOL f59bad3d7e99a7d5b6a0452ebf7e390a7da15ed1bfe70b952b35498c83f6d41f9ebaf378550dd742f7c011cceb6e70d4f0c7d174f37d3c71d7e96c78873bb94e
+MISC metadata.xml 374 SHA256 1c8ae04c764a5f010201d97a4b916f1586bba429aaa89496dfd302def7c29230 SHA512 ceb5bc435924dee9095fbd025946cfd2185ca2ebb946036554e3bdcabd943a9e586ce5cd3448fed2612e63ba974875d85e29961822047ff3a20dadb1ec74db09 WHIRLPOOL 40043a86c01c02fd79a38ff488130a2a03ee4d20bdfa93ed4c17d14e73eb22399639b5662db627fe654645ce46bc51c79b49203c945a611b28354fc5e894a3f3
diff --git a/sys-apps/ckbcomp/ckbcomp-1.164.ebuild b/sys-apps/ckbcomp/ckbcomp-1.164.ebuild
new file mode 100644
index 000000000000..9f617e5cf510
--- /dev/null
+++ b/sys-apps/ckbcomp/ckbcomp-1.164.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Compile an XKB keymap for loadkeys"
+HOMEPAGE="https://anonscm.debian.org/cgit/d-i/console-setup.git"
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anonscm.debian.org/git/d-i/console-setup.git"
+else
+ COMMIT_ID=e327df26fa9dbdf363b778ada91e83967f4bd500
+ SRC_URI="https://anonscm.debian.org/cgit/d-i/console-setup.git/snapshot/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/${COMMIT_ID}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=""
+RDEPEND="
+ dev-lang/perl:*
+ sys-apps/kbd
+ x11-misc/xkeyboard-config"
+
+src_compile() {
+ :
+}
+
+src_install() {
+ dobin Keyboard/ckbcomp
+}
diff --git a/sys-apps/ckbcomp/metadata.xml b/sys-apps/ckbcomp/metadata.xml
new file mode 100644
index 000000000000..0840566600d5
--- /dev/null
+++ b/sys-apps/ckbcomp/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 type="person">
+ <email>lluixhi@gmail.com</email>
+ <name>Aric Belsito</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/clrngd/Manifest b/sys-apps/clrngd/Manifest
new file mode 100644
index 000000000000..5ae92a086a41
--- /dev/null
+++ b/sys-apps/clrngd/Manifest
@@ -0,0 +1,7 @@
+AUX clrngd-conf.d 377 SHA256 2b153fcce6787a2e871c628a33164b3c8b844d72f879469e62da67565318f5d9 SHA512 da08c51f5f83a4c08daa34ceb9362cb90179719b46202e1cc8c290079eddaf07d3297d839c04328672885875f38764a3bd0cf3bcdd50f2c2f4d7157674ebd93b WHIRLPOOL 71c4bfa35b54cb2f2915601065c6a839536ecc4eba7cdac0ef162403f1954e732784cc0c73b39b20f5f85e5bd948d9cdfbea08245a86047ba77a2cd60398a025
+AUX clrngd-init.d 391 SHA256 5c65797ac8cbe1901935e641ab45ae114d7e9d0e391df2def6b6e53c5e6d4274 SHA512 ea1cab4127458705e216107de70dd57edc91c41f736f6d2724382722cadafba8f44a393c21f5539196b4122160b15e6ac2773f2048d368c4bee207b5dea4a0ad WHIRLPOOL 8c32ecb3a56b3d78df5d5407e10ec6b6502ba9841197974bba6ec604dc279b60cdc0abdb54200c7327902f92eada551617139d079306651e1cccf1071ad5bf97
+DIST clrngd-1.0.3.tar.gz 97283 SHA256 9432765248548e2054389994ba44c87348a3a027f881ebeef2d2d2f73808388a SHA512 d752ddb2c8d902d3b8d24e02467eed8488f1349e08229dd396b2aca8e326db4bda9ed68def586d9c429b7a7b2fb1f1fbeae9eb354910e0ba4b29100b1bb512ac WHIRLPOOL 95d50813347d32f4cc044165b7092845e8f5e0999fdd5a619d0a3e858301b28bbb1f87ea663c88aa89abd038258a446a0e9d85fc1d66decdbb87076b23501ff7
+EBUILD clrngd-1.0.3.ebuild 606 SHA256 f60c60a3dc4028ae28e3d7a66f0d9c9d52a6378fe1d8590e3e1660a3ba490046 SHA512 1b588ce6f6a01164ab49b9ca4176809c6b6df1c04e8aa0d7c3e743d24d898fbe87dd11c3f9ce4f804af4452b0b6012915b2fd9b61e487c227c65ef83a4758d47 WHIRLPOOL 5dea1caea3f753168024e5d0fc8e23b27e7e360447f60567dca54586d8068ef30a80d0ab7a557570d47405ca0dfd6e9c129f36ec5b4ec7d981d0d8bc2e584c03
+MISC ChangeLog 2347 SHA256 d9f43e1f356c2520eba6825c35bbb3704b758da0f81afb6f4e488ce3959a6e15 SHA512 97c81931e342e95c7651c7fec3f3ec571a47f4ba538e57d6618eacd352731bb942831ddceeb2231bc930bc0166ded20d309271ab7e43a01b2d67d1b3be4e3a84 WHIRLPOOL 811fc8b545b5ab5ab41081a992ea356fdd978a0bfcea200d6397c7d8fd124c8e320ee883a7ee921b5efb74b8e295b4eb8db4db110db4c137feb33dac2795f02f
+MISC ChangeLog-2015 998 SHA256 57d0939fbd20809d661dbddbb436f35234d652403a09390db34ecbea2c024846 SHA512 29216d9b395510f2699bd7dea5b0f2459f9982d70f4c95858ff03d95a1d26533cfbb5bb8fb7eb7eb2cc7392c789412acdb8e40643f4f8263bee6312953006c1a WHIRLPOOL 9f0d3d78a328cb2d5fcec400ccbd6f565901ba3adbe7025fa2c3f050bfcaf052e4dc0c5563c58a84b981030c48693de876177a3c4f80a8385bd10ac52097ee9a
+MISC metadata.xml 216 SHA256 f7475919f28a8a93ec8bd025c8f8bbab918f66d0d1737420c876f0480308fe6a SHA512 e881b59fe49746eb25ad66c258b41aba501e4eb563129093a3898ea970a20506e7898f7c355cfcf99605234962bf2c77c1309c258b9a2b84ee4302ccb71c9dbd WHIRLPOOL 163285b60aa93e00993af659dc1e29a9eb245bd3415dd5ec75b284250596165f469028102b72fa0c344834443a44c1bbcf6272fe6a3f5211f721fc96e1c6ec16
diff --git a/sys-apps/clrngd/clrngd-1.0.3.ebuild b/sys-apps/clrngd/clrngd-1.0.3.ebuild
new file mode 100644
index 000000000000..eac515a1ff3c
--- /dev/null
+++ b/sys-apps/clrngd/clrngd-1.0.3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Clock randomness gathering daemon"
+HOMEPAGE="http://echelon.pl/pubs/"
+SRC_URI="http://echelon.pl/pubs/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc"
+RDEPEND=""
+
+src_compile() {
+ econf --bindir=/usr/sbin || die
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+ dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
+ newinitd ${FILESDIR}/clrngd-init.d clrngd
+ newconfd ${FILESDIR}/clrngd-conf.d clrngd
+}
diff --git a/sys-apps/clrngd/files/clrngd-conf.d b/sys-apps/clrngd/files/clrngd-conf.d
new file mode 100644
index 000000000000..5bb17f6bd208
--- /dev/null
+++ b/sys-apps/clrngd/files/clrngd-conf.d
@@ -0,0 +1,8 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This is the interval between runs of the clrngd main loop. It should NOT be
+# less than 60 seconds (the daemon will exit with an error) as the main loop
+# takes at least a minute to run. 240 seconds (4 minutes) is the default and
+# recommended value.
+DELAYTIME="240"
diff --git a/sys-apps/clrngd/files/clrngd-init.d b/sys-apps/clrngd/files/clrngd-init.d
new file mode 100644
index 000000000000..d8196717a36f
--- /dev/null
+++ b/sys-apps/clrngd/files/clrngd-init.d
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=clrngd
+OPTS=${DELAYTIME}
+
+start() {
+ ebegin "Starting ${DAEMON}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/${DAEMON} ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${DAEMON}"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/${DAEMON}
+ eend $?
+}
diff --git a/sys-apps/clrngd/metadata.xml b/sys-apps/clrngd/metadata.xml
new file mode 100644
index 000000000000..79d462e85571
--- /dev/null
+++ b/sys-apps/clrngd/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/cobalt-panel-utils/Manifest b/sys-apps/cobalt-panel-utils/Manifest
new file mode 100644
index 000000000000..06c14e5b0ecf
--- /dev/null
+++ b/sys-apps/cobalt-panel-utils/Manifest
@@ -0,0 +1,5 @@
+DIST cobalt-panel-utils-1.0.2.tar.gz 24552 SHA256 b8ebc79cac21993576670d56dc36739def5ceb342da1d407710dcc278586c9d8 SHA512 1c0820c7c12a7d13cd394bc5fa5f2c9429453fdb0126a35fd564cd544a70b40929d8e9d823cdeb5e53417071aa602939b72f29e0d1c77fe10c47c048f62999f8 WHIRLPOOL c3a341f5f66e38b0f5b6512d559b7890853d4d4f4f540f82141e26857fc4b3b876015f15483f652bfaff28e9b1a76b7ac0ce5cd9d0ded59ed4f35ce8049d993d
+EBUILD cobalt-panel-utils-1.0.2.ebuild 963 SHA256 9eb8d93089537c161955130727b7526405956514ffa5c92ee5170c07b321a2b4 SHA512 da5df7a14ba7f37ad477ce33bbf24ca001b2b9c3ed50d1da83722797eb6af9232ff73f075a8caa258245048d461c360aea60264bc46832d83bd088b0c12e36f1 WHIRLPOOL 1b278b9b92640d077ec20ad086061aaa3c82b9aeca5f13144feb0b1ebc5f0366ce2d058ece0f06d3f7e4c67761562eb5a5e2d74f4edb5d3d18bf7041bf1e4c31
+MISC ChangeLog 2555 SHA256 d685a69ca2103fa12c28de3c17c2a75187ec68447b35eb76f5f35ef622b7a2db SHA512 9ffbcf1ba3c7482276318928c504ea1f6f05a1e46078d28cedf6ad891bd9ac081eb82602751753da7d4bd283da0dbd868b0bd7987be21b7cf1ab26cbf30b5309 WHIRLPOOL 878f8551fe4b97d77ee027d384c13e5811d4e189220b54167038ba0c4ff50d85330ac000706b5994c0026a1437f1a8654d3fe21466013740fff6e9bfbd507264
+MISC ChangeLog-2015 1605 SHA256 7bff4af815db08364930a3fc5d1a8b6a8eb9097690e5579c803a959c91efbb8d SHA512 7a72268bcd6dde6cac8b67541c727b39393f475eeb598c6fdc71f7739b1290087fb994eb5f585cefa7cb3f9249dbdc97eebdeae25c6284d3db07f8aefa9d0c1b WHIRLPOOL 7a438d77840267e98e17f70238012297191ac50d296f951ca46d378a132faf91a4c2c161a86aa950d9e79c5355194b55d25ddeac2da87c8212616f7ae5bad350
+MISC metadata.xml 309 SHA256 558dd0dea74bba7bb25cfff0628482c1828804b0374d56d53e5f7e68118bf1c7 SHA512 84ab1b4605f74d2da7c36554b72693353d9ae34dab7fc6c288c9eafbecbf644d222d1ce2df06ae465fd71cd72cb5a70350b08733eaedd3e9de961efe2dfd8a5b WHIRLPOOL efa120b99fc562561161596a52b02a0cb6773529fe348d1dc5044981681d0b874bc7465bc8471b98f2e8835a006547022f24d711beaaff3ef741e22497718bfe
diff --git a/sys-apps/cobalt-panel-utils/cobalt-panel-utils-1.0.2.ebuild b/sys-apps/cobalt-panel-utils/cobalt-panel-utils-1.0.2.ebuild
new file mode 100644
index 000000000000..ff819204d0c1
--- /dev/null
+++ b/sys-apps/cobalt-panel-utils/cobalt-panel-utils-1.0.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="LCD and LED panel utilities for the Sun Cobalts"
+HOMEPAGE="http://gentoo.404ster.com/"
+SRC_URI="ftp://www.404ster.com/pub/gentoo-stuff/ebuilds/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~mips x86"
+IUSE="static"
+
+RDEPEND="sys-devel/gettext"
+DEPEND="${DEPEND}
+ sys-devel/autoconf"
+
+src_configure() {
+ sed -i \
+ -e"/^COPTS/s:= := ${CFLAGS} :" \
+ -e"/^LDFLAGS/s:= := ${LDFLAGS} :"\
+ Makefile || die "sed failed"
+}
+
+src_compile() {
+ if use static; then
+ einfo "Building as static executables"
+ export STATIC="-static"
+ fi
+ emake || die
+}
+
+src_install() {
+ into /
+ dosbin "${S}"/lcd-flash "${S}"/lcd-getip "${S}"/lcd-swrite \
+ "${S}"/lcd-write "${S}"/lcd-yesno "${S}"/lcd-setcursor "${S}"/iflink
+ "${S}"/iflinkstatus "${S}"/readbutton || die "dosbin failed"
+
+ dodoc doc/README* doc/CREDITS
+ doman doc/man/*.1
+}
diff --git a/sys-apps/cobalt-panel-utils/metadata.xml b/sys-apps/cobalt-panel-utils/metadata.xml
new file mode 100644
index 000000000000..50d5f41da0b2
--- /dev/null
+++ b/sys-apps/cobalt-panel-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>
+ <!-- maintainer-needed -->
+ <longdescription>
+ LCD and LED panel utilities for the Sun Cobalts. Based on panel-utils-pacifica released by Sun.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/collectl/Manifest b/sys-apps/collectl/Manifest
new file mode 100644
index 000000000000..4aaccb1ef29c
--- /dev/null
+++ b/sys-apps/collectl/Manifest
@@ -0,0 +1,14 @@
+AUX collectl.initd-2 348 SHA256 ff56cc407e6230e25fd9a119442faa70be7f13a328c2963f6228f63d513570b2 SHA512 441c5c90baa194dead6c764317ca4e10f864e82c1ee1f0c0d99f301ecf0baf197349df13fc155ac8e42366c56d13478d6004d6648e1131deea3a002c5e89ab66 WHIRLPOOL a6131e43c2e5c48d5748279229c22c494dbfc625369649c01f77ef07a9dea4c0ff471592b54b98a3a7f148913739e6fd385c6cdc154e100754865fbc42d6c98d
+DIST collectl-3.7.4.src.tar.gz 462752 SHA256 798657b8e3626e9e4ed6fe5ae44b8216da49f0bc4bbda52217d2a304e3d7e108 SHA512 f25686fe977e0a3ea45a1980eea87baaa92a2d81ec308838c137d181e2bf182df6cdf453c5c6e7f3f0b2ccd3066d17ab9c4137303b587f55303dd4afe7ae35da WHIRLPOOL e017e293348644d922547bc99904e5434c0286b8b332509cb062ac92c6a11ff8af2a4ceb275fe82dd9dda11c7774ab9e2e344c9ca5a2d6d25b036a3dab893db0
+DIST collectl-4.0.5.src.tar.gz 624040 SHA256 77839c6132c2ebb0b3c941163337bc31468e2744dd4c3fb99e85e5ba4e6f070c SHA512 a7bcc8c100f4aa1bc24b6f65bf1271ae3757dc37adba67982e85a7159faa9c1ea912553e5e918a79b95cf2ec1126094abad0a654e343a9be940ad11c4cdcc42c WHIRLPOOL 8bb38433de5a2c9347599c53a2fe06fabc756238feb3def759c726f82a702b0939d54ff296114552cfee7419ae116a867d91258e897e6cfe872a2928030a932f
+DIST collectl-4.1.0.src.tar.gz 625147 SHA256 e50d2c6946b0ed243136f02c18a64b47402f64ee912cf2fef4c37f9f00d65770 SHA512 b74918e458f4e7e9c6b598b078ef9522ba307b0055c0488167785d226f74a960bd075804128caef756d40a9c5a3f0189e912984c1b0c9bf62c537921e94714c5 WHIRLPOOL 7cb82bd13859ba561ed59e65686c6294f36c4d98957b83856e41e99adf8a6ac9f84eb36706752323d00e393b43eb7c9fd325dcd50f1251d027c3b32445fb0968
+DIST collectl-4.1.3.src.tar.gz 634862 SHA256 c9fa7e4a66fe333471bd485a8008b171fdf431faa79d9b43fa830ae7d6c85bb3 SHA512 2938f349708dba164915fd44e7c2a58cc5088e3bafa9009c82973d5f03f8f62395cde925c6e3c1d49c6e22b653a7d1be352ec70dbabcc68b68fb3a795c1b5da8 WHIRLPOOL 2fd065be105f17f82d3ff3d85fd2508d3e86f6fc4272b5f84888390c8a76fd2d223dbb79c28701044561d8d2d2ce6f36da082871f0149c94f3486ab8a3dad8bd
+DIST collectl-4.2.0.src.tar.gz 634317 SHA256 bf4c52d315d4e754b8275f6c6a9a48188c440f78c4307e5f72abcb518a9d07d0 SHA512 a0c3fd393a3fd3e34a838be26ebe4f111d5b62016d6c319cc556af93bec42672bd700c30c1b9a877fce049b0c11a6fbaf70c4c140ecf8f854408849a6d3a7855 WHIRLPOOL 6b9c46d287128b702662ffbb83a96611974240360d4b8ce5c44c3675bb7d1efc49e4584994327359fd9545175f483bd6dee70081ca6f7e4f0ed32d3e4276b021
+EBUILD collectl-3.7.4.ebuild 897 SHA256 e72a19896ee5eb9ae2d567a3f16818436322b6af72542f1cf763fae162cdc347 SHA512 203e16247639293ecaecf3aac3d28778d64a8949f9138e53910819996b4481f8e2516d23bf4b46592928815aca833c52b919e100467fd58d5f0a512743ae70ca WHIRLPOOL e64b0341c6b290f1a36c4a94e6017d6683042e0dfa04272eddadacbf154c0a088de47decb250fdf5b07ccb1ae6307f56d93b3dad7268695dc3530b6d6581b318
+EBUILD collectl-4.0.5.ebuild 899 SHA256 568153bcabd9e5d08657c20ff0016fe6bd163619c8c0d4ff98559e315835d487 SHA512 45c794667a101e5de32c43045725fc58abc305f7b7d8452738c8c6df02e01bd792a88d33be9d41ca7e58b2c6668ea9c8e17172439c3abf9134d492c77db66247 WHIRLPOOL c8fea2c2e55c36249de1a9bd1bd2ad387921b2325c5964139f9bab95cf8122d53d6e03ca73b671a089f127bd0cf8de774a20a4e854beeb606260b60750891cce
+EBUILD collectl-4.1.0.ebuild 899 SHA256 568153bcabd9e5d08657c20ff0016fe6bd163619c8c0d4ff98559e315835d487 SHA512 45c794667a101e5de32c43045725fc58abc305f7b7d8452738c8c6df02e01bd792a88d33be9d41ca7e58b2c6668ea9c8e17172439c3abf9134d492c77db66247 WHIRLPOOL c8fea2c2e55c36249de1a9bd1bd2ad387921b2325c5964139f9bab95cf8122d53d6e03ca73b671a089f127bd0cf8de774a20a4e854beeb606260b60750891cce
+EBUILD collectl-4.1.3.ebuild 899 SHA256 c2f8f3573295cac8dc366206794e8a1e81492fa3f2d4c38da55930eb99283f03 SHA512 8d29c14b653a82fd869c5ee9d0a520528c20740d0a6e2c84e44518909247ede8a7024cb4aa565153f08237c2e0a1345cefee8059e48d841f780bb9c26a68245a WHIRLPOOL 302c28c1af8fdd2a100ee810a6e6829f44cae1c94e76164d77a9d1ff26da7016b021dcef87e524f396ca22cbbfa5e1ec9c1c3468e02265a91876bf7eda7db9e3
+EBUILD collectl-4.2.0.ebuild 858 SHA256 befcd23ddc34d1e81771f158bfc99cfe00ea03e829400768cbfc2c04815195fd SHA512 5c91dd2f42d5886ec4a4d98cb3bc9e5be6a5a633a973b41a0d915a384ecff2963468ae87bb00347ec71df10dee1f44f59a136245fa7b1a4170be562b0e8d5720 WHIRLPOOL f5c038bf51f849507dfd961c26b253df69d7218a3193c296f0ae551c4b5658dd3ba3ce3ba06fdff3c8270cab5f651708ae2ca5ad4fabc8db3ce0570e38988f6b
+MISC ChangeLog 4628 SHA256 e868caaf97cece5b88438e7bb995f385d0fe968b961b5aeef77112038103e6f6 SHA512 29f2df09ad03d2a35d11685d49c78391d5c57985337d033bb49f5ccd2d7920b948a4fc9dda699b24d355ffd2505e60156a9c11014d5b755c5f95fe80d93f992c WHIRLPOOL b7566b94610cb68d724ef606a03cbc22559c00e63d62b020b776fbd4bd058145d0aadee49e1183a507a51def0d6593108ef66a3781afbce2b10bb985c8a1414c
+MISC ChangeLog-2015 4198 SHA256 7e3d3ea95e2ed83962da607377d6bc2306cea737d6d7f112ca485523f365c5df SHA512 df786671c7ec88b40787b6e79fd5e8a0650c0d512df6bde02efbf8af14383acd326a7e77822fe8e69b695eb0db69a832cf99b4e79ca85089fd4f7c524f463890 WHIRLPOOL 97dc5f8eeeb516d583cbc44fbeb71a7212153ee09a2d075b2434cdc74e05b1726f1132c6455abef5d960555169996269dd00c6f12e329aed307d2c57700b1fd1
+MISC metadata.xml 328 SHA256 2cc660761bc5458f21598ae0de3bd7d158131f35d694b606ccb5669661b3336f SHA512 2eb88e764d55e93183e030d0e4e2e99a53d4e26855e234f47077e812e1108aaca4b44bb7af18f04cebf9b366a2a991e844234c0af9c719399f1c836b091b8622 WHIRLPOOL f220803efdee6e52c9a31bcd260f9f57a9a5c939212cb1589cc8d592c33bb1bdb5bef03a4df451d0601b07b3a3bf86ccd3cf4ba9baf587feb33282e00dd25604
diff --git a/sys-apps/collectl/collectl-3.7.4.ebuild b/sys-apps/collectl/collectl-3.7.4.ebuild
new file mode 100644
index 000000000000..433603c67980
--- /dev/null
+++ b/sys-apps/collectl/collectl-3.7.4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="light-weight performance monitoring tool capable of reporting interactively and logging to disk"
+HOMEPAGE="http://collectl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8.8
+ virtual/perl-Time-HiRes
+ >=dev-perl/Archive-Zip-1.20
+ sys-apps/ethtool
+ sys-apps/pciutils"
+
+src_prepare() {
+ sed -i INSTALL -e "/^DOCDIR/s:doc/collectl:doc/${PF}:" || die
+}
+
+src_install() {
+ DESTDIR="${D}" bash -ex ./INSTALL || die
+
+ rm "${D}"/etc/init.d/* || die
+ newinitd "${FILESDIR}"/collectl.initd-2 collectl
+
+ rm "${D}"/usr/share/${PN}/UNINSTALL || die
+
+ cd "${D}"/usr/share/doc/${PF} || die
+ dohtml *
+ rm ARTISTIC GPL COPYING *.html *.jpg *.css || die
+}
diff --git a/sys-apps/collectl/collectl-4.0.5.ebuild b/sys-apps/collectl/collectl-4.0.5.ebuild
new file mode 100644
index 000000000000..5b05a88c3596
--- /dev/null
+++ b/sys-apps/collectl/collectl-4.0.5.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="light-weight performance monitoring tool capable of reporting interactively and logging to disk"
+HOMEPAGE="http://collectl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8.8
+ virtual/perl-Time-HiRes
+ >=dev-perl/Archive-Zip-1.20
+ sys-apps/ethtool
+ sys-apps/pciutils"
+
+src_prepare() {
+ sed -i INSTALL -e "/^DOCDIR/s:doc/collectl:doc/${PF}:" || die
+}
+
+src_install() {
+ DESTDIR="${D}" bash -ex ./INSTALL || die
+
+ rm "${D}"/etc/init.d/* || die
+ newinitd "${FILESDIR}"/collectl.initd-2 collectl
+
+ rm "${D}"/usr/share/${PN}/UNINSTALL || die
+
+ cd "${D}"/usr/share/doc/${PF} || die
+ dohtml *
+ rm ARTISTIC GPL COPYING *.html *.jpg *.css || die
+}
diff --git a/sys-apps/collectl/collectl-4.1.0.ebuild b/sys-apps/collectl/collectl-4.1.0.ebuild
new file mode 100644
index 000000000000..5b05a88c3596
--- /dev/null
+++ b/sys-apps/collectl/collectl-4.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="light-weight performance monitoring tool capable of reporting interactively and logging to disk"
+HOMEPAGE="http://collectl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8.8
+ virtual/perl-Time-HiRes
+ >=dev-perl/Archive-Zip-1.20
+ sys-apps/ethtool
+ sys-apps/pciutils"
+
+src_prepare() {
+ sed -i INSTALL -e "/^DOCDIR/s:doc/collectl:doc/${PF}:" || die
+}
+
+src_install() {
+ DESTDIR="${D}" bash -ex ./INSTALL || die
+
+ rm "${D}"/etc/init.d/* || die
+ newinitd "${FILESDIR}"/collectl.initd-2 collectl
+
+ rm "${D}"/usr/share/${PN}/UNINSTALL || die
+
+ cd "${D}"/usr/share/doc/${PF} || die
+ dohtml *
+ rm ARTISTIC GPL COPYING *.html *.jpg *.css || die
+}
diff --git a/sys-apps/collectl/collectl-4.1.3.ebuild b/sys-apps/collectl/collectl-4.1.3.ebuild
new file mode 100644
index 000000000000..28cbb8d9b7ce
--- /dev/null
+++ b/sys-apps/collectl/collectl-4.1.3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="light-weight performance monitoring tool capable of reporting interactively and logging to disk"
+HOMEPAGE="http://collectl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8.8
+ virtual/perl-Time-HiRes
+ >=dev-perl/Archive-Zip-1.20
+ sys-apps/ethtool
+ sys-apps/pciutils"
+
+src_prepare() {
+ sed -i INSTALL -e "/^DOCDIR/s:doc/collectl:doc/${PF}:" || die
+}
+
+src_install() {
+ DESTDIR="${D}" bash -ex ./INSTALL || die
+
+ rm "${D}"/etc/init.d/* || die
+ newinitd "${FILESDIR}"/collectl.initd-2 collectl
+
+ rm "${D}"/usr/share/${PN}/UNINSTALL || die
+
+ cd "${D}"/usr/share/doc/${PF} || die
+ dohtml *
+ rm ARTISTIC GPL COPYING *.html *.jpg *.css || die
+}
diff --git a/sys-apps/collectl/collectl-4.2.0.ebuild b/sys-apps/collectl/collectl-4.2.0.ebuild
new file mode 100644
index 000000000000..ac6f8b9d5c1a
--- /dev/null
+++ b/sys-apps/collectl/collectl-4.2.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="light-weight performance monitoring tool capable of reporting interactively and logging to disk"
+HOMEPAGE="http://collectl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/collectl/${P}.src.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8.8
+ virtual/perl-Time-HiRes
+ >=dev-perl/Archive-Zip-1.20
+ sys-apps/ethtool
+ sys-apps/pciutils"
+
+HTML_DOCS="docs/*"
+
+DOCS=(
+ README
+ RELEASE-collectl
+)
+
+src_install() {
+ dobin collectl colmux
+
+ insinto /etc
+ doins collectl.conf
+
+ insinto /usr/share/collectl
+ doins *.ph *.std
+
+ insinto /usr/share/collectl/util
+ insopts -m755
+ doins client.pl
+
+ doman man1/*
+ einstalldocs
+
+ newinitd "${FILESDIR}"/collectl.initd-2 collectl
+}
diff --git a/sys-apps/collectl/files/collectl.initd-2 b/sys-apps/collectl/files/collectl.initd-2
new file mode 100644
index 000000000000..b5ff5cedaae8
--- /dev/null
+++ b/sys-apps/collectl/files/collectl.initd-2
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="flush"
+
+pidfile="/var/run/collectl.pid"
+command="/usr/bin/collectl"
+command_args="-D"
+
+flush() {
+ einfo "Flushing collectl buffers"
+ start-stop-daemon --signal USR1 --pidfile ${pidfile}
+ eend $?
+}
diff --git a/sys-apps/collectl/metadata.xml b/sys-apps/collectl/metadata.xml
new file mode 100644
index 000000000000..6d59805d86f0
--- /dev/null
+++ b/sys-apps/collectl/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">collectl</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/conspy/Manifest b/sys-apps/conspy/Manifest
new file mode 100644
index 000000000000..52a12ae4e131
--- /dev/null
+++ b/sys-apps/conspy/Manifest
@@ -0,0 +1,5 @@
+DIST conspy-1.10.tar.gz 25211 SHA256 1c8357d80ef55807fddb62c223cb3779deb66aa33f31294ad6e4e2a03a81d7ee SHA512 f22ddff140935f767bff34c8c274ff088ebae049ac61c543ad37fa126bbab2e1cec72bdd93f51cb513d00368b909935491d06a36dbff215f17cdea7a658dbad2 WHIRLPOOL 14b5bd550e70bd76ec21838720444dd8adf86a11fe669ecd3a8a549f261b2f7a9a21263f28d469f921ccf9ec3921cc9fd4481de0f2e815339c3fc46c64469e5f
+EBUILD conspy-1.10.ebuild 697 SHA256 1be4e1923467baf47ba397961cfd293d063ce89f5b7b74030f26f09ca64b6864 SHA512 436173c77cc803d2c9f2b764e676192fdf36b440124506a9d290dc22c3aaed52ac3d55a4cb87e06ad8bb3eae6d69cc223f1e523c0942b674ee3258168c3428cb WHIRLPOOL 45a939cf8b71ce2b93a5bc49989899fad3d129c84c1f068e2a383244bdc4c8a51fea020a5e3d002bd79909b746de0f20e0172e96c3574756cb4a064ffd21963e
+MISC ChangeLog 3004 SHA256 e7c1a9bd7d8fbf3b6007ae7fec38c38886001522a5cc11b86c0f3d0998faeb0c SHA512 658a226e5004cf21e52fb87d85ae4a4ac3678837ed619f6cdaa4b33630ee3903c68cd345e04e2df698e207dba373d1f85543612213a40504b4e4f8da8c3cc8c3 WHIRLPOOL 53b65072c52113e43f7162a755e57684212726938febc73c31e13e0006d9b3c94cfd21209607efeab851d151bf6434f7fe4f3b605adcdc41a657d393897a471a
+MISC ChangeLog-2015 1824 SHA256 1ca05a3376c22bab64dd94d1f502fb6d1c3c0a3b38226a5637f72d02845e4787 SHA512 21b73795fc7828f2052ff41d44ad04bcd1e9233b0cdd141db631341cbd4c56e29fc63ba4cd2c4681281b46be3007ceec01aab17f168b0871dabb38448fd7fe70 WHIRLPOOL 1b2638b1afc29e3c08221d1b5320c333bfacfc2182c54c09dedc1cc00f505ab2d3aff049dd7e434e50225e2185ca2c7a5aad8dfdccac67d6414f9a61eff547dd
+MISC metadata.xml 243 SHA256 a8262f64748f8a0a7c5001f55abd5f842d9f5088937af4819efb82053ac8b14d SHA512 21d54d715c02242f7048485e46145ad45996250e2e34e26f83b6abf7758c56c0f458446ae865c42e1dec640b44579227819c7437e6fe6aaca9f5a79db5677a7f WHIRLPOOL db869f192d2f75a8decdd7edac6d58ce69a6ea23febacd49b30d93211578f361ba597aa7b4a372f0cd7403ff44fa1191a38d318eea174af84b2baa505e8709f1
diff --git a/sys-apps/conspy/conspy-1.10.ebuild b/sys-apps/conspy/conspy-1.10.ebuild
new file mode 100644
index 000000000000..488d0abf5504
--- /dev/null
+++ b/sys-apps/conspy/conspy-1.10.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+inherit autotools-utils
+
+DESCRIPTION="Remote control for Linux virtual consoles"
+HOMEPAGE="http://conspy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-1/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses:0="
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ autotools-utils_src_configure
+
+ mv \
+ "${WORKDIR}"/${P}_build/Makefile-automake \
+ "${WORKDIR}"/${P}_build/Makefile || die
+}
+
+src_install() {
+ dobin "${WORKDIR}"/${P}_build/${PN}
+ doman ${PN}.1
+ dodoc ChangeLog.txt README.txt
+ dohtml ${PN}.html
+}
diff --git a/sys-apps/conspy/metadata.xml b/sys-apps/conspy/metadata.xml
new file mode 100644
index 000000000000..1d132679808f
--- /dev/null
+++ b/sys-apps/conspy/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">conspy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
new file mode 100644
index 000000000000..91447ecdecf3
--- /dev/null
+++ b/sys-apps/coreutils/Manifest
@@ -0,0 +1,19 @@
+DIST coreutils-8.25-man.tar.xz 43420 SHA256 2ee31c3a6d2276f49c5515375d4a0c1047580da6ac10536898e0f0de81707f29 SHA512 412afc9909d30618ab9daba51c965c0fd22420c32f6c5a7e32ba32d957a92e8a65b977bccaba4b76c55d435a57065dc6103ff11c5fa31d02f117c13a2b09f75e WHIRLPOOL f2a9458d71cfbf6227ece5b688adb34653dacda0dfbcfd5332a36e33cda58b081d9b37c4ec910c92feba485e8e182f52327f4860f1ff5e0b0b7ae2f9b82045ee
+DIST coreutils-8.25-patches-1.1.tar.xz 7196 SHA256 68e116eb70a69e94458197cde81165c9902bec0c6661be31f6fffb84ba8d809c SHA512 19326ab7dd8d4515f7239133772f715aac4e722a1e28f4b0f19d8d629abe54a2309fa7c469797dc0f9e88991906883a891622c791ef940b9a5af6608d2e9110e WHIRLPOOL e7931e16e267b817a86f11b9e01d82dfac8144dbabd91d5cea036c819303895bd852809f374a76b6e4e474b559505d6fc907ddcb113ca1915b76d880e291bc76
+DIST coreutils-8.25.tar.xz 5725008 SHA256 31e67c057a5b32a582f26408c789e11c2e8d676593324849dcf5779296cdce87 SHA512 571f95d44987d373081ed4c6ac82155ad3dcd95621d7b1a7163597e80ecbbafef2cd74b2ef594587a443a1a4355083879f898a286bb0230c48112d43d076ccd6 WHIRLPOOL e871e177ffaf96bfdd9e668eb9a09df9fd952ff095796cffd1ac2b8b3943c9c2ae79c31890fa02b5ed2609b6c6c84b64d2292454b043d62260a9560d2f7b9457
+DIST coreutils-8.26-man.tar.xz 43608 SHA256 9324ec412ffca3b0431e6299720c33ac98e749e430f72a7c6e65f3635c86aa29 SHA512 33fe9f370b0d2a59217b5a40a47f5f673669b9975baf2793f45a05117fe4c04ab9f05be68cf419a761b20e21c13d9a15b35322cecc81b7b9a1c8c534960432cf WHIRLPOOL d7426e2f0c41cf937a4b6362aa71427bdc5e555a0a6aa6dba27a6533cb5fecaa1827ddc63b866e70daca8f250fd5724c688b4d5d843f0b29051e8a5570421dbb
+DIST coreutils-8.26-patches-1.1.tar.xz 7184 SHA256 67fad0b8e53fe9e3daf489cf73882465c15bdc50722a8e09470ff7fbdca9f71a SHA512 ed8b9af1f76484549b63eb3ad4818a6649117ff1efbda2231f8741d149f0ee67438d09b6b2ea7b461aef36c346f17e3ee9a7328766a4c01d1b2b7d3e157f4455 WHIRLPOOL bf656f5b201b7a3b341b0d3b60c19136cd9a6676aee86e9ad8da45906ae64c8644305a070694aab0c70bc6c853a02d27a0209b2433b681e4b00f024da614d9e8
+DIST coreutils-8.26.tar.xz 5810244 SHA256 155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e SHA512 1ca7b32a1564855e672f64cb815f858619dd4308af1c9763959d06fab1ecd51385c4c61d987ceec7ff6baaaac699f2db10be4be7e40b2c6a6d4ffc3911180b03 WHIRLPOOL 9b1026ea5a2fa3dc3c49c4088ddec2de499d06bf7820e1df0d29dd1add7309982a961bd754edeb65f4a54370ab53fde29211c9a93ee5c2f5abce89d7a67be888
+DIST coreutils-8.27-man.tar.xz 43692 SHA256 1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3 SHA512 f1ac9b5361191038d42162e90cc1cacf41e34450b4fe174b3f282cde1740405aecaf9f455625e7ed1d32910445a9e46e1fcfa74a2b645975b04ac1958965fa55 WHIRLPOOL 963a89eeebd023e8e84bcf871b7487e930167376092d49b491808cde8b6f10ce672f186c44b4df7465e56169bb40f4fc6e2fe4a5540f3d693b748a0dcc871d6c
+DIST coreutils-8.27-patches-1.1.tar.xz 7800 SHA256 8b8996a38913971c955c7b7e428d06c50a9c4c3611f8fe81e47627ffdb0f69ca SHA512 6875e8e4a42577c097e073df6d10064be4364bedfec4fd0b8b28123560d1195ec8215d033ce3e43990a28f8a255208a53d6973e73f32ddc530f195d7162d4333 WHIRLPOOL 4976f42865d2651c009ad427136220b282d2611e09933c7239c1e7bb8b76bf85936d27c57d6bafd2f0c41a7e34e4a12254deca822328f8262d2a527e540a9d46
+DIST coreutils-8.27.tar.xz 5285648 SHA256 8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b SHA512 abf3280aaa54e9bd5851df0eda2af1de1017ca174633e52d1e592455d46ea0e99812dda46d2f320e979553cef271485d8818c595bba6ed31264511a511c93679 WHIRLPOOL dcc092f41fb4802563062a4aa5a71e2841a7ddc46dec4acc47af3d9a4bee2372ddae7990ac6f3cf00568f43c3103c8290338964040e111861f080e064960803d
+DIST coreutils-8.28-man.tar.xz 43832 SHA256 d72c3fa79ae328a4fd1107102e8946755aa2e908044e1efcf1e71ef206dca042 SHA512 363cf595e0f6fc69eb6a9d1ca258a5f012404cee99887494ab6e40fe2c6de5e49e7cad953aecb394c5612043efe6b407e657811d8251b10e159c97b849dd8b3e WHIRLPOOL 7b10dbde06caf00d4b789cdb60a7d0c73aec65a90e889698daeccd04eefd8df08142261ea5fde8d3d455f35b2eddf07182bf92e2522e63e8ece412379e0cb0d1
+DIST coreutils-8.28-patches-1.0.tar.xz 7264 SHA256 fe9e8f347d104472d357ad80212996d0c9ddb97cec6166d38f4c340a02f4633c SHA512 b358b827eaff789ea8a3838f53f81efb08a6caa5318ac93dab112ec90052174c05d219e1c0170106bb1ed65bd4e37ffc36b742bf3661cc64ee4b166db741bbbc WHIRLPOOL ece3be79d296507341433bf60b0e7bd6846c3d0a8acfff19d1fba17ec45a13f5504c41bb320bd39358ae9f5e2efd5311e2a7ef6ec1119872f990455f9aa9c94d
+DIST coreutils-8.28.tar.xz 5252336 SHA256 1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65 SHA512 1e592d0dd03b9227bf92af9a82bed6dc3bcbee46e984c7fb09833dea0962e86b309aa34d5e43823b73d4522c066bfa5cdc8ec694aa190910fb246ff32ceb63a1 WHIRLPOOL 58bdd9681d07794da70dc012d03de2f791bc8e40a16de85302cbb5ea247f6d81f0a92c3b90d655b9947057c5e5eb99b9347152d41150c1a613dd1f891942a73f
+EBUILD coreutils-8.25.ebuild 5839 SHA256 0d18564c2dc7106d9882bb4e7597c0fc910c7dbfb0e7a802ff23d8dc2ab57310 SHA512 86a917921cfd7c20755c2570c58438f7bfe923f8838e91508300a745a4417038cc81112a50972f288a02ff3acbb0405ac01784170fbebd62c9ac4c1e40294816 WHIRLPOOL 2e08adaa8f170ae83ab956867d576d7b105a02f109108e7af3d06fd152a553c9633e009ad699657f366ad2809743316f368d98b72f03e9a20be84b602709ac36
+EBUILD coreutils-8.26.ebuild 5863 SHA256 2593c865c6c60ad50f5f61ca3d18857ddc63784b0e9e8d9b668a620b0da9e5d0 SHA512 5583c226f1dcfe303f06301432bf00952fb7fcd5eb86959aeb1189777d64e85c2c96d331c4f833d513a86512ede04de9435c6ae2c79866dab721a5ca7faeafdb WHIRLPOOL 986f5c0bc72bf8003708ff64da97eb068c48f76a54d088ca54a8822112a2896fa9b74144479105d687c17321c92987c24efb7e5a867904cb291632c2a73b9672
+EBUILD coreutils-8.27.ebuild 5873 SHA256 9000511a122ce39be138740e207d950af3d64f61cc2e807e7cd44adedd9bd894 SHA512 d6fcaa23d648987bfbd84b8525fc7efc33029bc12db12de3af92f745b49bd8d7a5d69c513f95ce3969c30c579e86e4e434c1ede716db220d0205b794a74b27e4 WHIRLPOOL c1d921c459d346a1ee527d455fadf4f6bd4332a86e8a5cfb2098fe73e828d8ce009a8cab3c76b4402cada570cd83f5888cfcac7444cec0260614c77124db1fa0
+EBUILD coreutils-8.28.ebuild 5841 SHA256 3c5d4bef22900d4feb8501d7aa7e82a778589f29d4af31e99ecebc930e3ed1be SHA512 0f391e187178f2c49b8807450a9a3bed17c53794f221f6af35f3df20e30fab378070f82ec4dcf74f2bccbe547c5e3d9eb0e02781cf2a632327d424527edbe915 WHIRLPOOL 8110fea30800c6495d23edb0adfa2845fd107b4a9b20f84dd1c618c372282e96d87e266b91b63fb092059b2c77ae3fde0909da1fda1e9dd4c70e4916b1f2be40
+MISC ChangeLog 7611 SHA256 95cfa59136c273c96f0197f728a444d3337cf408e6d974d07553188148c77d14 SHA512 a1a429745e1d5b7efb21b321abd21e1b064bde4f271bbd600f6be3dd32dced5e04cea1fe8a2bc9abf12fdadde55ccefea1257730d5d944f5dc1b97d98d25e4ff WHIRLPOOL 93253eca9c20b770912675ad30f312e803fc1bf8cd17f59e0fd02446298d4f327e8f9c90ab4c90636fd9b4bc0dcbaf3ba477b3ba86f6820ff4040a676e057529
+MISC ChangeLog-2015 57093 SHA256 368347193225a6204bd2454ecbdf549ca614cb8fc5e183ac14c2f767288323e9 SHA512 ef4eff9a3d748641bf1b745599e951308801e1d00d67c5504d17e4d740f5cd7f0c75cd5ee34c8345e8017ee8b6397b84a41df84b4f342ff899a04fd35a0c8f28 WHIRLPOOL 43464de8d0d85fa5b35797c95049591d0a225e4e6f0ab596d8c637da0538f0605c15c35749195fea181b9d5e6a75ea7573a96dbe9da70f28e131a47c913d43b5
+MISC metadata.xml 738 SHA256 1b3907f92a4f6f20b1267d1c4a2b4d126e2a27b9820f6a3b2cb671b438edeeb6 SHA512 c074b29033dae300fa02fb35edf0b595bf00bd5616bac8af5b88525980dc8542dc336145b19942d0f849189b7abe0201f2a40d86d0ed02ddad602eb131b3a87a WHIRLPOOL 206dd26110118d307e0f1654b9e20e26805c90f968c1c00ffc71878503bd6112510ee334a44a031d05884fe8f3576a07efcab630f4823f5527c5d32adc918938
diff --git a/sys-apps/coreutils/coreutils-8.25.ebuild b/sys-apps/coreutils/coreutils-8.25.ebuild
new file mode 100644
index 000000000000..b3cd594d6187
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-8.25.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# To generate the man pages, unpack the upstream tarball and run:
+# ./configure --enable-install-program=arch,coreutils,hostname,kill
+# make
+# cd ..
+# tar cf - coreutils-*/man/*.[0-9] | xz > coreutils-<ver>-man.tar.xz
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCH_VER="1.1"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/${P}-man.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}-man.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="acl caps gmp hostname kill multicall nls selinux static userland_BSD vanilla xattr"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp[static-libs] )
+ xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ app-arch/xz-utils"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+src_prepare() {
+ if ! use vanilla ; then
+ use_if_iuse unicode || rm -f "${WORKDIR}"/patch/000_all_coreutils-i18n.patch
+ EPATCH_SUFFIX="patch" \
+ PATCHDIR="${WORKDIR}/patch" \
+ EPATCH_EXCLUDE="001_all_coreutils-gen-progress-bar.patch" \
+ epatch
+ fi
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1}
+
+ # Avoid perl dep for compiled in dircolors default #348642
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h
+ touch ${@/%x/1}
+ fi
+}
+
+src_configure() {
+ local myconf=''
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ export fu_cv_sys_stat_statfs2_bsize=yes #311569
+ export gl_cv_func_realpath_works=yes #416629
+ fi
+
+ export gl_cv_func_mknod_works=yes #409919
+ use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
+ use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
+ use userland_BSD && myconf="${myconf} -program-prefix=g --program-transform-name=s/stat/nustat/"
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ --enable-install-program="arch,$(usev hostname),$(usev kill)" \
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime" \
+ --enable-largefile \
+ $(use caps || echo --disable-libcap) \
+ $(use_enable nls) \
+ $(use_enable acl) \
+ $(use_enable multicall single-binary) \
+ $(use_enable xattr) \
+ $(use_with gmp) \
+ ${myconf}
+}
+
+src_test() {
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}"
+ chmod a+rx "${WORKDIR}"
+
+ # coreutils tests like to do `mount` and such with temp dirs
+ # so make sure /etc/mtab is writable #265725
+ # make sure /dev/loop* can be mounted #269758
+ mkdir -p "${T}"/mount-wrappers
+ mkwrap() {
+ local w ww
+ for w in "$@" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
+ EOF
+ chmod a+rx "${ww}"
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ cd "${ED}"/usr/bin
+ dodir /bin
+ # move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "could not move fhs bins"
+ if use kill; then
+ mv kill ../../bin/ || die
+ fi
+ # move critical binaries into /bin (common scripts)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "could not move common bins"
+ # create a symlink for uname in /usr/bin/ since autotools require it
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ else
+ # For now, drop the man pages, collides with the ones of the system.
+ rm -rf "${ED}"/usr/share/man
+ fi
+
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+
+ # Help out users using experimental filesystems
+ if grep -qs btrfs "${EROOT}"/etc/fstab /proc/mounts ; then
+ case $(uname -r) in
+ 2.6.[12][0-9]|2.6.3[0-7]*)
+ ewarn "You are running a system with a buggy btrfs driver."
+ ewarn "Please upgrade your kernel to avoid silent corruption."
+ ewarn "See: https://bugs.gentoo.org/353907"
+ ;;
+ esac
+ fi
+}
diff --git a/sys-apps/coreutils/coreutils-8.26.ebuild b/sys-apps/coreutils/coreutils-8.26.ebuild
new file mode 100644
index 000000000000..d2e18b884f50
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-8.26.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# To generate the man pages, unpack the upstream tarball and run:
+# ./configure --enable-install-program=arch,coreutils,hostname,kill
+# make
+# cd ..
+# tar cf - coreutils-*/man/*.[0-9] | xz > coreutils-<ver>-man.tar.xz
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCH_VER="1.1"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/${P}-man.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-man.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="acl caps gmp hostname kill multicall nls selinux static userland_BSD vanilla xattr"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp:=[static-libs] )
+ xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ app-arch/xz-utils"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+src_prepare() {
+ if ! use vanilla ; then
+ use_if_iuse unicode || rm -f "${WORKDIR}"/patch/000_all_coreutils-i18n.patch
+ EPATCH_SUFFIX="patch" \
+ PATCHDIR="${WORKDIR}/patch" \
+ EPATCH_EXCLUDE="001_all_coreutils-gen-progress-bar.patch" \
+ epatch
+ fi
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1}
+
+ # Avoid perl dep for compiled in dircolors default #348642
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h
+ touch ${@/%x/1}
+ fi
+}
+
+src_configure() {
+ local myconf=''
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ export fu_cv_sys_stat_statfs2_bsize=yes #311569
+ export gl_cv_func_realpath_works=yes #416629
+ fi
+
+ export gl_cv_func_mknod_works=yes #409919
+ use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
+ use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
+ use userland_BSD && myconf="${myconf} -program-prefix=g --program-transform-name=s/stat/nustat/"
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ --enable-install-program="arch,$(usev hostname),$(usev kill)" \
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime" \
+ --enable-largefile \
+ $(use caps || echo --disable-libcap) \
+ $(use_enable nls) \
+ $(use_enable acl) \
+ $(use_enable multicall single-binary) \
+ $(use_enable xattr) \
+ $(use_with gmp) \
+ ${myconf}
+}
+
+src_test() {
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}"
+ chmod a+rx "${WORKDIR}"
+
+ # coreutils tests like to do `mount` and such with temp dirs
+ # so make sure /etc/mtab is writable #265725
+ # make sure /dev/loop* can be mounted #269758
+ mkdir -p "${T}"/mount-wrappers
+ mkwrap() {
+ local w ww
+ for w in "$@" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
+ EOF
+ chmod a+rx "${ww}"
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ cd "${ED}"/usr/bin || die
+ dodir /bin
+ # move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "could not move fhs bins"
+ if use kill; then
+ mv kill ../../bin/ || die
+ fi
+ # move critical binaries into /bin (common scripts)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "could not move common bins"
+ # create a symlink for uname in /usr/bin/ since autotools require it
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ else
+ # For now, drop the man pages, collides with the ones of the system.
+ rm -rf "${ED}"/usr/share/man
+ fi
+
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+
+ # Help out users using experimental filesystems
+ if grep -qs btrfs "${EROOT}"/etc/fstab /proc/mounts ; then
+ case $(uname -r) in
+ 2.6.[12][0-9]|2.6.3[0-7]*)
+ ewarn "You are running a system with a buggy btrfs driver."
+ ewarn "Please upgrade your kernel to avoid silent corruption."
+ ewarn "See: https://bugs.gentoo.org/353907"
+ ;;
+ esac
+ fi
+}
diff --git a/sys-apps/coreutils/coreutils-8.27.ebuild b/sys-apps/coreutils/coreutils-8.27.ebuild
new file mode 100644
index 000000000000..396636ee5d93
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-8.27.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# To generate the man pages, unpack the upstream tarball and run:
+# ./configure --enable-install-program=arch,coreutils,hostname,kill
+# make
+# cd ..
+# tar cf - coreutils-*/man/*.[0-9] | xz > coreutils-<ver>-man.tar.xz
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCH_VER="1.1"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/${P}-man.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-man.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="acl caps gmp hostname kill multicall nls selinux static userland_BSD vanilla xattr"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp:=[static-libs] )
+ xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ app-arch/xz-utils"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+src_prepare() {
+ if ! use vanilla ; then
+ use_if_iuse unicode || rm -f "${WORKDIR}"/patch/000_all_coreutils-i18n.patch
+ EPATCH_SUFFIX="patch" \
+ PATCHDIR="${WORKDIR}/patch" \
+ EPATCH_EXCLUDE="001_all_coreutils-gen-progress-bar.patch" \
+ epatch
+ fi
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1}
+
+ # Avoid perl dep for compiled in dircolors default #348642
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h
+ touch ${@/%x/1}
+ fi
+}
+
+src_configure() {
+ local myconf=''
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ export fu_cv_sys_stat_statfs2_bsize=yes #311569
+ export gl_cv_func_realpath_works=yes #416629
+ fi
+
+ export gl_cv_func_mknod_works=yes #409919
+ use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
+ use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
+ use userland_BSD && myconf="${myconf} -program-prefix=g --program-transform-name=s/stat/nustat/"
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ --enable-install-program="arch,$(usev hostname),$(usev kill)" \
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime" \
+ --enable-largefile \
+ $(use caps || echo --disable-libcap) \
+ $(use_enable nls) \
+ $(use_enable acl) \
+ $(use_enable multicall single-binary) \
+ $(use_enable xattr) \
+ $(use_with gmp) \
+ ${myconf}
+}
+
+src_test() {
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}"
+ chmod a+rx "${WORKDIR}"
+
+ # coreutils tests like to do `mount` and such with temp dirs
+ # so make sure /etc/mtab is writable #265725
+ # make sure /dev/loop* can be mounted #269758
+ mkdir -p "${T}"/mount-wrappers
+ mkwrap() {
+ local w ww
+ for w in "$@" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
+ EOF
+ chmod a+rx "${ww}"
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ cd "${ED}"/usr/bin || die
+ dodir /bin
+ # move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "could not move fhs bins"
+ if use kill; then
+ mv kill ../../bin/ || die
+ fi
+ # move critical binaries into /bin (common scripts)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "could not move common bins"
+ # create a symlink for uname in /usr/bin/ since autotools require it
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ else
+ # For now, drop the man pages, collides with the ones of the system.
+ rm -rf "${ED}"/usr/share/man
+ fi
+
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+
+ # Help out users using experimental filesystems
+ if grep -qs btrfs "${EROOT}"/etc/fstab /proc/mounts ; then
+ case $(uname -r) in
+ 2.6.[12][0-9]|2.6.3[0-7]*)
+ ewarn "You are running a system with a buggy btrfs driver."
+ ewarn "Please upgrade your kernel to avoid silent corruption."
+ ewarn "See: https://bugs.gentoo.org/353907"
+ ;;
+ esac
+ fi
+}
diff --git a/sys-apps/coreutils/coreutils-8.28.ebuild b/sys-apps/coreutils/coreutils-8.28.ebuild
new file mode 100644
index 000000000000..a7253367560c
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-8.28.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# To generate the man pages, unpack the upstream tarball and run:
+# ./configure --enable-install-program=arch,coreutils,hostname,kill
+# make
+# cd ..
+# tar cf - coreutils-*/man/*.[0-9] | xz > coreutils-<ver>-man.tar.xz
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCH_VER="1.0"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/${P}-man.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${P}-man.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="acl caps gmp hostname kill multicall nls selinux static userland_BSD vanilla xattr"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp:=[static-libs] )
+ xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ app-arch/xz-utils"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+src_prepare() {
+ if ! use vanilla ; then
+ use_if_iuse unicode || rm -f "${WORKDIR}"/patch/000_all_coreutils-i18n.patch
+ #rm "${WORKDIR}"/patch/001_all_coreutils-gen-progress-bar.patch || die
+ eapply "${WORKDIR}"/patch/*.patch
+ fi
+
+ eapply_user
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1}
+
+ # Avoid perl dep for compiled in dircolors default #348642
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h
+ touch ${@/%x/1}
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --with-packager="Gentoo"
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})"
+ --with-packager-bug-reports="https://bugs.gentoo.org/"
+ --enable-install-program="arch,$(usev hostname),$(usev kill)"
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime"
+ --enable-largefile
+ $(use caps || echo --disable-libcap)
+ $(use_enable nls)
+ $(use_enable acl)
+ $(use_enable multicall single-binary)
+ $(use_enable xattr)
+ $(use_with gmp)
+ )
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ export fu_cv_sys_stat_statfs2_bsize=yes #311569
+ export gl_cv_func_realpath_works=yes #416629
+ fi
+
+ export gl_cv_func_mknod_works=yes #409919
+ use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
+ use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
+ use userland_BSD && myconf+=( -program-prefix=g --program-transform-name=s/stat/nustat/ )
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ econf ${myconf[@]}
+}
+
+src_test() {
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}"
+ chmod a+rx "${WORKDIR}"
+
+ # coreutils tests like to do `mount` and such with temp dirs
+ # so make sure /etc/mtab is writable #265725
+ # make sure /dev/loop* can be mounted #269758
+ mkdir -p "${T}"/mount-wrappers
+ mkwrap() {
+ local w ww
+ for w in "$@" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
+ EOF
+ chmod a+rx "${ww}"
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ cd "${ED%/}"/usr/bin || die
+ dodir /bin
+ # move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "could not move fhs bins"
+ if use kill; then
+ mv kill ../../bin/ || die
+ fi
+ # move critical binaries into /bin (common scripts)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "could not move common bins"
+ # create a symlink for uname in /usr/bin/ since autotools require it
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ else
+ # For now, drop the man pages, collides with the ones of the system.
+ rm -rf "${ED%/}"/usr/share/man
+ fi
+
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+
+ # Help out users using experimental filesystems
+ if grep -qs btrfs "${EROOT%/}"/etc/fstab /proc/mounts ; then
+ case $(uname -r) in
+ 2.6.[12][0-9]|2.6.3[0-7]*)
+ ewarn "You are running a system with a buggy btrfs driver."
+ ewarn "Please upgrade your kernel to avoid silent corruption."
+ ewarn "See: https://bugs.gentoo.org/353907"
+ ;;
+ esac
+ fi
+}
diff --git a/sys-apps/coreutils/metadata.xml b/sys-apps/coreutils/metadata.xml
new file mode 100644
index 000000000000..b75c0df6a5f9
--- /dev/null
+++ b/sys-apps/coreutils/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription>Standard GNU file utilities (chmod, cp, dd, dir, ls, ...), text utilities (sort, tr, head, wc, ...), and shell utilities (whoami, who, ...)
+</longdescription>
+<use>
+ <flag name="hostname">Build the hostname program</flag>
+ <flag name="kill">Build the kill program</flag>
+ <flag name="multicall">Build all tools into a single `coreutils` program akin to busybox to save space</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:coreutils</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/cpint/Manifest b/sys-apps/cpint/Manifest
new file mode 100644
index 000000000000..e3228fc32021
--- /dev/null
+++ b/sys-apps/cpint/Manifest
@@ -0,0 +1,10 @@
+AUX cpint-2.5.3-build.patch 1739 SHA256 9cf6c325c02a89014309e8c80ab235120c592304ee95b5bc4459c3e03f251289 SHA512 3800e2a9b47b1258fddbe5ef0db7ab268f985cee87e1f2ddb2639610ca236a8c979ddfd5c46c2ef031338341665e601e44e9a19757656cf5dc70c558dd8fa22c WHIRLPOOL 6a51a370a6ae24f2f4fcf83f63261aef97f5a4a6aceb1cb2c358dc7f1adc87340d6745172cec3b36fcd756b06dfc78c62986e5cdbd1c89ad4fab0ebcbce704bc
+AUX cpint-2.5.3-kernel.patch 1454 SHA256 d21560bd05fc67e56f2a4fac5e0a45cdb252eb6a6c6b0e309b051604aa80a990 SHA512 b48850a91c80f36844e03a95db1616c9b11a5e076c0ca948e25ac17af4d533c0b7341607cebe7aa0f8b6482bab8508087c638fd7a0515853843a89c6c94e7030 WHIRLPOOL 09c6c3b57ecb3a2fe8c6d8c9b9ed4f2399b1f47c7b10220603feca235ece0d5917ae7d829b14f5e3040d648815f2b6190bb21511528c90e97268565de16208df
+AUX cpint-2.5.3-prototypes.patch 1008 SHA256 b08cf05fc410659f5a2be4945df5c956f3bdb9025f00976e47d17b94e6cc1178 SHA512 ab78d5f9ea13962b2037a4fd67a88968d2fd71184389dcc7824d633eef3f2e129cd99901093656b23c126636ce7692f04c9dc315c698eee259d123ce4b77db3b WHIRLPOOL be72235bc5e90e5fc3e6a43fd0f8b7d2180724d288f24531cd9638ffdb0d669971838ab98010fd37b257fb29963db8111e81a0562ccd8a4c3061ef465828b4fa
+DIST cpint116.tgz 20626 SHA256 8bfc3d7add9c860de93154331af30198e06564d5a03aa1f627b239a27d7a8b89 SHA512 6c839ab2808e5c86d7e9fb502798a8cf38c80854d9f08baf4574f99e736c677217ced92772b3df18211f45d38600c1668f11d0fb4677f7dd57c00dbcdab3d7d3 WHIRLPOOL 532e75d4c8b1e503bed4972997a69bb071d8d5fc70c0b0f000d11f9000a127e29eda615afad49f070f81c2d1a38216a34ab909a5c30af4f29c8b5145ef950d3a
+DIST cpint253.tgz 31143 SHA256 a82d66d38c9cd0e99e7226f5e56598ec41e4b4bf27d5c7c94cad9f96314791fd SHA512 ecaddee3d2b0c408828b9fd4f1c8bf0026ab8f3654f8792ef504ddfaa848a3ee6b4197f93d044768f3dad49b28dcec175246fe20454cbc7baa162c463bebf221 WHIRLPOOL e1c603102580d4d0bd39af0f620a7fedf5c8c4142441e1f6ad4b4f06ab15e6edfadd0e234acf5e97f5055b1ae8bade09d5703cefa46512d0369950b4f967131c
+EBUILD cpint-1.1.6.ebuild 565 SHA256 372e5c49d9d5659f7c6ebe0fd3b6f9223f9200a9797376665039a1c31eac9c81 SHA512 ba116feae6a4b1a7086f5ca5c6612e00fa17636b891dbc5c9708bc94f2f2052feac8572f425630807344dd782aabdd58ef6558ff4f66b9748002358b640782ae WHIRLPOOL dad355ac5fd0faf7a4c75371e49d033639f9a90a2cb551d9af18e5e62ea48d37668e03a7678dd66543ba091f75c15905afb18550f87050da1e12cf5a90b7dacc
+EBUILD cpint-2.5.3.ebuild 650 SHA256 769a57574bd809671f9d74dbcf3dfbefbc8519ff2238a960e36c47694f28be17 SHA512 ad7e8b9960c06413598b1cbaa607ab3bee0826747c5b99071434b865d0b8a163de9259806127f21be7c765ff39c94ea279645915ba94170d1eccba15645fe97b WHIRLPOOL ebfde7f855e67fb58796b49afb36e88236f3f7ebaecd0ac2e2fb5263472efa2add33cca4722bd01eb3d2fcc8545824f3f6e471748325dbe04032e1c664db03ed
+MISC ChangeLog 2575 SHA256 71cbf8e51c8de6972f87261443ba1b87dcfd5f75b38df8a26d3753d6d6300c8b SHA512 ea49500b817c8d1205a430e4930f11ee11f28ede399c05071cddb2aee111a3a3f60dbcca377e568349188d7bc727a9167aa50d2b353d7d13150d88d67fd29988 WHIRLPOOL 68077818f672f672e585ea761eec540130a60d6861c00a7f309f1a47b7f4bcc4049ff145348dc2afd674ed1b6b9c017a742b604f04967c1c4899fbaeabf18d29
+MISC ChangeLog-2015 988 SHA256 61cf75cb036dae9c7cf7a7cb11a50d496b76a8c879e6cebebca9709e3b7c53ca SHA512 f831fa1d0a54daa671314c2db6990641daeb3f6040a7b1bb1aacddc3822d3a970c10fadb72e27506076dc2f595eeaccb449ef5c14ffe847b5ad36343adc91293 WHIRLPOOL ab6b92f2ba26abf71f556658040e47f888aae74a0bb206077974432283c20fe3d3937e9fa33664ee9aa8600e55eb94a9e8af43282f16619ae643d7b0390f07ce
+MISC metadata.xml 338 SHA256 4fddf3212828f6e13c213f4222af72b0412dd4ad4c6abc3efeb17327191fe2b5 SHA512 b0b29ca2593c1435924d3594cacd8576bd60b050435f732e0e804d407297684d33003d98b7ba2030cbf96c8509f77b5b0526ccd3d25eeb41161644fe633b664b WHIRLPOOL f4ec885e250e4824d74f8866aabb6fff7810d60cdb30745271b1366fb7d73b547815366a29d68c2980a8cd5625ae65976b252e12757361f305ef959bc89868e8
diff --git a/sys-apps/cpint/cpint-1.1.6.ebuild b/sys-apps/cpint/cpint-1.1.6.ebuild
new file mode 100644
index 000000000000..106d7db762b5
--- /dev/null
+++ b/sys-apps/cpint/cpint-1.1.6.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit linux-info
+
+MY_PV=${PV//./}
+
+DESCRIPTION="Linux/390 Interface to z/VM's Control Program"
+HOMEPAGE="http://linuxvm.org/Patches/index.html"
+SRC_URI="http://linuxvm.org/Patches/s390/${PN}${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="s390"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ emake INCLUDEDIR=-I/usr/src/linux/include || die "emake failed"
+}
+
+src_install() {
+ einstall prefix="${D}" || die
+ rm -rf "${D}"/lib/modules/misc
+ dodoc ChangeLog HOW-TO
+}
diff --git a/sys-apps/cpint/cpint-2.5.3.ebuild b/sys-apps/cpint/cpint-2.5.3.ebuild
new file mode 100644
index 000000000000..3d76a21d7aa4
--- /dev/null
+++ b/sys-apps/cpint/cpint-2.5.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit linux-info eutils
+
+MY_PV=${PV//./}
+
+DESCRIPTION="Linux/390 Interface to z/VM's Control Program"
+HOMEPAGE="http://linuxvm.org/Patches/index.html"
+SRC_URI="http://linuxvm.org/Patches/s390/${PN}${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="s390"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-prototypes.patch
+ epatch "${FILESDIR}"/${P}-kernel.patch
+
+ # the makefile uses this variable
+ export KERNEL_DIR
+}
+
+src_install() {
+ emake install prefix="${D}"
+ dodoc ChangeLog HOW-TO
+}
diff --git a/sys-apps/cpint/files/cpint-2.5.3-build.patch b/sys-apps/cpint/files/cpint-2.5.3-build.patch
new file mode 100644
index 000000000000..9dacbdb6c7ad
--- /dev/null
+++ b/sys-apps/cpint/files/cpint-2.5.3-build.patch
@@ -0,0 +1,73 @@
+--- cpint-2.5.3/Makefile
++++ cpint-2.5.3/Makefile
+@@ -5,59 +5,29 @@
+ prefix =
+ bindir = /usr/sbin
+ etcdir = /etc
++krndir = /lib/modules/`uname -r`/misc
+
+-COMMAND = hcp mongen monstat actgen diag0
+-
+-tools: $(COMMAND)
++CFLAGS += -Wall
++CPPFLAGS += -I$(KERNEL_DIR)/include
+
+-hcp : hcp.o
+- $(CC) -o $@ $^
++COMMAND = hcp mongen monstat actgen diag0
+
+-hcptest : hcptest.o
+- $(CC) -o $@ $^
++all: $(COMMAND) cpint_mod.ko
+
+-mongen : mongen.o
+- $(CC) -o $@ $^
++cpint_mod.ko:
++ $(MAKE) -C $(KERNEL_DIR) modules SUBDIRS=$(PWD)
+
+-actgen : actgen.o
+- $(CC) -o $@ $^
++tools: $(COMMAND)
+
+ monstat : monstat.o sysinfo.o
+- $(CC) -o $@ $^
+-
+-diag0 : diag0.o
+- $(CC) -o $@ $^
+-
+-hcp.o : hcp.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcp.c
+-
+-hcptest.o : hcptest.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcptest.c
+-
+-mongen.o : mongen.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c mongen.c
+-
+-monstat.o : monstat.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c monstat.c
+-
+-sysinfo.o : sysinfo.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c sysinfo.c
+-
+-actgen.o : actgen.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c actgen.c
+-
+-diag0.o : diag0.c
+- $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c diag0.c
+
+ install: $(TARGET)
++ install -d -m 755 ${prefix}${bindir}
+ install -c -m 750 mongen ${prefix}${bindir}
+ install -c -m 750 monstat ${prefix}${bindir}
+ install -c -m 750 hcp ${prefix}${bindir}
+- cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/
+- rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \
+- /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222
+- modprobe -qr cpint_mod
+- depmod -a
++ install -d -m 755 ${prefix}${krndir}
++ install -c -m 644 cpint_mod.ko ${prefix}${krndir}
+
+ clean:
+ rm -rf *.o *~ core mongen monstat actgen hcp diag0 *.ko *.cmd \
diff --git a/sys-apps/cpint/files/cpint-2.5.3-kernel.patch b/sys-apps/cpint/files/cpint-2.5.3-kernel.patch
new file mode 100644
index 000000000000..b4bb7640eb2c
--- /dev/null
+++ b/sys-apps/cpint/files/cpint-2.5.3-kernel.patch
@@ -0,0 +1,43 @@
+--- cpint-2.5.3/cpint.c
++++ cpint-2.5.3/cpint.c
+@@ -131,7 +131,7 @@
+
+ CPInt_Dev *cpint_devices;
+
+-static struct class_simple *cpint_class;
++static struct class *cpint_class;
+
+ /*----------------------------------------------------------*/
+ /* The different file operations */
+@@ -309,7 +309,7 @@
+ /*------------------------------------------------------*/
+ /* Register this device class */
+ /*------------------------------------------------------*/
+- cpint_class = class_simple_create(THIS_MODULE, "cpint");
++ cpint_class = class_create(THIS_MODULE, "cpint");
+ if (IS_ERR(cpint_class)) {
+ printk(KERN_ERR "Error creating cpint class.\n");
+ kfree(cpint_devices);
+@@ -325,7 +325,7 @@
+
+ fopIdx = fopMap[i_dev];
+ if (fopIdx > -1 && !(cpint_devs_map & (1 << fopIdx))) {
+- class_simple_device_add(cpint_class,
++ class_device_create(cpint_class, NULL,
+ MKDEV(cpint_major, i_dev), NULL,
+ cpNames[fopIdx]);
+ cpint_devs_map |= 1 << fopIdx;
+@@ -386,11 +386,11 @@
+
+ fopIdx = fopMap[i_dev];
+ if (fopIdx > -1 && (cpint_devs_map & (1 << fopIdx))) {
+- class_simple_device_remove(MKDEV(cpint_major, i_dev));
++ class_device_destroy(cpint_class, MKDEV(cpint_major, i_dev));
+ }
+ }
+ cpint_devs_map = 0;
+- class_simple_destroy(cpint_class);
++ class_destroy(cpint_class);
+
+ unregister_chrdev(cpint_major, "cpint");
+ for (i_dev = 0; i_dev < CPINT_NR_DEVS; i_dev++) {
diff --git a/sys-apps/cpint/files/cpint-2.5.3-prototypes.patch b/sys-apps/cpint/files/cpint-2.5.3-prototypes.patch
new file mode 100644
index 000000000000..376ee8c4fc87
--- /dev/null
+++ b/sys-apps/cpint/files/cpint-2.5.3-prototypes.patch
@@ -0,0 +1,43 @@
+--- cpint-2.5.3/actgen.c
++++ cpint-2.5.3/actgen.c
+@@ -45,6 +45,7 @@
+ /************************************************************/
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--- cpint-2.5.3/diag0.c
++++ cpint-2.5.3/diag0.c
+@@ -46,6 +46,8 @@
+ /************************************************************/
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--- cpint-2.5.3/hcp.c
++++ cpint-2.5.3/hcp.c
+@@ -48,6 +48,8 @@
+ /************************************************************/
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--- cpint-2.5.3/mongen.c
++++ cpint-2.5.3/mongen.c
+@@ -59,6 +59,8 @@
+ /************************************************************/
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
diff --git a/sys-apps/cpint/metadata.xml b/sys-apps/cpint/metadata.xml
new file mode 100644
index 000000000000..63a4a75d07e5
--- /dev/null
+++ b/sys-apps/cpint/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>s390@gentoo.org</email>
+ <name>Gentoo Linux s390 Development</name>
+</maintainer>
+<longdescription>Linux/390 Interface to z/VM's Control Program</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/cpuid/Manifest b/sys-apps/cpuid/Manifest
new file mode 100644
index 000000000000..dac2aede7a14
--- /dev/null
+++ b/sys-apps/cpuid/Manifest
@@ -0,0 +1,7 @@
+AUX cpuid-20170122-Makefile.patch 1379 SHA256 b6feae04214ed21ff3c642e62a45f4652a345ac3cc727b50a945626cd3e307ea SHA512 b69b9913e56c20a117ae13fcb2ee5aed0b4379d40209f8046477c5b2abb247cdfc18d9cd048e0000aa145b4920f3eeacdfca534e80822294287119b04178a8c7 WHIRLPOOL 8370bd2a49c911f1f49ad268fdd7a039b2541fbe2db0e65e921d4df097ec445a5e80b671011f6d1e8cffc44bf170a83a20ca0785a7b97e9cf9dc42f3b660e68d
+AUX cpuid-20170122-missing-include-sysmacros.patch 255 SHA256 f059ad5b8e943b7fdfe5fdd3c454daa662703e0bcb51eea1f5a835b46f905ceb SHA512 4d87f27a3b7742bf1ed0cb3556ae4da83f8c891858ab2facf1b17dcf2bca65e6b53bcab099196d9a0cd13d65b0de7bb1c1bd7559b260e1ac29da209998a0ba26 WHIRLPOOL 21a96ef79730fbf4d3d281d9bbb40a9a3baf5d1cf264e547ed5f22a85bc64633413784d77352860452cff291d4668e325dd7490295b6437d20319dc22cede9e8
+DIST cpuid-20170122.src.tar.gz 80046 SHA256 667612aae6704341dd10844e97c84c5c5c8700817a5937a3c293b55013bc4865 SHA512 0e057980c71a0e078254e6b7535747bdf368278932c39943cf7dfafe08443af07297a2b41518499937a710fe6950ba89377cabaada5f6332932650d4d17c1430 WHIRLPOOL 25594a2629c8da251d9cbc511a726cf2a4a235cc361c002fd6fa127c9d589f08938475094ea366861bb83b070d5d5955eac494d2b17958e2204b3e7275fd287c
+EBUILD cpuid-20170122.ebuild 653 SHA256 a16cf48b4d4691c10d16fc47726d18c366cf40c83e24b104ecfb3ee52486d6aa SHA512 a39dd97b2030131a9a69e846f542558d0c9f304527b66860ca57b29ca625ce15c4ee2d205de7d66918eae069a5e326f396e36dab7b26273bb6847e52df8e6dd4 WHIRLPOOL aaf0f48e3b6e3ddc98ab62c384d6181ce2de6392bb34c57a994ac8273b9e76101680658efb3f71ac0eca0a158d06e344a08118393a40675c1142c10ba9a98b57
+MISC ChangeLog 2791 SHA256 562fa70245708d7d9283e6b3212d2243528b1f2e310470c609758d9e2004e310 SHA512 e0cb33041f058006c54446bba645e15803e7f4840c7daad6ab00dd69347fe6f7f0d0e52673fa91264497889d5daed7698cacd924193535a407120e5df1e8a08f WHIRLPOOL 9cefdf32a67bdf9e1bba9ec416086731fc6aba23dddb4f9d93a67bfad6a08fa8cc70f23526398908daf58abf27b7a36a2e40700b8967730839fec56f65f10530
+MISC ChangeLog-2015 1714 SHA256 4a1ac96db2ea17385e845571ea132d388068214a800f20df93b4261221d2b1af SHA512 95d5b088248a466529ee48af7792c7c26288f2e1efeb6ea6da19453c0b0bcbbdc19fc960205a64fa706232a747fa03e03c17c166de2672924159b42494aeedad WHIRLPOOL 231adfc714bb295854eb543b7969159fc3eeb4a2a2d4f2424eedf17e61ce9433d8d1cb833cb9e1ef2944d436889898657785a1c29778698fdcf9fa324c6adacb
+MISC metadata.xml 352 SHA256 572eb4208a162c8f276778018f564bb73976685e1c05816046caf92870c4dfbe SHA512 22f94e6edfb123979e0a1c7b10c6aa78fc95a0df89ded2e348c619925e396d0895423de68a3ee47e69b5c459742ca52cb6d5444953caad1a42cd3d59b5274673 WHIRLPOOL 3ce90650b6f6ee47b11ddaf84f83746bb02bca7e8b6b6fbab4afed67ae82ef7d645cfc67600272023d53e4b03375a7c99945f8d66babed89dabb65e643eea3a1
diff --git a/sys-apps/cpuid/cpuid-20170122.ebuild b/sys-apps/cpuid/cpuid-20170122.ebuild
new file mode 100644
index 000000000000..5bd738081d41
--- /dev/null
+++ b/sys-apps/cpuid/cpuid-20170122.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Utility to get detailed information about the CPU(s) using the CPUID instruction"
+HOMEPAGE="http://www.etallen.com/cpuid.html"
+SRC_URI="http://www.etallen.com/${PN}/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ app-arch/gzip
+ dev-lang/perl"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20170122-Makefile.patch
+ "${FILESDIR}"/${PN}-20170122-missing-include-sysmacros.patch
+)
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ emake BUILDROOT="${ED}" install
+ einstalldocs
+}
diff --git a/sys-apps/cpuid/files/cpuid-20170122-Makefile.patch b/sys-apps/cpuid/files/cpuid-20170122-Makefile.patch
new file mode 100644
index 000000000000..9a02a54563aa
--- /dev/null
+++ b/sys-apps/cpuid/files/cpuid-20170122-Makefile.patch
@@ -0,0 +1,28 @@
+diff -ru cpuid-20170122.orig/Makefile cpuid-20170122/Makefile
+--- cpuid-20170122.orig/Makefile 2017-06-16 06:54:32.993875817 -0700
++++ cpuid-20170122/Makefile 2017-06-16 06:55:56.622875498 -0700
+@@ -1,9 +1,3 @@
+-CFLAGS+=-g
+-CPPFLAGS?=
+-LDFLAGS?=
+-ifneq (,$(findstring arch=i386,$(CFLAGS)))
+-CISA=-m32
+-endif
+ CFL=$(CPPFLAGS) $(CFLAGS) $(CISA) -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -D_FILE_OFFSET_BITS=64 -DVERSION=$(VERSION)
+
+ PACKAGE=cpuid
+@@ -51,10 +45,10 @@
+ gzip < $< > $@
+
+ install: $(PROG) $(PROG).man.gz cpuinfo2cpuid cpuinfo2cpuid.man.gz
+- install -D -s -m 755 $(PROG) $(BUILDROOT)/usr/bin/$(PROG)
+- install -D -m 444 $(PROG).man.gz $(BUILDROOT)/usr/share/man/man1/$(PROG).1.gz
+- install -D -m 755 cpuinfo2cpuid $(BUILDROOT)/usr/bin/cpuinfo2cpuid
+- install -D -m 444 cpuinfo2cpuid.man.gz $(BUILDROOT)/usr/share/man/man1/cpuinfo2cpuid.1.gz
++ install -D -m 755 $(PROG) $(BUILDROOT)/usr/bin/$(PROG)
++ install -D -m 444 $(PROG).man.gz $(BUILDROOT)/usr/share/man/man1/$(PROG).1.gz
++ install -D -m 755 cpuinfo2cpuid $(BUILDROOT)/usr/bin/cpuinfo2cpuid
++ install -D -m 444 cpuinfo2cpuid.man.gz $(BUILDROOT)/usr/share/man/man1/cpuinfo2cpuid.1.gz
+
+ clean:
+ rm -f $(PROG) $(PROG).i386 $(PROG).x86_64
diff --git a/sys-apps/cpuid/files/cpuid-20170122-missing-include-sysmacros.patch b/sys-apps/cpuid/files/cpuid-20170122-missing-include-sysmacros.patch
new file mode 100644
index 000000000000..bba18a3b3543
--- /dev/null
+++ b/sys-apps/cpuid/files/cpuid-20170122-missing-include-sysmacros.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=604406
+
+--- a/cpuid.c
++++ b/cpuid.c
+@@ -30,6 +30,7 @@
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <errno.h>
diff --git a/sys-apps/cpuid/metadata.xml b/sys-apps/cpuid/metadata.xml
new file mode 100644
index 000000000000..33999ea1f44e
--- /dev/null
+++ b/sys-apps/cpuid/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 type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/cracklib-words/Manifest b/sys-apps/cracklib-words/Manifest
new file mode 100644
index 000000000000..b4c64382c266
--- /dev/null
+++ b/sys-apps/cracklib-words/Manifest
@@ -0,0 +1,7 @@
+DIST cracklib-words-2.9.6.gz 5536645 SHA256 27973245225eeb9d0090e97f3dea4197dec99b64d9d3a791a60298f3b021824c SHA512 fc5bbe7699c9c9e3f39f5c82f53ec8a4ea85e08d5513188a2f6423f92779008b87d85cfcf87a9a5d13a49b04c30f73890cd4d3fa7cd4a6bdac5c1ebc18e18bc3 WHIRLPOOL b08492a26adc1ae867d04aa56b227c86d21ee75f3486bd761161c184cac8252677bd153a04732e47300d3208d48fbe7bc5b4a4c5ca9bca631079e79f364cfb39
+DIST cracklib-words-20080507.gz 4515718 SHA256 e0c7f452c1fd80d551ae4a7d1afa7fa19cbf47c2d6d5dafc1255c1e76502cb71 SHA512 d21055d6439a2b92b23ab6fd31222d9330315a0b44f53fae308ce5749a9fcb33b7df982f85ca8e2d6d2f9cc4c7264dfc3ed454edbccecd76289713df09fd633e WHIRLPOOL 435ca671c1e9f4b5b45852ff9295af89cedcfc408be420a7ff93f85147bb9bf9cd32b2d9c24a7677b5db9df674a27c476fcbc9e9a012e71709f6e6005e763b0c
+EBUILD cracklib-words-2.9.6.ebuild 724 SHA256 dd4f3cec9176d300cf89f38e882cbe41e1d5e895a3dd32aa43b939ff8aa76af5 SHA512 5047dc2726c2841957f7041fa8d7fa9b024320eaeebaaff4d37c64a261f070d20b33e8daadea0068526c51607aace26df762328cf7f32dd516c6c38899c818b9 WHIRLPOOL d16b99afb4a71ac341d5fdcc733e25442fb529a452d81f82ff936f4a57e2ed95f1579c5e21f8b5f62de189214bff54fdee280df449817c9c729e7045be57d8fd
+EBUILD cracklib-words-20080507.ebuild 689 SHA256 b4fb77c0b53225daf8f69ae32d26d24e3888585e5e01e1061945c76dd9dcc8b3 SHA512 0d426520278367ac0aa857d7cacdb3cfce467915176a70c5a24548cc856061346fec4255d415c5e56874498874d35aac1fa67bc01dd897c21f1cab13b229b0cf WHIRLPOOL 66755b63f82f6d233527b0413c45b1bf06f66cda8e1c21866e2768b8d188b8ed8f7245e100dec92183478fd4f11534a8c6139fc80246958b1ecb4e6fa0177288
+MISC ChangeLog 3419 SHA256 c02e2ca01e033ae127431d6bbe64354c046481d85a3d29b20aa6bdbc85d0af18 SHA512 a431e567ef22f0b4e58bda6dd5f50193463280b2a5c293abba2ba1da90495733afb624806bcdac5cd33ed549edbf95b733e079a84d3f3266d3a43a64859aa7d7 WHIRLPOOL e17aac442f62877fc66775c0469ba5fd33bce02e508a72791917ccf85f097a7295f3990756a35b97dce43718302de3f0d5c1c1510f4ce7a46e013b932601726f
+MISC ChangeLog-2015 4068 SHA256 b98711e10dd1786561be324cbef6dbc07008944178cd88f64da22d9ba1a10ab9 SHA512 2d575c7d2d064bb182fa10a21944ee3357e800cdbd5a3800e32ddaf368e2405d93e87073dcf4b6b6c034ce007991b9790b51824635cd6fb815bca251df0ddca5 WHIRLPOOL 1007752ec462d48b02f27a942ff85cf20e156dd5de2a2eb0848fe0e6b749b88fee7ee519e17fdc41f509b0a2387ca5f8671507b071996c54a43964a8ed7b2397
+MISC metadata.xml 384 SHA256 7634a3d5aca060298d77d31e2b9048b1e4e3c6be42c080f618d882a65f347232 SHA512 773287176f56f1a0f11edc6cd1ca85453f998ad8e58b1e608562335f814aab18124bfb850063dd4fa35aba525b776bf2c202d8afa6d4b51e354276678f324bd1 WHIRLPOOL b94fe41a178eba9f8fcfa6519a8de0e091b14fe3157d3e6c9b7260a069915f10bc66c314e62062e4d5047978944a30c3a978d9f9e08b94a7607a4755530df5e9
diff --git a/sys-apps/cracklib-words/cracklib-words-2.9.6.ebuild b/sys-apps/cracklib-words/cracklib-words-2.9.6.ebuild
new file mode 100644
index 000000000000..22827d64ad24
--- /dev/null
+++ b/sys-apps/cracklib-words/cracklib-words-2.9.6.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="large set of crack/cracklib dictionaries"
+HOMEPAGE="https://github.com/cracklib/cracklib/"
+SRC_URI="https://github.com/cracklib/cracklib/releases/download/${P/-words}/${P}.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}
+
+src_install() {
+ insinto /usr/share/dict
+ newins ${P} ${PN}
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = "/" ] && create-cracklib-dict -h >&/dev/null ; then
+ ebegin "Regenerating cracklib dictionary"
+ create-cracklib-dict /usr/share/dict/* >/dev/null
+ eend $?
+ fi
+}
diff --git a/sys-apps/cracklib-words/cracklib-words-20080507.ebuild b/sys-apps/cracklib-words/cracklib-words-20080507.ebuild
new file mode 100644
index 000000000000..4223618cd7cd
--- /dev/null
+++ b/sys-apps/cracklib-words/cracklib-words-20080507.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="large set of crack/cracklib dictionaries"
+HOMEPAGE="https://sourceforge.net/projects/cracklib"
+SRC_URI="mirror://sourceforge/cracklib/${P}.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+src_install() {
+ insinto /usr/share/dict
+ newins ${P} ${PN} || die
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = "/" ] && type create-cracklib-dict >/dev/null ; then
+ ebegin "Regenerating cracklib dictionary"
+ create-cracklib-dict /usr/share/dict/* > /dev/null
+ eend $?
+ fi
+}
diff --git a/sys-apps/cracklib-words/metadata.xml b/sys-apps/cracklib-words/metadata.xml
new file mode 100644
index 000000000000..0bd584bf7040
--- /dev/null
+++ b/sys-apps/cracklib-words/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">cracklib</remote-id>
+ <remote-id type="github">cracklib/cracklib</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/crazydiskinfo/Manifest b/sys-apps/crazydiskinfo/Manifest
new file mode 100644
index 000000000000..e4443abe0298
--- /dev/null
+++ b/sys-apps/crazydiskinfo/Manifest
@@ -0,0 +1,3 @@
+DIST crazydiskinfo-1.0.2.tar.gz 4675 SHA256 828165463a566b1736c5d94cfe8e0036085b99cefee65191fcba770156d9a2bd SHA512 7ba835aa970a9247ea8dc4339d3d28ffaf24e4e5150d3c6b4e5b9236d905807d3a3970a3951bdb3c6736285259cbe35360821488a6997ff800115767065d3864 WHIRLPOOL e41199ca04be380f8756103dc9fde64fe9f59c9c5d5b65f6f88b0791d006ad76b1148154e1b8949fca6bbeecb6107907b1e5f5d528541d197553ad2018d7d830
+EBUILD crazydiskinfo-1.0.2.ebuild 446 SHA256 c0ddcf75c38ed50f379b0aa024aef2d0e4fee133ada1576fe59e2f8a4d5ca8f0 SHA512 fe540a2d70746747db85dee95af6eaf2f76492dfbf6ce450d2467a53119c2b9bea1fe4041f193b0229f5284fb7f5a83f2d82a94fa3f4308e2dada4648e040b31 WHIRLPOOL 75a615d77148bbe13d9c9f59ad5b8c9defb7b5ff26e8455dcea2e7699a4e7455287d2fd234f1323404e0cb61a163154ef1a9fe68e452fcc669bb507727144d5a
+MISC metadata.xml 337 SHA256 4cdada42d243bfff7950b844c48d7519e3d6fd4dc33238b348b7314bff6efa46 SHA512 ab01ee7de306762e116bc7ca43f4b229b0b1ab28e608a4cb7a1b866f167025aebb9455e90ebce01120bbd6254eb372d3e0df2a783c4378da488a769ed1a64650 WHIRLPOOL 9a3e899e31058813d19dabff38180f547fe11d574fea51a1dbaebda5ce5467bb3129ce3ddbb49dd80c489d7f17beeead9aa14b1676299ce97c6267073b9aea25
diff --git a/sys-apps/crazydiskinfo/crazydiskinfo-1.0.2.ebuild b/sys-apps/crazydiskinfo/crazydiskinfo-1.0.2.ebuild
new file mode 100644
index 000000000000..98417cbaf3ac
--- /dev/null
+++ b/sys-apps/crazydiskinfo/crazydiskinfo-1.0.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Interactive TUI S.M.A.R.T viewer"
+HOMEPAGE="https://github.com/otakuto/crazydiskinfo"
+SRC_URI="https://github.com/otakuto/crazydiskinfo/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ dev-libs/libatasmart:0=
+ sys-libs/ncurses:0="
+
+RDEPEND="$DEPEND"
diff --git a/sys-apps/crazydiskinfo/metadata.xml b/sys-apps/crazydiskinfo/metadata.xml
new file mode 100644
index 000000000000..cb75991bdac4
--- /dev/null
+++ b/sys-apps/crazydiskinfo/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 type="person">
+ <email>monsieurp@gentoo.org</email>
+ <name>Patrice Clement</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">otakuto/crazydiskinfo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/daemonize/Manifest b/sys-apps/daemonize/Manifest
new file mode 100644
index 000000000000..d716887cc943
--- /dev/null
+++ b/sys-apps/daemonize/Manifest
@@ -0,0 +1,9 @@
+DIST daemonize-1.7.4.tar.gz 66005 SHA256 e80bb9299b76b6d7b3bc235b2413961e138e586d777385dcf6cf478cea135525 SHA512 aa5dd1d89650fc4a7e783163852de176877b0e999c4d16950a03a81c0db1477e2994fe8d97d8e2bd61baafb7810522754eade96f3ff0301c1e6ce74f9252d34e WHIRLPOOL 8a72762ec08db2f47686bd8bb2063b986f8379e888571eafdaefe8b2e3e41df979474faa4ebc0f8701f85f2fa73ab805c3b61f88537c71673b52f731436cb3c3
+DIST daemonize-1.7.5.tar.gz 65817 SHA256 11f45bca9a7dd0a72a0059429eaf4f76913659f4c197479f7cdc81d110e7a798 SHA512 8e1c7cf47a2026d13505c83c5987ea7237226e104dd5fdd4d57d006000846b387216b2506604f60c6178a7445493591254696dddbb334d89ee611954a65659ea WHIRLPOOL d0c7e239e962bb7c95e47e76ac183de7d87fd667d2b274e5863592377d7480a3571fd2383a5c70eef3cc349900ec5ee02eea684b3235f5e533f0ad74e98ce3d4
+DIST daemonize-1.7.6.tar.gz 65927 SHA256 b7e86ebb51eeeb9dc3ebd93ae805914801e6a2247e53e7201567eb84e3475c68 SHA512 e0276c504727004edf02f97d3295daca6c9990ae7130c536d388a967ee8711625308eb8ffdd989b6e3e25915038095f4a53b4cf051a6f2a2a397369ea99ab14c WHIRLPOOL 087dcfd90b6e344e94d294dda26c5b9179009aea37074c0b849e062d2646f18c11799f5704000a5715c0835d149ca84376b7746b60d15b523b1cf7a4b77a8634
+EBUILD daemonize-1.7.4.ebuild 593 SHA256 45e477f591b3a2b1f32a79826a4500d0e8e12de2c5fa4467c95ff6360dcfec20 SHA512 5df8000970f909dfb73200b254780a7598a1b08e262b6991ea2e1629a47f168c9307c4b09cac5bb8ed801b7a55057479e390bf36fb9d0e96a12a99576f053fa5 WHIRLPOOL d1c1eaa0fbf1125c04c46d830ec5b25a908b605863e36b92cbe16a87467d1fed0c1042af788adf2dc9ec7581a3f5aac69d5289e2a8f60df084d71899364dd1d8
+EBUILD daemonize-1.7.5.ebuild 595 SHA256 8a26c13e0e7c4e777025b36f7026d89cf9bd8e8d92de7584d894a1e9e5e4917b SHA512 6d347f37c42da231a73872a03b38ce1b51ed34097313d238e51b938a49b509efd568ec4c7c1aa258bd2224550adb4b100c51beacec179cd27fb135b4b15921ca WHIRLPOOL 5d9b7ff263b66eb09b2093de3e0357b06223a391a6911257abed94d0369439181ee6f114ad6b2631f5037f0e277e6527adf36e3116601b3fdb579f73ca73dd50
+EBUILD daemonize-1.7.6.ebuild 595 SHA256 61d13ed1799f58b32110854dc115b237332b2567b9252269a08e3982fed78892 SHA512 27a028624ad1b66c7ea110126801932a587b2ade1a42b6f2a45a95ee4ef5ffb43792c7f4db8e2648c085da0c2e7a3302fbbf2d0855be86917399028541af04d3 WHIRLPOOL 054ace72f91075ad9ad27896e1a772c487bb37360edc9535eb849f2eac4000bacd2d52460024121da0e615fbe270a0c6ae4c0eee454c8af3b3663b6a6a535022
+MISC ChangeLog 2768 SHA256 d35934729e64341e3e2ee3577aade76f9b291eb5f124e9ba99caad4d9bf5cb29 SHA512 5174cf5e370c19fea9d7baa90f4332a7c42f3f91ed294c2e3af2670f707cf44c9a624755a4ab88ead7e213a1b84b3160a763739a992349038b1e1eab7f162e63 WHIRLPOOL 5607242b2f1853b24f565eb0c53c32b1d622c4092b06cd8b644846e2c353e31331052fbf39c3752a7ac1240db56b2b08332fba908f38c419e14555faa15b2990
+MISC ChangeLog-2015 1476 SHA256 6a6f70aabee241a6ef9f9b6f2d3ffe4eb48b78ace5f33e35db96bf67d29b6313 SHA512 73062b4f832b8d6e663040177dc0bb4f6377f97d11f9f70871242550b0dae33d325d5b9ca2f47f677c3b74489d3f112b393b95f163fa2b94bba8677beaaa10ce WHIRLPOOL 332c8fa5b1d584b6be3d4b1b7cc68830cca866b0a13ffd771657ce5b00abd70c41e7a82d523f6b36c5e445c12e3cea4ef902cc33938e1a58b6e8ce40df3643cc
+MISC metadata.xml 328 SHA256 b2f18661a2f32a03b1b8ab74cb23f642d4c92e15f09fd1c00be69bbf2e93038c SHA512 8ba8f3238bb4a294e063b2d3899005d0b8fa72a9d8c9f979426737bb1475fcccdee1a7b5ccb69ce678a912eb24fe05f204d64eca73374a67ad53af0c8276873c WHIRLPOOL 05c71a2fa5b700a81ca02efe13841a0fb772cd06864e98cf3345193440a6ba987aaf78bec524417466f0dcbe83324a737140547602a7d18c436c341e3fc2fd47
diff --git a/sys-apps/daemonize/daemonize-1.7.4.ebuild b/sys-apps/daemonize/daemonize-1.7.4.ebuild
new file mode 100644
index 000000000000..e16637d6c333
--- /dev/null
+++ b/sys-apps/daemonize/daemonize-1.7.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Runs a command as a Unix daemon"
+HOMEPAGE="https://bmc.github.com/daemonize/"
+SRC_URI="https://github.com/bmc/${PN}/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DOCS=( README.md CHANGELOG.md )
+
+src_unpack() {
+ unpack ${A}
+ # Workaround commit suffix from github.
+ mv "${WORKDIR}"/bmc-${PN}-* "${S}" || die
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:\($(CC)\) $(CFLAGS) \(.*\.o\):\1 $(LDFLAGS) \2:' \
+ Makefile.in || die
+}
diff --git a/sys-apps/daemonize/daemonize-1.7.5.ebuild b/sys-apps/daemonize/daemonize-1.7.5.ebuild
new file mode 100644
index 000000000000..65bf5f18250e
--- /dev/null
+++ b/sys-apps/daemonize/daemonize-1.7.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Runs a command as a Unix daemon"
+HOMEPAGE="https://bmc.github.com/daemonize/"
+SRC_URI="https://github.com/bmc/${PN}/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS=( README.md CHANGELOG.md )
+
+src_unpack() {
+ unpack ${A}
+ # Workaround commit suffix from github.
+ mv "${WORKDIR}"/bmc-${PN}-* "${S}" || die
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:\($(CC)\) $(CFLAGS) \(.*\.o\):\1 $(LDFLAGS) \2:' \
+ Makefile.in || die
+}
diff --git a/sys-apps/daemonize/daemonize-1.7.6.ebuild b/sys-apps/daemonize/daemonize-1.7.6.ebuild
new file mode 100644
index 000000000000..72704fcc0425
--- /dev/null
+++ b/sys-apps/daemonize/daemonize-1.7.6.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Runs a command as a Unix daemon"
+HOMEPAGE="https://bmc.github.com/daemonize/"
+SRC_URI="https://github.com/bmc/${PN}/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS=( README.md CHANGELOG.md )
+
+src_unpack() {
+ unpack ${A}
+ # Workaround commit suffix from github.
+ mv "${WORKDIR}"/bmc-${PN}-* "${S}" || die
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:\($(CC)\) $(CFLAGS) \(.*\.o\):\1 $(LDFLAGS) \2:' \
+ Makefile.in || die
+}
diff --git a/sys-apps/daemonize/metadata.xml b/sys-apps/daemonize/metadata.xml
new file mode 100644
index 000000000000..73ee0200507d
--- /dev/null
+++ b/sys-apps/daemonize/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 type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bmc/daemonize</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/daisydog/Manifest b/sys-apps/daisydog/Manifest
new file mode 100644
index 000000000000..441e8dc45d60
--- /dev/null
+++ b/sys-apps/daisydog/Manifest
@@ -0,0 +1,6 @@
+AUX daisydog.conf.d 115 SHA256 0cdadcfe27245cc0134b27405a3feeadd84631e828b2c453dc0957b1f03ff966 SHA512 81d9f238f4240d452e6316e0a94c489fc88eb3c8fe189958292a02dd0ce669bf957e614cd2864b7ccada8a174c94c6ee1cda7216e4fe96582a5cc266657710ea WHIRLPOOL 55d0737979a3f0f9a886f27500bbb797dad9d3e6d7db35557addee3717004c4cb3aec516cc78e385df5b53efd23d2c8da47345517bdd11af215d9ca9828655ee
+AUX daisydog.init.d 359 SHA256 6276299b8896e0449c788163e60e579fb2d0abdd1e994f37a2610714ed2ddd29 SHA512 ecb063e6fec9a463ac03977ac1a1d4f8ddb2864c6bd3ed3f041af70a797ca7bd3134c45aab99d42c136ffca4f00ce87f55df1fd42826fa92c1da75264d4389b1 WHIRLPOOL effd4f583a90bc348c0344c1d55a490f4c017c231d63a2274a74c3f6acdd70cab7238c805baa05317388caea756aded2cdcd0ac78e9044ed5d1a4ea936a0ad57
+DIST daisydog-3182aa85c087446e4358370549adc45db21ec124.tar.gz 10395 SHA256 b6185df3583e48e6b2cf16f6425aabe2dfdd94deaf8ac07f8dbd2c9a6f59809d SHA512 0a7312a3d9459487da8d20a80568187f51d4ae786939afbf38b8b89747831b2f7e0e32a3414b5d60863e33bcdebad9e457ff9a8f75143a7b60bf68fc9de17cd5 WHIRLPOOL a30263902a320e49f2d7c65669131476408f0b1d4eec3d5c2e5fbd3407417109184a4b25a5ac1b984b14cc7427fa3fc7b16559daa1da9d85b736a3b30a9721ff
+EBUILD daisydog-2014.05.30.ebuild 880 SHA256 90730bf0e54e4048cf9ba7ee0a8f4c1ac42c82b7f32ce4f6ea3692cbc40e0f75 SHA512 e80fe4a3279d88f78c00b779af7e7b361ba531e2061b7ba85d4e4f8aa0d478c068455d1f29ba120d69527305d3e39fe0507c3d8fdd7fe4a99c9f6d30307868b7 WHIRLPOOL 3a17b497f1cb1e332061ee72b7614e8cf77a0f657f9807bf81ab1ccc0c53c34984667bd72c7d176ec680cdf5bf88f8430ce31477eac37a4bbff7d4499c7daf09
+MISC ChangeLog 496 SHA256 067a68bc6918bdf6e501e3d6ae4118837797781d77808bd3701b20e895202a63 SHA512 ad642c85be39deb9aba1943aa624e5bf3f3d8abfb5d97e1c680ee0db33a3007464926ea91c625cff3e5a6456d7f4ec853ae248c69e62eee101e091ab5b3486a7 WHIRLPOOL 6918b45965ca1420ab83fef096904ea99ea3de0c4dee658b16d1091fd57d4efd186d1b19e18c7997e655d14b7b4c628ce2215aaa07368ba340d2bd7801fff0c1
+MISC metadata.xml 220 SHA256 8b7fa3a17e0058bf9e5c6ac8bf9329bfe9a2b0e5718d65b09711f8d421248504 SHA512 c262561324e85dc1fe18ceede654af3ae9f494b36233a807944dbbc7ac9764c93654d1faf958ef4c98c1fb370c71f5073443294289f43ddee0c76e606a703d32 WHIRLPOOL b4814ccae6bee1cea3e03b0df3e4a9e695289cc803bf0ed40166f3ba707ba2fa3a9b7fae0c621ba77c60bc1d729bdf002033072d86af66335b6e9cfef0bd3311
diff --git a/sys-apps/daisydog/daisydog-2014.05.30.ebuild b/sys-apps/daisydog/daisydog-2014.05.30.ebuild
new file mode 100644
index 000000000000..610bfeb4ebef
--- /dev/null
+++ b/sys-apps/daisydog/daisydog-2014.05.30.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs flag-o-matic
+
+GIT_SHA1="3182aa85c087446e4358370549adc45db21ec124"
+MY_P="${PN}-${GIT_SHA1}"
+
+DESCRIPTION="A very simple /dev/watchdog daemon"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/third_party/daisydog/+/master"
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz
+ https://chromium.googlesource.com/chromiumos/third_party/daisydog/+archive/${GIT_SHA1}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="static"
+
+S=${WORKDIR}
+
+src_configure() {
+ tc-export CC
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin daisydog
+ dodoc README.chromiumos
+
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}.init.d ${PN}
+}
diff --git a/sys-apps/daisydog/files/daisydog.conf.d b/sys-apps/daisydog/files/daisydog.conf.d
new file mode 100644
index 000000000000..05adc4531a22
--- /dev/null
+++ b/sys-apps/daisydog/files/daisydog.conf.d
@@ -0,0 +1,4 @@
+# /etc/conf.d/daisydog: config file for /etc/init.d/daisydog
+
+# for more info, see `daisydog -h`.
+WATCHDOG_OPTS=""
diff --git a/sys-apps/daisydog/files/daisydog.init.d b/sys-apps/daisydog/files/daisydog.init.d
new file mode 100755
index 000000000000..9513b7ef7578
--- /dev/null
+++ b/sys-apps/daisydog/files/daisydog.init.d
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/daisydog"
+command_args="${WATCHDOG_OPTS}"
+description="watchdog daemon to pet /dev/watchdog devices"
+start_stop_daemon_args="--make-pidfile --background --pidfile /run/daisydog.pid"
+
+depend() {
+ provide watchdog
+}
diff --git a/sys-apps/daisydog/metadata.xml b/sys-apps/daisydog/metadata.xml
new file mode 100644
index 000000000000..aebca33be179
--- /dev/null
+++ b/sys-apps/daisydog/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 type="project">
+ <email>base-system@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/darwin-miscutils/Manifest b/sys-apps/darwin-miscutils/Manifest
new file mode 100644
index 000000000000..e85c9e319f38
--- /dev/null
+++ b/sys-apps/darwin-miscutils/Manifest
@@ -0,0 +1,27 @@
+AUX darwin-miscutils-5-error.patch 269 SHA256 4870dfd866f6b9b7220682cfb2eee223fd13ac561d53fd691aa265c5b06769bd SHA512 169b592c4a1563489d5581fdd5fde1139c9384577b1e8e8d7f221b64835311ff927ec15f166686a6996115d135f7f2d7c35e0207387c203bb8fdc25525605e3a WHIRLPOOL 7e05fb59b108ad045119073ceeb581df3eace4618db1317e8ecc795d989c5b2a010db9105a7a279b9abd8428266a5280af858c43261fe53ad9aca1d6b0d3180a
+AUX darwin-miscutils-5-stdlib.patch 540 SHA256 6893425ca05712ad202922c9d183e053d98be3c3debcf491356d5d43bb6309db SHA512 b9ec8b65cc17da06a88fe7570be66682c8dadecd7af1ee6fe95b560340d9bf71516417338fef4ae99fca22069773f5baba499723e78d2b73f5eb5aa5e2eb7463 WHIRLPOOL dc976ac1faeeaef486c3d7e3d318047b5d4bd7f53d3cb4a5e376506af3dc7e8377e6ed361f4cfe3721c610a800e7490a4e8022ce85caefedc2cf75fbb2e517e3
+AUX darwin-miscutils-5-w.patch 201 SHA256 42424190d253de8931bc3cde78aad2bd2fce695dc2998781e156c42121c2ab36 SHA512 5fa14a48c74d6b99b135b3c1c8135756a15f3bde9844f25408cabde9e752caee95e891fbb6ea71bdf428b68be0d41219dcaa660e8a936460fe8ab59fe44f7bc4 WHIRLPOOL 69b736f54598e85ef0db87bace0c3a0b874955ad9e629f9549d56774a6bec58bb13c56216a628908a4acdb1f994871ff560135176ace6d4003ce950901cca30a
+AUX darwin-miscutils-6-w64.patch 584 SHA256 a7b5e1e481704fe400fe29bf6d3d71ef8185505a3c20d6afc5f4f12eebc8eeb8 SHA512 590b2af77934a66e1e41b2e22440038991ab258854b690d29527b84a06f0ffe1c19d5ff9022f024796c9cec84fefb80afc098749033dfd60ccda337f0059ce40 WHIRLPOOL d588811786f346f3fc1a3ad9b98e4a56a12a785c9d27ab927b8ccbebb03c548b2dc34c2f632d13bd3d3217f125e8516d593221d06d98c0f505d2a2f85f07ccad
+DIST adv_cmds-md-147.1 3623 SHA256 6283a00e52ef6d278afb1fa4d0e8bc7bce8bebff3e6b3da71812fcfdb415592f SHA512 459beb2b7c92b8718c76d744bbabf631bf8c329feb65c9434ce8a023c73ceac2d207c95e39c4b90b095a4724a74096a3d1bed9122883eb54e5311dfc64ffc718 WHIRLPOOL 79ebe5d5a73443665ba8804ff8867f1ad045d8b5df104b1396f00ca8ba4819d1e82ae5b31dffbf26d648748f8bccf5e01be5aba553d7955bbde13cc04be6104b
+DIST adv_cmds-md-147.c 25945 SHA256 089a4ad849da2c1a2b23fbc18dbc6860b26a367f528972d99ea361245a06c882 SHA512 93e70f7d8697652b5a3c661975d21b51545d2eb07de64fd40524fcf0d5016dae9ae1dc63c4a85cb5ad455c8d1c246b7f5f2eac38226dcefbf4cab12b0b1c7592 WHIRLPOOL 4299250fe3d0b475798d139fffcb83e17ab88283099a4d6d0669ee86e58b861b3a5409535aa9310d6729f086334a7a0d703df5b5d81b8816933fb67b6152df89
+DIST developer_cmds-49.tar.gz 307753 SHA256 db0f2611c8efb0ec781cb8f03878958c589c8953ba9002e051afa4fc3bb6a762 SHA512 3750374c891f6d681829986291d887cacf2c5b1c7a5de94f12c92ded0b3456157b85e57653c6061526d1f6626a7be8a9e6db9c1df09e2bb3e40c7fa20b9b4103 WHIRLPOOL f167e2a95ab2f8325130fe3f418771d9aee09e268e9649bf6230601586ec41d940c52fb4a02b938a30d5059541eccf20845044ef07bef64afdbd5635c15e2073
+DIST developer_cmds-53.1.tar.gz 139637 SHA256 f3f6cc44336fae506a5c7ca1e71aeaa00da89b4337298fcd4d13953bbfa6edb8 SHA512 ac15b499d0642332e8deae2f498e5ffb0c64502e2d877bbdfe0fac4118e17fe525b169f3b015cfe8c9f40e2688bd30df4b050fe50eaa706b21a2e62ca9dd4b80 WHIRLPOOL ee747b3f8c56091f77735c2a59e0ef3d9486b5af32c44c2ed382324bf71e7f29f7ac9c8426247f7fdfa63a667acca99f6af1fcc29548fdd73b51706ba41e923e
+DIST developer_cmds-55.tar.gz 139664 SHA256 1760a430552057304ecc2c20bb0acd3683a3a0325f29a1e27065818d2515e91a SHA512 062e4c4a2b1ba4cffe7e850d07f4351c736988958450735f9f653936d64defa3347c9dac7b5fea3dcd25f8efe076133dc9ac3edb4a3e512387d6842bd177c35e WHIRLPOOL cae216847b8e6075fa8051d6d260cc91fff259f81717d19a988ada30e42c8b9728b6ce3330cbcef403639fbf5c52230d20a2272bc1154f3bcf18e3c3f4123ac7
+DIST developer_cmds-63.tar.gz 110662 SHA256 d4bc4a4b1045377f814da08fba8b7bfcd515ef1faec12bbb694de7defe9a5c0d SHA512 4f672835f0290feaf54c7c268b31774282325448f30c02e4f12ead84c41e15083784fac4c9c4916c098953bc61aa8f29bea24a7b51312428aa87448595be50a1 WHIRLPOOL 0b4835a8d3b97817baed0d78b5f636b6dafdd31874838e792764373a91026bda44241daf3e575db659bf14434654e763832bb85864972e98d19d52c5c89e5b6c
+DIST misc_cmds-23.tar.gz 114747 SHA256 150c74e3041db4cb02b1aabddfedb998c152bfba616ed6e24b2b98d025fef785 SHA512 0e02a939c308f4483cf11cb8b21face84f442589e3774b1827ed0ab5064ee2b433a4468ac634051fa0817919f5d39ac1ed56c67b1f5b011b83388a3806ed33c8 WHIRLPOOL 586a091fc6ead5c5398a05e3af1137cf67314e458cb44dc0f60a2099e65f53e4b569dd045c17e0f455f1cc0b4248c94b358cb5b08cf54033dc883f356a058d49
+DIST misc_cmds-27.tar.gz 116351 SHA256 29d1b32dfceaa3364e81d50e10b8ce7721448cb0c8218ecb90491666a00efca4 SHA512 594560b179f7dafc651d3a336d33bcb7075f2199cf4964e95d63164faf19bd50ef3a6095124f0e4f91c50d1bceeb831fcd81ceecf740e2696a8e7445c1a690d2 WHIRLPOOL 6bca894b7ab1c7de9b3453e075060ec4bd35019713641c9527dd562f253eda0cc35f3b9b631bd197c3fc38ffda575701843671e3fae263fa4655455e80e73cd2
+DIST misc_cmds-31.tar.gz 121187 SHA256 1e0cdf2af9b28245af40168fc48e010e260b62fd48ddbcb95e62851d2765f37c SHA512 d49bb8a49c23aa7efaa7db1958676390b4d5ef1b2e57f80b0bea0f10b8b29a6c3ec6d2d7a1248d3af77d382c5113fb3cbf9d3632ca92bb51c01d8c286fd9f25f WHIRLPOOL 1b3d060418ccf353d975696cd7d19354ca2b0b8795f91e185cc467fc2e9fa7683a20e6ce6e70109310e8cfff69b027efbf6e25c159e41102d62bffc36b2754d5
+DIST misc_cmds-33.tar.gz 123114 SHA256 a65ea0149f09640576cafce07f6acac8135391ebf6647ac31cf3c11e211bf58a SHA512 34957adaebe4ce1569464a466e13aaaa6a567c582b784b99dd260c891a417d37a0297bf11acc9eb16dfabed18f42480058ae726e0a56b7d98ed93b59f75a5644 WHIRLPOOL e4fdcebca12844d4e144dc2f4125ac10528d7f1f75150bd5a23659690545713b590fd62a42d7a49fbbf0de2c3b59618482119d6d3bfebefe69d934db2ff3a2c8
+DIST shell_cmds-118.tar.gz 162145 SHA256 c4628a25407d940717f3e062e48e31bf3de2ce07e006bf909d69f927af92adb4 SHA512 efce064b76087451293a6992b7946fb0811856275796efa9e1e30459edf9eb0462929a1f0d28d189bf7e85fdde4d9e80b8637d042497b1e6e9216c8888d0d57b WHIRLPOOL a1d66933d390a305ea0351e2279cb7c2e7c0d3460fd0e66c642caffa730a7becb51cdc1552f7d024df657c14b53a72426373508259fd57a8f30f3f31d4c18df6
+DIST shell_cmds-149.tar.gz 173740 SHA256 87263d7fc8626da3e12f8ebae458293da7c4b12a0ce591dcf93b638e6519ff43 SHA512 e0f87db828c994bad73e4340f1957378ce5c84419172ed1d6b9d63809b90edfa447cce658e715565c5c2a7d2eaf0a9ee75e24fdb6d86080063621e0f83eb2a77 WHIRLPOOL 191e6852f34efe0390348aca7d2276042c68e04f20e2ccf2eb71e230e0d552ffddbb3a49b34b031d0b41aa941bcd0283305c75dc0bab1dc05a3266437f0a5103
+DIST shell_cmds-162.tar.gz 179189 SHA256 42d5ad4fbcaca83620a3ab709a41b21a18224589c844c716223489418e04e3d6 SHA512 784b6b8b3a90967d79f5a60a23e7f31f7bc92712dac9cdb625770f92b58bd6902669aa19bb59997cc654fcc0e27ddd45f60b1990e7da95d0e6c90fd7f2434f95 WHIRLPOOL cd06c734a1f1ba1169ed72ec99f8072dd0e7b608ad0764857873622c6ea0d9a99fdabd6b2ef2fc87f036dbe34e2caebfd5c6927e2440cb35375ea9c77e40c44e
+DIST shell_cmds-170.tar.gz 212954 SHA256 3f2849de051ae51e7b6cec56d90443f9168a9f9a7b9002cb4b51ece9a817b81c SHA512 b267a9b5e922c9952451ca05e5f9e328504dc46b5776e1a8405f8e41a604d7f184d70742cb6fa6646875bc1789082097c74eabcc151ac5568ba26ed858269ce7 WHIRLPOOL c036eba542fdf07843cd9ef9e781db379c90e95264918596c71f99cff2547ac877e5c3619b53d25e65e0c67a0fb42a3d32755efc6d9f4235b7d714e90047d8b5
+DIST shell_cmds-198.tar.gz 411088 SHA256 70404d7b51b4de6ed5ec0e02d52bd5a41f17e23a624dad162615625884a5238d SHA512 6e3a43f0cd9b1e3799d1ba79f4fcc4c3bb9be178c35cba2bef9227ecc259ca52c39b4d0e39c71d9af689e07f48dbeee6806bd623286f116f7d3ee3889dc7c71f WHIRLPOOL f84ba1cb0b21897faa5dd3c2674649ea3686c73557b894af478c9460bf29d2f548488a699ec8bbdb8154c031d5067f44d1ebdf87c77e75935e507a1a101a63f7
+EBUILD darwin-miscutils-10.ebuild 4802 SHA256 67bb0b809e115df7dc970dd9dd1f110764370d3b2656856c0e62f2339e852131 SHA512 ee5c9e4938ae770bfb0610b2d5a31ee8d5c0cc3d5bf2f967bdd0ed8579baa0b12d0c99e5ac543ac23b07a7e5364b7eaac03a2b16984a9add99c15b72cf3c7175 WHIRLPOOL d26b9957af034b4383d63b68691ea1f169b4ac29077f0a7e14ec6f16408295342d72357d59720567c3daee6005ebeed4257546690f1f3b36f49f19659f95cbad
+EBUILD darwin-miscutils-11.ebuild 4730 SHA256 47e255c24e7c6e30e58017b0dd56f431f360ed99bd4ae74abb5856d606ad58e1 SHA512 c9e04da6422c370b04c8054ac2dcef573630a05d5ba21b39cab100f6dd30a43540fd03c9a3aff0e9aaac53fd1307b8130217925b8160c48527277c83e63e08ee WHIRLPOOL e762cf0bbb8054122f63a75e6b507c9174ff144591eeb413be2d270bf6f64e330aa4d03956c25bed8b798c0828b30e731743de0b4674c6b3ff36acc975888f12
+EBUILD darwin-miscutils-6-r1.ebuild 4255 SHA256 0bd87d1c7f6c60d86158a05a4366e5086abe6bb504a39a160048abde8076e004 SHA512 5bec5032b942963bd5652283c5914e2a6f5e4655951ac90ec680a042cc37576b3a47df969f54d4b5276bc799e1c516298e8a605d64e83e485703305384f75151 WHIRLPOOL 25806ac269a9a689558e34fd6ad3e2629804ad9075b6891c97630d424b49d76074b24c89de6b6a60a057dca6eb504995c25bd81cbf77c37992add1cf0bae70b2
+EBUILD darwin-miscutils-8.ebuild 4095 SHA256 5af638819ef713e3e293386490e7b6cee8923df50507843f05545e42a277c1b1 SHA512 748ca7f62e8f4cfca2ff19668a590b63268628cbbd6299e490b220356c0c854987fcca0ceb3b65b2c1fbc545b07bc275c448ab87a1fb15c2cd591baf6f9d17f7 WHIRLPOOL b223e7cf422308fddbc2c8ac02c17d597c2cc96c2edc214168af31a9bff86e4c1c5948d79d43a7a06e7c98a25ccfcf464ca0bdca0e2a7c7f9977bdf5507133dd
+EBUILD darwin-miscutils-9.ebuild 3955 SHA256 de07bd8fd229b180266aa35a915aa64fab21ee3bbec7bc7a5eb6833a8c381ce8 SHA512 de3a869b5880c39d82bfbcaf8b61591324ca10efd0be1e884933ba75b19d61a8670e23c5163389406a1a9c3b6db9b8ee0550a63394dd6c35c5c658295211c60c WHIRLPOOL 68732808f787a89b65c4a52c6f8d77eb4031d4b4b22b65eb92c79051dd8218c343aae7729f4773ca9296fc15e9eb88c0aa4234d907f87a1ea79ee9ceb38671e1
+MISC ChangeLog 2999 SHA256 29437dd488363a51ff5c9a4e574fe02d61548adf838dd8f1ca996c16ab3b37c4 SHA512 9cccfce77a03d4f88869b0dd4b448c057fda4b70e1dbdcf2cf8162aff95385ffcb8ae558c88df344ab749fd89855f9eded41e91ba0a205fb7f6e4c0ca96363ff WHIRLPOOL afea1049809e883d1726cb259f9e4388092f172eb21eeb203b8ca0cdb5d5e67629dc4d903fc2171ee5971b33510406ce2290d3460820d5a91e8d950ef1d5b55d
+MISC ChangeLog-2015 3389 SHA256 8537994625d6aebf6142f73f4c263f1b72b9affa4c13c2d24319ced337277672 SHA512 419a9d303bf25b0067909bf453e249873bdfc405357d66d0e812ab93a7ccef7583beb6bf18e02146f6f76f7930b33736034a9421b3f48cf93a2a9aaa94f7a449 WHIRLPOOL b5eaa32132952d39710428154c19782abcef280007657814b5d47cc28c1964e3afb233a6083f95a20f9491a943e2140db30e6ebe5596b002112fbd9b92396ef0
+MISC metadata.xml 247 SHA256 beb9a5395fe6fcde3c82e31b0cde4a75ea911efb59294b0419f76b71e4518366 SHA512 ae91bc559b2380b04af0bacbaf419deb042e9a9235c596c1afdbbb3933e59ba4f895c6e7ebf8fa4884702d5b39febedfdcce109ab912d6ef4f51b3696bc82c18 WHIRLPOOL b82c282b0539e6427a6d6dc1d6742794f922e0b6276dbc7acb805735d6654c79600eb6f650a9c1e36cd727a63d1f1655d728535082154a218c6fb40c01eb8fe0
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-10.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-10.ebuild
new file mode 100644
index 000000000000..67fe14641673
--- /dev/null
+++ b/sys-apps/darwin-miscutils/darwin-miscutils-10.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs eutils
+
+# from 10.8
+MISC_VER=31
+SHELL_VER=170
+# from 10.7.4
+DEV_VER=55
+MD_VER=147 # 148 in 10.8 has no md, bug #428530
+
+DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Mountain
+Lion 10.8"
+HOMEPAGE="http://www.opensource.apple.com/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz
+ http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.c?txt -> adv_cmds-md-${MD_VER}.c
+ http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.1?txt -> adv_cmds-md-${MD_VER}.1"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ cd "${S}"/shell_cmds-${SHELL_VER} || die
+ epatch "${FILESDIR}"/${PN}-6-w64.patch
+
+ mkdir -p "${S}"/adv_cmds-${MD_VER}/md || die
+ cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.c \
+ "${S}"/adv_cmds-${MD_VER}/md/md.c || die
+ cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.1 \
+ "${S}"/adv_cmds-${MD_VER}/md/md.1 || die
+
+ eapply_user
+}
+
+src_compile() {
+ local flags=(
+ ${CFLAGS}
+ -I.
+ -D__FBSDID=__RCSID
+ -Wsystem-headers
+ -Du_int=uint32_t
+ -include stdint.h
+ ${LDFLAGS}
+ )
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ # tsort is provided by coreutils
+ for t in leave units calendar; do
+ cd "${TS}/${t}"
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+ # compile cal separately
+ cd "${TS}/ncal"
+ echo "in ${TS}/ncal:"
+ echo "$(tc-getCC) ${flags[@]} -c calendar.c"
+ $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c easter.c"
+ $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c ncal.c"
+ $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
+ $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ # only pick those tools not provided by coreutils, findutils
+ for t in \
+ apply getopt hostname jot kill killall \
+ lastcomm renice script shlock time whereis;
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t} ${t}.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) ${flags[@]} -o ${t} ${t}.c || die "failed to compile $t"
+ done
+ cd "${TS}/w"
+ sed -i -e '/#include <libutil.h>/d' w.c || die
+ echo "in ${TS}/w:"
+ echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
+ $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
+ || die "failed to compile w"
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ # only pick those tools that do not conflict (no ctags and indent)
+ # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
+ # shell scripts
+ # don't install rpcgen, as it is heavily related to the OS it runs
+ # on (and this is the Snow Leopard version)
+ for t in asa hexdump unifdef what ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+
+ TS=${S}/adv_cmds-${MD_VER}
+ for t in md ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+}
+
+src_install() {
+ mkdir -p "${ED}"/bin
+ mkdir -p "${ED}"/usr/bin
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ for t in leave units calendar ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+ # copy cal separately
+ cp "${TS}/ncal/cal" "${ED}"/usr/bin/
+ dosym /usr/bin/cal /usr/bin/ncal
+ doman "${TS}/ncal/ncal.1"
+ dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ for t in \
+ apply getopt jot killall lastcomm \
+ renice script shlock time w whereis;
+ do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
+ [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
+ done
+ cp "${TS}/w/w" "${ED}"/usr/bin/uptime
+ doman "${TS}/w/uptime.1"
+ for t in hostname kill; do
+ cp "${TS}/${t}/${t}" "${ED}"/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ for t in asa hexdump unifdef what ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/adv_cmds-${MD_VER}
+ for t in md ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+}
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-11.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-11.ebuild
new file mode 100644
index 000000000000..82bea18938fe
--- /dev/null
+++ b/sys-apps/darwin-miscutils/darwin-miscutils-11.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+# from macOS 10.12
+MISC_VER=33
+SHELL_VER=198
+# from DT 8.1
+DEV_VER=63
+# from 10.7.4
+MD_VER=147 # 148 in 10.8 has no md, bug #428530
+
+DESCRIPTION="Miscellaneous commands used on macOS, Sierra 10.12"
+HOMEPAGE="https://www.opensource.apple.com/"
+SRC_URI="https://opensource.apple.com/tarballs/misc_cmds/misc_cmds-${MISC_VER}.tar.gz
+ https://opensource.apple.com/tarballs/shell_cmds/shell_cmds-${SHELL_VER}.tar.gz
+ https://opensource.apple.com/tarballs/developer_cmds/developer_cmds-${DEV_VER}.tar.gz
+ https://opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.c -> adv_cmds-md-${MD_VER}.c
+ https://opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.1 -> adv_cmds-md-${MD_VER}.1"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ cd "${S}"/shell_cmds-${SHELL_VER} || die
+ eapply "${FILESDIR}"/${PN}-6-w64.patch
+
+ mkdir -p "${S}"/adv_cmds-${MD_VER}/md || die
+ cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.c \
+ "${S}"/adv_cmds-${MD_VER}/md/md.c || die
+ cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.1 \
+ "${S}"/adv_cmds-${MD_VER}/md/md.1 || die
+
+ eapply_user
+}
+
+src_compile() {
+ local flags=(
+ ${CFLAGS}
+ -I.
+ -D__FBSDID=__RCSID
+ -Wsystem-headers
+ -Du_int=uint32_t
+ -include stdint.h
+ ${LDFLAGS}
+ )
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ # tsort is provided by coreutils
+ for t in leave units calendar; do
+ cd "${TS}/${t}"
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+ # compile cal separately
+ cd "${TS}/ncal"
+ echo "in ${TS}/ncal:"
+ echo "$(tc-getCC) ${flags[@]} -c calendar.c"
+ $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c easter.c"
+ $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c ncal.c"
+ $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
+ $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ # only pick those tools not provided by coreutils, findutils
+ for t in \
+ apply getopt hexdump hostname jot kill killall \
+ lastcomm renice script shlock time whereis;
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t} *.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+ cd "${TS}/w"
+ sed -i -e '/#include <libutil.h>/d' w.c || die
+ echo "in ${TS}/w:"
+ echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w *.c"
+ $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w *.c \
+ || die "failed to compile w"
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ # only pick those tools that do not conflict (no ctags and indent)
+ # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
+ # shell scripts
+ # don't install rpcgen, as it is heavily related to the OS it runs
+ # on (and this is the Sierra version)
+ for t in asa unifdef what ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+
+ # provide this one for gcc-apple
+ TS=${S}/adv_cmds-${MD_VER}
+ for t in md ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+}
+
+src_install() {
+ mkdir -p "${ED}"/bin
+ mkdir -p "${ED}"/usr/bin
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ for t in leave units calendar ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+ # copy cal separately
+ cp "${TS}/ncal/cal" "${ED}"/usr/bin/
+ dosym /usr/bin/cal /usr/bin/ncal
+ doman "${TS}/ncal/ncal.1"
+ dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ for t in \
+ apply getopt hexdump hostname jot killall lastcomm \
+ renice script shlock time w whereis;
+ do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
+ [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
+ done
+ cp "${TS}/w/w" "${ED}"/usr/bin/uptime
+ doman "${TS}/w/uptime.1"
+ for t in hostname kill; do
+ cp "${TS}/${t}/${t}" "${ED}"/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ for t in asa unifdef what ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/adv_cmds-${MD_VER}
+ for t in md ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+}
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-6-r1.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-6-r1.ebuild
new file mode 100644
index 000000000000..b0b7099617b7
--- /dev/null
+++ b/sys-apps/darwin-miscutils/darwin-miscutils-6-r1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs eutils
+
+MISC_VER=23
+SHELL_VER=118
+DEV_VER=49
+
+DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Leopard"
+HOMEPAGE="http://www.opensource.apple.com/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5-w.patch
+ epatch "${FILESDIR}"/${PN}-5-stdlib.patch
+ epatch "${FILESDIR}"/${PN}-6-w64.patch
+ cd "${S}"/developer_cmds-${DEV_VER}
+ epatch "${FILESDIR}"/${PN}-5-error.patch
+ # deal with OSX Lion and above
+ sed -i -e 's/getline/ugetline/g' unifdef/unifdef.c || die
+
+ eapply_user
+}
+
+src_compile() {
+ local TS=${S}/misc_cmds-${MISC_VER}
+ # tsort is provided by coreutils
+ for t in leave units calendar; do
+ cd "${TS}/${t}"
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) -o ${t}" *.c
+ $(tc-getCC) -o ${t} *.c || die "failed to compile $t"
+ done
+ # compile cal separately
+ cd "${TS}/ncal"
+ echo "in ${TS}/ncal:"
+ local flags
+ flags[0]=-I.
+ flags[1]=-D__FBSDID=__RCSID
+ flags[2]=-Wsystem-headers
+ echo "$(tc-getCC) ${flags[@]} -c calendar.c"
+ $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c easter.c"
+ $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c ncal.c"
+ $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
+ $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ # only pick those tools not provided by coreutils, findutils
+ for t in \
+ alias apply getopt hostname jot kill \
+ lastcomm renice shlock time whereis;
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) -o ${t} ${t}.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) -o ${t} ${t}.c || die "failed to compile $t"
+ done
+ # script and killall need additonal flags
+ for t in \
+ killall script
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) -D__FBSDID=__RCSID -o ${t} ${t}.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) -D__FBSDID=__RCSID -o ${t} ${t}.c || die "failed to compile $t"
+ done
+ cd "${TS}/w"
+ echo "in ${TS}/w:"
+ echo "$(tc-getCC) -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
+ $(tc-getCC) -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
+ || die "failed to compile w"
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ # only pick those tools that do not conflict (no ctags and indent)
+ # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
+ # shell scripts
+ # don't install rpcgen, as it is heavily related to the OS it runs
+ # on (and this is the Leopard version)
+ for t in asa error hexdump unifdef what ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}"
+ sed -i -e '/^__FBSDID/d' *.c
+ echo "$(tc-getCC) -o ${t}" *.c
+ $(tc-getCC) -o ${t} *.c || die "failed to compile $t"
+ done
+}
+
+src_install() {
+ mkdir -p "${ED}"/bin
+ mkdir -p "${ED}"/usr/bin
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ for t in leave units calendar ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+ # copy cal separately
+ cp "${TS}/ncal/cal" "${ED}"/usr/bin/
+ dosym /usr/bin/cal /usr/bin/ncal
+ doman "${TS}/ncal/ncal.1"
+ dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ for t in \
+ alias apply getopt jot killall lastcomm \
+ renice script shlock su time w whereis;
+ do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
+ [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
+ done
+ cp "${TS}/w/w" "${ED}"/usr/bin/uptime
+ doman "${TS}/w/uptime.1"
+ for t in hostname kill; do
+ cp "${TS}/${t}/${t}" "${ED}"/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ for t in asa error hexdump unifdef what ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+}
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-8.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-8.ebuild
new file mode 100644
index 000000000000..adbde8fb92e2
--- /dev/null
+++ b/sys-apps/darwin-miscutils/darwin-miscutils-8.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs eutils
+
+MISC_VER=27
+SHELL_VER=149
+DEV_VER=53.1
+
+DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Snow Leopard 10.6.3"
+HOMEPAGE="http://www.opensource.apple.com/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ cd "${S}"/shell_cmds-${SHELL_VER}
+ epatch "${FILESDIR}"/${PN}-6-w64.patch
+ # deal with OSX Lion and above
+ cd "${S}"/developer_cmds-${DEV_VER}
+ sed -i -e 's/getline/ugetline/g' unifdef/unifdef.c || die
+
+ eapply_user
+}
+
+src_compile() {
+ local flags=(
+ ${CFLAGS}
+ -I.
+ -D__FBSDID=__RCSID
+ -Wsystem-headers
+ -Du_int=uint32_t
+ -include stdint.h
+ ${LDFLAGS}
+ )
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ # tsort is provided by coreutils
+ for t in leave units calendar; do
+ cd "${TS}/${t}"
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+ # compile cal separately
+ cd "${TS}/ncal"
+ echo "in ${TS}/ncal:"
+ echo "$(tc-getCC) ${flags[@]} -c calendar.c"
+ $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c easter.c"
+ $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c ncal.c"
+ $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
+ $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ # only pick those tools not provided by coreutils, findutils
+ for t in \
+ alias apply getopt hostname jot kill killall \
+ lastcomm renice script shlock time whereis;
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t} ${t}.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) ${flags[@]} -o ${t} ${t}.c || die "failed to compile $t"
+ done
+ cd "${TS}/w"
+ sed -i -e '/#include <libutil.h>/d' w.c || die
+ echo "in ${TS}/w:"
+ echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
+ $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
+ || die "failed to compile w"
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ # only pick those tools that do not conflict (no ctags and indent)
+ # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
+ # shell scripts
+ # don't install rpcgen, as it is heavily related to the OS it runs
+ # on (and this is the Snow Leopard version)
+ for t in asa hexdump unifdef what ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+}
+
+src_install() {
+ mkdir -p "${ED}"/bin
+ mkdir -p "${ED}"/usr/bin
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ for t in leave units calendar ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+ # copy cal separately
+ cp "${TS}/ncal/cal" "${ED}"/usr/bin/
+ dosym /usr/bin/cal /usr/bin/ncal
+ doman "${TS}/ncal/ncal.1"
+ dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ for t in \
+ alias apply getopt jot killall lastcomm \
+ renice script shlock time w whereis;
+ do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
+ [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
+ done
+ cp "${TS}/w/w" "${ED}"/usr/bin/uptime
+ doman "${TS}/w/uptime.1"
+ for t in hostname kill; do
+ cp "${TS}/${t}/${t}" "${ED}"/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ for t in asa hexdump unifdef what ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+}
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-9.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-9.ebuild
new file mode 100644
index 000000000000..d0467ed79845
--- /dev/null
+++ b/sys-apps/darwin-miscutils/darwin-miscutils-9.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs eutils
+
+MISC_VER=31
+SHELL_VER=162
+DEV_VER=55
+
+DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Lion 10.7"
+HOMEPAGE="http://www.opensource.apple.com/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
+ http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ cd "${S}"/shell_cmds-${SHELL_VER}
+ epatch "${FILESDIR}"/${PN}-6-w64.patch
+
+ eapply_user
+}
+
+src_compile() {
+ local flags=(
+ ${CFLAGS}
+ -I.
+ -D__FBSDID=__RCSID
+ -Wsystem-headers
+ -Du_int=uint32_t
+ -include stdint.h
+ ${LDFLAGS}
+ )
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ # tsort is provided by coreutils
+ for t in leave units calendar; do
+ cd "${TS}/${t}"
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+ # compile cal separately
+ cd "${TS}/ncal"
+ echo "in ${TS}/ncal:"
+ echo "$(tc-getCC) ${flags[@]} -c calendar.c"
+ $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c easter.c"
+ $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -c ncal.c"
+ $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
+ echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
+ $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ # only pick those tools not provided by coreutils, findutils
+ for t in \
+ alias apply getopt hostname jot kill killall \
+ lastcomm renice script shlock time whereis;
+ do
+ echo "in ${TS}/${t}:"
+ echo "$(tc-getCC) ${flags[@]} -o ${t} ${t}.c"
+ cd "${TS}/${t}"
+ $(tc-getCC) ${flags[@]} -o ${t} ${t}.c || die "failed to compile $t"
+ done
+ cd "${TS}/w"
+ sed -i -e '/#include <libutil.h>/d' w.c || die
+ echo "in ${TS}/w:"
+ echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
+ $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
+ || die "failed to compile w"
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ # only pick those tools that do not conflict (no ctags and indent)
+ # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
+ # shell scripts
+ # don't install rpcgen, as it is heavily related to the OS it runs
+ # on (and this is the Snow Leopard version)
+ for t in asa hexdump unifdef what ; do
+ echo "in ${TS}/${t}:"
+ cd "${TS}/${t}" || die
+ echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
+ $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
+ done
+}
+
+src_install() {
+ mkdir -p "${ED}"/bin
+ mkdir -p "${ED}"/usr/bin
+
+ local TS=${S}/misc_cmds-${MISC_VER}
+ for t in leave units calendar ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+ # copy cal separately
+ cp "${TS}/ncal/cal" "${ED}"/usr/bin/
+ dosym /usr/bin/cal /usr/bin/ncal
+ doman "${TS}/ncal/ncal.1"
+ dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
+
+ TS=${S}/shell_cmds-${SHELL_VER}
+ for t in \
+ alias apply getopt jot killall lastcomm \
+ renice script shlock time w whereis;
+ do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
+ [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
+ done
+ cp "${TS}/w/w" "${ED}"/usr/bin/uptime
+ doman "${TS}/w/uptime.1"
+ for t in hostname kill; do
+ cp "${TS}/${t}/${t}" "${ED}"/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+
+ TS=${S}/developer_cmds-${DEV_VER}
+ for t in asa hexdump unifdef what ; do
+ cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
+ doman "${TS}/${t}/${t}.1"
+ done
+}
diff --git a/sys-apps/darwin-miscutils/files/darwin-miscutils-5-error.patch b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-error.patch
new file mode 100644
index 000000000000..391dceb39188
--- /dev/null
+++ b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-error.patch
@@ -0,0 +1,14 @@
+--- developer_cmds-48/error/error.h
++++ developer_cmds-48/error/error.h
+@@ -194,11 +194,7 @@
+ */
+ extern int nerrors;
+ extern Eptr er_head;
+-#ifdef __APPLE__
+-__private_extern__
+-#else
+ extern
+-#endif
+ Eptr *errors;
+ /*
+ * Resources for each of the files mentioned
diff --git a/sys-apps/darwin-miscutils/files/darwin-miscutils-5-stdlib.patch b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-stdlib.patch
new file mode 100644
index 000000000000..0605310bff42
--- /dev/null
+++ b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-stdlib.patch
@@ -0,0 +1,20 @@
+--- misc_cmds-23/leave/leave.c
++++ misc_cmds-23/leave/leave.c
+@@ -34,6 +34,7 @@
+ */
+
+ #include <sys/cdefs.h>
++#include <stdlib.h>
+ #ifndef lint
+ __COPYRIGHT("@(#) Copyright (c) 1980, 1988, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
+--- shell_cmds-118/alias/alias.c
++++ shell_cmds-118/alias/alias.c
+@@ -3,6 +3,7 @@
+ the shell scripts. It does not lead to any deliverable. Do not remove this
+ file from this (..../shell_cmds/alias) directory.
+ */
++#include <stdlib.h>
+ int main()
+ {
+ exit(0);
diff --git a/sys-apps/darwin-miscutils/files/darwin-miscutils-5-w.patch b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-w.patch
new file mode 100644
index 000000000000..f6db3753d930
--- /dev/null
+++ b/sys-apps/darwin-miscutils/files/darwin-miscutils-5-w.patch
@@ -0,0 +1,10 @@
+--- shell_cmds-118/w/w.c
++++ shell_cmds-118/w/w.c
+@@ -75,7 +75,6 @@
+ #include <kvm.h>
+ #endif
+ #include <langinfo.h>
+-#include <libutil.h>
+ #include <limits.h>
+ #include <locale.h>
+ #include <netdb.h>
diff --git a/sys-apps/darwin-miscutils/files/darwin-miscutils-6-w64.patch b/sys-apps/darwin-miscutils/files/darwin-miscutils-6-w64.patch
new file mode 100644
index 000000000000..77c194e6df9b
--- /dev/null
+++ b/sys-apps/darwin-miscutils/files/darwin-miscutils-6-w64.patch
@@ -0,0 +1,17 @@
+grobian@gentoo.org:
+The provided libresolv library is faulty for 64-bits, or this call is
+doing something wrong. It is highly undocumented, so it feels like
+messing around with some pointers is not going to work. Doing this in
+64-bits mode, at least results in a nice Bus Error.
+
+--- shell_cmds-118/w/w.c
++++ shell_cmds-118/w/w.c
+@@ -262,7 +262,7 @@
+ argc -= optind;
+ argv += optind;
+
+-#if !TARGET_OS_EMBEDDED
++#if !defined(TARGET_OS_EMBEDDED) && !defined(__LP64__)
+ if (!(_res.options & RES_INIT))
+ res_init();
+ _res.retrans = 2; /* resolver timeout to 2 seconds per try */
diff --git a/sys-apps/darwin-miscutils/metadata.xml b/sys-apps/darwin-miscutils/metadata.xml
new file mode 100644
index 000000000000..0c982d881307
--- /dev/null
+++ b/sys-apps/darwin-miscutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>prefix@gentoo.org</email>
+ <name>Gentoo Prefix</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dbus-broker/Manifest b/sys-apps/dbus-broker/Manifest
new file mode 100644
index 000000000000..ae8009673b21
--- /dev/null
+++ b/sys-apps/dbus-broker/Manifest
@@ -0,0 +1,8 @@
+DIST c-dvar-e1c94e3c3c42ca9bcb336ccd7c3693bcd330c6fc.tar.gz 28449 SHA256 9004cb8073292beddf6ad410ad029c447d2732a8f2cf5243b0b43538e5f70d33 SHA512 a752a5d8c67c97d672502e814c6930c60d9588f7f77f38a6d027dede71c11cb18e7debcf10fa2f405a117123af386944bb7cf70c90504aed874056c8de1fab05 WHIRLPOOL 2510dabf7273f68c78487cdd354be184181fbdecfc3a15dd32093cece56924c6c83bec2be569d27c2dbc30fd1f87dcd24b131b68c383cfe04a11f507d6cfb769
+DIST c-list-9e50b8b08e0b0b75e1c651d5aa4e3cf94368a574.tar.gz 20459 SHA256 5ed9fc0286507a08f4e4aeae436be45ee05d0c071c1d8418fa77ed777e2f5a25 SHA512 d45630c8a54ca9145862b673afc3a15a19d330f46c9a1eb451c2282c2701d596cead45e6bb57a9e32aab344a3732f70ff8fe27d13065ebd8b402dd37a252ad05 WHIRLPOOL 21fc689d1d7551bfc957e83630ad81b5093b8e67c3c754e2b4173681829f78835ef7fcc94f46c34f7379c21ebdb96ebc83cd50d4e816a25179c60274c9c0c2e0
+DIST c-rbtree-6181232360c9b517a6af3d82ebdbdce5fe36933a.tar.gz 24927 SHA256 5831113e793af5e583cc7844a8961b05ded70dc487877b64bbbf0fef0869c711 SHA512 4ff8d8def07882850b1983f8eb9b4c82e444429beafbf249385717805a5a89427bb91bde6dcfb60565866f90ee3daa8d35e681ab65cb0a1f20dcb96dcd9e0756 WHIRLPOOL 5c8d42a9601362197ba890bc056d46b3cf7f0a99dd07189fd2c1c037a339b58726e5929b7e22d0c960ad6ba380f134b2040fb32aa9da2a95fbe192d3c8f575e0
+DIST c-sundry-644ea3c2ce5b78d2433c111694f5d602d1aa7fa9.tar.gz 26611 SHA256 9ebf3f9e90004b7483d71bf41e2786586e0b192feb1d397536730b0d2304c7cc SHA512 503da82b8cea9eddffbea70ce05c8a6b2684a90a104f6df46a5183ab46844543db1d02e8aaabc4e5d50aa21e239af147309fa9abed5f13cb751bcee310c8234a WHIRLPOOL beff440ecfdff3d636710ab197d73cd628ba3615d6890540ea5014d0fcc318353f083b0d4885a88d3fef502c0fbf801fac7bacaaf0cb4939a7b4251b838309d9
+DIST dbus-broker-4.tar.gz 148231 SHA256 165fab697e0f9ef66588688758edb601c89b65ee3240d462cc278f0755c6e122 SHA512 d4c9974e730d0b6374edb2afb6f928f35e3912f7d5d7d908429581e235ebc013dbab1bd0f0c446547d2a960e762868e2d98ab1cd3ff5e1169240f3e6886236d8 WHIRLPOOL e25075a2cee78bc0be56267a9140a0392bf12ed69c23ea3a8f0b9f8abdc9f86581428a7dbcb8afffa9fba8f03e9b588f896e95ecd53a8317c51030cd94940192
+EBUILD dbus-broker-4.ebuild 1878 SHA256 9b9f020a5f8a76aa6cf85f1889ee74ea4d8ee9b2f021a3d34ba509ace5b871bd SHA512 ab9a8ba244c13c3e836675a841ebbbe2cceb0df0389f5ec2541f04464bce0f74beb31f5eb033e7df7bf918091bc66cf9195e315e7a35d6f4411729c3979eaac3 WHIRLPOOL c80aeb18dea1e256f676df572f189c21b26a82510918105796c91ff4810c036d6003f9655ae431f4b8ea784c9ec22fdc2f02193781c2a49bf140b4dd448b20f9
+EBUILD dbus-broker-9999.ebuild 1878 SHA256 9b9f020a5f8a76aa6cf85f1889ee74ea4d8ee9b2f021a3d34ba509ace5b871bd SHA512 ab9a8ba244c13c3e836675a841ebbbe2cceb0df0389f5ec2541f04464bce0f74beb31f5eb033e7df7bf918091bc66cf9195e315e7a35d6f4411729c3979eaac3 WHIRLPOOL c80aeb18dea1e256f676df572f189c21b26a82510918105796c91ff4810c036d6003f9655ae431f4b8ea784c9ec22fdc2f02193781c2a49bf140b4dd448b20f9
+MISC metadata.xml 327 SHA256 555a246c137ae0586dc4f3be05f103eba8415e7cd8aafe2336c5b9b659493d8e SHA512 b350af1c8be6e227fb301fca4dc1d6c90a8ceaf1e4cbf3d83ea54a302a15baa9df560d9b728a66be843b3eb679fa9536ca2f531776ee5d09753233148a0cabe1 WHIRLPOOL 6de0c19b78e79898cd78488c3f9d780f26684dea03924ce8efcd532ddf25cc5e1e82477d2069fd0c53f796ce46d0a1348e4a2128dfca0b764102fab35937404c
diff --git a/sys-apps/dbus-broker/dbus-broker-4.ebuild b/sys-apps/dbus-broker/dbus-broker-4.ebuild
new file mode 100644
index 000000000000..a71009e17e72
--- /dev/null
+++ b/sys-apps/dbus-broker/dbus-broker-4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit meson
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/bus1/dbus-broker.git"
+else
+ dvar=e1c94e3c3c42ca9bcb336ccd7c3693bcd330c6fc
+ list=9e50b8b08e0b0b75e1c651d5aa4e3cf94368a574
+ rbtree=6181232360c9b517a6af3d82ebdbdce5fe36933a
+ sundry=644ea3c2ce5b78d2433c111694f5d602d1aa7fa9
+ SRC_URI="https://github.com/bus1/dbus-broker/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/c-util/c-dvar/archive/${dvar}.tar.gz -> c-dvar-${dvar}.tar.gz
+ https://github.com/c-util/c-list/archive/${list}.tar.gz -> c-list-${list}.tar.gz
+ https://github.com/c-util/c-rbtree/archive/${rbtree}.tar.gz -> c-rbtree-${rbtree}.tar.gz
+ https://github.com/c-util/c-sundry/archive/${sundry}.tar.gz -> c-sundry-${sundry}.tar.gz
+ "
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Linux D-Bus Message Broker"
+HOMEPAGE="https://github.com/bus1/dbus-broker/wiki"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="audit +launcher selinux test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ audit? ( sys-process/audit )
+ launcher? (
+ >=dev-libs/expat-2.2
+ >=dev-libs/glib-2.50:2
+ >=sys-apps/systemd-230
+ )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( >=sys-apps/dbus-1.10 )
+"
+
+src_prepare() {
+ default
+ if [[ ${PV} != 9999 ]]; then
+ rmdir subprojects/{c-dvar,c-list,c-rbtree,c-sundry} || die
+ ln -s "${WORKDIR}/c-dvar-${dvar}" subprojects/c-dvar || die
+ ln -s "${WORKDIR}/c-list-${list}" subprojects/c-list || die
+ ln -s "${WORKDIR}/c-rbtree-${rbtree}" subprojects/c-rbtree || die
+ ln -s "${WORKDIR}/c-sundry-${sundry}" subprojects/c-sundry || die
+ fi
+}
+
+src_configure() {
+ local emesonargs=(
+ -D audit=$(usex audit true false)
+ -D launcher=$(usex launcher true false)
+ -D selinux=$(usex selinux true false)
+ )
+ meson_src_configure
+}
diff --git a/sys-apps/dbus-broker/dbus-broker-9999.ebuild b/sys-apps/dbus-broker/dbus-broker-9999.ebuild
new file mode 100644
index 000000000000..a71009e17e72
--- /dev/null
+++ b/sys-apps/dbus-broker/dbus-broker-9999.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit meson
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/bus1/dbus-broker.git"
+else
+ dvar=e1c94e3c3c42ca9bcb336ccd7c3693bcd330c6fc
+ list=9e50b8b08e0b0b75e1c651d5aa4e3cf94368a574
+ rbtree=6181232360c9b517a6af3d82ebdbdce5fe36933a
+ sundry=644ea3c2ce5b78d2433c111694f5d602d1aa7fa9
+ SRC_URI="https://github.com/bus1/dbus-broker/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/c-util/c-dvar/archive/${dvar}.tar.gz -> c-dvar-${dvar}.tar.gz
+ https://github.com/c-util/c-list/archive/${list}.tar.gz -> c-list-${list}.tar.gz
+ https://github.com/c-util/c-rbtree/archive/${rbtree}.tar.gz -> c-rbtree-${rbtree}.tar.gz
+ https://github.com/c-util/c-sundry/archive/${sundry}.tar.gz -> c-sundry-${sundry}.tar.gz
+ "
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Linux D-Bus Message Broker"
+HOMEPAGE="https://github.com/bus1/dbus-broker/wiki"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="audit +launcher selinux test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ audit? ( sys-process/audit )
+ launcher? (
+ >=dev-libs/expat-2.2
+ >=dev-libs/glib-2.50:2
+ >=sys-apps/systemd-230
+ )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( >=sys-apps/dbus-1.10 )
+"
+
+src_prepare() {
+ default
+ if [[ ${PV} != 9999 ]]; then
+ rmdir subprojects/{c-dvar,c-list,c-rbtree,c-sundry} || die
+ ln -s "${WORKDIR}/c-dvar-${dvar}" subprojects/c-dvar || die
+ ln -s "${WORKDIR}/c-list-${list}" subprojects/c-list || die
+ ln -s "${WORKDIR}/c-rbtree-${rbtree}" subprojects/c-rbtree || die
+ ln -s "${WORKDIR}/c-sundry-${sundry}" subprojects/c-sundry || die
+ fi
+}
+
+src_configure() {
+ local emesonargs=(
+ -D audit=$(usex audit true false)
+ -D launcher=$(usex launcher true false)
+ -D selinux=$(usex selinux true false)
+ )
+ meson_src_configure
+}
diff --git a/sys-apps/dbus-broker/metadata.xml b/sys-apps/dbus-broker/metadata.xml
new file mode 100644
index 000000000000..70b5bc00f437
--- /dev/null
+++ b/sys-apps/dbus-broker/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 type="person">
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="launcher">dbus-daemon compatibility launcher</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
new file mode 100644
index 000000000000..4f0a0e5ceed2
--- /dev/null
+++ b/sys-apps/dbus/Manifest
@@ -0,0 +1,12 @@
+AUX 80-dbus 341 SHA256 76ce25ce8769cdfcb0d7b7e52e5a7e6474448fc34e8ad9393afac1eca1e07fd2 SHA512 fa019d903e5412d0c47dade4299995e9baa8b86d74ebc0b42967137762bc476628af57f8a6c354660fce731c33a49a66027cd8b5a25be4d898b7d1662c600e89 WHIRLPOOL 74e9e79b86fc4802f34737bb47c3a71919f35fb2375119cdcd7fd6dae2de201e006fb4e6a978addd2300f7075180d4b088a69fa60d2ce4d689b6239b4a1307b1
+AUX dbus-enable-elogind.patch 2801 SHA256 faffcaa5b295f49fcedeed2c9ece5298949096be3062fd99a4bf1a6ac3ad1ea0 SHA512 84c5eacc9c305ce1fa9f7a50407b7e836a20c679273cef06004ff57665c27818d2c33e0cfa9ea91ae89c50da4f7b9a92077e607f0f17b9300892d16e881a7d9a WHIRLPOOL 728386f60ca307cfaad68096358f619936e0b73d9bf368d7473d154178b5ede5fc0c56581a63e21d253a44ed3e4aa6503d5e16a838931f8ba7944486aa85ee15
+AUX dbus.initd-r1 852 SHA256 00a1a8f254d4f40b6f98a2777809b9c45ad81c4aeb4c0592793dd839777990bd SHA512 e5a884269b777b4cfe889dde2bf1f2a6ea8eb68ef044668887946a95960342283386815adedd116d2d668be51ba229714a5a5ec49a2cc1a813f384fc899e30c9 WHIRLPOOL 80e47f97e3d7811725115cc259f04308ac8aae3a6f7dc3c7205e03fa68a84a32ebe12f46d19991d40b4cc4b5a65d999391a7db2bcb8b9209239c515872dc0e4f
+DIST dbus-1.10.18.tar.gz 1986589 SHA256 6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a SHA512 726f97d0a2016f4f0625ba332e93e2d33bb16857cd35cb6c79da0f44fff297df948c3df62c31ffbec34713a7b85b3ff5b65f31517fe3511ddbd3bf18bd4748ed WHIRLPOOL ee164e1f6de80595fbfbcbad65d78dab4b91b5ec4e1ce88e1c4015f1c1b531f09796d54db163b2c2eceb3b92261f8a57852d2e0b29f71d9c65f9b91684433d9e
+DIST dbus-1.10.22.tar.gz 1989350 SHA256 e2b1401e3eedc7b5c9a2034d31254c886e1fcbc7858006e0a1c59158fe4b7b97 SHA512 c5c0040717ecef66b788c5bcda94463c079502b5004639b3c1e93bb92b4de5d9be8b3fe43e18843f1d9e50411f742ba8a869375b57d479882f8aee46b613c545 WHIRLPOOL efc4a6efc78ac5ce3ba34b512ef4d74fb5f3cda563b4dcead1baf4f2d77d578fb54e8f9e69c1aa6ddf5f776bc050be69f1086428f293c0032f47acbaf66669eb
+DIST dbus-1.10.24.tar.gz 1991358 SHA256 71184eb27638e224579ffa998e88f01d0f1fef17a7811406e53350735eaecd1b SHA512 fc0b88b756affdb4fc7a62e84a6f7757121293afeadc38acf8aac48b6c2b82531e136a575be2ab503a39d7669cb7b609a021e20c1064e28c965c091e94c4f68c WHIRLPOOL a155789d60ee4d92defbf0952310d92f8ed5b51fc9c41d1c0df4e6fbebed363d8a6c526bd9c4a136a4e1c1d2eb3cd00fdfd7bfdceb8defe4b589f4cd9d90489d
+EBUILD dbus-1.10.18.ebuild 7511 SHA256 a91cb39f5704feb7497545c4d770e612c968ceb78936a97aef580c8d600c6778 SHA512 1623a683105edaf9f495b18ca770ff788e528302a50235fe584b9eab2b91cd655a5ed0eb3b3e60ca810382a7637a7bdfa736b8b1129a86e56e4040bb16a4d81b WHIRLPOOL b6380ab4f4f40e53fd53818b65a811c1741f4067e266703a544cee116ad1c188134739974f0856ec0ebd80bb6204a19e003525de8be19b8070368a52df86a0fc
+EBUILD dbus-1.10.22.ebuild 7399 SHA256 fb0ed8f765e4ac9838db61efd5a4e1dec90f6db5abf19675988eac796628e40f SHA512 47928864e7bad3b9fecd146ff1f876d21d3f18b34d2667c40153160906633a915c54a8a20f0d3c12c18f432f6dd0764e2cb61f4433a7bbace908ffd8d0955bb1 WHIRLPOOL 533a927597fc777912a1fe37f4287d626263c555b9f34e068bc0289eeb672fefdd743719555c4adf28bef884b1f3de5f77b522110e60f339e339249bb233b8b0
+EBUILD dbus-1.10.24.ebuild 7400 SHA256 5f87bf90da7ab2d808cee299ab05c11c1e8fe5294235bf2de71ce1d2e612e3c0 SHA512 4bede00f1cee6da6680303d989331773838530783921d0ffa8a7d2b1876a4856d2b6db13fbf38dbd66ab8f40375cc7e10648ee6d1ef0948781ed9d04793485ba WHIRLPOOL a3e2897ac8fd90c8282cb92b6ac3e662a5228e8a8e4cc6e3fccc8df9cacc44b83d9937679039e7ca328b42c8414991a8df28c33d2af38fe7dc6752e4a762978b
+MISC ChangeLog 9352 SHA256 8e03346e0ae584eb88d682c055d933a48e391f6c9c727ea63532bf36d48879a9 SHA512 d430313fcde1019c4d7fb17c8cc2c963b09724735c1a8749d0f4589be5938a9c4c782eb81f8c02e2fa5cb7f0b78a43cd72bcb39c794d01073f36f272c56b72fb WHIRLPOOL 4ce3bc545c5c97af2add27f6fa052aa5d2c6869f8785cbfcd61f6e98dfe6b1708c93a95ae3056dc2d54d3b142c015f15bbab365f57e3635901194c9321e8148c
+MISC ChangeLog-2015 67682 SHA256 486a3ac56b453a793052b5aa08f3b744c3fce8a9dfa4c4f6b346d7d5941ddb51 SHA512 78be573f852f7a79cc5a13457b1bf22fb4310808a886618614e570ffbf40589a8c68b49478c8662577c2188bbb17a20c8d003c8804173334338f92e6d16c2051 WHIRLPOOL 379bc4232b10c300020793f142b83264bcc7376585eb7359dcdcf71d48253dc5d5f3aeb175a5eb311246ffad9e247e25971a33237ed5c7d372a4ce5d66d81913
+MISC metadata.xml 595 SHA256 6d305cf7793900dc499713dac0ed55f3214a75ad77fb1810c5818edeb3cbbe67 SHA512 90db9348853e41c206a0277fc21917fa88253a7d85b18c611fb1b31a9b6cfd6421d02a9298672a27d89d8969e365a4eb82ddcbf008244e66f8f37668269b6738 WHIRLPOOL 89fc7303a15a510e2ec4bf90f05e7525de34f8d88f2f5125573cc4a735b5299836007dde76ba75307a4ea1fc84042c37396e6cc3daf4f23197422fce05058403
diff --git a/sys-apps/dbus/dbus-1.10.18.ebuild b/sys-apps/dbus/dbus-1.10.18.ebuild
new file mode 100644
index 000000000000..3bd2f2d691d0
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.18.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
+
+LICENSE="|| ( AFL-2.1 GPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test user-session X"
+
+RESTRICT="test"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+CDEPEND="
+ >=dev-libs/expat-2
+ selinux? (
+ sys-libs/libselinux
+ )
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd:0= )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+DEPEND="${CDEPEND}
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.4
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? (
+ >=dev-libs/glib-2.36:2
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+ Some applications require a session bus in addition to the system
+ bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD=${WORKDIR}/${P}-tests-build
+
+pkg_setup() {
+ enewgroup messagebus
+ enewuser messagebus -1 -1 -1 messagebus
+
+ use test && python-any-r1_pkg_setup
+
+ if use kernel_linux; then
+ CONFIG_CHECK="~EPOLL"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Tests were restricted because of this
+ sed -i \
+ -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+ -e '/"dispatch"/d' \
+ bus/test-main.c || die
+
+ eapply "${FILESDIR}/${PN}-enable-elogind.patch"
+
+ eapply_user
+
+ # required for asneeded patch but also for bug 263909, cross-compile so
+ # don't remove eautoreconf
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local docconf myconf
+
+ # so we can get backtraces from apps
+ case ${CHOST} in
+ *-mingw*)
+ # error: unrecognized command line option '-rdynamic' wrt #488036
+ ;;
+ *)
+ append-flags -rdynamic
+ ;;
+ esac
+
+ # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+ # not on an SELinux profile.
+ myconf=(
+ --localstatedir="${EPREFIX}/var"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+ $(use_enable static-libs static)
+ $(use_enable debug verbose-mode)
+ --disable-asserts
+ --disable-checks
+ $(use_enable selinux)
+ $(use_enable selinux libaudit)
+ --disable-apparmor
+ $(use_enable kernel_linux inotify)
+ $(use_enable kernel_FreeBSD kqueue)
+ $(use_enable elogind)
+ $(use_enable systemd)
+ $(use_enable user-session)
+ --disable-embedded-tests
+ --disable-modular-tests
+ $(use_enable debug stats)
+ --with-session-socket-dir="${EPREFIX}"/tmp
+ --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+ --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ --with-dbus-user=messagebus
+ $(use_with X x)
+ )
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ myconf+=(
+ --enable-launchd
+ --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+ )
+ fi
+
+ if multilib_is_native_abi; then
+ docconf=(
+ --enable-xml-docs
+ $(use_enable doc doxygen-docs)
+ )
+ else
+ docconf=(
+ --disable-xml-docs
+ --disable-doxygen-docs
+ )
+ myconf+=(
+ --disable-selinux
+ --disable-libaudit
+ --disable-elogind
+ --disable-systemd
+ --without-x
+
+ # expat is used for the daemon only
+ # fake the check for multilib library build
+ ac_cv_lib_expat_XML_ParserCreate_MM=yes
+ )
+ fi
+
+ einfo "Running configure in ${BUILD_DIR}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+ if multilib_is_native_abi && use test; then
+ mkdir "${TBD}" || die
+ cd "${TBD}" || die
+ einfo "Running configure in ${TBD}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+ $(use_enable test asserts) \
+ $(use_enable test checks) \
+ $(use_enable test embedded-tests) \
+ $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+ fi
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ # after the compile, it uses a selinuxfs interface to
+ # check if the SELinux policy has the right support
+ use selinux && addwrite /selinux/access
+
+ einfo "Running make in ${BUILD_DIR}"
+ emake
+
+ if use test; then
+ einfo "Running make in ${TBD}"
+ emake -C "${TBD}"
+ fi
+ else
+ emake -C dbus libdbus-1.la
+ fi
+}
+
+src_test() {
+ DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+ else
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C dbus \
+ install-libLTLIBRARIES install-dbusincludeHEADERS \
+ install-nodist_dbusarchincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+ if use X; then
+ # dbus X session script (#77504)
+ # turns out to only work for GDM (and startx). has been merged into
+ # other desktop (kdm and such scripts)
+ exeinto /etc/X11/xinit/xinitrc.d
+ doexe "${FILESDIR}"/80-dbus
+ fi
+
+ # needs to exist for dbus sessions to launch
+ keepdir /usr/share/dbus-1/services
+ keepdir /etc/dbus-1/{session,system}.d
+ # machine-id symlink from pkg_postinst()
+ keepdir /var/lib/dbus
+ # let the init script create the /var/run/dbus directory
+ rm -rf "${ED}"/var/run
+
+ dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+ readme.gentoo_create_doc
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+ # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+ # dependencies with hardcoded paths (although the known ones got fixed already)
+ dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+ ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ local plist="org.freedesktop.dbus-session.plist"
+ elog
+ elog
+ elog "For MacOS/Darwin we now ship launchd support for dbus."
+ elog "This enables autolaunch of dbus at session login and makes"
+ elog "dbus usable under MacOS/Darwin."
+ elog
+ elog "The launchd plist file ${plist} has been"
+ elog "installed in ${EPREFIX}/Library/LaunchAgents."
+ elog "For it to be used, you will have to do all of the following:"
+ elog " + cd ~/Library/LaunchAgents"
+ elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+ elog " + logout and log back in"
+ elog
+ elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+ elog "specified and refused to start otherwise, then export the"
+ elog "the following to your environment:"
+ elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+ fi
+
+ if use user-session; then
+ ewarn "You have enabled user-session. Please note this can cause"
+ ewarn "bogus behaviors in several dbus consumers that are not prepared"
+ ewarn "for this dbus activation method yet."
+ ewarn
+ ewarn "See the following link for background on this change:"
+ ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+ ewarn
+ ewarn "Known issues are tracked here:"
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+ fi
+}
diff --git a/sys-apps/dbus/dbus-1.10.22.ebuild b/sys-apps/dbus/dbus-1.10.22.ebuild
new file mode 100644
index 000000000000..cbd855261fc8
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.22.ebuild
@@ -0,0 +1,270 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+
+inherit autotools ltprune linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
+
+LICENSE="|| ( AFL-2.1 GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test user-session X"
+
+#RESTRICT="test"
+
+REQUIRED_USE="
+ ?? ( elogind systemd )
+ test? ( debug )
+"
+
+CDEPEND="
+ >=dev-libs/expat-2
+ selinux? ( sys-libs/libselinux )
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd:0= )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ )
+"
+DEPEND="${CDEPEND}
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.4
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? (
+ >=dev-libs/glib-2.36:2
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+ Some applications require a session bus in addition to the system
+ bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+pkg_setup() {
+ enewgroup messagebus
+ enewuser messagebus -1 -1 -1 messagebus
+
+ use test && python-any-r1_pkg_setup
+
+ if use kernel_linux; then
+ CONFIG_CHECK="~EPOLL"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Tests were restricted because of this
+ sed -i \
+ -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+ -e '/"dispatch"/d' \
+ bus/test-main.c || die
+
+ eapply "${FILESDIR}/${PN}-enable-elogind.patch"
+
+ eapply_user
+
+ # required for bug 263909, cross-compile so don't remove eautoreconf
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local docconf myconf
+
+ # so we can get backtraces from apps
+ case ${CHOST} in
+ *-mingw*)
+ # error: unrecognized command line option '-rdynamic' wrt #488036
+ ;;
+ *)
+ append-flags -rdynamic
+ ;;
+ esac
+
+ # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+ # not on an SELinux profile.
+ myconf=(
+ --localstatedir="${EPREFIX}/var"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+ $(use_enable static-libs static)
+ $(use_enable debug verbose-mode)
+ --disable-asserts
+ --disable-checks
+ $(use_enable selinux)
+ $(use_enable selinux libaudit)
+ --disable-apparmor
+ $(use_enable kernel_linux inotify)
+ $(use_enable kernel_FreeBSD kqueue)
+ $(use_enable elogind)
+ $(use_enable systemd)
+ $(use_enable user-session)
+ --disable-embedded-tests
+ --disable-modular-tests
+ $(use_enable debug stats)
+ --with-session-socket-dir="${EPREFIX}"/tmp
+ --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+ --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ --with-dbus-user=messagebus
+ $(use_with X x)
+ )
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ myconf+=(
+ --enable-launchd
+ --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+ )
+ fi
+
+ if multilib_is_native_abi; then
+ docconf=(
+ --enable-xml-docs
+ $(use_enable doc doxygen-docs)
+ )
+ else
+ docconf=(
+ --disable-xml-docs
+ --disable-doxygen-docs
+ )
+ myconf+=(
+ --disable-selinux
+ --disable-libaudit
+ --disable-elogind
+ --disable-systemd
+ --without-x
+
+ # expat is used for the daemon only
+ # fake the check for multilib library build
+ ac_cv_lib_expat_XML_ParserCreate_MM=yes
+ )
+ fi
+
+ einfo "Running configure in ${BUILD_DIR}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+ if multilib_is_native_abi && use test; then
+ mkdir "${TBD}" || die
+ cd "${TBD}" || die
+ einfo "Running configure in ${TBD}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+ $(use_enable test asserts) \
+ $(use_enable test checks) \
+ $(use_enable test embedded-tests) \
+ $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+ fi
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ # after the compile, it uses a selinuxfs interface to
+ # check if the SELinux policy has the right support
+ use selinux && addwrite /selinux/access
+
+ einfo "Running make in ${BUILD_DIR}"
+ emake
+
+ if use test; then
+ einfo "Running make in ${TBD}"
+ emake -C "${TBD}"
+ fi
+ else
+ emake -C dbus libdbus-1.la
+ fi
+}
+
+src_test() {
+ DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+ else
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C dbus \
+ install-libLTLIBRARIES install-dbusincludeHEADERS \
+ install-nodist_dbusarchincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+ if use X; then
+ # dbus X session script (#77504)
+ # turns out to only work for GDM (and startx). has been merged into
+ # other desktop (kdm and such scripts)
+ exeinto /etc/X11/xinit/xinitrc.d
+ doexe "${FILESDIR}"/80-dbus
+ fi
+
+ # needs to exist for dbus sessions to launch
+ keepdir /usr/share/dbus-1/services
+ keepdir /etc/dbus-1/{session,system}.d
+ # machine-id symlink from pkg_postinst()
+ keepdir /var/lib/dbus
+ # let the init script create the /var/run/dbus directory
+ rm -rf "${ED}"/var/run
+
+ dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+ readme.gentoo_create_doc
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+ # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+ # dependencies with hardcoded paths (although the known ones got fixed already)
+ dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+ ln -sf "${EPREFIX%/}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ local plist="org.freedesktop.dbus-session.plist"
+ elog
+ elog
+ elog "For MacOS/Darwin we now ship launchd support for dbus."
+ elog "This enables autolaunch of dbus at session login and makes"
+ elog "dbus usable under MacOS/Darwin."
+ elog
+ elog "The launchd plist file ${plist} has been"
+ elog "installed in ${EPREFIX}/Library/LaunchAgents."
+ elog "For it to be used, you will have to do all of the following:"
+ elog " + cd ~/Library/LaunchAgents"
+ elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+ elog " + logout and log back in"
+ elog
+ elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+ elog "specified and refused to start otherwise, then export the"
+ elog "the following to your environment:"
+ elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+ fi
+
+ if use user-session; then
+ ewarn "You have enabled user-session. Please note this can cause"
+ ewarn "bogus behaviors in several dbus consumers that are not prepared"
+ ewarn "for this dbus activation method yet."
+ ewarn
+ ewarn "See the following link for background on this change:"
+ ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+ ewarn
+ ewarn "Known issues are tracked here:"
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+ fi
+}
diff --git a/sys-apps/dbus/dbus-1.10.24.ebuild b/sys-apps/dbus/dbus-1.10.24.ebuild
new file mode 100644
index 000000000000..4a700ffad463
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.24.ebuild
@@ -0,0 +1,272 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+
+inherit autotools ltprune linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
+
+LICENSE="|| ( AFL-2.1 GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test user-session X"
+
+#RESTRICT="test"
+
+REQUIRED_USE="
+ ?? ( elogind systemd )
+ test? ( debug )
+"
+
+CDEPEND="
+ >=dev-libs/expat-2
+ selinux? ( sys-libs/libselinux )
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd:0= )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ )
+"
+DEPEND="${CDEPEND}
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.4
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? (
+ >=dev-libs/glib-2.36:2
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+ Some applications require a session bus in addition to the system
+ bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-enable-elogind.patch"
+)
+
+pkg_setup() {
+ enewgroup messagebus
+ enewuser messagebus -1 -1 -1 messagebus
+
+ use test && python-any-r1_pkg_setup
+
+ if use kernel_linux; then
+ CONFIG_CHECK="~EPOLL"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Tests were restricted because of this
+ sed -i \
+ -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+ -e '/"dispatch"/d' \
+ bus/test-main.c || die
+
+ default
+
+ # required for bug 263909, cross-compile so don't remove eautoreconf
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local docconf myconf
+
+ # so we can get backtraces from apps
+ case ${CHOST} in
+ *-mingw*)
+ # error: unrecognized command line option '-rdynamic' wrt #488036
+ ;;
+ *)
+ append-flags -rdynamic
+ ;;
+ esac
+
+ # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+ # not on an SELinux profile.
+ myconf=(
+ --localstatedir="${EPREFIX}/var"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+ $(use_enable static-libs static)
+ $(use_enable debug verbose-mode)
+ --disable-asserts
+ --disable-checks
+ $(use_enable selinux)
+ $(use_enable selinux libaudit)
+ --disable-apparmor
+ $(use_enable kernel_linux inotify)
+ $(use_enable kernel_FreeBSD kqueue)
+ $(use_enable elogind)
+ $(use_enable systemd)
+ $(use_enable user-session)
+ --disable-embedded-tests
+ --disable-modular-tests
+ $(use_enable debug stats)
+ --with-session-socket-dir="${EPREFIX}"/tmp
+ --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+ --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ --with-dbus-user=messagebus
+ $(use_with X x)
+ )
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ myconf+=(
+ --enable-launchd
+ --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+ )
+ fi
+
+ if multilib_is_native_abi; then
+ docconf=(
+ --enable-xml-docs
+ $(use_enable doc doxygen-docs)
+ )
+ else
+ docconf=(
+ --disable-xml-docs
+ --disable-doxygen-docs
+ )
+ myconf+=(
+ --disable-selinux
+ --disable-libaudit
+ --disable-elogind
+ --disable-systemd
+ --without-x
+
+ # expat is used for the daemon only
+ # fake the check for multilib library build
+ ac_cv_lib_expat_XML_ParserCreate_MM=yes
+ )
+ fi
+
+ einfo "Running configure in ${BUILD_DIR}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+ if multilib_is_native_abi && use test; then
+ mkdir "${TBD}" || die
+ cd "${TBD}" || die
+ einfo "Running configure in ${TBD}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+ $(use_enable test asserts) \
+ $(use_enable test checks) \
+ $(use_enable test embedded-tests) \
+ $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+ fi
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ # after the compile, it uses a selinuxfs interface to
+ # check if the SELinux policy has the right support
+ use selinux && addwrite /selinux/access
+
+ einfo "Running make in ${BUILD_DIR}"
+ emake
+
+ if use test; then
+ einfo "Running make in ${TBD}"
+ emake -C "${TBD}"
+ fi
+ else
+ emake -C dbus libdbus-1.la
+ fi
+}
+
+src_test() {
+ DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+ else
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C dbus \
+ install-libLTLIBRARIES install-dbusincludeHEADERS \
+ install-nodist_dbusarchincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+ if use X; then
+ # dbus X session script (#77504)
+ # turns out to only work for GDM (and startx). has been merged into
+ # other desktop (kdm and such scripts)
+ exeinto /etc/X11/xinit/xinitrc.d
+ doexe "${FILESDIR}"/80-dbus
+ fi
+
+ # needs to exist for dbus sessions to launch
+ keepdir /usr/share/dbus-1/services
+ keepdir /etc/dbus-1/{session,system}.d
+ # machine-id symlink from pkg_postinst()
+ keepdir /var/lib/dbus
+ # let the init script create the /var/run/dbus directory
+ rm -rf "${ED}"/var/run
+
+ dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+ readme.gentoo_create_doc
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+ # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+ # dependencies with hardcoded paths (although the known ones got fixed already)
+ dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+ ln -sf "${EPREFIX%/}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ local plist="org.freedesktop.dbus-session.plist"
+ elog
+ elog
+ elog "For MacOS/Darwin we now ship launchd support for dbus."
+ elog "This enables autolaunch of dbus at session login and makes"
+ elog "dbus usable under MacOS/Darwin."
+ elog
+ elog "The launchd plist file ${plist} has been"
+ elog "installed in ${EPREFIX}/Library/LaunchAgents."
+ elog "For it to be used, you will have to do all of the following:"
+ elog " + cd ~/Library/LaunchAgents"
+ elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+ elog " + logout and log back in"
+ elog
+ elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+ elog "specified and refused to start otherwise, then export the"
+ elog "the following to your environment:"
+ elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+ fi
+
+ if use user-session; then
+ ewarn "You have enabled user-session. Please note this can cause"
+ ewarn "bogus behaviors in several dbus consumers that are not prepared"
+ ewarn "for this dbus activation method yet."
+ ewarn
+ ewarn "See the following link for background on this change:"
+ ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+ ewarn
+ ewarn "Known issues are tracked here:"
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+ fi
+}
diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus
new file mode 100644
index 000000000000..5593e2cd7390
--- /dev/null
+++ b/sys-apps/dbus/files/80-dbus
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# launches a session dbus instance
+
+dbuslaunch="`which dbus-launch 2>/dev/null`"
+if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
+ if [ -n "$command" ]; then
+ command="$dbuslaunch --exit-with-session $command"
+ else
+ eval `$dbuslaunch --sh-syntax --exit-with-session`
+ fi
+fi
+
diff --git a/sys-apps/dbus/files/dbus-enable-elogind.patch b/sys-apps/dbus/files/dbus-enable-elogind.patch
new file mode 100644
index 000000000000..5cb5d649cd91
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-enable-elogind.patch
@@ -0,0 +1,73 @@
+--- a/dbus/dbus-userdb-util.c 2015-09-30 16:48:40.000000000 +0200
++++ b/dbus/dbus-userdb-util.c 2016-11-03 11:09:42.550520587 +0100
+@@ -32,6 +32,9 @@
+ #if HAVE_SYSTEMD
+ #include <systemd/sd-login.h>
+ #endif
++#if HAVE_ELOGIND
++#include <elogind/sd-login.h>
++#endif
+
+ /**
+ * @addtogroup DBusInternalsUtils
+@@ -54,7 +57,7 @@
+ const DBusUserInfo *info;
+ dbus_bool_t result = FALSE;
+
+-#ifdef HAVE_SYSTEMD
++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
+ /* check if we have logind */
+ if (access ("/run/systemd/seats/", F_OK) >= 0)
+ {
+--- a/configure.ac 2016-11-03 11:13:58.286528265 +0100
++++ b/configure.ac 2016-11-03 11:22:11.210543063 +0100
+@@ -185,6 +185,7 @@
+ AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
+ AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
+ AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
++AC_ARG_ENABLE(elogind, AS_HELP_STRING([--enable-elogind],[build with elogind user seat support]),enable_elogind=$enableval,enable_elogind=auto)
+ AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto)
+
+ AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
+@@ -1184,6 +1185,24 @@
+
+ AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
+
++dnl elogind detection
++if test x$enable_elogind = xno ; then
++ have_elogind=no;
++else
++ PKG_CHECK_MODULES([ELOGIND],
++ [libelogind >= 209],
++ [have_elogind=yes],
++ [have_elogind=no])
++fi
++
++if test x$have_elogind = xyes; then
++ AC_DEFINE(HAVE_ELOGIND,1,[Have elogind])
++fi
++
++if test x$enable_elogind = xyes -a x$have_elogind != xyes ; then
++ AC_MSG_ERROR([Explicitly requested elogind support, but libelogind not found])
++fi
++
+ dnl systemd detection
+ if test x$enable_systemd = xno ; then
+ have_systemd=no;
+@@ -1290,7 +1309,7 @@
+ fi
+
+ #### Set up final flags
+-LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS"
++LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS $ELOGIND_LIBS"
+ AC_SUBST([LIBDBUS_LIBS])
+
+ ### X11 detection
+@@ -1949,6 +1968,7 @@
+ Building AppArmor support: ${have_apparmor}
+ Building inotify support: ${have_inotify}
+ Building kqueue support: ${have_kqueue}
++ Building elogind support: ${have_elogind}
+ Building systemd support: ${have_systemd}
+ Building X11 code: ${have_x11}
+ Building Doxygen docs: ${enable_doxygen_docs}
diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1
new file mode 100644
index 000000000000..bd3542381a7a
--- /dev/null
+++ b/sys-apps/dbus/files/dbus.initd-r1
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+description="An IPC message bus daemon"
+pidfile="/var/run/dbus.pid"
+command="/usr/bin/dbus-daemon"
+command_args="--system"
+
+dbus_socket="/var/run/dbus/system_bus_socket"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
+
+ # We need to test if /var/run/dbus exists, since script will fail if it does not
+ checkpath -q -d /var/run/dbus
+}
+
+stop_post() {
+ [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}"
+}
+
+reload() {
+ ebegin "Reloading D-BUS messagebus config"
+ /usr/bin/dbus-send --print-reply --system --type=method_call \
+ --dest=org.freedesktop.DBus \
+ / org.freedesktop.DBus.ReloadConfig > /dev/null
+ eend $?
+}
diff --git a/sys-apps/dbus/metadata.xml b/sys-apps/dbus/metadata.xml
new file mode 100644
index 000000000000..a8736a778169
--- /dev/null
+++ b/sys-apps/dbus/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 type="project">
+ <email>freedesktop-bugs@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking.</flag>
+ <flag name="systemd">Build with <pkg>sys-apps/systemd</pkg> at_console support</flag>
+ <flag name="user-session">Enable user-session semantics for session bus under systemd</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:freedesktop:dbus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/dcfldd/Manifest b/sys-apps/dcfldd/Manifest
new file mode 100644
index 000000000000..68f025e561a5
--- /dev/null
+++ b/sys-apps/dcfldd/Manifest
@@ -0,0 +1,5 @@
+DIST dcfldd-1.3.4-1.tar.gz 163141 SHA256 f5143a184da56fd5ac729d6d8cbcf9f5da8e1cf4604aa9fb97c59553b7e6d5f8 SHA512 04b53adf62c6b468ff816e2cd94cf360eb5315eb980e2aa7d71afae706ec9c4683430269e82d712608be265710907fdaaa1316e4f734b7481ee9395a37926c7a WHIRLPOOL 45078bc9cd76c9552a7394e3cc5fd3bf0d2a972d33eb4f8dc072b082c7d7483bddedfeb55d598e48e53c9bd0d75916179e1357d7903f269335802a5ca241257a
+EBUILD dcfldd-1.3.4.1.ebuild 571 SHA256 2021f74984338379b819b35057a4a336aae9012bf2e6ead61b2fa57897f31ac0 SHA512 0da9d3c8a7653f688d4eedf757322f27e728213dec48880f2b0c379623984a071f305aa0f8153e590c9f22ccff549fc21150a8fff98a782c8abd566d514484e5 WHIRLPOOL b87f9ef1bf78681eaf15cf66bb3145ac82c9bf2f0f6614efb8db5864a47d705dec36416a1825bb9eda6648e40871619962ffdbc3e170ef2903f9c6e39d61ee12
+MISC ChangeLog 2428 SHA256 91c381a6c0ea78e2a93673a1bb38f2bf4daa14bcf8a59f2de400f51c91109375 SHA512 e93b84112acd432db9b7a22fc1189ffc6c5e9ccaa126768c9de819943ecfee2e428671e0f0e4f8bae1ee12eea84a21b8269390aeb84c4cdd4b2a884c9df78bf0 WHIRLPOOL 77dccff49ea4dd72167f7b9d99e9fbe4156924201c80c66e369975bea4665c2c17ad6beb96ff80e239678027dd9ad460a4904e149532220cf867bda9c8da5de1
+MISC ChangeLog-2015 2003 SHA256 4c35a1305fc9465878ab38ef1b8c0614c8b3c8fa89a5cd63b9eadfb5743477cd SHA512 5affb103426778cde8a6ecebbbb30153e056a009db166aef71e7fb8bbce068c9d82a24afd799bd90c1b2c226c63f59d14b71ba291356160fdb36954f6be2269d WHIRLPOOL 93f7a4177b2e5308ffb68d7ae109c77cd0b55dad577f5baa84477cf5ada900f037e2b8b03a2b84f006b3afc4d8d5e5ac326e732818b431c35594d0a50d2b5b9a
+MISC metadata.xml 243 SHA256 dd47290c2927125d019d65775e5093d32ec0eca02e429b33f4f9954ff8eea4f3 SHA512 8bec7ef7efabb34196784b71ed7c96e2c2e604665ab3ae6ce6f41e6b719e7b8fc4579e2ec6effce2181017d12784651019f5464623dfbc4f0c9b0437c2bae182 WHIRLPOOL 62cf47148b11ad15ee51c9bf080b660273687735c759110fd2a8aeb0c0c925bdcc84fa63f761aa4d9ac0957751c330a30c278016cdc31046d4435877cf545b7c
diff --git a/sys-apps/dcfldd/dcfldd-1.3.4.1.ebuild b/sys-apps/dcfldd/dcfldd-1.3.4.1.ebuild
new file mode 100644
index 000000000000..2de19e5b9187
--- /dev/null
+++ b/sys-apps/dcfldd/dcfldd-1.3.4.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit versionator
+
+My_PV=$(replace_version_separator 3 '-')
+
+DESCRIPTION="enhanced dd with features for forensics and security"
+HOMEPAGE="http://dcfldd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dcfldd/${PN}-${My_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${My_PV}"
+
+src_install() {
+ make install DESTDIR="${D}" || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/sys-apps/dcfldd/metadata.xml b/sys-apps/dcfldd/metadata.xml
new file mode 100644
index 000000000000..4204703809b2
--- /dev/null
+++ b/sys-apps/dcfldd/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">dcfldd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/dchroot/Manifest b/sys-apps/dchroot/Manifest
new file mode 100644
index 000000000000..863840c5cf04
--- /dev/null
+++ b/sys-apps/dchroot/Manifest
@@ -0,0 +1,5 @@
+DIST dchroot_0.12.1.tar.gz 20287 SHA256 b42bf3521299c845345db2ba140af8acddec2b0f1492df481367f8bcf25328c3 SHA512 4c0b9e30c68f7ff953a259b4d21f0fab58b6a15dd8ebf0666267879114c0fce37a9fc38d71e5047003676c1ec4211feb0d2c51aa44def81d0d5a40815fd1c600 WHIRLPOOL 7542e2f77a922216482d489b4b9e630778f01c8313b6b966c36c12909a9111d2cd86b2bb4c393e3cf3f4bae35fd1f78c97162af42e3ee4f30894e5571903b13f
+EBUILD dchroot-0.12.1.ebuild 755 SHA256 8ea74bedbdd25980ff61a23bc0d11c63ea33f5f00769d03c9b8d98184d37fca5 SHA512 a687729b4b75650c52fd300bd6d5ac8f727b2f6a9fd324b2b28b118d885f50136bcd13ddcfec7bfff3f13aa73bbfe16a9931d7bbe4be784ccf232dc75a442cc8 WHIRLPOOL 9bb3dd54cb60d6af6a646b0649f3a4c6da6eb78ef69febbe6fcdf7c6649a8053207ad05252f9dc34a222363d1ba2917877bda05e598018c6307473e023414939
+MISC ChangeLog 2524 SHA256 1ed9376a5a1473f8a8164070c238b6b4491bb2a923de45e5e484a27c3ce54f10 SHA512 483dfc2cc64da88d800d4f2dedb86e32491ecc11ce200603f06f4f90625cb248ddf3d7a71c1c1f91dd3355e3bdf1e5df5c367a6886e7d3d5dbaca34961bb82e5 WHIRLPOOL 5af22cba653ba1d86e1162ae1aacd4028e73b3cbfc37975ccf18e497d8577d09185f99bebd4f20fbf9713f306c8bf9f8e4c9ba81a7eb7b01791707128c1a0ab1
+MISC ChangeLog-2015 1148 SHA256 e529dd2363369bd049c1d9494a978a45952ea389f694baa2defeb884f4df8238 SHA512 23252c831ea250e7a4f140abf5dae19fc63eebf76212d5efec5fd3b3ffe2e95cacf0d34c88eb7355d1821cf37bed412dd84ff0bea7237cbe7e680c9b1924a161 WHIRLPOOL cd1667365ed648275f528625e6214085ef2c28baf7cc8be3185923f1daa3abec8d73d6817575c12902aece2abf42f672c9dff1d4e1e599f1769cc8e9d70fb18d
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/dchroot/dchroot-0.12.1.ebuild b/sys-apps/dchroot/dchroot-0.12.1.ebuild
new file mode 100644
index 000000000000..6caede8eede4
--- /dev/null
+++ b/sys-apps/dchroot/dchroot-0.12.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Utility for managing chroots for non-root users"
+HOMEPAGE="http://packages.debian.org/unstable/admin/dchroot"
+SRC_URI="mirror://debian/pool/main/d/dchroot/dchroot_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-apps/help2man"
+RDEPEND="!dev-util/schroot[dchroot]"
+
+src_prepare() {
+ sed -i \
+ -e '/^all:/s:$: docs:' \
+ -e '/^CFLAGS/s:-O2:@CFLAGS@:' \
+ -e '/@CFLAGS@/ s:@CFLAGS@:@CFLAGS@ @LDFLAGS@:' \
+ Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README TODO
+}
diff --git a/sys-apps/dchroot/metadata.xml b/sys-apps/dchroot/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/dchroot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/debianutils/Manifest b/sys-apps/debianutils/Manifest
new file mode 100644
index 000000000000..c1ef64dde095
--- /dev/null
+++ b/sys-apps/debianutils/Manifest
@@ -0,0 +1,10 @@
+AUX debianutils-3.4.2-no-bs-namespace.patch 1168 SHA256 a29ae4ad14e602cada73930b7abeb12b5b07027eed942f25a69678917fc0eb80 SHA512 05ffb53243a178e91d67066a30039e9ccc21caabe7769e8920548c615b6d9d23959125f2fc9073cc70ba3f3502df7d780db59e4768e7add2682af98079bd6bd4 WHIRLPOOL c63f190cd7213e0b1a102c8a3280aab9c6eab621a23c3d552a128c903df9be82110ed9c4f121c51b829b7d2d6ad13fbef3cc1d95f53445749c1b8fad5e5372b3
+DIST debianutils_4.7.tar.xz 156276 SHA256 a269cacd40f52f2fa5d5636357714a49e8538459c16d77772efaa23711fe53d9 SHA512 74110d194de8b6b61d40b133b97629520048a8fdedac349ec2031c793c0246526c1c7904e88098b4c2a121e5efba2d724924139ab1aca15d129a4d210f94a1aa WHIRLPOOL a3a8ab13f904d9fa90d663998b48800fe5ceceea01e46434a052ac81caf940376b580d3228822f390587df7806fc0876627ff6cbcfcb0b1f294b4ce5bacd12bd
+DIST debianutils_4.8.1.1.tar.xz 156256 SHA256 06446cd4c0d309fd31a0682c5c2f07f7613fb867f769414b9cc51f155ad73172 SHA512 22f27692a7d3847fad1be223d73e5575581db8621771e92e68fe91bd31e67084fd655fef857905be46ab3a45340503b0af9399b8fe28f221ea5cee4b49970821 WHIRLPOOL b8eee3d2bae34a636072c8e2fd275fc1f0edf455977791154df343fa1bc2cba9e518ac21ba9fa555b9787ea35c5246bc3115263fecc4e7cb3b1c79e230f4f235
+DIST debianutils_4.8.2.tar.xz 155944 SHA256 4deb5f293fd3e43c5d4a625a30b18d0fb07662ff77f769e3272841cdb61e7c68 SHA512 40bad124e99c5a315b7ddf181afc2db216c85ddfe5603a16fbd21bd01091d3631b18826ddf799ba232ecaa1c2b3ff389a26a533f392918eb0733efdd75749759 WHIRLPOOL fcf293e630665a822687def6974f406b8e0cdfe57aaa554e0844620fa3a018c53828bdd807cb0d136aa27bc44184b4f62c04e4588dd4245fb40f2251934ce102
+EBUILD debianutils-4.7.ebuild 955 SHA256 3ac94180e58d6aaf335da66946d2a51f5bab22cb10d9b5ce6996fdd516b69a6b SHA512 581e2efee6fc722bb26cb3f5072758f119927455e584c41be27562906d405309d121e9e7cde3d5427d6399f7e9519423ad4a7e99650a2214a142963b27f22cca WHIRLPOOL 9f04bd2653a6dcd940b4c8a97846006364515c58e163da4cab0457997543b51cec8cf9c4fc7922e71eb83d6fd63f944d70d41d26e8b3064aa1c097f3192fe2b5
+EBUILD debianutils-4.8.1.1.ebuild 947 SHA256 4b78f71c3920c5a42823e6d70697ceb78eae2934ccb02575e0226813f9d2c33b SHA512 7d577f9653dd24d11f32282e5fa446d0d759442471a939501459838aa7fb25d409425caff6ff439cebe1dfd5ed1494214a1a59f473cd423b31f99aa63687843f WHIRLPOOL 78079759c453b19eddff2318f7ec04b623ce914efe844650024b2bc8053b39b7a784bb159139d52b47955197844725a218473bfaabd66472483e2f0c8d5b8d76
+EBUILD debianutils-4.8.2.ebuild 947 SHA256 4b78f71c3920c5a42823e6d70697ceb78eae2934ccb02575e0226813f9d2c33b SHA512 7d577f9653dd24d11f32282e5fa446d0d759442471a939501459838aa7fb25d409425caff6ff439cebe1dfd5ed1494214a1a59f473cd423b31f99aa63687843f WHIRLPOOL 78079759c453b19eddff2318f7ec04b623ce914efe844650024b2bc8053b39b7a784bb159139d52b47955197844725a218473bfaabd66472483e2f0c8d5b8d76
+MISC ChangeLog 6081 SHA256 b5fdf0a798def87e6861797bf1f1fd636aee2275151019b381d66356edef8ec8 SHA512 fe3772a8373c937547aa8027682570c199914b5775cc1538aff42d608710e1216ad4be76d2ec917da446e3a0e270c60362080c0fffa7934296baa6d326a15983 WHIRLPOOL 2df018fc7921f2d6d1a55c295c93c5f1711f79111d5ec921838f6e81b4837c1fd9294cca71f34da612b573179d2e351637171bc081b4477fb0f7b0c029565dbc
+MISC ChangeLog-2015 27871 SHA256 b2b40c35e4a70f52e3a23c5257df77f7506d1d772fd23c42aa0de57d05faec71 SHA512 f24dc4e2cc9b794dd14034e084482e1b837931886edcd27e9db516ddd99ab747e9b1dc0dcf8023253a4d066ec0eb433526675be439dfae8495f69b237f13f9db WHIRLPOOL 4cb1b4e27d204f602dbca4945b29fd139caa99af3c0e4bdc118c66e800a4307ee9baa8b499c3eba2489e27fdfa030df29b04479f29fc9c23b3eb301aae04230d
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/debianutils/debianutils-4.7.ebuild b/sys-apps/debianutils/debianutils-4.7.ebuild
new file mode 100644
index 000000000000..cc93d0fc79ca
--- /dev/null
+++ b/sys-apps/debianutils/debianutils-4.7.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="A selection of tools from Debian"
+HOMEPAGE="https://packages.qa.debian.org/d/debianutils.html"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="BSD GPL-2 SMAIL"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="kernel_linux static"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.4.2-no-bs-namespace.patch
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ default
+}
+
+src_install() {
+ into /
+ dobin tempfile run-parts
+ if use kernel_linux ; then
+ dosbin installkernel
+ fi
+
+ into /usr
+ dosbin savelog
+
+ doman tempfile.1 run-parts.8 savelog.8
+ use kernel_linux && doman installkernel.8
+ cd debian || die
+ dodoc changelog control
+ keepdir /etc/kernel/postinst.d
+}
diff --git a/sys-apps/debianutils/debianutils-4.8.1.1.ebuild b/sys-apps/debianutils/debianutils-4.8.1.1.ebuild
new file mode 100644
index 000000000000..fa86cf0160ab
--- /dev/null
+++ b/sys-apps/debianutils/debianutils-4.8.1.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="A selection of tools from Debian"
+HOMEPAGE="https://packages.qa.debian.org/d/debianutils.html"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="BSD GPL-2 SMAIL"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="kernel_linux static"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.2-no-bs-namespace.patch )
+
+src_configure() {
+ use static && append-ldflags -static
+ default
+}
+
+src_install() {
+ into /
+ dobin tempfile run-parts
+ if use kernel_linux ; then
+ dosbin installkernel
+ fi
+
+ into /usr
+ dosbin savelog
+
+ doman tempfile.1 run-parts.8 savelog.8
+ use kernel_linux && doman installkernel.8
+ cd debian || die
+ dodoc changelog control
+ keepdir /etc/kernel/postinst.d
+}
diff --git a/sys-apps/debianutils/debianutils-4.8.2.ebuild b/sys-apps/debianutils/debianutils-4.8.2.ebuild
new file mode 100644
index 000000000000..fa86cf0160ab
--- /dev/null
+++ b/sys-apps/debianutils/debianutils-4.8.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="A selection of tools from Debian"
+HOMEPAGE="https://packages.qa.debian.org/d/debianutils.html"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="BSD GPL-2 SMAIL"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="kernel_linux static"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.2-no-bs-namespace.patch )
+
+src_configure() {
+ use static && append-ldflags -static
+ default
+}
+
+src_install() {
+ into /
+ dobin tempfile run-parts
+ if use kernel_linux ; then
+ dosbin installkernel
+ fi
+
+ into /usr
+ dosbin savelog
+
+ doman tempfile.1 run-parts.8 savelog.8
+ use kernel_linux && doman installkernel.8
+ cd debian || die
+ dodoc changelog control
+ keepdir /etc/kernel/postinst.d
+}
diff --git a/sys-apps/debianutils/files/debianutils-3.4.2-no-bs-namespace.patch b/sys-apps/debianutils/files/debianutils-3.4.2-no-bs-namespace.patch
new file mode 100644
index 000000000000..94a84b8fb9cd
--- /dev/null
+++ b/sys-apps/debianutils/files/debianutils-3.4.2-no-bs-namespace.patch
@@ -0,0 +1,30 @@
+Allow dots in the names, bug #95173. Patch by Kerin Millar.
+Re-sourced for 3.4.2
+
+--- a/run-parts.8
++++ b/run-parts.8
+@@ -25,9 +25,10 @@
+ .IR directory .
+ Other files and directories are silently ignored.
+
+-If neither the \-\-lsbsysinit option nor the \-\-regex option is given
+-then the names must consist entirely of ASCII upper- and lower-case
+-letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.
++If neither the \-\-lsbsysinit option nor the \-\-regex option is given then the
++names must consist entirely of ASCII upper- and lower-case letters, ASCII
++digits, ASCII underscores, and ASCII minus-hyphens. However, the name must not
++begin with a period.
+
+ If the \-\-lsbsysinit option is given, then the names must not end
+ in .dpkg\-old or .dpkg\-dist or .dpkg\-new or .dpkg\-tmp, and must
+--- a/run-parts.c
++++ b/run-parts.c
+@@ -501,7 +501,7 @@
+ != 0)
+ pt_regex = &tradre;
+
+- } else if ( (err = regcomp(&classicalre, "^[a-zA-Z0-9_-]+$",
++ } else if ( (err = regcomp(&classicalre, "^[a-zA-Z0-9_-][a-zA-Z0-9._-]+$",
+ REG_EXTENDED | REG_NOSUB)) != 0)
+ pt_regex = &classicalre;
+
diff --git a/sys-apps/debianutils/metadata.xml b/sys-apps/debianutils/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/debianutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/diffutils/Manifest b/sys-apps/diffutils/Manifest
new file mode 100644
index 000000000000..2169ea2312e1
--- /dev/null
+++ b/sys-apps/diffutils/Manifest
@@ -0,0 +1,10 @@
+AUX diffutils-3.5-fix_macros.patch 928 SHA256 2d6389bb5dd669335826b9f20f64852ebccdf91a2a867d7da82eeb7de35f8e49 SHA512 ad0cff0aea2ac560b3c0171141b6d1975d2ffb8684a20697464471355cdb161dea5967b72732b4de5ff9375a2ba2f29aae532967abe5311820de817afaf354ba WHIRLPOOL e970547a22e40b0b8ba85f40973e530dfb3281772d907d65a819b449f4aa68107a35fe7f97cec343703cb3dd2e4e49cfd90c5b8a0c70c42c3a9c6686e1de96c6
+DIST diffutils-3.3.tar.xz 1197832 SHA256 a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c SHA512 b04b998717e45e8fd1ba675957dad1909beeed68ffc41c0d9bbaddaf78965f9e63af5a8d8811bb94f33a3cddcad2fe1ad794e52e545def9ce96c092999a74a83 WHIRLPOOL 8fd3b179afdc3fd127cee8829535b0fc6d949443645e8df80fa45c2fa44a732ea652259b644d81a9be14d4c7f7c3b5bad7b8861934a6bc691cd02a34c0200ed3
+DIST diffutils-3.5.tar.xz 1360996 SHA256 dad398ccd5b9faca6b0ab219a036453f62a602a56203ac659b43e889bec35533 SHA512 758229637e3703215adf66c5df04126ae594424abaf2cad8f1fa482bd9759e90838c943ef56e0129beb1396f5932ed9337c8396679da3de32e49bb43d423fd6b WHIRLPOOL 2f367fc10679bfc1377612bfdc693792f5afdc0969c06d7607370bb626d8eb63868b71d2342133fea6210291f34ad3f53b4af34d457a13fc675fc7dc5f6c2f6e
+DIST diffutils-3.6.tar.xz 1398296 SHA256 d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6 SHA512 3c159ff1cb7c901b0a57518483566b5740ca3c45aeb8d3004089f052975481db52994cc18592c502c68b0d2a1e22f1f7830f0d8dd9a9ed86de96e28cce9f70c1 WHIRLPOOL 8b80d3963f65a62abb49805650a33b00be57f11892a7ce5e5fc7bdd6dc0d347adf959834998e8f9234e20ff1268727978ba9fe667b139ec16d72cb212a6a14bd
+EBUILD diffutils-3.3.ebuild 1449 SHA256 d136d1fb7e79c1edb4dc023c320a1d4b3419f9bf334c867da555c0db4a98bcd9 SHA512 b25387889515894f8b7249565f4c022b91268995ace9227829cbe67312a13222979eff92a9262816e5dff8043a70ddad635d6d53c06df2139324ab387dada12a WHIRLPOOL f774debbbc723d68bdd0d1e7409e4f5c43237698dc4e7fec9cac82cb22962c2a3cf5f1819ffe5f9f4ccf91cad3f364b6f69555bc12f973db26176910a41af4c9
+EBUILD diffutils-3.5.ebuild 1262 SHA256 2f1b87afa4e50935de904914e9e55086bbd12fd757253709eff19d7c190f0e4b SHA512 f7945872ccf1d61d411b1d209a522acc68e4a7c2261705b0be23f822c987b05ec92840693679e633ff5d1aaff198646c3df57aa12c0f0f16b2ea0297c5fef240 WHIRLPOOL c7fd0743e098943c5a15e45ca5e9b663e7a0f5fe39e875683452400b0c0ee6aa037681d03b43f9266cc57454b5fcd5aa83a691735467d918cc99e2189038e36d
+EBUILD diffutils-3.6.ebuild 1178 SHA256 927827b9a31051406ef26c28213831dcef0d81bcdd2896c05e140302fa7b222c SHA512 27e98ff03aba18e11a681fbdee5ae2b23b311806d647fe5dd07179d90ea8e277de0aa34f7e60d5d4c6077813c15f77f82a8be480bbe62efa53fd1b40af0428ff WHIRLPOOL a4f6115500887b188c78bcea35b2788d0fd3e9f526af11b76aaadedfdac1972bb9f820ab3fc087dd3da68de61cb106b78da6c6bd5baebdc6d350fd3eab07b07a
+MISC ChangeLog 4583 SHA256 86ed6ff382ada74c0bda309b713fb7400a00e67f752c24fea57953595b856cde SHA512 7e412c2cff75cd8f79c8c9d6b31ed7eb711c88026022e8055f5343f73bc448562934bca68f130a071f1b20d1cee2ea3492fc71ccc97464f104ff8b0df93d15c4 WHIRLPOOL ce2dfaf983cf603b73caf48a53e01b6578611cb9188854a9848a2e17bbc78241bf929c3e34b3e63ba6ccd0a82ee6298704d03930560329899aea25fe5d5db8e3
+MISC ChangeLog-2015 11823 SHA256 9b4d46735bf554fec25baee5aeaebe9cebb672a48f614aa8211bf5435690503e SHA512 29ff8ba52a49f483d629cf71a0832b8a2e05b2d37be8cfc7253024c7538784119eebc090fd1e7fbf8d2c718974f8b0ce0f1bd07f2950e36aa9352a0f290d5a3d WHIRLPOOL dae68c53bea1b79c1c26a56f4db6a81ea61422b51e0f57f761f3768de57a1b496d881f40f35bbc53e78529ccb2733189ad8a88f52a8360b03422adc091f5fbed
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/diffutils/diffutils-3.3.ebuild b/sys-apps/diffutils/diffutils-3.3.ebuild
new file mode 100644
index 000000000000..74de856d5c86
--- /dev/null
+++ b/sys-apps/diffutils/diffutils-3.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit flag-o-matic
+
+DESCRIPTION="Tools to make diffs and compare files"
+HOMEPAGE="https://www.gnu.org/software/diffutils/"
+SRC_URI="mirror://gnu-alpha/diffutils/${P}.tar.xz
+ mirror://gnu/diffutils/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static"
+
+DEPEND="app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_prepare() {
+ # Disable gnulib build test that has no impact on the source.
+ # Re-enable w/next version bump (and gnulib is updated). #554728
+ [[ ${PV} != "3.3" ]] && die "re-enable test #554728"
+ echo 'exit 0' > gnulib-tests/test-update-copyright.sh || die
+
+ sed -i 's:@mkdir_p@:@MKDIR_P@:g' po/Makefile.in.in || die #464604
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ # Disable automagic dependency over libsigsegv; see bug #312351.
+ export ac_cv_libsigsegv=no
+
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ $(use_enable nls)
+}
+
+src_test() {
+ # explicitly allow parallel testing
+ emake check
+}
diff --git a/sys-apps/diffutils/diffutils-3.5.ebuild b/sys-apps/diffutils/diffutils-3.5.ebuild
new file mode 100644
index 000000000000..4f4cc34faea0
--- /dev/null
+++ b/sys-apps/diffutils/diffutils-3.5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic
+
+DESCRIPTION="Tools to make diffs and compare files"
+HOMEPAGE="https://www.gnu.org/software/diffutils/"
+SRC_URI="mirror://gnu/diffutils/${P}.tar.xz
+ mirror://gnu-alpha/diffutils/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static"
+
+DEPEND="app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix_macros.patch"
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ # Disable automagic dependency over libsigsegv; see bug #312351.
+ export ac_cv_libsigsegv=no
+
+ local myeconfargs=(
+ --with-packager="Gentoo"
+ --with-packager-version="${PVR}"
+ --with-packager-bug-reports="https://bugs.gentoo.org/"
+ $(use_enable nls)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # explicitly allow parallel testing
+ emake check
+}
diff --git a/sys-apps/diffutils/diffutils-3.6.ebuild b/sys-apps/diffutils/diffutils-3.6.ebuild
new file mode 100644
index 000000000000..3a2a7b9e2be5
--- /dev/null
+++ b/sys-apps/diffutils/diffutils-3.6.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic
+
+DESCRIPTION="Tools to make diffs and compare files"
+HOMEPAGE="https://www.gnu.org/software/diffutils/"
+SRC_URI="mirror://gnu/diffutils/${P}.tar.xz
+ mirror://gnu-alpha/diffutils/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static"
+
+DEPEND="app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_configure() {
+ use static && append-ldflags -static
+
+ # Disable automagic dependency over libsigsegv; see bug #312351.
+ export ac_cv_libsigsegv=no
+
+ local myeconfargs=(
+ --with-packager="Gentoo"
+ --with-packager-version="${PVR}"
+ --with-packager-bug-reports="https://bugs.gentoo.org/"
+ $(use_enable nls)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # explicitly allow parallel testing
+ emake check
+}
diff --git a/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch b/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch
new file mode 100644
index 000000000000..ae820fc372ce
--- /dev/null
+++ b/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch
@@ -0,0 +1,19 @@
+http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/intprops.h?id=175b4e22f99e00996b72f822f5ae54dca8243d19
+
+--- diffutils-3.5/lib/intprops.h
++++ diffutils-3.5/lib/intprops.h
+@@ -230,11 +230,11 @@
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
diff --git a/sys-apps/diffutils/metadata.xml b/sys-apps/diffutils/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/diffutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dmapi/Manifest b/sys-apps/dmapi/Manifest
new file mode 100644
index 000000000000..ef799446c80c
--- /dev/null
+++ b/sys-apps/dmapi/Manifest
@@ -0,0 +1,6 @@
+AUX dmapi-2.2.12-headers.patch 354 SHA256 c5935312dd4d77156da023776c93036fa7989ce78ff8b9f6d9421c31a5535647 SHA512 b087227085d3e068323f2a01c1c7044e1885e47b04caa1050e8552ced50dddfab871608bdf67a027989c359f2852cbcedcffeb6708e182d6d5dc3bfc9609489e WHIRLPOOL d6ba5b0b44d1182cbea6a1c080c9ad01c4975495c5a67e9cc2e71b68b95509d8ea09992df5b94ebe92cb2c0b992fb15bd444812fa1949f084429c486abf68eb2
+DIST dmapi-2.2.12.tar.gz 367318 SHA256 b18e34f47374f6adf7c164993c26df36986a009b86aa004ef9444102653aea69 SHA512 aa44c0c7857158fed198deb9d1e00abaab549e3c22a7ce0e24e6088146bde56ecf967405b1b61a589460981ddcfaffbb1e9a2e677088efec317e3a7cb44abe4f WHIRLPOOL 5209b3a3b8afaf55eb26588cd8ffe085f58849b0b4a159851c0ffeefa0f8cf5aad53d9bea927099f3fced101e017867c538a081667ad684df5f2ff6685eac19e
+EBUILD dmapi-2.2.12-r1.ebuild 1082 SHA256 d98f1e924fb115d7412be4f0b4b89467cf77f13cac642c2fd4347e5a85a98260 SHA512 b3a1b29e98b0e4ec0d91f28e9753907953d0ac206cbcf0ccb44311ec476f5e2373f44e614b72429d5750b29e67bcde43b7ee39a1266340aef644c1035b0394d6 WHIRLPOOL 5cee21a1da5b554295bbd1ab77bdfc67a43b5038a06035ca09741dcca384147ef2bcfc0a82d0fba1dfd61fd6636f9b986a62e6e1332782adbf577b1afdea4fec
+MISC ChangeLog 3731 SHA256 a08ca9f448c2386c1faef6d9b4f42241827a9d08f7b95463f4febb711a158558 SHA512 eeb4407ee20e34ab9abdcd5cf703184b214f678b8437121aaf0417382763afe60a11a42ed340f25f083879ffe96e93fbce49e58261ba1f61a922e27a24f860d7 WHIRLPOOL 512f00111d4c7b51aacef999348a65de40f9ea422bca6ed2fb20a4201df60e291e65f8f933580bf60ca6f62b40ee28f03be3f969a62d1dfc3be1f7d1252ba9c2
+MISC ChangeLog-2015 9880 SHA256 c86f8981b3bb7e783d49b108014966925c2a4ff43ae85edd03260a4748200509 SHA512 1f00ef12e00838070915ca65f392983894308dd974f3d6585e296df98313aef63a00d0bfa5262f815bdef5c08662f0aaebd174663f81730ad46ad66af64303c7 WHIRLPOOL ed57568fcaea69941168a188875941f7ebcef607b4746c3e0ee7ff142327e47be5f2917832f8f99916417ff6016015c5cfa0dc8e4dd1de175cc70f0f7a15fb8f
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/dmapi/dmapi-2.2.12-r1.ebuild b/sys-apps/dmapi/dmapi-2.2.12-r1.ebuild
new file mode 100644
index 000000000000..c08b9b92e585
--- /dev/null
+++ b/sys-apps/dmapi/dmapi-2.2.12-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="XFS data management API library"
+HOMEPAGE="http://oss.sgi.com/projects/xfs/"
+SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
+ ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="static-libs"
+
+RDEPEND="sys-fs/xfsprogs"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ include/builddefs.in \
+ || die
+ epatch "${FILESDIR}"/${P}-headers.patch
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ export OPTIMIZER=${CFLAGS}
+ export DEBUG=-DNDEBUG
+
+ econf \
+ --libexecdir=/usr/$(get_libdir) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-dev
+ gen_usr_ldscript -a dm
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/${PF}/COPYING
+}
diff --git a/sys-apps/dmapi/files/dmapi-2.2.12-headers.patch b/sys-apps/dmapi/files/dmapi-2.2.12-headers.patch
new file mode 100644
index 000000000000..259e1aec3a09
--- /dev/null
+++ b/sys-apps/dmapi/files/dmapi-2.2.12-headers.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/560212
+
+pull in headers for funcs that are used
+
+--- a/libdm/dm_handle2path.c
++++ b/libdm/dm_handle2path.c
+@@ -20,6 +20,9 @@
+ #include <dmapi_kern.h>
+ #include "dmapi_lib.h"
+
++#include <fcntl.h> /* open */
++#include <unistd.h> /* close */
++#include <string.h> /* strlen */
+ #include <mntent.h>
+ #include <dirent.h>
+ #ifdef linux
diff --git a/sys-apps/dmapi/metadata.xml b/sys-apps/dmapi/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/dmapi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dmidecode/Manifest b/sys-apps/dmidecode/Manifest
new file mode 100644
index 000000000000..c83e85964ee7
--- /dev/null
+++ b/sys-apps/dmidecode/Manifest
@@ -0,0 +1,10 @@
+AUX 2.12-supported-smbios-version.patch 1349 SHA256 515b3b3cdf4c46c996a93f12686784a831dd0d9491f01c2bc0fee2a5e109982f SHA512 797c05cf5a5982559b44c83080702f93046f4d9f3ffdde033f7817b6b9c0d221ffa7be311c65ead3e5cb1e836636a68c979f9472e60c83794c3f063f8f40a5f8 WHIRLPOOL 3752b59726df333cdae28ae98d61414747198c1f9201c0db2fa0086c2264a5a0ed9619935cbc6d2f0676d696fdf0927d0e08b603ab190660ecb137f1ecc40bac
+DIST dmidecode-2.12.tar.bz2 55191 SHA256 913ff3055d563a62a420789b8ee33b038de9afa18ea61254760ddf8ab87a5088 SHA512 15d5a6dca04de48267f969f6866079915964a8a3abad083b1720a4425723f9c100770d05c0d475df9609c5b54741f231a587761d1beb1ae6de4b2836d60724c4 WHIRLPOOL 139841a9efd07ecfcb012a24e2c3ea00c79d66828a5d5aa1eeb8b230c1b84f310e5f9282403af9f530f7ead41922f7a3e8a6e8b93e46d7403d69975b95d6a406
+DIST dmidecode-3.0.tar.xz 58704 SHA256 7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45 SHA512 fa31190e43ae7a0b61f6313b45f5eba3ab66390accd587129419e48fca931b631cbb331d6893cf0c1bfca94c86ff8c557215166e0881dee93b3af10a86878eb1 WHIRLPOOL 91f8b26c272fbaa06699f3cdb593a731a0d1e777ba81ee432192e41c1f2edda764ed990b570c2dc2fc44d6ce324d5a252c01308811717db1cd2baebe98b7e176
+DIST dmidecode-3.1.tar.xz 61204 SHA256 d766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0 SHA512 226557ad5747a2a2eb54a938543373b9ddcff032d330ca3b9a066cc81c0e137028f606ffedc042e0220b523346e2f2f7abb0e4b8b34a8bd173719aa858519de9 WHIRLPOOL 96b92aed81cdedec498b2e3f20cd282310b0bd63545ce6200d187f583851e684f877f9dd7f5b916aa5b2e2efd215271f9951acc2073da0d2f35d5f129295014c
+EBUILD dmidecode-2.12-r1.ebuild 1198 SHA256 da1c6e9ce784a53d13212347630ef81e07822ca36c866506634bbec30aa37edc SHA512 568afe3fddf1a9c65a9ad7b2281a5a9fad174eed6e2d41a080a7b4e9e1622584324778ba4d6709b4e27f12048bf38f096c64bd55d006815c124785819fdfdaee WHIRLPOOL 0a00b78d3111b809d07b6f99a9e21804321812271f13242cea1be5736005ffe1cf0332344731162bd5fc3a62ccf1ab69169d5ac42c19be7f98a6f99e0b97c60d
+EBUILD dmidecode-3.0.ebuild 1145 SHA256 ed82c1e21bbf98c361464045ec7f4bafc9b0b8ae1c7c7ae8297c2e9a670b9920 SHA512 9a361a7c80194bb062b6d27d9f06bb8446298da1a09801223ab9c52e275904486945229a769b8441c51eb0c508982ee6eae116027ef3b22bded76b9f132edada WHIRLPOOL d08a2febe20ba834ff14676249ed73da23268654c0b73952663103010caf426ae69a319b9751f1777b64fe49fde14806108d9ac26ac8905d3716919eabbf544c
+EBUILD dmidecode-3.1.ebuild 1150 SHA256 8997ad8be227b83d0f321bb945766bfecfc9f5bf483bd2026bf8fbbf5cbbecb1 SHA512 650cfd9c23c74bd350ee72d08ce53c9179d93b215539e5f1d168a944ef090eb32281e9448b90a93d2892d286320cf2f0cbee6bf8b7eae4ee3520bcbd3fce563a WHIRLPOOL a9fd3a8dced47f710c981be7b0adff3a6e80a77ded07e0004e33d904ee731c9d866debdff8a97c2f0c26f32537ab7aaf4ce2bbdab0a8f48cfdfb77c648c09b17
+MISC ChangeLog 3491 SHA256 d6549c481780b534115f78ef511ee9e819f31515f2ac0f09b27112d75204b0cb SHA512 11e67fb9404c14281ec816cfce6a3333a0ba0575028dfa8cb7526256d1532a4d86d00815022103abfe3ed8379e35858722ec8e41b9723032b457a45154694c51 WHIRLPOOL 2affdad9aeb4bfe8fe78a40e47a38df1629149849ae75104c9d28d41b9a5a3d8f4620e17d4fc0ddfcc7ba129e86eec4eb5a02cc18c6df446311aa9d82c97763b
+MISC ChangeLog-2015 6728 SHA256 a88a19d2777f296ad17b130304c650f7862db17d81173222550eed821e29c7dd SHA512 f678fa2e43405554fde5a0e84b16888daf89a37e8af1a23c2710a16ce7b096d6f6baf2d2704d97388c6aef573d937fb7b94a273e9f5dab58e1730da949226a39 WHIRLPOOL 9f3a4f6803ca77a0234ca87bf38eccb7802c04ba53e442cc81657b94f48bec5fda8b059dac4a033c1322903584fcb73383af7393a522f04ee0cf4298ad5b0dcf
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild b/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild
new file mode 100644
index 000000000000..03c53646f8f5
--- /dev/null
+++ b/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE="http://www.nongnu.org/dmidecode/"
+SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-solaris"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-supported-smbios-version.patch"
+ sed -i \
+ -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
+ -e "/^docdir/s:dmidecode:${PF}:" \
+ -e '/^PROGRAMS !=/d' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ einfo "dmidecode needs root privileges to read /dev/xsvc"
+ einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
+ einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
+ einfo "information without requiring root privileges."
+ fi
+}
diff --git a/sys-apps/dmidecode/dmidecode-3.0.ebuild b/sys-apps/dmidecode/dmidecode-3.0.ebuild
new file mode 100644
index 000000000000..a21456f2e204
--- /dev/null
+++ b/sys-apps/dmidecode/dmidecode-3.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE="http://www.nongnu.org/dmidecode/"
+SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 arm ~arm64 ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-solaris"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
+DEPEND=""
+
+src_prepare() {
+ sed -i \
+ -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
+ -e "/^docdir/s:dmidecode:${PF}:" \
+ -e '/^PROGRAMS !=/d' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ einfo "dmidecode needs root privileges to read /dev/xsvc"
+ einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
+ einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
+ einfo "information without requiring root privileges."
+ fi
+}
diff --git a/sys-apps/dmidecode/dmidecode-3.1.ebuild b/sys-apps/dmidecode/dmidecode-3.1.ebuild
new file mode 100644
index 000000000000..1982039343e9
--- /dev/null
+++ b/sys-apps/dmidecode/dmidecode-3.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE="http://www.nongnu.org/dmidecode/"
+SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-solaris"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
+DEPEND=""
+
+src_prepare() {
+ sed -i \
+ -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
+ -e "/^docdir/s:dmidecode:${PF}:" \
+ -e '/^PROGRAMS !=/d' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ einfo "dmidecode needs root privileges to read /dev/xsvc"
+ einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
+ einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
+ einfo "information without requiring root privileges."
+ fi
+}
diff --git a/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch b/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch
new file mode 100644
index 000000000000..84feaca79ef9
--- /dev/null
+++ b/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch
@@ -0,0 +1,55 @@
+diff -uNr dmidecode-2.12.ORIG/dmidecode.c dmidecode-2.12/dmidecode.c
+--- dmidecode-2.12.ORIG/dmidecode.c 2014-05-06 14:24:27.703057950 +0100
++++ dmidecode-2.12/dmidecode.c 2014-05-06 14:24:43.136058719 +0100
+@@ -69,7 +69,7 @@
+ #define out_of_spec "<OUT OF SPEC>"
+ static const char *bad_index = "<BAD INDEX>";
+
+-#define SUPPORTED_SMBIOS_VER 0x0207
++#define SUPPORTED_SMBIOS_VER 0x0208
+
+ /*
+ * Type-independant Stuff
+@@ -712,7 +712,6 @@
+ { 0x3D, "Opteron 6200" },
+ { 0x3E, "Opteron 4200" },
+ { 0x3F, "FX" },
+-
+ { 0x40, "MIPS" },
+ { 0x41, "MIPS R4000" },
+ { 0x42, "MIPS R4200" },
+@@ -729,7 +728,6 @@
+ { 0x4D, "Opteron 6300" },
+ { 0x4E, "Opteron 3300" },
+ { 0x4F, "FirePro" },
+-
+ { 0x50, "SPARC" },
+ { 0x51, "SuperSPARC" },
+ { 0x52, "MicroSPARC II" },
+@@ -1176,7 +1174,7 @@
+ "Socket LGA1356-3" /* 0x2C */
+ };
+
+- if (code >= 0x01 && code <= 0x2A)
++ if (code >= 0x01 && code <= 0x2C)
+ return upgrade[code - 0x01];
+ return out_of_spec;
+ }
+@@ -2236,7 +2234,7 @@
+ if (code == 0)
+ printf(" Unknown");
+ else
+- printf(" %.3f V", (float)(i16)code / 1000);
++ printf(" %.3f V", (float)code / 1000);
+ }
+
+ static const char *dmi_memory_device_form_factor(u8 code)
+@@ -2338,7 +2336,7 @@
+ {
+ int i;
+
+- for (i = 1; i <= 14; i++)
++ for (i = 1; i <= 15; i++)
+ if (code & (1 << i))
+ printf(" %s", detail[i - 1]);
+ }
diff --git a/sys-apps/dmidecode/metadata.xml b/sys-apps/dmidecode/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/dmidecode/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dnotify/Manifest b/sys-apps/dnotify/Manifest
new file mode 100644
index 000000000000..28550683f6a0
--- /dev/null
+++ b/sys-apps/dnotify/Manifest
@@ -0,0 +1,7 @@
+AUX dnotify-0.18.0-glibc-212.patch 213 SHA256 c4a86fe0c594e5ce220f4deca46573dac6fe04873569ec13eaa4d19d1008eaf3 SHA512 c778bab7d8db86d3d3a0d5ca91e872bcedf995285b238e7d14630eba51c7d9c05b6533d2e2c790b80f6c66a70978f14108ba78d4de6847b5963b0415f1ff23cf WHIRLPOOL 1a762d33d64c3e2f273d1349d56973196157d7c0356146476f879632daa689921b5312d64209a16d537d85c3dd3ace101011d4a230eed527ad2301ca2978747e
+AUX dnotify-0.18.0-nls.patch 248 SHA256 aee122aae38a8730a3f76a6caf6f63ec8e9ce033d1edbb6e878ed4c1cbdfe0c2 SHA512 afb1fdde6adb06d7cd56004b3b2c1c67f3e264c2087df32f3b99651ce308f74d6b499c3b87a00e2baac35f67ce3163445efe3a6592dd2d4d7b8ecfb2cc9394f5 WHIRLPOOL f9402293f8d86b4865b8a95e60cf0c18eb5778bbca6493b1f4876e6aa98e7c9136dd1c9584454cbdc67f56fe098e40a71a5538ddcbf0c2be10eab40ae6858a91
+DIST dnotify-0.18.0.tar.gz 187909 SHA256 2c1a1aeb3b6471d9c17b769e86235fed4020f2009c6f6841728b94020df67bf1 SHA512 5b41fcf131b3ed5e16f7003e0b9b11952b03b7e2ef27554dd40b0b3de3f9c6d2f7911a76e5c4abe079edd5596f416226a28ebd6b4a8f05c589216c2a6e16446e WHIRLPOOL e6f54e10426d40349efdf967aaeb52e7cd5b27c274367c6102ac4676351381eb7fc66dfa80148ede1e6423f26c25314d2c8ed6d03fe83d3e9198f744c0e9b551
+EBUILD dnotify-0.18.0.ebuild 650 SHA256 8aea63e410e9f20d26517b70cb39a71fd30bbc8f9ed22d419fef8182a66da1df SHA512 56688090590f7f5dd74b5590e18b96bf974f5aec17771ae4ee4b1de5520998d8102a31e51f706d161f427ac271eeaef554d9fd6b7e76114e528c728e79c37195 WHIRLPOOL 0afb2e1463cb24091a8d62a6c40a41b15e4fea6adf5a3053a7fc69be29dbca0f130f2c8fdd9247b833543055876e1e0da6cc3aa04bf84b9119ce7c9a23ef75b1
+MISC ChangeLog 3002 SHA256 6c30a7210482eb36f19603356a17fd86138708d1be9a1ed68f1ad80a768be9e6 SHA512 f836ed07634a7d9690a441d4b01f29df96ce4f85b5e05195eac770da8415928a5ac6b1eb85ab2a634caf2200a66c891bd68ff3e59fb04bc1330b94a2e3fa831a WHIRLPOOL 700a4c477a1be9107c6ea3cc64f26976316ea68aded25827e9e40bb9437951284ad11f122c728d8b0326bbfd3b0bbab2e149f85746186915159205135891defe
+MISC ChangeLog-2015 3139 SHA256 ca2dca470f403c4d8be63e9e2f46906f11ede57b6e85af53cb496baf924ac182 SHA512 f6217db3002aeb649ec263ff734d11ebeac9d9e40d169ead737f553b519a590c5b0a4565c25afa8e314a8193d18d84eacfbd621b5d742113cd43b2caab298600 WHIRLPOOL 14628052e803b0ae1b506304eae11ef586b648db38809bfdffe6e72c44de82797615be82a59852ff671284828a9c34fe85437915f26893e5ef297bc1c4cd57ae
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/dnotify/dnotify-0.18.0.ebuild b/sys-apps/dnotify/dnotify-0.18.0.ebuild
new file mode 100644
index 000000000000..440759ad96ac
--- /dev/null
+++ b/sys-apps/dnotify/dnotify-0.18.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Execute a command when the contents of a directory change"
+HOMEPAGE="http://directory.fsf.org/project/dnotify/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc -sparc x86"
+IUSE="nls"
+
+RDEPEND=""
+DEPEND="nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nls.patch \
+ "${FILESDIR}"/${P}-glibc-212.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS TODO NEWS README
+}
diff --git a/sys-apps/dnotify/files/dnotify-0.18.0-glibc-212.patch b/sys-apps/dnotify/files/dnotify-0.18.0-glibc-212.patch
new file mode 100644
index 000000000000..6cc6e6f40092
--- /dev/null
+++ b/sys-apps/dnotify/files/dnotify-0.18.0-glibc-212.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/336649
+
+--- src/main.c
++++ src/main.c
+@@ -19,6 +19,7 @@
+
+ #include <config.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <stdarg.h>
+ #include <errno.h>
diff --git a/sys-apps/dnotify/files/dnotify-0.18.0-nls.patch b/sys-apps/dnotify/files/dnotify-0.18.0-nls.patch
new file mode 100644
index 000000000000..7721ac1ee411
--- /dev/null
+++ b/sys-apps/dnotify/files/dnotify-0.18.0-nls.patch
@@ -0,0 +1,10 @@
+--- src/gettext.h.orig 2006-01-27 18:23:31.000000000 +0100
++++ src/gettext.h 2006-01-27 18:25:07.000000000 +0100
+@@ -24,6 +24,7 @@
+
+ /* Get declarations of GNU message catalog functions. */
+ # include <libintl.h>
++# include <locale.h>
+
+ #else
+
diff --git a/sys-apps/dnotify/metadata.xml b/sys-apps/dnotify/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/dnotify/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dog/Manifest b/sys-apps/dog/Manifest
new file mode 100644
index 000000000000..2dd7e3f24eb6
--- /dev/null
+++ b/sys-apps/dog/Manifest
@@ -0,0 +1,9 @@
+AUX 1.7-manpage-touchup.patch 502 SHA256 0e2ab435e58f0a37c6a99d553e9d23bee200f79ccf65bd543895370bdfafd256 SHA512 b10244561296a082c98e79623789f660d4c964c4c32dc8e60962847b6f8fc4f9843c1c5dab96ac9f9202255b55c424131c91b22f9442f2ee2a241948dac5b4c3 WHIRLPOOL 1b44fa5a2ce2c6bce22fe7a79d06fdcec5e93211652ad32af8ea624d1ee8ecd9fd84a861593c2d212c45d0bda4ca7f25744c9be877555fa792d00f44bc7424b2
+AUX dog-1.7-64bit-goodness.patch 773 SHA256 0f8faf9963fd3e12efb7349a1c63d455650877b087bb0048f54daa67aec24e7b SHA512 479086b023302886618fab874d2466d6a79b755f62de11b37fa26070f266fec7ae4578affdca4746ca7e1eb728ba29fce537c3c53ee52ac54e36cbe75e3de36e WHIRLPOOL bc4b6e995a0ff83cf5ef74c85aea8b3b400652e9a4e102b6dc7d99f7e5ab2509c295697b241b4d08f0b6fe140218f09fe24e1c9d12ecbd6c1af150c550c17c71
+AUX dog-1.7-check-ctime.diff 1355 SHA256 74b275706cc7a61374db34b4b9883b3d24b1d3d1714e51847974d16b5ab3c4b0 SHA512 8892c0ad357ca53dd00e6402dadd1ce05ae52cf6c8eb9745ef1406ab95bd1357558b94d85e0b8eb3a8de7a209e8be9f9e020cc378804f88b180496b294de8b5b WHIRLPOOL 17a543388d91701025fd15d772e6c44b133935d81040a14adc908ea8633b93db8e8cde4134f8fc9b5d92334af55926987aeccd71584d71e8ffb48df80f4403bc
+AUX dog-1.7-strfry.patch 287 SHA256 e5700703d3be2875a75788bcc30d16e99e044e6065ef1f17b7aa5fec92316ed6 SHA512 a00051d4a190c56d08c4cfd2ebc9cf5201dc945043906b9185547b83c478220675a1f99f1fdc6903b0150ae2942868ab951a650ce0104989c702a268077a2513 WHIRLPOOL 5a54edff46e295d73abb9c1286448c84dff9b981b20591bd6f37a09e1912d94740297bf3af0a629ce6ccfa122ee56d6fb9cdc41d415af017356cfde6109e0c20
+DIST dog-1.7.tar.gz 30433 SHA256 6c5386d1b6401d6410baa8f0da343de5625cd3d59b6273dcee81997c372522ca SHA512 852373ba988075a47c60c38da0ff3a344f996e6e149d23e1061d6f8fbb0999f32c975c323944375ba758e5663efa57f62c8ff88d46264f72196ea450eacfa4f5 WHIRLPOOL 1c9b41628970b2c7b085c6b01ef40a77058b8b010bbd38713b1f131ce30bc49f64cb03bbcf91bb6eeec5909fbced58d531d78d17a3cec46e6000d7d5f43a1fb2
+EBUILD dog-1.7-r6.ebuild 971 SHA256 44a815921bc90d26503f3e2aada3dbfd02e583d3148547bfad60e9299a7442de SHA512 37f2adc853937d5cc8befe60c2a391741ebacbe4ce414127b342cea8e054ecf33e819c8bf2a85d63f356ab764d1132bd29c785b69b83a33a2428216c3d536753 WHIRLPOOL 5d711bd5fee0ff8579452acee450f144f7f95d46346b03afbafed29a64c70098992ecd7032f13456f7dc27f3dbf6923a82fcefb3fb1fb2f8ce9c4e8d59d969f2
+MISC ChangeLog 3075 SHA256 8024cfcec99397be1c4fb0cc8c48643db5530174adb6ffad08880b1ec6b7eb27 SHA512 1564a8f2f00776c55e8f779ff2677ef5776014ec4209991957a075a575d0dfe8cbae610d5331e5f42caf9934be5146c93a7189c85af8793ef4c1d9435d108b3e WHIRLPOOL 422ab4c536aff0451243c24947f912e5a4a8d4ba54fc88dd8a5464aeaac8a3a267a109569b723b65df641b75ad635fdac9cc4808e24b01ec3b822f2c6b55f142
+MISC ChangeLog-2015 4650 SHA256 3b2d1c106cb0a598fd54e0ae2b279adb8c48ff09b64b50adf8a091f2f563f3d2 SHA512 e90244cbcf52b5f67e9eb2af0f905567b15c55a95147070601478da4d5c2c35a457881099dd077c56ce8951b17531690af71ed9984f6f33e59a505c561d74426 WHIRLPOOL 4e92883509687103206e9615fef835e9c1d472863f070a08c0850703f3fe977fb3295b52984b9ce15df0dc1ea49fa57a8cbec4859d178ef90e7fcddc0453f0cb
+MISC metadata.xml 265 SHA256 5c4f9426c69dd2191012bf8aae1952f4f6298c1f6ff0ec1e45fe0e05327694e9 SHA512 176f814d8c555e8726f36e012367b698e8a19a0662982621029a7f9190beecc5e6798e43c51698dc149364966cdeff7061121e54fa9d4cf2a3559a6ce4904e25 WHIRLPOOL 2fa84a9f23f48e804ab20a6fabe2707f86227bded2a41d3af30958db5a69bc6276140a7f035a256caeca5a8b8ce1c240383c300a90fc4a83334c178769bc3519
diff --git a/sys-apps/dog/dog-1.7-r6.ebuild b/sys-apps/dog/dog-1.7-r6.ebuild
new file mode 100644
index 000000000000..7b302d7d6f7b
--- /dev/null
+++ b/sys-apps/dog/dog-1.7-r6.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Dog is better than cat"
+# the best HOMEPAGE we have.
+HOMEPAGE="https://packages.gentoo.org/package/sys-apps/dog"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc64-solaris"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-check-ctime.diff
+ "${FILESDIR}"/${PV}-manpage-touchup.patch
+ "${FILESDIR}"/${P}-64bit-goodness.patch
+ "${FILESDIR}"/${P}-strfry.patch
+)
+
+src_prepare() {
+ default
+
+ if [[ "${CHOST}" == *-solaris* ]]; then
+ sed -i '/gcc.*-o dog/s/$/ -lsocket -lnsl/' \
+ Makefile || die "sed Makefile failed"
+ fi
+
+ sed -i \
+ -e 's,^CFLAGS,#CFLAGS,' \
+ -e "s,gcc,$(tc-getCC)," \
+ -e 's:-o dog:$(LDFLAGS) -o dog:g' \
+ Makefile || die "sed Makefile failed"
+}
+
+src_install() {
+ dobin "${PN}"
+ doman "${PN}.1"
+ einstalldocs
+}
diff --git a/sys-apps/dog/files/1.7-manpage-touchup.patch b/sys-apps/dog/files/1.7-manpage-touchup.patch
new file mode 100644
index 000000000000..17400a5207f5
--- /dev/null
+++ b/sys-apps/dog/files/1.7-manpage-touchup.patch
@@ -0,0 +1,18 @@
+The correct syntax of the -w option does not have a space between
+the -w and the cols ... the manpage seems to imply differently though
+so let's fix it.
+
+http://bugs.gentoo.org/show_bug.cgi?id=69660
+
+--- a/dog.1
++++ b/dog.1
+@@ -8,3 +8,3 @@
+ .B dog
+-[\-AbBeEnstTuv] [\-w cols] [\-l lines]
++[\-AbBeEnstTuv] [\-w<cols>] [\-l lines]
+ [\-\-show\-all] [\-\-number\-nonblank] [\-\-no\-blanks] [\-\-bind=port]
+@@ -64,3 +64,3 @@
+ .TP
+-.I \-w n
++.I \-w<n>
+ Print first n characters of each line (default=80)
diff --git a/sys-apps/dog/files/dog-1.7-64bit-goodness.patch b/sys-apps/dog/files/dog-1.7-64bit-goodness.patch
new file mode 100644
index 000000000000..5f053ace0feb
--- /dev/null
+++ b/sys-apps/dog/files/dog-1.7-64bit-goodness.patch
@@ -0,0 +1,33 @@
+diff -ur dog-1.7/dog.c dog-1.7-64bit/dog.c
+--- a/dog.c 2000-06-21 18:04:43.000000000 +0200
++++ b/dog.c 2005-05-23 10:40:58.613766328 +0200
+@@ -38,22 +38,13 @@
+ #include <limits.h>
+ #include <netdb.h>
+
+-// this is fun
+-#if defined(__alpha)
+-#define uint16 unsigned short
+-#define int16 short
+-#define uint32 unsigned int
+-#define int32 int
+-#define uint64 unsigned long
+-#define int64 long
+-#else
+-#define uint16 unsigned short
+-#define int16 short
+-#define uint32 unsigned long
+-#define int32 long
+-#define uint64 unsigned long long
+-#define int64 long long
+-#endif
++#define uint16 uint16_t
++#define int16 int16_t
++#define uint32 uint32_t
++#define int32 int32_t
++#define uint64 uint64_t
++#define int64 int64_t
++
+ #if defined(__STDC__)
+ #define __dog_signed signed
+ #else
diff --git a/sys-apps/dog/files/dog-1.7-check-ctime.diff b/sys-apps/dog/files/dog-1.7-check-ctime.diff
new file mode 100644
index 000000000000..03442b8e45d5
--- /dev/null
+++ b/sys-apps/dog/files/dog-1.7-check-ctime.diff
@@ -0,0 +1,53 @@
+diff --exclude='*~' --exclude='.*' -I '# $Id$
+--- a/dog.c 2005-05-13 08:01:37.000000000 -0400
++++ b/dog.c 2005-05-13 08:30:38.000000000 -0400
+@@ -36,6 +36,7 @@
+ #include <string.h>
+ #include "getopt.h"
+ #include <limits.h>
++#include <time.h>
+ #include <netdb.h>
+
+ // this is fun
+@@ -1321,26 +1322,35 @@
+ InetSockAddr sa;
+ int newsock;
+ uint32 ipAddr;
+- int k;
++ socklen_t k;
+ time_t curr_time;
+ char curr_date[64];
+
+ k = sizeof(sa);
+ while ((newsock=accept(sock,(struct sockaddr*)&sa,&k)) != -1) {
+ if (!no_bind_header) {
++ char *result = NULL;
+ ipAddr = ntohl(sa.addr);
+ time(&curr_time);
+- strcpy(curr_date,ctime(&curr_time));
++ if (!(result = ctime(&curr_time))) {
++ perror("ctime");
++ goto done;
++ }
++ strncpy(curr_date, result, sizeof(curr_date) - 1);
+ while (!isalnum(curr_date[strlen(curr_date)-1])) {
+ curr_date[strlen(curr_date)-1] = 0;
+ }
+ printf("# %s from %d.%d.%d.%d:%d\n",curr_date,(int)ipAddr>>24,(int)(ipAddr>>16)&0xff,(int)(ipAddr>>8)&0xff,(int)ipAddr&0xff,ntohs(sa.port));
+ }
+- straight_dump = newsock;
+- DumpThings(argc,argv,hang_up_bind ? -1 : newsock);
+- if (hang_up_bind) {
++
++ goto done;
++
++ done:
++ straight_dump = newsock;
++ DumpThings(argc,argv,hang_up_bind ? -1 : newsock);
++ if (hang_up_bind) {
+ close(newsock);
+- }
++ }
+ }
+ }
+
diff --git a/sys-apps/dog/files/dog-1.7-strfry.patch b/sys-apps/dog/files/dog-1.7-strfry.patch
new file mode 100644
index 000000000000..cfdae3e787ed
--- /dev/null
+++ b/sys-apps/dog/files/dog-1.7-strfry.patch
@@ -0,0 +1,13 @@
+See Gentoo bug 251675. Upstream appears to be dead.
+
+--- a/dog.c 2009-04-09 23:29:16.307661147 -0500
++++ b/dog.c 2009-04-09 23:30:11.353664890 -0500
+@@ -552,7 +552,7 @@
+
+ // strfry()
+ #if ALLOW_STRFRY
+- if (opt_strfry) {
++ if (opt_strfry && str_len > 0) {
+ strfry(str);
+ }
+ #endif
diff --git a/sys-apps/dog/metadata.xml b/sys-apps/dog/metadata.xml
new file mode 100644
index 000000000000..3cf14bf74636
--- /dev/null
+++ b/sys-apps/dog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/dstat/Manifest b/sys-apps/dstat/Manifest
new file mode 100644
index 000000000000..f786fb837d9e
--- /dev/null
+++ b/sys-apps/dstat/Manifest
@@ -0,0 +1,5 @@
+DIST dstat-0.7.3.tar.gz 135583 SHA256 46e63821857b69fbc60cb2c7d893ccdd6f31cd9ef24b8bb0b68951e1c7374898 SHA512 db37cc8bb7afd235ae9088e76c4defaa4d76651b111fbfdcd0980bc96376de20d57964912799a413397a79651730503bdeb8fea5cb97ab4d6d81632f528aefd2 WHIRLPOOL ad1b2c9647aae6f5002dd7474909c29ae7ca9bdb6efd10b42ce95b9b58f49406e9b13ed3863e4946166da34c597613751b314d5915886d349f916f2159559a6a
+EBUILD dstat-0.7.3.ebuild 753 SHA256 35e0308a942a4fa61d267a586cfad37ad2cc328cf05e8b123a689c70b514f259 SHA512 2a93ce025a9b482da954ca94f6cf76d608bc913fc40e3001f8d668ac80415d18156832758d1e2cf3a6240174fe129936dcf3f5d268d8e70d4586dd9644cc4acd WHIRLPOOL 2f8d254608a42ba12f4443e8aab25d18d810a9010cbfa8a01615ab39bb8df171b6b3639d9c22f0e1db47e2cdc38fb91fcf93681aaf5776b30a091c114e90a88e
+MISC ChangeLog 2838 SHA256 bb08535b57f4db15661c0c4ac3f5681bfe4b21008bbb0d86b0e2c42b2a6385e3 SHA512 5916863042369e42e855c71c4defa23051fe775d9929c74c783bc81937f16548593fdfcb3693e3868cbaf572e23a1f0766eb20823ebf013221c6f9024067eba6 WHIRLPOOL 8d3dff4e102663330262b07ff7ac248739871e24c21428a6408e6cf01897f526608af1945c2406ac28091bc3c67d0bd2ff1bfc0a757b67059a02918bc79edb40
+MISC ChangeLog-2015 5962 SHA256 311999a28f4a9512cd4f044905cd2ccf949a8474e5fc3643025628889a48927c SHA512 0b3957cae1d409a1f2f3ea66fdd99939f4690d45fbb58973906c1040faad2faedc898138ad91f0d72539a3d1143cb68cc7d11477c6dbf530a50a25a2af98b6b6 WHIRLPOOL 362a2999f85572892916b4b4dde264cb5da23db5f49f36781c7c3375b004ccca76b321c50a6eee6ff4c0b8870a7a8f50096f51240de56af3091b721aff1b7e24
+MISC metadata.xml 832 SHA256 4de1a45f76c1dfbf8fc76fbb0b395494a36570ee633ecca8e7efa9f7f95dd737 SHA512 ef01b0db1825319610196c1e51ba115bd0160b5aaa056ad75a4829e4d068a8e6ffc071ada94e03a81d315d5d9597a502761ee4041848ffc135b980b41486017c WHIRLPOOL 80f30766c62d7197d3ff5b2806b2790f2ed5a1a49d6f88ca3af4d0d479cb867f26c3d2c93516f3b26670c4298491ab286852af89e40011fe1c5562da8885e121
diff --git a/sys-apps/dstat/dstat-0.7.3.ebuild b/sys-apps/dstat/dstat-0.7.3.ebuild
new file mode 100644
index 000000000000..38eec6ece2d6
--- /dev/null
+++ b/sys-apps/dstat/dstat-0.7.3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="Versatile replacement for vmstat, iostat and ifstat"
+HOMEPAGE="http://dag.wieers.com/home-made/dstat/"
+SRC_URI="https://github.com/dagwieers/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="wifi doc examples"
+REQUIRED_USE="wifi? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ wifi? (
+ ${PYTHON_DEPS}
+ net-wireless/python-wifi
+ )"
+DEPEND=""
+
+src_install() {
+ default
+ if use examples; then
+ dodoc examples/{mstat,read}.py
+ fi
+ if use doc; then
+ dodoc docs/*.html
+ fi
+}
diff --git a/sys-apps/dstat/metadata.xml b/sys-apps/dstat/metadata.xml
new file mode 100644
index 000000000000..88b554a0aae1
--- /dev/null
+++ b/sys-apps/dstat/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ </maintainer>
+ <longdescription>
+Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes
+some of the limitations and adds some extra features.
+
+Dstat allows you to view all of your system resources instantly, you can eg.
+compare disk usage in combination with interrupts from your IDE controller, or
+compare the network bandwidth numbers directly with the disk throughput (in the
+same interval).
+ </longdescription>
+ <use>
+ <flag name="wifi">Enable wireless network functions</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">dagwieers/dstat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/dtc/Manifest b/sys-apps/dtc/Manifest
new file mode 100644
index 000000000000..af4f77946b46
--- /dev/null
+++ b/sys-apps/dtc/Manifest
@@ -0,0 +1,15 @@
+AUX dtc-1.4.1-echo-n.patch 2169 SHA256 0577e72f0d9ad18bb3699a1033cd19824948146d625db4637cf6b3a0a29b32f3 SHA512 e481ed5489557dccbb31274bae2afc7798da79db63052db7e490b3428f04d01cf5661e8ce9794886a4669f5fbc783b8f5ac1993e34e9ae351a6e6207b10e4b2f WHIRLPOOL dfff36f3ef90ad8d03c33e86c25328646d935065ee24c6f473d4586aa8cd6dc64060ea92b038dbfe0ca9ec5f1f73b07cc48381436f1d9ed76d3b97fd97682f2f
+AUX dtc-1.4.1-missing-syms.patch 851 SHA256 668fccb537b1b26a51c85b6e6959f638abd3c0c68bc37bda5d2f05b608f71c94 SHA512 8217b73ea88f5e48ab4192074f6ce6dc21eebd1cef362fabee32fdd7a50951a2c55ea8d738e43d140763b93821b8f84dbe35c8871c6018a4d56191bb3f3e9ecb WHIRLPOOL 321ee4881411a787aa1cbcddaeb732e17d80b63394a5bf9dc0f2783ea975396b0114c9d1ccb0cee3918d9c7bebf64ed50f31a6f0b6f2294dc9bd842bfe6a142f
+DIST dtc-1.4.1.tar.xz 107920 SHA256 77992ad8eac7b68f553d0ba58e5b51604ac803d126196c99e3ae38aaae28bb94 SHA512 63df730e65f62b8c9648cfee5461809188f4198cbf98de25fbe5cb7f2f43c405266abb740501740f59847dc6faf0588bcbc734d08ae5430b05c2601e070d6d05 WHIRLPOOL 93e9ed26024e4650bb2de6323ea639a3e52622aa3891a9f9404959b600d2c1cbc633d18e30d3629ac54ae662e8c58a7d0ca7910a9b323cd8dd4ff6e43a3fdf67
+DIST dtc-1.4.2.tar.xz 112480 SHA256 13456ee9840abbbcb956d0711c580d28524e2ee17840e556e744311f2d8afaac SHA512 af536fda543a2516e10c45b80bd1b5797a33ab43e08fab6953ec861fc98a73ee232cdd3f5053e889f6e760d238a5a221c2716b8a6fd22b627cd01efac99915b2 WHIRLPOOL 0cbb2d696aec8017d609073ceab110ded29688d68b91588e5e2d3e3fcf23aa4636a1d92c1fce58b39e848689d0408692871c2cc6de5997e66278e1d030a46f8e
+DIST dtc-1.4.3.tar.xz 122732 SHA256 0c3fbff85e85b980740c7b9c6f3cd1c5354aa318bfcadb5005776fdcf3ac5ec8 SHA512 ce9f39cef11f3e7048e8491f01844071bf54911ec36a0d2f2e1ed6c736b7e1a67be83cd2527895a686882d895142db020bf5131a282e0d68d1f4d32dc772db42 WHIRLPOOL cbf9c7eccbf1e69d59a2978496e25be3bf283d373e091e33d0c6b66e5708a15f69be6a7cf85b7fcfe448f74e2987c1c725abaa9eab2e3805773fcb552cf7e604
+DIST dtc-1.4.4.tar.xz 122748 SHA256 470731d5c015b160d26a96645dbb1c7337d6e7b8c98244612002b66bedf6cffb SHA512 20689f7b0489fa945c4df4e27084dfd46fd5512a8dff9b28d60e0cd0e9e79bbd9944e4d70a1aba86a026481b35bb5441ed6b63d306a4a8f7581517f7359fa9bf WHIRLPOOL 65bb6082e0c1be7d704fc42253a11ca7e0b835805cc4c4c60074c6d168856313f7b2c8bf5b4ba571b5825d39ce057ec6a4a64f729afd1bbcdad4c044a2fd4b09
+EBUILD dtc-1.4.1-r1.ebuild 1126 SHA256 1a5aae1924431adfc3cf7a081ab8aa8ae956603543bdd0f78169a441041c4889 SHA512 6daeb7a14955c341a914e4ed37f26ca9c5670c8a70f9927c234f8ce8e6c9c44c07b403536677ff6bba91f42aaf0f02ab4a6887debae5c4d6ead81abfa6ed05a1 WHIRLPOOL 7a47add68c210618a0e4bc35bea586e3687782e3505a1648d74a5a7a052ad1e3ef05c50b39aea4985d4e7b1c7356e6a5751e6b27c7e07da87ea6ed0c0aec433e
+EBUILD dtc-1.4.1.ebuild 1030 SHA256 76c4ccc00299c2d024cb3f30295d1d9633436b2cfc0a4091c19fa465625ee4d0 SHA512 763ae7ca11d522cbdeee7ea5675805ddf7d17d0cf773091bf0978b30bf7fec1ebef64904a8e0b291eb3139e4295cb1dc1d833a8afc5d6aa09760fb0ebe5fa72b WHIRLPOOL 64962ff16878b2d87345b4380f09ce8c7b38e98dafd4680a03d443cf5582e2778fdb4e81b93360ab2a014ca85182e2843b9d2200a0c0e4a6b64e1ab07ceb1323
+EBUILD dtc-1.4.2.ebuild 1055 SHA256 d3d0e0629ccf3b6672df8d38d27cc28714c34b7d30e12c5f4446ef641fd6de90 SHA512 caa47d8d9a68a473712aac7cbbd6cea0d6bbd3cce9e598236be8d13f7d64013516ed9aa1a91099117f204bd9a12e91e7d907a04fb490c0c2895ff1391b0ab9dc WHIRLPOOL 60441be91d18fb9d873867a8db128208d5641904838b69c1e9c6b506565b42d87350896d8744951dba0bfd833b77c81aa6fb53c7e0e29d092ebe160bcbe38aed
+EBUILD dtc-1.4.3.ebuild 1123 SHA256 9195730cda86521c27fcc1509e55ceb61e02f0451bb540a61b2ba3f1958e64df SHA512 a22759aaa334a1276e2f7793787f357f4b9e72e04df87ed21debb904d713415574673832e8fc87ca60d45eb7bb3e69b549463a610c63ec0a471b5010c3603930 WHIRLPOOL a9d4644e900a0fac520d9ecf1b8c3433fb09f2a35740e1d0ab030b9339792c0090aa64cf3eba16acf766d38d75d1fd14fa1bba10e71926c98c590145bbf600bc
+EBUILD dtc-1.4.4.ebuild 1123 SHA256 9195730cda86521c27fcc1509e55ceb61e02f0451bb540a61b2ba3f1958e64df SHA512 a22759aaa334a1276e2f7793787f357f4b9e72e04df87ed21debb904d713415574673832e8fc87ca60d45eb7bb3e69b549463a610c63ec0a471b5010c3603930 WHIRLPOOL a9d4644e900a0fac520d9ecf1b8c3433fb09f2a35740e1d0ab030b9339792c0090aa64cf3eba16acf766d38d75d1fd14fa1bba10e71926c98c590145bbf600bc
+EBUILD dtc-9999.ebuild 1055 SHA256 d3d0e0629ccf3b6672df8d38d27cc28714c34b7d30e12c5f4446ef641fd6de90 SHA512 caa47d8d9a68a473712aac7cbbd6cea0d6bbd3cce9e598236be8d13f7d64013516ed9aa1a91099117f204bd9a12e91e7d907a04fb490c0c2895ff1391b0ab9dc WHIRLPOOL 60441be91d18fb9d873867a8db128208d5641904838b69c1e9c6b506565b42d87350896d8744951dba0bfd833b77c81aa6fb53c7e0e29d092ebe160bcbe38aed
+MISC ChangeLog 3317 SHA256 b6271b61e3ab2252e380f48aacb7db226f455db3a875aced5800760d6427d5a6 SHA512 513e3b2997d8b251fd5261972828bb072d18bbe8b35e2424bbf0b3b47362119b8e6ab317c48d77f823d9cd0065a82b7a3cd98331b005bbcd0e14e0aa4dfc5718 WHIRLPOOL aeec21f5f7d2773474335bbbe0c93a962fa6fddb2720679be367ddd6b828e19b8ac73e274a4d5d051c0ce12082cec76d4162d67a4c4eafab59bdb202714d1558
+MISC ChangeLog-2015 3669 SHA256 63f2f5d518f84cede19667cc44f18fdd0bfd72ecb26e3e5bc223d36e3b957dc3 SHA512 d58a0f2d8f2e5ff69679244bb1856ef52ef7f2092698d5cb436af65ffbe52bd2d7e01c43e02e1d7ca98d13eb910afaedb05318fe2c69d8b34992d5ea9940b953 WHIRLPOOL 884380f8a8168521e8fc36d606f139f2df274346eecba1431e64d7fdf6fad8c39d8d3da32e8dc53fcff1e9945309e0e26d5c616cb4ac76a0f8ab668e65366dd9
+MISC metadata.xml 335 SHA256 982be48c26686325ea6411d8ffb76bbcc60bdafad00ffe0e4aa12e196046b50f SHA512 757b9539f0dd59ff4c25127df262c6f030c3e4ddf4a4044a77bb7e2ee126001adff606a683b3af24f11d23604919366fa42cb496941ed232a5169ed2eac7c631 WHIRLPOOL b35338cfb772461fc3729c6b36963b0f18a69af00fb6e817d535b0af60aed2eff1dc92664eb17c64624019e3ba1c18f7ae38d1cc125e0f7e8f4e026c818d18e9
diff --git a/sys-apps/dtc/dtc-1.4.1-r1.ebuild b/sys-apps/dtc/dtc-1.4.1-r1.ebuild
new file mode 100644
index 000000000000..1714ca0cb240
--- /dev/null
+++ b/sys-apps/dtc/dtc-1.4.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib toolchain-funcs eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="http://devicetree.org/Device_Tree_Compiler"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="app-arch/xz-utils
+ sys-devel/flex
+ sys-devel/bison"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-missing-syms.patch
+ epatch "${FILESDIR}"/${P}-echo-n.patch
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+ tc-export AR CC
+ export V=1
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.a' -delete
+ dodoc Documentation/manual.txt
+}
diff --git a/sys-apps/dtc/dtc-1.4.1.ebuild b/sys-apps/dtc/dtc-1.4.1.ebuild
new file mode 100644
index 000000000000..02891c229018
--- /dev/null
+++ b/sys-apps/dtc/dtc-1.4.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit multilib toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="amd64 arm ~arm64 ppc ppc64 x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="http://devicetree.org/Device_Tree_Compiler"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="app-arch/xz-utils
+ sys-devel/flex
+ sys-devel/bison"
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+ tc-export AR CC
+ export V=1
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use static-libs || find "${ED}" -name '*.a' -delete
+ dodoc Documentation/manual.txt
+}
diff --git a/sys-apps/dtc/dtc-1.4.2.ebuild b/sys-apps/dtc/dtc-1.4.2.ebuild
new file mode 100644
index 000000000000..1dc3915445fb
--- /dev/null
+++ b/sys-apps/dtc/dtc-1.4.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib toolchain-funcs eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+DOCS="
+ Documentation/manual.txt
+"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+
+ tc-export AR CC
+ export V=1
+}
+
+src_install() {
+ default
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
diff --git a/sys-apps/dtc/dtc-1.4.3.ebuild b/sys-apps/dtc/dtc-1.4.3.ebuild
new file mode 100644
index 000000000000..d5288e84280a
--- /dev/null
+++ b/sys-apps/dtc/dtc-1.4.3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib toolchain-funcs eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+DOCS="
+ Documentation/dt-object-internal.txt
+ Documentation/dts-format.txt
+ Documentation/manual.txt
+"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+
+ tc-export AR CC
+ export V=1
+}
+
+src_install() {
+ default
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
diff --git a/sys-apps/dtc/dtc-1.4.4.ebuild b/sys-apps/dtc/dtc-1.4.4.ebuild
new file mode 100644
index 000000000000..d5288e84280a
--- /dev/null
+++ b/sys-apps/dtc/dtc-1.4.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib toolchain-funcs eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+DOCS="
+ Documentation/dt-object-internal.txt
+ Documentation/dts-format.txt
+ Documentation/manual.txt
+"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+
+ tc-export AR CC
+ export V=1
+}
+
+src_install() {
+ default
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
diff --git a/sys-apps/dtc/dtc-9999.ebuild b/sys-apps/dtc/dtc-9999.ebuild
new file mode 100644
index 000000000000..1dc3915445fb
--- /dev/null
+++ b/sys-apps/dtc/dtc-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib toolchain-funcs eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="Open Firmware device tree compiler"
+HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+DOCS="
+ Documentation/manual.txt
+"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^CFLAGS =/s:=:+=:' \
+ -e '/^CPPFLAGS =/s:=:+=:' \
+ -e 's:-Werror::' \
+ -e 's:-g -Os::' \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
+ Makefile || die
+
+ tc-export AR CC
+ export V=1
+}
+
+src_install() {
+ default
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
diff --git a/sys-apps/dtc/files/dtc-1.4.1-echo-n.patch b/sys-apps/dtc/files/dtc-1.4.1-echo-n.patch
new file mode 100644
index 000000000000..cd45b952a49e
--- /dev/null
+++ b/sys-apps/dtc/files/dtc-1.4.1-echo-n.patch
@@ -0,0 +1,95 @@
+From ed3d76cd1c8f91f5e86424e899448d6221b0f76c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 6 May 2015 01:53:39 -0400
+Subject: [PATCH] tests: convert `echo -n` to `printf`
+
+The -n option is not standard in POSIX, so convert to printf which should
+work the same in every shell.
+
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+---
+ tests/run_tests.sh | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/tests/run_tests.sh b/tests/run_tests.sh
+index c870432..0dda54a 100755
+--- a/tests/run_tests.sh
++++ b/tests/run_tests.sh
+@@ -42,20 +42,20 @@ base_run_test() {
+
+ shorten_echo () {
+ limit=32
+- echo -n "$1"
++ printf "$1"
+ shift
+ for x; do
+ if [ ${#x} -le $limit ]; then
+- echo -n " $x"
++ printf " $x"
+ else
+ short=$(echo "$x" | head -c$limit)
+- echo -n " \"$short\"...<${#x} bytes>"
++ printf " \"$short\"...<${#x} bytes>"
+ fi
+ done
+ }
+
+ run_test () {
+- echo -n "$@: "
++ printf "$@: "
+ if [ -n "$VALGRIND" -a -f $1.supp ]; then
+ VGSUPP="--suppressions=$1.supp"
+ fi
+@@ -63,7 +63,7 @@ run_test () {
+ }
+
+ run_sh_test () {
+- echo -n "$@: "
++ printf "$@: "
+ base_run_test sh "$@"
+ }
+
+@@ -106,12 +106,12 @@ wrap_error () {
+
+ run_wrap_error_test () {
+ shorten_echo "$@"
+- echo -n " {!= 0}: "
++ printf " {!= 0}: "
+ base_run_test wrap_error "$@"
+ }
+
+ run_dtc_test () {
+- echo -n "dtc $@: "
++ printf "dtc $@: "
+ base_run_test wrap_test $VALGRIND $DTC "$@"
+ }
+
+@@ -126,7 +126,7 @@ asm_to_so_test () {
+ run_fdtget_test () {
+ expect="$1"
+ shift
+- echo -n "fdtget-runtest.sh "$expect" $@: "
++ printf "fdtget-runtest.sh "$expect" $@: "
+ base_run_test sh fdtget-runtest.sh "$expect" "$@"
+ }
+
+@@ -134,14 +134,14 @@ run_fdtput_test () {
+ expect="$1"
+ shift
+ shorten_echo fdtput-runtest.sh "$expect" "$@"
+- echo -n ": "
++ printf ": "
+ base_run_test sh fdtput-runtest.sh "$expect" "$@"
+ }
+
+ run_fdtdump_test() {
+ file="$1"
+ shorten_echo fdtdump-runtest.sh "$file"
+- echo -n ": "
++ printf ": "
+ base_run_test sh fdtdump-runtest.sh "$file"
+ }
+
+--
+2.4.0
+
diff --git a/sys-apps/dtc/files/dtc-1.4.1-missing-syms.patch b/sys-apps/dtc/files/dtc-1.4.1-missing-syms.patch
new file mode 100644
index 000000000000..7057be7bd8ac
--- /dev/null
+++ b/sys-apps/dtc/files/dtc-1.4.1-missing-syms.patch
@@ -0,0 +1,30 @@
+From a4b093f7366fdb429ca1781144d3985fa50d0fbb Mon Sep 17 00:00:00 2001
+From: Julien Grall <julien.grall@linaro.org>
+Date: Tue, 17 Mar 2015 16:00:34 +0000
+Subject: [PATCH] libfdt: Add missing functions to shared library
+
+The commit 4e76ec7 "libfdt: Add fdt_next_subnode() to permit easy
+subnode iteration" adds new functions (fdt_{first,next}_subnode) but
+forgot to mark them as 'global' in the shared library.
+
+Signed-off-by: Julien Grall <julien.grall@linaro.org>
+---
+ libfdt/version.lds | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libfdt/version.lds b/libfdt/version.lds
+index 80b322b..941208e 100644
+--- a/libfdt/version.lds
++++ b/libfdt/version.lds
+@@ -54,6 +54,8 @@ LIBFDT_1.2 {
+ fdt_get_property_by_offset;
+ fdt_getprop_by_offset;
+ fdt_next_property_offset;
++ fdt_first_subnode;
++ fdt_next_subnode;
+
+ local:
+ *;
+--
+2.4.0
+
diff --git a/sys-apps/dtc/metadata.xml b/sys-apps/dtc/metadata.xml
new file mode 100644
index 000000000000..bc8ad1abc489
--- /dev/null
+++ b/sys-apps/dtc/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 type="person">
+ <email>lu_zero@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/duc/Manifest b/sys-apps/duc/Manifest
new file mode 100644
index 000000000000..2821659a4fac
--- /dev/null
+++ b/sys-apps/duc/Manifest
@@ -0,0 +1,5 @@
+DIST duc-1.4.1.tar.gz 325689 SHA256 04c75ea1cb3ce2d66c5628d999eae2accf66f56b74a9a6879dc8ffb8c9d66bf3 SHA512 88aa8f51651adf019c3a91c83eca308b822ff7569d6f6d30cf91338740ec9b0bd21c4f5dd783cf46c8d67aad6b03ad908cd7ed472e5db6feaf66ee02582d9f88 WHIRLPOOL da7311bdbec547569c08d976e508bde23969a0a387ec9c9baf345c004a03afd27ec8bb8fbf09c366bc06647cb750e93d51c583bcf84b6f5d706601192aa9bb4c
+EBUILD duc-1.4.1-r1.ebuild 1749 SHA256 47a6d6aab7fa7c1a878ca94f3785316ffdcf4eb5f47ec4bff1192dfe5e768673 SHA512 341c0fc7bdc58c3326e96ed1f924aedeba77d67ddbc7c6d7ff227bfb01bc8eb0594c2ee169a674e4ffb64eba17d422949d8e70a5b37a1053b89e9d32dd424808 WHIRLPOOL 8d00498353a89e3567c5cfc01af37bfe5ae72430ebe98adb8e6f7e00a34770b2ae7b02d085d10932bfb5c0805c76cbd2bd6b3b72bda1e2909020d47b1b601058
+EBUILD duc-9999.ebuild 1749 SHA256 47a6d6aab7fa7c1a878ca94f3785316ffdcf4eb5f47ec4bff1192dfe5e768673 SHA512 341c0fc7bdc58c3326e96ed1f924aedeba77d67ddbc7c6d7ff227bfb01bc8eb0594c2ee169a674e4ffb64eba17d422949d8e70a5b37a1053b89e9d32dd424808 WHIRLPOOL 8d00498353a89e3567c5cfc01af37bfe5ae72430ebe98adb8e6f7e00a34770b2ae7b02d085d10932bfb5c0805c76cbd2bd6b3b72bda1e2909020d47b1b601058
+MISC ChangeLog 566 SHA256 e960481a4403f5f316d720fd1b84096d269506b9457d6c09f1fe3a96b5f6fdd5 SHA512 1e6e206bcde9a39bd4b38567371fdfd877f4a009979db9bda8d86e0857d763d3f0e135f575abf7dbf148cc9fa11cfb852517dd14ef5d50d9aa8bfc86bfe55bbd WHIRLPOOL f2c9f95bee4877036af210db70521ca7da6dba176b684d1d80e0be1d3cb9e2022c24dcc1b5c134d7f817a2c78ef7a899304e2e4421e762482de69ecbebdcd7b4
+MISC metadata.xml 899 SHA256 5eeabfa9eaf1f0c6bfe5d5b73cb931f51af348178ce94f3b5f63ed53360c7c00 SHA512 44329c606478e5335f5566e9a2b8660e4135c77e25c769916fa0a10129a097eec1820e154bcf6edc785c579fbb8273e21d8b36d114d077f642f9cffd4df56c6f WHIRLPOOL dbb16423d941db7937197a4a9142af1b6cbcf05cf143618043c45e2c99d9e4dbe291a1c003b0dec75955a72cc10d98418f8ab36f6535dcc24d17a2cc13eba11c
diff --git a/sys-apps/duc/duc-1.4.1-r1.ebuild b/sys-apps/duc/duc-1.4.1-r1.ebuild
new file mode 100644
index 000000000000..b063305e8b89
--- /dev/null
+++ b/sys-apps/duc/duc-1.4.1-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/zevv/duc.git"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/zevv/${PN}/releases/download/${PV}/${P}.tar.gz"
+fi
+
+DESCRIPTION="A library and suite of tools for inspecting disk usage"
+HOMEPAGE="https://github.com/zevv/duc"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cairo gui -leveldb ncurses -sqlite +tokyocabinet X"
+
+REQUIRED_USE="
+ ^^ ( tokyocabinet leveldb sqlite )
+ X? ( cairo gui )
+"
+
+DEPEND="
+ cairo? ( x11-libs/cairo x11-libs/pango )
+ gui? (
+ X? (
+ x11-libs/cairo[X]
+ x11-libs/libX11
+ x11-libs/pango[X]
+ )
+ !X? ( >=media-libs/glfw-3.0 )
+ )
+ leveldb? ( dev-libs/leveldb )
+ ncurses? ( sys-libs/ncurses:= )
+ sqlite? ( dev-db/sqlite:3 )
+ tokyocabinet? ( dev-db/tokyocabinet )
+"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/ldconfig/d" -e "/install-exec-hook/d" Makefile.am || die
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=( $(use_enable ncurses ui) )
+
+ if use tokyocabinet; then
+ myconf+=( --with-db-backend=tokyocabinet )
+ elif use leveldb; then
+ myconf+=( --with-db-backend=leveldb )
+ else
+ myconf+=( --with-db-backend=sqlite3 )
+ fi
+
+ # Necessary logic for cairo
+ if use gui && use X; then
+ # X backend GUI
+ myconf+=( --enable-x11 --disable-opengl --enable-cairo )
+ elif use gui; then
+ # OpenGL backend GUI
+ myconf+=( --disable-x11 --enable-opengl $(use_enable cairo) )
+ else
+ # No GUI
+ myconf+=( $(use_enable cairo) --disable-x11 --disable-opengl )
+ fi
+
+ econf ${myconf[@]}
+}
diff --git a/sys-apps/duc/duc-9999.ebuild b/sys-apps/duc/duc-9999.ebuild
new file mode 100644
index 000000000000..b063305e8b89
--- /dev/null
+++ b/sys-apps/duc/duc-9999.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/zevv/duc.git"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/zevv/${PN}/releases/download/${PV}/${P}.tar.gz"
+fi
+
+DESCRIPTION="A library and suite of tools for inspecting disk usage"
+HOMEPAGE="https://github.com/zevv/duc"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cairo gui -leveldb ncurses -sqlite +tokyocabinet X"
+
+REQUIRED_USE="
+ ^^ ( tokyocabinet leveldb sqlite )
+ X? ( cairo gui )
+"
+
+DEPEND="
+ cairo? ( x11-libs/cairo x11-libs/pango )
+ gui? (
+ X? (
+ x11-libs/cairo[X]
+ x11-libs/libX11
+ x11-libs/pango[X]
+ )
+ !X? ( >=media-libs/glfw-3.0 )
+ )
+ leveldb? ( dev-libs/leveldb )
+ ncurses? ( sys-libs/ncurses:= )
+ sqlite? ( dev-db/sqlite:3 )
+ tokyocabinet? ( dev-db/tokyocabinet )
+"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/ldconfig/d" -e "/install-exec-hook/d" Makefile.am || die
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=( $(use_enable ncurses ui) )
+
+ if use tokyocabinet; then
+ myconf+=( --with-db-backend=tokyocabinet )
+ elif use leveldb; then
+ myconf+=( --with-db-backend=leveldb )
+ else
+ myconf+=( --with-db-backend=sqlite3 )
+ fi
+
+ # Necessary logic for cairo
+ if use gui && use X; then
+ # X backend GUI
+ myconf+=( --enable-x11 --disable-opengl --enable-cairo )
+ elif use gui; then
+ # OpenGL backend GUI
+ myconf+=( --disable-x11 --enable-opengl $(use_enable cairo) )
+ else
+ # No GUI
+ myconf+=( $(use_enable cairo) --disable-x11 --disable-opengl )
+ fi
+
+ econf ${myconf[@]}
+}
diff --git a/sys-apps/duc/metadata.xml b/sys-apps/duc/metadata.xml
new file mode 100644
index 000000000000..d577149cbb02
--- /dev/null
+++ b/sys-apps/duc/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>NP-Hardass@gentoo.org</email>
+ <name>NP-Hardass</name>
+ </maintainer>
+ <use>
+ <flag name="cairo">Build support for exporting to PNG and PDF with <pkg>x11-libs/cairo</pkg></flag>
+ <flag name="gui">Build support for a graphical client</flag>
+ <flag name="leveldb">Use <pkg>dev-libs/leveldb</pkg> as the backend</flag>
+ <flag name="ncurses">Build support for the ncurses client</flag>
+ <flag name="sqlite">Use <pkg>dev-db/sqlite</pkg>:3 as the backend</flag>
+ <flag name="tokyocabinet">Use <pkg>dev-db/tokyocabinet</pkg> as the backend</flag>
+ <flag name="X">Use X11 for the GUI instead of OpenGL. This is the recommended option</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">zevv/duc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/ed/Manifest b/sys-apps/ed/Manifest
new file mode 100644
index 000000000000..997f084378b2
--- /dev/null
+++ b/sys-apps/ed/Manifest
@@ -0,0 +1,9 @@
+DIST ed-1.13.tar.gz 87984 SHA256 f9e2a8c95dff14fab315680966ad3037afecdf089c2d0c281e267bf1ae836b0f SHA512 003b4e1015b3c9eb831c805b3bb1072f2e6da02c351770ddae69b438b6e9124b06cb9e30d9a0036dd1fc6a1f7d27fbe84f7e86ac5073ef403bd5958111986f5c WHIRLPOOL 813402266604578fb158801de897133069a0244b228ee613148018a540b2b73878f65c67d3e198b19683094decfa4ce89d81a39c993cc0ee393cc05ab7c8925e
+DIST ed-1.14.1a.tar.gz 91662 SHA256 a18eebd0e16b6780a68794af9cb75ecc41471cf12f0509a10b4458504c487765 SHA512 423a30729c16355d80ed84e408034f63fe0d700d12441f82b476af1919c08e7fd4be18736c30cdecbdec5d851f9a08999242aecfe687beed17b779a7485963c9 WHIRLPOOL 7d25c0b5c6847a04fe6dec3e428a35062df81a63b740fff475934a19e12b9131e3f15efa331d13a6887419250d49a406b9fa2facc2d02d9cb4c45f40eacedb0b
+DIST ed-1.14.2.tar.gz 91773 SHA256 c3521a607b3dfd5d2a087d53a72cdf71970763059c369cb0b330881b8491cd50 SHA512 e7638a07d6bdcedc2e00686a6677075fd7b8becebfd7650e60794bcb0d317a8611c7acd90420c952cc6c4beaede250eabff304d27585e190985b1f83e5930057 WHIRLPOOL bb0ce6a8ae431c21655f380cf5307118eda86571590182733858d4a6c40c6f4973618870d5ba931c217c286f98721b4e061f79288828084e5e64db7c8dc6dd0b
+EBUILD ed-1.13.ebuild 923 SHA256 e8e7a8e5ae44446481b60ea8c16cc025227dd1107857bb7fdf7d80e13c25cd68 SHA512 34afe2dee8259d42c4376ff17bace4eebee8236945e2518a786b2e25a8fdbe28aa28d38131e1f50d5f0e8f6c3c795a311529bce226fe09826f24e68f07a406fe WHIRLPOOL 4f6b2a745e7ea41f7a35aadf22fc2d15ac550dfd432debee0b8002ee9cf9ace91cec67f3c76b9233ec65cac71c28f84f30c3732e55a7e5b05615679a020faf6c
+EBUILD ed-1.14.1a.ebuild 933 SHA256 b136749cc4585868c8ef8d923f399f95979f979717322f0de483cf2a7df14a0d SHA512 27ecf81d89cc653e676f46cdea352a5438ddb09def853c6dbfc137af8c7b55211f79369c643a7dd8c85210ffbdc7e7e9104462028435b987adfc2b3850126d9b WHIRLPOOL fc8b26f2f00a58ac482386429d3c2921ec13a23ca0c017ee2bd12f9b1c68f3d14a7a32ac05d44207057d8b9fbcfaf21e45b8f9172f33734d6213e00de10f515d
+EBUILD ed-1.14.2.ebuild 945 SHA256 8eb42a4c9474d74abae278ec355886a2a2fcc69011184d59856c16fb4b94edf3 SHA512 6c4965c6657e419e0dd05ffc0106234567e27875f810ce06d6f97dc0568624e1f7993cf9ba73a741a7180a5a6572e38198cff04b4dd3f8f792bacd684c075446 WHIRLPOOL ad81c20a98df1d2a500cb9f237ad1d63c0904e9c2dab767a09d4d451500783fb964c4844268fdfe410429dfb1c25f4d5cde471edf5521d05f8ec53cadd013748
+MISC ChangeLog 3706 SHA256 717f8358653dc52071446721b40388540d67700f369e1850d37db25c94edfa33 SHA512 9fedb928856cd25677d74b28575c1c17b5536294660455b6db827bb41e85183fad0c43bf25d9e516b83da516ba4aa4c58990d78281dff4e31e3cf65a5245308c WHIRLPOOL 0883000bb9782b77cd6f1477b31d992da014495155b673b2dc24f4d7a7e8802d2bdb0b03f62e765399cb053095d971b8725d895f254f31a7b1fb3e8e57a19de2
+MISC ChangeLog-2015 13212 SHA256 cd0c9b8dff1d09854a1cd76fe77c6b5f7db3912df6ad150e5433b5fd7fe14b52 SHA512 6429eddd1e40561c2a67141ac3509e5f11b65b02331e7198e258ab37a432ede607fca7395b03671f5ff94dc724d1fb77aca2a965fd300b72449f1183929312db WHIRLPOOL 6452e4a2dc21f26335814d229a72097c3aae55fae48e51cc80b87cd5c52086c650b0bd5dabe395b47c337059ca75c0494b63c731a5e8a9d386b291c36418e361
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/ed/ed-1.13.ebuild b/sys-apps/ed/ed-1.13.ebuild
new file mode 100644
index 000000000000..950215c0ff3f
--- /dev/null
+++ b/sys-apps/ed/ed-1.13.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Your basic line editor"
+HOMEPAGE="https://www.gnu.org/software/ed/"
+#SRC_URI="mirror://gnu/ed/${P}.tar.lz"
+# Using gzip instead -- the filesize diff is small and lzip uncommon #545344
+SRC_URI="http://fossies.org/linux/privat/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+src_configure() {
+ # Upstream configure script is moronic.
+ econf \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ --bindir="${EPREFIX}/bin"
+}
diff --git a/sys-apps/ed/ed-1.14.1a.ebuild b/sys-apps/ed/ed-1.14.1a.ebuild
new file mode 100644
index 000000000000..685492cee99e
--- /dev/null
+++ b/sys-apps/ed/ed-1.14.1a.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Your basic line editor"
+HOMEPAGE="https://www.gnu.org/software/ed/"
+#SRC_URI="mirror://gnu/ed/${P}.tar.lz"
+# Using gzip instead -- the filesize diff is small and lzip uncommon #545344
+SRC_URI="http://fossies.org/linux/privat/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+src_configure() {
+ # Upstream configure script is moronic.
+ econf \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ --bindir="${EPREFIX}/bin"
+}
diff --git a/sys-apps/ed/ed-1.14.2.ebuild b/sys-apps/ed/ed-1.14.2.ebuild
new file mode 100644
index 000000000000..798cffa0764b
--- /dev/null
+++ b/sys-apps/ed/ed-1.14.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Your basic line editor"
+HOMEPAGE="https://www.gnu.org/software/ed/"
+#SRC_URI="mirror://gnu/ed/${P}.tar.lz"
+# Using gzip instead -- the filesize diff is small and lzip uncommon #545344
+SRC_URI="http://fossies.org/linux/privat/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+src_configure() {
+ # Upstream configure script is moronic.
+ econf \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${CFLAGS} ${LDFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ --bindir="${EPREFIX}/bin"
+}
diff --git a/sys-apps/ed/metadata.xml b/sys-apps/ed/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/ed/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/edac-utils/Manifest b/sys-apps/edac-utils/Manifest
new file mode 100644
index 000000000000..506be963b936
--- /dev/null
+++ b/sys-apps/edac-utils/Manifest
@@ -0,0 +1,5 @@
+DIST edac-utils-0.18.tar.gz 285909 SHA256 2a027dbde6c3095807c9fbfa0025bedad38fc839e9967707c1986089ff4c8750 SHA512 5c81b11c28e8fb3198f2d656171493877393024d9e31233c252d358d8029aa83065e7b66ea87d742518f710466c9ba7dfcf57a1641374ce169cf95fd379101fa WHIRLPOOL e7af26138378e784c36c43d85b0d2449b5d5606d217dc8bc217f0720effb0fd6d5c4ab5b933e3e38cfadd5e5e51b47559d1a947bcc3df2ec8c8138eec7507b58
+EBUILD edac-utils-0.18.ebuild 1006 SHA256 9c9581bea5f3e1927ea16d6eae5b570beedbe79a656185c1cedeb1e60448c2ba SHA512 2e46c3e1ce5b99ce4398d6db18b645f01ccc62f36488c116726fc8c3a760008b1af26b525bc362aef56e5821574e703fec517beddadc443dba50e5eebd35bf2d WHIRLPOOL aa6aa4d4d908a8bb73b96b05776b4b091ec9976794469cd43d70d7651888f46c217baff41aeb3490d477063a527cd77bcfe88c1e9bbbaa78fa220db07b26fac2
+MISC ChangeLog 2183 SHA256 58750d16dbc0d3505a8ea3edfbae024e5080e301ab2743ba4577e043d5f8fb71 SHA512 99fe88cf7cdd84861dad32b69a8e0fcc7a8e8d45a9f089ab0a4813bda98f3fe8ae667d0dbb0ecada7e1b0db98810f3f00245aa086d009a18b281104d8dbf8bdd WHIRLPOOL fec63af4c9ac97bb885216f2761f5288c3853dffb309a1ab79ba2ae6c52edbc4b8d0f05898e85e02b2c17a3f905044c57eac9d9d9cd7881dbb3e74efdcd1d28f
+MISC ChangeLog-2015 899 SHA256 be7057e93a20cfe92a72eedcff10058e7adc3444f9daf3d5deaa1570f55415e5 SHA512 3edaa19829e0c2bcfd18837e111339c65fe43c43daae4155cb22c1d19c7adbeca0fed148d7478695d3552cf3c175577fe44e1a66e59132eda9d60b370f73742b WHIRLPOOL a6ee91a77836335d50c2de7fff77737851a8b9f885c86cc3f4347bb025072462f7c1139fc8a463886b6ed7e54ccd1384c4fcdf4b72e5b4b2f4b5daef5e668d7f
+MISC metadata.xml 342 SHA256 59ab5f71d1e28ab196934398a0dc5e39c374bb6c8e958f4d3d8d844b73be397c SHA512 d11d055d89b95dcd5fe62b514053918f3bda64a737cff22935bc74d0dd8506112599ed503275741dff8edbd4ecab9ee81a4d6aa33add6ef63b059d84f59c4e4a WHIRLPOOL 8f67e446f6c27e11930914efdbefb1a3a9ee7e56dc9cb1bb8183c329a2f0185b692e2e8d952a40e05dfe2f3a829cf7b3910fb050b14add4c25d434e388685138
diff --git a/sys-apps/edac-utils/edac-utils-0.18.ebuild b/sys-apps/edac-utils/edac-utils-0.18.ebuild
new file mode 100644
index 000000000000..5bf6da23f318
--- /dev/null
+++ b/sys-apps/edac-utils/edac-utils-0.18.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Userspace helper for Linux kernel EDAC drivers"
+HOMEPAGE="https://github.com/grondo/edac-utils"
+SRC_URI="https://github.com/grondo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="debug"
+
+DEPEND="sys-fs/sysfsutils"
+RDEPEND="${DEPEND}
+ sys-apps/dmidecode"
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable debug)
+}
+
+src_install() {
+ default
+
+ # We don't need this init.d file
+ # Modules should be loaded by adding them to /etc/conf.d/modules
+ # The rest is done via the udev-rule
+ rm -rf "${D}/etc/init.d"
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ elog "There must be an entry for your mainboard in /etc/edac/labels.db"
+ elog "in case you want nice labels in /sys/module/*_edac/"
+ elog "Run the following command to check whether such an entry is already available:"
+ elog " edac-ctl --print-labels"
+}
diff --git a/sys-apps/edac-utils/metadata.xml b/sys-apps/edac-utils/metadata.xml
new file mode 100644
index 000000000000..3ecfedb65827
--- /dev/null
+++ b/sys-apps/edac-utils/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 type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">grondo/edac-utils</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/elfix/Manifest b/sys-apps/elfix/Manifest
new file mode 100644
index 000000000000..9d29791bf4ab
--- /dev/null
+++ b/sys-apps/elfix/Manifest
@@ -0,0 +1,6 @@
+DIST elfix-0.9.2.tar.gz 398758 SHA256 1a50ec57d6f5d1b25dcaaaf15f82849774e9e4e7e263cee3aa4936c5e3d6f071 SHA512 a7be30722abe7249ec42024d33b2bda00524cfb85da66b4511c5056efbdbfae1d3c2b42048bcf4d5cb7c0ae675f763b74a834d93a25b541ebac42fddcd2c6cf9 WHIRLPOOL aead1a63612ea187dc00aa52ee2c18431036176aae2e0e08d3138ced751f28947ee8045dd63dae67f89946d5b64e705a6b6d45b884d3d9da1d7e6e03b37ed700
+EBUILD elfix-0.9.2.ebuild 1129 SHA256 79a9a5ca0253e2d16a53e51fc1dce1d62764e442713346619221fd76a43f7d11 SHA512 ec804aad98f81c5354d5de715cdf1032d03a149bdbbe04288d1c2cf77c0bb2b99003d2d55e87a8d8de4d761e18af7a110b2925a8771062543939d8d0533c991c WHIRLPOOL 69d6cb9f160cd0cadb92bf39315cc053c3c02c2a562a540e1625b312567a48a0486b4ddcf5104921715d6094b4ad33cab040429120b7b4fee2c8e363833ae7d1
+EBUILD elfix-9999.ebuild 1138 SHA256 cd13a439133011886a9024199138ddda1de840ca082697e0f1e94b2a266596c2 SHA512 b80e67c75acd1110accd8d3808cf728fa96e997a570878b08b128f8e6364c0936ed39f00f66b6486b7520ba44aebd3b5ea9c05895ec1d470d8c7673f291c51a1 WHIRLPOOL 7363a68e5c3498dbf93657c3b7a00f4835654f958d9550947d2200219b636c762ca4bedd655b9762b546b55ae00b0f0e6c7f6cf850bedecefbc5ccc4d4cebdbf
+MISC ChangeLog 5508 SHA256 1c273d28df8193e2d9067f96fe378087b3eba3eb7918644fbf89409818a937a9 SHA512 b2220d713c98e8d450fb512a3256920b53bdbbc0c7ca384992574a64b3ca82297763b9c95d4ad530bc6b634a0693c6dad1dddb5e7ed44a364ccbce39e9808074 WHIRLPOOL df61ccc4b576f0a838c3341980b6592756ae96583be3d884450fc81ecd10a7be2e252fe31dd7afb05bc615bacccd7a6fb0e33d254611d8f53d4d7c40a6bbe92a
+MISC ChangeLog-2015 12780 SHA256 5a7b6fa8cb7286ccb37533b18b8d52b715e82b0937dd399b6166c50b3cb2b2d3 SHA512 bb56097843b102cc511c413afaca4b8e169c7cb0cc64c028316f2a31edb491743c8e2c98d36f7653b1e1bd88d7f35b0e9b67033bdb97da52051ed9b938ddc1c9 WHIRLPOOL 6395a4f6e07903db08c9d146e19fa8d2dd88c23551901ad7442bb99aecbbdbc96fd6cece842f8fbbe3b29f04332b9e629a9d13f6c7691f369caf215abddd9ff1
+MISC metadata.xml 496 SHA256 ea5638fded7b4b7b46dc90d850a7edcb1a4d1938fd3868270ac6e53c0ae4584c SHA512 b934fa247d4d5bb1d188de8bead5980aba83abe50423dd1e56c534b762b535faa242dbab58021e91bea43951542dc4f5885aff3754cc0957f01e86832bdd2c5e WHIRLPOOL 56a087c92f0e12adf02ad62c5e042af5d81a8835cdefc3720191a3a7f2dec4f10a7cd8daeb490573513b54606259a5dbdbf9aff6eabb2c420834f66731e265df
diff --git a/sys-apps/elfix/elfix-0.9.2.ebuild b/sys-apps/elfix/elfix-0.9.2.ebuild
new file mode 100644
index 000000000000..11349cf6d6f6
--- /dev/null
+++ b/sys-apps/elfix/elfix-0.9.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
+ inherit git-2
+else
+ SRC_URI="https://dev.gentoo.org/~blueness/elfix/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
+fi
+
+DESCRIPTION="A suite of tools to work with ELF objects on Hardened Gentoo"
+HOMEPAGE="https://www.gentoo.org/proj/en/hardened/pax-quickstart.xml
+ https://dev.gentoo.org/~blueness/elfix/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+ptpax +xtpax"
+
+REQUIRED_USE="|| ( ptpax xtpax )"
+
+# These only work with a properly configured PaX kernel
+RESTRICT="test"
+
+DEPEND="~dev-python/pypax-${PV}[ptpax=,xtpax=]
+ ptpax? ( dev-libs/elfutils )
+ xtpax? ( sys-apps/attr )"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && ./autogen.sh
+}
+
+src_configure() {
+ rm -f "${S}/scripts/setup.py"
+ econf --disable-tests \
+ $(use_enable ptpax) \
+ $(use_enable xtpax)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog INSTALL README THANKS TODO
+}
diff --git a/sys-apps/elfix/elfix-9999.ebuild b/sys-apps/elfix/elfix-9999.ebuild
new file mode 100644
index 000000000000..9e35e46644dc
--- /dev/null
+++ b/sys-apps/elfix/elfix-9999.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
+ inherit git-2
+else
+ SRC_URI="https://dev.gentoo.org/~blueness/elfix/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="A suite of tools to work with ELF objects on Hardened Gentoo"
+HOMEPAGE="https://www.gentoo.org/proj/en/hardened/pax-quickstart.xml
+ https://dev.gentoo.org/~blueness/elfix/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+ptpax +xtpax"
+
+REQUIRED_USE="|| ( ptpax xtpax )"
+
+# These only work with a properly configured PaX kernel
+RESTRICT="test"
+
+DEPEND="~dev-python/pypax-${PV}[ptpax=,xtpax=]
+ ptpax? ( dev-libs/elfutils )
+ xtpax? ( sys-apps/attr )"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && ./autogen.sh
+}
+
+src_configure() {
+ rm -f "${S}/scripts/setup.py"
+ econf --disable-tests \
+ $(use_enable ptpax) \
+ $(use_enable xtpax)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog INSTALL README THANKS TODO
+}
diff --git a/sys-apps/elfix/metadata.xml b/sys-apps/elfix/metadata.xml
new file mode 100644
index 000000000000..66a241e9f76d
--- /dev/null
+++ b/sys-apps/elfix/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+ <use>
+ <flag name="xtpax">Enable XATTR_PAX_FLAGS support.</flag>
+ <flag name="ptpax">Enable PT_PAX_FLAGS support.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/elivepatch-client/Manifest b/sys-apps/elivepatch-client/Manifest
new file mode 100644
index 000000000000..ddaacbe64183
--- /dev/null
+++ b/sys-apps/elivepatch-client/Manifest
@@ -0,0 +1,3 @@
+DIST elivepatch-client-0.1.tar.gz 88031 SHA256 f529a0872eb42a077909f2b0597d4faff308ed8072ae6932c4f29c164b2c6d3a SHA512 c2e324f2be6d75ffe4b2f329875f6f81ba3e4657aa1c4e6514188d5269fd68f7d50b7d823281b1bb585804f84fda639931fcd349d168c169f736ee8613f9f451 WHIRLPOOL 38e4e30bd3d0302bae742198fdbb4bc31047140f1161bbc90215d8d311380f78ec5fb7100ac7271a44f29dc2d33d4c2867230cb47c5cf5f5fa4ff3047ce91a42
+EBUILD elivepatch-client-0.1.ebuild 620 SHA256 da82c3bba32df4bd028d853ca8cefb66804723276fad8443d2151718ad5eacc6 SHA512 9b54202d494a65590af00b8b230bc4721ef76645e687bcd904bf09374cdb41c82fda916e22aeb51f547adde5591afaa70df01fa70e385c3338cdebfa0d896339 WHIRLPOOL d7d3598ba760a5da1deaf04dfddda2bdc849422dabd06bcd8186335aba6aa3834f65a396230a39999918c30ad785ab022f030e045fa884a694166509e93a8d9d
+MISC metadata.xml 311 SHA256 ef38a7066ba3faa55bee1d6d854000420e9ed118a384df44f33d0a886d6f04a6 SHA512 d53e458f4c2a4844c50d65b8c75f18cf637992dbe78b17dcf20a8a0f15113df8b89c197d2f11f6160fcca7db23669db009028deec039cbf32911e966e6210e98 WHIRLPOOL 651cb1c5b367d755a2a949c94e8bf77cc7c98f3354eda0449ca2b4919848abcf2fb70859812cd79b08c997b83097850ef47c6ef69c2446c6c9e1fe93f6c58805
diff --git a/sys-apps/elivepatch-client/elivepatch-client-0.1.ebuild b/sys-apps/elivepatch-client/elivepatch-client-0.1.ebuild
new file mode 100644
index 000000000000..2645c846f0f1
--- /dev/null
+++ b/sys-apps/elivepatch-client/elivepatch-client-0.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Live patch installer client working with elivepatch-server"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Elivepatch"
+SRC_URI="https://github.com/aliceinwire/elivepatch-client/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ app-admin/sudo
+ dev-python/git-python[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/sys-apps/elivepatch-client/metadata.xml b/sys-apps/elivepatch-client/metadata.xml
new file mode 100644
index 000000000000..56f9bdda8540
--- /dev/null
+++ b/sys-apps/elivepatch-client/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 type="person">
+ <email>alicef@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">aliceinwire/elivepatch-client</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/elivepatch-server/Manifest b/sys-apps/elivepatch-server/Manifest
new file mode 100644
index 000000000000..dc4f8204aac5
--- /dev/null
+++ b/sys-apps/elivepatch-server/Manifest
@@ -0,0 +1,3 @@
+DIST elivepatch-server-0.1.tar.gz 11564 SHA256 8ce02c1284b5822fdb4c762fe45b6d3ea8d9f360bce5c59f42c96b3aa41e4908 SHA512 d469fbc32df7a586fa899c6e587832bd53c1984c97b973e3aad4f6bf62962846142938a6e6e5729fce39d3f7d486c5ed9fd9f484425d863a40a1199f170830fb WHIRLPOOL 98e7a30c8cfda908fa010185e5a508926e57c813a610156d163bdca116d6ef6e59ba31fe8a427a84a558d84a0d9f7ad7387db7b9536e5651a91de22d46648246
+EBUILD elivepatch-server-0.1.ebuild 784 SHA256 720611d8879281df92e63f5fed8f11b3d2cb939140a829a8e7f74febe47a6e3d SHA512 f766177ba4ff6b57cc6a5e08715440907d8d2066262354029cf16cf0339bd21cf0aa594200731c5302b73d93ad648d356dc2562f0060b1c648f4d14d1c48dabd WHIRLPOOL d18d3f7757e8cc00c932daa09f2cd0dc6831c4f6400b14fb123a38dda83c1de93fc502651ac4a7b282fa40fa9a5884917be6270e0646243a2deab4b1b311ee5a
+MISC metadata.xml 311 SHA256 d878cdaabbcbecddf41582de1894e7e967b3fb7a86d70bbd700be2ffecce03b8 SHA512 5add2dd39169c27b7688232595ceabd5e23a82d03f122d33d56cb19be11b3b98136a17437b0602adaccb7b61ee338f19df25e339a75ac362db072757106ea070 WHIRLPOOL 7e8c088c06e84f6615ec247022df8abfd39560dbeca05bb1ee77b4b73167306a2c455bf6c4c366ebd1516e705145642919569552221a2fbbbff0a14dbf5daf5a
diff --git a/sys-apps/elivepatch-server/elivepatch-server-0.1.ebuild b/sys-apps/elivepatch-server/elivepatch-server-0.1.ebuild
new file mode 100644
index 000000000000..84d6c4fbb2e3
--- /dev/null
+++ b/sys-apps/elivepatch-server/elivepatch-server-0.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Live patch building server with RESTFul Api for elivepatch-client"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Elivepatch"
+SRC_URI="https://github.com/aliceinwire/elivepatch-server/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-restful[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_install_all() {
+ newinitd init/elivepatch.init ${PN}
+ newconfd init/elivepatch.confd ${PN}
+ distutils-r1_python_install_all
+}
diff --git a/sys-apps/elivepatch-server/metadata.xml b/sys-apps/elivepatch-server/metadata.xml
new file mode 100644
index 000000000000..d7e109285f1a
--- /dev/null
+++ b/sys-apps/elivepatch-server/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 type="person">
+ <email>alicef@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">aliceinwire/elivepatch-server</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/entropy-server/Manifest b/sys-apps/entropy-server/Manifest
new file mode 100644
index 000000000000..6b5fed87552b
--- /dev/null
+++ b/sys-apps/entropy-server/Manifest
@@ -0,0 +1,5 @@
+DIST entropy-302.tar.bz2 1701434 SHA256 968267d65d3a4f1480fb1d4eac43f33777efe0b4486c80f9b3baef093f052f95 SHA512 9c3e577b9d3d94ec8491fc10012aec1347bfe440c8bdc473df73e424ae4e3eb89bf96e31c444e8d6ff7574848a6ac44f5ed114bc90d2e6b03e4a00f9873c027e WHIRLPOOL e03a7669d9c98a2a060822f5000d859158724730d172e536da7577c365864109990ea9e7fe143f5a8fa496474d637b57a93e18dc39f6282037e0f7941a4eba43
+EBUILD entropy-server-302.ebuild 805 SHA256 ad15e85e0bd9cb6a8c6ae046b55eceed48e22cee211ace804564abb4c3d6da8c SHA512 2651eb5451b27ee43a63cb9eb152ff42017887d89f3a44133e55010007956eef8cc7215b17a871d990198d748310e198dc79e7686c8c2ba66576810153bfca33 WHIRLPOOL 2b5068fdd1af96665bb76b18f4aa4dc651f47ffa527406b1c8fb7ca35466d5c96d91f6324ef4fa8cbb63b43836205508af91e1e909fef7e267325885da8cad20
+MISC ChangeLog 3527 SHA256 af2a0d46011057d73e7b1c97116a86c1e5c877c7e0e27216c278fa87310333e9 SHA512 c09b57b7ba97bbd5ecf0584d1f89d0065d29c717cc4cf1f65d2200af0141cad92ca560d27cc3cfdf1c5c3e5e765e5778f2a66a51c66d8b94838f7856929fd3fb WHIRLPOOL c423e475174e950f1b5453c9f4b8eeec07f26b71301ed4b4cfd4c88a5f17dfc10dfcf7be8ab651fe2f12b1084e7c01282cbd19a04d4a204a9b918e03cb5f0f22
+MISC ChangeLog-2015 4380 SHA256 a158b50bed9daa96225dbf37d285f41bfdebc03a12938967c7c056400f03598d SHA512 7ab72dc0468038c41347b8fb78d0d7c01c258b352b8e09da35dbc2ad099c14195383df8b1ebb43b9fd148e6e130b978b464580b81efdaee2f7d6c4b4862e4d9f WHIRLPOOL e2d28d454869311dbf4f0ee4f03fb29937e4f9c8032e6159e8ae77bef7b6052b3dbc4738650d5272afc98864eff2e3fb632ff0b5307332809850eb794c51d374
+MISC metadata.xml 516 SHA256 8bed76cd986d79259ecc6ee076ebec996ced7fddc50b4897eefdd55f35faca27 SHA512 04ab8c23fa65c7b373fec492725bb8778a719d815848ff7ec0201fb0dc6cf778a02b2f0be84c5396a936affd7e22ecc28645b895a402ed32ea5391ef57e9e749 WHIRLPOOL e94de981ee0166bbdcbfbdce0a656a7061fc43756c012cee7c87b0d594a67f772dcd9f57595ccfc00ea1e762c50265ec31c43abc3e9c59fe30c2f5d5e2782aa5
diff --git a/sys-apps/entropy-server/entropy-server-302.ebuild b/sys-apps/entropy-server/entropy-server-302.ebuild
new file mode 100644
index 000000000000..c2eff7b2fcd9
--- /dev/null
+++ b/sys-apps/entropy-server/entropy-server-302.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 bash-completion-r1
+
+DESCRIPTION="Entropy Package Manager server-side tools"
+HOMEPAGE="http://www.sabayon.org"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+matter"
+
+SRC_URI="mirror://sabayon/sys-apps/entropy-${PV}.tar.bz2"
+
+S="${WORKDIR}/entropy-${PV}/server"
+
+RDEPEND="~sys-apps/entropy-${PV}[${PYTHON_USEDEP}]
+ matter? ( ~app-admin/matter-${PV}[entropy] )
+ ${PYTHON_DEPS}
+ "
+DEPEND="app-text/asciidoc"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ newbashcomp "${S}/eit-completion.bash" eit
+
+ python_optimize "${D}/usr/lib/entropy/server"
+}
diff --git a/sys-apps/entropy-server/metadata.xml b/sys-apps/entropy-server/metadata.xml
new file mode 100644
index 000000000000..5ada9d7defc0
--- /dev/null
+++ b/sys-apps/entropy-server/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mudler@gentoo.org</email>
+ <name>Ettore Di Giacinto</name>
+ <description>Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>lxnay@gentoo.org</email>
+ <name>Fabio Erculiani</name>
+ <description>CC on bugs</description>
+ </maintainer>
+ <use>
+ <flag name="matter">Pull in app-admin/matter</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/entropy/Manifest b/sys-apps/entropy/Manifest
new file mode 100644
index 000000000000..df101fd98ebc
--- /dev/null
+++ b/sys-apps/entropy/Manifest
@@ -0,0 +1,5 @@
+DIST entropy-302.tar.bz2 1701434 SHA256 968267d65d3a4f1480fb1d4eac43f33777efe0b4486c80f9b3baef093f052f95 SHA512 9c3e577b9d3d94ec8491fc10012aec1347bfe440c8bdc473df73e424ae4e3eb89bf96e31c444e8d6ff7574848a6ac44f5ed114bc90d2e6b03e4a00f9873c027e WHIRLPOOL e03a7669d9c98a2a060822f5000d859158724730d172e536da7577c365864109990ea9e7fe143f5a8fa496474d637b57a93e18dc39f6282037e0f7941a4eba43
+EBUILD entropy-302.ebuild 3165 SHA256 4840c80d913943def9808546f7563b7cc5de590af0a91bbb4584f242f108bd28 SHA512 bdbd6574adabbc74f1c844438e25e4f148cd9f1c8e66d2dd016f002240fe89f4fe561b41bbbda7d2c2181f5f9cebfad2d81ca09d09c309b76842c540afe0de35 WHIRLPOOL 1706616597efbcb2fe240e7c879a8ff906d01f0733bdab725e7b17784c797a72cb8c78c790a6c998caf462939ba0473c1448d726fa9b37ae3c0d43c6582e3079
+MISC ChangeLog 3485 SHA256 f694f3fad091e58666414680ea2069fe1f14ea0e844ce46024f06504fac2c571 SHA512 5c144c8d3aa75b8bd5dc8d943521ba15d59a68617a413b632bd2b37ba68d3bbdddf5f6aa7b7652b32634771eb5fb162cac80f0fce75de30676e8ace4b9c749eb WHIRLPOOL dbe12ccddac2d7e73a730253d42431dc0d9423948b7b1b84e363408453847e6e28710f1ea4e9fd210e159572d6f539a604e1ff4fd6503f0336f5475c8aad3ca4
+MISC ChangeLog-2015 6004 SHA256 da57da1a2b775d20d4329e92135f7155366d98ecf27cd90cf0016c4b759e7553 SHA512 e56edce4b3954d801db2e67678383ebca3f86fbb2bada982ce2d9c5dcc35974a90d292332425684c0d7cb619351f78bdd0481367179384558c4366770f4fb8c4 WHIRLPOOL d46592903f117cbf2874372608ff990bb72878ad5417a00ebd3cd4e2d1ece755c4e5c5ff83578f811b5e7d7a327b75407b5e1359bb6678ec092fbf0b10057cd0
+MISC metadata.xml 447 SHA256 48a210571aa712b6016dc95f4c2a15f3e1d5996fbde224ce950b4fa4d74906a3 SHA512 2101f474c05885ff071c20a3feff1a6135a350f646b2799bba9c7f88ee64c36097cb4a8b4913d9e2042282d05cc148d75e7157c9ce7e9658396484b4a61f87d6 WHIRLPOOL ecfb1ed2079f00b6fddfbcba41b958cf859f11fe6871d4a31338bbc0272d2d7997c487b87b9f1d8494b74df2dbf116b49f4bcb6f14ade01dadd0509574c15323
diff --git a/sys-apps/entropy/entropy-302.ebuild b/sys-apps/entropy/entropy-302.ebuild
new file mode 100644
index 000000000000..bb7cc0fb6890
--- /dev/null
+++ b/sys-apps/entropy/entropy-302.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils python-single-r1 user
+
+DESCRIPTION="Entropy Package Manager foundation library"
+HOMEPAGE="http://www.sabayon.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+
+IUSE=""
+SRC_URI="mirror://sabayon/${CATEGORY}/${P}.tar.bz2"
+
+RDEPEND=">=app-misc/pax-utils-0.7
+ dev-db/sqlite:3[soundex(+)]
+ net-misc/rsync
+ sys-apps/diffutils
+ sys-apps/sandbox
+ >=sys-apps/portage-2.1.9[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ dev-util/intltool"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S="${S}/lib"
+
+REPO_CONFPATH="${ROOT}/etc/entropy/repositories.conf"
+REPO_D_CONFPATH="${ROOT}/etc/entropy/repositories.conf.d"
+ENTROPY_CACHEDIR="${ROOT}/var/lib/entropy/caches"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ # Can:
+ # - update repos
+ # - update security advisories
+ # - handle on-disk cache (atm)
+ enewgroup entropy || die "failed to create entropy group"
+ # Create unprivileged entropy user
+ enewgroup entropy-nopriv || die "failed to create entropy-nopriv group"
+ enewuser entropy-nopriv -1 -1 -1 entropy-nopriv || die "failed to create entropy-nopriv user"
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="usr/lib" install || die "make install failed"
+
+ python_optimize "${D}/usr/lib/entropy/lib/entropy"
+}
+
+pkg_postinst() {
+ for ex_conf in "${REPO_D_CONFPATH}"/_entropy_sabayon-limbo.example; do
+ real_conf="${ex_conf%.example}"
+ if [ -f "${real_conf}" ] || [ -f "${real_conf/_}" ]; then
+ # skip installation then
+ continue
+ fi
+ elog "Installing: ${real_conf}"
+ cp "${ex_conf}" "${real_conf}" -p
+ done
+
+ # Copy config file over
+ if [ -f "${REPO_CONFPATH}.example" ] && [ ! -f "${REPO_CONFPATH}" ]; then
+ elog "Copying ${REPO_CONFPATH}.example over to ${REPO_CONFPATH}"
+ cp "${REPO_CONFPATH}.example" "${REPO_CONFPATH}" -p
+ fi
+
+ if [ -d "${ENTROPY_CACHEDIR}" ]; then
+ einfo "Purging current Entropy cache"
+ rm -rf "${ENTROPY_CACHEDIR}"/*
+ fi
+
+ # Fixup Entropy Resources Lock, and /etc/entropy/packages
+ # files permissions. This fixes unprivileged Entropy Library usage
+ local res_file="${ROOT}"/var/lib/entropy/client/database/*/.using_resources
+ if [ -f "${res_file}" ]; then
+ chown root:entropy "${res_file}"
+ chmod g+rw "${res_file}"
+ chmod o+r "${res_file}"
+ fi
+ local pkg_files="package.mask package.unmask package.mask.d package.unmask.d"
+ local pkg_file
+ for pkg_file in ${pkg_files}; do
+ pkg_file="${ROOT}/etc/entropy/packages/${pkg_file}"
+ recursive=""
+ if [ -d "${pkg_file}" ]; then
+ recursive="-R"
+ fi
+ if [ -e "${pkg_file}" ]; then
+ chown ${recursive} root:entropy "${pkg_file}"
+ chmod ${recursive} go+r "${pkg_file}"
+ fi
+ done
+
+ # Setup Entropy Library directories ownership
+ chown root:entropy "${ROOT}/var/lib/entropy" # no recursion
+ chown root:entropy "${ROOT}/var/lib/entropy/client/packages" # no recursion
+ chown root:entropy "${ROOT}/var/log/entropy" # no recursion
+
+ echo
+ elog "If you want to enable Entropy packages delta download support, please"
+ elog "install dev-util/bsdiff."
+ echo
+}
diff --git a/sys-apps/entropy/metadata.xml b/sys-apps/entropy/metadata.xml
new file mode 100644
index 000000000000..2c94a04481eb
--- /dev/null
+++ b/sys-apps/entropy/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 type="person">
+ <email>mudler@gentoo.org</email>
+ <name>Ettore Di Giacinto</name>
+ <description>Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>lxnay@gentoo.org</email>
+ <name>Fabio Erculiani</name>
+ <description>CC on bugs</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/epoch/Manifest b/sys-apps/epoch/Manifest
new file mode 100644
index 000000000000..75dc0fb01a4a
--- /dev/null
+++ b/sys-apps/epoch/Manifest
@@ -0,0 +1,13 @@
+AUX epoch-1.0-epoch.conf 1914 SHA256 45ad2f568a13ab06febc5f92b8f562174ef1ae81ad452c1052d9e62a993c564b SHA512 7844d05f86e969e308cbbeb6b0e766a724b59ba5d58f2905ffe1e6d8cdc55436233203fa4434e41becd8b7488c774bf8f3d5cd6ff0b43acabc738643cd3c292b WHIRLPOOL b8fe32948be8d7db4f1e2c2cfe1ab441d0f4b910bce3f49a2da83608f117bf674caaa48290e5a77986e7bfcf79eb38601aa8a9f199ff39b291cdcecc1672c914
+AUX epoch-1.0-fix-CFLAGS.patch 156 SHA256 df0d16e5a7d6fb5c8006246580468f4e1a9e6d3eaf1b2f7d14e9f53da412fc66 SHA512 ddb76c70acc1f76a8842f8abbc5e62861e249b37dea0b97dd4b74496dca95683123ccb86c39d2414b679b4cb74db00a2cc069801897efbe3a8eafaa9454db538 WHIRLPOOL 566048c20c57ed6780a96dee849bb44dc6fc815886d19749613d4370506bc50ee3857fe90e87ce6a592300a58cb5dfede0d3d309202aca0b57d01e54c1b05bfe
+AUX epoch-1.3.0-fix-main.patch 631 SHA256 3d5791ed3a2f56f13d2577a7b93a7fde593cc4a57111ecf13ad0f19f4475ab87 SHA512 ab542435d5dec6be5d71a742270b5897a6798c6c89163853cf089c76ee3602056201eaa8836af1d0dad0392396f45b50d8c15e1b65ada892b703c5f70ed8ec32 WHIRLPOOL 84bc5de340c2a6301fccd234dd6b30afcdfdd60d9df335fed14a67063052be4e3748186c65df558202fc5dd187f69a4f626ec1a016409192661b75f51b8406dc
+DIST epoch-1.2.1.tar.gz 66718 SHA256 9ad6573ca71599f17cf6a567eef902cd1caadb5b5460764ae7bb4e16fa3a9423 SHA512 2d0c767165ec41452d1dabf338c8ea31772f1a8cd1e1dbd60c8469f2f235bb1f0cb60b467189f1fd1079dfc223b0687c1cfe5e729e1142ebc63323b1f9c0cf93 WHIRLPOOL 3c6382f6b2dfd0260f2a036403e995a7bca0b2ceb60a740c3294d736e091c6f9d21541f87a42019bfa25817135ea12bfaf59662ecd2eb85a1e126b9b2ad4c9d7
+DIST epoch_1.2.2.tar.gz 229377 SHA256 3c8bdc4e3ddcaf2410f2c6082cab61f0957dfacf5c14300dadc6c22afd5bca8b SHA512 9e3e38ef95c20237a3db4f47c9464f27e893a665f0692200d89e96b12f6b2e3af9b84d951356b7b354f19ea4fbe372e2e0ba406fdfeb8819914d46cfed3024a3 WHIRLPOOL 1235b63f15435ccdfaf451aca11bd7ab07bc1e0ea148c6430e4b896d7c5838966000c85fabcc03ed86e92a28b46814db80fea528881bce0aa8653af3492d1533
+DIST epoch_1.3.0.tar.gz 70681 SHA256 80ae3faa708976dfb15d5a59f10dfc0750fca9d16f164daea771757f89ddaa08 SHA512 1e4a8bee26d8819303cbeb67265ee74e294502acfb3f5e594222bb7bdcb2d077fe19e73c40e9111a6ef9af788d767434f5a9a357430b59d6a0cac0e36a3b8f9e WHIRLPOOL 6cd76694337f79a4a6e96a4506ec14a8a16c3861d808fa3a640fa02632833e79c3063c41dc210969798329df6467b4a21a367ed9c3182609c0a3fe26fbe0f60e
+EBUILD epoch-1.2.1.ebuild 1851 SHA256 f73b3d8c4fb5d52b22e9bd5c23deefe8556211f0c7d4565319a4ab6b4c4ad8ad SHA512 63f30d59fcf9edd299f1d07db79b459a123c31549b3af015ba85f32aaf9c11365b3e477b5a6a505ed7da41a844a751ad1ea2ef3178a6df3f1ff32a8fc8be4ccf WHIRLPOOL 4315e73ec55f2c7ab8565a3d78f9a9839f51455823e57fb007c4a8cfbb143b1abc2d9f10b31a1962eb2301ce34d75c50e8b23d19c212e2d2c4b14d2ab0062a91
+EBUILD epoch-1.2.2.ebuild 1821 SHA256 b954f90b95c21587f732b71c207c9a4d6029590366dd7622d7bb1e0e2923f757 SHA512 24a8f7578ef01bcd034c7da7e05a13b1243ec3353b6c01e3b0d417e0575cd56201aa9868461721cd74a930ea1822303153c3a22164e905650b1892d9e711bf62 WHIRLPOOL 7a6e249df1c7da143a3e091564cdac8d2b7a21a8120eed3fc314937cb394d8eb57d20dca6ceec8e6f9219057e74b9538b0e104c151168b6b376367c301957117
+EBUILD epoch-1.3.0.ebuild 1870 SHA256 35725d708317b5db6fb16bb69d7f9029d89ec6dd03821ad47206a425e763405f SHA512 db0a6c6d0a6f8e1f6b5f28d88987e340b27841f281780a0a72f26a209275167dde6ba810da66da29714f812e2b6a833578455f18dbba7b4a0ff61da29c18b6b7 WHIRLPOOL b6902062a68544fb2009fa4181831bb2ae9c40cd8754f3e89e01a59002cb59716a4f119d78837951d5a5fa76f62c85a1c9478de8ece5d0376605e18416933e3d
+EBUILD epoch-9999.ebuild 1816 SHA256 0a8da725268cb6a59c10155c66711e1a3b4f5b8af2b23d5d6f126a2177b198cf SHA512 55871d86034356b54f5616b64cb4c3058f074eb09fa2d05113160275e9d58f2903f2c0444c84dbc97aa96cba277241d9644e274d7b984842c74e3602800b2c86 WHIRLPOOL 526eeed31d54632727dbdf682265dcf1e507acd1d41f48e01bed6174d1d53acc060b3505063e94a738ba79b8d97a028d85901ee2476e96b7bc99c7873ab74c10
+MISC ChangeLog 2985 SHA256 225b8bb7280ab5909fb52ab9e510786dba38c56fb4fea46d07de8cfca86c63c1 SHA512 042456fc11da633101fe06350d9a279649ddb0b6a92b0dc706ed4f06eb32b3fb5b805b4d12d33be81b4191d32065884ff09e5b5d80400a70b7324a57f7c40bd5 WHIRLPOOL 3bcd0b59f887541fb340b4c797fe4184ecc2e1f09c305d5f94fedfd1eb02dd8d8298ce79e1fae4368965c02dd3bacf6f80f597ca09e17267188703c59f36a833
+MISC ChangeLog-2015 2564 SHA256 2cb1465305f8c986323c2033bb9e8d39cb2a2ee1cf39460ace992b3abf7139bb SHA512 cbb6fc503ebace8effcb4185bdcc0999faeea6f5e6b8cc85abc894a76107d7f118aa6d28975f05e5f22afaa61007cd0153a4f8b89b4c8e7af9e7143388d931e9 WHIRLPOOL 5423705b541265669ada8a399f15c2b97fe6858e5f138d2de48c87a65a38f4437b2eef15a7fcf4ee1ac678f00ba5bc674c8883283b07224036192361883b4c80
+MISC metadata.xml 978 SHA256 b0ff1d0a4343c9043569fb8e0891ef3968330c97794aff84e84ca73cd735c525 SHA512 02fb290226b7fb30061110eeaed6989a6dac611373634b57d19b01eab8d6444dd3eb7ea12f08c96851bb41efecdf80434e5c42d7da590b2048bfc23aff6ea261 WHIRLPOOL e675873bd6c9a8561795ab6b26bd1093241b1efc6ad9a2fe3dc94aeeac75a80e583a855a8ae0252ce4a7ed6168d967918b24c74658eb22eb7e923d4377ac4d42
diff --git a/sys-apps/epoch/epoch-1.2.1.ebuild b/sys-apps/epoch/epoch-1.2.1.ebuild
new file mode 100644
index 000000000000..16daffeeac89
--- /dev/null
+++ b/sys-apps/epoch/epoch-1.2.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils linux-info
+
+MY_PV="${PV/rc/RC}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An init system, a /sbin/init replacement; designed for simplicity"
+HOMEPAGE="http://universe2.us/epoch.html"
+SRC_URI="https://github.com/Subsentient/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~PROC_FS"
+
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-fix-CFLAGS.patch
+}
+
+src_compile() {
+ NEED_EMPTY_CFLAGS=1 sh ./buildepoch.sh || die "Cannot build epoch."
+}
+
+newepochins() {
+ local type="$1"
+
+ cd ${type} || die "Cannot change directory."
+ for file in * ; do
+ if [[ "${file}" != "epoch" ]] ; then
+ new${type} ${file} epoch-${file}
+ fi
+ done
+ cd .. || die "Cannot change directory."
+}
+
+src_install() {
+ cd built || die "Cannot change directory."
+
+ dosbin sbin/epoch
+
+ # For now, rename to epoch-* until we can blend in with a standard approach.
+ newepochins bin
+ newepochins sbin
+
+ insinto /etc/epoch/
+ newins "${FILESDIR}"/${PN}-1.0-epoch.conf epoch.conf
+}
+
+pkg_postinst() {
+ elog "Make sure to provide /run and /tmp tmpfs mounts using /etc/fstab."
+ elog ""
+ elog "An example epoch configuration is provided at /etc/epoch/epoch.conf"
+ elog "which starts a minimal needed to use Gentoo."
+ elog ""
+ elog "To use epoch, add this kernel parameter: init=/usr/sbin/epoch-init"
+ elog ""
+ elog "Additional information about epoch is available at"
+ elog "${HOMEPAGE} and configuration documentation at"
+ elog "http://universe2.us/epochconfig.html which is useful reading material."
+ elog ""
+ elog "Its author Subsentient can be contacted at #epoch on irc.freenode.net."
+}
diff --git a/sys-apps/epoch/epoch-1.2.2.ebuild b/sys-apps/epoch/epoch-1.2.2.ebuild
new file mode 100644
index 000000000000..4bb4a8d5db24
--- /dev/null
+++ b/sys-apps/epoch/epoch-1.2.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils linux-info
+
+MY_PV="${PV/rc/RC}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An init system, a /sbin/init replacement; designed for simplicity"
+HOMEPAGE="http://universe2.us/epoch.html"
+SRC_URI="http://universe2.us/${PN}_${PV}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+S="${WORKDIR}/${PN}_${PV}"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~PROC_FS"
+
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-fix-CFLAGS.patch
+}
+
+src_compile() {
+ NEED_EMPTY_CFLAGS=1 sh ./buildepoch.sh || die "Cannot build epoch."
+}
+
+newepochins() {
+ local type="$1"
+
+ cd ${type} || die "Cannot change directory."
+ for file in * ; do
+ if [[ "${file}" != "epoch" ]] ; then
+ new${type} ${file} epoch-${file}
+ fi
+ done
+ cd .. || die "Cannot change directory."
+}
+
+src_install() {
+ cd built || die "Cannot change directory."
+
+ dosbin sbin/epoch
+
+ # For now, rename to epoch-* until we can blend in with a standard approach.
+ newepochins bin
+ newepochins sbin
+
+ insinto /etc/epoch/
+ newins "${FILESDIR}"/${PN}-1.0-epoch.conf epoch.conf
+}
+
+pkg_postinst() {
+ elog "Make sure to provide /run and /tmp tmpfs mounts using /etc/fstab."
+ elog ""
+ elog "An example epoch configuration is provided at /etc/epoch/epoch.conf"
+ elog "which starts a minimal needed to use Gentoo."
+ elog ""
+ elog "To use epoch, add this kernel parameter: init=/usr/sbin/epoch-init"
+ elog ""
+ elog "Additional information about epoch is available at"
+ elog "${HOMEPAGE} and configuration documentation at"
+ elog "http://universe2.us/epochconfig.html which is useful reading material."
+ elog ""
+ elog "Its author Subsentient can be contacted at #epoch on irc.freenode.net."
+}
diff --git a/sys-apps/epoch/epoch-1.3.0.ebuild b/sys-apps/epoch/epoch-1.3.0.ebuild
new file mode 100644
index 000000000000..9b6a3f67f14b
--- /dev/null
+++ b/sys-apps/epoch/epoch-1.3.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils linux-info
+
+MY_PV="${PV/rc/RC}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An init system, a /sbin/init replacement; designed for simplicity"
+HOMEPAGE="http://universe2.us/epoch.html"
+SRC_URI="http://universe2.us/${PN}_${PV}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+S="${WORKDIR}/${PN}_${PV}"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~PROC_FS"
+
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-fix-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.3.0-fix-main.patch
+}
+
+src_compile() {
+ NEED_EMPTY_CFLAGS=1 sh ./buildepoch.sh || die "Cannot build epoch."
+}
+
+newepochins() {
+ local type="$1"
+
+ cd ${type} || die "Cannot change directory."
+ for file in * ; do
+ if [[ "${file}" != "epoch" ]] ; then
+ new${type} ${file} epoch-${file}
+ fi
+ done
+ cd .. || die "Cannot change directory."
+}
+
+src_install() {
+ cd built || die "Cannot change directory."
+
+ dosbin sbin/epoch
+
+ # For now, rename to epoch-* until we can blend in with a standard approach.
+ newepochins bin
+ newepochins sbin
+
+ insinto /etc/epoch/
+ newins "${FILESDIR}"/${PN}-1.0-epoch.conf epoch.conf
+}
+
+pkg_postinst() {
+ elog "Make sure to provide /run and /tmp tmpfs mounts using /etc/fstab."
+ elog ""
+ elog "An example epoch configuration is provided at /etc/epoch/epoch.conf"
+ elog "which starts a minimal needed to use Gentoo."
+ elog ""
+ elog "To use epoch, add this kernel parameter: init=/usr/sbin/epoch-init"
+ elog ""
+ elog "Additional information about epoch is available at"
+ elog "${HOMEPAGE} and configuration documentation at"
+ elog "http://universe2.us/epochconfig.html which is useful reading material."
+ elog ""
+ elog "Its author Subsentient can be contacted at #epoch on irc.freenode.net."
+}
diff --git a/sys-apps/epoch/epoch-9999.ebuild b/sys-apps/epoch/epoch-9999.ebuild
new file mode 100644
index 000000000000..f35febe3564b
--- /dev/null
+++ b/sys-apps/epoch/epoch-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils linux-info git-r3
+
+MY_PV="${PV/rc/RC}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An init system, a /sbin/init replacement; designed for simplicity"
+HOMEPAGE="http://universe2.us/epoch.html"
+EGIT_REPO_URI="https://github.com/Subsentient/epoch.git"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS=""
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~PROC_FS"
+
+ [[ ${MERGE_TYPE} != buildonly ]] && check_extra_config
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-fix-CFLAGS.patch
+}
+
+src_compile() {
+ NEED_EMPTY_CFLAGS=1 sh ./buildepoch.sh || die "Cannot build epoch."
+}
+
+newepochins() {
+ local type="$1"
+
+ cd ${type} || die "Cannot change directory."
+ for file in * ; do
+ if [[ "${file}" != "epoch" ]] ; then
+ new${type} ${file} epoch-${file}
+ fi
+ done
+ cd .. || die "Cannot change directory."
+}
+
+src_install() {
+ cd built || die "Cannot change directory."
+
+ dosbin sbin/epoch
+
+ # For now, rename to epoch-* until we can blend in with a standard approach.
+ newepochins bin
+ newepochins sbin
+
+ insinto /etc/epoch/
+ newins "${FILESDIR}"/${PN}-1.0-epoch.conf epoch.conf
+}
+
+pkg_postinst() {
+ elog "Make sure to provide /run and /tmp tmpfs mounts using /etc/fstab."
+ elog ""
+ elog "An example epoch configuration is provided at /etc/epoch/epoch.conf"
+ elog "which starts a minimal needed to use Gentoo."
+ elog ""
+ elog "To use epoch, add this kernel parameter: init=/usr/sbin/epoch-init"
+ elog ""
+ elog "Additional information about epoch is available at"
+ elog "${HOMEPAGE} and configuration documentation at"
+ elog "http://universe2.us/epochconfig.html which is useful reading material."
+ elog ""
+ elog "Its author Subsentient can be contacted at #epoch on irc.freenode.net."
+}
diff --git a/sys-apps/epoch/files/epoch-1.0-epoch.conf b/sys-apps/epoch/files/epoch-1.0-epoch.conf
new file mode 100644
index 000000000000..e0550d48709c
--- /dev/null
+++ b/sys-apps/epoch/files/epoch-1.0-epoch.conf
@@ -0,0 +1,77 @@
+BootBannerText=Welcome!
+BootBannerColor=RED
+
+Hostname=FILE /etc/hostname
+DefaultRunlevel=boot
+EnableLogging=true
+MountVirtual=procfs sysfs devpts+ devshm+
+
+ObjectID=mountrun
+ ObjectDescription=Mounting /run
+ ObjectStartCommand=mount /run
+ ObjectStartPriority=1
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=RAWDESCRIPTION
+ ObjectRunlevels=boot
+
+ObjectID=mounttmp
+ ObjectDescription=Mounting /tmp
+ ObjectStartCommand=mount /tmp
+ ObjectStartPriority=1
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=RAWDESCRIPTION
+ ObjectRunlevels=boot
+
+ObjectID=rwfs
+ ObjectDescription=read-write support on /
+ ObjectStartCommand=/bin/mount -o remount,rw /
+ ObjectStopCommand=/bin/mount -o remount,ro /
+ ObjectStartPriority=2
+ ObjectStopPriority=5
+ ObjectEnabled=true
+ ObjectRunlevels=boot
+
+ObjectID=getty1
+ ObjectDescription=agetty on /dev/tty1
+ ObjectStartCommand=agetty --noclear tty1 &
+ ObjectStopCommand=NONE
+ ObjectStartPriority=3
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot
+
+ObjectID=extrafs
+ ObjectDescription=extra filesystems and swaps
+ ObjectStartCommand=mount -a && swapon -a
+ ObjectStopCommand=swapoff -a && umount -a -r -t nodevtmpfs,notmpfs,nosysfs,noproc
+ ObjectStartPriority=4
+ ObjectStopPriority=4
+ ObjectEnabled=true
+ ObjectRunlevels=boot
+
+ObjectID=killall5_soft
+ ObjectDescription=Terminating all processes
+ ObjectStopCommand=killall5 -15 && sleep 1
+ ObjectStartPriority=0
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=HALTONLY RAWDESCRIPTION
+
+ObjectID=sync
+ ObjectDescription=Syncing
+ ObjectStopCommand=/bin/sync
+ ObjectStartPriority=0
+ ObjectStopPriority=2
+ ObjectEnabled=true
+ ObjectOptions=HALTONLY RAWDESCRIPTION
+
+ObjectID=killall5
+ ObjectDescription=Killing all processes
+ ObjectStopCommand=killall5 -9 && sleep 1
+ ObjectStartPriority=0
+ ObjectStopPriority=3
+ ObjectEnabled=true
+ ObjectOptions=HALTONLY RAWDESCRIPTION
diff --git a/sys-apps/epoch/files/epoch-1.0-fix-CFLAGS.patch b/sys-apps/epoch/files/epoch-1.0-fix-CFLAGS.patch
new file mode 100644
index 000000000000..92842722225a
--- /dev/null
+++ b/sys-apps/epoch/files/epoch-1.0-fix-CFLAGS.patch
@@ -0,0 +1,10 @@
+--- a/buildepoch.sh
++++ b/buildepoch.sh
+@@ -53,6 +53,6 @@
+ }
+
+-NEED_EMPTY_CFLAGS="0"
++NEED_EMPTY_CFLAGS="1"
+ outdir="../built"
+
+ if [ "$CC" == "" ]; then
diff --git a/sys-apps/epoch/files/epoch-1.3.0-fix-main.patch b/sys-apps/epoch/files/epoch-1.3.0-fix-main.patch
new file mode 100644
index 000000000000..b158ae2e3396
--- /dev/null
+++ b/sys-apps/epoch/files/epoch-1.3.0-fix-main.patch
@@ -0,0 +1,13 @@
+--- src/main.c.orig 2016-11-13 15:11:58.511021203 +0000
++++ src/main.c 2016-11-13 15:12:21.096021358 +0000
+@@ -1142,8 +1142,9 @@ static ReturnCode HandleEpochCommand(int
+ ShutdownMemBus(false); //We're done with membus now.
+
+ char Compare[WARNING + 1][MEMBUS_MSGSIZE] = { MEMBUS_CODE_FAILURE " ", MEMBUS_CODE_ACKNOWLEDGED " ", MEMBUS_CODE_WARNING " "};
++ int Inc;
+
+- for (int Inc = 0; Inc < sizeof Compare / sizeof *Compare; ++Inc)
++ for (Inc = 0; Inc < sizeof Compare / sizeof *Compare; ++Inc)
+ {
+ strcat(Compare[Inc], ArgIs("merge") ? MEMBUS_CODE_CFMERGE : MEMBUS_CODE_CFUMERGE);
+ strcat(Compare[Inc], " ");
diff --git a/sys-apps/epoch/metadata.xml b/sys-apps/epoch/metadata.xml
new file mode 100644
index 000000000000..ea25ec8b9cbd
--- /dev/null
+++ b/sys-apps/epoch/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alicef@gentoo.org</email>
+ <name>Alice Ferrazzi</name>
+ </maintainer>
+ <longdescription>
+ Epoch is an init system (analogous to systemd or upstart)
+ for Linux by Subsentient. It is intended as a lightweight
+ solution for lightweight distributions
+ that don't want a huge mess just to boot up.
+
+ It has one unified configuration file, is very small in size,
+ and it has no external dependencies besides glibc or similar,
+ and although installing a shell for /bin/sh is strongly recommended.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">Subsentient/epoch</remote-id>
+ <doc lang="en">http://universe2.us/epochconfig.html</doc>
+ <bugs-to>https://github.com/Subsentient/epoch/issues</bugs-to>
+ <changelog>https://github.com/Subsentient/epoch/commits/master</changelog>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/etckeeper/Manifest b/sys-apps/etckeeper/Manifest
new file mode 100644
index 000000000000..63bcedfa363a
--- /dev/null
+++ b/sys-apps/etckeeper/Manifest
@@ -0,0 +1,13 @@
+AUX 99etckeeper 60 SHA256 237108fb8d1b16ba51410acea5963991de7a2eef9db7594d67a7f725772da16f SHA512 b2c49d5a1fe2fb8e59d6b4d85b6e2176a8bf8486cb120698050c84e067c3ec47cbd681a7b1fd1739730380f95e9c7c9092462e1f8e4bb6b9c9986b03da83443f WHIRLPOOL d41e2caa2b1ec0cd57defb10ff01f2acd3c7d043d19c90bb3b18573d957e0f7a2f21f56390d30e9306272ab45cd7407219a63f53c369cf84016008ef94a6ad2e
+AUX bashrc 116 SHA256 ed9584cd6fdc180dbd3c3d332b07f0287698c9a5602664b8442fea2743141e5a SHA512 8ea8195aa7d65370382c05c92951157b133914d946eec17da4cec32e469130553bdffd91261ce571f5cd31577d5381818ab2deb3f1e6ac872f054dd2798ceb0e WHIRLPOOL b15d4a65c31d7243993204619b2b4d9b1f4bcf539abf43d20fc8fce9d9eabd928a466b5139e66c35430f0e9c9c103344b4ceffa328a4374a7d45dbef0cb4e672
+AUX bashrc-r1 114 SHA256 1d29da179b460ecc317097fe3d1ab341ef34c45855e2531580aa6cdce44cb776 SHA512 2c3e068413dec16e14b196a1c3eb945af5cbc0be99c9705dce18a7c6d3f70d625aedd2799cad085236923bbeaeafa0edbf7a1f97736ca548b4269257ffbeb01c WHIRLPOOL 56a311167c8e2ee4f7d0e2de11a305750f8075fa117f8b057a59c8684112806908685ba9326a5902478f821a8921fdb05984762bd24abbae60e2a9a5ff55db6c
+AUX etckeeper-1.18-gentoo.patch 3066 SHA256 41e51a02799d3b16b89b175b2171ed0259ef0ef46d963a0159318457287a0ddb SHA512 7cec9bbf989bf6dd0651fee386d180670b796d918d93523bb14a89a80851a3452e488f13c39ec751e1907a460ef34c32afb7fdb6696d7193afb6d70cdd9bb049 WHIRLPOOL 17da4841c502ac8aa9a28ab1c81f92b6ca82a6d99f8830491bce04fff3ea1b8a6ee18fadb488eaa35de5ad331c37b4577d4f187449e494a619a56ee8127e6ad3
+AUX etckeeper-1.18.3-gentoo.patch 2798 SHA256 33758c7cd9a0b2046e047cdeb8274ee3469238eaa0ebe1957b57ae527cf8a05e SHA512 b788d22d2c6da9356fbca0324d45b5c84ac50a0477ec6454898bb7f072a5b8d3ab752c4a022c59119599ae67d995bdb748f750c7281fa7e76876aee462b3589c WHIRLPOOL 6dbb02a10489e29f8cd178d41fbbd422e13be7493652c133fc662d5725e46498556be910c77ddbffd42ecb69a51d4187e966a796935a963f905dbf21ddebb063
+AUX etckeeper-1.18.6-gentoo.patch 2812 SHA256 6df09dedd270b875fcbb5bfde1ed9457bccb4341734a4c73ed38a715ee8ded55 SHA512 2f399e12c7bbeef539fd846532068c18fd0becdab505cbe56759c6eb7f9c4463eff49526858ffa745d4bc50619685dab81811db257506f9b537bbd7af9986958 WHIRLPOOL 7c90ce4fd899b0e06d4b12d72469017d2d1f37f3d7dd11d95541ded97ad3b45f8d654644a5f7ea629cb724a9973d6f3367572ab989702eef17d5823b7b180fd9
+DIST etckeeper-1.18.1.tar.gz 56366 SHA256 80adee6e17bfc41359ffb85a401d9a510ae25956950adbfdd07a0bda36d99e9b SHA512 5b5019d3f8c22ee0486c9102d7dbdc7e86921d432df49c15733e5ed23651c2be87b52e295208be691ef1e44a515d960fcf4f812eaca17f2806e2f5055222ca35 WHIRLPOOL 890b38f761f49a5a4713fa850bc18e09688ed8fb04d9b41f3727f868448fb1ba1ecf92750df777fc6011a3f88abeb8756105fbdc60ebf6fd3e693360764fb27c
+DIST etckeeper-1.18.6.tar.gz 73487 SHA256 7db1a2b48c011b5e04ec95af559de8d1d243bdcdf6cd591b3b0b46d1f21e9602 SHA512 a5a3a4677f31cf1d010ab40ed37ce602c71c2e8ebf2273bf8be6dc8209f603ae0fc6a2c0d5d60d9a9d9aa4f3e7b7c0037534890cbc67b38132e5f654abcda04c WHIRLPOOL 41805cff70804abe574831ec1bb2bc4e2e5079ff97c777f2597f8af4f6e972009312b5f1760a0c17e0db0f150266b94cdc1f49afb8e15401d8c57ad540112324
+EBUILD etckeeper-1.18.1.ebuild 1784 SHA256 7a0b846c64c93fed58193efcee61accc43fd0e5cc3121364e7a102ef5228e55b SHA512 b391cdd6aee3426361274efe675398d02ef0918ec12d3c69bb91f9c9852b15227bc93cfa706073d5a622035cd37cc1b11ca8a736ebe77a3194e7cda1da991d85 WHIRLPOOL 813e91c4e3eae68e6cc5dbcaeae0fd802f18cac13ebc07335ed35a10bafb9768bb24e9dd606f87e03a5795188c0345174b1d736c7404797c4ea69f2d29fccede
+EBUILD etckeeper-1.18.6.ebuild 1713 SHA256 72776af9841508bb3f50e82f57d8ddbbdcb106a2670a68c3ce05673227e67983 SHA512 faa248a5bf4546bf8202ad9f9f70efe90b4ce83b2240f8dab4dbd2a53f9de2bfd2fbb5e6885a7c2be0f8098c10796f5a0ff1e12f1bf39d11f4bf4a0a0fc40ea8 WHIRLPOOL 2565d7b11ef7d09b2211a8e935e5e8fd752f6ecbccb1b718ca56f22db0f0324041c607f2fbb01c163f915416f4ba6f3a50abff6f717b6d7187981e7b147e1ba2
+MISC ChangeLog 3834 SHA256 450b4c78a505a0fd0bd2cfd23847fd7b79e3dca9e1a209e52ec67502691884d2 SHA512 0fbf70a308540fdf81bd4248fa320bf99b2c7f00bf5903c0b3a99616f0580e96c9eab7c718643a7dc81c09b1c057ddccf0024e818f22dd68f2967e7736f65438 WHIRLPOOL 2fa801f919b202adbea476f5b7b4531f30dab603349e9d952fbacadb1f2be41514f57e15a4eedf76443d9b62c2c7eb4332c1afdcfe42ad7fbf8627f474dd2e3c
+MISC ChangeLog-2015 6907 SHA256 e058e3b57150e5a9872eda510bd073f8040bca2c23f91dbde1f9f1b3ad9bf58b SHA512 e93dc69c45a2cd224b5e38daa0114cbbb668ec4e038e3c7ac8a63d1e1b7e507dff030f5a6ee3acea75bb3ac1fc04fa476c3d03165b4972b7421604993d82270e WHIRLPOOL 106543ed11ce9be5b91dfb3e0925a6f23bc0f28de7818495821ac51a898f4a20ae01b3eea1adb88cac55c11264cab9bd6048e26bb1be53f3dea478a6481b9037
+MISC metadata.xml 858 SHA256 b20fcf3b058ce15c09f7d9e2becdf7ada89c69490242fb3180fbc80713b5a798 SHA512 00fd05b8d5e88cc6ca4b77292ebb0a36aff2fb35b803c37e044790493d2ed290d9d250a3ebaf70e9ea7c02dc23cd79d42956047a4922cbe09889081e138ac93d WHIRLPOOL df526a5cc75b10c4e81517b41674036a7eb6f4310a14b7537883ba8848284cad399cf6bf89965e76c51022be87a50960286a432e5ffe28466cf41d43f25c1695
diff --git a/sys-apps/etckeeper/etckeeper-1.18.1.ebuild b/sys-apps/etckeeper/etckeeper-1.18.1.ebuild
new file mode 100644
index 000000000000..2f269c707d0b
--- /dev/null
+++ b/sys-apps/etckeeper/etckeeper-1.18.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils bash-completion-r1 prefix python-r1
+
+DESCRIPTION="A collection of tools to let /etc be stored in a repository"
+HOMEPAGE="https://etckeeper.branchable.com/"
+SRC_URI="https://github.com/joeyh/etckeeper/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~arm x86"
+SLOT="0"
+IUSE="bazaar cron"
+REQUIRED_USE="bazaar? ( ${PYTHON_REQUIRED_USE} )"
+
+VCS_DEPEND="dev-vcs/git
+ dev-vcs/mercurial
+ dev-vcs/darcs"
+DEPEND="bazaar? ( dev-vcs/bzr )"
+RDEPEND="${DEPEND}
+ app-portage/portage-utils
+ cron? ( virtual/cron )
+ bazaar? ( ${PYTHON_DEPS} )
+ !bazaar? ( || ( ${VCS_DEPEND} ) )"
+
+src_prepare(){
+ epatch "${FILESDIR}"/${PN}-1.18-gentoo.patch
+}
+
+src_compile() {
+ :
+}
+
+src_install(){
+ emake DESTDIR="${ED}" install
+
+ bzr_install() {
+ ${PYTHON} ./${PN}-bzr/__init__.py install --root="${ED}" ||
+ die "bzr support installation failed!"
+ }
+ use bazaar && python_foreach_impl bzr_install
+
+ if use prefix; then
+ doenvd "${FILESDIR}"/99${PN}
+ eprefixify "${ED%/}"/etc/env.d/99${PN}
+ fi
+
+ newbashcomp bash_completion ${PN}
+ dodoc doc/README.mdwn
+ docinto examples
+ newdoc "${FILESDIR}"/bashrc-r1 bashrc
+
+ if use cron ; then
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily etckeeper
+ fi
+}
+
+pkg_postinst(){
+ elog "${PN} supports the following VCS: ${VCS_DEPEND}"
+ elog " dev-vcs/bzr"
+ elog "This ebuild just ensures at least one is installed!"
+ elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
+ elog
+ elog "You may want to adjust your /etc/portage/bashrc"
+ elog "see the example file in /usr/share/doc/${PF}/examples"
+ elog
+ elog "To initialise your etc-dir as a repository run:"
+ elog "${PN} init -d /etc"
+}
diff --git a/sys-apps/etckeeper/etckeeper-1.18.6.ebuild b/sys-apps/etckeeper/etckeeper-1.18.6.ebuild
new file mode 100644
index 000000000000..24ebe2733980
--- /dev/null
+++ b/sys-apps/etckeeper/etckeeper-1.18.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils prefix python-r1
+
+DESCRIPTION="A collection of tools to let /etc be stored in a repository"
+HOMEPAGE="https://etckeeper.branchable.com/"
+SRC_URI="https://github.com/joeyh/etckeeper/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+IUSE="bazaar cron"
+REQUIRED_USE="bazaar? ( ${PYTHON_REQUIRED_USE} )"
+
+VCS_DEPEND="dev-vcs/git
+ dev-vcs/mercurial
+ dev-vcs/darcs"
+DEPEND="bazaar? ( dev-vcs/bzr )"
+RDEPEND="${DEPEND}
+ app-portage/portage-utils
+ cron? ( virtual/cron )
+ bazaar? ( ${PYTHON_DEPS} )
+ !bazaar? ( || ( ${VCS_DEPEND} ) )"
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_compile() {
+ :
+}
+
+src_install(){
+ emake DESTDIR="${ED}" install
+
+ bzr_install() {
+ ${PYTHON} ./${PN}-bzr/__init__.py install --root="${ED}" ||
+ die "bzr support installation failed!"
+ }
+ use bazaar && python_foreach_impl bzr_install
+
+ if use prefix; then
+ doenvd "${FILESDIR}"/99${PN}
+ eprefixify "${ED%/}"/etc/env.d/99${PN}
+ fi
+
+ dodoc doc/README.mdwn
+ docinto examples
+ newdoc "${FILESDIR}"/bashrc-r1 bashrc
+
+ if use cron ; then
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily etckeeper
+ fi
+}
+
+pkg_postinst(){
+ elog "${PN} supports the following VCS: ${VCS_DEPEND}"
+ elog " dev-vcs/bzr"
+ elog "This ebuild just ensures at least one is installed!"
+ elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
+ elog
+ elog "You may want to adjust your /etc/portage/bashrc"
+ elog "see the example file in /usr/share/doc/${PF}/examples"
+ elog
+ elog "To initialise your etc-dir as a repository run:"
+ elog "${PN} init -d /etc"
+}
diff --git a/sys-apps/etckeeper/files/99etckeeper b/sys-apps/etckeeper/files/99etckeeper
new file mode 100644
index 000000000000..9848af2d7713
--- /dev/null
+++ b/sys-apps/etckeeper/files/99etckeeper
@@ -0,0 +1 @@
+ETCKEEPER_CONF_DIR="@GENTOO_PORTAGE_EPREFIX@/etc/etckeeper"
diff --git a/sys-apps/etckeeper/files/bashrc b/sys-apps/etckeeper/files/bashrc
new file mode 100644
index 000000000000..ce53621a22ac
--- /dev/null
+++ b/sys-apps/etckeeper/files/bashrc
@@ -0,0 +1,4 @@
+case "${EBUILD_PHASE}" in
+ preinst|prerm) etckeeper pre-install ;;
+ postinst|postrm) etckeeper post-install ;;
+esac
diff --git a/sys-apps/etckeeper/files/bashrc-r1 b/sys-apps/etckeeper/files/bashrc-r1
new file mode 100644
index 000000000000..f581790ecc85
--- /dev/null
+++ b/sys-apps/etckeeper/files/bashrc-r1
@@ -0,0 +1,4 @@
+case "${EBUILD_PHASE}" in
+ setup|prerm) etckeeper pre-install ;;
+ postinst|postrm) etckeeper post-install ;;
+esac
diff --git a/sys-apps/etckeeper/files/etckeeper-1.18-gentoo.patch b/sys-apps/etckeeper/files/etckeeper-1.18-gentoo.patch
new file mode 100644
index 000000000000..a5018bd77d1a
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-1.18-gentoo.patch
@@ -0,0 +1,86 @@
+From 385d0e828d57e4998dd62fa34d5d929768fb894d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
+Date: Sun, 12 Apr 2015 23:39:30 +0200
+Subject: [PATCH] Support Gentoo's package managers.
+
+
+diff --git a/Makefile b/Makefile
+index c95d51a..4be900e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,6 @@ install: etckeeper.version
+ mkdir -p $(DESTDIR)$(mandir)/man8
+ $(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8
+ mkdir -p $(DESTDIR)$(etcdir)/bash_completion.d
+- $(INSTALL_DATA) bash_completion $(DESTDIR)$(etcdir)/bash_completion.d/etckeeper
+ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt)
+ mkdir -p $(DESTDIR)$(etcdir)/apt/apt.conf.d
+ $(INSTALL_DATA) apt.conf $(DESTDIR)$(etcdir)/apt/apt.conf.d/05etckeeper
+@@ -52,7 +51,6 @@ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper)
+ mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit
+ $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py
+ endif
+- -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
+ echo "** installation successful"
+
+ clean: etckeeper.spec etckeeper.version
+diff --git a/etckeeper.conf b/etckeeper.conf
+index 2aec35e..0a9c88b 100644
+--- a/etckeeper.conf
++++ b/etckeeper.conf
+@@ -31,11 +31,21 @@ DARCS_COMMIT_OPTIONS="-a"
+
+ # The high-level package manager that's being used.
+ # (apt, pacman-g2, yum, dnf, zypper etc)
+-HIGHLEVEL_PACKAGE_MANAGER=apt
++#HIGHLEVEL_PACKAGE_MANAGER=apt
++
++# Gentoo specific:
++# For portage this is emerge
++# For paludis this is cave
++HIGHLEVEL_PACKAGE_MANAGER=emerge
+
+ # The low-level package manager that's being used.
+ # (dpkg, rpm, pacman, pacman-g2, etc)
+-LOWLEVEL_PACKAGE_MANAGER=dpkg
++#LOWLEVEL_PACKAGE_MANAGER=dpkg
++
++# Gentoo specific:
++# For portage this is qlist
++# For paludis this is cave
++LOWLEVEL_PACKAGE_MANAGER=qlist
+
+ # To push each commit to a remote, put the name of the remote here.
+ # (eg, "origin" for git). Space-separated lists of multiple remotes
+diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed
+index 2ac569a..91718d4 100755
+--- a/list-installed.d/50list-installed
++++ b/list-installed.d/50list-installed
+@@ -17,5 +17,9 @@ else
+ rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then
+ pacman -Q
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = qlist ]; then
++ qlist -ICv
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = cave ]; then
++ cave print-packages -r installed
+ fi
+ fi
+diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore
+index 098fab8..88243ea 100755
+--- a/update-ignore.d/01update-ignore
++++ b/update-ignore.d/01update-ignore
+@@ -99,6 +99,10 @@ writefile () {
+ ignore "*.pacorig"
+ ignore "*.pacsave"
+ nl
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "qlist" -o "$LOWLEVEL_PACKAGE_MANAGER" = "cave" ]; then
++ comment "new and old versions of conffiles, stored by emerge"
++ ignore "._cfg*"
++ nl
+ fi
+
+ comment "old versions of files"
+--
+2.3.5
+
diff --git a/sys-apps/etckeeper/files/etckeeper-1.18.3-gentoo.patch b/sys-apps/etckeeper/files/etckeeper-1.18.3-gentoo.patch
new file mode 100644
index 000000000000..8661d391f9c6
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-1.18.3-gentoo.patch
@@ -0,0 +1,78 @@
+From 026fa7c012a8c44cadfa56f605c0671639a6b04c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
+Date: Tue, 16 Feb 2016 00:19:07 +0100
+Subject: [PATCH] Support Gentoo's package managers
+
+
+diff --git a/Makefile b/Makefile
+index 70bddfa..6090a4e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,7 +58,6 @@ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper)
+ mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit
+ $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py
+ endif
+- -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
+ echo "** installation successful"
+
+ clean: etckeeper.spec etckeeper.version
+diff --git a/etckeeper.conf b/etckeeper.conf
+index 0d268bd..81214c7 100644
+--- a/etckeeper.conf
++++ b/etckeeper.conf
+@@ -31,11 +31,21 @@ DARCS_COMMIT_OPTIONS="-a"
+
+ # The high-level package manager that's being used.
+ # (apt, pacman, pacman-g2, yum, dnf, zypper etc)
+-HIGHLEVEL_PACKAGE_MANAGER=apt
++#HIGHLEVEL_PACKAGE_MANAGER=apt
++
++# Gentoo specific:
++# For portage this is emerge
++# For paludis this is cave
++HIGHLEVEL_PACKAGE_MANAGER=emerge
+
+ # The low-level package manager that's being used.
+ # (dpkg, rpm, pacman, pacmatic, pacman-g2, etc)
+-LOWLEVEL_PACKAGE_MANAGER=dpkg
++#LOWLEVEL_PACKAGE_MANAGER=dpkg
++
++# Gentoo specific:
++# For portage this is qlist
++# For paludis this is cave
++LOWLEVEL_PACKAGE_MANAGER=qlist
+
+ # To push each commit to a remote, put the name of the remote here.
+ # (eg, "origin" for git). Space-separated lists of multiple remotes
+diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed
+index 129447f..79d67f2 100755
+--- a/list-installed.d/50list-installed
++++ b/list-installed.d/50list-installed
+@@ -21,5 +21,9 @@ else
+ pacmatic -Q
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pkgng ]; then
+ pkg info -E "*"
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = qlist ]; then
++ qlist -ICv
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = cave ]; then
++ cave print-packages -r installed
+ fi
+ fi
+diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore
+index 7347287..5dbb398 100755
+--- a/update-ignore.d/01update-ignore
++++ b/update-ignore.d/01update-ignore
+@@ -99,6 +99,10 @@ writefile () {
+ ignore "*.pacorig"
+ ignore "*.pacsave"
+ nl
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "qlist" -o "$LOWLEVEL_PACKAGE_MANAGER" = "cave" ]; then
++ comment "new and old versions of conffiles, stored by emerge"
++ ignore "._cfg*"
++ nl
+ fi
+
+ comment "old versions of files"
+--
+2.7.1
+
diff --git a/sys-apps/etckeeper/files/etckeeper-1.18.6-gentoo.patch b/sys-apps/etckeeper/files/etckeeper-1.18.6-gentoo.patch
new file mode 100644
index 000000000000..a229683bbb01
--- /dev/null
+++ b/sys-apps/etckeeper/files/etckeeper-1.18.6-gentoo.patch
@@ -0,0 +1,78 @@
+From 026fa7c012a8c44cadfa56f605c0671639a6b04c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
+Date: Tue, 16 Feb 2016 00:19:07 +0100
+Subject: [PATCH] Support Gentoo's package managers
+
+
+diff --git a/Makefile b/Makefile
+index 70bddfa..6090a4e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,7 +58,6 @@ ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper)
+ mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit
+ $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py
+ endif
+- -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
+ echo "** installation successful"
+
+ clean: etckeeper.spec etckeeper.version
+diff --git a/etckeeper.conf b/etckeeper.conf
+index 0d268bd..81214c7 100644
+--- a/etckeeper.conf
++++ b/etckeeper.conf
+@@ -31,11 +31,21 @@ DARCS_COMMIT_OPTIONS="-a"
+
+ # The high-level package manager that's being used.
+ # (apt, pacman, pacman-g2, yum, dnf, zypper, apk etc)
+-HIGHLEVEL_PACKAGE_MANAGER=apt
++#HIGHLEVEL_PACKAGE_MANAGER=apt
++
++# Gentoo specific:
++# For portage this is emerge
++# For paludis this is cave
++HIGHLEVEL_PACKAGE_MANAGER=emerge
+
+ # The low-level package manager that's being used.
+ # (dpkg, rpm, pacman, pacmatic, pacman-g2, apk etc)
+-LOWLEVEL_PACKAGE_MANAGER=dpkg
++#LOWLEVEL_PACKAGE_MANAGER=dpkg
++
++# Gentoo specific:
++# For portage this is qlist
++# For paludis this is cave
++LOWLEVEL_PACKAGE_MANAGER=qlist
+
+ # To push each commit to a remote, put the name of the remote here.
+ # (eg, "origin" for git). Space-separated lists of multiple remotes
+diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed
+index 129447f..79d67f2 100755
+--- a/list-installed.d/50list-installed
++++ b/list-installed.d/50list-installed
+@@ -21,5 +21,9 @@ else
+ pkg info -E "*"
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = apk ]; then
+ apk info -v | sort
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = qlist ]; then
++ qlist -ICv
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = cave ]; then
++ cave print-packages -r installed
+ fi
+ fi
+diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore
+index 7347287..5dbb398 100755
+--- a/update-ignore.d/01update-ignore
++++ b/update-ignore.d/01update-ignore
+@@ -99,6 +99,10 @@ writefile () {
+ ignore "*.pacorig"
+ ignore "*.pacsave"
+ nl
++ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "qlist" -o "$LOWLEVEL_PACKAGE_MANAGER" = "cave" ]; then
++ comment "new and old versions of conffiles, stored by emerge"
++ ignore "._cfg*"
++ nl
+ fi
+
+ comment "old versions of files"
+--
+2.7.1
+
diff --git a/sys-apps/etckeeper/metadata.xml b/sys-apps/etckeeper/metadata.xml
new file mode 100644
index 000000000000..2099408f5f81
--- /dev/null
+++ b/sys-apps/etckeeper/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <use>
+ <flag name="bazaar">Support <pkg>dev-vcs/bzr</pkg> based repository
+ </flag>
+ <flag name="cron">Install cron script</flag>
+ </use>
+ <longdescription>etckeeper is a collection of tools to let /etc be stored in
+ a git, mercurial, darcs, or bzr repository. It can hook into portage to
+ automatically commit changes made to /etc during package upgrades. It tracks
+ file metadata that revison control systems do not normally support, but that
+ is important for /etc, such as the permissions of /etc/shadow.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">joeyh/etckeeper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/ethtool/Manifest b/sys-apps/ethtool/Manifest
new file mode 100644
index 000000000000..3a616ec2a7f5
--- /dev/null
+++ b/sys-apps/ethtool/Manifest
@@ -0,0 +1,21 @@
+DIST ethtool-3.10.tar.xz 184888 SHA256 f88d941b63a0e51613bde5498d42f4ee2eefa332064e7a8dd80069a341dc1c40 SHA512 b7a28e70f92854abb47e61cd927d93b2716407b77d20253e0b21d225e7033d466772677215d2c7b1a811504e8d00e438b47abcf2448c79488dc677bb0ce2183b WHIRLPOOL 424933cb753b92cd26b7694f9849b25f206d094097be21c44f5c8a96b2bb256cc45f6d9c86348267e5eb1ed075a1159aabf2caa3867651818847c0600fdd0f73
+DIST ethtool-3.16.tar.xz 198760 SHA256 d6e0dd3fa904c3ad87487c66a4a8fde1ebc4194979ca5755df4b2efb247ca286 SHA512 5f3790872eef14c20b4e1c59e9f318f18811022fa2b1c345699c815acf942e91288bb08d6e7d36d8b4f33101e52c832522d5118146f9e0f5d98cdf2f9c0d0d30 WHIRLPOOL 43195f66cfe97c0066bedb05e46342d5da8efc36bdb307d20e787b17777e20d781f7beecb2cbc161ed9d7efdd81c54796a47bbdf927aa761ce64d3bb3f203606
+DIST ethtool-3.18.tar.xz 198780 SHA256 813ffe59fddd2db423c578448b10e33e2e2d4cc2ba780f1f0c603642b20342f6 SHA512 06fba3458c69bd414f5c5edaba006f39e0777614521e5dc37859d1947d3069f7c04f8ea2513f16a930183fb98fc4b6e7cc374a2070787a750673cbf01943eb62 WHIRLPOOL 9c235b7c01f846601a714b8c774e217b1f5f5097dd561adeada940aaeea15f7ccb76232be3536c486fd14486ca5a18f0658bfed2096c173718fc7a188d7ce1ee
+DIST ethtool-3.4.2.tar.bz2 200731 SHA256 e2cb6e7977c804b0fa387ba41a04772d37efeb237f27de59eace06792a47a187 SHA512 43714a643c741ef46132e06f6f407bbf77c7787a6fcfe6b9b73165883ea498890ee23d34662255c6fbaeba924d2f8e8cd5160c33c960492dcf5e4a94d2bb68a9 WHIRLPOOL ffaecb40293f15c2e33f85fc6a6318ce1ce82b5db0395e6a0ead0deb45ef39d765c3dd91e66e4b0e83d33b07b98c5ac30e821f9800fff56b788bb46351ce204c
+DIST ethtool-4.0.tar.xz 199548 SHA256 904887acc7d2f9c35dec04eb0e8a727a3205f346af4f4c95560ea3798de5ecff SHA512 708f7df17f04339d1f6e9f80e0e9b4d7855fd71b974a833e5644ee4b7a431032ce70ceac85e37e59847eb0bea4226c0467b12605e16a005f83d75c33367a6ef2 WHIRLPOOL c1649c83146ded3d245d1e96783f1fc79d51f2d2fdbf877eed6968d5c7a37d4bb3855d45d4110369199d95bc8a4b807fe4707265f89e4a8e1e883b843739e322
+DIST ethtool-4.10.tar.xz 216320 SHA256 f0009726ecf34128b9a8238b71a652847dbc06bd1b877656699b0592b95c74ba SHA512 6766c468e141300b4828e6bdc98e7e720d35bb122405fc05d4ae94bbdce50b98e48ddd0505b09c990040da67e942e08a88b28b46d94aca8d544caf0aee4aac36 WHIRLPOOL 327d133b8c280a64a88f628b4e7f987dab29919e696a65eadd28c537d0caace0cf381f9410063ee43c961c19d80721738b1c577f7c3dc03580a700d86c1369fa
+DIST ethtool-4.11.tar.xz 216976 SHA256 12d8edaa8064966b8ef19cc44fecc096a68828035b6a1f2c67a27531a718e1b2 SHA512 177bbb725abc725dece99b4198f673b57ac9fc5c466aa36ac9e2a66b5535c82b5a27e916ef3e489232709e0b2d27d821acb4bea17d9b5a1940bf83e6a13ef445 WHIRLPOOL 4ce489a2c205cbe3a3b2a5c53cf6e67b865f00fc197174ebe9a2c8195c6626a8a96f27a838be4e9154814b6b9bf8d0c362c8e5466e8a3868f96ef961c2c286df
+DIST ethtool-4.5.tar.xz 204244 SHA256 bb2834332c5ac7f5bbe1c9f78f4fa851e4a3fe6397b124d58467c9ccee9fca3b SHA512 fa5b4547de0315c54113d9c7baea53dd4bb6e46c9340255cecf9a39f549190cb5de9db98ad4330a6eeced3a1f9ed6f2ae42cf5a602c0ef1c5a9fd17c825558a4 WHIRLPOOL f8923518cba1e66428ac883c85ca88ea6bae74943edfec4867f21873397f034286a8572ca75529aedeaeb1cd0ad2399307f94920e541de7f494beb3bf3af2f67
+DIST ethtool-4.8.tar.xz 214932 SHA256 403dfe288e2d8031eab0be3f5d0ca9128e120d61c52c3dc434474fa026eb4a43 SHA512 ab1f13db57129fdef6018d8d8ee4ad9733041813aa0b7a29d46407e93d3c264a42aa24e2f1892084d523ed9946c62c6b9d2ae886629aeb013a58a0946fd6be96 WHIRLPOOL 4d162bb10b5da6aac7993def99b45c300792fa700ae38d5f1bc0109a2a7bfbc84850da5ee08f147f454aff77d48afb33220b2afe907ae3e0067ee89973ce618b
+EBUILD ethtool-3.10.ebuild 456 SHA256 27394a7797549dc2f220546c09a86a4b51ed81e4776d54412746d8445c258859 SHA512 64d39e8e01b77c4e8b931e9f3ac84626bb6e85ae84037fbf3ea7cfd4e0e67ce0ad25428c9dfd994c5ced26a244f515337b5095dd80f1bf3be407283894821396 WHIRLPOOL db05f56d05539dc1ad0aeae32d27f7a2d6c40e4f444b9b67abbfab483d35d8e7d5f25f5ce1a4189ab5a6ada881855746e44c91b3e8a065b4985686a2ce15d65e
+EBUILD ethtool-3.16.ebuild 456 SHA256 b63a5da7341beaef0430b4b06a845314231a55a49b67cc103adc50d7a1701276 SHA512 90bf0fcb1204ab2bb0c70a21d92c8901dea3c07fefd6ce938add8e1dbdb8a074b1780bc7065d17936314e022abadd937c5c84257fd2493141976381d3134aec0 WHIRLPOOL ff55a1d9e49dba2296d117f9654ff58fc7917af1cf036a5aff52828f25d714e6ff523463a5f10a47907a664a83d625da840415174b0fb1e340451b7aa2afac61
+EBUILD ethtool-3.18.ebuild 447 SHA256 d30a2553c05ff80c3015940da99f69a763424e1704ffe1885c97966c02e92042 SHA512 f3c0c56e661f8b4c5a927783074d4d7cfc9d5b8250fad6ca78c8cd2bbf5c839ef966a8795109d686ba646a63f854a3d14fe0d388c958808a264e440178f40e3d WHIRLPOOL 034e0053696ff5a07588e4ee2b5c196b3ad07ca35605189b76cc049ce2441eb13761f6d4a743e996c20bee06937c718b01c509494a69bcbe7430697ac52c8b5e
+EBUILD ethtool-3.4.2.ebuild 437 SHA256 0a32bdf649e69c5a0a151d42608facb9621a7fe68d67b3ac29d8580179e7565d SHA512 fd275a7e2cd8dd7a547c7b307167d34aabb43d277c17804983d41881bae5c62f16ccc53cc96db9e69117a150c271042409669f850f4ff3eebc063e57697fceb4 WHIRLPOOL 8edf3ad54a23297b2cae98ac5c8c5bcd1ee4072595e1089a0b33aa5cd1150a1cbf6c195fc422933ae8cb6006ba28c0c722e4116472724f0ca67af80cadc038ec
+EBUILD ethtool-4.0.ebuild 456 SHA256 2e6d1655df780abb963cfa46700c433c2e4bf80c5c4e60d28e6844ed8c092b6a SHA512 0628af197f5b89e9a3747004cb3e3f81c7cbcc73df3eee0e51f2460b07804942a4bc4d560c4a5855fe5d6f9fc618a75e2469ac9bcf053111e77597cf8c101eba WHIRLPOOL 3d1c0636168e8ecbf78f5a31851e92561ee81ef9427fb0bb028d51379a7cca3b33c8cd63c0d351e60cf9d3d2ed2b9d19c5e788b5fa34abe17af94baea22d9920
+EBUILD ethtool-4.10.ebuild 463 SHA256 3423ccbf866dc00ade8a62c3f62be222cb40f088b93ab0184cac93e0a2aa96b4 SHA512 6cdaf830de48e35773664091b1d249cf5648afe6717f02f225d380578cda2c5fc344acd2c2729ae1262c898979149da9bd34bf67e3e65ca2253cf0c48b86ec0e WHIRLPOOL 7d56af51b1588a2c16503d7c169e8b7c46eecaca6fb8b18771774a654d770e1a8727c6772d7dfca4f8dff166190e54c55b46519263c006aae8958a4a9fece968
+EBUILD ethtool-4.11.ebuild 463 SHA256 3423ccbf866dc00ade8a62c3f62be222cb40f088b93ab0184cac93e0a2aa96b4 SHA512 6cdaf830de48e35773664091b1d249cf5648afe6717f02f225d380578cda2c5fc344acd2c2729ae1262c898979149da9bd34bf67e3e65ca2253cf0c48b86ec0e WHIRLPOOL 7d56af51b1588a2c16503d7c169e8b7c46eecaca6fb8b18771774a654d770e1a8727c6772d7dfca4f8dff166190e54c55b46519263c006aae8958a4a9fece968
+EBUILD ethtool-4.5.ebuild 456 SHA256 140aeac3d2b086660d3e50dcf8e1437b1fbf2d76ae4bb500ce5b3e10d0cfa540 SHA512 e366a4fcd39d80312df50324883dc72338622dc08aa0f0ed758a9ecddaa0cb6aa9d6bd805996d8b9d51f8fa8b3235c3259064342851eeab4c434315cef59220e WHIRLPOOL 2c3b864170a8161d0d805b0d58c470bd31c3e7aa1efbe364707872d9c427fba607834a32360a7bc98f6ac07f23a73c2a87ed081ca2f127f452024e5e3d45006d
+EBUILD ethtool-4.8.ebuild 453 SHA256 c1112244f6b0357b440d1cbe8df3bb473329919265d0b75fb665202867b96dfe SHA512 f5ebf39536df9e46be717e5e42334472c7f30d02a3dd9f8b1fbab8e2242cb0c67e573fb829fbf74f115d431b777a83ebc17005150751d83f8e681e5966e8fce2 WHIRLPOOL 58d64ed48025ae9a0dc6ce4c131db35be5e862bd15ffe0c9a3e3c39461c31a376722b4fb2aa0cc618eb647eb112da4092de2c2a9826a091567a01277ff3ed1ab
+MISC ChangeLog 4752 SHA256 ea802cb2ea25bc266921a12be5e9ad8f5bccca9241bab59b52fff29c7f4201e5 SHA512 541543960ce4a1c98520f15f2c49c80d8656359d445ed459e583d4e8659673069581459878e048e676a9a711e3d8f533a82cbca65ff3914726ab43fb6c08ec87 WHIRLPOOL b467f50f108c5563c77065f353b557a6fe23b01bc31b4e6f7678ed96048db8cde642e75fa6233d73b8197d29e51a13d172a3d066dc5df73ee6b2f3e0cae8a80b
+MISC ChangeLog-2015 13879 SHA256 28032b7ee7768f71058dacba43edd8ea345e6c760ff562eb5959bb47465dd4d9 SHA512 34d8031e0d3859de45264f011e8d4c7da8f89664a99a044c980fca4af98e53e8e2449e13947b3c0b73bdfe32325cd8dadf585de5d4c779f02614000f4690e2da WHIRLPOOL b7ce197cbaf639d141017a111b6f5cea0d1127b8f71ed7ce8719eef97e2b66916431a2ecb24503b5a029400b633ecced9135317afc4fc656e0f62fa15cc913af
+MISC metadata.xml 814 SHA256 51948c609ba01fb359233f8754ef91832753010108f1ba3f91a6731f19710234 SHA512 7ba75f7aa20f8cc48b91b7576449e416abfc412fe26670142d4ec1513b6a3939858b298ccdbf72c208c2d70b5c00eea88dc3c4201e2187b188ed4a9d33cf0272 WHIRLPOOL e2e9a708319593e58bebcff24a2458bc71d03e86154072ec472ea82e695532d8c5db2732e77973761c1a451dac59644326a55fb0f4d6c724416044e4fe53c7a2
diff --git a/sys-apps/ethtool/ethtool-3.10.ebuild b/sys-apps/ethtool/ethtool-3.10.ebuild
new file mode 100644
index 000000000000..21bbb065e526
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-3.10.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-3.16.ebuild b/sys-apps/ethtool/ethtool-3.16.ebuild
new file mode 100644
index 000000000000..cd5a8ee704b7
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-3.16.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-3.18.ebuild b/sys-apps/ethtool/ethtool-3.18.ebuild
new file mode 100644
index 000000000000..b4535497ccc4
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-3.18.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-3.4.2.ebuild b/sys-apps/ethtool/ethtool-3.4.2.ebuild
new file mode 100644
index 000000000000..d24f21c1c7a7
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-3.4.2.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE=""
diff --git a/sys-apps/ethtool/ethtool-4.0.ebuild b/sys-apps/ethtool/ethtool-4.0.ebuild
new file mode 100644
index 000000000000..4c2183c470b9
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-4.0.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-4.10.ebuild b/sys-apps/ethtool/ethtool-4.10.ebuild
new file mode 100644
index 000000000000..04f5d5de3b2e
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-4.10.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-4.11.ebuild b/sys-apps/ethtool/ethtool-4.11.ebuild
new file mode 100644
index 000000000000..04f5d5de3b2e
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-4.11.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-4.5.ebuild b/sys-apps/ethtool/ethtool-4.5.ebuild
new file mode 100644
index 000000000000..fe36d509fbf9
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-4.5.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/ethtool-4.8.ebuild b/sys-apps/ethtool/ethtool-4.8.ebuild
new file mode 100644
index 000000000000..8895d365961f
--- /dev/null
+++ b/sys-apps/ethtool/ethtool-4.8.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Utility for examining and tuning ethernet-based network interfaces"
+HOMEPAGE="https://www.kernel.org/pub/software/network/ethtool/"
+SRC_URI="mirror://kernel/software/network/ethtool/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86"
+
+DEPEND="app-arch/xz-utils"
diff --git a/sys-apps/ethtool/metadata.xml b/sys-apps/ethtool/metadata.xml
new file mode 100644
index 000000000000..0061d51971d3
--- /dev/null
+++ b/sys-apps/ethtool/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+ ethtool is a Linux utility for controlling network drivers and hardware,
+ particularly for wired Ethernet devices. It can be used to:
+ * Get identification and diagnostic information
+ * Get extended device statistics
+ * Control speed, duplex, autonegotiation and flow control for Ethernet devices
+ * Control checksum offload and other hardware offload features
+ * Control DMA ring sizes and interrupt moderation
+ * Control receive queue selection for multiqueue devices
+ * Upgrade firmware in flash memory
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/fakechroot/Manifest b/sys-apps/fakechroot/Manifest
new file mode 100644
index 000000000000..f9399b4caaf8
--- /dev/null
+++ b/sys-apps/fakechroot/Manifest
@@ -0,0 +1,5 @@
+DIST fakechroot_2.17.2.orig.tar.gz 463307 SHA256 038f631c6013b34426ac0b6a38b613083818065b4d20ae87598ea14589ec8c7c SHA512 bcdcf8e77aae46b567acddb80e6817a118c7ef250ba7b6962982e60a6a5e3b8c1eeef950dc33335f31466c3f53ab6b7260bc64a1da9c4b156a44d811ef8cccd0 WHIRLPOOL 69e170a044af5e06494d42a1cd2fa359b9101224bd71f8413949ba0e12396d6a877b82e35734d8c8d0a576e508c47a71ecd2eb6272951cfa95a88298764417c5
+EBUILD fakechroot-2.17.2.ebuild 588 SHA256 d0cb6c63b271a4703e81c4c32532a6e62b49f849d8e6990638aac46b5f0222fc SHA512 c0ce568bcc8c33cc217f39caa1f23a0d0ffca332da3bf8f453a01ac2ba649b2ad772b96b1dfa2f164a880781585905be51a71f95f1027525cda5ba8be5c01902 WHIRLPOOL 4447939cde121f38d8db16cc31acf85d148b808dbb015cf5ccc6d4420c0b1d4eb48660695c3776f565ee1e5835e9309fea2e2f08a1941c16d9d2af89f3ce1262
+MISC ChangeLog 2655 SHA256 8bb68a22bbe2ae00e3c11a30e108fdf2c95e2ca82fcd69e50bbb4b67d0142739 SHA512 0a8320ad89b920d485c3cca8945f9a2283084052e96a0adadc39bb2658c9680b94476ce52e7b47c2d5de7a7acd98b59f5dd9ba001a80e760815480435efe58a1 WHIRLPOOL d6cbae6fcb58745b5045bd339301bb71294267e01a7f60d4a68a1047075a39f74e2cce7381f255ceb4a40d9d5e3bff6c8aa2cefb5558b9cdac9b6e30679da0c1
+MISC ChangeLog-2015 3718 SHA256 d31ad8f082f052f1e285f9d6ae4bc77e21d50b3090fcf41131051f6ef6fd26c8 SHA512 174e530398ea5ac135ee0872dddb63eb2d2d21b1197c60b4ef2ff66a8866d2f4b050ca6525b455f66d50b1be1e879d8a0a3b86e260af408a04f92ac723cbae85 WHIRLPOOL e6993eb6bf1f928894b72a3f926832f9d142d4a67cfd56195aed8c1ea64a70a93b8f69d2e51ee5e8f0bc27135ed48856dc2fca91e3d2670416f11465321003f4
+MISC metadata.xml 397 SHA256 5e089b72954c5022c2473e8b79510fdfa6c3c47680a542a9bbf458195a165b3b SHA512 a7e2fed90e5858c2a0dfbbd183835450d16f5823c4b4c467eb3ef8ba6a1520ab2f93d2ea47a1e11a8175b6664e346c4656c22595dbbc25e93f84fa275baead3a WHIRLPOOL 7fe30ff20ce8dc8c187fec8d32f1669a160ddc45b85cc8692a022cb7e75af4703131be2b1b6e8f10b2bff941c5b1880855d58281352ee862e79764ed0f2e8c06
diff --git a/sys-apps/fakechroot/fakechroot-2.17.2.ebuild b/sys-apps/fakechroot/fakechroot-2.17.2.ebuild
new file mode 100644
index 000000000000..f5545ea15ca1
--- /dev/null
+++ b/sys-apps/fakechroot/fakechroot-2.17.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Provide a faked chroot environment without requiring root privileges"
+HOMEPAGE="http://fakechroot.alioth.debian.org/"
+SRC_URI="mirror://debian/pool/main/f/${PN}/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+
+RESTRICT="test"
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc NEWS.md README.md THANKS
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+}
diff --git a/sys-apps/fakechroot/metadata.xml b/sys-apps/fakechroot/metadata.xml
new file mode 100644
index 000000000000..139ad71a7bbf
--- /dev/null
+++ b/sys-apps/fakechroot/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 type="person">
+ <email>anthoine.bourgeois@gmail.com</email>
+ <description>Maintainer, assign bugs</description>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/fakeroot-ng/Manifest b/sys-apps/fakeroot-ng/Manifest
new file mode 100644
index 000000000000..8156ed9d76f7
--- /dev/null
+++ b/sys-apps/fakeroot-ng/Manifest
@@ -0,0 +1,10 @@
+AUX fakeroot-ng-gcc-4.8.2.patch 235 SHA256 86f4c6919d44156d6d2250033ed64d494a5ed2d05077305f954d221f595e36c6 SHA512 ad5e13c291c6fc9a8fa883cebfc25c14103b2c52c9b7309bea3dd6c46244b1af2278ddfdff98b2e18cf1c3cc7ba5b98097b6280e8761b757cea87ac107b31179 WHIRLPOOL 695417d83806315806cb8b23025ad2390ec1d6c807ab63f0587bdefb7a9873cbf42a4fdd983c9b4a6d1cf60c559ab656d216bd13b28b98fe0f5adaafa526a9e1
+DIST fakeroot-ng-0.17-gcc47.patch.xz 8576 SHA256 17e4f38208636ca43064e05a1139186305c212567376f280218dcfda7b35a946 SHA512 053b825e3362683f20867fcb2120e19612537b7f597fefcec913408092d200b31fcf43c2911000dc4710a5b77e0a0c8d93734fe1a9aa42bd503dfc6e75b0d7fb WHIRLPOOL eed844cf50f9d32006694a30a72daa283e637659b94152e4416ce65df96ee8bca0763b2282e1ee86f5ebc8d38677b10286124e6334f7119a8b57adcf66424db1
+DIST fakeroot-ng-0.17.tar.gz 194791 SHA256 b7898db2ba2275b3fe7c38487915b154d1d4ddc994e7be2777e794dc6186bfe1 SHA512 bc6caab529feaf0e75f7ed0c5160ebda87d113c34001cabf20565f51fd66078d4363115ddd32d23106f4b47ce6e85b9defabf108ce2f35280d7b413fa7148686 WHIRLPOOL 28ca3e6626c467b00ce7e26a6bef741dc002971be7c6e839ca3afa981d557e4fbf1fade91a05f5dab503e95549602af275c5735883caf7e94a128f4135bad6ef
+DIST fakeroot-ng-0.18.tar.gz 207870 SHA256 189eacda630752980d40e34b2c01ce23d839daab3d691a4706bb9eac79f7e144 SHA512 8ece6830d229b92537d9c0a2eb42cb9ec4ae6b83453303004dded5eab0707b9ae8eaa2c71aac6ea68226c43cf08db6b0939a9422aab32948f5ecb185ee01d854 WHIRLPOOL 38e2758dd2747056479c1fd920961a10adbc1d8797fb5b02f32167af22de7458c91df36d7ea73305df86ee91d093506f280bde8c23d7b4a6c0e3fa2b36154060
+EBUILD fakeroot-ng-0.17.ebuild 519 SHA256 c43f7cf0433a298c77be851cfa701132c6110acd1bb16812203df27526881922 SHA512 365596d646600cbc4ce790d0c5dae42f48db09c6984c13f566427fce5c8d950ba63a96e332d3a9aa8d03ec48758c077a1c7c7b51b76b3bb06e16646f37fc9553 WHIRLPOOL aadb18b70b963aa9d1d62062a6efa770e171dcd74b964fc05da0c55c78973d9189246b109a42aa41d3c9d600042a869c9410912775143694a019f4afa9402b7f
+EBUILD fakeroot-ng-0.18-r1.ebuild 470 SHA256 633051c9ec62fd8f1e769d41eef54c3ac8195f123e54c223ae9d64c8c004ce6d SHA512 5243c207ae69295659bd387fc15fe372dee8fc0bf1e864c1b9e907f2e48087caae92b38bfe1f37fe50ca1601c7baa9c22cdec7f2fc4799efadd80500148d62ea WHIRLPOOL 817590f8d68d5abbc9b395c8cc79866908fc989e41134f437cecd0c38d366608fbe5ec297d1c686c9f74ccd89bc5426753855f571dbac52dbb788dc03c747b6e
+EBUILD fakeroot-ng-0.18.ebuild 408 SHA256 615acc495e0de8c2901a86018fc0b73ed812e6e338e21589f873ab4e529f19aa SHA512 cf3a77bf885eeacce54803672f35db2807879692bbbdc0fbcc0a78d67ec4b47815bac261c705c7dc24d3a2baa7328d71b28c79e54b81154017c5a58029b50bbe WHIRLPOOL 93574cdfa14f5a27377e06d91478ad97dcfad91ee4ec7cb3bfedc409f348fe0b22f681173cf3a703cbc7c84ac9b7b7e6e9f1d40c857e39e239fb65439725fe7f
+MISC ChangeLog 2794 SHA256 9ab1084301630532c2f8d559a1aedf866716906d4762cea36628ff78c7abdae2 SHA512 7c670842546de4c1766c08ccd86a8c62c04424928509eb4e5f0b38cd8cb6352770f2b7c8b78a8408233e375d94671a2732b6a8a3acea4e241a51cbbc2b1ad0d0 WHIRLPOOL 699738edde9efb63421c5c534a862a5270e6e3969d339c46ce59f727b004393b587f31e1ac9062c4161df471c57513ea95221b1c201f8be90d892fc140d6ff07
+MISC ChangeLog-2015 2022 SHA256 c070a1b509b5b75f3dc99bb913443f5aa81a18247e15989113774b7120fbaf3b SHA512 0fb24e02ba5bbb5a2ec8b89f2ea9a02b494e6b1c6b381385269c29de41c2d121553e200c294881b8420724d986d03fbb9c3620c9bdf80be42c4ba5466779495c WHIRLPOOL 26e9076bfe0c14f6e5cdf6290893e67dc8635ccdfedba04e0bd799e07712d490a7cc0f8e78fc116bcd8bf3d12da12bcea415d4dd7c5ae9f67691ea1964acb54a
+MISC metadata.xml 494 SHA256 522285701155d18cecf62bdb36ba250abe9433f62611588800bbc971a9bca5ad SHA512 63c6cb2b59ef31aba103fe6188e5fe9d91703560aabb5612703aefcd3c2be7a385c35d803a64a1390cae7dc4787615845f3833731ac5a2cca953fdbb0e43493e WHIRLPOOL 2a1b2fb6abd1c79a224af6c290df044ce92fa770453810046782ac2d9f70060be60272356501e28e8419e677e6656a7c9ca448676d0329eaa10b7b20c5c4d53b
diff --git a/sys-apps/fakeroot-ng/fakeroot-ng-0.17.ebuild b/sys-apps/fakeroot-ng/fakeroot-ng-0.17.ebuild
new file mode 100644
index 000000000000..d41cc719c7eb
--- /dev/null
+++ b/sys-apps/fakeroot-ng/fakeroot-ng-0.17.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A utility to run commands with fake root privileges"
+HOMEPAGE="https://sourceforge.net/projects/fakerootng/"
+SRC_URI="mirror://sourceforge/${PN//-/}/${PF}.tar.gz
+ https://dev.gentoo.org/~ssuominen/${P}-gcc47.patch.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${P}-gcc47.patch
+}
diff --git a/sys-apps/fakeroot-ng/fakeroot-ng-0.18-r1.ebuild b/sys-apps/fakeroot-ng/fakeroot-ng-0.18-r1.ebuild
new file mode 100644
index 000000000000..3a007d2be404
--- /dev/null
+++ b/sys-apps/fakeroot-ng/fakeroot-ng-0.18-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A utility to run commands with fake root privileges"
+HOMEPAGE="https://sourceforge.net/projects/fakerootng/"
+SRC_URI="mirror://sourceforge/${PN//-/}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-gcc-4.8.2.patch
+}
diff --git a/sys-apps/fakeroot-ng/fakeroot-ng-0.18.ebuild b/sys-apps/fakeroot-ng/fakeroot-ng-0.18.ebuild
new file mode 100644
index 000000000000..ef89bad7783f
--- /dev/null
+++ b/sys-apps/fakeroot-ng/fakeroot-ng-0.18.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A utility to run commands with fake root privileges"
+HOMEPAGE="https://sourceforge.net/projects/fakerootng/"
+SRC_URI="mirror://sourceforge/${PN//-/}/${PF}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog NEWS README"
diff --git a/sys-apps/fakeroot-ng/files/fakeroot-ng-gcc-4.8.2.patch b/sys-apps/fakeroot-ng/files/fakeroot-ng-gcc-4.8.2.patch
new file mode 100644
index 000000000000..50df56d51bdb
--- /dev/null
+++ b/sys-apps/fakeroot-ng/files/fakeroot-ng-gcc-4.8.2.patch
@@ -0,0 +1,10 @@
+--- 1/arch/linux/i386/platform_specific.h
++++ 1/arch/linux/i386/platform_specific.h
+@@ -2,6 +2,7 @@
+ #define PLATFORM_SPECIFIC_H
+
+ #include <asm/ptrace.h>
++#include <sys/types.h>
+ #include <sys/syscall.h>
+ #include <sys/resource.h>
+
diff --git a/sys-apps/fakeroot-ng/metadata.xml b/sys-apps/fakeroot-ng/metadata.xml
new file mode 100644
index 000000000000..cf046cef93bf
--- /dev/null
+++ b/sys-apps/fakeroot-ng/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 type="person">
+ <email>anthoine.bourgeois@gmail.com</email>
+ <description>Maintainer, assign bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">fakerootng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/fakeroot/Manifest b/sys-apps/fakeroot/Manifest
new file mode 100644
index 000000000000..6139a76ea066
--- /dev/null
+++ b/sys-apps/fakeroot/Manifest
@@ -0,0 +1,17 @@
+AUX fakeroot-1.18.4-no-acl_h.patch 763 SHA256 4f17a402f9bdb97b3b53a4270aa63f46970cae96eeb16fe5d70b5172c366dd0c SHA512 a534bbd2918328bc4717256010a14218a5341cece7c4f043e8e5df0d7f671effce2bcc7fe868d333fd37472382c14d389bf302fc2d5c2651a4c45361845a6e27 WHIRLPOOL de612a10a9befd96b3392ac5312f4bcad6942432858a3b166154dc46cd4df2a3403552c414dc8b38c09c5d046d4d1052cd60f1cee02ab89305029b7082353e87
+AUX fakeroot-1.19-no-acl_h.patch 915 SHA256 49f3bfb04533eecd68bc207101dae4236a6de859bff65eb8b77cce4667328452 SHA512 d077e8ba2bc4407ba1a57fb5920f2a866bdcb13fa359c2245e479019bbc19a3aab398cc25220079edf7c42c4d09429e57326b606ff5795f83de24c7a31835717 WHIRLPOOL 948b120c76a9d750cf019f05755640807aacbd2514880b29b3103b67c176908cf18ff517d96e039e66b9bc5059b1ca6bc05d2073b219043ef9cd221d28b7b3b8
+AUX fakeroot-1.20.2-glibc-2.24.patch 1021 SHA256 26b6a21ff47ce73da394e2093521921782d0a3160862339e313bf14f2fe25978 SHA512 824e71169877702c5d98970d62866d5074d1a728d5bc52460483117610f50f6869f65714608313f20e40b7432ea4c50cf9f47158d8f2f9ef4a3c00220ccbd52c WHIRLPOOL 58c73fcdd499561f364b4778133c2c8d56ed3fe1a069a584fff0e0aec6ff918cb04cab8318494fb74b8059f530f51c282a0c52dbe3fca2f90ed35798871a1104
+DIST fakeroot_1.18.4.orig.tar.bz2 309298 SHA256 0a359efa3e9496c33234b3e9c89306a09bb4da9d33de43c261f1d8447e6ebea2 SHA512 497292fe21d18a37eadd657fbe01db8902f4b8d87d63605928efd59789f4c14737997b9f0abc4d794dbef78066b952064bdb2dd9f0910ec75349d7dd313cd058 WHIRLPOOL cef9846747a7ef1712658cc39c5374a3921dd27b9f9540080c4be7b7eab75722c0710a0640900c51852910b0db2d44d5605f61e5c18981d56abc835269a11626
+DIST fakeroot_1.19.orig.tar.bz2 312304 SHA256 eafa6885535ff57a42248aec090fe17cfa5ca85b62cefa0d13637c9de8996868 SHA512 ff3f50cdf168deafab337d3d98299ccd4129ed2a9befa5f28171d92c2ddfa08c8f42424f32b3fbcbb1f83c16f22952e571946f4152246d08b0d18bab77c458e9 WHIRLPOOL 4fcce88f114a87a07698eede3ab384621bfff4cc3fa478c5b162e95c4901bc75647c7e7c69c8196885d96acd0658b5f3cba50e46973e010d0e4adc3f49729e00
+DIST fakeroot_1.20.2.orig.tar.bz2 326910 SHA256 7c0a164d19db3efa9e802e0fc7cdfeff70ec6d26cdbdc4338c9c2823c5ea230c SHA512 1ac231f995774aa40f43c4325cd9e6de45365963277c32a85776690c3e7fd281ac410f3d91395dc1e5e5ca3b143e89914e048632011a3985ead216e870852231 WHIRLPOOL b39d8682e13d69648f60ff70853b2588b9e638112b8874794e1c6bccb6c060868ee81031887cb7aacf78d2fa2ec9f00c4103655d24406d001e076c43b4ca6c1d
+DIST fakeroot_1.20.orig.tar.bz2 321491 SHA256 2297b7e79487cf0bbc64ff6d3d02446d895e82e2b26467c74fd1119011f6f098 SHA512 b041ab87559f784041f05bfa9d5186ceaafebbcbd03057ede62bf420551e337ceec4b7101854937e206c6389ac2c0719545d5971457edaf564856bb44ce7b4b6 WHIRLPOOL 00b55e38004b3bb843e06299e014fb776150efc398b42099fa1772c4999aa3282a244c0987123f33aee9f844351dd9a31cf6c218c3439aebf1cba2c633a2b7bb
+DIST fakeroot_1.22.orig.tar.bz2 338238 SHA256 bd806a4a1e641203eb3d4571a10089e8a038c10ec7e492fa1e061b03ae3ec6fe SHA512 193478d9ff88ca2ae69fe47b73b6c61aeb2ba3f2a9e7ed5d455022705857c6f34cdcbe2d3f614c4c4c9509368dc78b9a7b7aa56fb3b50bb3309448140abd796a WHIRLPOOL ad09ceabd14e6e144aaaf07fd24b973565ef027f69769192f67b7b5c76c04716e7c6d9d3a1ff8cd7ee090665a7654d469381fdfc2625345bc18a3b78c40ec231
+EBUILD fakeroot-1.18.4.ebuild 886 SHA256 969c6392f117fe0dc1aa8d8c63277edfb8fc4872b8bc433add9383da2c3f9154 SHA512 f509536a58b9acb6472eb32d93be2c4ececd23832b92190845be1c80f9b1c799db3f02e01a07c1f31c45139dafacb18fd7613c2e2f63dee5ba918bdafb48efd8 WHIRLPOOL f57e0ec98092f77c41ece3c6f07c05402980adbe0df8c33bc4d62864b24063806df41c1f2ec7681dd79b370cff3c155d367c0537ac04e53487b0f74f010194df
+EBUILD fakeroot-1.19.ebuild 836 SHA256 de099168490518d2d4dbc53f4f4bd63669940507381f6cf6d24105645f25233c SHA512 7d56406d9b41f4ae6b2fa674b19fefb4b8cecb561348e7daf52ce2964a894090b6d49ee131ca086000e3a023d240006119b8ad04c6e710c5e57a23d090ae4f98 WHIRLPOOL 03f7a98ccd7de5361560021e1e564cd95010d59db0678b89fbc8210c71b80194284e845a6c9b14e65f3eb29889ec079393c32f22af2a7bd4525471a96eb89129
+EBUILD fakeroot-1.20.2-r1.ebuild 1008 SHA256 d9746d683e948a4a6609b8c590763aa046ca42b14504dc36092500ab88296171 SHA512 de5fb74abfe42b1a6fe4a3aaf2c25db69c5ccb4616195f721f66bd0491e3560d50c79086f40cc12d8749632d413c75af77156010043186e99e063e726468741e WHIRLPOOL d12e98f38c7fb0a1ae0bb852dfb3a56fa1168571eebcbec9939896478f6fd25b7f787980d8dfc47a8c94c87e4e40a0b67d274b1fa879a7ac29cf937c3d2db93d
+EBUILD fakeroot-1.20.2.ebuild 921 SHA256 ef94a2c5df96ea2c0104adbd14e5c7ef97a0ab3496ca813528f0c2a8062e9d97 SHA512 72f0bd48be4ab63a2c012d01ce58a639c31ecdf2c7d5319d45d4b7554258d82b30636e66127f8e8578390b4ce54a0d9166466644570a266c173b92eaa380f21e WHIRLPOOL 5d8e07143930db5944bfb9b3be92a9b1f5c3a3a8fcc7348524084bb9bce8cb512e866b7e586188eeafcc899996d82ef74f1033eb8f24184403e5041d00799675
+EBUILD fakeroot-1.20.ebuild 917 SHA256 e5e2b3dfa8deae2dbf4316ad9edba0ba90d62fa73cefd369292d3bbf88a9c226 SHA512 178ef091b3a1ba0b314390bd5e4ca4c7da91efff9b053fc97f16e21fc2b5b634c38f4df40b2c712952f6efd6b8aa4358c3e3533a8f6523ba58b68ff88c44ae92 WHIRLPOOL df80e241fd91721dfd289fb7f769117846ff5e0c3bec2731c46018bb1be0a82c598c6418780d9fb58078e2def289e31378e55e084b15a9e23b1ce17eba6881fd
+EBUILD fakeroot-1.22.ebuild 1045 SHA256 f749ecd6d02860314d28eb3ecb7085f45de1aea6f36713db9c909abdd8ecc5ee SHA512 db688160e787276ced9658647cf78c758a9f02b0cb972f99076bdd728269ee8b10a660fa968ce4a64b1472c50df4f1e7370a88c26d5a622a660a8e1564f9c405 WHIRLPOOL 46e97949c75b7d68239d9ed95954d5c1ceb16538a3080072dfba9cfdb87b2d006b03ea22f5a7784d748b744ad2776038f95700e36813b14c8e74d32de85350f5
+MISC ChangeLog 3481 SHA256 2982a484d6cc7a8e4d017812e6e3ee587d5e524db9722866e41c67c412461476 SHA512 4d5f6ac2bdc0e25ad3fc879096d759b3adec7dc2fd7b9b3ff6721d4c8bc0b4ba8f2a963387ac6e7477e1e68e37be6b89c0f20b4f6e5b88171222f2d131aca709 WHIRLPOOL 14ec521b4336fc299d3eee695e10f0ce74ab676d2956e539e1196efe6ea6ae77cb0823ce28aa1972810f67e63a4470834502373f8a349b635f91d139aee67c16
+MISC ChangeLog-2015 12966 SHA256 4fc52018ed3ea26a859336695afb623625a03fc5611e7d215a343b443c5b212e SHA512 559bdb467e31c70c1ed76272a0640e910338510742584751c2b79ccb5d899899e882bced12ba0d3a1854d72d6b40993188d3ea075ef6b4b7da2b0ac812918a3c WHIRLPOOL a2a179102e270aff3af52e04716b8923fbaec0a0a4267a40f1d36213f2a818af1409f5f8b907d1a53e10301a722e34562e98135f12fe3485fcf55eed24b0b442
+MISC metadata.xml 257 SHA256 c1d4bdabe699c6d9fcdf3b7794a13b45f69e3826b814b422e4ca7e6893b99012 SHA512 9c7759d33e1bbc8be0da5b4f59fc720266e40f4116d7db0c17c5ad800a7bb638f33a1308e1554092af781f06df6f6cb55db41fc22207cd3edc2e159840e3a3b1 WHIRLPOOL 4afcbc79dd61237c778735b39060b3e294fdc07da5b0da6f7b40db92649ac71febddd7a0265502e102d8eec9664fd5af2071fff9428bfcb0a6bf06cf70c68a3d
diff --git a/sys-apps/fakeroot/fakeroot-1.18.4.ebuild b/sys-apps/fakeroot/fakeroot-1.18.4.ebuild
new file mode 100644
index 000000000000..de37d87752d2
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.18.4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc sparc x86 ~amd64-linux ~x86-linux"
+IUSE="acl static-libs test"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.18.4-no-acl_h.patch
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/sys-apps/fakeroot/fakeroot-1.19.ebuild b/sys-apps/fakeroot/fakeroot-1.19.ebuild
new file mode 100644
index 000000000000..d3d2f857a13c
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.19.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc sparc x86 ~amd64-linux ~x86-linux"
+IUSE="acl static-libs test"
+
+DEPEND="acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )
+ sys-libs/libcap"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild b/sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild
new file mode 100644
index 000000000000..79faa7e78dee
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug static-libs test"
+
+DEPEND="
+ sys-libs/libcap
+ acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+ "${FILESDIR}"/${P}-glibc-2.24.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ use debug && append-cppflags "-DLIBFAKEROOT_DEBUGGING"
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-apps/fakeroot/fakeroot-1.20.2.ebuild b/sys-apps/fakeroot/fakeroot-1.20.2.ebuild
new file mode 100644
index 000000000000..db368714fec5
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.20.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils flag-o-matic
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug static-libs test"
+
+DEPEND="acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )
+ sys-libs/libcap"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ use debug && append-cppflags "-DLIBFAKEROOT_DEBUGGING"
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-apps/fakeroot/fakeroot-1.20.ebuild b/sys-apps/fakeroot/fakeroot-1.20.ebuild
new file mode 100644
index 000000000000..a93af73e7d34
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.20.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils flag-o-matic
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug static-libs test"
+
+DEPEND="acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )
+ sys-libs/libcap"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ use debug && append-cppflags "-DLIBFAKEROOT_DEBUGGING"
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/sys-apps/fakeroot/fakeroot-1.22.ebuild b/sys-apps/fakeroot/fakeroot-1.22.ebuild
new file mode 100644
index 000000000000..be4446fbe1f7
--- /dev/null
+++ b/sys-apps/fakeroot/fakeroot-1.22.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug static-libs test"
+
+DEPEND="
+ sys-libs/libcap
+ acl? ( sys-apps/acl )
+ test? ( app-arch/sharutils )"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+ "${FILESDIR}"/${PN}-1.20.2-glibc-2.24.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_sys_acl_h=$(usex acl)
+
+ use debug && append-cppflags "-DLIBFAKEROOT_DEBUGGING"
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -o -name '*.a' -delete || die
+}
diff --git a/sys-apps/fakeroot/files/fakeroot-1.18.4-no-acl_h.patch b/sys-apps/fakeroot/files/fakeroot-1.18.4-no-acl_h.patch
new file mode 100644
index 000000000000..dbd9dd7758e9
--- /dev/null
+++ b/sys-apps/fakeroot/files/fakeroot-1.18.4-no-acl_h.patch
@@ -0,0 +1,35 @@
+http://bugs.gentoo.org/424419
+
+--- libfakeroot.c
++++ libfakeroot.c
+@@ -1551,6 +1551,7 @@
+ return fakeroot_disabled;
+ }
+
++#ifdef HAVE_SYS_ACL_H
+ #ifdef HAVE_ACL_T
+ int acl_set_fd(int fd, acl_t acl) {
+ errno = ENOTSUP;
+@@ -1561,6 +1562,7 @@
+ errno = ENOTSUP;
+ return -1;
+ }
++#endif /* HAVE_ACL_T */
+ #endif /* HAVE_SYS_ACL_H */
+
+ #ifdef HAVE_FTS_READ
+--- wrapfunc.inp
++++ wrapfunc.inp
+@@ -167,10 +167,12 @@
+ #endif /* HAVE_UNLINKAT */
+ #endif /* HAVE_FSTATAT */
+
++#ifdef HAVE_SYS_ACL_H
+ #ifdef HAVE_ACL_T
+ acl_set_fd;int;(int fd, acl_t acl);(fd, acl)
+ acl_set_file;int;(const char *path_p, acl_type_t type, acl_t acl);(path_p, type, acl)
+ #endif /* HAVE_ACL_T */
++#endif /* HAVE_SYS_ACL_H */
+
+ #ifdef HAVE_FTS_READ
+ fts_read;FTSENT *;(FTS *ftsp);(ftsp)
diff --git a/sys-apps/fakeroot/files/fakeroot-1.19-no-acl_h.patch b/sys-apps/fakeroot/files/fakeroot-1.19-no-acl_h.patch
new file mode 100644
index 000000000000..d208b8ffa43b
--- /dev/null
+++ b/sys-apps/fakeroot/files/fakeroot-1.19-no-acl_h.patch
@@ -0,0 +1,37 @@
+http://bugs.gentoo.org/424419
+
+--- fakeroot-1.19/libfakeroot.c
++++ fakeroot-1.19/libfakeroot.c
+@@ -1908,6 +1908,7 @@
+ return fakeroot_disabled;
+ }
+
++#ifdef HAVE_SYS_ACL_H
+ #ifdef HAVE_ACL_T
+ acl_t acl_get_fd(int fd) {
+ errno = ENOTSUP;
+@@ -1926,6 +1927,7 @@
+ errno = ENOTSUP;
+ return -1;
+ }
++#endif /* HAVE_ACL_T */
+ #endif /* HAVE_SYS_ACL_H */
+
+ #ifdef HAVE_FTS_READ
+--- fakeroot-1.19/wrapfunc.inp
++++ fakeroot-1.19/wrapfunc.inp
+@@ -206,12 +206,14 @@
+ #endif /* HAVE_UNLINKAT */
+ #endif /* HAVE_FSTATAT */
+
++#ifdef HAVE_SYS_ACL_H
+ #ifdef HAVE_ACL_T
+ acl_get_fd;acl_t;(int fd);(fd)
+ acl_get_file;acl_t;(const char *path_p, acl_type_t type);(path_p, type)
+ acl_set_fd;int;(int fd, acl_t acl);(fd, acl)
+ acl_set_file;int;(const char *path_p, acl_type_t type, acl_t acl);(path_p, type, acl)
+ #endif /* HAVE_ACL_T */
++#endif /* HAVE_SYS_ACL_H */
+
+ #ifdef HAVE_FTS_READ
+ fts_read;FTSENT *;(FTS *ftsp);(ftsp)
diff --git a/sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch b/sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch
new file mode 100644
index 000000000000..3fd34c8778fa
--- /dev/null
+++ b/sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch
@@ -0,0 +1,32 @@
+Description: Hide error from dlsym()
+ dlsym(), starting in glibc 2.24 actually reports errors. In our case,
+ we try to get ACL functions which are not in the glibc. This causes
+ failures in test suites, so hide those messages for non-debugging
+ purposes for now. It also makes the build logs annoying to read.
+Author: Julian Andres Klode <juliank@ubuntu.com>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/830912
+Forwarded: no
+Last-Update: 2016-08-12
+
+--- a/libfakeroot.c
++++ b/libfakeroot.c
+@@ -256,10 +256,16 @@ void load_library_symbols(void){
+ /* clear dlerror() just in case dlsym() legitimately returns NULL */
+ msg = dlerror();
+ *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
++
+ if ( (msg = dlerror()) != NULL){
+- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+-/* abort ();*/
++#ifdef LIBFAKEROOT_DEBUGGING
++ if (fakeroot_debug) {
++ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
++/* abort ();*/
++ }
++#endif
+ }
++
+ }
+ }
+
diff --git a/sys-apps/fakeroot/metadata.xml b/sys-apps/fakeroot/metadata.xml
new file mode 100644
index 000000000000..4eb20a048df2
--- /dev/null
+++ b/sys-apps/fakeroot/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/fbset/Manifest b/sys-apps/fbset/Manifest
new file mode 100644
index 000000000000..01f36ea7d5d9
--- /dev/null
+++ b/sys-apps/fbset/Manifest
@@ -0,0 +1,6 @@
+AUX fbset-2.1-build.patch 458 SHA256 963e90bbe337983fa650f949f9ef484612753016132899ee3d42cd4d9bed8fc6 SHA512 97d8df2776c634ccdcf49433bb45e8e7d944e5d7cc34fe0f55085f76f0f5dfc216323a0f4e58d256767e83987dd73e96be3393bd727d791edd12f0b63ebed819 WHIRLPOOL c90d9d97bbda3f9a7c44b5b0c9947d265c92b4c2f324c89753a2573902921e590350546f440dbba30a3bad880fe8e4f3fd778025ccccf3b733a271a0982b8bd9
+DIST fbset-2.1.tar.gz 27721 SHA256 40ff4ab0247b75138a0887ed40f81c1a6184f340b77126c16d074b1075b41c20 SHA512 7e0380760f77b0db7dcc128f6375a3ed8da4b8521d1926faba27812c5cb20e6f1a62f3a539591a81a6b7e7986940db4cd83e03d6de487e0ab7f0760ed1d21b28 WHIRLPOOL a45b2b1031cd9fc626b318a4df1d697ccc710f86eeba9f7013b738a23f7910d4c73ca5b4bad8ed07a18cf5b60aa8d7a3dbb56424bf56a8346f2c7d94fd97d957
+EBUILD fbset-2.1.ebuild 786 SHA256 3648ef074cf42a3f6200bf5ebd925cde029e6e5a3490e3622c612ce9250e4b3d SHA512 f0b00c7bd7b09834fec17b0dfbb3e4195980f62289d8a66d9e69afc3df2663611feb819e3b062eaf168d3f83d9e11ec6e876829f08f81b63828fd0adba6bdb21 WHIRLPOOL 23be5e04188a9b18590e932339febf82775e2d0f64efb3fc415136123f22eecbcf97dd10bd5cebc605c1ffc7a6c2f48e4c2be922c6b12fe9d5e3549aaf006044
+MISC ChangeLog 3116 SHA256 4b4272340f2beceaba54b38bd39bb302f214c76d8ad7b2157b6a02766baa1f26 SHA512 a4886b923bb7787a8d2e2a8e9d1055b918f7058d0b941f2ce5835434a3cbe906df7c5d070a2e9b41a22cfa07fe5d8144ab61a4b6a88fdab188366dea720b7f74 WHIRLPOOL 0d46f387000ceb933e0d2264ba71f53ed81a6c47e5cafb8101eb46ce9755d97189c8e7c707fde2eae61743bdc985b50c310b8054ed6f97eaf30cde566f65d37c
+MISC ChangeLog-2015 2082 SHA256 1b63890bb434853f19ce02ca4ea2ec89f8b16d2ddd5b49af3a6898cab6814c23 SHA512 448963da574327673fc9f7722cf9914306abd29ad62311201a3a0bf35156a04ad46a271b5a5494bef1313be41ba75eb3752bb439f99a7e5f684e102e74a4fe62 WHIRLPOOL f73a8a119625b029059d8f735a1e852c6944398e98ccbcffd62ffc4ed895c0a0148541b1d599167ab5053fd7c56798a5622daffa8726acc048ceb527663ee2a0
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/fbset/fbset-2.1.ebuild b/sys-apps/fbset/fbset-2.1.ebuild
new file mode 100644
index 000000000000..cd50cd3945d2
--- /dev/null
+++ b/sys-apps/fbset/fbset-2.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="A utility to set the framebuffer videomode"
+HOMEPAGE="http://users.telenet.be/geertu/Linux/fbdev/"
+SRC_URI="http://users.telenet.be/geertu/Linux/fbdev/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 sh sparc x86"
+IUSE="static"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-build.patch"
+}
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export CC
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin fbset modeline2fb || die "dobin failed"
+ doman *.[58]
+ dodoc etc/fb.modes.* INSTALL
+}
diff --git a/sys-apps/fbset/files/fbset-2.1-build.patch b/sys-apps/fbset/files/fbset-2.1-build.patch
new file mode 100644
index 000000000000..94a323bb39ac
--- /dev/null
+++ b/sys-apps/fbset/files/fbset-2.1-build.patch
@@ -0,0 +1,21 @@
+Index: fbset-2.1/Makefile
+===================================================================
+--- fbset-2.1.orig/Makefile
++++ fbset-2.1/Makefile
+@@ -2,7 +2,6 @@
+ # Linux Frame Buffer Device Configuration
+ #
+
+-CC = gcc -Wall -O2 -I.
+ BISON = bison -d
+ FLEX = flex
+ INSTALL = install
+@@ -20,6 +19,8 @@ lex.yy.o: lex.yy.c fbset.h modes.tab.h
+ lex.yy.c: modes.l
+ $(FLEX) modes.l
+
++modes.tab.h: modes.tab.c
++
+ modes.tab.c: modes.y
+ $(BISON) modes.y
+
diff --git a/sys-apps/fbset/metadata.xml b/sys-apps/fbset/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/fbset/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
new file mode 100644
index 000000000000..f096c84ac663
--- /dev/null
+++ b/sys-apps/file/Manifest
@@ -0,0 +1,6 @@
+DIST file-5.32.tar.gz 797025 SHA256 8639dc4d1b21e232285cd483604afc4a6ee810710e00e579dbe9591681722b50 SHA512 315343229fa196335389544ee8010e9e80995ef4721938492dedcfb0465dfc45e1feb96f26dfe53cab484fb5d9bac54d2d72917fbfd28a1d998c6ad8c8f9792f WHIRLPOOL 557b1dba186f263f0c3199952e50b2a167cc9c2cf32286e87d9d2e8b31914765a659d167974ece3d8d43701a611d616847b306fcbd506333bdb153ebc07fbcc4
+EBUILD file-5.32.ebuild 2911 SHA256 4697f8b66a61e2b303c8fd9cbf7e32501a58d394fcc757ca59347d2c5ad47f97 SHA512 668586ad4b842d209c19266a6063493af7482b0542bc401af5c439c28f009c4c904a5edf258bb739984410e1eb345a4e0c430a7e8ec1b7a5e17d6e8d1f0819bb WHIRLPOOL 3a26860179d4c1da7f96890aa02f853356a9f190199e8b1f8abe2d92be105039431ea874a3dc87f7e1ce753a25899d8d8890717e10c8f239c794a935480a387f
+EBUILD file-9999.ebuild 2924 SHA256 c4c3cb8ed9451792dbbe72cf6278f71137ed06739601c9c6e0e1752f78b81272 SHA512 e656d0ecac3d195a3e61cb0168f4f7c9f2b74c351a583c6ed568ad73bdfe35885593a7f9c4258e9ef51af82a4489a3afb34f9baa39dc00e032b0485d7dad4b0c WHIRLPOOL 2774bf8f91c5f1de84d97aaafcfd334a21aea3a2db63e4f5006dc90d50eea44401921d4c8a2dad946b1a97dc01f240266b8434374c6c749ce47c8d60fa9d79df
+MISC ChangeLog 7969 SHA256 81987358deece240892e7fd2faeddc5b422006e3d776cbaa126df3879c5ed38d SHA512 76ded63c89f1363d92f2f58b05529a36060bf9de298dc1aee468c69e8979595c1734baaacb0ad91fe0dd4dbfe66f67c6f2906abbf284ffacb6dc46f1b5f223b1 WHIRLPOOL 3cdbadc9fb4f56e842ec9bc4a56d4857998cfa140986f87cb67093c840d125c5961160c4bff2881f274821520521f2e4c63023ea312277a7aa27b3016fdfb20d
+MISC ChangeLog-2015 37841 SHA256 616fa7d579ad222923b2d83ebe972823d5ebed3ac2ab950dbf51b6243477d303 SHA512 78d34734c5032d100fdd143c88ec82e94db7f4fba7f1bdf9e031b69c3d9aa018ab62f69e65fb99f6b4daee2ea936678e94a00a6175474c7b59ef71eb3133fe41 WHIRLPOOL 024d06338949e908f6effefab9f043ff2335b0849b3e4088e46c85763bbb84ceeb8ec7ab3a1e22c881143ce27daa165dc3f5757689b5fd02bcfa03b26c013e05
+MISC metadata.xml 316 SHA256 8027101dc26be73bf16fbdfab8a0d3470305db19f8b8396a43c794ce8a5ddc67 SHA512 8b334ba7a606600ad0548ef0ab7aa809a8fda040104d1663bfe179828a831e621128145325aba158fccf94a7f9a3ca1c9164db979a85e639403a079f0deb622a WHIRLPOOL e1267e2af379355a4e7f79df31caa262aac1a7d887ec6d17ec0c60bc61c59c1e30b51e0b966bd7d5e6796fc65814dd87de20d4c07d1165e34f6020b9fb8ed8ec
diff --git a/sys-apps/file/file-5.32.ebuild b/sys-apps/file/file-5.32.ebuild
new file mode 100644
index 000000000000..43c64a51de95
--- /dev/null
+++ b/sys-apps/file/file-5.32.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 libtool ltprune toolchain-funcs multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/glensc/file.git"
+ inherit autotools git-r3
+else
+ SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="python static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ python? ( !dev-python/python-magic )"
+
+src_prepare() {
+ default
+
+ [[ ${PV} == "9999" ]] && eautoreconf
+ elibtoolize
+
+ # don't let python README kill main README #60043
+ mv python/README{,.python} || die
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --enable-fsect-man5
+ $(use_enable static-libs static)
+ $(use_enable zlib)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+src_configure() {
+ # when cross-compiling, we need to build up our own file
+ # because people often don't keep matching host/target
+ # file versions #362941
+ if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
+ mkdir -p "${WORKDIR}"/build || die
+ cd "${WORKDIR}"/build || die
+ tc-export_build_env BUILD_C{C,XX}
+ ECONF_SOURCE=${S} \
+ ac_cv_header_zlib_h=no \
+ ac_cv_lib_z_gzopen=no \
+ CHOST=${CBUILD} \
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS="${BUILD_LDFLAGS} -static" \
+ CC=${BUILD_CC} \
+ CXX=${BUILD_CXX} \
+ econf --disable-shared
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi ; then
+ emake
+ else
+ cd src || die
+ emake magic.h #586444
+ emake libmagic.la
+ fi
+}
+
+src_compile() {
+ if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
+ emake -C "${WORKDIR}"/build/src magic.h #586444
+ emake -C "${WORKDIR}"/build/src file
+ PATH="${WORKDIR}/build/src:${PATH}"
+ fi
+ multilib-minimal_src_compile
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi ; then
+ default
+ else
+ emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog MAINT README
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_install
+ fi
+ prune_libtool_files
+}
diff --git a/sys-apps/file/file-9999.ebuild b/sys-apps/file/file-9999.ebuild
new file mode 100644
index 000000000000..4f3a87f8bf98
--- /dev/null
+++ b/sys-apps/file/file-9999.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 libtool ltprune toolchain-funcs multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/glensc/file.git"
+ inherit autotools git-r3
+else
+ SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="python static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ python? ( !dev-python/python-magic )"
+
+src_prepare() {
+ default
+
+ [[ ${PV} == "9999" ]] && eautoreconf
+ elibtoolize
+
+ # don't let python README kill main README #60043
+ mv python/README{,.python} || die
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --enable-fsect-man5
+ $(use_enable static-libs static)
+ $(use_enable zlib)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+src_configure() {
+ # when cross-compiling, we need to build up our own file
+ # because people often don't keep matching host/target
+ # file versions #362941
+ if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
+ mkdir -p "${WORKDIR}"/build || die
+ cd "${WORKDIR}"/build || die
+ tc-export_build_env BUILD_C{C,XX}
+ ECONF_SOURCE=${S} \
+ ac_cv_header_zlib_h=no \
+ ac_cv_lib_z_gzopen=no \
+ CHOST=${CBUILD} \
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS="${BUILD_LDFLAGS} -static" \
+ CC=${BUILD_CC} \
+ CXX=${BUILD_CXX} \
+ econf --disable-shared
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi ; then
+ emake
+ else
+ cd src || die
+ emake magic.h #586444
+ emake libmagic.la
+ fi
+}
+
+src_compile() {
+ if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
+ emake -C "${WORKDIR}"/build/src magic.h #586444
+ emake -C "${WORKDIR}"/build/src file
+ PATH="${WORKDIR}/build/src:${PATH}"
+ fi
+ multilib-minimal_src_compile
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi ; then
+ default
+ else
+ emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog MAINT README
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_install
+ fi
+ prune_libtool_files
+}
diff --git a/sys-apps/file/metadata.xml b/sys-apps/file/metadata.xml
new file mode 100644
index 000000000000..2c14dbfaaad7
--- /dev/null
+++ b/sys-apps/file/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <bugs-to>http://bugs.gw.com/</bugs-to>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/findutils/Manifest b/sys-apps/findutils/Manifest
new file mode 100644
index 000000000000..01b2b35c7729
--- /dev/null
+++ b/sys-apps/findutils/Manifest
@@ -0,0 +1,13 @@
+AUX findutils-4.4.2-gnulib-date-x32.patch 1210 SHA256 004a9d3a28ac727fddf3e54fcf2846aab90b30f29f40f8ff32b19742539e85eb SHA512 51bd15305d12a93f2a83faa359d1a2501fd96dea2c8dbed25cafa60c5d7f17b7a86d2d7dd0095dc0a6e0c1e9eaf2775bc6e1ceaadbdf5e2ffbaab6a4a4b9ff60 WHIRLPOOL 7c866ac607fd7c9311160e398ccd98e593f69833ca643606d0462f2b125fce616249a8a0063f2514cd573542e5563539164a1527f3b02c1f20234880d287f258
+AUX findutils-4.4.2-selinux.diff 15603 SHA256 67de61c659f8d524b70ebabafe25093c02374b1fc83770dd5633480745e2ee9d SHA512 5fb4346b56cab0a470358e75c4c4a57f6709f7a987b1e6887242b9a4f241590adcaba7061d71752a5d2f8ac3598ecc1dffdb92b2bc072f5f31152088b88ed7f9 WHIRLPOOL 612394c54d4095c6cd9d0dc326be2b5b6ce41e43cd3dc8e3cd2a4e99a0844aec769373243c62398df79d6f7561f865754b627917b5f1733d6b065b7e3ce7be35
+AUX findutils-4.6.0-gnulib-S_MAGIC_NFS.patch 2098 SHA256 564e825f6d4f0ed2929f26072e5a675d31c4914ef2ebf7de9e2dc0ff39af1988 SHA512 2b8024827bea7e0cd4e9f60c52bcef3147e2ba2236d10b2763e510c9e9e7ace8331034db7599f4792802b9dc1619f5086738dcece63b896c0a9ea73ab0068b27 WHIRLPOOL efcdbb6f85e02c064820992471ba4bc0d8e0067ccc2dd4cac6d495168348f781c1a338ec9077041e2b600e23af38ce46a495df10b20676dfab43385d74ef805a
+AUX findutils-4.6.0-gnulib-mb.patch 1005 SHA256 b0b01b670c232aee8faee186babd14b1d41b51066cce947b63c621b628c80a04 SHA512 2bb4f15159e70c8bc9b6a7b36b290bd1c6d6e8b0ab484bd0b0127425efd27fb4a23585b0d43b437a8fb8b311e201c5cae5ef12f0142489b97fe63844145aabd6 WHIRLPOOL 45a4762ef0e2d4308d0ade05328c0325dc78819a9b147dbb652c5c4679cd8ae7bdf8b689c39262d16d9e1115360b66c71c5c5cdbfda83d25ec8d09c0b5323951
+DIST findutils-4.4.2.tar.gz 2149838 SHA256 434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a SHA512 262d0a8301158e6541b9f24e4e043d8d8c1b196b18dbe59c3bedcf17b50c95708e33ab23a07e3bfb947ad495faafffdca3c296fb525794ca60f2dfd682f228c1 WHIRLPOOL 2af1467403ece2f290be6b9f69db013d386427ab553efcf750ce36bf608fab0d37708209c22bf61b8a82f41aa13bf25a247c62f78dc95446290b7a4bd35d3393
+DIST findutils-4.5.18.tar.gz 3870196 SHA256 e3b570534c7897e8de117396345e2e20f17f704389b7e1daa7889fd089afbdd7 SHA512 2ae70cef9aee81d4402298db11890efa0ec38dba561dfc11afc9c91af7c1c6a7cca221f669c45b00e65eba53a8b08f5124ed4e862d9e26bcf69c48a927e6b398 WHIRLPOOL ece27a2830792e162ca5e53d7d0fefa8959292b6945180a331ac4dc1a999bd858649f761a5dee44bb35e85ffa0dd633b1b65aeeb294ac4a8846ad1cdbfaf351e
+DIST findutils-4.6.0.tar.gz 3780154 SHA256 ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d SHA512 41fcd4197c1efbd77f7420e5754e2cf9332dfef19f90c65a8fa1844bb4bc5d529c8393ee0ff979a054e9ac65ff71d7fe3921ea079f9960843412fc9a71f8afd4 WHIRLPOOL 2954024a0503a9234fd3a4776934b53d455fe48406c53945f8eed12a30f3fb2fa438315892ef9d040e8d6e8e13efbed0146d11956c3721c22558f8a2b392e370
+EBUILD findutils-4.4.2-r2.ebuild 1334 SHA256 73dc95ee2b7a907651aee464d0fda39e8457e0894dea8d91d986b2909b961fe3 SHA512 83c6b0066bc3ac61b50924fbfeba59bc7161987b402465fec1267ebd3d518331cbcf639fc6b5442a8ae9b3b7eb642d853b38883412328f0609a8a8fa4a058b6b WHIRLPOOL 5cfb90bd94eb537fe09e4e0333b037f0a193af4e96529c009461aa8675af7c9a3e9e265569b1e719e28efdca4edb5392cfd322481d35f011f5b661752aff00e1
+EBUILD findutils-4.5.18.ebuild 1577 SHA256 3c0d8a3ad9136c2f56980038054e8067f93eb72f5345fe54f0fb460b15f40799 SHA512 e149ce4f5dde29c308f2872068014fb3aa42e41d08d5eb0b41bab3c3dcaf223bd2b559371a3e7a5d2ffa748cd9ab52614d4f8136de80e7c08e9a0e84a79fb5d1 WHIRLPOOL 299ec32dd8c769876f78ac581eeb71917a04ed59abc7fb6c098834ded59c4944bbd69d250e7ecb26d1495f8540976c304079fe23ff4643dee8520667c9aa6db3
+EBUILD findutils-4.6.0-r1.ebuild 1917 SHA256 91ac126a6e5341f2075705eb8e8acf76283fac825c7a8a0626244285c6508fdc SHA512 6c75ac0fbfcec910671d7341adda481ce3f1fc6d862b00039bc9af3ec17e2b6da7568b12812afa0d890db816c8e74e3ce739e9fc7b8ad1ea37ef30a338742595 WHIRLPOOL b59644f0bd0b2cf84fd9d22d76120cc50b363fd129ed59ea13b44925789a0c22cfe66580196ae3a3055e323f82d5d9dc78980c835bc78ded30955d982d38707d
+MISC ChangeLog 8811 SHA256 125920dd721cb0f30cb080c88b7983edb3201922b3d87c6a17d04bf3e4a92bc4 SHA512 8f0a3ded7fc70c29d6ebd0d6126a67d11053011b9b4057dd9d8f869001c929606e53e21e209601fe6501d1236de7d5ad99f5279e3c3528ab0ced0a3f4bd8c83a WHIRLPOOL e3701084b4eb7bc46004377e160ab4c409953506f3d9e9d0d3fac8bda1c0d74d4df2f7c1fdb9610a9dd79e764a145bab1c6e43800f68e8f7abde1d416cb0a2fc
+MISC ChangeLog-2015 32168 SHA256 5ce8ba2b4363381557bed6589e5b5862b779ae61ccca36d264d87105843d7240 SHA512 221ad1476ebdcce1de012e61360d0f80164826ab6f72fe05b8e55f05cb9e410acbd789ffc8cb8582ede504988a45b621458b6d8b0e5e76d5f7708a4568c68c42 WHIRLPOOL 1d91021760f682f528673a7a6de96d22da35dabf5e686c43a818c2bec8ce9e9c36995e17a45bd28a3090b421ea68e496838f9d373d054a958e8531d2fe76fa76
+MISC metadata.xml 332 SHA256 bd5bf452b35ee08d601bd151e4685f73418e5f48ff246e751233dd978b2c444f SHA512 35951bfca173276d17ced243bd870ca62804bf3db766f964cad94f8b100ab33bc0a3b157547527451bae42fc9ea4d414e56ef06f424638e9ab4b5319c6ee8b00 WHIRLPOOL 888659b8fd180da51e5185fe47c85e78c014bb4ece4836f7a765aa193c46919e53c6b2383f9c24005cfea97746dcbff5f11d9aee44304e05a4c56b1615637431
diff --git a/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch b/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch
new file mode 100644
index 000000000000..9ff86f6b84a6
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch
@@ -0,0 +1,26 @@
+newer gnulib has rewritten these checks in a way that works for the x32,
+and for the targets we care about, these checks won't return false. so
+just drop them to make our life simpler.
+
+https://sites.google.com/site/x32abi/x32-patches
+
+--- findutils-4.4.2/gnulib/lib/getdate.c.x32 2009-05-10 14:23:57.000000000 -0700
++++ findutils-4.4.2/gnulib/lib/getdate.c 2011-12-05 11:41:18.130675712 -0800
+@@ -114,7 +114,6 @@
+ wraps around, but there's no portable way to check for that at
+ compile-time. */
+ verify (TYPE_IS_INTEGER (time_t));
+-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
+
+ /* An integer value, and the number of digits in its textual
+ representation. */
+--- findutils-4.4.2/gnulib/lib/mktime.c.x32 2009-05-10 14:25:13.000000000 -0700
++++ findutils-4.4.2/gnulib/lib/mktime.c 2011-12-05 11:49:38.368589386 -0800
+@@ -166,7 +166,5 @@ ydhms_diff (long int year1, long int yda
+ {
+ verify (C99_integer_division, -1 / 2 == 0);
+- verify (long_int_year_and_yday_are_wide_enough,
+- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+
+ /* Compute intervening leap days correctly even if year is negative.
+ Take care to avoid integer overflow here. */
diff --git a/sys-apps/findutils/files/findutils-4.4.2-selinux.diff b/sys-apps/findutils/files/findutils-4.4.2-selinux.diff
new file mode 100644
index 000000000000..66c9c412a0af
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.4.2-selinux.diff
@@ -0,0 +1,464 @@
+diff -purN findutils-4.4.2.orig/find/Makefile.am findutils-4.4.2/find/Makefile.am
+--- findutils-4.4.2.orig/find/Makefile.am 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/Makefile.am 2010-04-25 03:58:33.762402367 +0000
+@@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = std-options
+ localedir = $(datadir)/locale
+ # noinst_PROGRAMS = regexprops
+ # regexprops_SOURCES = regexprops.c
++DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DWITH_SELINUX
+
+ noinst_LIBRARIES = libfindtools.a
+ libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c
+@@ -26,7 +27,7 @@ endif
+
+ EXTRA_DIST = defs.h $(man_MANS)
+ INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+-LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@
++LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ -lselinux
+ man_MANS = find.1
+ SUBDIRS = . testsuite
+
+diff -purN findutils-4.4.2.orig/find/Makefile.in findutils-4.4.2/find/Makefile.in
+--- findutils-4.4.2.orig/find/Makefile.in 2009-05-16 15:28:13.000000000 +0000
++++ findutils-4.4.2/find/Makefile.in 2010-04-25 03:58:33.762402367 +0000
+@@ -275,7 +275,7 @@ CPP = @CPP@
+ CPPFLAGS = @CPPFLAGS@
+ CYGPATH_W = @CYGPATH_W@
+ DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@
+-DEFS = @DEFS@
++DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DWITH_SELINUX
+ DEPDIR = @DEPDIR@
+ DIRENT_H = @DIRENT_H@
+ ECHO_C = @ECHO_C@
+@@ -607,7 +607,7 @@ libfindtools_a_SOURCES = finddata.c fsty
+ @WITH_FTS_TRUE@oldfind_SOURCES = find.c
+ @WITH_FTS_FALSE@ftsfind_SOURCES = ftsfind.c
+ EXTRA_DIST = defs.h $(man_MANS)
+-LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@
++LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ -lselinux
+ man_MANS = find.1
+ SUBDIRS = . testsuite
+ all: all-recursive
+diff -purN findutils-4.4.2.orig/find/defs.h findutils-4.4.2/find/defs.h
+--- findutils-4.4.2.orig/find/defs.h 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/defs.h 2010-04-25 03:58:33.762402367 +0000
+@@ -91,6 +91,9 @@ int get_statinfo PARAMS((const char *pat
+ #define MODE_RWX (S_IXUSR | S_IXGRP | S_IXOTH | MODE_RW)
+ #define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
+
++#ifdef WITH_SELINUX
++#include <selinux/selinux.h>
++#endif /*WITH_SELINUX*/
+
+ struct predicate;
+ struct options;
+@@ -315,6 +318,9 @@ struct predicate
+ struct samefile_file_id samefileid; /* samefile */
+ mode_t type; /* type */
+ struct format_val printf_vec; /* printf fprintf fprint ls fls print0 fprint0 print */
++#ifdef WITH_SELINUX
++ security_context_t scontext; /* scontext */
++#endif /*WITH_SELINUX*/
+ } args;
+
+ /* The next predicate in the user input sequence,
+@@ -459,7 +465,9 @@ PREDICATEFUNCTION pred_used;
+ PREDICATEFUNCTION pred_user;
+ PREDICATEFUNCTION pred_writable;
+ PREDICATEFUNCTION pred_xtype;
+-
++#ifdef WITH_SELINUX
++PREDICATEFUNCTION pred_scontext;
++#endif /* WITH_SELINUX */
+
+
+ int launch PARAMS((const struct buildcmd_control *ctl,
+@@ -605,10 +613,13 @@ struct options
+ */
+ unsigned short optimisation_level;
+
+-
+ /* How should we quote filenames in error messages and so forth?
+ */
+ enum quoting_style err_quoting_style;
++
++#ifdef WITH_SELINUX
++ int (*x_getfilecon)();
++#endif /* WITH_SELINUX */
+ };
+ extern struct options options;
+
+diff -purN findutils-4.4.2.orig/find/find.1 findutils-4.4.2/find/find.1
+--- findutils-4.4.2.orig/find/find.1 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/find.1 2010-04-25 03:58:33.762402367 +0000
+@@ -934,6 +934,10 @@ checks the type of the file that
+ .B \-type
+ does not check.
+
++.IP "\-context \fIscontext\fR"
++.IP "\--context \fIscontext\fR"
++(SELinux only) File has the security context \fIscontext\fR.
++
+ .SS ACTIONS
+ .IP "\-delete\fR"
+ Delete files; true if removal succeeded. If the removal failed, an
+@@ -1354,6 +1358,8 @@ File's type (like in
+ U=unknown type (shouldn't happen)
+ .IP %Y
+ File's type (like %y), plus follow symlinks: L=loop, N=nonexistent
++.IP %Z
++(SELinux only) file's security context.
+ .PP
+ A `%' character followed by any other character is discarded, but the
+ other character is printed (don't rely on this, as further format
+diff -purN findutils-4.4.2.orig/find/find.c findutils-4.4.2/find/find.c
+--- findutils-4.4.2.orig/find/find.c 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/find.c 2010-04-25 03:58:33.764899827 +0000
+@@ -1270,7 +1270,7 @@ process_path (char *pathname, char *name
+ static void
+ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent)
+ {
+- int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */
++ int subdirs_left=0; /* Number of unexamined subdirs in PATHNAME. */
+ boolean subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */
+ unsigned int idx; /* Which entry are we on? */
+ struct stat stat_buf;
+diff -purN findutils-4.4.2.orig/find/parser.c findutils-4.4.2/find/parser.c
+--- findutils-4.4.2.orig/find/parser.c 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/parser.c 2010-04-25 03:58:33.764899827 +0000
+@@ -53,6 +53,13 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+
++#ifdef WITH_SELINUX
++#include <selinux/selinux.h>
++int optionh_getfilecon(const char *name, security_context_t *p);
++int optionl_getfilecon(const char *name, security_context_t *p);
++int optionp_getfilecon(const char *name, security_context_t *p);
++#endif /*WITH_SELINUX*/
++
+ #if ENABLE_NLS
+ # include <libintl.h>
+ # define _(Text) gettext (Text)
+@@ -155,6 +162,9 @@ static boolean parse_noignore_race PARAM
+ static boolean parse_warn PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+ static boolean parse_xtype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+ static boolean parse_quit PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
++#ifdef WITH_SELINUX
++static boolean parse_scontext PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
++#endif /*WITH_SELINUX*/
+
+ boolean parse_print PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+
+@@ -340,6 +350,8 @@ static struct parser_table const parse_t
+ {ARG_TEST, "-help", parse_help, NULL}, /* GNU */
+ {ARG_TEST, "version", parse_version, NULL}, /* GNU */
+ {ARG_TEST, "-version", parse_version, NULL}, /* GNU */
++ {ARG_TEST, "context", parse_scontext, pred_scontext}, /* SELinux */
++ {ARG_TEST, "-context", parse_scontext, pred_scontext}, /* SELinux */
+ {0, 0, 0, 0}
+ };
+
+@@ -451,10 +463,16 @@ set_follow_state(enum SymlinkOption opt)
+ case SYMLINK_ALWAYS_DEREF: /* -L */
+ options.xstat = optionl_stat;
+ options.no_leaf_check = true;
++#ifdef WITH_SELINUX
++ options.x_getfilecon = optionl_getfilecon;
++#endif /* WITH_SELINUX */
+ break;
+
+ case SYMLINK_NEVER_DEREF: /* -P (default) */
+ options.xstat = optionp_stat;
++#ifdef WITH_SELINUX
++ options.x_getfilecon = optionp_getfilecon;
++#endif /* WITH_SELINUX */
+ /* Can't turn no_leaf_check off because the user might have specified
+ * -noleaf anyway
+ */
+@@ -463,6 +481,9 @@ set_follow_state(enum SymlinkOption opt)
+ case SYMLINK_DEREF_ARGSONLY: /* -H */
+ options.xstat = optionh_stat;
+ options.no_leaf_check = true;
++#ifdef WITH_SELINUX
++ options.x_getfilecon = optionh_getfilecon;
++#endif /* WITH_SELINUX */
+ }
+ }
+ options.symlink_handling = opt;
+@@ -670,6 +691,94 @@ collect_arg_stat_info(char **argv, int *
+
+ The predicate structure is updated with the new information. */
+
++#ifdef WITH_SELINUX
++
++static int
++fallback_getfilecon(const char *name, security_context_t *p, int prev_rv)
++{
++ /* Our original getfilecon() call failed. Perhaps we can't follow a
++ * symbolic link. If that might be the problem, lgetfilecon() the link.
++ * Otherwise, admit defeat.
++ */
++ switch (errno)
++ {
++ case ENOENT:
++ case ENOTDIR:
++#ifdef DEBUG_STAT
++ fprintf(stderr, "fallback_getfilecon(): getfilecon(%s) failed; falling back on lgetfilecon()\n", name);
++#endif
++ return lgetfilecon(name, p);
++
++ case EACCES:
++ case EIO:
++ case ELOOP:
++ case ENAMETOOLONG:
++#ifdef EOVERFLOW
++ case EOVERFLOW: /* EOVERFLOW is not #defined on UNICOS. */
++#endif
++ default:
++ return prev_rv;
++ }
++}
++
++
++/* optionh_getfilecon() implements the getfilecon operation when the
++ * -H option is in effect.
++ *
++ * If the item to be examined is a command-line argument, we follow
++ * symbolic links. If the getfilecon() call fails on the command-line
++ * item, we fall back on the properties of the symbolic link.
++ *
++ * If the item to be examined is not a command-line argument, we
++ * examine the link itself.
++ */
++int
++optionh_getfilecon(const char *name, security_context_t *p)
++{
++ if (0 == state.curdepth)
++ {
++ /* This file is from the command line; deference the link (if it
++ * is a link).
++ */
++ int rv = getfilecon(name, p);
++ if (0 == rv)
++ return 0; /* success */
++ else
++ return fallback_getfilecon(name, p, rv);
++ }
++ else
++ {
++ /* Not a file on the command line; do not derefernce the link.
++ */
++ return lgetfilecon(name, p);
++ }
++}
++
++/* optionl_getfilecon() implements the getfilecon operation when the
++ * -L option is in effect. That option makes us examine the thing the
++ * symbolic link points to, not the symbolic link itself.
++ */
++int
++optionl_getfilecon(const char *name, security_context_t *p)
++{
++ int rv = getfilecon(name, p);
++ if (0 == rv)
++ return 0; /* normal case. */
++ else
++ return fallback_getfilecon(name, p, rv);
++}
++
++/* optionp_getfilecon() implements the stat operation when the -P
++ * option is in effect (this is also the default). That option makes
++ * us examine the symbolic link itself, not the thing it points to.
++ */
++int
++optionp_getfilecon(const char *name, security_context_t *p)
++{
++ return lgetfilecon(name, p);
++}
++#endif /* WITH_SELINUX */
++
+
+ static boolean
+ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
+@@ -1128,6 +1237,10 @@ tests (N can be +N or -N or N): -amin N
+ -readable -writable -executable\n\
+ -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\
+ -used N -user NAME -xtype [bcdpfls]\n"));
++#ifdef WITH_SELINUX
++ puts (_("\
++ -context CONTEXT\n"));
++#endif /*WITH_SELINUX*/
+ puts (_("\
+ actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n\
+ -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n\
+@@ -2552,6 +2665,29 @@ parse_version (const struct parser_table
+ exit (0);
+ }
+
++#ifdef WITH_SELINUX
++
++static boolean
++parse_scontext ( const struct parser_table* entry, char **argv, int *arg_ptr)
++{
++ struct predicate *our_pred;
++
++ if ( (argv == NULL) || (argv[*arg_ptr] == NULL) )
++ return( false );
++
++ our_pred = insert_primary(entry);
++ our_pred->need_stat = false;
++#ifdef DEBUG
++ our_pred->p_name = find_pred_name (pred_scontext);
++#endif /*DEBUG*/
++ our_pred->args.scontext = argv[*arg_ptr];;
++
++ (*arg_ptr)++;
++ return( true );
++}
++
++#endif /*WITH_SELINUX*/
++
+ static boolean
+ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+@@ -2803,7 +2939,11 @@ insert_fprintf (struct format_val *vec,
+ if (*scan2 == '.')
+ for (scan2++; ISDIGIT (*scan2); scan2++)
+ /* Do nothing. */ ;
++#ifdef WITH_SELINUX
++ if (strchr ("abcdDfFgGhHiklmMnpPsStuUyYZ", *scan2))
++#else
+ if (strchr ("abcdDfFgGhHiklmMnpPsStuUyY", *scan2))
++#endif
+ {
+ segmentp = make_segment (segmentp, format, scan2 - format,
+ KIND_FORMAT, *scan2, 0,
+diff -purN findutils-4.4.2.orig/find/pred.c findutils-4.4.2/find/pred.c
+--- findutils-4.4.2.orig/find/pred.c 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/pred.c 2010-04-25 03:58:33.764899827 +0000
+@@ -48,6 +48,14 @@
+ #include "error.h"
+ #include "verify.h"
+
++#ifdef WITH_SELINUX
++#include <selinux/selinux.h>
++#endif /*WITH_SELINUX*/
++
++#ifndef FNM_CASEFOLD
++#define FNM_CASEFOLD (1<<4)
++#endif /*FNM_CASEFOLD*/
++
+ #if ENABLE_NLS
+ # include <libintl.h>
+ # define _(Text) gettext (Text)
+@@ -230,6 +238,9 @@ struct pred_assoc pred_table[] =
+ {pred_user, "user "},
+ {pred_writable, "writable "},
+ {pred_xtype, "xtype "},
++#ifdef WITH_SELINUX
++ {pred_scontext, "context"},
++#endif /*WITH_SELINUX*/
+ {0, "none "}
+ };
+ #endif
+@@ -1054,6 +1065,26 @@ do_fprintf(struct format_val *dest,
+ mode_to_filetype(stat_buf->st_mode & S_IFMT));
+ }
+ break;
++#ifdef WITH_SELINUX
++ case 'Z': /* SELinux security context */
++ {
++ security_context_t scontext;
++ int rv;
++ rv = (*options.x_getfilecon)(state.rel_pathname, &scontext);
++
++ if ( rv < 0 ) {
++ fprintf(stderr, "getfileconf(%s): %s",
++ pathname, strerror(errno));
++ fflush(stderr);
++ }
++ else {
++ segment->text[segment->text_len] = 's';
++ checked_fprintf (dest, segment->text, scontext);
++ freecon(scontext);
++ }
++ }
++ break ;
++#endif /* WITH_SELINUX */
+ }
+ /* end of KIND_FORMAT case */
+ break;
+@@ -1844,6 +1875,31 @@ pred_xtype (const char *pathname, struct
+ */
+ return (pred_type (pathname, &sbuf, pred_ptr));
+ }
++
++
++#ifdef WITH_SELINUX
++
++boolean
++pred_scontext (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
++{
++ int rv;
++ security_context_t scontext;
++
++ rv = (* options.x_getfilecon)(state.rel_pathname, &scontext);
++
++ if ( rv < 0 ) {
++ (void) fprintf(stderr, "getfilecon(%s): %s\n", pathname, strerror(errno));
++ (void) fflush(stderr);
++ return ( false );
++ }
++
++ rv = (fnmatch(pred_ptr->args.scontext, scontext,0)==0);
++ freecon(scontext);
++ return rv;
++}
++
++#endif /*WITH_SELINUX*/
++
+
+ /* 1) fork to get a child; parent remembers the child pid
+ 2) child execs the command requested
+diff -purN findutils-4.4.2.orig/find/tree.c findutils-4.4.2/find/tree.c
+--- findutils-4.4.2.orig/find/tree.c 2009-05-16 15:17:01.000000000 +0000
++++ findutils-4.4.2/find/tree.c 2010-04-25 03:58:33.764899827 +0000
+@@ -1195,6 +1195,10 @@ build_expression_tree(int argc, char *ar
+ const struct parser_table *entry_close, *entry_print, *entry_open;
+ int i, oldi;
+
++#ifdef WITH_SELINUX
++ int is_selinux_enabled_flag = is_selinux_enabled()>0;
++#endif /* WITH_SELINUX */
++
+ predicates = NULL;
+
+ /* Find where in ARGV the predicates begin by skipping the list of
+@@ -1230,6 +1234,16 @@ build_expression_tree(int argc, char *ar
+ }
+
+ predicate_name = argv[i];
++
++#ifdef WITH_SELINUX
++ if (! is_selinux_enabled_flag) {
++ if ((strncmp(predicate_name,"-context",strlen("-context"))==0) ||
++ (strncmp(predicate_name,"--context",strlen("--context"))==0)) {
++ error (1, 0,_("Error: invalid predicate %s: the kernel is not selinux-enabled.\n"),predicate_name);
++ }
++ }
++#endif
++
+ parse_entry = find_parser (predicate_name);
+ if (parse_entry == NULL)
+ {
+@@ -1434,6 +1448,9 @@ get_new_pred (const struct parser_table
+ last_pred->need_stat = true;
+ last_pred->need_type = true;
+ last_pred->args.str = NULL;
++#ifdef WITH_SELINUX
++ last_pred->args.scontext = NULL;
++#endif
+ last_pred->pred_next = NULL;
+ last_pred->pred_left = NULL;
+ last_pred->pred_right = NULL;
diff --git a/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch b/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch
new file mode 100644
index 000000000000..8d47800eeb5e
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch
@@ -0,0 +1,52 @@
+From 85717b68b03bf85016c5079fbbf0c8aa2b182ba6 Mon Sep 17 00:00:00 2001
+From: Pádraig Brady <P@draigBrady.com>
+Date: Mon, 18 Jan 2016 17:29:28 +0000
+Subject: fts: don't unconditionally use leaf optimization for NFS
+
+NFS st_nlink are not accurate on all implementations,
+leading to aborts() if that assumption is made.
+See <https://bugzilla.redhat.com/1299169>
+* lib/fts.c (leaf_optimization_applies): Remove NFS from
+the white list, and document the issue.
+---
+(limited to 'lib/fts.c')
+
+diff --git a/lib/fts.c b/lib/fts.c
+index 7e9aca6..2c9df2f 100644
+--- a/gl/lib/fts.c
++++ b/gl/lib/fts.c
+@@ -718,22 +718,23 @@ leaf_optimization_applies (int dir_fd)
+
+ switch (fs_buf.f_type)
+ {
+- case S_MAGIC_NFS:
+- /* NFS provides usable dirent.d_type but not necessarily for all entries
+- of large directories. See <https://bugzilla.redhat.com/1252549>. */
+- return true;
+-
+ /* List here the file system types that lack usable dirent.d_type
+ info, yet for which the optimization does apply. */
+ case S_MAGIC_REISERFS:
+ case S_MAGIC_XFS:
+ return true;
+
++ /* Explicitly list here any other file system type for which the
++ optimization is not applicable, but need documentation. */
++ case S_MAGIC_NFS:
++ /* NFS provides usable dirent.d_type but not necessarily for all entries
++ of large directories, so as per <https://bugzilla.redhat.com/1252549>
++ NFS should return true. However st_nlink values are not accurate on
++ all implementations as per <https://bugzilla.redhat.com/1299169>. */
++ /* fall through */
+ case S_MAGIC_PROC:
+- /* Explicitly listing this or any other file system type for which
+- the optimization is not applicable is not necessary, but we leave
+- it here to document the risk. Per http://bugs.debian.org/143111,
+- /proc may have bogus stat.st_nlink values. */
++ /* Per <http://bugs.debian.org/143111> /proc may have
++ bogus stat.st_nlink values. */
+ /* fall through */
+ default:
+ return false;
+--
+cgit v0.9.0.2
diff --git a/sys-apps/findutils/files/findutils-4.6.0-gnulib-mb.patch b/sys-apps/findutils/files/findutils-4.6.0-gnulib-mb.patch
new file mode 100644
index 000000000000..925d7cf4422b
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.6.0-gnulib-mb.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/576818
+
+From 1f63650823cebf52044df840c81062ccb52163a2 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <ueno@gnu.org>
+Date: Mon, 28 Dec 2015 06:27:42 +0900
+Subject: [PATCH] maint: fix operator precedence in mbrtowc test
+
+This is a fix for test breakage introduced by commit 45228d96; the
+equality expression must be parenthesized when negated with '!',
+otherwise we always get:
+
+ test-mbrtowc.c:49: assertion 'ret == (size_t)(-2)' failed
+
+* m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Negate the entire expression.
+* m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
+---
+ m4/mbrlen.m4 | 2 +-
+ m4/mbrtowc.m4 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -569,7 +569,7 @@ changequote([,])dnl
+ int
+ main (void)
+ {
+- return ! mbrtowc (&wc, "", 0, &mbs) == (size_t) -2;
++ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+--
+2.6.2
+
diff --git a/sys-apps/findutils/findutils-4.4.2-r2.ebuild b/sys-apps/findutils/findutils-4.4.2-r2.ebuild
new file mode 100644
index 000000000000..3208b910b590
--- /dev/null
+++ b/sys-apps/findutils/findutils-4.4.2-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+SELINUX_PATCH="findutils-4.4.2-selinux.diff"
+
+DESCRIPTION="GNU utilities for finding files"
+HOMEPAGE="https://www.gnu.org/software/findutils/"
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
+ mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug nls selinux static"
+
+RDEPEND="selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gnulib-date-x32.patch
+
+ # Don't build or install locate because it conflicts with slocate,
+ # which is a secure version of locate. See bug 18729
+ sed -i '/^SUBDIRS/s/locate//' Makefile.in
+
+ use selinux && epatch "${FILESDIR}/${SELINUX_PATCH}"
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ program_prefix=$(usex userland_GNU '' g)
+ econf \
+ --program-prefix=${program_prefix} \
+ $(use_enable debug) \
+ $(use_enable nls) \
+ --libexecdir='$(libdir)'/find
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ # We don't need this, so punt it.
+ rm "${ED}"/usr/bin/${program_prefix}oldfind || die
+}
diff --git a/sys-apps/findutils/findutils-4.5.18.ebuild b/sys-apps/findutils/findutils-4.5.18.ebuild
new file mode 100644
index 000000000000..9d821a86d772
--- /dev/null
+++ b/sys-apps/findutils/findutils-4.5.18.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic toolchain-funcs python-any-r1
+
+DESCRIPTION="GNU utilities for finding files"
+HOMEPAGE="https://www.gnu.org/software/findutils/"
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug nls selinux static test"
+
+RDEPEND="selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ test? ( ${PYTHON_DEPS} )
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Don't build or install locate because it conflicts with slocate,
+ # which is a secure version of locate. See bug 18729
+ sed -i '/^SUBDIRS/s/locate//' Makefile.in
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ program_prefix=$(usex userland_GNU '' g)
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ --program-prefix=${program_prefix} \
+ $(use_enable debug) \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ --libexecdir='$(libdir)'/find
+}
+
+src_compile() {
+ # We don't build locate, but the docs want a file in there.
+ emake -C locate dblocation.texi
+ default
+}
diff --git a/sys-apps/findutils/findutils-4.6.0-r1.ebuild b/sys-apps/findutils/findutils-4.6.0-r1.ebuild
new file mode 100644
index 000000000000..6f7b51dcc2a2
--- /dev/null
+++ b/sys-apps/findutils/findutils-4.6.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit eutils flag-o-matic toolchain-funcs python-any-r1
+
+DESCRIPTION="GNU utilities for finding files"
+HOMEPAGE="https://www.gnu.org/software/findutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls selinux static test"
+
+RDEPEND="selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ test? ( ${PYTHON_DEPS} )
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Don't build or install locate because it conflicts with slocate,
+ # which is a secure version of locate. See bug 18729
+ sed -i '/^SUBDIRS/s/locate//' Makefile.in
+
+ # Newer C libraries omit this include from sys/types.h.
+ # https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00018.html
+ sed -i \
+ '/include.*config.h/a#ifdef MAJOR_IN_SYSMACROS\n#include <sys/sysmacros.h>\n#endif\n' \
+ gl/lib/mountlist.c || die
+
+ epatch "${FILESDIR}"/${P}-gnulib-mb.patch #576818
+ epatch "${FILESDIR}"/${P}-gnulib-S_MAGIC_NFS.patch #580032
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ program_prefix=$(usex userland_GNU '' g)
+ econf \
+ --with-packager="Gentoo" \
+ --with-packager-version="${PVR}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org/" \
+ --program-prefix=${program_prefix} \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ --libexecdir='$(libdir)'/find
+}
+
+src_compile() {
+ # We don't build locate, but the docs want a file in there.
+ emake -C locate dblocation.texi
+ default
+}
diff --git a/sys-apps/findutils/metadata.xml b/sys-apps/findutils/metadata.xml
new file mode 100644
index 000000000000..b385831efd34
--- /dev/null
+++ b/sys-apps/findutils/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:findutils</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/firejail-lts/Manifest b/sys-apps/firejail-lts/Manifest
new file mode 100644
index 000000000000..9da5ee05a390
--- /dev/null
+++ b/sys-apps/firejail-lts/Manifest
@@ -0,0 +1,4 @@
+DIST firejail-0.9.38.10.tar.bz2 159476 SHA256 1695c8991ab27e7bd69a27e73e311d28fda92d996ffab90addabfcd57690e1ba SHA512 61a41655a46031c34f44f7f24e3c5369e3187edc10cb091b0d429ead8d367e79acdaa4bb41573cdf733111ce353fc91efe51cb95e331ad7c2fdb639a60e194fb WHIRLPOOL dfcc293a5dc94b44d18a0fd0930c771a7f9cae250ef5da06d7564b8f57618c28ccd6f74a772d20f1e3ce72bb6a40b4fe722b2f008c36e8210aa4dc1f870c0226
+EBUILD firejail-lts-0.9.38.10.ebuild 734 SHA256 02b4b3df7ed8caa883f2f317aeed0deb94ddd5285fbf2a71da535a6e33e99c54 SHA512 182d12ca0dcb10a125f7feebe5ecb3d18887bdac555dd470aef6e11bd60a01a6ff3c33a00b6e4ca1adf5ca3de1e062eab59cb802b8ff6dac8e6726e117401ec4 WHIRLPOOL 580b825a34c630ac4533fdb54e784ad8054b7aa3a3fb5ad8d9612ed30898aeef8499731a76e14e724be93598074297078a9fc38046252dff8fac79f96cd9d0e6
+MISC ChangeLog 741 SHA256 fdf3f62f5a23dc92be8fe1ecfbd346166b7f7c77c20638fcd544d9f64b64f271 SHA512 f9805e4aeb267acb9bb78aedb6df74a76fe41cdb70fb6cd9f7ec49c29d6129deb77fb9d827be91c172fb9b4628077034b6a36026a5c6b2822bd1655e13658e6d WHIRLPOOL 6b5fba2314279effbcb2d1b3aac634c0a7938be933cab9dbc72e6869926f6fa596f4196c6645e0ad986fab0a04de47d791e7086cb43bcaddbdda2def75f4739e
+MISC metadata.xml 913 SHA256 ccd53f9a806aaf0b8ee3b465b6d5cc154f84f47a6570e8e8bc6a36325276cccd SHA512 dec029d42ee70f9357e27806a943b70c7a423a257ad71e560fb1fe199f8967af79e2ad6367c54b8779f19e94d3804e3116b8abe7b86f2bca0b0ac2908d9ce092 WHIRLPOOL 614c0d32722138c340d52707465834e73aedf37e7b86aec0da9157eae31f00c7b76df97af73a0380b92b1aa2b3d249a925cb6c8d2449390c559229f56c030d90
diff --git a/sys-apps/firejail-lts/firejail-lts-0.9.38.10.ebuild b/sys-apps/firejail-lts/firejail-lts-0.9.38.10.ebuild
new file mode 100644
index 000000000000..7faa279ae1ee
--- /dev/null
+++ b/sys-apps/firejail-lts/firejail-lts-0.9.38.10.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+MY_PN=firejail
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Security sandbox for any type of processes; LTS branch"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="+seccomp"
+
+DEPEND="!sys-apps/firejail"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable seccomp)
+}
diff --git a/sys-apps/firejail-lts/metadata.xml b/sys-apps/firejail-lts/metadata.xml
new file mode 100644
index 000000000000..942b4a06eabc
--- /dev/null
+++ b/sys-apps/firejail-lts/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aidecoe@gentoo.org</email>
+ <name>Amadeusz Żołnowski</name>
+ </maintainer>
+ <longdescription lang="en">
+ Firejail is a SUID program that reduces the risk of security breaches
+ by restricting the running environment of untrusted applications using
+ Linux namespaces and seccomp-bpf. It allows a process and all its
+ descendants to have their own private view of the globally shared
+ kernel resources, such as the network stack, process table, mount
+ table.
+
+ This is long term support branch of firejail. For bleeding edge version
+ see sys-apps/firejail.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">firejail</remote-id>
+ </upstream>
+ <use>
+ <flag name="seccomp">Enable system call filtering</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/firejail/Manifest b/sys-apps/firejail/Manifest
new file mode 100644
index 000000000000..3cfd938933b2
--- /dev/null
+++ b/sys-apps/firejail/Manifest
@@ -0,0 +1,15 @@
+AUX 0.9.46-contrib-fix.patch 2202 SHA256 f55365d60f8686fbbca7676401fe2552c33a4c844da2eec1596a4929f9fc2239 SHA512 3dd190d7c1551745b9ae980c759659b4f2cf070af4f005c75a550ef6bee9af4b5dee8d612d347619457f6ebaccd1af7a0c6f7e6cb2c0d18a773deef19bf1df77 WHIRLPOOL 4aa4caecbea43d61021f22708d766a285d39aa7ac9bf05a0f8eedb27d2f3356cc2f83744e83e44ddbbb813c4a0afb6558441628cb23b489b916762c30fe2f9a7
+AUX 0.9.48-contrib-fix.patch 1446 SHA256 3d0be28c6cddbf94510c2f64ff8178e37c962e001feeff49098c48ce9b61da31 SHA512 04c88fbaa37c677efef1805c6b0bca6d87742acf5c80b047844e776e51c02c8803d2588a5dde74817b0cbbf6ce9d239ca39a823df1928ef36f232b403fb41889 WHIRLPOOL 4caed8db77b439f4453287f15ef131fc4c1aab88fb1aac0ee2767539a17a4ec54c2504813dfa17a9d5793248f0a740af3567fb926a67b43f5c7bf2dbf70c49de
+AUX 0.9.50-contrib-fix.patch 1446 SHA256 3d0be28c6cddbf94510c2f64ff8178e37c962e001feeff49098c48ce9b61da31 SHA512 04c88fbaa37c677efef1805c6b0bca6d87742acf5c80b047844e776e51c02c8803d2588a5dde74817b0cbbf6ce9d239ca39a823df1928ef36f232b403fb41889 WHIRLPOOL 4caed8db77b439f4453287f15ef131fc4c1aab88fb1aac0ee2767539a17a4ec54c2504813dfa17a9d5793248f0a740af3567fb926a67b43f5c7bf2dbf70c49de
+DIST firejail-0.9.44.10.tar.xz 216216 SHA256 b21e264a0cbe14b09f8220e79066b1791fd8f2d5a8ceca1e669a7152e0b094a7 SHA512 d9d259c25964eeea87311353a4488e56d1bd65c024aa79f5f2493100f58de4904e081db42132e8d190a05a105fb51dba1d0ac174bf786dc3ec43f356380b3fa6 WHIRLPOOL 34c8beac00a706ed3aea6429f4297421716e473460a9079b2ab9d5796e8ee5e560e5359202ec14beab0f470a076b635513b1082a07dac0f579e86a8113b3a8ee
+DIST firejail-0.9.44.8.tar.xz 214624 SHA256 b9fe191771db2d19344bfc8b1117c33793f78ae1ba10a76e948bfafd71b10771 SHA512 5dc56e259b18c1bd853d15b44bd266b59f45b8ede7e370ce59bfeff7e390d7f4a1784c1c0986d039e2f8de6329984748c8ed287a4a715e95886607f0fd91fd4f WHIRLPOOL f679f7f9592b27382b3653042d15bdc6c69d7ee95cb87a9dbcf1022b284901cfde26efc572e6d540ce15332418e6f80456dec2e9cc133b8b85815b57707245f1
+DIST firejail-0.9.46.tar.xz 254748 SHA256 82f5691de90f8652b78803b6a5d8b93e749e107a86fd03518f5a3e2cdbd17b1d SHA512 839f3d6146129ceb9e9a613a51ce76d1d0a8a9ccab85c807bb0e71354b5c25fbc2a76e1004400bba8b70434dd886bc67250a2fe0b0eaa7d1ee65f6472bc9f786 WHIRLPOOL 18e493370072acb71c37ef7dd8ea4d1cdbf102fbf2e91e03519b5e92e1279be733560300294aa353e2ba34f5b9b4e495e973ed5e77b7673e562dfe674c8bd314
+DIST firejail-0.9.48.tar.xz 257592 SHA256 637da4221ff91c351020de15ef07a7b4f72bc015255be74cbbeb898bba254709 SHA512 63d2d8a6e6b3f505c88b132a3528ec5211ca5325e53ad1878b25bfb7d679b63af769443b464375a96ea5278b0edca98bd295256072dfa2e1a9d3ba829579b0b7 WHIRLPOOL 312fb58914a7613e169f1b580f35cd912800c70623faa27cc4216b9198d0e79a65d36b35d67867936e64081a0fa1913951cccf121fc46600a08c1d393d707737
+DIST firejail-0.9.50.tar.xz 279488 SHA256 c15475b7ec8b42ee8707f03207bef9ba92d801fc61fd8d1e0f8cfc03833bb800 SHA512 766fe8a0c65ddc717759f0ea54a4fe72213f43ecf241c385e484eb7e47bebd5896976998c76e6a5ef9c153d4007c2a01e9d942cc9f352c4b085fb02fe708a87d WHIRLPOOL 15df41a85664b160f053b539c27771a6723f1ea2cd67c21b2d393e9776cd713dc1243c0ab4459d0c4d08827241d726ff079d57d0899d0f53ad2ec3316a59dbc3
+EBUILD firejail-0.9.44.10.ebuild 1068 SHA256 f6f7d4f82ef9a9dd6dfbcf51c69996fb04621bf0c8372230d34447b67a9a1429 SHA512 792a626b1396b09e07aee96b24efd0c7833d7909d81fb6c4efb1ba0a7aeea0ce68026befa359ef833ad36d9cc0cbed2896fdb7a3636eb2aa43c05e43bc702a59 WHIRLPOOL 6f3da751adf11300a7c72ccbdcd6bd8cb9ee7af1973523dd9654e3508de98f9f4ccdb48618c15ee01308519d2b5854f8b7b4f957cbd425cc3ba350a8aa8e4ad0
+EBUILD firejail-0.9.44.8.ebuild 1067 SHA256 ac87f0b122e42b4119d3739e23cf180091b0196f76ac65e9fb7116fdf569ca78 SHA512 1bc76ebac0d3f577f816ca12e63f147e91669f0687c9b2555bae500d107aa71f14ef7d3cc0156a57a66ca67444d8e5b537dd0e83cec2959727fbadc9be206404 WHIRLPOOL f078439171b46765a781c81cf11996492579d1e48865deb6cf543e6e8855533d6023f920c879aa95aeecde9a4002a5a8a9681d90389a1e94bd437c30705e034d
+EBUILD firejail-0.9.46.ebuild 1167 SHA256 7e2561bb148174efc5e2d1c85964e74fd811bd560f2f761fe2ee26fba89b434a SHA512 d1e8dbf1929a17f297cb6b940d9c4c8fbc9c16218ecc1347969059c861a65299919788509720555ff1a76257028d77dc9e0c7dc3f93e013668e7ab95add40f9d WHIRLPOOL 841baf7f85d49e30a1a10696217a67c766ef25c1362885f8c8df5b6b4a8fa8e8b394507dd88331c7257df201e249a595f34a8f42d53a682c5741637246cad8d3
+EBUILD firejail-0.9.48.ebuild 1167 SHA256 7e2561bb148174efc5e2d1c85964e74fd811bd560f2f761fe2ee26fba89b434a SHA512 d1e8dbf1929a17f297cb6b940d9c4c8fbc9c16218ecc1347969059c861a65299919788509720555ff1a76257028d77dc9e0c7dc3f93e013668e7ab95add40f9d WHIRLPOOL 841baf7f85d49e30a1a10696217a67c766ef25c1362885f8c8df5b6b4a8fa8e8b394507dd88331c7257df201e249a595f34a8f42d53a682c5741637246cad8d3
+EBUILD firejail-0.9.50.ebuild 1167 SHA256 7e2561bb148174efc5e2d1c85964e74fd811bd560f2f761fe2ee26fba89b434a SHA512 d1e8dbf1929a17f297cb6b940d9c4c8fbc9c16218ecc1347969059c861a65299919788509720555ff1a76257028d77dc9e0c7dc3f93e013668e7ab95add40f9d WHIRLPOOL 841baf7f85d49e30a1a10696217a67c766ef25c1362885f8c8df5b6b4a8fa8e8b394507dd88331c7257df201e249a595f34a8f42d53a682c5741637246cad8d3
+MISC ChangeLog 8182 SHA256 6b73b0316c135fceca569336c4cb24c457b9c6e4b9a5cf54445f0af99adb8521 SHA512 bf4711d9273dbc894a7884c1a6bd6d434109bd1efd9df0d41c55dbff0b1603feabff07bb1fb19883b2e205256cf9b8f32bb46b5e271980335513afe09c29f4da WHIRLPOOL 7efe16bcde43b056689294752e9bce9c9384cef7b1dd3fea23c0d14ead695979d956c5c91c6d7af16532d198e282124d2fe7a2a64054042f756969c902810eb2
+MISC metadata.xml 1627 SHA256 5105e917e9bb184dbde51a84adacee6d46eed2e8c88159f9113fa3b266e803f6 SHA512 081d4f02dafd4c82aca839117c52b744ba50d3816b2ee01916c8f5fe60ae914717c7d3a36cdd0d064f3bc2ae1d4a7fa75e946536fce509c6aac37c84832ef946 WHIRLPOOL 1882be7d6816578d16a0af79483091165cd0f78abbe13f58a3a5b7dbbf1b85dadbaacfc0bba5f9a697e455bfde462c8a87093ee22b5c5412471781b9a41e725d
diff --git a/sys-apps/firejail/files/0.9.46-contrib-fix.patch b/sys-apps/firejail/files/0.9.46-contrib-fix.patch
new file mode 100644
index 000000000000..fc882b4dc6e6
--- /dev/null
+++ b/sys-apps/firejail/files/0.9.46-contrib-fix.patch
@@ -0,0 +1,57 @@
+diff -Naur firejail-0.9.46/contrib/fix_private-bin.py firejail-0.9.46.new/contrib/fix_private-bin.py
+--- firejail-0.9.46/contrib/fix_private-bin.py 2017-05-13 14:44:54.000000000 +0100
++++ firejail-0.9.46.new/contrib/fix_private-bin.py 2017-05-29 15:25:56.355489307 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+
+ __author__ = "KOLANICH"
+ __copyright__ = """This is free and unencumbered software released into the public domain.
+diff -Naur firejail-0.9.46/contrib/fjclip.py firejail-0.9.46.new/contrib/fjclip.py
+--- firejail-0.9.46/contrib/fjclip.py 2017-05-13 14:44:54.000000000 +0100
++++ firejail-0.9.46.new/contrib/fjclip.py 2017-05-29 15:25:39.463236203 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+@@ -32,4 +32,4 @@
+ else:
+ display = fjdisplay.getdisplay(sys.argv[2])
+ clipout = subprocess.Popen(['xsel','-b','-i','--display',display],stdin=subprocess.PIPE)
+- clipout.communicate(clipin)
+\ Brak znaku nowej linii na końcu pliku
++ clipout.communicate(clipin)
+diff -Naur firejail-0.9.46/contrib/fjdisplay.py firejail-0.9.46.new/contrib/fjdisplay.py
+--- firejail-0.9.46/contrib/fjdisplay.py 2017-05-13 14:44:54.000000000 +0100
++++ firejail-0.9.46.new/contrib/fjdisplay.py 2017-05-29 15:25:47.191351983 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+@@ -40,4 +40,4 @@
+ if len(sys.argv) == 1:
+ print(getfirejails())
+ if len(sys.argv) == 2:
+- print (getdisplay(sys.argv[1]))
+\ Brak znaku nowej linii na końcu pliku
++ print (getdisplay(sys.argv[1]))
+diff -Naur firejail-0.9.46/contrib/fjresize.py firejail-0.9.46.new/contrib/fjresize.py
+--- firejail-0.9.46/contrib/fjresize.py 2017-05-13 14:44:54.000000000 +0100
++++ firejail-0.9.46.new/contrib/fjresize.py 2017-05-29 15:26:03.728599816 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import sys
+ import fjdisplay
+@@ -22,4 +22,4 @@
+ out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1]),'--output','default','--mode',sys.argv[2]])
+ print(out)
+ else:
+- print(usage)
+\ Brak znaku nowej linii na końcu pliku
++ print(usage)
diff --git a/sys-apps/firejail/files/0.9.48-contrib-fix.patch b/sys-apps/firejail/files/0.9.48-contrib-fix.patch
new file mode 100644
index 000000000000..7192bba34807
--- /dev/null
+++ b/sys-apps/firejail/files/0.9.48-contrib-fix.patch
@@ -0,0 +1,36 @@
+diff -Naur firejail-0.9.48/contrib/fix_private-bin.py firejail-0.9.48.new/contrib/fix_private-bin.py
+--- firejail-0.9.48/contrib/fix_private-bin.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fix_private-bin.py 2017-08-27 23:19:52.868481040 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+
+ __author__ = "KOLANICH"
+ __copyright__ = """This is free and unencumbered software released into the public domain.
+diff -Naur firejail-0.9.48/contrib/fjclip.py firejail-0.9.48.new/contrib/fjclip.py
+--- firejail-0.9.48/contrib/fjclip.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjclip.py 2017-08-27 23:19:58.476562539 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+diff -Naur firejail-0.9.48/contrib/fjdisplay.py firejail-0.9.48.new/contrib/fjdisplay.py
+--- firejail-0.9.48/contrib/fjdisplay.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjdisplay.py 2017-08-27 23:20:01.932612762 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+diff -Naur firejail-0.9.48/contrib/fjresize.py firejail-0.9.48.new/contrib/fjresize.py
+--- firejail-0.9.48/contrib/fjresize.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjresize.py 2017-08-27 23:20:06.932685422 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import sys
+ import fjdisplay
diff --git a/sys-apps/firejail/files/0.9.50-contrib-fix.patch b/sys-apps/firejail/files/0.9.50-contrib-fix.patch
new file mode 100644
index 000000000000..7192bba34807
--- /dev/null
+++ b/sys-apps/firejail/files/0.9.50-contrib-fix.patch
@@ -0,0 +1,36 @@
+diff -Naur firejail-0.9.48/contrib/fix_private-bin.py firejail-0.9.48.new/contrib/fix_private-bin.py
+--- firejail-0.9.48/contrib/fix_private-bin.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fix_private-bin.py 2017-08-27 23:19:52.868481040 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+
+ __author__ = "KOLANICH"
+ __copyright__ = """This is free and unencumbered software released into the public domain.
+diff -Naur firejail-0.9.48/contrib/fjclip.py firejail-0.9.48.new/contrib/fjclip.py
+--- firejail-0.9.48/contrib/fjclip.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjclip.py 2017-08-27 23:19:58.476562539 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+diff -Naur firejail-0.9.48/contrib/fjdisplay.py firejail-0.9.48.new/contrib/fjdisplay.py
+--- firejail-0.9.48/contrib/fjdisplay.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjdisplay.py 2017-08-27 23:20:01.932612762 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import re
+ import sys
+diff -Naur firejail-0.9.48/contrib/fjresize.py firejail-0.9.48.new/contrib/fjresize.py
+--- firejail-0.9.48/contrib/fjresize.py 2017-05-24 23:01:32.000000000 +0100
++++ firejail-0.9.48.new/contrib/fjresize.py 2017-08-27 23:20:06.932685422 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import sys
+ import fjdisplay
diff --git a/sys-apps/firejail/firejail-0.9.44.10.ebuild b/sys-apps/firejail/firejail-0.9.44.10.ebuild
new file mode 100644
index 000000000000..d0e5f64691c2
--- /dev/null
+++ b/sys-apps/firejail/firejail-0.9.44.10.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor +bind +chroot +file-transfer +network
+ network-restricted +seccomp +userns x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )"
+RDEPEND="${DEPEND}
+ x11? ( x11-wm/xpra[client,server] )"
+
+RESTRICT=test
+
+src_prepare() {
+ default
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable apparmor)
+ $(use_enable bind)
+ $(use_enable chroot)
+ $(use_enable file-transfer)
+ $(use_enable network)
+ $(use_enable seccomp)
+ $(use_enable userns)
+ $(use_enable x11)
+ )
+ use network-restricted && myeconfargs+=( --enable-network=restricted )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/firejail/firejail-0.9.44.8.ebuild b/sys-apps/firejail/firejail-0.9.44.8.ebuild
new file mode 100644
index 000000000000..6852bac413cc
--- /dev/null
+++ b/sys-apps/firejail/firejail-0.9.44.8.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="apparmor +bind +chroot +file-transfer +network
+ network-restricted +seccomp +userns x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )"
+RDEPEND="${DEPEND}
+ x11? ( x11-wm/xpra[client,server] )"
+
+RESTRICT=test
+
+src_prepare() {
+ default
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable apparmor)
+ $(use_enable bind)
+ $(use_enable chroot)
+ $(use_enable file-transfer)
+ $(use_enable network)
+ $(use_enable seccomp)
+ $(use_enable userns)
+ $(use_enable x11)
+ )
+ use network-restricted && myeconfargs+=( --enable-network=restricted )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/firejail/firejail-0.9.46.ebuild b/sys-apps/firejail/firejail-0.9.46.ebuild
new file mode 100644
index 000000000000..e1943e7842a7
--- /dev/null
+++ b/sys-apps/firejail/firejail-0.9.46.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor +bind +chroot contrib +file-transfer +network
+ network-restricted +seccomp +userns x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )"
+RDEPEND="${DEPEND}
+ x11? ( x11-wm/xpra[client,server] )"
+
+PATCHES=( "${FILESDIR}/${PV}-contrib-fix.patch" )
+
+RESTRICT=test
+
+src_prepare() {
+ default
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable apparmor)
+ $(use_enable bind)
+ $(use_enable chroot)
+ $(use_enable contrib contrib-install)
+ $(use_enable file-transfer)
+ $(use_enable network)
+ $(use_enable seccomp)
+ $(use_enable userns)
+ $(use_enable x11)
+ )
+ use network-restricted && myeconfargs+=( --enable-network=restricted )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/firejail/firejail-0.9.48.ebuild b/sys-apps/firejail/firejail-0.9.48.ebuild
new file mode 100644
index 000000000000..e1943e7842a7
--- /dev/null
+++ b/sys-apps/firejail/firejail-0.9.48.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor +bind +chroot contrib +file-transfer +network
+ network-restricted +seccomp +userns x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )"
+RDEPEND="${DEPEND}
+ x11? ( x11-wm/xpra[client,server] )"
+
+PATCHES=( "${FILESDIR}/${PV}-contrib-fix.patch" )
+
+RESTRICT=test
+
+src_prepare() {
+ default
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable apparmor)
+ $(use_enable bind)
+ $(use_enable chroot)
+ $(use_enable contrib contrib-install)
+ $(use_enable file-transfer)
+ $(use_enable network)
+ $(use_enable seccomp)
+ $(use_enable userns)
+ $(use_enable x11)
+ )
+ use network-restricted && myeconfargs+=( --enable-network=restricted )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/firejail/firejail-0.9.50.ebuild b/sys-apps/firejail/firejail-0.9.50.ebuild
new file mode 100644
index 000000000000..e1943e7842a7
--- /dev/null
+++ b/sys-apps/firejail/firejail-0.9.50.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="apparmor +bind +chroot contrib +file-transfer +network
+ network-restricted +seccomp +userns x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )"
+RDEPEND="${DEPEND}
+ x11? ( x11-wm/xpra[client,server] )"
+
+PATCHES=( "${FILESDIR}/${PV}-contrib-fix.patch" )
+
+RESTRICT=test
+
+src_prepare() {
+ default
+ find -name Makefile.in -exec sed -i -r \
+ -e '/^\tinstall .*COPYING /d' \
+ -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
+ -e '1iCC=@CC@' {} + || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable apparmor)
+ $(use_enable bind)
+ $(use_enable chroot)
+ $(use_enable contrib contrib-install)
+ $(use_enable file-transfer)
+ $(use_enable network)
+ $(use_enable seccomp)
+ $(use_enable userns)
+ $(use_enable x11)
+ )
+ use network-restricted && myeconfargs+=( --enable-network=restricted )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/firejail/metadata.xml b/sys-apps/firejail/metadata.xml
new file mode 100644
index 000000000000..395160fe3935
--- /dev/null
+++ b/sys-apps/firejail/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aidecoe@gentoo.org</email>
+ <name>Amadeusz Żołnowski</name>
+ </maintainer>
+ <longdescription lang="en">
+ Firejail is a SUID program that reduces the risk of security breaches
+ by restricting the running environment of untrusted applications using
+ Linux namespaces and seccomp-bpf. It allows a process and all its
+ descendants to have their own private view of the globally shared
+ kernel resources, such as the network stack, process table, mount
+ table.
+
+ This is bleeding edge branch. For long term support version see
+ sys-apps/firejail-lts.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">firejail</remote-id>
+ </upstream>
+ <use>
+ <flag name="apparmor">Enable support for custom AppArmor
+ profiles</flag>
+ <flag name="bind">Enable custom bind mounts</flag>
+ <flag name="chroot">Enable chrooting to custom directory</flag>
+ <flag name="contrib">Install contrib scripts</flag>
+ <flag name="file-transfer">Enable file transfers between sandboxes and
+ the host system</flag>
+ <flag name="network">Enable networking features</flag>
+ <flag name="network-restricted">Grant access to --interface,
+ --net=ethXXX and --netfilter only to root user; regular users are
+ only allowed --net=none</flag>
+ <flag name="seccomp">Enable system call filtering</flag>
+ <flag name="userns">Enable attaching a new user namespace to a
+ sandbox (--noroot option)</flag>
+ <flag name="x11">Enable X11 sandboxing</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/fix-gnustack/Manifest b/sys-apps/fix-gnustack/Manifest
new file mode 100644
index 000000000000..41ef06ea598c
--- /dev/null
+++ b/sys-apps/fix-gnustack/Manifest
@@ -0,0 +1,4 @@
+DIST fix-gnustack-0.1.tar.bz2 105457 SHA256 e8f089f6390b2766e79493ab10550c021151c6079f11e882c9e470a4beccad3a SHA512 df83beef5533003ceedda799bb27af15f877d2b3bc7c8213b2ac64a100270790655de3836eaa0ab8411d9eb91a6056e4902973b740b9b0791dcc5477226544a1 WHIRLPOOL 85c313450f9375ccda53a2a5b3912adb75a098484c52fcbe36d1ada71eddd0b3fa880bc4b455c3ffc90867ee90855884ffbc0365d7abb2132a8156223d817bc6
+EBUILD fix-gnustack-0.1.ebuild 440 SHA256 490487a30fdd93f67ee626b022efc4eb5024bb509cca8baf6d81bc4babc8fac7 SHA512 5b132a4464561504187ced8adc27ab9d9afaba5002b03bd6ea7083c004ee3ec794904418150d2f9e033142d4317d59f87163c7ab1b40a9f154d0eb9056931544 WHIRLPOOL f5edcbca367eba6d5ce768d4698512d008e421857906c2d93258e0c4e8d3d3d7465d6a99cac378608b6c0f462688ae1e3f0dc14d128769d45939f706b2a5a233
+MISC ChangeLog 367 SHA256 8e39b7a4e2fad1261f22022135794b7a4ef9d0b4c0ee6602d177d842f9554b2a SHA512 a2ab0c7607b7f0c40f438d00fa370878758b9fb7523c9f95d28f813a892691876a61e17a7020dff72cccb6400203d1e07f18dfc716bbfa94a51021c964fdf5c4 WHIRLPOOL cc9194688c86c8f8b1de528b82ece44b8450326cd51f7ee0a741ce03a3828c76d3df7cd142088339f290caac4dedd795c8a673a2715f817084f556be1e2c3b97
+MISC metadata.xml 330 SHA256 72f3486637246a46a7188e21b3a87f65a471d4cf8d37f1e0bdc9a75a015c56bd SHA512 6bca1bac9701b2dde509f25dd18dd819d769cda23669faf680800747a37369002eb3954606fc6541dec324473eb13a78bc0c8a97085436072ee076d85e7a2345 WHIRLPOOL 40c6b51f40a6d8b6b201620dc1dd72b74855f4c1ef63705c1be38e4c06778a2798df9c579a9e59f38355e46d7217dc22c2669d895d676ff707b34a8fde2c8288
diff --git a/sys-apps/fix-gnustack/fix-gnustack-0.1.ebuild b/sys-apps/fix-gnustack/fix-gnustack-0.1.ebuild
new file mode 100644
index 000000000000..ab3b556fe2a1
--- /dev/null
+++ b/sys-apps/fix-gnustack/fix-gnustack-0.1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Utility to report and remove the executable flag from an ELF object's GNU_STACK"
+HOMEPAGE="https://dev.gentoo.org/~blueness/${PN}"
+SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${P}.tar.bz2"
+LICENSE="GPL-3"
+
+DEPEND="dev-libs/elfutils"
+RDEPEND="${DEPEND}"
+
+KEYWORDS="amd64 ~x86"
+SLOT="0"
+
+S="${WORKDIR}/${PN}"
diff --git a/sys-apps/fix-gnustack/metadata.xml b/sys-apps/fix-gnustack/metadata.xml
new file mode 100644
index 000000000000..62a593741836
--- /dev/null
+++ b/sys-apps/fix-gnustack/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 type="person">
+ <email>blueness@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/flashrom/Manifest b/sys-apps/flashrom/Manifest
new file mode 100644
index 000000000000..f9bc94d1a88b
--- /dev/null
+++ b/sys-apps/flashrom/Manifest
@@ -0,0 +1,12 @@
+DIST flashrom-0.9.6.1.tar.bz2 368133 SHA256 6f7b588cce74c90b4fe9c9c794de105de76e0323442fb5770b1aeab81e9d560a SHA512 335243ca869a49521b6404004496cdba16f11da4f5321bbc8786635bbc7a0fe7215de2015d67200da68d398ed270d9a2ad9308ca9f762790e39b9f0602e53529 WHIRLPOOL f55f53cc6f06b627d8561e369bca32f1b62dc8de9a35963c01575b31f3190cf1be3b7114db8552b7f9f87c971960f1d16fe284d44e8d2db3da2996431d08598c
+DIST flashrom-0.9.7.tar.bz2 408883 SHA256 5a55212d00791981a9a1cb0cdca9d9e58bea6d399864251e7b410b4d3d6137e9 SHA512 a226c1ac3f9c7822b74ca14b7f9b53013110b2cdb66b1f936593c693ee54f19d643cc3a97a9635c05f2c959aca817668006f609ddb503a84d0bf5d510065674e WHIRLPOOL 97472148f97b86dc3b6661fe0368f492584308a8e86f2376bd3eb6e285a02dfcf231f2d917f30a734e90fbc9baf3899329c04ea245048d647077c50646ecd17d
+DIST flashrom-0.9.8.tar.bz2 473902 SHA256 13dc7c895e583111ecca370363a3527d237d178a134a94b20db7df177c05f934 SHA512 1a1c4513bac7cdf91326ab68b822034101e688bfab0dc0b5698f664fc766027229128c55eed94f302cac05d949647cdec6a103a423c3861b047cf0ff7cc0b509 WHIRLPOOL 61381faeff133065c195e37d9cf9eced6f5ff4c3dc6103abcca8186d11de9e1523e4fcfd173f34dfa44c78ad731db25a771d670bf5cd808f00ed5e80697c5c35
+DIST flashrom-0.9.9.tar.bz2 495199 SHA256 cb3156b0f63eb192024b76c0814135930297aac41f80761a5d293de769783c45 SHA512 155445ce7acab97f91596aad704aa2211da1c3f71fb463fc65c621dfea41e44b5de7db801c5b5cfc37450e8a8cfed5b202553715d999710422c830a0c38ae153 WHIRLPOOL aa7de16e247d704e7a1266fab088f78817d8fe866a0e4279a501d37b777b669d9a9c5aa96283db1e4e943659b3820aba0abb4a2c9f7283afe965df51b4c6541a
+EBUILD flashrom-0.9.6.1.ebuild 2700 SHA256 f960d28e09ec861b75e6428fdf71297d176e70eea1f72a8586e70b3e2e6dc451 SHA512 a55401031f53b030f7615a45c7f7f0785ac86066da8c37f3c783d18924575a034adaf97c4a133aaa8b5feade2a7a3064d6ae356a2ed1db814182e2520e55867c WHIRLPOOL b3f617521f1908e8850a98f9d93aa35296532a0258dbb154770ca8a5f3efa6676ca8b2456d6c41d4f358f2f072420c0e2f6aeaabed89f2a4750fa3a76f78d093
+EBUILD flashrom-0.9.7.ebuild 3398 SHA256 5f7a50637b464b562bd084d9863f1eb58044cef6089318dcc923851100c77d5d SHA512 25449b059d89f6d83983b52910d697e84b1ae98e5d28ceedef2f8479fc0998215fd5daa24b3e3ed324a1e909a4b07eff304ce012ae64a364905713ad18a936f2 WHIRLPOOL f0a044d3c4ec2f9017fb6f03b5f54aacc71d3197575efde9e984de668f00ff124ba16843728bcb453cb282c9d663e6793fd173789eb369db5bd9f9f15ec40d20
+EBUILD flashrom-0.9.8.ebuild 4133 SHA256 01b0b38f80f98413d42dde209fe431202bfa8bb644d99d217bf59d6a84a9245d SHA512 b69d08a6187c4ba726315cf6a079af038c0593a705e0259f7fee6ee4f24acf5f89cb90b7969c1711fc6846532f455981a1fd26eec9754d0f72a0c9fdfc8f6737 WHIRLPOOL 90bdaf2cc3f547edb114c5aeca489cd38b37bdef86178b2a1d470fdc79906de0c13bac1579c6f59cb234e6fe113b28c71c156a0fef6155e2607ce47da3724b55
+EBUILD flashrom-0.9.9.ebuild 4251 SHA256 140edc6b11a99f709afb91de0bfd6597e9d2eb9e851dcb6a0499a6df7588fda8 SHA512 c28cefdf53221056fd8cb389d9757c009fda6ed78d06b116afac263601cd6a54f7b2a35c59faa342b3418ef588c8a1dd108ee84a0327596994cd86adc0d7f9f1 WHIRLPOOL b70f55198b8dc5bedda3ba48c1c1254da4082bda535606b313e7283874e32424b9aefc65fdac228e9934b42a82cdf6b6a682e6d650e03110b3eb2ef13efc8dad
+EBUILD flashrom-9999.ebuild 4251 SHA256 140edc6b11a99f709afb91de0bfd6597e9d2eb9e851dcb6a0499a6df7588fda8 SHA512 c28cefdf53221056fd8cb389d9757c009fda6ed78d06b116afac263601cd6a54f7b2a35c59faa342b3418ef588c8a1dd108ee84a0327596994cd86adc0d7f9f1 WHIRLPOOL b70f55198b8dc5bedda3ba48c1c1254da4082bda535606b313e7283874e32424b9aefc65fdac228e9934b42a82cdf6b6a682e6d650e03110b3eb2ef13efc8dad
+MISC ChangeLog 3485 SHA256 e8f257ade4a60ce652f1913b3a8340bca08bb1fc0a74408146662e2a81e67963 SHA512 71f3cd918a6881c14e1f003a98928d7b7044d102702a44675d1cbad50d6f01cb5fd603bff2db2dfe21db28150754737a96d25c129c4e2d00626c458e07b4388a WHIRLPOOL 75c999f1ed67cbb8d7436fe1d47da93c3afb041574cc9531934cb8f8367a3700c459adaa4594481324621625d37c68a58952df7a2555f1c9a00b4037ec695056
+MISC ChangeLog-2015 6912 SHA256 ac83c9389a99e8c7cfb610b23c9a1f65292bf05d7d4d9867e0af4004e35731c7 SHA512 31f1ad9adf2876cd6cdcd3140e9f5bbafef4a786404effde764561a8c5ec9ebac86328f987bb54cf200be942bb1ef41fb357fe7e3f73a407c61cad48c94d2429 WHIRLPOOL b628374223c84ee612bc6eee3c3eb3c1b3c67493bc735f62991c8144be4e4dbf738ab3ba536df226fcc89d91906935e062de798c9a93dc3fdf6851ed5d14482f
+MISC metadata.xml 4551 SHA256 80cb1353b2d1c8c89e85908245a11cb7f192538bd3f796d7beff12c13c2e1335 SHA512 2224358689218526fdaef78fc0316f7449a2914302a68c8af83c18b6df7783fcbc1ab38c239c9b358210a56b44b3cba11a2b90cf10bee16d987cf64a93277549 WHIRLPOOL a64ad4848e3803c5678f1448fa0f88f8311a308abe6b490dc40085b09e688f2ede8b14fde72fbb8e189066c31c2e6534e2188cfab944d79b0e052001114a4f4c
diff --git a/sys-apps/flashrom/flashrom-0.9.6.1.ebuild b/sys-apps/flashrom/flashrom-0.9.6.1.ebuild
new file mode 100644
index 000000000000..df3b6c22ee50
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-0.9.6.1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://code.coreboot.org/svn/flashrom/trunk"
+ inherit subversion
+else
+ SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
+ KEYWORDS="amd64 arm x86"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="http://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atahpt +bitbang_spi +buspirate_spi +dediprog doc +drkaiser
++dummy ft2232_spi +gfxnvidia +internal +nic3com +nicintel +nicintel_spi
+nicnatsemi nicrealtek +ogp_spi rayer_spi
++pony_spi +satasii satamv +serprog +wiki"
+
+COMMON_DEPEND="atahpt? ( sys-apps/pciutils )
+ dediprog? ( virtual/libusb:0 )
+ drkaiser? ( sys-apps/pciutils )
+ ft2232_spi? ( dev-embedded/libftdi:0 )
+ gfxnvidia? ( sys-apps/pciutils )
+ internal? ( sys-apps/pciutils )
+ nic3com? ( sys-apps/pciutils )
+ nicintel? ( sys-apps/pciutils )
+ nicintel_spi? ( sys-apps/pciutils )
+ nicnatsemi? ( sys-apps/pciutils )
+ nicrealtek? ( sys-apps/pciutils )
+ rayer_spi? ( sys-apps/pciutils )
+ satasii? ( sys-apps/pciutils )
+ satamv? ( sys-apps/pciutils )
+ ogp_spi? ( sys-apps/pciutils )"
+RDEPEND="${COMMON_DEPEND}
+ internal? ( sys-apps/dmidecode )"
+DEPEND="${COMMON_DEPEND}
+ sys-apps/diffutils"
+
+_flashrom_enable() {
+ local c="CONFIG_${2:-$(echo $1 | tr [:lower:] [:upper:])}"
+ args+=" $c=$(usex $1 yes no)"
+}
+flashrom_enable() {
+ local u
+ for u in "$@" ; do _flashrom_enable $u ; done
+}
+
+src_compile() {
+ local progs=0
+ local args=""
+
+ # Programmer
+ flashrom_enable \
+ atahpt bitbang_spi buspirate_spi dediprog drkaiser \
+ ft2232_spi gfxnvidia nic3com nicintel nicintel_spi nicnatsemi nicrealtek \
+ ogp_spi rayer_spi pony_spi \
+ satasii satamv serprog \
+ internal dummy
+ _flashrom_enable wiki PRINT_WIKI
+
+ # You have to specify at least one programmer, and if you specify more than
+ # one programmer you have to include either dummy or internal in the list.
+ for prog in ${IUSE//[+-]} ; do
+ case ${prog} in
+ internal|dummy|wiki) continue ;;
+ esac
+
+ use ${prog} && : $(( progs++ ))
+ done
+ if [ $progs -ne 1 ] ; then
+ if ! use internal && ! use dummy ; then
+ ewarn "You have to specify at least one programmer, and if you specify"
+ ewarn "more than one programmer, you have to enable either dummy or"
+ ewarn "internal as well. 'internal' will be the default now."
+ args+=" CONFIG_INTERNAL=yes"
+ fi
+ fi
+
+ # WARNERROR=no, bug 347879
+ tc-export AR CC RANLIB
+ emake WARNERROR=no ${args} || die
+}
+
+src_install() {
+ dosbin flashrom || die
+ doman flashrom.8
+ dodoc ChangeLog README
+
+ if use doc; then
+ dodoc Documentation/*.txt
+ fi
+}
diff --git a/sys-apps/flashrom/flashrom-0.9.7.ebuild b/sys-apps/flashrom/flashrom-0.9.7.ebuild
new file mode 100644
index 000000000000..111a7ba871d3
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-0.9.7.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://code.coreboot.org/svn/flashrom/trunk"
+ inherit subversion
+else
+ SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
+ KEYWORDS="amd64 arm ~mips x86"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="http://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atahpt +bitbang_spi +buspirate_spi +dediprog +drkaiser
++dummy ft2232_spi +gfxnvidia +internal +linux_spi +nic3com +nicintel
++nicintel_spi nicnatsemi nicrealtek +ogp_spi rayer_spi
++pony_spi +satasii satamv +serprog static tools usbblaster +wiki"
+
+LIB_DEPEND="atahpt? ( sys-apps/pciutils[static-libs(+)] )
+ dediprog? ( virtual/libusb:0[static-libs(+)] )
+ drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+ ft2232_spi? ( dev-embedded/libftdi:0[static-libs(+)] )
+ gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+ internal? ( sys-apps/pciutils[static-libs(+)] )
+ nic3com? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_spi? ( sys-apps/pciutils[static-libs(+)] )
+ nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+ nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+ rayer_spi? ( sys-apps/pciutils[static-libs(+)] )
+ satasii? ( sys-apps/pciutils[static-libs(+)] )
+ satamv? ( sys-apps/pciutils[static-libs(+)] )
+ usbblaster? ( dev-embedded/libftdi:0[static-libs(+)] )
+ ogp_spi? ( sys-apps/pciutils[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ sys-apps/diffutils"
+RDEPEND+=" internal? ( sys-apps/dmidecode )"
+
+_flashrom_enable() {
+ local c="CONFIG_${2:-$(echo $1 | tr [:lower:] [:upper:])}"
+ args+=" $c=$(usex $1 yes no)"
+}
+flashrom_enable() {
+ local u
+ for u in "$@" ; do _flashrom_enable $u ; done
+}
+
+src_compile() {
+ local progs=0
+ local args=""
+
+ # Programmer
+ flashrom_enable \
+ atahpt bitbang_spi buspirate_spi dediprog drkaiser \
+ ft2232_spi gfxnvidia linux_spi nic3com nicintel \
+ nicintel_spi nicnatsemi nicrealtek ogp_spi rayer_spi \
+ pony_spi satasii satamv serprog usbblaster \
+ internal dummy
+ _flashrom_enable wiki PRINT_WIKI
+ _flashrom_enable static STATIC
+
+ # You have to specify at least one programmer, and if you specify more than
+ # one programmer you have to include either dummy or internal in the list.
+ for prog in ${IUSE//[+-]} ; do
+ case ${prog} in
+ internal|dummy|wiki) continue ;;
+ esac
+
+ use ${prog} && : $(( progs++ ))
+ done
+ if [[ ${progs} -ne 1 ]] ; then
+ if ! use internal && ! use dummy ; then
+ ewarn "You have to specify at least one programmer, and if you specify"
+ ewarn "more than one programmer, you have to enable either dummy or"
+ ewarn "internal as well. 'internal' will be the default now."
+ args+=" CONFIG_INTERNAL=yes"
+ fi
+ fi
+
+ # WARNERROR=no, bug 347879
+ tc-export AR CC RANLIB
+ emake WARNERROR=no ${args}
+}
+
+src_test() {
+ if [[ -d tests ]] ; then
+ pushd tests >/dev/null
+ ./tests.py || die
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ dosbin flashrom
+ doman flashrom.8
+ dodoc ChangeLog README Documentation/*.txt
+
+ if use tools; then
+ if use amd64; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ elif use x86; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ fi
+ fi
+}
diff --git a/sys-apps/flashrom/flashrom-0.9.8.ebuild b/sys-apps/flashrom/flashrom-0.9.8.ebuild
new file mode 100644
index 000000000000..5ad355a65031
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-0.9.8.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://code.coreboot.org/svn/flashrom/trunk"
+ inherit subversion
+else
+ SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
+ KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ~ppc64 ~sparc x86"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="http://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+# The defaults match the upstream Makefile.
+# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
+# by some other spi programmers.
+IUSE_PROGRAMMERS="atahpt +atavia +buspirate_spi dediprog +drkaiser +dummy
++ft2232_spi +gfxnvidia +internal +it8212 +linux_spi mstarddc_spi +nic3com
++nicintel +nicintel_eeprom +nicintel_spi nicnatsemi +nicrealtek +ogp_spi
++pickit2_spi +pony_spi +rayer_spi +satamv +satasii +serprog +usbblaster_spi"
+IUSE="${IUSE_PROGRAMMERS} +internal_dmi static tools +wiki"
+
+LIB_DEPEND="atahpt? ( sys-apps/pciutils[static-libs(+)] )
+ atavia? ( sys-apps/pciutils[static-libs(+)] )
+ dediprog? ( virtual/libusb:0[static-libs(+)] )
+ drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+ ft2232_spi? ( dev-embedded/libftdi:0[static-libs(+)] )
+ gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+ it8212? ( sys-apps/pciutils[static-libs(+)] )
+ internal? ( sys-apps/pciutils[static-libs(+)] )
+ nic3com? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_eeprom? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_spi? ( sys-apps/pciutils[static-libs(+)] )
+ nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+ nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+ ogp_spi? ( sys-apps/pciutils[static-libs(+)] )
+ pickit2_spi? ( virtual/libusb:0[static-libs(+)] )
+ rayer_spi? ( sys-apps/pciutils[static-libs(+)] )
+ satamv? ( sys-apps/pciutils[static-libs(+)] )
+ satasii? ( sys-apps/pciutils[static-libs(+)] )
+ usbblaster_spi? ( dev-embedded/libftdi:0[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ sys-apps/diffutils"
+RDEPEND+=" !internal_dmi? ( sys-apps/dmidecode )"
+
+_flashrom_enable() {
+ local c="CONFIG_${2:-$(echo "$1" | tr [:lower:] [:upper:])}"
+ args+=( "${c}=$(usex $1 yes no)" )
+}
+flashrom_enable() {
+ local u
+ for u ; do _flashrom_enable "${u}" ; done
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ Makefile || die
+}
+
+src_compile() {
+ # Help keep things in sync.
+ local sprogs=$(echo $(
+ grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
+ sort -u | \
+ sed 's:^CONFIG_::' | \
+ tr '[:upper:]' '[:lower:]'))
+ local eprogs=$(echo ${IUSE_PROGRAMMERS//[+-]})
+ if [[ ${sprogs} != "${eprogs}" ]] ; then
+ eerror "The ebuild needs to be kept in sync."
+ eerror "IUSE set to: ${eprogs}"
+ eerror "flashrom.c : ${sprogs}"
+ die "sync IUSE to the list of source programmers"
+ fi
+
+ # Turn USE flags into CONFIG_xxx settings.
+ local args=()
+ flashrom_enable ${eprogs}
+ _flashrom_enable wiki PRINT_WIKI
+ _flashrom_enable static STATIC
+
+ # You have to specify at least one programmer, and if you specify more than
+ # one programmer you have to include either dummy or internal in the list.
+ # We pick dummy as the default because internal requires libpci.
+ if ! use internal && ! use dummy ; then
+ if [[ ${#args[@]} -ne 1 ]] ; then
+ ewarn "You have to specify at least one programmer, and if you specify"
+ ewarn "more than one programmer, you have to enable either dummy or"
+ ewarn "internal as well. 'dummy' will be the default now."
+ args+=( CONFIG_DUMMY=yes )
+ fi
+ fi
+
+ tc-export AR CC PKG_CONFIG RANLIB
+ emake WARNERROR=no "${args[@]}"
+}
+
+src_test() {
+ if [[ -d tests ]] ; then
+ pushd tests >/dev/null
+ ./tests.py || die
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ dosbin flashrom
+ doman flashrom.8
+ dodoc ChangeLog README Documentation/*.txt
+
+ if use tools ; then
+ if use amd64 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ elif use x86 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ fi
+ fi
+}
diff --git a/sys-apps/flashrom/flashrom-0.9.9.ebuild b/sys-apps/flashrom/flashrom-0.9.9.ebuild
new file mode 100644
index 000000000000..a552cb33f7fe
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-0.9.9.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://code.coreboot.org/svn/flashrom/trunk"
+ inherit subversion
+else
+ SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="http://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+# The defaults match the upstream Makefile.
+# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
+# by some other spi programmers.
+IUSE_PROGRAMMERS="
+atahpt +atapromise +atavia +buspirate_spi ch341a_spi dediprog +drkaiser +dummy
++ft2232_spi +gfxnvidia +internal +it8212 +linux_spi mstarddc_spi +nic3com
++nicintel +nicintel_eeprom +nicintel_spi nicnatsemi +nicrealtek +ogp_spi
++pickit2_spi +pony_spi +rayer_spi +satamv +satasii +serprog +usbblaster_spi"
+IUSE="${IUSE_PROGRAMMERS} +internal_dmi static tools +wiki"
+
+LIB_DEPEND="atahpt? ( sys-apps/pciutils[static-libs(+)] )
+ atapromise? ( sys-apps/pciutils[static-libs(+)] )
+ atavia? ( sys-apps/pciutils[static-libs(+)] )
+ ch341a_spi? ( virtual/libusb:0[static-libs(+)] )
+ dediprog? ( virtual/libusb:0[static-libs(+)] )
+ drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+ ft2232_spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+ gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+ it8212? ( sys-apps/pciutils[static-libs(+)] )
+ internal? ( sys-apps/pciutils[static-libs(+)] )
+ nic3com? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_eeprom? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_spi? ( sys-apps/pciutils[static-libs(+)] )
+ nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+ nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+ ogp_spi? ( sys-apps/pciutils[static-libs(+)] )
+ pickit2_spi? ( virtual/libusb:0[static-libs(+)] )
+ rayer_spi? ( sys-apps/pciutils[static-libs(+)] )
+ satamv? ( sys-apps/pciutils[static-libs(+)] )
+ satasii? ( sys-apps/pciutils[static-libs(+)] )
+ usbblaster_spi? ( dev-embedded/libftdi:=[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ sys-apps/diffutils"
+RDEPEND+=" !internal_dmi? ( sys-apps/dmidecode )"
+
+_flashrom_enable() {
+ local c="CONFIG_${2:-$(echo "$1" | tr [:lower:] [:upper:])}"
+ args+=( "${c}=$(usex $1 yes no)" )
+}
+flashrom_enable() {
+ local u
+ for u ; do _flashrom_enable "${u}" ; done
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ Makefile || die
+}
+
+src_compile() {
+ # Help keep things in sync.
+ local sprogs=$(echo $(
+ grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
+ sort -u | \
+ sed 's:^CONFIG_::' | \
+ tr '[:upper:]' '[:lower:]'))
+ local eprogs=$(echo ${IUSE_PROGRAMMERS//[+-]})
+ if [[ ${sprogs} != "${eprogs}" ]] ; then
+ eerror "The ebuild needs to be kept in sync."
+ eerror "IUSE set to: ${eprogs}"
+ eerror "flashrom.c : ${sprogs}"
+ die "sync IUSE to the list of source programmers"
+ fi
+
+ # Turn USE flags into CONFIG_xxx settings.
+ local args=()
+ flashrom_enable ${eprogs}
+ _flashrom_enable wiki PRINT_WIKI
+ _flashrom_enable static STATIC
+
+ # You have to specify at least one programmer, and if you specify more than
+ # one programmer you have to include either dummy or internal in the list.
+ # We pick dummy as the default because internal requires libpci.
+ if ! use internal && ! use dummy ; then
+ if [[ ${#args[@]} -ne 1 ]] ; then
+ ewarn "You have to specify at least one programmer, and if you specify"
+ ewarn "more than one programmer, you have to enable either dummy or"
+ ewarn "internal as well. 'dummy' will be the default now."
+ args+=( CONFIG_DUMMY=yes )
+ fi
+ fi
+
+ tc-export AR CC PKG_CONFIG RANLIB
+ emake WARNERROR=no "${args[@]}"
+}
+
+src_test() {
+ if [[ -d tests ]] ; then
+ pushd tests >/dev/null
+ ./tests.py || die
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ dosbin flashrom
+ doman flashrom.8
+ dodoc README Documentation/*.txt
+
+ if use tools ; then
+ if use amd64 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ elif use x86 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ fi
+ fi
+}
diff --git a/sys-apps/flashrom/flashrom-9999.ebuild b/sys-apps/flashrom/flashrom-9999.ebuild
new file mode 100644
index 000000000000..a552cb33f7fe
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-9999.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://code.coreboot.org/svn/flashrom/trunk"
+ inherit subversion
+else
+ SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="http://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+# The defaults match the upstream Makefile.
+# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
+# by some other spi programmers.
+IUSE_PROGRAMMERS="
+atahpt +atapromise +atavia +buspirate_spi ch341a_spi dediprog +drkaiser +dummy
++ft2232_spi +gfxnvidia +internal +it8212 +linux_spi mstarddc_spi +nic3com
++nicintel +nicintel_eeprom +nicintel_spi nicnatsemi +nicrealtek +ogp_spi
++pickit2_spi +pony_spi +rayer_spi +satamv +satasii +serprog +usbblaster_spi"
+IUSE="${IUSE_PROGRAMMERS} +internal_dmi static tools +wiki"
+
+LIB_DEPEND="atahpt? ( sys-apps/pciutils[static-libs(+)] )
+ atapromise? ( sys-apps/pciutils[static-libs(+)] )
+ atavia? ( sys-apps/pciutils[static-libs(+)] )
+ ch341a_spi? ( virtual/libusb:0[static-libs(+)] )
+ dediprog? ( virtual/libusb:0[static-libs(+)] )
+ drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+ ft2232_spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+ gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+ it8212? ( sys-apps/pciutils[static-libs(+)] )
+ internal? ( sys-apps/pciutils[static-libs(+)] )
+ nic3com? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_eeprom? ( sys-apps/pciutils[static-libs(+)] )
+ nicintel_spi? ( sys-apps/pciutils[static-libs(+)] )
+ nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+ nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+ ogp_spi? ( sys-apps/pciutils[static-libs(+)] )
+ pickit2_spi? ( virtual/libusb:0[static-libs(+)] )
+ rayer_spi? ( sys-apps/pciutils[static-libs(+)] )
+ satamv? ( sys-apps/pciutils[static-libs(+)] )
+ satasii? ( sys-apps/pciutils[static-libs(+)] )
+ usbblaster_spi? ( dev-embedded/libftdi:=[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ sys-apps/diffutils"
+RDEPEND+=" !internal_dmi? ( sys-apps/dmidecode )"
+
+_flashrom_enable() {
+ local c="CONFIG_${2:-$(echo "$1" | tr [:lower:] [:upper:])}"
+ args+=( "${c}=$(usex $1 yes no)" )
+}
+flashrom_enable() {
+ local u
+ for u ; do _flashrom_enable "${u}" ; done
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ Makefile || die
+}
+
+src_compile() {
+ # Help keep things in sync.
+ local sprogs=$(echo $(
+ grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
+ sort -u | \
+ sed 's:^CONFIG_::' | \
+ tr '[:upper:]' '[:lower:]'))
+ local eprogs=$(echo ${IUSE_PROGRAMMERS//[+-]})
+ if [[ ${sprogs} != "${eprogs}" ]] ; then
+ eerror "The ebuild needs to be kept in sync."
+ eerror "IUSE set to: ${eprogs}"
+ eerror "flashrom.c : ${sprogs}"
+ die "sync IUSE to the list of source programmers"
+ fi
+
+ # Turn USE flags into CONFIG_xxx settings.
+ local args=()
+ flashrom_enable ${eprogs}
+ _flashrom_enable wiki PRINT_WIKI
+ _flashrom_enable static STATIC
+
+ # You have to specify at least one programmer, and if you specify more than
+ # one programmer you have to include either dummy or internal in the list.
+ # We pick dummy as the default because internal requires libpci.
+ if ! use internal && ! use dummy ; then
+ if [[ ${#args[@]} -ne 1 ]] ; then
+ ewarn "You have to specify at least one programmer, and if you specify"
+ ewarn "more than one programmer, you have to enable either dummy or"
+ ewarn "internal as well. 'dummy' will be the default now."
+ args+=( CONFIG_DUMMY=yes )
+ fi
+ fi
+
+ tc-export AR CC PKG_CONFIG RANLIB
+ emake WARNERROR=no "${args[@]}"
+}
+
+src_test() {
+ if [[ -d tests ]] ; then
+ pushd tests >/dev/null
+ ./tests.py || die
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ dosbin flashrom
+ doman flashrom.8
+ dodoc README Documentation/*.txt
+
+ if use tools ; then
+ if use amd64 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ elif use x86 ; then
+ dosbin util/ich_descriptors_tool/ich_descriptors_tool
+ fi
+ fi
+}
diff --git a/sys-apps/flashrom/metadata.xml b/sys-apps/flashrom/metadata.xml
new file mode 100644
index 000000000000..fbc371b02ad6
--- /dev/null
+++ b/sys-apps/flashrom/metadata.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>peter@stuge.se</email>
+ <name>Peter Stuge</name>
+ <description>Please CC on all bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="atahpt">Highpoint (HPT) ATA/RAID controller support</flag>
+ <flag name="atapromise">Support for Promise PDC2026x (FastTrak/Ultra)</flag>
+ <flag name="atavia">Support for VIA VT6421A SATA controllers</flag>
+ <flag name="bitbang_spi">Bitbanging SPI infrastructure</flag>
+ <flag name="buspirate_spi">Enable Bus Pirate SPI programmer</flag>
+ <flag name="ch341a_spi">Enable WCH CH341A SPI programmer</flag>
+ <flag name="dediprog">Dediprog SF100 support</flag>
+ <flag name="drkaiser">Enable Dr. Kaiser programmer</flag>
+ <flag name="dummy">Enable dummy tracing</flag>
+ <flag name="ft2232_spi">Enable ftdi programmer, flashing through FTDI/SPI USB interface</flag>
+ <flag name="gfxnvidia">Enable NVIDIA programmer</flag>
+ <flag name="internal">Enable internal/onboard support</flag>
+ <flag name="internal_dmi">Enable internal DMI decoding rather than use <pkg>sys-apps/dmidecode</pkg></flag>
+ <flag name="it8212">Support for ITE IT8212F ATA/RAID controllers</flag>
+ <flag name="linux_spi">Enable support for Linux userspace spidev interface</flag>
+ <flag name="mstarddc_spi">Support for SPI flash ROMs accessible through DDC in MSTAR-equipped displays</flag>
+ <flag name="nic3com">Enable 3Com NIC programmer</flag>
+ <flag name="nicintel">Support for Intel NICs</flag>
+ <flag name="nicintel_eeprom">Support for EEPROMs on Intel Gigabit network cards</flag>
+ <flag name="nicintel_spi">Support for SPI on Intel NICs</flag>
+ <flag name="nicnatsemi">Support for National Semiconductor NICs</flag>
+ <flag name="nicrealtek">Support for Realtek NICs</flag>
+ <flag name="ogp_spi">Enable support for OGP (Open Graphics Project) SPI flashing</flag>
+ <flag name="pickit2_spi">SUpport for SPI flash ROMs accessible via Microchip PICkit2</flag>
+ <flag name="pony_spi">Enable support for SI-Prog like hardware by Lancos</flag>
+ <flag name="rayer_spi">RayeR SPIPGM hardware support</flag>
+ <flag name="satasii">Enable programmer for SiI SATA controllers</flag>
+ <flag name="satamv">Enable programmer for Marvell SATA controllers</flag>
+ <flag name="serprog">Enable Serial Flasher programmer</flag>
+ <flag name="tools">Install additional tools</flag>
+ <flag name="usbblaster">Enable support for Altera USB-Blaster dongles</flag>
+ <flag name="usbblaster_spi">Enable support for Altera USB-Blaster dongles</flag>
+ <flag name="wiki">Enable wiki informations, like supported devices etc.</flag>
+ </use>
+ <longdescription lang="en">
+flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various other programmer devices.
+
+ Supports more than 380 flash chips, 260 chipsets, 450 mainboards, 50 PCI devices, 12 USB devices and various parallel/serial port-based programmers.
+ Supports parallel, LPC, FWH and SPI flash interfaces and various chip packages (DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, TSOP40, TSOP48, BGA and more)
+ No physical access needed, root access is sufficient (not needed for some programmers).
+ No bootable floppy disk, bootable CD-ROM or other media needed.
+ No keyboard or monitor needed. Simply reflash remotely via SSH.
+ No instant reboot needed. Reflash your chip in a running system, verify it, be happy. The new firmware will be present next time you boot.
+ Crossflashing and hotflashing is possible as long as the flash chips are electrically and logically compatible (same protocol). Great for recovery.
+ Scriptability. Reflash a whole pool of identical machines at the same time from the command line. It is recommended to check flashrom output and error codes.
+ Speed. flashrom is often much faster than most vendor flash tools.
+ Portability. Supports DOS, Linux, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, Solaris, Mac OS X, and other Unix-like OSes. Partial Windows support is available (no internal programmer support at the moment, hence no "BIOS flashing").
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/flock/Manifest b/sys-apps/flock/Manifest
new file mode 100644
index 000000000000..f19637ea0272
--- /dev/null
+++ b/sys-apps/flock/Manifest
@@ -0,0 +1,5 @@
+DIST flock-2.19.tar.gz 5452 SHA256 9716618042a753cc4bd6e787d0886ea5fce8a167d5ce62421cee2c09ea86fbda SHA512 f6b3e88731e343a7845b5354668b24a6c0d4bbf75ba992f73cfdacb814ceb95088371a162935d41ca22fd648493a79f9b3dbfd045af497449fad7ea5c48be21f WHIRLPOOL 5cc9fabbfdc78b9b23c5b60e49d268a5cac392831a48ccad92652034ba5c9f34a5873cc93f293e0eb5c4f0ecdf5f559f72f72f3e8e7ea280e57ab707b7206c4d
+EBUILD flock-2.19.ebuild 421 SHA256 1507ad085c914351bdd59a87d2faebd8bfcfdafc9801e1381c28a19719cb4b3c SHA512 7bb57fe747aa1b9c981a29497a99e55e8274bcb40151dd46e6f3b59f4565ca61dfcd18d7b0fe66e3e9006d1f5ee200d84d2cf1dc7a241ca0d8d147e8799ca571 WHIRLPOOL baf4e1fbfff8aa25ac1b6782e4628fa7c4f4ede61d7ac5a1029222dd80cb208eb3f0c9e615d91b994c70440f672bfcda283e05689ab513c2352805b0ef3fbed3
+MISC ChangeLog 2419 SHA256 ae4bafd506bf9e81f5fede5ffe2f0a2ec8310dbb9da322270915af5a96dd5627 SHA512 92d94bd0141e40ddc6ed647ba4c5bcc012e16da86b60d7348cc227ac76c115a7acdc17083923ffbecb877bf4c6a56961bca6774dc9052c87dd2ac19242295d48 WHIRLPOOL 04f532dc78ae9cb534e1cb2af8b4b77244217e0373039b9284166eb9687283a8b61e1667e0cb4878787c6daa6f251a6330d3aa359a85040dca07f8294da635fc
+MISC ChangeLog-2015 424 SHA256 4ecae1a493aa731164b27aa257319c3bb88e6c5a503f16ce89708ab107f8d727 SHA512 eb1e8f6f8db22c1b1aa4553765ef13a65903f2463c6c2e6d4dffb82a0f7f80d575071925cc38cfd1200b88b1744211b83cc0a8467cf7c9f2661ecc872a794923 WHIRLPOOL 82cbdcfd12022ec77c978d434fbfb49e8cc6e69fe694a68cca2e03b9c74cba9776154c935b222131dba48634ddf8725144f753f90cdd80e749cbd08e8656d25e
+MISC metadata.xml 238 SHA256 501d93b0c41ed422505100f002758cd173cd9783ae7fbb53e2ec5f238c868340 SHA512 173efaa53a514acf1e2f0c6681c82a48ec16d505844f551d2cc823ee8685b27837c7461f7956c12182059ee7e83023e2f0bcd5d1afab74beeaf998487193656d WHIRLPOOL 4ca51d994f011a5e7e4939f02a54b5c2f9f3e526665893c9ac2876c9871b7dc80361393d41c5247b3a5520e82d31d0dd10da520e7715c94b806a94ce0fed2a5a
diff --git a/sys-apps/flock/flock-2.19.ebuild b/sys-apps/flock/flock-2.19.ebuild
new file mode 100644
index 000000000000..5330ca939ca5
--- /dev/null
+++ b/sys-apps/flock/flock-2.19.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit freebsd
+
+DESCRIPTION="Manage locks from shell scripts"
+HOMEPAGE="http://svnweb.freebsd.org/ports/head/sysutils/flock/"
+SRC_URI="http://www.zonov.org/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-freebsd/freebsd-mk-defs
+ virtual/pmake"
diff --git a/sys-apps/flock/metadata.xml b/sys-apps/flock/metadata.xml
new file mode 100644
index 000000000000..a00f3aeb1f81
--- /dev/null
+++ b/sys-apps/flock/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>bsd@gentoo.org</email>
+ <name>BSD Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/frandom/Manifest b/sys-apps/frandom/Manifest
new file mode 100644
index 000000000000..8af351267363
--- /dev/null
+++ b/sys-apps/frandom/Manifest
@@ -0,0 +1,4 @@
+DIST frandom-1.1.tar.gz 8146 SHA256 9ad27d13cb5087e4c061b03da46963d9581b26ed625e1dfe79982b07c9f42f97 SHA512 f64bd1bc1482d223f84f344554b04a4a413be32cf6c348e006b831e68eea0165f1231e194536bb6867450dfc901e80e765e71ba6369209ce579597ad1cdfdeaf WHIRLPOOL 9eb8226348627b2f2ab7d36fc8f240b8860e00446b1b12a96fee77a8d8d90b02f9c5f6621f539d000ef561d333a7adaf065930fe7858ce7af2b4fd8b90b036fa
+EBUILD frandom-1.1.ebuild 669 SHA256 95d511a4b7ccda7fe0bb03794589527c74bf954e481d0fa74de3ce2098d6f210 SHA512 a0358410b4d7d58df1d6fecb7bf628f17c3ec3acce8ff0e2b3de4f5f574addd39dbb573acaaeeef84809758f4a4695bfebc4f8112d759d8e496346527ae9d5d9 WHIRLPOOL b35b8c07e666ed8fd55a85544db5613f206bca2baa5f782da948782d7f7486008e1d6a6fc2d8d94d06018abba6c9109a34d3d49cbc6b609f26fb68d788c8f76b
+MISC ChangeLog 385 SHA256 23cf98e5e0d109de0284518005cb06bc9ae0103aa7c2125f71cedf997eccfd80 SHA512 f9a4b536bd0eaa27177f1b360c6335f96f45afedac76c4f053e419cff89cf437f4fe2e721a70f534a8c5bcbec4f17784d5cd1984de31232aa4a9659ac4ccbe5e WHIRLPOOL c4556260a1765e22adf7bc0fc95614fe92dbb2b2b3cc9468d0d85e368a1c3f8733bd35e90fa8d03b0ec43d8bf9dbab3fb073c327ccff3ffdca4a275b08ddbb86
+MISC metadata.xml 376 SHA256 843c28ef160551309631ad1afc4b1b5326e7c7e707ff3133034ec328fe5b2b67 SHA512 06dc6961f1801fc3b3445912f1bdfbafd16c7c58e681dc22d44e9e1a2e97b065633c67b716dc7d629157d2cbaf035b1ac1313a673e4d9f2aaddd3eadf4fba969 WHIRLPOOL 5a2fd906e228b1e05dd8876dac2865990f6dc740a960fd66076ba6fd5c3778cd82bb91d0a77e1aa5680c5b72a8e72879d57c3d10c39a59dac340306f66b0f6bf
diff --git a/sys-apps/frandom/frandom-1.1.ebuild b/sys-apps/frandom/frandom-1.1.ebuild
new file mode 100644
index 000000000000..50c0b257f584
--- /dev/null
+++ b/sys-apps/frandom/frandom-1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit linux-mod udev
+
+DESCRIPTION="Fast kernel-land pseudo-random number generator using the RC4 algorithm"
+HOMEPAGE="http://billauer.co.il/frandom.html"
+SRC_URI="mirror://sourceforge/project/frandom//${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="strip"
+
+BUILD_TARGETS="default"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="frandom(misc)"
+
+src_prepare() {
+ sed -i -e "s:\$(shell uname -r):${KV_FULL}:" "${S}"/Makefile || die "sed failed"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ udev_dorules "${S}"/10-${PN}.rules
+}
diff --git a/sys-apps/frandom/metadata.xml b/sys-apps/frandom/metadata.xml
new file mode 100644
index 000000000000..34ddd813ab98
--- /dev/null
+++ b/sys-apps/frandom/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 type="person">
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>maintainer</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">frandom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/fwcrv/Manifest b/sys-apps/fwcrv/Manifest
new file mode 100644
index 000000000000..3eb1ef26ccb2
--- /dev/null
+++ b/sys-apps/fwcrv/Manifest
@@ -0,0 +1,6 @@
+AUX fwcrv-0.1.0-endian.patch 1732 SHA256 43e33968ce17a60781d6f7e0dfc568f21024d82ce8d35fd0efcb4f66ca7348c2 SHA512 8340779195deadd122ae4998fa971d2b3edc5c150dda7681d07289d3b741dbb408eefc447532c2221e3487d7edfc6b27e7135977974273c4ea171a18914b072c WHIRLPOOL fbe59758cafe95c6d9090b99bf1420dca17d0db6e3248fac9396e592ed916ed4cd27cd39e4edd9fc43a4b62fd70b32182bcefad289f51e302e64617a2af4addc
+DIST fwcrv-0.1.0.tar.gz 76154 SHA256 f6585c20149c95a7ea7d3cef8ccf30fe2211ca3d892ce0b265ada4163b351a36 SHA512 875762b706effc9a149c1686fc51567bce845e1ea611faf1775c2d4ce87bba5257405b8c9953e042dcc485d9a203930f4dbe0df5f0a0e010bc65bceee9c0bee6 WHIRLPOOL 8745cf66bcdd97a365614497c830c96bb7b975cd71e0ef7b05b75fc4aaf1cd5f2f39b805756be37a1db5e18ba7f3c09c6566f0b3787c76014e0e2f2d4e9eefc0
+EBUILD fwcrv-0.1.0.ebuild 610 SHA256 5a148d7199b0e3869e129b85a9626a745e7aa5cdc19ac6a28c06f848be438463 SHA512 f27572788e4ed80e78a2dd4d942b0f84441b56494574eb5de9f32e370aa4fcd11bfe2656243cf9789d5080bb8c9466aec8c37f45e01127d7c435c966af710903 WHIRLPOOL 6ee9693c3874dfc5bb39e25208dbb565f3e6c2103f690da762cd0e2786981eff58d0565696e0309a9e66c3390036fc9cf7d04eeaba0de0186c10de962d26981f
+MISC ChangeLog 2953 SHA256 4a92f1b0bf4de84cc7c5e04b42ee40fd27b616b74d828fce2006c34f8e029ba6 SHA512 164aeb755126b1e8ce56bba4ac4b753820f147078a486358de38106bdc86381ce8065555bfda886549c0914416ce3953a93ddde5fbd9700780e70c2b0ef31ade WHIRLPOOL 8ea4994a182778dba2c43048efafbc21530ec2ed89bee6020b5db099cb3eca08d724f8c171b2b8db77ce4f9be526d7e5a57ef02a28110b98a1d45cd924ecf6ee
+MISC ChangeLog-2015 988 SHA256 32be233c308089fd468a0935d4a823a9cef19cf6251d3e91d8d02ba360dc9b81 SHA512 556e1113a47664377f8ef9087fee1bfd7c0de0546496824238781384d080e4242c6b4eb924ff826563426abd4cf88c0a5ef834f8c19dd6767d2119ff7a77036e WHIRLPOOL 4eddb132a1906a718d6584edba5680c8fbb47f94ded624e3c75e7e1babac3dafc68a033f828d806c8efe7be60407acd3467b63e370b71c0d34fcd06e480e63be
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/fwcrv/files/fwcrv-0.1.0-endian.patch b/sys-apps/fwcrv/files/fwcrv-0.1.0-endian.patch
new file mode 100644
index 000000000000..565a15736d9b
--- /dev/null
+++ b/sys-apps/fwcrv/files/fwcrv-0.1.0-endian.patch
@@ -0,0 +1,47 @@
+diff -ruN src/functions.c /tmp/src/functions.c
+--- src/functions.c 2002-11-14 23:46:11.000000000 +0100
++++ src.new/functions.c 2006-03-22 11:51:03.000000000 +0100
+@@ -59,7 +59,7 @@
+ byte ParseCommandLineOptions( int ArgCount, char *ArgValue[], byte *Mode, byte *ReadLength )
+ {
+ int i;
+- char *ArgString;
++ unsigned char *ArgString;
+ byte Node_ID;
+
+ Node_ID = 0; // Default Node_ID used is 0
+diff -ruN src/functions.h /tmp/src/functions.h
+--- src/functions.h 2001-06-21 01:11:43.000000000 +0200
++++ src.new/functions.h 2006-03-22 11:47:48.000000000 +0100
+@@ -16,18 +16,29 @@
+ * byte2 = bits 08-15 (on ix86, bits 16-23)
+ * byte3 = bits 00-07 (on ix86, bits 24-31)
+ * *****************************************************************************************************/
++
++#if __BYTE_ORDER == __BIG_ENDIAN
++
++#define QBYTE3( q ) ( (byte) ( q >> 24 ) )
++#define QBYTE2( q ) ( (byte) ( q >> 16 ) )
++#define QBYTE1( q ) ( (byte) ( q >> 8 ) )
++#define QBYTE0( q ) ( (byte) q )
++
++#else
++
+ #define QBYTE0( q ) ( (byte) ( q >> 24 ) )
+ #define QBYTE1( q ) ( (byte) ( q >> 16 ) )
+ #define QBYTE2( q ) ( (byte) ( q >> 8 ) )
+ #define QBYTE3( q ) ( (byte) q )
+
++#endif
++
+ /* Macro pour inverser les octets a l'interieur d'un quadlet */
+ #define QSWAP( q ) ( ( q << 24 ) & 0xFF000000 ) + \
+ ( ( q << 8 ) & 0x00FF0000 ) + \
+ ( ( q >> 8 ) & 0x0000FF00 ) + \
+ ( ( q >> 24 ) & 0x000000FF )
+
+-
+ /* ******************************************************************************************************
+ * ParseCommandLineOptions
+ * Initialisation of the different options passed as arguments on the command line
+
diff --git a/sys-apps/fwcrv/fwcrv-0.1.0.ebuild b/sys-apps/fwcrv/fwcrv-0.1.0.ebuild
new file mode 100644
index 000000000000..b37e8edb8dd9
--- /dev/null
+++ b/sys-apps/fwcrv/fwcrv-0.1.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="FireWire CSR Config ROM Viewer"
+HOMEPAGE="http://www.hugovil.com/en/fwcrv/"
+SRC_URI="http://www.hugovil.com/repository/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ~ppc"
+IUSE=""
+DEPEND="sys-libs/libraw1394"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-endian.patch
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README src/testdata.txt TODO
+}
diff --git a/sys-apps/fwcrv/metadata.xml b/sys-apps/fwcrv/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/fwcrv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/fwts/Manifest b/sys-apps/fwts/Manifest
new file mode 100644
index 000000000000..78929ceca68e
--- /dev/null
+++ b/sys-apps/fwts/Manifest
@@ -0,0 +1,7 @@
+DIST fwts_15.12.00.orig.tar.gz 3391289 SHA256 79813cf4b0602643bb164779792ecb2fa15ddd340ece04d41b74594c93e9ec63 SHA512 44fab3e665279562b865261e5998e820ba960688e13bac717c5bbdb59faa1e97fd1d85f7ba95b5c7a4623e48a657f13e1ad8c1355f37173534739f26e155f8be WHIRLPOOL cbd50b60a3cc980bf1a41fbe900b6cb1e4be5aa63820132edcd4fc98cd3d78b81019f5f348b7487d3e47a2a3b414cdfb67643860f54893015307d567b37da474
+DIST fwts_17.02.00.orig.tar.gz 3489625 SHA256 9513a5eb69e202e8864df5004204641ad913d6c9d0c44c459cee41ac36192f29 SHA512 1dcbd7f120b5c09127f1242d41d7cf5ec15e6b049fb0b0590fec221849c0195a18ee4b07b66c1de29cbb241ef39f6e11c26dcd2bc7c0a4c23bf2efaec5372b70 WHIRLPOOL ef889246b17095a54a089e1c29e0154ecaea231968ba8ebbe74160cc42d683847499bff0ae58dc85b08bd7817ce77e1f7230e3ad8d0fc6e9885c9558b9c9edcc
+EBUILD fwts-15.12.00.ebuild 1119 SHA256 1ad04e2c862d6c8cb1d0b9df500260c0b484401856ae14456280b6952ef5df0f SHA512 f1d554486a566ae9342d2b4c68728f04d0d3aa4e6452ea362a7badaf3802b2dcd6d3a4c0f0c5e10b46bd292f1e96979193115d7673393fd63218a849f5fee203 WHIRLPOOL 37a960e2cb78c0a3265d5414f189263fdd88553df57c8a4cd2c1973224a08bbcaeef00c9e1bed83245503826a4079f1bfa9f6a2523bb729c6ea1560fc3e3fe2f
+EBUILD fwts-17.02.00.ebuild 1128 SHA256 0ae3455d9ed0d5c5d4dbc74d849203597b9061b2fabf9b22272a3391d69403ab SHA512 595c4a4d3434dc472ef019b71c33204cbb505ab1498ecc2812ef34aeefadaad0760acc0745d797769b86c31dc57e8804fa067e179f514a6cd711a902d91f3ee9 WHIRLPOOL ba5a3977064c2b867991689d520746072817e6ab0a11a5add3194b5336312fdb87f43c489b193f5ff0e3cbbdf0c0a0c4635d86830123332aa8d0ec7bfef8d643
+MISC ChangeLog 2849 SHA256 5569626219b2060f48851cf6e820a2e2bcfc65a3d0b40eb1147ef7a2a9d9f3d6 SHA512 91871e11b5aca61e27df67db5398155de6f5fdcfad8443e949debb68afa9cd3d95ffd925afd6a88164f73edfb8245a417b23cc51c515230dd0197ac3119e779e WHIRLPOOL abfbe530d50f1e0fe2d8384360f2c514525de8f00c6113a079d953453b73793df017152094fdef271bf913f4e6fc9767bc25f06c311243b49146315fef73eac2
+MISC ChangeLog-2015 2282 SHA256 ed6ce63ab41acbb4af63172647e74ac0d9e4e4d2dd70e0c787754b86b70e209a SHA512 008133a676488855aeb6d33c9f080714001d2c692b981fbff6f40fa3c07eb876013dff74d59cb6bc738d99cba00a78c55786f6c5893864342748838d58177d52 WHIRLPOOL 78664c9dad77e2e047586bdf1474bd4bd2e009ce195f31919d54dc9872b902cdb216238ed0cd9cc40256ef92da227616c3379b6d2f87b77efd31dea18c19efdb
+MISC metadata.xml 241 SHA256 409802de5d4d9cb0ca2f21dfd7992d34d51f26d5cd7d9a54f4a48d6f91614717 SHA512 9a4d0499ef0c9cb67816755a3313bbba0b42f01b35d5d7da31dfe3e14a94fead3b8c202b95ffd4a9c5edbda7b046045b19095924b57a08cd97aacbda5bbd4550 WHIRLPOOL 307b0a1fdfef262bbb6464789a31ac20dcda02a0e041c57b856dc03761a9e45ebeecd5fdb63b2a181aca5005ed9e7142216e1218842d40ad6d7b48b6c0de2ada
diff --git a/sys-apps/fwts/fwts-15.12.00.ebuild b/sys-apps/fwts/fwts-15.12.00.ebuild
new file mode 100644
index 000000000000..17321530bb08
--- /dev/null
+++ b/sys-apps/fwts/fwts-15.12.00.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+DESCRIPTION="Firmware Test Suite"
+HOMEPAGE="https://wiki.ubuntu.com/Kernel/Reference/fwts"
+SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND=">=dev-libs/json-c-0.10-r1
+ dev-libs/glib:2
+ dev-libs/libpcre
+ sys-apps/pciutils
+ sys-power/iasl
+ sys-power/pmtools
+ sys-apps/dmidecode"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+S=${WORKDIR}
+
+src_prepare(){
+ sed -i -e 's/-Wall -Werror/-Wall/' configure.ac {,src/,src/lib/src/}Makefile.am || die
+ sed -i -e 's:/usr/bin/lspci:'$(type -p lspci)':' src/lib/include/fwts_binpaths.h || die
+
+ # Fix json-c includes
+ sed -e 's/^#include <json\//#include <json-c\//g' -i \
+ configure.ac || die
+ sed -e 's/^#include <json.h>/#include <json-c\/json.h>/' \
+ -i src/lib/include/fwts_json.h \
+ src/utilities/kernelscan.c || die
+ sed -e 's/-ljson/-ljson-c/'\
+ -i src/Makefile.am\
+ src/lib/src/Makefile.am\
+ src/utilities/Makefile.am || die
+
+ eautoreconf
+}
diff --git a/sys-apps/fwts/fwts-17.02.00.ebuild b/sys-apps/fwts/fwts-17.02.00.ebuild
new file mode 100644
index 000000000000..d86714e02ca0
--- /dev/null
+++ b/sys-apps/fwts/fwts-17.02.00.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+DESCRIPTION="Firmware Test Suite"
+HOMEPAGE="https://wiki.ubuntu.com/Kernel/Reference/fwts"
+SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND=">=dev-libs/json-c-0.10-r1
+ dev-libs/glib:2
+ dev-libs/libpcre
+ sys-apps/pciutils
+ sys-power/iasl
+ sys-power/pmtools
+ sys-apps/dmidecode"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+S=${WORKDIR}
+
+src_prepare(){
+ default
+ sed -i -e 's/-Wall -Werror/-Wall/' configure.ac {,src/,src/lib/src/}Makefile.am || die
+ sed -i -e 's:/usr/bin/lspci:'$(type -p lspci)':' src/lib/include/fwts_binpaths.h || die
+
+ # Fix json-c includes
+ sed -e 's/^#include <json\//#include <json-c\//g' -i \
+ configure.ac || die
+ sed -e 's/^#include <json.h>/#include <json-c\/json.h>/' \
+ -i src/lib/include/fwts_json.h \
+ src/utilities/kernelscan.c || die
+ sed -e 's/-ljson/-ljson-c/'\
+ -i src/Makefile.am\
+ src/lib/src/Makefile.am\
+ src/utilities/Makefile.am || die
+
+ eautoreconf
+}
diff --git a/sys-apps/fwts/metadata.xml b/sys-apps/fwts/metadata.xml
new file mode 100644
index 000000000000..0cb1ad901328
--- /dev/null
+++ b/sys-apps/fwts/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-needed -->
+ <upstream>
+ <remote-id type="launchpad">ubuntu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/fwupd/Manifest b/sys-apps/fwupd/Manifest
new file mode 100644
index 000000000000..c8b3a2729df1
--- /dev/null
+++ b/sys-apps/fwupd/Manifest
@@ -0,0 +1,6 @@
+AUX fwupd-0.9-polkit_its_files.patch 2298 SHA256 478ded4f8f5ceb55d73cab5e3ac21986d1c88df11ad6fbc49d9aee740c59350e SHA512 032e081ef068834e131595a21481fd02b74dfb765ec2a4a080115b9c1f07914220cd197ba18c041def4b33a6784e168d7e77d45dc18700539d98a057e8fa1365 WHIRLPOOL fed409a893d3d2611e868061af7a462cfbf678fec38825220810bdc3968cfd2d79458d210aa04a4140e01a83b4d1894fed422de58042b7f79a4efe865b9592be
+DIST fwupd-0.9.5.tar.gz 1389768 SHA256 876bb4c1cc5b27bb5f30e1c5d81522c82554738bede9a811f9e352966e58453e SHA512 2a8ca8da2fffa71bdaa44b82aff1a4151441b8496793101d7d0b1ab984bfbb10a3a94c4ebae5cfc17241364ab7aed051252a70543ebe6a82dd8bdb5c6f52863d WHIRLPOOL b7d606acd35a58e25ee94045557899b1c9ea30941024cfb17bf3226f39dab7961c802abafc9ca6320e21ea1ca3792a0bd37fa942476dfd0b37c4ce3b4fe28b5b
+DIST fwupd-0.9.6.tar.gz 1404749 SHA256 cf406eb11b284cd89228db53bff787cb8468d4e14a910acdea4c995f04df2435 SHA512 d2098d2f14319728f1f2078126f68ee5b5cb2f32687428f61db13b01ad3904ea6c641c3758044229a7d1f48a0b96c7984a119d48a8ef5efc65e29e90476f4017 WHIRLPOOL 7854fd62fb87980c2d89d8341c85f4ddbf860c3cfbd0a1e541caac28c36f4499db1b2e78a42b7d8351a519bbb6d7ce2e75b3fa13672b5ca7b7f8e2cc35ceaf34
+EBUILD fwupd-0.9.5-r1.ebuild 2172 SHA256 99c484d513fd6bd8616dac100aa31e0e63bae5ed7a9d94fafda17a64821267f6 SHA512 d4b49cb711efd77ef2835294a92e6c61d2f0d3d833758befe4c6dc264e879c60c20d2fc4463c7600b942ed73aad2b379e691008ab94cb31e9e8530b213c77ad3 WHIRLPOOL 0ee614fe4bdf932c81df03adef3010f589d9823f54e6f7f52d924145c43dc73a10fa8d2a1ccb1e8e65e201c628bde6fd0b464c3622fb1f1aafcea0f406768284
+EBUILD fwupd-0.9.6.ebuild 2111 SHA256 6c8119cb23e4fd69168600656a1447eb4b2bd0be32de296d8c7712f71c7770b1 SHA512 8a62187f7aecdc16bda9d30751ac9f3767621ea6588f9c24e8b141f5e7a334f437a3eb473cb9f4929e9714d9bd9bd970abbbd2c224454580a3daf5570c2e46f0 WHIRLPOOL 9cabf66f41a805d3fc234c9a4dcda3b21a1f79c9d7c4acc8e30eff44dfb21976bcdefedfdd5605b4df2570f4a7d187b5d549946de2bd3a1937b8e844c9f3ea3a
+MISC metadata.xml 790 SHA256 9b1124ba722d81b7e43ad29aee79bcb8196e87260fdedcbbdd1044aad1ddb6c5 SHA512 5b0e4ce1e52ffc53059e995698820ad7f426a13e81bf9fb7f7e41f8c706839c5493bf72d3b75c55e8bf12be97dc6bde1a1a4eee473e8022e387b4256e6f67f49 WHIRLPOOL cd57b4e130e61ff7baa0cea4df3aa483bfe96a4e72faca7c00f2ba0444667a363101673453104ba711af04d1f279aa2d782e7b4d9f1b2912e6145cbc305c4c18
diff --git a/sys-apps/fwupd/files/fwupd-0.9-polkit_its_files.patch b/sys-apps/fwupd/files/fwupd-0.9-polkit_its_files.patch
new file mode 100644
index 000000000000..999df1cba252
--- /dev/null
+++ b/sys-apps/fwupd/files/fwupd-0.9-polkit_its_files.patch
@@ -0,0 +1,65 @@
+From 797e5672e64acd4f90cd52afca3bb192b28b4636 Mon Sep 17 00:00:00 2001
+From: Julian Liu <liu.julian@gmail.com>
+Date: Fri, 28 Apr 2017 18:09:20 +0800
+Subject: [PATCH] Add polkit's ITS files as Ubuntu doesn't not ship with it.
+
+Call msgfmt with custom_target for now as data_dir kargs for i18n.merge_file() not merged into master yet.
+(https://github.com/mesonbuild/meson/issues/1565)
+---
+ its/polkit.its | 8 ++++++++
+ its/polkit.loc | 6 ++++++
+ policy/meson.build | 12 ++++++++----
+ 3 files changed, 22 insertions(+), 4 deletions(-)
+ create mode 100644 its/polkit.its
+ create mode 100644 its/polkit.loc
+
+diff --git a/its/polkit.its b/its/polkit.its
+new file mode 100644
+index 0000000..1c37e6b
+--- /dev/null
++++ b/its/polkit.its
+@@ -0,0 +1,8 @@
++<?xml version="1.0"?>
++<its:rules xmlns:its="http://www.w3.org/2005/11/its"
++ version="2.0">
++ <its:translateRule selector="//*" translate="no"/>
++ <its:translateRule selector="//action/description |
++ //action/message"
++ translate="yes"/>
++</its:rules>
+diff --git a/its/polkit.loc b/its/polkit.loc
+new file mode 100644
+index 0000000..c7427ec
+--- /dev/null
++++ b/its/polkit.loc
+@@ -0,0 +1,6 @@
++<?xml version="1.0"?>
++<locatingRules>
++ <locatingRule name="polkit policy" pattern="*.policy">
++ <documentRule localName="policyconfig" target="polkit.its"/>
++ </locatingRule>
++</locatingRules>
+diff --git a/policy/meson.build b/policy/meson.build
+index def8976..41da2db 100644
+--- a/policy/meson.build
++++ b/policy/meson.build
+@@ -1,11 +1,15 @@
+ install_data('org.freedesktop.fwupd.rules',
+ install_dir : 'share/polkit-1/rules.d')
+
+-i18n.merge_file(
+- input: 'org.freedesktop.fwupd.policy.in',
++envbin = find_program('env')
++gettext_data_dir = 'GETTEXTDATADIRS=' + meson.source_root()
++custom_target('org.freedesktop.fwupd.policy',
+ output: 'org.freedesktop.fwupd.policy',
+- type: 'xml',
+- po_dir: join_paths(meson.source_root(), 'po'),
++ input: 'org.freedesktop.fwupd.policy.in',
++ command: [envbin, gettext_data_dir, 'msgfmt', '--xml',
++ '--template', '@INPUT@',
++ '-d', join_paths(meson.source_root(), 'po'),
++ '-o', '@OUTPUT@'],
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
+ )
diff --git a/sys-apps/fwupd/fwupd-0.9.5-r1.ebuild b/sys-apps/fwupd/fwupd-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..1f4146f8c86e
--- /dev/null
+++ b/sys-apps/fwupd/fwupd-0.9.5-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
+
+inherit meson python-single-r1 xdg-utils
+
+DESCRIPTION="Aims to make updating firmware on Linux automatic, safe and reliable"
+HOMEPAGE="https://fwupd.org"
+SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="colorhug dell doc elf +man systemd uefi uefi_labels"
+REQUIRED_USE="uefi_labels? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ app-crypt/gpgme
+ dev-db/sqlite
+ >=dev-libs/appstream-glib-0.6.13[introspection]
+ >=dev-libs/glib-2.45.8:2
+ dev-libs/libgpg-error
+ dev-libs/libgudev
+ >=dev-libs/libgusb-0.2.9[introspection]
+ >=net-libs/libsoup-2.51.92:2.4
+ >=sys-auth/polkit-0.103
+ colorhug? ( >=x11-misc/colord-1.2.12:0= )
+ dell? (
+ sys-libs/efivar
+ >=sys-libs/libsmbios-2.3.3
+ )
+ elf? ( virtual/libelf:0= )
+ systemd? ( >=sys-apps/systemd-231 )
+ !systemd? ( >=sys-auth/consolekit-1.0.0 )
+ uefi? ( >=sys-apps/fwupdate-5 )
+ uefi_labels? (
+ ${PYTHON_DEPS}
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ x11-libs/pango
+ x11-libs/cairo
+ media-libs/freetype
+ media-libs/fontconfig
+ media-fonts/dejavu
+ media-fonts/source-han-sans
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ app-arch/gcab
+ app-arch/libarchive
+ virtual/pkgconfig
+ doc? ( dev-util/gtk-doc )
+ man? ( app-text/docbook-sgml-utils )
+"
+
+REQUIRED_USE="dell? ( uefi )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9-polkit_its_files.patch"
+)
+
+src_configure() {
+ xdg_environment_reset
+ local emesonargs=(
+ -Denable-colorhug="$(usex colorhug true false)"
+ -Denable-consolekit="$(usex systemd false true)"
+ -Denable-dell="$(usex dell true false)"
+ -Denable-doc="$(usex doc true false)"
+ -Denable-man="$(usex man true false)"
+ -Denable-libelf="$(usex elf true false)"
+ -Denable-systemd="$(usex systemd true false)"
+ # requires libtbtfwu which is not packaged yet
+ -Denable-thunderbolt=false
+ -Denable-uefi="$(usex uefi true false)"
+ -Denable-uefi-labels="$(usex uefi_labels true false)"
+ )
+ meson_src_configure
+}
diff --git a/sys-apps/fwupd/fwupd-0.9.6.ebuild b/sys-apps/fwupd/fwupd-0.9.6.ebuild
new file mode 100644
index 000000000000..19962f03252f
--- /dev/null
+++ b/sys-apps/fwupd/fwupd-0.9.6.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
+
+inherit meson python-single-r1 xdg-utils
+
+DESCRIPTION="Aims to make updating firmware on Linux automatic, safe and reliable"
+HOMEPAGE="https://fwupd.org"
+SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="colorhug dell doc elf +man systemd uefi uefi_labels"
+REQUIRED_USE="uefi_labels? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ app-crypt/gpgme
+ dev-db/sqlite
+ >=dev-libs/appstream-glib-0.6.13[introspection]
+ >=dev-libs/glib-2.45.8:2
+ dev-libs/libgpg-error
+ dev-libs/libgudev
+ >=dev-libs/libgusb-0.2.9[introspection]
+ >=net-libs/libsoup-2.51.92:2.4
+ >=sys-auth/polkit-0.103
+ colorhug? ( >=x11-misc/colord-1.2.12:0= )
+ dell? (
+ sys-libs/efivar
+ >=sys-libs/libsmbios-2.3.3
+ )
+ elf? ( virtual/libelf:0= )
+ systemd? ( >=sys-apps/systemd-231 )
+ !systemd? ( >=sys-auth/consolekit-1.0.0 )
+ uefi? ( >=sys-apps/fwupdate-5 )
+ uefi_labels? (
+ ${PYTHON_DEPS}
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ x11-libs/pango
+ x11-libs/cairo
+ media-libs/freetype
+ media-libs/fontconfig
+ media-fonts/dejavu
+ media-fonts/source-han-sans
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ app-arch/gcab
+ app-arch/libarchive
+ virtual/pkgconfig
+ doc? ( dev-util/gtk-doc )
+ man? ( app-text/docbook-sgml-utils )
+"
+
+REQUIRED_USE="dell? ( uefi )"
+
+src_configure() {
+ xdg_environment_reset
+ local emesonargs=(
+ -Denable-colorhug="$(usex colorhug true false)"
+ -Denable-consolekit="$(usex systemd false true)"
+ -Denable-dell="$(usex dell true false)"
+ -Denable-doc="$(usex doc true false)"
+ -Denable-man="$(usex man true false)"
+ -Denable-libelf="$(usex elf true false)"
+ -Denable-systemd="$(usex systemd true false)"
+ # requires libtbtfwu which is not packaged yet
+ -Denable-thunderbolt=false
+ -Denable-uefi="$(usex uefi true false)"
+ -Denable-uefi-labels="$(usex uefi_labels true false)"
+ )
+ meson_src_configure
+}
diff --git a/sys-apps/fwupd/metadata.xml b/sys-apps/fwupd/metadata.xml
new file mode 100644
index 000000000000..bad753d8cddc
--- /dev/null
+++ b/sys-apps/fwupd/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="colorhug">Enable ColorHug support through
+ <pkg>x11-misc/colord</pkg> package.</flag>
+ <flag name="dell">Enable Dell-specific support.</flag>
+ <flag name="elf">Enable libelf support through
+ <pkg>dev-libs/libelf</pkg> package.</flag>
+ <flag name="man">Build and install man pages</flag>
+ <flag name="uefi">Enable UEFI support</flag>
+ <flag name="uefi_labels">Enable UEFI labels support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">hughsie/fwupd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/fwupdate/Manifest b/sys-apps/fwupdate/Manifest
new file mode 100644
index 000000000000..b70096b15913
--- /dev/null
+++ b/sys-apps/fwupdate/Manifest
@@ -0,0 +1,6 @@
+AUX fwupdate-9-objcopy_detection.patch 1616 SHA256 99b62309e470bd00b6e01692abbf9c788426d257900772b56d35cc857307c884 SHA512 d2e790aaf3a3e10d4154507d1243d429e3fefb914a1fdc3677ec8f7450b3059c34c6d8aeb48eba96647165d95b41adebb849dbba398be07031759499de4a3052 WHIRLPOOL adfce31d9a568eabace033ee22e0a8d07ac41b7fbee09a6ca93b1156502435d5ec89622be7f0b8eb0fddff0fee1df87da6c90ee3e319ec8ac253f8c045761a98
+DIST fwupdate-8.tar.gz 41062 SHA256 3e4dbcb97a2d549c4f7e735f582192594acfe50b0efeaf3bcb500cf45ad5082c SHA512 3b9b2693d7d792f0a6c7107325612cba35c891259d870152ca9ebcbd397edc307601e414f6f0fefbcb1aff422badac651ce00867c4dba38dac347ff75e1267b7 WHIRLPOOL a71b3d054237f70916727735bdc535bb8cdc8b408f7a25e8df185bad5b0fe54a887dffb1555f9ec67e5c57264ddade3946ea27933b0a2ad824b31f4ce772d9ed
+DIST fwupdate-9.tar.gz 41698 SHA256 032ffee82300dc4f6ada1b1516c82354969e20caa891e796d03b2283165d1755 SHA512 bcb7783944aa007450a28f71cb4e3c8b06220b3ad04dd90a9505273224ba192369fb63ac0d72bd1efc06c78a5f6f38f2eea2c4affe915eff5f2b7c04db0847c8 WHIRLPOOL 951cca34064ef47eebdfe10d79affee11aca8b645be5188eac1dee6db47596843396e6bf2adf340aefee656c22d5a614daccea34fbbe6bfd6cde7b3a0d56d52d
+EBUILD fwupdate-8.ebuild 694 SHA256 cd0806bccd381ccf8c231954e066a3d5e815df9a3a8538908a7d06a84c20aa38 SHA512 59cdd6682ce60e98b2dd605e3edf32c7e458641a7ca5b5db14754ae8e3b87cd2e646566061a3fb1a8e68b53487fa8feecff882c6e7ee59970372b0b9c7e679d5 WHIRLPOOL 7a5293bcdee30d6983bf9b7011d52eb443c33fe2f32c425c8816f36bd98828488a6eadd58e34ad934420e5dc99d4af7e37d6ddcf8b881328d9e08ae1494373fe
+EBUILD fwupdate-9.ebuild 864 SHA256 d859667174c3775846465905001e4b470d19dc9afca0ccb4a0ed9c593d8d49b3 SHA512 47e219a9b2f1fd313e19d513bdecd9e30433c61d46422d4bde7d51ff16634bd32fd9ac05f58fe7e929ee843086f0134487f7d2ada948c516b4c2a0010e4f1f64 WHIRLPOOL f4636c79abe99f5208d072b4430e2cd8ab3e28048bd15da2deac20d927b76f6b6ff19de4830b91a95a64c4b548268d19153edf9f0747b18a82c915b40f6257fd
+MISC metadata.xml 346 SHA256 0cc6fcdf61ec73c3ab736786049c1dded09859d25c798ab6e3d0b7eb99a0d07c SHA512 55ff3da29bf22afc47434b7079e8559e72d34f769ecdfd198f84c051e6ba68e91751c23c36c841b6c0f81ada4fe74854dd7f1fc0e579e96e43ba3b35bc164dcf WHIRLPOOL 13819c048e5fc9e5106b08946c7545db6c7ddc6caee4ed805cd7b14611289222b6ef36d826c06d37d8b33a94b9ef3ca9cdbcd09ff79625b82f3926455304d86f
diff --git a/sys-apps/fwupdate/files/fwupdate-9-objcopy_detection.patch b/sys-apps/fwupdate/files/fwupdate-9-objcopy_detection.patch
new file mode 100644
index 000000000000..d41462397ff2
--- /dev/null
+++ b/sys-apps/fwupdate/files/fwupdate-9-objcopy_detection.patch
@@ -0,0 +1,45 @@
+From affc219a5bac93cb6e774879c874c203f755ba11 Mon Sep 17 00:00:00 2001
+From: Raymund Will <rw@suse.com>
+Date: Mon, 13 Mar 2017 12:57:07 +0100
+Subject: [PATCH] Fix regression in "objcopy version check" (AKA `expr: syntax
+ error`)
+
+While commit 8418fee4 may have fixed the check for "some distributions"
+it broke the same check for others, like
+
+`GNU objcopy (WinAVR 20090313) 2.19`
+`GNU objcopy (AVR_8_bit_GNU_Toolchain_3.4.3_1072) 2.23.2`
+`GNU objcopy (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal) 2.24.90`
+`GNU objcopy (GNU Binutils; openSUSE Leap 42.2) 2.26.1`
+`GNU objcopy (GNU Binutils; SUSE Linux Enterprise 12) 2.26.1`
+
+(some more, some less relevant... ;)
+
+This version is meant to cover them all (or at least be easily extensible).
+
+Signed-off-by: Raymund Will <rw@suse.com>
+---
+ efi/Makefile | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/efi/Makefile b/efi/Makefile
+index 920c096..faf8ee2 100644
+--- a/efi/Makefile
++++ b/efi/Makefile
+@@ -15,7 +15,15 @@ CCLDFLAGS ?= -nostdlib -Wl,--warn-common \
+ -Wl,-shared -Wl,-Bsymbolic -L$(LIBDIR) -L$(GNUEFIDIR) \
+ -Wl,--build-id=sha1 -Wl,--hash-style=sysv \
+ $(GNUEFIDIR)/crt0-efi-$(ARCH).o
+-OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^[^0-9]*//g' | cut -f1-2 -d.` \>= 2.24)
++
++define objcopy_version =
++ $(OBJCOPY) --version |
++ sed -e '/^GNU objcopy/! d;
++ : loop1; s/([^)(]*)//g; t loop1;
++ : loop2; s/\[[^][]*\]//g; t loop2;
++ s/.* \([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;'
++endef
++OBJCOPY_GTE224 := $(shell expr `$(objcopy_version)` \>= 2.24)
+
+ FWUP = fwupdate
+
diff --git a/sys-apps/fwupdate/fwupdate-8.ebuild b/sys-apps/fwupdate/fwupdate-8.ebuild
new file mode 100644
index 000000000000..bd9f9fc1fd01
--- /dev/null
+++ b/sys-apps/fwupdate/fwupdate-8.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit mount-boot
+
+DESCRIPTION="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
+HOMEPAGE="https://github.com/rhinstaller/fwupdate"
+SRC_URI="https://github.com/rhinstaller/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/popt
+ sys-libs/efivar
+ >=sys-libs/libsmbios-2.3.2
+"
+DEPEND="
+ ${RDEPEND}
+ sys-boot/gnu-efi
+"
+
+do_make() {
+ emake \
+ EFIDIR="gentoo" \
+ GNUEFIDIR="/usr/$(get_libdir)" \
+ "${@}"
+}
+
+src_compile() {
+ do_make
+}
+
+src_install() {
+ do_make DESTDIR="${D}" install
+}
diff --git a/sys-apps/fwupdate/fwupdate-9.ebuild b/sys-apps/fwupdate/fwupdate-9.ebuild
new file mode 100644
index 000000000000..0a68fa746ce7
--- /dev/null
+++ b/sys-apps/fwupdate/fwupdate-9.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit mount-boot
+
+DESCRIPTION="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
+HOMEPAGE="https://github.com/rhinstaller/fwupdate"
+SRC_URI="https://github.com/rhinstaller/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/popt
+ sys-libs/efivar
+ >=sys-libs/libsmbios-2.3.2
+"
+DEPEND="
+ ${RDEPEND}
+ sys-boot/gnu-efi
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-objcopy_detection.patch"
+)
+
+do_make() {
+ emake \
+ EFIDIR="gentoo" \
+ GNUEFIDIR="/usr/$(get_libdir)" \
+ "${@}"
+}
+
+src_prepare() {
+ default
+
+ # Remove -Werror
+ sed 's@ -Werror\([[:space:]]\|\n\)@\1@' -i linux/Makefile || die
+}
+
+src_compile() {
+ do_make
+}
+
+src_install() {
+ do_make DESTDIR="${D}" install
+}
diff --git a/sys-apps/fwupdate/metadata.xml b/sys-apps/fwupdate/metadata.xml
new file mode 100644
index 000000000000..ce6167e42309
--- /dev/null
+++ b/sys-apps/fwupdate/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 type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rhinstaller/fwupdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/fxload/Manifest b/sys-apps/fxload/Manifest
new file mode 100644
index 000000000000..d96bef556416
--- /dev/null
+++ b/sys-apps/fxload/Manifest
@@ -0,0 +1,5 @@
+DIST fxload-2008_10_13.tar.gz 23926 SHA256 0cc8bfd2a7cbba2f68e0c5767477634922287943c91dd9fcf029fc8b9d577858 SHA512 f8a654c51a392ac95672a24962ac3b83ea4e0cb62d51a0696f6bdfdefbc7b5cfb033aa9cd80ee676a6bb00061bd635d7eb3920769f982188d8733c862838bc32 WHIRLPOOL c7242c937babebbbba90294e9b638976ede727f7243f52798b5bf69a9ac2919c819d071e57e5d61f999c6bf5a419d925552e88edde5b35f038a780373ea28277
+EBUILD fxload-20081013-r1.ebuild 734 SHA256 300bbdf7cc60d76006df1e46f90f21dfc4d373ef94b96838734e013e79a22318 SHA512 7813d25b99849b021c98397f29ebb2b029a60ea5894b813437b686fe5e545c600f9d5dd46e5727870766e1e7bd73ac1d3cd37026b741daac8dfa1f34af5ba1db WHIRLPOOL 935d127aacd7e2fe1721eacd4cc73ca3691b79326c136994faa71f1b7fcdd1039f866c3171d43cea7cf76a326c0b1c06b7a0f043f43b492cb0193d0596f93db4
+MISC ChangeLog 2657 SHA256 54691d59ddc9079b972beeb80d0b71691ce527f91ad4ed8068de4b9880da7c3e SHA512 bd2729bd45fb2e946f5d5f9b48079aa9209c71448796181a6b79121dd373b408255f833bfbf4c9b8b0e9e30f9f907ec95ff8ba69a34ad212125db7f95c75a11d WHIRLPOOL a3b3b2fb8dd097506cb8963e5b3f6f1c843f7d6888119f9b6f2aa4beece6ebeb8e8ea18649d82e7399c56125eeb232862e46a6fa3f5f0838eeb1d0c2cc07728b
+MISC ChangeLog-2015 3978 SHA256 f7f5f0355265e2f19aab5142b5a0b884194b14320bae906b751b95b2721cf26b SHA512 606f3f7b27dcfe76fbb26a144c1aaba0316fc5712b68b92926ecdb7c189a44dde34a73ce0522389b4ea9bdb6eff10bfb582b922dbf49632435bee23da6d4a397 WHIRLPOOL 28d89b787f2c00adbcc35baf10e5fd8a6551325866dc69b98142c481008641cdf7f4970359245e0d93b1e80a46e5117367eff98e83d14d81f21aafcf208ef097
+MISC metadata.xml 250 SHA256 c51174938eddd9df2caf8c512b4447bf278679e5fe3c935c872ec71a755e5fef SHA512 bc48eb750cab3e4f45a71b1ccea94faabf8dc43826df2b701320cc03318700234bfea551ab12963356f775932fb62d22fb1182d5ac083c3eafd63b3feeb1b0fe WHIRLPOOL da1d2853618f5b29dcc953751169d0e6e4d2bcd865d1f6015d006ad13e4ac37aa08963720337b8fab02aead02665ffc1f5b3548ff298a53ea99db44c57263f0d
diff --git a/sys-apps/fxload/fxload-20081013-r1.ebuild b/sys-apps/fxload/fxload-20081013-r1.ebuild
new file mode 100644
index 000000000000..03fdaa5ed9e9
--- /dev/null
+++ b/sys-apps/fxload/fxload-20081013-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+# source maintainers named it fxload-YYYY_MM_DD instead of fxload-YYYYMMDD
+MY_P="${PN}-${PV:0:4}_${PV:4:2}_${PV:6:2}"
+DESCRIPTION="USB firmware uploader"
+HOMEPAGE="http://linux-hotplug.sourceforge.net/"
+SRC_URI="mirror://sourceforge/linux-hotplug/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e 's:$(CC) -o:$(CC) $(LDFLAGS) -o:' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake prefix="${D}" install
+ dodoc README.txt
+}
diff --git a/sys-apps/fxload/metadata.xml b/sys-apps/fxload/metadata.xml
new file mode 100644
index 000000000000..21c3a638d6ee
--- /dev/null
+++ b/sys-apps/fxload/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">linux-hotplug</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/gawk/Manifest b/sys-apps/gawk/Manifest
new file mode 100644
index 000000000000..ae40c24c790a
--- /dev/null
+++ b/sys-apps/gawk/Manifest
@@ -0,0 +1,14 @@
+AUX filefuncs/Makefile 1112 SHA256 0fbd6dc67d07f50af0ed138bb060ac4b145d7f76faf1b77b2de5f83273172b9c SHA512 9bf5acfca439e6589247db3b4b16985765e748bcb66577e7038247830f92137929f139f6ab72ecb9e2b3b03f9406c8ecf7ca349329979ee8d70fbf44b4feb2b8 WHIRLPOOL 4dfe497c641fc5062334365800e3a7bcc6337299f619e1ba2537fedbdd6f2a37a15ffb56e6433d48e9a95326cade5660ce65d61d61e67215071e6c6739c2352c
+AUX filefuncs/filefuncs.c 10875 SHA256 850348bd2f2b9772f3e7d946dec4443330bb317f96062888ba7ccd338458bda9 SHA512 48da0dce39759a8d57097b286dcee2ebf1e1799b694a4a7926716df727eb294a7912117c405e1b63a1722fa3a2427cb2139d92fac723ffd8d2e697632719f974 WHIRLPOOL 3a8785506e65aea70bd02d50a2a0dbaf49f0aeec5c199ab1bdbd1e756a4ac24a50f9113a2596cb00a486136bb19caf5dd6ad3b1d4fcd43119b7e5eb5089d3717
+AUX gawk-4.1.3-bsd_configure_readline.patch 1899 SHA256 15e455754aceb62af444b414cf235f58dd1395a4c1ac8f4d551aa5021e3feb84 SHA512 ed3b6c4efe5bcb53bca6eeb50df0e3871eca266dd3d6ea4369f42dce31b771ed0a4f0aac03b09124706539d18c8d1dfe549e43d2ef4cf80a45353e14238ddaec WHIRLPOOL 81ebc0b74b2c3df3023ff870845c766bd1bdace91e7b8359126ad7cb62f50894788ea418cdc6b6dde7383f1d620b0291a974ab1cdbbfb6afb19ad3a3ac1836c8
+DIST gawk-3.1.8.tar.bz2 1984129 SHA256 5dbc7b2c4c328711337c2aacd09a122c7313122262e3ff034590f014067412b4 SHA512 a8046c1a5a6ffc8bd90cc6062d97ba6301b7a707f4a34a06355a83aaaea2ccdf4c4476563fc6f444b529a2d8d3a2de2126b53434ba50aad8bd898fb3299904dd WHIRLPOOL e24079d7c2aee57e48db2ef76df4c217ea0fa435304a563c6df8d0442f8a5e5e4cff2141809f68430939d66a3a6eda981edefa94b2b8c85e5f0a3ee7ba8a7649
+DIST gawk-4.0.2.tar.xz 1626808 SHA256 21e1f28c51b5160f0a4bf1a735c6109b46a3bd6a43de808eabc21c17bb026d13 SHA512 069f68b6792521d94d4003764006ad8fbe9a17c60a88212629204d9a5eb3f662903fff6d91dd3c1834597b76c18f9d3231c93a033f456c59c0571ac13eb77b27 WHIRLPOOL 8b2916d964c5fa67a46c0a5fc39d424b03e6b39a3335ad796a224feb760528631199c1ec6ee2b6719bdc014ab190ddf38092211685020c92851d617e6ca08690
+DIST gawk-4.1.3.tar.xz 2311268 SHA256 e3cf55e91e31ea2845f8338bedd91e40671fc30e4d82ea147d220e687abda625 SHA512 8b9470a1bba397353f10e4e652e8589a637a49e8235fb39ca7681ae662fd27cd140c193d0634179c800f99e19b0e49aef55dfa6612f9695ba80760a36936a1c3 WHIRLPOOL ddcd0f218a08c7d54beaaa28db3a965c57b1d394dd294f142970cbf3b4777a407bbb491b7442f9e4de0b7435167919e76b16f4c5ab28eb62758a3d44d11a49e1
+DIST gawk-4.1.4.tar.xz 2367832 SHA256 53e184e2d0f90def9207860531802456322be091c7b48f23fdc79cda65adc266 SHA512 6a0e9cf086544212f54b54261dcd517b611aaf495ef99c4b7740d07e363bb00c5632f3d7fd5e12a954d5aa9793764162a57453e0e18884b29c6c54b5f444c097 WHIRLPOOL 5103388e7260cd9d4e777a5b53e93ae2eb1270c5baec462d0d4c244fde12bb29d41864ebb22de5c9b797fb9678c548cf3059a39488d35660b508b90c802346ff
+EBUILD gawk-3.1.8.ebuild 1794 SHA256 b794beff4f8ce3bb31d416ea4e7cffa083ee432991e4f6b86a1a071b63444845 SHA512 ca82d7bba5d88aadb4616817d0d55f001446a90da3def7fd49fb817c5b2674cd389f5a92efe82736e562ea0f46c9a214286f96137f324ee2be2149d09f298f61 WHIRLPOOL 9b2abe1d8028961d76032e39a359ae76d82ab647008e48d79c887e6ad3b2bd017ab33d7e877582fb34868ee604ed78d8169134c75d1dbfc6b466507847eb2a78
+EBUILD gawk-4.0.2.ebuild 2088 SHA256 aeb7bc3dda2def791ba830ff3052247292249a6fcb270c81412651a5fd013761 SHA512 b15b3c32c04c724e7b0c5c6f8d7cae86e3118c1560ca2fae0f5ded39fc098afa29987e425733e96daedbf1db5757e15fb21059a023c5158498f5b6168809f063 WHIRLPOOL 0197d1effc02f2668e3834108eab717407fb02bb880fdd1a964fdbc0a5bfb44a0f5cd1ab6893af0da3aadd0e22c1e9444af46a98b2fdd74b341877d7d9fd00fd
+EBUILD gawk-4.1.3.ebuild 2201 SHA256 e973870920b273d6f516ccb6a47265d0b793916d60a3a72aa8c7153cd90ff8c3 SHA512 fd78556fbd0d2ba92c2816d4a82330a365ca99985b042a3431e075e7a1390954bec0139d7dc63370c564eb90ab3f0a97c6966230a7309d46462d5e934b090d0b WHIRLPOOL 8c4ab7736911b57077dda94446831b6bb1b7fe1c839f6d06b22f42b6d7cc0b763a94e2b5aca899ae0b6641bc5b9a0dc79aafc07f325a885a9ea9f2aa336c7d1a
+EBUILD gawk-4.1.4.ebuild 2301 SHA256 26d24d086963e0347732c0c450a18eb3827779a4259f8173683c05f41c780235 SHA512 7264a7180f127dbe7147db5eaee201f37bd4ec25f1478029086720ee59fa96ac3d3516ae1eafeccdfffd8ccb5107152310311953e40c1d0ec9053a6e1a53c27c WHIRLPOOL 93816fee2ee67f75f898f28e2966c90d3f5ef1878213ab0110a63782a4cf3baae7509dfc13ce982058f21b90b9ac253bb552c8674b6e8b8adcedd8089ef19f6a
+MISC ChangeLog 5037 SHA256 d91b8f1506cf9102f4f46dbdd03d6c757ed521c54e08b1f03c70ea61d950ee1a SHA512 22fec5534ecd42063f666080c6e9690197120700d23277ca718181306715c41e2253f684efb4c9cdb4456c1a0609d6b45c8a644c4f2e3b86f5e9f5f84a5ec3d6 WHIRLPOOL 69b1294e44f270910dcf450bf3a83167d1665d195b8767f950f45443ab5c5e187afa22c8d49246a3a5c1721650698983407c9e80fa9e964290fc7ca35b0e2f7d
+MISC ChangeLog-2015 25235 SHA256 bde68cfbf1ddb7ec621042d675bab7b5aeffed7f3f092dc278b0c0ac2cd602de SHA512 243495808dbef55124b5a8d02e27b87550ad40104b427ed9bb63d3c8785a84d0acd3675a8d15c8579553c22f06809a47d19530eea0300a0b616ed2e3fb527dee WHIRLPOOL 70afaf3d02a4f5a3e4b4b13bb3c9f912d55c4b4c6f06beb10412f52b59fd82e5b6bfb9548fbe1a625e933750e903cb179cf31267b4abba103b3539d95622e8d8
+MISC metadata.xml 347 SHA256 cfaa5b9985d20997a4800b7a60f7804bf8660d217ef2421732c2e296532d6862 SHA512 1150e37d64393f26ef81056ff25e9720a4bc82dd28c9cffd164d144bb6d2f660f802a31d5ebf4fd121a01b36a4a5073893ebec6b735d3eb570da36705d5f446e WHIRLPOOL f4cc92f281dfb2f436c979257347ac8694056a8d9a4a3c794056027a12c64f6cf04023641b0462d57a376335d93c55f3b6722504e7f7e32baf702c4c7578e5f9
diff --git a/sys-apps/gawk/files/filefuncs/Makefile b/sys-apps/gawk/files/filefuncs/Makefile
new file mode 100644
index 000000000000..498793805c08
--- /dev/null
+++ b/sys-apps/gawk/files/filefuncs/Makefile
@@ -0,0 +1,56 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Author: Martin Schlemmer <azarah@gentoo.org>
+
+CC ?= gcc
+LD = $(CC)
+
+MAJORVER = 0
+MINORVER = 0.1
+
+AWKINCDIR = /usr/include/awk
+DESTDIR =
+
+TARGET = filefuncs
+TARGET_LIB = $(TARGET).so.$(MAJORVER).$(MINORVER)
+
+LIBDIR = lib
+
+# Gentoo specific cruft, you like it dont ya idiot
+ifdef D
+DESTDIR = $(D)
+endif
+ifdef S
+AWKINCDIR = $(S)
+endif
+
+DOIT = yes
+ifeq ($(USERLAND),Darwin)
+DOIT = no
+endif
+
+ifeq ($(DOIT),yes)
+
+all: $(TARGET_LIB)
+
+$(TARGET).o: $(TARGET).c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -shared -Wall -DHAVE_CONFIG_H -c -O2 -fPIC -I$(AWKINCDIR) $^
+
+$(TARGET_LIB): $(TARGET).o
+ $(LD) $(LDFLAGS) -o $@ -shared -Wl,-soname -Wl,$(TARGET).so.$(MAJORVER) $^
+
+install: $(TARGET_LIB)
+ install -m 0755 -d $(DESTDIR)/$(LIBDIR)/rcscripts
+ install -m 0755 $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts
+ ln -s $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts/$(TARGET).so.$(MAJORVER)
+ ln -s $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts/$(TARGET).so
+
+clean:
+ rm -f $(TARGET)
+ rm -f *.o *~ core
+
+else
+
+all install clean:
+
+endif
diff --git a/sys-apps/gawk/files/filefuncs/filefuncs.c b/sys-apps/gawk/files/filefuncs/filefuncs.c
new file mode 100644
index 000000000000..04c9db7fe107
--- /dev/null
+++ b/sys-apps/gawk/files/filefuncs/filefuncs.c
@@ -0,0 +1,484 @@
+/*
+ * filefuncs.c - Builtin functions that provide initial minimal iterface
+ * to the file system.
+ *
+ * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998
+ */
+
+/*
+ * Copyright (C) 2001 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/*
+ * Copyright 1999-2004 Gentoo Foundation
+ * Distributed under the terms of the GNU General Public License v2
+ * Author: Martin Schlemmer <azarah@gentoo.org>, Nov 2002
+ *
+ * Extended with: do_symlink()
+ * do_unlink()
+ * do_mkdir()
+ * do_rmdir()
+ *
+ * for use in the Gentoo rcscripts
+ *
+ */
+
+#include "awk.h"
+
+#include <unistd.h>
+
+/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */
+
+static NODE *
+do_chdir(tree)
+NODE *tree;
+{
+ NODE *newdir;
+ int ret = -1;
+
+ if (do_lint && tree->param_cnt > 1)
+ lintwarn("chdir: called with too many arguments");
+
+ newdir = get_argument(tree, 0);
+ if (newdir != NULL) {
+ (void) force_string(newdir);
+ ret = chdir(newdir->stptr);
+ if (ret < 0)
+ update_ERRNO();
+
+ free_temp(newdir);
+ } else if (do_lint)
+ lintwarn("chdir: called with no arguments");
+
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* do_symlink --- provide dynamically loaded symlink() builtin for gawk */
+
+static NODE *
+do_symlink(tree)
+NODE *tree;
+{
+ NODE *oldpath, *newpath;
+ int ret = -1;
+
+ if (do_lint && tree->param_cnt > 2)
+ lintwarn("symlink: called with too many arguments");
+
+ oldpath = get_argument(tree, 0);
+ newpath = get_argument(tree, 1);
+ if ((oldpath != NULL) && (newpath)) {
+ (void) force_string(oldpath);
+ (void) force_string(newpath);
+ ret = symlink(oldpath->stptr, newpath->stptr);
+ if (ret < 0)
+ update_ERRNO();
+
+ free_temp(oldpath);
+ free_temp(newpath);
+ } else if (do_lint)
+ lintwarn("symlink: called with not enough arguments");
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* do_unlink --- provide dynamically loaded unlink() builtin for gawk */
+
+static NODE *
+do_unlink(tree)
+NODE *tree;
+{
+ NODE *pathname;
+ int ret = -1;
+
+ if (do_lint && tree->param_cnt > 1)
+ lintwarn("unlink: called with too many arguments");
+
+ pathname = get_argument(tree, 0);
+ if (pathname != NULL) {
+ (void) force_string(pathname);
+ ret = unlink(pathname->stptr);
+ if (ret < 0)
+ update_ERRNO();
+
+ free_temp(pathname);
+ } else if (do_lint)
+ lintwarn("unlink: called with no arguments");
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* do_mkdir --- provide dynamically loaded mkdir() builtin for gawk */
+
+static NODE *
+do_mkdir(tree)
+NODE *tree;
+{
+ NODE *pathname, *mode;
+ int ret = -1;
+
+ if (do_lint && tree->param_cnt > 2)
+ lintwarn("mkdir: called with too many arguments");
+
+ pathname = get_argument(tree, 0);
+ mode = get_argument(tree, 1);
+ if ((pathname != NULL) && (mode != NULL)) {
+ (void) force_string(pathname);
+ (void) force_number(mode);
+ ret = mkdir(pathname->stptr, mode->numbr);
+ if (ret < 0)
+ update_ERRNO();
+
+ free_temp(pathname);
+ free_temp(mode);
+ } else if (do_lint)
+ lintwarn("mkdir: called with not enough arguments");
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* do_rmdir --- provide dynamically loaded rmdir() builtin for gawk */
+
+static NODE *
+do_rmdir(tree)
+NODE *tree;
+{
+ NODE *pathname;
+ int ret = -1;
+
+ if (do_lint && tree->param_cnt > 1)
+ lintwarn("rmdir: called with too many arguments");
+
+ pathname = get_argument(tree, 0);
+ if (pathname != NULL) {
+ (void) force_string(pathname);
+ ret = rmdir(pathname->stptr);
+ if (ret < 0)
+ update_ERRNO();
+
+ free_temp(pathname);
+ } else if (do_lint)
+ lintwarn("rmdir: called with no arguments");
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* format_mode --- turn a stat mode field into something readable */
+
+static char *
+format_mode(fmode)
+unsigned long fmode;
+{
+ static char outbuf[12];
+ int i;
+
+ strcpy(outbuf, "----------");
+ /* first, get the file type */
+ i = 0;
+ switch (fmode & S_IFMT) {
+#ifdef S_IFSOCK
+ case S_IFSOCK:
+ outbuf[i] = 's';
+ break;
+#endif
+#ifdef S_IFLNK
+ case S_IFLNK:
+ outbuf[i] = 'l';
+ break;
+#endif
+ case S_IFREG:
+ outbuf[i] = '-'; /* redundant */
+ break;
+ case S_IFBLK:
+ outbuf[i] = 'b';
+ break;
+ case S_IFDIR:
+ outbuf[i] = 'd';
+ break;
+#ifdef S_IFDOOR /* Solaris weirdness */
+ case S_IFDOOR:
+ outbuf[i] = 'D';
+ break;
+#endif /* S_IFDOOR */
+ case S_IFCHR:
+ outbuf[i] = 'c';
+ break;
+#ifdef S_IFIFO
+ case S_IFIFO:
+ outbuf[i] = 'p';
+ break;
+#endif
+ }
+
+ i++;
+ if ((fmode & S_IRUSR) != 0)
+ outbuf[i] = 'r';
+ i++;
+ if ((fmode & S_IWUSR) != 0)
+ outbuf[i] = 'w';
+ i++;
+ if ((fmode & S_IXUSR) != 0)
+ outbuf[i] = 'x';
+ i++;
+
+ if ((fmode & S_IRGRP) != 0)
+ outbuf[i] = 'r';
+ i++;
+ if ((fmode & S_IWGRP) != 0)
+ outbuf[i] = 'w';
+ i++;
+ if ((fmode & S_IXGRP) != 0)
+ outbuf[i] = 'x';
+ i++;
+
+ if ((fmode & S_IROTH) != 0)
+ outbuf[i] = 'r';
+ i++;
+ if ((fmode & S_IWOTH) != 0)
+ outbuf[i] = 'w';
+ i++;
+ if ((fmode & S_IXOTH) != 0)
+ outbuf[i] = 'x';
+ i++;
+
+ outbuf[i] = '\0';
+
+ if ((fmode & S_ISUID) != 0) {
+ if (outbuf[3] == 'x')
+ outbuf[3] = 's';
+ else
+ outbuf[3] = 'S';
+ }
+
+ /* setgid without execute == locking */
+ if ((fmode & S_ISGID) != 0) {
+ if (outbuf[6] == 'x')
+ outbuf[6] = 's';
+ else
+ outbuf[6] = 'l';
+ }
+
+ if ((fmode & S_ISVTX) != 0) {
+ if (outbuf[9] == 'x')
+ outbuf[9] = 't';
+ else
+ outbuf[9] = 'T';
+ }
+
+ return outbuf;
+}
+
+/* do_stat --- provide a stat() function for gawk */
+
+static NODE *
+do_stat(tree)
+NODE *tree;
+{
+ NODE *file, *array;
+ struct stat sbuf;
+ int ret;
+ NODE **aptr;
+ char *pmode; /* printable mode */
+ char *type = "unknown";
+
+ /* check arg count */
+ if (tree->param_cnt != 2)
+ fatal(
+ "stat: called with incorrect number of arguments (%d), should be 2",
+ tree->param_cnt);
+
+ /* directory is first arg, array to hold results is second */
+ file = get_argument(tree, 0);
+ array = get_argument(tree, 1);
+
+ /* empty out the array */
+ assoc_clear(array);
+
+ /* lstat the file, if error, set ERRNO and return */
+ (void) force_string(file);
+ ret = lstat(file->stptr, & sbuf);
+ if (ret < 0) {
+ update_ERRNO();
+
+ set_value(tmp_number((AWKNUM) ret));
+
+ free_temp(file);
+ return tmp_number((AWKNUM) 0);
+ }
+
+ /* fill in the array */
+ aptr = assoc_lookup(array, tmp_string("name", 4), FALSE);
+ *aptr = dupnode(file);
+
+ aptr = assoc_lookup(array, tmp_string("dev", 3), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_dev);
+
+ aptr = assoc_lookup(array, tmp_string("ino", 3), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_ino);
+
+ aptr = assoc_lookup(array, tmp_string("mode", 4), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_mode);
+
+ aptr = assoc_lookup(array, tmp_string("nlink", 5), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_nlink);
+
+ aptr = assoc_lookup(array, tmp_string("uid", 3), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_uid);
+
+ aptr = assoc_lookup(array, tmp_string("gid", 3), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_gid);
+
+ aptr = assoc_lookup(array, tmp_string("size", 4), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_size);
+
+ aptr = assoc_lookup(array, tmp_string("blocks", 6), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_blocks);
+
+ aptr = assoc_lookup(array, tmp_string("atime", 5), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_atime);
+
+ aptr = assoc_lookup(array, tmp_string("mtime", 5), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_mtime);
+
+ aptr = assoc_lookup(array, tmp_string("ctime", 5), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_ctime);
+
+ /* for block and character devices, add rdev, major and minor numbers */
+ if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) {
+ aptr = assoc_lookup(array, tmp_string("rdev", 4), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_rdev);
+
+ aptr = assoc_lookup(array, tmp_string("major", 5), FALSE);
+ *aptr = make_number((AWKNUM) major(sbuf.st_rdev));
+
+ aptr = assoc_lookup(array, tmp_string("minor", 5), FALSE);
+ *aptr = make_number((AWKNUM) minor(sbuf.st_rdev));
+ }
+
+#ifdef HAVE_ST_BLKSIZE
+ aptr = assoc_lookup(array, tmp_string("blksize", 7), FALSE);
+ *aptr = make_number((AWKNUM) sbuf.st_blksize);
+#endif /* HAVE_ST_BLKSIZE */
+
+ aptr = assoc_lookup(array, tmp_string("pmode", 5), FALSE);
+ pmode = format_mode(sbuf.st_mode);
+ *aptr = make_string(pmode, strlen(pmode));
+
+ /* for symbolic links, add a linkval field */
+ if (S_ISLNK(sbuf.st_mode)) {
+ char buf[BUFSIZ*2];
+ int linksize;
+
+ linksize = readlink(file->stptr, buf, sizeof buf);
+ /* should make this smarter */
+ if (linksize == sizeof(buf))
+ fatal("size of symbolic link too big");
+ buf[linksize] = '\0';
+
+ aptr = assoc_lookup(array, tmp_string("linkval", 7), FALSE);
+ *aptr = make_string(buf, linksize);
+ }
+
+ /* add a type field */
+ switch (sbuf.st_mode & S_IFMT) {
+#ifdef S_IFSOCK
+ case S_IFSOCK:
+ type = "socket";
+ break;
+#endif
+#ifdef S_IFLNK
+ case S_IFLNK:
+ type = "symlink";
+ break;
+#endif
+ case S_IFREG:
+ type = "file";
+ break;
+ case S_IFBLK:
+ type = "blockdev";
+ break;
+ case S_IFDIR:
+ type = "directory";
+ break;
+#ifdef S_IFDOOR
+ case S_IFDOOR:
+ type = "door";
+ break;
+#endif
+ case S_IFCHR:
+ type = "chardev";
+ break;
+#ifdef S_IFIFO
+ case S_IFIFO:
+ type = "fifo";
+ break;
+#endif
+ }
+
+ aptr = assoc_lookup(array, tmp_string("type", 4), FALSE);
+ *aptr = make_string(type, strlen(type));
+
+ free_temp(file);
+
+ /* Set the return value */
+ set_value(tmp_number((AWKNUM) ret));
+
+ /* Just to make the interpreter happy */
+ return tmp_number((AWKNUM) 0);
+}
+
+/* dlload --- load new builtins in this library */
+
+NODE *
+dlload(tree, dl)
+NODE *tree;
+void *dl;
+{
+ make_builtin("chdir", do_chdir, 1);
+ make_builtin("symlink", do_symlink, 2);
+ make_builtin("unlink", do_unlink, 1);
+ make_builtin("mkdir", do_mkdir, 2);
+ make_builtin("rmdir", do_rmdir, 1);
+ make_builtin("stat", do_stat, 2);
+
+ return tmp_number((AWKNUM) 0);
+}
+
diff --git a/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch b/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch
new file mode 100644
index 000000000000..3bd267efd179
--- /dev/null
+++ b/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch
@@ -0,0 +1,63 @@
+http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=ac0ef52fe407b89c7968b927c7b2b513cc13963a
+
+--- gawk-4.1.3/configure 2015-05-19 15:38:35.000000000 +0200
++++ gawk-4.1.3/configure 2015-05-19 15:38:35.000000000 +0200
+@@ -10825,7 +10825,46 @@
+
+ if test $_found_readline = yes ; then
+ case $host_os in
+- *bsd* ) _combo="$_combo -ltermcap"
++ *bsd* ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
++$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
++if ${ac_cv_lib_termcap_tgetent+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ltermcap $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char tgetent ();
++int
++main ()
++{
++return tgetent ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_termcap_tgetent=yes
++else
++ ac_cv_lib_termcap_tgetent=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
++$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
++if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
++ _combo="$_combo -ltermcap"
++fi
++
+ ;;
+ esac
+
+--- gawk-4.1.3/m4/readline.m4 2015-04-05 12:19:19.000000000 +0200
++++ gawk-4.1.3/m4/readline.m4 2015-04-05 12:19:19.000000000 +0200
+@@ -92,7 +92,7 @@
+
+ if test $_found_readline = yes ; then
+ case $host_os in
+- *bsd* ) _combo="$_combo -ltermcap"
++ *bsd* ) AC_CHECK_LIB(termcap, tgetent, _combo="$_combo -ltermcap")
+ ;;
+ esac
+ AC_DEFINE(HAVE_LIBREADLINE,1,
diff --git a/sys-apps/gawk/gawk-3.1.8.ebuild b/sys-apps/gawk/gawk-3.1.8.ebuild
new file mode 100644
index 000000000000..9647eae39c9d
--- /dev/null
+++ b/sys-apps/gawk/gawk-3.1.8.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="GNU awk pattern-matching language"
+HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html"
+SRC_URI="mirror://gnu/gawk/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="nls"
+
+RDEPEND="!>=virtual/awk-1"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+SFFS=${WORKDIR}/filefuncs
+
+src_unpack() {
+ unpack ${A}
+
+ # Copy filefuncs module's source over ...
+ cp -r "${FILESDIR}"/filefuncs "${SFFS}" || die "cp failed"
+}
+
+src_prepare() {
+ # use symlinks rather than hardlinks, and disable version links
+ sed -i \
+ -e '/^LN =/s:=.*:= $(LN_S):' \
+ -e '/install-exec-hook:/s|$|\nfoo:|' \
+ Makefile.in doc/Makefile.in
+}
+
+src_configure() {
+ export ac_cv_libsigsegv=no
+ econf \
+ --libexec='$(libdir)/misc' \
+ $(use_enable nls) \
+ --enable-switch
+}
+
+src_compile() {
+ emake || die
+ emake -C "${SFFS}" CC="$(tc-getCC)" || die "filefuncs emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ emake -C "${SFFS}" LIBDIR="$(get_libdir)" install || die
+
+ # Keep important gawk in /bin
+ if use userland_GNU ; then
+ dodir /bin
+ mv "${D}"/usr/bin/gawk "${D}"/bin/ || die
+ dosym /bin/gawk /usr/bin/gawk
+
+ # Provide canonical `awk`
+ dosym gawk /bin/awk
+ dosym gawk /usr/bin/awk
+ dosym gawk.1 /usr/share/man/man1/awk.1
+ fi
+
+ # Install headers
+ insinto /usr/include/awk
+ doins *.h || die
+ # We do not want 'acconfig.h' in there ...
+ rm -f "${D}"/usr/include/awk/acconfig.h
+
+ dodoc AUTHORS ChangeLog FUTURES LIMITATIONS NEWS PROBLEMS POSIX.STD README README_d/*.*
+ for x in */ChangeLog ; do
+ newdoc ${x} ${x##*/}.${x%%/*}
+ done
+}
diff --git a/sys-apps/gawk/gawk-4.0.2.ebuild b/sys-apps/gawk/gawk-4.0.2.ebuild
new file mode 100644
index 000000000000..5ca0de1ce0cd
--- /dev/null
+++ b/sys-apps/gawk/gawk-4.0.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="GNU awk pattern-matching language"
+HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html"
+SRC_URI="mirror://gnu/gawk/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls readline"
+
+# older gawk's provided shared lib for baselayout-1
+RDEPEND="!<sys-apps/baselayout-2.0.1
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ # use symlinks rather than hardlinks, and disable version links
+ sed -i \
+ -e '/^LN =/s:=.*:= $(LN_S):' \
+ -e '/install-exec-hook:/s|$|\nfoo:|' \
+ Makefile.in doc/Makefile.in
+ sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in #413327
+}
+
+src_configure() {
+ export ac_cv_libsigsegv=no
+ econf \
+ --libexec='$(libdir)/misc' \
+ $(use_enable nls) \
+ $(use_with readline)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ # Install headers
+ insinto /usr/include/awk
+ doins *.h || die
+ rm "${ED}"/usr/include/awk/config.h || die
+
+ dodoc AUTHORS ChangeLog FUTURES LIMITATIONS NEWS PROBLEMS POSIX.STD README README_d/*.*
+ for x in */ChangeLog ; do
+ newdoc ${x} ${x##*/}.${x%%/*}
+ done
+}
+
+pkg_postinst() {
+ # symlink creation here as the links do not belong to gawk, but to any awk
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ else
+ local l
+ for l in "${EROOT}"usr/share/man/man1/gawk.1* "${EROOT}"usr/bin/gawk; do
+ [[ -e ${l} && ! -e ${l/gawk/awk} ]] && ln -s "${l##*/}" "${l/gawk/awk}"
+ done
+ [[ ! -e ${EROOT}bin/awk ]] && ln -s "../usr/bin/gawk" "${EROOT}bin/awk"
+ fi
+}
+
+pkg_postrm() {
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ fi
+}
diff --git a/sys-apps/gawk/gawk-4.1.3.ebuild b/sys-apps/gawk/gawk-4.1.3.ebuild
new file mode 100644
index 000000000000..b3a2af376238
--- /dev/null
+++ b/sys-apps/gawk/gawk-4.1.3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="GNU awk pattern-matching language"
+HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html"
+SRC_URI="mirror://gnu/gawk/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="mpfr nls readline"
+
+RDEPEND="mpfr? ( dev-libs/mpfr:0= )
+ readline? ( sys-libs/readline:0= )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ # use symlinks rather than hardlinks, and disable version links
+ sed -i \
+ -e '/^LN =/s:=.*:= $(LN_S):' \
+ -e '/install-exec-hook:/s|$|\nfoo:|' \
+ Makefile.in doc/Makefile.in || die
+ sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in #413327
+ # disable pointless build time hack that breaks cross-compiling #493362
+ sed -i \
+ -e '/check-recursive all-recursive: check-for-shared-lib-support/d' \
+ extension/Makefile.in || die
+
+ EPATCH_OPTS="-Z" \
+ epatch "${FILESDIR}/${P}-bsd_configure_readline.patch" #507468
+}
+
+src_configure() {
+ export ac_cv_libsigsegv=no
+ econf \
+ --libexec='$(libdir)/misc' \
+ $(use_with mpfr) \
+ $(use_enable nls) \
+ $(use_with readline)
+}
+
+src_install() {
+ rm -rf README_d # automatic dodocs barfs
+ default
+
+ # Install headers
+ insinto /usr/include/awk
+ doins *.h || die
+ rm "${ED}"/usr/include/awk/config.h || die
+}
+
+pkg_postinst() {
+ # symlink creation here as the links do not belong to gawk, but to any awk
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ else
+ local l
+ for l in "${EROOT}"usr/share/man/man1/gawk.1* "${EROOT}"usr/bin/gawk; do
+ [[ -e ${l} && ! -e ${l/gawk/awk} ]] && ln -s "${l##*/}" "${l/gawk/awk}"
+ done
+ [[ ! -e ${EROOT}bin/awk ]] && ln -s "../usr/bin/gawk" "${EROOT}bin/awk"
+ fi
+}
+
+pkg_postrm() {
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ fi
+}
diff --git a/sys-apps/gawk/gawk-4.1.4.ebuild b/sys-apps/gawk/gawk-4.1.4.ebuild
new file mode 100644
index 000000000000..303da0e8c823
--- /dev/null
+++ b/sys-apps/gawk/gawk-4.1.4.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="GNU awk pattern-matching language"
+HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html"
+SRC_URI="mirror://gnu/gawk/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="mpfr nls readline"
+
+RDEPEND="mpfr? ( dev-libs/mpfr:0= )
+ readline? ( sys-libs/readline:0= )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ # use symlinks rather than hardlinks, and disable version links
+ sed -i \
+ -e '/^LN =/s:=.*:= $(LN_S):' \
+ -e '/install-exec-hook:/s|$|\nfoo:|' \
+ Makefile.in doc/Makefile.in || die
+ sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in #413327
+ # disable pointless build time hack that breaks cross-compiling #493362
+ sed -i \
+ -e '/check-recursive all-recursive: check-for-shared-lib-support/d' \
+ extension/Makefile.in || die
+ # fix standards conflict on Solaris
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i \
+ -e '/\<_XOPEN_SOURCE\>/s/$/600/' \
+ extension/inplace.c || die
+ fi
+}
+
+src_configure() {
+ export ac_cv_libsigsegv=no
+ econf \
+ --libexec='$(libdir)/misc' \
+ $(use_with mpfr) \
+ $(use_enable nls) \
+ $(use_with readline)
+}
+
+src_install() {
+ rm -rf README_d # automatic dodocs barfs
+ default
+
+ # Install headers
+ insinto /usr/include/awk
+ doins *.h || die
+ rm "${ED}"/usr/include/awk/config.h || die
+}
+
+pkg_postinst() {
+ # symlink creation here as the links do not belong to gawk, but to any awk
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ else
+ local l
+ for l in "${EROOT}"usr/share/man/man1/gawk.1* "${EROOT}"usr/bin/gawk; do
+ [[ -e ${l} && ! -e ${l/gawk/awk} ]] && ln -s "${l##*/}" "${l/gawk/awk}"
+ done
+ [[ ! -e ${EROOT}bin/awk ]] && ln -s "../usr/bin/gawk" "${EROOT}bin/awk"
+ fi
+}
+
+pkg_postrm() {
+ if has_version app-admin/eselect \
+ && has_version app-eselect/eselect-awk ; then
+ eselect awk update ifunset
+ fi
+}
diff --git a/sys-apps/gawk/metadata.xml b/sys-apps/gawk/metadata.xml
new file mode 100644
index 000000000000..3fa1f9889991
--- /dev/null
+++ b/sys-apps/gawk/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="mpfr">use mpfr for high precision arithmetic (-M / --bignum)</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/gcp/Manifest b/sys-apps/gcp/Manifest
new file mode 100644
index 000000000000..cb294d9e292e
--- /dev/null
+++ b/sys-apps/gcp/Manifest
@@ -0,0 +1,4 @@
+DIST gcp-0.1.3.tar.bz2 30946 SHA256 e53c6dd6146cb81421f10fe31c1a7175c24c4aabbc235e4e908b6dbab4e0c8bd SHA512 856561d7d1514b7e90ed4e976b4572b6a82113edb9c3127168053d8993f67ea4efa1d3d5543c318dd961ee9d42679232444e1f397b1c7ba22bfba6b5d7acfc76 WHIRLPOOL 3d1349eef678a614c4b37624829c1063e0c650ad05845d26222f731b5c8fdca6415a86e73bc7e346383b32b7395961115e20ec38f845ce12ed3ce835bcd18c0e
+EBUILD gcp-0.1.3.ebuild 679 SHA256 0e75a3ffb613dd6937e66429da03e012daeb8d5dc6afc0f38520130f426df8b7 SHA512 bc640e728c5c8ff5be4d4791934978675e826864f6f557deab1e338f9c15db58eb9698259ee6111a0eb0b6e7a251206e56f3823403528fb7610ae4641960d54d WHIRLPOOL 77bf5de674ae7e0ad62fa7db0b49373b3f76e0b73718cdde988d7691c4ccf8fe076cab90c64f78c047a5e264999ad7b6efb1f78e8f1310942e5aef8192c724f3
+MISC ChangeLog 358 SHA256 a2df61dd5bcc05a61bdd5b1d82eb29685b5b3815be3f9ea6da8f60f0ad995f81 SHA512 35d42519c450f4be3c15dec2716591129b2ae76d356d4b9c970d1b26818a2ef67260982efe6e8966f29d4233e4e6d776c3ae3f3f676477f6b68f990aa2ba4b4c WHIRLPOOL fb69e6019768a864f7074615bef25077bae69def79e8daff6a16d8aec58e7979c4af003d03ee46c19008dcb1d3bff1f30714e4b12b4dc67f5c7722f312f92d7c
+MISC metadata.xml 219 SHA256 7320390ed8ee7f77ac6dd04628070e92139da7c7f4985d23e24664cd415ba12c SHA512 39ee913ff21c2aaa9f767872e2b49cb3cb982afab04d7b5045eda61368d63c2e3e1d637df59f7fb4ec4f95776e754615a260b37580cc9f18017a7c080955db77 WHIRLPOOL a152a6dbdef5b71550108b0c87306544d703d6caf340387899d770dfcb7064a14a279c1b2133443b11d088302a0f908e5f7f9a16af34353d610e553956a303d9
diff --git a/sys-apps/gcp/gcp-0.1.3.ebuild b/sys-apps/gcp/gcp-0.1.3.ebuild
new file mode 100644
index 000000000000..6c8ec4f32909
--- /dev/null
+++ b/sys-apps/gcp/gcp-0.1.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="File copying utility with progress and I/O indicator"
+HOMEPAGE="http://wiki.goffi.org/wiki/Gcp/en"
+SRC_URI="ftp://ftp.goffi.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]"
+
+src_prepare() {
+ default
+ sed -e '/use_setuptools/d' \
+ -e 's#.\+share/doc.\+#],#' -i setup.py || die
+}
diff --git a/sys-apps/gcp/metadata.xml b/sys-apps/gcp/metadata.xml
new file mode 100644
index 000000000000..e25cd064c44a
--- /dev/null
+++ b/sys-apps/gcp/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 type="person">
+ <email>soap@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/gentoo-functions/Manifest b/sys-apps/gentoo-functions/Manifest
new file mode 100644
index 000000000000..27c7e5f945d2
--- /dev/null
+++ b/sys-apps/gentoo-functions/Manifest
@@ -0,0 +1,6 @@
+DIST gentoo-functions-0.12.tar.gz 11514 SHA256 4a6ddb1d8be7b52aae68761fb26546663b6b0e74b155df263cddfbfa72373965 SHA512 181e09216e1ed78f590e0bb50c60cfb0295bfeef335ed6c957ea7f2a1d6145d91c0a6dc4377bd6cd538fb4e5871e9a5ef8332d91bc91931792d5f05f62bc4705 WHIRLPOOL 18b10a8fab6c4bd4f206d752915d5a43ee21d60d0dec952b2c5db44c5b9e9abfa05aca34984750a3fbbdc48b159a017cb9923afd92b79e3e868da702ef8db267
+EBUILD gentoo-functions-0.12.ebuild 862 SHA256 8ecba8780ea8dfcd7ce9daaa2899fae1ae62fd01808b6abee6b90f2c31b2262d SHA512 dfbc0d762ce7c4ce9bf7f85b1600ae746135e876b57b01acc9d47d886a7efc72786f52bf21e99bf15ed4c13f9b887ba4fe7fe017d97bdf6ab8cb477be83d5746 WHIRLPOOL 5407ff84df0c3678497de20a200b332bf118eef9d9310044660998f156d6da939d9bfe9251f4491bbfd0106b6dcf3f8ec056b8134864234ecbe038651f8fcc99
+EBUILD gentoo-functions-9999.ebuild 859 SHA256 98ea1be4b63cc92d5110b3af9183135186e96679202cbb969da48ab5d6c2eab2 SHA512 8ed5e1564aad2a5c26f8f771cf027f3dc2ae471b08a50ab945cc9703c7dd96fb5a947f9a8e9d5f33a8afcd98876507279187165d0dca8bcf29a5fe56bac25633 WHIRLPOOL 82feff0a19710b851a7e6bdbcc105c9b482ed867db11f18148d3f2ff8c7d6ff56a84495433f3b94ca53f1c59e2ca06c0b393a857fbb09e4a801bf095da94f9ae
+MISC ChangeLog 5239 SHA256 9460e738b2ea06b94dd6c85e7f1448cb399e307e5bcb26e1be37f272b3d62846 SHA512 c7e8111205caba5daf092ae274c8ac3e8370ba2ca5ead57b3f11c3a27517c12fcc90f07a49cd9d2704e34d53b18a50f87249b14842bcee2a35107b5f34fa464a WHIRLPOOL 735cfac218a8315a20e88cf82fd99025d1e976c0a085809c251a6f98f45ba288582d3dac917c96661ef5438ad94f4c212f4e348c450b40a2d17291b55ae38776
+MISC ChangeLog-2015 5503 SHA256 2df4dca4854d7339cf71f9bc729b3acb3573097ad59182bde4ec94425e6bec47 SHA512 49ebd966165f42323c3e70d6f8819ec4734f1f2c983cce378513b2120e82ba3f8bc999285309ffc6a283d1194c898b3c096d8b30a1705c7352958cfccb9084f1 WHIRLPOOL b361df049bc98647ebf66627e58441e9680fcae3e044c495eccebd0235cb3f10296d863874edb72b1c700d6183a2037a2489d76d1a23bf0f96e77833e26486d2
+MISC metadata.xml 626 SHA256 88089c3d0cb964235fb2ae816735d90430873f5c9e17524f80a851dfb7e99a51 SHA512 c63b4d51b0cd8ae662f66870ca15a26300005fd683a4a16643aa553128b2ded5ee0542a8185ae09b989040f602f2f42f79e02574e44bb1ce63457b5c0d8b4dd2 WHIRLPOOL ed25cb9f1dba2d8c107bccbabc4f2da65fa0ef4b8614ccca2cc6794ab4a392d1eb06161cb01c5fb5c527beff38398fe1f45c50b64b2416225f5b927cc1560172
diff --git a/sys-apps/gentoo-functions/gentoo-functions-0.12.ebuild b/sys-apps/gentoo-functions/gentoo-functions-0.12.ebuild
new file mode 100644
index 000000000000..e35ad11a09f4
--- /dev/null
+++ b/sys-apps/gentoo-functions/gentoo-functions-0.12.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gentoo/${PN}.git"
+else
+ SRC_URI="https://github.com/gentoo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="base functions required by all Gentoo systems"
+HOMEPAGE="https://www.gentoo.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ tc-export CC
+ append-lfs-flags
+}
+
+src_install() {
+ emake install DESTDIR="${ED}"
+}
diff --git a/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild b/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild
new file mode 100644
index 000000000000..94ee57ba1007
--- /dev/null
+++ b/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gentoo/${PN}.git"
+else
+ SRC_URI="https://github.com/gentoo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="base functions required by all Gentoo systems"
+HOMEPAGE="https://www.gentoo.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ tc-export CC
+ append-lfs-flags
+}
+
+src_install() {
+ emake install DESTDIR="${ED}"
+}
diff --git a/sys-apps/gentoo-functions/metadata.xml b/sys-apps/gentoo-functions/metadata.xml
new file mode 100644
index 000000000000..1cc4955d2ebd
--- /dev/null
+++ b/sys-apps/gentoo-functions/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>williamh@gentoo.org</email>
+</maintainer>
+<maintainer type="person">
+ <email>blueness@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+ This package contains base shell functions which are required by
+ all Gentoo systems.
+</longdescription>
+<upstream>
+ <remote-id type="github">gentoo/gentoo-functions</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/gentoo-systemd-integration/Manifest b/sys-apps/gentoo-systemd-integration/Manifest
new file mode 100644
index 000000000000..38ab9beeb271
--- /dev/null
+++ b/sys-apps/gentoo-systemd-integration/Manifest
@@ -0,0 +1,6 @@
+DIST gentoo-systemd-integration-7.tar.gz 64243 SHA256 f850a15cc16e80256a144402e8a67e010974b7a5bbc1510858b051a6b9c3c3ce SHA512 cd47caa01d73da57998b6b37d89cbeb53fa722c7f4a31bb03d03762350490cde1db3ce06090df6b6ff25c1cafb40f6c2186efbd52156ebc6d078b4a59d6fef52 WHIRLPOOL f972878ad1fee2cfa2bb101dccaf8cc8ea67e84c650c61510330885c0b114864b88f47a796321ea7c1e53eaa7c66b395c5b005a7f41ba85f1bd645875b5a2315
+EBUILD gentoo-systemd-integration-7.ebuild 784 SHA256 5fcb27ee5483c549e72a812d59253f1f3efa0e7649138b2358266d3307188083 SHA512 35d53e71463b53acf5096b904a5dcd15efbe5eae2a8649ae3ac7d8348a920f14e2e0e5dbb1eb652016e0d6d512ac12664f1456a479a45809953c02520d81afb1 WHIRLPOOL e154d50c0b4d44d6945028ad57d865c85a9767d2e6d211a5e7e4015b313d3ecd18224d47aecfad37eb3c1a170daa24bd8b62b27414be3be8389faa95a413658b
+EBUILD gentoo-systemd-integration-9999.ebuild 792 SHA256 944771ba5a39e3581a62fc013dcd7b5cf33ea37724f22cab49a0a77342b87ac5 SHA512 cefd3d785b861966a977948f1095f959249f33c7ee9de9e1021026d4ec76bb9ac09311fa8c5cce19a5726d92e23bdf940b0bca91e3551755fe61848283c7eed6 WHIRLPOOL 662aa35a69d99a68c035793d678e2d7569074b0b5076a3e24eb977a034efd01ca972d587331338ec050bbf8925f7a1c2394d13d1faa1f2fd0f4e32327ca68a4b
+MISC ChangeLog 3503 SHA256 bd6b92ae325cd5afadbe4c4ef1b2e264505322e608a81ff2f58142c634559888 SHA512 0acaee6fbc2a5b12a5703aff65b2b49003a0a8bc6eb5e73031a14a33e6d050db51d77028abe868768b9d63ed16c9cbe85e563eb73ccb7082c344670fdfaea35c WHIRLPOOL 2c7fd308da4d053c99181e2b03f8db4844d1cc841c242dbab213743789e9aa1e62d374412843f9d75fb18b9eda260a364dd5821bc226396202076eb841509a66
+MISC ChangeLog-2015 5129 SHA256 aa053242220a9ee96b891c591a957cb69a4c4208021e0a638ae2775bbfc04784 SHA512 13160f9bb0806a6931abb790135f712144871a9c453451018ef201ab6b0ad9637f900bd59e6fdaa64f24d4ade8c6c1909e045c3c912cb4830cfa274d85e12bbb WHIRLPOOL af62dceddbb4dca5e0dd16372eb0256a920269818cd0fddf6a0407286311c40b59c3b3ee6ea4e35a88682cc3c0f90751a393e4752cc61af828bbd712b665a9b5
+MISC metadata.xml 355 SHA256 e76b6777a93292cb4b2f8e9f98cede234e4771f2d8e85c430059eb005e32011b SHA512 b590b927b555441da6f665dbf637ffaa27651f074a62d1738959c5913f45ee648146f9054e07ade42d5f28f93cb350b43c94299a50506d01d446de22ebacdbc0 WHIRLPOOL 713436cbd994616c830de0a1e15d5125f10b4fc2c3a141d03222ef39bade8d1439ac6248c7d20ad3192d877afdb04a0b835eb8f4537d9078587814306f87d4b5
diff --git a/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-7.ebuild b/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-7.ebuild
new file mode 100644
index 000000000000..7a5689085273
--- /dev/null
+++ b/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-systemd-integration.git"
+ inherit autotools git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 sparc x86"
+fi
+
+inherit systemd
+
+DESCRIPTION="systemd integration files for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Systemd"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=sys-apps/systemd-207
+ !sys-fs/eudev
+ !sys-fs/udev"
+DEPEND=">=sys-apps/systemd-207
+ virtual/pkgconfig"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/systemd-m4"
+fi
+
+src_prepare() {
+ default
+ [[ ${PV} != 9999 ]] || eautoreconf
+}
diff --git a/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-9999.ebuild b/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-9999.ebuild
new file mode 100644
index 000000000000..1813ffb135fb
--- /dev/null
+++ b/sys-apps/gentoo-systemd-integration/gentoo-systemd-integration-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-systemd-integration.git"
+ inherit autotools git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+inherit systemd
+
+DESCRIPTION="systemd integration files for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Systemd"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=sys-apps/systemd-207
+ !sys-fs/eudev
+ !sys-fs/udev"
+DEPEND=">=sys-apps/systemd-207
+ virtual/pkgconfig"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/systemd-m4"
+fi
+
+src_prepare() {
+ default
+ [[ ${PV} != 9999 ]] || eautoreconf
+}
diff --git a/sys-apps/gentoo-systemd-integration/metadata.xml b/sys-apps/gentoo-systemd-integration/metadata.xml
new file mode 100644
index 000000000000..0c04b426d911
--- /dev/null
+++ b/sys-apps/gentoo-systemd-integration/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 type="project">
+ <email>systemd@gentoo.org</email>
+ <name>Gentoo systemd team</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="bitbucket">mgorny/gentoo-systemd-integration</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/gnome-disk-utility/Manifest b/sys-apps/gnome-disk-utility/Manifest
new file mode 100644
index 000000000000..7fd8b61d0dc4
--- /dev/null
+++ b/sys-apps/gnome-disk-utility/Manifest
@@ -0,0 +1,7 @@
+DIST gnome-disk-utility-3.22.1.tar.xz 1455508 SHA256 a3a4a187549f812e3837ae17dd9fa60afcacd84389d696058de254fe18b51ec3 SHA512 f8ea64eb5adc3d6d55669bfa85c80a23f91ecb86f8632ae4ef035ad5062375e4fd73581f6ad12f6d83b1d6d98508a046b64a5a6544dea59765da2ff4b42b2d37 WHIRLPOOL 6475850dd993aa122d242f250afe20ca06294573c5b058e08d4e5670877b2f362b4930e1259230ec831c6ba964b2cc85261d46d555de1c692cae9831c4d6650c
+DIST gnome-disk-utility-3.24.1.tar.xz 1947976 SHA256 878f0489947c813b44eb89f5fdc2790d757cd8565f26f22b950d55b8585653a1 SHA512 ae6bf83e005733ae985987411a9fe25b0059f64484fc0d613ad54af478130782974607bec53713ee36c2a28de653ceba82b0fb091aee57101773c0eeeaaed2d5 WHIRLPOOL d0db0e6e2a300645956df13e3bf528e1761ac7dbad0e92d1c8cbf81f5fc5ad06462605ecc5a348d2251c9821060b2e746714d2e2a39a40260a5c6dc6b0a523dc
+EBUILD gnome-disk-utility-3.22.1.ebuild 1058 SHA256 a83bc539438c31653786975e72c41b30a8b91f9d8525c7540157fa14ce609273 SHA512 5d521e064f7af967328969c485fe93247560bc9d05396e4096faf470b3b9c09fdcce389a7e50e5340de289e264b4b89d7dfcf5c0ba216e67ac3c5b61a4088671 WHIRLPOOL 7ddaffc1b0ef2d6f939f52c2053489eaf3a7ae8857a8e1fe3296c23eb2cfe061d24e372d57206836184b2a3b22cc43c4195ca65f9523b54291e9743766d47ecd
+EBUILD gnome-disk-utility-3.24.1.ebuild 1060 SHA256 07ba3fd982ac9caa101865e0cc8a03655f8592f1e54d6af9a2e5bce992fde8e1 SHA512 a17ccec72b48ee7b42af751bcc8a4e8adc990f8bfc933a75af307e60ee5e69bec6af1ef1f58a82a2346e3d1a167de8ca707076245f1d7225f7ae3fbc5531c87c WHIRLPOOL 7c01ba8079046bc2933e725a727ae60b446ffed8896e14c0ad6891a391fde85c8d86b9f987fc8c139031c742b19113f6f63f8f7c5a3c9888fb2a5fb7d1c95bd0
+MISC ChangeLog 6102 SHA256 9e1995cb22dcccd32b4dea885e02ec967dbd35c22ce3b08e3262c687913aae89 SHA512 82368c3222d84fc21a7f3bf39d0f91cd4c2fb6f27c3c9cd280081a9005ef0f592cb7b993260559e33b97d8457b10946ea30d37412245982a33ab4d09e8bfa6a1 WHIRLPOOL 803db2edb2b34f68e9ce53ca5a042f8cf72cb7ff0a357c339da0e6bb1fd44a73b1e508424ffc837014e164544d0e1da0904851531be51879de0c1c9f46427ae0
+MISC ChangeLog-2015 18204 SHA256 f01d4be3a23a30fa5e8e525c04f58d16f081f558978b1aac8f796ac93a26055a SHA512 1dd21fd372a8f38d7e3ff72ec69fe606cea77d4d7330759a75712659592370e7fff32330542a29ce7071391ce2cfd39c3331bd3257f8ac801f4a3299fbbd6b4a WHIRLPOOL 046425ea28245e7ce711fd47ff29476c3ee2b5dc836764c78409dd55df9b677a55e8069e6fb6701b46eefab881cd879b695e1df0eb40faf10b13de941d919bb2
+MISC metadata.xml 348 SHA256 bf23740cbc2216a493fdfe97ca03d44724f2a3ca9153663835600c9bda428176 SHA512 7da9aaf34df822f6f62b606fb00655a4d2a7bf710cb9e265dea98b887365d64536c927caa2810b9b1d92dbeb8c93f9e09b7e529e4304bdc4de5d4f6d61208c24 WHIRLPOOL a78e6ae8e9f63e599859f600fa087617ef4322cf999080bc55cd1e963a11eb9cb060ee1b192adf8ade89da846bf4908fcf0c5493afc0508b4b8907d2d176f086
diff --git a/sys-apps/gnome-disk-utility/gnome-disk-utility-3.22.1.ebuild b/sys-apps/gnome-disk-utility/gnome-disk-utility-3.22.1.ebuild
new file mode 100644
index 000000000000..93b42aaebd36
--- /dev/null
+++ b/sys-apps/gnome-disk-utility/gnome-disk-utility-3.22.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Disk Utility for GNOME using udisks"
+HOMEPAGE="https://git.gnome.org/browse/gnome-disk-utility"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="fat gnome systemd"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc x86"
+
+COMMON_DEPEND="
+ >=app-arch/xz-utils-5.0.5
+ >=app-crypt/libsecret-0.7
+ >=dev-libs/glib-2.31:2[dbus]
+ dev-libs/libpwquality
+ >=media-libs/libcanberra-0.1[gtk3]
+ >=media-libs/libdvdread-4.2.0
+ >=sys-fs/udisks-2.1.1:2
+ >=x11-libs/gtk+-3.16.0:3
+ >=x11-libs/libnotify-0.7:=
+ systemd? ( >=sys-apps/systemd-209:0= )
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-themes/adwaita-icon-theme
+ fat? ( sys-fs/dosfstools )
+ gnome? ( >=gnome-base/gnome-settings-daemon-3.8 )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.50.2
+ dev-libs/appstream-glib
+ dev-libs/libxslt
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable gnome gsd-plugin) \
+ $(use_enable systemd libsystemd)
+}
diff --git a/sys-apps/gnome-disk-utility/gnome-disk-utility-3.24.1.ebuild b/sys-apps/gnome-disk-utility/gnome-disk-utility-3.24.1.ebuild
new file mode 100644
index 000000000000..c1966f5ce0c9
--- /dev/null
+++ b/sys-apps/gnome-disk-utility/gnome-disk-utility-3.24.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Disk Utility for GNOME using udisks"
+HOMEPAGE="https://git.gnome.org/browse/gnome-disk-utility"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="fat gnome systemd"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+
+COMMON_DEPEND="
+ >=app-arch/xz-utils-5.0.5
+ >=app-crypt/libsecret-0.7
+ >=dev-libs/glib-2.31:2[dbus]
+ dev-libs/libpwquality
+ >=media-libs/libcanberra-0.1[gtk3]
+ >=media-libs/libdvdread-4.2.0
+ >=sys-fs/udisks-2.1.1:2
+ >=x11-libs/gtk+-3.16.0:3
+ >=x11-libs/libnotify-0.7:=
+ systemd? ( >=sys-apps/systemd-209:0= )
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-themes/adwaita-icon-theme
+ fat? ( sys-fs/dosfstools )
+ gnome? ( >=gnome-base/gnome-settings-daemon-3.8 )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-libs/appstream-glib
+ dev-libs/libxslt
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable gnome gsd-plugin) \
+ $(use_enable systemd libsystemd)
+}
diff --git a/sys-apps/gnome-disk-utility/metadata.xml b/sys-apps/gnome-disk-utility/metadata.xml
new file mode 100644
index 000000000000..72800be15e75
--- /dev/null
+++ b/sys-apps/gnome-disk-utility/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 type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+<use>
+ <flag name="fat">Include FAT16/FAT32 support
+ (<pkg>sys-fs/dosfstools</pkg>)</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/gpet/Manifest b/sys-apps/gpet/Manifest
new file mode 100644
index 000000000000..2d94b509c8d9
--- /dev/null
+++ b/sys-apps/gpet/Manifest
@@ -0,0 +1,5 @@
+DIST gpet-0.4.tar.bz2 352653 SHA256 ff5c20718624b948062bef77f5083eddef2a7ef7ca66e09a8b003dfa3e9f632d SHA512 e373d57ab67d71fb750ee9af93893d036ff26f764f317328117745a4440c0559c2356866c09acfe579473e950e003744ae0a308df3b284d46097dcfe967c122e WHIRLPOOL db3d834460a06520275c0d5fdc005227e940277b8a0126eae38e483245688dd821370b63d995b131a46a1f43c88138de3d6ebe6a8cf3c5e46d7a3edca51bc358
+EBUILD gpet-0.4.ebuild 477 SHA256 d5611dcd601f1b0319368263747f5b756c19bc0d8a2e427759426cc921d8b155 SHA512 e5fb64396ded1401ffadce287274103b5a52d3d9300a5753a6922fb2502530c7bdbbe97d26f1c8c89ac3ef29b6e6b798e1611a117846736971e77ba481c5026b WHIRLPOOL 3c93e0312fe01e754d3806a1cb7a43729cd2fda629e8a5fbd58bf9c03faa3c56465b9d4659cb773e9e980a80b24111d3171151832fbff91d3d3b14e94fc5dc34
+MISC ChangeLog 2163 SHA256 65f2b9c9f715b0978ee01d310b08a233d669386949d0732dea6f56b5d14a1801 SHA512 ffda787153dd162488e2cc4d56dc5732f2e7ddaf87948d333401519c4186ed5b84099f4e867f62df9c37549cd95157c85ceb7a51977992b5fa6673c85ba1a892 WHIRLPOOL 9a2fa346472ac0b52a021f21f8f2f5fc62f98b2e6a50ad73951c7f5057bef2e1c772dea637d43107d4f1d6485f971242a422a92e07d47581da72aeea700c01cb
+MISC ChangeLog-2015 697 SHA256 c3f75ee0b00dedb6ce6b93aa4a8185dcc5270bc7333346a6dae768b5e17ed29d SHA512 8feb6dfd6683e447c3f54b7934c620ac12dc8ccf0eac5f60c66f142886f6d02eee6ff64710f023a3b682a4e9573d8d036fe61958b712ef430e9b741ea8402297 WHIRLPOOL 006f5abccf886aa95572132454ed453197c8c228c67ae3040f4f69b525ac32516322db1f759c14c24f8aed6610030dc571bafd1909009a0cf1c084cbd9da1753
+MISC metadata.xml 301 SHA256 e40733eac2566e2855dbd78045eaad7f5ebca445672c54923445412ec97cea9f SHA512 fc0ba10b181262a33c2acd9a694585af1d05f1a09398a4f42e7693bd92990654d3812c0eb0ee254425662a63815e0211ea34f20ef2cb7c8fefcc0b6e37ec5b74 WHIRLPOOL ffe981d1badbe4899e957d7c5ad0021ade5e7fd923b123f83813422b0a11e3c083823162843b4114c99ec05b1943a2dc1fe039626e5d8eac7e7f2b1f65c22d3b
diff --git a/sys-apps/gpet/gpet-0.4.ebuild b/sys-apps/gpet/gpet-0.4.ebuild
new file mode 100644
index 000000000000..116891f39944
--- /dev/null
+++ b/sys-apps/gpet/gpet-0.4.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="GTK+ based TOMOYO policy editor"
+HOMEPAGE="http://en.sourceforge.jp/projects/gpet/"
+SRC_URI="mirror://sourceforge.jp/gpet/53178/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="gnome-base/gconf
+ sys-devel/gettext
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/pango"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig"
diff --git a/sys-apps/gpet/metadata.xml b/sys-apps/gpet/metadata.xml
new file mode 100644
index 000000000000..ac3f3e7a0378
--- /dev/null
+++ b/sys-apps/gpet/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 type="person">
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge-jp">gpet</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/gptfdisk/Manifest b/sys-apps/gptfdisk/Manifest
new file mode 100644
index 000000000000..bee8fc59a911
--- /dev/null
+++ b/sys-apps/gptfdisk/Manifest
@@ -0,0 +1,7 @@
+DIST gptfdisk-1.0.1.tar.gz 195378 SHA256 864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7 SHA512 6aa2ed6213183ea38ce7dd6e7f4f23b88cc56bed5a4d078f563b9e0a3c276eacf869e28a27ccb4e473753f7bced7ecb5de4535626f9ed22b7a59a39906d0419c WHIRLPOOL b520ec11cf62d0d2a1b66af1d4acfbd24c2df4dad2c00562900d4f90fb67ee76b6fa2aefc5d730b6ce30551baafddd9d3e2631ad2022b067bed3cdc943fadb5c
+DIST gptfdisk-1.0.3.tar.gz 199924 SHA256 89fd5aec35c409d610a36cb49c65b442058565ed84042f767bba614b8fc91b5c SHA512 80d437bfa2365abfffbd4812ea928fcebd52c5421de321cf190d395549e32c5ebdbb2d060cc4b95f77fe13cdd719f4d2bb3d0ed5d97792b100325f92d7c852d7 WHIRLPOOL 9de244cd4c1a3fe9672d2e50b46f3f690ddfaff306046b610351a1f75697199e6392e7048f12edbe82285b5eb773c1802417329feb610ed609049a5318525b99
+EBUILD gptfdisk-1.0.1.ebuild 1147 SHA256 763eb0f64221d58e8198fdb3e8e764388c6d32e5497d9df0ff0ae3e8ffb19713 SHA512 9b41a8424c197206d934afae1f29475c7e7861e9a65a0fd62cc56d5d029673f46900f3e63abb35a33ec4dc51e75a2b63724399fe807b7bce8e62635d18254b94 WHIRLPOOL 2cff53385d3efb428e7712a68965dab3f35bd9c4f9e5e171424df7aa614ae1d1e74f7c11fbe96accce6a6f6383e87f52a8e7854ecd2ecdad110748f15b87ab3e
+EBUILD gptfdisk-1.0.3.ebuild 1199 SHA256 dc784ff7d60351ef46d1acddbf39a33ace197a4468ed4e97b2092b2a56c1419d SHA512 522a3218406a2a9128161a12cdf72f62e5450885b2df313bd37e6ffbd3d129c8d54c09d135a102aa75b7f7e7117df621be325ca11f36baf9e64496ac3e4cabf2 WHIRLPOOL 080f6e1f439b7e1de5fedc16332c23d457ab2c316c124fb7a8d31dda7ffa4ae0d0bcca7a2213be7f22c122882653d404c23e780d851fe53c2b34c30123af19ab
+MISC ChangeLog 4117 SHA256 6952af45edc98e796f6645a34c28aab370154fe48e21a8490733cd4d24be2262 SHA512 b0793fa4170f21b921b04cda6d989962cdef186ca4af02a1dcba624f914b68672b620101341356c1b58b794d38ab43f58b38c58190b7f2dc7e855a85a5a8dec3 WHIRLPOOL c05fe356d1ead744507111e046f5e2a6108063fa355262d11eb515bcb44067f0f9facf0d4b3fb9e2450f0bf29865eadb8a8abe6983df1deb5487832cb8d03f02
+MISC ChangeLog-2015 9109 SHA256 90417f19814175bb6548f4583b2a66820b0b0fa5f352dbb5b17d8a51f1df740b SHA512 f559d1f0983aac2a5d8919ecc145aed6a68cabc00c7435bca583f576aff00da8d8eef267a27e203dd1760d15050a9fbe3c23f48c9abd9c0ced02ab02d28d6fdb WHIRLPOOL d4e7e22a12943b6845fe8deee6c38397a38f8adcdc978d6deff22fd260549de042ec2d23c45f28b443c7ca61e19a7bc5970a644dae7eaade7852e44ed8e34141
+MISC metadata.xml 339 SHA256 2b059b110e2a09d74c403973ea97ae4a95b117687e587c9c8ba9ad479d2aed20 SHA512 d8334a3e741adf97739f9fef66d7b38bfab9e2d189ac5fbc96ab27a7c1551938b6184ebb08b03ef8b6864f6e43d536836f373e03f3491cacc8f6ee3496f615b5 WHIRLPOOL 74424f6030acb4f4fa3b1ba5f77354a9ba4ca09bb6cf1c510e1eb70a88f08b7861d7747c9b79d4af954a93ba4dad749f76c067a13b72638123fbf5e92d48fdb2
diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.1.ebuild b/sys-apps/gptfdisk/gptfdisk-1.0.1.ebuild
new file mode 100644
index 000000000000..90515a8c8f68
--- /dev/null
+++ b/sys-apps/gptfdisk/gptfdisk-1.0.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="GPT partition table manipulator for Linux"
+HOMEPAGE="https://www.rodsbooks.com/gdisk/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="kernel_linux ncurses static"
+
+LIB_DEPEND="
+ dev-libs/popt[static-libs(+)]
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:0=[static-libs(+)] )
+ kernel_linux? ( sys-apps/util-linux[static-libs(+)] )" # libuuid
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CXX PKG_CONFIG
+
+ if ! use ncurses; then
+ sed -i \
+ -e '/^all:/s:cgdisk::' \
+ Makefile || die
+ fi
+
+ sed \
+ -e '/g++/s:=:?=:g' \
+ -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
+ -i Makefile || die
+
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
+ doman *.8
+ dodoc NEWS README
+}
diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.3.ebuild b/sys-apps/gptfdisk/gptfdisk-1.0.3.ebuild
new file mode 100644
index 000000000000..b813139d2707
--- /dev/null
+++ b/sys-apps/gptfdisk/gptfdisk-1.0.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="GPT partition table manipulator for Linux"
+HOMEPAGE="https://www.rodsbooks.com/gdisk/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="kernel_linux ncurses static"
+
+# libuuid from util-linux is required.
+LIB_DEPEND="
+ dev-libs/popt[static-libs(+)]
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:0=[static-libs(+)] )
+ kernel_linux? ( sys-apps/util-linux[static-libs(+)] )
+"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="
+ ${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ default
+
+ tc-export CXX PKG_CONFIG
+
+ if ! use ncurses ; then
+ sed -i \
+ -e '/^all:/s:cgdisk::' \
+ Makefile || die
+ fi
+
+ sed \
+ -e '/g++/s:=:?=:g' \
+ -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
+ -i Makefile || die
+
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
+ doman *.8
+ dodoc NEWS README
+}
diff --git a/sys-apps/gptfdisk/metadata.xml b/sys-apps/gptfdisk/metadata.xml
new file mode 100644
index 000000000000..62c9aa4fad0c
--- /dev/null
+++ b/sys-apps/gptfdisk/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 type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gptfdisk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/gradm/Manifest b/sys-apps/gradm/Manifest
new file mode 100644
index 000000000000..f1178da41df2
--- /dev/null
+++ b/sys-apps/gradm/Manifest
@@ -0,0 +1,12 @@
+AUX respect-gentoo-env-r3.patch 1999 SHA256 e326de4772ad07f2259b22b328a05f27b62118589421c1b1113dc83e90b199a4 SHA512 61e7919f138525b3a674e36a90e921ca6a5ea61334d2af102b2d90b4eae0e2a4ad5af6abdaa89cb456f3c4263aa44a945d4cd21b857a8428a56f1ee2caac96b0 WHIRLPOOL ee4106f4e1c2acf4a36a79d69e178d2d32cd542a5b7ca5e21b216700bbe859aa70e5d46e7918a47250e195f9a63df147db99259786c252731b6401795c325a5f
+DIST gradm-3.1-201603152148.tar.gz 91549 SHA256 07f4decbc95ddfb8a88a35ab2960705fb48d0daf108afc09c2b752e2e86fd7b5 SHA512 a423db1dfdaa0b068970b92dc970d6e10bfc20695437e92d967b064c3efe05114ab6de672eec984ab2f048b67b12ec8c6667a71bc584f03e5d2f0ebab1476158 WHIRLPOOL 69b4808f71c55a51784397870d115b851dedd845f8bd588b75d7a39cab140e29eb20ec83542979d6265b203ec78c9a45bc6b1eecb6bcaa061450a3e8fac2512d
+DIST gradm-3.1-201607172312.tar.gz 91667 SHA256 4281c72e3e82f0ea2c01d124975c19326b2157c10911fa065c1549195d5e6ee4 SHA512 61f14038ee555b99e4d0096dd01697d8adba45e057ffceadb44eafbdfba807b53030684c5073d169c005902acfa6baa673975ed4ab00ad035941c209f8f1d2e2 WHIRLPOOL 38fd29b829b78aa016e922ba011bcfeba0cc8de8d45ccacf2b7658153dcbed54df7035c6bcead8b4956595f812f3ca35a8553b364feb37352e5e39eee15c2661
+DIST gradm-3.1-201608131257.tar.gz 91949 SHA256 2b771346458f55805713e4cdfc4fefba1da88826dd9ecff38dacd0087331a578 SHA512 0947abda8d4085fd6f4a569a29f146d6f093c7013ea3aba50df4fb740487b93696b63ab475eb862cfcd26aeb62cd69a55c3d6083b91a2eb9349ad566735f8cfe WHIRLPOOL 99d9c32ec7bba80e57cc3b543a9f9df5c0317226b7e5cf146b5d6fcab3b600577adc79f83cc031f94a3526875a99ce9af97de08139b3e933bf341a35d41c7d70
+DIST gradm-3.1-201708012022.tar.gz 92238 SHA256 d5de919a0f3bf70b0591f1bd9e2dbba9e5d0c55b5df36727e49f3cf0ef4b5482 SHA512 1c319ce5b102ad54d0c4d0c43222ed755719bb2568c9a4575b62965a73b0765265dc7068488e5e34df52ed9382b17e4bf1b32a8eef20a4d7a534f3f9a4ba2b3d WHIRLPOOL 427faaa42847b0b6f10ce90d9425e62c0722b3675ab04c2d7982514ec86f16a45bc098d9e59dd21d11b660b34a0b6ef75e1130142b5bc5edd4ab7d40ef14da89
+EBUILD gradm-3.1.201603152148.ebuild 1087 SHA256 58cf731314fd554b1c55b3dda5413aef0be4cfc45cc752ca3f95a93a36a458b0 SHA512 244be34609ca2fa984753feab794b46e0ad3b8fa81fca4639a38fcb83432c6f2321950858f2df5c3e6fe7478e90b68843b78b93fde5a7ca7271bee31a957df08 WHIRLPOOL 09f45d425453cfd773c7f2358f26cae4d36d921fee908a805e0fd3ed4b567025e37a3ccee9be841a824a1a0624b9c9fe8bc4e10d242d0b3618a5294dc0e54369
+EBUILD gradm-3.1.201607172312.ebuild 1087 SHA256 58cf731314fd554b1c55b3dda5413aef0be4cfc45cc752ca3f95a93a36a458b0 SHA512 244be34609ca2fa984753feab794b46e0ad3b8fa81fca4639a38fcb83432c6f2321950858f2df5c3e6fe7478e90b68843b78b93fde5a7ca7271bee31a957df08 WHIRLPOOL 09f45d425453cfd773c7f2358f26cae4d36d921fee908a805e0fd3ed4b567025e37a3ccee9be841a824a1a0624b9c9fe8bc4e10d242d0b3618a5294dc0e54369
+EBUILD gradm-3.1.201608131257.ebuild 1089 SHA256 815fe28d38076058cb53a086ecd2d583a7beed7b02e68b94e0dbdb3884b650aa SHA512 8d62d77806df539870f99bed612ce8b604a6028e39ca599055f3438b56229b2a112b14a3102641e005f8627c2212073b67d01be17769aa34fec58243dd451b04 WHIRLPOOL 63cea406ad18b478736cba0bcaab0fab3b3d22f17f90e5598d42bf8a037a9dd6bbaca5981e05396ba0e1479e02891a26ee6a227e308cea638c282e1001f7d4b3
+EBUILD gradm-3.1.201708012022.ebuild 1089 SHA256 cb048c3cc296767536fbda85a4da4753e16cd4116f2a47f2e9628b94e1628b7d SHA512 07431c67dea7b5ff607a97846e512cc4fade7a68836905bfdd13a9bc63bcc3bdbcf5538a00048308a3ec3039bfed1087074dbc27efb87d589a8ca8ef6e60d514 WHIRLPOOL 13c0eeb433d3729441f71a43a5cf7a28a0e4c15642431ccb2643ff1e4d99e602f0e38acbfc7da0dc5998e273f93f9fa501d71f24f4b58002bde4d688d5df6958
+MISC ChangeLog 4315 SHA256 2f7680c144e0b4c81b132844b4c6070a85f518485e10293d1b8331a9840d16ec SHA512 81257082d02be1fd57bb827b5c0c3ca27aec39f16ddd8b29a0dd6af6f6b23208b875ac7f2cd2426974e05715cfb4c442f849ff8f59261e27e31d5c993a631a1c WHIRLPOOL 29bdebd186512212f3f7ab27706f2f7eb22e4e577a3490cf0149859a4eff2343299ac15b090dc3aefd500d92c4b3239b19dba3ffd0cbf8f1fd240a43db0059c8
+MISC ChangeLog-2015 38696 SHA256 b4b451476c00c7d64660959370da9f3fd284aeae0e3390c66e057508d354dc48 SHA512 e9b0fa2e3bcf51b8d11459e1eb942733c271ad1d49ad1c8fd5ee996eeb369563fa58877e40936dbd578fb9947a4abb870deb03a6440b2c82777d760b64e2595c WHIRLPOOL a6a8128eb8e540703b93d697428232413389f4861106ce50e2fa7533b48b9b4bb80e56bdad86b76e1192025bd8d2d17b50b2e27d782f7a35336e8ebdab7b8b3e
+MISC metadata.xml 363 SHA256 396a1b76d7e556b65a2cdadebd405a8aa196e63ed92c4fee89b2ecbee172c59a SHA512 b848c5de5ed09c4843c3e75d59ea4697c5d1c1fa2ce8c9e9a0bf38b5102d57f25aa626f3c6295f4f3a345b1cedc15553fb45b460bf41e73df43eb2eef6e00281 WHIRLPOOL 4b3c0f55297f9987a13cc2324c5f7f648743208f781ce3ba293a0cb6ac14d347532bfd0b39918b5f6ced8a8a7eb38f0115d44e9cab235675ce6a9f693da4072f
diff --git a/sys-apps/gradm/files/respect-gentoo-env-r3.patch b/sys-apps/gradm/files/respect-gentoo-env-r3.patch
new file mode 100644
index 000000000000..7c899b139745
--- /dev/null
+++ b/sys-apps/gradm/files/respect-gentoo-env-r3.patch
@@ -0,0 +1,42 @@
+diff -Naur gradm2.orig/Makefile gradm2/Makefile
+--- gradm2.orig/Makefile 2013-08-09 16:28:37.000000000 -0400
++++ gradm2/Makefile 2013-08-10 07:57:12.000000000 -0400
+@@ -18,18 +18,18 @@
+ BISON=/usr/bin/bison
+ #YACC := $(shell if [ -x $(BYACC) ]; then echo $(BYACC); else echo $(BISON); fi)
+ YACC=$(BISON)
+-MKNOD=/bin/mknod
++MKNOD=true
+ #for dietlibc
+ #CC=/usr/bin/diet /usr/bin/gcc
+ CC=/usr/bin/gcc
+ FIND=/usr/bin/find
+-STRIP=/usr/bin/strip
++STRIP=true
+ LIBS := $(shell if [ "`uname -m`" != "sparc64" -a "`uname -m`" != "x86_64" ]; then echo "-lfl" ; else echo "" ; fi)
+ OPT_FLAGS := -O2
+ # for older versions of grsecurity, comment the above line and uncomment the below:
+ #OPT_FLAGS := $(shell if [ "`uname -m`" != "sparc64" ] && [ "`uname -m`" != "x86_64" ]; then echo "-O2" ; else echo "-O2 -m64" ; fi)
+-CFLAGS := $(OPT_FLAGS) -fPIE -Wcast-qual -DGRSEC_DIR=\"$(GRSEC_DIR)\" -D_LARGEFILE64_SOURCE
+-LDFLAGS= -pie
++CFLAGS := $(OPT_FLAGS) -fPIE -Wcast-qual -DGRSEC_DIR=\"$(GRSEC_DIR)\" -D_LARGEFILE64_SOURCE $(CFLAGS)
++LDFLAGS+= -pie
+ INSTALL = /usr/bin/install -c
+
+ # FHS
+@@ -167,10 +167,11 @@
+ $(MKNOD) -m 0622 $(DESTDIR)/dev/grsec c 1 13 ; \
+ fi \
+ fi
+- @if [ -d $(DESTDIR)/etc/udev/rules.d ] ; then \
+- echo "ACTION!=\"add|change\", GOTO=\"permissions_end\"" > $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
+- echo "KERNEL==\"grsec\", MODE=\"0622\"" >> $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
+- echo "LABEL=\"permissions_end\"" >> $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
++ @mkdir -p $(DESTDIR)/lib/udev/rules.d
++ @if [ -d $(DESTDIR)/lib/udev/rules.d ] ; then \
++ echo "ACTION!=\"add|change\", GOTO=\"permissions_end\"" > $(DESTDIR)/lib/udev/rules.d/80-grsec.rules ; \
++ echo "KERNEL==\"grsec\", MODE=\"0622\"" >> $(DESTDIR)/lib/udev/rules.d/80-grsec.rules ; \
++ echo "LABEL=\"permissions_end\"" >> $(DESTDIR)/lib/udev/rules.d/80-grsec.rules ; \
+ fi
+ @if [ -f $(DESTDIR)/sbin/udevadm ] ; then \
+ $(DESTDIR)/sbin/udevadm trigger --action=change ; \
diff --git a/sys-apps/gradm/gradm-3.1.201603152148.ebuild b/sys-apps/gradm/gradm-3.1.201603152148.ebuild
new file mode 100644
index 000000000000..1501e02d909d
--- /dev/null
+++ b/sys-apps/gradm/gradm-3.1.201603152148.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit flag-o-matic toolchain-funcs versionator eutils udev
+
+MY_PV="$(replace_version_separator 2 -)"
+
+DESCRIPTION="Administrative interface for the grsecurity Role Based Access Control system"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://dev.gentoo.org/~blueness/hardened-sources/gradm/${PN}-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ pam? ( virtual/pam )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-gentoo-env-r3.patch
+ sed -i -e "s:/lib/udev:$(get_udevdir):" Makefile || die
+ eapply_user
+}
+
+src_compile() {
+ local target
+ use pam || target="nopam"
+
+ emake ${target} CC="$(tc-getCC)" OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ fperms 711 /sbin/gradm
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+ ewarn
+}
diff --git a/sys-apps/gradm/gradm-3.1.201607172312.ebuild b/sys-apps/gradm/gradm-3.1.201607172312.ebuild
new file mode 100644
index 000000000000..1501e02d909d
--- /dev/null
+++ b/sys-apps/gradm/gradm-3.1.201607172312.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit flag-o-matic toolchain-funcs versionator eutils udev
+
+MY_PV="$(replace_version_separator 2 -)"
+
+DESCRIPTION="Administrative interface for the grsecurity Role Based Access Control system"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://dev.gentoo.org/~blueness/hardened-sources/gradm/${PN}-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ pam? ( virtual/pam )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-gentoo-env-r3.patch
+ sed -i -e "s:/lib/udev:$(get_udevdir):" Makefile || die
+ eapply_user
+}
+
+src_compile() {
+ local target
+ use pam || target="nopam"
+
+ emake ${target} CC="$(tc-getCC)" OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ fperms 711 /sbin/gradm
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+ ewarn
+}
diff --git a/sys-apps/gradm/gradm-3.1.201608131257.ebuild b/sys-apps/gradm/gradm-3.1.201608131257.ebuild
new file mode 100644
index 000000000000..92ec90a27904
--- /dev/null
+++ b/sys-apps/gradm/gradm-3.1.201608131257.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit flag-o-matic toolchain-funcs versionator eutils udev
+
+MY_PV="$(replace_version_separator 2 -)"
+
+DESCRIPTION="Administrative interface for the grsecurity Role Based Access Control system"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://dev.gentoo.org/~blueness/hardened-sources/gradm/${PN}-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ pam? ( virtual/pam )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-gentoo-env-r3.patch
+ sed -i -e "s:/lib/udev:$(get_udevdir):" Makefile || die
+ eapply_user
+}
+
+src_compile() {
+ local target
+ use pam || target="nopam"
+
+ emake ${target} CC="$(tc-getCC)" OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ fperms 711 /sbin/gradm
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+ ewarn
+}
diff --git a/sys-apps/gradm/gradm-3.1.201708012022.ebuild b/sys-apps/gradm/gradm-3.1.201708012022.ebuild
new file mode 100644
index 000000000000..580760657184
--- /dev/null
+++ b/sys-apps/gradm/gradm-3.1.201708012022.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit flag-o-matic toolchain-funcs versionator eutils udev
+
+MY_PV="$(replace_version_separator 2 -)"
+
+DESCRIPTION="Administrative interface for the grsecurity Role Based Access Control system"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://dev.gentoo.org/~blueness/hardened-sources/gradm/${PN}-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ pam? ( virtual/pam )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-gentoo-env-r3.patch
+ sed -i -e "s:/lib/udev:$(get_udevdir):" Makefile || die
+ eapply_user
+}
+
+src_compile() {
+ local target
+ use pam || target="nopam"
+
+ emake ${target} CC="$(tc-getCC)" OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ fperms 711 /sbin/gradm
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+ ewarn
+}
diff --git a/sys-apps/gradm/metadata.xml b/sys-apps/gradm/metadata.xml
new file mode 100644
index 000000000000..2fdcc0c0ceb0
--- /dev/null
+++ b/sys-apps/gradm/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 type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+<maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest
new file mode 100644
index 000000000000..eaf38d9b718b
--- /dev/null
+++ b/sys-apps/grep/Manifest
@@ -0,0 +1,10 @@
+AUX grep-2.27-splice.patch 2056 SHA256 86522748127f671235867bc84f9dd03347dd0e816b09ce4b168d4662857f082e SHA512 cc3da88a206af1550ed00d8d08f8619853d72b0f4e5066ea56c402104b23c5e46ef7e984b3f879fe33b32392506133622c0ca086394f03247c4274956af52473 WHIRLPOOL 199811a2fe591bba08467a17a4e3cdf7992b2c80e9b48a9a96cfe423b8f2f9a129598612576785e3d01e3a489647c69b65e967f344f61725a2c4ba86970fb2bc
+DIST grep-2.27.tar.xz 1360388 SHA256 ad4cc44d23074a1c3a8baae8fbafff2a8c60f38a9a6108f985eef6fbee6dcaeb SHA512 d67f16cc5f931a455d5287badbaf080967da573d290430f440e578a563cff4f4c0c2668f60dbb8bc71eaed289f075957006c10c6827f0da1a49df49efd3f0781 WHIRLPOOL f1bd591f60998a5515f661ddd576593a3f24f8ea2e7c2ae5a94699da53cf98ba3bc422c3577ea6c05be48544ac6c2382d3da000e52aeb2affa05d75ef0617af9
+DIST grep-3.0.tar.xz 1375156 SHA256 e2c81db5056e3e8c5995f0bb5d0d0e1cad1f6f45c3b2fc77b6e81435aed48ab5 SHA512 0e9a00df9d492f399230bae0264942edaf64bb926f93edb7922f27b075a86ba0a78698f54996cc522b6261aa01a8ecbeadeb68523d4470a9941f242c3ae24c58 WHIRLPOOL 656271228bbbc3550560d2f4ec80031a8b0d9c662447afeea6e3c65c859dadde244af8c32ce03681495b3e86913468344fc29a5a52a53aa04eb5963b3a8a9529
+DIST grep-3.1.tar.xz 1370880 SHA256 db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e SHA512 05494381c7dd8aad7e2ee4c17450de8d7b969a99dcfe17747db60df3475bf02d5323d091e896e8343e4f3251c29dc7f0b7a9f93c575c9d58ee2a57014c2c9d26 WHIRLPOOL 2c321b4936f4f0268f1b3c522cd86f828cee395a5712a4a3024c6f5359389734f1b6fa2ca1fb5d17c968af0b3c00fcc5c475e05798578d15442677bb82ec9e39
+EBUILD grep-2.27-r1.ebuild 1402 SHA256 e58312b453c8b8aa8d4118b3b136b3bf3a983b30fbd04a55a6b9881557b44532 SHA512 4f36b61dcf73306d8d49fdb94168c6312d46f0995dbeec288c95da193276dcfce3dc85c10aa539a8e68abe052395012d0004de1ed643f19fc7641afe7eed6fab WHIRLPOOL c4c5a5e545b56ffe0f89ad4f3cbff80a2e62d99895a0b5639952c4b43a1a25fad05af3ecdc6e03d601eea4c14589464fd70976adf21ad1cab648d84ed6c55d3a
+EBUILD grep-3.0.ebuild 1373 SHA256 7e32968aa24c852009accdc5ec879a49aba5090e8c6436cbcf9547e543d00a4f SHA512 c54c667fe9658d3912804b69a9695d60c497dd5f71976cfc3ca7fc6d33a11b4c4d7c2c29730a5e21b824e7eb58e76d698ac0d569805f437f2aa09316fc525c2c WHIRLPOOL 49e6d1e5bf0e0e729a9995ed311abff627eeedd2842b11d223aa66587e490bb643c9f7ff6a1cbae010bee04801dbc71c0fa37b70ad0d0eb5cc613a3dbc6ed04d
+EBUILD grep-3.1.ebuild 1383 SHA256 315e2ef2a5e15be81eb65094e79fb4ad0c382bb8b38846e07d0ed5c22d48d42a SHA512 181beb8c30a3bb7b0375682c6f68c081b5bd8b4eb41247dc860c59f0ebd07fb19e7efa6ec32e4a584af09ab777a4c72e1ecbcf92d38b15167a65c86ee47daec6 WHIRLPOOL 218dc97f34c842cdac4ddcb943bbeae2ee65e837297fc74471b031050ce8d8abbc1c7295c226d76eedb25f548f4779402645b0ae13ee85810e97ad4f23d03061
+MISC ChangeLog 6381 SHA256 8419b87ff2f197a983e46458dffc7c05530bd9f30d320fc7e21dfb0145240bd9 SHA512 ce46a115df1931ed1ff2789ebcfc9a5dc85051e16293e42fb373974914ea5399c6047eec4d1ee1e19ade88bcf4915ddd14bed3d9d256ed50c64215bfc41d1152 WHIRLPOOL 54b61442f2f99a476bb4a646ddf8222b97362386721bfecff70345bb7fb08e99389e7c81559826028b6de027ba6c60094623397dd1810ccb26ae13fb4cfeb9c1
+MISC ChangeLog-2015 21767 SHA256 f7633e3e3efd1c1bc7ec8f4afc61e1703a140747c99ecb111658f143b0f3fe77 SHA512 febec50749ad8b8743e397ac1e2b8110beabf1ad518c20542461029ac61b4269170216a3c1b95eaedd31511b8ddeae1607841ae569ed41ecc1092b02a7ce8595 WHIRLPOOL 5a388c1d69707638430ca7c7b624a8e2498a260052d7534543a52c625b4915b999a1a6648b7cf7c6032101919bccf938f52c092c1420db290e0f7671eabcae8d
+MISC metadata.xml 327 SHA256 19dd79e00bf9844243981eff5d7678d4da7d5e66e6bd3d3609858f724f695bb1 SHA512 394c0bd736594ec5ef916f1bd0b4b1d8b5547132bb375fe04f67da49fd0cdaec184206e8255f054b8cb5656dc5426e92a51781758cc1b6373200f31bd3152d6f WHIRLPOOL 86663699cf49da5d02fc9a780ea79055cc93dd6b39e40c13fe9d506dbc69154514e600fcb2f008933ca96284e69a42ac6dffaff8219a42318c7b4cd5cd4993ab
diff --git a/sys-apps/grep/files/grep-2.27-splice.patch b/sys-apps/grep/files/grep-2.27-splice.patch
new file mode 100644
index 000000000000..6c36fe07fd20
--- /dev/null
+++ b/sys-apps/grep/files/grep-2.27-splice.patch
@@ -0,0 +1,60 @@
+http://lists.gnu.org/archive/html/bug-grep/2016-12/msg00036.html
+
+From 7ad47abbcb070946000771a829b51224720b8cef Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Tue, 27 Dec 2016 11:16:32 -0800
+Subject: [PATCH] grep: fix bug with '... | grep pat >> /dev/null'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Problem reported by Benno Fünfstück (Bug#25283).
+* NEWS: Document this.
+* src/grep.c (drain_input) [SPLICE_F_MOVE]:
+Don't assume /dev/null is always acceptable output to splice.
+* tests/grep-dev-null-out: Test for the bug.
+---
+ NEWS | 7 ++++---
+ src/grep.c | 14 +++++++++-----
+ tests/grep-dev-null-out | 2 ++
+ 3 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/grep.c b/src/grep.c
+index f28f3c287609..aebab2060308 100644
+--- a/src/grep.c
++++ b/src/grep.c
+@@ -1728,11 +1728,15 @@ drain_input (int fd, struct stat const *st)
+ {
+ #ifdef SPLICE_F_MOVE
+ /* Should be faster, since it need not copy data to user space. */
+- while ((nbytes = splice (fd, NULL, STDOUT_FILENO, NULL,
+- INITIAL_BUFSIZE, SPLICE_F_MOVE)))
+- if (nbytes < 0)
+- return false;
+- return true;
++ nbytes = splice (fd, NULL, STDOUT_FILENO, NULL,
++ INITIAL_BUFSIZE, SPLICE_F_MOVE);
++ if (0 <= nbytes || errno != EINVAL)
++ {
++ while (0 < nbytes)
++ nbytes = splice (fd, NULL, STDOUT_FILENO, NULL,
++ INITIAL_BUFSIZE, SPLICE_F_MOVE);
++ return nbytes == 0;
++ }
+ #endif
+ }
+ while ((nbytes = safe_read (fd, buffer, bufalloc)))
+diff --git a/tests/grep-dev-null-out b/tests/grep-dev-null-out
+index 13a4843957a6..c8128d5cc6a4 100755
+--- a/tests/grep-dev-null-out
++++ b/tests/grep-dev-null-out
+@@ -8,4 +8,6 @@ require_timeout_
+ ${AWK-awk} 'BEGIN {while (1) print "x"}' </dev/null |
+ returns_ 124 timeout 1 grep x >/dev/null || fail=1
+
++echo abc | grep b >>/dev/null || fail=1
++
+ Exit $fail
+--
+2.11.0
+
diff --git a/sys-apps/grep/grep-2.27-r1.ebuild b/sys-apps/grep/grep-2.27-r1.ebuild
new file mode 100644
index 000000000000..30072ddf8869
--- /dev/null
+++ b/sys-apps/grep/grep-2.27-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU regular expression matcher"
+HOMEPAGE="https://www.gnu.org/software/grep/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls pcre static"
+
+LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ nls? ( virtual/libintl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ static? ( ${LIB_DEPEND} )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-splice.patch
+ sed -i \
+ -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \
+ src/egrep.sh || die #523898
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ # Always use pkg-config to get lib info for pcre.
+ export ac_cv_search_pcre_compile=$(
+ usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" ''
+ )
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ $(use_enable nls) \
+ $(use_enable pcre perl-regexp)
+}
diff --git a/sys-apps/grep/grep-3.0.ebuild b/sys-apps/grep/grep-3.0.ebuild
new file mode 100644
index 000000000000..26fb14cd91a9
--- /dev/null
+++ b/sys-apps/grep/grep-3.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU regular expression matcher"
+HOMEPAGE="https://www.gnu.org/software/grep/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls pcre static"
+
+LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ nls? ( virtual/libintl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ static? ( ${LIB_DEPEND} )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_prepare() {
+ sed -i \
+ -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \
+ src/egrep.sh || die #523898
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ # Always use pkg-config to get lib info for pcre.
+ export ac_cv_search_pcre_compile=$(
+ usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" ''
+ )
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ $(use_enable nls) \
+ $(use_enable pcre perl-regexp)
+}
diff --git a/sys-apps/grep/grep-3.1.ebuild b/sys-apps/grep/grep-3.1.ebuild
new file mode 100644
index 000000000000..165ffbce3706
--- /dev/null
+++ b/sys-apps/grep/grep-3.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU regular expression matcher"
+HOMEPAGE="https://www.gnu.org/software/grep/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls pcre static"
+
+LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ nls? ( virtual/libintl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ static? ( ${LIB_DEPEND} )"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+src_prepare() {
+ sed -i \
+ -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \
+ src/egrep.sh || die #523898
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ # Always use pkg-config to get lib info for pcre.
+ export ac_cv_search_pcre_compile=$(
+ usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" ''
+ )
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ $(use_enable nls) \
+ $(use_enable pcre perl-regexp)
+}
diff --git a/sys-apps/grep/metadata.xml b/sys-apps/grep/metadata.xml
new file mode 100644
index 000000000000..f4a75bc8b992
--- /dev/null
+++ b/sys-apps/grep/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:grep</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/grepcidr/Manifest b/sys-apps/grepcidr/Manifest
new file mode 100644
index 000000000000..0ae07c022e57
--- /dev/null
+++ b/sys-apps/grepcidr/Manifest
@@ -0,0 +1,4 @@
+DIST grepcidr-2.0.tar.gz 16557 SHA256 61886a377dabf98797145c31f6ba95e6837b6786e70c932324b7d6176d50f7fb SHA512 c592c7a96e5e711cb5ee10ea1f63907411f69c0014c0bdc845f4b026766b6466db624063af1411b994b53aa7e694fe99ecb1120c11543c5ea1b11afc9558f7aa WHIRLPOOL b35386ec975a682a55b8d258a102680512018da449a123fa6f73f77337ce9946b4dd95ef2491fb36eaf92532350ee35bea346e8542fc9fd8197e2dd28648efc8
+EBUILD grepcidr-2.0.ebuild 562 SHA256 64f815bca22832ac15585a872477f07fe559ab22a85b2b4f0e561c23031a3b7a SHA512 df53bdaf07d496229843698b4842e5d7550c79f53e0b191c8778ff51b1b852db3a4a9727808679d9fe7517f1c6427dea76b1646a3027e24e4c2652c0d8676a1a WHIRLPOOL 4564e75b177b3f481d5afb2d6e7e2f42a9555b8fe896e0b5a10f2e5d3c315208c06dbcc542c6b1143688ad6ae9a11ba6d2115f2ed5066f594eb7188cd1229d23
+MISC ChangeLog 436 SHA256 cdaa2bab021360cb27a99323f0e1e4a333ffa443751a3511f1f9b8832d88d967 SHA512 ccd5e6bbcd6a12ba6a3f4907003f3d8d0c7808e01f090401c3df5684052092bacbfde55e4de5dddac4a4a9b8ee68f3e4e031a5aabf3a75790de40bc4ec9583c2 WHIRLPOOL 283f04198628ad88241d723b9f49b5ffb62ead8567f92726bc3453c2d28521b85ac3c12df991a9d231f48e4b765458f31264c177a840204c87dbc154ce0762fd
+MISC metadata.xml 249 SHA256 15c3b8c41a629764f3ac3005ca017fa7df49f48f540211a22549d7d2900ef03b SHA512 1723b9b2663814b898832e18aea1a02520775e545e256fb70a8829e2b0515e59b5abab985c995b9ae2f509d95ea4601ac0085ab0d1653cdda0ebe90f775f6e5b WHIRLPOOL 4fd539d6cb011d39a83d0c854c61363f15b2ae0fee1e9036056f384222307fc5910ab87429ace43bbe330b6a5156dbd41c32f80776ea56f3b35892a7ed84107d
diff --git a/sys-apps/grepcidr/grepcidr-2.0.ebuild b/sys-apps/grepcidr/grepcidr-2.0.ebuild
new file mode 100644
index 000000000000..77b3863961fd
--- /dev/null
+++ b/sys-apps/grepcidr/grepcidr-2.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Filter IPv4 and IPv6 addresses matching CIDR patterns"
+HOMEPAGE="http://www.pc-tools.net/unix/grepcidr/"
+SRC_URI="http://www.pc-tools.net/files/unix/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EROOT}/usr" install
+
+ dodoc README ChangeLog
+}
diff --git a/sys-apps/grepcidr/metadata.xml b/sys-apps/grepcidr/metadata.xml
new file mode 100644
index 000000000000..5840601f180f
--- /dev/null
+++ b/sys-apps/grepcidr/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/groff/Manifest b/sys-apps/groff/Manifest
new file mode 100644
index 000000000000..8e48ff0dbdb9
--- /dev/null
+++ b/sys-apps/groff/Manifest
@@ -0,0 +1,11 @@
+AUX groff-1.19.2-man-unicode-dashes.patch 574 SHA256 e8fa93d3536bb6053ec104b567444cec7da8f101e24923dc4003efc8b7bf5bbe SHA512 17c8d757b93052ceb8342e062965d680ba17aec117d9a0eaf8636bb192a71040e9955bdc0cbb1f55db49a7a43c7ad93da0c8933ad012b8d36c956ac1c4079436 WHIRLPOOL da0acffeb5cb873000c6904d667b13263468363121d5696e9f9f92bc45cd1fe7d0d2b7765fc2bb6471807613d5043e9d2035279d6448a958534e3dea679b5a01
+AUX groff-1.22.2-parallel-mom.patch 3903 SHA256 b5bf5c74e59099d68e47eafac57cea26aa2f53f424a5612435559ecf5c6454a7 SHA512 314fe3d619dc7dd373f1d9ea75d4d8cb365fc7278a958a3dec09e95ba3bf75180edb5f4ec3d43b4791b0252b733f9916e6189794b098b09171f45eb65bee713f WHIRLPOOL 86aed5e346deee22aa6e6c32d82ae60c559af42c4d96bcb7d32c836c98176d49c01f4c2ced0e925592e5288cb65731cc6338003ad2fa3bfd1c23b7c31f33efe4
+AUX groff-1.22.3-parallel-mom.patch 378 SHA256 11c8dfabafcdf8f105862d56b1ff3596d5d18b81c8049a0080c18b2c9ab9d35b SHA512 29330641fcdcc052cc1760dd69c523f2cfaf4264110b7471ac3dfc00e12a371fa69f3a6902221a575da3b89fb7acc5b161234c95e5a4c4d105bf46d7ffd5d038 WHIRLPOOL 9d48f516b3669ecd068a203725de29f2775cef160ee430c5afa1aaa83894994c464b83e812811fe747744d709c344c5f037e68bf6a5b29827e6cbc781eee1ea6
+DIST groff-1.22.1-japanese.patch.bz2 52968 SHA256 cbdfdd7981f4e4e99839218bb4a6bc1b981cc23e946b6959fef15644d29c9f47 SHA512 883d15dd2f1420a067d35737c45431f33f05bbe3c7e7edab0e119416117b5d096972d71452eae94bfd3df23aa7d6595fc6e65208bd4fba86815162bdf9af8bef WHIRLPOOL e59bee5ddd2136e98b1881e695915e9da91db17fba68fc8508e2bd477a462499f2dfa6f569729a56620301b97e532a8585f9eacdc92ac92cdb87316b4c7687a0
+DIST groff-1.22.2.tar.gz 4019913 SHA256 380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a13d2076 SHA512 ea34db53f075b6816827b07ac3d6a19ed50529c939044337eb3124575ac3b41363e1d81bbd5bf552a7a10f6b1dd233d6e7acaf646e18cfe94464c59dc20ffe80 WHIRLPOOL 61f24635140f388672761822c696fb051fc26050da6d7d771a73af112f477cd65d934129786794cd39bc3dcb69a88c8dcb7e4739b980a73d68ec518f54aed861
+DIST groff-1.22.3.tar.gz 4188772 SHA256 3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5 SHA512 c526ab203d13a9c9d110bcd3149fe50d1cd0d309437e9e2731a7ce90d890507ebc0a2331899ecf4dba2938daa756b6094cf76fd347a0ded59797c70ccfd0c95c WHIRLPOOL 671b8f9641d5969d995616b7e7aaa5928cab9658b3017e1d87c39c507e32724350ab81f73475fc159bae0f305d106d944e490f1d7b53b8715a5367dc11140fdb
+EBUILD groff-1.22.2.ebuild 2840 SHA256 d09fb767e15e41ef226fdaa94e1fb7f4656779b199129d83db744c6140304faf SHA512 62eaa5c8efbe59d5d9d531910ed27c542c3ac9d40641c7ac22566cf8afecee914d8d24747cf7a72d04d2c333d9193c6bb5130662d6f5047e58cae2154857dd3c WHIRLPOOL a84671fb2ea9492da19dbe3c4476071b3a2a28551e763324470c85888b12cc342e5e9d197c7ffc6a742871d8717c7b442816d219d20d33d49fa650d2e5d2abcf
+EBUILD groff-1.22.3.ebuild 2567 SHA256 3c8f27ad24cf1604b23dd2865465bfa068f2e10380a2e9c98efbd6c624df9c61 SHA512 4e702cb2c82141cd8b953c569ec9d9dd7e9ac9132bd2d0b94e54bd97ba02419ff2c840a3ad3f0e76ec64baec2fd256edb3e619395754579567a85d59df326565 WHIRLPOOL 2a7eef66a6b18af65e2aff3aa23f1387db859a2815a083a0c6708fb5fe8e1dcb17ae50f992993a887b2533050afe0846042dff76d6d4f44f7a7698fb52882fbc
+MISC ChangeLog 4054 SHA256 90d37a1518c3789bc84f9eb6f9f621a1fe0442675661e5e65d5eb274ff8aa7cf SHA512 50836ef113daeb8e6d4d581dc52e5f465b5afb98e2195b5ef2544b6f82b5cbe4354058ecbe5aa7f81e19e6740f34d0b8843297b61535e1cc9d629a54a0f40bba WHIRLPOOL 787734fd7bd5edeb32f6400d45bfd941b1eccca81b3185fc550a88ebad10002ed0700d39f6a5cfac59270137c622136883cbcfccced5e3c18cc13d304c9f20b0
+MISC ChangeLog-2015 20376 SHA256 afe914b80ab00ef3294af07c4954ce479bc7961383cc154e5d6ddfd5ba29c3f9 SHA512 7bb243794dff4dd3253bb7d66edcaddb673fe86f88d1375966af206163301ae2dee7a3bc38c89375912d3333a8cc44979dc141dcae27e0546d41c2b5bf1fc002 WHIRLPOOL 469525a771ebd4a9f33ecebb71992a6c877194204477642a72ee9ca1338900a930a0e06f7c05423fa8c8d4e749f453b08925cb534c8d41e50551a1a41616a228
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch b/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch
new file mode 100644
index 000000000000..d85a8330d274
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch
@@ -0,0 +1,24 @@
+format dashes as dashes so as to not confuse people
+
+http://bugs.gentoo.org/16108
+http://bugs.gentoo.org/17580
+http://bugs.gentoo.org/121502
+
+--- tmac/man.local
++++ tmac/man.local
+@@ -1,2 +1,6 @@
+ .\" This file is loaded after an-old.tmac.
+ .\" Put any local modifications to an-old.tmac here.
++.if '\*[.T]'utf8' \{\
++. char \- \N'45'
++. char - \N'45'
++.\}
+--- tmac/mdoc.local
++++ tmac/mdoc.local
+@@ -1,2 +1,6 @@
+ .\" This file is loaded after doc.tmac.
+ .\" Put any local modifications to doc.tmac here.
++.if '\*[.T]'utf8' \{\
++. char \- \N'45'
++. char - \N'45'
++.\}
diff --git a/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch b/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch
new file mode 100644
index 000000000000..7cf3c22295d5
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch
@@ -0,0 +1,96 @@
+From 9f3af719383ab525c86ee0f514e268ef8494330a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 6 Dec 2013 20:40:10 -0500
+Subject: [PATCH] fix parallel build w/gropdf and mom examples
+
+The contrib/mom/examples/ directory uses the helper script from
+src/devices/gropdf/. Currently though, parallel builds might fail
+like so:
+
+...
+make[2]: Entering directory `.../groff-1.22.2/contrib/mom'
+GROFF_COMMAND_PREFIX= GROFF_BIN_PATH="`echo .../groff-1.22.2/src/roff/groff .../groff-1.22.2/src/roff/troff .../groff-1.22.2/src/devices/grops .../groff-1.22.2/src/devices/gropdf | sed -e 's| *|:|g'`" PDFMOM_BIN_PATH=".../groff-1.22.2/src/devices/gropdf" .../groff-1.22.2/src/devices/gropdf/pdfmom -F.../groff-1.22.2/font -F.../groff-1.22.2/font -M.../groff-1.22.2/tmac -M.../groff-1.22.2/tmac -M. examples/letter.mom >examples/letter.pdf
+GROFF_COMMAND_PREFIX= GROFF_BIN_PATH="`echo .../groff-1.22.2/src/roff/groff .../groff-1.22.2/src/roff/troff .../groff-1.22.2/src/devices/grops .../groff-1.22.2/src/devices/gropdf | sed -e 's| *|:|g'`" PDFMOM_BIN_PATH=".../groff-1.22.2/src/devices/gropdf" .../groff-1.22.2/src/devices/gropdf/pdfmom -F.../groff-1.22.2/font -F.../groff-1.22.2/font -M.../groff-1.22.2/tmac -M.../groff-1.22.2/tmac -M. examples/mom-pdf.mom >examples/mom-pdf.pdf
+/bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory
+make[2]: *** [examples/letter.pdf] Error 127
+/bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory
+make[2]: *** [examples/mom-pdf.pdf] Error 127
+make[2]: Leaving directory `.../groff-1.22.2/contrib/mom'
+make[1]: *** [contrib/mom] Error 2
+...
+make[2]: Entering directory `.../groff-1.22.2/src/devices/gropdf'
+sed -f .../groff-1.22.2/arch/misc/shdeps.sed \
+ -e "s|@VERSION@|1.22.2|" \
+ -e "s|@PERLPATH@|/usr/bin/perl|" ./pdfmom.pl >pdfmom
+
+The top level makefile tries to account for this in general with OTHERDIRS,
+but looks like src/devices/gropdf/ was added to this variable (which holds
+contrib/mom/ too) because gropdf installs a shell script, and the other
+prog vars require it to be a dir of things to compile.
+
+Declare a new prog var for holding shell scripts.
+
+URL: http://crbug.com/324116
+URL: https://bugs.gentoo.org/487276
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+2013-12-06 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (SHPROGDIRS): Declare.
+ (PROGDIRS): Add $(SHPROGDIRS).
+ (OTHERDIRS): Delete src/devices/gropdf.
+ ($(SHPROGDIRS):): Add to existing rule.
+ ($(OTHERDIRS):): Depend on $(SHPROGDIRS).
+---
+ Makefile.in | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a794de7..8e478af 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -602,12 +602,15 @@ CCPROGDIRS=\
+ src/utils/addftinfo
+ CPROGDIRS=\
+ src/utils/pfbtops
++SHPROGDIRS=\
++ src/devices/gropdf
+ PROGDEPDIRS=\
+ arch/misc
+ PROGDIRS=\
+ $(PROGDEPDIRS) \
+ $(CCPROGDIRS) \
+ $(CPROGDIRS) \
++ $(SHPROGDIRS) \
+ $(XPROGDIRS)
+ DEVDIRS=\
+ font/devps \
+@@ -637,7 +640,6 @@ OTHERDIRS=\
+ contrib/glilypond \
+ contrib/hdtbl \
+ contrib/pdfmark \
+- src/devices/gropdf \
+ font/devpdf \
+ contrib/mom \
+ contrib/gdiffmk
+@@ -778,7 +780,7 @@ $(CCPROGDIRS): FORCE $(LIBDIRS)
+ -f $(top_srcdir)/Makefile.ccpg \
+ -f Makefile.dep $(do)
+
+-$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
++$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(SHPROGDIRS): FORCE $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
+ @$(ENVSETUP); \
+ if test $(srcdir) = .; then \
+ srcdir=.; \
+@@ -809,7 +811,7 @@ $(GNULIBDIRS): FORCE
+ $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \
+ esac
+
+-$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
++$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) $(SHPROGDIRS)
+
+ $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
+ @$(ENVSETUP); \
+--
+1.8.4.3
+
diff --git a/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch b/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch
new file mode 100644
index 000000000000..10661ac27f2c
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch
@@ -0,0 +1,11 @@
+--- groff-1.22.3/Makefile.in
++++ groff-1.22.3/Makefile.in
+@@ -864,7 +864,7 @@
+ -f $(top_srcdir)/Makefile.ccpg \
+ -f Makefile.dep $(do)
+
+-$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE \
++$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(SHPROGDIRS): FORCE \
+ $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
+ @$(ENVSETUP); \
+ if test $(srcdir) = .; then \
diff --git a/sys-apps/groff/groff-1.22.2.ebuild b/sys-apps/groff/groff-1.22.2.ebuild
new file mode 100644
index 000000000000..379d1b58aff2
--- /dev/null
+++ b/sys-apps/groff/groff-1.22.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Text formatter used for man pages"
+HOMEPAGE="https://www.gnu.org/software/groff/groff.html"
+SRC_URI="mirror://gnu/groff/${P}.tar.gz
+ l10n_ja? ( https://dev.gentoo.org/~naota/patch/${PN}-1.22.1-japanese.patch.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples X l10n_ja"
+
+RDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libXaw
+ x11-libs/libSM
+ x11-libs/libICE
+ )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ l10n_ja? ( virtual/yacc )"
+
+DOCS=( BUG-REPORT ChangeLog MORE.STUFF NEWS PROBLEMS PROJECTS README REVISION TODO VERSION )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 #121502
+ epatch "${FILESDIR}"/${PN}-1.22.2-parallel-mom.patch #487276
+
+ # Make sure we can cross-compile this puppy
+ if tc-is-cross-compiler ; then
+ sed -i \
+ -e '/^GROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/groff:' \
+ -e '/^TROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/troff:' \
+ -e '/^GROFF_BIN_PATH=/s:=.*:=:' \
+ -e '/^GROFF_BIN_DIR=/s:=.*:=:' \
+ contrib/*/Makefile.sub \
+ doc/Makefile.in \
+ doc/Makefile.sub || die "cross-compile sed failed"
+ fi
+
+ local pfx=$(usex prefix ' Prefix' '')
+ cat <<-EOF >> tmac/mdoc.local
+ .ds volume-operating-system Gentoo${pfx}
+ .ds operating-system Gentoo${pfx}/${KERNEL}
+ .ds default-operating-system Gentoo${pfx}/${KERNEL}
+ EOF
+
+ if use l10n_ja ; then
+ epatch "${WORKDIR}"/${PN}-1.22.1-japanese.patch #255292 #350534 #450796
+ eautoconf
+ eautoheader
+ fi
+
+ # make sure we don't get a crappy `g' nameprefix on UNIX systems with real
+ # troff (GROFF_G macro runs some test to see, its own troff doesn't satisfy)
+ sed -i -e 's/^[ \t]\+g=g$/g=/' configure || die
+}
+
+src_configure() {
+ econf \
+ --with-appresdir="${EPREFIX}"/usr/share/X11/app-defaults \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_with X x) \
+ $(usex l10n_ja '--enable-japanese' '')
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ # The following links are required for man #123674
+ dosym eqn /usr/bin/geqn
+ dosym tbl /usr/bin/gtbl
+
+ if ! use examples ; then
+ # The pdf files might not be generated if ghostscript is unavailable. #602020
+ local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf"
+ if [[ -e ${pdf} ]] ; then
+ # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732
+ mv "${pdf}" "${ED}"/usr/share/doc/${PF}/pdf/ || die
+ fi
+ rm -rf "${ED}"/usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sys-apps/groff/groff-1.22.3.ebuild b/sys-apps/groff/groff-1.22.3.ebuild
new file mode 100644
index 000000000000..5c88efb3500a
--- /dev/null
+++ b/sys-apps/groff/groff-1.22.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Text formatter used for man pages"
+HOMEPAGE="https://www.gnu.org/software/groff/groff.html"
+SRC_URI="mirror://gnu/groff/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples X"
+
+RDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libXaw
+ x11-libs/libSM
+ x11-libs/libICE
+ )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+DOCS=( BUG-REPORT ChangeLog MORE.STUFF NEWS PROBLEMS PROJECTS README REVISION TODO VERSION )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 #121502
+ epatch "${FILESDIR}"/${PN}-1.22.3-parallel-mom.patch #487276
+
+ # Make sure we can cross-compile this puppy
+ if tc-is-cross-compiler ; then
+ sed -i \
+ -e '/^GROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/groff:' \
+ -e '/^TROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/troff:' \
+ -e '/^GROFF_BIN_PATH=/s:=.*:=:' \
+ -e '/^GROFF_BIN_DIR=/s:=.*:=:' \
+ contrib/*/Makefile.sub \
+ doc/Makefile.in \
+ doc/Makefile.sub || die "cross-compile sed failed"
+ fi
+
+ local pfx=$(usex prefix ' Prefix' '')
+ cat <<-EOF >> tmac/mdoc.local
+ .ds volume-operating-system Gentoo${pfx}
+ .ds operating-system Gentoo${pfx}/${KERNEL}
+ .ds default-operating-system Gentoo${pfx}/${KERNEL}
+ EOF
+
+ # make sure we don't get a crappy `g' nameprefix on UNIX systems with real
+ # troff (GROFF_G macro runs some test to see, its own troff doesn't satisfy)
+ sed -i -e 's/^[ \t]\+g=g$/g=/' configure || die
+}
+
+src_configure() {
+ econf \
+ --with-appresdir="${EPREFIX}"/usr/share/X11/app-defaults \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ # The following links are required for man #123674
+ dosym eqn /usr/bin/geqn
+ dosym tbl /usr/bin/gtbl
+
+ if ! use examples ; then
+ # The pdf files might not be generated if ghostscript is unavailable. #602020
+ local pdf="${ED}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf"
+ if [[ -e ${pdf} ]] ; then
+ # Keep mom-pdf.pdf since it's more of a manual than an example. #454196 #516732
+ mv "${pdf}" "${ED}"/usr/share/doc/${PF}/pdf/ || die
+ fi
+ rm -rf "${ED}"/usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sys-apps/groff/metadata.xml b/sys-apps/groff/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/groff/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/gscanbus/Manifest b/sys-apps/gscanbus/Manifest
new file mode 100644
index 000000000000..e17512a7ddd8
--- /dev/null
+++ b/sys-apps/gscanbus/Manifest
@@ -0,0 +1,5 @@
+DIST gscanbus-0.8.tar.gz 215739 SHA256 5fd7c9e4b52a91cf3714ed284bf1fbf95ce45efe0413fce78649335f24278135 SHA512 a5f97acb57869b151fbdee5747510f554b8d67b1889ce199ba803bc75a91d1a8b98239799ce61d775923dfff0767db518a46cf9222eb370150ea158eecde95be WHIRLPOOL 559a5a76cad23653481965e93adda8c5e6ec3a917afe3ca57de55cd32acf1e8db8a1397c63980a0c8eb2b1c834c340312c22ff6d9a618a31a1d8621903cd7df1
+EBUILD gscanbus-0.8.ebuild 520 SHA256 d7401ab42e1299e74f3e9862605f4d0ced88147fe0953a459c887306f0da6116 SHA512 a83429f77c55eceff0de3979273a60574fec33aa4419d4c850d5b60d3e40df974e00efd278fb8c0ba2267079d05c31ceb7eb8765942eec1d2a296eaf0cf85ef8 WHIRLPOOL b5083c3f568e606ceda1e25ae459716b842d0a6f5d2b891377fbdba3b07fb77bf14ad3c3ece13e9a07127700f1125570b0e227ba17806dcb85d7d53f81431fe7
+MISC ChangeLog 3036 SHA256 30ed374b42cdba5249aabdc72c667e80fde3fee7731c0b22fdb50567103a7878 SHA512 7c3caaf63bba4c4186cd03df84af4890ecbb23ad4f5cc02a78cf4ad70d74aca3289012e5360092858cd551d68b748bb8f89dbd7b98b9aa574213b9d8fc4cb06c WHIRLPOOL fc836dbf4cd47fa782a5f1c091f8e37ca80812b3aa1bbd3097af7ce6e1aff37378d9608f6769c4372e1e703f0c8d3881f55a3be91af31758c649fbc40f1e7714
+MISC ChangeLog-2015 2200 SHA256 3d3d8fc655a8456a075d5d59c5b54443f8775cafe3b3b629c711e968357e87ae SHA512 62c0385a5de44131a762254efea3062dca7fc51e10a13501c6ec6f3d270d8125e2bdcb652c0d96751014862f14898817a8bab59b5bd443b48367c2f4fda1a8b6 WHIRLPOOL 0dc29eb060e4aa6fbfbb9e067c1dd4eac772b299f9a356a5d7ec28c201ad13328fb0926829b4d84871faa8715dbea96ff83b9652345f83c6f4c2b0eeb38921ef
+MISC metadata.xml 336 SHA256 c09a0da77ebb817bf6ae9e2bc988f5297da31a16513fa972c8476707951f5c2d SHA512 f40619fce237b7474a6d8e8dd9e6f2a145b035f0f83534e298485f92f15a9ef4ef343db5a552d412dca548261a4ae0dba4efe280a988e2b95c08f3179b644f43 WHIRLPOOL b2ece42d95d8d31e2ba09ec606ebd06469330afdbbef3c68ef1e8fa346f3982b13475df832275c83043cd7f5a8aa3991af5bb45f89c8f7d6bdab710fb3a2ccca
diff --git a/sys-apps/gscanbus/gscanbus-0.8.ebuild b/sys-apps/gscanbus/gscanbus-0.8.ebuild
new file mode 100644
index 000000000000..9f2b0373e8c0
--- /dev/null
+++ b/sys-apps/gscanbus/gscanbus-0.8.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="a little bus scanning, testing, and topology visualizing tool for the Linux IEEE1394 subsystem"
+HOMEPAGE="https://sourceforge.net/projects/gscanbus.berlios/"
+SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="sys-libs/libraw1394
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
diff --git a/sys-apps/gscanbus/metadata.xml b/sys-apps/gscanbus/metadata.xml
new file mode 100644
index 000000000000..5f4c1b866e0f
--- /dev/null
+++ b/sys-apps/gscanbus/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">gscanbus.berlios</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/gsmartcontrol/Manifest b/sys-apps/gsmartcontrol/Manifest
new file mode 100644
index 000000000000..f11dae52056e
--- /dev/null
+++ b/sys-apps/gsmartcontrol/Manifest
@@ -0,0 +1,13 @@
+DIST gsmartcontrol-0.8.7.tar.bz2 684394 SHA256 708fa803243abb852ed52050fc82cd3592a798c02743342441996e77f19ffec6 SHA512 3258ddcb448460afeef8d617ab5bb4720c9b2444452bc45d6798ec645da4862236fbb3fe0116a1cc904f5353481df87603bd2b6d808f348c250bde3624c8403a WHIRLPOOL 24fb546c7175306c8cdd8906b506471d20668de0cd078a8205ec87eff50ce0eb52dc04b3b05e771f8789ef852e5f97675c7c224ab6450d90a3e2ac3e51578d2a
+DIST gsmartcontrol-0.9.0.tar.bz2 710515 SHA256 5da6435aa0845acef134f72c2b5f6fce79f9c51bebe9d099402e0f21a3388651 SHA512 c7a6f4dbb748bdef14a3a18a98d30f8ba8595017c99d7ac6817a33d537f19ab55d2c5674fb1f44f77381e54e22b894d8cca700554186a8132b04249001fcda98 WHIRLPOOL 2b9e926e86bbd351ec3ed331abec508cbc129e1ca340106ffa2cd8aa8f9db13c721512f8afa4e70cd83ea1ae855e0fb494223264129ce6a583fb717d69d2a1ca
+DIST gsmartcontrol-1.0.2.tar.bz2 695445 SHA256 4f70451c359d95edc974498b860696b698f19b187340dc7207b4b38cbaf5e207 SHA512 a9dd037fc4223afa762408bc34325fb31947822250efe32ae97b88e836c5bb68d8354d7605925b2ab7c834764ea473a14f2cd1f234577ef76730b02ad9a8b701 WHIRLPOOL 679c6b9fa739f624a1bc523d0c17454cdf69e5899e086044c134116c609aaaf1a4dfec48813bc9b76210b1023623c626a4d9b55bbffa8c603c0340549eb5a028
+DIST gsmartcontrol-1.1.0.tar.bz2 683898 SHA256 90c9ead852255f5e1a74a3ff6c265d1cbcba19ad2fc77059c60737c13a3cd2c8 SHA512 c82a7d40a4347ec7c2c5fbd79b8f0035806a54e2dbdbb3fcb8ddba9c92b33a9b737f293b9f959436d0925172c832cca959dfd4a605e19b55aa5cc832c4cee024 WHIRLPOOL 6e22b757fce2cd07ed1133c97c22d8c5d44d0738dcbb342dfd9084b119a92381b5f9ddee2ab904fb576bca0ef5556df6641a8838d3fbc09d6490a8d6f257aeda
+DIST gsmartcontrol-1.1.1.tar.bz2 667372 SHA256 2e39ad330829ae93824732f1b663303ac9ea1223f703901fae28549a3b2d7518 SHA512 fc180b85a9db232add4260856e078a578801e11b87df417a5572fab284e992c85009ab9e7d9d6213b2842097067fc119fa0183d5b0dedf8dde71fe4e9e0b38cc WHIRLPOOL f38414b454e0a72904cb1b19a1d10ed6fc7ec3b75422427e1a9f9aaeb6d67946fe773927195af3772ea5320bd613fe984bdecd96313b09a34b0fcd35b3153324
+EBUILD gsmartcontrol-0.8.7.ebuild 985 SHA256 ed7f7e0d2b23abf6d0b565e6f81323a36dbc74fce20b7985520f26e53a509308 SHA512 7b75e313a0d31f47a7de2811bb79cdf2db4b2e8b6c7a2018067d86c94ac5bca69dc728884aab1345dbf22d0839ac4da500f5261db42657e8800e376c7cec8279 WHIRLPOOL 8c17a544bace66004775f3b043ed7d2f7069b2cd99ca154629dc44561ad6ebd9bd7d19c690fd586bb6ca1cd1e24fceb7ab4f665379337ec9bbb0c068ef423f4f
+EBUILD gsmartcontrol-0.9.0.ebuild 987 SHA256 8a58316fe685d64e8b1d6617d6a4fb4a34407eba5465ae1525133e1cb18639d0 SHA512 dffca954984e0a59e03a821b4958f8a12e3c9aab39c2bc6c134122bb7c61e4d119287923241dd4f67875506b8814529bfafd85da2fbebfa7cd8b2e8b5f4166f5 WHIRLPOOL 13034b74c2fac89b91956cd584668f8dfb55acd94ee8e8347e5dea29710eb4a6aecd9b880ee64c9b43e27162c0f9db0e32b0c8c8fd9262c0d601dec6f0ae49a9
+EBUILD gsmartcontrol-1.0.2.ebuild 987 SHA256 e11460d797005ffe97eb4c6226157c7f4d68461e61d88076a43f0a451e7400a0 SHA512 1e968ff6815c7479268435a64aa35d86bee145d71f6718e3208296f00766ce889a026f351b95af4dcd9f9ba2e67945973dc430a30e91832223ac94ab3b245ee6 WHIRLPOOL 4238fae00560a3d19c860945aaa30feaed7af0dd98e6034f6a10c15b8bd5d329ba6a9141e4aa775381d51b85d6777bb2e26013bfb8c42cbdd6b508dcc0d8df61
+EBUILD gsmartcontrol-1.1.0.ebuild 987 SHA256 e11460d797005ffe97eb4c6226157c7f4d68461e61d88076a43f0a451e7400a0 SHA512 1e968ff6815c7479268435a64aa35d86bee145d71f6718e3208296f00766ce889a026f351b95af4dcd9f9ba2e67945973dc430a30e91832223ac94ab3b245ee6 WHIRLPOOL 4238fae00560a3d19c860945aaa30feaed7af0dd98e6034f6a10c15b8bd5d329ba6a9141e4aa775381d51b85d6777bb2e26013bfb8c42cbdd6b508dcc0d8df61
+EBUILD gsmartcontrol-1.1.1.ebuild 987 SHA256 e11460d797005ffe97eb4c6226157c7f4d68461e61d88076a43f0a451e7400a0 SHA512 1e968ff6815c7479268435a64aa35d86bee145d71f6718e3208296f00766ce889a026f351b95af4dcd9f9ba2e67945973dc430a30e91832223ac94ab3b245ee6 WHIRLPOOL 4238fae00560a3d19c860945aaa30feaed7af0dd98e6034f6a10c15b8bd5d329ba6a9141e4aa775381d51b85d6777bb2e26013bfb8c42cbdd6b508dcc0d8df61
+MISC ChangeLog 3071 SHA256 890cbb0f3bb1b6e679ae0e0700cad3a2fe41aaff68e7f5d5ee066c1ef7dc9b0d SHA512 3b9ccdf4120c06af0e90c7fe8ed5a4e49795b1d8695bb2271bc477fb564f3aa103a94c46f7f3aa1fda5f0410ca7262b0baab67c3be62fa37967b1ef74e14a851 WHIRLPOOL 2e0c8d3c43c2716907dbe9d997ef7082be9bf273182b62f6d14308f6b26437d716c6a5f0cce445901194f7f80b44759d9f300197ba5a476e6c041e788c665580
+MISC ChangeLog-2015 1161 SHA256 ea76dfa40483f7abb93a0e349477539e4a51f4944813713041acd76ba5559e1b SHA512 364299b5bf15b8f619f6be80aa8724708aea40b0893a79ac4b48589d83e5749e771f5261076ec6f7fac55b5600abcdfe79e3281b9e5f5733c48db36bfaf11694 WHIRLPOOL 39c3b5a86bfa3f26f683983f94e524b4c6afd97dca1f0aa6a77d252b042b406f723f48ad184e87bd9abcb68dc2c5ff7e100a865c6526ba2ac94fc172bd6c7a8d
+MISC metadata.xml 340 SHA256 5b42c768af48ad29d48396e3791c86c64318f920373ded13dd01ca98537f92fc SHA512 f769fe192e485692a86f1ac75f8de07be0a8f5c2ddd7d3ea0a526d271881746417e01e09e765e3160f7d8b516d9240b5bb09030dc18ea9551192fbd8df5b4cc3 WHIRLPOOL fa0965920011e1602f5424e176499d2b378c9867bdf3d8d092f3e924eaf2ae6eb89df08eeb95008b87484288e093b7dc7568a1b8baa7cdf6e7d7041a259d4dda
diff --git a/sys-apps/gsmartcontrol/gsmartcontrol-0.8.7.ebuild b/sys-apps/gsmartcontrol/gsmartcontrol-0.8.7.ebuild
new file mode 100644
index 000000000000..b166b89b92bb
--- /dev/null
+++ b/sys-apps/gsmartcontrol/gsmartcontrol-0.8.7.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic gnome2-utils
+
+DESCRIPTION="Hard disk drive health inspection tool"
+HOMEPAGE="https://gsmartcontrol.sourceforge.io/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) Boost-1.0 BSD Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-cpp/gtkmm:2.4
+ dev-libs/libpcre:3
+ sys-apps/smartmontools
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xmessage
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/gtk-builder-convert )
+"
+
+DOCS="TODO" # See 'dist_doc_DATA' value in Makefile.am
+
+src_prepare() {
+ default
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ econf $(use test tests)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/LICENSE_* || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/sys-apps/gsmartcontrol/gsmartcontrol-0.9.0.ebuild b/sys-apps/gsmartcontrol/gsmartcontrol-0.9.0.ebuild
new file mode 100644
index 000000000000..b05b530fcf28
--- /dev/null
+++ b/sys-apps/gsmartcontrol/gsmartcontrol-0.9.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic gnome2-utils
+
+DESCRIPTION="Hard disk drive health inspection tool"
+HOMEPAGE="https://gsmartcontrol.sourceforge.io/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) Boost-1.0 BSD Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-cpp/gtkmm:2.4
+ dev-libs/libpcre:3
+ sys-apps/smartmontools
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xmessage
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/gtk-builder-convert )
+"
+
+DOCS="TODO" # See 'dist_doc_DATA' value in Makefile.am
+
+src_prepare() {
+ default
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ econf $(use test tests)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/LICENSE_* || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/sys-apps/gsmartcontrol/gsmartcontrol-1.0.2.ebuild b/sys-apps/gsmartcontrol/gsmartcontrol-1.0.2.ebuild
new file mode 100644
index 000000000000..4757ae7e2385
--- /dev/null
+++ b/sys-apps/gsmartcontrol/gsmartcontrol-1.0.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic gnome2-utils
+
+DESCRIPTION="Hard disk drive health inspection tool"
+HOMEPAGE="https://gsmartcontrol.sourceforge.io/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) Boost-1.0 BSD Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-cpp/gtkmm:3.0
+ dev-libs/libpcre:3
+ sys-apps/smartmontools
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xmessage
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/gtk-builder-convert )
+"
+
+DOCS="TODO" # See 'dist_doc_DATA' value in Makefile.am
+
+src_prepare() {
+ default
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ econf $(use test tests)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/LICENSE_* || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/sys-apps/gsmartcontrol/gsmartcontrol-1.1.0.ebuild b/sys-apps/gsmartcontrol/gsmartcontrol-1.1.0.ebuild
new file mode 100644
index 000000000000..4757ae7e2385
--- /dev/null
+++ b/sys-apps/gsmartcontrol/gsmartcontrol-1.1.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic gnome2-utils
+
+DESCRIPTION="Hard disk drive health inspection tool"
+HOMEPAGE="https://gsmartcontrol.sourceforge.io/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) Boost-1.0 BSD Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-cpp/gtkmm:3.0
+ dev-libs/libpcre:3
+ sys-apps/smartmontools
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xmessage
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/gtk-builder-convert )
+"
+
+DOCS="TODO" # See 'dist_doc_DATA' value in Makefile.am
+
+src_prepare() {
+ default
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ econf $(use test tests)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/LICENSE_* || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/sys-apps/gsmartcontrol/gsmartcontrol-1.1.1.ebuild b/sys-apps/gsmartcontrol/gsmartcontrol-1.1.1.ebuild
new file mode 100644
index 000000000000..4757ae7e2385
--- /dev/null
+++ b/sys-apps/gsmartcontrol/gsmartcontrol-1.1.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic gnome2-utils
+
+DESCRIPTION="Hard disk drive health inspection tool"
+HOMEPAGE="https://gsmartcontrol.sourceforge.io/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) Boost-1.0 BSD Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-cpp/gtkmm:3.0
+ dev-libs/libpcre:3
+ sys-apps/smartmontools
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xmessage
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/gtk-builder-convert )
+"
+
+DOCS="TODO" # See 'dist_doc_DATA' value in Makefile.am
+
+src_prepare() {
+ default
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ econf $(use test tests)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/LICENSE_* || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/sys-apps/gsmartcontrol/metadata.xml b/sys-apps/gsmartcontrol/metadata.xml
new file mode 100644
index 000000000000..222e5fde05cd
--- /dev/null
+++ b/sys-apps/gsmartcontrol/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gsmartcontrol</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/guix/Manifest b/sys-apps/guix/Manifest
new file mode 100644
index 000000000000..f261955711cf
--- /dev/null
+++ b/sys-apps/guix/Manifest
@@ -0,0 +1,14 @@
+AUX guix-0.12.0-AR.patch 245 SHA256 8c7dbdbdb7cffb49586ce7d67f07a571ace686c252753e8e8709911e82126309 SHA512 a8249858c77f7e3485d2851bdfd914fe45d0243087558a8155e941925d5b76adb4f9f5f7b380baf865158f2bbc8f3aa8a0d8901ea86baf5c3056ee548216723d WHIRLPOOL 1270efc659d9245bb7ae589fd7963dfe4d7d4d4ea0d131113df083d124438405f2d0be3b4a69efc588175016bfd3325178a76d0a2b988532e54cd9f7d8a226fb
+AUX guix-0.12.0-no-json-crate.patch 1234 SHA256 b5eb382299c0121b540bb3c235714e40e4c102ad84fc24218bdfd7e1466626d2 SHA512 6c382181a7598ddb889be2cee712ebfe852b422c1f55c1e298658fd0a3270265dfeaff07d07eaf87c3e1fa79c35dc82d1d3e998413f0cabdfdda85ae56ff005d WHIRLPOOL 2b707e06bf1cdd266335b0a7a5412856f152e6d2f3e6944c82ed3058c198b111250e18f9b0304b6d0f08e5f17f4a942955045d586ff0fb142389331f5f483882
+AUX guix-0.13.0-default-daemon.patch 2888 SHA256 b792c0def73147d4afdbbc5f99cbf56eb97c1df76182e83bf985ee639b43763a SHA512 011e047be6634f6e8b8fce46330c42571b505e05b1c5dcae40889bace64c7211af17d48ec4b817f46d3f9bf6109cb7bfce67823fd4add93e707d1aa8fec0dfcd WHIRLPOOL 5f303ed858f4cf7613733d3a615cba4aec7402e3dcfd3758a6c6d6d6c7616bf7fb1eb81cc4f6b889cbecf2a1c98b7b955d9bbba31a9338c066fd618ea2f2a52f
+AUX guix-daemon.initd 404 SHA256 ddab99591877fe0e794766e9fd8c1f603f6b8063d1d31a875af136a42ee62179 SHA512 546e322b593cfd71d295b6f19fb336c988f05b1a459ca4b776c6aa129cfdec0004c85aee983cd7536a1bdd14e3edfcb25574b79a76a8134328c72fb1c83c8278 WHIRLPOOL 6f57606f1987cd53e246aaf72810734bd3a3fa3dbe7b501f8e71f51e04813b6b15c84389b44ffba6e9551c5c7bb8a000fdc2c1fddd240ddf42d688b0e07a7af4
+DIST guix-0.12.0.tar.gz 15823786 SHA256 6201e21186a7098af256d97562662d95353b1047799b9b216e1dd6e7692dfec9 SHA512 d61cb289d3773977400fa3c49869f30a3feb5e0364368017b9b8eaadee814c5c31897be398d6ff142349337334eb51cb6d0354bee27c0365de69ce1a09e858d3 WHIRLPOOL 9515967a05a449f24da49e95340a60fb91cc471fcc532ce6cfaaea82c9161e3a65a1adc4d95e9997f019565243ca385845edc484981adfc5956112092687a0ec
+DIST guix-0.13.0.tar.gz 18490387 SHA256 b28d52c25ba2fff53be51d7b0027f69ca52416c26b4a0100a40221b73d63a3be SHA512 39d4e627f69850da650448b72008c1b73cbda0286d6b805bb1ea14d72eb49c5f6bdf30755b791a8b9cbb94e91ce8c1f360963250587591ce1a47db457c901daf WHIRLPOOL 365b1a74fe63bbb30605b13697d13703cbc10d12af925baefedb74d0694329ca1219630b9931e07394404c41c79d48554b61af57d408d0bdfa753e4055e0093a
+DIST guix-bootstrap-aarch64-linux-20170217-guile-2.0.14.tar.xz.bootstrap 2948976 SHA256 3939909f24dcb955621aa7f81ecde6844bea8a083969c2d275c55699af123ebe SHA512 b3a5b457017357dedb71db98ef089ac90ca2b88ec5dbf0cec6c829dff7167c5478797a8d14850dd2d951713632c2859950be6c5eb029e6f6c224eecef97efd27 WHIRLPOOL 12c7a27f1fcc6491f95fb663bf630b844a33068460a71827cf67e2cfb579ba4021d7cc41b151b4d9073a9ec3b1406688426c8d8b998163b2e01ad473a0b16b96
+DIST guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap 2717576 SHA256 e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6 SHA512 d546e2c0f676a49af482caae6f5575c7937647a81d37e49ad8be6fe12d58989cb825b5e12f2da28aff4649ee1a198ffb8f4a0beea65835a60aefaa905e87e337 WHIRLPOOL c8aa4c4743768477d3a495fbdbe9d4818e9860411f4df73843a149c8659105f921501d0a5dfc2d121fa872a23f543174c84f864dce1eff69d175c456bdb5efb9
+DIST guix-bootstrap-i686-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2656076 SHA256 b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846 SHA512 f2b257e5b10dcd7421273d8d04782a2bd733781094dd963bf5bd8294604dbd158ea25cbc383a227edce84de968a962ec834226ebdd137a2e1857e2191bfada8c WHIRLPOOL 270f3602e8ea10f28ab003aed28b3d19ab971c69029d1d71f7fe9601d5120222baf245e3e48910dbeedf1469227d59beb8190f23bdd2ef070390467e3f49b8c9
+DIST guix-bootstrap-mips64el-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2734180 SHA256 994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b SHA512 8c4be098a31f63d56e7d35c174ce4095ba8317662c365d44c005980b38ba499461926754a4659e699ab271bb841c9da514f1a36b812d881c212a5f12177d73c0 WHIRLPOOL f247e65cc558057ba65aa7c554f07d9ec76de2fcc4828038b1d1d89b8c5449a803fd7942812e85fced8200f1af5d981b5cff7fa53cd026335c0ba906ced251f4
+DIST guix-bootstrap-x86_64-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2885996 SHA256 037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0 SHA512 96efc583f42f6c7647bc026e2d2a96d603e7bea12ca02f6bcc65e819b9966082ac4c9f7e42f64536ff42a988e4766e695d87a82c73dd97d80745975a05badb23 WHIRLPOOL 61b623c961dc3b9f4c59f4d208c1302ea98d640b915cc53dce90551c3f48f9844381bb674d4d835421a44a71d903dc90c38a0f7a17ccc049ec388a4e948239b6
+EBUILD guix-0.12.0-r3.ebuild 3445 SHA256 7cd6f8faa8a5640fc5f780db7a0c065030a9f8e65537861a57ce36323101de0b SHA512 a6d02045dff6a3c0b0aa5a778a70af7b14e0163b400107a88d90ab245fac26bd85e645a972e43732fb862d546ce00143af161edce297f86cb72ab147d5ffce12 WHIRLPOOL d3bd6c27fa397655980efbd639e93ced8a1d469107d282248d2d934cab23f55d2ef94459074b4405e479c00ff37caefc08744f4f77dc56813b13351736255097
+EBUILD guix-0.13.0.ebuild 3583 SHA256 66d26a746b7452cb74bcfa8ec30aade4da5eb6950b8af3b3fb7b097f15426df0 SHA512 1aa470bfb7c4403ecf21973aab4167c7dec55b33098baa9c4d7019ead3d7ca5cd5487d4b387aafc631ccfd9ebe6b839e6cb81f048aa752fdb94eebd602aca322 WHIRLPOOL 0529540f2971951b9096007e5e35362f62c26d6426739f4177151eaebfaa5c4f7fe45d9f6a25515e39001d43c6d0e93a2f047114993d6bf02d98dd80a6c9d6a7
+MISC metadata.xml 251 SHA256 90d6112ae9e256cc0e1e136cbc0f06790773deb619f29ffb87301cddd9b96750 SHA512 cc2bd3977894946ee4ea5b739cc3998bcd6017b9e7a52aa501409d0988954339a9a22fe751d0a5e967ddac9225d9b23f20b4fb1e2c62ee91d1d23c383d9776dd WHIRLPOOL 7fb42bdc9d6347bdf289087e631f6d6e7cf683679af236bf343f2d1e3213e999372123a46d339bcc559dfd0af8e41d75a56a76b60d67ef936bdc973ebfff1bf0
diff --git a/sys-apps/guix/files/guix-0.12.0-AR.patch b/sys-apps/guix/files/guix-0.12.0-AR.patch
new file mode 100644
index 000000000000..c9c91c20734c
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.12.0-AR.patch
@@ -0,0 +1,8 @@
+diff --git a/config-daemon.ac b/config-daemon.ac
+index 056c939..b04deed 100644
+--- a/config-daemon.ac
++++ b/config-daemon.ac
+@@ -7,2 +7,3 @@ dnl C++ environment. This macro must be used unconditionnaly.
+ AC_PROG_CXX
++AM_PROG_AR
+ AC_LANG([C++])
diff --git a/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch b/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch
new file mode 100644
index 000000000000..57b4308a3a89
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch
@@ -0,0 +1,38 @@
+commit 6023041346c79f7ac4105bba2552a82019fae840
+Author: David Thompson <davet@gnu.org>
+Date: Fri Dec 30 14:15:35 2016 -0500
+
+ import: crate: Do not build when guile-json is not available.
+
+ * Makefile.am (MODULES): Add 'guix/import/crate.scm' and
+ 'guix/scripts/import/crate.scm' only when HAVE_GUILE_JSON.
+
+diff --git a/Makefile.am b/Makefile.am
+index 15939af12..97629f26e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -122,7 +122,6 @@ MODULES = \
+ guix/import/snix.scm \
+ guix/import/cabal.scm \
+ guix/import/cran.scm \
+- guix/import/crate.scm \
+ guix/import/hackage.scm \
+ guix/import/elpa.scm \
+ guix/scripts.scm \
+@@ -142,7 +141,6 @@ MODULES = \
+ guix/scripts/lint.scm \
+ guix/scripts/challenge.scm \
+ guix/scripts/import/cran.scm \
+- guix/scripts/import/crate.scm \
+ guix/scripts/import/gnu.scm \
+ guix/scripts/import/nix.scm \
+ guix/scripts/import/hackage.scm \
+@@ -162,6 +160,8 @@ if HAVE_GUILE_JSON
+ MODULES += \
+ guix/import/github.scm \
+ guix/import/json.scm \
++ guix/import/crate.scm \
++ guix/scripts/import/crate.scm \
+ guix/import/pypi.scm \
+ guix/scripts/import/pypi.scm \
+ guix/import/cpan.scm \
diff --git a/sys-apps/guix/files/guix-0.13.0-default-daemon.patch b/sys-apps/guix/files/guix-0.13.0-default-daemon.patch
new file mode 100644
index 000000000000..7a02f7021159
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.13.0-default-daemon.patch
@@ -0,0 +1,74 @@
+Don't require user to create profile manually even before guix-daemon runs.
+
+Default install should provide working basic environment.
+
+Revert "build: Don't embed absolute paths in .service and .conf service files."
+This reverts commit 613d0895b92c677e0639d5e77c55043e38e020c8.
+diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in
+index 09c70cde3..8f833cb69 100644
+--- a/etc/guix-daemon.conf.in
++++ b/etc/guix-daemon.conf.in
+@@ -9,4 +9,4 @@ stop on runlevel [016]
+
+ task
+
+-exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
++exec @bindir@/guix-daemon --build-users-group=guixbuild
+diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in
+index 988cf90c0..7a3f02b27 100644
+--- a/etc/guix-daemon.service.in
++++ b/etc/guix-daemon.service.in
+@@ -6,7 +6,7 @@
+ Description=Build daemon for GNU Guix
+
+ [Service]
+-ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
++ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild
+ Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
+ RemainAfterExit=yes
+ StandardOutput=syslog
+diff --git a/etc/guix-publish.conf.in b/etc/guix-publish.conf.in
+index 241c59455..498fa295b 100644
+--- a/etc/guix-publish.conf.in
++++ b/etc/guix-publish.conf.in
+@@ -9,4 +9,4 @@ stop on runlevel [016]
+
+ task
+
+-exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
++exec @bindir@/guix publish --user=nobody --port=8181
+diff --git a/etc/guix-publish.service.in b/etc/guix-publish.service.in
+index 8aaf09e3c..fc4e3c21f 100644
+--- a/etc/guix-publish.service.in
++++ b/etc/guix-publish.service.in
+@@ -6,7 +6,7 @@
+ Description=Publish the GNU Guix store
+
+ [Service]
+-ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
++ExecStart=@bindir@/guix publish --user=nobody --port=8181
+ Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
+ RemainAfterExit=yes
+ StandardOutput=syslog
+diff --git a/nix/local.mk b/nix/local.mk
+index 9e0c457be..eb70d266f 100644
+--- a/nix/local.mk
++++ b/nix/local.mk
+@@ -190,7 +190,7 @@ nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
+ etc/guix-%.service: etc/guix-%.service.in \
+ $(top_builddir)/config.status
+ $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
+- $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
++ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "$<" > "$@.tmp"; \
+ mv "$@.tmp" "$@"
+
+@@ -201,7 +201,7 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
+ etc/guix-%.conf: etc/guix-%.conf.in \
+ $(top_builddir)/config.status
+ $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
+- $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
++ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "$<" > "$@.tmp"; \
+ mv "$@.tmp" "$@"
+
diff --git a/sys-apps/guix/files/guix-daemon.initd b/sys-apps/guix/files/guix-daemon.initd
new file mode 100644
index 000000000000..f819fb20c37e
--- /dev/null
+++ b/sys-apps/guix/files/guix-daemon.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --background --exec /usr/bin/guix-daemon -- --build-users-group=guixbuild
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/bin/guix-daemon
+ eend ${?}
+}
diff --git a/sys-apps/guix/guix-0.12.0-r3.ebuild b/sys-apps/guix/guix-0.12.0-r3.ebuild
new file mode 100644
index 000000000000..3aea5c64be89
--- /dev/null
+++ b/sys-apps/guix/guix-0.12.0-r3.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 user
+
+DESCRIPTION="GNU package manager (nix sibling)"
+HOMEPAGE="https://www.gnu.org/software/guix/"
+
+# taken from gnu/local.mk
+BOOT_GUILE=(
+ "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ "i686-linux 20131110 guile-2.0.9.tar.xz"
+ "mips64el-linux 20131110 guile-2.0.9.tar.xz"
+ "x86_64-linux 20131110 guile-2.0.9.tar.xz"
+)
+
+binary_src_uris() {
+ local system_date_guilep uri
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ uri="mirror://gnu-alpha/${PN}/bootstrap/$1/$2/$3"
+ # ${uri} -> guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap
+ echo "${uri} -> guix-bootstrap-$1-$2-$3.bootstrap"
+ done
+}
+
+# copy bootstrap binaries from DISTDIR to ${S}
+copy_boot_guile_binaries() {
+ local system_date_guilep
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ cp "${DISTDIR}"/guix-bootstrap-$1-$2-$3.bootstrap gnu/packages/bootstrap/$1/$3 || die
+ done
+}
+
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
+ $(binary_src_uris)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT=test # complains about size of config.log and refuses to start tests
+
+RDEPEND="
+ dev-libs/libgcrypt:0=
+ >=dev-scheme/guile-2[regex,networking,threads]
+ dev-scheme/guile-json
+ sys-libs/zlib
+ app-arch/bzip2
+ dev-db/sqlite
+"
+
+DEPEND="${RDEPEND}
+"
+
+QA_PREBUILT="usr/share/guile/site/2.0/gnu/packages/bootstrap/*"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-json-crate.patch
+ "${FILESDIR}"/${P}-AR.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS="Quick start user guide on Gentoo:
+
+[as root] allow binary substitution to be downloaded (optional)
+ # guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub
+[as root] enable guix-daemon service:
+ [systemd] # systemctl enable guix-daemon
+ [openrc] # rc-update add guix-daemon
+[as a user] ln -sf /var/guix/profiles/per-user/\$USER/guix-profile \$HOME/.guix-profile
+[as a user] install guix packages:
+ \$ guix package -i hello
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ export GUIX_LOCPATH=\$HOME/.guix-profile/lib/locale
+
+Next steps:
+ guix package manager user manual: https://www.gnu.org/software/guix/manual/guix.html
+"
+
+pkg_setup() {
+ enewgroup guixbuild
+ for i in {1..10}; do
+ # we list 'guixbuild' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser guixbuilder${i} -1 -1 /var/empty guixbuild,guixbuild
+ done
+}
+
+src_configure() {
+ # to be compatible with guix from /gnu/store
+ econf \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_prepare() {
+ copy_boot_guile_binaries
+
+ default
+
+ eautoreconf
+}
+
+src_compile() {
+ # guile occasionally fails with 'bad address'
+ emake -j1
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ keepdir /etc/guix
+ # TODO: will need a tweak for prefix
+ keepdir /gnu/store
+ fowners root:guixbuild /gnu/store
+ fperms 1775 /gnu/store
+
+ keepdir /var/guix/profiles/per-user
+ fperms 1777 /var/guix/profiles/per-user
+
+ newinitd "${FILESDIR}"/guix-daemon.initd guix-daemon
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/guix/guix-0.13.0.ebuild b/sys-apps/guix/guix-0.13.0.ebuild
new file mode 100644
index 000000000000..54b553a520cc
--- /dev/null
+++ b/sys-apps/guix/guix-0.13.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 user
+
+DESCRIPTION="GNU package manager (nix sibling)"
+HOMEPAGE="https://www.gnu.org/software/guix/"
+
+# taken from gnu/local.mk and build-aux/download.scm
+BOOT_GUILE=(
+ "aarch64-linux 20170217 guile-2.0.14.tar.xz"
+ "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ "i686-linux 20131110 guile-2.0.9.tar.xz"
+ "mips64el-linux 20131110 guile-2.0.9.tar.xz"
+ "x86_64-linux 20131110 guile-2.0.9.tar.xz"
+)
+
+binary_src_uris() {
+ local system_date_guilep uri
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ uri="mirror://gnu-alpha/${PN}/bootstrap/$1/$2/$3"
+ # ${uri} -> guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap
+ echo "${uri} -> guix-bootstrap-$1-$2-$3.bootstrap"
+ done
+}
+
+# copy bootstrap binaries from DISTDIR to ${S}
+copy_boot_guile_binaries() {
+ local system_date_guilep
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ cp "${DISTDIR}"/guix-bootstrap-$1-$2-$3.bootstrap gnu/packages/bootstrap/$1/$3 || die
+ done
+}
+
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
+ $(binary_src_uris)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT=test # complains about size of config.log and refuses to start tests
+
+RDEPEND="
+ dev-libs/libgcrypt:0=
+ >=dev-scheme/guile-2[regex,networking,threads]
+ dev-scheme/guile-json
+ net-libs/gnutls[guile]
+ sys-libs/zlib
+ app-arch/bzip2
+ dev-db/sqlite
+"
+
+DEPEND="${RDEPEND}
+"
+
+PATCHES=("${FILESDIR}"/${PN}-0.13.0-default-daemon.patch)
+
+QA_PREBUILT="usr/share/guile/site/2.0/gnu/packages/bootstrap/*"
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS="Quick start user guide on Gentoo:
+
+[as root] allow binary substitution to be downloaded (optional)
+ # guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub
+[as root] enable guix-daemon service:
+ [systemd] # systemctl enable guix-daemon
+ [openrc] # rc-update add guix-daemon
+[as a user] ln -sf /var/guix/profiles/per-user/\$USER/guix-profile \$HOME/.guix-profile
+[as a user] install guix packages:
+ \$ guix package -i hello
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ export GUIX_LOCPATH=\$HOME/.guix-profile/lib/locale
+
+Next steps:
+ guix package manager user manual: https://www.gnu.org/software/guix/manual/guix.html
+"
+
+pkg_setup() {
+ enewgroup guixbuild
+ for i in {1..10}; do
+ # we list 'guixbuild' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser guixbuilder${i} -1 -1 /var/empty guixbuild,guixbuild
+ done
+}
+
+src_prepare() {
+ copy_boot_guile_binaries
+
+ default
+ # build system is very eager to run automake itself: bug #625166
+ eautomake
+}
+
+src_configure() {
+ # to be compatible with guix from /gnu/store
+ econf \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_compile() {
+ # guile occasionally fails with 'bad address'
+ emake -j1
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ keepdir /etc/guix
+ # TODO: will need a tweak for prefix
+ keepdir /gnu/store
+ fowners root:guixbuild /gnu/store
+ fperms 1775 /gnu/store
+
+ keepdir /var/guix/profiles/per-user
+ fperms 1777 /var/guix/profiles/per-user
+
+ newinitd "${FILESDIR}"/guix-daemon.initd guix-daemon
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/guix/metadata.xml b/sys-apps/guix/metadata.xml
new file mode 100644
index 000000000000..c5298995d2d4
--- /dev/null
+++ b/sys-apps/guix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/habitat/Manifest b/sys-apps/habitat/Manifest
new file mode 100644
index 000000000000..809759cf0d81
--- /dev/null
+++ b/sys-apps/habitat/Manifest
@@ -0,0 +1,4 @@
+DIST habitat-0.28.0.tar.gz 25147061 SHA256 8ca0c96634989620ddf308dfcaf93e6c6235896226b1be3fa257fc0d56f7b272 SHA512 eccdced6655e46b894aa3ef29cbac7100e18b4c44c7c2c7a25d5bb31ba732f908122630a7dd35c6347fa805180b471ce7dac786113d2f9b6d35a967994913b9f WHIRLPOOL 029d4efe81844f22ebac9061073d05ee31aaa79f9fae4a539f314ef0692773295855c15d8d8c26b9ddd0f0f684e7d4f69bd51dc506f80a555edaaa858d655455
+DIST habitat-cargo-0.28.0.tar.xz 84559904 SHA256 2494a1cb30366428f7586bf5570055440e13f83021ea0aa6e69ec4e3a63b3fd4 SHA512 d6f798e21bfa8124820f505231423b0ef72d068a38e8a88f0d196cfcf9e5d7a2142499f809a8525ec2f5ce664e7598d5c0979efcd2511e860b8f884ac4f6fd4b WHIRLPOOL 2f98db3cc50453a0e9805d286274ce3b3b9676efba4dac34ea32b9d94e2b02cb8a6b70a76fb7f2dac24829c4f3508dd5d55058820f4ee138d2964a35e701f77c
+EBUILD habitat-0.28.0.ebuild 755 SHA256 7201049498fbd637f5469d4cb096782e715db4a4006ba392b390a4007414528a SHA512 d63dd5b0f3576df45f9714c364123694133211ba4770fafe0c27faebd23b7c1a8f944bbee3aaa023c0c5e45f4bfaf994d31c9497bb82d6589369b038b96d00be WHIRLPOOL 8f7dc9318c84a8913908407a8788b7c9038d9f890433a617d0b8f71c12850c8069c947248a5698470bcac51b13155a81e4fa285714facd81065c45e36f3880a7
+MISC metadata.xml 328 SHA256 977b237710a26346b2494dca8887bd529e558518b71aca4329958b24de87a45b SHA512 cdafdd1846825f625feef5635f331f12ff4490383c54e760af5dd4ece4fcbe381ae325c8c732474de7124b55dffd32e129a9647e2e2aa5e0dcaff8ccbe4b1e8f WHIRLPOOL 71fb8a7444b92956e1583bed86e26f09a620705828c875882fe390508cc8472bd7530a567d97337d78713fd8277525ca3c9b838607db7ff07202c6b954838047
diff --git a/sys-apps/habitat/habitat-0.28.0.ebuild b/sys-apps/habitat/habitat-0.28.0.ebuild
new file mode 100644
index 000000000000..c968a4910847
--- /dev/null
+++ b/sys-apps/habitat/habitat-0.28.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Application automation framework"
+HOMEPAGE="https://github.com/habitat-sh/habitat https://habitat.sh"
+SRC_URI="https://github.com/habitat-sh/habitat/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~mrueg/files/${PN}-cargo-${PV}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="dev-util/cargo
+ >=dev-lang/rust-1.11
+ >=net-libs/zeromq-3.2
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+ # move cache dir where cargo expects it
+ mv ../.cargo "${HOME}" || die
+}
+
+src_install() {
+ dodoc README.md CHANGELOG.md
+ dobin target/debug/hab{,-butterfly,-sup}
+}
+
+src_test() {
+ emake unit-all
+}
diff --git a/sys-apps/habitat/metadata.xml b/sys-apps/habitat/metadata.xml
new file mode 100644
index 000000000000..67159d965888
--- /dev/null
+++ b/sys-apps/habitat/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 type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">habitat-sh/habitat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/hardened-shadow/Manifest b/sys-apps/hardened-shadow/Manifest
new file mode 100644
index 000000000000..28621d9d2fb4
--- /dev/null
+++ b/sys-apps/hardened-shadow/Manifest
@@ -0,0 +1,5 @@
+DIST hardened-shadow-0.9.2.tar.gz 393648 SHA256 0561bf7059b3de7e97e968bb71a3ccac3dd944bf96f1d5de87798359e592aa00 SHA512 896e25e906beb69c2da4906be8e5228ae4b49b6acdfa5da73e1a61e1b09e45ef75fc936d9bcc0b9b3880b210c77d5a354d6f4f7e04a7618adf0a7ea648b3db67 WHIRLPOOL cbd48a54a1c6d3d26b9c1aab01294159f96a92302502215982499cc812487c8e4ca9f022cbaabaa6188fe9266cf6eb09f346a88ef69b21a2364005304302e291
+EBUILD hardened-shadow-0.9.2.ebuild 792 SHA256 42b9bed6a40a8a2725e3cd6ed229440fd63e83000a10033820e88137a868c208 SHA512 8e163d9dc1304dd3a9a4641ffbcd3d5151b0431e4a4d1b9359f68edd681e5da105780d9e1afda91357cdbe0d97383782133acf7b7a345d7449aed36ff13290ec WHIRLPOOL 83149fd0faa214181a4eeceabac087a6469a0d6fb84c02633af64a14d7fbe5b934934872811b4e942fd9bfafd6bfc5d20e19df5a6dddcbc4f6d540d02f33c5ff
+MISC ChangeLog 2534 SHA256 c8a649fc753d3f03e2b9a5372d4d086f62ecfa32d5cb1dc2a2edc870043a845d SHA512 33b2c0b1363b42ea6e04db161fa62199e0025a88e3c4690ec947b8af88aa45c1c4f20c8baf0799fd50c0558275a40b1eef1325f8f9d7f6f237faddea00cf731c WHIRLPOOL 0b0303872e888a6b516f33673f723cac591b8cb5228559266d772efce9790335239436a9bfa74d992b4a7ad3ca55679e454c1e36b3311dc51a6062673f312411
+MISC ChangeLog-2015 1215 SHA256 d0c374f147917928b538a79adba027ae7f182b944231102b4164ce672ba529d1 SHA512 70acbc36966f950e8c900860e0744df526666ae0caef00117cafaaeb59041abd042b302557f2d1a2f0e2c135b93f09ba906e7e57075a8a91a804998bb4ecedc4 WHIRLPOOL f973860eb43d1d93fd96de82b79d4e6be864959b311537db856c3ccdde2e9223b50e2ce74e3fdc243a1c6c8860e7d7815b4d5664073e4bb2489fc7a71aa3d524
+MISC metadata.xml 252 SHA256 36132bb53db393b56dc0c2324e4e23e7e611c193836ed0c42082d678e01176ad SHA512 42998f3ed757a2aeeeb617eb3fae6789d11b867ef7b77ea5998beff08070f31bda0bf24031d6521de22655494d9d09d3ab6da985829409d2caf9a1ffc0534348 WHIRLPOOL bfd0759bc35ba37cd663f95ad3a26960742cf04eea867e328640142ebd2cc4f77f0d0ae4c8e243b2d4e15292c11728f5531d54a5610a93f09b6bfb17c639e094
diff --git a/sys-apps/hardened-shadow/hardened-shadow-0.9.2.ebuild b/sys-apps/hardened-shadow/hardened-shadow-0.9.2.ebuild
new file mode 100644
index 000000000000..f8f37d1bdd86
--- /dev/null
+++ b/sys-apps/hardened-shadow/hardened-shadow-0.9.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils eutils multilib user
+
+DESCRIPTION="Hardened implementation of user account utilities"
+HOMEPAGE="https://code.google.com/p/hardened-shadow/"
+SRC_URI="https://hardened-shadow.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-libs/pam
+ !sys-apps/shadow"
+RDEPEND="${DEPEND}
+ >=sys-auth/pambase-20120417"
+
+DOCS=( README )
+
+pkg_setup() {
+ # The hardened-shadow group is needed at src_install time,
+ # so the only place we can create the group is pkg_setup.
+ enewgroup hardened-shadow
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ # Remove pam.d files colliding with pambase.
+ rm -r "${ED}"/etc/pam.d || die
+}
diff --git a/sys-apps/hardened-shadow/metadata.xml b/sys-apps/hardened-shadow/metadata.xml
new file mode 100644
index 000000000000..598eb1944a88
--- /dev/null
+++ b/sys-apps/hardened-shadow/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-needed -->
+ <upstream>
+ <remote-id type="google-code">hardened-shadow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/haveged/Manifest b/sys-apps/haveged/Manifest
new file mode 100644
index 000000000000..b2178d6308a3
--- /dev/null
+++ b/sys-apps/haveged/Manifest
@@ -0,0 +1,9 @@
+AUX haveged-conf.d 207 SHA256 e796a353534e8ec36b84a29ab4cbd738ebd18098efca5ed8d92b267a99dc58f6 SHA512 b7bc782765a4521d34485d44391da79a3d1ee3bfda548ffcbf662093c8c7fdeb6baf2813ed7aa741b07e7b7e8eca1a94dceaa37ef202f801686d89855ffb7c30 WHIRLPOOL bf84dfaf2cfe2d1c6f1c77b0fe9e99e343ea129a0a3251a7b9df1f7037eb996e5cf28c27f65c1484e5db6772f213c32bbf1e26b0521894107c78e653437938f4
+AUX haveged-init.d.3 322 SHA256 5ee06c49764ecc4aaa9a88a222ef7838dbc065d049279693a37bebd0431855de SHA512 057cafb7f74423759834d470664558dcf16d226fbf1f47f569bacf04a8f76334aacc7fc25348d055847f6da4c644383b0519d80a7553058bae5264508eeb4ad4 WHIRLPOOL fcdf19a902f3882c58ad23b03f47e93e5db0f00167a7062c321dc49f828c4fcbd7a02b3456a13a744996e7ee43519201c97b9ea58bd2dae04d595ff1dd169936
+AUX haveged.conf 147 SHA256 c5460e3e4a6346476febb43f4e7775ded892e2c23305e2de9df94abbd25c7500 SHA512 052696a31ab7b9a0dda06ccb24c08524bef0cfa9c601a1ba6819bb2e42886a6b3d9b77710880d589534fae3c600d123304586f825fac554e68ce50d8b5acd563 WHIRLPOOL 86636296d06fbe9b8ac7409c2075543329b1859992ed539fd98d1dab8946ade3d8ff4ba305a9989be963c61f806be22a9d50d3d53ae9cbcba179af0512031e0d
+AUX service.gentoo 322 SHA256 715adc956ed6331f3c77dae844579b51d8c11d6aa1bb67f073ce902197b54c4b SHA512 7d7caaef45cbf268a1c1a813537a9e4ef6543addcfebe99fd178e37a8c516bbd5419fb8f47decf2370cee0562f066c72501b6c176307b1f5884b56f561386b88 WHIRLPOOL e94d9577651af7431e53999e9b2840e094dbc9caf9f5a34038c090d4f3419ae794607d87f504494bcfc5d39b2f3e52ef331249ab22d60f9c5a0c5b6cea402709
+DIST haveged-1.9.1.tar.gz 474845 SHA256 9c2363ed9542a6784ff08e247182137e71f2ddb79e8e6c1ac4ad50d21ced3715 SHA512 267d62cfeb886ea00fa412de1a91a34821460d0f4ad789dcfb3547018300e1cbf480917571b19652f2d449369293031d9534f9533bbf6a59560f4f10608c9cd2 WHIRLPOOL a930d0a007c91dbc3b7c83a1ccfb659f53aa3f151b8b3984dc7208697ddb1f73ce7012c7c968dd5295b2e90e62db03e1c582267c1b8b5230745735f462a1f757
+EBUILD haveged-1.9.1.ebuild 1002 SHA256 fa0ef41c14e8c159640315f9159d230a357f8f7891343ce3f2354a7e48d7c22b SHA512 f156ac90f991ccd4b090657055e323123915398a9e8877dc4363b297b192709d3240d68cab397a7d8de96465f08e5b833370ea19e0b5673cc3b9638e30f0af59 WHIRLPOOL 71a006ee67bbcd0075f9cfaa43bcc47bcc680625175826365af65e7888f090f6d027851e5d51d045a6b06f0b09ab7bfddfcb9f52f506337b14d159f824592e39
+MISC ChangeLog 3664 SHA256 8d45ff274b31c21fbc867cea8694dae0ee929fac39c85c3b7579bc1a052c17fe SHA512 3454a10b27cc4b3d38b9d383a6165f054d1a25d35997538691e302961f38a8febc559484d80ec73e771765a6a49b8e70af92c17c2a18c6d394b062cf438f8bd3 WHIRLPOOL 5b763bf58f3f35f2f9388124f42c677f960541b031c93bb58805bdd59fcd1495d3404300ca5a2578f7d7a4689e79b29fa18afb1df7aaf8b6e4b32476f05eb8e2
+MISC ChangeLog-2015 4721 SHA256 891d6206f396f0fd8db7bf1c012ea23b1a02ca6ae0816c37e96db30e87bf7217 SHA512 5116b80597b8f2ab459cd3b0db0fa300a06dd3a8e97a2f1e1e9747625a7ea49e8a1cc371935022e2d095bcba7d9cd4862fda6879e42d66233c97180ce3195841 WHIRLPOOL 22e50056fd166be1091e73b09ff672081c8edbf484c8e56eee5ff2345e1a9884c9ec2400e50cef25f6ad00f7ad20470bf501b89d718d544b7dab75883e85fa2e
+MISC metadata.xml 371 SHA256 ba67734d1cb09ee2e4b944add07462c0da58f2d1b9b350628f22e72008e43aae SHA512 640e188a0829d4408d9bc7ca0c7558222ed8148afef25a88a136c0ae5bb44531bc8352c9c1da1c13e395cb54d67c62a485fa4f6329ad7b76255def9d979b70d0 WHIRLPOOL 080d05b46f2ee39b2ed3a69af79fe6030d3a37b55937110131905fb11ce2c174e64398368e88b76040d6615dfe26fe270bd0fd9e1183233bfa5ecf330ebaa490
diff --git a/sys-apps/haveged/files/haveged-conf.d b/sys-apps/haveged/files/haveged-conf.d
new file mode 100644
index 000000000000..a8520a3771e1
--- /dev/null
+++ b/sys-apps/haveged/files/haveged-conf.d
@@ -0,0 +1,9 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+WATERMARK=1024
+
+# -r0 is added always
+HAVEGED_OPTS="-w ${WATERMARK} -v 1"
+
+# vim:ft=gentoo-conf-d:
diff --git a/sys-apps/haveged/files/haveged-init.d.3 b/sys-apps/haveged/files/haveged-init.d.3
new file mode 100644
index 000000000000..2fbf27c27cd2
--- /dev/null
+++ b/sys-apps/haveged/files/haveged-init.d.3
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/run/${SVCNAME}.pid
+
+command="/usr/sbin/${SVCNAME}"
+command_args="-r 0 ${HAVEGED_OPTS} -p ${pidfile}"
+
+depend() {
+ need localmount
+ use logger
+ provide entropy
+}
+
+# vim:ft=gentoo-init-d:
diff --git a/sys-apps/haveged/files/haveged.conf b/sys-apps/haveged/files/haveged.conf
new file mode 100644
index 000000000000..20c09ea66a47
--- /dev/null
+++ b/sys-apps/haveged/files/haveged.conf
@@ -0,0 +1,6 @@
+# Copyright 2013-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+WATERMARK=1024
+
+# vim:ft=haveged.conf:
diff --git a/sys-apps/haveged/files/service.gentoo b/sys-apps/haveged/files/service.gentoo
new file mode 100644
index 000000000000..f896ed2a9b7a
--- /dev/null
+++ b/sys-apps/haveged/files/service.gentoo
@@ -0,0 +1,12 @@
+[Unit]
+Description=Entropy Daemon based on the HAVEGE algorithm
+Documentation=man:haveged(8) http://www.issihosts.com/haveged/
+
+[Service]
+Type=forking
+PIDFile=/run/haveged.pid
+EnvironmentFile=/etc/haveged.conf
+ExecStart=/usr/sbin/haveged -w ${WATERMARK} -v 1 -p /run/haveged.pid -r 0
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/haveged/haveged-1.9.1.ebuild b/sys-apps/haveged/haveged-1.9.1.ebuild
new file mode 100644
index 000000000000..d6c9aa57c29d
--- /dev/null
+++ b/sys-apps/haveged/haveged-1.9.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils systemd
+
+DESCRIPTION="A simple entropy daemon using the HAVEGE algorithm"
+HOMEPAGE="http://www.issihosts.com/haveged/"
+SRC_URI="http://www.issihosts.com/haveged/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc x86"
+IUSE="selinux"
+
+DEPEND=""
+RDEPEND="!<sys-apps/openrc-0.11.8
+ selinux? ( sec-policy/selinux-entropyd )"
+
+# threads are broken right now, but eventually
+# we should add $(use_enable threads)
+src_configure() {
+ local myeconfargs=(
+ --bindir=/usr/sbin
+ --enable-nistest
+ --disable-static
+ --disable-threads
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ # Install gentoo ones instead
+ newinitd "${FILESDIR}"/haveged-init.d.3 haveged
+ newconfd "${FILESDIR}"/haveged-conf.d haveged
+
+ systemd_newunit "${FILESDIR}"/service.gentoo ${PN}.service
+ insinto /etc
+ doins "${FILESDIR}"/haveged.conf
+}
diff --git a/sys-apps/haveged/metadata.xml b/sys-apps/haveged/metadata.xml
new file mode 100644
index 000000000000..f583146d8316
--- /dev/null
+++ b/sys-apps/haveged/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 type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+<maintainer type="project">
+ <email>sysadmin@gentoo.org</email>
+ <name>Gentoo Sysadmin Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/hbaapi/Manifest b/sys-apps/hbaapi/Manifest
new file mode 100644
index 000000000000..7029fa049863
--- /dev/null
+++ b/sys-apps/hbaapi/Manifest
@@ -0,0 +1,8 @@
+AUX hba.conf 1215 SHA256 3ce301c262ac75ec932ce85c049f9f0195e87ecea0461d637a69e9da3fa45179 SHA512 5877c3a461b3d8f717d30b8ff706d31b9b607b94d9a7bfed0fabdd103400e6c0a3b2a26418f948a79d72f5ad1303123cb1af55bbc62dcc47ccc245260168a490 WHIRLPOOL c079ba40f31749c3025de4ce7b262fc76d1e8a1ed25eb7dd4081859c60c2384afe1af84670ff8a39996772b8784fe90ba0f8a31306d96f008a5e081d3effbc59
+AUX hbaapi-2.2-qa.patch 1040 SHA256 b74e85e793192f7d0cdef84f4b9e3f34d0125758ce5715ebf1b4881c0a98d710 SHA512 d920073a442e2421911eaa5cb67459f642f8c9cae0ceb987f68327614d4d6377771d2c57614cebe117abcd82c30a5bd61d3de9fb7dbd14b876e6b563fc9bafce WHIRLPOOL 979eddc07cbd4b5cb2191db482fb0d4422c589df6f9b586663760cb801c6e61009cd5c50fa6c5623a0fad211908dbc68a127b0b36075ac90463142426f90dec9
+DIST hbaapi-2.2.Makefile.gz 1356 SHA256 62a4339c732437895932873810d2b4783b9f170b5af5be402f244b0908cefeec SHA512 1d02546c0dc9143baf1538f3b57e23da4a6b9e685e125c279afac252ae6b4dcd4c8890ed888f8177b5e86c3f76dfabcc9a8d489102c6c68a5d80bf5399118545 WHIRLPOOL 1871c0b71739e2ead12d8e3bbbe2b9630c99703b4b6798aa0b1927fa78133d984aa0d349025207108fd571d0d445fedad9717d4d6c7786989bc36cf0ece00021
+DIST hbaapi_src_2.2.tgz 30232 SHA256 c1b64243666e01c82c3f58e2b032fc76cbe6ced92d894bee2ea83ab99fc90c43 SHA512 83d8d3df0208f632016acac65bc03b9610eb47d98e99565e2bdbe543382b141c0b6d148272dffc421a36f16ee511027899ee2b70a04435a6ef221e0bc559e511 WHIRLPOOL cc8089f9ff9c29f594d5bf579e66400692b0f1455547df8cb1918fd83cef0c818d382978553c210cb5762f2c97010818984eb80f2f54a9719ae456e3fd5ab8d3
+EBUILD hbaapi-2.2.ebuild 899 SHA256 71a20b2f0130c98c2d5dfd5a723fd9a4ba778e01b6b63e59b8a06581eb8c9c44 SHA512 dd067b58e6133cd4fd1f36d2621dfa1eeedba7f6d3c0f30ca9219587921e886ab18a6c0d6f154c8f3db8440d2b3b7c7cdc4cc170054bd8fdd251c0c0dcf2fbf4 WHIRLPOOL cf13d54006fbc3a7c112b048965e3119b7b93206ae73b284759b429deb1b49893af30da375a62f62d86eb2346f9a4be66574482a4c80de73c0a96c00e51c59be
+MISC ChangeLog 2964 SHA256 7dc7f720adfb1333db624dbfdc1dcc1b784f20b751712994c7a20ffec2a53e02 SHA512 c9403feea8ec55963e19df4571e398a85c041ba05a5e028bd431aea07f24d098dbf823c678eada692821c067ea09f7197576cf6b6038d8a35389f7284e851f5a WHIRLPOOL 16ed038863417c7257b8b0a4795f27b777fd1665ccb763aa099453a3c261fc2f836dfaab25029d6d2fad2c2e5c7cbbf33541660878baca16a6c82e476fd9e139
+MISC ChangeLog-2015 961 SHA256 7716a211c0568a062a7793e247f7b714028b5f6e0c0297b4d7166d2609d77314 SHA512 18617a6f8ce13cd9f277a0e9c7f1f0366f2bc5ed59853f803019c8e44275cd742e46c00acd124c1d92c5186db719a3c96a8a04eeccfdc91d12f95596f643edda WHIRLPOOL cc83e7e0a7162e2e3b18072d751f099bd3d90dde401766ccdbb81dcb63acf771de922bf61fbea3ed826bb4ddd00b534c2a5a00d348d397e387e4b0a3e6be75b8
+MISC metadata.xml 326 SHA256 011f956a823982a5109d317095c03d4b1e52131bc38732faf8db39dce2bd4e6d SHA512 e50b86ac61e46085fad0a5d2e921438fffebfcf06181088e011e16da04d4f024d6c55c1d551d20446ff20a4b639dbfb07315999b6959ae53ce3a97395761eb3e WHIRLPOOL 9a73cc8e0e50580d16805182671829f4a5f02f568ebfa577495614b7cc7629ce52f17a1e6ce52b35dfd086a8294a6246afe59e1b18968cfe8add6283d19b907f
diff --git a/sys-apps/hbaapi/files/hba.conf b/sys-apps/hbaapi/files/hba.conf
new file mode 100644
index 000000000000..347c24b80e36
--- /dev/null
+++ b/sys-apps/hbaapi/files/hba.conf
@@ -0,0 +1,43 @@
+#
+# This file contains names and references to HBA libraries
+#
+# Format:
+#
+# <library name> <library pathname>
+#
+# The library name should be prepended with the domain of
+# the manufacturer or driver author.
+#
+# 32bit/64bit implementation note:
+# If a 32bit implementation tries to load a 64 bit library,
+# the load will fail with the result that the 64 bit vendor
+# library is ignored.
+# Likewise, if a 64bit implementation tries to load a 32 bit library,
+# the load will fail with the result that the 32 bit vendor
+# library is ignored.
+
+#org.snia.sample32 /usr/lib/libsample.so
+#com.qlogic.qla32 /usr/lib/libhbaapiqla.so
+#com.emulex.lightpulse32 /usr/lib/libhbaapiemu.so
+#com.emulex.lightpulse64 /usr/lib/sparcv9/libhbaapiemu.so
+#JniHbaLib /opt/JNIsnia/Solaris/Jni/32bit/JniHbaLib.so
+#JniHbaLib /opt/JNIsnia/Solaris/Jni/64bit/JniHbaLib.so
+
+#INSERT_LIB_MARKER - Do not edit this line - Gentoo will insert items after this
+
+
+# Set a debug level (depends on compilation switches)
+#
+# Format:
+#
+# "debuglevel" <debug level>
+#
+# 0 is default, 1 show vendor library opens,
+# 2 shows function calls, 3 shows callback events
+#
+# Uncomment the next line to specify a level
+#debuglevel 3
+
+
+
+
diff --git a/sys-apps/hbaapi/files/hbaapi-2.2-qa.patch b/sys-apps/hbaapi/files/hbaapi-2.2-qa.patch
new file mode 100644
index 000000000000..240cc1d2d473
--- /dev/null
+++ b/sys-apps/hbaapi/files/hbaapi-2.2-qa.patch
@@ -0,0 +1,37 @@
+--- hbaapi_src_2.2.orig/HBAAPILIB.c
++++ hbaapi_src_2.2/HBAAPILIB.c
+@@ -30,7 +30,6 @@
+
+ #ifdef WIN32
+ #include <windows.h>
+-#include <string.h>
+ /*
+ * Next define forces entry points in the dll to be exported
+ * See hbaapi.h to see what it does.
+@@ -40,6 +39,7 @@
+ #include <dlfcn.h>
+ #include <strings.h>
+ #endif
++#include <string.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include "hbaapi.h"
+@@ -395,7 +395,7 @@
+ GRAB_MUTEX(&_hbaapi_APSE_mutex);
+ GRAB_MUTEX(&_hbaapi_TE_mutex);
+ GRAB_MUTEX(&_hbaapi_LE_mutex);
+- for(listp = cb_lists_array, found = 0; found == 0, *listp != NULL; listp++) {
++ for(listp = cb_lists_array, found = 0; found == 0 && *listp != NULL; listp++) {
+ lastp = *listp;
+ for(cbp=**listp; cbp != NULL; cbp = cbp->next) {
+ if(cbhandle != (HBA_CALLBACKHANDLE)cbp) {
+--- hbaapi_src_2.2.orig/hbaapitest.c
++++ hbaapi_src_2.2/hbaapitest.c
+@@ -28,6 +28,7 @@
+
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #ifndef WIN32
+ #include <dlfcn.h> /* Dynamic library support for Solaris */
+ #include <time.h>
diff --git a/sys-apps/hbaapi/hbaapi-2.2.ebuild b/sys-apps/hbaapi/hbaapi-2.2.ebuild
new file mode 100644
index 000000000000..11325810f4da
--- /dev/null
+++ b/sys-apps/hbaapi/hbaapi-2.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_PN="${PN}_src"
+MY_P="${MY_PN}_${PV}"
+DESCRIPTION="The Host Bus Adapter API for managing Fibre Channel Host Bus Adapters"
+HOMEPAGE="http://hbaapi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz
+ mirror://gentoo/${P}.Makefile.gz"
+
+LICENSE="SNIA"
+SLOT="0"
+KEYWORDS="~ppc ~x86 ~amd64"
+IUSE=""
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ mv "${WORKDIR}"/${P}.Makefile "${S}"/Makefile
+
+ sed -i -e "s/-g -c/${CFLAGS} -c/" \
+ -e "s/-shared/\0 ${LDFLAGS}/" \
+ Makefile || die
+
+ epatch "${FILESDIR}"/${P}-qa.patch
+}
+
+src_compile() {
+ # not parallel safe!
+ emake -j1 CC="$(tc-getCC)" all
+}
+
+src_install() {
+ into /usr
+ dolib.so libHBAAPI.so
+ dosbin hbaapitest
+ insinto /etc
+ doins "${FILESDIR}"/hba.conf
+ dodoc readme.txt
+}
diff --git a/sys-apps/hbaapi/metadata.xml b/sys-apps/hbaapi/metadata.xml
new file mode 100644
index 000000000000..4ca0373a86f9
--- /dev/null
+++ b/sys-apps/hbaapi/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">hbaapi</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/hdparm/Manifest b/sys-apps/hdparm/Manifest
new file mode 100644
index 000000000000..bd1f7bc6550c
--- /dev/null
+++ b/sys-apps/hdparm/Manifest
@@ -0,0 +1,12 @@
+AUX hdparm-9.48-sysmacros.patch 474 SHA256 6e75ceceac0065586af5982822d3c54fbd189dbd929102d40ac3fbf372fc1698 SHA512 cd12a544f6149076c48657f572d71dbc400fa80fa26e6604325d3812159f2a3cd3ab79d8f248b64aac3db7c9913c6f406e427cab62103c927274ff6439a4151a WHIRLPOOL 453542b64f9c64dce17824a46d4d81468b79f7252eb8dc502578264cc3735d15c08ee69a61e98be5e451f4477e05c4fdf70248ec2267d4d177295e9f515ce65c
+AUX hdparm-9.50-build.patch 1216 SHA256 389c96c9769b470b7a6e50d3a02ace02cc15d4f4058229e24f808e1f47c8ec99 SHA512 5b914d446a1a8ee5e99253abc450dec706e57a55d87d82b14e4fcabf1cd76d0575f3adc1a3a226925662ac30cd674403d5b652af17e8776bdc43453b2cda9951 WHIRLPOOL 837f6e449cdbd20ae2991b57f01d6542d4ac5f00ef8d63e1b6449fe026e3c6e50ae96c27c3c769cea27e71b04cc4fd24c0b082243f65f1262b18145908a7f598
+AUX hdparm-9.51-build.patch 1210 SHA256 cb69bd4c70ee1e5c0e854ff4f9c86b512e1dee1b9843eb64b74643d477155e39 SHA512 d8efe50cc8ab963be2ace3e52e077e3be8d266b2c5c293febe344fc53760d53c1b52f7bbd1c7813f7a7979a6e4ebc52cb808dc3797f6e1ac7949ac5f9696239a WHIRLPOOL 77f0351420208af26c3e48ae022396cf9535093914341ab2510e33ac94872863f75e91f7b95062e1a495d50ff2f87c2efad553f52485d7c17f00f62ecff7e11b
+AUX hdparm-conf.d.3 872 SHA256 37c95ff723fa578e9039613d09dbf790d99113a318c065422986c744519214e9 SHA512 968c6b9d26a71bf724728c259d35a499a644496875eac255dcac3cb4a7e5cadb677a4f6e5e0f8bbd7e1826b6fb77cb39af15b11d1e59b3e9daf9ba442b9e6f02 WHIRLPOOL 110d330860c4f5e3b1626b85ab369a02e5c092acf656edc845a2f311b5349644317ec2021063a0fb977d3b9851e0bb9c54fd66e814a080d6af3aa0f05fbd658b
+AUX hdparm-init-8 1360 SHA256 05b264cadc84984f773cd555af322b41fdb13da7cb2ca60d8a7d590ddf4d5e5f SHA512 0417168cf540d2385c5edc4e199c9c2318f97c397d4bbb8b0ac6d4dcadf153564a51a9a5da172442c75a670f79fdec84da5db777a1400cf3c8d8cf6a7066fcc8 WHIRLPOOL 5b0a1ac41153ba724540cdc8285dda32916ce1251ef94cca3b2bfd10ceff2d317f838827efb5f8646993617436f030768b00cf24ccd8dfa786f592128d90f69c
+DIST hdparm-9.51.tar.gz 133725 SHA256 1afad8891ecbe644c283f7d725157660ebf8bd5b4d9d67232afd45f83d2d5d91 SHA512 144d073d697d05058e0240ff46e5517803baa8475e1d381a31c25179ceb1564bbb561ba7f9dee8654d80a3510e3bf2f2d2f4a267618f0ab27967f37626aef91c WHIRLPOOL 4010a38656098820f7b34fced0b001209c12c42d22a1d8c2ca8ac3370e938ba1fb06f98afd7dcc1a1e22abf910bd476663fe8ad18fb221605e702e14bcabc25f
+DIST hdparm-9.52.tar.gz 140737 SHA256 c3429cd423e271fa565bf584598fd751dd2e773bb7199a592b06b5a61cec4fb6 SHA512 7c37d1381c1dd2d46762a8cdcaba2015b0b051ee7bd135dbcf6346def51b085cc2f9ecd7e1ebdc67e12ab4b765df548d4757b3700ed6e7514c2b13ed40661c59 WHIRLPOOL 0ce98e2d496c849be1300d76d1d67757448354a019b5c455f579435d4003055baeef87085da25e6b97958a1c4b07431d805c5cbfd51a1bf10d963fbf7ea91391
+EBUILD hdparm-9.51.ebuild 1068 SHA256 77ea5e2a05e6a6d1197f72414a5885e718b85062f89007748b76a409d3ae5491 SHA512 af88b4d68dbb6c844b170a0313bb0ba98b6a0b2e36b3b2b6e45a5e6f6f6129f2a2aafb6b0fa63177b2af717cac5c0e322f3ed00f7ffe6a6c941dfa8145d3d7bb WHIRLPOOL 0ad3c1be3f3e2316691927aaa99e688b0599599d63c4c0604b57cf46e27e02af7d4cb99baf07f669e706eba08c0d51955b00f714f890978f11147520436db4b9
+EBUILD hdparm-9.52.ebuild 1078 SHA256 eb2301df15ed656a22f666b66b1026e3802a6a8cb3d7cef71b7bc5729b329c5b SHA512 ac4011c806f47a3738bef9e0665f4b7f5bde684b201d312b1c6f0cd117a1a66527204091b02cbfbbc8b4eeb715507e1f5e52aeee29a7e0e7af2aa860530e019a WHIRLPOOL b3532ab5b6e1dd6b484993ba8e9a2779edbe14680e92d062e1ed38aff7f809f4d4fc72b2ab5268dd146555365ded84cc7b70a1360f98ba3a7ff8c265510f73a5
+MISC ChangeLog 6089 SHA256 1c9961ba41505fa44254f46d5407b0fe041c9f652e219337d5bec5655c1a416c SHA512 c16eaa5639e54681ec0e6034c0967bb647fcbb49284124a52d5e4623575be60a9a4e4f076bc73e633ef68df7e27711eab3a202dfdcf3935f0ef4d061f1eeb953 WHIRLPOOL d26ee92e3246dc80fb5cfa545c8e4946a0a5eaff9dcd9aa73a0534f6c72a8d4577c777ee7a99af71fd00bef9bb359465462358010754d8b13961b52bacff5b3b
+MISC ChangeLog-2015 29602 SHA256 b11c232cbca367d9174b4a13a5bc97d4ff4e2f881ddc9272bc0147bca2efeb1c SHA512 2767c835711cb2284f76f6af9e300f2d398b76b9ba9f9d0af0ff2dfa468c4632ad45f1a1a1e27b6fbfd6de280c217190f4cc7b9677831542f52dcf519c78ac11 WHIRLPOOL 6365cbaf837b554f04294f386624f759465fa9f5f602c44130cd2fbf9e0c475387647e97529584f4a86f7624d4482e94c6da33b3cf2268d79bb73564170c268c
+MISC metadata.xml 326 SHA256 7be17151b3f5f5c65b8edad44e9c49ac62d306f856a257b67e0f01a1d6b1796d SHA512 39219fcef0756910c51e804cf94170408208840e7b88d99b4583f8fcfb02e1664358f9d4bf4c3f1a1a619b6a87852bc4831c93f10215500842023132a85c2287 WHIRLPOOL 0c72b42d0ce47a7985115e1f65cd3a25bee06d41807b746e32966d69de586d4a84e22ffba08d1fbe0f0526d80074d8433813652e4512cadee0bbc847dac19e1b
diff --git a/sys-apps/hdparm/files/hdparm-9.48-sysmacros.patch b/sys-apps/hdparm/files/hdparm-9.48-sysmacros.patch
new file mode 100644
index 000000000000..98a08c7d36d0
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.48-sysmacros.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/580052
+https://sourceforge.net/p/hdparm/patches/44/
+
+--- a/geom.c
++++ b/geom.c
+@@ -15,6 +15,7 @@
+ #include <errno.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/ioctl.h>
+ #include <linux/types.h>
+ #include <linux/fs.h>
+--- a/sysfs.c
++++ b/sysfs.c
+@@ -15,6 +15,7 @@
+ #include <dirent.h>
+ #include <limits.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <linux/types.h>
+
+ #include "hdparm.h"
diff --git a/sys-apps/hdparm/files/hdparm-9.50-build.patch b/sys-apps/hdparm/files/hdparm-9.50-build.patch
new file mode 100644
index 000000000000..ff1948acb01e
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.50-build.patch
@@ -0,0 +1,32 @@
+* drop hardcoded -O2 flag from CFLAGS
+* drop hardcoded -s (strip) flag from LDFLAGS, and respect user LDFLAGS
+* fix hardcoded `make` and hardcoded -j2 flags
+* respect CFLAGS when linking
+
+--- a/Makefile
++++ b/Makefile
+@@ -13,9 +13,8 @@
+ CC ?= gcc
+ STRIP ?= strip
+
+-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
++CFLAGS += -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs
+
+-LDFLAGS = -s
+ #LDFLAGS = -s -static
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+@@ -24,11 +23,10 @@ INSTALL_PROGRAM = $(INSTALL)
+
+ OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o
+
+-all:
+- make -j2 hdparm
++all: hdparm
+
+ hdparm: hdparm.h sgio.h $(OBJS)
+- $(CC) $(LDFLAGS) -o hdparm $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o hdparm $(OBJS)
+ $(STRIP) hdparm
+
+ hdparm.o: hdparm.h sgio.h
diff --git a/sys-apps/hdparm/files/hdparm-9.51-build.patch b/sys-apps/hdparm/files/hdparm-9.51-build.patch
new file mode 100644
index 000000000000..2c6bdba68e3f
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.51-build.patch
@@ -0,0 +1,32 @@
+* drop hardcoded -O2 flag from CFLAGS
+* drop hardcoded -s (strip) flag from LDFLAGS, and respect user LDFLAGS
+* fix hardcoded `make` and hardcoded -j2 flags
+* respect CFLAGS when linking
+
+--- hdparm-9.51/Makefile
++++ hdparm-9.51/Makefile
+@@ -13,9 +13,8 @@
+ CC ?= gcc
+ STRIP ?= strip
+
+-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
++CFLAGS += -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs
+
+-LDFLAGS = -s
+ #LDFLAGS = -s -static
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+@@ -24,11 +23,10 @@
+
+ OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o
+
+-all:
+- $(MAKE) -j4 hdparm
++all: hdparm
+
+ hdparm: hdparm.h sgio.h $(OBJS)
+- $(CC) $(LDFLAGS) -o hdparm $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o hdparm $(OBJS)
+ $(STRIP) hdparm
+
+ hdparm.o: hdparm.h sgio.h
diff --git a/sys-apps/hdparm/files/hdparm-conf.d.3 b/sys-apps/hdparm/files/hdparm-conf.d.3
new file mode 100644
index 000000000000..a1ae626b3b05
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-conf.d.3
@@ -0,0 +1,26 @@
+# /etc/conf.d/hdparm: config file for /etc/init.d/hdparm
+
+#
+# Note that options such as -y which force *immediate* power saving options
+# should generally not be placed here. The hdparm init.d script may run at
+# anytime with respect to other init.d scripts that do system wide drive
+# scans (like the hald script), so they will merely get spun right back up.
+# If you wish to use these options, please use the local.start init.d script
+# instead so that you're guaranteed that it will run last.
+#
+
+# You can either set hdparm arguments for each drive using hdX_args,
+# discX_args, cdromX_args and genericX_args, e.g.
+#
+# hda_args="-d1 -X66"
+# disc1_args="-d1"
+# cdrom0_args="-d1"
+
+# or you can set options for all PATA drives
+pata_all_args="-d1"
+
+# or you can set options for all SATA drives
+sata_all_args=""
+
+# or, you can set hdparm options for all drives
+all_args=""
diff --git a/sys-apps/hdparm/files/hdparm-init-8 b/sys-apps/hdparm/files/hdparm-init-8
new file mode 100644
index 000000000000..bb88d447e730
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-init-8
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before bootmisc
+}
+
+do_hdparm() {
+ local e=
+ eval e=\$${extra_args}
+ [ -z "${args}${all_args}${e}" ] && return 0
+
+ if [ -n "${args:=${all_args} ${e}}" ] ; then
+ local orgdevice=$(readlink -f "${device}")
+ if [ -b "${orgdevice}" ] ; then
+ ebegin "Running hdparm on ${device}"
+ hdparm ${args} "${device}" > /dev/null
+ eend $?
+ fi
+ fi
+}
+
+scan_nondevfs() {
+ # non-devfs compatible system
+ local device
+
+ for device in /dev/hd* /dev/sd* /dev/cdrom* ; do
+ [ -e "${device}" ] || continue
+ case "${device}" in
+ *[0-9]) continue ;;
+ /dev/hd*) extra_args="pata_all_args" ;;
+ /dev/sd*) extra_args="sata_all_args" ;;
+ *) extra_args="_no_xtra_args" ;;
+ esac
+
+ # check that the block device really exists by
+ # opening it for reading
+ local errmsg= status= nomed=1
+ errmsg=$(export LC_ALL=C ; : 2>&1 <"${device}")
+ status=$?
+ case ${errmsg} in
+ *": No medium found") nomed=0;;
+ esac
+ if [ -b "${device}" ] && [ "${status}" = "0" -o "${nomed}" = "0" ] ; then
+ local conf_var="${device##*/}_args"
+ eval args=\$${conf_var}
+ do_hdparm
+ fi
+ done
+}
+
+start() {
+ if get_bootparam "nohdparm" ; then
+ ewarn "Skipping hdparm init as requested in kernel cmdline"
+ return 0
+ fi
+
+ scan_nondevfs
+}
diff --git a/sys-apps/hdparm/hdparm-9.51.ebuild b/sys-apps/hdparm/hdparm-9.51.ebuild
new file mode 100644
index 000000000000..23e26825b22c
--- /dev/null
+++ b/sys-apps/hdparm/hdparm-9.51.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Utility to change hard drive performance parameters"
+HOMEPAGE="https://sourceforge.net/projects/hdparm/"
+SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz"
+
+LICENSE="BSD GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.48-sysmacros.patch #580052
+ "${FILESDIR}"/${PN}-9.51-build.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ use static && append-ldflags -static
+}
+
+src_configure() {
+ tc-export CC
+ export STRIP=:
+}
+
+src_install() {
+ into /
+ dosbin hdparm contrib/idectl
+
+ newinitd "${FILESDIR}"/hdparm-init-8 hdparm
+ newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
+
+ doman hdparm.8
+ dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
+ docinto wiper
+ dodoc wiper/{README.txt,wiper.sh}
+ docompress -x /usr/share/doc/${PF}/wiper/wiper.sh
+}
diff --git a/sys-apps/hdparm/hdparm-9.52.ebuild b/sys-apps/hdparm/hdparm-9.52.ebuild
new file mode 100644
index 000000000000..974af72c31e2
--- /dev/null
+++ b/sys-apps/hdparm/hdparm-9.52.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Utility to change hard drive performance parameters"
+HOMEPAGE="https://sourceforge.net/projects/hdparm/"
+SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz"
+
+LICENSE="BSD GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.48-sysmacros.patch #580052
+ "${FILESDIR}"/${PN}-9.51-build.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ use static && append-ldflags -static
+}
+
+src_configure() {
+ tc-export CC
+ export STRIP=:
+}
+
+src_install() {
+ into /
+ dosbin hdparm contrib/idectl
+
+ newinitd "${FILESDIR}"/hdparm-init-8 hdparm
+ newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
+
+ doman hdparm.8
+ dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
+ docinto wiper
+ dodoc wiper/{README.txt,wiper.sh}
+ docompress -x /usr/share/doc/${PF}/wiper/wiper.sh
+}
diff --git a/sys-apps/hdparm/metadata.xml b/sys-apps/hdparm/metadata.xml
new file mode 100644
index 000000000000..dc7b6247e89e
--- /dev/null
+++ b/sys-apps/hdparm/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">hdparm</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/heirloom-tools/Manifest b/sys-apps/heirloom-tools/Manifest
new file mode 100644
index 000000000000..c652c3e4619d
--- /dev/null
+++ b/sys-apps/heirloom-tools/Manifest
@@ -0,0 +1,5 @@
+DIST heirloom-070715.tar.bz2 1000080 SHA256 eb33f70bcc019b1d0e0a41f1d7552d45c57a16272e4e1c48634ec3e44496a30f SHA512 0b30b0f4c4c92a10ee2da263ea44666f445d96bac86ca4afb7bbb50d8278986e4145a7bcdf3ed9f75611bb956e93e16fc0e19874498ce3ae1a00e6fbb4f910c9 WHIRLPOOL be19c6833970b343f952f28821dea4f3571f6f348841a23b793ea587be65930a7e5fd41fe0ba2b617be343ea520d626e61cb98b7c42e0fe0e78b423c0be3ab83
+EBUILD heirloom-tools-070715.ebuild 1020 SHA256 072c1daa2f076ab3e1752a93290d32437a1955ea07abd8194610ffe3b90d9659 SHA512 b44ea6c70d266452aec9f0f899305b84c8b87a75a11050c7c139899d591faa4652939a1db76bd4d6827cf040de8fcbcd94243255c0ddb9af9133270dc0d4bb4d WHIRLPOOL 34f5ad0af0025b5a9e356f6ff7867d164d226335799145e02e6f41bc29d74174954616714bfa16be3ddabf1f7043ee26779660964b8f1063beb8edf0021a01b2
+MISC ChangeLog 2745 SHA256 873bcbd6878f686ab25dec44aabcd1a158837576793ac37a32a6c62615d38d9e SHA512 8e66dfefb5c1df3fb2c5cfe548dcd2036fee2e4ffeca53380296b612ae10f4c09e5a355ac6fe92fe955d7a4e5005d2828b2707b7cc9f358d29f3f33732b70b04 WHIRLPOOL 8d6c09d0131a249791ba7467c3e8ae8125217c514951dd0e41c077f3ec6a3d7f1845ef31fe1650dd4331b4873cd7978560dd9c5ce33da195b7c93e86ee2c2683
+MISC ChangeLog-2015 1121 SHA256 61cd7247a1882140562a627486857d69aa2fe1dd420367e4d5399d2ddfe85ea2 SHA512 2253f3368a3324ccd36426848859ccd13aaa30116f0926d26f6f5c8468732422caf6d7ea6978b80b9045b66990232ff3b4ca14ab59771298f91ba9d666111d19 WHIRLPOOL 1582e3c3b0feb517b71cb3780d3b56948a7dd0fd2c89d13841d64d7af40ba881885c41a5da21f45c784500963e19e70fd14c285c32f055f19c8d10b3aaa44611
+MISC metadata.xml 325 SHA256 a247a85ff13b84f21c984ec6d6a39c4fda320c8c2691b975aafcda66cc0019cc SHA512 54940bbe65218aceba90442526963ae60b9132d253d71d672d6e7fbef47de99b50249925b39702d0a1f1283cc57ccf91dfe9dd1dcfb88930176752ad46742d62 WHIRLPOOL 21be469cc3c3dd6a5a00afbca937fbfdb809bfef44c97240d4f3dfd092073e13f6775dab79ca8dcfec11f0c8803a84d9707cf9b7185b3dc7ddd58b12793e9f7d
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715.ebuild
new file mode 100644
index 000000000000..dbf4b1181691
--- /dev/null
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic toolchain-funcs
+
+# slightly broken
+RESTRICT="test"
+
+DESCRIPTION="Heirloom toolchest - original Unix tools"
+HOMEPAGE="http://heirloom.sourceforge.net/tools.html"
+SRC_URI="http://downloads.sourceforge.net/project/heirloom/heirloom/${PV}/heirloom-${PV}.tar.bz2"
+
+LICENSE="CDDL GPL-2 LGPL-2.1 9base ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-apps/ed
+ sys-libs/zlib[static-libs]"
+RDEPEND=""
+
+S="${WORKDIR}/heirloom-${PV}"
+
+src_compile() {
+ append-cppflags -D_GNU_SOURCE
+ emake -j1 ||die
+}
+
+src_install() {
+ # we don't want to strip here, so use "true" as noop
+ emake STRIP="true" ROOT="${D}" -j1 install || die
+}
+
+pkg_postinst() {
+ elog "You may want to add /usr/5bin or /usr/ucb to \$PATH"
+ elog "to enable using the apps of heirloom toolchest by default."
+ elog "Man pages are installed in /usr/share/man/5man/"
+ elog "You may need to set \$MANPATH to access them."
+}
diff --git a/sys-apps/heirloom-tools/metadata.xml b/sys-apps/heirloom-tools/metadata.xml
new file mode 100644
index 000000000000..104a871f1a1a
--- /dev/null
+++ b/sys-apps/heirloom-tools/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 type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">heirloom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/help2man/Manifest b/sys-apps/help2man/Manifest
new file mode 100644
index 000000000000..ea4574a4b8f2
--- /dev/null
+++ b/sys-apps/help2man/Manifest
@@ -0,0 +1,10 @@
+AUX help2man-1.46.1-linguas.patch 2352 SHA256 1a75b027ddc3f1cc828f1c71e2a420ff7743cb64f8a34a8a4d93a5be2b8f2032 SHA512 5907aed1745b199b0cad44f6e7669c663761b308b2bb1b669be8ba118d990481c37d1da5477df2cfa9cba30ecffe99c3863215779d683f056fe0c41241a0049b WHIRLPOOL d6e7fbabe555d0e046ce6ece39e018223aaac82337113237efbe53865375d93167035080e0a9ef8d5877ab5344bcd180a969ab2d8a41b833fb448975f9313952
+DIST help2man-1.46.6.tar.xz 171044 SHA256 615ff5ac38369ddb3707c5fd71672ab122639fd9cf6870de172e0127ed632caf SHA512 55bea01b80baf318e4350ee505bf67da9a7e76b7a5cbd861d0fd6e3afe47b82d1de8f1079d0df2f4ea8ec176d6ca95d5c847d8b1c118cf96ab59b06567c1204c WHIRLPOOL 91d4702d69457090ca58074c05763a085e5bd9da162253a14e86c618a619482e44d7d974c7b0fd0139927d5a67b48bc7160f50990bb622984b122d1bb6c7052c
+DIST help2man-1.47.4.tar.xz 189456 SHA256 d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753 SHA512 3320890c4068086bff7a858653fb67ac80363f26772fb0bb702233052e2bcbe647e7b20b1a2246b1a0e026ba2aa8679e6baafe302d78c747da04e29c59b9bafd WHIRLPOOL 6e7bf1f1dcf3552bd97c3975e6bd2dd404f5e3bcc62f00c04225e3085f0705882a16fe54ce45e0558ef6e592f54183b89794abd7135eb4b683408108189ee0a6
+DIST help2man-1.47.5.tar.xz 186044 SHA256 7ca60b2519fdbe97f463fe2df66a6188d18b514bfd44127d985f0234ee2461b1 SHA512 c94f94bbdfb9e288edff2b3181e0f2e858d309aa4fe77cae141571a06b9b5bc2a5c5a4d25ffc1f9108222d56c9040989d63770f5d804323a52d3978059d1eca7 WHIRLPOOL d31885c3a8f5602e0d38a3676e17ee76139a0ab26fc1da61a57609eacad465ae973c8bf8930c22fe7922f2f07882721a0a8d52592d918c81b450f9c6265f7be5
+EBUILD help2man-1.46.6.ebuild 961 SHA256 3c331f54724e6908285c53de6f997b7dd1f55ac2aeea72122c211b88513f81ed SHA512 73e75acc9f8980950a9257e4e08c11f17cd67bf9965d9917e46c43ffe6ccc66aac1c0ae14df72f6b3f9e1fa4c7ca85d96ce260f76a6648f8fdc7907b70185881 WHIRLPOOL 0fe1068673e1db82dad12e3c4fff3e6e2d30e4c860a4b4a95dcb11a3bf8542e5bc45436a81eb184f1b95a5335c75fad49d5e4c22af7f7adae5614c4c2301567a
+EBUILD help2man-1.47.4.ebuild 1099 SHA256 4f555387d0c5923ff39088688ece592964421991183bcf9ad2b1fe4136ba2b38 SHA512 8a27329f3d9d869c4e6e772aa629bb7344fb00bbc33a45568ef09a1f2d4b6a4dbbfe7fb5ac87d4ed019d6e1940e6d9335770614b68db40459465953d19ac79b6 WHIRLPOOL 3c3b217fa3f735baaa652242698210e63a3d8bc0fd2172543b75790ed09a2cd22d6cff24b41cea3f82e402f5eb3aa4e893f157bbfff3cb552f593b71874165fc
+EBUILD help2man-1.47.5.ebuild 1077 SHA256 7bf7f5ba74027acb8fec7b61c4932c2eea2f65b7c3c3d5c3bff610554918bfae SHA512 8dc708b304aae08f8fad597a1e0537e3f709deda7ba7568c1acdfb3d37fe1c338376310160c16cb2a1e02661687f52ebb68fcc0987a418c57121e78376d2bcb0 WHIRLPOOL 827a15c654d03d1056c8d805d72b4ae7dfeef13d78e0db31352931eeb84e97fc513480155668489653221ed998068ff05f719bcf60ab34d3153927f3905ab1bc
+MISC ChangeLog 4770 SHA256 da7132e6698cc6baa760860068a789ce487700e3febb29bd95e380c1243097d1 SHA512 f616a3716e5cb1d2d8ab75b8ab9f5d4950f0e66d68787e7c7b85e95585cc473e528476e94e3301c8a3c0034d37a74a0e8ebb985dbc10ba1aa7b9d3a2ab917919 WHIRLPOOL e1164de772bc476b1651a79b2f2264a0a161593936e44998508b0138598f9a84c8655b7ae993e1d2e54a5d9c54e02f79396432f4bbdaa97a7f092ddef642cd23
+MISC ChangeLog-2015 17647 SHA256 e33c324b885960677a805d9be1545e0dcf8b2d6cc42c6bab19f45a989a30854a SHA512 36341130eb3b9ada5f5b67e03137983b150b5e41c165d4cc3e08651e6120dc0a298957b1e47e0ce9649a62c8fbeaf48095e255815d6adfd4becac0882a0cae5c WHIRLPOOL a7698bca661c97ffb4c1ac4163015a03f3a9ac65a57017d4129aa8fc9c233d392292e628f29bd30688005d36f5eb13d0f005d559d1118815f55fdc3991673c80
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/help2man/files/help2man-1.46.1-linguas.patch b/sys-apps/help2man/files/help2man-1.46.1-linguas.patch
new file mode 100644
index 000000000000..b4631bfa7cd7
--- /dev/null
+++ b/sys-apps/help2man/files/help2man-1.46.1-linguas.patch
@@ -0,0 +1,67 @@
+respect user LINGUAS
+
+--- help2man-1.46.1/Makefile.in
++++ help2man-1.46.1/Makefile.in
+@@ -27,8 +27,15 @@
+ export VPATH = .:$(srcdir)
+
+ DESTDIR =
+-LINGUAS = $(basename $(notdir $(wildcard $(srcdir)/po/*.po)))
+-LINGUAS_TEXI = $(basename $(notdir $(wildcard $(srcdir)/po-texi/*.po)))
++ALL_LINGUAS = $(basename $(notdir $(wildcard $(srcdir)/po/*.po)))
++ALL_LINGUAS_TEXI = $(basename $(notdir $(wildcard $(srcdir)/po-texi/*.po)))
++ifeq ($(LINGUAS),)
++INSTALL_LINGUAS = $(ALL_LINGUAS)
++INSTALL_LINGUAS_TEXI = $(ALL_LINGUAS_TEXI)
++else
++INSTALL_LINGUAS = $(filter $(LINGUAS),$(ALL_LINGUAS))
++INSTALL_LINGUAS_TEXI = $(filter $(LINGUAS),$(ALL_LINGUAS_TEXI))
++endif
+
+ CC = @CC@
+ PERL = @PERL@
+@@ -80,7 +87,7 @@
+
+ install_l10n: install_dirs msg_l10n man_l10n info_l10n
+ set -e; \
+- for lang in $(LINGUAS); \
++ for lang in $(INSTALL_LINGUAS); \
+ do \
+ $(MKINSTALLDIRS) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
+ $(INSTALL_DATA) $$($(FIND_VPATH) po/$$lang.gmo) \
+@@ -89,7 +96,7 @@
+ $(INSTALL_DATA) $$($(FIND_VPATH) $(target).$$lang.1) \
+ $(DESTDIR)$(mandir)/$$lang/man1/$(target).1; \
+ done; \
+- for lang in $(LINGUAS_TEXI); \
++ for lang in $(INSTALL_LINGUAS_TEXI); \
+ do \
+ $(INSTALL_DATA) $$($(FIND_VPATH) $(target)-$$lang.info) \
+ $(DESTDIR)$(infodir)/$(target)-$$lang.info; \
+@@ -151,7 +158,7 @@
+ $(MAKE) $(target) $(target).h2m
+ ./$(target) --include=$(target).h2m --output=$@ ./$(target)
+
+-msg_l10n: $(addprefix po/,$(addsuffix .gmo,$(LINGUAS)))
++msg_l10n: $(addprefix po/,$(addsuffix .gmo,$(ALL_LINGUAS)))
+ po/%.gmo: $(srcdir)/po/%.po
+ test -d po || mkdir po
+ $(MSGFMT) -o $@ $?
+@@ -161,7 +168,7 @@
+ $(MKINSTALLDIRS) localetmp/$$lang/LC_MESSAGES && \
+ $(INSTALL_DATA) po/$$lang.gmo localetmp/$$lang/LC_MESSAGES/$(target).mo
+
+-man_l10n: $(addprefix $(target).,$(addsuffix .1,$(LINGUAS)))
++man_l10n: $(addprefix $(target).,$(addsuffix .1,$(ALL_LINGUAS)))
+ $(target).%.1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL \
+ $(srcdir)/po/%.po
+ lang=$(patsubst $(target).%.1,%,$@); \
+@@ -184,7 +191,7 @@
+ $(target).info: $(srcdir)/$(target).texi
+ $(MAKEINFO) $? -o $@
+
+-info_l10n: $(addprefix $(target)-,$(addsuffix .info,$(LINGUAS_TEXI)))
++info_l10n: $(addprefix $(target)-,$(addsuffix .info,$(ALL_LINGUAS_TEXI)))
+ $(target)-%.info: $(target)-%.texi
+ $(MAKEINFO) $? -o $@.tmp
+ $(FIXUP_TEXI_TRANS) -o $@ $@.tmp
diff --git a/sys-apps/help2man/help2man-1.46.6.ebuild b/sys-apps/help2man/help2man-1.46.6.ebuild
new file mode 100644
index 000000000000..323fc66a7f3a
--- /dev/null
+++ b/sys-apps/help2man/help2man-1.46.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="GNU utility to convert program --help output to a man page"
+HOMEPAGE="https://www.gnu.org/software/help2man/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="dev-lang/perl
+ nls? ( dev-perl/Locale-gettext )"
+DEPEND=${RDEPEND}
+
+DOCS="debian/changelog NEWS README THANKS" #385753
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.46.1-linguas.patch
+}
+
+src_configure() {
+ # Disable gettext requirement as the release includes the gmo files #555018
+ econf \
+ ac_cv_path_MSGFMT=$(type -P false) \
+ $(use_enable nls)
+}
diff --git a/sys-apps/help2man/help2man-1.47.4.ebuild b/sys-apps/help2man/help2man-1.47.4.ebuild
new file mode 100644
index 000000000000..3f1e9219ee38
--- /dev/null
+++ b/sys-apps/help2man/help2man-1.47.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="GNU utility to convert program --help output to a man page"
+HOMEPAGE="https://www.gnu.org/software/help2man/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="dev-lang/perl
+ nls? ( dev-perl/Locale-gettext )"
+DEPEND=${RDEPEND}
+
+DOCS="debian/changelog NEWS README THANKS" #385753
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.46.1-linguas.patch
+)
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i \
+ -e 's/-shared/-bundle/' \
+ Makefile.in || die
+ fi
+ epatch "${PATCHES[@]}"
+}
+
+src_configure() {
+ # Disable gettext requirement as the release includes the gmo files #555018
+ econf \
+ ac_cv_path_MSGFMT=$(type -P false) \
+ $(use_enable nls)
+}
diff --git a/sys-apps/help2man/help2man-1.47.5.ebuild b/sys-apps/help2man/help2man-1.47.5.ebuild
new file mode 100644
index 000000000000..8a0794c2c588
--- /dev/null
+++ b/sys-apps/help2man/help2man-1.47.5.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="GNU utility to convert program --help output to a man page"
+HOMEPAGE="https://www.gnu.org/software/help2man/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="dev-lang/perl
+ nls? ( dev-perl/Locale-gettext )"
+DEPEND=${RDEPEND}
+
+DOCS=( debian/changelog NEWS README THANKS ) #385753
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.46.1-linguas.patch
+)
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i \
+ -e 's/-shared/-bundle/' \
+ Makefile.in || die
+ fi
+ default
+}
+
+src_configure() {
+ # Disable gettext requirement as the release includes the gmo files #555018
+ econf \
+ ac_cv_path_MSGFMT=$(type -P false) \
+ $(use_enable nls)
+}
diff --git a/sys-apps/help2man/metadata.xml b/sys-apps/help2man/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/help2man/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/hexdump-esr/Manifest b/sys-apps/hexdump-esr/Manifest
new file mode 100644
index 000000000000..af60684e02b7
--- /dev/null
+++ b/sys-apps/hexdump-esr/Manifest
@@ -0,0 +1,5 @@
+DIST hexdump-1.8.tar.gz 7463 SHA256 ab692ec15b950c9636719f0780abd73988847c4ffbbbc89ab3512dd428737c3d SHA512 a0f0b9f0386b895b0dd07223e93ca72a7d87f4b0ad663d340cea8266ed7e801178b120c6a78b797a9e12412e7b9c76b45b8e395d1892c7ba3956a90dee45db3d WHIRLPOOL 97157396756aef5ff48294dec806d079f8103d92e9281a9fd63dc548467709c5edebe8b1d9684d0c88300d9d3eebba1c47cb47eafdd91dd47a4ceb275f9173eb
+EBUILD hexdump-esr-1.8.ebuild 747 SHA256 938eb2400b84e6cfcd2044c941b8b47532d71d22708cfcae4e543378641d7cb1 SHA512 2a0a310abd5ab310664e6ac459d8221559f585120a07af9c0c03f5bda32a41b900497ce3509bd78865c3b0483a63954bb7df25b3dfc92866c8d8a585a20b2280 WHIRLPOOL 5e53c64a60c07d6bdc2def40e511960bdbdd016accc851037ec768bff1b52c23f4b07191d86343c2fbd0ca1e1dd899e9458d349b310c2685be8bab97859ba5b1
+MISC ChangeLog 2530 SHA256 75f04052e7e38689445e851fdd544c2eec774d26fd06e4f4e1b0de2d685fee3d SHA512 3589ca13a9c746744fea782e2298ed70889a0eca8abd3e62b37f7881407a9284244c0d86d75ac516a0633ef25c3033a63cbb7ee2d665484ce667b6eeb851950a WHIRLPOOL 7c036a57328b10747800ef93cea4a17b65e5827c1db7827bc8b0af02445b652d00dec6d012459f69e8684e672fcaf17f9aba5def289423323c13ec4ed29f6356
+MISC ChangeLog-2015 4612 SHA256 5179a576e6fddcf6e9899c00934f666dd185d725b9b184a53b56b3b3faf4d35c SHA512 f4c92ee4678c8eda0ba040df6d0c3bb08dc4f1822adf91e9e6a10885ee55dd6fe020a40560e327bafcc6cb6f33c924c6507d6884787479e50e4eb2ce684328ff WHIRLPOOL 291a80d9c3973f7115024072758ba81727394aeb2e794d4e8ce5e86226c2e0e82694a0d81b35be7cb21df669c95167f0ef9817abed15f0d707efd4359d010cd4
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/hexdump-esr/hexdump-esr-1.8.ebuild b/sys-apps/hexdump-esr/hexdump-esr-1.8.ebuild
new file mode 100644
index 000000000000..309feaa76fac
--- /dev/null
+++ b/sys-apps/hexdump-esr/hexdump-esr-1.8.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+MY_P="${P/-esr/}"
+
+DESCRIPTION="Eric Raymond's hex dumper"
+HOMEPAGE="http://www.catb.org/~esr/hexdump/"
+SRC_URI="http://www.catb.org/~esr/hexdump/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+# tests are broken in this release(missing files)
+RESTRICT="test"
+
+src_prepare() {
+ sed -i Makefile \
+ -e "s|-O |${CFLAGS} ${LDFLAGS} |g" \
+ || die "sed on Makefile failed"
+ tc-export CC
+}
+
+src_install() {
+ newbin hexdump ${PN}
+ newman hexdump.1 ${PN}.1
+ dodoc NEWS README
+ dosym ${PN} /usr/bin/hex
+}
diff --git a/sys-apps/hexdump-esr/metadata.xml b/sys-apps/hexdump-esr/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/hexdump-esr/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/highway/Manifest b/sys-apps/highway/Manifest
new file mode 100644
index 000000000000..c26712c2f38d
--- /dev/null
+++ b/sys-apps/highway/Manifest
@@ -0,0 +1,4 @@
+DIST highway-1.1.0.tar.gz 319516 SHA256 7b432909f5cdd35cb393a378a9ee54ee06c8f053e33b2e37e415c7c27618ecfa SHA512 c30c90f5b601a775e64a684037d668acc6c1a8b6e64f7aa1204c184978c49079a3cd07683ebeeab674a9b64932223da0c067fdb184b5918bf88eca7e113c05fd WHIRLPOOL 847f782381db3cc1fe4da82ccc55b029bce6fb563a362eb5ae92da52ae4ba612b1f9c08482d85cbc9a00c239e2abf3016897ecadecf5bd6da00d699b795f6c4b
+EBUILD highway-1.1.0.ebuild 412 SHA256 5a04db958dc5205127a33588ecd7fc589fc64764ccc9557c4a55bd1049c6e125 SHA512 fc3e4372483dc908b77d8d11b61a3afdcb6cc93e75f3f4ffbc832ff734422bfa6a806a3b114ef8d41dbfacb5dedce8c973fd2fb6438f7bb6c016058bc2dd275b WHIRLPOOL 4efb60ccc56c84140dbfa03a4e0fc73315706914ed26caa4bd8e8ddec7a0be67b13c39338d76a2eeb253183aa35d312ec5d2b458034d3bf35f2265000dacc142
+MISC ChangeLog 361 SHA256 9e96a149c0d6c6118bd5f49e9a1acf0b10f1cbaaf82395622f0709531983117f SHA512 80bdc4a73ec33cc373e6d8bf0e3b35c2e1369c0742c08c86594cbd25a31bf5678b54da3218923836e3b27a40e1afaaf1a880cee4a7c517ebd5c6484c9a33955c WHIRLPOOL dd0fb10cb9486bbc4323b2e2b2a619901b2970ba1e0add7aa353df204c5a92c7eeb973ce86f987d23b1da5829dc541e3c0f43cb436d5ca41c1ae6421466a7f74
+MISC metadata.xml 556 SHA256 f346bcab400b1534961420b134d62061c16a36a8fdf650c0ba2c2ebf0d0456a2 SHA512 5f2801d3119a4be7e8723f2e2fd2779a74980aceb716a26cf2e026fe82920353b985c2ace87696d931be244456789a19b4cd216cd583afcf3d6cbc3c3ba91080 WHIRLPOOL 7fa8475fc0c5f3679ffbc75c2fcfba5ed6006955b6be19493accf0cf9f1700a07ca13a14fe2ebddde7f59cb71812a64b7afd448eec0638127dd0e7fd90024917
diff --git a/sys-apps/highway/highway-1.1.0.ebuild b/sys-apps/highway/highway-1.1.0.ebuild
new file mode 100644
index 000000000000..812b73d8fffa
--- /dev/null
+++ b/sys-apps/highway/highway-1.1.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="High performance source code search tool"
+HOMEPAGE="https://github.com/tkengo/highway"
+SRC_URI="https://github.com/tkengo/highway/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+IUSE=""
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare()
+{
+ default
+ eautoreconf
+}
diff --git a/sys-apps/highway/metadata.xml b/sys-apps/highway/metadata.xml
new file mode 100644
index 000000000000..fe4d17c2ec3b
--- /dev/null
+++ b/sys-apps/highway/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>otakuto.gentoo@gmail.com</email>
+ <name>Tact Yoshida</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>alicef@gentoo.org</email>
+ <name>Ferrazzi Alice</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">tkengo/highway</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/hotplug2stdout/Manifest b/sys-apps/hotplug2stdout/Manifest
new file mode 100644
index 000000000000..a5b1d94b7b7c
--- /dev/null
+++ b/sys-apps/hotplug2stdout/Manifest
@@ -0,0 +1,5 @@
+DIST hotplug2stdout-1.2.1.tar.gz 7578 SHA256 4d3e2fefe9ae519a1ade33afb293e63e7694f4cc1483729f5ef96315d8823c02 SHA512 51cdef016b8e57324b005fbe633643c36b2e557da369e48471b6969441610c4489c0a49be28080cca17c8d77124c6540877151acde415dab49971f87160df126 WHIRLPOOL fe0999f64c10e19cfc26b4c4cf533f261600110e8682cd360c273b4de30ae0e84d751b388067788fe488754c8d1a699eb42ea7938e378d8db0da4ba7d6d7a032
+EBUILD hotplug2stdout-1.2.1.ebuild 583 SHA256 cb6687c32e72894bb8a0af83186978252472e89f4c24a642ca1135f88cb45498 SHA512 83e727810a190e1ae8ee867f62e969c86720733d459ba3c6a5bff77c258d12625a6cd51cf09c2be204a716b3752c21b458a8ee469476d5de51af2eaca0b48b0d WHIRLPOOL e057afbc50b10c78c02e2d5d8fc435e5e7af18e04d5782fed98845e3ddaf112da39d4f4db0ea903a2bc031031b46cc4697868f0b6cf6c72c8f3b05e4b513193d
+MISC ChangeLog 2318 SHA256 77b5ee331d999451e2027229eddac702a93eee5dc80cf966a2dc9a22835c1a98 SHA512 895ee9d53050df38f47fdb974a51f6259a7e8d7c885cfc577ca389cf8edcd4e1a7648e78952eb8b5930011befaae0d0491053543f884045a641ecae650e7434d WHIRLPOOL a50e936aa6bfa1c69d824fb42a599ab1c150bf3ffb8222872274f0be034dcb4c82c9beb067ae92515da381d6b71415e75bc055edb7ad7501badb7877bf6f8cc8
+MISC ChangeLog-2015 576 SHA256 fb5b0f296acc251403819748b5b283764008a4b4bc215d8b342f810abbf87a50 SHA512 de4a37e9c3421db014f3f9514bf0c4a29435178a94f66311d4b0fd57b0d4202205ac1cce58e9fa44169c06ba8c6dc5a0ab659414c19d25c2e74050dcdb4a220a WHIRLPOOL 01b12a6f7b19d9e61834928a7c760dfd2323f036b94d537b18973a410e6c02990c7a07839120a3f5546db49f32a8ed835cccf9c44becf379ed99160acdd2307a
+MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed SHA512 8be912ace7468a4396eb1da00a9785030a8ce35da4357a01591876a1056fd45e44da65de2af3e1eb0506ce6551714962c40c3ae5a3aefa2ad231de35af2519be WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630
diff --git a/sys-apps/hotplug2stdout/hotplug2stdout-1.2.1.ebuild b/sys-apps/hotplug2stdout/hotplug2stdout-1.2.1.ebuild
new file mode 100644
index 000000000000..24d87721c34c
--- /dev/null
+++ b/sys-apps/hotplug2stdout/hotplug2stdout-1.2.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="A tool for reading kernel uevent(s) to stdout"
+HOMEPAGE="http://www.bellut.net/projects.html"
+# wget --user puppy --password linux "http://bkhome.org/sources/alphabetical/h/${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+src_prepare() { rm -f ${PN}; }
+src_compile() { $(tc-getCC) ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${PN}.c -o ${PN} || die; }
+src_install() { dobin ${PN}; }
diff --git a/sys-apps/hotplug2stdout/metadata.xml b/sys-apps/hotplug2stdout/metadata.xml
new file mode 100644
index 000000000000..097975e3adc2
--- /dev/null
+++ b/sys-apps/hotplug2stdout/metadata.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+</pkgmetadata>
diff --git a/sys-apps/hponcfg/Manifest b/sys-apps/hponcfg/Manifest
new file mode 100644
index 000000000000..fce0142fe444
--- /dev/null
+++ b/sys-apps/hponcfg/Manifest
@@ -0,0 +1,5 @@
+DIST hponcfg-4.6.0-0.i386.rpm 39344 SHA256 ce4c82aa9cff7ad115208f1a3358f1f6b6891c2356615c10ca825d6b3afef187 SHA512 534e2d656349e34c539755d807456a671363640ca8dd6853787dbf7f2a594acb88478b59b2e21ca07b8c6f118f6ad3c2e0eb1ec072484db6a8fb707bd593e0e7 WHIRLPOOL 8d69682a8a69a8863ae96dea73640ad0900447062deffa0289a440c2cce52089292a05e80c1d0c076c519716bd7f88d803ec7887f2fb817266ffd39fb03359fe
+DIST hponcfg-4.6.0-0.x86_64.rpm 44121 SHA256 9867452e6e1bcbf9ed4f9bc4e7c48d552d7e77348ae026712685c2ef58f76555 SHA512 830abe6816295fa7e0888e0848d707ab41510a9ea6dc17d01fd5de2fa56faf49af43ef6698aa379ac8baa6ab729262e77e209b90103ce67d45bf6f0b2d4df142 WHIRLPOOL 1e30007160e69336dc28db2eebae83099ca6b1d9efc235f2c521f1a4867302ab1540194a6dd37d90dfcef48cffde94ef734281a9164d9ec765ccaff1e922e7b8
+EBUILD hponcfg-4.6.0.0.ebuild 1214 SHA256 73534e88986fea7f8868dc0b0f57352a87ba8aad2f1223f7bb648fd7db70446d SHA512 bbf4e33582cab5cbe33339537e9e66f2c6c7185f8447d25d51e08e3f873225d7252d019acfc7f17d78d932b283bf7f6af2a1912d952746921405daa02e69231b WHIRLPOOL f1af6e20498454d35e68fb0233704a89be3a8bdcf079701504127d919972fb79925c7b44281290db0f8d577b1e85e1bcd3e6679586cbcfe9371bb152a7323d37
+MISC ChangeLog 697 SHA256 78a0b0a7218648518c84c094a1e4a4674146e129112c1d8493e599f7c39f8dff SHA512 449b1a0d46f57dcf2c607c4d76e5ffd127d9b4223a7e8283c40ac430f932174e351a45d0080f3db2869725f0b6c8f4fb7955c468f505db5dc2bc8b27eda8b91c WHIRLPOOL 95ca29458519392922d1529eec0ebf42d7348dd87e52c2183f529600f8349ec3940c81d7b5a1df59a05d286612fa71698f54bf1d43a8a2a8f1c00f6ef4c7c201
+MISC metadata.xml 251 SHA256 57392d56dc3642e88d87f162c5309d9b913a94aaf87247f09d002a6e28ddb24e SHA512 46942a98ef7e36470d1169a5bc8839d25603e33c143cd36327a8a85fc14cb6bfb32247eb7608d92cc58a06cc8eef5bd64d6ec2d21e69a88632e4b936598aa772 WHIRLPOOL ecd6a64abe1bc22a4d1a7ac61cc425e6e33b6f376b7e243de4c8fb86bdcb814022a0de881c76f5130a3e62f8ee129337a58c224e81d501771df5c03dc4e929f3
diff --git a/sys-apps/hponcfg/hponcfg-4.6.0.0.ebuild b/sys-apps/hponcfg/hponcfg-4.6.0.0.ebuild
new file mode 100644
index 000000000000..d8e4a559205d
--- /dev/null
+++ b/sys-apps/hponcfg/hponcfg-4.6.0.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils rpm versionator
+
+MY_PV=$(replace_version_separator 3 '-')
+
+DESCRIPTION="HP Lights-Out Online Configuration Utility (HPONCFG)"
+HOMEPAGE="http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_5ab6295f49964f16a699064f29"
+SRC_URI="
+ amd64? ( https://downloads.linux.hpe.com/SDR/repo/spp/RHEL/6/x86_64/current/${PN}-${MY_PV}.x86_64.rpm )
+ x86? ( https://downloads.linux.hpe.com/SDR/repo/spp/RHEL/6/i686/current/${PN}-${MY_PV}.i386.rpm )"
+
+LICENSE="hpe"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="elibc_glibc? ( >sys-libs/glibc-2.14 )"
+
+S="${WORKDIR}"
+
+QA_PRESTRIPPED="/usr/sbin/hponcfg /usr/li.*/libcpqc.*"
+
+src_install() {
+ dosbin sbin/hponcfg
+
+ # When bumping, verify SONAME (scanelf -S libhponcfg64.so)!
+ if use amd64; then
+ newlib.so "${S}"/usr/lib64/libhponcfg64.so libcpqci64.so.3
+ dosym libcpqci64.so.3 /usr/$(get_libdir)/libhponcfg64.so
+ elif use x86; then
+ newlib.so "${S}"/usr/lib/libhponcfg.so libcpqci.so.3
+ dosym libcpqci.so.3 /usr/$(get_libdir)/libhponcfg.so
+ fi
+
+ dodoc "${S}"/usr/share/doc/hponcfg/*
+
+ pax-mark m "${D}"usr/sbin/hponcfg
+}
diff --git a/sys-apps/hponcfg/metadata.xml b/sys-apps/hponcfg/metadata.xml
new file mode 100644
index 000000000000..a32d600f949d
--- /dev/null
+++ b/sys-apps/hponcfg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>whissi@gentoo.org</email>
+ <name>Thomas Deutschmann</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/hprofile/Manifest b/sys-apps/hprofile/Manifest
new file mode 100644
index 000000000000..317795fbffdd
--- /dev/null
+++ b/sys-apps/hprofile/Manifest
@@ -0,0 +1,11 @@
+DIST hprofile-3.0.6.tar.gz 18236 SHA256 23aaa1d6d2cc5b6e8fb3000a19c7cdfeec71abc0d18ce81727a61cabd73d0532 SHA512 86568314a24397d2ec5898dd3061e91a5597eff49679f0533fdcb0d2c9b76cdb131b25fe45167370174d1514ba222a781c0f09f98a1cc5407898e36c30ff677f WHIRLPOOL 41afc8ee3a824ecc07f1f3305d462ac10cb57a89b5defbef3cd562fd5a90289850470b1adad22f9fb2efa03fe6fb45637d97e350d24ccf38a973503e53d55c68
+DIST hprofile-3.1.1.tar.gz 18489 SHA256 dd3a853ad7928673be689d2514a2e9da0981edc216ecf396f612fb0771dbbdad SHA512 b42bf79840270eccf164a0ba2d5def7d50846fa7043319b23be2be3fabece014a031cc4197c2688a6c4f7a542f0e0961ff538ea879eac81a7f03c024a4d023da WHIRLPOOL f4e397221f7736553ee6430cd6aa11936edc44d5605a028d8ab2cf5aa75fba28c5e80e3a9e5456e08f5c9b21ec04ef8d0cead397630eb77995aea012ef2b9015
+DIST hprofile-3.2.2.tar.gz 18983 SHA256 e1f18cfa09d62c429890f5ab9995f144b67304ab6b703bbe23bc00d4779698bb SHA512 169a6c68659ea0d84b89bf25c8421bdfe7d106c77ca7cf80bafe65a4b24a04267729ef617e795adee5bdbcbfb56102a41c2ee7c926027aef69abe4cdee499328 WHIRLPOOL dae307fb2c664a208bd4cd07c1a256a9e2fcef0609f2105085dd5760321c406e3816debdeb51b3b2a3f34f4c8d2d08a8afec9489f2c8d23c44b60e3f5986d32b
+DIST hprofile-6.1.3.tar.gz 18719 SHA256 c0be810d7ae98fe8944cfd6c993f6ef9aad90f5e91575a99a89eaef89e0ef741 SHA512 33987e1fa61619794c40dce737878a37a7c202e50edcd086fe6b59829908f019438a5dccdbda45eb798e227eb2a6ffd3510788645cd73751baa14b5028f6f670 WHIRLPOOL 4d15f42cb3eb7f30a5bf4c1e9c7dfcc0d2a54390907baef8435ada4d948a67fb45ceebfeaf5ae5ec5ac56823de962761661773f970ccf69393cd1d8ce1c54ad6
+EBUILD hprofile-3.0.6.ebuild 522 SHA256 8dd5696911b58b1ba1c280b60444fe9006471ebf84f8b687734896fb690c57ee SHA512 969e8539dfbcec08f4ab670f342409eb7ff812ad6b70517e00d3dac43b91f1443f470e686c25c74664304afb7c4bbbe131198b9a9a9905eed3d9ebb0ef73fb59 WHIRLPOOL 5f36c9057ccc160156a36e787d7ca7d822f82d5f701b1ad284971a387507d3fa7872a13e5d3300369ef16670ecc2f08b625b03437e503edfa91bacd5fe3d842e
+EBUILD hprofile-3.1.1.ebuild 522 SHA256 8dd5696911b58b1ba1c280b60444fe9006471ebf84f8b687734896fb690c57ee SHA512 969e8539dfbcec08f4ab670f342409eb7ff812ad6b70517e00d3dac43b91f1443f470e686c25c74664304afb7c4bbbe131198b9a9a9905eed3d9ebb0ef73fb59 WHIRLPOOL 5f36c9057ccc160156a36e787d7ca7d822f82d5f701b1ad284971a387507d3fa7872a13e5d3300369ef16670ecc2f08b625b03437e503edfa91bacd5fe3d842e
+EBUILD hprofile-3.2.2.ebuild 522 SHA256 8dd5696911b58b1ba1c280b60444fe9006471ebf84f8b687734896fb690c57ee SHA512 969e8539dfbcec08f4ab670f342409eb7ff812ad6b70517e00d3dac43b91f1443f470e686c25c74664304afb7c4bbbe131198b9a9a9905eed3d9ebb0ef73fb59 WHIRLPOOL 5f36c9057ccc160156a36e787d7ca7d822f82d5f701b1ad284971a387507d3fa7872a13e5d3300369ef16670ecc2f08b625b03437e503edfa91bacd5fe3d842e
+EBUILD hprofile-6.1.3.ebuild 523 SHA256 e88865713ada076c5aa0404a4839bc91963898255f7c2af0347e33f4b4f2b137 SHA512 c726f3d32ef34db1081560de32880ec4c838ed81084e78931d0f6342cf837ce4c957c783bcadbbaa6e06e01ea92ed3afaf6ebead2422f30285bc943c6c82be6e WHIRLPOOL 7aafe01271bcef9f617179441a2a36acadcc4e31f73fc7e46fd0a7f15a94b41abe2bff9816a0a3c1228679d4d56313762bcf499f3b9e7ac963712df3ad88eb0d
+MISC ChangeLog 3217 SHA256 4453fd3efab5380ad748fc7551b00efd0007ffd02d29e5d3b95ff2b18a5aba22 SHA512 0cf855407740c2ebe207f17ffdd788741d459604da1ea971e6bef15f5db8ffa35b379a50ac5a88043ed63e4bd548d5373cfffb48710c335dabb7cfb541b632f3 WHIRLPOOL 06dcc3c645b7199902fbf90c34cc7f3fc912804949123782ef08e07339e5687f68c8102dd495016d0a9d3c37afaa8f5acad414d1207f0b42f7ddb7856a04f2e2
+MISC ChangeLog-2015 1455 SHA256 9f5939d5d0d2d86f51d45aa1c358a29a4919eb1952bfda9ae15641cf4b93a934 SHA512 154dc277f7556d6ff75dd55f01b37d6f96981d2437195a8017062dfb6951b2664ee3f9759302f95e122f0e9c037892260248a85c83d7ce5dd432c782ba703f5c WHIRLPOOL dd297d6673418dff3b12c0adba7de1d00aa67580c3c04c57289bf668ea8b41224b1b813d6100671542c173142b85511cd2e8754e28e52a466b5a4b55272ba8d9
+MISC metadata.xml 334 SHA256 36ff5359102e854552874d560b47cc93a08fbb115a763e80d586bf99bc8b7683 SHA512 e42c69bbb110f8dcd81c1d5a58b04360888bc13f934b54609c5bd65d6a80954dd73b5e777d295713b30fbe0507bb933c09e5fcb31fdf30295f1d2e68de02d053 WHIRLPOOL 7ae30899cd6d73335ca851b9d0ada380a8872ac33d6295b51bc2e7fd3a00cd7b28370f8c0ba1e3a5f72c290672e23860c08770e2d0b8ccfd524ab4c14e4ad93c
diff --git a/sys-apps/hprofile/hprofile-3.0.6.ebuild b/sys-apps/hprofile/hprofile-3.0.6.ebuild
new file mode 100644
index 000000000000..74a49b93ed92
--- /dev/null
+++ b/sys-apps/hprofile/hprofile-3.0.6.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Utility to manage hardware, network, power or other profiles (fork)"
+HOMEPAGE="https://github.com/tokiclover/hprofile"
+SRC_URI="https://github.com/tokiclover/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i '1s:.*:#!/sbin/openrc-run:' hprofile.initd || die
+ sed -i "/^prefix/s:=.*:=${EPREFIX}/usr:" Makefile || die
+}
diff --git a/sys-apps/hprofile/hprofile-3.1.1.ebuild b/sys-apps/hprofile/hprofile-3.1.1.ebuild
new file mode 100644
index 000000000000..74a49b93ed92
--- /dev/null
+++ b/sys-apps/hprofile/hprofile-3.1.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Utility to manage hardware, network, power or other profiles (fork)"
+HOMEPAGE="https://github.com/tokiclover/hprofile"
+SRC_URI="https://github.com/tokiclover/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i '1s:.*:#!/sbin/openrc-run:' hprofile.initd || die
+ sed -i "/^prefix/s:=.*:=${EPREFIX}/usr:" Makefile || die
+}
diff --git a/sys-apps/hprofile/hprofile-3.2.2.ebuild b/sys-apps/hprofile/hprofile-3.2.2.ebuild
new file mode 100644
index 000000000000..74a49b93ed92
--- /dev/null
+++ b/sys-apps/hprofile/hprofile-3.2.2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Utility to manage hardware, network, power or other profiles (fork)"
+HOMEPAGE="https://github.com/tokiclover/hprofile"
+SRC_URI="https://github.com/tokiclover/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i '1s:.*:#!/sbin/openrc-run:' hprofile.initd || die
+ sed -i "/^prefix/s:=.*:=${EPREFIX}/usr:" Makefile || die
+}
diff --git a/sys-apps/hprofile/hprofile-6.1.3.ebuild b/sys-apps/hprofile/hprofile-6.1.3.ebuild
new file mode 100644
index 000000000000..4bff3d42441c
--- /dev/null
+++ b/sys-apps/hprofile/hprofile-6.1.3.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Utility to manage hardware, network, power or other profiles (fork)"
+HOMEPAGE="https://github.com/tokiclover/hprofile"
+SRC_URI="https://github.com/tokiclover/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ default
+ sed -i '1s:.*:#!/sbin/openrc-run:' hprofile.initd || die
+ sed -i "/^prefix/s:=.*:=${EPREFIX}/usr:" Makefile || die
+}
diff --git a/sys-apps/hprofile/metadata.xml b/sys-apps/hprofile/metadata.xml
new file mode 100644
index 000000000000..fd9e55c27e5d
--- /dev/null
+++ b/sys-apps/hprofile/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="github">tokiclover/hprofile</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/hwdata-gentoo/Manifest b/sys-apps/hwdata-gentoo/Manifest
new file mode 100644
index 000000000000..6df339528790
--- /dev/null
+++ b/sys-apps/hwdata-gentoo/Manifest
@@ -0,0 +1,6 @@
+AUX 0.4-openchrome.patch 781 SHA256 760bbb12bd45e054aa9bddb7e19a6dc1aa7a49a0f38d1cfeefce8e93195b85ed SHA512 0fa8effbb7a9ee05780bab67583c9da7b11b38498eaf2b447b5be3190d1b9d924476e07b27bee51b2d6298579a8a07340fc90a2634a579f177f024be0029c9a6 WHIRLPOOL a9857c2d12eddd6ed0d094706ff6313d12ee2385a4b058dca69b065bd0a47e77fe0a6ac626cbafbc9b9f537da52524126e934042035602b6c848a67d4253b8f8
+DIST hwdata-gentoo-0.4.tar.bz2 149060 SHA256 f3bf3853f33cc20be56770f742428fb29ca97769c5984ad80093d2020136918e SHA512 dd62c51986c83ff5a9338fa20d98827cd44d86e808c9a2a52ff327dcdd941d0faed0ea4f85058485e8fc2f78e0c2fa18d3030e27fded8ed1777832ee789c189a WHIRLPOOL a7b35bf6a5b354f2483d6494a5c3f7a19fa9d61cbb6ad91528a12c947ae5562267c3552632bdb86204f494b8ab56ed583fd532bc928300262ef82d523f0b05d9
+EBUILD hwdata-gentoo-0.4.ebuild 851 SHA256 c9aca429983456fa291d63b6d4a678d562f7b6f37627750d9e724f89025a31b4 SHA512 c1c0e2f6036e0e1ecb345a843212ebdcb6bdb497a8bf98113eec0b523ec076e59a3b769677915fbb762ae06f58b5d26cf0f1d5982adbc7cd2128d7f592badc0b WHIRLPOOL 652909c732b61531dff3e4deea81933983ac20a3c86b6691bdbac9b2312a7565b9f6f7278ac73b89b430608b6a7dbc907ece2c95dc4f99b6c50ff3d8c2fe2381
+MISC ChangeLog 2863 SHA256 153dd8b03fc0e1df29b8913e540e96693f0cf2cfe837bd943b86fa3f2f116b07 SHA512 c4eecb0b9506b1abbc6cd8dc8c5a58a05a3aad4788c461c170347ca50be8647787d8e87bc0c32fb4834cc6259f9e8bfec1f4dd3e5927f787e615d5447811ba0a WHIRLPOOL ba78971a6f0ad136c9ffd68b22203e29769cd8c290ec5ca969abcfa11d911542aefe226899ca0c450e1b23b088479322674c1cdb002e2b7b1d7f48b12873937f
+MISC ChangeLog-2015 3467 SHA256 857a1b155665676cfe3325e43efd42e8795de003336c68a822818a9edce97223 SHA512 dad7317c562d7f2bd831500b88e8ed54a87aa2fa7ff253a98235d5d8984b59b05cf0ea01069fd37aa5ff265b6bd692311b666808a77d4e5a99dd01cc46349e69 WHIRLPOOL b76106dfee4333bfe6be20cd3c7065d2f23ff736480661aea8acc7493b71ebfc2eb57cb8aecfb564cdd24b90f462fc43551d783016d9d9b61a4a70a2bbac58c2
+MISC metadata.xml 345 SHA256 d1a0d2b2d4bff06d8259f914d84535985b73e871fe0fdaebe8645332c9655b08 SHA512 0d8a0b6099b83e5d54e235442a361a1eceaf6606522aee190382fc03a8b672c1c2559cdd585942b278e7c48acab7c3e9f7021e7faf9e2775e92eea32ecc2c223 WHIRLPOOL 4afb9e710a358d99fc986c29bb8f8b769499ff82ba235f8a71dcef88909bb4bdbc64f85428914982047b47d82c2ddddb8a85146edb0a89debb6c3a8c0a55d243
diff --git a/sys-apps/hwdata-gentoo/files/0.4-openchrome.patch b/sys-apps/hwdata-gentoo/files/0.4-openchrome.patch
new file mode 100644
index 000000000000..7b0c6e87c9d5
--- /dev/null
+++ b/sys-apps/hwdata-gentoo/files/0.4-openchrome.patch
@@ -0,0 +1,22 @@
+--- a/pcitable
++++ b/pcitable
+@@ -3688,7 +3688,7 @@
+ 0x1106 0x3336 "unknown" "VIA Technologies, Inc.|K8M890CE Host Bridge"
+ 0x1106 0x3337 "unknown" "VIA Technologies Inc.|VT8237A PCI to ISA Bridge"
+ 0x1106 0x3340 "unknown" "VIA Technologies, Inc.|PT900 Host Bridge"
+-0x1106 0x3344 "unknown" "VIA Technologies, Inc.|UniChrome Pro IGP"
++0x1106 0x3344 "Card:S3 UniChrome" "VIA Technologies, Inc.|UniChrome Pro IGP"
+ 0x1106 0x3349 "ahci" "VIA Technologies Inc.|VT8251 AHCI/SATA 4-Port Controller"
+ 0x1106 0x3351 "unknown" "VIA Technologies, Inc.|VT3351 Host Bridge"
+ 0x1106 0x3364 "unknown" "VIA Technologies, Inc.|P4M900 Host Bridge"
+--- a/Cards
++++ b/Cards
+@@ -429,7 +429,7 @@
+ DRIVER s3
+
+ NAME S3 UniChrome
+-DRIVER via
++DRIVER openchrome
+
+ NAME S3 ViRGE (generic)
+ DRIVER s3virge
diff --git a/sys-apps/hwdata-gentoo/hwdata-gentoo-0.4.ebuild b/sys-apps/hwdata-gentoo/hwdata-gentoo-0.4.ebuild
new file mode 100644
index 000000000000..d3cd08175311
--- /dev/null
+++ b/sys-apps/hwdata-gentoo/hwdata-gentoo-0.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Data for the hwsetup program"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://wolf31o2.org/sources/hwdata/${P}.tar.bz2"
+HOMEPAGE="http://wolf31o2.org"
+
+IUSE="opengl binary-drivers"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="!sys-apps/hwdata-redhat"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-openchrome.patch
+
+ if use x86 || use amd64
+ then
+ if use opengl && use binary-drivers
+ then
+ continue
+ else
+ sed -e 's/DRIVER fglrx/DRIVER radeon/' \
+ -e 's/DRIVER nvidia/DRIVER nv/' \
+ -i "${S}"/Cards || die
+ fi
+ fi
+}
+
+src_install() {
+ dodoc ChangeLog check-cards
+ insinto /usr/share/hwdata
+ doins Cards MonitorsDB pcitable blacklist
+}
diff --git a/sys-apps/hwdata-gentoo/metadata.xml b/sys-apps/hwdata-gentoo/metadata.xml
new file mode 100644
index 000000000000..467fca776d12
--- /dev/null
+++ b/sys-apps/hwdata-gentoo/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 type="project">
+ <email>livecd@gentoo.org</email>
+ <name>Gentoo LiveCD Project</name>
+</maintainer>
+<use>
+ <flag name="binary-drivers">Adds support for ATI/NVIDIA binary
+ drivers</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/hwdata-redhat/Manifest b/sys-apps/hwdata-redhat/Manifest
new file mode 100644
index 000000000000..d1fd3d6a5289
--- /dev/null
+++ b/sys-apps/hwdata-redhat/Manifest
@@ -0,0 +1,6 @@
+AUX hwdata-redhat-0.217-python-3.patch 227 SHA256 84ccc9f1f8e5dfe4c4f6035d427c9987b247305e27006b6230a821b1fe45bfb6 SHA512 eed127d4d5b4b33c8f7e1bf25c7a7d5a09c1ccea37d7fd8f0c1139dc000b6879763edd78cb26fe978100d24f3092b2474a6e20535e8aa0363da435e775ef579c WHIRLPOOL 9dbb9114c1e068f2c797cb0d882c88bd75254584acd764721b8f5daeb0cb3937d79ac43bd71eed7d289893564c1c610977198f28f3a918b26de14366bba1d575
+DIST hwdata-0.217-1.fc9.src.rpm 735079 SHA256 f2b6f3223cb388b9ff261ca84ed93b9e5eba95be62b7377ff685708351d377ad SHA512 31f057d62283adb926b3e89f4128e256a111d92e6bf0a63adea752d94be2b2e86ffa7535ba6d77a84373dc1ddbc5feb53e337520a8eb6063937e573cccef2634 WHIRLPOOL 982ca394d3875794bc5bc7fcf23b32c21c686287ad9be104c9bf25043d2266d9a74d21d6fa61e2255187ec768d2ffb9d2731b5c859e629ba2f0955a1a4afaa3a
+EBUILD hwdata-redhat-0.217.ebuild 1054 SHA256 591f52ffcfda1faedbd03cdd6b7483ec83a1f08e15923d2b9eff72ca910c1190 SHA512 f0280270f749136d151b712cd59ee5986f116817d17a0f516ba49370ac4cc08c5898bd235adb93acb0251161c51e4f750f74faace14505aad2bec198ba9c2e3f WHIRLPOOL ef99b8935744323f98e3e037ec00f57c9f81d4c60c3b8505117b2e0c85eb9e2eadeb0b6da063df7aedc7d80853b54b14446c5c7494f4b20aefdedd0a7a3206a2
+MISC ChangeLog 2753 SHA256 395403e0da5663d9a247abb395453e47580a296e95f5e95c101186133f3ee1db SHA512 78392229144281ebbd9ccdb583167006ffd66832b4da333ac3a4030a6ae0010dc9de1dbf90af0263f789dc7617391570bfbd7514e360b8a4aec0fde1b95d059a WHIRLPOOL 3f0420485a3f87246587148d42ed9ac547e7813bfde0fc3b57c0c974b668fbffc75b3b3932a5e8c51c0ea56c29fefa01bdc4ffa3e2ba5019d341af099f3b120f
+MISC ChangeLog-2015 1579 SHA256 0bff2b36fd963d652f0a42f08725fa5961b3e59d097af59a5cd417ad7f8c3f0f SHA512 85ef1ceb92bba1323da90a4c38864e54470496aad4a74ddc1151cd98a896302a7a735d33268519d89efa383dfd78eb7eb2466e200c84c2bd987c3f65a53ed88c WHIRLPOOL f54c24a53c0d9d3b88913928483faba3b42cb7d294604ef5a88f5a0c5e124003e7a010c63ed78ebf3d1c545aeaa6e9b677a793e1e0ef2382a5e704625a1b0b30
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/hwdata-redhat/files/hwdata-redhat-0.217-python-3.patch b/sys-apps/hwdata-redhat/files/hwdata-redhat-0.217-python-3.patch
new file mode 100644
index 000000000000..f16fddd992c4
--- /dev/null
+++ b/sys-apps/hwdata-redhat/files/hwdata-redhat-0.217-python-3.patch
@@ -0,0 +1,13 @@
+--- check-pci-ids.py
++++ check-pci-ids.py
+@@ -5,8 +5,8 @@
+
+ # Check that the sorting order is preserved in pci.ids
+
+-vendor_id = None
+-device_id = None
++vendor_id = -1
++device_id = -1
+ lineno = 1
+
+ file = open("pci.ids")
diff --git a/sys-apps/hwdata-redhat/hwdata-redhat-0.217.ebuild b/sys-apps/hwdata-redhat/hwdata-redhat-0.217.ebuild
new file mode 100644
index 000000000000..399b71c320a6
--- /dev/null
+++ b/sys-apps/hwdata-redhat/hwdata-redhat-0.217.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils flag-o-matic rpm
+
+# Tag for which Fedora Core version it's from
+FCVER="9"
+# Revision of the RPM. Shouldn't affect us, as we're just grabbing the source
+# tarball out of it
+RPMREV="1"
+
+MY_P="${P/-redhat}"
+DESCRIPTION="Hardware identification and configuration data"
+HOMEPAGE="https://fedora.redhat.com/projects/config-tools/"
+SRC_URI="mirror://fedora-dev/releases/9/Everything/source/SRPMS/${MY_P}-${RPMREV}.fc${FCVER}.src.rpm"
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~ppc ~ppc64 ~x86 ~amd64"
+IUSE="test"
+RDEPEND="virtual/modutils
+ !sys-apps/hwdata-gentoo"
+DEPEND="${RDEPEND}
+ test? ( sys-apps/pciutils )"
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ rpm_src_unpack ${A}
+
+ cd "${S}"
+ sed -i -e "s:\(/sbin\/lspci\):/usr\1:g" Makefile || die
+ epatch "${FILESDIR}/${P}-python-3.patch"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ # Don't let it overwrite a udev-installed file
+ rm -rf "${D}"/etc/ || die
+}
diff --git a/sys-apps/hwdata-redhat/metadata.xml b/sys-apps/hwdata-redhat/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/hwdata-redhat/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/hwids/Manifest b/sys-apps/hwids/Manifest
new file mode 100644
index 000000000000..7de11dba9cc2
--- /dev/null
+++ b/sys-apps/hwids/Manifest
@@ -0,0 +1,10 @@
+DIST hwids-20170328.tar.gz 2049249 SHA256 e46abb9ccb54aff728bb0502405aa700974a2a7366d3bb257967ce60d847cfb3 SHA512 ffccbcda78f856b93026102d1d7f62f4639910671c63e30471c990b1029db94b542c555b6ad69820f8a91a45ef9d52c320b9767d38ff08b6e72c041a28e6f0f3 WHIRLPOOL c08493ad1e96c53ec1cc7b7df46e6e8f9db982bcdda57595f7a51820b43ab955a40760adfa9d03bfbc283a05dffe18075d0244a638b5ecf94a4068906f2ffc24
+DIST hwids-20170715.tar.gz 2091853 SHA256 5a20e6f0f3567b23dfc45a103c0b73333dd3a73a1ea7256b68374e841586e80e SHA512 6f1d2e3d7b7fc260f02b3cc87b46385292503dda2a46dea4e69b02915e9d411e9682fb98ca921eb45289e416320a8ef46a3df0753f8f820d20c719663076bd88 WHIRLPOOL 74b77157c1a2f8496bad708009017b925b651f50ca6919a3acd112cab84fcd6512ecb8bd95587a8572e4f79258db7173c3d18c50a21f2fe8f5ef171a467721bd
+DIST hwids-20171003.tar.gz 3035908 SHA256 9befd0d4d796fe77f3ab7576d5beba8ea5c0066285db255d93389d1592d5cd2f SHA512 6a05963f1883cfeb774671931a32eb9322ead145d4d8aa2fa791e90fc3c823a0b3baeaaa4ce84de0e6a10dcd7f1b5943f6d2cab8790d21e8f34ca1d403598a8a WHIRLPOOL e3bfeb025e60c11dc6f576b044ceee10e17bd318cbde26de64ea146519f707c4d95fdf592f90becd860df5059af272074871b33f5d039392651845ebbf785737
+EBUILD hwids-20170328.ebuild 1446 SHA256 0c53812fdd51b567f1eecb03f2dfdecf336cd467415059926d107528e52e519b SHA512 086b30e4fd64986106cee88a3aa1f84565c31a5e7101c97a47604cb255a65b55a2cbd3ff2ad96126fe6d7aec64d703bca0da01135541a62ba9cd8d7f11f8c79b WHIRLPOOL 40ef268c85111387041e4b508c345a4cb55e5246dfff9d48c5a0a0b90f7a16315822d3120d4ab659e9f7498d01a6d37c5e5b1d2fae3d5dc530fe5a4fbce35210
+EBUILD hwids-20170715.ebuild 1455 SHA256 65488dadf7df9808a153cf6148edc3ea0e1940cd663292d244f1ad897eabd7c9 SHA512 3460a0646dcb649b10d7c02b98f50719d298a00f224df3aa06dd79235ea1107c914b20f07a53d675ee9bed3f76fdf30befcb5b33fc61c1d10b952122a2e9430c WHIRLPOOL 7e9c7665dd5c79e1632d59940b62782a501c6169e45f8efcd65696dc64a5ec8aa33226b423426dc522e481c64f3824cdf4ec52c8d0c64a3ce87ab25ae51c4382
+EBUILD hwids-20171003.ebuild 1719 SHA256 c44d3a8a4bd969ef569f8bb79e3a38308559e0133735d2fb64baf1a83b44e53f SHA512 b7ecee65b754aa40ab65204f08803728560156e4c54df221df8163432ee488a284ea43cb5d4b26ee68a86765c776963d6cd5e0fa2e5a0482febc1aff8b240bc0 WHIRLPOOL bcd493bf0635347e7f9c317979fee07b1e5fba36e541b8dbc0001e7ce3b5d2ddd2755f5d1113b52eaa9d529baec561fa5d0f645ce6e14ee6855d16bb74bcb590
+EBUILD hwids-99999999.ebuild 1750 SHA256 0e12aa72193de41dd6819e15ae69592df4ff0d65977128f29eb735f87f92ce0f SHA512 84fcacd98a96fd5c1f6ef2f13dec9ce46a6e3a0bb942eeb3c041d6bbb8ce0d4c63bf392f747f0e6473fe15420143170aee147b52941fac40b903c375b43bdda8 WHIRLPOOL 10c8193385a2c3869fd48c5cb0d6b72e46fadbfefe2e017b790d5661aa87c89f661c1ac4b80c82b7de552818b085a2ad49c6d9297f11c78bdbc159d51b8f54b2
+MISC ChangeLog 7788 SHA256 caf615e358fea22f1a9cf21dd69cdbc384caa71091a1f7e5a9177b8a249241d7 SHA512 8e55a6d32ecc2b33f0a721ca9ece638aa8a855160691eff57686970bd28498100f4d7cbe319887c2e4ad5fed1e6d367018a9d598baf658c7574ed772ab56ab0a WHIRLPOOL 4383c21edac6d66b8227f6ec742847cec6d91401c0f4bb8ce102c7d8ca69be621b2942840ec567e7c9488492f43d85c8d7f6d29f5a008465a36736952a1817bd
+MISC ChangeLog-2015 25151 SHA256 c8786c788b10c54b848feb890e09f9578c858a4b41d5f6719fb2cd2475b658d2 SHA512 60bd8f78ac05a514f7b7cb5f263f69e96168172b399c70be3372cece8e27a3b4d76d76d0adf84c760147bfa794c0e3cb9d179955c959185849f31a1ada6f21e4 WHIRLPOOL 7539743add6ab65adc6951961c55869bc959416474b34dc454b86340be65458925efec9c98fc3123912e4d0196b4853d4d383a365948efb6abbfd56f3f76faa6
+MISC metadata.xml 647 SHA256 4c3fcb0465713f01889fe0f4490f635b620a1934acc4968a342cd84537f82693 SHA512 b05dbd41c2a839d2ac8baaf8ee2352ee999d48deb123c54e048da44cccb06f64729620983848a6b16ada8af50e6fb68adf15323ff362f230b7213f485b1ec27c WHIRLPOOL f2288eee0ffe9dc11cee7186ffbce293139637c1f9ce76226032e7f3b07f466ad95134bdd52cbc9f7477dba619c1a8deb125a51dcba33103fb7eb83b58b5a373
diff --git a/sys-apps/hwids/hwids-20170328.ebuild b/sys-apps/hwids/hwids-20170328.ebuild
new file mode 100644
index 000000000000..3b53663fe67e
--- /dev/null
+++ b/sys-apps/hwids/hwids-20170328.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit udev
+
+DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
+HOMEPAGE="https://github.com/gentoo/hwids"
+if [[ ${PV} == "99999999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="${HOMEPAGE}.git"
+else
+ SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="|| ( GPL-2 BSD ) public-domain"
+SLOT="0"
+IUSE="+net +pci +udev +usb"
+
+DEPEND="udev? (
+ dev-lang/perl
+ >=virtual/udev-206
+)"
+[[ ${PV} == "99999999" ]] && DEPEND+=" udev? ( net-misc/curl )"
+RDEPEND="!<sys-apps/pciutils-3.1.9-r2
+ !<sys-apps/usbutils-005-r1"
+
+if [[ ${PV} != 99999999 ]]; then
+ S=${WORKDIR}/hwids-${P}
+fi
+
+src_unpack() {
+ if [[ ${PV} == 99999999 ]]; then
+ git-r3_src_unpack
+ cd "${S}" || die
+ emake fetch
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i -e '/udevadm hwdb/d' Makefile || die
+}
+
+_emake() {
+ emake \
+ NET=$(usex net) \
+ PCI=$(usex pci) \
+ UDEV=$(usex udev) \
+ USB=$(usex usb) \
+ "$@"
+}
+
+src_compile() {
+ _emake
+}
+
+src_install() {
+ _emake install \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ MISCDIR="${EPREFIX}/usr/share/misc" \
+ HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \
+ DESTDIR="${D}"
+}
+
+pkg_postinst() {
+ if use udev; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+}
diff --git a/sys-apps/hwids/hwids-20170715.ebuild b/sys-apps/hwids/hwids-20170715.ebuild
new file mode 100644
index 000000000000..13f25bb11b32
--- /dev/null
+++ b/sys-apps/hwids/hwids-20170715.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit udev
+
+DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
+HOMEPAGE="https://github.com/gentoo/hwids"
+if [[ ${PV} == "99999999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="${HOMEPAGE}.git"
+else
+ SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="|| ( GPL-2 BSD ) public-domain"
+SLOT="0"
+IUSE="+net +pci +udev +usb"
+
+DEPEND="udev? (
+ dev-lang/perl
+ >=virtual/udev-206
+)"
+[[ ${PV} == "99999999" ]] && DEPEND+=" udev? ( net-misc/curl )"
+RDEPEND="!<sys-apps/pciutils-3.1.9-r2
+ !<sys-apps/usbutils-005-r1"
+
+if [[ ${PV} != 99999999 ]]; then
+ S=${WORKDIR}/hwids-${P}
+fi
+
+src_unpack() {
+ if [[ ${PV} == 99999999 ]]; then
+ git-r3_src_unpack
+ cd "${S}" || die
+ emake fetch
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i -e '/udevadm hwdb/d' Makefile || die
+}
+
+_emake() {
+ emake \
+ NET=$(usex net) \
+ PCI=$(usex pci) \
+ UDEV=$(usex udev) \
+ USB=$(usex usb) \
+ "$@"
+}
+
+src_compile() {
+ _emake
+}
+
+src_install() {
+ _emake install \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ MISCDIR="${EPREFIX}/usr/share/misc" \
+ HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \
+ DESTDIR="${D}"
+}
+
+pkg_postinst() {
+ if use udev; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+}
diff --git a/sys-apps/hwids/hwids-20171003.ebuild b/sys-apps/hwids/hwids-20171003.ebuild
new file mode 100644
index 000000000000..3f04c8534c6c
--- /dev/null
+++ b/sys-apps/hwids/hwids-20171003.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit udev
+
+DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
+HOMEPAGE="https://github.com/gentoo/hwids"
+if [[ ${PV} == "99999999" ]]; then
+ PYTHON_COMPAT=( python3_6 )
+ inherit git-r3 python-any-r1
+ EGIT_REPO_URI="${HOMEPAGE}.git"
+else
+ SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="|| ( GPL-2 BSD ) public-domain"
+SLOT="0"
+IUSE="+net +pci +udev +usb"
+
+DEPEND=""
+RDEPEND="
+ udev? ( virtual/udev )
+ !<sys-apps/pciutils-3.1.9-r2
+ !<sys-apps/usbutils-005-r1
+"
+
+if [[ ${PV} == 99999999 ]]; then
+ DEPEND+="
+ net-misc/curl
+ udev? ( $(python_gen_any_dep 'dev-python/pyparsing[${PYTHON_USEDEP}]') )
+ "
+ python_check_deps() {
+ if use udev; then
+ has_version --host-root "dev-python/pyparsing[${PYTHON_USEDEP}]"
+ fi
+ }
+else
+ S=${WORKDIR}/hwids-${P}
+fi
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ if [[ ${PV} == 99999999 ]]; then
+ git-r3_src_unpack
+ cd "${S}" || die
+ emake fetch
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i -e '/udevadm hwdb/d' Makefile || die
+}
+
+_emake() {
+ emake \
+ NET=$(usex net) \
+ PCI=$(usex pci) \
+ UDEV=$(usex udev) \
+ USB=$(usex usb) \
+ "$@"
+}
+
+src_compile() {
+ [[ ${PV} == 99999999 ]] && use udev && python_setup
+ _emake
+}
+
+src_install() {
+ _emake install \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ MISCDIR="${EPREFIX}/usr/share/misc" \
+ HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \
+ DESTDIR="${D}"
+}
+
+pkg_postinst() {
+ if use udev; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+}
diff --git a/sys-apps/hwids/hwids-99999999.ebuild b/sys-apps/hwids/hwids-99999999.ebuild
new file mode 100644
index 000000000000..ab38d2c7a978
--- /dev/null
+++ b/sys-apps/hwids/hwids-99999999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit udev
+
+DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
+HOMEPAGE="https://github.com/gentoo/hwids"
+if [[ ${PV} == "99999999" ]]; then
+ PYTHON_COMPAT=( python3_6 )
+ inherit git-r3 python-any-r1
+ EGIT_REPO_URI="${HOMEPAGE}.git"
+else
+ SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+LICENSE="|| ( GPL-2 BSD ) public-domain"
+SLOT="0"
+IUSE="+net +pci +udev +usb"
+
+DEPEND=""
+RDEPEND="
+ udev? ( virtual/udev )
+ !<sys-apps/pciutils-3.1.9-r2
+ !<sys-apps/usbutils-005-r1
+"
+
+if [[ ${PV} == 99999999 ]]; then
+ DEPEND+="
+ net-misc/curl
+ udev? ( $(python_gen_any_dep 'dev-python/pyparsing[${PYTHON_USEDEP}]') )
+ "
+ python_check_deps() {
+ if use udev; then
+ has_version --host-root "dev-python/pyparsing[${PYTHON_USEDEP}]"
+ fi
+ }
+else
+ S=${WORKDIR}/hwids-${P}
+fi
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ if [[ ${PV} == 99999999 ]]; then
+ git-r3_src_unpack
+ cd "${S}" || die
+ emake fetch
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i -e '/udevadm hwdb/d' Makefile || die
+}
+
+_emake() {
+ emake \
+ NET=$(usex net) \
+ PCI=$(usex pci) \
+ UDEV=$(usex udev) \
+ USB=$(usex usb) \
+ "$@"
+}
+
+src_compile() {
+ if [[ ${PV} == 99999999 ]] && use udev; then
+ python_setup
+ _emake udev-hwdb
+ fi
+ _emake
+}
+
+src_install() {
+ _emake install \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ MISCDIR="${EPREFIX}/usr/share/misc" \
+ HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \
+ DESTDIR="${D}"
+}
+
+pkg_postinst() {
+ if use udev; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+}
diff --git a/sys-apps/hwids/metadata.xml b/sys-apps/hwids/metadata.xml
new file mode 100644
index 000000000000..d3fd22109cdc
--- /dev/null
+++ b/sys-apps/hwids/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<maintainer type="person">
+ <email>floppym@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="net">Install the oui.txt and iab.txt databases</flag>
+ <flag name="pci">Install the pci.ids database</flag>
+ <flag name="usb">Install the usb.ids database</flag>
+ <flag name="udev">Install hwdb.d rules for udev</flag>
+</use>
+<upstream>
+ <remote-id type="github">gentoo/hwids</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/hwinfo/Manifest b/sys-apps/hwinfo/Manifest
new file mode 100644
index 000000000000..5fbd890643c1
--- /dev/null
+++ b/sys-apps/hwinfo/Manifest
@@ -0,0 +1,11 @@
+DIST hwinfo-19.1-1.2.src.rpm 740650 SHA256 77b67512f7a7a027200233b6c89be2b777f96b2a6d742b695cb062f9cf4ec258 SHA512 1e617cac0e2d1872f26ad15b0a4b34474d5e0cc4a9fa715de04b54b829d73b0f54fea99765bf795d759e01e3a84c868149e4e035bef59dcfcc628faa365fee31 WHIRLPOOL e676962b3a1939a575e74372da441b22c15d32745654ba0f8e2420f0687f3e48c355388a2922ddfb07e44396fc5e0100b655ada97eaaaeb9ea53f4d72db99f95
+DIST hwinfo-20.0-1.4.src.rpm 741036 SHA256 466423b00fda00bc5e927352fb8d2f52b4d4e4b298401cd44c48231951c2a26b SHA512 e44dcc0c826630d75b2604f99f6b0ae6c203a52266c2c7e220989424d7a4c99dc34f6157d6e4d385404c0eade3f943f77ddbf007d83b76f132eada6b4bf68cb3 WHIRLPOOL 5a8e56bbf6ab8aa585ff9774d2870f8fb917a3803614795d542bb76862dde72bdc54205b35f0b0a78ff004cd740e10a23916d412c553b95382b2bec9161c54d9
+DIST hwinfo-21.23-1.2.src.rpm 844672 SHA256 361ca284d1912f3d1aecdf22737db1c949addb1e48d0f3f3fc3376e95fb7b8ac SHA512 d25c955fa5620268a34a857916e0bdbbdb92f8e092735ac453e7bacc6476e00047c9ccef3a5275e5d50cc354bf9e3cffef57af519dc885d0afd3d161ab426629 WHIRLPOOL f0c5c2ba91f6fb549a3bf3da8c2f19fef783e8b898523bafe46e9383b77d256c13466ef14fb620b283d4a95360c231378d1f2334f50dcd3d070e4040bcec4370
+DIST hwinfo-21.4-1.1.src.rpm 781525 SHA256 8109cf0cc8706b0361be6a9f18ee79fc6a16451c5a7982aed22ae811748d1728 SHA512 bccac7749751924e1e1a8005e6fd783da7114926b6d9b9a1247b3b26dd680848eb2b85b368c312d08b444c8d7b75036d249daf33afc5b7efbbcc09bfbad4b340 WHIRLPOOL e1ce3140a4729006dd7c6e0c7dd7db41596819bcc7a51b774a463dd100e05c9bc5dc0d031b88047bd1d7d93015ab25cc3f769983f8ff14427f96890614b7324a
+EBUILD hwinfo-19.1.ebuild 1433 SHA256 9aa22cf7da17fe058a0c0913aadb0386acefc872b3170b94dae1a754ec0b2e42 SHA512 712b20167ab5f631ab23dcc8f2202bdb16769e60f5410bcd8359a0377d5c371f756a57e4f996ee3d4fd970488e9a3e4150d2e54fd5ac462a8e082fed96614347 WHIRLPOOL a9ee30d06fe3d52ce0a3f16df5cea5dd58596ecf699103761d71ae3cfc6fa6eb26e7f173ed5285387cebb36895b85da92204e9135fe5a1188414143d7637b199
+EBUILD hwinfo-20.0.ebuild 1568 SHA256 68053551b8a3f98f3727dbd0e1544ae6d27c569293a752bfa73a9dfaafdfa97c SHA512 78a5265c4bf4bdb3d82f80575287aae7beb33aaeeb20b25f09c89186e008755324da88d84e8a7fa1e99a6391604bfe8f5599ef7d4efd9f0871371dd1c20e0d1e WHIRLPOOL 8620cce16dde3aa1d8788a0f6343eaa967e1cc8ffb997f30f40c51500ec4e2818e69a273e4bd3f21ba23a98b2f524b05228b331867a2233711756de53cd25a63
+EBUILD hwinfo-21.23.ebuild 1292 SHA256 7dc4a2de3fc97a5f2bd760ed4af25d6e5ae5f82eda9cc92fb9a3be75087b7d51 SHA512 2cf72a8e9a7ac210076d701267c87f434541449a4480eb9a16df60cf137335e823d24a24cf0a292f5f67c39aefa1fc62dfc4883b9690826c2e1c0f0b0b7efe01 WHIRLPOOL 2c702851a189b29c511b63766c2a58439bcf2e346f6e200c26c8007fa39b8c352a83ddca0a02ebec96a31b9e2caa803c6a74b99a7da92391dde2059a84e28270
+EBUILD hwinfo-21.4.ebuild 1570 SHA256 a7186d409abfbde94ae32e4defe5594dd5c3c50597bfdf8b222a1ff3c4d50dae SHA512 95c9e5a28a3e27b201ae1d7f801361dffe11c8c551d45acff7b9f7ced601fbec3572ec4f639d85ed448e84ac7fd097384a4379b48542246dfd5c446ecf2f9a3d WHIRLPOOL b711be308756c9b4835f1e6e8e64d332120e39fdf706626228506b10d37f49af966db20cee74708be9b8837792ca972ec6984fba1114df95535665902dc3e454
+MISC ChangeLog 2884 SHA256 71302d868e5b51ff281dcc7052ddff8a6ec57c044db8dbb00b266b25592da9aa SHA512 00fb1ec525599eb6dd5e9733044f5259f4449ac048b22eae5031087fff6f502606c5340022020a09c8352996873946ea58871a6efa2b86a0c2f1e5f366391059 WHIRLPOOL 79ac779ba8e923384a8ca84fd3271b1647162ff0d2cb6bc73cdfd267b85b4cf8c6123ae1f1bd560afc6d2b115cb43eb5014102ce9a68a1303890babb9f418a1f
+MISC ChangeLog-2015 5299 SHA256 b14224b0f6d4be6fbae478674298d775f9cb3d26e16f9b27773ad45eb7ef0236 SHA512 a321d23ee94078528adbb6a18909456bb5653e31bb5ef808e8a02fc6334d9b1f6a3a9a2ef72e69b738d65443224518b4ea4b2bd0df1520f35e5986c9e2288354 WHIRLPOOL fae1bf853dcbfc575dbe394965aae0f01c0f5f8395be302863e6759a539f57591e5b7457cfb7704b31949b5d5fcdd2e5cc1a215e3b766aed3f45ba15e989211d
+MISC metadata.xml 256 SHA256 b81904dc627fa9bc6bf21b08552700b9a5fa50dda9373a3ccdc52186aa0a27c2 SHA512 574345bb2730bbc2d0190a03b16703d10441ccd589623c5e8bdddf84d7ce86226da7e079d7b2135e4c724d0813973c551143cdd0f525a58efdd37716dd83edfd WHIRLPOOL b8bf8d610f5442c2d7f2848cde768454a982126618b58927dead107d740105a028c6d953d4b3243d85d6ae127fc05eeb67626aba2ee007010fe051b9c91b6df3
diff --git a/sys-apps/hwinfo/hwinfo-19.1.ebuild b/sys-apps/hwinfo/hwinfo-19.1.ebuild
new file mode 100644
index 000000000000..d291224361d6
--- /dev/null
+++ b/sys-apps/hwinfo/hwinfo-19.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit multilib rpm toolchain-funcs
+
+DESCRIPTION="hardware detection tool used in SuSE Linux"
+HOMEPAGE="http://www.opensuse.org/"
+SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.2.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="amd64? ( dev-libs/libx86emu )
+ x86? ( dev-libs/libx86emu )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6.17"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_prepare() {
+ # Respect AR variable.
+ sed -i \
+ -e 's:ar r:$(AR) r:' \
+ src/{,isdn,ids,smp,hd}/Makefile || die
+
+ # Avoid -I directories for dbus because HAL is obsolete.
+ sed -i -e '/CFLAGS/d' src/hd/Makefile || die
+ # Respect LDFLAGS.
+ sed -i -e 's:$(CC) -shared:& $(LDFLAGS):' src/Makefile || die
+ sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
+
+ # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
+ sed -i \
+ -e 's:make:$(MAKE):' \
+ -e 's:-pipe -g::' \
+ -e 's:LDFLAGS.*=:LDFLAGS +=:' \
+ Makefile{,.common} || die
+}
+
+src_compile() {
+ tc-export AR
+ emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
+
+ dodoc changelog README
+ doman doc/hwinfo.8
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/example*.c
+}
diff --git a/sys-apps/hwinfo/hwinfo-20.0.ebuild b/sys-apps/hwinfo/hwinfo-20.0.ebuild
new file mode 100644
index 000000000000..f67dfea6e88e
--- /dev/null
+++ b/sys-apps/hwinfo/hwinfo-20.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit multilib rpm toolchain-funcs
+
+DESCRIPTION="hardware detection tool used in SuSE Linux"
+HOMEPAGE="http://www.opensuse.org/"
+SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.4.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="amd64? ( dev-libs/libx86emu )
+ x86? ( dev-libs/libx86emu )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6.17"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_prepare() {
+ # Respect AR variable.
+ sed -i \
+ -e 's:ar r:$(AR) r:' \
+ src/{,isdn,ids,smp,hd}/Makefile || die
+
+ # Avoid -I directories for dbus because HAL is obsolete.
+ sed -i -e '/CFLAGS/d' src/hd/Makefile || die
+ # Respect LDFLAGS.
+ sed -i -e 's:$(CC) -shared:& $(LDFLAGS):' src/Makefile || die
+ sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
+
+ # Use linux/pci.h directly. #506876
+ sed -i \
+ -e '/#include.*sys\/pci.h/s:sys/pci.h:linux/pci.h:' \
+ src/hd/*.c || die
+
+ # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
+ sed -i \
+ -e 's:make:$(MAKE):' \
+ -e 's:-pipe -g::' \
+ -e 's:LDFLAGS.*=:LDFLAGS +=:' \
+ Makefile{,.common} || die
+}
+
+src_compile() {
+ tc-export AR
+ emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
+
+ dodoc changelog README
+ doman doc/hwinfo.8
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/example*.c
+}
diff --git a/sys-apps/hwinfo/hwinfo-21.23.ebuild b/sys-apps/hwinfo/hwinfo-21.23.ebuild
new file mode 100644
index 000000000000..8b43e6bde07c
--- /dev/null
+++ b/sys-apps/hwinfo/hwinfo-21.23.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib rpm toolchain-funcs
+
+DESCRIPTION="Hardware detection tool used in SuSE Linux"
+HOMEPAGE="http://www.opensuse.org/"
+SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.2.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ amd64? ( dev-libs/libx86emu )
+ x86? ( dev-libs/libx86emu )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6.17"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_prepare() {
+ # Respect AR variable.
+ sed -i \
+ -e 's:ar r:$(AR) r:' \
+ src/{,isdn,ids,smp,hd}/Makefile || die
+
+ # Respect LDFLAGS.
+ sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
+
+ # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
+ sed -i \
+ -e 's:make:$(MAKE):' \
+ -e 's:-pipe -g::' \
+ -e 's:LDFLAGS.*=:LDFLAGS +=:' \
+ Makefile{,.common} || die
+ default
+}
+
+src_compile() {
+ tc-export AR
+ emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
+
+ dodoc changelog README*
+ doman doc/*.{1,8}
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/example*.c
+}
diff --git a/sys-apps/hwinfo/hwinfo-21.4.ebuild b/sys-apps/hwinfo/hwinfo-21.4.ebuild
new file mode 100644
index 000000000000..5606bd11969c
--- /dev/null
+++ b/sys-apps/hwinfo/hwinfo-21.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib rpm toolchain-funcs
+
+DESCRIPTION="hardware detection tool used in SuSE Linux"
+HOMEPAGE="http://www.opensuse.org/"
+SRC_URI="http://download.opensuse.org/source/factory/repo/oss/suse/src/${P}-1.1.src.rpm"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ amd64? ( dev-libs/libx86emu )
+ x86? ( dev-libs/libx86emu )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6.17"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_prepare() {
+ # Respect AR variable.
+ sed -i \
+ -e 's:ar r:$(AR) r:' \
+ src/{,isdn,ids,smp,hd}/Makefile || die
+
+ # Avoid -I directories for dbus because HAL is obsolete.
+ sed -i -e '/CFLAGS/d' src/hd/Makefile || die
+ # Respect LDFLAGS.
+ sed -i -e 's:$(CC) -shared:& $(LDFLAGS):' src/Makefile || die
+ sed -i -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' src/ids/Makefile || die
+
+ # Use linux/pci.h directly. #506876
+ sed -i \
+ -e '/#include.*sys\/pci.h/s:sys/pci.h:linux/pci.h:' \
+ src/hd/*.c || die
+
+ # Respect MAKE variable. Skip forced -pipe and -g. Respect LDFLAGS.
+ sed -i \
+ -e 's:make:$(MAKE):' \
+ -e 's:-pipe -g::' \
+ -e 's:LDFLAGS.*=:LDFLAGS +=:' \
+ Makefile{,.common} || die
+}
+
+src_compile() {
+ tc-export AR
+ emake CC="$(tc-getCC)" RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install
+
+ dodoc changelog README
+ doman doc/*.{1,8}
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/example*.c
+}
diff --git a/sys-apps/hwinfo/metadata.xml b/sys-apps/hwinfo/metadata.xml
new file mode 100644
index 000000000000..483ee9fe5899
--- /dev/null
+++ b/sys-apps/hwinfo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/hwloc/Manifest b/sys-apps/hwloc/Manifest
new file mode 100644
index 000000000000..b5e2647b2eb1
--- /dev/null
+++ b/sys-apps/hwloc/Manifest
@@ -0,0 +1,8 @@
+AUX hwloc-1.8.1-gl.patch 542 SHA256 0e424b4207df696cb3601ffd2c3680eda6e6aefc1886876e1bcbf0f2dc5a09fa SHA512 1f281f338cef379963b374d7e656f90be98dfd0b0768fe12dc8e6d366b1c386c2ed50ed405d5dcd0b00c2bb57b12849a3b918712e38214fca45e2a3b1c584f33 WHIRLPOOL ee497fac66b5de36adb6ab2a792c83c2f00f30030c42b7a2ff4521c61751a69f7548ab1a1b2b5245c0b546d7d755e2e4078d8b0a4553bb81c407f0ffb4e48991
+DIST hwloc-1.11.2.tar.bz2 4019136 SHA256 8c029b6b1638245837707bfa6c865f448af4e49e7d352335e019d818b51fecf8 SHA512 aa54b6389c303470a00dbbb3ae5f688244d0f1e0d84e661b739933ff9d86928869f2f3be04fe621cdf06c206defcd4ea1c9e8b72696f7cada9bb3243c3feba68 WHIRLPOOL 783752a449f907bca5dd0b42445f8291d8cdc3a09f4e1bdb677cf34c3bc56ef739def0c1684455979d36570a51bdc99cefccbd5052e0996226dfc832ade9664a
+DIST hwloc-1.11.7.tar.bz2 4187754 SHA256 ab6910e248eed8c85d08b529917a6aae706b32b346e886ba830895e36a809729 SHA512 f3afd123f917d07fe987b8a16dba9f1aa9a9112fc4bdc806417c942b5fbd3b7f31067550048258814b4ba08d4ac7bd45c1fd477457d817bf9453735e0b82f04e WHIRLPOOL 4cbc3bb5639f01cd16f12e92a59daadb978c9c09126941e0cab6b69beb33a5e7ced1c91cf281c66175b0c3c13a4887ede556cbfe6e8823589a233ee409813584
+EBUILD hwloc-1.11.2-r1.ebuild 2207 SHA256 fc3132fe3429652f676e3685a55d5af61b5aa57f257eb3b805d7edfd6c9dc96c SHA512 ec68dd2534e19ef77a0bd4fd87b357d8dc05bddc6a361ee320fe7b9145ed0a6988d219ec8c56c6ea66036db61e1cbd2ade9f34e4470b997684f95309287fce6d WHIRLPOOL ddb476a80090b6565fb5f5902ac5ef40a88c69244985ca235610e62d85ac4fb41f80ced8df2c4738d5934648254c523ebd5126d705a6b54febbc8bb78370e0cd
+EBUILD hwloc-1.11.7.ebuild 2218 SHA256 d4fd2f764c9e4d7281ba51aee9d98b2a262d134f00a376899ac4a021ac1388b1 SHA512 984bb91ccc20ee9afeee0cc474141a7c967deb8e4cc02235a095161721e16aeec43901fb9fcd1eff0b3dd05e5f3a46691711a64a838d90423ecded36e900baf5 WHIRLPOOL c5c6ef1940b412fefc86341c9a8479387144624aea4bf3e4fb6d4bc0a9c5b6ab166ede52f2805ee8ad04ff502ec8e6f503c0f4372cb8d1887ccf7d416ac96e95
+MISC ChangeLog 3699 SHA256 9cb9ea68e56132510950e15866be93fad8b890fd89fe35361314edeb20ca0af6 SHA512 ea1d7f65ba49a6f335c0b3c480186616ad7b9f2cfe6699a51610d86deeae867c7adb2236e8587f7b3f739dfbec5dcb577f7a3df4dcec0c6a89f4b54e2aabdac6 WHIRLPOOL f2b4c19831ee2b8325ff620b3dd8c224987049f85d89652e89a5832f3047e40baa727e98946139db5a27dce8ef2dbd3b8d86dc2f781ad1a4e02a9d1016f26eda
+MISC ChangeLog-2015 8565 SHA256 e77cec1b7ce8ebfe939877182c8340a34d8568cf7af0173f7b7ab8804040a231 SHA512 1cc4d5e93bf873f892b69e4fca3d3fd1aba4533733720d4f4ed58537f996d775f7312b7f06f603787aa19a41f647a53c658a043077ecc2cd5d953cf40bc764bb WHIRLPOOL 83c1257a4ea69bf4e87ef3bb647ad4251ff2033034c8e7ebb34f62c6539581f923aee25f185b5f9c04e5716247239059e57aa35fd57a1595429cffdddb12def8
+MISC metadata.xml 1263 SHA256 9eaae7f018d9e85a24d3ff4ace865f94fe91889ad813d98607179600e6bd73f2 SHA512 9c21fd25ba0f5046ab051e58884c67d3627040bf66b58d114fa504e411aefe3411c591e356a419e955269e74cafba06ac9fe335b1bb9c43253c029accef1d166 WHIRLPOOL 97d7797707930f2d5e1d49313f522d7489b3a307f122992d0f8018fea69759923b934288e2d9e102f5ff501abb0b18caa122ec0090ef97bc783cd12fdabce419
diff --git a/sys-apps/hwloc/files/hwloc-1.8.1-gl.patch b/sys-apps/hwloc/files/hwloc-1.8.1-gl.patch
new file mode 100644
index 000000000000..47daa9593377
--- /dev/null
+++ b/sys-apps/hwloc/files/hwloc-1.8.1-gl.patch
@@ -0,0 +1,11 @@
+--- hwloc-1.8.1/config/hwloc.m4.orig 2014-01-30 17:46:58.000000000 +0400
++++ hwloc-1.8.1/config/hwloc.m4 2014-02-27 13:46:28.587238873 +0400
+@@ -948,7 +948,7 @@
+ hwloc_gl_happy=no])
+
+ AC_CHECK_HEADERS([NVCtrl/NVCtrl.h], [
+- AC_CHECK_LIB([XNVCtrl], [XNVCTRLQueryTargetAttribute], [:], [hwloc_gl_happy=no], [-lXext])
++ AC_CHECK_LIB([XNVCtrl], [XNVCTRLQueryTargetAttribute], [:], [hwloc_gl_happy=no], [-lXext -lX11])
+ ], [hwloc_gl_happy=no])
+
+ if test "x$hwloc_gl_happy" = "xyes"; then
diff --git a/sys-apps/hwloc/hwloc-1.11.2-r1.ebuild b/sys-apps/hwloc/hwloc-1.11.2-r1.ebuild
new file mode 100644
index 000000000000..2f6751aa3cea
--- /dev/null
+++ b/sys-apps/hwloc/hwloc-1.11.2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic cuda autotools-multilib multilib versionator
+
+MY_PV=v$(get_version_component_range 1-2)
+
+DESCRIPTION="displays the hardware topology in convenient formats"
+HOMEPAGE="http://www.open-mpi.org/projects/hwloc/"
+SRC_URI="http://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0/5"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="cairo cuda debug gl +numa +pci plugins svg static-libs xml X"
+
+# opencl support dropped with x11-drivers/ati-drivers being removed (#582406).
+# Anyone with hardware is welcome to step up and help test to get it re-added.
+
+# dev-util/nvidia-cuda-toolkit is always multilib
+
+RDEPEND=">=sys-libs/ncurses-5.9-r3:0[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[X?,svg?,${MULTILIB_USEDEP}] )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1 )
+ gl? ( || ( x11-drivers/nvidia-drivers[static-libs,tools] media-video/nvidia-settings ) )
+ pci? (
+ >=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
+ >=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
+ )
+ plugins? ( dev-libs/libltdl:0[${MULTILIB_USEDEP}] )
+ numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+DOCS=( AUTHORS NEWS README VERSION )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.8.1-gl.patch"
+)
+AUTOTOOLS_AUTORECONF=1
+
+src_prepare() {
+ if use cuda ; then
+ append-cflags -I/opt/cuda/include
+ append-cppflags -I/opt/cuda/include
+ fi
+ autotools-utils_src_prepare
+}
+
+multilib_src_configure() {
+ export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
+ use cuda && local LDFLAGS="${LDFLAGS} -L/opt/cuda/$(get_libdir)"
+ local myeconfargs=(
+ --disable-silent-rules
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(use_enable cairo)
+ $(use_enable cuda)
+ $(use_enable debug)
+ $(multilib_native_use_enable gl)
+ $(use_enable pci)
+ $(use_enable plugins)
+ $(use_enable numa libnuma)
+ $(use_enable xml libxml2)
+ $(use_with X x)
+ )
+ autotools-utils_src_configure
+}
diff --git a/sys-apps/hwloc/hwloc-1.11.7.ebuild b/sys-apps/hwloc/hwloc-1.11.7.ebuild
new file mode 100644
index 000000000000..1978df29ec28
--- /dev/null
+++ b/sys-apps/hwloc/hwloc-1.11.7.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools cuda flag-o-matic versionator multilib-minimal
+
+MY_PV=v$(get_version_component_range 1-2)
+
+DESCRIPTION="displays the hardware topology in convenient formats"
+HOMEPAGE="http://www.open-mpi.org/projects/hwloc/"
+SRC_URI="http://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="cairo cuda debug gl +numa +pci plugins svg static-libs xml X"
+
+# opencl support dropped with x11-drivers/ati-drivers being removed (#582406).
+# Anyone with hardware is welcome to step up and help test to get it re-added.
+
+# dev-util/nvidia-cuda-toolkit is always multilib
+
+RDEPEND=">=sys-libs/ncurses-5.9-r3:0[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[X?,svg?,${MULTILIB_USEDEP}] )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1 )
+ gl? ( || ( x11-drivers/nvidia-drivers[static-libs,tools] media-video/nvidia-settings ) )
+ pci? (
+ >=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
+ >=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
+ )
+ plugins? ( dev-libs/libltdl:0[${MULTILIB_USEDEP}] )
+ numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+PATCHES=( "${FILESDIR}/${PN}-1.8.1-gl.patch" )
+DOCS=( AUTHORS NEWS README VERSION )
+
+src_prepare() {
+ default
+ eautoreconf
+
+ if use cuda ; then
+ append-cflags -I"${EPREFIX}"/opt/cuda/include
+ append-cppflags -I"${EPREFIX}"/opt/cuda/include
+ fi
+}
+
+multilib_src_configure() {
+ export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
+
+ if use cuda ; then
+ local -x LDFLAGS="${LDFLAGS}"
+ append-ldflags -L"${EPREFIX}"/opt/cuda/$(get_libdir)
+ fi
+
+ ECONF_SOURCE=${S} econf \
+ $(use_enable static-libs static) \
+ $(use_enable cairo) \
+ $(use_enable cuda) \
+ $(use_enable debug) \
+ $(multilib_native_use_enable gl) \
+ $(use_enable pci) \
+ $(use_enable plugins) \
+ $(use_enable numa libnuma) \
+ $(use_enable xml libxml2) \
+ $(use_with X x)
+}
diff --git a/sys-apps/hwloc/metadata.xml b/sys-apps/hwloc/metadata.xml
new file mode 100644
index 000000000000..baae6b031db9
--- /dev/null
+++ b/sys-apps/hwloc/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>cluster@gentoo.org</email>
+ <name>Gentoo Cluster Project</name>
+</maintainer>
+<longdescription>
+ The Portable Hardware Locality (hwloc) software package provides a portable abstraction
+ (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures,
+ including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading.
+ It also gathers various system attributes such as cache and memory information.
+ It primarily aims at helping applications with gathering information about modern computing
+ hardware so as to exploit it accordingly and efficiently.
+</longdescription>
+<use>
+ <flag name="cuda">Enable CUDA device discovery</flag>
+ <flag name="gl">Enable GL display device discovery (NVCtrl)</flag>
+ <flag name="numa">Add support for numa memory allocation</flag>
+ <flag name="pci">Enable PCI device discovery using libpci</flag>
+ <flag name="plugins">Build hwloc components as plugins so that the hwloc core library does not directly depend on their dependencies (for instance the libpci library)</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/hwsetup/Manifest b/sys-apps/hwsetup/Manifest
new file mode 100644
index 000000000000..ae83cf2a87b4
--- /dev/null
+++ b/sys-apps/hwsetup/Manifest
@@ -0,0 +1,10 @@
+AUX 1.2-3-fastprobe.patch 2643 SHA256 c21f593fef9c1541ccc6889938686a3d20cbd9a2197debf3ce24412223d01258 SHA512 4a9d4e35f071849e7285f7cf9459d454e4878d1940525444863ac2c6104d999c5efffb62e01e792649697eddfbe8f4755dfc90cf4a4185d6637c989bd566ba82 WHIRLPOOL a9c1789861c54d6b7c1775eaf2b24c887bb7ff43c332e1947fa461d9321801d3b8060ba5c7c59e0f48dd6ba9a5af795ca6016b003232ca4409e9b13a90c6429d
+AUX 1.2-7-dyn_blacklist.patch 1840 SHA256 9b82f871fa67c6840d873fc3be4a1d3841f4ff899786ba7860b0a79c1e03d762 SHA512 e98d95a54987f12e6bc5a6171803490f0f8f14c82587909bd02375ef05ec0270e14b3d9442250948328e7062dfcb79e42e61240ed5a209bedd37b1a1e552f2b9 WHIRLPOOL 26dba9ada0a48944e6fd9dacf5a5333581fc3081743fa9253bef26b5c72cb8722c2efac8dfedece06ca4b576a44547e027aed4f143c7f28952079c49805be893
+AUX 1.2-7-gentoo.patch 560 SHA256 a521f3e4cffc3fd72db93add2599bdf6aa1e68ec06fff159a6cb78a4994cce36 SHA512 4fac3e716ddd511b9f533567a09f763f25bde439b772cbf8be3fffd6ef83ee60dc82b2655e63283c302955d3b8ee5d8aa06d99610cfd27a17412938b7cab1e0f WHIRLPOOL 2880bb255f7c1ccb9e5216000d97b822e509f6397f0a5c95d06894f1c4ef5feaee62f62c96ce1e44c87753a8737a49caa0f732a71437fd8e655fa6758251cb0a
+AUX 1.2-7-openchrome.patch 520 SHA256 f214c87787d88c4f50b10a54191b4715194c8e4cfb525a554838584e44346cf9 SHA512 f8a301d7e2d6508e5a25ba0099a808b1494cd992f2f6066912504b077a26c3fe01772e689a25f80acce59c5eff8369e2e1e33c06a7ea935e9a50d79f6fbfa25d WHIRLPOOL 22f42e20fede20e470d46b09c6914c83ae032375494dc462cd9ed367e124c78ec36343e609cf4edbe739b1bcce9724fcfa399a02febe2b7d7c88af2f282ea61a
+AUX 1.2-strip.patch 209 SHA256 2a193036174d383cc4aff646119c0a4b72c61b94ca5b49b2a366029f7bb712e0 SHA512 93033d62d6328dab7bef0f42f6f41352c60081523d86388cd5823181483cf9245dd55c163d1e78ab51e20187cdca4017c815ae86f6de14394fb6cd2724dda98b WHIRLPOOL 505032a29aa0e0ebac3d5bac118f8c526f2b3eec3dd50d4aca2fe6735154a9abf7c3c736c9d40e83b2f37c09fe7b0bbb3445206231448d048f10a2cc47ae74d9
+DIST hwsetup_1.2-7.tar.gz 10706 SHA256 aa72b37ce306b5191cabd31eb5f19ab2a5e635697a263c6735d10c7bf99f9589 SHA512 ef252c748ecf1fc17d107fa413a76df5d9daab84b10eb1ca2c5c320207e0be522c4ae6204c1c85c613403e40312c9c876bcab04eeaa1a2e1724b7bb1c6d41a1e WHIRLPOOL 083111b1aa8d3fd547b25fe16fcf10929ed65effbdf5d566a18d652ee339392c335d93d8605e9b52aa9403da9e9c6a2c209f6f317f8e25f218487f867e25184c
+EBUILD hwsetup-1.2-r3.ebuild 1729 SHA256 0f0f6533d0fb97a5c27aaafb14beefd306046f045d1b54724d8e3d24c129e4aa SHA512 74ad6856a2a2de06fe6e4feae26a404f46d703f82f433c1e95b27d9bb50ae39d8f610979de7116b8c33493feabd11e661e86b4a40df0ccf4c2bfaefdccecb49a WHIRLPOOL 29d10a6983e95bd38c171426562c153c8c124f54f03ab527a34731039d03a5f0c9764b6583a991d4a9dfaf3937afd38bd9ed3b6c9e69b8169df07b1a5db131db
+MISC ChangeLog 2579 SHA256 ee0e4da825398f21bf7034ed2c3c22920317632f95a49dbea3bca3043a23383e SHA512 e368391bf0b67bce16144b97252c614ef4938de730c646ca463a6a12fc2457015c83126d2b5eaf2607da9747239846d2c8fd6df7aa5d5c911f2ba6c5dc5b5d46 WHIRLPOOL dfbd46b81d3ccf3c13aab9d2cc862162372878ded8130bc8ff87c05bbb847ab7dea2ae9c1a688ca65a44111988647ef8c2afe6ddfd9cfd104945d52cc39faf12
+MISC ChangeLog-2015 11257 SHA256 eb4c1cfbb338bfd64ed40e7c76b0f57886fca966e7af5b964d7ecccc717cb34d SHA512 ba7bff21c8514c0543044ee28ec3a3cb507798304f7e17fd893d6232881bc96d0f21ef655254904be3e50482fd085917bd57cc25cb772652569ebd53582eda8c WHIRLPOOL 670f3680fec3e859bc18658bc5fd595e083cb61f81942697a521fd261e0610823567e9593d5978a8938dd8c40e327cf781105a39e9d427618e48aa1cbc7c2fb6
+MISC metadata.xml 251 SHA256 64aac5f4a42f3b20222048411f52dbf0c57134b8d5aecd25dee154d75d1c0b73 SHA512 2da7a6b2b1b7153b8803cc52201fa006313bf75a25f7d917f26eadd7a6426529e4b30a57c3c24cca20865d9dc4f3d56fdfa14b10254158bea2dfeb2c64fcc18c WHIRLPOOL 5fb64a7c924e2d96d98db3c80ebaa98d19bf644a2936b65d63c3642673cb259670411265eb7c2647697f09aae62d503ee21334e1f1c8aa68d85e6521cf83608f
diff --git a/sys-apps/hwsetup/files/1.2-3-fastprobe.patch b/sys-apps/hwsetup/files/1.2-3-fastprobe.patch
new file mode 100644
index 000000000000..600b8c4002d6
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-3-fastprobe.patch
@@ -0,0 +1,74 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -140,14 +140,15 @@
+
+ int syntax(char *option)
+ {
+- printf(VERSION);
++ puts(VERSION);
+ if(option) fprintf(stderr,"hwsetup: Unknown option '%s'\n\n",option);
+- printf("Usage: hwsetup\n"
+- " -v be verbose\n"
+- " -p print rotating prompt\n"
+- " -a ignore audio devices\n"
+- " -s ignore scsi controllers\n"
+- " -n probe only, don't configure anything.\n");
++ puts("Usage: hwsetup\n"
++ "\t\t-v\tbe verbose\n"
++ "\t\t-p\tprint rotating prompt\n"
++ "\t\t-a\tignore audio devices\n"
++ "\t\t-s\tignore scsi controllers\n"
++ "\t\t-n\tprobe only, don't configure anything.\n"
++ "\t\t-f\trun a fast probe.");
+ return option?1:0;
+ }
+
+@@ -425,7 +426,7 @@
+ {
+ signal(SIGALRM,SIG_IGN);
+ fprintf(stderr,"\nWARNING: Autodetection seems to hang,\n"
+- "please check your computers BIOS settings.\n");
++ "please check your computer's BIOS settings.\n");
+ fflush(stderr);
+ if(wpid) { kill(wpid,SIGTERM); usleep(2500000); kill(wpid,SIGKILL); wpid=0; }
+ exit(1); /* exit program */
+@@ -591,12 +592,13 @@
+ return 0;
+ }
+
+-int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip)
++int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip, int fastprobe)
+ {
+ int i,mouse=0,cdrom=0,modem=0,scanner=0;
++ int probeopt=fastprobe?PROBE_SAFE:PROBE_ALL;
+ struct device **currentDevs, *d, *serialmouse=NULL, *usbmouse=NULL;
+ if(verbose&VERBOSE_PROMPT) wpid=startwheel();
+- currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL);
++ currentDevs=probeDevices(dc,BUS_UNSPEC,probeopt);
+ if(verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); }
+ if(currentDevs==NULL) return -1;
+ check_proc_modules(); /* Get currently loaded module list */
+@@ -650,7 +652,7 @@
+
+ int main(int argc, char **argv)
+ {
+- int i, verbose=0, probeonly=0, skip=0;
++ int i, verbose=0, probeonly=0, skip=0, fast=0;
+ enum deviceClass dc=CLASS_UNSPEC;
+ for(i=1;i<argc;i++)
+ {
+@@ -659,6 +661,7 @@
+ else if(!strcasecmp(argv[i],"-a")) skip|=SKIP_AUDIO;
+ else if(!strcasecmp(argv[i],"-s")) skip|=SKIP_SCSI;
+ else if(!strcasecmp(argv[i],"-n")) probeonly=1;
++ else if(!strcasecmp(argv[i],"-f")) fast=1;
+ else return syntax(argv[i]);
+ }
+ /* Allow SIGTERM, SIGINT: rmmod depends on this. */
+@@ -667,5 +670,5 @@
+ #ifdef BLACKLIST
+ gen_blacklist();
+ #endif
+- return hw_setup(dc,verbose,probeonly,skip);
++ return hw_setup(dc,verbose,probeonly,skip,fast);
+ }
diff --git a/sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch b/sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch
new file mode 100644
index 000000000000..efbe0f6abfed
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch
@@ -0,0 +1,62 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -51,13 +51,40 @@
+ /* Do not, under any circumstances, load these modules automatically, */
+ /* even if in pcitable. (libkudzu may ignore this, and the KNOPPIX */
+ /* autoconfig scripts may probe them, too) */
+-char *blacklist[] =
++char *blacklist[200][200] =
+ { "apm","agpgart","yenta_socket","i82092","i82365","tcic",
+ "pcmcia_core","ds","ohci1394","hisax", "hisax_fcpcipnp",
+ "hisax_isac","hisax_st5481",
+ /* Winmodems, unusable, can block sound slot */
+ "snd-atiixp-modem", "snd-intel8x0m","snd-via82xx-modem"
+ };
++
++int blacklistsize = 13;
++void gen_blacklist(){
++ int n = 13;
++ int size = 0;
++ char *comment;
++ char module[1024];
++ FILE *stream;
++
++ if((stream = fopen ("/usr/share/hwdata/blacklist", "r")) != (FILE *)0) {
++ while((fgets(module, 1023, stream)) != (char *)0 ) {
++
++ comment = strchr(module, '#');
++ if (comment != 0) *comment = '\0';
++ comment = strchr(module, '\n');
++ if (comment != 0) *comment = '\0';
++ size = strlen(module);
++ if (size < 2) continue;
++ strcat (module , " \0");
++ strcpy(blacklist[n] , module);
++ n++;
++ if ( n == 200 ) break;
++ //printf(module);
++ }
++ blacklistsize = n;
++ }
++}
+ #endif
+
+ /* If a conflicting module in a row is already loaded, the new module will not be probed anymore */
+@@ -547,7 +574,7 @@
+ char *cc;
+ if((m==NULL)||(!strcmp("unknown",m))||(!strcmp("ignore",m))|| check_loaded(m)) return 0;
+ #ifdef BLACKLIST
+- for(i=0;i<(sizeof(blacklist)/sizeof(char*));i++)
++ for(i=0;i<blacklistsize;i++)
+ {
+ if(!modcmp(blacklist[i],m))
+ {
+@@ -781,5 +808,8 @@
+ /* Allow SIGTERM, SIGINT: rmmod depends on this. */
+ signal(SIGTERM,SIG_DFL); signal(SIGINT,SIG_DFL);
+ signal(SIGALRM,alarm_handler); alarm(MAX_TIME);
++#ifdef BLACKLIST
++ gen_blacklist();
++#endif
+ return hw_setup(dc,verbose,probeonly,skip);
+ }
diff --git a/sys-apps/hwsetup/files/1.2-7-gentoo.patch b/sys-apps/hwsetup/files/1.2-7-gentoo.patch
new file mode 100644
index 000000000000..e4fc590393fd
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-gentoo.patch
@@ -0,0 +1,20 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -388,7 +388,7 @@
+ sprintf(fullpath,"%.90s%.32s",xpath,server[i]);
+ if(!exists(fullpath)) continue;
+ strncpy(xi.xserver,server[i],sizeof(xi.xserver));
+- }
++ }
+ }
+ }
+ if((xpos=strstr(d->driver,xorg))!=NULL) /* Check for Xorg */
+@@ -653,7 +653,7 @@
+ int writeconfig(char *name,struct device *d,int verbose)
+ {
+ FILE *f,*k;
+- const char *kconfig="/etc/sysconfig/knoppix";
++ const char *kconfig="/etc/sysconfig/gentoo";
+ char *desc;
+ unlink(name);
+ if((f=fopen(name,"w"))==NULL)
diff --git a/sys-apps/hwsetup/files/1.2-7-openchrome.patch b/sys-apps/hwsetup/files/1.2-7-openchrome.patch
new file mode 100644
index 000000000000..fb80f9dfcb1a
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-openchrome.patch
@@ -0,0 +1,11 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -456,7 +456,7 @@
+ else if(strcasestr(xi.xdesc,"Newport")) strcpy(xi.xmodule,"newport");
+ else if(strcasestr(xi.xdesc,"Siliconmotion")||strcasestr(xi.xdesc,"Silicon Motion")) strcpy(xi.xmodule,"siliconmotion");
+ else if(strcasestr(xi.xdesc,"Chips")) strcpy(xi.xmodule,"chips");
+- else if(strcasestr(xi.xdesc,"VIA ")) strcpy(xi.xmodule,"via");
++ else if(strcasestr(xi.xdesc,"VIA ")) strcpy(xi.xmodule,"openchrome");
+ }
+ else strcpy(xi.xmodule,xvesa4);
+ }
diff --git a/sys-apps/hwsetup/files/1.2-strip.patch b/sys-apps/hwsetup/files/1.2-strip.patch
new file mode 100644
index 000000000000..17de636a5dc7
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-strip.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@
+ # define BLACKLIST to avoid loading potentially dangerous modules
+ CFLAGS=-DBLACKLIST -Wall -fPIC
+ OPT=-O2
+-LDFLAGS=-s
++#LDFLAGS=-s
+ LIBS=-lkudzu -lpci
+ CC=gcc
+
diff --git a/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild b/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild
new file mode 100644
index 000000000000..d027099ea1cb
--- /dev/null
+++ b/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_PV=${PV}-7
+DESCRIPTION="Hardware setup program from Knoppix - used only on LiveCD"
+HOMEPAGE="http://www.knopper.net/"
+SRC_URI="http://debian-knoppix.alioth.debian.org/sources/${PN}_${MY_PV}.tar.gz"
+#http://developer.linuxtag.net/knoppix/sources/${PN}_${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 -mips ppc ppc64 sparc x86"
+IUSE="zlib"
+
+COMMON_DEPEND="
+ sys-apps/pciutils[zlib?]
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ sys-libs/libkudzu
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ sys-apps/hwdata-gentoo
+"
+
+pkg_setup() {
+ ewarn "This package is designed for use on the LiveCD only and will do "
+ ewarn "unspeakably horrible and unexpected things on a normal system."
+ ewarn "YOU HAVE BEEN WARNED!!!"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${MY_PV}-dyn_blacklist.patch \
+ "${FILESDIR}"/${PV}-3-fastprobe.patch \
+ "${FILESDIR}"/${MY_PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-strip.patch \
+ "${FILESDIR}"/${MY_PV}-openchrome.patch
+}
+
+src_configure() {
+ if use zlib ; then
+ sed -i \
+ -e '/^LIBS=/s,-lpci,-lz -lpci,g' \
+ Makefile
+ fi
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" OPT="${CFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man
+ dosbin ${PN}
+ keepdir /etc/sysconfig
+}
+
+pkg_postinst() {
+ ewarn "This package is intended for use on the Gentoo release media. If"
+ ewarn "you are not building a CD, remove this package. It will not work"
+ ewarn "properly on a running system, as Gentoo does not use any of the"
+ ewarn "Knoppix-style detection except for CD builds."
+}
diff --git a/sys-apps/hwsetup/metadata.xml b/sys-apps/hwsetup/metadata.xml
new file mode 100644
index 000000000000..767266dca141
--- /dev/null
+++ b/sys-apps/hwsetup/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>livecd@gentoo.org</email>
+ <name>Gentoo LiveCD Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/i2c-tools/Manifest b/sys-apps/i2c-tools/Manifest
new file mode 100644
index 000000000000..4e0463cf42e6
--- /dev/null
+++ b/sys-apps/i2c-tools/Manifest
@@ -0,0 +1,6 @@
+AUX i2c-tools-3.1.1-python-3.patch 3348 SHA256 38ad348a8e18571e49f01874df05fb9f13e1b7e8e2c659f684eae68ddee34920 SHA512 0f264e49237af0318c868deac39bdd7c2b718c39317c2e47b15ad7d421530dc165f38b5995ca45bcfd65074ab51022d88ced6f2d589e30ebbab1702cf964f8da WHIRLPOOL 45238e25f6eefbd7a9bac665dd8a0f4f41ee8c096e804af8e27745b1109bcb35e8eb6565b9b181ae24834c938259cbd40f77837729c93ed8ad3ab27ef1b1abea
+DIST i2c-tools-3.1.1.tar.bz2 71789 SHA256 14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700 SHA512 b91f89b803e5558d49ce63f42f6542438f4f47927e4ce420cd9df989cab14a5c55d971befed73e8f793b0cf4aa41936c0ef519e5a407dceb2c08964461e803c5 WHIRLPOOL 5d68236a7c6e5075625420d1e9cb0a075e8e064babbb73163a2bf2a5cf2b0b169e1420ab1ef495533c88f53497767f6256b817c49b5d9f1799f3bde6d7e26b24
+EBUILD i2c-tools-3.1.1-r1.ebuild 1431 SHA256 23b42a156d5214eed6d3dc34307c1d93bb5408df72436c5668e7fab5ff86d558 SHA512 03b8a80f90970877019cc27d519e535fb7478d636603b937a63f375b3c7ed8264bf975bc3640541afbe02ca7f0de7e226940f6a0f6ab4a7f9d54f2fc02efc564 WHIRLPOOL fce45f25540a16e5170399f9c9ae8014f9b7375fc57df128d170e5bdf0d67993282431432e105b2619a69b1b977c9ea541ac294c95e88a843f6bb47d080cef02
+MISC ChangeLog 3286 SHA256 162cfb4f7ffbd61f1db4d07fc57d5cabe6f70c5421870293e8d549988bfa43da SHA512 3d2cbab2da2f760c62885976684210885ef68d159bc58aaf5b775e7cad061f81a7f784e7362120250fbaedd7e7e426d871ccf86da5f04b7eb11e1577228d261d WHIRLPOOL dbd0b1329d3baab3b55bb1f9ce9758715265fb7e9f87807b7ee4240478e1012cfb6fcf97f13ec36b0cea3bd8ad56e98cd6cfdc10ec91f729f2fae32e50509e45
+MISC ChangeLog-2015 3011 SHA256 cfcad5410941d8a29eb27fe22801a3fe6e950651c029e53d4aa20c69b540ee08 SHA512 c51ef452d5bd5b537dbd48f44934e777f635b8b1649407a46cf99486f26c543c93910a50b2f18b0fd2493214bb68eb6a02d4bb920b460c0a1e373aaff51b7da1 WHIRLPOOL 39c7c526ec554a092dfe76f3be89ad37c1dbae6a418ccffa0e16826e0b7711116ce8200446b397f4b656852dd6c6c955d85e9a6c9f63a21b4ac702edc09fd12f
+MISC metadata.xml 214 SHA256 d676fbb74b55d2339af4f261fba3cdbbcd50b0eb8806b4a2f1346135fbcb3781 SHA512 ae2a716aa849a3e9bd264007acc830ed4ee3c3acd1fc76ed1a60c683e248bded6aeefa174f04d70f0a7705c57bbd1e1ca44fd975f140c12de415381702d8df43 WHIRLPOOL 1115d462a34a47acebe81d238d4bcc9d8852786808a13cccf7c6cf022eed56655a640ee8ae253f26513f0931e338688eff3ea677627adad0d45cfb43545877ab
diff --git a/sys-apps/i2c-tools/files/i2c-tools-3.1.1-python-3.patch b/sys-apps/i2c-tools/files/i2c-tools-3.1.1-python-3.patch
new file mode 100644
index 000000000000..1f3de76052e7
--- /dev/null
+++ b/sys-apps/i2c-tools/files/i2c-tools-3.1.1-python-3.patch
@@ -0,0 +1,129 @@
+support python-3.x
+
+http://comments.gmane.org/gmane.linux.drivers.i2c/11290
+https://bugs.gentoo.org/492632
+
+--- a/py-smbus/smbusmodule.c
++++ b/py-smbus/smbusmodule.c
+@@ -32,15 +32,18 @@
+ #define I2C_SMBUS_I2C_BLOCK_DATA 8
+ #endif
+
+-PyDoc_STRVAR(SMBus_module_doc,
+- "This module defines an object type that allows SMBus transactions\n"
+- "on hosts running the Linux kernel. The host kernel must have I2C\n"
+- "support, I2C device interface support, and a bus adapter driver.\n"
+- "All of these can be either built-in to the kernel, or loaded from\n"
+- "modules.\n"
+- "\n"
+- "Because the I2C device interface is opened R/W, users of this\n"
+- "module usually must have root permissions.\n");
++#define module_doc \
++ "This module defines an object type that allows SMBus transactions\n" \
++ "on hosts running the Linux kernel. The host kernel must have I2C\n" \
++ "support, I2C device interface support, and a bus adapter driver.\n" \
++ "All of these can be either built-in to the kernel, or loaded from\n" \
++ "modules.\n" \
++ "\n" \
++ "Because the I2C device interface is opened R/W, users of this\n" \
++ "module usually must have root permissions.\n"
++#if PY_MAJOR_VERSION <= 2
++PyDoc_STRVAR(SMBus_module_doc, module_doc);
++#endif
+
+ typedef struct {
+ PyObject_HEAD
+@@ -91,7 +94,11 @@ SMBus_dealloc(SMBus *self)
+ PyObject *ref = SMBus_close(self);
+ Py_XDECREF(ref);
+
++#if PY_MAJOR_VERSION >= 3
++ Py_TYPE(self)->tp_free((PyObject*)self);
++#else
+ self->ob_type->tp_free((PyObject *)self);
++#endif
+ }
+
+ #define MAXPATH 16
+@@ -431,11 +438,19 @@ SMBus_list_to_data(PyObject *list, union i2c_smbus_data *data)
+
+ for (ii = 0; ii < len; ii++) {
+ PyObject *val = PyList_GET_ITEM(list, ii);
++#if PY_MAJOR_VERSION >= 3
++ if (!PyLong_Check(val)) {
++#else
+ if (!PyInt_Check(val)) {
++#endif
+ PyErr_SetString(PyExc_TypeError, msg);
+ return 0; /* fail */
+ }
++#if PY_MAJOR_VERSION >= 3
++ data->block[ii+1] = (__u8)PyLong_AS_LONG(val);
++#else
+ data->block[ii+1] = (__u8)PyInt_AS_LONG(val);
++#endif
+ }
+
+ return 1; /* success */
+@@ -633,9 +648,27 @@ static PyGetSetDef SMBus_getset[] = {
+ {NULL},
+ };
+
++#if PY_MAJOR_VERSION >= 3
++static struct PyModuleDef SMBusModule = {
++ PyModuleDef_HEAD_INIT,
++ "smbus.SMBus", /* m_name */
++ module_doc, /* m_doc */
++ -1, /* m_size */
++ NULL, /* m_methods */
++ NULL, /* m_reload */
++ NULL, /* m_traverse */
++ NULL, /* m_clear */
++ NULL, /* m_free */
++};
++#endif
++
+ static PyTypeObject SMBus_type = {
++#if PY_MAJOR_VERSION >= 3
++ PyVarObject_HEAD_INIT(NULL, 0)
++#else
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
++#endif
+ "smbus.SMBus", /* tp_name */
+ sizeof(SMBus), /* tp_basicsize */
+ 0, /* tp_itemsize */
+@@ -683,16 +716,32 @@ static PyMethodDef SMBus_module_methods[] = {
+ #define PyMODINIT_FUNC void
+ #endif
+ PyMODINIT_FUNC
+-initsmbus(void)
++#if PY_MAJOR_VERSION >= 3
++PyInit_smbus(void)
++#else
++initsmbus(void)
++#endif
+ {
+ PyObject* m;
+
++#if PY_MAJOR_VERSION >= 3
++ if (PyType_Ready(&SMBus_type) < 0)
++ return NULL;
++
++ m = PyModule_Create(&SMBusModule);
++ if (m == NULL)
++ return NULL;
++#else
+ if (PyType_Ready(&SMBus_type) < 0)
+ return;
+
+ m = Py_InitModule3("smbus", SMBus_module_methods, SMBus_module_doc);
++#endif
+
+ Py_INCREF(&SMBus_type);
+ PyModule_AddObject(m, "SMBus", (PyObject *)&SMBus_type);
++#if PY_MAJOR_VERSION >= 3
++ return m;
++#endif
+ }
+
diff --git a/sys-apps/i2c-tools/i2c-tools-3.1.1-r1.ebuild b/sys-apps/i2c-tools/i2c-tools-3.1.1-r1.ebuild
new file mode 100644
index 000000000000..342d6295325e
--- /dev/null
+++ b/sys-apps/i2c-tools/i2c-tools-3.1.1-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_OPTIONAL="1"
+
+inherit flag-o-matic toolchain-funcs distutils-r1
+
+DESCRIPTION="I2C tools for bus probing, chip dumping, EEPROM decoding, and more"
+HOMEPAGE="http://www.lm-sensors.org/wiki/I2CTools"
+SRC_URI="http://dl.lm-sensors.org/i2c-tools/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="!<sys-apps/lm_sensors-3
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ epatch "${FILESDIR}"/${PN}-3.1.1-python-3.patch #492632
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ use python && distutils-r1_src_configure
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}"
+ emake -C eepromer CC=$(tc-getCC) CFLAGS="${CFLAGS} -I../include"
+ if use python ; then
+ cd py-smbus || die
+ append-cppflags -I../include
+ distutils-r1_src_compile
+ fi
+}
+
+src_install() {
+ emake install prefix="${D}"/usr
+ dosbin eepromer/eepro{g,m{,er}}
+ rm -rf "${D}"/usr/include # part of linux-headers
+ dodoc CHANGES README
+ local d
+ for d in eeprom eepromer ; do
+ docinto ${d}
+ dodoc ${d}/README*
+ done
+
+ if use python ; then
+ cd py-smbus || die
+ docinto py-smbus
+ dodoc README*
+ distutils-r1_src_install
+ fi
+}
diff --git a/sys-apps/i2c-tools/metadata.xml b/sys-apps/i2c-tools/metadata.xml
new file mode 100644
index 000000000000..65aa159cc0c9
--- /dev/null
+++ b/sys-apps/i2c-tools/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 type='person'>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/ibm-powerpc-utils-papr/Manifest b/sys-apps/ibm-powerpc-utils-papr/Manifest
new file mode 100644
index 000000000000..85204b6d345a
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/Manifest
@@ -0,0 +1,11 @@
+AUX ibm-powerpc-utils-papr-1.1.0-remove-doc.patch 425 SHA256 274f10e238a4aa2a67d2473f40d01c598145d9bc82de7adb15e190823689f2fc SHA512 d8cf48b58c1516c685d6e3a4c65f5f920f711f37bb4974d149918c853e94fc66c7ecda3356c586e7c21e3b0ff4926ce4530f222f82172b922d357fa715f3f57e WHIRLPOOL 90bcfbfe500bfc25af61119ed273c63f36c0b033d069711de62fe5f6349cb4416520b9975d085044f5b4972a6b4f4d15b94d5f4b9c647ac19fd4780e64a8f86b
+AUX ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch 662 SHA256 5bed4ffee2e8b706490f98c8adc8a4ebabb3cb668a4609e7403da20be75460a4 SHA512 7d27ed954dc95c2ed5cb46efdca1159a019ac9a32f728576e0552e57f40b9a6930823d4055ee6b7560f733271f42b1291164723406b2b7d6525c941f795b9885 WHIRLPOOL da08f0c9bef4f5a386ce8eb8ad2a2620a19fe721e3d64df68c207e8a4825f69d1002eb9285890d2ea399ad1ef3e6e62c494f919fe495615ebbb594a9c58319d7
+AUX ibm-powerpc-utils-papr-1.1.6-removeinitandvscsis.patch 949 SHA256 65468e15fc142fda19b8079e83c7bc45878e013d190b414def6eefa863d512c9 SHA512 c862078fa6778f8f74615a3867ac91c85f0b4eb0d4a499c24fb9f40809bd7c3eabe74c97d47d1bbdef902ab398144d9030b7ec9bda88dbd9dc706dff44f886b9 WHIRLPOOL a5fcbdbf0109e63f4f49709c9815b8a39ed083c3fdf70943a565a0e4371bba9a4ef906501f350a5c0732389b4eab1b48da6bf543daf8daf558ea33b841f8be03
+AUX ibmvscsis 1674 SHA256 7b30024e13f0a301bc931271f9234c7b66fb671cc9c583c2a5d25172830812ef SHA512 130f9a13a425e0af489eb135e48d8f77e0af6a6321ad080c3638a3c122a3f25bee4d9da1f8cea2d4acb234f35f67e4696ed40a8ae818be811912aa77351d3ac8 WHIRLPOOL d5e9b8898ffedaf48f00804467c09c963993cb7ce7f64c2bdb041164a1b413e71d740faac998d9bc1488553280372b1be964f8fe61c8f69da2464145e91193bf
+DIST powerpc-utils-papr-1.1.0.tar.gz 202321 SHA256 edd36417a21b19a3e8fd277c93b31fc71309ebde44aa7aa4a7813ce4240b1a16 SHA512 4d222373c1bd1a9cadf74110ed0423bd099309d27b6e0f2e3c2d04adda02ad76611c3605954ca67a5a5e869d93241ef756c76b49d6207fc0a68a8eb7cf088a4a WHIRLPOOL f1cecdf61098ecbbc25e2f47e0afddfd1b17fa56758ea371764eecd563ef864a18927e134ebcac5a7882fd0d0f7f52c94994557d6a1adf8056323e62eb9cc60e
+DIST powerpc-utils-papr-1.1.6.tar.gz 231283 SHA256 71e1fe04951c62176a8f224d79183e9b87967edb60c07c65f107f93f9b8c6243 SHA512 e6c532276a4ed6749ee43af539a07be80777674927d2dc9eb65d95a9b57aa0b902e5fe2be65947f9fedd6e060a44657769c6f9faeae49a78cb4803d038f56377 WHIRLPOOL 53e578f39c47a9f019808bf61d2e3e971d2b108749f29ad54a999184f43cbc1c20ad51b647331c70e50ca29f7075a8071f7a62aa6c904913840e9456cde7b1d4
+EBUILD ibm-powerpc-utils-papr-1.1.0.ebuild 1416 SHA256 ac32484b2020283bc9e4b91a64981c5ff697dc33bc85107674e576ba3cda6d95 SHA512 0721f0e879aab4f45b76844b15480ef55372877bbde101b74ad37e877c70a053762b51acc371a8da9f6d8620a9e8cc48b3011ca7bc97c121b5bdee0c2cbc395b WHIRLPOOL dadc5247b404fa200992220dac277ecdf44160ab653bc3016da13398c6434bfb3a8344ce1b3361a83a3aaf6c7e91f50fb243a44ccb71eb36e0df8fa23b67c7fa
+EBUILD ibm-powerpc-utils-papr-1.1.6.ebuild 1015 SHA256 3cd3ee692cafa6ce0c5f436acc4764c63006dd3caf676bae49e740e83e0cec6e SHA512 b9767bf27081067958b0cbd54a877ffecc7e0b4c82165a3684c30035c151ef7025643b17127e38e69f0a8d6c3470e3b3f824e66c2a4b6ac73864c99de52e8959 WHIRLPOOL cd4524ddc0f81e04773ff41104ba40d0df12e69f15252f1953f9ba50b087c0e60435d0cd47434bd30ce288a8885e11ee8cb66a41bbd1b4a24db94ee8d168715e
+MISC ChangeLog 2886 SHA256 556cb20a868d4df1fe51544e4535355a8584bd0c41b49182e84df598ce126520 SHA512 664d19387b03c39ea81a252dddbff39cc563dff74aa5939f6efad720670137f294b6026f3e222742f7b9f54e9f26737228b1c0988441cf2d2bac26f8f6cd402a WHIRLPOOL 6e397b1d3165ffeb09b0f8653b4e57e2922f2a10a19df62d3b051309202b504e95b07e51477ffee19d55e70de9bd1053787cc5adf1e76c0145672b33ef27e3a4
+MISC ChangeLog-2015 5119 SHA256 deddbd83d06dea5038e5845428b08e92fd9ef552d1d1e9accc9f79db07f548a3 SHA512 64b617bce1069888c2637cc2082be53f334cfcfbb415b7474b6a65aeef17f1f1828718f5647e7cc3229cb732992b9e67b3d26fd87cc74bce68dd0248640d4183 WHIRLPOOL e967786a650968360a3f498b3fdd1d0261cf357db657529ed7248b518838783f2e2b859f97767168c79f84cfd257eff5039932c014e75bcbf943c4ada22d2722
+MISC metadata.xml 259 SHA256 e7ac6b67c4c89040a00b23bda7a3b2fd4ac8affc1055daf3015ccc8580640f6f SHA512 ca71b1781806d20022c238e5b5d10f9154c78e0fa51f2603de34c48ecbe4cbc2c3190cf046526840546743644c691ee7fe51e31a4617b01bb7602dde803c1538 WHIRLPOOL 2a2aa19a448eca4dea84d129fd194a7ee4d77bdc1b5120abd3b667ce156cdeeb4616a7c7cd23fbccb7ba08e6e166aaba0fac63a6afa208d826acee37b0e560fe
diff --git a/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-remove-doc.patch b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-remove-doc.patch
new file mode 100644
index 000000000000..8a2c27f0f8e8
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-remove-doc.patch
@@ -0,0 +1,14 @@
+--- powerpc-utils-papr-1.1.0.orig/Makefile 2006-03-28 16:07:24.000000000 -0600
++++ powerpc-utils-papr-1.1.0/Makefile 2006-04-19 14:53:25.000000000 -0500
+@@ -20,11 +20,9 @@
+ @$(MAKE) -C doc
+
+ install: all
+- @$(call install_doc,$(FILES),$(DESTDIR))
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d install;)
+
+ uninstall:
+- @$(call uninstall_doc,$(FILES),$(DESTDIR))
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d uninstall;)
+
+ rpm: all
diff --git a/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch
new file mode 100644
index 000000000000..a6bb9278f8a9
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch
@@ -0,0 +1,23 @@
+--- powerpc-utils-papr-1.1.0.orig/scripts/Makefile 2006-03-28 16:07:24.000000000 -0600
++++ powerpc-utils-papr-1.1.0/scripts/Makefile 2006-04-19 14:53:44.000000000 -0500
+@@ -4,7 +4,7 @@
+
+ include ../rules.mk
+
+-SCRIPTS = update_flash hvcsadmin vscsisadmin rtas_dump
++SCRIPTS = update_flash hvcsadmin rtas_dump
+
+ RCSCRIPTS = ibmvscsis.sh
+
+@@ -12,11 +12,9 @@
+
+ install: all
+ @$(call install_sbin,$(SCRIPTS),$(DESTDIR))
+- @$(call install_files,$(RCSCRIPTS),755,$(DESTDIR)/etc/init.d)
+
+ uninstall:
+ @$(call uninstall_sbin,$(SCRIPTS),$(DESTDIR))
+- @$(call uninstall_files,$(RCSCRIPTS),$(DESTDIR)/etc/init.d)
+
+ clean:
+ @echo "Cleaning up $(WORK_DIR) files..."
diff --git a/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.6-removeinitandvscsis.patch b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.6-removeinitandvscsis.patch
new file mode 100644
index 000000000000..b8a31df485b5
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/files/ibm-powerpc-utils-papr-1.1.6-removeinitandvscsis.patch
@@ -0,0 +1,27 @@
+--- powerpc-utils-papr-1.1.6/scripts/Makefile.bak 2010-03-21 15:11:49.590571690 -0400
++++ powerpc-utils-papr-1.1.6/scripts/Makefile 2010-03-21 15:12:48.107232396 -0400
+@@ -4,7 +4,7 @@
+
+ include ../rules.mk
+
+-SCRIPTS = update_flash hvcsadmin vscsisadmin rtas_dump
++SCRIPTS = update_flash hvcsadmin rtas_dump
+
+ USER_SCRIPTS = amsstat
+
+@@ -18,13 +18,13 @@
+ install: all
+ @$(call install_sbin,$(SCRIPTS),$(DESTDIR))
+ @$(call install_bin,$(USER_SCRIPTS),$(DESTDIR))
+- @$(call install_files,$(RCSCRIPTS),755,$(DESTDIR)/etc/init.d)
++ #@$(call install_files,$(RCSCRIPTS),755,$(DESTDIR)/etc/init.d)
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d install;)
+
+ uninstall:
+ @$(call uninstall_sbin,$(SCRIPTS),$(DESTDIR))
+ @$(call uninstall_bin,$(USER_SCRIPTS),$(DESTDIR))
+- @$(call uninstall_files,$(RCSCRIPTS),$(DESTDIR)/etc/init.d)
++ #@$(call uninstall_files,$(RCSCRIPTS),$(DESTDIR)/etc/init.d)
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d uninstall;)
+
+ clean:
diff --git a/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis b/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis
new file mode 100644
index 000000000000..f993fd392930
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis
@@ -0,0 +1,69 @@
+#!/sbin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# This file is tasked with testing for the existence of the ibmvscsis driver
+# and configuring the ibmvscsi server properly as indicated by the config file
+# located at /etc/ibmvscsis.conf
+#
+
+DRIVER=ibmvscsis
+SYSFS=/sys/bus/vio/drivers/ibmvscsis
+CONFIG=/etc/ibmvscsis.conf
+
+depend() {
+ need logger
+ provide ibmvscsis
+}
+
+checkconfig() {
+ if [ ! -e ${CONFIG} ] ; then
+ eerror " ${CONFIG} does not exist."
+ return 1
+ fi
+}
+
+checkmodule_load() {
+ # The existence of $SYSFS indicates that the module has been loaded or that
+ # the driver is at least built into the kernel.
+ if [ ! -e ${SYSFS} ] ; then
+ ewarn " Module ${DRIVER} is not loaded, attempting to load it"
+ /sbin/modprobe ${DRIVER} &> /dev/null && return 0
+ eerror " Failed to load module ${DRIVER}"
+ return 1
+ fi
+}
+
+checkmodule() {
+ # The existence of $SYSFS indicates that the module has been loaded or that
+ # the driver is at least built into the kernel.
+ if [ ! -e ${SYSFS} ] ; then
+ eerror " Module ${DRIVER} is not loaded"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting vscsiadmin"
+ checkconfig || return 1
+ checkmodule_load || return 1
+ /usr/sbin/vscsiadmin -start &> /dev/null
+ eend $? "Failed to start vscsiadmin"
+}
+
+stop() {
+ ebegin "Stopping vscsiadmin"
+ checkmodule || return 1
+ /usr/sbin/vscsiadmin -stop &> /dev/null
+ eend $? "Failed to stop vscsiadmin"
+}
+
+status() {
+ checkmodule || return 1
+ /usr/sbin/vscsiadmin -status
+}
+
+restart() {
+ stop
+ start
+}
diff --git a/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.0.ebuild b/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.0.ebuild
new file mode 100644
index 000000000000..dcc95c7e64e4
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="powerpc-utils-papr-${PV}"
+
+DESCRIPTION="This package provides the utilities which are intended for the maintenance of IBM powerpc platforms"
+SRC_URI="http://powerpc-utils.ozlabs.org/releases/powerpc-utils-papr-${PV}.tar.gz"
+HOMEPAGE="http://powerpc-utils.ozlabs.org/"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="ppc ppc64"
+IUSE=""
+RDEPEND=">=sys-apps/ibm-powerpc-utils-1.1.0
+ sys-libs/librtas
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/ibm-powerpc-utils-papr-1.1.0-remove-doc.patch
+ epatch "${FILESDIR}"/ibm-powerpc-utils-papr-1.1.0-removeinitandvscsis.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Compilation failed"
+ dodoc README COPYRIGHT
+ #dodir /etc/init.d
+ #exeinto /etc/init.d
+ #newexe ${FILESDIR}/ibmvscsis ibmvscsis
+}
+
+pkg_postinst() {
+ #einfo "An initscript for managing virtual scsi servers has "
+ #einfo "been install into /etc/init.d/ called ibmviscsis. "
+ #einfo "Before you can use this daemon, you must create a proper "
+ #einfo "/etc/ibmvscsis.conf file."
+ einfo "Support for the IBM Virtual SCSI server (virtual disk) "
+ einfo "is not included in this version of powerpc-utils-papr. "
+ einfo "When the ibmvscsis function is generally available in "
+ einfo "the kernel source trees, it will be added back in."
+}
diff --git a/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.6.ebuild b/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.6.ebuild
new file mode 100644
index 000000000000..0082ac0ce9cd
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/ibm-powerpc-utils-papr-1.1.6.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="powerpc-utils-papr-${PV}"
+
+DESCRIPTION="This package provides the utilities which are intended for the maintenance of IBM powerpc platforms"
+SRC_URI="http://powerpc-utils.ozlabs.org/releases/powerpc-utils-papr-${PV}.tar.gz"
+HOMEPAGE="http://powerpc-utils.ozlabs.org/"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+IUSE=""
+RDEPEND=">=sys-apps/ibm-powerpc-utils-1.1.2
+ sys-libs/librtas
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/ibm-powerpc-utils-papr-${PV}-removeinitandvscsis.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Compilation failed"
+}
+
+pkg_postinst() {
+ einfo "Support for the IBM Virtual SCSI server (virtual disk) "
+ einfo "is not included in this version of powerpc-utils-papr. "
+ einfo "When the ibmvscsis function is generally available in "
+ einfo "the kernel source trees, it will be added back in."
+}
diff --git a/sys-apps/ibm-powerpc-utils-papr/metadata.xml b/sys-apps/ibm-powerpc-utils-papr/metadata.xml
new file mode 100644
index 000000000000..5eb05198076b
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils-papr/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/ibm-powerpc-utils/Manifest b/sys-apps/ibm-powerpc-utils/Manifest
new file mode 100644
index 000000000000..7ba7b6c4f3b5
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/Manifest
@@ -0,0 +1,14 @@
+AUX ibm-powerpc-utils-1.1.0-remove-doc.patch 533 SHA256 472eff910abc05beb40bb91a3e3ef26a96746cb79ab6855ccad192cca732e6a8 SHA512 01a9cccb83b2de57e709e449315ab6f648103906d0bfbcc4788f23cff8e8c5314d0ffa803e4f6dd60dfc6d636b38b4f3aedbaeb4cf44f9b5e486eeb74f3257fb WHIRLPOOL 6d03179a1b8bed8205c3d2f25cf5faa5ea9ae83d8368b186ffd6233c4c2ee1f5e717ac0bac2899f4afc82ff564030b9c3da635998d8af3030ecb170e12dcd50f
+DIST powerpc-utils-1.1.0.tar.gz 49368 SHA256 163886d3d1b59e92323b95461df83712f4cea5f605dda1fffdf1912567f3c94d SHA512 16a757d66315b5ec50d2ae42223ab7b5147df1dc91cd56343c3cea19b8ab1fbd67674666f394cd519fa4dc2a0ec4b3ee5cdeb34cc6c17e9f4ef5fa0fc4e90402 WHIRLPOOL a332fd4b85c290c793cc449c4ec0753e44f3d4503d53fdbfbf76adc3a995f92593ad92deafa34553478512cacd86ab9e9d92b2d3f00e9d9150ab05b363194b0c
+DIST powerpc-utils-1.2.12.tar.gz 347762 SHA256 570173a2712e06cdd34fc6b5c8aef3313909e1efd083f2a77d1053bfa25f4e01 SHA512 a28150c753e65c7595a7ad7a5361560b162c639bc6d385763c57d0c02f2b6e15db7e091be167d3c68aa1378f816a75971c5d60c1997dfa96be4a73f072863649 WHIRLPOOL dca98947543defb2d458d9aa9ff1df2230f82c1e1b058a939ab1c19ce6c44d5449ec9156db67af20356c3c90864ee03e65080a56aa9e80b6e531651d421091ae
+DIST powerpc-utils-1.2.2.tar.gz 345299 SHA256 692fcc928645f7776334999a02f9bdd3d675932fbf6efbfa49950e1bc62c3694 SHA512 e33b5294aff5d66a61740e4817ff274004f9798073e21a3eff896858d43dfa2dcf43669ece58f0fdcb503d42109d9bf574d2f35a0c06da3cd9139b34a249b929 WHIRLPOOL 5c45079ac419c362ecdd9513ba26f833a048efaee78707f52d7269a9a568c51e49da073cc2b8f7ee090984fb4d17344fd94843392523d76cd8f3decbfac8d76c
+DIST powerpc-utils-1.2.25.tar.gz 367466 SHA256 2d9a0d4b04ab499ba1362844d65a4e21df0532578a2baa1fe18fff58dc8f32d9 SHA512 33af208dcd6ef9d66b96ec3eadab2eee48017860db9195eea0c59444a5dd414c326e1a737d6c324396219901ea594baaad6f49c8f3c36f5e806b4923d049b14e WHIRLPOOL a4d273ea9be4c8199c1f6ed25f80e6bbc28f3c653a0665196c10f4e95266b1e50835d0886219671f6fef0916de3b679799de6a2a1772ecad77665b386711a5f3
+DIST powerpc-utils-1.2.26.tar.gz 371200 SHA256 61253cb898283e94fcfde641d09722c3e845ebfd98a46f9bc2ad82167ff51592 SHA512 8c8c45128e89cad5bd1a37699a8b628c269b7fe9d5ebc5893ddce8ea8b77252708f5a2a4a454af71224709a44c999446e5d5b7113ba24efc4227b6ff90a1fffd WHIRLPOOL b024a02cf6feb3032b2599e3ceb5091d65631be492ce6ba9d4f5b832aa617293e3192a16be35ffee3765ef3328496712a497a9b8dcefb61a01ec511f71ed80c3
+EBUILD ibm-powerpc-utils-1.1.0.ebuild 872 SHA256 81f1e41e1e00914cc24165128209df2d94833348f9b4d54d1c6c0d258e1f1000 SHA512 cda11130d39f976a9892a8831dd9b1673742844f3107ee4131b9a9a520b169f345d0e411ed564d0c3d5c6cb989fcbe03237eb3f9e63ae05e68749fbcaa0f899f WHIRLPOOL ad0d09a860dfbad147ad196657ef6c9fae3da20d8640a1ac04cce6ae70cfd761ab7c33b58ee89446898c307fde5ee46c812330f038e405ee1f6941895a1e2c22
+EBUILD ibm-powerpc-utils-1.2.12.ebuild 613 SHA256 2ab643e59ba1cca0b4241224ba10c32a77e5ad658f21c366236ab2acb75945ca SHA512 928fe6336133171c8b93c280ea5b41c62a799768762059fff70ecd0da5b098abedb7fe1b8b40516d18f99013c847757ea4179e521c702835126c37a884d715f0 WHIRLPOOL e1dcb25ef7293d2cc18fa597c63d3396c70213a345c6a10f4e01e71932a335355487efb33df639d7fe07a5b6b4b1e5ba702f1c338bf4b136a743b09181cda8b2
+EBUILD ibm-powerpc-utils-1.2.2.ebuild 680 SHA256 7ebf9d91aa8211a693d1ff5371d50e8bea4ec41b3449e2d54f63fa186fbfd649 SHA512 a4dbda84de5309036305b517f93609ae3e44864bd2583ad125e082409264b66dcc4fbb929452bf8d56f98534726fa963a3f91dbcc87fb66bcefc162aad5e89bc WHIRLPOOL 606cb808af22f4480fcd7cfbb5adc129abb623d7d971682909e4254da5f6fef4824909469b2dc468b10e5f06ce06ad76e8629985a8ed5f90aa10a538e5182ae5
+EBUILD ibm-powerpc-utils-1.2.25.ebuild 584 SHA256 503811c0b3d4044393556a37c39e5ec13e3f5a68a147a97c0c3bb5c7beff6c94 SHA512 91e0ecf3940ccc2cec13848e9273859825f9923b4d5a9d2b7173b24371d4c8b84e7800c4d1fab194f841f4df8403264592075f9c082156d7ea191439c7ff0ce6 WHIRLPOOL dfaf1b194671d92455640ca1224265fff5dbb9f86df61679bb5318e99b0843ed77467cce2fb8d194c6a2ce972a0120756f2f4db09a5ed761dd600cac6ac30662
+EBUILD ibm-powerpc-utils-1.2.26.ebuild 584 SHA256 503811c0b3d4044393556a37c39e5ec13e3f5a68a147a97c0c3bb5c7beff6c94 SHA512 91e0ecf3940ccc2cec13848e9273859825f9923b4d5a9d2b7173b24371d4c8b84e7800c4d1fab194f841f4df8403264592075f9c082156d7ea191439c7ff0ce6 WHIRLPOOL dfaf1b194671d92455640ca1224265fff5dbb9f86df61679bb5318e99b0843ed77467cce2fb8d194c6a2ce972a0120756f2f4db09a5ed761dd600cac6ac30662
+MISC ChangeLog 3031 SHA256 071621c55dfc066ce1c150f691c171760876979efb1e0cedeb321ccddf9fbdab SHA512 c8f87d2d5c4b8f716337255f6027cea30869be324f344976d2bbaa3d3c3c80c921548660ed1d07b97c7831344787a986d0469d8ea97b2c2bc641720cdd52b795 WHIRLPOOL 51c9386db3bb387f9ecdbb3075735a60627896400d2203c1fe9f5921a054a6e956840f9c31ddbdc287c9643ce55372705c5a27d04f168fcba49c65ee12ab426d
+MISC ChangeLog-2015 4504 SHA256 000d3078cae397192813439512f8008d1424f6c21d8b9c8fd7bff083afcfe151 SHA512 2efdaacb9396f4b5ea880d33d353de21043506afe347f0e31490ae21986635ba80b3cc215af01e73957a834abb9d14b466108c086471bfe417e9c3a85a2feb8b WHIRLPOOL 0f95f461db2f126c5362b482b36ba2cb04d5b66c881ea318eedafbee343c8c92fab39b00a52e06ea89a924d5afdc852b109d603732ae4d06fefafcd6cd42ffec
+MISC metadata.xml 445 SHA256 70a1357aac1958ec5e665eb4aa6a5d38f1f2a7d5d480e4b835d09e47306c61c6 SHA512 8b125cee61a590d597b86ad8cb744725c8fff2cb2e5606ca9db69492dec4ff8ae4b1aa37b438e332ccea15be76834890ca835d6d18a652b043c30158e20302e3 WHIRLPOOL beef3d2961af254d2f0f938325e8277e1dcdbeaf5eeb87ae3d6ce915281592ad6f3e1da07a054dff5994faa8d4e6b14a57dd633d997e0b0417b46f9d2d285ab0
diff --git a/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.1.0-remove-doc.patch b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.1.0-remove-doc.patch
new file mode 100644
index 000000000000..826c6243b9ad
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.1.0-remove-doc.patch
@@ -0,0 +1,23 @@
+--- a/Makefile
++++ b/Makefile
+@@ -12,19 +12,12 @@
+ TARBALL_FILES += $(FILES) Changelog
+
+ all:
+- @echo "Building cmds files..."
+- @$(MAKE) -C cmds
+- @echo "Building scripts files..."
+- @$(MAKE) -C scripts
+- @echo "Building doc files..."
+- @$(MAKE) -C doc
++ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d;)
+
+ install: all
+- @$(call install_doc,$(FILES),$(DESTDIR))
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d install;)
+
+ uninstall:
+- @$(call uninstall_doc,$(FILES),$(DESTDIR))
+ @$(foreach d,$(SUBDIRS), $(MAKE) -C $d uninstall;)
+
+ rpm: all
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.1.0.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.1.0.ebuild
new file mode 100644
index 000000000000..38e19fa7ece0
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.1.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="powerpc-utils-${PV}"
+
+DESCRIPTION="This package provides utilities for the maintainance
+of the IBM and Apple powerpc platforms."
+SRC_URI="http://powerpc-utils.ozlabs.org/releases/${MY_P}.tar.gz"
+HOMEPAGE="http://powerpc-utils.ozlabs.org/"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="ppc ppc64"
+IUSE=""
+DEPEND=">=sys-libs/librtas-1.3.1
+sys-devel/bc"
+RDEPEND="!sys-apps/ppc64-utils"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/ibm-powerpc-utils-1.1.0-remove-doc.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Something went wrong"
+# dodoc README COPYRIGHT
+
+}
+
+pkg_postinst() {
+ einfo "If you are running IBM hardware, consider emerging "
+ einfo "sys-apps/ibm-powerpc-utils-papr for additional functions. "
+}
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.12.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.12.ebuild
new file mode 100644
index 000000000000..eef037503475
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.12.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="powerpc-utils-${PV}"
+
+DESCRIPTION="This package provides utilities for the maintainance
+of the IBM and Apple powerpc platforms."
+HOMEPAGE="https://sourceforge.net/projects/powerpc-utils"
+SRC_URI="mirror://sourceforge/powerpc-utils/${MY_P}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="ppc ppc64"
+IUSE=""
+DEPEND=">=sys-libs/librtas-1.3.5
+ sys-devel/bc"
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Something went wrong"
+
+}
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.2.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.2.ebuild
new file mode 100644
index 000000000000..ada8ea7882f5
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="powerpc-utils-${PV}"
+
+DESCRIPTION="This package provides utilities for the maintainance
+of the IBM and Apple powerpc platforms."
+HOMEPAGE="https://sourceforge.net/projects/powerpc-utils"
+SRC_URI="mirror://sourceforge/powerpc-utils/${MY_P}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="ppc ppc64"
+IUSE=""
+DEPEND=">=sys-libs/librtas-1.3.1
+ sys-devel/bc
+ !sys-apps/ibm-powerpc-utils-papr"
+RDEPEND="!sys-apps/ppc64-utils"
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Something went wrong"
+
+}
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.25.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.25.ebuild
new file mode 100644
index 000000000000..fe6807f61ca9
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.25.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="This package provides utilities for the maintainance
+of the IBM and Apple powerpc platforms."
+HOMEPAGE="https://sourceforge.net/projects/powerpc-utils"
+SRC_URI="mirror://sourceforge/powerpc-utils/${P//ibm-}.tar.gz"
+IUSE="+rtas"
+
+S="${WORKDIR}/${P//ibm-}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+
+DEPEND="
+ sys-devel/bc
+"
+RDEPEND="
+ rtas? ( >=sys-libs/librtas-1.3.5 )
+ ${DEPEND}
+"
+
+src_configure() {
+ econf $(use_with rtas librtas)
+}
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.26.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.26.ebuild
new file mode 100644
index 000000000000..fe6807f61ca9
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.2.26.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="This package provides utilities for the maintainance
+of the IBM and Apple powerpc platforms."
+HOMEPAGE="https://sourceforge.net/projects/powerpc-utils"
+SRC_URI="mirror://sourceforge/powerpc-utils/${P//ibm-}.tar.gz"
+IUSE="+rtas"
+
+S="${WORKDIR}/${P//ibm-}"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+
+DEPEND="
+ sys-devel/bc
+"
+RDEPEND="
+ rtas? ( >=sys-libs/librtas-1.3.5 )
+ ${DEPEND}
+"
+
+src_configure() {
+ econf $(use_with rtas librtas)
+}
diff --git a/sys-apps/ibm-powerpc-utils/metadata.xml b/sys-apps/ibm-powerpc-utils/metadata.xml
new file mode 100644
index 000000000000..fac826b0b031
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/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 type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+ </maintainer>
+ <use>
+ <flag name="rtas">Add support for the Run Time Abstraction Services (RTAS)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">powerpc-utils</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/idle3-tools/Manifest b/sys-apps/idle3-tools/Manifest
new file mode 100644
index 000000000000..15c1e216287b
--- /dev/null
+++ b/sys-apps/idle3-tools/Manifest
@@ -0,0 +1,5 @@
+DIST idle3-tools-0.9.1.tgz 21201 SHA256 9778060c7873ad2c9c40db3a7049d8ca22535427b982ff12f5bd519f703f2a02 SHA512 512991fad786684bd127f7ad3af94dcea4e28cd88d52221007436172725b8d2c0c2edd578c4c95bbcd425339ed664b9d81adbabbc2bb8a4a3ea71500e21db01e WHIRLPOOL 7261ff14b374dc23d0e829ed90199b1dffee8fb76a9f547810de7af66c70d1c01ae9266fecf2bfbcc6dc66e37c5726e52fe83a20ec99bac85d2af3f870c8323f
+EBUILD idle3-tools-0.9.1.ebuild 505 SHA256 bd6ddaeed75b194faa787e383057c077035348cd7c5d94cccb13ad80d6ee5a21 SHA512 5b8f7e29be4e28dafee521bab426888f47db49d4d9f03ba69854a66ad041f4ca7f20b054fbb1f65bb6c0c5808be091fac69e466da3a39bfed07fc0a7530f2dcb WHIRLPOOL 82bfe7e430b69b5273a9a29ad5f32400ac43e774fe0fd4d345cad418a99b7133b0087b98b9520d6eabf80af20bb205925e47fe87b1e57e52a2ac8b8267d0eb38
+MISC ChangeLog 2534 SHA256 8a24360153e58b4816196af4b73121a0c624815d3381ef674ef3c22702df2ffa SHA512 9d4a00a27b6e40e9bf8a87686a7ddbf7a559a58b17955c5f7590d415e49b15d6450972b8057ee561520edba68b86ad6a6a805772396a2f5f30ed2f0642ee14d0 WHIRLPOOL 4e88cb95ccf1af1dc86f0896939152275c007de601a205fc8e1dc99b5d4caa25c938ee8a80d75a54501f13dec6697919a8650d4915ee49032aaf39f84c475ef5
+MISC ChangeLog-2015 444 SHA256 12a0e69a578b7cedc55e7e8beb1a9538b01e0539ddb36d43ee321f351c8085a9 SHA512 77bea46adb6ee94f35143927d280cd302ff6ccd5024f95e75305917b0b95efdd24427442314583687b0053896c22ac6edcda9864a7289b646a0e9392ad50f5eb WHIRLPOOL d8fc1c37ba8d9ea798227e22976287a7f8949b8dde03adb4ce45d90f7713b66998c088099e82d9a8f4e10804d517eb8b391709f1d2d08a393231d94a86ec0742
+MISC metadata.xml 700 SHA256 a22f86d1843c7c8449f552694a14a280579598f95f979de8804c0a67a99d5838 SHA512 bff2faaf83b67967d8b52eb9a3694ec78c707985f5a565588992248949e23a34de3d0c27ff52e17c832977047e38487eba737a8885775809cdf86bde580eb8c1 WHIRLPOOL c7b14d7548b20c456cd8e3afdf0363d4817a1c675aeb1df3d67439f6801c2ac7e121b663e2882089a08349502833d9c557469b1d25de06fbeb574a0568d4ba86
diff --git a/sys-apps/idle3-tools/idle3-tools-0.9.1.ebuild b/sys-apps/idle3-tools/idle3-tools-0.9.1.ebuild
new file mode 100644
index 000000000000..d00992cea605
--- /dev/null
+++ b/sys-apps/idle3-tools/idle3-tools-0.9.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Read, Set or disable the idle3 timer of Western Digital drives"
+HOMEPAGE="http://idle3-tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="-Wall ${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
+}
diff --git a/sys-apps/idle3-tools/metadata.xml b/sys-apps/idle3-tools/metadata.xml
new file mode 100644
index 000000000000..2690edae260a
--- /dev/null
+++ b/sys-apps/idle3-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>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Idle3-tools provides a linux/unix utility that can disable, get and set the value
+ of the infamous idle3 timer found on recent Western Digital Hard Disk Drives. It
+ can be used as an alternative to the official wdidle3.exe proprietary utility,
+ without the need to reboot in a DOS environement. A power off/on cycle of the
+ drive will still be mandatory for new settings to be taken into account.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">idle3-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/ifd-gempc/Manifest b/sys-apps/ifd-gempc/Manifest
new file mode 100644
index 000000000000..35ab94b287e0
--- /dev/null
+++ b/sys-apps/ifd-gempc/Manifest
@@ -0,0 +1,6 @@
+AUX reader.conf 246 SHA256 e5c27f84c490f45f3c3fbaaffebe502bc8499795905888345a83d75f70218aee SHA512 57ae0939bb88fa67224583fcce555eeb4d088c5c0667a4ddd02323a45554f391a1d9b6d5a124b7e3e9dc933806b0067deb7f159611a9df89e922d8a3f23e737c WHIRLPOOL 5911a64409250f033c59173f8b04e6f896ffc6c84d4c741b081e62c20c41a39dca16af3ae68be4a2c1d74364fb26a8815aa2a90d11adc2e7287a8c40266c9a87
+DIST ifd-gempc-1.0.7.tar.gz 76712 SHA256 604e4bb8cc015dcc4099f0317d11ac2ae3550648966844243a296652c8639028 SHA512 dde143bd2ca46cca91f979ddbb300f0b5fea37ecfa0c67058d887fcd56edf58adecce85dd05c7af25329fdfcfdf5bf7a52d4dc24061231a234180aad3df44a93 WHIRLPOOL 4dd8572457b910a2c25bb1d132cd1d2716984a339715584ec7bed982c84eb9fea81f0a0b8e944ef252a88bcd31a72a71f4eaa214b2536c3f09de75f0e428c5ff
+EBUILD ifd-gempc-1.0.7.ebuild 1528 SHA256 e642c5f408e1ce351c7c4e7624469ca038173bdc7d8dad796f1c5382a36d7762 SHA512 881e2623c3d5129ed0a8048258b7189a74a01164d5ba12f69ccf675f3d011aa97fda65b4071613d32de96a722a796df11b78b1cb790c31781d057a77e4b57bb9 WHIRLPOOL 4095b7db35698000502bbb064f23dea546df19ae2d6acbfc911486257f4aa2f997544b35af86d287fba38057c247e47f929b25f3039b4ba5916cb58d7fd7f425
+MISC ChangeLog 2609 SHA256 56c06f4132c07c664b63462b8d41f222571da72cf481e60f48d25f165525c276 SHA512 335a35b4f5c6be06639cf460888b77713f2d731c2b3e43b4a3f8e6f33280b6149b5132764b96d7c5d34d8dd90bc5be24132102dcb749d85156c50017725946ab WHIRLPOOL 62b3678306c878d97c2189d089d8763f00318bf65542ff0d86285a0ffd236a5d329b798daf2081be984b82e3cfb21fb1a1c7f391d7e28541bb1e415e9f0ccfbf
+MISC ChangeLog-2015 3473 SHA256 7c4c30be4f20087883fb729e5bb7a0360087fb4cc488f49f63eaa5b3a5034190 SHA512 92306db2a98fc58d4e4cd573cad6c4387573a1972f5684faa0b5157fb12923c07c0f3dee85c9e77fe356478e26b10ec014db0dd0751395ace4e8d563fe5b4612 WHIRLPOOL 309a975234e447987e1f30189dc07bab86bea10c7db32e4cbc2cce546f8a1482ab39b80fe4c192eccbf2986cb9baf4058e8045520354c98b64a622a32fa8facb
+MISC metadata.xml 392 SHA256 76054a53bcd75674c46005025c1443a44d7dfa01bbdbed6992b29c05e2c64a18 SHA512 e89ab58445d44633b06222f0518dee3fa80687fedb2f31df3aa86ab2e157e2ff3afad0ba5e37f2867ba738ae12dec403f76adc908e0a008b3fd1b32217724b6f WHIRLPOOL e5928ee2531ac1491264ffc6234d67939408f9d452b25536ff2825c40c426749b82d59ee61ec082d6c66e9444a3d51f53c1ee1c7a397ed648e58709b6568c190
diff --git a/sys-apps/ifd-gempc/files/reader.conf b/sys-apps/ifd-gempc/files/reader.conf
new file mode 100644
index 000000000000..74de4a1a60ca
--- /dev/null
+++ b/sys-apps/ifd-gempc/files/reader.conf
@@ -0,0 +1,11 @@
+# Configuration file for pcsc-lite
+#
+
+# GemPC410 reader
+FRIENDLYNAME "GemPC410"
+# Update the following to the right COM port
+DEVICENAME /dev/null
+LIBPATH %PCSC_DRIVERS_DIR%/serial/%libGemPC410%
+CHANNELID 1
+
+# End of file
diff --git a/sys-apps/ifd-gempc/ifd-gempc-1.0.7.ebuild b/sys-apps/ifd-gempc/ifd-gempc-1.0.7.ebuild
new file mode 100644
index 000000000000..7f79a7f93797
--- /dev/null
+++ b/sys-apps/ifd-gempc/ifd-gempc-1.0.7.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="GemCore based PC/SC reader drivers for pcsc-lite"
+HOMEPAGE="http://ludovic.rousseau.free.fr/softwares/ifd-GemPC"
+LICENSE="GPL-2 BSD"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+SRC_URI="http://ludovic.rousseau.free.fr/softwares/ifd-GemPC/${P}.tar.gz"
+IUSE=""
+RDEPEND=">=sys-apps/pcsc-lite-1.2.9_beta7
+ virtual/libusb:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(
+ README README.410 README.430
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ emake CC="$(tc-getCC)" DESTDIR="${D}" install
+ einstalldocs
+
+ local pcscdir="$(pkg-config --variable=usbdropdir libpcsclite)"
+ local conf="/etc/reader.conf.d/${PN}.conf"
+ dodir "$(dirname "${conf}")"
+ insinto "$(dirname "${conf}")"
+ newins "${FILESDIR}/reader.conf" "$(basename "${conf}")"
+ sed -e "s:%PCSC_DRIVERS_DIR%:${pcscdir}:g" -e "s:%libGemPC410%:libGemPC410.so.${PV}:g" -i "${D}${conf}"
+}
+
+pkg_postinst() {
+ elog "NOTICE:"
+ elog "1. If you are using GemPC410, modify ${conf}"
+ elog "2. Run update-reader.conf, yes this is a command..."
+ elog "3. Restart pcscd"
+}
+
+pkg_postrm() {
+ #
+ # Without this, pcscd will not start next time.
+ #
+ local conf="/etc/reader.conf.d/${PN}.conf"
+ if ! [[ -f "${conf}" && -f "$(grep LIBPATH "${conf}" | sed 's/LIBPATH *//' | sed 's/ *$//g' | head -n 1)" ]]; then
+ [[ -f "${conf}" ]] && rm "${conf}"
+ update-reader.conf
+ elog "NOTICE:"
+ elog "You need to restart pcscd"
+ fi
+}
diff --git a/sys-apps/ifd-gempc/metadata.xml b/sys-apps/ifd-gempc/metadata.xml
new file mode 100644
index 000000000000..9a6a5c1396ac
--- /dev/null
+++ b/sys-apps/ifd-gempc/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 type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+<longdescription>
+ This library provides PC/SC IFD handler implementation for Gemplus GemCore based
+ serial and USB smart cards readers.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ifplugd/Manifest b/sys-apps/ifplugd/Manifest
new file mode 100644
index 000000000000..30d4eaaaaa5d
--- /dev/null
+++ b/sys-apps/ifplugd/Manifest
@@ -0,0 +1,12 @@
+AUX ifplugd-0.28-interface.patch 270 SHA256 d441152398c990f57d75bf1af7f1fac811bfccc96918687e3cf7c1ae9c43ad14 SHA512 0b7ed905b3e3b6a10c4101e42caabbc3d875e22b55268a56eda4dff61db72a03ea444490d01d9ca89d699ef30a091717b0c8bc66079dce193f45990c86b489fb WHIRLPOOL f87701211537cea1c3d65fac0fab3591613f1c74c9e0278667d15ca995542c9df088769124050a0bcf5413d26f999d1bb0c5a35f22e03e95fa59d12e173d9e54
+AUX ifplugd-0.28-musl.patch 422 SHA256 f48c563128c4285a84fd22dde112da30230a07169dc6119a0092c66daa2a8630 SHA512 a73baf8022c25fc01adf4bdc0840abf35f8de7846ff3f44f7793b5c9bf7a5940ff1f789fdf522ddc3d3a14ecb56c178ab652a6a92e76ecae1a38af3e7e0121f7 WHIRLPOOL cd9e63e689222329025e418eedd98147fae1aae3977fc386200d1a0cf656ea9f04277f99475eb6cb7072d51b6ac6ba13df85cc5ef7da0807981e68f369a01bfd
+AUX ifplugd-0.28-nlapi.diff 571 SHA256 2ac2db9078a5251281ecf30ab8f3cf0d575bbf177d830ef854981f9b88525d8d SHA512 70e67e9abaaa360fed7ce2b195a5226a090245f06c6d8ebe4efadc71eb376a57fd64da1be1bfa483c92e538a5ef85a4756de9f1c8ef4075a7a6cc163766dca2d WHIRLPOOL a0d4cd0cf3ff9c0781b1a2b631c35325590971868626eba9ed3ca0cdfd5852d95d99fbc5143f3d1b16fa78eb3c2d5b2af4fa52aa2e326daedb0dda17cc6fd6f0
+AUX ifplugd-0.28-noip.patch 707 SHA256 b072728dea9ab0945d257ce28262514282227394aaee9772204c903d2b21a6ee SHA512 229e6ea2831276f4825172ea72be4480df1999cb237512d38fd34b73fe19afd3441df98c3a07e9a83cedaebd5915f7e074d9eb330b22a86bcf2e2a771da834b4 WHIRLPOOL d63fc16f25fe85bfc5c55092da3f75951996f1d1e4607ed38290594efe673bd51d2aa1eef35bc157e27c16306a99ec9250ce335cc6bac2bbec7fcd18efee6d58
+AUX ifplugd-0.28-strictalias.patch 1585 SHA256 88f3824a20c2111ccd8654bacdbfa45b2b3b1ce159d78867f25334cb8a44a523 SHA512 c25d397b27b115741eb531ee6a990ced98e48cb9c0ea6d098104a4d1972bf1d9c2ff805c2522ea90a4af7d70d016af05b757750c1a06b010979d76d845707f29 WHIRLPOOL 7df22fa2787b87997b449020719a33dc2ec77f572ebe27796493e25c6f26cc90865c6c138b52249c29514a3611afb728f7373ffee9cc00ac014240e9e4552fee
+AUX ifplugd.action 891 SHA256 55c88d2c773bc242e81f9fe310cd48999e69543fa8e0b2389c054e8890260015 SHA512 749f503a8e7acc3114af0b795d23e03108040b8df12bae475aa96127d0b135c30382cec6abd0a03147d1f69b545a2c5d2bd8a18c9a9ebe0613e8888ae305f949 WHIRLPOOL ec29178d73f78104e769232f9092065cc9df0de4312f0fc3519d1e3066832e4e5eed0b1adc432d1309d33752428f2373ad35f1552f6b9f158aaf1f94a6b0b3b1
+DIST ifplugd-0.28.tar.gz 142677 SHA256 474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0 SHA512 c606e456f81f224eba9f8912e11fb76b759c160313d1db3c9035775b8c1ca57ca10c88dfb33318ba02f5c025218a377ca78ee160fc3d9a31ac6e95b92f340d4f WHIRLPOOL c8cb4a2518b4a97974da412f7f975a9abe54374967630f38781b00ce1f1f887a4485dd6efd775f1aee259a2b877bf5570bca72b5acf036a93c0de33a123c5c00
+EBUILD ifplugd-0.28-r10.ebuild 1198 SHA256 3cc49eba825cee6985bedac8b55b85916bc04cedfe32b468202d25267055c94b SHA512 8c3230a32ddd9914fe3ac95c3be8f8f204ab2c5017024649ce7ce19ec79e9195904dd5b3bf1891f423ec600232816a193de97bf155f9df90863fc1ae950ab4e1 WHIRLPOOL ab8e299fa7b9d710a03e47c73e1e0d1b32fb889da8216cf7c779bd141a802d15e35a613e5d29b9784bbd364dd3fb80abd7978b737a804c7ce23dfbb1cac5a7ad
+EBUILD ifplugd-0.28-r9.ebuild 1824 SHA256 937902465d60faff36fbbeb96234efd7ebf0602c1e7075d315a3a0333b24cf55 SHA512 9a66b4e3eaa56709806faedc895fb2b765c7762c54458c02188d616011ac396557bdad91b55275d6bde567d95f1ff429266737ade9b2ba1ed8acfb7d5f0e7144 WHIRLPOOL 16a1422452493f95b331475acea8aa2efdd2b34ee49cd4f86f922a17c1a19395ebea37cd84733ca74c113b8f722acb8591abd8a9602bccf952afa2a1a2aafd24
+MISC ChangeLog 3682 SHA256 bdc7a2ade655e990c4fef6c3c8301a79c0182ba46e6b9cfc3de8a927a345fb79 SHA512 c9258d59b2cf9328614ea0ac8cce6747ebfbef0a9137907e3281a70e396302a86c9a4b68907e3daf92f2833613f5806c69e9033ea7bef8e885ccd2e081df6f73 WHIRLPOOL d4f01059ba68c147a65e3b441d58b5854bf57ca5148b3cfe9dd18bcd741471ea0e4e5008bf794216ef6b7eb5b015cb1b7fa2d8e2fd3972cd8fd5abb2583e4db9
+MISC ChangeLog-2015 9282 SHA256 8eadd6160cc4c8a71c6d68a664dd0c85bd64ff7676c32efb09f83910bd43d179 SHA512 95de45995041d9151500fc37c485fb82ade2f6a7c037fbdb6fa8d5b6713dcbf6e1ea67db1c6f5816001ccfdb38a724aef7a322fe00784b03d71f962a507e6c3a WHIRLPOOL 33816a5280cd6372a85fb165e0c7cb0a48b07e6dc41d04ff7a6623e849280bd5a2e83f828243ceb619775700abaa1cd55f5fe65a196f33149cf3227255422ebc
+MISC metadata.xml 366 SHA256 2e209cb608c3407538124f734d845956dfa1affc257f6a32c86751b3566743e0 SHA512 2c4b526e804b08e6e971e0413b60c0b0684104d2cd2ac810495a6c6b9ec6a2d8ad846beb929b45639f77a707b08edaabb525af8b9ebfab411ad02214ac4bd60f WHIRLPOOL 0b4a67a8a7dc014e12c7195b871638d400031ed4f6b850506456ca80ebbd69428bd0cc9d6d79748d55a55cdc01402648f5748ec6b324ae269a9ee2e6afa69b3f
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch b/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch
new file mode 100644
index 000000000000..f99f3a26aed7
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch
@@ -0,0 +1,13 @@
+--- a/src/interface.c
++++ b/src/interface.c
+@@ -22,9 +22,9 @@
+ #include <config.h>
+ #endif
+
++#include <sys/types.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/if.h>
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-musl.patch b/sys-apps/ifplugd/files/ifplugd-0.28-musl.patch
new file mode 100644
index 000000000000..ecaaabfe266e
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-musl.patch
@@ -0,0 +1,19 @@
+--- a/src/ethtool-local.h
++++ b/src/ethtool-local.h
+@@ -21,10 +21,12 @@
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+-typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
++#include <stdint.h>
++
++typedef uint64_t u64;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
+
+ #include "ethtool-kernel.h"
+
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff b/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff
new file mode 100644
index 000000000000..a3d128f20ff4
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff
@@ -0,0 +1,12 @@
+diff -urN src/nlapi.c src/nlapi.c
+--- a/src/nlapi.c
++++ b/src/nlapi.c
+@@ -86,7 +86,7 @@
+ for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
+ struct callback_info *c;
+
+- if (!NLMSG_OK(p, bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < p->nlmsg_len) {
++ if (!NLMSG_OK(p, (size_t) bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < (size_t) p->nlmsg_len) {
+ daemon_log(LOG_ERR, "NLAPI: Packet too small or truncated!\n");
+ return -1;
+ }
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch b/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch
new file mode 100644
index 000000000000..5daa4534eb49
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch
@@ -0,0 +1,21 @@
+[PATCH] Allow ifplugd to run when no TCP/IP is available
+
+This simple patch create AF_LOCAL socket instead of AF_INET so if TCP/IP
+is not linked into kernel it still works.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+
+---
+
+diff -urNp ifplugd-0.28.org/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28.org/src/ifplugd.c 2005-06-04 22:21:51.000000000 +0300
++++ ifplugd-0.28/src/ifplugd.c 2007-10-30 05:22:53.000000000 +0200
+@@ -409,7 +409,7 @@ void work(void) {
+ break;
+ }
+
+- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
++ if ((fd = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
+ daemon_log(LOG_ERR, "socket(): %s", strerror(errno));
+ goto finish;
+ }
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch
new file mode 100644
index 000000000000..ae8292dc17ac
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch
@@ -0,0 +1,63 @@
+--- a/src/interface.c
++++ b/src/interface.c
+@@ -89,6 +89,10 @@
+
+ interface_status_t interface_detect_beat_mii(int fd, char *iface) {
+ struct ifreq ifr;
++ union {
++ caddr_t *data;
++ unsigned short *usz;
++ } ifd;
+
+ if (interface_auto_up)
+ interface_up(fd, iface);
+@@ -103,7 +107,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- ((unsigned short*) &ifr.ifr_data)[1] = 1;
++ ifd.data = &ifr.ifr_data;
++ *++ifd.usz = 1;
+
+ if (ioctl(fd, SIOCGMIIREG, &ifr) == -1) {
+ if (interface_do_message)
+@@ -112,12 +117,17 @@
+ return IFSTATUS_ERR;
+ }
+
+- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
++ ifd.usz += 2;
++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
+ }
+
+ interface_status_t interface_detect_beat_priv(int fd, char *iface) {
+ struct ifreq ifr;
+-
++ union {
++ caddr_t *data;
++ unsigned short *usz;
++ } ifd;
++
+ if (interface_auto_up)
+ interface_up(fd, iface);
+
+@@ -131,7 +141,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- ((unsigned short*) &ifr.ifr_data)[1] = 1;
++ ifd.data = &ifr.ifr_data;
++ *++ifd.usz = 1;
+
+ if (ioctl(fd, SIOCDEVPRIVATE+1, &ifr) == -1) {
+ if (interface_do_message)
+@@ -140,7 +151,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
++ ifd.usz += 2;
++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
+ }
+
+ interface_status_t interface_detect_beat_ethtool(int fd, char *iface) {
diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action
new file mode 100644
index 000000000000..ba4cfd7d20b9
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd.action
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Gentoo-specific ifplugd.action
+#
+# This file gets called by ifplugd when it wants to bring an interface
+# up or down.
+#
+
+if grep -q initng /proc/1/cmdline
+then
+ EXEC="/sbin/ngc"
+ INITNG="yes"
+else
+ EXEC="/etc/init.d/net.$1"
+ INITNG="no"
+fi
+
+case "$2" in
+ up)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-u net/$1"
+ else
+ ARGS="--quiet start"
+ fi
+ ;;
+ down)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-d net/$1"
+ else
+ ARGS="--quiet stop"
+ fi
+ ;;
+ *)
+ echo "$0: wrong arguments" >&2
+ echo "Call with <interface> <up|down>" >&2
+ exit 1
+ ;;
+esac
+
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+ ${EXEC} ${ARGS}
+ exit 0
+else
+ logger -t ifplugd.action "Error: Couldn't configure $1, no ${EXEC} !"
+ exit 1
+fi
+
+# vim: set ts=4
diff --git a/sys-apps/ifplugd/ifplugd-0.28-r10.ebuild b/sys-apps/ifplugd/ifplugd-0.28-r10.ebuild
new file mode 100644
index 000000000000..9f7114191a90
--- /dev/null
+++ b/sys-apps/ifplugd/ifplugd-0.28-r10.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
+SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ppc x86"
+IUSE="doc selinux"
+
+DEPEND="virtual/pkgconfig
+ doc? ( www-client/lynx )
+ >=dev-libs/libdaemon-0.5"
+RDEPEND=">=dev-libs/libdaemon-0.5
+ >=sys-apps/baselayout-1.12
+ selinux? ( sec-policy/selinux-ifplugd )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-nlapi.diff"
+ "${FILESDIR}/${P}-interface.patch"
+ "${FILESDIR}/${P}-strictalias.patch"
+ "${FILESDIR}/${P}-noip.patch"
+ "${FILESDIR}/${P}-musl.patch"
+ )
+DOCS=( doc/README doc/SUPPORTED_DRIVERS )
+HTML_DOCS=( doc/README.html doc/style.css )
+
+src_configure() {
+ econf \
+ $(use_enable doc lynx) \
+ --with-initdir=/etc/init.d \
+ --disable-xmltoman \
+ --disable-subversion
+}
+
+src_install() {
+ default
+
+ # Remove init.d configuration as we no longer use it
+ rm -rf "${ED}/etc/ifplugd" "${ED}/etc/init.d/${PN}" || die
+
+ exeinto "/etc/${PN}"
+ newexe "${FILESDIR}/${PN}.action" "${PN}.action"
+}
diff --git a/sys-apps/ifplugd/ifplugd-0.28-r9.ebuild b/sys-apps/ifplugd/ifplugd-0.28-r9.ebuild
new file mode 100644
index 000000000000..a3a9bd0112fc
--- /dev/null
+++ b/sys-apps/ifplugd/ifplugd-0.28-r9.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
+SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~arm amd64 hppa ppc x86"
+IUSE="doc selinux"
+
+DEPEND="virtual/pkgconfig
+ doc? ( www-client/lynx )
+ >=dev-libs/libdaemon-0.5"
+RDEPEND=">=dev-libs/libdaemon-0.5
+ >=sys-apps/baselayout-1.12
+ selinux? ( sec-policy/selinux-ifplugd )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-nlapi.diff"
+ epatch "${FILESDIR}/${P}-interface.patch"
+ epatch "${FILESDIR}/${P}-strictalias.patch"
+ epatch "${FILESDIR}/${P}-noip.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable doc lynx) \
+ --with-initdir=/etc/init.d \
+ --disable-xmltoman \
+ --disable-subversion
+}
+
+src_install() {
+ default
+
+ # Remove init.d configuration as we no longer use it
+ rm -rf "${D}/etc/ifplugd" "${D}/etc/init.d/${PN}"
+
+ exeinto "/etc/${PN}"
+ newexe "${FILESDIR}/${PN}.action" "${PN}.action"
+
+ cd "${S}/doc"
+ dodoc README SUPPORTED_DRIVERS
+ use doc && dohtml *.html *.css
+}
+
+pkg_postinst() {
+ # Warn about old init script
+ einfo "baselayout now starts ifplugd automatically on wired interfaces"
+ einfo "If you do not want this behaviour then add !plug to your modules"
+ einfo "in /etc/conf.d/net like so"
+ einfo " modules=( \"!plug\" )"
+
+ if [ -e "${ROOT}/etc/init.d/ifplugd" -o -e "${ROOT}/etc/conf.d/ifplugd" ] ; then
+ echo
+ ewarn "You should stop the ifplugd service now and remove its init"
+ ewarn "script and config file"
+ if [ "${ROOT}" = "/" ] ; then
+ ewarn " /etc/init.d/ifplugd stop"
+ ewarn " rc-update del ifplugd"
+ ewarn " rm -f /etc/{conf,init}.d/ifplugd"
+ fi
+ fi
+}
diff --git a/sys-apps/ifplugd/metadata.xml b/sys-apps/ifplugd/metadata.xml
new file mode 100644
index 000000000000..bb67101bd413
--- /dev/null
+++ b/sys-apps/ifplugd/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+ Brings up/down ethernet ports automatically with cable detection
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/input-utils/Manifest b/sys-apps/input-utils/Manifest
new file mode 100644
index 000000000000..a33d04be03af
--- /dev/null
+++ b/sys-apps/input-utils/Manifest
@@ -0,0 +1,7 @@
+DIST input-1.2.tar.gz 22809 SHA256 7934244f34d5cd5d31a67d14892d4c0d8260dc0f622e01cf21bc1eddf4b98b56 SHA512 75a5e2d5b778ae93fb2d29ed7c8b0ec564233a385d88d0fe3a9e5ecd55259f14014bf269c318b5872ddd1379110565d354a1a043eb0a4693c724d52b6ca12173 WHIRLPOOL 61f4f4ff16ddc2654d302beecbc28352d49bbb53d56538aed4e044706a339da67bf03b9df9b42df8ca84ae7bccd779a783d3250a51927a205380f0a06d546ea4
+DIST input-1.3.tar.gz 23755 SHA256 9142c34d508f2da4cd53d6348fee77e30b69c35c8dabfadfc5a6db09c4bd8087 SHA512 4f864301e6b7d40882327b26780db1d9b7e37215cb558653738f93b74ea2781f64676e41a440fbd2659f14bd30640c7af6c709315cce4dcc6a157d80ac2cb60d WHIRLPOOL a0a531796532720a3e3b3c6c21833df264f59b2a29ebdbf84f24481ea5687b9a7450d03091a751c05a1968ac6621a35861841c8f70ea26f44a2192ef3972b699
+EBUILD input-utils-1.2.ebuild 794 SHA256 cead46b6d69c4beef59a096361f18855758e5de5cf113ced5a4fcad5a5930d68 SHA512 ea3fd6249aeec50c579bcb89c65300eac9f170966f8a71a1eb829e30b89165cc4dc93449565bc32b23f1d331abf693b42e5ef9ed2b6a578b35064851fffb5e9b WHIRLPOOL b923130abe4c572ceb1af94ee05c8bf3529fd9d95f90be3efe2e90d8eb0ca788899feed6edadabd1712e201d37735d7739b4a32f8c157ba53b10503201094c63
+EBUILD input-utils-1.3.ebuild 587 SHA256 70439281cd33363fa69281c75dc1c068982edf2de2ddc805e10fdbd8e84c23aa SHA512 7268198e5bd6951ee315528644898a48c909caa9c2718ce2c5822379abdf90f87a5f27bf07f216c5189d86b2e0fb90405b8d3e64a86e3f86790ed935ef4c36d0 WHIRLPOOL 3f3c3437f404ef22f03f87d9ab488927eaced667fee50253091742334a208e87a54ac2b3de6372e8b7dce9eb25a2ce8800de4e9a0a6d7908bc23964cf4f0bc0c
+MISC ChangeLog 3117 SHA256 6e8ab76080b96749010de128b8d29024e090fa77de3b4f77127b24130c603ef3 SHA512 f9e43c09673ea0183cf5391312567110805a75d047875cd2ea92fd04c8bde67141ed375a52242181a1295ab88e270c8f57c0184e56de7a94ad4caeb473347821 WHIRLPOOL 20bd35cf193a142d1761af71672cb92759973259b3ae0c036063428803b5dc24810193af80ae1d19a859e001df05451b5cfcd1ed79ebfed5c4c425c6218fe986
+MISC ChangeLog-2015 2711 SHA256 d2eb03d2ecc7d31347b97aaba06df408e086e06168622afea19807024e5b4e11 SHA512 20b8048ae48a86b0e27201dd05754d249a0a72f7967d5120afcaa64fe58556ca69f4186531ffd290bf6bd9e2555d6700760dfa5de77f7fe67a7eff5f92764f4e WHIRLPOOL c2edb1559e89d74a2dcbf6bb1d29e5b0400fdd5c0cc51a771da2e8551c3ada474dfd5f6a1a4095233a25f4be3b0a53f9cc7deb98a625abb8821212f482b84f74
+MISC metadata.xml 579 SHA256 be4f44ea4a2a74da35b84661a505826008e5e34e55eb6f02700e8bee11697d27 SHA512 91c9d5676036617c6fe240ae29c7d5ebd904bf048802b50d1a5e783dc656b85d7927f81d2955ae5638fd7e0c9789583a6feaba66bd6db8fadb64c247a26dc3af WHIRLPOOL fc42ddf040f4ada4e0e3569c120d3b3f12f478cc42140720a7448a8fc8a8de027f0b0a8c424494e9903bd184d2d7627f862d6af34d9e0fa8491cc177dcd8c424
diff --git a/sys-apps/input-utils/input-utils-1.2.ebuild b/sys-apps/input-utils/input-utils-1.2.ebuild
new file mode 100644
index 000000000000..5888d0a91c00
--- /dev/null
+++ b/sys-apps/input-utils/input-utils-1.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+MY_PN="input"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Small collection of linux input layer utils"
+HOMEPAGE="https://www.kraxel.org/blog/linux/input/"
+SRC_URI="https://www.kraxel.org/releases/input/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Ported from Debian
+ #epatch "${FILESDIR}"/input-utils-0.0.1_pre20081014.patch
+ # version check stuff
+ #epatch "${FILESDIR}"/input-utils-0.0.1-protocol-mismatch-fix.patch
+ :
+}
+
+src_install() {
+ make install bindir="${D}"/usr/bin mandir="${D}"/usr/share/man STRIP="" || die "make install failed"
+ dodoc lircd.conf
+ dodoc README
+}
diff --git a/sys-apps/input-utils/input-utils-1.3.ebuild b/sys-apps/input-utils/input-utils-1.3.ebuild
new file mode 100644
index 000000000000..93fbcd1b9472
--- /dev/null
+++ b/sys-apps/input-utils/input-utils-1.3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="input"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Small collection of linux input layer utils"
+HOMEPAGE="https://www.kraxel.org/blog/linux/input/"
+SRC_URI="https://www.kraxel.org/releases/input/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ make install bindir="${D}"/usr/bin mandir="${D}"/usr/share/man STRIP="" || die "make install failed"
+ dodoc lircd.conf
+ dodoc README
+}
diff --git a/sys-apps/input-utils/metadata.xml b/sys-apps/input-utils/metadata.xml
new file mode 100644
index 000000000000..39796f7a1929
--- /dev/null
+++ b/sys-apps/input-utils/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 type="person">
+<email>robbat2@gentoo.org</email>
+<name>Robin H. Johnson</name>
+</maintainer>
+<longdescription lang="en">
+This is a collection of utilities which are useful when working with the input
+layer of the Linux kernel (version 2.6 and later). Included are utilities to
+list the input devices known to the kernel, show the input events that are
+received by a device, and query or modify keyboard maps.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/install-xattr/Manifest b/sys-apps/install-xattr/Manifest
new file mode 100644
index 000000000000..0bf0d21e27a1
--- /dev/null
+++ b/sys-apps/install-xattr/Manifest
@@ -0,0 +1,7 @@
+DIST install-xattr-0.5.tar.bz2 16136 SHA256 6062fbcb8f463a54be8c2eedff7bd12ab682972d688784054f4abdad4e050834 SHA512 0bbde3a548fc5062041b38f90ac09c402f3cb0aebf4f0c331552fc44d39dd3d5e4d73bca0811de36c53af8afa5d22e543a7c90107d272f2a1b97c819b244eb7c WHIRLPOOL 1aa3a06b069bb12b3933f2dfc81ff5bce8295c93c64421b898b70440427d5dde05f88ccac3eb7361c372a8656b42df8e24592f60bab7acc758bec9c672c81847
+EBUILD install-xattr-0.5-r1.ebuild 950 SHA256 76017ac5c7f720ae90de34be7c6e3ed4c4462e0e5c50643f2db13567f34e4f0c SHA512 6a17ae3bed8fd7614c8496b0f1b3b7680c6a62e53402839a0ddc9219f49673da7d103088f8abe5235ddc925ae9a400a239520a081547981f7fac64fdfd3ae8ff WHIRLPOOL 3aaca17db94722a6552578d0951e00caf6373025b7ae2af0497547a56cad7c8a22fcd6a759e7dd5909bd24885682fa67db4c9e184bd4881ad128935292fffdce
+EBUILD install-xattr-0.5.ebuild 902 SHA256 55819ecbdbe537e023d88c0d4d9ef5814e0a4694a9d3e589b7887142878fe263 SHA512 91a7981256ff0266e68346f6ec7073701f0780a0614afb9298d2399480137cbf8885a58f77f30a10e693cc93e2cda6acd937675d95bc4fb27aaad94ad670a972 WHIRLPOOL fbfa299e1dd2e6477e0bcf8dfab33ae090fb6465ce8799bbde8de0030a04813f8bf383f70642699959ed76433de08ddae3a92f6679eacdfa118a8a8d3d7b611e
+EBUILD install-xattr-9999.ebuild 950 SHA256 76017ac5c7f720ae90de34be7c6e3ed4c4462e0e5c50643f2db13567f34e4f0c SHA512 6a17ae3bed8fd7614c8496b0f1b3b7680c6a62e53402839a0ddc9219f49673da7d103088f8abe5235ddc925ae9a400a239520a081547981f7fac64fdfd3ae8ff WHIRLPOOL 3aaca17db94722a6552578d0951e00caf6373025b7ae2af0497547a56cad7c8a22fcd6a759e7dd5909bd24885682fa67db4c9e184bd4881ad128935292fffdce
+MISC ChangeLog 4519 SHA256 7c99c5d76a0cd7a4c20e50ce8f5e03a3796578ed92a31f59b62b369d21307e3d SHA512 1673f91639c525626aaa1d1fecb4833bcfd8fc572af7bbce4390519e4ddf29c857da87bf41c3de1d7512db18e5d40515aaa04023f40a40cd62db302ea11574f3 WHIRLPOOL 301047c3f7ae1dcfae22dda1ec25e56eb315f02420e35fceac3d283bb08afcbec445eddec0b3ac78ec7934b1530f6ea32d6152bc5c6bac9fe99fe0896f71a72e
+MISC ChangeLog-2015 5834 SHA256 e45d7b6deb2ebb604e9f2623991f1ed65abd50027f1202b1157689ee040c2eaa SHA512 e1917d963e3aaef57603588b52d7f25655e1a44ef3f7c8318654822d7abb968ea8b38415427c328121ae7504460b38518f26fa5f70d92d1175b25714b0bce121 WHIRLPOOL d88b058db57bc1f0d5da468c8f67a100fae3097a28ab30b8fdccafb28d3e4315354cf5d0593d5539cc34f646ed54031ce59ecdf633a80da7fd122d6046f7df26
+MISC metadata.xml 330 SHA256 72f3486637246a46a7188e21b3a87f65a471d4cf8d37f1e0bdc9a75a015c56bd SHA512 6bca1bac9701b2dde509f25dd18dd819d769cda23669faf680800747a37369002eb3954606fc6541dec324473eb13a78bc0c8a97085436072ee076d85e7a2345 WHIRLPOOL 40c6b51f40a6d8b6b201620dc1dd72b74855f4c1ef63705c1be38e4c06778a2798df9c579a9e59f38355e46d7217dc22c2669d895d676ff707b34a8fde2c8288
diff --git a/sys-apps/install-xattr/install-xattr-0.5-r1.ebuild b/sys-apps/install-xattr/install-xattr-0.5-r1.ebuild
new file mode 100644
index 000000000000..99350e7047f1
--- /dev/null
+++ b/sys-apps/install-xattr/install-xattr-0.5-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Wrapper to coreutil's install to preserve Filesystem Extended Attributes"
+HOMEPAGE="https://dev.gentoo.org/~blueness/install-xattr/"
+
+inherit toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
+ inherit git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~blueness/install-xattr/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ S=${WORKDIR}/${PN}
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+src_prepare() {
+ tc-export CC
+ eapply_user
+}
+
+src_compile() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ default
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ DESTDIR=${ED} emake install
+}
+
+# We need to fix how tests are done
+src_test() {
+ true
+}
diff --git a/sys-apps/install-xattr/install-xattr-0.5.ebuild b/sys-apps/install-xattr/install-xattr-0.5.ebuild
new file mode 100644
index 000000000000..0305dcfe468d
--- /dev/null
+++ b/sys-apps/install-xattr/install-xattr-0.5.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+DESCRIPTION="Wrapper to coreutil's install to preserve Filesystem Extended Attributes"
+HOMEPAGE="https://dev.gentoo.org/~blueness/install-xattr/"
+
+inherit toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
+ inherit git-2
+else
+ SRC_URI="https://dev.gentoo.org/~blueness/install-xattr/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+ S=${WORKDIR}/${PN}
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+src_prepare() {
+ tc-export CC
+}
+
+src_compile() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ default
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ default
+}
+
+# We need to fix how tests are done
+src_test() {
+ true
+}
diff --git a/sys-apps/install-xattr/install-xattr-9999.ebuild b/sys-apps/install-xattr/install-xattr-9999.ebuild
new file mode 100644
index 000000000000..99350e7047f1
--- /dev/null
+++ b/sys-apps/install-xattr/install-xattr-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Wrapper to coreutil's install to preserve Filesystem Extended Attributes"
+HOMEPAGE="https://dev.gentoo.org/~blueness/install-xattr/"
+
+inherit toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
+ inherit git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~blueness/install-xattr/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ S=${WORKDIR}/${PN}
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+src_prepare() {
+ tc-export CC
+ eapply_user
+}
+
+src_compile() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ default
+}
+
+src_install() {
+ if [[ ${PV} == "9999" ]] ; then
+ cd "${WORKDIR}/${P}/misc/${PN}" || die
+ fi
+ DESTDIR=${ED} emake install
+}
+
+# We need to fix how tests are done
+src_test() {
+ true
+}
diff --git a/sys-apps/install-xattr/metadata.xml b/sys-apps/install-xattr/metadata.xml
new file mode 100644
index 000000000000..62a593741836
--- /dev/null
+++ b/sys-apps/install-xattr/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 type="person">
+ <email>blueness@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/intel-performance-counter-monitor/Manifest b/sys-apps/intel-performance-counter-monitor/Manifest
new file mode 100644
index 000000000000..d33965d8acc8
--- /dev/null
+++ b/sys-apps/intel-performance-counter-monitor/Manifest
@@ -0,0 +1,7 @@
+DIST IntelPerformanceCounterMonitor-PCM-V2.10.zip 950922 SHA256 46897ab2a8627ad5a58f05b19746b00b4f95126e8abccd9bed978b1f2675fc19 SHA512 a9a219495d9e99f8a8ffdae729c56e565c63856b81d71d7d188db2543d8d656535bb88f5701351a41aee948aeeeae304951cdf99dac7e6628bd43ba79bda757a WHIRLPOOL f0a68ad6268ee8a92bc46483e52365aeeac48dadbd6e0d3e776859bd6f6d715b76ac50bb4ae5dbb525fad6f1bbd006bb72eabb510de1c802e1aaad1ab413d995
+DIST IntelPerformanceCounterMonitorV2.8.zip 931374 SHA256 3c51b2fc7b772f16f746ea6fda0471d280c0f27bfd52fa51dd78433ca5a6ca6a SHA512 7dbba8c051663a315dcf79224502d76cb4217a483a4b322f0be938e06b988e290a83b345cb8c60645aceb8283555067c2db529179782432ff77fddd538ef8b8f WHIRLPOOL 159015a5d37c7f64813a31892b615443471571e3d3bdf2d23cc4fba08819142bd4d7bf7565a9e15618ae6825f4c97cb630bb49aeb7bfbf1e5819960b99911905
+EBUILD intel-performance-counter-monitor-2.10.ebuild 1272 SHA256 bb53fb87af4da7e02e3eb6e2bd666a66e9d06563626bb429dd6257ada0b3af39 SHA512 32228ee77fa382bdcd77bf5bfeaa68f098f056c4559d3ca76cfddbef86362c3a7a7ffbcaecca1b6077fa95e7f4d08b6363b96136be7aa1f9373873047e337782 WHIRLPOOL 4c984c53e1d67e3a5b07040c4ed471811d2f7c129615e013f3b61fde091773f6a0bd8ee17350e118a52027868cc0a051411b1de70305810e86078eace98f06ec
+EBUILD intel-performance-counter-monitor-2.8.ebuild 1284 SHA256 0ad6e9fbb6c35104dbe302ce0f93f2d53c17dc4486939847767e25db614e4334 SHA512 5e08f4e52217543c767cbc7220824d681a546213242b315dc9eea7e7a953ce1721f2f27ef75f39c87bbbc0922a105c8c9a2b3cd0d480864654a78c260f01ddfb WHIRLPOOL af3189d8e7365206f171ffd76307e0eddeeba843e7785d11baca8f0d0f027c8d3c9301eed19cf7496d075518daee1d5929e96cdc7379497c4792841a205c14a1
+MISC ChangeLog 2757 SHA256 bf78e3281ed2fe79aa7bd4ba83d4f6b8e1c9620646008dcd9021d3fc5599c178 SHA512 1c9c92b25122b162eb16e8e1be591e9dd7dafc9ae9fc118ef53d712997cbf57d0e001d8ba13006637967a75deb41124f876795942234a9f3b07cf1b6d838d5db WHIRLPOOL 554d80c95a3db036237d0768ad07bb8523dcf1cd8585001702e0af7d11dbed6bf2054a1b65a856ad8bf2599a6b0a24ba8320a6c3a214e7850bddb7846aeea6c5
+MISC ChangeLog-2015 474 SHA256 ac73ebffca1047a08810f8206e52d4d178d4b2f44571d6844ca6ea11339db15e SHA512 6da3eb160a2bd77a772b27cd79456ab4e0f05b138cc10f4430430cec404c26e9e2a8e1552ff92bbae4e0baf4fb7790f6359907248c756cbef385192fa5977951 WHIRLPOOL 79b7d9947e5047c2d2f18fbe2f780675b46e0c0cd0f55d59b4b10bf570d2cf934d5b9492c86dd5094f3ecfa1f5b8e1e6998fda56b51b8caa9f74ea2d50c8fbb1
+MISC metadata.xml 440 SHA256 c6b36a3ce70a3e3e60c6ad80f15a38b00861295bcf8a4cb7d3fd104645f530d8 SHA512 e0fd9fea6346317c40aac6cdc9177b89903cca8856632d988c1f9899ff581a6f5b344eccce241a4e4e0d575ca4d8eb1ec0a92ca9cda80d574a351bb1661c8a12 WHIRLPOOL 9291134ad85992a098492dfe9ad7189a45acc5bb8d0f7bc9f4647699399c68e6e0c8d6bdd3680dfb2f106094205fa60938983aeca38b8e7f8d1b41bcffb5b0f3
diff --git a/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.10.ebuild b/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.10.ebuild
new file mode 100644
index 000000000000..775ebf6f9022
--- /dev/null
+++ b/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.10.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator fcaps
+
+MY_PN="IntelPerformanceCounterMonitor-PCM"
+MY_PV="V2.10"
+MY_P="${MY_PN}-${MY_PV}.zip"
+
+DESCRIPTION="Intel Performance Counter Monitor - A better way to measure CPU utilization"
+HOMEPAGE="https://software.intel.com/en-us/articles/intel-performance-counter-monitor-a-better-way-to-measure-cpu-utilization"
+SRC_URI="https://dev.gentoo.org/~idella4/distfiles/${MY_P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=sys-devel/gcc-4:*"
+
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+CONFIG_CHECK="~X86_MSR ~PERF_EVENTS"
+ERROR_X86_MSR="Intel Performance Counter Monitor, requires X86_MSR to be set in kernel config."
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+src_prepare() {
+ sed -i 's/^#CXXFLAGS += -DPCM_USE_PERF/CXXFLAGS += -DPCM_USE_PERF/' Makefile || die
+}
+
+src_install() {
+ exeinto /usr/bin
+ newexe pcm.x pcm
+ newexe pcm-memory.x pcm-memory
+ newexe pcm-msr.x pcm-msr
+ newexe pcm-numa.x pcm-numa
+ newexe pcm-pcie.x pcm-pcie
+ newexe pcm-power.x pcm-power
+ newexe pcm-sensor.x pcm-sensor
+ newexe pcm-tsx.x pcm-tsx
+}
+
+pkg_postinst() {
+ fcaps CAP_SYS_RAWIO usr/bin/pcm
+ fcaps CAP_SYS_RAWIO usr/bin/pcm-{memory,msr,numa,pcie,power,tsx}
+}
diff --git a/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.8.ebuild b/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.8.ebuild
new file mode 100644
index 000000000000..ac520619c160
--- /dev/null
+++ b/sys-apps/intel-performance-counter-monitor/intel-performance-counter-monitor-2.8.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator fcaps
+
+MY_PN="IntelPerformanceCounterMonitor"
+MY_PV="V2.8"
+MY_P="${MY_PN}${MY_PV}.zip"
+
+DESCRIPTION="Intel Performance Counter Monitor - A better way to measure CPU utilization"
+HOMEPAGE="https://software.intel.com/en-us/articles/intel-performance-counter-monitor-a-better-way-to-measure-cpu-utilization"
+SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${MY_P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=sys-devel/gcc-4:*"
+
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+CONFIG_CHECK="~X86_MSR ~PERF_EVENTS"
+ERROR_X86_MSR="Intel Performance Counter Monitor, requires X86_MSR to be set in kernel config."
+
+S="${WORKDIR}/IntelPerformanceCounterMonitor${MY_PV}"
+
+src_prepare() {
+ sed -i 's/^#CXXFLAGS += -DPCM_USE_PERF/CXXFLAGS += -DPCM_USE_PERF/' Makefile || die
+}
+
+src_install() {
+ exeinto /usr/bin
+ newexe pcm.x pcm
+ newexe pcm-memory.x pcm-memory
+ newexe pcm-msr.x pcm-msr
+ newexe pcm-numa.x pcm-numa
+ newexe pcm-pcie.x pcm-pcie
+ newexe pcm-power.x pcm-power
+ newexe pcm-sensor.x pcm-sensor
+ newexe pcm-tsx.x pcm-tsx
+}
+
+pkg_postinst() {
+ fcaps CAP_SYS_RAWIO usr/bin/pcm
+ fcaps CAP_SYS_RAWIO usr/bin/pcm-{memory,msr,numa,pcie,power,tsx}
+}
diff --git a/sys-apps/intel-performance-counter-monitor/metadata.xml b/sys-apps/intel-performance-counter-monitor/metadata.xml
new file mode 100644
index 000000000000..bd86cbead490
--- /dev/null
+++ b/sys-apps/intel-performance-counter-monitor/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 type="person">
+ <email>brendan@horan.hk</email>
+ <name>Brendan 'undersys' Horan</name>
+ <description>Primary Maintainer, Assign bugs to him</description>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/intel-sa-00075-tools/Manifest b/sys-apps/intel-sa-00075-tools/Manifest
new file mode 100644
index 000000000000..d395e7097754
--- /dev/null
+++ b/sys-apps/intel-sa-00075-tools/Manifest
@@ -0,0 +1,4 @@
+AUX intel-sa-00075-tools-makefile.patch 620 SHA256 d34bfc1ecf3b46de4a379f44594d522a557fc9e7026fb265dfa1cee7e726357a SHA512 01347eaa8a50731ec21effc80125a6384760e75a954205710b7a813d65e392b2aba002ac521db8ca9fb9cfc1f8a071cf8d988969068415e410987f0473147483 WHIRLPOOL 6300150b18486b10def6a35a3129486b0c045b064e05551ca0944f612ed52de7811ad79321fe6f6739bd5a3ab95f9355c33d18cfd6911755d6483d2edc63be64
+DIST intel-sa-00075-tools-1.0.tar.gz 18750 SHA256 1f6f86cb7740285f49c0c2882f7f2ad318cf04adfcbfcb29ffd80e7eb6d03e14 SHA512 a42ee0e1553f4638c2976d8a28feb8c91d5ecb9163608f735406a3c80213f34933231320630f43392552fa69674afb1795f23fffef29b4cad45641827130e86e WHIRLPOOL 3accb57db89d50a558e910d8a1f091cf122f6788b754834caf5a578204cfe2ae25e5aa7231da9c1aaf20ab20f97d5647d78bab76d10d346fed168b782a560aaf
+EBUILD intel-sa-00075-tools-1.0.ebuild 686 SHA256 10b6e6de6efd541c5a6b3ec77502a3c6fd72312acf271a33efb5a681fa16fea1 SHA512 a2989947caff57d7b262a10518fb0174f182b9f4cc20ce1161a43fab357860de77e8d68084cf942338d06cce695a037d550038afb32bb5c1859908a4e6d9520d WHIRLPOOL 3864fe805c3439558c9bc419367b5321b720f06d7a0f25b0d29ee0452e9ea44a4f8c15a96c5b8b4dfc820c40e95a0dd07bc81203587100d926b32192fbda2059
+MISC metadata.xml 774 SHA256 7aea9b28051c62f79c8b64a6ff7cdd705e233bcf467112d9f0a15d82376154d6 SHA512 8adfad13fe748dce84af7b77094c732f746d5c9564d117b7ae771cf23ae54298e0f6acf9289a8aa7964f2ce356f61a21d330969512220fb0f66f2cece0ab0c63 WHIRLPOOL 3e79d2f4c05b9553558060eb6b2f7defc4589de37ce613fa7d6a1ddf19c4771dc5dd6e9de5d2270c88338bc3173e934446e2481d63788ef797b41d87fb6f9b6a
diff --git a/sys-apps/intel-sa-00075-tools/files/intel-sa-00075-tools-makefile.patch b/sys-apps/intel-sa-00075-tools/files/intel-sa-00075-tools-makefile.patch
new file mode 100644
index 000000000000..3cdf418315f7
--- /dev/null
+++ b/sys-apps/intel-sa-00075-tools/files/intel-sa-00075-tools-makefile.patch
@@ -0,0 +1,24 @@
+diff --git a/Makefile b/Makefile
+index 5ccccff..f58d7bb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,12 +63,12 @@
+ #
+ #;****************************************************************************;
+
++PREFIX := /usr
+
+ PROGS = INTEL-SA-00075-Discovery-Tool \
+ INTEL-SA-00075-Unprovisioning-Tool
+
+ all:$(PROGS)
+- strip $(PROGS)
+
+ INTEL-SA-00075-Discovery-Tool: INTEL-SA-00075-Discovery-Tool.o INTEL-SA-00075.o
+ INTEL-SA-00075-Unprovisioning-Tool: INTEL-SA-00075-Unprovisioning-Tool.o INTEL-SA-00075.o
+@@ -77,3 +77,5 @@ clean:
+ rm -f $(PROGS)
+ rm -f *.o
+
++install:
++ install -D -t $(DESTDIR)$(PREFIX)/sbin/ $(PROGS)
diff --git a/sys-apps/intel-sa-00075-tools/intel-sa-00075-tools-1.0.ebuild b/sys-apps/intel-sa-00075-tools/intel-sa-00075-tools-1.0.ebuild
new file mode 100644
index 000000000000..ad560d576889
--- /dev/null
+++ b/sys-apps/intel-sa-00075-tools/intel-sa-00075-tools-1.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+MY_PN="INTEL-SA-00075-Linux-Detection-And-Mitigation-Tools"
+
+DESCRIPTION="Tools from Intel to detect and mitigate the AMT/MEI vulnerability"
+HOMEPAGE="https://downloadcenter.intel.com/download/26799/INTEL-SA-00075-Linux-Detection-and-Mitigation-Tools"
+SRC_URI="https://github.com/intel/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+PATCHES=("${FILESDIR}/${PN}-makefile.patch")
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
diff --git a/sys-apps/intel-sa-00075-tools/metadata.xml b/sys-apps/intel-sa-00075-tools/metadata.xml
new file mode 100644
index 000000000000..bf8d19147b75
--- /dev/null
+++ b/sys-apps/intel-sa-00075-tools/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <longdescription lang="en">
+ The INTEL-SA-00075-Discovery-Tool for local analysis of a single or
+ multiple systems.
+
+ The INTEL-SA-00075-Unprovisioning-Tool will unprovision computers with
+ Intel® Active Management Technology (Intel® AMT), Intel® Standard
+ Manageability, and Intel® Small Business Technology (Intel® SBT) that
+ are vulnerable to the issue identified in INTEL-SA-00075. This tool
+ will allow you to unprovision management features, configured in
+ Client Control Mode (CCM).
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/inxi/Manifest b/sys-apps/inxi/Manifest
new file mode 100644
index 000000000000..67326c83f91c
--- /dev/null
+++ b/sys-apps/inxi/Manifest
@@ -0,0 +1,15 @@
+DIST inxi-2.3.0_p20160807.tar.gz 407468 SHA256 da9bf61c2134291d8f65f5cd270a7026d83ea28f44450c7973e1f5f7aa529313 SHA512 58f91c7b44cfa6a53fba7fdd8300ab5b9bca86a1c558524ad6f26f79123f4e642531543f9d5d04134ca5028323bc9e6db128a15e0c17b41254ff9463db1080f9 WHIRLPOOL eb502482b76a55c2fa7d3c9972fa0b46ee4e12af208073bc2ff4b22d6880868ddd576b1c345905f19fae4ee6469d4dc5fdbdaef0acf4d944e8a390974fa54881
+DIST inxi-2.3.34_p20170805.tar.gz 449836 SHA256 c051cea0f6f1113406e3b2a776c841649d4c8cfbbdaf4a568a25bbb497447e44 SHA512 c3b2a5d91a0fa0840ad602e6a147bc65dec83c966c8fc2a72e39fe6737ef4e0d57edcb5e47602311a8eedd2fb6d51619f4e44ad2be4ce8b5e259049e2c238a18 WHIRLPOOL 211d0ed25c061e7cacd09a6750dde8c0ca03999cf33ee35c4423bd892e5e363564307f4ce61a40948706da3a4e2b232a53e379a5c78ba62b891b0f45b895c98d
+DIST inxi-2.3.36_p20170816.tar.gz 452116 SHA256 d5648d2b6a32da364bf5d9f9eb3b275a1512a2143f13433caace97b6b42e1fde SHA512 9326fd8787449c6b52fad3188086a59deb2614100ccf8c49023c78d21ff4ab08a434ba1b95bc48f8867499e30179df602ff53934611bbe952b223c8bdadc40bf WHIRLPOOL 85952282335221856aeb6f2b844df89fc0c7a852a2676aad333bd13a42d48ef1bf06da1a3309bb93355221b0e976679ab8b5076da6cae9d57ce6009c1af05a00
+DIST inxi-2.3.37.tar.gz 454862 SHA256 5c728fefbe33800ab7ce8d5536f52fbb0aff560f48ba525f148fc48e034fe1c1 SHA512 0a47cd920e80c518d6d6987945eb9526ee1ce7f6bf62754196e05736db44fbced615d29b6e12787bf55f769ed9963dff0088c96f9dbe13dae7f57744b0172802 WHIRLPOOL e4271b8d6493e4d48ad15fc8d5d4bb86fd3251bb1fc8b2292c2f538076f29b53aef156f97233bbbb0a9acae52fa987672797832fe33f29fd6a8b40b154608de5
+DIST inxi-2.3.4_p20161104.tar.gz 415379 SHA256 b4e1377e9c67dd7836542542edd9facdad6fa9cf37d3b8cc0c3c98bf31f463c0 SHA512 4803433bb483119a0c7b50eea07b39878a39005224fbda0ddc7e52bf88abbd0184c8476277b15c80a156d4d1b9d51297f15c8d1c63b95dc3e40399cc50afe850 WHIRLPOOL 9b0688a163a29dfb07d4228624cd9cfd2f8010f189b914ad06b3ba76ef62f8765d861986946d9045f257561716ebf1bbdfe7f305fe9614671992ca02e523ef6f
+DIST inxi-2.3.8_p20170114.tar.gz 422139 SHA256 ecad1522c786555c7b11d3066878f94fc276b205fb63faad06c9ff6f708bf558 SHA512 400d6cceb9282f46f1de30d436f334813d725867e0614a0ef694dc33066139dd7daf4730c007186b7037705f5debb72fa0ad9357619cdbc93152b4d585ba17e6 WHIRLPOOL 0734dc38929c404c2ef08017606558aa55ccdc8c290adec8640db30e800d0ba4b1c8c89d3f9c221b5ea6e02f1f0ca8c429326fe8bec57e5c7a75999c95b24a23
+EBUILD inxi-2.3.0_p20160807-r1.ebuild 687 SHA256 6da49904afd4b2e13b98836b5a03e11bcdb9f33b9dccb0634b3ac82902298828 SHA512 a4e00b2f909ed6692a43fc4de657424772b58f1ef33d0e8e2f5fb9af896d2ea227eafe03e47c31c1b7afa5ad7e49851db46d3d0f5b10d643a29070a6b2ca418b WHIRLPOOL 45b6881dfe895b446202b5f6329fe57daf9a25ee39d5f967ebfcf823e56841fb8aaf6e5398972ef7b4fbb5fedd7efb84983460d317c01b0505e2452d3e2d5e34
+EBUILD inxi-2.3.34_p20170805.ebuild 691 SHA256 184f16596be8c7168743e15379e4e32271f14e295c291c796b2ff95b125e9365 SHA512 24467d736e6b750f18c78f8d9a1e384f6e5fe1fb5bd04f28de4ee18f11e1f9c4f5581ba1355b820bb0de3def71808ca274a4f2708ab2256f4e147dc005f97201 WHIRLPOOL 6ef84aa77668dd15a5fde1e7de005149c0dc081a1e07c1c518317b6d8a08c466873e6892e1bd113fc4922ddae9256ec7764cdac12d30d1dc8cf88503c518b363
+EBUILD inxi-2.3.36_p20170816.ebuild 691 SHA256 c5e95d03c3e6218ef9a69b5d6aa89ee158ed510e6776b92ad80d64aec009f897 SHA512 6924100f657e0968d49eb5576cab42719124608c7ac65ed6d58db7573b00c1dfdd0932e988cfe3b97ce129acbd1b3703042740c01c379c10e2ced7916c57625f WHIRLPOOL bd57aa4238130cbcd99f643dc40fab5e086ef8aa1496f70ddee8e34c1c87738cb0aa44e1b16c9bc9bf81c23e95d40e143cd1ab63f23be3dac053dc413853071a
+EBUILD inxi-2.3.37.ebuild 693 SHA256 d44da26d3279825068aa629a39298b612fc9d158e3ed47eb7386a602716e1bf0 SHA512 c05b56c21f638aa9f79af52b0bdcbaf18766b3df615aaa8969867ef008a9c276684b11ca0e2666667256d52bf2148b717ecf252306721c5dd840ff8186d9c70a WHIRLPOOL 76604723a7cdc69bdf39add245bd1fd432068d9f1c62ed22c143fae63bf0b0e00e5034b30dcc9c7308074fa54ed1c0ce54ca09083ee6ecb5869c55f2d0f467f7
+EBUILD inxi-2.3.4_p20161104-r1.ebuild 688 SHA256 db05b277b7403c8c003fbb049937f7483fdca0ceebd1ca9110c9a33ff38dae23 SHA512 10b098f7e9f6d355fcf4bcd9811bea81009d1160ff1381703f16c030753093d148854061df78b00064f28a130db65d602a78511cd932e88a6f8a3e16179d28d5 WHIRLPOOL 338f27f21c891da2b4bdbee4ed226ff7fb0e2354a37ae60192b5d55c3f81c3eb8661bdd0e0ecadde8a28927676de71979addd36db677b85bfaf04d86aeb738ab
+EBUILD inxi-2.3.8_p20170114.ebuild 686 SHA256 5a66030904ebedef92cb35fe6ad8b0ae9922a7f64d7130799c28c7e66f48c718 SHA512 8504fbaba115a62659a722c40af8a7481f21c57cb081e0d7e9e7fd62733cee68ab5eb9fd71681f8588a8adcc732db5e74053ecd428716bdf068cc37c83d23008 WHIRLPOOL c2437044bdc9139bd5399ac7cd1e14d68251368f9b147395f0283661ede9b8fc8d8172fb955a260ecebc781a317164336c4897286c3fdc2a9546296e4230a961
+MISC ChangeLog 4021 SHA256 168dbf7c3dc087f9b1363d43d8819ccc5b4d043453946d07cfcdf41e4c53b396 SHA512 dada5d7153f85e68ab68de3acfe19300b9c0c13499b75a1a7b03b68caf9c99540d9f2799543bee541c652b806383a1d444456ad2a08c6aa8bc6f66624074d9d9 WHIRLPOOL 6fbed63bec13f0cfab3ab7e2f7f2f67cb8a0967679fc9ef27050208cde968d5a6c4388a70b2dac96dfcd0a5ab6ec1eca71789b7a0f18728e8e96e7f4d9ea39e8
+MISC ChangeLog-2015 542 SHA256 4b4d7a01227ee5bfbede709b75ebd8ceed19113b4ba4c218988aa900d28e1109 SHA512 65a9e13cf46e6f33b17eb1e087d18c03898581c18878879f7a9008c6271d5c22ae22e9a1cfebdc8c88d6a2dfed5f61d39e8bcfcb57bcf688eabb171db39fc870 WHIRLPOOL df373036faf356cacf4d15ea331b6a96ea2a4e55f3c231bfd025c7c439c75327cb824612e964c6d698cd548db41a607da56e85bdd54c22c36254c83acd1b5271
+MISC metadata.xml 444 SHA256 1aeffbfa0e299e7f572a84ded4c81930e168650000d25d87ee3708165f00258d SHA512 f44e29945d98ff44784623624a9c891942c0b69b6272322bd4665a5d49684cc16ee9b01b7a6f60872286a0a96aa437f7b9605aa6820435016e84d92fc96d6fd0 WHIRLPOOL 315344c0155bbae5a2076a7fb32fd23427bc6d64bd5409c5f17f36367e88133dbab20ab36322505eae82dacc2137dad5fe525d1e7ac775ece10c551c0c4d8b7f
diff --git a/sys-apps/inxi/inxi-2.3.0_p20160807-r1.ebuild b/sys-apps/inxi/inxi-2.3.0_p20160807-r1.ebuild
new file mode 100644
index 000000000000..09afef734064
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.0_p20160807-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT=c2a22b3e2590d896d4b0a8fd298f505cc1d787f5 #because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/inxi-2.3.34_p20170805.ebuild b/sys-apps/inxi/inxi-2.3.34_p20170805.ebuild
new file mode 100644
index 000000000000..db859ca7b4ba
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.34_p20170805.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT=404b7793b5fc8c7130ed822d8830f74cc6400c6b
+# ^^ because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/inxi-2.3.36_p20170816.ebuild b/sys-apps/inxi/inxi-2.3.36_p20170816.ebuild
new file mode 100644
index 000000000000..97aa523701e2
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.36_p20170816.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT=ce66fee6b7a1913cf89bbc60a024f0649b32c50e
+# ^^ because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/inxi-2.3.37.ebuild b/sys-apps/inxi/inxi-2.3.37.ebuild
new file mode 100644
index 000000000000..1784750cd366
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.37.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT="2b4e89b21ffd06e888d89a38aaedb797ecea4403"
+# ^^ because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/inxi-2.3.4_p20161104-r1.ebuild b/sys-apps/inxi/inxi-2.3.4_p20161104-r1.ebuild
new file mode 100644
index 000000000000..619a8b5cb19b
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.4_p20161104-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT=89e18d245bc34fc5be5f5baddac2ccd8106be050 #because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/inxi-2.3.8_p20170114.ebuild b/sys-apps/inxi/inxi-2.3.8_p20170114.ebuild
new file mode 100644
index 000000000000..55d7955e7d3b
--- /dev/null
+++ b/sys-apps/inxi/inxi-2.3.8_p20170114.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_COMMIT=af0630e3067c138893e243896e1767c93d2a2856 #because upstream refuses to tag commits with version numbers
+
+DESCRIPTION="The CLI inxi collects and prints hardware and system information"
+HOMEPAGE="https://github.com/smxi/inxi"
+SRC_URI="https://github.com/smxi/${PN}/tarball/${MY_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+DEPEND=""
+RDEPEND=">=app-shells/bash-3.0
+ sys-apps/pciutils
+ sys-apps/usbutils
+ "
+S="${WORKDIR}/smxi-${PN}-${MY_COMMIT:0:7}"
+
+src_install() {
+ dobin "${PN}"
+ unpack "./${PN}.1.gz"
+ doman "${PN}.1"
+}
diff --git a/sys-apps/inxi/metadata.xml b/sys-apps/inxi/metadata.xml
new file mode 100644
index 000000000000..3d8c1c6ac581
--- /dev/null
+++ b/sys-apps/inxi/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 type="person">
+ <email>jstein@gentoo.org</email>
+ <name>Jonas Stein</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">smxi/inxi</remote-id>
+ </upstream>
+ <longdescription>inxi is a bash script to print information about the system. It was forked from infobash.</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/iotools/Manifest b/sys-apps/iotools/Manifest
new file mode 100644
index 000000000000..0163f65ca552
--- /dev/null
+++ b/sys-apps/iotools/Manifest
@@ -0,0 +1,9 @@
+AUX iotools-1.4-cpuid-pic.patch 617 SHA256 078c0b040d9d7d89fda30f7628fbefad1a70356c26c9c2ac7fcc03070fff2c29 SHA512 81c9f1d20fa87b847e5c49909639d35b604a991f7a87077a1b8e5fe36707d9e24289f861d6ce9468de5621e84adedc60f76086cacafc67aa2d1b9aa5f52ba364 WHIRLPOOL 2678c18cd692a90d9fe03305ffb58c1966ef3d1a7097548a4f26fc362639bcfb2a4c5ffad4563aeb6e0293e8d23c9fb594dbd1c8341db103974e73d7a03ebd59
+AUX iotools-1.4-ldflags.patch 302 SHA256 eb3b884dbbe872849bc1a6f02b72716f07428d7b1a2d9c75fd1b18b01668485c SHA512 bc20c64b46f5e6fd6526e4a3fb9ce4e6817b6f4c66330d5c5ea721a5be55410603c16898162b9be41ed607cd4287e6bc187deadb83aeb1a813aeceaf88258ce0 WHIRLPOOL 33a655b7f523e00a2c7b5a7c5844762a8005f6fa00bee043ccd89213cbea98b0d89cd27dc2f8d55fe646aba5bba72d7a4e2c258ff2115163fa4cbd631ea99b99
+DIST iotools-1.4.tar.gz 22217 SHA256 56e7348bb5b91f6b93a9b2759993545575eeb3fa5f9203a9cbb95dad9883807b SHA512 10b5f5c4183fb78900c254359b1d40d681519d4b0a79d10795c44d6f1691d73b93d02ede57cf84b5bac67e6083bc5a0de45c464caccbad8b2127a2c53cd7e94b WHIRLPOOL 808ba3b70c602ff0cdfe38ffcf7c1a3c4ab72cacf977ee8db34049159f20b034b48949f0bd70f1b27436f1183dda5cb677338f80afaf65ba1e1a0ec96a973418
+DIST iotools-1.5.tar.gz 23422 SHA256 3186ba296072f644dda881b78d77e3774b79e8cef3e828fffc947d558b08830d SHA512 d298343ee814c8b7d8404bc6af4050df730e89963a7c53798b3d251e94fd2b13e04c36e6da7ec5fd4126ea3a961be26a937910f791844e1b1d5b7dc5aa638c44 WHIRLPOOL 52d5aedf0ae4ee3257e19a6868f792e54b6ac9d79c0816c934b714811e4da0bc288a7f597098fd9ff2ed65f11cf486db1e2db76c85c0ecde0a095e09f24b2fbe
+EBUILD iotools-1.4.ebuild 1743 SHA256 5d6b2accaefe674538e6402b68ea8a0f889e9d080682105e2bcb1f70b9be82cd SHA512 df07fb30bff57c4e445cba8d08b308dd88cdeb5a0e66a862a6e667b4b037953773ab194edf7c2e663e61cb255107cd294224fc67c37282f6d34adf5af3b6f4d2 WHIRLPOOL eaa173478f3108ef1348f63af7d4a3fcccaa02a4a7e25a1b8f52ed0c975d58b9849307f669c9c257af166e91c7b87598d176726919e3e4d178ff536d813fffcf
+EBUILD iotools-1.5.ebuild 1896 SHA256 6ed170fbd902342a8475907d0c944f14c27a992c2fd553e6f3ba9ec59cdbe1f4 SHA512 befe48aa95a4d6d177d0fd2ea8a3e967bb37ae1f39bf4f46d5977304119ea35e3346d79c73ee1a475b48089b71e6b43d96e33eb78c79ab17921cef913657bdef WHIRLPOOL fe2d82fc6b15e5e815c4a20266d2db588580b0c04c43aafa487a1498b7b7f80a10cd5751147e398d1d01a978f6828a763e7fca63ef72a846b2997c262b5caf36
+MISC ChangeLog 3043 SHA256 e7066a17a96f3509b5f7472ce7f98ea7f710fbb3fe2180e71d31125deccf2a2a SHA512 f861499228f1e7dfe5c669ae3cae5cffefd90ed1563978623be923d034d186177c6455fb2094a3abe00bd36ab2d7da4b19d3601e5fc53dbe5ddcb154d3b1a637 WHIRLPOOL c82f0add3390f2579a5a6122f807d9e85fd326100304c982e427e4a9fd982cb9146f9589790848aba2c24cc0d38008bc9c15001e8899922c0d80ff3df715cb6c
+MISC ChangeLog-2015 1111 SHA256 e63eb9603110449da07fe62a431245fec3fa980ae6e6c0fe77e6630a562fde2b SHA512 78b71632a52dfb58dfb3648e2447f16a6bd6a9c324c2b53c374d03132b523855d964a632fb5c13cf733a063c0fbdc2e3d637b9525a76f81959cde6c49a6a2878 WHIRLPOOL 5afbe8df76e397549cdcea64ca21b8a11fa9a68d69e54cf6a414e4dbcf4182f2efc666897ea6c115c6f011deaea3725172261835cec8fbac0cc98605e97ffa71
+MISC metadata.xml 344 SHA256 7f287ccf3c28346cb4a0d315cafab9fa664e859218bc756fa5f0fc2223c7b17b SHA512 0049857d3084683775560f15a40b51ec3dfec0cbec0918b3eb305b1b6c6ae07114eee1f1bee9fcffd2ed3aed5c329ced039ac3a41da8ecb16a3a627f9588eff8 WHIRLPOOL 20fef867b0e8cbdaccfcba62f19c70a03b6bd0a44db85b02f95e23483c2c1b2fb790254ec391691c72366db37e94e76ffe9f506f11170e13b350e15c9433b5d5
diff --git a/sys-apps/iotools/files/iotools-1.4-cpuid-pic.patch b/sys-apps/iotools/files/iotools-1.4-cpuid-pic.patch
new file mode 100644
index 000000000000..3fde16c6ca01
--- /dev/null
+++ b/sys-apps/iotools/files/iotools-1.4-cpuid-pic.patch
@@ -0,0 +1,22 @@
+http://code.google.com/p/iotools/issues/detail?id=2
+
+--- a/misc.c
++++ b/misc.c
+@@ -149,8 +149,16 @@ cpuid_inline(int cpu, int function, int index, uint32_t *data)
+ }
+
+ asm volatile (
++#ifdef __i386__
++ "xchg %%ebx, %%esi;" /* save ebx (for PIC) */
++ "cpuid;"
++ "xchg %%esi, %%ebx;" /* restore ebx & pass to caller */
++ : "=S" (data[1]),
++#else
+ "cpuid\n\t"
+- : "=a" (data[0]), "=b" (data[1]), "=c" (data[2]), "=d" (data[3])
++ : "=b" (data[1]),
++#endif
++ "=a" (data[0]), "=c" (data[2]), "=d" (data[3])
+ : "0" (function), "2" (index)
+ : "memory"
+ );
diff --git a/sys-apps/iotools/files/iotools-1.4-ldflags.patch b/sys-apps/iotools/files/iotools-1.4-ldflags.patch
new file mode 100644
index 000000000000..242f6912b69a
--- /dev/null
+++ b/sys-apps/iotools/files/iotools-1.4-ldflags.patch
@@ -0,0 +1,13 @@
+http://code.google.com/p/iotools/issues/detail?id=3
+
+--- a/Makefile
++++ b/Makefile
+@@ -44,7 +44,7 @@ OBJS=$(OBJS_TO_BUILD)
+ all: $(BINARY)
+
+ $(BINARY): $(OBJS) iotools.o Makefile
+- $(CC) $(CFLAGS) -o $@ iotools.o $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iotools.o $(OBJS)
+
+ RUSER ?= root
+ RHOST ?=
diff --git a/sys-apps/iotools/iotools-1.4.ebuild b/sys-apps/iotools/iotools-1.4.ebuild
new file mode 100644
index 000000000000..4b470a70670e
--- /dev/null
+++ b/sys-apps/iotools/iotools-1.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple commands to access hardware device registers"
+HOMEPAGE="https://code.google.com/p/iotools/"
+SRC_URI="https://iotools.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static make-symlinks"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cpuid-pic.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ sed -i 's:-Werror::' Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ STATIC=$(usex static 1 0) \
+ IOTOOLS_DEBUG="${CFLAGS}"
+}
+
+src_install() {
+ dosbin iotools
+
+ # Note: This is done manually because invoking the iotools binary
+ # when cross-compiling will likely fail.
+ local known_cmds="and btr bts busy_loop cmos_read cmos_write cpu_list cpuid io_read16 io_read32 io_read8 io_write16 io_write32 io_write8 mmio_dump mmio_read16 mmio_read32 mmio_read64 mmio_read8 mmio_write16 mmio_write32 mmio_write64 mmio_write8 not or pci_list pci_read16 pci_read32 pci_read8 pci_write16 pci_write32 pci_write8 rdmsr rdtsc runon shl shr smbus_quick smbus_read16 smbus_read8 smbus_readblock smbus_receive_byte smbus_send_byte smbus_write16 smbus_write8 smbus_writeblock wrmsr xor"
+ if ! tc-is-cross-compiler ; then
+ local check_cmds=$(echo $(./iotools --list-cmds 2>/dev/null | grep '^ ' | LC_ALL=C sort))
+ if [[ ${known_cmds} != "${check_cmds:-${known_cmds}}" ]] ; then
+ eerror "known_cmds = ${known_cmds}"
+ eerror "check_cmds = ${check_cmds}"
+ die "need to update known_cmds cache in the ebuild"
+ fi
+ fi
+
+ if use make-symlinks ; then
+ local cmd
+ for cmd in ${known_cmds} ; do
+ dosym iotools /usr/sbin/${cmd}
+ done
+ fi
+}
diff --git a/sys-apps/iotools/iotools-1.5.ebuild b/sys-apps/iotools/iotools-1.5.ebuild
new file mode 100644
index 000000000000..d508f1263e1a
--- /dev/null
+++ b/sys-apps/iotools/iotools-1.5.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple commands to access hardware device registers"
+HOMEPAGE="https://code.google.com/p/iotools/"
+SRC_URI="https://iotools.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="static make-symlinks"
+
+src_prepare() {
+ sed -i 's:-Werror::' Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ STATIC=$(usex static 1 0) \
+ IOTOOLS_DEBUG="${CFLAGS}"
+}
+
+src_install() {
+ dosbin iotools
+
+ # Note: This is done manually because invoking the iotools binary
+ # when cross-compiling will likely fail.
+ local known_cmds="and btr bts busy_loop cmos_read cmos_write cpu_list mem_dump mem_read16 mem_read32 mem_read64 mem_read8 mem_write16 mem_write32 mem_write64 mem_write8 mmio_dump mmio_read16 mmio_read32 mmio_read64 mmio_read8 mmio_write16 mmio_write32 mmio_write64 mmio_write8 not or pci_list pci_read16 pci_read32 pci_read8 pci_write16 pci_write32 pci_write8 runon shl shr smbus_quick smbus_read16 smbus_read8 smbus_readblock smbus_receive_byte smbus_send_byte smbus_write16 smbus_write8 smbus_writeblock xor"
+ case ${ARCH} in
+ amd64|x86) known_cmds+=" cpuid io_read16 io_read32 io_read8 io_write16 io_write32 io_write8 rdmsr rdtsc wrmsr";;
+ esac
+ if ! tc-is-cross-compiler ; then
+ local sorted_cmds=$(echo $(printf '%s\n' ${known_cmds} | LC_ALL=C sort))
+ local check_cmds=$(echo $(./iotools --list-cmds 2>/dev/null | grep '^ ' | LC_ALL=C sort))
+ if [[ ${sorted_cmds} != "${check_cmds:-${sorted_cmds}}" ]] ; then
+ eerror "known_cmds = ${sorted_cmds}"
+ eerror "check_cmds = ${check_cmds}"
+ die "need to update known_cmds cache in the ebuild"
+ fi
+ fi
+
+ if use make-symlinks ; then
+ local cmd
+ for cmd in ${known_cmds} ; do
+ dosym iotools /usr/sbin/${cmd}
+ done
+ fi
+}
diff --git a/sys-apps/iotools/metadata.xml b/sys-apps/iotools/metadata.xml
new file mode 100644
index 000000000000..dde53cf2f5ed
--- /dev/null
+++ b/sys-apps/iotools/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 type="person">
+ <email>vapier@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="make-symlinks">Generate sub-command symlinks to iotools -- note that a lot are simple like "xor"</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/ipmitool/Manifest b/sys-apps/ipmitool/Manifest
new file mode 100644
index 000000000000..46fdc472edeb
--- /dev/null
+++ b/sys-apps/ipmitool/Manifest
@@ -0,0 +1,14 @@
+AUX ipmitool-1.8.9-ipmievd.confd 518 SHA256 30e8b6c71cf104313a00dc09d381bf314c4417be6584f3873ddf8db949d40536 SHA512 6253f218b22fc98768d3a26aec60da8b80229f3f4e2137cf6b34cefb465a420400e451fb07e6f3f626d88904644e4e2bddd280e01bf6d6cacd06cf6b59f20fe4 WHIRLPOOL 77d19c8ce4316b6b24131d1efa312faa5906875e993a6ee8f6195593ad4baeed6482efa1870e108987311784481fbbc0fe313118b307bb8dab60bb109b538ff2
+AUX ipmitool-1.8.9-ipmievd.initd 584 SHA256 d402bea3641fd7bb4a670cf03a331127ac0c41931fc5c73436dbf5c66241a9ad SHA512 5d42774486a0edaf1dcece16fbad0cca531a91559ba8dd4259f05787e1964fbfec4d11c9427dbe8cb46ba0cc1a447120bfa82254aac4850d9acc632834daa669 WHIRLPOOL 6ecd84e39fcfaed8ed60ff89f557759b372d19e44ef21ee02c33f950fadb789ec17691ce3cdea12179a5c7fc4da25fc420b6a565f97cf6c9771098fdaa838f24
+DIST ipmitool-1.8.14.tar.gz 917886 SHA256 fe9bce4587f83fe0fd7c4d86fd3241fe41cb661ebc5c7321128d59cc295874ab SHA512 1376a0d4209e4622f9b0e27d3f3d67d552be936ded92e4e894d2b04871717a585075b54bbb9b91d62b58483ee9b94b5c64e2ecdfcef3c3f818fa6f035fb34216 WHIRLPOOL a16d965218829f1a1b29133e8722272d6062698c546f96de94385b3a62aef5d886e4890ad48ed43f04531a18d806a2a5a798f50ce9dadcb87ba17b2902cffdce
+DIST ipmitool-1.8.17.tar.gz 976189 SHA256 717d3972c050541878eaeba85e02168e76f6e98bdb4837ac214fae165af89961 SHA512 929cf0087d3d712caf845eb62771aa96d034c2222170850b0d8bfdbb41d0b0aee05c14aa48e82368f4494606781c6639ada348fd086907c21b817d95dd36a3f6 WHIRLPOOL fdac04cc2601680ec645f5634947da52e31b1fe5b57ad2e74d5099cda3fd605e1ae218441de7241a4f7822701e7e49b81e0c8c52367cde8dfdcd1b217a3e07e0
+DIST ipmitool-1.8.18.tar.gz 995313 SHA256 7524b5c5299f870333a402535d1639fd725c800a697b0215ef7ce732bc45d04d SHA512 274d424fff079f7628c0f9fe06580937cb9717c809a71b2f5ef97266c6b6c89983b662fbb1f090e2f94861f1799677c8fc6536013828a8a5e6cb239af53e45ab WHIRLPOOL 36a99cd698edc7d07871341498f273d0e52095a08460835fe0fdfead1271757d1c52a866e19ca006d4e531a917a2f97fb94711671fa9154599ca6f5cc51ac625
+DIST ipmitool_1.8.14-4.debian.tar.xz 16452 SHA256 24b57ffec3ca1bda69f82b006a12a3ccd1e643b2e0250c0a670218e1e76a54dc SHA512 f7b464d9167e2c92b9536fee1e0cb66da11f6cdc6f86d7adb3ad5c239f3c1850663ddfd9571561502904daff52b3a57b633c389de697da42e7bfafe8c67a60a9 WHIRLPOOL a559a3c1771fc4e33b817977c8eb23372e27a3d2c1bcbc5eefd3e714bfa0da82d05e597dbb2afc8cbf52b6b5ffcde4273505cad5fedc4b8893809d691fa21fc5
+DIST ipmitool_1.8.17-1.debian.tar.xz 18252 SHA256 23fe78d07c96918377c0222f4dba5780e8a1746fc75c5f51a0a907cfefff7a61 SHA512 e1133262020e8fabe47e7aa308956078bc9fb3bb7033413230f1cf76aca1d4733bac64e52039365f24fe54a1bf8e271071bdaa1722720fca62f1c9e8888777a8 WHIRLPOOL 04c15df52d5fa74876de193b274d0f0ef0d858a2601b55a4823a6ddff405550def96a3407e7890b74e14da72fed21d9c6118a532ac01f2803a3664e7b9fbff80
+DIST ipmitool_1.8.18-1.debian.tar.xz 19140 SHA256 6b29232649a063e444ca23a4723b9af793e890df206b9b0f81a7608f87110ec3 SHA512 8aede337d07987decfd032898f194d32730eced443630ac3956676533d693fb2d17a175ef14218cbcd55da44f6b17714f676a912a1d5124a15a995e01d2828ef WHIRLPOOL e6d9f024603506431c03f05d87533c0bdbc5f4d72590483c86a074e6182c963f15dca8b523f54bc1f9c9441a3c2706490b03de37a414787ce420f6051d215769
+EBUILD ipmitool-1.8.14-r1.ebuild 2436 SHA256 4474b0a6146e7fd149d307c6d2d436a6ceb1174bd2bdeed9e341092928d70a6a SHA512 ef4b9f236a6426482b3133d32dcdb31beb1ae7a32e0abc867c91e1509069186e9c35b62c764939b063fea7e27818568f6f30e72f4b10416660c708de2f8930df WHIRLPOOL 5a64e87f688e91f5a6bb6e649e2998e922b094caff84091bc84af1d32276a9eb0ce8d2f8418c334c45be4b97c468a21ccdee9d32dd75389b67dd062b43f9c330
+EBUILD ipmitool-1.8.17-r1.ebuild 2443 SHA256 1bb10ebcbbc63e2ee9f14f17916a39d86fbc20ff13f2f2485fde9d68e3c552cf SHA512 8824e25c00e9b9406fddec2caa638fabbcc1a1d8207a7784e2b6bf7d8c59bc6a668edeaf199a3a347d4be2e046b4efc5ab5198c242fdf9395ee825d6e2df8f2d WHIRLPOOL a7e2c32942fae294d6e770d93744d909a636602af8e2aa3ee465877e7c3be423791f533e87b8a93c50c7008c70f5680ad3e5bd6de3af1c4279f5ed29c9f399d1
+EBUILD ipmitool-1.8.18-r1.ebuild 2518 SHA256 6d0a4bf83a33e2bb497889c8df0f0a92518b1ad783c4e4b16771a31eb3472a11 SHA512 e3be9bbc0426f973fa1efad262791066ef369b742b7e135be2cbeded53b71ca318bf561dc19566be8494d6099bfeab136d943a13cc764e07d60bef0af9f282f2 WHIRLPOOL 2a71fc01b5b2bd9a266f81567a119fc75c1edefaa7db3d207ae79b7afd18e15510ce15406fd5e22d4bcbc734b6cdec9adc3058678f13e1519ff294dbb2aa321d
+MISC ChangeLog 4517 SHA256 fc605e707d1db4cad74cd75319569d27ff5e906e611e0a55f5889a075679b68f SHA512 ac7bdd8e43f3693e6e4856740ed511224d80b475cd460ffe1a44d686f4f0eec66a6f9af00d225de2ea8c001067c00b589cb1574cb66c46232ba4a1737d472a35 WHIRLPOOL 451e7393dd4bed6bc513552fe65998d52920824c8962605b250369779f55fa12b57e0ccc00bfa1d4eccd517fc7ec94fada8b841bf3cd6d2937021684828d82df
+MISC ChangeLog-2015 4451 SHA256 f4c21880ff336b667b89b69b94a620c3563829c02c568292237cddd18bfe71db SHA512 ee07d51754e82f875c5cfa7f0a6b84ddca1bd46c596e7342dad5139f1f1f0082254a0b95821e0cd396fc14b0587b5487515381924f8f5a81991ac24b8ab7d087 WHIRLPOOL e4559e9c567da8c372736debb86c023657e3a30099b63aa772c50b8d76babb8b47d0ff126c4025e2034338c5a97f608643427e337833803f8bed4144b3c08f49
+MISC metadata.xml 570 SHA256 45c2083537a2db305d37dbf66ccda015f241f04f0efb9003b1f00162e65fffc8 SHA512 16820cee9cff78b0137cbfcd179cdf78a503c583e8ca3e2ebf13094e21419770eb94205371b61c74c2e75f351d95ed74e6eaf060d748554c6602552ffa9151b8 WHIRLPOOL 4a18f58c1338bc724cf9fca95eb6b60546ca3a362e4d9111d063eb1aaf8fddbb2f71b65a19b203815f208aefb6245ddc05f726f57f0a51a5d547059b47e3148a
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.confd b/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.confd
new file mode 100644
index 000000000000..42b194a771b0
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.confd
@@ -0,0 +1,22 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# /etc/conf.d/ipmievd
+
+# Interfaces:
+# open Linux OpenIPMI Interface
+# imb Intel IMB Interface
+# bmc IPMI v2.0 BMC interface
+# lan IPMI v1.5 LAN Interface
+# lanplus IPMI v2.0 RMCP+ LAN Interface
+
+INTERFACE="open"
+
+# Commands:
+# open Use OpenIPMI for asyncronous notification of events
+# sel Poll SEL for notification of events
+
+COMMAND="open"
+
+# Options.
+
+OPTIONS=""
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.initd b/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.initd
new file mode 100644
index 000000000000..256238ef5e2c
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.9-ipmievd.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# /etc/init.d/ipmievd
+
+depend() {
+ use logger
+}
+PN="ipmievd"
+
+start() {
+ /sbin/modprobe -sq ipmi_msghandler
+ /sbin/modprobe -sq ipmi_devintf
+ /sbin/modprobe -sq ipmi_si
+ ebegin "Starting ${PN}"
+ start-stop-daemon --start --pidfile /var/run/${PN}.pid0 --exec /usr/sbin/${PN} -- -I ${INTERFACE} ${OPTIONS} ${COMMAND}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${PN}"
+ start-stop-daemon --stop --pidfile /var/run/${PN}.pid0
+ eend $?
+}
diff --git a/sys-apps/ipmitool/ipmitool-1.8.14-r1.ebuild b/sys-apps/ipmitool/ipmitool-1.8.14-r1.ebuild
new file mode 100644
index 000000000000..fa7af5d6aa1f
--- /dev/null
+++ b/sys-apps/ipmitool/ipmitool-1.8.14-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Utility for controlling IPMI enabled devices."
+HOMEPAGE="http://ipmitool.sf.net/"
+DEBIAN_PR="4.debian"
+DEBIAN_P="${P/-/_}"
+DEBIAN_PF="${DEBIAN_P}-${DEBIAN_PR}"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz"
+#IUSE="freeipmi openipmi status"
+IUSE="openipmi static"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ia64 ppc x86"
+LICENSE="BSD"
+
+RDEPEND="dev-libs/openssl
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ openipmi? ( sys-libs/openipmi )
+ virtual/os-headers"
+ #freeipmi? ( sys-libs/freeipmi )
+# ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
+# but it doesn't actually need either.
+
+src_prepare() {
+ [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
+ ln -s "${WORKDIR}"/debian "${S}"
+ for p in $(cat debian/patches/series) ; do
+ epatch debian/patches/$p
+ done
+}
+
+src_configure() {
+ # - LIPMI and BMC are the Solaris libs
+ # - OpenIPMI is unconditionally enabled in the configure as there is compat
+ # code that is used if the library itself is not available
+ # FreeIPMI does build now, but is disabled until the other arches keyword it
+ # `use_enable freeipmi intf-free` \
+ # --enable-ipmievd is now unconditional
+ econf \
+ $(use_enable static) \
+ --enable-ipmishell \
+ --enable-intf-lan \
+ --enable-intf-lanplus \
+ --enable-intf-open \
+ --enable-intf-serial \
+ --disable-intf-bmc \
+ --disable-intf-dummy \
+ --disable-intf-free \
+ --disable-intf-imb \
+ --disable-intf-lipmi \
+ --disable-internal-md5 \
+ --with-kerneldir=/usr --bindir=/usr/sbin \
+ || die "econf failed"
+ # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
+ # include the below file to define some things.
+ echo "#include <asm/byteorder.h>" >>config.h
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PACKAGE="${PF}" install || die "emake install failed"
+
+ into /usr
+ dosbin contrib/bmclanconf
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING
+ docinto contrib
+ cd "${S}"/contrib
+ dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
+
+ newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
+ newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
+ # TODO: init script for contrib/bmc-snmp-proxy
+ # TODO: contrib/exchange-bmc-os-info
+}
diff --git a/sys-apps/ipmitool/ipmitool-1.8.17-r1.ebuild b/sys-apps/ipmitool/ipmitool-1.8.17-r1.ebuild
new file mode 100644
index 000000000000..0e6967bb3a2c
--- /dev/null
+++ b/sys-apps/ipmitool/ipmitool-1.8.17-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils
+
+DESCRIPTION="Utility for controlling IPMI enabled devices."
+HOMEPAGE="http://ipmitool.sf.net/"
+DEBIAN_PR="1.debian"
+DEBIAN_P="${P/-/_}"
+DEBIAN_PF="${DEBIAN_P}-${DEBIAN_PR}"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz"
+#IUSE="freeipmi openipmi status"
+IUSE="libressl openipmi static"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ia64 ppc x86"
+LICENSE="BSD"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-libs/readline:0="
+DEPEND="${RDEPEND}
+ openipmi? ( sys-libs/openipmi )
+ virtual/os-headers"
+ #freeipmi? ( sys-libs/freeipmi )
+# ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
+# but it doesn't actually need either.
+
+src_prepare() {
+ default
+ [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
+ ln -s "${WORKDIR}"/debian "${S}"
+ for p in $(grep -v "^#" debian/patches/series) ; do
+ eapply debian/patches/$p
+ done
+
+ eautoreconf
+}
+
+src_configure() {
+ # - LIPMI and BMC are the Solaris libs
+ # - OpenIPMI is unconditionally enabled in the configure as there is compat
+ # code that is used if the library itself is not available
+ # FreeIPMI does build now, but is disabled until the other arches keyword it
+ # `use_enable freeipmi intf-free` \
+ # --enable-ipmievd is now unconditional
+ econf \
+ $(use_enable static) \
+ --enable-ipmishell \
+ --enable-intf-lan \
+ --enable-intf-lanplus \
+ --enable-intf-open \
+ --enable-intf-serial \
+ --disable-intf-bmc \
+ --disable-intf-dummy \
+ --disable-intf-free \
+ --disable-intf-imb \
+ --disable-intf-lipmi \
+ --disable-internal-md5 \
+ --with-kerneldir=/usr --bindir=/usr/sbin
+
+ # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
+ # include the below file to define some things.
+ echo "#include <asm/byteorder.h>" >>config.h
+}
+
+src_install() {
+ emake DESTDIR="${D}" PACKAGE="${PF}" install
+
+ into /usr
+ dosbin contrib/bmclanconf
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING
+ docinto contrib
+ cd "${S}"/contrib
+ dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
+
+ newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
+ newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
+ # TODO: init script for contrib/bmc-snmp-proxy
+ # TODO: contrib/exchange-bmc-os-info
+}
diff --git a/sys-apps/ipmitool/ipmitool-1.8.18-r1.ebuild b/sys-apps/ipmitool/ipmitool-1.8.18-r1.ebuild
new file mode 100644
index 000000000000..62f5859016f1
--- /dev/null
+++ b/sys-apps/ipmitool/ipmitool-1.8.18-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils
+
+DESCRIPTION="Utility for controlling IPMI enabled devices."
+HOMEPAGE="http://ipmitool.sf.net/"
+DEBIAN_PR="1.debian"
+DEBIAN_P="${P/-/_}"
+DEBIAN_PF="${DEBIAN_P}-${DEBIAN_PR}"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ http://http.debian.net/debian/pool/main/i/${PN}/${DEBIAN_PF}.tar.xz"
+ # https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz
+#IUSE="freeipmi openipmi status"
+IUSE="libressl openipmi static"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~x86"
+LICENSE="BSD"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-libs/readline:0="
+DEPEND="${RDEPEND}
+ openipmi? ( sys-libs/openipmi )
+ virtual/os-headers"
+ #freeipmi? ( sys-libs/freeipmi )
+# ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
+# but it doesn't actually need either.
+
+src_prepare() {
+ default
+ [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
+ ln -s "${WORKDIR}"/debian "${S}"
+ for p in $(grep -v "^#" debian/patches/series) ; do
+ eapply debian/patches/$p
+ done
+
+ eautoreconf
+}
+
+src_configure() {
+ # - LIPMI and BMC are the Solaris libs
+ # - OpenIPMI is unconditionally enabled in the configure as there is compat
+ # code that is used if the library itself is not available
+ # FreeIPMI does build now, but is disabled until the other arches keyword it
+ # `use_enable freeipmi intf-free` \
+ # --enable-ipmievd is now unconditional
+ econf \
+ $(use_enable static) \
+ --enable-ipmishell \
+ --enable-intf-lan \
+ --enable-intf-lanplus \
+ --enable-intf-open \
+ --enable-intf-serial \
+ --disable-intf-bmc \
+ --disable-intf-dummy \
+ --disable-intf-free \
+ --disable-intf-imb \
+ --disable-intf-lipmi \
+ --disable-internal-md5 \
+ --with-kerneldir=/usr --bindir=/usr/sbin
+
+ # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
+ # include the below file to define some things.
+ echo "#include <asm/byteorder.h>" >>config.h
+}
+
+src_install() {
+ emake DESTDIR="${D}" PACKAGE="${PF}" install
+
+ into /usr
+ dosbin contrib/bmclanconf
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING
+ docinto contrib
+ cd "${S}"/contrib
+ dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
+
+ newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
+ newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
+ # TODO: init script for contrib/bmc-snmp-proxy
+ # TODO: contrib/exchange-bmc-os-info
+}
diff --git a/sys-apps/ipmitool/metadata.xml b/sys-apps/ipmitool/metadata.xml
new file mode 100644
index 000000000000..741f1b487be9
--- /dev/null
+++ b/sys-apps/ipmitool/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sysadmin@gentoo.org</email>
+ <name>Gentoo Sysadmin Project</name>
+ </maintainer>
+ <use>
+ <flag name="openipmi">Use the system OpenIPMI implementation.</flag>
+ <!-- <flag name='freeipmi'>Use the system FreeIPMI implementation.</flag> -->
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ipmitool</remote-id>
+ <remote-id type="launchpad">ubuntu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/ipmiutil/Manifest b/sys-apps/ipmiutil/Manifest
new file mode 100644
index 000000000000..13f4c26ba8de
--- /dev/null
+++ b/sys-apps/ipmiutil/Manifest
@@ -0,0 +1,9 @@
+AUX ipmiutil-2.9.8-flags.patch 712 SHA256 5b217269c9d408a925679e131f95cbec9ad1c37863d7125145f0f03387b94124 SHA512 3caf226020e1fffc6c45cb549a066a034a58165415d5e325445f949042c1ac756b61949c78c30d0172983d95264a0ee2c9f829f1f5c8395e8fa1a48025f87dc2 WHIRLPOOL 0f901c692467a5029eef7283871f50cca1a28713096837f8f33dd9e317bde47ae2b8789b996dd8557e04e3f38aeb29c7df781311857ebb8bb230f17d492e1e21
+AUX ipmiutil-2.9.9-lib_symlink.patch 468 SHA256 323598c787dabc5f7075530b793e797aa0b5fedcc3fce27eae4fdd165c0d8b51 SHA512 35912b578b3e61e899f97d2fc6cd6352ac04da638c64c252aa71138d9b7fd1b1de474f2702febfb85ab3f5371971be7a1922a1c6bbe5960c04be2b9171f0e75e WHIRLPOOL a33baf521b540571fd2d10fa7cae388b5fb453c674864d459379ce1b22dfcfe03f061eb637c8b6e503d43aa53d3b312619437aae5471fa50030ad1f67a621764
+DIST ipmiutil-3.0.6.tar.gz 1692679 SHA256 36e04aa874255638be30a8a64443dde5cb002b456a2c1b7858d7669123ff77b7 SHA512 0c47246b7aa6a060091745d36e33aae07e7907dcad5fefb1759aac62adf48316915ce5818d2f9241e24b73be13e54fbb57046234a69c60ce56f41a933915580f WHIRLPOOL 5f8bbd35153667a1da3b62a1bad97a6f88a056c093878d1965bdaa80cbd8fc492805ea7acf92b8184d014b93fe8c38e4cd786e26a6e5c17e514c109568fcacc3
+DIST ipmiutil-3.0.7.tar.gz 1694854 SHA256 defc2fad88c184d953b5e37c42a95b0b14ed9772c097b00471e157be3e23542f SHA512 26a0c805f2c49102eee44052814a6f7af67c74082489e70b058bd4350526a65aad1e1352e33b12e1afeae5e9e96fd2eb361fc6a112d38782dee58f95c3e2a13b WHIRLPOOL c1f27992b95d8c6f76288ac35148c7c3ca7e72413adce44676e56c6dc50d1b9441c9a76d3f5d818d8767d11230d9341e2cc58c57c18ade271865a4784e3e8d0c
+EBUILD ipmiutil-3.0.6.ebuild 1334 SHA256 baefa7be4ffccda923f8002e634ab4e0803178156a05ee6f021823158b3d0d80 SHA512 a565e97bf6a0875a50033736a8172527f3a745e0ad45ff3d44eb985576e0d597585261bfbce779d552a6d0589ceadf6c453abcb9864e0ecac2867b9ceeacc18c WHIRLPOOL 7d5f42ca6373b6e1a4150f3ee19ff025010b8ae21c8ed664063f3b01a7f819180e7be14844e2acd1e006fb8262c7706de8b1ea3c5d6ba20f4b593cbdd582a0d3
+EBUILD ipmiutil-3.0.7.ebuild 1336 SHA256 6a432ec028bfbdfa5ae7c973c84a896b04dcbb446c42edc06d1da6a84c3ff96b SHA512 4893b8f52d6e3f4502394f39ce7d622575d73c247315c8752aa6924972e98086e6332bf58c3c2797cbd71b5e1fdc2920ddfe2304401d9d822006343f2cc053be WHIRLPOOL c611aaa6abded5b74f0596412c040fae349da9b0b74bfd4840971e5e2d0fb7174a258da811bb2dd9ca4be82c85cff2f3893726d0637da10711ea6c1238eeb019
+MISC ChangeLog 4286 SHA256 391251458ef847b8ccf6279e4c7b840d113bb40cdde4657dd63aee247744a18f SHA512 8151bd399314bcdf3f493347e6e5b41b83d5d7f434ae0bce37d4408a73f939e02328d2d742afdb22861b6e71270e1cef8758326387c0f43a17308fb8b9e03015 WHIRLPOOL 40637ac59c4acd190596b35ff82624aee3bcf1e19dfc494a33a06df6f3c71d810369db651defbff51194c0c2a2f5b22678b10a0389833f08c783633bd3f773b0
+MISC ChangeLog-2015 4083 SHA256 93ad6cd7f11edea8d16272793a4596e4a7870abb84aaf85fd05598ba8bccb921 SHA512 e74b32ed308730b63edb5d4e2f57d345885ee216d5a7bb58e7c194d32e9c7de0e218f40c9a8429a1b35771a09a970bdcac380bda3113807b47eabfa21b2652f4 WHIRLPOOL 8a3ea5d9438db71fbfa7673ee141621bbe0b3f5b428c8608eda41cd3863a4f43de33b45a1f6ef2e2c86e510d92a72f19aa1cebbf4b83b9a94fb9a666c4d71aba
+MISC metadata.xml 337 SHA256 e4c15ab71280a8d8e6a9cfd3ebc198560a9cc2d8ca8fd6ee8f84934a7f581134 SHA512 85f9992b8c7fddbffe99cba761637a897e7ba68f70762f882c039c6492feefefa6bd1ca38fbc73d0a214d04ddb07f5f0ea2106552e4133736d4594e43fae4845 WHIRLPOOL 8d547e14f49666f268966fb3f38c84c980561a12b3cc8d6626b1c1e8a20053663f5f66f1ed3362e2282d8f4ce58688d09eba237f06a77e0255928cb30d5e0e22
diff --git a/sys-apps/ipmiutil/files/ipmiutil-2.9.8-flags.patch b/sys-apps/ipmiutil/files/ipmiutil-2.9.8-flags.patch
new file mode 100644
index 000000000000..ee9917406207
--- /dev/null
+++ b/sys-apps/ipmiutil/files/ipmiutil-2.9.8-flags.patch
@@ -0,0 +1,20 @@
+--- ipmiutil-2.9.8/configure.ac
++++ ipmiutil-2.9.8/configure.ac
+@@ -162,7 +162,7 @@
+ LANPLUS_CRYPTO=""
+ LANPLUS_SAM="no"
+ LD_SAMX=""
+- CFLAGS="-O2"
++ #CFLAGS="-O2"
+ SUBDIR_S="doc scripts util"
+ if test "x$cross_compiling" = "xyes"; then
+ # cross-compiling, so link with -static (e.g. Android ARM)
+@@ -334,7 +334,7 @@
+ fi
+ rm -f $tmpc $tmpo >/dev/null 2>&1
+ echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
+- cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
++ #cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
+ echo "int main() { alloca(100); return(1); }" >$tmpc
+ $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1
+ if test $? -ne 0 ; then
diff --git a/sys-apps/ipmiutil/files/ipmiutil-2.9.9-lib_symlink.patch b/sys-apps/ipmiutil/files/ipmiutil-2.9.9-lib_symlink.patch
new file mode 100644
index 000000000000..6581a4492af2
--- /dev/null
+++ b/sys-apps/ipmiutil/files/ipmiutil-2.9.9-lib_symlink.patch
@@ -0,0 +1,11 @@
+--- ipmiutil-2.9.9/util/Makefile.am
++++ ipmiutil-2.9.9/util/Makefile.am
+@@ -199,7 +199,7 @@
+ @INS_LIB@ cp -f $(DEV_LIB) $(DESTDIR)$(LIBDIR)
+ @INS_LIB@ if [ "x$(SHRLINK)" != "x" ]; then \
+ @INS_LIB@ cp -f $(SHRLINK) $(DESTDIR)$(LIBDIR) ; \
+- @INS_LIB@ cd $(DESTDIR); ln -sf $(LIBDIR)/$(SHRLINK) $(DESTDIR)$(LIBDIR)/$(SHR_BLIB); \
++ @INS_LIB@ cd $(DESTDIR); ln -sf $(SHRLINK) $(DESTDIR)$(LIBDIR)/$(SHR_BLIB); \
+ @INS_LIB@ fi
+
+ clean-generic:
diff --git a/sys-apps/ipmiutil/ipmiutil-3.0.6.ebuild b/sys-apps/ipmiutil/ipmiutil-3.0.6.ebuild
new file mode 100644
index 000000000000..e157b5eb274c
--- /dev/null
+++ b/sys-apps/ipmiutil/ipmiutil-3.0.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools systemd
+
+DESCRIPTION="IPMI Management Utilities"
+HOMEPAGE="http://ipmiutil.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+
+RDEPEND=">=dev-libs/openssl-1:0="
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.9.8-flags.patch
+ "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
+ sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-systemd --enable-sha256
+}
+
+src_compile() {
+ # Ulgy workaround. Upstream is misusing the make system here
+ # and it doesn't even work.
+ # Please check on each bump if this workaround is still required.
+ pushd lib/lanplus &>/dev/null || die
+ emake || die "emake lanplus failed"
+ cp libipmi_lanplus.a .. || die
+ popd &>/dev/null || die
+
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
+ dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
+
+ # Init scripts are only for Fedora
+ rm -r "${ED%/}"/etc/init.d || die 'remove initscripts failed'
+}
diff --git a/sys-apps/ipmiutil/ipmiutil-3.0.7.ebuild b/sys-apps/ipmiutil/ipmiutil-3.0.7.ebuild
new file mode 100644
index 000000000000..9f90df500d29
--- /dev/null
+++ b/sys-apps/ipmiutil/ipmiutil-3.0.7.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools systemd
+
+DESCRIPTION="IPMI Management Utilities"
+HOMEPAGE="http://ipmiutil.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+
+RDEPEND=">=dev-libs/openssl-1:0="
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.9.8-flags.patch
+ "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
+ sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-systemd --enable-sha256
+}
+
+src_compile() {
+ # Ulgy workaround. Upstream is misusing the make system here
+ # and it doesn't even work.
+ # Please check on each bump if this workaround is still required.
+ pushd lib/lanplus &>/dev/null || die
+ emake || die "emake lanplus failed"
+ cp libipmi_lanplus.a .. || die
+ popd &>/dev/null || die
+
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
+ dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
+
+ # Init scripts are only for Fedora
+ rm -r "${ED%/}"/etc/init.d || die 'remove initscripts failed'
+}
diff --git a/sys-apps/ipmiutil/metadata.xml b/sys-apps/ipmiutil/metadata.xml
new file mode 100644
index 000000000000..8626cad24f54
--- /dev/null
+++ b/sys-apps/ipmiutil/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 type="project">
+ <email>sysadmin@gentoo.org</email>
+ <name>Gentoo Sysadmin Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ipmiutil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
new file mode 100644
index 000000000000..6b406977558c
--- /dev/null
+++ b/sys-apps/iproute2/Manifest
@@ -0,0 +1,29 @@
+AUX iproute2-3.1.0-mtu.patch 1649 SHA256 d8d1d3b81a3fd5674e6c9e202bce9e84f41b579ba2c6a554df3346f4642715af SHA512 5479c2085b4aca958a89d3e265ebc3763c9e7cb273bd4046d7b7585209739f75ff04cc9b84d8eb9e3afae821ff788f0f0c7ab443260ab07943b6fad6946403e1 WHIRLPOOL b813f1d9dcdbfb525fb07a462f7faf1c13117dd3e9e584b1a033cb69f3dad9d4b8e5120f8512185f24769e6be0aabd6635ad3996342dc210ff513866e7638502
+AUX iproute2-4.11.0-no-ipv6.patch 1360 SHA256 4fd3e61e00805a83a9874586738af1eed617c2845dd49254c7886e44c432de11 SHA512 8e548f19079eea1d3a5a91bb657bba961c9e9206147e0e0aea1aaf04d74b46e2687c906b78561d939f53f4a33ecb9e08ad8237f401068076df5842c78bc3b577 WHIRLPOOL 46864c98b8cb79dd0f811d75271937c4cef9eb5eb4ddd9996a8ca510b030fc59fe2e39ce6666bc584f097a81c1d146af3550d20767bcf347e9315fa22e890667
+AUX iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch 1178 SHA256 6f7c4d6d024e94a26c50c404317bca1838f1bd72d36e5332f8615976db5b8420 SHA512 e433276513faabad15939fe7b716d8677211ff739a6b791c3bd4aa0014aae053a89395545fd55534f2fc16502d8d84bfc6b0ccf0154497a03e30947e4070f3af WHIRLPOOL 48331d1dbc7673f46df6880fb43ed5cfd9a31caf2f3481839c5b8abaccb9ab9b8569172140c845ff9f03941afd64320119f0f704ee689e312b53ed40ba26fae0
+AUX iproute2-4.2.0-no-ipv6.patch 1336 SHA256 b352b11d22e922038adb2b1ae083b6e47b89744f94d6de732bb85abd9cfa80e6 SHA512 f4219a094f367c9f8fac089beeffca31abbbc5d4ade1681e23a92f3dd2e1a95f331322938936b0b1771ea5a56224e0f14008f4d38a8708357a5d2b2b70efbbd5 WHIRLPOOL 35faf6227ad1b4409b6742cb754b6570c25f65bd6a63e2237fd9613075827811bd1b9e86dd5d099b061e14906f752ef5aecea8ccbe95748d98f892d111a3a0b7
+AUX iproute2-4.5.0-no-iptables.patch 1022 SHA256 b6f69d8123e034d1be462d6672f8f59915f6e25b890c8d3068a1e0af658a85e1 SHA512 3a3e7a66f1528dc8d03fc6a13f363ce890d0c23c2ab8df966144d8764e95cafca168bdb7dd79cf1a8dd1e54be36939f2e6465ca6176e3bfedd222eb29901f98e WHIRLPOOL 42351420125199e5149d321d583fcc967ec253f1aa7f338757c38849e841c9c89f7f8861f36803a3a849a0454c0fdc605d50549eeebaf97c1aba0fe770e6cd4e
+DIST iproute2-4.10.0.tar.xz 626944 SHA256 22b1e1c1fc704ad35837e5a66103739727b8b48ac90b48c13f79b7367ff0a9a8 SHA512 e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b WHIRLPOOL 7034f87835b13d275d2e065ee00d869060ae20c7dd325d8974da414db20328195e5968ede2f0b6925ddf67de3712b5945f54276c6ce5c8367ba28520c2adb859
+DIST iproute2-4.11.0.tar.xz 657100 SHA256 72671028bda696d0cb8f48ec8e702581c3a501caeed33eec3a81d7041cbc8026 SHA512 e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa WHIRLPOOL 9bf25b018d3f392a2e2f4faf4c3877f52ec4b0aebb082d9c2e2c3e80c0c8f3885c122c5d211c4c6ef014506d786213b36938728f63b581079274a3116fc85581
+DIST iproute2-4.12.0.tar.xz 662424 SHA256 2e0a4c4262d9f6c169885a6e16c4c5c5f1ef6fd57b6a0e7b41f42be5bb6ebd7d SHA512 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0 WHIRLPOOL 590cc191e96ff0b777373603186e4416f064931d529878ec783759f31fd99e1119bb0604e8a89dc98d350f80eca2bfef05a13bca7ce24302408072002c0b17b2
+DIST iproute2-4.13.0.tar.xz 670340 SHA256 9cfb81edf8c8509e03daa77cf62aead01c4a827132f6c506578f94cc19415c50 SHA512 f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a WHIRLPOOL 757247f1356eef49b299019f6d1809e5d781471665daedce885201b7034a6138def73c84ba2f0453f2f0f5d55cc2edf778992b3d79d06e01364c511373ea4644
+DIST iproute2-4.4.0.tar.xz 528552 SHA256 bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514 SHA512 48236fc6103a55d977efa4f93ad7fdfc0944df975ce771d57fd3dcfb13b761b0c05dbe749978ac86c7a471d023bee62a2f1648a6ca75f50da9252acfde174b69 WHIRLPOOL 7e90c98805e12b28de284bb998e5a27cf524a78d0bd7632c0d49a7ddff8f11f5229ac6867076e9fea6f21b6b31360bddb21138673d94de766bdf7324a09bc013
+DIST iproute2-4.5.0.tar.xz 554500 SHA256 3f15292f53e465cb5bd6652961343ca64eb6936309ae75be5d5a541435bc494a SHA512 d12be24cf7a1102be8e449d1e95fa67b784d505e98fcf2f18caedf0136fb378dc439f74a75bc0d6ef5b2893e5ca1968e122054404c1f4d1a212aeb0fba1c5860 WHIRLPOOL dc660bde36fed126b27fb69a59c02405b5299b92a6b519ebdce74d817f88be82114bb10217ca34bbc26a89e664ff243e606a84bcb00db41088bce824542def40
+DIST iproute2-4.6.0.tar.xz 570960 SHA256 74fc6a8ad085be095a159f8158bbaf385b42af9e101619f233f1ae466829d406 SHA512 1e3868ced65012da6724744eb15e6bb8e2c5bf8d7a46cf2b655526de1a9e1224c7b7e9bd4a88e40516b5648955987eb9001600ca5afbd507bc664f92b51ede9f WHIRLPOOL 1b0ff7988d6d5567137aca9d41e2cc3183f3620f8b874113ff9e6ca9508349550e388e423c54b165e73ed54ccb7a366ef8d032a930f27722eccbd5ff6879032e
+DIST iproute2-4.7.0.tar.xz 589928 SHA256 8f60dbcfb33a79daae0638f53bdcaa4310c0aa59ae39af8a234020dc69bb7b92 SHA512 dd884b192ede7f165d565dce6819fb7280eda880d4d53e06a604ab20e7ce343ba37847750172fd52061892e9db3d18bd8ae13d37bd4410e50a8f704cb3fe4ece WHIRLPOOL 191335f76f816ec1c86b2b9cac398129a475993e5a6366d0d0a35287eb07ae61d873e1a8a25a0083b28953011d8dfd492e7a718bacfd7f872130cdb2e3a5729d
+DIST iproute2-4.8.0.tar.xz 594636 SHA256 a30959c8421bc8ef42719bed41d14e1d7cfdbad80d7d70c5c42ad31f2c2cb389 SHA512 9b9db053e5d6ae2e7dd17870a3081ef61788a7eeb07473430e1a26c3c948123d33840bd6bb81b4a553ac6913ea89f02ac2a1b7d52ced65523a43991f03e84f49 WHIRLPOOL 83015c0bcfc6739ce688307a6824047910d453265883d4fbb9bec67c8720a5f478d2d72e5095ffc75191e64f3525a25f019032f20fc428b622e4a5c1b8fcbe3d
+DIST iproute2-4.9.0.tar.xz 613032 SHA256 c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4 SHA512 0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889 WHIRLPOOL 83c8d42ef43f42a58835ff3b1df7460c67db4de1ae9d5df775d8aa15bfe2c488a626dd40c4327c2772436ed88bea1a1f57a953cd6bf650955465e76aec9476a2
+EBUILD iproute2-4.10.0.ebuild 3924 SHA256 3b339a51a5fd169b0c52c19420efbd94372938995253c4b143802b81c4ec6df2 SHA512 cea19fd7cd56201c2218ffa5bca8b5ab1a4c7f46b3f905274e330481ace21dda1083caee5840a821fc39a17293a373f1db2c97370c203f1d6091db06818c024d WHIRLPOOL 7b6459a4949db287e2ea38dcdb4dbaaf3df6389ea2b511c1c9c5962ae7353ade3e2fe052a5b32cca46dbb9a317ddff4a1f2cd664bb31cd474fb9f6bc97f8de0a
+EBUILD iproute2-4.11.0.ebuild 3925 SHA256 cfb0ed2bbcc11f910d4d54e082c9f9a8b7e93d365f03ab3934b498dcfdcb3090 SHA512 73ed00526600bd301c6a1c492755f106d865b7f8e66c108ce73ba11983f6c312897e7bd838b6c97dc449a4084ff8db658d0d234e2b1b8630fef8606763145f0e WHIRLPOOL 54dc2b4bf7701cb5d68ec087ee57a99a4bb7f992429d5cf5548e30fa636a898b9ee1df256bfab20e7987b1c7825aec3f416a518b0067858a6e2e140fddbad3bd
+EBUILD iproute2-4.12.0.ebuild 4151 SHA256 8da18d0644c1884e71d832d8a025296f7dcfe64792d4b5b36b9f781bc857e807 SHA512 693dd7b0a789808df696bb6dd00a8b116fb8d316049c072c01969a50c340339fe47155c24b5024fdc84d932fa0d78572f3054f8ee3c3131e8815821b9d49e117 WHIRLPOOL 534a335da8acc819bcc35893dab908f0cd80c685d996579cd305930c62631c404f86b995e3d24ed0d154aa4f17aff45751e812aa283f269a9b05aaf56c19b97f
+EBUILD iproute2-4.13.0.ebuild 4152 SHA256 c9a12602ea8108a64f409815c33ba2079d761c81a67d344fe46ecc6223615ce3 SHA512 c5658a84ee43d217f2ecfc12d4cd49c0a786de6fcc6ae761246cb1037b871f4df78f4eb9b4b9a29833548a657199e1f7945e3ece12a3368e8dccebce8b9f1126 WHIRLPOOL 18810a01d03fa585f2073ec8b92f3fca423242bcf62fb9e11a3e46fb006f30a4cab930b5ced823e2b7825145856e672f92cfb5c40b8dc3d7d6b3b60f1d138f25
+EBUILD iproute2-4.4.0.ebuild 3812 SHA256 debc018e39311c813eee804dc3a4282a537b6218672aed54f9429a9ad2f3592b SHA512 d99440593d086b917f2609cc49059a4a5bc52db916cebff2a283d3e2c6123c69a95d56e4a74e5b155b238e8f0099ef500dcfbc58f4e68b6ba213fbd7a4e7ae50 WHIRLPOOL 7ca917a647f28996e56363dba5cc16bd387d1e42788a6605fff7eb81e122cd6d1fe1b232802c7e58de38dd0fc9b310054971b503d365267f332aedfc91ddb576
+EBUILD iproute2-4.5.0.ebuild 3825 SHA256 30a5b73a154073434ae226ba712b64f97aa3087fd2dc4a0bced65ea861186845 SHA512 a9b67ca2b18b209bad3bd608543bd77890a0339ac9e0cf858d8bb3c6a0dba75e574441366df9f1dfed47d2ba5c2d1f59a686771120cccad571bf30201ca5a07d WHIRLPOOL 5a754c72a08025aea2e2cbd769eb59657f0b4d951c79aa6139acb1b5954c0d4f8b3be35987595968004fd01f916b62d7d3c7248095d862def99fdf431af14478
+EBUILD iproute2-4.6.0.ebuild 3935 SHA256 4cff6652032330e999e738cf59199c89378f40fdfd604c3f2a955ab1e2060f2e SHA512 9c492347beda71bc69bfb176bc3dcb3668b7c2545d0afac3a95ba7672f0daf1c3b25607864c8f7d41cbac522f0b0a9fdf9a5795f7e05e1ea08be94253f498778 WHIRLPOOL e181a0390db67cc02190fc50ae1028fc5ec4fc656c35ad4db092b3b340cf795d96ebb4ea4865afa28c1b58f9308a758c60aade6eeddd8048164a068c23447d64
+EBUILD iproute2-4.7.0.ebuild 3936 SHA256 e77a400092f03b5e14364c6d5b8a4746cb82576b70d8a3054be3dfc632b424cd SHA512 d2deb8619c39c367f991eca5368fdfd91c33c595097bace1ad27a935e2cbe76602330cdebeb47603a5cd1db3ebead5426f115d3a621693a4ea8a48f7fe8af48f WHIRLPOOL dd240407de10f16295befb8059355d5db8fc1c071c415ba525a4c3684fab4e619150f2c4a887370cb15b5d0fb5e1d35aeef9cbd3773d7603891f83c03cf065d0
+EBUILD iproute2-4.8.0.ebuild 3936 SHA256 e77a400092f03b5e14364c6d5b8a4746cb82576b70d8a3054be3dfc632b424cd SHA512 d2deb8619c39c367f991eca5368fdfd91c33c595097bace1ad27a935e2cbe76602330cdebeb47603a5cd1db3ebead5426f115d3a621693a4ea8a48f7fe8af48f WHIRLPOOL dd240407de10f16295befb8059355d5db8fc1c071c415ba525a4c3684fab4e619150f2c4a887370cb15b5d0fb5e1d35aeef9cbd3773d7603891f83c03cf065d0
+EBUILD iproute2-4.9.0.ebuild 3924 SHA256 c2e562740d38b09f06c83d3a3955b3454a80a6b78d828c178b82f766a0b39c02 SHA512 2f3166465cee52ae3b798ddf1b08ae00305fcb5a83983fb4140114aef0a101cc05909d6b59bef089d2208f3a31200475df6e6afcb780ca07c1ac2bf80dcb2eae WHIRLPOOL c0abe028cb533f08eb25182ec23f8e646addbec67318d8854a075bcfa469fb43474b228b15e1c8f1e939091a1a37cbcfe308983e92effb7d34aec0999076828e
+EBUILD iproute2-9999.ebuild 3790 SHA256 7af583574e3f72b875440962d45518fefe7c096300b3ec3dbd5bf3146f98f3eb SHA512 f70f7887c4adc059bd439f8a780f01f6cef6ed9d4327a03b6cf4afe474d1ce98fcdfdfa48c8cd6e7d7a8b6fa9b98a1e89e89da8c81ed37d22a069fdef062ec35 WHIRLPOOL 9a1c9cd41ad96b06d74c1bda2efb69c4627eed398d8a012a8751c99f1fe421aa7c45130923305e26de2000c90258d2a55d8c47ca8c7baab5b386ef83199bba06
+MISC ChangeLog 12066 SHA256 f5f9540bc0cf316e7fa96d93335f89cc8f4d55b0d851258543d35aec0ed7782a SHA512 cfde56050dccbe76282284f9a814042fb5bed20fbf55609eb0d36dc133356b811453ff4e9eb3a02496f4f8586f34a1c1e81a369d5f07208db94947370298f748 WHIRLPOOL 150dbda7137b97fef8bec153867a3f1cb715aed1368b239fbf31939377530c8e14b59506d18a8f07890620fa48e55bcc45e1df2fda696c3dbe6e134d098410d0
+MISC ChangeLog-2015 44123 SHA256 02a46c92f3bc47dbd131de2afe816a0fd77c314dcc25546c5f6918bddc79803f SHA512 2dd40095e9ac5f6af5a91162ce62d71dffd3af8f47fa41d6b9c3f89a1d2fa376bd152df0f04a968d7b11acb8dbfccb6f144f5b0ecc3a2a190d33389797e69505 WHIRLPOOL a5a52e3b3bdb3a21e71cb2ec61d009dc2e664922e4017d1937ea6e858e9340fb8a99032b4c36a91fe0b26bf1a186fa5d96b96562382a578a2f731f563e0f12f2
+MISC metadata.xml 467 SHA256 54932243a153c9130ca1862f0dce70ac6fff517e9b5c22f10e6d044ac3679e86 SHA512 34c134b1a8ee152382b9fe9872df3d15d32ec3822ba215c8b21e948b8313e2e3d045468b873b7958681e92265d57ce25455e03f4d8e6be4e882943e54331cd7c WHIRLPOOL 188528c73a6a8b90a0e69bab32d24a05e41c6695f559da91ead84be331769f47864ca6e88a7f1a31619da51e53b7fdd8a23735ff576098998eac6f1a9d24feb1
diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
new file mode 100644
index 000000000000..fa12dad2d79e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
@@ -0,0 +1,48 @@
+http://bugs.gentoo.org/291907
+
+This patch was merged from two patches extracted from this thread:
+http://markmail.org/thread/qkd76gpdgefpjlfn
+
+tc_stab.c: small fixes to commandline help
+
+
+tc_core.c:
+As kernel part of things relies on cell align which is always set to -1,
+I also added it to userspace computation stage. This way if someone
+specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
+end with tsize supporting mtu 4096 suddenly, New default mtu is also set
+to 2048 (disregarding weirdness of setting mtu to such values).
+
+
+Unless I missed something, this is harmless and feels cleaner, but if it's
+not allowed, documentation will have to be changed back to 2047 + extra
+explanation as well.
+
+--- iproute2/tc/tc_core.c
++++ iproute2/tc/tc_core.c
+@@ -155,12 +155,12 @@
+ }
+
+ if (s->mtu == 0)
+- s->mtu = 2047;
++ s->mtu = 2048;
+ if (s->tsize == 0)
+ s->tsize = 512;
+
+ s->cell_log = 0;
+- while ((s->mtu >> s->cell_log) > s->tsize - 1)
++ while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
+ s->cell_log++;
+
+ *stab = malloc(s->tsize * sizeof(__u16));
+--- iproute2/tc/tc_stab.c
++++ iproute2/tc/tc_stab.c
+@@ -32,7 +32,7 @@
+ fprintf(stderr,
+ "Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
+ " [ overhead BYTES ] [ linklayer TYPE ] ...\n"
+- " mtu : max packet size we create rate map for {2047}\n"
++ " mtu : max packet size we create size table for {2048}\n"
+ " tsize : how many slots should size table have {512}\n"
+ " mpu : minimum packet size used in rate computations\n"
+ " overhead : per-packet size overhead used in rate computations\n"
diff --git a/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
new file mode 100644
index 000000000000..fc855dcf2209
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.11.0/ip/ipmonitor.c
++++ iproute2-4.11.0/ip/ipmonitor.c
+@@ -114,7 +114,6 @@
+ }
+ if (n->nlmsg_type == RTM_NEWPREFIX) {
+ print_headers(fp, "[PREFIX]", ctrl);
+- print_prefix(who, n, arg);
+ return 0;
+ }
+ if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+--- iproute2-4.11.0/ip/iptunnel.c
++++ iproute2-4.11.0/ip/iptunnel.c
+@@ -589,13 +589,6 @@
+ break;
+ case AF_INET:
+ break;
+- /*
+- * This is silly enough but we have no easy way to make it
+- * protocol-independent because of unarranged structure between
+- * IPv4 and IPv6.
+- */
+- case AF_INET6:
+- return do_ip6tunnel(argc, argv);
+ default:
+ fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
+ exit(-1);
+--- iproute2-4.11.0/ip/Makefile
++++ iproute2-4.11.0/ip/Makefile
+@@ -1,6 +1,6 @@
+ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
+- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
+- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
++ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
++ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.o \
+ ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o \
+ iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
+ iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \
diff --git a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
new file mode 100644
index 000000000000..48cae701438e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
@@ -0,0 +1,38 @@
+From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 18 Jul 2017 14:09:06 +0300
+Subject: [PATCH] Fix build with uClibc-ng
+
+Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of
+version 1.0.25, the uClibc-ng netinet/in.h header does not provide this
+definition. The kernel provided definition is masked by libc-compat.h. Add
+this local fix until uClibc-ng syncs netinet/in.h with glibc.
+
+This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from
+linux includes)
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: non upstreamable; local uClibc-ng compatibility fix
+---
+ ip/xfrm.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 54d80ce5e949..50b85550fb45 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -30,6 +30,10 @@
+ #include <linux/xfrm.h>
+ #include <linux/ipsec.h>
+
++#ifndef IPPROTO_MH
++# define IPPROTO_MH 135
++#endif
++
+ #define XFRMS_RTA(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
+ #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
+
+--
+2.13.2
+
diff --git a/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
new file mode 100644
index 000000000000..b29e1aa3e118
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.2.0/ip/ipmonitor.c
++++ iproute2-4.2.0/ip/ipmonitor.c
+@@ -115,7 +115,6 @@
+ }
+ if (n->nlmsg_type == RTM_NEWPREFIX) {
+ print_headers(fp, "[PREFIX]", ctrl);
+- print_prefix(who, n, arg);
+ return 0;
+ }
+ if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+--- iproute2-4.2.0/ip/iptunnel.c
++++ iproute2-4.2.0/ip/iptunnel.c
+@@ -637,13 +637,6 @@
+ break;
+ case AF_INET:
+ break;
+- /*
+- * This is silly enough but we have no easy way to make it
+- * protocol-independent because of unarranged structure between
+- * IPv4 and IPv6.
+- */
+- case AF_INET6:
+- return do_ip6tunnel(argc, argv);
+ default:
+ fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
+ exit(-1);
+--- iproute2-4.2.0/ip/Makefile
++++ iproute2-4.2.0/ip/Makefile
+@@ -1,6 +1,6 @@
+ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
+- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
+- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
++ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
++ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.o \
+ ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
+ iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
+ iplink_macvlan.o iplink_macvtap.o ipl2tp.o link_vti.o link_vti6.o \
diff --git a/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
new file mode 100644
index 000000000000..7ed9dfbad248
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
@@ -0,0 +1,42 @@
+--- iproute2-4.5.0/configure~ 2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/configure 2016-03-17 13:24:17.634743197 +0000
+@@ -169,10 +169,25 @@
+
+ check_ipt()
+ {
+- if ! grep TC_CONFIG_XT Config > /dev/null
++ if grep -q TC_CONFIG_XT Config
+ then
++ return
++ fi
++
++ cat >$TMPDIR/ipttest.c <<EOF
++#include <iptables.h>
++int main() { return 0; }
++EOF
++
++ if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \
++ $(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1
++ then
++ echo "TC_CONFIG_IPT:=y" >>Config
+ echo "using iptables"
++ else
++ echo "no"
+ fi
++ rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
+ }
+
+ check_ipt_lib_dir()
+--- iproute2-4.5.0/tc/Makefile~ 2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/tc/Makefile 2016-03-17 13:18:18.686689985 +0000
+@@ -88,7 +88,9 @@
+ CFLAGS += -DTC_CONFIG_XT_H
+ TCSO += m_xt_old.so
+ else
+- TCMODULES += m_ipt.o
++ ifeq ($(TC_CONFIG_IPT),y)
++ TCMODULES += m_ipt.o
++ endif
+ endif
+ endif
+ endif
diff --git a/sys-apps/iproute2/iproute2-4.10.0.ebuild b/sys-apps/iproute2/iproute2-4.10.0.ebuild
new file mode 100644
index 000000000000..2408101d5574
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.10.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.11.0.ebuild b/sys-apps/iproute2/iproute2-4.11.0.ebuild
new file mode 100644
index 000000000000..74f13e141827
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.11.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.12.0.ebuild b/sys-apps/iproute2/iproute2-4.12.0.ebuild
new file mode 100644
index 000000000000..3443e720d929
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.12.0.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+ !net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+ ${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+ )
+ fi
+
+ # Local uclibc-ng compat fix until uclibc-ng upstream can sync
+ # netinet/in.h with glibc. Resolves #626546.
+ if use elibc_uclibc ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.13.0.ebuild b/sys-apps/iproute2/iproute2-4.13.0.ebuild
new file mode 100644
index 000000000000..fa700784bd61
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.13.0.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+ !net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+ ${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+ )
+ fi
+
+ # Local uclibc-ng compat fix until uclibc-ng upstream can sync
+ # netinet/in.h with glibc. Resolves #626546.
+ if use elibc_uclibc ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
+ )
+ fi
+
+ default
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX%/}"/$(get_libdir) \
+ SBINDIR="${EPREFIX%/}"/sbin \
+ CONFDIR="${EPREFIX%/}"/etc/iproute2 \
+ DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX%/}"/usr/share/man \
+ ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
+ install
+
+ rm "${ED%/}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED%/}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.4.0.ebuild b/sys-apps/iproute2/iproute2-4.4.0.ebuild
new file mode 100644
index 000000000000..39aca2ca93ee
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.4.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ use ipv6 || epatch "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+
+ sed -i \
+ -e '/^CC =/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.5.0.ebuild b/sys-apps/iproute2/iproute2-4.5.0.ebuild
new file mode 100644
index 000000000000..2d253c67279d
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.5.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ use ipv6 || epatch "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+
+ sed -i \
+ -e '/^CC =/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.6.0.ebuild b/sys-apps/iproute2/iproute2-4.6.0.ebuild
new file mode 100644
index 000000000000..2b8c4aa156af
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.6.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ "${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC =/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.7.0.ebuild b/sys-apps/iproute2/iproute2-4.7.0.ebuild
new file mode 100644
index 000000000000..ae4dae713852
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.7.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ "${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.8.0.ebuild b/sys-apps/iproute2/iproute2-4.8.0.ebuild
new file mode 100644
index 000000000000..ae4dae713852
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.8.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ "${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-4.9.0.ebuild b/sys-apps/iproute2/iproute2-4.9.0.ebuild
new file mode 100644
index 000000000000..c0bb3e0c3f59
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.9.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+ !minimal? ( net-libs/libmnl )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.16
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+ )
+ fi
+
+ epatch "${PATCHES[@]}"
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
new file mode 100644
index 000000000000..ba7c88b2ac9b
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+RDEPEND="!net-misc/arpd
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ iptables? ( virtual/pkgconfig )
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-3.7
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+ )
+ fi
+
+ default
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^WFLAGS/s:-Werror::" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ # don't build arpd if USE=-berkdb #81660
+ use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ # We've locked in recent enough kernel headers #549948
+ TC_CONFIG_IPSET := y
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX%/}"/$(get_libdir) \
+ SBINDIR="${EPREFIX%/}"/sbin \
+ CONFDIR="${EPREFIX%/}"/etc/iproute2 \
+ DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX%/}"/usr/share/man \
+ ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
+ install
+
+ rm "${ED%/}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+ dodir /bin
+ mv "${ED%/}"/{s,}bin/ip || die #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
+ fi
+}
diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml
new file mode 100644
index 000000000000..0fa0b4cd78c5
--- /dev/null
+++ b/sys-apps/iproute2/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="berkdb">build programs that use berkdb (just arpd)</flag>
+ <flag name="iptables">include support for iptables filtering</flag>
+ <flag name="minimal">only install ip and tc programs</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/irqbalance/Manifest b/sys-apps/irqbalance/Manifest
new file mode 100644
index 000000000000..7f35b1e4750a
--- /dev/null
+++ b/sys-apps/irqbalance/Manifest
@@ -0,0 +1,14 @@
+AUX irqbalance-1.2.0-tinfo.patch 894 SHA256 9e6672fd1a308eefed1a694a06441caaade3508ea52c3dba4bd2751b49332a9a SHA512 28306e3af22e039edfad83e9aa37539b5491daf2ba663dd6bbe6419a369c1f4c8bf10025ce938495973415cee288a4bca22586d26fa5f66f57ee9fb234e5b7ac WHIRLPOOL 5313d95e0b07474e11dc53c0f65d693ed2fe8b28ebfe328c01440b375f591b06f2cfbbec0624c510e25225dc4283bdefc6187c86621cda2eb0e59fae79c015e2
+AUX irqbalance.confd-1 577 SHA256 98bb18cd977a0706c3e63a36a7dfb2aa01cd84cabb719da0ea5bf795e5d02413 SHA512 90e7ed187b4dccd6f6c4383ba54d6e1aed1645240e44aaf02db1b70b56594b1a828644d671e6db91212417981b1d5e53d1ecfd4b366496dbcb484d1064d7d24c WHIRLPOOL 886d2d5ea0a4a3de4243bebd8bd15b4a4eafd1d22cf94549fcccf02c8b8cb536b013572327c08fd149c475085dd5059dc97cb5a5a13662cc1443b1e4133d88e8
+AUX irqbalance.init.3 670 SHA256 99e6df956b06727631580cf3794c1325b09f4a2daf7c3033701726da06a1c0e9 SHA512 88c3902015c6ce2d0ed2f1e41b0239c3ff68a14c4e1879c9670111d5ed7f7e37dc61915f109998527b74331ced06e48d42fc0b5c9185c2280f116706ae108b7e WHIRLPOOL dda4f7544bed9f4038e4c484890f8eff29eae9c73a17d5e8ba7e31525573f1203c4082c76059188dff7a759217d00769b76fe7533ac961ac0508fd6692403a44
+AUX irqbalance.init.4 524 SHA256 dfbc374988068bf5a3302577a7327d8a92d4007a9aee755879e244a10d50e98f SHA512 3b438b142915139d403f6162271e00807db6f0e9432798b3f2955e798dd58ecb07a6c8920cc85032e65cc5a6d4c16fc65402119d6334920ea6715c4f918f6cbc WHIRLPOOL 06dfba53595a8fd48b3dc8436f9e03f153e63c49c62d22b8be1b94c79c649b730142675cf01ab9e48df06dff7aa9c46a8a1be5656f876fee985061a230dca5e8
+AUX irqbalance.service.1 135 SHA256 4e2ed8291b511a25d5621d848e0e1944bb82e14acba4d2b9596d2bcb28ad8475 SHA512 c0ed7187eddef54645196d0ff072445decfa3ce358aa3d473aac685b55a2f2580bf45bab34b68ccbc2035a3db8597af8cc1f8e53981f5afe7d63f6f7f5683cbd WHIRLPOOL a35e0517e4bb5788f7654191691b1c85a9d1f1b2aac3ea439dadc653accfe65275f4a58c889c263af68a81d8426e1fde6a854d04d0ed5932eb28527e52b9e035
+DIST irqbalance-1.0.9.tar.gz 44661 SHA256 f1b8115948bb9f0bc36b9d7143ee8be751a294bc189d311408e753acc37169c3 SHA512 ef3ce9eeec11ec86291e2e3cd701e782ee1fb4ba256e2ea5ea0ea04b373f97ff2eae0a44919127c4dbd7fd805e9e3df3a5e62a3528e4d1c9bbab4db39186b5c5 WHIRLPOOL 7bed3d8dd868b4ad697b997143a59b9101815d0bfc08d1d594248c1fcfeaec22045fbe779605583a89aa7d2c8a54e079317bf8a6e4ef8135fc887e2d1518e706
+DIST irqbalance-1.1.0.tar.gz 46742 SHA256 91506e638b03bf27cf5da7dc250d58a753ce8a0288a20265fc7ff0266040706b SHA512 66abf71b87e25df190417afbf9da24d826d817de3c0ebdc686e3ae56ac131b2f9586092ba67e5f9c749cb139fbf2faaa2af2ef30700955a5b347f1964f61bf6b WHIRLPOOL 581cb27ae79648d69200ea2746cabf6dde8c865fd3afc80d87a0c43a150b40b6ad5e22ecd15fef5cc9aff166055b568e6217554c08b4767757f0534a998f35be
+DIST irqbalance-1.2.0.tar.gz 55618 SHA256 0efe5d2a0947b54d89c7196a48eca9b3b33c80bc15964e4226a0f7d3fd9535b2 SHA512 02510d0d4dc069570b5f98f3b8191384593a6ed9a88c65c87f5a4261f375c291d95c401b01c03ef9d80834925dd124a088f56ac90c5f290815e26337d4f61c1b WHIRLPOOL 32cdb9d91310012f729f45643b4d105a9840fb88fa55533d48b9a93848a6f3e7f273f9aa9957add8b5ddf4444f5d620da9accb9d79ad237126029176942a37cc
+EBUILD irqbalance-1.0.9-r1.ebuild 1101 SHA256 6bf67da6f670023462690eb73c8a1a64857910e9392bfe635a180f7c24fd08e7 SHA512 2678b9c3a2c6153da80f5d57544c830e77a757a1a7003097f69ae197da481b2de800feaef0c39fc3d44e7b9c033beb7bddb3c9f1c3b39872b677e6fa3463c50c WHIRLPOOL cbc9636b0e511f3e54bac00b4f654a0d5f832f6f6a409421eaa6cb07b2edfbeb2645af25751ae9644858d19491b6687385f78d0c36f7a6113feb25b2e82ae58e
+EBUILD irqbalance-1.1.0.ebuild 1340 SHA256 6e7ebda5dca34832e2610b5375a73cf34bccae71840b46eebb0926dedf588049 SHA512 0fa381cf76a3d8f3aaac20be25b475e224f33a96b150900d03e92f31699589a70ac39d5a31dee40f85aad851fec15292b4d9c44862ff0a9487ace4ed91f57ec7 WHIRLPOOL a43fd8207fba5cfc667114f80f7abd7e33ac3ac94356554ac2707d88ecfee61e2ff671eb8fdde5c1ceb2bc874b624525923f14c8c07d6644518523be74172ea4
+EBUILD irqbalance-1.2.0.ebuild 1388 SHA256 83eb41c16ce7a53b647e5f9dc9a41a4b8e49daac4a3d9bcff82aabb1adf52cfd SHA512 b3685c9dd1bbf964a65f26c6793c0f50a2c481c73984a11a03ba6f20e12a15d1e9af7b6ae85cfe0fd8f40ccd0140e442a62740120ae05fc32d58c1fa43340a21 WHIRLPOOL 08f276a6031021bb47a123986041e0593ac67443c0ef74e17b9f47f47341b3223bb546bf91f3ad2a4087e9e5090c672761a2307a15f213661f332fa25bdd8c61
+MISC ChangeLog 5156 SHA256 066f9f0555b05d59f3c796b7d7e672afbff4107b2d8cadd7f5fa2154e868ea63 SHA512 ce1aeaab29d306a13552b2e735811d4a6699664a2de75a8e8b82c5520968b3c9ae8f2a26aebea7a8ab6c23defddaf64321b0116fd1b58425be9f8ef326da21c8 WHIRLPOOL deb5b33f6a56625ff896560c86fac96f7ec41803f8415a43912c1018f2b975d3ca523f3d354275d01825c1c6657657cbbb6d9bb603cf9d3bfc684944e52a41c6
+MISC ChangeLog-2015 9065 SHA256 ceeb2159e1389a447b9cb2d2b8dde276a4fa0858a91242daeb96767bb21e0cf8 SHA512 87514833057939bf7bd4b95c2017b329d27620da520747c8ed5186ed35ee575e25ed85c9f0be07cbf43422999afe07f34e16a7c6ddc8c26e6d87ec0d891283cc WHIRLPOOL c40ae26a8ca02e7fe1f4654249a7d4f546d3af5023c3abdbcdcce66b0ceaedd7b4a55ce540e78a037341b5d40e86f573794106497a0e98a1032a5e322a9d05c0
+MISC metadata.xml 470 SHA256 4bf424ba117252f434eccf260c4f2e0f3b539615935562d89658802e8a6521ad SHA512 287a8da55452b17215da39aed9dfaf52090f5c3faefcc07df2c713e29cbfc13f810b4dc72029a21741d36ef51edf8c5598f572e20fb635e105d708848996730a WHIRLPOOL 4d935fececa3c7abbd8dad3e6708e959d95a6ed934f4eb680e56c045cfb5b5be8b7d79d349247f88b97d39321389a1927512d1ebca0dd2d7fb9054105d93b67d
diff --git a/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch
new file mode 100644
index 000000000000..20716542b6dd
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch
@@ -0,0 +1,32 @@
+From 287d50594fe624bdb4400611d0dbecec6ff38a41 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 1 Mar 2017 17:11:42 +0100
+Subject: [PATCH] Prefer pkgconfig to check for ncursesw.
+
+That way we take possible separate tinfo lib into account.
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17b879a..77d8aa4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,13 @@ AC_CHECK_FUNCS(getopt_long)
+ AC_CHECK_LIB(numa, numa_available)
+ AC_CHECK_LIB(m, floor)
+
+-AC_CHECK_LIB(curses, mvprintw)
++PKG_CHECK_MODULES([NCURSESW], [ncursesw], [has_ncursesw=yes], [AC_CHECK_LIB(curses, mvprintw)])
++AS_IF([test "x$has_ncursesw" = "xyes"], [
++ AC_SUBST([NCURSESW_CFLAGS])
++ AC_SUBST([NCURSESW_LIBS])
++ LIBS="$LIBS $NCURSESW_LIBS"
++ AC_SUBST([LIBS])
++])
+
+ AC_C_CONST
+ AC_C_INLINE
+--
+2.12.0
+
diff --git a/sys-apps/irqbalance/files/irqbalance.confd-1 b/sys-apps/irqbalance/files/irqbalance.confd-1
new file mode 100644
index 000000000000..2761cfcd3596
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance.confd-1
@@ -0,0 +1,19 @@
+# /etc/conf.d/irqbalance: config file for /etc/init.d/irqbalance
+
+# Additional options to pass to irqbalance itself.
+IRQBALANCE_OPTS=""
+
+# These are envvars used by irqbalance itself, so make sure the "export"
+# is retained. For more info, please see the irqbalance manpage.
+
+# Run irqbalance once and then exit
+#export IRQBALANCE_ONESHOT="0"
+
+# Include debug messages in output
+#export IRQBALANCE_DEBUG="0"
+
+# List of cpus to not include in balancing
+#export IRQBALANCE_BANNED_CPUS=""
+
+# List of interrupts to not include in balancing
+#export IRQBALANCE_BANNED_INTERRUPTS=""
diff --git a/sys-apps/irqbalance/files/irqbalance.init.3 b/sys-apps/irqbalance/files/irqbalance.init.3
new file mode 100644
index 000000000000..9ed16416510d
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance.init.3
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+command="/usr/sbin/irqbalance"
+command_args="${IRQBALANCE_OPTS}"
+
+check_sysfs() {
+ if grep -q MSI /proc/interrupts 2>/dev/null && \
+ test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then
+ eerror "MSI interrupts found in /proc/interrupts but none found in sysfs."
+ eerror "You need to update your kernel."
+ return 1
+ fi
+}
+
+start() {
+ check_sysfs || return 1
+ ebegin "Starting irqbalance"
+ start-stop-daemon --exec ${command} --start -- ${IRQBALANCE_OPTS}
+ eend $?
+}
diff --git a/sys-apps/irqbalance/files/irqbalance.init.4 b/sys-apps/irqbalance/files/irqbalance.init.4
new file mode 100644
index 000000000000..1fb9eeb11f4a
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance.init.4
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+command="/usr/sbin/irqbalance"
+command_args="${IRQBALANCE_OPTS}"
+
+start_pre() {
+ if grep -q MSI /proc/interrupts 2>/dev/null && \
+ test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then
+ eerror "MSI interrupts found in /proc/interrupts but none found in sysfs."
+ eerror "You need to update your kernel."
+ return 1
+ fi
+}
diff --git a/sys-apps/irqbalance/files/irqbalance.service.1 b/sys-apps/irqbalance/files/irqbalance.service.1
new file mode 100644
index 000000000000..af7a979a25d0
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance.service.1
@@ -0,0 +1,8 @@
+[Unit]
+Description=CPU Interrupt Balancer
+
+[Service]
+ExecStart=/usr/sbin/irqbalance --foreground
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/irqbalance/irqbalance-1.0.9-r1.ebuild b/sys-apps/irqbalance/irqbalance-1.0.9-r1.ebuild
new file mode 100644
index 000000000000..6d9972b6a36b
--- /dev/null
+++ b/sys-apps/irqbalance/irqbalance-1.0.9-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils systemd linux-info
+
+DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
+HOMEPAGE="https://github.com/Irqbalance/irqbalance"
+SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="caps +numa selinux"
+
+CDEPEND="dev-libs/glib:2
+ caps? ( sys-libs/libcap-ng )
+ numa? ( sys-process/numactl )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-irqbalance )
+"
+
+pkg_setup() {
+ CONFIG_CHECK="~PCI_MSI"
+ linux-info_pkg_setup
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with caps libcap-ng)
+ $(use_enable numa)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ newinitd "${FILESDIR}"/irqbalance.init.3 irqbalance
+ newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
+ systemd_newunit "${FILESDIR}"/irqbalance.service.1 irqbalance.service
+}
diff --git a/sys-apps/irqbalance/irqbalance-1.1.0.ebuild b/sys-apps/irqbalance/irqbalance-1.1.0.ebuild
new file mode 100644
index 000000000000..0673ae2ab01a
--- /dev/null
+++ b/sys-apps/irqbalance/irqbalance-1.1.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils systemd linux-info
+
+DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
+HOMEPAGE="https://github.com/Irqbalance/irqbalance"
+SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="caps +numa selinux"
+
+CDEPEND="
+ dev-libs/glib:2
+ caps? ( sys-libs/libcap-ng )
+ numa? ( sys-process/numactl )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-irqbalance )
+"
+
+pkg_setup() {
+ CONFIG_CHECK="~PCI_MSI"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ # Follow systemd policies
+ # https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
+ sed -i -e 's/ $IRQBALANCE_ARGS//' misc/irqbalance.service || die
+ sed -i -e '/EnvironmentFile/d' misc/irqbalance.service || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with caps libcap-ng)
+ $(use_enable numa)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ newinitd "${FILESDIR}"/irqbalance.init.3 irqbalance
+ newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
+ systemd_dounit misc/irqbalance.service
+}
diff --git a/sys-apps/irqbalance/irqbalance-1.2.0.ebuild b/sys-apps/irqbalance/irqbalance-1.2.0.ebuild
new file mode 100644
index 000000000000..5a860709ee8d
--- /dev/null
+++ b/sys-apps/irqbalance/irqbalance-1.2.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils systemd linux-info
+
+DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
+HOMEPAGE="https://github.com/Irqbalance/irqbalance"
+SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="caps +numa selinux"
+
+CDEPEND="
+ dev-libs/glib:2
+ sys-libs/ncurses:0=[unicode]
+ caps? ( sys-libs/libcap-ng )
+ numa? ( sys-process/numactl )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-irqbalance )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-tinfo.patch"
+)
+
+pkg_setup() {
+ CONFIG_CHECK="~PCI_MSI"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ # Follow systemd policies
+ # https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
+ sed \
+ -e 's/ $IRQBALANCE_ARGS//' \
+ -e '/EnvironmentFile/d' \
+ -i misc/irqbalance.service || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with caps libcap-ng)
+ $(use_enable numa)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance
+ newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
+ systemd_dounit misc/irqbalance.service
+}
diff --git a/sys-apps/irqbalance/metadata.xml b/sys-apps/irqbalance/metadata.xml
new file mode 100644
index 000000000000..8aa1af6dd709
--- /dev/null
+++ b/sys-apps/irqbalance/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="numa">Support balancing IRQs across NUMA nodes</flag>
+</use>
+<upstream>
+ <remote-id type="google-code">irqbalance</remote-id>
+ <remote-id type="github">Irqbalance/irqbalance</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/isapnptools/Manifest b/sys-apps/isapnptools/Manifest
new file mode 100644
index 000000000000..876cb2469deb
--- /dev/null
+++ b/sys-apps/isapnptools/Manifest
@@ -0,0 +1,7 @@
+AUX isapnp.rc 545 SHA256 596840b3c6428c1f21fe010bce31dd8f73d88c0ba12c3f0c429e9434481976a4 SHA512 9844f1d7a959e96750a8adb906f9c85d7ab693421d7ac51af08380ed6690c017d3f9a74694f2c5d7c7a3da8266f18f1f574095435aa6e9ec2ab9f7604ea470a7 WHIRLPOOL 16d166a4407457b4415a8a059ad750ec8e87fd11f317e8151a56db10219f58f708b8ccb7eec055b9cfad63e9cea53c6c61edb7f33a5583a153c71df554fcf649
+AUX isapnptools-1.27-include.patch 313 SHA256 6c2ec76e04e0b8134b17f79030f411f181c00e495bd04a7dc7de2a529fdb4609 SHA512 cebe7e8cbda5c1e9fbf1d2c7f8d2e955571a72842cbb7556f584e6cb6aada678345a908d737b293ef4cf222a0e9e83ff6b7350baffc02b27961b555c5bf74216 WHIRLPOOL f10fd0bf86c3ea09d8eaa35ba7c4561a17ad8b2531e6ab1f52ed0c86b7eb362a28bd90363bf996cf97bd22e80cedb7d8fe0c0b8cfb87dae30ba5de2b2a925709
+DIST isapnptools-1.27.tgz 499639 SHA256 32b1af6188a2b6fc432ab10c58a97985836ffa8d4762a8e9aae9b442a44466f4 SHA512 ccd1c8f7b66ba7f26d50fcfa64d0397dd1a09866c7c74226acbcb4e08be77717aaa4dde7eabcad5bac4e5f92774c40bca48dbf97069c62cc71355b768eca4d34 WHIRLPOOL 7a1c3ec060e8f52b76a3639c12ae564bd9df37e9019c4f216e954a1fcc8cf034a4f37b86dfe18c4f855b4a96b954353536eff9f378edb7d90452e4d5d9ed9e97
+EBUILD isapnptools-1.27.ebuild 693 SHA256 60f8e8d2e4bbf802aed7f48f756f49a301e5a4d069434bcc8c4512fe798356b4 SHA512 f911d0f219bcc66cce4a09c062887a8908f9482260792b3c7785a66e98f7cd876959a58e7f0b11e99222edb48dacb251e9dee6330808a0f369f177fbce428ecf WHIRLPOOL f1ef8380289208beba8ad29dc9cda5eb812e17f487e5131debfdc63772e3fa8062980d41e4ba451093f500d0cc49cd079bcaa94ec4888f2569ae8a44ce2b83a8
+MISC ChangeLog 3317 SHA256 0319f3b4abfcc29729c0a758e769e5deab31b9379b92fcd53dbd014930022577 SHA512 7dd509384b6789b81d84ae4ce6c2d9f7190f7e7e703b136f5301721a9bca187127f48af7ded13e1bfa17cecfd6c5278fae09ec84afaaf0285e82bfcd013f5929 WHIRLPOOL e5d30a7e20e755887405eb7f8878d41311ae3fe1df07b6bb43ccd4fbd0f8e4ba51880d84447ae5cb641d957f238cc782136fd27e6430932c4675cf156a64c4f0
+MISC ChangeLog-2015 2573 SHA256 38dc08ea8001ce8d234ea17658c769fc5975cb233c334b951d961d77b5bbd730 SHA512 82cea83cdf60437315f0fc0cbdd8267016df47111ee3f3b59185adee3000f38d700f4ca89afa07e866e0ccac1cedc87b98f2208429683734a4fdd05aef8f7d6d WHIRLPOOL 458fc54ef73c0bb1dfe80d7a8740cc46abd4336bd546807814bb5099f539cb78aad2d331276196a48cd61ed096b9d3a5dc36550782e3e52ad601bba55c0a0379
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/isapnptools/files/isapnp.rc b/sys-apps/isapnptools/files/isapnp.rc
new file mode 100644
index 000000000000..07dd2f391d33
--- /dev/null
+++ b/sys-apps/isapnptools/files/isapnp.rc
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+check_config() {
+ if [ ! -e /etc/isapnp.conf ] ; then
+ eerror "You need an /etc/isapnp.conf file first"
+ eerror "Theres a sample in docs/isapnptools/txt"
+ return 1
+ fi
+ if [ ! -x /sbin/isapnp ] ; then
+ eerror "You're missing /sbin/isapnp; emerge sys-apps/isapnptools"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ check_config || return 1
+
+ ebegin "Configuring ISA PnP devices"
+ /sbin/isapnp /etc/isapnp.conf
+ eend $?
+}
diff --git a/sys-apps/isapnptools/files/isapnptools-1.27-include.patch b/sys-apps/isapnptools/files/isapnptools-1.27-include.patch
new file mode 100644
index 000000000000..a736ccc1eb9d
--- /dev/null
+++ b/sys-apps/isapnptools/files/isapnptools-1.27-include.patch
@@ -0,0 +1,10 @@
+--- src/callbacks.c.org 2001-05-15 22:37:04.000000000 +0200
++++ src/callbacks.c 2011-06-15 05:21:32.292819557 +0200
+@@ -51,6 +51,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdlib.h> /* exit() */
+
+ /****************************************************************************/
+
diff --git a/sys-apps/isapnptools/isapnptools-1.27.ebuild b/sys-apps/isapnptools/isapnptools-1.27.ebuild
new file mode 100644
index 000000000000..47812b883bf9
--- /dev/null
+++ b/sys-apps/isapnptools/isapnptools-1.27.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="Tools for configuring ISA PnP devices"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/hardware/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-include.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodir /sbin
+ mv "${D}"/usr/sbin/isapnp "${D}"/sbin/ || die
+
+ dodoc AUTHORS ChangeLog README NEWS
+ docinto txt
+ dodoc doc/README* doc/*.txt test/*.txt
+ dodoc etc/isapnp.*
+
+ newinitd "${FILESDIR}"/isapnp.rc isapnp
+}
diff --git a/sys-apps/isapnptools/metadata.xml b/sys-apps/isapnptools/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/isapnptools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/iucode_tool/Manifest b/sys-apps/iucode_tool/Manifest
new file mode 100644
index 000000000000..317249542275
--- /dev/null
+++ b/sys-apps/iucode_tool/Manifest
@@ -0,0 +1,6 @@
+DIST iucode-tool_2.1.1.tar.xz 143204 SHA256 8f94ec73f5d4d1a6801aaa894fa1c6544d9b27aec16e1a00e18e8241c7e0f6ba SHA512 07ebf1919a997e7270d9c53f0287f53975253eb53e678f30bfc55acefc6fba7a51c6a4edbdcdbba88a7643ecbcba6acd0c93847d6d1648659789af37c9c59cd7 WHIRLPOOL a20e659047bc8eb8fbf83b91d7014004711c0713f450a5ff41f7919b3d7f4b192a5fcaec89cdba43ea40878c0b2c63d4bc628dae001cb5bc88d571b3b328b27e
+DIST iucode-tool_2.1.2.tar.xz 143352 SHA256 01f1c02ba6935e0ac8440fb594c2ef57ce4437fcbce539e3ef329f55a6fd71ab SHA512 f1af71843160500fb9c0b56bffdb1d3db09acf42f6c0a84a5d5311eedfe809f9ac27f89bf1778cab8261d3a540cfe62f3698a45c76be76e7f40179b9c49050e0 WHIRLPOOL 3ca861e36565c9126041c3cdaf05cc27f18d64580482a2d6b3d889c44b8f08bd1a3f8ae1cd1e27dd708c0a38a75e2fb2ed292e42458065cfc029ae8dba575580
+EBUILD iucode_tool-2.1.1.ebuild 428 SHA256 986a164b7ec60009b3136acb10001deda62b0751c685fbfa766257ca237d6116 SHA512 62d09ae12e31934b7f37181327e3da5bf9d8cf9a0296fdc25ec832fde2555e7d78f7bd409fbcef0fd69da360b4b5f14fd5f221a8a675e66c5e6a294f14bcb0bd WHIRLPOOL 775fa16576b6d8c98017a3164b380bc25bc82e7221a7dd4c77cf93418618e3d9590eadb62317ff4e870fda1f89d8947738f152df00deda0a54c01db575b7977a
+EBUILD iucode_tool-2.1.2.ebuild 430 SHA256 868c4e5909f694d5fcf372fa7a94b104ec7380e6ad1995cd5a3fc766d3a712f0 SHA512 d4a8b86cd113cce64c4a6b8d11e70aa01e638d1e5f5649c3f92073ccc9252e3abcea36cb8ba3709a92b306e783d8f081483888ae2818baf9ddce67ab488144aa WHIRLPOOL 1566aea5bec9034049fe49a6bf8795e3fe2c4321c153c39332108c625a722c47b162394e62d2cb84bd91d3a0b023e957d3795072c7bda2233f86598465815819
+MISC ChangeLog 1935 SHA256 ccd6236f12515ac1188efd0c0f3cd9b2a3dc2d4bf9a8df241d72d19ff541075c SHA512 8b7ea3f295d52f2c4dbee4cb17f7d2f219f58be760859e1b3bf58384b3566e24e3185d60edeba4d3f75e7e41a2e93e03a744162457ef810b241f35eb75e55c47 WHIRLPOOL 808182c143ce62188d24bbd803086d9c6f6ead8edb3504b801c85c4d70e04eb29cf224e654e50f7d1e347a303d380c162d69b1e7dc78c4818132f636fd7317fc
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild b/sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild
new file mode 100644
index 000000000000..b3d85fc2e5da
--- /dev/null
+++ b/sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections"
+HOMEPAGE="https://gitlab.com/iucode-tool/"
+SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+S="${WORKDIR}/${PN/_/-}-${PV}"
diff --git a/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild b/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild
new file mode 100644
index 000000000000..dcfaa908e494
--- /dev/null
+++ b/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild
@@ -0,0 +1,15 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections"
+HOMEPAGE="https://gitlab.com/iucode-tool/"
+SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${PN/_/-}-${PV}"
diff --git a/sys-apps/iucode_tool/metadata.xml b/sys-apps/iucode_tool/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/iucode_tool/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/kbd/Manifest b/sys-apps/kbd/Manifest
new file mode 100644
index 000000000000..7f9b4991fa10
--- /dev/null
+++ b/sys-apps/kbd/Manifest
@@ -0,0 +1,12 @@
+AUX kbd-1.15.5-loadkeys-parse.patch 2163 SHA256 8fa928854ee1e3298df99e600cfdb08ccf8b44b7a7fc42423569fecc9365aa22 SHA512 c338c5f5ee9054f3dfc62646f9e8a47a577fc55dbc4723a04f006afa6c966ac5b056b744c49d4bdfcd80d69e64af20b0f71cc9cfff23db9f017adb32bd6d9d7d WHIRLPOOL 26b1adadc347b534675c7426eb9aca535556b81cffdd1ccd7ef50c603e127c1f9f6774af1b8050c67fc81daefe0c33da4593f74d3b77c47a089d6772363153e8
+AUX kbd-2.0.0-tests.patch 841 SHA256 615abd489e1f3e2f5916089cdd5578ad29242e94cf83373d31cd16d1a77995c7 SHA512 b189b02c509f851bb871d75903dcbbef0177b39db923cf7b3bff4b3058868074975dd7c32bdafb54d50d3e4798ae8648a5b4e461078c86d025257e0502405f58 WHIRLPOOL 5e6c894f9a8d19f15bd0b647f8a5edb086508d2654f41f29a53950ceb10318a060461d61d793660250effb1fac6ea972236138053d0ec684bbc8723fcdc91520
+DIST kbd-1.15.5.tar.gz 1730719 SHA256 e35fa29f690dbbfb721706b2c8edc760c697640904fec65e81194ae8840c5c62 SHA512 725853b0ecde6a38976e2bae5672b8de78bfc90d65a0762695964a6dab729c96be4af778fe7f0f195caae04d630b07a3d0d95c9c928d1a5609e223e47723e58c WHIRLPOOL 431873623d4125b73622894c511711a2153fae498a17dc59851219405c69a641c24bb591fa66001eb4cc7491fc4f90e532661c2bf56f69e2a17dd435d1e14ace
+DIST kbd-2.0.3.tar.xz 1037036 SHA256 7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb4649fb5e SHA512 522718859c2a95abee06a50dd0a7cfe7bb9c8f4b3959d54fd9e56cef23acc85b9af85405aa4953f20cd029397412051d72c8b1b0d639ba3a26b4952f89ef6a3f WHIRLPOOL 7534370cd0410119775c564269ada152248c75711332e2d6884d1503cef4f573617d7d7d4bb29c581ee993be2f8e96f6c290feb07bfabbb8c14a12ca6d33841e
+DIST kbd-2.0.4.tar.xz 1031864 SHA256 5fd90af6beb225a9bb9b9fb414c090fba53c9a55793e172f508cd43652e59a88 SHA512 5e264b3695b0af0bc85e0a4fa2c43e13648d8ea82102f3b051c28da2abfc52977577c470bce48f30cec9b0d215297e48c9b05e00561c990e3770fb68f6544e0f WHIRLPOOL bde3f8ac3900cc7a39e8d8fd4bc0e87e777e21cb559c1efc9ca1dd0192fba6e8983e40011b702e1be14bb92d238ef89bde23ed40269dbeb8719c622c4d7cb8d9
+EBUILD kbd-1.15.5-r1.ebuild 1040 SHA256 86233ac5a9915f3b3a7d2b91d59c74c678906a9fe8673e3b0335204044c320e0 SHA512 aea6c477a1527e5f38419c2356bf97e52bbfc9473919b182392d1a0bff96af9d0912b2cd132e4d015889a55e9b3a8613937b1d8e0d847b0d794596309ddc9ceb WHIRLPOOL 4273af7ccd39da70f6da6cf1a080b7aae8c51ae7491fb9d152120f99dfddc4946228c6b22211b5d79a25c05da193973c6e5646cb60bd763b175becef72dfd1a1
+EBUILD kbd-2.0.3.ebuild 1360 SHA256 987e372aab62d33979eb96e924172fe27805db2402e4b0907caeca65c4d05407 SHA512 358c6679bea2e0270159fa07a4578f75c8356d1774e6d9f8def085f94225ac733a3e2e9a9e552485e15d763a0835256a9ea238893dd0280b4435f724cf23edba WHIRLPOOL 047687b87c9fd235f0c231c1af3163d05187de6fa8f5247f9990e5eac79ab580d6c9e0117fabd493431e86ecce1b57d35325932ce57f5bc5d7299fd2ffbe5255
+EBUILD kbd-2.0.4.ebuild 1353 SHA256 dca00e5b3a700d747254c9e2de7e7103e1de31fdb2ae762f5959625f63de48c5 SHA512 773f75e85efec50dff3a3e1778ba78da3e60b8d3715388b4cc7b4cc6d6f7a8b15e107b99d3027ecf3c1234346ef0c09e6247c8e161c60b6ad1bdee19ec248439 WHIRLPOOL 38380536c0c3ce69abea7d23876f0c6f0150a4ea5bbf07da394dab5806825dcc15b340538a3a83b1168b8da5e538f1a2aab596299645d8b65106a10117b18b08
+EBUILD kbd-9999.ebuild 1342 SHA256 51383ab2660f0200e3785f34bcf0b51d327f0fa4c171a7f82a222f71bfcc786c SHA512 93b2ea0888ed50fb4f1bffb063797621767cf09f001361afab2c9c3acda28092ccde61c61f7e740880471c5626fa2c6700d1ada4c63c55d75257c029af8b18e6 WHIRLPOOL 21aa5097d10705aec1f7a42f65a2bbe076fabc5e25202d450e3b4fe6337929fe8e2a864c9f224c7c5161d1d4abfd4d89d8d5765530b11b17954fdf8bde6e8fee
+MISC ChangeLog 4761 SHA256 33b76762c9ef6192cf9bc1629a04dcc954af405899f6282a5df6728c1c76296d SHA512 13e4ae916dcc19f3913fa6bf0bcd9a08f618face28989a471467fe0b6958385de8ae892ac8359ac042081121478a16a4c8a712b9b159dfd47db6062eba97600f WHIRLPOOL a29a9be826c8af16486aeccd799570aeb363bed11a8ce314e2777e70331d0bceca8ef41084c4627111cfcafcd00ed0ff6db5c5fd8ece7b1ea66b60bc622fa3cd
+MISC ChangeLog-2015 18873 SHA256 2ee8212f9189793fc51ec0429f3ba204947e07c943c30c0b0cf5d8ed91c4ccfa SHA512 bd5942888a57b07d31ef34c674d4d6fabb6ef1e266c3a44f3061cb85e7f2c8b2276138eff4eb58b66926129da544d6df691435a5e2a67ad56615d9a48f512385 WHIRLPOOL 9fbafb5cb0dd3a0d672eacda83faa70a82b5436cd6444054472298855b24cb8db03d7b2079fe68352f69d730eb69f483ba972f1bfa683441282c729fc70d5316
+MISC metadata.xml 321 SHA256 1462f761b68587fc7326d39bcc0cd09d6ec204d7a4b3fa56183c018091599122 SHA512 f00b80d88f4647f210c28f95f8dc81fc8ff3bcbe74e6429e9d5dd92e57588297aafee968b8a3cad2db3b2010fd9ebc400975ca59ffcd62370afa799745dda641 WHIRLPOOL f83457f54b220ab31efe8775b16a54a78710f652c8dc5d9d4421a9f9e13f4d663a16b1023efecfff28126ada8af20990e6690fec99b2651130daf1de3cad3347
diff --git a/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch b/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch
new file mode 100644
index 000000000000..c78a22780840
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.15.5-loadkeys-parse.patch
@@ -0,0 +1,90 @@
+https://bugs.gentoo.org/447440
+
+From 7e06e56157e8431d02e1377cdc44230944203d88 Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <gladkov.alexey@gmail.com>
+Date: Tue, 11 Dec 2012 14:24:44 +0400
+Subject: [PATCH] Fix regression in 16117ce6ab
+
+Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
+---
+ src/loadkeys.analyze.l | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/loadkeys.analyze.l b/src/loadkeys.analyze.l
+index c18dcea..f817c78 100644
+--- a/src/loadkeys.analyze.l
++++ b/src/loadkeys.analyze.l
+@@ -307,8 +307,10 @@ To to|To|TO
+ char *s = xstrndup(yytext+1, strlen(yytext)-2);
+ /* use static pathname to store *s ? */
+ open_include(s);
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ }
+ <INCLSTR>[^"]|\"\"|\"[^"\n]*{Eol} {
+ yyerror(_("expected filename between quotes"));
+@@ -323,7 +325,7 @@ To to|To|TO
+ }
+ {Eol} {
+ line_nr++;
+- if (state_ptr > 0) {
++ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
+@@ -428,8 +430,10 @@ To to|To|TO
+ }
+ <STR>\" {
+ *p = '\0';
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ return(STRLITERAL);
+ }
+ . {
+--- a/src/loadkeys.analyze.c
++++ b/src/loadkeys.analyze.c
+@@ -1359,8 +1359,10 @@ YY_RULE_SETUP
+ char *s = xstrndup(yytext+1, strlen(yytext)-2);
+ /* use static pathname to store *s ? */
+ open_include(s);
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ }
+ YY_BREAK
+ case 3:
+@@ -1393,7 +1395,7 @@ YY_RULE_SETUP
+ #line 324 "loadkeys.analyze.l"
+ {
+ line_nr++;
+- if (state_ptr > 0) {
++ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
+@@ -1670,8 +1670,10 @@ YY_RULE_SETUP
+ #line 429 "loadkeys.analyze.l"
+ {
+ *p = '\0';
+- yy_pop_state();
+- state_ptr--;
++ while (state_ptr > 0) {
++ yy_pop_state();
++ state_ptr--;
++ }
+ return(STRLITERAL);
+ }
+ YY_BREAK
+--
+1.8.0.2
diff --git a/sys-apps/kbd/files/kbd-2.0.0-tests.patch b/sys-apps/kbd/files/kbd-2.0.0-tests.patch
new file mode 100644
index 000000000000..6a1c7ea851e3
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-2.0.0-tests.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/485116
+http://lists.altlinux.org/pipermail/kbd/2015-July/000558.html
+
+--- configure.ac
++++ configure.ac
+@@ -11,7 +11,13 @@
+ AC_CONFIG_SRCDIR([src/loadkeys.c])
+ AC_CONFIG_HEADERS(config.h)
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
++AC_ARG_ENABLE(tests,
++ AS_HELP_STRING(--enable-tests, [build tests]),
++ [BUILD_TESTS=$enableval],[BUILD_TESTS=no])
++AM_CONDITIONAL(BUILD_TESTS, test "$BUILD_TESTS" = "yes")
++if test "$BUILD_TESTS" = "yes"; then
++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
++fi
+
+ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+ AM_SILENT_RULES([yes])
+--- Makefile.am
++++ Makefile.am
+@@ -8,7 +8,10 @@
+ CREDITS \
+ contrib docs rc
+
+-SUBDIRS = src data po tests docs
++SUBDIRS = src data po docs
++if BUILD_TESTS
++SUBDIRS += tests
++endif
+
+ kbd-$(VERSION).tar.xz:
+ make distcheck
diff --git a/sys-apps/kbd/kbd-1.15.5-r1.ebuild b/sys-apps/kbd/kbd-1.15.5-r1.ebuild
new file mode 100644
index 000000000000..7c4451fcab11
--- /dev/null
+++ b/sys-apps/kbd/kbd-1.15.5-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Keyboard and console utilities"
+HOMEPAGE="http://freshmeat.net/projects/kbd/"
+SRC_URI="ftp://ftp.altlinux.org/pub/people/legion/kbd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="nls pam"
+
+RDEPEND="pam? ( virtual/pam )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ default
+ cd "${S}"
+
+ # broken file ... upstream git punted it
+ rm po/es.po
+
+ # Rename conflicting keymaps to have unique names, bug #293228
+ cd "${S}"/data/keymaps/i386
+ mv dvorak/no.map dvorak/no-dvorak.map
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map
+ mv olpc/es.map olpc/es-olpc.map
+ mv olpc/pt.map olpc/pt-olpc.map
+ mv qwerty/cz.map qwerty/cz-qwerty.map
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-loadkeys-parse.patch #447440
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam vlock)
+}
+
+src_install() {
+ default
+ dohtml doc/*.html
+}
diff --git a/sys-apps/kbd/kbd-2.0.3.ebuild b/sys-apps/kbd/kbd-2.0.3.ebuild
new file mode 100644
index 000000000000..084b72febeda
--- /dev/null
+++ b/sys-apps/kbd/kbd-2.0.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+SCM=""
+if [[ ${PV} == "9999" ]] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://git.kernel.org/cgit/linux/kernel/git/legion/${PN}.git"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/kbd/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
+fi
+
+inherit autotools eutils ${SCM}
+
+DESCRIPTION="Keyboard and console utilities"
+HOMEPAGE="http://kbd-project.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls pam test"
+
+RDEPEND="pam? ( virtual/pam )
+ app-arch/gzip"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default
+ fi
+
+ # Rename conflicting keymaps to have unique names, bug #293228
+ cd "${S}"/data/keymaps/i386 || die
+ mv dvorak/no.map dvorak/no-dvorak.map || die
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map || die
+ mv olpc/es.map olpc/es-olpc.map || die
+ mv olpc/pt.map olpc/pt-olpc.map || die
+ mv qwerty/cz.map qwerty/cz-qwerty.map || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.0-tests.patch #485116
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam vlock) \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ dohtml docs/doc/*.html
+}
diff --git a/sys-apps/kbd/kbd-2.0.4.ebuild b/sys-apps/kbd/kbd-2.0.4.ebuild
new file mode 100644
index 000000000000..e16d0d8ce7df
--- /dev/null
+++ b/sys-apps/kbd/kbd-2.0.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+SCM=""
+if [[ ${PV} == "9999" ]] ; then
+ SCM="autotools git-r3"
+ EGIT_REPO_URI="https://git.kernel.org/cgit/linux/kernel/git/legion/${PN}.git"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/kbd/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+inherit eutils ${SCM}
+
+DESCRIPTION="Keyboard and console utilities"
+HOMEPAGE="http://kbd-project.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls pam test"
+
+RDEPEND="pam? ( virtual/pam )
+ app-arch/gzip"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default
+ fi
+
+ # Rename conflicting keymaps to have unique names, bug #293228
+ cd "${S}"/data/keymaps/i386 || die
+ mv dvorak/no.map dvorak/no-dvorak.map || die
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map || die
+ mv olpc/es.map olpc/es-olpc.map || die
+ mv olpc/pt.map olpc/pt-olpc.map || die
+ mv qwerty/cz.map qwerty/cz-qwerty.map || die
+}
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam vlock) \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ dohtml docs/doc/*.html
+}
diff --git a/sys-apps/kbd/kbd-9999.ebuild b/sys-apps/kbd/kbd-9999.ebuild
new file mode 100644
index 000000000000..139d12639fd3
--- /dev/null
+++ b/sys-apps/kbd/kbd-9999.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+SCM=""
+if [[ ${PV} == "9999" ]] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://git.kernel.org/cgit/linux/kernel/git/legion/kbd.git"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/kbd/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+inherit autotools eutils ${SCM}
+
+DESCRIPTION="Keyboard and console utilities"
+HOMEPAGE="http://kbd-project.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls pam test"
+
+RDEPEND="pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default
+ fi
+
+ # Rename conflicting keymaps to have unique names, bug #293228
+ cd "${S}"/data/keymaps/i386 || die
+ mv dvorak/no.map dvorak/no-dvorak.map || die
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map || die
+ mv olpc/es.map olpc/es-olpc.map || die
+ mv olpc/pt.map olpc/pt-olpc.map || die
+ mv qwerty/cz.map qwerty/cz-qwerty.map || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.0-tests.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam vlock) \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ dohtml docs/doc/*.html
+}
diff --git a/sys-apps/kbd/metadata.xml b/sys-apps/kbd/metadata.xml
new file mode 100644
index 000000000000..994903fdda44
--- /dev/null
+++ b/sys-apps/kbd/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="freshmeat">kbd</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/kcheck/Manifest b/sys-apps/kcheck/Manifest
new file mode 100644
index 000000000000..532278dd0743
--- /dev/null
+++ b/sys-apps/kcheck/Manifest
@@ -0,0 +1,4 @@
+DIST kcheck-0.0.2.tar.gz 8519 SHA256 e1d4d4f5f633a02440c1739dc2b28a03d7deee2729e5db025383662ffb2bd733 SHA512 98e3ad4835f8c1bacf68f98e112c05788394feb00683b7a02aa92cc2b5f8b4edeebe2b962c07a171b06bdfe7324e715d58057f6c8550004acc52cc0d9105ba9e WHIRLPOOL 22fe38da5473f3fd16cbe07a3a88a83a8d27110c6c1bd9c8cd7fdc5423836beb027feaefbea07d46f6fe4cdd5a4c45e52ee86850391b51f4aeb0447027762093
+EBUILD kcheck-0.0.2.ebuild 726 SHA256 cd48c624b80bd0fcd75797cc57623da24052f2823ecfcb2315991c9ecea3f07b SHA512 39226338b36fe8f4d616031b0f982c2eb010b270a65f0ba1002988acf03f6fda4e110540f58eeae2354854b225f4f7cbfad48b63fd6cbfdf2c18da4e4046d66d WHIRLPOOL 83b6cf638cc6a78a75ae7ab6301c86827c5281d8d7b3c9e0bfeff2acbc71d5e6d0f2da8d06022c235246cd1198f8d64fe4c44c4d35be9b9952902b765378fd19
+EBUILD kcheck-9999.ebuild 726 SHA256 cd48c624b80bd0fcd75797cc57623da24052f2823ecfcb2315991c9ecea3f07b SHA512 39226338b36fe8f4d616031b0f982c2eb010b270a65f0ba1002988acf03f6fda4e110540f58eeae2354854b225f4f7cbfad48b63fd6cbfdf2c18da4e4046d66d WHIRLPOOL 83b6cf638cc6a78a75ae7ab6301c86827c5281d8d7b3c9e0bfeff2acbc71d5e6d0f2da8d06022c235246cd1198f8d64fe4c44c4d35be9b9952902b765378fd19
+MISC metadata.xml 463 SHA256 509acf3014fe5d019804f0aa967fc4dde77ab7fb09fc591bba2534c19f668abf SHA512 16e2c48494780679725e178fa97dfef167833c2cdb37c9694de136e32ae9ed834a56232e3d71bfcaf00719a3fb7cea7d62f67807ff9249baf2a08d25f58bc88e WHIRLPOOL ef53f6e6d1339dbdb91ceee7f149857ac48d124af75f5b340293d1c296983f54f1c4cc90554f2725bfb0e8a8112dc6f430a48fa8d54cbc31c05dcbedef649d75
diff --git a/sys-apps/kcheck/kcheck-0.0.2.ebuild b/sys-apps/kcheck/kcheck-0.0.2.ebuild
new file mode 100644
index 000000000000..b1030d75db3b
--- /dev/null
+++ b/sys-apps/kcheck/kcheck-0.0.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/wraeth/kcheck"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/wraeth/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Record and check required kernel symbols are set"
+HOMEPAGE="https://github.com/wraeth/kcheck"
+
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/configargparse[${PYTHON_USEDEP}]"
+
+src_install() {
+ distutils-r1_src_install
+ mkdir "${D}"etc || die
+ mv -v "${D}"{usr/,}etc/kcheck.conf || die
+}
diff --git a/sys-apps/kcheck/kcheck-9999.ebuild b/sys-apps/kcheck/kcheck-9999.ebuild
new file mode 100644
index 000000000000..b1030d75db3b
--- /dev/null
+++ b/sys-apps/kcheck/kcheck-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/wraeth/kcheck"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/wraeth/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Record and check required kernel symbols are set"
+HOMEPAGE="https://github.com/wraeth/kcheck"
+
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/configargparse[${PYTHON_USEDEP}]"
+
+src_install() {
+ distutils-r1_src_install
+ mkdir "${D}"etc || die
+ mv -v "${D}"{usr/,}etc/kcheck.conf || die
+}
diff --git a/sys-apps/kcheck/metadata.xml b/sys-apps/kcheck/metadata.xml
new file mode 100644
index 000000000000..2bd4dd4c725d
--- /dev/null
+++ b/sys-apps/kcheck/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 type="person">
+ <email>wraeth@gentoo.org</email>
+ <name>Sam Jorna (wraeth)</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/wraeth/kcheck/issues</bugs-to>
+ <changelog>https://github.com/wraeth/kcheck/commits/master</changelog>
+ <remote-id type="github">wraeth/kcheck</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/kexec-tools/Manifest b/sys-apps/kexec-tools/Manifest
new file mode 100644
index 000000000000..7423272ab5e8
--- /dev/null
+++ b/sys-apps/kexec-tools/Manifest
@@ -0,0 +1,22 @@
+AUX 90_kexec 199 SHA256 0200acc44dfe1108bbc0123ccf3e41ad73d9709c13e8d5ef6333fdff575d3dd8 SHA512 31837eb7df9b5c9b63c5f500e55fb584e315ac20f328490ff812a265f1a01604724bf4699f142255f7c5fa78cb2d8f2d6220a91961ac90df644b5d545d47ca39 WHIRLPOOL de8bef4f71012ec2868b705dc2943cea27fc66e0987474bcf6269abc02a6409c7868a17ba7dc24a1016066cd6f65bed3179f83e3cc9b247c6a19f126905e7797
+AUX README.Gentoo 937 SHA256 6ddecc284c89f031792eb31455460a0acece4b3b6103b9ceb8ad79052d7ab42d SHA512 f082763692def43a97866b88443daf08a2bc1b0dccdc90160d12effa16e1293d8db6935c72ca9dd5502f844078241cbecdfde15b6e8f67a2cca8f3e89f14e654 WHIRLPOOL d8692b1599ef938e048dc42f4aa3ab73f644c68394243e16834b971772919656ebf95554e7d7226f17a86cc42e390c4a5b7cb611280e076e3dd2e02e3c315846
+AUX kexec-tools-2.0.0-respect-LDFLAGS.patch 293 SHA256 0f7e6cf0ef6bc4ffd898009f3e8d9952fcb2abff7537776023b2194019c885e5 SHA512 c5213462a1e543a357c128af51c9da260fcfa5bcddd9d6bd2fadc84f0456722752e2e7a5584de84d1beca580e07e40ec424eb2577d604beb186403975f7fcd1e WHIRLPOOL 79fe97189297b5d5d87f661ce30b88dee83972157ea99f153f0d0a3f33417e0da6f488c21b16fdcb777a68657fcff88283e49cf6ff2018784c660bc2b88904fb
+AUX kexec-tools-2.0.4-disable-kexec-test.patch 473 SHA256 95d7d6756aa438af926358dc9e6c964e11201a7c19b2ed2b457f013313d47558 SHA512 c7fe9176db7c3f9c84add1c263c5a695684bf1db55d47152534f0bbb97c084ad5d3f2090307d0bdfcf5622fa810aca3c104f81b3d24baa76f42d3f32d1d4bbad WHIRLPOOL 3b0cebf5aa1cd923c7867d588af9b74002b6266d3065e7c59061c5b510ad1f8aea0e1fa78d2f17a94bf25424db1d566a5648530e9ce5044ead28407b7f6135c5
+AUX kexec-tools-2.0.4-out-of-source.patch 816 SHA256 f86f053efcd210f7919f458a52721ae3704a905488935a66f67a039bd915d6bf SHA512 4839800f99e2bdb7dfbf3aa1f3ad795feb63b4e493812a50d4baa839a27b5e96319c4e848969cbcedf627a32ed5fbfb312461c2ac89b73daaa7f8f680f35f504 WHIRLPOOL ec72be471f55d26f18152d6c92c85974c9e2c89021566d2311e517b880846c94d19057f69d055de74954efdef9301fd356b87ff1647467d425bb755c54f338bb
+AUX kexec.conf 340 SHA256 19d6a02cf0bf3cebf03dc81c3b9fd5f517815ab1060f67cb9019b7e9653a7fc0 SHA512 66beb57ee13dba70f75f12326643270a0c888e178fdfca8ba7a566a874707aebe2afebb6ceae976dfb0aaf3135048daad6277e70580e4c7911b9ddbf74e4f00a WHIRLPOOL b77bb59ab16ea67690fa3e551995510b0fb0d82f7e2f10f9ed7d7815eb1e498cdda9ea667d2648b62cd1ae86a3ab67ae2ca1abd1fd2b9fce376b64ac41fb8725
+AUX kexec.conf-2.0.4 1013 SHA256 4c1b7e4651cd4be342db48389bc560589c896004f0274f8aba35a92fcd790531 SHA512 96db2834454aa4d038061e9b1f918932da3d3054021487425d0f70c6ad32096b9433ae2f3921e83196b23af901c32e591df3d6a84a6d14e064608d8ad895a599 WHIRLPOOL 3041644bf1688ac6c89e6078adcee987913bce124ea3ae4a2ce342c0956f319cccae93aabf39ee4aed9f23812e575f7f06cbf110bf39d9d961a1a19294108f27
+AUX kexec.init-2.0.12 3361 SHA256 f462ad4908cd12f19d8255a1efb96cf98bef74d9965f9f47a914096d7b129fc5 SHA512 b4152adced5f2fb6b31b9a42d898efc83d5b6a612b315bc7960fcd16361ed85a465032ce46e54c49c11b0817b84dfa59f1ee00d43442c17ab23bece65e032060 WHIRLPOOL c5eaf77bc2f559d190c9ff7708d79e620071565005febf64e202df79769f0e46b9d4c1bcb5048408222d6312c0eb6b072b41a2805be912ad738668e0dd433e12
+AUX kexec.init-2.0.13-r1 3655 SHA256 c93221d21b73e58efab8d045e164a9be7caf8bed427380a6a75dc996085faf96 SHA512 1d04e14e6fe1debc55fa23029a68f78f2d2a408c12bee6d55252109da178c3dbc998db4ccc7f05f7f8c65b333b50d6a1da7bf0d325ee6cae2f00840078d8a457 WHIRLPOOL 3ea9d42e4bf63845e5310c9108690ee24867628cf89d688c7b0c70b5fc35c97a17ed1c073dc3871826b628986b2a5da7087f625e259625ab88558fd9d163828e
+AUX kexec.init-2.0.4-r2 3507 SHA256 643a90ea83b3940e44e6631337d8a56cb21c7b70408603a44611a52a0cce86c1 SHA512 a1b1d907a349b66b97bdbd04fcb0baf03add50816538591a6273e2c3e991b36dd9e15cbe694d915e369ad425c313673b2f9dfd756000fae22102c73ed07deff2 WHIRLPOOL e2b06e98a3c309055e05a88b5291a831c4d8f59e621ec6b52a7a62892f5e7fba75278af16fe9e0534fc274b96cbe04b7b5eb1cd56a938bcd4d79e4493571be0f
+AUX kexec.init-2.0.4-r3 3515 SHA256 3e179b6fd9515f8ce97a1ba15a3bb705bbb401e583a674932c664ac7955099a6 SHA512 b9de8b745bc343a6da559064ba1410fffd62e1c8a158012b7dc4c801dc5e5ab6be2aca81be0db7f235c5d1aace308f2d6ff3a3cbf09b7246dd9e1fe4f18655c1 WHIRLPOOL e7786abe4845f7e675b6963a709627b6870e2615bde5fd56b8895c327a31ac74bc1bd81e1e6213e262e46340b0af71ecce25a65371fae15f3d205d8d0316ddce
+AUX kexec.service 407 SHA256 d95610609301d46e0f67efd78653beabd7dd253d2bf00f5736de5cdfbf2ea94e SHA512 9f0fa6d39c67048fe774fee0f2e8ed10e9e12a2468e7dda193cd8c5bd8b4cf49819d14703efad35c91265cd4e03c6f5460934b5fe92efd06eab8dc619920b1e3 WHIRLPOOL 9a412481d729e7ec7cec3a4142f2159337d61baf22431e4129f1e7798bf2683f1802e51edc92800e6b42b8b9b01cd83ef51f67cbc1cb7a4b209f923f3180948f
+DIST kexec-tools-2.0.14.tar.xz 283640 SHA256 ffb2e7e99d9d08754c6bc1922aed3c000094f318665d82a72ecc76c4ff1c0dc6 SHA512 8c1f9d1f4bb69a621961d45091f9c8349535ae69b80168423663685b44d89e1b9324d5cd11c83e86d805a3371f4f1600b0def551c52efb3c6cf020e9c11c273f WHIRLPOOL 1f9cc414724bf2d710876b2fbf721543cbd973b272a66b86bf134774b946ec540579b698fa3bcb56a2041d226da2c4298f750180c671ece17633067370a9df8e
+DIST kexec-tools-2.0.15.tar.xz 286944 SHA256 899b7b861431eb51886d0c12866e91b036228244d35a5fb04762dd1a3c0194e7 SHA512 0bddf31b9bb0e203b813d820e1e248974c2d62cb388dfaf4f2f4971f764cc71e54edbaeaeb663c15d6fa06574beceb87d9ffd7d822ac6699d86c54645096e7e9 WHIRLPOOL 8d40f03cc9cbaf90a9ab9bcb009dfd3c5b1130eec6ac515c3d3a2f7d7205d856fb43ff748a4ef51a1d3169f7ba068d998baafc155c7400a8e96245e326d62558
+DIST kexec-tools-2.0.4.tar.xz 271604 SHA256 e5f5ab00d746eb15b4714eca6a8ec5a1a86a62ce2bbdad1b3000161138a978c6 SHA512 2514f407d9150d2615dffc91a525fb28f159bef92b9543f9802e2618746b7d4c04137668ad8a8d8f0b75f68ed9057d09629ce736b6a061b5cf817b9d904f549e WHIRLPOOL 70ad298512e700cd1cdee7698e4fa68a769d91d3080d5d8387b8362ad49126ad68b0b6dbd1f13305958bdc988f805fa610e487682fd0eb5e4e9bcda0a9022627
+EBUILD kexec-tools-2.0.14.ebuild 1700 SHA256 80d8edc17a3ec421e15309db52fcde87c6ebd528fac4fcdbb2527d19ae83296f SHA512 3fbfc404e7e83a7a74efa5d1ffdf18239ba0e342a0a8a53d1e18b5cc97dd3258d78448b1c5ba20c22559ad18a4488917f3a9feeb711a98fb5720b65cbf47053a WHIRLPOOL b5759527e92e5fdc426f76dfed99b276d3b23e210b11c70fd3dab5c53c4264c004aeeb25ce784be78b69d5225bfb3646d0e2d7a4f4bbef7c4eddd470ad138523
+EBUILD kexec-tools-2.0.15.ebuild 1709 SHA256 2f7dc6d787e62850c84f6757fe9383f810c175aa8a728df50fc444108b867665 SHA512 2a55d5f45633ef05a2fd7bafe0da9052e7f994f698705eb1e3707ae0a0b916c16354e0ea4fd0a8b575217c773f1b7e79b3eedf5f2d5a475829afb49267621ef7 WHIRLPOOL ca8777dac0a982ff64149e8563d4a8343ab221e81fd6fe1e02d4db84518eb2bd9a55085a5768b635298e3fb479c8948178175181f43bea755b8f92507b46c966
+EBUILD kexec-tools-2.0.4-r2.ebuild 1639 SHA256 0cfc223b659de530ff90a67748cfe3f7cec6d2e69f52397847bbd93f95c774ad SHA512 0b1fdd825a235646f6589e1043a7edb190d3aeab6ec4dc153235140995d5ee6b09c226eb159182a3cebfcd9ff9251e241ef12fc0313a6f092a8187e197a3ce82 WHIRLPOOL 9289cf6095624cf4d93aa90883dc6f50751b4fafbadf4c03b8eed3dc1cf5fba4ff8c1b7f94cf8eebce8402fb5200388672f7e0a18eb26f116d69169ad7db896e
+EBUILD kexec-tools-9999.ebuild 1709 SHA256 2f7dc6d787e62850c84f6757fe9383f810c175aa8a728df50fc444108b867665 SHA512 2a55d5f45633ef05a2fd7bafe0da9052e7f994f698705eb1e3707ae0a0b916c16354e0ea4fd0a8b575217c773f1b7e79b3eedf5f2d5a475829afb49267621ef7 WHIRLPOOL ca8777dac0a982ff64149e8563d4a8343ab221e81fd6fe1e02d4db84518eb2bd9a55085a5768b635298e3fb479c8948178175181f43bea755b8f92507b46c966
+MISC ChangeLog 4635 SHA256 5d4db73b0ad8fe0a7658756629595187cd9d7f57bc49b7a1c967efadd2344131 SHA512 3d323bb7cb4391d70c455ed3f658010afe0241c07f8d0f670776c997088d21e79f9cb248273999da26acc5a5ca2bd884f947adf97841cef07e72684239538b4f WHIRLPOOL 8003c708454d492bfa20d7ebff1b80f91dcfc1c6cb290e6c197ba3b9330304c6d0f12e9584d8304b4cbc60902e9cd0007290e720bb8b147338db994492849f8f
+MISC ChangeLog-2015 13851 SHA256 a3bcc65aaef51bd56f433ca33a52ae000bdae38cdeee6160309893bdbf924a2e SHA512 056e5ffc5523bb1c2e9791dc4faa1715202cbe11b3300589f9cef62dcbfac78b41e99237c4044c1b8622f781f2a0a0343ec16dfdee795e2fa0ad11bafe94d0e5 WHIRLPOOL 2b93fa80c4499a1602a345d1546e795a745cc4d2aa0c874f9269ea1f7b9bd0b0931163027376ffb161d5622684b8612eba3acff81d7aecee3147486b40bb1002
+MISC metadata.xml 490 SHA256 7c27519c83a0610e3e576265116392d298620be323c61a45a7634f29714cf265 SHA512 6f4b25178cc6b8ff3fea664f2717eb7268d9e71c4ca46c170887eb836f9d78dff7e64067968175d018dc22bbcc2bb8cd6fd5f44edba0966fa568f9fd827a1cff WHIRLPOOL 45f2c1810f7717b0845b2003fea19be5cf9df3f3f2de22a686be9b961a6ebdcdad45cf12097b26b569dadf9a0e7300dcc735b9a4b0b64458f915a88fa8344c58
diff --git a/sys-apps/kexec-tools/files/90_kexec b/sys-apps/kexec-tools/files/90_kexec
new file mode 100644
index 000000000000..40bad423955d
--- /dev/null
+++ b/sys-apps/kexec-tools/files/90_kexec
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+version="$1" ; shift
+image="$1" ; shift
+
+exec sed \
+ -e "s:\"vmlinuz-.*\":\"vmlinuz-${version}\":" \
+ -e "s:/boot/initramfs-.*\.img:/boot/initramfs-${version}\.img:" \
+ -i /etc/kexec.conf
diff --git a/sys-apps/kexec-tools/files/README.Gentoo b/sys-apps/kexec-tools/files/README.Gentoo
new file mode 100644
index 000000000000..7735e3275ba4
--- /dev/null
+++ b/sys-apps/kexec-tools/files/README.Gentoo
@@ -0,0 +1,33 @@
+Usage
+=====
+
+Do
+ $ man 8 kexec
+for full understanding of the underlying kexec command.
+Gentoo offers a wrapper to the bare kexec command through
+/etc/init.d/kexec.
+
+Configuration
+-------------
+
+Configuration is done in /etc/conf.d/kexec, which is self-documented.
+
+Usage
+-----
+
+In Gentoo, kexec is invoked, i.e., the new kernel will be booted when
+rebooting, by reboot (8) command or by pressing Ctrl+Alt+Del.
+
+If you want to use kexec once, just run
+ $ /etc/init.d/kexec start
+
+It'll reserve kexec call at reboot. Later on, you can reboot anytime,
+letting kexec starts another (or the same) kernel. When all is done in
+the runlevel 6 - killing processes, unmounting volumes, etc - kexec
+starts the new kernel instead of doing the normal hardware reboot.
+
+If you want kexec to be run every time you reboot, add it to a runlevel:
+ $ rc-update add kexec <runlevel>
+
+If you want to reboot in the normal way this time, do:
+ $ touch /nokexec
diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.0-respect-LDFLAGS.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.0-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..040d138ece06
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec-tools-2.0.0-respect-LDFLAGS.patch
@@ -0,0 +1,11 @@
+--- kdump/Makefile
++++ kdump/Makefile
+@@ -18,7 +18,7 @@
+ $(KDUMP): CC=$(TARGET_CC)
+ $(KDUMP): $(KDUMP_OBJS)
+ @$(MKDIR) -p $(@D)
+- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $(KDUMP_OBJS)
++ $(LINK.o) $(CFLAGS) -o $@ $(KDUMP_OBJS)
+
+ $(KDUMP_MANPAGE): kdump/kdump.8
+ $(MKDIR) -p $(MANDIR)/man8
diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch
new file mode 100644
index 000000000000..6fc73f2db181
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch
@@ -0,0 +1,17 @@
+diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile
+index fec6210..2ed4d51 100644
+--- kexec-tools-2.0.3/kexec_test/Makefile
++++ kexec-tools-2.0.3/kexec_test/Makefile
+@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS) \
+ kexec_test/x86-setup-legacy-pic.S
+
+ BUILD_KEXEC_TEST = no
+-ifeq ($(ARCH),i386)
+-BUILD_KEXEC_TEST = yes
+-endif
+-ifeq ($(ARCH),x86_64)
+-BUILD_KEXEC_TEST = yes
+-endif
+
+ ifeq ($(BUILD_KEXEC_TEST),yes)
+
diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch
new file mode 100644
index 000000000000..64c6cd8ab419
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch
@@ -0,0 +1,24 @@
+ Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index c1859d1..1aa8559 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -44,7 +44,7 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
+
+ # Base compiler flags. These are extended by the subcomponent-Makefiles
+ # where necessary.
+-CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
++CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/include -I$(srcdir)/include -I$(srcdir)/util_lib/include \
+ -Iinclude/ $($(ARCH)_CPPFLAGS)
+ CFLAGS = @CFLAGS@ -fno-strict-aliasing -Wall -Wstrict-prototypes
+ PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
+@@ -77,6 +77,7 @@ pkgincludedir = $(includedir)/$(PACKAGE_NAME)
+ DESTDIR =
+
+ srcdir = @srcdir@
++top_builddir = @top_builddir@
+ VPATH = .:$(srcdir)
+
+ # install paths
diff --git a/sys-apps/kexec-tools/files/kexec.conf b/sys-apps/kexec-tools/files/kexec.conf
new file mode 100644
index 000000000000..aa829b9c2349
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.conf
@@ -0,0 +1,16 @@
+# Kernel image pathname, relative from /boot.
+KNAME="bzimage"
+
+# Additional arguments passed to kexec (8)
+# Following arguments are support:
+#
+# --reuse-cmdline
+# Use the current boot command line
+#
+# --command-line=string
+# Use a different command line
+#
+# --initrd=file
+# Specify an initrd to use
+#
+KEXEC_OPT_ARGS="--reuse-cmdline"
diff --git a/sys-apps/kexec-tools/files/kexec.conf-2.0.4 b/sys-apps/kexec-tools/files/kexec.conf-2.0.4
new file mode 100644
index 000000000000..b71ea2bae97f
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.conf-2.0.4
@@ -0,0 +1,34 @@
+# Load kexec kernel image into memory during shutdown instead of bootup
+# (default: yes)
+#LOAD_DURING_SHUTDOWN="yes"
+
+# Additional arguments passed to kexec (8)
+#KEXEC_OPT_ARGS=""
+
+# Kernel image partition. Mounted automatically if not.
+# (default: /boot)
+#BOOTPART="/boot"
+
+# Root partition (should be autodetected)
+#ROOTPART="/dev/hda3"
+
+# Kernel image pathname, relative from BOOTPART.
+# If it's one of
+# {kernel-genkernel,bzImage,vmlinuz,kernel}-<currently running kernel version>,
+# or bzImage, vmlinuz (without suffix),
+# then it's automaticaly detected.
+# Setting it to "-" will disable kexec.
+#KNAME="vmlinuz-3.9.0"
+
+# Initrd
+# Same automatic detection restriction as for KNAME apply.
+# initramfs-genkernel-<currently running kernel version>,
+# initrd{,.img}-<currently running kernel version>{,.img}
+# will be detected.
+#INITRD="/boot/fbsplash-emergence-1024x768"
+
+# Kernel parameters (should be autodetected)
+#KPARAM="splash=silent,theme:emergence"
+
+# Do not try to mount /boot
+# DONT_MOUNT_BOOT="yes"
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.12 b/sys-apps/kexec-tools/files/kexec.init-2.0.12
new file mode 100644
index 000000000000..a7bd859f0826
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.init-2.0.12
@@ -0,0 +1,174 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Set up some defaults.
+: "${LOAD_DURING_SHUTDOWN:=yes}"
+: "${BOOTPART:=/boot}"
+: "${DONT_MOUNT_BOOT:=no}"
+
+depend() {
+ need localmount
+}
+
+auto_prefix_bootpath() {
+ # Only auto-add prefix to relative paths.
+ case $1 in
+ */*) echo "$1";;
+ *) echo "${BOOTPART}/$1" ;;
+ esac
+}
+
+image_path() {
+ # Do no sanity checking if the user has set a value.
+ if [ -n "${KNAME}" ]; then
+ auto_prefix_bootpath "${KNAME}"
+ return
+ fi
+
+ local x kver="$(uname -r)" karch="$(uname -m)"
+ for x in \
+ "bzImage" \
+ "vmlinuz" \
+ "bzImage-${kver}" \
+ "vmlinuz-${kver}" \
+ "kernel-genkernel-${karch}-${kver}" \
+ "kernel-${kver}" \
+ "kernel-${karch}"; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return
+ fi
+ done
+
+ return 1
+}
+
+initrd_path() {
+ # Do no sanity checking if the user has set a value.
+ if [ -n "${INITRD}" ]; then
+ auto_prefix_bootpath "${INITRD}"
+ return 0
+ fi
+
+ local x kver="$(uname -r)" karch="$(uname -m)"
+ for x in \
+ "initrd" \
+ "initrd.img-${kver}" \
+ "initrd-${kver}.img" \
+ "initrd-${kver}" \
+ "initramfs-${kver}.img" \
+ "initramfs-genkernel-${karch}-${kver}"; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+mount_boot() {
+ [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1
+ mountinfo -q "${BOOTPART}" && return 1
+
+ ebegin "Mounting ${BOOTPART}"
+ mount "${BOOTPART}"
+ eend $?
+}
+
+load_image() {
+ if [ "${KNAME}" = "-" ]; then
+ ebegin "Disabling kexec"
+ kexec -u
+ eend $?
+ return # eend preserved $? for us.
+ fi
+
+ local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt
+
+ if ! img="$(image_path)"; then
+ if mount_boot; then
+ if img="$(image_path)"; then
+ mounted=true
+ initrd="$(initrd_path)"
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ umount "${BOOTPART}"
+ return 1
+ fi
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ return 1
+ fi
+ fi
+
+ if [ -z "${ROOTPART}" ]; then
+ ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
+ fi
+
+ if [ -z "${KPARAM}" ]; then
+ kparamopt="--reuse-cmdline"
+ fi
+
+ if [ -n "${initrd}" ]; then
+ initrdopt="--initrd=${initrd}"
+ fi
+
+ local msg
+ [ -n "${initrd}" ] && \
+ msg=" (with ${initrd})"
+ ebegin "Using kernel image ${img}${msg} for kexec"
+
+ kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
+ -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
+ local ret=$?
+
+ ${mounted} && umount "${BOOTPART}"
+ eend ${ret}
+ return ${ret}
+}
+
+start() {
+ if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
+ local mounted
+ if mount_boot; then
+ mounted=true
+ fi
+ if ! image_path >/dev/null; then
+ ewarn "Cannot find kernel image!"
+ ewarn "Please make sure a valid kernel image is present before reboot."
+ return 0
+ fi
+ if [ -n "${mounted}" ]; then
+ ebegin "Unmounting ${BOOTPART}"
+ umount "${BOOTPART}"
+ eend $?
+ fi
+ # $? is already set to the previous calls.
+ return
+ else
+ load_image
+ fi
+}
+
+stop() {
+ if ! yesno ${RC_REBOOT}; then
+ ebegin "Not rebooting; disabling kexec"
+ kexec -u
+ eend $?
+ return
+ fi
+
+ if [ -f /nokexec ]; then
+ ebegin "Rebooting; disabling kexec due to /nokexec"
+ rm -f /nokexec
+ kexec -u
+ eend $?
+ return
+ fi
+
+ if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
+ load_image
+ fi
+}
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
new file mode 100644
index 000000000000..5415b3bc85c0
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
@@ -0,0 +1,186 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Set up some defaults.
+: "${LOAD_DURING_SHUTDOWN:=yes}"
+: "${BOOTPART:=/boot}"
+: "${DONT_MOUNT_BOOT:=no}"
+
+depend() {
+ need localmount
+}
+
+auto_prefix_bootpath() {
+ # Only auto-add prefix to relative paths.
+ case $1 in
+ */*) echo "$1";;
+ *) echo "${BOOTPART}/$1" ;;
+ esac
+}
+
+get_genkernel_arch() {
+ case $1 in
+ x86_64) echo "amd64" ;;
+ i[3456]86) echo "x86" ;;
+ *) echo "$1" ;;
+ esac
+}
+
+image_path() {
+ # Do no sanity checking if the user has set a value.
+ if [ -n "${KNAME}" ]; then
+ auto_prefix_bootpath "${KNAME}"
+ return
+ fi
+
+ local x kver="$(uname -r)" karch="$(uname -m)"
+ local gkarch="$(get_genkernel_arch $karch)"
+ for x in \
+ "bzImage" \
+ "vmlinuz" \
+ "bzImage-${kver}" \
+ "vmlinuz-${kver}" \
+ "kernel-genkernel-${karch}-${kver}" \
+ "kernel-genkernel-${gkarch}-${kver}" \
+ "kernel-${kver}" \
+ "kernel-${karch}"; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return
+ fi
+ done
+
+ return 1
+}
+
+initrd_path() {
+ # Do no sanity checking if the user has set a value.
+ if [ -n "${INITRD}" ]; then
+ auto_prefix_bootpath "${INITRD}"
+ return 0
+ fi
+
+ local x kver="$(uname -r)" karch="$(uname -m)"
+ local gkarch="$(get_genkernel_arch $karch)"
+ for x in \
+ "initrd" \
+ "initrd.img-${kver}" \
+ "initrd-${kver}.img" \
+ "initrd-${kver}" \
+ "initramfs-${kver}.img" \
+ "initramfs-genkernel-${karch}-${kver}" \
+ "initramfs-genkernel-${gkarch}-${kver}"; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+mount_boot() {
+ [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1
+ mountinfo -q "${BOOTPART}" && return 1
+
+ ebegin "Mounting ${BOOTPART}"
+ mount "${BOOTPART}"
+ eend $?
+}
+
+load_image() {
+ if [ "${KNAME}" = "-" ]; then
+ ebegin "Disabling kexec"
+ kexec -u
+ eend $?
+ return # eend preserved $? for us.
+ fi
+
+ local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt
+
+ if ! img="$(image_path)"; then
+ if mount_boot; then
+ if img="$(image_path)"; then
+ mounted=true
+ initrd="$(initrd_path)"
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ umount "${BOOTPART}"
+ return 1
+ fi
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ return 1
+ fi
+ fi
+
+ if [ -z "${ROOTPART}" ]; then
+ ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
+ fi
+
+ if [ -z "${KPARAM}" ]; then
+ kparamopt="--reuse-cmdline"
+ fi
+
+ if [ -n "${initrd}" ]; then
+ initrdopt="--initrd=${initrd}"
+ fi
+
+ local msg
+ [ -n "${initrd}" ] && \
+ msg=" (with ${initrd})"
+ ebegin "Using kernel image ${img}${msg} for kexec"
+
+ kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
+ -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
+ local ret=$?
+
+ ${mounted} && umount "${BOOTPART}"
+ eend ${ret}
+ return ${ret}
+}
+
+start() {
+ if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
+ local mounted
+ if mount_boot; then
+ mounted=true
+ fi
+ if ! image_path >/dev/null; then
+ ewarn "Cannot find kernel image!"
+ ewarn "Please make sure a valid kernel image is present before reboot."
+ return 0
+ fi
+ if [ -n "${mounted}" ]; then
+ ebegin "Unmounting ${BOOTPART}"
+ umount "${BOOTPART}"
+ eend $?
+ fi
+ # $? is already set to the previous calls.
+ return
+ else
+ load_image
+ fi
+}
+
+stop() {
+ if ! yesno ${RC_REBOOT}; then
+ ebegin "Not rebooting; disabling kexec"
+ kexec -u
+ eend $?
+ return
+ fi
+
+ if [ -f /nokexec ]; then
+ ebegin "Rebooting; disabling kexec due to /nokexec"
+ rm -f /nokexec
+ kexec -u
+ eend $?
+ return
+ fi
+
+ if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
+ load_image
+ fi
+}
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.4-r2 b/sys-apps/kexec-tools/files/kexec.init-2.0.4-r2
new file mode 100644
index 000000000000..f60cb2a7cafa
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.init-2.0.4-r2
@@ -0,0 +1,164 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+image_path() {
+ local x= kver=$(uname -r) karch=$(uname -m)
+ BOOTPART="${BOOTPART:-/boot}"
+ KNAME="${KNAME:-bzImage}"
+ if [ -e "${KNAME}" ]; then
+ echo "${KNAME}"
+ return 0
+ fi
+ for x in "${KNAME#${BOOTPART}}" vmlinuz \
+ bzImage-${kver} vmlinuz-${kver} \
+ kernel-genkernel-${karch}-${kver} \
+ kernel-${kver} kernel-${karch}; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+initrd_path() {
+ local x= kver=$(uname -r) karch=$(uname -m)
+ BOOTPART="${BOOTPART:-/boot}"
+ INITRD="${INITRD:-initrd}"
+ if [ -e "${INITRD}" ]; then
+ echo "${INITRD}"
+ return 0
+ fi
+ for x in "${INITRD#${BOOTPART}}" \
+ initrd.img-${kver} initrd-${kver}.img \
+ initrd-${kver} initramfs-${kver}.img \
+ initramfs-genkernel-${karch}-${kver} ; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+mount_boot(){
+ local ret
+
+ [ -n "${DONT_MOUNT_BOOT}" ] && return 1
+ grep -q " ${BOOTPART:-/boot} " /proc/mounts && return 1
+
+ BOOTPART="${BOOTPART:-/boot}"
+ ebegin "Mounting ${BOOTPART}"
+ mount "${BOOTPART}"; ret=$?
+ eend ${ret}
+ return ${ret}
+}
+
+load_image() {
+ local ret
+ if [ "${KNAME}" = "-" ]; then
+ ebegin "Disabling kexec"
+ kexec -u; ret=$?
+ eend ${ret}
+ return ${ret}
+ fi
+
+ BOOTPART="${BOOTPART:-/boot}"
+ local img= initrd="$(initrd_path)" mounted=false initrdopt=
+
+ if ! img="$(image_path)"; then
+ if mount_boot; then
+ if img="$(image_path)"; then
+ mounted=true
+ initrd="$(initrd_path)"
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ umount "${BOOTPART}"
+ return 1
+ fi
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ return 1
+ fi
+ fi
+
+ if [ -n "${INITRD}" ] && \
+ ! [ "${BOOTPART}/${INITRD#${BOOTPART}}" = "${initrd}" ]; then
+ eerror "Requested initrd: ${INITRD#${BOOTPART}}"
+ eerror "could not be found"
+ return 1
+ fi
+
+ [ -n "${ROOTPART}" ] || \
+ ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
+
+ [ -n "${KPARAM}" ] || KEXEC_OPT_ARGS="${KEXEC_OPT_ARGS} --reuse-cmdline"
+
+ [ -n "${initrd}" ] && [ -e "${initrd}" ] && initrdopt="--initrd=${initrd}"
+
+ local msg=
+ [ -n "${initrd}" ] && \
+ msg="with ${initrd}"
+ einfo "Using kernel image ${img} ${msg} for kexec"
+
+ ebegin "Setting kexec with ${KEXEC_OPT_ARGS} -l ${img} root=${ROOTPART} ${KPARAM} ${initrdopt}"
+ kexec ${KEXEC_OPT_ARGS} -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
+ local res=$?
+
+ ${mounted} && umount "${BOOTPART}"
+ eend ${res}
+ return ${res}
+}
+
+start() {
+ if [ "${LOAD_DURING_SHUTDOWN:-yes}" = "yes" ]; then
+ local ret=0
+ BOOTPART="${BOOTPART:-/boot}"
+ if mount_boot; then
+ mounted=true
+ fi
+ if ! image_path > /dev/null; then
+ ewarn "Cannot find kernel image!"
+ ewarn "Please make sure a valid kernel image is present before reboot."
+ return 0
+ fi
+ if [ -n "${mounted}" ]; then
+ ebegin "Unmounting ${BOOTPART}"
+ umount "${BOOTPART}"; ret=$?
+ eend ${ret}
+ fi
+ return ${ret}
+ else
+ ebegin "Configuring kexec"
+ load_image
+ eend $?
+ fi
+}
+
+stop() {
+ [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0
+
+ if ! yesno $RC_REBOOT; then
+ einfo "Not rebooting, so disabling"
+ kexec -u
+ return 0
+ fi
+
+ if [ -f /nokexec ]; then
+ einfo "Not using kexec during reboot"
+ rm -f /nokexec
+ kexec -u
+ return 0
+ fi
+
+ ebegin "Configuring kexec"
+ load_image
+ eend $?
+}
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3 b/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3
new file mode 100644
index 000000000000..6eb2a748c9e9
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3
@@ -0,0 +1,164 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+image_path() {
+ local x= kver=$(uname -r) karch=$(uname -m)
+ BOOTPART="${BOOTPART:-/boot}"
+ KNAME="${KNAME:-bzImage}"
+ if [ -e "${KNAME}" ]; then
+ echo "${KNAME}"
+ return 0
+ fi
+ for x in "${KNAME#${BOOTPART}}" vmlinuz \
+ bzImage-${kver} vmlinuz-${kver} \
+ kernel-genkernel-${karch}-${kver} \
+ kernel-${kver} kernel-${karch}; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+initrd_path() {
+ local x= kver=$(uname -r) karch=$(uname -m)
+ BOOTPART="${BOOTPART:-/boot}"
+ INITRD="${INITRD:-initrd}"
+ if [ -e "${INITRD}" ]; then
+ echo "${INITRD}"
+ return 0
+ fi
+ for x in "${INITRD#${BOOTPART}}" \
+ initrd.img-${kver} initrd-${kver}.img \
+ initrd-${kver} initramfs-${kver}.img \
+ initramfs-genkernel-${karch}-${kver} ; do
+ if [ -e "${BOOTPART}/${x}" ]; then
+ echo "${BOOTPART}/${x}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+mount_boot(){
+ local ret
+
+ [ "${DONT_MOUNT_BOOT:-no}" = "no" ] || return 1
+ grep -q " ${BOOTPART:-/boot} " /proc/mounts && return 1
+
+ BOOTPART="${BOOTPART:-/boot}"
+ ebegin "Mounting ${BOOTPART}"
+ mount "${BOOTPART}"; ret=$?
+ eend ${ret}
+ return ${ret}
+}
+
+load_image() {
+ local ret
+ if [ "${KNAME}" = "-" ]; then
+ ebegin "Disabling kexec"
+ kexec -u; ret=$?
+ eend ${ret}
+ return ${ret}
+ fi
+
+ BOOTPART="${BOOTPART:-/boot}"
+ local img= initrd="$(initrd_path)" mounted=false initrdopt=
+
+ if ! img="$(image_path)"; then
+ if mount_boot; then
+ if img="$(image_path)"; then
+ mounted=true
+ initrd="$(initrd_path)"
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ umount "${BOOTPART}"
+ return 1
+ fi
+ else
+ eerror "No kernel image found in ${BOOTPART}!"
+ return 1
+ fi
+ fi
+
+ if [ -n "${INITRD}" ] && \
+ ! [ "${BOOTPART}/${INITRD#${BOOTPART}}" = "${initrd}" ]; then
+ eerror "Requested initrd: ${INITRD#${BOOTPART}}"
+ eerror "could not be found"
+ return 1
+ fi
+
+ [ -n "${ROOTPART}" ] || \
+ ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
+
+ [ -n "${KPARAM}" ] || KEXEC_OPT_ARGS="${KEXEC_OPT_ARGS} --reuse-cmdline"
+
+ [ -n "${initrd}" ] && [ -e "${initrd}" ] && initrdopt="--initrd=${initrd}"
+
+ local msg=
+ [ -n "${initrd}" ] && \
+ msg="with ${initrd}"
+ einfo "Using kernel image ${img} ${msg} for kexec"
+
+ ebegin "Setting kexec with ${KEXEC_OPT_ARGS} -l ${img} root=${ROOTPART} ${KPARAM} ${initrdopt}"
+ kexec ${KEXEC_OPT_ARGS} -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
+ local res=$?
+
+ ${mounted} && umount "${BOOTPART}"
+ eend ${res}
+ return ${res}
+}
+
+start() {
+ if [ "${LOAD_DURING_SHUTDOWN:-yes}" = "yes" ]; then
+ local ret=0
+ BOOTPART="${BOOTPART:-/boot}"
+ if mount_boot; then
+ mounted=true
+ fi
+ if ! image_path > /dev/null; then
+ ewarn "Cannot find kernel image!"
+ ewarn "Please make sure a valid kernel image is present before reboot."
+ return 0
+ fi
+ if [ -n "${mounted}" ]; then
+ ebegin "Unmounting ${BOOTPART}"
+ umount "${BOOTPART}"; ret=$?
+ eend ${ret}
+ fi
+ return ${ret}
+ else
+ ebegin "Configuring kexec"
+ load_image
+ eend $?
+ fi
+}
+
+stop() {
+ if ! yesno $RC_REBOOT; then
+ einfo "Not rebooting, so disabling"
+ kexec -u
+ return 0
+ fi
+
+ if [ -f /nokexec ]; then
+ einfo "Not using kexec during reboot"
+ rm -f /nokexec
+ kexec -u
+ return 0
+ fi
+
+ [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0
+
+ ebegin "Configuring kexec"
+ load_image
+ eend $?
+}
diff --git a/sys-apps/kexec-tools/files/kexec.service b/sys-apps/kexec-tools/files/kexec.service
new file mode 100644
index 000000000000..289aae0df0b1
--- /dev/null
+++ b/sys-apps/kexec-tools/files/kexec.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Gracefully restart the box
+Documentation=man:kexec(8)
+After=boot.mount
+Before=shutdown.target umount.target final.target
+ConditionPathExists=!/nokexec
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/kexec.conf
+ExecStart=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
+ExecStop=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild
new file mode 100644
index 000000000000..df5c2d5b6103
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
+ AUTOTOOLS_AUTORECONF=true
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm64 x86"
+fi
+
+inherit autotools-utils linux-info systemd
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="booke lzma xen zlib"
+
+REQUIRED_USE="lzma? ( zlib )"
+
+DEPEND="
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~KEXEC"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
+ "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
+)
+
+pkg_setup() {
+ # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
+ export ASFLAGS="${CCASFLAGS}"
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with booke)
+ $(use_with lzma)
+ $(use_with xen)
+ $(use_with zlib)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ dodoc "${FILESDIR}"/README.Gentoo
+
+ newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
+ newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
+
+ insinto /etc
+ doins "${FILESDIR}"/kexec.conf
+
+ insinto /etc/kernel/postinst.d
+ doins "${FILESDIR}"/90_kexec
+
+ systemd_dounit "${FILESDIR}"/kexec.service
+}
+
+pkg_postinst() {
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "For systemd support the new config file is"
+ elog " /etc/kexec.conf"
+ elog "Please adopt it to your needs as there is no autoconfig anymore"
+ fi
+}
diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.15.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.15.ebuild
new file mode 100644
index 000000000000..f3f01574c051
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-2.0.15.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
+ AUTOTOOLS_AUTORECONF=true
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+inherit libtool linux-info systemd
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="booke lzma xen zlib"
+
+REQUIRED_USE="lzma? ( zlib )"
+
+DEPEND="
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~KEXEC"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
+ "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
+)
+
+pkg_setup() {
+ # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
+ export ASFLAGS="${CCASFLAGS}"
+}
+
+src_prepare() {
+ default
+ elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with booke)
+ $(use_with lzma)
+ $(use_with xen)
+ $(use_with zlib)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ dodoc "${FILESDIR}"/README.Gentoo
+
+ newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
+ newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
+
+ insinto /etc
+ doins "${FILESDIR}"/kexec.conf
+
+ insinto /etc/kernel/postinst.d
+ doins "${FILESDIR}"/90_kexec
+
+ systemd_dounit "${FILESDIR}"/kexec.service
+}
+
+pkg_postinst() {
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "For systemd support the new config file is"
+ elog " /etc/kexec.conf"
+ elog "Please adopt it to your needs as there is no autoconfig anymore"
+ fi
+}
diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.4-r2.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.4-r2.ebuild
new file mode 100644
index 000000000000..89c77e7586ba
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-2.0.4-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils flag-o-matic linux-info systemd
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
+SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="booke lzma xen zlib"
+
+REQUIRED_USE="lzma? ( zlib )"
+
+DEPEND="
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~KEXEC"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.0-respect-LDFLAGS.patch
+ "${FILESDIR}"/${P}-disable-kexec-test.patch
+ "${FILESDIR}"/${P}-out-of-source.patch
+ )
+
+pkg_setup() {
+ # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
+ export ASFLAGS="${CCASFLAGS}"
+ # to disable the -fPIE -pie in the hardened compiler
+ if gcc-specs-pie ; then
+ filter-flags -fPIE
+ append-ldflags -nopie
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with booke)
+ $(use_with lzma)
+ $(use_with xen)
+ $(use_with zlib)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ dodoc "${FILESDIR}"/README.Gentoo
+
+ newinitd "${FILESDIR}"/kexec.init-${PVR} kexec
+ newconfd "${FILESDIR}"/kexec.conf-${PV} kexec
+
+ insinto /etc
+ doins "${FILESDIR}"/kexec.conf
+
+ systemd_dounit "${FILESDIR}"/kexec.service
+}
+
+pkg_postinst() {
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "For systemd support the new config file is"
+ elog " /etc/kexec.conf"
+ elog "Please adopt it to your needs as there is no autoconfig anymore"
+ fi
+}
diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
new file mode 100644
index 000000000000..f3f01574c051
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
+ AUTOTOOLS_AUTORECONF=true
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+inherit libtool linux-info systemd
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="booke lzma xen zlib"
+
+REQUIRED_USE="lzma? ( zlib )"
+
+DEPEND="
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~KEXEC"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
+ "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
+)
+
+pkg_setup() {
+ # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
+ export ASFLAGS="${CCASFLAGS}"
+}
+
+src_prepare() {
+ default
+ elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with booke)
+ $(use_with lzma)
+ $(use_with xen)
+ $(use_with zlib)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ dodoc "${FILESDIR}"/README.Gentoo
+
+ newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
+ newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
+
+ insinto /etc
+ doins "${FILESDIR}"/kexec.conf
+
+ insinto /etc/kernel/postinst.d
+ doins "${FILESDIR}"/90_kexec
+
+ systemd_dounit "${FILESDIR}"/kexec.service
+}
+
+pkg_postinst() {
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "For systemd support the new config file is"
+ elog " /etc/kexec.conf"
+ elog "Please adopt it to your needs as there is no autoconfig anymore"
+ fi
+}
diff --git a/sys-apps/kexec-tools/metadata.xml b/sys-apps/kexec-tools/metadata.xml
new file mode 100644
index 000000000000..2ea57db782e2
--- /dev/null
+++ b/sys-apps/kexec-tools/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="lzma">Enables support for LZMA compressed kernel images</flag>
+ <flag name="booke">Include support for Book-E memory management</flag>
+ <flag name="xen">Enable extended xen support</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/keyutils/Manifest b/sys-apps/keyutils/Manifest
new file mode 100644
index 000000000000..c235194d6436
--- /dev/null
+++ b/sys-apps/keyutils/Manifest
@@ -0,0 +1,15 @@
+AUX keyutils-1.5.10-disable-tests.patch 1214 SHA256 a2bff600ab92b083e0b87db90d53f08b5e6f49a8f55cdd8c0d9373430f34df31 SHA512 dda49b7c3aeadcd7d4e52d304ecf60fedbb84d02a11d0a641dfa4d563c6f6fcc2c577b46eb688c159feaf0be32c0aff4470adec5d1c3bff544d5dcea47162cbe WHIRLPOOL 1c4b9166c36500d4e2d89d39a565364d7c99b45b7728a6eb4fb402d09064c9751a522869f55cc5b4f8c00d46512ac317133a3cb097feec278de6c81db4fecf5d
+AUX keyutils-1.5.10-makefile-fixup.patch 798 SHA256 1c1fc7dfda5767f7aa79ec8991b9ceff64760ba4b4cd91b3372e8ab00bc63ba9 SHA512 76b1eb98157f2f45b9acce9fd99f2fb10d592cfe61463075a8f6b963ffa2ab97f44aa3e5a3cc7bacaf53d08f51e81225506324edb6d3fa7d5c51954fce783e1e WHIRLPOOL b208140091da5c5102ced0cf67be4d15391edc9fe742e1f00e26ef371e0bac62cc3e3f6b512065c35c341a563b3593d0e2edd29635ba3d8945109a7279a0c865
+AUX keyutils-1.5.5-makefile-fixup.patch 879 SHA256 b68e7fab7293c680e5f44f3b116622b2d7dba2039e849ec53ab577c4e12f3a5b SHA512 d3628be5cd759fd59e3fb07897db2f23615cc4b2b12d537438c4c186e5588d8d7c22438fdb26003be29ace4910db24a889d4e35550b74a91958a4fcb4bc654c0 WHIRLPOOL 69a9ec2b8386e39c6c133395b96b7a50cc12e1a4644ce06198f4a77431b685e0e962938b97c7a757074beae8794ceafc9f36cf270064b855f91db0c91475ba1e
+AUX keyutils-1.5.9-disable-tests.patch 1146 SHA256 05fec2448b3a28fb9daeba0b347fa328c0bb535242bf22d88b011db383a9e73c SHA512 cae4f6457587328efba4d391726d8ca61a7d4a2ca0fbf2b8eb6ccfadce53240ad9cb44137dc178efe7cfa78bef48d6d84fffd7af07cee15a949f5c62eae493e2 WHIRLPOOL 257fb41f9c2a2bbe3d9f719e490d6f335477fd56527bb012accd8144c3b5d4083d50b26c18573570d456e287f62db71759f3e55672b9e4a59d1e5f9e47488e29
+AUX keyutils-1.5.9-endian-check-1.patch 1254 SHA256 64f799b29ab757c8db8fe2c6f107acd8f5bc433b986d5fd70d83fe1cd150f391 SHA512 95f05393186546ff3b28e14184c8da6d507085e687e6921470bcb433a925b56dfc7b806eaf63a552552d0cad3a73294614f990db583e3a6b89ff973ffad1dce6 WHIRLPOOL 78529963ed418a10b407ee06045fae85520b12ab390791e4d2c7dc0e257074b6d4e23b6e7a7453afacdf67702baa0fe2e20046e73c013ace86d443fc083774b2
+AUX keyutils-1.5.9-endian-check-2.patch 1130 SHA256 85977ff8e84a085cfaa483d2d0d93f6c5f20044b20ad19eab4336c36e29e2a13 SHA512 651981bd5732bb539139cd43a3f25838d5adc99bbed0d5227270572fa8f53524208a534f3fbfbb707b23ef319492dbf11b64633ce6681119c7698a2b9ef49b95 WHIRLPOOL 32cef4e0e84cf0666c5c29322a6eeec7a5c25a8a8773e097b3872fa6a1d861c218dbb2e63f4f277680249f17129cff5ba08284d4158455060ad75d10132e9fb4
+AUX keyutils-1.5.9-header-extern-c.patch 1154 SHA256 ce23f0f3d294f2c4b320f370b7ab82b492ae86d5dc29d39fee17b6efad57bcbc SHA512 f6e91c6eb9785ff8e661fc80ab275a3a35d87cfc73ab9cc45195734aaa5126e5ddc219dce8a78834869b67448a730265f2b72390f0b517dedf6c729bf22d828e WHIRLPOOL 4c3f733d53256948feebacf190491dc725a9ec54d4dabc5f1b3ca17aa90668dcefa8681b1345b5a0ec4bc264e912603424f930fa4fc1c5fe9ceab9a72c0c9266
+DIST keyutils-1.5.10.tar.bz2 74190 SHA256 115c3deae7f181778fd0e0ffaa2dad1bf1fe2f5677cf2e0e348cdb7a1c93afb6 SHA512 7f6f956c7e76cdc2aeb52e74fe670b20a5f9a5d9b543fd2ce971d80c48745f37d05235a42f0a8f152b1128a109c7d8bf07e751282a20d2d3f433a99a5308ae8d WHIRLPOOL 09d4c420d26e4089c5d1c460faf5c6a40912dc2f2d4abb3b1aaedfacb3919e7deab8e29c7a4f8306d5b8539c7ab0f3df659cc1cb804e5d43030bb0c331eead9f
+DIST keyutils-1.5.9.tar.bz2 74683 SHA256 4da2c5552c688b65ab14d4fd40fbdf720c8b396d8ece643e040cf6e707e083ae SHA512 d4ee1dabb87844e18bfd8d094a5bc9ce792c96720b71e77961b6c36bb1addb9acea2a7004ddfba1d09b167af908368162312e5c3656b22a6266955bb57b887e2 WHIRLPOOL 0509cce076a32d2f319f596506d4aaeb83e1853ee6337e6a3041e6957e9098f4482ae56a9c6455605b72b3f34701a890e9be666b6fdd752ff14a3d3564dcba19
+EBUILD keyutils-1.5.10.ebuild 2804 SHA256 bb7f0e82e629187f227b12f1c9b3a58d082601fc2d89065a4a293556b78ab497 SHA512 88cd81319c89a05b6f4f446f22833810e894802809610afc3066df35ad0d426349e964e739aaa34bdc4dab9368d5c728cb791af2486f38f0e966be9c49981323 WHIRLPOOL d258a2129aca3d8f39713fbaeeb85c7fc61b2c6fcedae7be1f62ca7360e3ca45481813e9bda791b2637d2389068ac51d625a5ee1ffa6b4bb000a1e4e2f0732e0
+EBUILD keyutils-1.5.9-r1.ebuild 2293 SHA256 3dc133a0c4b5e52e74733fabeaf6cc67197a415d103f7a5ca181ac3dd60ecaed SHA512 fbcf7923a757dd2247cb0d1c644e865f03c31f09fa3c880264d1e0b5631e7b8f4611c6206286d8fbba616bba9c0f553d9c1c714744d94e454f309f64ed37980e WHIRLPOOL 40ad2f3a43412a398c99cdf5a70ccf0f529c3d9e7bcb7f9a78eddf39831a26e9decc73864c021ef9e037ad76ca96e161dc713c5f2e007430ddf2a91f8d7d7bb3
+EBUILD keyutils-1.5.9-r4.ebuild 2961 SHA256 00b357992b1c07902c765b1b50ccc4f730da002ec6af0d899bbc0c132c2e360e SHA512 8a2f8ec2f1b7ae71f09c9a17ec391b1224fb547d7a1594672ea62f74581be65005d67ea9befc260bbef28686a403a34543eaeb9490081080e04bac5c5c94a5f4 WHIRLPOOL 3881995c183a4066b9c12829fb1e9fa89ec94ab1cbc385629b0953d468b10dbb0f77617de5f2fb6f000d756daa3542b7ab2272f7aafec744775da216bf4499d2
+MISC ChangeLog 4183 SHA256 4c55524fe720bd5e75dce492b35b13486b50d22ea4d8f9df18c110d0935f7867 SHA512 68165ef66e51d689fbaf087a49d47c8fbb036d1f7c892630b3ee8da7450bbeb0a4054b7c7f7a64660905a2ab437e80dcbb736bbc24a60c33a1b79890a7171203 WHIRLPOOL a44a88bd9389ba30c969c4de27d4a410c6f3f2fbfd0a8393712145a86d12bb98604827e9e7b39f871c886aae714eae8f8c010979ea19ac4d2ab87e1fb92e57d5
+MISC ChangeLog-2015 7010 SHA256 bac26b0ee97bbb6d12e5042fa53608c02689023520e64303e4f49cf3ea47c514 SHA512 f5bf13f272e305f3c9df81829b7469173dab44ea1115d22f5e5e1a2284df614f31ec1ee6612350b6b28f1e1208cdffd3e6af5fdef28980426875b6d3cd81b582 WHIRLPOOL 41d3087919d9f43b3a0065348a09eb00a3c2dd3ccf4696517a9a9d338dea3cdd9559a653a2cd0dc8589fed19ccfa2974ccbfeebb2cf63330f6390ad1fa37bd9d
+MISC metadata.xml 329 SHA256 4ce73c4d5d41f458fc9039b8da317ba512dcc468f39b9db038e5d6416707179f SHA512 3baca06564c2219ea6175ea39cea467ada4e7bf21a4341fcdc9d5b885ae387f4ca4f93605464b900a2524d64badfae641c5459d0acd0569de1ce848528a46ee4 WHIRLPOOL 19cd1cebebe165ee3cde545b131693f98c677790b8cc07404639880f9c4c83576e5db8080af03f7e7409d0aa4b03b4053de460e6d30ae3ebbc8e645d984e1b56
diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch b/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch
new file mode 100644
index 000000000000..fa82792cddbd
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch
@@ -0,0 +1,51 @@
+disable tests that mess with system wide settings
+
+https://bugs.gentoo.org/519062
+
+--- keyutils-1.5.10/tests/bugzillas/bz1031154/runtest.sh
++++ keyutils-1.5.10/tests/bugzillas/bz1031154/runtest.sh
+@@ -27,6 +27,8 @@
+
+ echo "++++ BEGINNING TEST" >$OUTPUTFILE
+
++if false ; then
++
+ # we need a reference time to scan the audit log from so as not to pick up old
+ # results from this test.
+ base_date=`date +"%x@%X"`
+@@ -97,6 +99,10 @@
+ fi
+ fi
+
++else
++marker "Gentoo: skipping test due to system wide modifications"
++fi
++
+ echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
+
+ # --- then report the results in the database ---
+
+https://bugs.gentoo.org/522050
+
+--- keyutils-1.5.10/tests/keyctl/padd/useradd/runtest.sh
++++ keyutils-1.5.10/tests/keyctl/padd/useradd/runtest.sh
+@@ -40,6 +40,8 @@
+ marker "UNLINK KEY"
+ unlink_key $keyid @s
+
++if false ; then
++
+ if [ $skip_root_required = 0 ] && {
+ [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 6.6 ||
+ keyutils_at_or_later_than 1.5.6 ;
+@@ -85,6 +87,10 @@
+ fi
+ fi
+
++else
++marker "Gentoo: skipping test due to system wide modifications"
++fi
++
+ echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
+
+ # --- then report the results in the database ---
diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch b/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch
new file mode 100644
index 000000000000..c37cca0dbfd7
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch
@@ -0,0 +1,25 @@
+From 19b92eb56ca53cb4967e7bd27e3bc5e3b0e29736 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 16 Mar 2017 09:55:42 +0100
+Subject: [PATCH] depend on $(DEVELLIB) not -lkeyutils
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 824bbbf..8ce3a13 100644
+--- a/Makefile
++++ b/Makefile
+@@ -167,7 +167,7 @@ ifeq ($(NO_SOLIB),0)
+ $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+ $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+ mkdir -p $(DESTDIR)$(USRLIBDIR)
+- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
++ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
+ endif
+ $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl
+ $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key
+--
+2.12.0
+
diff --git a/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch b/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch
new file mode 100644
index 000000000000..ff4bcfa94d85
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch
@@ -0,0 +1,27 @@
+Raw patch edit based on:
+
+From af14e945bd617bb82ebc4c6c8d4fb948d715f16a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 2 Sep 2011 13:30:30 -0400
+Subject: [PATCH] depend on $(DEVELLIB) not -lkeyutils
+
+---
+ Makefile | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9e3fa9b..46695d1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -91,7 +91,7 @@
+ $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+ $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+ mkdir -p $(DESTDIR)$(USRLIBDIR)
+- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
++ $(LNS) $(SONAME) $(DESTDIR)$(LIBDIR)/$(DEVELLIB)
+ $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl
+ $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key
+ $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh
+--
+1.7.6
+
diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch b/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch
new file mode 100644
index 000000000000..0a5a02b3a484
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch
@@ -0,0 +1,51 @@
+disable tests that mess with system wide settings
+
+https://bugs.gentoo.org/519062
+
+--- a/tests/bugzillas/bz1031154/runtest.sh
++++ b/tests/bugzillas/bz1031154/runtest.sh
+@@ -11,6 +11,8 @@
+ result=PASS
+ echo "++++ BEGINNING TEST" >$OUTPUTFILE
+
++if false; then
++
+ # we need a reference time to scan the audit log from so as not to pick up old
+ # results from this test.
+ base_date=`date +"%x@%X"`
+@@ -81,6 +83,10 @@
+ fi
+ fi
+
++else
++marker "Gentoo: skipping test due to system wide modifications"
++fi
++
+ echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
+
+ # --- then report the results in the database ---
+
+https://bugs.gentoo.org/522050
+
+--- a/tests/keyctl/padd/useradd/runtest.sh
++++ b/tests/keyctl/padd/useradd/runtest.sh
+@@ -40,6 +40,8 @@
+ marker "UNLINK KEY"
+ unlink_key $keyid @s
+
++if false; then
++
+ # add keys with huge payloads
+ old_root_quota=`cat /proc/sys/kernel/keys/root_maxbytes`
+ if [ $old_root_quota -lt 65536 ]
+@@ -76,6 +78,10 @@
+ sleep 1
+ fi
+
++else
++marker "Gentoo: skipping test due to system wide modifications"
++fi
++
+ echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
+
+ # --- then report the results in the database ---
diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch
new file mode 100644
index 000000000000..18344b94940e
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch
@@ -0,0 +1,43 @@
+patch from upstream
+
+https://bugs.gentoo.org/426424
+
+From f0d9a8c15f1525d0404077f32fddccb606a61bac Mon Sep 17 00:00:00 2001
+From: Tyler Hicks <tyhicks@canonical.com>
+Date: Mon, 24 Feb 2014 18:52:41 -0600
+Subject: [PATCH] TEST: Make endianness detection work with file 5.14
+
+The 5.14 release of file outputs an extra space after [LM]SB:
+
+$ ./src/file -m magic/magic.mgc -L /proc/$$/exe
+/proc/12755/exe: ELF 64-bit LSB executable, ...
+
+This was due to the elf magic file containing some trailing spaces in
+the 5.14 release.
+
+Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+---
+ tests/toolbox.inc.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
+index cbc49e0fce23..fe3c7f71299a 100644
+--- a/tests/toolbox.inc.sh
++++ b/tests/toolbox.inc.sh
+@@ -17,10 +17,10 @@ includes=${includes%/*}/
+ echo === $OUTPUTFILE ===
+
+ endian=`file -L /proc/$$/exe`
+-if expr "$endian" : '.* MSB executable.*' >&/dev/null
++if expr "$endian" : '.* MSB \+executable.*' >&/dev/null
+ then
+ endian=BE
+-elif expr "$endian" : '.* LSB executable.*' >&/dev/null
++elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null
+ then
+ endian=LE
+ else
+--
+2.11.0
+
diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch
new file mode 100644
index 000000000000..a4558d8edfcb
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch
@@ -0,0 +1,38 @@
+patch from upstream
+
+https://bugs.gentoo.org/426424
+
+From ce92e974b8ecff19cf430b7b58a09b8190645b5c Mon Sep 17 00:00:00 2001
+From: David Howells <dhowells@redhat.com>
+Date: Fri, 26 Feb 2016 10:07:00 +0000
+Subject: [PATCH] TEST: Fix endianness determination
+
+Endianness determination was broken sometime after Fedora 20 when
+executables switched to being DYN objects rather than EXEC objects. This
+caused the output of file to change.
+
+Signed-off-by: David Howells <dhowells@redhat.com>
+---
+ tests/toolbox.inc.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
+index f2463c57b40e..5ac23ffc04fb 100644
+--- a/tests/toolbox.inc.sh
++++ b/tests/toolbox.inc.sh
+@@ -13,10 +13,10 @@
+ echo === $OUTPUTFILE ===
+
+ endian=`file -L /proc/$$/exe`
+-if expr "$endian" : '.* MSB \+executable.*' >&/dev/null
++if expr "$endian" : '.* MSB \+\(executable\|shared object).*' >&/dev/null
+ then
+ endian=BE
+-elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null
++elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null
+ then
+ endian=LE
+ else
+--
+2.11.0
+
diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-header-extern-c.patch b/sys-apps/keyutils/files/keyutils-1.5.9-header-extern-c.patch
new file mode 100644
index 000000000000..c7a4c1034c90
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.9-header-extern-c.patch
@@ -0,0 +1,43 @@
+sent upstream
+
+From 1f15000ad21c301a51f7746eb561659348060f45 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 25 Jan 2017 14:06:55 -1000
+Subject: [PATCH keyutils] add extern C markings to header file for C++ users
+
+If people try to use keyutils from C++ code, the header doesn't work
+properly because the compiler mangles the keyutils symbols. Add the
+right extern markings so it works out of the box.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ keyutils.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/keyutils.h b/keyutils.h
+index a69fa7aaa11d..d50d19d3e929 100644
+--- a/keyutils.h
++++ b/keyutils.h
+@@ -15,6 +15,10 @@
+ #include <sys/types.h>
+ #include <stdint.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ extern const char keyutils_version_string[];
+ extern const char keyutils_build_string[];
+
+@@ -180,4 +184,8 @@ extern int recursive_session_key_scan(recursive_key_scanner_t func, void *data);
+ extern key_serial_t find_key_by_type_and_desc(const char *type, const char *desc,
+ key_serial_t destringid);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* KEYUTILS_H */
+--
+2.11.0
+
diff --git a/sys-apps/keyutils/keyutils-1.5.10.ebuild b/sys-apps/keyutils/keyutils-1.5.10.ebuild
new file mode 100644
index 000000000000..658882242f2c
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.5.10.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib eutils toolchain-funcs linux-info multilib-minimal
+
+DESCRIPTION="Linux Key Management Utilities"
+HOMEPAGE="https://people.redhat.com/dhowells/keyutils/"
+SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static static-libs test"
+
+RDEPEND=""
+DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.10-makefile-fixup.patch
+ "${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
+ "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
+)
+
+pkg_setup() {
+ CONFIG_CHECK="~KEYS"
+ use test && CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # The lsb check is useless, so avoid spurious command not found messages.
+ sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
+ # All the test files are bash, but try to execute via `sh`.
+ sed -i -r \
+ -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
+ tests/{Makefile*,*.sh} || die
+ find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} +
+ # Some tests call the kernel which calls userspace, but that will
+ # run the install keyutils rather than the locally compiled one,
+ # so disable round trip tests.
+ rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export AR CC
+ sed -i \
+ -e "1iRPATH = $(usex static -static '')" \
+ -e '/^C.*FLAGS/s|:=|+=|' \
+ -e 's:-Werror::' \
+ -e '/^BUILDFOR/s:=.*:=:' \
+ -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \
+ -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
+ -e "s: /: ${EPREFIX}/:g" \
+ -e '/^NO_ARLIB/d' \
+ Makefile || die
+
+ # We need the static lib in order to statically link programs.
+ if use static ; then
+ export NO_ARLIB=0
+ # Hack the progs to depend on the static lib instead.
+ sed -i \
+ -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB) $(SONAME):' \
+ Makefile || die
+ else
+ export NO_ARLIB=$(usex static-libs 0 1)
+ fi
+ emake
+}
+
+multilib_src_test() {
+ # Execute the locally compiled code rather than the
+ # older versions already installed in the system.
+ LD_LIBRARY_PATH=${BUILD_DIR} \
+ PATH="${BUILD_DIR}:${PATH}" \
+ emake test
+}
+
+multilib_src_install() {
+ # Possibly undo the setting for USE=static (see src_compile).
+ export NO_ARLIB=$(usex static-libs 0 1)
+
+ default
+ use static || gen_usr_ldscript -a keyutils
+}
+
+multilib_src_install_all() {
+ dodoc README
+}
diff --git a/sys-apps/keyutils/keyutils-1.5.9-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.9-r1.ebuild
new file mode 100644
index 000000000000..c68b8acb2668
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.5.9-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib eutils toolchain-funcs linux-info multilib-minimal
+
+DESCRIPTION="Linux Key Management Utilities"
+HOMEPAGE="https://people.redhat.com/dhowells/keyutils/"
+SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+pkg_setup() {
+ CONFIG_CHECK="~KEYS"
+ use test && CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch
+
+ # The lsb check is useless, so avoid spurious command not found messages.
+ sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
+ # All the test files are bash, but try to execute via `sh`.
+ sed -i -r \
+ -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
+ tests/{Makefile*,*.sh} || die
+ find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} +
+ # Some tests call the kernel which calls userspace, but that will
+ # run the install keyutils rather than the locally compiled one,
+ # so disable round trip tests.
+ rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export CC
+ tc-export AR
+ sed -i \
+ -e '1iRPATH=' \
+ -e '/^C.*FLAGS/s|:=|+=|' \
+ -e 's:-Werror::' \
+ -e '/^BUILDFOR/s:=.*:=:' \
+ -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \
+ -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
+ -e "s: /: ${EPREFIX}/:g" \
+ Makefile || die
+
+ emake
+}
+
+multilib_src_test() {
+ # Execute the locally compiled code rather than the
+ # older versions already installed in the system.
+ LD_LIBRARY_PATH=${BUILD_DIR} \
+ PATH="${BUILD_DIR}:${PATH}" \
+ emake test
+}
+
+multilib_src_install() {
+ default
+ gen_usr_ldscript -a keyutils
+}
+
+multilib_src_install_all() {
+ dodoc README
+}
diff --git a/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild b/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild
new file mode 100644
index 000000000000..473847a77c1d
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib eutils toolchain-funcs linux-info multilib-minimal
+
+DESCRIPTION="Linux Key Management Utilities"
+HOMEPAGE="https://people.redhat.com/dhowells/keyutils/"
+SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static static-libs test"
+
+RDEPEND=""
+DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+pkg_setup() {
+ CONFIG_CHECK="~KEYS"
+ use test && CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch
+ epatch "${FILESDIR}"/${PN}-1.5.9-endian-check-{1,2}.patch #426424
+ epatch "${FILESDIR}"/${PN}-1.5.9-disable-tests.patch #519062 #522050
+ epatch "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
+
+ # The lsb check is useless, so avoid spurious command not found messages.
+ sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
+ # All the test files are bash, but try to execute via `sh`.
+ sed -i -r \
+ -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
+ tests/{Makefile*,*.sh} || die
+ find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} +
+ # Some tests call the kernel which calls userspace, but that will
+ # run the install keyutils rather than the locally compiled one,
+ # so disable round trip tests.
+ rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
+
+ # Delete man pages that are included in the common package now. #612640
+ rm man/*-keyring.7 man/keyrings.7 || die
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export AR CC
+ sed -i \
+ -e "1iRPATH = $(usex static -static '')" \
+ -e '/^C.*FLAGS/s|:=|+=|' \
+ -e 's:-Werror::' \
+ -e '/^BUILDFOR/s:=.*:=:' \
+ -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \
+ -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
+ -e "s: /: ${EPREFIX}/:g" \
+ -e '/^NO_ARLIB/d' \
+ Makefile || die
+
+ # We need the static lib in order to statically link programs.
+ if use static ; then
+ export NO_ARLIB=0
+ # Hack the progs to depend on the static lib instead.
+ sed -i \
+ -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB):' \
+ Makefile || die
+ else
+ export NO_ARLIB=$(usex static-libs 0 1)
+ fi
+ emake
+}
+
+multilib_src_test() {
+ # Execute the locally compiled code rather than the
+ # older versions already installed in the system.
+ LD_LIBRARY_PATH=${BUILD_DIR} \
+ PATH="${BUILD_DIR}:${PATH}" \
+ emake test
+}
+
+multilib_src_install() {
+ # Possibly undo the setting for USE=static (see src_compile).
+ export NO_ARLIB=$(usex static-libs 0 1)
+
+ default
+ use static || gen_usr_ldscript -a keyutils
+}
+
+multilib_src_install_all() {
+ dodoc README
+}
diff --git a/sys-apps/keyutils/metadata.xml b/sys-apps/keyutils/metadata.xml
new file mode 100644
index 000000000000..9590fe15fc00
--- /dev/null
+++ b/sys-apps/keyutils/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest
new file mode 100644
index 000000000000..b737ff67f8d5
--- /dev/null
+++ b/sys-apps/kmod/Manifest
@@ -0,0 +1,9 @@
+AUX kmod-static-nodes-r1 500 SHA256 328b74618b85fea197b36f8fc602a33d27e204f0d0b38ed0e6dfc920ba219e2f SHA512 8210d90f5d0702aea626b6db00adbabbd550009d8275fe430c8b113fcb0593a4dfb9efb22c061dde259e1bd94390be49823415d3fd99909e22a2bbf7ae349f63 WHIRLPOOL 3516b3f3e80d46b2b83500b333e6a9a66786a7fb7b46765af3f111168df157f45636534494ecbb552ec44de32cbbb742d53ebad2dff74b13b553f5e602413fbd
+DIST kmod-23.tar.xz 450376 SHA256 d303d5519faec9d69e1132f6b37db2579db17a7fb5c1517da0115d03ba168155 SHA512 84b18d35117b33c48fd9b732a584a9f94caef553e371bd4e68953540f46fc6c7145c8c7163df898875437ad56e1a47e89be26531314299bce0026c46da9dd3c0 WHIRLPOOL 319fc1c4728e51ef97a4c999ddcf8dc38587028b239a8adf48750335548c3a8e099d3b6a4d1d7a9b3f80ac83609a109d3053dea10ad8b98c2d694494b7f09330
+DIST kmod-24.tar.xz 536864 SHA256 610b8d1df172acc39a4fdf1eaa47a57b04873c82f32152e7a62e29b6ff9cb397 SHA512 58c8da100418b6325de1595bceee4115cbdd7151d03a028c0b1f6d5d3e6611c667e27f3a0245d29781125581849fd1e854fa8d87b63c4b8fa3f196d0a97e1779 WHIRLPOOL f722a515967f8a8cf60e4a053f9227a848230d8b006ca9ba13160b2d5e9f1d4b5abb30f7d4c3c04287da58c7960dd36a5cf7d122036457990b93e0ed42e84195
+EBUILD kmod-23.ebuild 4902 SHA256 0c23736c7d3b210f702aa446e89355e1757329a23cb452eb01c39a38c4efa065 SHA512 b38be77d4f89ffda2551a3c5ef2b85146ba27254d0c109425b7ad0fbfdc1528381f605a1e354a06f3321eb5b63bba6d6ec955245135f54a3a2a5d131667360e5 WHIRLPOOL 180c37ad7ed5c88bd68fbef1d7c31eafd96289997fe0809c5df27ec6123d117adfb5c12ad1d011072c3bc17dc49e5de04ba1a609a95e43bc3c7c656c67eb0d2a
+EBUILD kmod-24.ebuild 4919 SHA256 de49db40689a3223c3176702825b945599460047b7bf2ee7907090110af56279 SHA512 635dbf84a67d2a45c7fdee994ab906cc015dbec731b31f73d1f4af8a1d5fb823cb6494e9f2f0c1ea695cd69d802a4aa304c587c4022d094e642cdbd52c8fc1c4 WHIRLPOOL 171c24fcb663e92e687f5d690046262763acdd26e21494de1c1d7792f92bf2b54202099097aa7aa86ac81fc1aafa2d475b007d190a10eb35bb663ed72c3a0ddc
+EBUILD kmod-9999.ebuild 4919 SHA256 de49db40689a3223c3176702825b945599460047b7bf2ee7907090110af56279 SHA512 635dbf84a67d2a45c7fdee994ab906cc015dbec731b31f73d1f4af8a1d5fb823cb6494e9f2f0c1ea695cd69d802a4aa304c587c4022d094e642cdbd52c8fc1c4 WHIRLPOOL 171c24fcb663e92e687f5d690046262763acdd26e21494de1c1d7792f92bf2b54202099097aa7aa86ac81fc1aafa2d475b007d190a10eb35bb663ed72c3a0ddc
+MISC ChangeLog 7804 SHA256 7955602bae365b688cea2ef4e478f9c5a742c0e41dfae2fb14e0cc7e3e144f3f SHA512 3243545b10e6ef11926a381c2abb3423ad9c56e8c330463743c34d3479c89e36d90fafeb9615a9be13ad03f6fa2e65a485b58eee64af44a057f83281f5ba8ee0 WHIRLPOOL 98bff9597d536d79646cfc7cc2d4de551967ecdc4550117128175a37bc7a32a45fcb1d8e8cc80a4a2d1a5186d358346f43455216c0dbec6252d89ff66b047ff6
+MISC ChangeLog-2015 28464 SHA256 2da3f02362b9ea452428146157d1973a485828c62205d2d70086cf4e537be87f SHA512 f95c5edbb2cfe646645a156b3aedf1876607b7af57f021712ca225b1ff7be82854e6fa9bfa8d8c39b302e3aa2487cf88d9a2f5d5ddaa20513c2e303d3a610d24 WHIRLPOOL 930a20837ac6b383c680c8915fb9613cdb0234e7564317432d219c9e12d1cf544f9e9b5abe7660cbd260b84d76f5a4a7eefa5466ce54faa481009f7c3e6b95d1
+MISC metadata.xml 540 SHA256 70d784f75b0a3ff556201e4817ba0234e46195ab47444651d42f0c5d6eb620a2 SHA512 c4f47a77dfa7bc4cbaa61744fc46c5547763b51b48521cd229ac89680325ecbf415bd9e1ce9c71982ea721d0d5c4cf3677a0f70e8dad65235f523840cd14de94 WHIRLPOOL 1cf5cc49fcaf9dadf670555a7d8f9c6ffbbfda69d7f38d20755f379d3c12585acd937f50a86ffc2979e3212d3367a6fe6a74be188a7c6fb3a74443cd206e5307
diff --git a/sys-apps/kmod/files/kmod-static-nodes-r1 b/sys-apps/kmod/files/kmod-static-nodes-r1
new file mode 100644
index 000000000000..a0f6fa2253e8
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-static-nodes-r1
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Create list of required static device nodes for the current kernel"
+
+depend() {
+ after dev-mount
+ before tmpfiles.dev dev
+ keyword -lxc -systemd-nspawn
+}
+
+start() {
+ ebegin "Creating list of required static device nodes for the current kernel"
+ checkpath -q -d /run/tmpfiles.d
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+ eend $?
+}
diff --git a/sys-apps/kmod/kmod-23.ebuild b/sys-apps/kmod/kmod-23.ebuild
new file mode 100644
index 000000000000..d0f403fd99f1
--- /dev/null
+++ b/sys-apps/kmod/kmod-23.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit bash-completion-r1 eutils multilib python-r1
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+ inherit autotools git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+ inherit libtool
+fi
+
+DESCRIPTION="library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc lzma python static-libs +tools zlib"
+
+# Upstream does not support running the test suite with custom configure flags.
+# I was also told that the test suite is intended for kmod developers.
+# So we have to restrict it.
+# See bug #408915.
+RESTRICT="test"
+
+# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/modutils
+ !<sys-apps/openrc-0.13.8
+ !<sys-apps/systemd-216-r3
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
+ python? ( ${PYTHON_DEPS} )
+ zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ lzma? ( virtual/pkgconfig )
+ python? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ )
+ zlib? ( virtual/pkgconfig )"
+if [[ ${PV} == 9999* ]]; then
+ DEPEND="${DEPEND}
+ dev-libs/libxslt"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS="NEWS README TODO"
+
+src_prepare() {
+ if [ ! -e configure ]; then
+ if use doc; then
+ gtkdocize --copy --docdir libkmod/docs || die
+ else
+ touch libkmod/docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ # Restore possibility of running --enable-static wrt #472608
+ sed -i \
+ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
+ configure || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable tools)
+ $(use_enable debug)
+ $(use_enable doc gtk-doc)
+ $(use_with lzma xz)
+ $(use_with zlib)
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ )
+
+ local ECONF_SOURCE="${S}"
+
+ kmod_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ run_in_build_dir econf "${myeconfargs[@]}" "$@"
+ }
+
+ BUILD_DIR="${WORKDIR}/build"
+ kmod_configure --disable-python
+
+ if use python; then
+ python_foreach_impl kmod_configure --enable-python
+ fi
+}
+
+src_compile() {
+ emake -C "${BUILD_DIR}"
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_compile() {
+ emake -C "${BUILD_DIR}" -f Makefile -f - python \
+ VPATH="${native_builddir}:${S}" \
+ native_builddir="${native_builddir}" \
+ libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
+ <<< 'python: $(pkgpyexec_LTLIBRARIES)'
+ }
+
+ python_foreach_impl python_compile
+ fi
+}
+
+src_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+ einstalldocs
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ VPATH="${native_builddir}:${S}" \
+ install-pkgpyexecLTLIBRARIES \
+ install-dist_pkgpyexecPYTHON
+ }
+
+ python_foreach_impl python_install
+ fi
+
+ prune_libtool_files --modules
+
+ if use tools; then
+ local bincmd sbincmd
+ for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
+ dosym ../bin/kmod /sbin/${sbincmd}
+ done
+
+ # These are also usable as normal user
+ for bincmd in lsmod modinfo; do
+ dosym kmod /bin/${bincmd}
+ done
+ fi
+
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf
+ softdep uhci_hcd pre: ehci_hcd
+ softdep ohci_hcd pre: ehci_hcd
+ EOF
+
+ insinto /lib/modprobe.d
+ doins "${T}"/usb-load-ehci-first.conf #260139
+
+ newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
+}
+
+pkg_postinst() {
+ if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
+ rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
+ fi
+
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
+ fi
+ if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
+ ewarn "kernel modules to have required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+}
diff --git a/sys-apps/kmod/kmod-24.ebuild b/sys-apps/kmod/kmod-24.ebuild
new file mode 100644
index 000000000000..3a82094b0518
--- /dev/null
+++ b/sys-apps/kmod/kmod-24.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit bash-completion-r1 eutils multilib python-r1
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+ inherit autotools git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ inherit libtool
+fi
+
+DESCRIPTION="library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc lzma python static-libs +tools zlib"
+
+# Upstream does not support running the test suite with custom configure flags.
+# I was also told that the test suite is intended for kmod developers.
+# So we have to restrict it.
+# See bug #408915.
+RESTRICT="test"
+
+# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/modutils
+ !<sys-apps/openrc-0.13.8
+ !<sys-apps/systemd-216-r3
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
+ python? ( ${PYTHON_DEPS} )
+ zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ lzma? ( virtual/pkgconfig )
+ python? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ )
+ zlib? ( virtual/pkgconfig )"
+if [[ ${PV} == 9999* ]]; then
+ DEPEND="${DEPEND}
+ dev-libs/libxslt"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS="NEWS README TODO"
+
+src_prepare() {
+ if [ ! -e configure ]; then
+ if use doc; then
+ gtkdocize --copy --docdir libkmod/docs || die
+ else
+ touch libkmod/docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ # Restore possibility of running --enable-static wrt #472608
+ sed -i \
+ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
+ configure || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable tools)
+ $(use_enable debug)
+ $(use_enable doc gtk-doc)
+ $(use_with lzma xz)
+ $(use_with zlib)
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ )
+
+ local ECONF_SOURCE="${S}"
+
+ kmod_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ run_in_build_dir econf "${myeconfargs[@]}" "$@"
+ }
+
+ BUILD_DIR="${WORKDIR}/build"
+ kmod_configure --disable-python
+
+ if use python; then
+ python_foreach_impl kmod_configure --enable-python
+ fi
+}
+
+src_compile() {
+ emake -C "${BUILD_DIR}"
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_compile() {
+ emake -C "${BUILD_DIR}" -f Makefile -f - python \
+ VPATH="${native_builddir}:${S}" \
+ native_builddir="${native_builddir}" \
+ libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
+ <<< 'python: $(pkgpyexec_LTLIBRARIES)'
+ }
+
+ python_foreach_impl python_compile
+ fi
+}
+
+src_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+ einstalldocs
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ VPATH="${native_builddir}:${S}" \
+ install-pkgpyexecLTLIBRARIES \
+ install-dist_pkgpyexecPYTHON
+ }
+
+ python_foreach_impl python_install
+ fi
+
+ prune_libtool_files --modules
+
+ if use tools; then
+ local bincmd sbincmd
+ for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
+ dosym ../bin/kmod /sbin/${sbincmd}
+ done
+
+ # These are also usable as normal user
+ for bincmd in lsmod modinfo; do
+ dosym kmod /bin/${bincmd}
+ done
+ fi
+
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf
+ softdep uhci_hcd pre: ehci_hcd
+ softdep ohci_hcd pre: ehci_hcd
+ EOF
+
+ insinto /lib/modprobe.d
+ doins "${T}"/usb-load-ehci-first.conf #260139
+
+ newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
+}
+
+pkg_postinst() {
+ if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
+ rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
+ fi
+
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
+ fi
+ if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
+ ewarn "kernel modules to have required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+}
diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild
new file mode 100644
index 000000000000..3a82094b0518
--- /dev/null
+++ b/sys-apps/kmod/kmod-9999.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit bash-completion-r1 eutils multilib python-r1
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+ inherit autotools git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ inherit libtool
+fi
+
+DESCRIPTION="library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc lzma python static-libs +tools zlib"
+
+# Upstream does not support running the test suite with custom configure flags.
+# I was also told that the test suite is intended for kmod developers.
+# So we have to restrict it.
+# See bug #408915.
+RESTRICT="test"
+
+# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/modutils
+ !<sys-apps/openrc-0.13.8
+ !<sys-apps/systemd-216-r3
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
+ python? ( ${PYTHON_DEPS} )
+ zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ lzma? ( virtual/pkgconfig )
+ python? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ )
+ zlib? ( virtual/pkgconfig )"
+if [[ ${PV} == 9999* ]]; then
+ DEPEND="${DEPEND}
+ dev-libs/libxslt"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS="NEWS README TODO"
+
+src_prepare() {
+ if [ ! -e configure ]; then
+ if use doc; then
+ gtkdocize --copy --docdir libkmod/docs || die
+ else
+ touch libkmod/docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ # Restore possibility of running --enable-static wrt #472608
+ sed -i \
+ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
+ configure || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable tools)
+ $(use_enable debug)
+ $(use_enable doc gtk-doc)
+ $(use_with lzma xz)
+ $(use_with zlib)
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ )
+
+ local ECONF_SOURCE="${S}"
+
+ kmod_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ run_in_build_dir econf "${myeconfargs[@]}" "$@"
+ }
+
+ BUILD_DIR="${WORKDIR}/build"
+ kmod_configure --disable-python
+
+ if use python; then
+ python_foreach_impl kmod_configure --enable-python
+ fi
+}
+
+src_compile() {
+ emake -C "${BUILD_DIR}"
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_compile() {
+ emake -C "${BUILD_DIR}" -f Makefile -f - python \
+ VPATH="${native_builddir}:${S}" \
+ native_builddir="${native_builddir}" \
+ libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
+ <<< 'python: $(pkgpyexec_LTLIBRARIES)'
+ }
+
+ python_foreach_impl python_compile
+ fi
+}
+
+src_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+ einstalldocs
+
+ if use python; then
+ local native_builddir=${BUILD_DIR}
+
+ python_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ VPATH="${native_builddir}:${S}" \
+ install-pkgpyexecLTLIBRARIES \
+ install-dist_pkgpyexecPYTHON
+ }
+
+ python_foreach_impl python_install
+ fi
+
+ prune_libtool_files --modules
+
+ if use tools; then
+ local bincmd sbincmd
+ for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
+ dosym ../bin/kmod /sbin/${sbincmd}
+ done
+
+ # These are also usable as normal user
+ for bincmd in lsmod modinfo; do
+ dosym kmod /bin/${bincmd}
+ done
+ fi
+
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf
+ softdep uhci_hcd pre: ehci_hcd
+ softdep ohci_hcd pre: ehci_hcd
+ EOF
+
+ insinto /lib/modprobe.d
+ doins "${T}"/usb-load-ehci-first.conf #260139
+
+ newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
+}
+
+pkg_postinst() {
+ if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
+ rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
+ fi
+
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
+ fi
+ if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
+ ewarn "kernel modules to have required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+}
diff --git a/sys-apps/kmod/metadata.xml b/sys-apps/kmod/metadata.xml
new file mode 100644
index 000000000000..188bf47702ef
--- /dev/null
+++ b/sys-apps/kmod/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>udev-bugs@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="lzma">Enable support for XZ compressed modules</flag>
+ <flag name="tools">Install module loading/unloading tools.</flag>
+ <flag name="zlib">Enable support for gzipped modules</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/lcdsplash/Manifest b/sys-apps/lcdsplash/Manifest
new file mode 100644
index 000000000000..b3a1e41afc29
--- /dev/null
+++ b/sys-apps/lcdsplash/Manifest
@@ -0,0 +1,5 @@
+DIST lcdsplash-0.3.tar.bz2 8121 SHA256 0d5db8b897fa6508bbebf7dcc12a5afdf3f48178d72a247d3d8b611c68645c9c SHA512 4d40200882260c31cfe20988cf64d27be0af7f1ab983e5a998dcaeafede074e882379508a775f54690105591e0802eb897559eb7437d81f0b24096dd8c363243 WHIRLPOOL f4d98cab8057080a643ec5f90d9ff878c4b6647190b256261328105614f9fef6a16a3214432aec44b9afb0eab42bc02973f2641ac6babcf4ef52496550a2d94c
+EBUILD lcdsplash-0.3.ebuild 646 SHA256 c8ab2a33092b61f120317bb3e773b15fb20e3bb852eaeb032a98fb5c1cbfff6f SHA512 0b9b0bfed65b7fb86af70f82f3ab8ae80e0d1c9fedc8d741d15c8484ed25a4d5de6bb3a9e55c288b2e7ed1ad5ad7078125ecb76c27a704fde5a0bf4d951e6a2a WHIRLPOOL ee2083164105f27b82e5acb07fe21dcfe1b6b72943ec69b71f3288e1328487e7f150308493577f051d506bc9999f95bc154f5ef9a5eac5bca9999e4ae0b959b1
+MISC ChangeLog 2952 SHA256 3f03769c1b0cfbaa888bea188a1ce80fb61d056ed5a717b28dcb7ec786efd3ff SHA512 a693a2a37a4461ac325b4b9fa43766d003fd65180de11bfe44c2d714972aa74735829d9ca433794903550f4d9714e7fba523f3397a05c812214284582bce1ec1 WHIRLPOOL aa010bbc4508de184a2e3f0c96b92911765a75acf3eb186278a9b2445db019940242a0053f6b6c66e7a99ebc1ac3667aa1e92733dc5c082757172db0bad3f9cc
+MISC ChangeLog-2015 977 SHA256 2580611c7e3ec81c9fdc39bc9dc5cd69aa98bbf60dfae8196e9ea96546ff290f SHA512 aceded0e9b74cf0e3c51b73a6ee5858e0c9bf83ff66e7a2583b5c905865cf0cb4e61dfada286ccf63ef07595535bd105bc1b55da82c8eafb3ae645b58acb13e1 WHIRLPOOL f2f25a7b14331d800e4e88729b3903d30534631b593d16268d5c8e61d1cbd602e2aefb64b6232751297d8b9320a9d343e5c64d4b9956abd8c038706e9488cd46
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/lcdsplash/lcdsplash-0.3.ebuild b/sys-apps/lcdsplash/lcdsplash-0.3.ebuild
new file mode 100644
index 000000000000..34046a4e316b
--- /dev/null
+++ b/sys-apps/lcdsplash/lcdsplash-0.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit multilib
+
+DESCRIPTION="splash Gentoo boot information on LCD's"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="hppa ~mips x86"
+IUSE=""
+
+DEPEND="mips? ( sys-apps/lcdutils )"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ insinto /sbin
+ doins splash-functions.sh || die "splash"
+ insinto /$(get_libdir)/rcscripts/lcdsplash
+ doins -r modules/* || die "modules"
+
+ insinto /etc
+ doins lcdsplash.conf || die "conf"
+
+ dodoc README
+}
diff --git a/sys-apps/lcdsplash/metadata.xml b/sys-apps/lcdsplash/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/lcdsplash/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/lcdtest/Manifest b/sys-apps/lcdtest/Manifest
new file mode 100644
index 000000000000..21a6b8a5a938
--- /dev/null
+++ b/sys-apps/lcdtest/Manifest
@@ -0,0 +1,6 @@
+AUX 1.18-build-system.patch 2038 SHA256 8322a0ad06dff81e3214f8c5c3a6b4e416f56a58a711429ea780cf9a6db7f2d3 SHA512 0901537de977ad940c61ebc175e4faa6d934750fe12f066abf8a2d0881fd62aecf0f5cfaca6b0ee55453814de0a160d75f1e8960ef98f630eaa9994e6f1a9d8f WHIRLPOOL a37b6bbbaca9cb43602bb570686cc424a86ff5f4f4b9eec140bc43e14893a833cad5e0ceee581a66467a46ca4b0f6ccbf04786268e3c0b66ccfdf18e82ea8c60
+DIST lcdtest-1.18.tar.gz 26886 SHA256 f0b3fa9c5a4bc86eb2713f85f422d328a673ca8f541a6403bfe156afd631200e SHA512 74b0739c5dcc5ff9307ca526b4a6bbd92d6e58a83ceeed5a37a4064e3e4ed0cbdfe7a2a70cd56ba1a7305c3fd72510e10a02098aab11828062a3999cac944ab7 WHIRLPOOL 96abd5864323c45aa2ee6927f96c7f9e401a0007dd6361ffbc14d6609ff75cc55ec2ec93782c732aca6aade645dd3ee94ec49996bf88975fa6bd82fe6106e120
+EBUILD lcdtest-1.18.ebuild 1102 SHA256 3d24f32afb8b0c8d0041cf80ee44a867e486d91ed862fe7ba509d50f885213d4 SHA512 14e5a071eb45dbc0289ecad05bce6ccf7d1590437e58d1180bee11cdb76f5aaf513eaea21897199793df91e5a18c4f0770f56718b17a5ef87eb1fe06f5ffd555 WHIRLPOOL 4be2e8a95ac358e7ccf3d689f1bdbc2859811ebffb527981c18d2fae3f56fc3f27092ff2f46b55117389c5cf36dba6dcb18c289205b7f98ce8e82ce562f3490b
+MISC ChangeLog 2956 SHA256 66561cef42650ac66c76362b60b70fae20d06a96e6348e8d48746f6a4cf84a83 SHA512 6cb746424de59c2e5bdd22978595554733a9871f84b9e4ac3fc242b3171b52bc4082e9fc2be77856d5da440f689810c98eee83330903c0222e95c4e9948cf8d1 WHIRLPOOL 8a204f42cafc0aaafe664b4003a35fda16726d8dbcec3d1168bfd086dda5f1efc2a57cf5c3bad789a09fb808457813d99ddc91269282b38a8b720ed67335af41
+MISC ChangeLog-2015 996 SHA256 9615e52e378cf0a60764fc92fde288bd8f4ead504d29cfa30fcdcc86346732e8 SHA512 e12815a729a921425d8208e2b0879c76b9dc6fcc08d12a284e72a800ebf19bdfc59d040b26e275e1b1e41c13dac18e37e0e54eda071eb8ec643a2725c7359085 WHIRLPOOL c35c55c785fd26fcd1cd5d35473b8d87dbfdf5517f7ce2cb7b0b6259aec5352156796151f64e986689f83fc7c6983311931763b4f843ed9181557fcaa4e03108
+MISC metadata.xml 330 SHA256 da90112f2bba96098e9dbd0c7d785494b251a43ba360aebbb7a672cf5041517f SHA512 a7b0f31767ddd2a38acc2af4700f6129e6a78553f6bee63827d7706064570dccd5e5bf48b407b9e534bef4bbc6b384c326a79121079e68d25e3494601b3b0e1b WHIRLPOOL 8bbedca7137a6fd099bc66ec092ce47e34807cebb02a98101267b5156bcae7fce17a715bd7db346282b80c83b97d2ec61ded07e3fa1a14bb205737f528da6bc0
diff --git a/sys-apps/lcdtest/files/1.18-build-system.patch b/sys-apps/lcdtest/files/1.18-build-system.patch
new file mode 100644
index 000000000000..429067259c54
--- /dev/null
+++ b/sys-apps/lcdtest/files/1.18-build-system.patch
@@ -0,0 +1,62 @@
+diff -uNr lcdtest-1.18.ORIG/SConstruct lcdtest-1.18/SConstruct
+--- lcdtest-1.18.ORIG/SConstruct 2013-04-17 14:32:37.735358663 +0100
++++ lcdtest-1.18/SConstruct 2013-04-17 14:33:52.706359788 +0100
+@@ -119,10 +119,10 @@
+ # code
+ #-----------------------------------------------------------------------------
+
+-build_dir = 'build/'
++variant_dir = 'build/'
+
+ SConscript ('src/SConscript',
+- build_dir = build_dir,
++ variant_dir = variant_dir,
+ duplicate = 0,
+ exports = {'env' : env})
+
+@@ -137,7 +137,7 @@
+ #-----------------------------------------------------------------------------
+
+ SConscript ('desktop/SConscript',
+- build_dir = build_dir + '/desktop',
++ variant_dir = variant_dir + '/desktop',
+ duplicate = 0)
+
+ #-----------------------------------------------------------------------------
+diff -uNr lcdtest-1.18.ORIG/src/SConscript lcdtest-1.18/src/SConscript
+--- lcdtest-1.18.ORIG/src/SConscript 2013-04-17 14:32:37.734358663 +0100
++++ lcdtest-1.18/src/SConscript 2013-04-17 14:32:54.194358910 +0100
+@@ -17,6 +17,7 @@
+ # along with this program. If not, see see <http://www.gnu.org/licenses/>.
+
+ import os
++import SCons.Util
+
+ Import('env')
+
+@@ -29,13 +30,18 @@
+
+ objs = [env.Object(src) for src in srcs]
+
+-# respect the environment CFLAGS if given
+-if 'CFLAGS' in ARGUMENTS:
+- env.MergeFlags (ARGUMENTS ['CFLAGS'])
+-elif 'CFLAGS' in os.environ:
+- env.MergeFlags (os.environ ['CFLAGS'])
+-else:
+- env.Append (CCFLAGS = ['-g', '-Wall', '-Wextra'])
++# respect the environments flags if given
++
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+
+ env.Append (LIBS = ['SDL', 'SDL_image', 'SDL_ttf']);
+
diff --git a/sys-apps/lcdtest/lcdtest-1.18.ebuild b/sys-apps/lcdtest/lcdtest-1.18.ebuild
new file mode 100644
index 000000000000..4b5876b1bab5
--- /dev/null
+++ b/sys-apps/lcdtest/lcdtest-1.18.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit scons-utils eutils toolchain-funcs gnome2-utils
+
+DESCRIPTION="Displays test patterns to spot dead/hot pixels on LCD screens"
+HOMEPAGE="http://www.brouhaha.com/~eric/software/lcdtest/"
+SRC_URI="http://www.brouhaha.com/~eric/software/lcdtest/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ >=media-libs/libsdl-1.2.7-r2[X,video]
+ >=media-libs/sdl-image-1.2.3-r1
+ >=media-libs/sdl-ttf-2.0.9
+"
+RDEPEND="${DEPEND}
+ media-fonts/liberation-fonts
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-build-system.patch"
+ epatch_user
+ sed -i -e \
+ "s|/usr/share/fonts/liberation/|/usr/share/fonts/liberation-fonts/|" \
+ src/lcdtest.c || die
+}
+
+src_configure() {
+ tc-export CC
+ myesconsargs=(
+ --prefix="${EPREFIX}/usr"
+ )
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ escons --buildroot="${D}" install
+ dodoc README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/sys-apps/lcdtest/metadata.xml b/sys-apps/lcdtest/metadata.xml
new file mode 100644
index 000000000000..f35b285c1eee
--- /dev/null
+++ b/sys-apps/lcdtest/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 type="person">
+ <email>chainsaw@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/lcdutils/Manifest b/sys-apps/lcdutils/Manifest
new file mode 100644
index 000000000000..99ed7fbf7921
--- /dev/null
+++ b/sys-apps/lcdutils/Manifest
@@ -0,0 +1,6 @@
+AUX include-stdlib.h-for-exit.patch 1165 SHA256 0c89ecbec4b6f6df9540da0b9c9561fb97d2ce0fe5339bbeac4079bb6a30d51f SHA512 3356faefff0c258025bc76abcdb188a47558ed83c613be744fd5fd245f63fd5eb60417738d68c75971b5ad523e047b06c5969d0e8be28b9e9beb3aa4f7e667fd WHIRLPOOL 9a290de7b9e1a0ae42de76977382571d8f283c24b7928079caf978ab22286cea294b7ce8d28e6eeb598c94dc47e184241d52e4cebf6dfffe595620fa31059256
+DIST lcdutils-0.2.tar.gz 10819 SHA256 fae6efe705f18fa5cf0b0ecb41ec8d3e009db18d9fcda838e23a1f455d3f2f58 SHA512 ea7140b7b27aade66d025b4c4c7441a2357d03f5081f67ccac8175e709e8f20bf800208a72675eacfca1af8329c01b9e8b1a9bd910bf858bcbdb8aff3c2169f4 WHIRLPOOL 887a3e7a9378cb96d2222e19e38fe123e7551916b54f410f06c452b1476830b4570761f4ea917b8f8e5d1722a0e12305fe85daae45b7fc55394d6d1d2e1e3370
+EBUILD lcdutils-0.2.ebuild 718 SHA256 e4952277bb840ba88b6170be51ca6bd4bbcd7efff5127b9e4da1bf345dc44d7a SHA512 25c7404ddfdb9d0345ddbcc2ce5bfdb9ef93664ef9ec0e373498a0fb8e25f72f5df1def7181b349e82b6090b71557a4a77cf64a67187998c3815d425bb2f5bc7 WHIRLPOOL 14dc88a4bf1e4ab458953b35532ff4a483f1883ce7edd3d19ddfb170c23df9f055309fe29a45d6678b7a46f28512ad80f1aba1bd933d6f973a734b8e88760f2d
+MISC ChangeLog 2859 SHA256 31c1b3f3f5ef692e8ecdf1a7eec28794da420431de40fd631f2fbcb1eb6f3db7 SHA512 12d72ffae237d245bf359500867c5fef35297fcb023e1d526647cf10ea37856011af61e91d4195b81f5eccf3131ff69187fb7b5bba7c5c1e74e6a3ea9067557d WHIRLPOOL bb9ac35bac4263d5be78da194d118862b3db3fd480692002db5a9d472fe9bd8270fbc9135e58d6e1be958e724f8380bdde8df9d8dc62c16e76641c5dcc0b418a
+MISC ChangeLog-2015 1182 SHA256 d627b17e141252c3df3e4c1ccdf1d023b1acfac4a8b503ea274dbbe2967d8d20 SHA512 608e25110f80fd3e40a6d2d04d817ce0caf7ab671ccfbe2a3c51496ec75bd338f73c285f64d17106914042ff8d90a00a46efebb9e56c54c3039752a4d56ba5e3 WHIRLPOOL 5b03ccdcdb7f3a36ae2bb6875f58366cd214652d87ab4e25916e4d7bae925de986af082371942f2a0330623053a79021ce1f92ec3e22ac46b722988b88b69832
+MISC metadata.xml 375 SHA256 1df26a65ba67f46e56744919e62b69a6b8240aecf2d79b7b3bd6bdb97b1fd775 SHA512 db0267b82ae887ad69ba5196396d803b84344a6fc22aeb05341a80ffc6993e4538bf79d55f3d670d7947749a87de59eb4f1f0ed7c4a6cbcecf51e7feaed83502 WHIRLPOOL 8c9e8bdcb5a1910cb9166ac11a8a28d3acf3beb7da882a44d043233d048a5afd24dfa410ae124dbe2271483aae3bb2828fe217b4f06898226fea7dfd5aebb5a2
diff --git a/sys-apps/lcdutils/files/include-stdlib.h-for-exit.patch b/sys-apps/lcdutils/files/include-stdlib.h-for-exit.patch
new file mode 100644
index 000000000000..81870496a529
--- /dev/null
+++ b/sys-apps/lcdutils/files/include-stdlib.h-for-exit.patch
@@ -0,0 +1,50 @@
+From 304013f4c81a13fa2aa3a06628e6a1c57248563c Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 13 Jun 2011 23:42:44 -0400
+Subject: [PATCH] include stdlib.h for exit
+
+---
+ buttond.c | 1 +
+ liblcd.c | 1 +
+ putlcd.c | 1 +
+ 3 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/buttond.c b/buttond.c
+index e99b0dd..40a85ae 100644
+--- a/buttond.c
++++ b/buttond.c
+@@ -16,6 +16,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
+diff --git a/liblcd.c b/liblcd.c
+index e8fcacf..39bceea 100644
+--- a/liblcd.c
++++ b/liblcd.c
+@@ -16,6 +16,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+diff --git a/putlcd.c b/putlcd.c
+index c193712..18dc0af 100644
+--- a/putlcd.c
++++ b/putlcd.c
+@@ -16,6 +16,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include "liblcd.h"
+--
+1.7.3.4
+
diff --git a/sys-apps/lcdutils/lcdutils-0.2.ebuild b/sys-apps/lcdutils/lcdutils-0.2.ebuild
new file mode 100644
index 000000000000..e62acff23069
--- /dev/null
+++ b/sys-apps/lcdutils/lcdutils-0.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Cobalt RaQ/Qube LCD Writing and Button reading utilities"
+HOMEPAGE="http://people.debian.org/~pm/mips-cobalt/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~mips ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e "s:CFLAGS=-O2 -Wall:CFLAGS=${CFLAGS}:g" Makefile
+ epatch "${FILESDIR}"/include-stdlib.h-for-exit.patch
+}
+
+src_compile() {
+ emake distclean || die "distclean failed"
+ emake all || die "all failed"
+}
+
+src_install() {
+ dobin buttond putlcd || die "dobin failed"
+ dodoc ChangeLog || die "dodoc failed"
+}
diff --git a/sys-apps/lcdutils/metadata.xml b/sys-apps/lcdutils/metadata.xml
new file mode 100644
index 000000000000..14e7453a3b04
--- /dev/null
+++ b/sys-apps/lcdutils/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 type="project">
+ <email>mips@gentoo.org</email>
+ <name>Mips Team</name>
+ </maintainer>
+
+ <longdescription>
+ Provides utilities for Cobalt Microserver systems to write to the LCD and read button input
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest
new file mode 100644
index 000000000000..3c252406829b
--- /dev/null
+++ b/sys-apps/less/Manifest
@@ -0,0 +1,13 @@
+AUX README.Gentoo 823 SHA256 3985fd1810f660ea1c1f2732f719b069b6934d62d8d9e8a09287e63f049ba27d SHA512 fe18f4f5bac70f31ca833cb25d4f1aecde03c3993495ab964cc67f0e52737e3d04aa2263eff26ded279121cc346ef77738743943b5b092c9586c5622ee3a6c92 WHIRLPOOL 7b4de4d109da49392cf9ded961fc9aa0a7cda1ff82dc837b0303f02d00f76f73563397c14440ab0c8638a5a2a92e3b6c62f20a904ae7cd1dd0f5eb8efa68ec39
+AUX code2color-0.2.patch 919 SHA256 1792992964eb024150025b6e357649e07dab6209254512cc9be1a7d5bcc31b77 SHA512 6569c652dc5bcff9eb0eb3d85699b319f1439bb69268157d2d63a96ebe5a48577ed2f5e6af4510a8c742b38848e5f76a79397fd3b05e7acaf487955d60f6b5ce WHIRLPOOL d661d0226a753e4aaf1d60dc1fc756e05a78490d5781df54db1c2da73fee0a44edf4e70f28aeb9ca6e888a2d5c8cb94f3ed9e864c034d9e9b7219e2f6e191600
+AUX less.envd 47 SHA256 961d6e87eeb2b41d163def66718ee78d4b7c778dbe91b24c6764635b0ae1cdd7 SHA512 261b25887b08b3255e412b36130d014fc37ffc7de75dce3b5ba2521d94a1b0be4c584808b9698c30a8dafea70c62fae2cd0642d0983f96cdb418c3c501433674 WHIRLPOOL dbb1fbec8c6370a5feec2eecdb3e109e035f2f40c2a1d00672d7660d2058aaf0a104487e1ae8c06ecfb32161d4aa2aceed6194e60cacde3590974bbcb00511ba
+AUX lesspipe.sh 7797 SHA256 576331d742e19a8cec0adeba185bacb7b4b67f7fb93be9c52fa4701d3c5a0a94 SHA512 d7bbae07e8ddcae2981549f958daffc3750f3a343da37cd5e43df86b4dcab35c3121d7fa7b76d61dd457c972a888bcce1c85d01fa1e685aadf169d5541bb0d8b WHIRLPOOL 63a57b5dacf480680377ff67a285a893b3a3eeb7071159c2139c75af02aeb2a4c419ecf515d4ab16a2c0ac18612039c4dfb2225ac3540663eec7367e302ae6a0
+DIST less-487.tar.gz 318488 SHA256 f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706 SHA512 d31274fdada570fbc6706d7c52637d1accbd18ce947ec062e10b1624c251a8533c6638bc3a1d89d3c70a0c7b9c6d45740598bec9003f281d64c587b1f829125a WHIRLPOOL e1a6c5dc2ea17e57226083f022d3c39b8a9d17428b7aa15385138680e78fa1ee22800e216a40fe5aa0ca38ca4c0025792a2839031faabdf8f9384dec3c750f74
+DIST less-497.tar.gz 321341 SHA256 3a8260a485f85a8aada748559cc42d6e8261325fbcb7d32fff6e60ac837b3ff2 SHA512 8c0efb6e7f775cb0fde69f418b7a9218330b4f8dd1ab630dc75f833ab1658a1580cfd2f5a471b8cf9fb3a0c44d0b3052b09d95b4b166afef0500192cb028dde2 WHIRLPOOL 48c19985baf80c2c75a12a5348d8e3a701be84d816370db1993aeb39fc32ffcb6c8656863cd277f55d0e7596a4173a3d2aefad7d5150af5311ccaaba70895413
+DIST less-520.tar.gz 337959 SHA256 7b89ea8e605c242f792594ca81dc89979f3537d8cce578f628329c748004908b SHA512 67b51f4734a3b5a7871509110f87bbd6d1fa3068ad2d524adaa07b8917ff18a962b706cf5d55cf9800a39f9e583f21d0249837841d3c999babaaf5aa2bc4ff9d WHIRLPOOL 39e78c7a34b229978935c2e9b9013214caa7323a624fce83294c47ebff614e284a7c45072ab88bbf8ab69ee4dd2e87e59e4053687ae137c8a8a480027f72b0c3
+EBUILD less-487.ebuild 1440 SHA256 387fd47561a791fda5a06b659155abc842eecc64978cc53444d2576fbca67c35 SHA512 b7a1ee3d58a3ad29c3ef7d50f5f37c9fea7bbd0bf15a157f323ced895daf6a1aa31544374428df2ebd4e3385897e6721cf530b0c21de688e3cd0dee9c7e2939c WHIRLPOOL db87dbeb58f0cf81532abbc87a803083223776ab4200553163c361acdc20cf34bc4d8760e2f0db336eccd0ffc52e4900b096e8e48f1c9ed4c6d561a0a13e2260
+EBUILD less-497.ebuild 1406 SHA256 b3ba60da13b478f0bb1fcdeef6888fde140bce4e62ce798efcef1ec98c719635 SHA512 0d5ba92f026a3b2c11ad49ccf9ef2179416bd87cd9799ee803718d50a7178ed0c0272aeda72b079b79121d3b1562535c041b0332f4114f6bf22e8cf394602041 WHIRLPOOL 2320e79fbbd843578dbb63618a99ebd6c6075a8dc8a79c27580ecf32daec42f1d0aa13aff782be59670851ea60bc6ea8b9f837afcea323efae338a297af97e21
+EBUILD less-520.ebuild 1404 SHA256 9ae048b7097eecfdc5174498599006b8acc6778e44a43d939432a2a15df219e0 SHA512 10b5c220228b1adf41271de6d7ffc3b222ad2b417194b4f47f0d96f682b73dc0644c1a6ca6d8d8ca2e0712c05cf66d0fa19d0aa612e568d04c95cda763288ac5 WHIRLPOOL 12d6b206e9f8dc3035f62750aaeaf160701c16a64a7f5de70720d528bc63411124caebf754c01fb7d715ccde01a892f29b63252414a3f93041bf671d0a48b33e
+MISC ChangeLog 6770 SHA256 231ea462342a5410001f601c3b5be0b8aecddd4bda45ced16d823e54588943ff SHA512 1eeea73307e6c68f8c4026bc22d42fed0b4b3fc6eadf00967cd7f525b3c5843353c2be38591892e6444d2f3d6a374e58a960a0e969c4d9153a373a286c2590ee WHIRLPOOL 15496a1ff7dad80804d3bb76da1508d45e3bccb22bb8452cf6d63438c1d30913dc3da6159e0d426ebac27d1d68e3dcbde154f6c8e7fcc0198225bb4f1469f466
+MISC ChangeLog-2015 23847 SHA256 825f54e1e57d50358f5dc9a197553cb4e9472a7aea705968075815cfd5f90527 SHA512 99e9ed06109e4967a2cdba06c9116fbd1ae7a33489a758ae001c809e3bba6dfa107b3d67dfa69ccdb0ebeaae51c24cb144b13f8c1f46d0e26a274cb1b2e1ece8 WHIRLPOOL a27d97c7da86ff507da122e0e54eb5729e55c2eed535cc86a9d3775f59a2b70c35e70fc6220728c36d893aff0ff546cb8ecccc86a3e61c284966f50dc21ef7fb
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/less/files/README.Gentoo b/sys-apps/less/files/README.Gentoo
new file mode 100644
index 000000000000..dca832808f1e
--- /dev/null
+++ b/sys-apps/less/files/README.Gentoo
@@ -0,0 +1,22 @@
+This version of less comes with some Gentoo enhancements:
+ - default lesspipe.sh script to "view" files
+ - colorization support
+
+To see what file types are supported, just read the /usr/bin/lesspipe.sh
+script (it's just a plain text bash script).
+
+Colorization support is disabled by default. To enable it, export the
+LESSCOLOR variable to "yes":
+ $ export LESSCOLOR=yes
+
+We also provide a colorization script, 'code2color', that is used by
+default. If you wish to use another script, simply export the LESSCOLORIZER
+variable to name of the script:
+ $ export LESSCOLORIZER=some-other-script
+
+If you want to use the code2color script and the default color schemes are
+not acceptable, you can develop your own schemes and save them in one of
+the following places:
+ /etc/code2color
+ ~/.code2color
+ CODE2COLOR_CONFIG env var
diff --git a/sys-apps/less/files/code2color-0.2.patch b/sys-apps/less/files/code2color-0.2.patch
new file mode 100644
index 000000000000..f8a782504e60
--- /dev/null
+++ b/sys-apps/less/files/code2color-0.2.patch
@@ -0,0 +1,26 @@
+--- code2color
++++ code2color
+@@ -163,11 +163,11 @@
+ # building up the database
+ # newer entries overwrite old ones
+ my @CONFIG_FILES;
+- push @CONFIG_FILES, "/etc/code2html.config";
++ push @CONFIG_FILES, "/etc/code2color";
+ push @CONFIG_FILES,
+- $ENV{'HOME'}."/.code2html.config" if $ENV{'HOME'};
++ $ENV{'HOME'}."/.code2color" if $ENV{'HOME'};
+ push @CONFIG_FILES,
+- split(/:/,$ENV{'CODE2HTML_CONFIG'}) if $ENV{'CODE2HTML_CONFIG'};
++ split(/:/,$ENV{'CODE2COLOR_CONFIG'}) if $ENV{'CODE2COLOR_CONFIG'};
+ push @CONFIG_FILES,
+ split(/:/,$params{'langfile'}) if $params{'langfile'};
+
+@@ -3192,7 +3192,7 @@
+ #
+
+ $LANGUAGE{'shellscript'} = {
+- 'filename' => '\\.(sh|shell)$',
++ 'filename' => '\\.(ebuild|eclass|sh|shell)$',
+ 'regex' => '^\\s*#\\s*![^\\s]*(sh|bash|ash|zsh|ksh)',
+ 'patterns' => [ {
+ 'name' => 'comment',
diff --git a/sys-apps/less/files/less.envd b/sys-apps/less/files/less.envd
new file mode 100644
index 000000000000..b737af921164
--- /dev/null
+++ b/sys-apps/less/files/less.envd
@@ -0,0 +1,2 @@
+LESSOPEN="|lesspipe %s"
+LESS="-R -M --shift 5"
diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh
new file mode 100755
index 000000000000..66078850cbda
--- /dev/null
+++ b/sys-apps/less/files/lesspipe.sh
@@ -0,0 +1,281 @@
+#!/bin/bash
+#
+# Preprocessor for 'less'. Used when this environment variable is set:
+# LESSOPEN="|lesspipe %s"
+
+# TODO: handle compressed files better
+
+[[ -n ${LESSDEBUG} ]] && set -x
+
+trap 'exit 0' PIPE
+
+guesscompress() {
+ case "$1" in
+ *.gz|*.z) echo "gunzip -c" ;;
+ *.bz2|*.bz) echo "bunzip2 -c" ;;
+ *.lz) echo "lzip -dc" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.lzo) echo "lzop -dc" ;;
+ *.xz) echo "xzdec" ;;
+ *) echo "cat" ;;
+ esac
+}
+
+lesspipe_file() {
+ local out=$(file -L -- "$1")
+ local suffix
+ case ${out} in
+ *" 7-zip archive"*) suffix="7z";;
+ *" ar archive"*) suffix="a";;
+ *" CAB-Installer"*) suffix="cab";;
+ *" cpio archive"*) suffix="cpio";;
+ *" ELF "*) suffix="elf";;
+ *" LHa"*archive*) suffix="lha";;
+ *" troff "*) suffix="man";;
+ *" script text"*) suffix="sh";;
+ *" shared object"*) suffix="so";;
+ *" tar archive"*) suffix="tar";;
+ *" Zip archive"*) suffix="zip";;
+ *": data") hexdump -C -- "$1"; return 0;;
+ *) return 1;;
+ esac
+ lesspipe "$1" ".${suffix}"
+ return 0
+}
+
+lesspipe() {
+ local match=$2
+ [[ -z ${match} ]] && match=$1
+
+ local DECOMPRESSOR=$(guesscompress "${match}")
+
+ # User filters
+ if [[ -x ~/.lessfilter ]] ; then
+ ~/.lessfilter "$1" && exit 0
+ fi
+
+ local ignore
+ for ignore in ${LESSIGNORE} ; do
+ [[ ${match} == *.${ignore} ]] && exit 0
+ done
+
+ # Handle non-regular file types.
+ if [[ -d $1 ]] ; then
+ ls -alF -- "$1"
+ return
+ elif [[ ! -f $1 ]] ; then
+ stat "$1"
+ return
+ fi
+
+ case "${match}" in
+
+ ### Doc files ###
+ *.[0-9n]|*.man|\
+ *.[0-9n].bz2|*.man.bz2|\
+ *.[0-9n].gz|*.man.gz|\
+ *.[0-9n].lzma|*.man.lzma|\
+ *.[0-9n].xz|*.man.xz|\
+ *.[0-9][a-z].gz|*.[0-9][a-z].gz)
+ local out=$(${DECOMPRESSOR} -- "$1" | file -)
+ case ${out} in
+ *troff*)
+ # Need to make sure we pass path to man or it will try
+ # to locate "$1" in the man search paths
+ if [[ $1 == /* ]] ; then
+ man -- "$1"
+ else
+ man -- "./$1"
+ fi
+ ;;
+ *text*)
+ ${DECOMPRESSOR} -- "$1"
+ ;;
+ *)
+ # We could have matched a library (libc.so.6), so let
+ # `file` figure out what the hell this thing is
+ lesspipe_file "$1"
+ ;;
+ esac
+ ;;
+ *.dvi) dvi2tty "$1" ;;
+ *.ps) ps2ascii "$1" || pstotext "$1" ;;
+ *.pdf) pdftotext "$1" - || ps2ascii "$1" || pstotext "$1" ;;
+ *.doc) antiword "$1" || catdoc "$1" ;;
+ *.rtf) unrtf --nopict --text "$1" ;;
+ *.conf|*.txt|*.log) ;; # force less to work on these directly #150256
+
+ ### URLs ###
+ ftp://*|http://*|*.htm|*.html)
+ for b in links2 links lynx ; do
+ ${b} -dump "$1" && exit 0
+ done
+ html2text -style pretty "$1"
+ ;;
+
+ ### Tar files ###
+ *.tar|\
+ *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\
+ *.tar.lz|*.tar.tlz|\
+ *.tar.lzma|*.tar.xz)
+ ${DECOMPRESSOR} -- "$1" | tar tvvf -;;
+ *.tbz2|*.tbz|*.tgz|*.tlz|*.txz)
+ lesspipe "$1" "$1".tar.${1##*.t} ;;
+
+ ### Misc archives ###
+ *.bz2|\
+ *.gz|*.z|\
+ *.lz|\
+ *.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;;
+ *.rpm) rpm -qpivl --changelog -- "$1" || rpm2tar -O "$1" | tar tvvf -;;
+ *.cpi|*.cpio) cpio -itv < "$1" ;;
+ *.ace) unace l "$1" ;;
+ *.arc) arc v "$1" ;;
+ *.arj) unarj l -- "$1" ;;
+ *.cab) cabextract -l -- "$1" ;;
+ *.lha|*.lzh) lha v "$1" ;;
+ *.zoo) zoo -list "$1" || unzoo -l "$1" ;;
+ *.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" || 7zr l -- "$1" ;;
+ *.a) ar tv "$1" ;;
+ *.elf) readelf -a -W -- "$1" ;;
+ *.so) readelf -h -d -s -W -- "$1" ;;
+ *.mo|*.gmo) msgunfmt -- "$1" ;;
+
+ *.rar|.r[0-9][0-9]) unrar l -- "$1" ;;
+
+ *.jar|*.war|*.ear|*.xpi|*.zip)
+ unzip -v "$1" || miniunzip -l "$1" || miniunz -l "$1" || zipinfo -v "$1"
+ ;;
+
+ *.deb|*.udeb)
+ if type -P dpkg > /dev/null ; then
+ dpkg --info "$1"
+ dpkg --contents "$1"
+ else
+ ar tv "$1"
+ ar p "$1" data.tar.gz | tar tzvvf -
+ fi
+ ;;
+
+ ### Filesystems ###
+ *.squashfs) unsquashfs -s "$1" && unsquashfs -ll "$1" ;;
+
+ ### Media ###
+ *.bmp|*.gif|*.jpeg|*.jpg|*.ico|*.pcd|*.pcx|*.png|*.ppm|*.tga|*.tiff|*.tif|*.webp)
+ identify -verbose -- "$1" || file -L -- "$1"
+ ;;
+ *.asf|*.avi|*.flv|*.mkv|*.mov|*.mp4|*.mpeg|*.mpg|*.qt|*.ram|*.rm|*.webm|*.wmv)
+ midentify "$1" || file -L -- "$1"
+ ;;
+ *.mp3) mp3info "$1" || id3info "$1" ;;
+ *.ogg) ogginfo "$1" ;;
+ *.flac) metaflac --list "$1" ;;
+ *.torrent) torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;;
+ *.bin|*.cue|*.raw)
+ # not all .bin/.raw files are cd images #285507
+ # fall back to lesspipe_file if .cue doesn't exist, or if
+ # cd-info failed to parse things sanely
+ [[ -e ${1%.*}.cue ]] \
+ && cd-info --no-header --no-device-info "$1" \
+ || lesspipe_file "$1"
+ ;;
+ *.iso)
+ iso_info=$(isoinfo -d -i "$1")
+ echo "${iso_info}"
+ # Joliet output overrides Rock Ridge, so prefer the better Rock
+ case ${iso_info} in
+ *$'\n'"Rock Ridge"*) iso_opts="-R";;
+ *$'\n'"Joliet"*) iso_opts="-J";;
+ *) iso_opts="";;
+ esac
+ isoinfo -l ${iso_opts} -i "$1"
+ ;;
+
+ ### Encryption stuff ###
+ *.crl) openssl crl -hash -text -noout -in "$1" ;;
+ *.csr) openssl req -text -noout -in "$1" ;;
+ *.crt|*.pem) openssl x509 -hash -text -noout -in "$1" ;;
+
+# May not be such a good idea :)
+# ### Device nodes ###
+# /dev/[hs]d[a-z]*)
+# fdisk -l "${1:0:8}"
+# [[ $1 == *hd* ]] && hdparm -I "${1:0:8}"
+# ;;
+
+ ### Everything else ###
+ *)
+ case $(( recur++ )) in
+ # Maybe we didn't match due to case issues ...
+ 0) lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;;
+
+ # Maybe we didn't match because the file is named weird ...
+ 1) lesspipe_file "$1" ;;
+ esac
+
+ # So no matches from above ... finally fall back to an external
+ # coloring package. No matching here so we don't have to worry
+ # about keeping in sync with random packages. Any coloring tool
+ # you use should not output errors about unsupported files to
+ # stdout. If it does, it's your problem.
+
+ # Allow people to flip color off if they dont want it
+ case ${LESSCOLOR} in
+ always) LESSCOLOR=2;;
+ [yY][eE][sS]|[yY]|1|true) LESSCOLOR=1;;
+ [nN][oO]|[nN]|0|false) LESSCOLOR=0;;
+ *) LESSCOLOR=0;; # default to no color #188835
+ esac
+ if [[ ${LESSCOLOR} != "0" ]] && [[ -n ${LESSCOLORIZER=code2color} ]] ; then
+ # 2: Only colorize if user forces it ...
+ # 1: ... or we know less will handle raw codes -- this will
+ # not detect -seiRM, so set LESSCOLORIZER yourself
+ if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then
+ LESSQUIET=true ${LESSCOLORIZER} "$1"
+ fi
+ fi
+
+ # Nothing left to do but let less deal
+ exit 0
+ ;;
+ esac
+}
+
+if [[ -z $1 ]] ; then
+ echo "Usage: lesspipe <file>"
+elif [[ $1 == "-V" || $1 == "--version" ]] ; then
+ cat <<-EOF
+ lesspipe (git)
+ Copyright 2001-2016 Gentoo Foundation
+ Mike Frysinger <vapier@gentoo.org>
+ (with plenty of ideas stolen from other projects/distros)
+
+ EOF
+ less -V
+elif [[ $1 == "-h" || $1 == "--help" ]] ; then
+ cat <<-EOF
+ lesspipe: preprocess files before sending them to less
+
+ Usage: lesspipe <file>
+
+ lesspipe specific settings:
+ LESSCOLOR env - toggle colorizing of output (no/yes/always; default: no)
+ LESSCOLORIZER env - program used to colorize output (default: code2color)
+ LESSIGNORE - list of extensions to ignore (don't do anything fancy)
+
+ You can create per-user filters as well by creating the executable file:
+ ~/.lessfilter
+ One argument is passed to it: the file to display. The script should exit 0
+ to indicate it handled the file, or non-zero to tell lesspipe to handle it.
+
+ To use lesspipe, simply add to your environment:
+ export LESSOPEN="|lesspipe %s"
+
+ Run 'less --help' or 'man less' for more info.
+ EOF
+else
+ recur=0
+ [[ -n ${LESSDEBUG} ]] \
+ && lesspipe "$1" \
+ || lesspipe "$1" 2> /dev/null
+fi
diff --git a/sys-apps/less/less-487.ebuild b/sys-apps/less/less-487.ebuild
new file mode 100644
index 000000000000..89f64cced928
--- /dev/null
+++ b/sys-apps/less/less-487.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2:0=
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ chmod a+x configure || die
+}
+
+src_configure() {
+ export ac_cv_lib_ncursesw_initscr=$(usex unicode)
+ export ac_cv_lib_ncurses_initscr=$(usex !unicode)
+ econf \
+ --with-regex=$(usex pcre pcre posix) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ newenvd "${FILESDIR}"/less.envd 70less
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-483-r1" ; then
+ elog "The lesspipe.sh symlink has been dropped. If you are still setting"
+ elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
+ elog "Colorization support has been dropped. If you want that, check out"
+ elog "the new app-text/lesspipe package."
+ fi
+}
diff --git a/sys-apps/less/less-497.ebuild b/sys-apps/less/less-497.ebuild
new file mode 100644
index 000000000000..73de792d3bd9
--- /dev/null
+++ b/sys-apps/less/less-497.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2:0=
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ export ac_cv_lib_ncursesw_initscr=$(usex unicode)
+ export ac_cv_lib_ncurses_initscr=$(usex !unicode)
+ econf \
+ --with-regex=$(usex pcre pcre posix) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ newenvd "${FILESDIR}"/less.envd 70less
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-483-r1" ; then
+ elog "The lesspipe.sh symlink has been dropped. If you are still setting"
+ elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
+ elog "Colorization support has been dropped. If you want that, check out"
+ elog "the new app-text/lesspipe package."
+ fi
+}
diff --git a/sys-apps/less/less-520.ebuild b/sys-apps/less/less-520.ebuild
new file mode 100644
index 000000000000..643a59bc2b71
--- /dev/null
+++ b/sys-apps/less/less-520.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2:0=
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ export ac_cv_lib_ncursesw_initscr=$(usex unicode)
+ export ac_cv_lib_ncurses_initscr=$(usex !unicode)
+ econf \
+ --with-regex=$(usex pcre pcre posix) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ newenvd "${FILESDIR}"/less.envd 70less
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-483-r1" ; then
+ elog "The lesspipe.sh symlink has been dropped. If you are still setting"
+ elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
+ elog "Colorization support has been dropped. If you want that, check out"
+ elog "the new app-text/lesspipe package."
+ fi
+}
diff --git a/sys-apps/less/metadata.xml b/sys-apps/less/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/less/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest
new file mode 100644
index 000000000000..dde0b4076a3b
--- /dev/null
+++ b/sys-apps/likwid/Manifest
@@ -0,0 +1,13 @@
+AUX likwid-4.1.1-Makefile.patch 1232 SHA256 7f045bea8e3d724ceeaac841bc65a1fb77f4c9b4143884dfb347b53f980a8f80 SHA512 cf8e19856849425095506edc2a8d8d25ef0cb27cbf0cffac122a9e17e71f3e992e287b14b83b05aad80dfa0b539aa89a3d8c0b295629f7e13c3810b1419eae55 WHIRLPOOL d51f701ea1cf408558be8a7c8eb0c8ac055804fd9fcebe361fe87edf5f24587b53f0abb3c10f3d60990a4cd92d615506c805bac8901b9b02b8ef1abdb7afc842
+AUX likwid-4.1.1-config.mk.patch 1834 SHA256 b6065d5d8e2a221b8f7526a5cf0dbf8f040103935f9a3f86d962abf6b629250e SHA512 4661c13e59e5549e086f3f499b4ca8ae7d6154b152a025774af2aeffe973e099a7b76d88df921fb51c07860ca0c5d74eb929c34a9033cedcdd777987d0c16e94 WHIRLPOOL 0e55570e6200acf5c42d6cfcf31515f045528bba0f20f51f67a863dad431f751211ce814a2e14118761991804757e2b85a8dbb37fb43f40372588f3b00346aad
+AUX likwid-4.1.1-fix-gnustack.patch 1013 SHA256 06f6c1888d0d23a2c60ca2a2cae39983c24945b8c1e3b12dfeaf780d68dbf7fa SHA512 90f31cb8025db0539e0bbbea6d915f5ab7ff531a3792ae456a8231febc75766c0a2715720262df7c3cac6e1c501faa259f3f78290455107378d1ad50e0c19451 WHIRLPOOL 3840a371066b408851d703078cfbb965a22431e2360fda7f6e286b150fce9618f8044a0145f418609085dd0b46cb9010e83b556b31e958ea4ac48345e76ed194
+AUX likwid-4.1.2-Makefile.patch 1232 SHA256 7f045bea8e3d724ceeaac841bc65a1fb77f4c9b4143884dfb347b53f980a8f80 SHA512 cf8e19856849425095506edc2a8d8d25ef0cb27cbf0cffac122a9e17e71f3e992e287b14b83b05aad80dfa0b539aa89a3d8c0b295629f7e13c3810b1419eae55 WHIRLPOOL d51f701ea1cf408558be8a7c8eb0c8ac055804fd9fcebe361fe87edf5f24587b53f0abb3c10f3d60990a4cd92d615506c805bac8901b9b02b8ef1abdb7afc842
+AUX likwid-4.1.2-config.mk.patch 1834 SHA256 b6065d5d8e2a221b8f7526a5cf0dbf8f040103935f9a3f86d962abf6b629250e SHA512 4661c13e59e5549e086f3f499b4ca8ae7d6154b152a025774af2aeffe973e099a7b76d88df921fb51c07860ca0c5d74eb929c34a9033cedcdd777987d0c16e94 WHIRLPOOL 0e55570e6200acf5c42d6cfcf31515f045528bba0f20f51f67a863dad431f751211ce814a2e14118761991804757e2b85a8dbb37fb43f40372588f3b00346aad
+AUX likwid-4.1.2-fix-gnustack.patch 1013 SHA256 06f6c1888d0d23a2c60ca2a2cae39983c24945b8c1e3b12dfeaf780d68dbf7fa SHA512 90f31cb8025db0539e0bbbea6d915f5ab7ff531a3792ae456a8231febc75766c0a2715720262df7c3cac6e1c501faa259f3f78290455107378d1ad50e0c19451 WHIRLPOOL 3840a371066b408851d703078cfbb965a22431e2360fda7f6e286b150fce9618f8044a0145f418609085dd0b46cb9010e83b556b31e958ea4ac48345e76ed194
+DIST likwid-4.1.1.tar.gz 1395475 SHA256 805b321c0c88e02ebddf89cd7e0097e40a438846cb033650c05a57d992393d3d SHA512 2561cc8203bf795ebe661a0b2f2e15fb68a164438b2c839482bab67a82babadbcfd78aaf519c4ceab6cfc799a363216023f77fe744e3b302facf5c578d7ab407 WHIRLPOOL 5be6036e726296719effcd3fbd272168cdf5f2581ede0bca0c554098a780018063b6527cd99202a8620dcc705246f2da1ad281c573eacfee8b4310a8dccbd4d7
+DIST likwid-4.1.2.tar.gz 1398643 SHA256 8a62a39ee584ec6b472d3791bf6c561af1db3e0564da7347c8a6cfdce8fd6763 SHA512 efb6a85947193204e08ce32e79c5f3ef15c7babca66930145af1c2eca8eccc2aeceea54a12715467161c646acc208bda3d01d07ea365ff8bdb9eafb022f107d9 WHIRLPOOL 7e065169251c0f2f18a8634a9ff4d309984920070b842e2eb34bc478b540a9aa49f95ae7878a63d98d237f46be2273d20539e94a60f96946a0f88935e3643085
+EBUILD likwid-4.1.1.ebuild 2581 SHA256 8ceae6a964c4d52a004a71f11475641b3e9a45122531c650cc130519e763089e SHA512 37fa590dd0f6e2c08e33751272e0090105e1b408a4f4ce2338d39e86fcdb81bcd16edc8becd094c80a7439a91b7259ad25d8b91d5774f6f7b1ab66e95c3b769d WHIRLPOOL 0b57965c60b607d67d65e4e2dd67670948992b9b8d0a1ff9793c3ab092bb4e2d9ba32ca7293c6b53a6ef979473ccc0bfdf85e0c49b7f3e6064d2c99a33a1c703
+EBUILD likwid-4.1.2.ebuild 2898 SHA256 df25af45ab296663d812bbee6d5d45d878375ea8d2d4c75a578bd1a1ebd5bd3c SHA512 cf56e4df096b42e3a50281002aaf0ef08acdd27b6c959944aef2306a627430e3bc8dc6a9ded58c4bb9ec1362390806000564faff8bd63baefb576ad8e2a7f4b7 WHIRLPOOL 2b5a5aeeeb7515cfb366131da325e635b40406c02cc8203eaa509a3ee53c740077d9d210c68de37b73854f9394df00d75e0e6836e9f66a3cb49717de828b1053
+MISC ChangeLog 5741 SHA256 754415b69c5d8d13c7b69bbb765a448625bdbc514465bb93e23175c48ed541b3 SHA512 4ec1cdd617ba2bb40635a5e3ddba4f7d0cbcd47267fcb205e2fb0ba6a6ce1e20db5302c70921229202d012739a557735d0ae7079f76fd83052d4afc73f877b57 WHIRLPOOL 857d14af43f1450ffb38310d4977fabcd74fd3a4550e7eee82367c75d47cf2ecc1dfd342b324ef3483410eac1f11f3c32e8bfd5f88bb6d4c9a339f8bb10d7037
+MISC ChangeLog-2015 539 SHA256 e31199479c2038ac25fe239edf990ead42f2f8a816908ea3235e07e80befe333 SHA512 8ca2b00c1bc5e14ccb5f1a9bea3f713db507ef144379ccb086a5fc8a105601f926b3ac3a131dad88bf114d6074e8e29f9c0e9b3ec413e42f29d97c6a0c99c3c0 WHIRLPOOL 6f8f7f4d9c902250452d34ce8b376dc40e254af6dd04320c7f403e3c03f438183e5446ab94e7620e6955413ca63e928088700d0f45bd50b51debf5601e552f97
+MISC metadata.xml 513 SHA256 e347897f9fe3d71f519c04e839b4d8d469bd950ab72ff960609752bc42f6f00a SHA512 df39c2ef26c97a35625389687983b395df8b856fb334b159dbf865dd92088a849f0de03bbe672c74fad087b7b487e26592f4a29385f56ce24b72f0bd9bb78f31 WHIRLPOOL 4ec5a6fad134af8c79ea681ea7f1ce6a2088a90b716f34ea4bcf6721eae4dd3199f13619cd933c1281c2f3db2e92b903d877821a9295044b708391d5053c8cc4
diff --git a/sys-apps/likwid/files/likwid-4.1.1-Makefile.patch b/sys-apps/likwid/files/likwid-4.1.1-Makefile.patch
new file mode 100644
index 000000000000..cec5d590c4b5
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.1-Makefile.patch
@@ -0,0 +1,19 @@
+--- likwid-likwid-4.1.1/Makefile.org 2016-07-14 12:09:56.612963529 +0800
++++ likwid-likwid-4.1.1/Makefile 2016-07-14 12:11:24.148645584 +0800
+@@ -51,7 +51,6 @@
+
+ #CONFIGURE BUILD SYSTEM
+ BUILD_DIR = ./$(COMPILER)
+-Q ?= @
+ GENGROUPLOCK = .gengroup
+
+ VPATH = $(SRC_DIR)
+@@ -544,7 +543,7 @@
+ sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/bin/likwid-lua+$(PWD)/ext/lua/lua+" -e "s+$(PREFIX)/share/lua/?.lua+$(PWD)/?.lua+" -e "s+$(PREFIX)/bin/likwid-pin+$(PWD)/likwid-pin+" -e "s+$(PREFIX)/bin/likwid-perfctr+$(PWD)/likwid-perfctr+" $$APP; \
+ chmod +x $$APP; \
+ done
+- @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/lib+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua;
++ @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua;
+ @sed -i -e "s+$(PREFIX)/share/likwid/mongroups+$(PWD)/monitoring/groups+g" likwid-agent
+ @ln -sf liblikwid.so liblikwid.so.$(VERSION)
+ @ln -sf ext/hwloc/liblikwid-hwloc.so liblikwid-hwloc.so.$(VERSION)
diff --git a/sys-apps/likwid/files/likwid-4.1.1-config.mk.patch b/sys-apps/likwid/files/likwid-4.1.1-config.mk.patch
new file mode 100644
index 000000000000..36897e542665
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.1-config.mk.patch
@@ -0,0 +1,43 @@
+--- likwid-likwid-4.1.1/config.mk.org 2016-07-14 12:49:27.791771509 +0800
++++ likwid-likwid-4.1.1/config.mk 2016-07-14 12:51:27.470358158 +0800
+@@ -15,9 +15,9 @@
+ # Common users do not need to change values below this comment! #
+ #################################################################
+
+-MANPREFIX = $(PREFIX)/man#NO SPACE
++MANPREFIX = ${D}/usr/share/man#NO SPACE
+ BINPREFIX = $(PREFIX)/bin#NO SPACE
+-LIBPREFIX = $(PREFIX)/lib#NO SPACE
++LIBPREFIX = $(PREFIX)/$(get_libdir)#NO SPACE
+
+ # These paths are hardcoded into executables and libraries. Usually
+ # they'll be the same as above, but package maintainers may want to
+@@ -26,9 +26,9 @@
+ # Keep in mind that the access and setFreq daemon need enough
+ # privileges that may be deleted when copying the files to
+ # the INTSTALLED_PREFIX
+-INSTALLED_PREFIX = $(PREFIX)#NO SPACE
++INSTALLED_PREFIX=/usr#NO SPACE
+ INSTALLED_BINPREFIX = $(INSTALLED_PREFIX)/bin#NO SPACE
+-INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/lib#NO SPACE
++INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/$(get_libdir)#NO SPACE
+
+ # chown installed tools to this user/group
+ # if you change anything here, make sure that the user/group can access
+@@ -59,7 +59,7 @@
+ FORTRAN_INTERFACE = false#NO SPACE
+
+ # Instrument likwid-bench for use with likwid-perfctr
+-INSTRUMENT_BENCH = false#NO SPACE
++INSTRUMENT_BENCH = true#NO SPACE
+
+ # Use recommended Portable Hardware Locality (hwloc) instead of CPUID
+ USE_HWLOC = true#NO SPACE
+@@ -80,6 +80,6 @@
+ DATE = 19.05.2016
+
+ RPATHS = -Wl,-rpath=$(INSTALLED_LIBPREFIX)
+-LIBLIKWIDPIN = $(abspath $(INSTALLED_PREFIX)/lib/liblikwidpin.so.$(VERSION).$(RELEASE))
++LIBLIKWIDPIN = $(abspath $(PREFIX)/$(get_libdir)/liblikwidpin.so)
+ LIKWIDFILTERPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/filter)
+ LIKWIDGROUPPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/perfgroups)
diff --git a/sys-apps/likwid/files/likwid-4.1.1-fix-gnustack.patch b/sys-apps/likwid/files/likwid-4.1.1-fix-gnustack.patch
new file mode 100644
index 000000000000..a5a046d1f0df
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.1-fix-gnustack.patch
@@ -0,0 +1,31 @@
+--- likwid-likwid-4.1.1/bench/Makefile.org 2015-08-22 13:56:17.242177531 +0800
++++ likwid-likwid-4.1.1/bench/Makefile 2015-08-22 13:56:46.985086094 +0800
+@@ -118,6 +118,7 @@
+ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.pas
+ @echo "===> ASSEMBLE $@"
+ $(Q)$(PAS) -i $(PASFLAGS) -o $(BUILD_DIR)/$*.s $< '$(DEFINES)'
++ @cat ../fix_gnustack.txt >> $(BUILD_DIR)/$*.s
+ $(Q)$(AS) $(ASFLAGS) $(BUILD_DIR)/$*.s -o $@
+
+ ifeq ($(findstring $(MAKECMDGOALS),clean),)
+
+diff --git a/fix_gnustack.txt b/fix_gnustack.txt
+new file mode 100644
+index 0000000..965af94
+--- /dev/null
++++ likwid-likwid-4.1.1/fix_gnustack.txt
+@@ -0,0 +1,3 @@
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+
+--- likwid-likwid-4.1.1/src/loadData.S.org 2015-08-22 14:26:28.634629884 +0800
++++ likwid-likwid-4.1.1/src/loadData.S 2015-08-22 14:28:42.247210117 +0800
+@@ -41,4 +41,6 @@
+ #endif
+ .size _loadData, .-_loadData
+
+-
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch b/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch
new file mode 100644
index 000000000000..cec5d590c4b5
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch
@@ -0,0 +1,19 @@
+--- likwid-likwid-4.1.1/Makefile.org 2016-07-14 12:09:56.612963529 +0800
++++ likwid-likwid-4.1.1/Makefile 2016-07-14 12:11:24.148645584 +0800
+@@ -51,7 +51,6 @@
+
+ #CONFIGURE BUILD SYSTEM
+ BUILD_DIR = ./$(COMPILER)
+-Q ?= @
+ GENGROUPLOCK = .gengroup
+
+ VPATH = $(SRC_DIR)
+@@ -544,7 +543,7 @@
+ sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/bin/likwid-lua+$(PWD)/ext/lua/lua+" -e "s+$(PREFIX)/share/lua/?.lua+$(PWD)/?.lua+" -e "s+$(PREFIX)/bin/likwid-pin+$(PWD)/likwid-pin+" -e "s+$(PREFIX)/bin/likwid-perfctr+$(PWD)/likwid-perfctr+" $$APP; \
+ chmod +x $$APP; \
+ done
+- @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/lib+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua;
++ @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua;
+ @sed -i -e "s+$(PREFIX)/share/likwid/mongroups+$(PWD)/monitoring/groups+g" likwid-agent
+ @ln -sf liblikwid.so liblikwid.so.$(VERSION)
+ @ln -sf ext/hwloc/liblikwid-hwloc.so liblikwid-hwloc.so.$(VERSION)
diff --git a/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch b/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch
new file mode 100644
index 000000000000..36897e542665
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch
@@ -0,0 +1,43 @@
+--- likwid-likwid-4.1.1/config.mk.org 2016-07-14 12:49:27.791771509 +0800
++++ likwid-likwid-4.1.1/config.mk 2016-07-14 12:51:27.470358158 +0800
+@@ -15,9 +15,9 @@
+ # Common users do not need to change values below this comment! #
+ #################################################################
+
+-MANPREFIX = $(PREFIX)/man#NO SPACE
++MANPREFIX = ${D}/usr/share/man#NO SPACE
+ BINPREFIX = $(PREFIX)/bin#NO SPACE
+-LIBPREFIX = $(PREFIX)/lib#NO SPACE
++LIBPREFIX = $(PREFIX)/$(get_libdir)#NO SPACE
+
+ # These paths are hardcoded into executables and libraries. Usually
+ # they'll be the same as above, but package maintainers may want to
+@@ -26,9 +26,9 @@
+ # Keep in mind that the access and setFreq daemon need enough
+ # privileges that may be deleted when copying the files to
+ # the INTSTALLED_PREFIX
+-INSTALLED_PREFIX = $(PREFIX)#NO SPACE
++INSTALLED_PREFIX=/usr#NO SPACE
+ INSTALLED_BINPREFIX = $(INSTALLED_PREFIX)/bin#NO SPACE
+-INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/lib#NO SPACE
++INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/$(get_libdir)#NO SPACE
+
+ # chown installed tools to this user/group
+ # if you change anything here, make sure that the user/group can access
+@@ -59,7 +59,7 @@
+ FORTRAN_INTERFACE = false#NO SPACE
+
+ # Instrument likwid-bench for use with likwid-perfctr
+-INSTRUMENT_BENCH = false#NO SPACE
++INSTRUMENT_BENCH = true#NO SPACE
+
+ # Use recommended Portable Hardware Locality (hwloc) instead of CPUID
+ USE_HWLOC = true#NO SPACE
+@@ -80,6 +80,6 @@
+ DATE = 19.05.2016
+
+ RPATHS = -Wl,-rpath=$(INSTALLED_LIBPREFIX)
+-LIBLIKWIDPIN = $(abspath $(INSTALLED_PREFIX)/lib/liblikwidpin.so.$(VERSION).$(RELEASE))
++LIBLIKWIDPIN = $(abspath $(PREFIX)/$(get_libdir)/liblikwidpin.so)
+ LIKWIDFILTERPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/filter)
+ LIKWIDGROUPPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/perfgroups)
diff --git a/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch b/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch
new file mode 100644
index 000000000000..a5a046d1f0df
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch
@@ -0,0 +1,31 @@
+--- likwid-likwid-4.1.1/bench/Makefile.org 2015-08-22 13:56:17.242177531 +0800
++++ likwid-likwid-4.1.1/bench/Makefile 2015-08-22 13:56:46.985086094 +0800
+@@ -118,6 +118,7 @@
+ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.pas
+ @echo "===> ASSEMBLE $@"
+ $(Q)$(PAS) -i $(PASFLAGS) -o $(BUILD_DIR)/$*.s $< '$(DEFINES)'
++ @cat ../fix_gnustack.txt >> $(BUILD_DIR)/$*.s
+ $(Q)$(AS) $(ASFLAGS) $(BUILD_DIR)/$*.s -o $@
+
+ ifeq ($(findstring $(MAKECMDGOALS),clean),)
+
+diff --git a/fix_gnustack.txt b/fix_gnustack.txt
+new file mode 100644
+index 0000000..965af94
+--- /dev/null
++++ likwid-likwid-4.1.1/fix_gnustack.txt
+@@ -0,0 +1,3 @@
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+
+--- likwid-likwid-4.1.1/src/loadData.S.org 2015-08-22 14:26:28.634629884 +0800
++++ likwid-likwid-4.1.1/src/loadData.S 2015-08-22 14:28:42.247210117 +0800
+@@ -41,4 +41,6 @@
+ #endif
+ .size _loadData, .-_loadData
+
+-
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/sys-apps/likwid/likwid-4.1.1.ebuild b/sys-apps/likwid/likwid-4.1.1.ebuild
new file mode 100644
index 000000000000..3c1df6ff760b
--- /dev/null
+++ b/sys-apps/likwid/likwid-4.1.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit fcaps linux-info fortran-2
+
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments"
+HOMEPAGE="https://github.com/rrze-likwid/likwid"
+SRC_URI="https://github.com/RRZE-HPC/likwid/archive/likwid-4.1.1.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fortran"
+
+RDEPEND="dev-lang/perl"
+
+DEPEND="${RDEPEND}
+ fortran? ( sys-devel/gcc:*[fortran] )
+ dev-lang/lua:0"
+
+CONFIG_CHECK="~X86_MSR"
+
+FILECAPS=(
+ -M 755 cap_sys_rawio usr/sbin/likwid-accessD --
+ -M 755 cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter}
+)
+
+# See Bug 558402
+PATCHES=(
+ "${FILESDIR}/${P}-Makefile.patch"
+ "${FILESDIR}/${P}-fix-gnustack.patch"
+ "${FILESDIR}/${P}-config.mk.patch"
+)
+
+S=${WORKDIR}/likwid-likwid-${PV}
+
+src_prepare() {
+ # Set PREFIX path to include sandbox path
+ sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || die
+
+ # Set the path to library directory.
+ sed -e 's:$(get_libdir):'$(get_libdir)':' -i config.mk || die "Cannot set library path!"
+
+ # Set correct LDFLAGS
+ sed -e '/LIBS/aSHARED_LFLAGS += -Wl,-soname,$@' \
+ -i make/include_GCC.mk || die
+
+ # Insert date and version info man pages
+ sed -e 's/<DATE>/21.08.2015/g' \
+ -e "s/VERSION/${PV}/g" \
+ -i doc/*.1 || die
+
+ # Set path to the access daemon, once installed into the system
+ sed -e "/exeprog/s|TOSTRING(ACCESSDAEMON)|\"/usr/sbin/likwid-accessD\"|" \
+ -i src/access_client.c || die
+
+ # Ensure we build with a non executable stack
+ sed -e "s:CFLAGS += \$(SHARED_CFLAGS):CFLAGS += \$(SHARED_CFLAGS) -g -Wa,--noexecstack:" \
+ -i make/config_defines.mk || die
+
+ if use fortran; then
+
+ # If fortran USE is enabled, enable the fortran interfaces
+ sed -i 's:^FORTRAN_INTERFACE = false:FORTRAN_INTERFACE = likwid.mod:' config.mk || die
+
+ # Set the correct fortrant compiler for GCC
+ sed -i "s:^FC = ifort:FC = ${FC}:" make/include_GCC.mk || die
+
+ # Set the correct FCFLAGS for gcc fortran
+ sed -i '/^FCFLAGS/c\FCFLAGS = -J ./ -fsyntax-only' make/include_GCC.mk || die
+ fi
+
+ default
+
+}
+
+src_install () {
+ default
+ if use fortran; then
+ insinto /usr/include
+ doins likwid.mod
+ fi
+
+ doman doc/*.1
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ ewarn "To enable users to access performance counters it is necessary to"
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices."
+ ewarn "It can be accomplished by adding the following line to file"
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\""
+}
diff --git a/sys-apps/likwid/likwid-4.1.2.ebuild b/sys-apps/likwid/likwid-4.1.2.ebuild
new file mode 100644
index 000000000000..769fddf7e5a8
--- /dev/null
+++ b/sys-apps/likwid/likwid-4.1.2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit fcaps linux-info toolchain-funcs fortran-2
+
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments"
+HOMEPAGE="https://github.com/rrze-likwid/likwid"
+SRC_URI="https://ftp.fau.de/pub/likwid/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fortran"
+
+RDEPEND="dev-lang/perl"
+
+DEPEND="${RDEPEND}
+ fortran? ( sys-devel/gcc:*[fortran] )
+ dev-lang/lua:0"
+
+CONFIG_CHECK="~X86_MSR"
+
+FILECAPS=(
+ -M 755 cap_sys_rawio usr/sbin/likwid-accessD --
+ -M 755 cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter}
+)
+
+# See Bug 558402
+PATCHES=(
+ "${FILESDIR}/${P}-Makefile.patch"
+ "${FILESDIR}/${P}-fix-gnustack.patch"
+ "${FILESDIR}/${P}-config.mk.patch"
+)
+
+src_prepare() {
+ # Set PREFIX path to include sandbox path
+ sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || \
+ die "Failed to set correct prefix path"
+
+ # Set the path to library directory.
+ sed -e 's:$(get_libdir):'$(get_libdir)':' -i config.mk || \
+ die "Cannot set library path!"
+
+ # Set correct LDFLAGS
+ sed -e '/LIBS/aSHARED_LFLAGS += -Wl,-soname,$@' \
+ -i make/include_GCC.mk || die "Failed to set correct LDFLAGS"
+
+ # Insert date and version info man pages
+ sed -e 's/<DATE>/21.08.2015/g' \
+ -e "s/VERSION/${PV}/g" \
+ -i doc/*.1 || die "Failed to insert date into man pages"
+
+ # Set path to the access daemon, once installed into the system
+ sed -e "/exeprog/s|TOSTRING(ACCESSDAEMON)|\"/usr/sbin/likwid-accessD\"|" \
+ -i src/access_client.c || die "Failed to set access daemon path"
+
+ # Ensure we build with a non executable stack
+ sed -e "s:\$(SHARED_CFLAGS): \$(SHARED_CFLAGS) -Wa,--noexecstack:" \
+ -i make/config_defines.mk || die "Failed to set nonexecstack"
+
+ if use fortran; then
+
+ # If fortran USE is enabled, enable the fortran interfaces
+ sed -i 's:^FORTRAN_INTERFACE = false:FORTRAN_INTERFACE = likwid.mod:' \
+ config.mk || die "Enabling of fortran failed"
+
+ # Set the correct fortran compiler for GCC
+ sed -i "s:^FC = ifort:FC = ${FC}:" make/include_GCC.mk \
+ || die "Failed to set fortran compiler"
+
+ # Set the correct FCFLAGS for gcc fortran
+ sed -i '/^FCFLAGS/c\FCFLAGS = -J ./ -fsyntax-only' make/include_GCC.mk \
+ || die "Failed to set GCC flags for fortran"
+ fi
+
+ # Respect CC
+ sed -e "s:^CC.*:CC = $(tc-getCC):" \
+ -i make/include_GCC.mk || die
+
+ default
+
+}
+
+src_install () {
+ default
+ if use fortran; then
+ insinto /usr/include
+ doins likwid.mod
+ fi
+
+ doman doc/*.1
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ ewarn "To enable users to access performance counters it is necessary to"
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices."
+ ewarn "It can be accomplished by adding the following line to file"
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\""
+}
diff --git a/sys-apps/likwid/metadata.xml b/sys-apps/likwid/metadata.xml
new file mode 100644
index 000000000000..f9421d78497b
--- /dev/null
+++ b/sys-apps/likwid/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>brendan@horan.hk</email>
+ <name>Brendan Horan</name>
+ <description>Proxy - Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rrze-likwid/likwid</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/linux-misc-apps/Manifest b/sys-apps/linux-misc-apps/Manifest
new file mode 100644
index 000000000000..2eb92356e3f2
--- /dev/null
+++ b/sys-apps/linux-misc-apps/Manifest
@@ -0,0 +1,14 @@
+AUX freefall.confd 147 SHA256 3ed6f497dbb8f6b8a65f369b74d04a826a1b0463b344ce5d1b2000d97f4d5471 SHA512 556472ab75ab8d3ccbedc44902a34bdef433430aa86fe5d8a125b27101f81e9c7c77e5a1fdfa84aef35078046e4b27a33eeb17d1745871f9e1f41e0ef64b2ba9 WHIRLPOOL 74dd1f0f336da5bca45d40fdf083384e272c1197b3307a2840bb43937a365bea3bb78d972675dcd8fce67ca4ef1cfbc0150a81f25f8c637c40c858c1f18d9c42
+AUX freefall.initd 1111 SHA256 9959046202c21ca157aa542071925683d4b0836e9c5b29b92416eb513b1c44d2 SHA512 e4d4d724276d9b64b80b29be5c28b9efc15556dd31545c85e45253aec2305d37af4b60a0be3f2f279c76c27aba5a968053a9bab7d08f2d559277701fd84375f4 WHIRLPOOL d2c3d4d136ac73dc02cff02e75dacba65dd2745c3740879183803eb452ce9218548c4388b2ae03f70d9d2a1501586f7e5c7aa1b30a3a866afe8d031bf42c6cc5
+AUX hpfall.confd 144 SHA256 54e3e4fa314066b0e0e177a7d19e86ad594ca89a307c134d236691edfe6970f8 SHA512 995fae481f169a2e53e4985113d5581ec37690a0fa2b77ca4665ff2e26d1ec073edc12d4001d4ca144ba3e3ce57b269bd8016ea024844fa3bde145bc7e4945f6 WHIRLPOOL de56cb87ae12029a18ad4131ae8a1e256a63f39aea3aae9eadbd28bf77631b29480c229765bf91b8afba35f9c4d0eee0a90cb33e5420b9608abd1622d27aaba3
+AUX hpfall.initd 1098 SHA256 b092f6b50aa5c26b3cd4fcb1cc75561405acc2e7374e63ed5ae434dcaeee47a5 SHA512 64c716255d8ecc5828d7c54b4aef9406353e2d3a2f0965882342344c533bebf7826b4a76e58263b974dfc1162b49688e2009eeb5a467e4361ab8241d23a028d7 WHIRLPOOL e24587da0fa11f31b3b83bb72cbd48d1eee54018b22108018cbf02cd2243feff3aeee9ea49d6aaf1e75777ca6fc535f9b8309dbbcf35ac736bfd195c551e6381
+DIST linux-3.18.tar.xz 80934708 SHA256 becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd SHA512 2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 WHIRLPOOL 81634af631b7d30ccd1f4798f96f44d9aa0ba6609b73f2747eb6aebaf7a99487fb2dbd45767605186182533cb222bfd9236e8dd5e11a04fdb67c211e4e0a91d6
+DIST linux-3.6.tar.bz2 82296001 SHA256 88ae0a20fd39ecae79db0ce8f9397922fae33c8b06a54ed2c883c861126c9771 SHA512 cbaefc2c4c8ab2251c3345b7b2c88d55a49e3468d8b177b05dd6d96a802efa9a052b1a1ecab8b71298bac97f45259516d88253838332b4fdb4307780ebcddce9 WHIRLPOOL e17e3800951f0c3af21015d1a1c99698d0ef70815bd4f131dd60b30baef70d4c255988857533a9a7c058388c2febfcf02d12cde2a7ed46b24fa85aeb260c0251
+DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc
+EBUILD linux-misc-apps-3.18.ebuild 4978 SHA256 064e375630b7083662836bcda8475cd567b835cf20da9eedbda315da597d49fb SHA512 3467e5f785f114e4030d4826485a4c4510a94d7e211fe65c475235efe7046329036ce657b3fb535da80c8b81da4f41ae273b6a8035d1fdd4b3a2518b69b0daf5 WHIRLPOOL dd3104d385c4e44f09e30a839c5549f512ba39daa96788ce34fe276748622549b28d8d9a8a0a94474b16d9e33d71bd36d2b8a47115f4f840e3206d6cabf8acad
+EBUILD linux-misc-apps-3.6-r2.ebuild 5061 SHA256 a6ce1f957f6e865c596736e6ceb324323ea8f3d761329df218795fceabdc8cb3 SHA512 7d69ae7fbf372dd5b93010e5875216d0e430778dc4589ed930c108c2e7524719aa1fb830cb7af8a688ce30a1b24c285033528c307c75ca91dc8f20f98e955121 WHIRLPOOL 44b44537c7ed8035441747bf1ce459fb25e42e33fc845903594d1fb8e071631f2c947eefca9d425810591fc4743c543010641eef6d3cafa14f84ca2869916ed3
+EBUILD linux-misc-apps-4.4-r1.ebuild 6319 SHA256 9f200fbbba38af3cca587ffe12709c3d9a0df66add9323cd8a1921ee9d1e2a5a SHA512 9a4e12c44d0faa1910c4f7ad60fea624f2070e75baadf3fa675827331dd5a84c1bf3a9e57315baf9ed309b5ea2f7c73590fd1bc8173672f83c22372893c7fac7 WHIRLPOOL a2c12d4b34182f451db40a0ebcc030e3964dd5279b54f2a83144d30d42eee278f62e0398d7e140026f672a23d812222e4fe32c5d161ad72f3be0f3dad56fb14f
+EBUILD linux-misc-apps-4.4.ebuild 5477 SHA256 194520ce4dec23fa69f120881efb597e6d83998bff80004687267632a0a77ce1 SHA512 dc9992b78dcdbcbd2548ad3fa520588e7980a03af1e1743f2afe62ec4d643b810693b4d4254e7de18f17f049cd6947943825227ee21ddcbc4d17e3313aa0f4ff WHIRLPOOL bbe1f6d476b9892e6b0a78942707e0c44a5db85fec0092d82c762864d14f9b4e7db1eecc7b8e28f900f3d3dfc43a4c58487d4c084d2312f04b09d727724675a7
+MISC ChangeLog 3453 SHA256 949d38c46f8bd014bc008dfb214b207c1840d2fc51697e54c901614e41a3c46f SHA512 806a2fa02c515220d8a65fb5ef8c0355144cb1eef36897e84db2dd688e6bee2aea3fc20d12379ab35218c19260d1a70638ff36a92ea909d169ddf01375c36fbf WHIRLPOOL 6863dc0206fa117b332f8c65b6cb60d5dfae09dace2dcab7a19717b4195044f31a2a5b10fd8c0be1777f683977275cb0b210f9bd5874d18280e95d3574151edf
+MISC ChangeLog-2015 1665 SHA256 f4c71ec42992408bd8bf2178b4eb06221d3527471e94c8c034a028edb7549fec SHA512 4344ac73f65de3650dbd64343a90e8753075460d80dbc91fc724aacb9c377c3e7e8a114a1cdd3ff6fda872da439e6522d546dfe9ca8f981f40690d8e827598d0 WHIRLPOOL e6cd6ca29d6fc9d79d6b46be6cbad0d397b8472cd49fc521aac91eb9019087cb06fae221cf38df977db67ea5bc6984bafce6ad64a1c5ce60b2205150b172775f
+MISC metadata.xml 318 SHA256 eee43e162fd840b35759997b7b89e5657cd8dd97080b2542e9928b57f96dfea3 SHA512 c5b90254b92fd0bd40596718daed1e9b5fd2c0039a814932811e33fb6827eac660aadd324bd45117d60ca56148b2f8213a075be1b255d6e8c006e2702f76833d WHIRLPOOL e4350d4c822e533791e5c49f419101a4816199b55015eafd233cd9abef971431398e2dcfa96e41c3809d57d3f8a45f47879b65b45654f905190b2411bb598f77
diff --git a/sys-apps/linux-misc-apps/files/freefall.confd b/sys-apps/linux-misc-apps/files/freefall.confd
new file mode 100644
index 000000000000..c082615cbcac
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/freefall.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/freefall
+
+# The name of the disk device that hpfall should protect.
+# Usually this is 'sda' or 'hda' the primary master.
+
+DISK="sda"
diff --git a/sys-apps/linux-misc-apps/files/freefall.initd b/sys-apps/linux-misc-apps/files/freefall.initd
new file mode 100644
index 000000000000..d0c896e6293d
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/freefall.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 2012-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ -z "$DISK" ] ; then
+ eerror "You need to setup DISK in /etc/conf.d/freefall first"
+ return 1
+ fi
+
+ if [ ! -b /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust the DISK setting in /etc/conf.d/freefall"
+ return 1
+ fi
+
+ if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then
+ eerror "No protect entry for ${DISK}!"
+ eerror "Kernel 2.6.28 and above is required"
+ return 1
+ fi
+
+ if [ ! -c /dev/freefall ]; then
+ ebegin "Loading hp_accel module"
+ modprobe hp_accel
+ eend $? || return 1
+ fi
+}
+
+start () {
+ checkconfig || return 1
+
+ ebegin "Starting active hard-drive protection daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/freefall /dev/${DISK}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping active hard-drive protection daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/freefall
+ eend $?
+}
diff --git a/sys-apps/linux-misc-apps/files/hpfall.confd b/sys-apps/linux-misc-apps/files/hpfall.confd
new file mode 100644
index 000000000000..4f3451b0bff6
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/hpfall.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/hpfall
+
+# The name of the disk device that hpfall should protect.
+# Usually this is 'sda' or 'hda' the primary master.
+
+DISK="sda" \ No newline at end of file
diff --git a/sys-apps/linux-misc-apps/files/hpfall.initd b/sys-apps/linux-misc-apps/files/hpfall.initd
new file mode 100644
index 000000000000..8b4930612c4d
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/hpfall.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ -z "$DISK" ] ; then
+ eerror "You need to setup DISK in /etc/conf.d/hpfall first"
+ return 1
+ fi
+
+ if [ ! -b /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust the DISK setting in /etc/conf.d/hpfall"
+ return 1
+ fi
+
+ if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then
+ eerror "No protect entry for ${DISK}!"
+ eerror "Kernel 2.6.28 and above is required"
+ return 1
+ fi
+
+ if [ ! -c /dev/freefall ]; then
+ ebegin "Loading hp_accel module"
+ modprobe hp_accel
+ eend $? || return 1
+ fi
+}
+
+start () {
+ checkconfig || return 1
+
+ ebegin "Starting active hard-drive protection daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/hpfall /dev/${DISK}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping active hard-drive protection daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/hpfall
+ eend $?
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild
new file mode 100644
index 000000000000..df8e784f1a82
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/laptops/freefall.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/lguest/lguest.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/power/x86/turbostat:turbostat:../../../../turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The usbip utility is maintained separately at net-misc/usbip"
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild
new file mode 100644
index 000000000000..a2e70c995d37
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.bz2
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.bz2
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# sysfsutils and glib for usbip - remove sysfsutils in 3.7 or 3.8
+RDEPEND="sys-apps/hwids
+ >=sys-fs/sysfsutils-2
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools
+ !net-misc/usbip"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/cgroups/cgroup_event_listener.c
+ Documentation/laptops/dslm.c
+ Documentation/laptops/hpfall.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/lguest/lguest.c
+ tools/vm/page-types.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+)
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ tools/firewire:nosy-dump
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ Documentation/misc-devices/mei:mei-amt-version
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ pushd drivers/staging/usbip/userspace >/dev/null &&
+ eautoreconf -i -f -v &&
+ popd >/dev/null || die "usbip"
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ cd drivers/staging/usbip/userspace && \
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target=${t/*:}
+ einfo "Building $dir => $target"
+ emake -C $dir ARCH=${karch} $target
+ done
+
+ emake -C drivers/staging/usbip/userspace
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target=${t/*:}
+ einfo "Installing $dir => $target"
+ dosbin ${dir}/${target}
+ done
+
+ pushd drivers/staging/usbip/userspace >/dev/null \
+ || die "Missing usbip/userspace"
+ emake DESTDIR="${D}" install
+
+ newdoc README README.usbip
+ newdoc AUTHORS AUTHORS.usbip
+ dodoc ../usbip_protocol.txt
+ popd >/dev/null
+
+ newconfd "${FILESDIR}"/hpfall.confd hpfall
+ newinitd "${FILESDIR}"/hpfall.initd hpfall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild
new file mode 100644
index 000000000000..8e3a1d871517
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd usbip"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ >=sys-kernel/linux-headers-$(get_version_component_range 1-2)
+ usbip? (
+ !net-misc/usbip
+ tcpd? ( sys-apps/tcp-wrappers )
+ virtual/libudev
+ )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/laptop/freefall/freefall.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+ # Broken:
+ #tools/lguest/lguest.c # fails to compile
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere
+ #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/iio:generic_buffer
+ tools/iio:iio_event_monitor
+ tools/iio:lsiio
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ tools/thermal/tmon:tmon
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ pushd tools/usb/usbip/ >/dev/null &&
+ sed -i 's/-Werror[^ ]* //g' configure.ac &&
+ eautoreconf -i -f -v &&
+ popd >/dev/null || die "usbip"
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ if use usbip; then
+ pushd tools/usb/usbip/ || die
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+ popd
+ fi
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ append-cflags -I./tools/lib
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+
+ if use usbip; then
+ emake -C tools/usb/usbip
+ fi
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ if use usbip; then
+ pushd tools/usb/usbip/ >/dev/null || die "usbip"
+ emake DESTDIR="${D}" install
+ newdoc README README.usbip
+ newdoc AUTHORS AUTHORS.usbip
+ popd >/dev/null
+ dodoc drivers/usb/usbip/usbip_protocol.txt
+ fi
+
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The lguest utility no longer builds, and has been dropped."
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+ if use usbip; then
+ elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client"
+ elog "machine's kernel config and USBIP_HOST on the server."
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild
new file mode 100644
index 000000000000..3eadfb096a3f
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/laptop/freefall/freefall.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+ # Broken:
+ #tools/lguest/lguest.c # fails to compile
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere
+ #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/iio:generic_buffer
+ tools/iio:iio_event_monitor
+ tools/iio:lsiio
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ tools/thermal/tmon:tmon
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ append-cflags -I./tools/lib
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The usbip utility is maintained separately at net-misc/usbip"
+ elog "The lguest utility no longer builds, and has been dropped."
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/metadata.xml b/sys-apps/linux-misc-apps/metadata.xml
new file mode 100644
index 000000000000..8ac62c3e7f2b
--- /dev/null
+++ b/sys-apps/linux-misc-apps/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="usbip">Include USB/IP binaries to replace <pkg>net-misc/usbip</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/lkcdutils/Manifest b/sys-apps/lkcdutils/Manifest
new file mode 100644
index 000000000000..7383fad39399
--- /dev/null
+++ b/sys-apps/lkcdutils/Manifest
@@ -0,0 +1,10 @@
+AUX lkcdutils-6.2.0-build.patch 725 SHA256 77ecdc5949cbf29a322879f88e4286d4a59b569910161c24e2e7d5fe8d87078a SHA512 12e9830013052364371cf6702243cbb95b929857507891e58d855529e9c2fdc4ad646fcc6595f6fabf2417941eabdb74991c8bbf04786bcabb237d19e9b35945 WHIRLPOOL 5eb27f35793f414ef7c3618e8f2fa830f69a673f3a4f05180795e43a42c6761ba848e2f0b3f8f7c356b4b896255ddfd1a2e8ca947d4c8022c9191f30e6c0ae93
+DIST lkcdutils-4.1-1.src.rpm 1502922 SHA256 3482dfca9f7a766eb8d2778640ed72a6fa621915639f6be1a4e1313ac545df71 SHA512 c7cd2aa8292bac51116f098d07c80e0a3c89fea95e769bac33358cb6c70b8b0d98f8d8115de6c96c4c70c4dbca5f1e467cf383619579cb9db96785762101f495 WHIRLPOOL f2b3b3df0518269155aa00e5e4fe3e42e1f78f7d088800af61926731b70a5de02f7afa46fe7bea005f8c48a215e4c1ff981b282ae7b06175f37e934ea0f4f7f0
+DIST lkcdutils-4.1-dhv8.tar.gz 8227 SHA256 1a7a9e6007c338ece8c8c1459af8c02db0ec624bff5f2f71b5dcab4310a998c0 SHA512 a16885802a937c16c33a70fc29ed5304cf610e01b10b7da331f474143bffa84fffb3e3d34d8438e63da0af9a43383de1eb4ea779c81508465b28463432526074 WHIRLPOOL 4651cd01d0c13e562f2db036d980d4773985a9a9453e6674c73c1b54cf4a1b0aaa0003fc7677277361523d4fb89a5d8e12c245f9575ff1fcdeedecec0e7abe15
+DIST lkcdutils-4.1-savedump.tar.gz 21626 SHA256 e3bd94c5a8cc4d97885020c841f47c7aec4fc746a6e3b10ab8840a5dfbc2ca82 SHA512 00620d8e438b512005c9d9c19743595c5c0d0a5563c4833aeba597cd77b9e17d3c46f28fc2df6c53dc8f1200c3a88c7bd67f0007925337f0c81b975971e511ee WHIRLPOOL a75cc20c7cd1d0c208cbcac27145d8fc50f943e0b98cfcdffd281e7b3c1bc1d513a0589e67c1965e355f81d490507378ee0faa49b4da33c478d16f79b4c7fd5d
+DIST lkcdutils-6.2.0.tar.gz 2967595 SHA256 f69d9eb293ad446d61a882e147120ec3d2f55280443efd859d6cdb196b0de22b SHA512 963f095448b28526f9db88efb77a32e7c05accfea3af175048600727dd8cce02a47743a5e4fbd5f359f8dff41538d4c90c201bdee5cb9c2ae90973f6377aa20b WHIRLPOOL cd09ad558d4b70c224e6c1714bcd99022f7f03187654c0b9b4ca0b7ba12acff8da18144e5d7a575f94533ec87e76cdc609671a1c9e1e2e5de45dcb41d29fbf95
+EBUILD lkcdutils-4.1.1.ebuild 1845 SHA256 20bbcaea0348d713868fb582964cb885fd687f4d4ecd8e5c55664afde0f26013 SHA512 31ab75986c94ed79f3e226e3a73c31e50d9f188f5745fce95f5cd110589908fd9b06c4724330546d0ca06b7fcdd5f82ed0d4dabdf7f1670eeee6aa0fa30f1b0f WHIRLPOOL 5e0935d63f3a6c0c40f907bd96a2f65018bbedb415b16062f7e7c80c7437eae8e47f11dda8489afc11e6904af62d1e67b6e81c6ec02857abe03a061190b5ed25
+EBUILD lkcdutils-6.2.0.ebuild 652 SHA256 bb9e29788f238348c438a68a6c00b35559c338c51157d8f3c700c3699a70ff7f SHA512 4fc3159cb82d2b0e35ddd4c36233ed65a0b2829eb85a7538471487ba38b33c1d3add1a1c88f67ed1bffe3b8de78f3a358446657ec808a5d5ce74a97cd17e59cd WHIRLPOOL 5e9200245fc3423458ccc499132a5c7b0d4e8bec72fac21618492a375986a599a6facb9a789ae7389779769d41c8ad25f18b7e50b389fa1d1fcb40b193657619
+MISC ChangeLog 2527 SHA256 d415173b441cbe67cdb4ec39554c0059195fa31bc73855687030056d2031a96f SHA512 8fc97abd1e10fed7e1ac63d393b2b071027ed0ed0d29d283d772b98f82ae047c5994d90bb9f021a3810403f4592adea440ef7183a17fd723910412c63c2c5b8a WHIRLPOOL e67ec5f570b127f90b4fcba07888049fcec99d9290030d66a8cadac20729c43b2a54ad9d99c2ca57a6e43ee8619f51822c18403675bb79492428cbd4a087a57b
+MISC ChangeLog-2015 895 SHA256 549d5fb3382742852153f1b2b8434763a5edb459bc0e535e3fed9c8d0e3cafd9 SHA512 8f32d823d93d2ae2b7656d7c08a63322f4d799e1477f4da842077ba44fa4cbe262760f57a28999257dbaea594e518d90a7804d357dd03aabd7aa3e49c1e04ed6 WHIRLPOOL c6957b2d588cd6c4eb3d482313575c5a1d3ae55be21dcd05f3cbbfaaf0c6911f890e01bf152df90638bd368f9edcc15b7ae7e777d7c7446863a506578d60a865
+MISC metadata.xml 290 SHA256 92f3cb99bbbf29d701e0e959848b8ca365909f03a8a8fa76f0ebb845eefce53d SHA512 c56bd2e7b716591ab6c6d36b3531659578018f200f17af1d9098bb89e8a67e75df759ba72814ac269b01bba1b208447a4ac5bc55ef849073c676e8bf09ca0cbd WHIRLPOOL dea8c53f8859586495ffea8b8d217c6c66bbd212394293868d00175116fdbb8021b3a7e5a4da825c88d3e29ed92f26cefaa25028d269e5380c2bbf9ae0392dbd
diff --git a/sys-apps/lkcdutils/files/lkcdutils-6.2.0-build.patch b/sys-apps/lkcdutils/files/lkcdutils-6.2.0-build.patch
new file mode 100644
index 000000000000..e8330074d9bd
--- /dev/null
+++ b/sys-apps/lkcdutils/files/lkcdutils-6.2.0-build.patch
@@ -0,0 +1,24 @@
+--- a/libsial/Makefile
++++ b/libsial/Makefile
+@@ -53,7 +53,7 @@
+ ./mkbaseop > baseops.c
+ $(CC) $(CFLAGS) -c baseops.c
+
+-mkbaseop.c sial_member.o sial_op.o sial_stat.o sial_type.o y.tab.o : sial.tab.h
++mkbaseop.c sial_api.o sial_member.o sial_op.o sial_stat.o sial_type.o y.tab.o : sial.tab.h
+
+ lex.sial.o: lex.sial.c sial.tab.c sial.h
+ $(CC) $(CFLAGS) -c lex.sial.c
+--- a/libklib/kl_savedump.c
++++ b/libklib/kl_savedump.c
+@@ -24,6 +24,10 @@
+ #include <unistd.h>
+ #include <linux/stddef.h>
+
++#ifndef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++#endif
++
+ static int kl_check_type_dev(char *);
+ static int kl_check_type_dir(char *);
+ static int __kl_dump_retrieve_reg(int,int,char*,int,int);
diff --git a/sys-apps/lkcdutils/lkcdutils-4.1.1.ebuild b/sys-apps/lkcdutils/lkcdutils-4.1.1.ebuild
new file mode 100644
index 000000000000..9f4504f158e6
--- /dev/null
+++ b/sys-apps/lkcdutils/lkcdutils-4.1.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P=${P/4.1.1/4.1}
+DESCRIPTION="Linux Kernel Crash Dumps (LKCD) Utilities"
+HOMEPAGE="http://lkcd.sourceforge.net/ http://oss.software.ibm.com/developerworks/opensource/linux390/june2003_recommended.shtml"
+SRC_URI="http://lkcd.sourceforge.net/download/OLD/4.1.1/lkcdutils/lkcdutils-4.1-1.src.rpm
+ mirror://gentoo/lkcdutils-4.1-savedump.tar.gz
+ mirror://gentoo/lkcdutils-4.1-dhv8.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="s390"
+IUSE=""
+
+DEPEND="app-arch/rpm2targz
+ dev-util/byacc"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ ebegin "Unpacking lkcd distribution..."
+ # This is the same as using rpm2targz then extracting 'cept that
+ # it's faster, less work, and less hard disk space. rpmoffset is
+ # provided by the rpm2targz package.
+ i="${DISTDIR}/${PN}-4.1-1.src.rpm"
+ dd ibs=`rpmoffset < ${i}` skip=1 if=$i 2>/dev/null \
+ | gzip -dc | cpio -idmu 2>/dev/null && tar xzf ${PN}-4.1-1.tar.gz
+ eend ${?}
+ assert "Failed to extract lkcd distribution..."
+
+ unpack lkcdutils-4.1-savedump.tar.gz
+ unpack lkcdutils-4.1-dhv8.tar.gz
+ cd "${S}"
+ epatch ../lkcdutils-4.1-savedump.diff
+ epatch ../lkcdutils-4.1-dhv8.diff
+}
+
+src_compile() {
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --datadir=/usr/share \
+ --sysconfdir=/etc \
+ --bfd_version=2.14.90 || die "configure failed"
+
+ make || die "make failed"
+}
+
+src_install() {
+ make install ROOT="${D}" || die "install failed"
+ # not needed on s390
+ rm -rf "${D}"/usr/share/sial \
+ "${D}"/usr/lib/libsial.a \
+ "${D}"/usr/include/sial_api.h \
+ "${D}"/usr/include/lkcd/asm/lc_dis.h \
+ "${D}"/etc \
+ "${D}"/sbin/lkcd* \
+ "${D}"/usr/man/man/lkcd*
+ # broken configure script...
+ mv -f "${D}"/usr/man "${D}"/usr/share/man
+}
diff --git a/sys-apps/lkcdutils/lkcdutils-6.2.0.ebuild b/sys-apps/lkcdutils/lkcdutils-6.2.0.ebuild
new file mode 100644
index 000000000000..15a9ea3e19cd
--- /dev/null
+++ b/sys-apps/lkcdutils/lkcdutils-6.2.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Linux Kernel Crash Dumps (LKCD) Utilities"
+HOMEPAGE="http://lkcd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lkcd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~s390"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_compile() {
+ ./configure \
+ --cflags="${CFLAGS} ${CPPFLAGS}" \
+ --lflags="${LDFLAGS}" \
+ || die
+ emake || die "make failed"
+}
+
+src_install() {
+ emake install ROOT="${D}" || die "install failed"
+ rm -r "${D}"/etc/sysconfig
+}
diff --git a/sys-apps/lkcdutils/metadata.xml b/sys-apps/lkcdutils/metadata.xml
new file mode 100644
index 000000000000..ecf6bcd691f2
--- /dev/null
+++ b/sys-apps/lkcdutils/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 type="project">
+ <email>s390@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lkcd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/lm_sensors/Manifest b/sys-apps/lm_sensors/Manifest
new file mode 100644
index 000000000000..25f3575dbe26
--- /dev/null
+++ b/sys-apps/lm_sensors/Manifest
@@ -0,0 +1,16 @@
+AUX fancontrol.confd 669 SHA256 edffd2c89102a02e576dfa20d9c49a3e10f1f3b747e843fca63a8fe49c0a60ed SHA512 06ec0b44e753bfa6a5ca461345e5857ac4d824cb3d9dd4955bbe884ff91d0184050476fe6da0ea8b0882243a51466af2d82540474581bd471f13c5977a0ec41a WHIRLPOOL 8c65ce5ac142316493a2e9531ba025a1c54740b7074553cb63c46c54d6488b7fe689f018c63d2ff44c8fb56cbffdc89cf6c065b2060624ca4d9298e39fbc2a94
+AUX fancontrol.initd 603 SHA256 c4e63538e437abd1fd624dcff1e61d513254d0607088c0538d08b3b7c639a72f SHA512 3dad0939d679bfb2732bdbd8ff851298ed86e5fd83719eb5181f8cc3e7d84f7986a79a3438a8c3b6a6e3c8be1a3a9839769292d77e352c0167d4b16dd1f0d086 WHIRLPOOL c361ec42b1095414b6cfdd5f97ff894fea3e398f6a535399860b787e3995818839991de26422a390d371c7120fe6eea63ea3152d82c43a25b06d756827466087
+AUX fancontrol.service-r1 146 SHA256 7f3213ce121947cc4b4ac1d99349c69306f98bcf12bf27f420233c414238549d SHA512 eb1e22045a4adbcba398b77061d33b145614edf960c31aeb3c9a987553d6a0d8de332d4887e52ca2c6d6147d6e1a2b5e8bae41dca5f1c9d4fc2dc522c18459f8 WHIRLPOOL 56a57e2c9626495856ab367b10854864308db807135e62725f96ac021a7ba2ed5d7d49ee371b87f86b2a6a9b9c3dcb9ed604a8874d06bad1a261fddc775b362b
+AUX lm_sensors-3.4.0-sensors-detect-gentoo.patch 12441 SHA256 6d2c646815b6e6d2ae216705d158fefae4df1d64d500b2c807c68c6f32dce0b8 SHA512 740c2fefa3c914fbb977e86b5b57cdbbcd06fc2d348ee42b5c678f164f15fb7a171979e5da5a1779c932ba39a535e37d0f7b7506c43966463115e0042dc9dc81 WHIRLPOOL cafcee5f5009db37390d5936a770c965c791d5870b18eaba701719a69aaf195719a0cb9908fb4cab5cc33c057644d60fd946091447d48223367fafedf6eb7ef4
+AUX lm_sensors.confd 102 SHA256 148c840ba5e701f6983bba2ebae6a087e8bf3e2b8276f09bc03ae3eadc011220 SHA512 a31220f4bf337de7b17158e00c64e662527abe11c5cc9f8401216f757dcde1c220527ad73f375c0de051030119daeba4cef6c5155f077447a9391e273cd65f50 WHIRLPOOL 5f78c09735575e3bebd83b13fe01eb9459c649ee0a05bf5c2558ab19700dcd7e16ca4cf6d293b613d31d665455078063f7e0c6ec2195cf01820d6a112d804956
+AUX lm_sensors.initd 334 SHA256 3dadb7445091d5a3ad0cef2b6c10e32b6372820e5558d49195ce68771a9e1272 SHA512 5a3f3eb6ae2a97f0a3841a2544579733f6df4a89c3667e1920203a6b0d18f54eb0aa12b1fd0c0bbdc4f6a1535df8444ebeb9d6212cc8be8dc1cf25e204d009a0 WHIRLPOOL 4e8ede2518c79d5d68d0c7594281251d709a390e8b4157b83df39a057bed048384e9516073ff7716bc854379a9b404ebb6922536904adf6debe04b0ad49d3759
+AUX sensord.confd 695 SHA256 0ce54c9c9055165ed87a348fa6a967a62ee228a0e1a42193bb577cd47d6cb0b0 SHA512 83c71b9aaae273daff62da31ae45ffa682460e4d4a8fbca54dfa83b1db58d4d042bba08eb62c62f4d8f6647d222ef5a11181a3fb7bedffbb4138ef02f6143535 WHIRLPOOL 60c19519af01049204ffae6e2cfc7d614d2bcd3e47145c74e7cc18171e9514914ad03dfcadfc97570c9e9cca836ae02b3420775233129aa3b3f5dd6e559495e1
+AUX sensord.initd 574 SHA256 410e2a312619e7c23cd5c72c38875dc19cd35eec8229db2ec35f240e9418a31c SHA512 69abc9a92bfffae59f17a93e4792fd1f6b64285271693a443e1007adb73f95cb62a8dbf318f407f60fb3e3573d0e7ea11357076f14dbb58a0964f7b0bfe30b4a WHIRLPOOL c83d80c4e765a05afcc6403a99ad6d14d011741b41132853b76d9ead2e377a308d27d82d4b4e802041b50a6e325ebfb1dd1ec437dd27d2e5ca08e018ec65c656
+AUX sensord.service-r1 155 SHA256 531ba0f4acc61721a7e2ff48b149157587b2294838a21a487efbca4cb3a2a0b7 SHA512 83132636209f3e3717edad28ed230f767ee8bf00eabf3036238f64c370d1e42db1c14d1ed965c650da8aa3a6deb3ce7a0794425491ff7f8ce67e2fde934fc4fb WHIRLPOOL f04b1dc67a36014f5c303e9f5e8456d543f9d58cfc827caf292cde69c4700d93d56ea262254e98bfa74380ef39abe61c891e30d47ca8cd6d3b7c0c4e27d79730
+DIST lm_sensors-3.4.0_p20160725.tar.gz 206868 SHA256 c3bb872cabcf3fa4b597bc1a8d6ee277a80b28c811125a45341e0874a97ac102 SHA512 abae5c4ba2ed0b763fda918e2ededb2148a3edd1d33709a34b91a33398a64e8988d14c5d16a5c756bf55beaa383e661c76e1acccc7b5ef858aa772e96878131b WHIRLPOOL 4d7620f74ea46f559b6b293a7cb20f0296277f7c10f54b368fd63bef2d1496b3769f39066cc4f980337d99b3a1dbb51af8e9eed724605f153a08cfa9fd28739b
+DIST lm_sensors-3.4.0_p20170901.tar.gz 208487 SHA256 b142efde3290a36e4080eab2a4003a11eaf43cb2431307e34a738be0887dc45f SHA512 5c4a750efdff2ef086a5ed1b6a8a03278872ca077255eae91d0696af229f37b09216e2f53d1d6e4602596fd8b978e0b9c27327357621486c5d7b1d39ecd16fea WHIRLPOOL 45a7ab8b729c2430fd52e2b3f06ca72a61445efab66e71c554e6e4b9d0793b1396879dd1d1221001fe1dc008596047ac1330676fe75e6f244b209c368189be57
+EBUILD lm_sensors-3.4.0_p20160725.ebuild 6228 SHA256 bc6d21e6e75b772440d17d088133dc819e0e3285cacb941c20bb3555c76ee1fb SHA512 70cea8ee4f232d5121340e681443af417cf7d6f550fe9611985801a69963537283dc4a597df36abcd9862e23b7ba5d03e9a5de804180a587de89ad391795f963 WHIRLPOOL 7d53f0659213cbca95ba461e6d1e3136a70a3f703807c7fea14407f16b5db7c211000f0e49fc9c7eda5274d282ea32cacd603f4f55d419c6c2dad8de3367e0a4
+EBUILD lm_sensors-3.4.0_p20170901.ebuild 6323 SHA256 c738e6a4ea467c2327ca7592209a808fac015f2eaa9b37230395068d9b186568 SHA512 023432db53219a49bad90094b43b342652e2eb30273fff4d4610b8b4399fa5922b4dbf50a774c4100959200ffcaae7aa233f7cd07ea6d6ba31a4d76c55e5abef WHIRLPOOL 14f008a8dc9066f5b76199e22b90ebe7b3a0f0dc2d57be2c7fa44e2c208b851c8459f4ed27b274a16a581ed8aa444af69d05052e05fc5584b24d410bc347c185
+MISC ChangeLog 5819 SHA256 f59ce1d7bc397e0cce54e6b5181856c059caca814b7ea009d0ae4a1ff3ca348e SHA512 55d8b3b757f69b65a94ef80b98a4c952801f78a2e5891b33daab3c885b0f7e649b089d7aa5a46a87030bc3248a5f6c4a54045fca83c6ab54a970d1d5f2805686 WHIRLPOOL f555daf0cffd0b79ed6cf3255e8c3af7be05cec3e78c21c46af292e395e365dba6b1255228963cc9fff1120ba010251fdb18f15f8c7df24c4e12e628dc266928
+MISC ChangeLog-2015 19329 SHA256 30944818d4783de0e3b0b99e295053185dc1771ba6f693d6b0d8e08500dc8143 SHA512 aa0ba56293c84ddc4b824a797e9baeca0e93ffc62fc467c78c7a6e5c61f7729420607a63da6130052962b5ca1acd96f841f063b49ce07398d80fbb56b4b089f8 WHIRLPOOL 42bc86ae0151229b6a77314075dce540c803058253e85e15df2aa00f0adefa7409ec18f90adaa7ae72bbfc5a9643c32700632c4e9392dc01304fe12c5f691f55
+MISC metadata.xml 943 SHA256 115c737d06d4ed0e49419b292b06deaadc7b035e478f44c588374d5f33a8df7e SHA512 c32b85e2771b216861bf16d8c7ccfc8277b34c7ab712edaf487083f8d9e2a8e3707b65d1dd952e92d925fbefa87cf76799aa0b30f11ae8acfd4ffe27f2caf1f8 WHIRLPOOL d926d28ccd4dc78b485c0094bd417a474ffd99c7287f66c2018ffba815610a01c864739425b6caa587ffa01a224473c9b4950c04afc23253c145c02d5c68df9b
diff --git a/sys-apps/lm_sensors/files/fancontrol.confd b/sys-apps/lm_sensors/files/fancontrol.confd
new file mode 100644
index 000000000000..a7169583173e
--- /dev/null
+++ b/sys-apps/lm_sensors/files/fancontrol.confd
@@ -0,0 +1,16 @@
+# /etc/conf.d/fancontrol
+
+# Configuration file
+#FANCONTROL_CONFIGFILE="/etc/fancontrol"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we forces fancontrol into background and wait 1000ms after we
+# have started the service to ensure that the daemon is really up and
+# running.
+#FANCONTROL_SSDARGS="--background --wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+#FANCONTROL_TERMTIMEOUT="TERM/60/KILL/5"
diff --git a/sys-apps/lm_sensors/files/fancontrol.initd b/sys-apps/lm_sensors/files/fancontrol.initd
new file mode 100644
index 000000000000..0734668a4c0a
--- /dev/null
+++ b/sys-apps/lm_sensors/files/fancontrol.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+FANCONTROL_CONFIGFILE=${FANCONTROL_CONFIGFILE:-"/etc/fancontrol"}
+FANCONTROL_SSDARGS=${FANCONTROL_SSDARGS:-"--background --wait 1000"}
+FANCONTROL_TERMTIMEOUT=${FANCONTROL_TERMTIMEOUT:-"TERM/60/KILL/5"}
+
+
+command="/usr/sbin/fancontrol"
+command_args="${FANCONTROL_CONFIGFILE}"
+start_stop_daemon_args="${FANCONTROL_SSDARGS}"
+pidfile="/run/fancontrol.pid"
+retry="${FANCONTROL_TERMTIMEOUT}"
+
+required_files="${FANCONTROL_CONFIGFILE}"
+
+depend() {
+ need localmount
+ use lm_sensors
+}
diff --git a/sys-apps/lm_sensors/files/fancontrol.service-r1 b/sys-apps/lm_sensors/files/fancontrol.service-r1
new file mode 100644
index 000000000000..7d4342c30171
--- /dev/null
+++ b/sys-apps/lm_sensors/files/fancontrol.service-r1
@@ -0,0 +1,9 @@
+[Unit]
+Description=Fan control daemon
+
+[Service]
+PIDFile=/run/fancontrol.pid
+ExecStart=/usr/sbin/fancontrol
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3.4.0-sensors-detect-gentoo.patch b/sys-apps/lm_sensors/files/lm_sensors-3.4.0-sensors-detect-gentoo.patch
new file mode 100644
index 000000000000..dd77d66c0855
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors-3.4.0-sensors-detect-gentoo.patch
@@ -0,0 +1,342 @@
+From d8603c540cfccda5e011060083108de8f1b820ab Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Tue, 9 Aug 2016 01:19:16 +0200
+Subject: [PATCH 1/3] sensors-detect: Add sd_boot detection
+
+We need to know in write_config function wether the system is using systemd
+or not.
+---
+ prog/detect/sensors-detect | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
+index 057cd96..e29ab4c 100755
+--- a/prog/detect/sensors-detect
++++ b/prog/detect/sensors-detect
+@@ -2746,7 +2746,7 @@ sub isa_read_i5d6
+ # AUTODETECTION #
+ #################
+
+-use vars qw($dev_i2c $sysfs_root $systemd_systemctl $systemd_system_dir);
++use vars qw($dev_i2c $sysfs_root $systemd_is_booted $systemd_systemctl $systemd_system_dir);
+
+ sub initialize_conf
+ {
+@@ -2820,6 +2820,10 @@ sub initialize_conf
+ } elsif (-d "/lib/systemd/system") {
+ $systemd_system_dir = "/lib/systemd/system";
+ }
++
++ # Check whether the system was booted using systemd.
++ # See: man sd_booted
++ $systemd_is_booted = -d '/run/systemd/system';
+ }
+
+ # [0] -> VERSION
+--
+2.9.3
+
+
+From 14376e837c4a666fe2088bc7b7fbb90a4520f387 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Tue, 9 Aug 2016 01:25:52 +0200
+Subject: [PATCH 2/3] sensors-detect: write_config function adjusted for Gentoo
+ environment
+
+Bug: https://bugs.gentoo.org/480018
+---
+ prog/detect/sensors-detect | 133 +++++++++++++++++++++------------------------
+ 1 file changed, 62 insertions(+), 71 deletions(-)
+
+diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
+index e29ab4c..bb5ae0f 100755
+--- a/prog/detect/sensors-detect
++++ b/prog/detect/sensors-detect
+@@ -7079,6 +7079,9 @@ sub write_config
+ {
+ my ($configfile, $bus_modules, $hwmon_modules) = @_;
+
++ my $have_conffiles_created = 0;
++
++ # /etc/modprobe.d handling
+ if (defined $configfile) {
+ my $have_modprobe_d = -d '/etc/modprobe.d';
+ printf "Do you want to \%s /etc/modprobe.d/lm_sensors.conf? (\%s): ",
+@@ -7087,96 +7090,84 @@ sub write_config
+ $_ = read_answer();
+ if (($have_modprobe_d and not m/^\s*n/i) or m/^\s*y/i) {
+ unless ($have_modprobe_d) {
+- mkdir('/etc/modprobe.d', 0777)
++ mkdir('/etc/modprobe.d', 0755)
+ or die "Sorry, can't create /etc/modprobe.d ($!)";
+ }
+- open(local *MODPROBE_D, ">/etc/modprobe.d/lm_sensors.conf")
++ open(local *MODPROBE_D, ">", $have_modprobe_d . '/lm_sensors.conf')
+ or die "Sorry, can't create /etc/modprobe.d/lm_sensors.conf ($!)";
+ print MODPROBE_D "# Generated by sensors-detect on " . scalar localtime() . "\n";
+ print MODPROBE_D $configfile;
+ close(MODPROBE_D);
++ $have_conffiles_created++;
+ } else {
+ print "To make the sensors modules behave correctly, add these lines to\n".
+- "/etc/modprobe.conf:\n\n";
++ "/etc/modprobe.d/lm_sensors.conf:\n\n";
+ print "#----cut here----\n".
+ $configfile.
+ "#----cut here----\n\n";
+ }
+ }
+
+- my $have_sysconfig = -d '/etc/sysconfig';
+- printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ",
+- (-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'),
+- ($have_sysconfig ? 'YES/no' : 'yes/NO');
+- $_ = read_answer();
+- if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
+- unless ($have_sysconfig) {
+- mkdir('/etc/sysconfig', 0777)
+- or die "Sorry, can't create /etc/sysconfig ($!)";
+- }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
+- print SYSCONFIG "# Generated by sensors-detect on " . scalar localtime() . "\n";
+- print SYSCONFIG <<'EOT';
+-# This file is sourced by /etc/init.d/lm_sensors and defines the modules to
+-# be loaded/unloaded.
+-#
+-# The format of this file is a shell script that simply defines variables:
+-# HWMON_MODULES for hardware monitoring driver modules, and optionally
+-# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
+-
+-EOT
+- print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
+- if @{$bus_modules};
+- print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
+- close(SYSCONFIG);
+-
+- if ($systemd_systemctl && $systemd_system_dir) {
+- if (-f "$systemd_system_dir/lm_sensors.service") {
+- system($systemd_systemctl, "enable", "lm_sensors.service");
+- system($systemd_systemctl, "start", "lm_sensors.service");
+- # All done, don't check for /etc/init.d/lm_sensors
+- } else {
+- print "Copy prog/init/lm_sensors.service to $systemd_system_dir\n".
+- "and run 'systemctl enable lm_sensors.service'\n".
+- "for initialization at boot time.\n";
+- }
+- return;
++ # /etc/modules-load.d handling
++ my $modulesload_filedir = '/etc/modules-load.d';
++ my $modulesload_file = $modulesload_filedir . '/lm_sensors.conf';
++ my $modulesload_cfg = "# Generated by sensors-detect on " . scalar localtime() . "\n"
++ . join("\n", (@{$bus_modules}, @{$hwmon_modules})) . "\n";
++
++ my $have_modulesload_file = -f $modulesload_file;
++ printf "Do you want to \%s '$modulesload_file'? (\%s): ",
++ ($have_modulesload_file ? 'overwrite' : 'generate'),
++ ($have_modulesload_file ? 'yes/NO' : 'YES/no');
++
++ my $input = read_answer();
++ chomp($input);
++ if ($input eq '' && $have_modulesload_file) {
++ $input = 'no';
++ }
++ elsif ($input eq '' && !$have_modulesload_file) {
++ $input = 'yes';
++ }
++
++ if ($input =~ m/^\s*y/i) {
++ unless (-d $modulesload_filedir) {
++ mkdir($modulesload_filedir, 0755)
++ or die "Sorry, can't create '$modulesload_filedir' ($!)";
+ }
+
+- print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
+- "for initialization at boot time.\n"
+- unless -f "/etc/init.d/lm_sensors";
++ open(my $fh, '>', $modulesload_file)
++ or die "Sorry, can't open '$modulesload_file' for writing! ($!)";
+
+- if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+- system("/sbin/insserv", "/etc/init.d/lm_sensors");
+- } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
+- system("/sbin/chkconfig", "lm_sensors", "on");
+- if (-x "/sbin/service") {
+- system("/sbin/service", "lm_sensors", "start");
+- }
++ print $fh $modulesload_cfg;
++ close($fh);
++
++ $have_conffiles_created++;
++ }
++ else {
++ print "\nPlease create '$modulesload_file' with the following content\n"
++ . "to allow modules-load service to autoload modules on boot:\n\n";
++ print "#----cut here----\n"
++ . "# Generated by sensors-detect on " . scalar localtime() . "\n"
++ . join("\n", (@{$bus_modules}, @{$hwmon_modules})) . "\n"
++ . "#----cut here----\n\n";
++ }
++
++ if ($have_conffiles_created) {
++ printf "\nNote: You only have created the required configuration to autoload the\n"
++ . "required modules to use your sensors on boot. If you want to start using\n"
++ . "your sensors right now you have to either load them now once manually, to\n"
++ . "reboot this system or to execute the following command(s):\n\n";
++
++ if ($systemd_is_booted) {
++ print " # systemctl restart systemd-modules-load\n\n"
+ } else {
+- print "You should now start the lm_sensors service to load the required\n".
+- "kernel modules.\n\n";
+- }
+- } else {
+- print "To load everything that is needed, add this to one of the system\n".
+- "initialization scripts (e.g. /etc/rc.d/rc.local):\n\n";
+- print "#----cut here----\n";
+- if (@{$bus_modules}) {
+- print "# Adapter drivers\n";
+- print "modprobe $_\n" foreach (@{$bus_modules});
++ print " # /etc/init.d/modules-load restart\n\n"
+ }
+- print "# Chip drivers\n";
+- print "modprobe $_\n" foreach (@{$hwmon_modules});
+- print((-e '/usr/bin/sensors' ?
+- "/usr/bin/sensors -s\n" :
+- "/usr/local/bin/sensors -s\n").
+- "#----cut here----\n\n");
+-
+- print "You really should try these commands right now to make sure everything\n".
+- "is working properly. Monitoring programs won't work until the needed\n".
+- "modules are loaded.\n\n";
++ }
++ else {
++ print "\nNote: Please make sure the following modules are loaded when you\n"
++ . "want to make use of your sensors:\n\n";
++
++ print " " . join(" ", (@{$bus_modules}, @{$hwmon_modules})) . "\n\n";
+ }
+ }
+
+--
+2.9.3
+
+
+From 59680d1fd41402efb547ca75ad8397089df2e059 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Mon, 29 Aug 2016 12:47:50 +0200
+Subject: [PATCH 3/3] sensors-detect: Add Gentoo config file protection
+
+Per default we don't modify live config file. Instead we create
+"._cfg0000_<filename>" files known from emerge when using CONFIG PROTECT.
+
+See CONFIGURATION FILES section of emerge(1) man page for details.
+
+Can be disabled using the "--no-gentoo-config-protect" parameter.
+---
+ prog/detect/sensors-detect | 51 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 48 insertions(+), 3 deletions(-)
+
+diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
+index bb5ae0f..2cc8f88 100755
+--- a/prog/detect/sensors-detect
++++ b/prog/detect/sensors-detect
+@@ -7093,7 +7093,7 @@ sub write_config
+ mkdir('/etc/modprobe.d', 0755)
+ or die "Sorry, can't create /etc/modprobe.d ($!)";
+ }
+- open(local *MODPROBE_D, ">", $have_modprobe_d . '/lm_sensors.conf')
++ open(local *MODPROBE_D, ">", gentoo_get_protected_file($have_modprobe_d . '/lm_sensors.conf'))
+ or die "Sorry, can't create /etc/modprobe.d/lm_sensors.conf ($!)";
+ print MODPROBE_D "# Generated by sensors-detect on " . scalar localtime() . "\n";
+ print MODPROBE_D $configfile;
+@@ -7134,7 +7134,7 @@ sub write_config
+ or die "Sorry, can't create '$modulesload_filedir' ($!)";
+ }
+
+- open(my $fh, '>', $modulesload_file)
++ open(my $fh, '>', gentoo_get_protected_file($modulesload_file))
+ or die "Sorry, can't open '$modulesload_file' for writing! ($!)";
+
+ print $fh $modulesload_cfg;
+@@ -7152,10 +7152,17 @@ sub write_config
+ }
+
+ if ($have_conffiles_created) {
++ if (!$opt{no_gentoo_config_protect}) {
++ print "\n * IMPORTANT: At least $have_conffiles_created config file(s) in '/etc' need updating.\n"
++ . " * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS\n"
++ . " * sections of the emerge man page to learn how to update config files.\n";
++ }
++
+ printf "\nNote: You only have created the required configuration to autoload the\n"
+ . "required modules to use your sensors on boot. If you want to start using\n"
+ . "your sensors right now you have to either load them now once manually, to\n"
+- . "reboot this system or to execute the following command(s):\n\n";
++ . "reboot this system or to execute the following command(s)\%s:\n\n",
++ ($opt{no_gentoo_config_protect} ? "" : " _AFTER_\nyou have updated your config files");
+
+ if ($systemd_is_booted) {
+ print " # systemctl restart systemd-modules-load\n\n"
+@@ -7171,6 +7178,32 @@ sub write_config
+ }
+ }
+
++sub gentoo_get_protected_file
++{
++ my ($file) = @_;
++
++ if ($opt{no_gentoo_config_protect}) {
++ return $file;
++ }
++
++ my $basename = basename($file);
++ my $dirname = dirname($file);
++
++ my $protected_file;
++ for (my $prot_num = 0; $prot_num <= 9999; $prot_num++) {
++ $protected_file = sprintf('%s/._cfg%s_%s',
++ $dirname,
++ sprintf("%0*d", 4, $prot_num),
++ $basename);
++
++ if (! -f $protected_file) {
++ return $protected_file;
++ }
++ }
++
++ die "Running out of files -- cannot create protected file '$file'"
++}
++
+ sub main
+ {
+ my ($input, $superio_features);
+@@ -7181,6 +7214,8 @@ sub main
+ $opt{stat} = 1;
+ } elsif ($ARGV[0] eq "--auto") {
+ $opt{auto} = 1;
++ } elsif ($ARGV[0] eq "--no-gentoo-config-protect") {
++ $opt{no_gentoo_config_protect} = 1;
+ } else {
+ print STDERR "Error: unknown option $ARGV[0]\n";
+ exit 1;
+@@ -7234,6 +7269,16 @@ sub main
+ "unless you know what you're doing.\n\n";
+ }
+
++ if (!$opt{no_gentoo_config_protect}) {
++ print "Gentoo config file protection is active. Every file this program will\n",
++ "modify must be merged before the change will become active using\n",
++ "default Gentoo tools such as dispatch-conf, cfg-update, and etc-update.\n\n";
++ }
++ else {
++ print "Gentoo config file protection is _disabled_. This program will modify\n",
++ "your active configuration without backups.\n\n";
++ }
++
+ print "Some south bridges, CPUs or memory controllers contain embedded sensors.\n".
+ "Do you want to scan for them? This is totally safe. (YES/no): ";
+ $input = read_answer();
+--
+2.9.3
+
diff --git a/sys-apps/lm_sensors/files/lm_sensors.confd b/sys-apps/lm_sensors/files/lm_sensors.confd
new file mode 100644
index 000000000000..bae2ea0bbbec
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/lm_sensors
+
+# NOTE:
+# For module loading please use /etc/modules-load.d/lm_sensors.conf
diff --git a/sys-apps/lm_sensors/files/lm_sensors.initd b/sys-apps/lm_sensors/files/lm_sensors.initd
new file mode 100644
index 000000000000..4efc6c964040
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/sensors"
+
+depend() {
+ need localmount
+ after modules-load
+}
+
+start() {
+ ebegin "Initializing sensors"
+ ${command} --set >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ # Nothing to stop
+ return 0;
+}
diff --git a/sys-apps/lm_sensors/files/sensord.confd b/sys-apps/lm_sensors/files/sensord.confd
new file mode 100644
index 000000000000..a6f2f265c11f
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord.confd
@@ -0,0 +1,19 @@
+# /etc/conf.d/sensord
+
+# PID file
+#SENSORD_PIDFILE="/run/sensord.pid"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#SENSORD_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+#SENSORD_TERMTIMEOUT="TERM/60/KILL/5"
+
+# Extra options to pass to the sensord daemon,
+# see sensord(8) for more information
+#SENSORD_OPTS=""
diff --git a/sys-apps/lm_sensors/files/sensord.initd b/sys-apps/lm_sensors/files/sensord.initd
new file mode 100644
index 000000000000..fa958dbf4389
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SENSORD_PIDFILE=${SENSORD_PIDFILE:-"/run/sensord.pid"}
+SENSORD_SSDARGS=${SENSORD_SSDARGS:-"--wait 1000"}
+SENSORD_TERMTIMEOUT=${SENSORD_TERMTIMEOUT:-"TERM/60/KILL/5"}
+SENSORD_OPTS=${SENSORD_OPTS:-""}
+
+command="/usr/sbin/sensord"
+command_args="${SENSORD_OPTS} --pid-file ${SENSORD_PIDFILE}"
+start_stop_daemon_args="${SENSORD_SSDARGS}"
+pidfile="${SENSORD_PIDFILE}"
+retry="${SENSORD_TERMTIMEOUT}"
+
+depend() {
+ need localmount
+ use logger lm_sensors
+}
diff --git a/sys-apps/lm_sensors/files/sensord.service-r1 b/sys-apps/lm_sensors/files/sensord.service-r1
new file mode 100644
index 000000000000..b7a1e1bc3bd0
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord.service-r1
@@ -0,0 +1,9 @@
+[Unit]
+Description=Sensor information logging daemon
+
+[Service]
+PIDFile=/run/sensord.pid
+ExecStart=/usr/sbin/sensord
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0_p20160725.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20160725.ebuild
new file mode 100644
index 000000000000..f543e8be3a74
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20160725.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-info systemd toolchain-funcs multilib-minimal
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="https://hwmon.wiki.kernel.org/ https://github.com/groeck/lm-sensors"
+
+COMMIT="45ffa15cf02e63f70ff3b85c23e22dfbab7e8f9c"
+MY_PN="${PN/_/-}"
+
+#SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+SRC_URI="https://github.com/groeck/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1"
+
+# SUBSLOT based on SONAME of libsensors.so
+SLOT="0/4.4.0"
+
+KEYWORDS="alpha amd64 arm ~arm64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="sensord static-libs"
+
+COMMON_DEPS="
+ sensord? (
+ net-analyzer/rrdtool
+ virtual/logger
+ )"
+
+RDEPEND="${COMMON_DEPS}
+ dev-lang/perl
+ !<sys-apps/openrc-0.21.7"
+
+DEPEND="${COMMON_DEPS}
+ sys-devel/bison
+ sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.0-sensors-detect-gentoo.patch )
+
+DOCS=( CHANGES CONTRIBUTORS INSTALL README )
+DOCS+=( doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid} )
+
+S="${WORKDIR}/${MY_PN}-${COMMIT}"
+
+src_prepare() {
+ default
+
+ if [[ -n "${COMMIT}" ]]; then
+ local _version="${PV%_*}+git_${COMMIT}"
+
+ sed -i \
+ -e "s:LM_VERSION.*:LM_VERSION \"${_version}\":" \
+ version.h || \
+ die "Failed to update version.h"
+
+ sed -i \
+ -e "s/^\$revision = '.*/\$revision = '${_version}';/" \
+ -e "/^\$revision =~ s.*/d" \
+ prog/detect/sensors-detect || \
+ die "Failed to set revision in prog/detect/sensors-detect"
+
+ sed -i \
+ -e "s/^echo \"# pwmconfig revision.*/echo \"# pwmconfig revision ${_version}\"/" \
+ -e "/^REVISION=.*/d" \
+ -e "/^REVDATE=.*/d" \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/pwmconfig || \
+ die "Failed to adjust prog/pwm/pwmconfig"
+ else
+ sed -i \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/pwmconfig || \
+ die "Failed to adjust PIDFILE in prog/pwm/pwmconfig"
+ fi
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || \
+ die "Failed to sed in LDFLAGS"
+
+ sed -i \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/fancontrol || \
+ die "Failed to adjust PIDFILE of prog/pwm/fancontrol"
+
+ # Don't use EnvironmentFile in systemd unit
+ sed -i \
+ -e '/^EnvironmentFile=/d' \
+ -e '/^Exec.*modprobe.*/d' \
+ prog/init/lm_sensors.service || \
+ die "Failed to remove EnvironmentFile from systemd unit file"
+
+ if ! use static-libs; then
+ sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || \
+ die "Failed to disable static building"
+ fi
+
+ # Don't show outdated user instructions
+ sed -i -e '/^ @echo "\*\*\* /d' Makefile || \
+ die "Failed to remove outdated user instructions"
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ default
+
+ if multilib_is_native_abi && use sensord; then
+ # sensord requires net-analyzer/rrdtool which doesn't have real multilib
+ # support. To prevent errors like
+ #
+ # skipping incompatible /usr/lib/librrd.so when searching for -lrrd
+ # cannot find -lrrd
+ #
+ # we only build sensord when we are building for profile's native ABI
+ # (it doesn't affect libsensors.so).
+ sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || \
+ die "Failed to enable building of sensord"
+ fi
+}
+
+multilib_src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)"
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D%/}" \
+ PREFIX="/usr" \
+ MANDIR="/usr/share/man" \
+ ETCDIR="/etc" \
+ LIBDIR="/usr/$(get_libdir)" \
+ install
+}
+
+multilib_src_install_all() {
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit prog/init/lm_sensors.service
+
+ newinitd "${FILESDIR}"/fancontrol.initd fancontrol
+ newconfd "${FILESDIR}"/fancontrol.confd fancontrol
+ systemd_newunit "${FILESDIR}"/fancontrol.service-r1 fancontrol.service
+
+ if use sensord; then
+ newconfd "${FILESDIR}"/sensord.confd sensord
+ newinitd "${FILESDIR}"/sensord.initd sensord
+ systemd_newunit "${FILESDIR}"/sensord.service-r1 sensord.service
+ fi
+
+ einstalldocs
+
+ docinto developers
+ dodoc doc/developers/applications
+}
+
+pkg_postinst() {
+ local _new_loader='3.4.0_p20160725'
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least ${_new_loader} ${v}; then
+ # This is an upgrade which require migration
+
+ elog ""
+ elog "Since version 3.4.0_p20160725 ${PN} no longer loads modules on its own"
+ elog "instead it is using \"modules-load\" services provided by OpenRC or systemd."
+ elog ""
+ elog "To migrate your configuration you have 2 options:"
+ elog ""
+ elog " a) Re-create a new configuration using \"/usr/sbin/sensors-detect\""
+ elog ""
+ elog " b) Copy existing \"modules_<n>\", \"HWMON_MODULES\" or \"BUS_MODULES\""
+ elog " variables from \"/etc/conf.d/lm_modules\" to"
+ elog " \"/etc/modules-load.d/lm_sensors.conf\" and adjust format."
+ elog ""
+ elog " For details see https://wiki.gentoo.org/wiki/Systemd#Automatic_module_loading"
+ elog ""
+ elog " Important: Don't forget to migrate your module's argument"
+ elog " (modules_<name>_args variable) if your are not already"
+ elog " using \"/etc/modprobe.d\" (which is recommended)."
+
+ # Show this elog only once
+ break
+ fi
+ done
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # New installation
+
+ elog ""
+ elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+ elog "\"/etc/modules-load.d/lm_sensors.conf\"."
+ elog ""
+ elog "You might want to add ${PN} to your default runlevel to make"
+ elog "sure the sensors get initialized on the next startup."
+ elog ""
+ elog "Be warned, the probing of hardware in your system performed by"
+ elog "sensors-detect could freeze your system. Also make sure you read"
+ elog "the documentation before running ${PN} on IBM ThinkPads."
+ fi
+}
diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
new file mode 100644
index 000000000000..e8e4a92c8a22
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-info systemd toolchain-funcs multilib-minimal
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="https://hwmon.wiki.kernel.org/ https://github.com/groeck/lm-sensors"
+
+COMMIT="83cafd29f28d463573750d897014ec7143217ae5"
+MY_PN="${PN/_/-}"
+
+#SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+SRC_URI="https://github.com/groeck/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1"
+
+# SUBSLOT based on SONAME of libsensors.so
+SLOT="0/4.4.0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="contrib sensord static-libs"
+
+COMMON_DEPS="
+ sensord? (
+ net-analyzer/rrdtool
+ virtual/logger
+ )"
+
+RDEPEND="${COMMON_DEPS}
+ dev-lang/perl
+ !<sys-apps/openrc-0.21.7"
+
+DEPEND="${COMMON_DEPS}
+ sys-devel/bison
+ sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.0-sensors-detect-gentoo.patch )
+
+DOCS=( CHANGES CONTRIBUTORS INSTALL README )
+DOCS+=( doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid} )
+
+S="${WORKDIR}/${MY_PN}-${COMMIT}"
+
+src_prepare() {
+ default
+
+ if [[ -n "${COMMIT}" ]]; then
+ local _version="${PV%_*}+git_${COMMIT}"
+
+ sed -i \
+ -e "s:LM_VERSION.*:LM_VERSION \"${_version}\":" \
+ version.h || \
+ die "Failed to update version.h"
+
+ sed -i \
+ -e "s/^\$revision = '.*/\$revision = '${_version}';/" \
+ -e "/^\$revision =~ s.*/d" \
+ prog/detect/sensors-detect || \
+ die "Failed to set revision in prog/detect/sensors-detect"
+
+ sed -i \
+ -e "s/^echo \"# pwmconfig revision.*/echo \"# pwmconfig revision ${_version}\"/" \
+ -e "/^REVISION=.*/d" \
+ -e "/^REVDATE=.*/d" \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/pwmconfig || \
+ die "Failed to adjust prog/pwm/pwmconfig"
+ else
+ sed -i \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/pwmconfig || \
+ die "Failed to adjust PIDFILE in prog/pwm/pwmconfig"
+ fi
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || \
+ die "Failed to sed in LDFLAGS"
+
+ sed -i \
+ -e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+ prog/pwm/fancontrol || \
+ die "Failed to adjust PIDFILE of prog/pwm/fancontrol"
+
+ # Don't use EnvironmentFile in systemd unit
+ sed -i \
+ -e '/^EnvironmentFile=/d' \
+ -e '/^Exec.*modprobe.*/d' \
+ prog/init/lm_sensors.service || \
+ die "Failed to remove EnvironmentFile from systemd unit file"
+
+ if ! use static-libs; then
+ sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || \
+ die "Failed to disable static building"
+ fi
+
+ # Don't show outdated user instructions
+ sed -i -e '/^ @echo "\*\*\* /d' Makefile || \
+ die "Failed to remove outdated user instructions"
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ default
+
+ if multilib_is_native_abi && use sensord; then
+ # sensord requires net-analyzer/rrdtool which doesn't have real multilib
+ # support. To prevent errors like
+ #
+ # skipping incompatible /usr/lib/librrd.so when searching for -lrrd
+ # cannot find -lrrd
+ #
+ # we only build sensord when we are building for profile's native ABI
+ # (it doesn't affect libsensors.so).
+ sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || \
+ die "Failed to enable building of sensord"
+ fi
+}
+
+multilib_src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)"
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D%/}" \
+ PREFIX="/usr" \
+ MANDIR="/usr/share/man" \
+ ETCDIR="/etc" \
+ LIBDIR="/usr/$(get_libdir)" \
+ install
+}
+
+multilib_src_install_all() {
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit prog/init/lm_sensors.service
+
+ newinitd "${FILESDIR}"/fancontrol.initd fancontrol
+ newconfd "${FILESDIR}"/fancontrol.confd fancontrol
+ systemd_newunit "${FILESDIR}"/fancontrol.service-r1 fancontrol.service
+
+ if use sensord; then
+ newconfd "${FILESDIR}"/sensord.confd sensord
+ newinitd "${FILESDIR}"/sensord.initd sensord
+ systemd_newunit "${FILESDIR}"/sensord.service-r1 sensord.service
+ fi
+
+ einstalldocs
+
+ docinto developers
+ dodoc doc/developers/applications
+
+ if use contrib; then
+ insinto /usr/share/${PN}
+ doins -r "${S}"/configs
+ fi
+}
+
+pkg_postinst() {
+ local _new_loader='3.4.0_p20160725'
+ local _v
+ for _v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least ${_new_loader} ${v}; then
+ # This is an upgrade which require migration
+
+ elog ""
+ elog "Since version 3.4.0_p20160725 ${PN} no longer loads modules on its own"
+ elog "instead it is using \"modules-load\" services provided by OpenRC or systemd."
+ elog ""
+ elog "To migrate your configuration you have 2 options:"
+ elog ""
+ elog " a) Re-create a new configuration using \"/usr/sbin/sensors-detect\""
+ elog ""
+ elog " b) Copy existing \"modules_<n>\", \"HWMON_MODULES\" or \"BUS_MODULES\""
+ elog " variables from \"/etc/conf.d/lm_modules\" to"
+ elog " \"/etc/modules-load.d/lm_sensors.conf\" and adjust format."
+ elog ""
+ elog " For details see https://wiki.gentoo.org/wiki/Systemd#Automatic_module_loading"
+ elog ""
+ elog " Important: Don't forget to migrate your module's argument"
+ elog " (modules_<name>_args variable) if your are not already"
+ elog " using \"/etc/modprobe.d\" (which is recommended)."
+
+ # Show this elog only once
+ break
+ fi
+ done
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # New installation
+
+ elog ""
+ elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+ elog "\"/etc/modules-load.d/lm_sensors.conf\"."
+ elog ""
+ elog "You might want to add ${PN} to your default runlevel to make"
+ elog "sure the sensors get initialized on the next startup."
+ elog ""
+ elog "Be warned, the probing of hardware in your system performed by"
+ elog "sensors-detect could freeze your system. Also make sure you read"
+ elog "the documentation before running ${PN} on IBM ThinkPads."
+ fi
+}
diff --git a/sys-apps/lm_sensors/metadata.xml b/sys-apps/lm_sensors/metadata.xml
new file mode 100644
index 000000000000..897d37da3562
--- /dev/null
+++ b/sys-apps/lm_sensors/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>whissi@gentoo.org</email>
+ <name>Thomas Deutschmann</name>
+ </maintainer>
+ <slots>
+ <subslots>Reflect ABI of libsensors.so.</subslots>
+ </slots>
+ <use>
+ <flag name="contrib">
+ Installs user contributed configuration files so you don't need
+ to find settings on your own for your system if somebody else
+ has already created such a configuration for sensors/mainboards
+ you are using.
+ </flag>
+ <flag name="sensord">
+ Enable sensord - a daemon that can be used to
+ periodically log sensor readings from hardware health-monitoring
+ chips
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">groeck/lm-sensors</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/lmctfy/Manifest b/sys-apps/lmctfy/Manifest
new file mode 100644
index 000000000000..951d36ff7fb2
--- /dev/null
+++ b/sys-apps/lmctfy/Manifest
@@ -0,0 +1,12 @@
+DIST lmctfy-0.2.0.tar.gz 2291473 SHA256 b99310179ca36397074ca4719d8611a5cd567db967641214d365cefa95264f41 SHA512 533990025a9a88e2e2a467e571a80a5b057a0ef3523bfc71c155ad81e6a89463d1e1e094323d5dc875f1b86f4d2d2749819d10b8d6c781e06a93bd37747f12be WHIRLPOOL 5d3a71175dc02bc297ab8d7dfae599f70ea5185b815b6de96f21d466372f6c3c13306417a544127fd0b640f87ab5e460d8882e8c1623fa88d3f9d1a890cec836
+DIST lmctfy-0.3.0.tar.gz 2305226 SHA256 7b334456546b590d9298a3204b38ff91acc51409cc1fb2de0e92737faf017384 SHA512 9083af2d2b9ea34e6dbb911a24cf7b8a7fe5aa3a0f464d20115db86b5abac530d24122079f97ea2ef98bf4fb20a3980e598d89f38b570ba796665b0af08339d5 WHIRLPOOL 5371392de1eda88cd9b7f56f0bf032f3f3023201be43d15f4340092a756d1d6039537693ad3326666905ca91336dee251326e0fe5ab9bc4074783f0cd2e3fbce
+DIST lmctfy-0.3.1.tar.gz 2312481 SHA256 a04a52617501d8f486b34e64b34225dc8ef3c18c47ef92c870cd67879e6587b5 SHA512 ab9f2a065a49fae00b540c0592d9356022ba14e0f9dc681731e0757c259f3632a9b34b5fc629eaf2d0943d59e7747af06cfe59a64f447192e8c196a9d41b9522 WHIRLPOOL 40a3198aa7e03f46350ddec8fe7f20f1c8ced8929a10f23b7306967230df18977bb05c725f9817e1fe10e153ab61ac5c58b1ee13516fdc505d7f85ec562e5e53
+DIST lmctfy-0.5.0.tar.gz 2447650 SHA256 1afd0ea7cafe33eaccb6adc47223344a4e6b1d798e27b12a9ab0769918004d9c SHA512 638472b3e8cc98e7ff7ecc48eb0f58fb6a74600db22b7a1962ac3fe137d3549233f3f3b0c97f5783dff6f1851f9c3f9b0607fedea91cb23c1124ed8e2b54aea1 WHIRLPOOL 6f40f84679d3e17310b4678b444abd98ddcffd27a05a715d4590de37d40688292e5f5df5ad3ea8f2a310a1dd5d88ceb0627b88190d07e1aea48c0bae24820843
+EBUILD lmctfy-0.2.0.ebuild 782 SHA256 650c2282928a7d9b64bc628649c4da43c1d713dcd0c5697f61d5e2eafe6bc20e SHA512 3405792698ff33024a602c9bbf2e4294b3e70fc72aba65489e3a59cf596be8984ff7f6827a33f40e07293f9a51d83e927044c2f0637c6f774c86863cec7dbbd4 WHIRLPOOL c4d691f6143d1c1076aff5971a71e8fea5dff84a3e9bf5a0d3ef642a5196af8acc60a1c326b717ab5a918e449d6c9de97b0b77bc1913d99ea6836ff4519548ca
+EBUILD lmctfy-0.3.0.ebuild 782 SHA256 4b2bd7f01d061a659200c1304b378eff39e48dd8ada8f8229a43a34ec8b0bc07 SHA512 ccf8b9730a8ce292c4e3d6277a53b109d5e9a3f344c12834f8d4c3278f3b7091cbb534b66a53da0c5f0b37ad4330fb02eefcc817ede312a4d87c00af699f9315 WHIRLPOOL 8684f70bcdaf2aef8632de5c4177e46532146b07110fae5afccf29219496eaf160348356f19eea36a1bc61482113977c6735280dafd0a638668efbafeb7a6955
+EBUILD lmctfy-0.3.1.ebuild 782 SHA256 4b2bd7f01d061a659200c1304b378eff39e48dd8ada8f8229a43a34ec8b0bc07 SHA512 ccf8b9730a8ce292c4e3d6277a53b109d5e9a3f344c12834f8d4c3278f3b7091cbb534b66a53da0c5f0b37ad4330fb02eefcc817ede312a4d87c00af699f9315 WHIRLPOOL 8684f70bcdaf2aef8632de5c4177e46532146b07110fae5afccf29219496eaf160348356f19eea36a1bc61482113977c6735280dafd0a638668efbafeb7a6955
+EBUILD lmctfy-0.5.0-r1.ebuild 733 SHA256 4f704956b3953a24105b4e459ef7efb95dbe278750ecc78879e3c7120b385be5 SHA512 9891b55522b9d07c26466614cb6ae3406533019610de2325c3b2fd1e38bfcc956d351778973456d417715ed847ee1b213690bce4677e7d15b23dc033db46ee11 WHIRLPOOL abb6fb17e250b3160404dd950b1e217a8c1746c393007024ffb1998a0cbd9cbf8e1f8a402f4418f555222889bb829a4cf211130f82decc9dc098af7d0a7e20f1
+EBUILD lmctfy-0.5.0.ebuild 687 SHA256 bf33753806c074e17d1dfa15bd15069b62a0c6d814b02ef172190d49018094a5 SHA512 0d5d0bafc8b51356bd74a2b29877f338b9abe447187dd4c49a26d919b81f9d7ce143513fa8e095e79e8a50c0269f8c159306229ce061c438a5da925ccd035948 WHIRLPOOL 87001782486d406ca7e7127d69f51a44566c5fb9d9e2c3938c1e7c35959b89a8556355f19f4065437e8de2419d245b0508d9e3d1372cd999b751c1283ec7ff3c
+MISC ChangeLog 2381 SHA256 46d40c7a2d95009f04d1d1bab93cc8a2f3c9e5ac39f915398c3ed5c3502e0c41 SHA512 4c5baf6f340ea5fb61307e1fb6b96f5743f3e9b63d913e7fe559b875576b0a2ce53e126d4e13809eba498791ece498c32dd510bddf7fedfb6bcf4df5d9cb8837 WHIRLPOOL b9b3165a6b5c6ce1d65ba977d682824f2d3cc28f03892850ddef4a1b72c4a243f34a34bf5e24e22460be736822ff15c0cc2e02c73fce0e17516625ce9d332679
+MISC ChangeLog-2015 1235 SHA256 783a02118820bd6d78566a7c3a50e54416c38924f83acd1615688875f68a4660 SHA512 6f62fc6aa88f8a0cbd6a295f1852a8263285a6e915171398cbc06e299410ed739ba18fa9680dad93c2ce89db14435499aa60c649ac779eb40ca61a9a3de04add WHIRLPOOL 32b3e6c9d32ae7b2585646d1f3de5912a0abb9997b57a73210bacb4078bc3b24374548536a135c4250bee84fc0f403b79dc6643ff646c03334e8b42efee1e32e
+MISC metadata.xml 335 SHA256 ae0f35b26461df83d76a7a19349ded19d5e5e059bd82177d15e65130bce66e65 SHA512 ae6e68f29f452d34b44b2afb53623f3fe0fdcc76d32d5aa7c5f394cb7f1caad288b320ccf3f1e628a4f42ce8a7f789fd4e8216d07eb539ffec7954632ea68c5c WHIRLPOOL c24790ca1b3be89d7660549db5cd49e3d3d80e891aa842ab458ac0af9e5400660c576477984380aa2d6defbce512b0778c6b766e21d13d16f25b492b47bd2529
diff --git a/sys-apps/lmctfy/lmctfy-0.2.0.ebuild b/sys-apps/lmctfy/lmctfy-0.2.0.ebuild
new file mode 100644
index 000000000000..7dc9a7fa21f8
--- /dev/null
+++ b/sys-apps/lmctfy/lmctfy-0.2.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Linux application container management from Google"
+HOMEPAGE="https://github.com/google/lmctfy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-libs/protobuf
+ dev-cpp/gflags
+ dev-libs/re2
+ "
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ # test deps take too long to compile
+ use test && emake || emake lmctfy liblmctfy.a
+}
+
+src_install() {
+ # silly upstream!
+ mkdir -p "${D}/usr/bin"
+ cp "${S}/bin/lmctfy/cli/lmctfy" "${D}/usr/bin/" || die "Failed to copy cli binary"
+ dolib.a "${S}/bin/liblmctfy.a" || die "Failed to copy library"
+}
diff --git a/sys-apps/lmctfy/lmctfy-0.3.0.ebuild b/sys-apps/lmctfy/lmctfy-0.3.0.ebuild
new file mode 100644
index 000000000000..34bfaef96ae1
--- /dev/null
+++ b/sys-apps/lmctfy/lmctfy-0.3.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Linux application container management from Google"
+HOMEPAGE="https://github.com/google/lmctfy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-libs/protobuf
+ dev-cpp/gflags
+ dev-libs/re2
+ "
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ # test deps take too long to compile
+ use test && emake || emake lmctfy liblmctfy.a
+}
+
+src_install() {
+ # silly upstream!
+ mkdir -p "${D}/usr/bin"
+ cp "${S}/bin/lmctfy/cli/lmctfy" "${D}/usr/bin/" || die "Failed to copy cli binary"
+ dolib.a "${S}/bin/liblmctfy.a" || die "Failed to copy library"
+}
diff --git a/sys-apps/lmctfy/lmctfy-0.3.1.ebuild b/sys-apps/lmctfy/lmctfy-0.3.1.ebuild
new file mode 100644
index 000000000000..34bfaef96ae1
--- /dev/null
+++ b/sys-apps/lmctfy/lmctfy-0.3.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Linux application container management from Google"
+HOMEPAGE="https://github.com/google/lmctfy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-libs/protobuf
+ dev-cpp/gflags
+ dev-libs/re2
+ "
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ # test deps take too long to compile
+ use test && emake || emake lmctfy liblmctfy.a
+}
+
+src_install() {
+ # silly upstream!
+ mkdir -p "${D}/usr/bin"
+ cp "${S}/bin/lmctfy/cli/lmctfy" "${D}/usr/bin/" || die "Failed to copy cli binary"
+ dolib.a "${S}/bin/liblmctfy.a" || die "Failed to copy library"
+}
diff --git a/sys-apps/lmctfy/lmctfy-0.5.0-r1.ebuild b/sys-apps/lmctfy/lmctfy-0.5.0-r1.ebuild
new file mode 100644
index 000000000000..76093fd584cc
--- /dev/null
+++ b/sys-apps/lmctfy/lmctfy-0.5.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Linux application container management from Google"
+HOMEPAGE="https://github.com/google/lmctfy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+COMMON_DEPEND="
+ dev-libs/protobuf
+ >=dev-cpp/gflags-2.1.1
+ dev-libs/re2
+ sys-libs/libapparmor
+ "
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/go:=
+ "
+RDEPEND="${COMMON_DEPEND}"
+
+src_compile() {
+ # test deps take too long to compile
+ use test && emake || emake lmctfy liblmctfy.a
+}
+
+src_install() {
+ dobin bin/lmctfy/cli/lmctfy
+ dolib.a bin/liblmctfy.a
+}
diff --git a/sys-apps/lmctfy/lmctfy-0.5.0.ebuild b/sys-apps/lmctfy/lmctfy-0.5.0.ebuild
new file mode 100644
index 000000000000..525a157e1df6
--- /dev/null
+++ b/sys-apps/lmctfy/lmctfy-0.5.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Linux application container management from Google"
+HOMEPAGE="https://github.com/google/lmctfy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-libs/protobuf
+ >=dev-cpp/gflags-2.1.1
+ dev-libs/re2
+ dev-lang/go
+ sys-libs/libapparmor
+ "
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ # test deps take too long to compile
+ use test && emake || emake lmctfy liblmctfy.a
+}
+
+src_install() {
+ dobin bin/lmctfy/cli/lmctfy
+ dolib.a bin/liblmctfy.a
+}
diff --git a/sys-apps/lmctfy/metadata.xml b/sys-apps/lmctfy/metadata.xml
new file mode 100644
index 000000000000..2b94e5cfaac0
--- /dev/null
+++ b/sys-apps/lmctfy/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 type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">google/lmctfy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/lnxhc/Manifest b/sys-apps/lnxhc/Manifest
new file mode 100644
index 000000000000..67a0abd2f16a
--- /dev/null
+++ b/sys-apps/lnxhc/Manifest
@@ -0,0 +1,7 @@
+AUX lnxhc-1.2-ifconfig-path.patch 654 SHA256 e9c97c791be80ca6bb3c80c0ca1c8f41e9b9c3e10b7044298f79c12363627b5e SHA512 a29bc332e918e44fe3659f520c32df34ca293edc1545534853495a41182f7e28cb049e20e746f4cbf83c30140f4ae450d034e806a4c87e4d642f4ff2cce27cc1 WHIRLPOOL 8f0a601e79ed8f06a392ff4b4ad5d417526067b89342c690cddd91c4a4ac0931078d52c369a33d41d93de9215c95abe1b55a162cbe76cce77c221bfa4c6dfd87
+AUX lnxhc-1.2-usrlocal.patch 1455 SHA256 62bc5ce12b5ef725aafbfde9e0159948b1ef9d6fe083b9bf5c9c4a665fc1f42c SHA512 43be5d638f46caee028802e8675621a7e6ec8499f4490ed1f9df167a8b9b82a3002bac5a28ab3116507eb0eccaad33d865cb64f6cbc4b134717541cd2424087f WHIRLPOOL 1fd199359cfbb1ad8c8cec266950324bd10ff3442f9fc99542fe9e9b1ecf77a53e0ac37f4236dfca62dd3bd3bef10ca09d3ff5a49df88bb8558167e13dd7c5af
+DIST lnxhc-1.2.tar.gz 360869 SHA256 a94a748171b812528567a0f7a3c19f048a57463cb0fddb9e152b38e2ed8a66c0 SHA512 200ab6443c3b8f4dd99928d2f18b31e8e05c1f9c1f976052017a643430ed87fa08a399e9e8430eafb2925126bd2d90fc4f65ce1c220d6100b71c31fc0505aab0 WHIRLPOOL aa0b7f1f86bae2fce4da3db40dc97c525fb1d94b86298142675d64654676be391487c33612fb8018cae5b5bb1cedd610696092f8ef1944e4ce446f50bdcddef4
+EBUILD lnxhc-1.2-r1.ebuild 481 SHA256 fd3fc8487664e488ebe3fb983ac1339872082c43d6eebe60905c4bfdbba13a3f SHA512 e82e4ab73e589b07a471d855589ef686d29b19d5d60cfe3650cc0ac9679da204a8f8782ef3b0484ab09a6c5fea522e8944761973677b12819ce727a2e826eb5f WHIRLPOOL fa89cb86946619860965040f52b526541489147a38793d8466dabb0921d2cc9e8c747b149ed55e72ef7cd94318d6d3da133669922f57ef4fa42f9f0da6a51b50
+MISC ChangeLog 2245 SHA256 102cc7fe59a87f5de40d6b6f866e932dcbae77ed4a382961519b985630e1b0e5 SHA512 3a405f585e10e8eecf3d93756a9435d00e6a7587ea0e8b435c8ae6ac96f91fb991993c52b37fe0daf9eff9e76ab1ffb20f9dcb2e9a875c512bcf5dc762395338 WHIRLPOOL 3c95f8eb2187a9a9e85031c49025cdab9e9da0020d8da90bba8fef394d2c5de75bb1d93667f440821770a14a3d36cabbd840616c6109962e65a1c921706e4c73
+MISC ChangeLog-2015 896 SHA256 8e2dc12d2e29ba8bed3a3da10105119bd743251c0b1b3db2243fd304beec1eb4 SHA512 81d8b6802c3e6062fb73ed2a1fb8173144f7593aa46e1d6f6efe47ba45c8b04b9c08babfc3c17c0651c12af15d3da44c880ca2f5fa2322dceae7c49dccfd186d WHIRLPOOL dfe6f51a03917613a72e20dfb0ef47a079e84c8859b962f70cd73144aeccac216a459b01d3c1d1e6f0a458d5368d5402272a16171b49921edb41242feb8c7b4a
+MISC metadata.xml 323 SHA256 d4fa34f745a0b6ddf13ced504e9ad1dcd23bdb5f91988686243150ec05728613 SHA512 d6afbaade4f09d103a0a40e30079e402df15cc5f1f452bd0b10b2d5ecda328ff1d057c9a931869cccc15381c1e1abfbb37cca942179e51ce6a562772c9ca6698 WHIRLPOOL b4f1c424ea48b2524099792cae5ae26ac981ab41e11b6dea35068c6027d037b0ea0594b77ef66fadf8075b0d90d6ed375809ee54d63118241149f11ba508a3e8
diff --git a/sys-apps/lnxhc/files/lnxhc-1.2-ifconfig-path.patch b/sys-apps/lnxhc/files/lnxhc-1.2-ifconfig-path.patch
new file mode 100644
index 000000000000..89e184704857
--- /dev/null
+++ b/sys-apps/lnxhc/files/lnxhc-1.2-ifconfig-path.patch
@@ -0,0 +1,23 @@
+--- lnxhc-1.2/checks/net_hsi_outbound_errors/definitions
++++ lnxhc-1.2-patched/checks/net_hsi_outbound_errors/definitions
+@@ -9,7 +9,7 @@
+ default = "1"
+
+ [sysinfo ifconfig]
+-program = "/sbin/ifconfig"
++program = "/bin/ifconfig"
+
+ [exception slow_hsi_receivers]
+ severity = medium
+
+--- lnxhc-1.2/checks/net_inbound_errors/definitions 2013-02-06 04:08:55.000000000 -0500
++++ lnxhc-1.2-patched/checks/net_inbound_errors/definitions 2013-05-22 17:13:56.088787813 -0400
+@@ -11,7 +11,7 @@
+ # The above value in percentage
+
+ [sysinfo ifconfig]
+-program = "/sbin/ifconfig"
++program = "/bin/ifconfig"
+
+ [exception limits_exceeded]
+ severity = medium
diff --git a/sys-apps/lnxhc/files/lnxhc-1.2-usrlocal.patch b/sys-apps/lnxhc/files/lnxhc-1.2-usrlocal.patch
new file mode 100644
index 000000000000..fe237502785f
--- /dev/null
+++ b/sys-apps/lnxhc/files/lnxhc-1.2-usrlocal.patch
@@ -0,0 +1,43 @@
+diff -ruN lnxhc-1.2/Makefile lnxhc-1.2-patched/Makefile
+--- lnxhc-1.2/Makefile 2013-02-06 04:14:17.000000000 -0500
++++ lnxhc-1.2-patched/Makefile 2013-02-09 13:39:25.096883794 -0500
+@@ -71,7 +71,6 @@
+ pycheckdir := $(libdir)/python/check
+ exampledir := $(docdir)/examples
+ dbdir1 := $(libdir)
+-dbdir2 := /usr/local/lib/lnxhc
+
+ # Base files
+ binfiles := $(wildcard bin/*)
+@@ -154,7 +153,7 @@
+ $(DESTDIR)$(sysvardir) $(DESTDIR)$(pmdir) \
+ $(DESTDIR)$(checkdir) $(DESTDIR)$(consdir) \
+ $(DESTDIR)$(profiledir) $(DESTDIR)$(dbdir1) \
+- $(DESTDIR)$(dbdir2) $(DESTDIR)$(pmcheckdir) \
++ $(DESTDIR)$(pmcheckdir) \
+ $(DESTDIR)$(pmconsumerdir) $(DESTDIR)$(pydir) \
+ $(DESTDIR)$(pycheckdir) $(DESTDIR)$(exampledir)
+
+@@ -164,7 +163,7 @@
+ $(DESTDIR)$(checkdir) $(DESTDIR)$(consdir) \
+ $(DESTDIR)$(profiledir) $(DESTDIR)$(pycheckdir) \
+ $(DESTDIR)$(pydir) $(DESTDIR)$(libdir) \
+- $(DESTDIR)$(dbdir2) $(DESTDIR)$(exampledir) \
++ $(DESTDIR)$(exampledir) \
+ $(DESTDIR)$(docdir)
+
+ installbase: installdirs
+@@ -184,11 +183,11 @@
+ $(CP) -rp $(examples) $(DESTDIR)$(exampledir)
+ for FILE in $(notdir $(binfiles)) ; do \
+ $(FIXPATH) "$(DESTDIR)/$(bindir)/$${FILE}" "$(libdir)" \
+- "$(dbdir1)" "$(dbdir2)" ; \
++ "$(dbdir1)" ; \
+ done
+ for FILE in $(notdir $(conffiles)) ; do \
+ $(FIXPATH) "$(DESTDIR)/$(confdir)/$${FILE}" "$(libdir)" \
+- "$(dbdir1)" "$(dbdir2)" ; \
++ "$(dbdir1)" ; \
+ done
+
+ uninstallbase:
diff --git a/sys-apps/lnxhc/lnxhc-1.2-r1.ebuild b/sys-apps/lnxhc/lnxhc-1.2-r1.ebuild
new file mode 100644
index 000000000000..2b878ef587d8
--- /dev/null
+++ b/sys-apps/lnxhc/lnxhc-1.2-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+DESCRIPTION="Linux Health Checker"
+HOMEPAGE="http://lnxhc.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.8"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2-usrlocal.patch"
+ epatch "${FILESDIR}/${PN}-1.2-ifconfig-path.patch"
+}
diff --git a/sys-apps/lnxhc/metadata.xml b/sys-apps/lnxhc/metadata.xml
new file mode 100644
index 000000000000..36bfe2a121c5
--- /dev/null
+++ b/sys-apps/lnxhc/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 type="person">
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lnxhc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/logwatch/Manifest b/sys-apps/logwatch/Manifest
new file mode 100644
index 000000000000..d773bfa96fbc
--- /dev/null
+++ b/sys-apps/logwatch/Manifest
@@ -0,0 +1,7 @@
+AUX logwatch 125 SHA256 6f65d08d413b7129730816988e4ff49ece532f59e50ccf6a345b2797a854ec6d SHA512 20cdf61fe9e9bfe336c6b7e1f33c982c34e61370431179a2f766da8e1b56f8452c85d75fbba4f459f9c4761a7a932c309d0ba7253aeb6e3b31b220c00106e504 WHIRLPOOL b26d6d421f53c51a5e76dcda5669bd2571843d6b3bf52d862adf553eb6b6793d26b25cebf5aae9273c74c5c71009761031e820aa3a9cd714571e02be9b8a7dbc
+AUX logwatch-7.4.2-openssh-hpn.patch 880 SHA256 2ec29c7cb32b3ef62f8a86dab548f9e7a5efef943c9eefbfbc980984448ce49d SHA512 f80ef051e07254869dad4c7221564d09d2f52c2fceb2fa4c802f67b83f4569ed9405d07d85b21a1fc67f75b552a82fa4b4a9e69578829f51a5e49e50cb79f0b8 WHIRLPOOL 3a70bc3d56b45b7cc608c8a1313982605974a5cec09b8f17e00e8d80e4af8c5f6dff3bad8e5a6b6a0a480abf6e96dc05647d83ac5177053f026e9197b158a90e
+DIST logwatch-7.4.3.tar.gz 462552 SHA256 1dbdc48d65e150f2dbb43f1e4f4700d94166e053b1c7bbbdedf4ad670283720e SHA512 716d87238f487010f2bdf230fc66c16f3c3fe769e6bef04b0e7881c6b0563e1a4b4741235b8a40a16ab21d3803562e87e6bcf5cfbd0ace42414f1d1feae7a13a WHIRLPOOL abe7870020029f86f037f4c96dff96b6c542eb36df9f110c755d6de28965c6418dd4d03a2e6932ff8db7079f22ea396d352aa6b8ebba81576b588017b4694d02
+EBUILD logwatch-7.4.3.ebuild 2051 SHA256 d349249dd7a1e0ad82bec946b75df4c71854e5f85d57459cae37db818cd0dcff SHA512 311e5ce37341ce3ff2ab033b301f0264df8f6dcb6615efb2ea2920a7d365c1a6b19244d9a7d6644c249f33348c2371076935b86df2470378e0659476518aa457 WHIRLPOOL bf942c975248bb181c23592154a75b31fc8c6214c8a8a34120bc5338c4fb0b6bf8bdad079829ffc864205a80707ecc00a22bd7d5101c518dec7d4674d013a171
+MISC ChangeLog 4905 SHA256 002324069f7c6bffeb8659aabc079c51ba260f4e3dee482766e80435621c477b SHA512 1b4b5395d556705f1bb545541cea88b71b9d7e8605975d7b3e468f17d626df52e6279f3b3ae1d2be19b2af4db1cab288ccf729f1642e5abb88502948b61b8cfc WHIRLPOOL ca56c2d5faa38f0cef09a8b340a7d08e8f6567deba8bf246634baedc9752c0b71ae1600032a5897288797d017bbdf2e520b703a91bc93d0379327f8dc787dd31
+MISC ChangeLog-2015 13525 SHA256 4adbda52a29f2728dceda9277c0449d6cc909769feb9fe1f0067cdae8a9a1b5d SHA512 1a893ca5ce4d97a206889a6ccb5d75988f1ad545a4194194dd83ec06a8213bac6cfe5db216b7a6b21ca003f812ea317cf593d6a8a28fdc2dd13f7593c6ada015 WHIRLPOOL b235fb5914b612e4c4d404734246b8b62b1b3639c0b15f7caa4582647153215e684084a8c6f777c83af4e77a205d360da06bf397f15ae3be352c66fce5ed1d3c
+MISC metadata.xml 328 SHA256 4086b273d7f5312bef52d8ab72297b42180cd1385c32de9d0841f5f0bf7a459d SHA512 5feb78397d5abc4fc758c61c2c972032eca10f9fcbdbb6efcbae764c5ab1aaa09fd4f9a31082682dfd8e0ff865147fff22787b8d116bc7a954a4fdc42cf7b3e7 WHIRLPOOL 1895fcd2b76d48f16d7485eb4de486665573a823dc346212008222a0a516728e0070345b9926636f5a475d6018396eb13e5804c9e4dba01755144caf4c4f36b0
diff --git a/sys-apps/logwatch/files/logwatch b/sys-apps/logwatch/files/logwatch
new file mode 100644
index 000000000000..50ba356d3984
--- /dev/null
+++ b/sys-apps/logwatch/files/logwatch
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -x /usr/sbin/logwatch.pl ] ; then
+ mkdir -p /var/cache/logwatch
+ exec /usr/sbin/logwatch.pl --output mail
+fi
diff --git a/sys-apps/logwatch/files/logwatch-7.4.2-openssh-hpn.patch b/sys-apps/logwatch/files/logwatch-7.4.2-openssh-hpn.patch
new file mode 100644
index 000000000000..80e6ee06b767
--- /dev/null
+++ b/sys-apps/logwatch/files/logwatch-7.4.2-openssh-hpn.patch
@@ -0,0 +1,16 @@
+Add an 'ignore' line for the HPN patch that we enable on our openssh by default.
+
+https://sourceforge.net/tracker/?func=detail&aid=3257504&group_id=312875&atid=1316824
+
+--- logwatch-7.4.2/scripts/services/sshd
++++ logwatch-7.4.2/scripts/services/sshd
+@@ -297,7 +297,8 @@
+ ($ThisLine =~ /Starting session: (forced-command|subsystem|shell|command)/ ) or
+ ($ThisLine =~ /Found matching \w+ key:/ ) or
+ ($ThisLine =~ /User child is on pid \d/ ) or
+- ($ThisLine =~ /Nasty PTR record .* is set up for [\da-fA-F.:]+, ignoring/)
++ ($ThisLine =~ /Nasty PTR record .* is set up for [\da-fA-F.:]+, ignoring/) or
++ ($ThisLine =~ /^SSH: Server;L[Tt]ype: /)
+ ) {
+ # Ignore these
+ } elsif ( my ($Method,$User,$Host,$Port,$Key) = ($ThisLine =~ /^Accepted (\S+) for ((?:invalid user )?\S+) from ([\d\.:a-f]+) port (\d+) ssh[12](?:: (\w+))?/) ) {
diff --git a/sys-apps/logwatch/logwatch-7.4.3.ebuild b/sys-apps/logwatch/logwatch-7.4.3.ebuild
new file mode 100644
index 000000000000..b8dc95af0f58
--- /dev/null
+++ b/sys-apps/logwatch/logwatch-7.4.3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Analyzes and Reports on system logs"
+HOMEPAGE="http://www.logwatch.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND="virtual/cron
+ virtual/mta
+ virtual/mailx
+ dev-lang/perl
+ dev-perl/Date-Calc
+ dev-perl/Date-Manip
+ dev-perl/Tie-IxHash
+ dev-perl/Sys-CPU
+ dev-perl/Sys-MemInfo"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.4.2-openssh-hpn.patch
+}
+
+src_install() {
+ dodir /usr/share/logwatch/lib
+ dodir /usr/share/logwatch/scripts/services
+ dodir /usr/share/logwatch/scripts/shared
+ dodir /usr/share/logwatch/default.conf/logfiles
+ dodir /usr/share/logwatch/default.conf/services
+ dodir /usr/share/logwatch/default.conf/html
+ keepdir /etc/logwatch
+
+ newsbin scripts/logwatch.pl logwatch.pl
+
+ exeinto /usr/share/logwatch/lib
+ doexe lib/*.pm
+
+ exeinto /usr/share/logwatch/scripts/services
+ doexe scripts/services/*
+
+ exeinto /usr/share/logwatch/scripts/shared
+ doexe scripts/shared/*
+
+ insinto /usr/share/logwatch/default.conf
+ doins conf/logwatch.conf
+
+ insinto /usr/share/logwatch/default.conf/logfiles
+ doins conf/logfiles/*
+
+ insinto /usr/share/logwatch/default.conf/services
+ doins conf/services/*
+
+ insinto /usr/share/logwatch/default.conf/html
+ doins conf/html/*
+
+ # Make sure logwatch is run before anything else #100243
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/logwatch 00-logwatch
+
+ doman logwatch.8
+ dodoc README HOWTO-Customize-LogWatch
+
+ # Do last due to insopts modification.
+ insinto /usr/share/logwatch/scripts/logfiles
+ insopts -m755
+ doins -r scripts/logfiles/*
+}
+
+pkg_postinst() {
+ if [[ -e ${ROOT}/etc/cron.daily/logwatch ]] ; then
+ local md5=$(md5sum "${ROOT}"/etc/cron.daily/logwatch)
+ [[ ${md5} == "edb003cbc0686ed4cf37db16025635f3" ]] \
+ && rm -f "${ROOT}"/etc/cron.daily/logwatch \
+ || ewarn "You have two logwatch files in /etc/cron.daily/"
+ fi
+}
diff --git a/sys-apps/logwatch/metadata.xml b/sys-apps/logwatch/metadata.xml
new file mode 100644
index 000000000000..9371ec6b4a5e
--- /dev/null
+++ b/sys-apps/logwatch/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">logwatch</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/lomoco/Manifest b/sys-apps/lomoco/Manifest
new file mode 100644
index 000000000000..344f463d3078
--- /dev/null
+++ b/sys-apps/lomoco/Manifest
@@ -0,0 +1,9 @@
+AUX lomoco-1.0-gentoo-hardware-support.patch 9317 SHA256 18c91bfdb5fe354391fe6a4cffce41398cb9d20456cc619ebf8b462416378c58 SHA512 137b318629a09b5600744602fd725c8b7b56fe350aca0f26fb9cb9d37f499b4bf353cc3fe2e20098132ea94d3dab5261937695407074ac8c736bd292f8dddf85 WHIRLPOOL eda57d347fdbc5ae6b0ce0cc34ca9f2b2a7df3ac6833eca96ddc28f61a3253e57554bd613fb2efa1410a1bb8bda60710705b65eeefec52e4a56ecf8f3ea3e373
+AUX lomoco-1.0-updated-udev.patch 2335 SHA256 ce281a45d4001192b35256d658b661adde3e7e6eda4d5c327ee202ca87d806ab SHA512 241496067804c3f5a3b508a2955bd139287b756fac6c9793003279d4def336c9d870eb807a81a02621e4edbc0895f27dd9565a10dbb16740fe88c9e186e4d196 WHIRLPOOL 65543da1f7fda850094ebbf9b389f76a3b487e27ceb6d82ad7f596b8b4eb88ecb3ecfd8b5223d8cbbd7171c707e33b2e4f45ccbc97eb75217cbdaafc45ebfd9f
+AUX lomoco-pm-utils-r1 82 SHA256 0591a26f14238abc1965a9cbddcc41cd9a82873058b420447e917dd770cb9d4f SHA512 316bcd13dfb18f573797c5e57cf318ac34efe347ae623a63e0b84d64360188d54308907111be54098a6c334822797c7018475b1c7930418d90e4826924117886 WHIRLPOOL 13cf317de1515724fcd09b1986fc7531d77920db60e051eb14359162c08812ebbacb8ddbb27ee011bade9e43b859f8bd2a6525668764231654de0988f60b9717
+AUX lomoco.conf 296 SHA256 53260f97c2385d4b3d3d9340d2ca4d90bad954c72277b235a411a20f2467b233 SHA512 74dad00bb2aa15fefe16e59c56a34184fb3912aed319c6c1e5a72b7516fd29c0af305c50afe8ad819936175e06715f5b03ee7cd3c1f6a213c0d466484748f541 WHIRLPOOL 3a43e7887ba6890daf60e3eff97bd97c990c449208ba33b43bba05a5fe885d9cec180fa8de4d895639749680284123c811db21554bd8a0845f117e1211ee4eb4
+DIST lomoco-1.0.tar.gz 24573 SHA256 e9e537e8bca6186f84b457394a9e934b89c36870c66aa202ed188c7aa24e9dcc SHA512 5cd04c956fe11112be83e8d4ad91e4a8fac1bacd03666e8959ce20f2cc372fc8c53a5ac86b94125088f6b303936f087caafe71248ca8511b6a580f58459aee9f WHIRLPOOL 2bf5368351879f7f77e1dc9a61404a6f23f3ff96a1fa943aad3954741e1492df2833f306b774bc2e44dd63ec0c85c4b8fe3661f48b7d2b82e384b9f12fa82943
+EBUILD lomoco-1.0-r9.ebuild 1084 SHA256 40d7b76bfe81b60938bdbcce2de539ea2a4a5c249bee4ae571cc16a8797b43ed SHA512 99659ad3f6a2a0bcaefb866daa09bdee5d34819a0a30a213d8e02dd251a165cfe5041713226930e0f24f9d5d6f289760558f3b2b41eea9cb145cc9888db17c89 WHIRLPOOL f6a2203a33dc1f007f83cf1ea899a4e125ed1ad62b74fad0ffc4de6a33f67e3c089d4e64c54387c3a99149b64d4e29d9ebc19ece666b19e2ac230e9fcf41c698
+MISC ChangeLog 2710 SHA256 666ff031268fc33d8bd8d93a1cac53bd08c6606ff3cca63a8c4ae0f7b7820458 SHA512 edbadd5211a18a0c917256677ba319e102f548a721ab2d1141618a6bccd0163b5075a74ea339cba2973c5a28f2c30cfd49f838fd9f5018eeffb0b57f2ef9215d WHIRLPOOL b5b0d61734dcf0a667bcf88f69d3ad2563f812f6f4b0d8078c399f64370571f6491bd6e7e998bb9838468286cf30efbec9e568fea6e3cb1355b0a0d6f77e1849
+MISC ChangeLog-2015 4466 SHA256 b14d4ca5a478d07ee2fda3286e1fa2554a1e44af70fb6775107eb506f18b91f2 SHA512 77ffc4eb946b5525b2e3d99b2a12b5a59002ce0481b223c7f87baac336ad1c1b8cba1a0a406761e43b8588039aa1c50c3d367b65192536eceba1ba8b2f83c13c WHIRLPOOL 3f397f456caff1396da0ae47b0a000b6ceb8b3a381d7120e5164af0480459934c513234835422dc2b4c0e7ecb52adcd3ca7797973e5513a14d47df5f7c3ddcd5
+MISC metadata.xml 436 SHA256 b9f842a31b8d947cd7d98027a5fb8df2460c52b9fd9a31c91e998b2ab36db371 SHA512 35560d082dd8ccf5d85100b595e059824df034f8a658850d5d70ca4460aa6e083e27f1ab3e392954972e5a05b252e9adaa18696b5e217a638cdc4066741b3cc3 WHIRLPOOL ad26e8f7ee1cb8ab22cb95776da7195cfcfd826e37e84cdf84ed526ca8ab43545f3725d1f8e84c3d1bb6404e1e3cf8d9d00b5336b4e398adb704788eb4cf543d
diff --git a/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch b/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch
new file mode 100644
index 000000000000..5a5cd7d3fcb9
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch
@@ -0,0 +1,287 @@
+- Support for other hardware
+- ssr comment in the mouse array.
+- Use of defines for numeric constants to improve code readability.
+- Debian patch integrated
+
+diff -Nuar --exclude '*~' lomoco-1.0.old/src/lomoco.c lomoco-1.0/src/lomoco.c
+--- lomoco-1.0.old/src/lomoco.c 2006-03-01 06:10:05.000000000 -0800
++++ lomoco-1.0/src/lomoco.c 2006-04-30 02:38:05.107430674 -0700
+@@ -32,11 +32,12 @@
+ * model: you can find on the hardware, look for M/N: ...
+ * csr: mouse with receiver (wireless)
+ * res: mouse has resolution control
+- * sms: mouse has smart control
++ * ssr: mouse has smart scroll reporting
++ * sms: mouse has smart scroll
+ * dual: dual receiver (wireless mouse+wireless keyboard)
+ *
+ * product id, name, model, csr, res, ssr, sms, dual */
+-mouse_t mice [] = {
++static mouse_t mice [] = {
+ {0xc00e, "Wheel Mouse Optical", "M-BJ58", 0, 1, 0, 0, 0},
+ {0xc00f, "MouseMan Traveler", "M-BJ79", 0, 1, 0, 0, 0},
+ {0xc012, "MouseMan Dual Optical", "M-BL63B", 0, 1, 0, 0, 0},
+@@ -42,6 +42,7 @@
+ {0xc012, "MouseMan Dual Optical", "M-BL63B", 0, 1, 0, 0, 0},
+ {0xc01d, "MX510 Optical Mouse", "M-BS81A", 0, 1, 1, 1, 0},
+ {0xc01e, "MX518 Optical Mouse", "M-BS81A", 0, 1, 1, 0, 0},
++ {0xc051, "MX518 Optical Mouse", "M-BS81A", 0, 1, 1, 0, 0},
+ {0xc024, "MX300 Optical Mouse", "M-BP82", 0, 1, 0, 0, 0},
+ {0xc01b, "MX310 Optical Mouse", "M-BP86", 0, 1, 0, 0, 0},
+ {0xc025, "MX500 Optical Mouse", "M-BP81A", 0, 1, 1, 1, 0},
+@@ -49,50 +50,37 @@
+ {0xc041, "G5 Laser Gaming Mouse", "M-UAC113", 0, 1, 0, 1, 0},
+ {0xc501, "Mouse Receiver", "C-BA4-MSE", 1, 0, 0, 0, 0},
+ {0xc502, "Dual Receiver", "C-UA3-DUAL", 1, 0, 0, 0, 1},
+- {0xc503, "Receiver for MX900 Receiver", "C-UJ16A", 1, 0, 0, 1, 0},
++ {0xc503, "Receiver for MX900", "C-UJ16A", 1, 0, 0, 1, 0},
+ {0xc504, "Receiver for Cordless Freedom Optical", "C-BD9-DUAL", 1, 0, 0, 0, 1},
+ {0xc505, "Receiver for Cordless Elite Duo", "C-BG17-DUAL", 1, 0, 0, 0, 1},
+ {0xc506, "Receiver for MX700 Optical Mouse", "C-BF16-MSE", 1, 0, 0, 1, 0},
+ {0xc508, "Receiver for Cordless Optical TrackMan", "C-BA4-MSE", 1, 0, 0, 1, 0},
+- {0xc702, "Receiver for Cordless Presenter", "C-UF15", 1, 0, 0, 0, 0},
+- {0xc704, "Receiver for diNovo Media Desktop", "C-BQ16A", 1, 0, 1, 1, 0},
++
++ /* From Michele Noberasco <s4t4n@gentoo.org> */
++ {0xc50a, "Reciveer for Cordless Optical Mouse for Notebooks", "C-BJ27-MSE", 1, 0, 0, 0, 0},
++
++ /* From Robin H. Johnson <robbat2@gentoo.org> */
++ {0xc50b, "Receiver for Cordless Desktop MX", "C-BK16A-DUAL",1, 0, 0, 1, 1},
++
+ /* From Markus Wiesner <m_wiesner@gmx.net> */
+ {0xc50e, "Receiver for MX1000 Laser", "C-BN34", 1, 0, 1, 1, 0},
+ {0xc512, "Receiver for Cordless Desktop MX3100 Laser", "C-BO34", 1, 0, 0, 1, 1},
++
++ {0xc702, "Receiver for Cordless Presenter", "C-UF15", 1, 0, 0, 0, 0},
++ {0xc704, "Receiver for diNovo Media Desktop", "C-BQ16A", 1, 0, 1, 1, 0},
+ {0x0000, NULL, NULL, 0, 0, 0, 0}
+ };
+
+-
+ /*
+- * Description: Query the mouse and report all cordless mouse specific infos
++ * Description: Print out a set of CSR data
+ * e.g. receiver type, mouse type, battery status
+ *
+- * Parameters: mouse_t *m
+- * mouse struct with the mouse specs
+- * struct usb_dev_handle *handle
+- * usb device handle of the mouse
+- * unsigned int addr
+- * address for dual receivers
++ * Parameters: unsigned char* buf
++ * result from query_csr internals
+ *
+ * Return: void
+ */
+-static void query_csr(mouse_t *m, struct usb_dev_handle *handle,
+- unsigned int addr) {
+- unsigned char buf[12] = {0};
+-
+- if (usb_control_msg ( handle,
+- USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x09,
+- (0x0003 | addr),
+- (0x0000 | addr),
+- (char *) buf,
+- 8,
+- TIMEOUT ) != 8) {
+-
+- perror("Writing to USB device: CSR");
+- exit(EXIT_FAILURE);
+- }
+-
++static void print_csr(unsigned char* buf) {
+ /* We have not obtained blocks P6 P0 P4 P5 P8 P9 PB0 PB1 */
+
+ /* Is a C504 receiver busy? */
+@@ -111,6 +99,7 @@
+ case 0x3c: printf ("C508\n"); break;
+ case 0x3d: printf ("C506\n"); break;
+ case 0x3e: printf ("C505\n"); break;
++ case 0x3f: printf ("C50B\n"); break;
+ case 0x42: printf ("C512\n"); break;
+ default: printf ("Unknown (type %x)\n", P0);
+ }
+@@ -138,6 +127,7 @@
+ case 0x82: printf ("Cordless Optical TrackMan\n"); break;
+ case 0x8A: printf ("MX700 Cordless Optical Mouse\n"); break;
+ case 0x8B: printf ("MX700 Cordless Optical Mouse (2ch)\n"); break;
++ case 0x94: printf ("Cordless Optical Mouse for Notebooks\n"); break;
+ default: printf ("Unknown (type %x)\n", P4);
+ }
+
+@@ -199,6 +189,38 @@
+ }
+ }
+
++/*
++ * Description: Query the mouse and report all cordless mouse specific infos
++ * e.g. receiver type, mouse type, battery status
++ *
++ * Parameters: mouse_t *m
++ * mouse struct with the mouse specs
++ * struct usb_dev_handle *handle
++ * usb device handle of the mouse
++ * unsigned int addr
++ * address for dual receivers
++ *
++ * Return: void
++ */
++static void query_csr(mouse_t *m, struct usb_dev_handle *handle,
++ unsigned int addr) {
++ unsigned char buf[12] = {0};
++
++ if (usb_control_msg ( handle,
++ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
++ REQUEST_MOUSE_CSR,
++ (0x0003 | addr),
++ (0x0000 | addr),
++ (char *) buf,
++ 8,
++ TIMEOUT ) != 8) {
++
++ perror("Writing to USB device: CSR");
++ exit(EXIT_FAILURE);
++ }
++ print_csr(buf);
++
++}
+
+ /*
+ * Description: Query the mouse and report the current resolution
+@@ -218,8 +240,8 @@
+
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x01,
+- (0x000e | addr),
++ REQUEST_MOUSE_GET_RES_SSR,
++ (VALUE_MOUSE_GET_RES | addr),
+ (0x0000 | addr),
+ (char *) buf,
+ 1,
+@@ -255,8 +277,8 @@
+ if (m->has_ssr) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x01,
+- (0x0017 | addr),
++ REQUEST_MOUSE_GET_RES_SSR,
++ (VALUE_MOUSE_GET_SSR | addr),
+ (0x0000 | addr),
+ (char*) buf,
+ 1,
+@@ -394,8 +416,8 @@
+ assert ((set_channel == 1) || (set_channel == 2));
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x0008 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_CHANNEL | addr),
+ ((set_channel - 1) | addr),
+ NULL,
+ 0,
+@@ -412,8 +434,8 @@
+ if (set_unlock) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x06 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_UNLOCK | addr),
+ (0x1 | addr),
+ NULL,
+ 0,
+@@ -430,8 +452,8 @@
+ if (set_lock) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x0006 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_UNLOCK | addr),
+ (0x0000 | addr),
+ NULL,
+ 0,
+@@ -448,8 +470,8 @@
+ if (set_clear) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x09,
+- (0x0004 | addr),
++ REQUEST_MOUSE_CSR,
++ (VALUE_MOUSE_CLEAR | addr),
+ (0x0000 | addr),
+ NULL,
+ 0,
+@@ -483,8 +505,8 @@
+
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x0002,
+- 0x000e,
++ REQUEST_MOUSE_PUT_RES_SMS,
++ VALUE_MOUSE_PUT_RES,
+ (set_res / 400) + 2,
+ NULL,
+ 0,
+@@ -514,8 +536,8 @@
+ assert ((set_sms == 1) || (set_sms == -1));
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- 0x0017,
++ REQUEST_MOUSE_PUT_RES_SMS,
++ VALUE_MOUSE_PUT_SSR,
+ (set_sms == 1 ? 0x0001 : 0x0000),
+ NULL,
+ 0,
+@@ -641,7 +663,7 @@
+ /* Do we support this device? If so, list it. */
+ if ((m = find_mouse (device)) != NULL) {
+
+- printf ("%s.%s: %04x:%04x %s (%s) Caps: %s%s%s\n",
++ printf ("%s.%s: %04x:%04x %s (%s) Caps: %s%s%s%s\n",
+ device->bus->dirname,
+ device->filename,
+ device->descriptor.idVendor,
+@@ -650,6 +672,7 @@
+ m->model,
+ m->has_csr? "CSR ": "",
+ m->has_res? "RES ": "",
++ m->has_ssr? "SSR ": "",
+ m->has_sms? "SMS ": ""
+ );
+ }
+@@ -667,7 +671,7 @@
+ device->filename,
+ device->descriptor.idVendor,
+ device->descriptor.idProduct,
+- ret ? product : "Unknown"
++ ret > 0 ? product : "Unknown"
+ );
+ continue;
+ }
+diff -Nuar --exclude '*~' lomoco-1.0.old/src/lomoco.h lomoco-1.0/src/lomoco.h
+--- lomoco-1.0.old/src/lomoco.h 2006-03-01 06:10:05.000000000 -0800
++++ lomoco-1.0/src/lomoco.h 2006-04-30 02:34:04.381175920 -0700
+@@ -97,4 +97,17 @@
+ int is_dual;
+ } mouse_t;
+
++
++#define REQUEST_MOUSE_CSR 0x09
++#define VALUE_MOUSE_GET 0x0003
++#define VALUE_MOUSE_CLEAR 0x0004
++#define REQUEST_MOUSE_GET_RES_SSR 0x01
++#define VALUE_MOUSE_GET_RES 0x000e
++#define VALUE_MOUSE_GET_SSR 0x0017
++#define REQUEST_MOUSE_PUT_RES_SMS 0x02
++#define VALUE_MOUSE_UNLOCK 0x0006
++#define VALUE_MOUSE_CHANNEL 0x0008
++#define VALUE_MOUSE_PUT_RES 0x000e
++#define VALUE_MOUSE_PUT_SSR 0x0017
++
+ #endif /* __LOMOCO_H */
diff --git a/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch b/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch
new file mode 100644
index 000000000000..783a2d5e712a
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch
@@ -0,0 +1,95 @@
+diff --git a/udev/toudev.awk b/udev/toudev.awk
+index 822421d..ada40e5 100644
+--- a/udev/toudev.awk
++++ b/udev/toudev.awk
+@@ -1,15 +1,20 @@
+ #!/bin/awk -f
+ BEGIN {
+ FS = ","
++ print "# udev.rules file for Logitech mouse control using lomoco"
++ print "#"
++ print ""
+ print "ACTION != \"add\", GOTO=\"lomoco_end\""
+- print "SUBSYSTEM != \"usb\", GOTO=\"lomoco_end\""
+- print "SYSFS{idVendor} != \"046d\", GOTO=\"lomoco_end\""
++ print "SUBSYSTEM == \"usb\", ENV{DEVTYPE}==\"usb_device\", GOTO=\"lomoco_start\""
++ print "SUBSYSTEM != \"usb_device\", GOTO=\"lomoco_end\""
++ print ""
++ print "LABEL=\"lomoco_start\""
+ print ""
+ }
+
+ $1 ~ /0xc[a-f0-9][a-f0-9][a-f0-9]/ {
+ print "# " substr($3, index($3, "\"")) ", " $2
+- print "SYSFS{idProduct}==\"" substr($1, index($1, "x")+1) \
++ print "ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"" substr($1, index($1, "x")+1) \
+ "\", RUN=\"lomoco\""
+ }
+
+diff --git a/udev/udev.lomoco b/udev/udev.lomoco
+index 9e55511..da896d9 100755
+--- a/udev/udev.lomoco
++++ b/udev/udev.lomoco
+@@ -1,26 +1,36 @@
+-#!/bin/bash
+-
+-case "$DEVPATH" in
+- *usbdev*.*)
+- dev=${DEVPATH##*usbdev}
+- bus=$(printf %03d ${dev%.*})
+- dev=$(printf %03d ${dev#*.})
+-
+- . /etc/sysconfig/logitech_mouse
+-
+- options=
+-
+- if [ -n "$LOGITECH_MOUSE_RESOLUTION" ]; then
+- options="--$LOGITECH_MOUSE_RESOLUTION"
+- fi
+-
+- if [ -z "$LOGITECH_MOUSE_DISABLE_CC" -o "$LOGITECH_MOUSE_DISABLE_CC" = yes ]; then
+- options="$options --no-sms"
+- fi
+-
+- if [ -n "$options" ]; then
+- /usr/bin/lomoco -b $bus -d $dev $options
+- fi
+- ;;
+-esac 2>&1 | /bin/logger -t lomoco
+-
++#!/bin/sh
++#
++# udev helper script for the locomo utility
++#
++
++test -x /usr/bin/lomoco || exit 0
++test -r /etc/lomoco.conf || exit 0
++
++options=
++. /etc/lomoco.conf
++
++if [ -n "$LOGITECH_MOUSE_RESOLUTION" ]; then
++ options="--$LOGITECH_MOUSE_RESOLUTION"
++fi
++
++if [ -z "$LOGITECH_MOUSE_DISABLE_CC" -o "$LOGITECH_MOUSE_DISABLE_CC" = yes ]; then
++ options="$options --no-sms"
++fi
++
++if [ -n "$BUSNUM" ]; then
++ options="$options -b $BUSNUM"
++fi
++
++if [ -n "$DEVNUM" ]; then
++ options="$options -d $DEVNUM"
++fi
++
++if [ -n "$MODEL_ID" ]; then
++ options="$options -p $MODEL_ID"
++fi
++
++if [ -n "$options" ]; then
++ /usr/bin/lomoco $options 2>&1 | \
++ sed -e 's/^[[:blank:]]\+//' -e 's/ \+$//' -e '/^$/ d' | \
++ logger -t lomoco -p daemon.info
++fi
diff --git a/sys-apps/lomoco/files/lomoco-pm-utils-r1 b/sys-apps/lomoco/files/lomoco-pm-utils-r1
new file mode 100644
index 000000000000..602de3d11571
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-pm-utils-r1
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+case "$1" in
+ thaw|resume)
+ @UDEVDIR@/lomoco
+ ;;
+esac
diff --git a/sys-apps/lomoco/files/lomoco.conf b/sys-apps/lomoco/files/lomoco.conf
new file mode 100644
index 000000000000..d69c6185bb61
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco.conf
@@ -0,0 +1,9 @@
+LOGITECH_MOUSE_RESOLUTION=800
+LOGITECH_MOUSE_DISABLE_CC=no
+
+# Use the lsusb output to configure additional parameters bellow
+# Bus <BUSNUM> Device <DEVNUM>: ID 046d:<MODEL_ID> Logitech, Inc. MX510 Optical Mouse
+# Note: DEVNUM is dynamic and not recommened
+#BUSNUM=001
+#DEVNUM=009
+#MODEL_ID=c01d
diff --git a/sys-apps/lomoco/lomoco-1.0-r9.ebuild b/sys-apps/lomoco/lomoco-1.0-r9.ebuild
new file mode 100644
index 000000000000..3e1eb600ddd5
--- /dev/null
+++ b/sys-apps/lomoco/lomoco-1.0-r9.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit autotools eutils multilib toolchain-funcs udev
+
+DESCRIPTION="Lomoco can configure vendor-specific options on Logitech USB mice"
+HOMEPAGE="http://www.lomoco.org/"
+SRC_URI="http://www.lomoco.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ cp -f "${FILESDIR}"/lomoco-pm-utils-r1 "${T}" || die
+ sed -i -e "s|@UDEVDIR@|$(get_udevdir)|" "${T}"/lomoco-pm-utils-r1 || die
+
+ epatch \
+ "${FILESDIR}"/${P}-gentoo-hardware-support.patch \
+ "${FILESDIR}"/${P}-updated-udev.patch
+
+ eautoreconf
+}
+
+src_compile() {
+ emake
+ emake udev-rules
+}
+
+src_install() {
+ default
+
+ insinto "$(get_udevdir)"/rules.d
+ newins udev/lomoco.rules 40-lomoco.rules
+
+ exeinto "$(get_udevdir)"
+ newexe udev/udev.lomoco lomoco
+
+ insinto /etc
+ doins "${FILESDIR}"/lomoco.conf
+
+ exeinto /etc/pm/sleep.d
+ newexe "${T}"/lomoco-pm-utils-r1 lomoco
+}
diff --git a/sys-apps/lomoco/metadata.xml b/sys-apps/lomoco/metadata.xml
new file mode 100644
index 000000000000..c7bb54273d0f
--- /dev/null
+++ b/sys-apps/lomoco/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 type="person">
+ <email>blshkv@pentoo.ch</email>
+ <name>Anton Bolshakov</name>
+ <description>Proxy maintainer. Assign bugs to him</description>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/lsadb/Manifest b/sys-apps/lsadb/Manifest
new file mode 100644
index 000000000000..84a8980a7067
--- /dev/null
+++ b/sys-apps/lsadb/Manifest
@@ -0,0 +1,6 @@
+AUX lsadb-makefile.patch 224 SHA256 c71197a45e09568427985387f1ed4d38a2c57221e4be0872bbd063340ab2a61d SHA512 1e7d158b5e17b0fea943879d1f6aeb20cbb2ad4fabcc5233f8143ef2943d218c7d263e87959f3159ffb6d4c1539cd14e0b2a0cafc502757e8a5a733e0f638787 WHIRLPOOL 63e6a28d5c34731097e0d04a7222cea4c9e63d4a61abff0d69fea7c8ca7548e2174a416bcba5071c8abcb0259bb807c87c4b8ae3b0567a171df61a816aee3f7f
+DIST lsadb-0.1.3.tgz 7098 SHA256 eff3a0b0e113f3c97838f542e1761762f544b0a416d73a7f6b7ad0ff2f9326d0 SHA512 cb5193ba4e3806a140848dd7b06e08e115ac95f12fe2e4dbd7a0b464926cbc0ecf1113331bbbeedc72fd1d51b7d87f3115ce4772efcfe7bee20dc2d954dcf646 WHIRLPOOL 80defc232e5a5206f44c2b9379a7bec3f99f0947da37bde6f362197f803d7c751dbb30b017c098022d2b3f6f4af115650e182b0d8c27d209b63a0cb16a5686bd
+EBUILD lsadb-0.1.3.ebuild 655 SHA256 037ac7b048f7da2f4307e7d5558eeb17353de456973436ca0e1feb1ff8f37756 SHA512 6b5402e8f4b83e05d99df522b143e0953e2e19e8051dd670ad3ee179645ac3965965817643600ff63534671381592d68c0c58a25b0619316f1890bdc74306a0f WHIRLPOOL c4e5a0c0b2a0ef324b3d2066b7415c8c8e2759b1098772c3ab93aeeeea7f707d4af4f243817f587b3e42fed8e7b25e275a0c31a08d3742e8c5941ae921b5c348
+MISC ChangeLog 2790 SHA256 c5b39c92394d3c4bea9434e450bd2ecda08727f62b164931d64c96f155a4602f SHA512 a5f97947e3727ab68f6e53dff108d166de709dfd8b0435d82a7f7ad6c884d4e18d6c721879cbf44fe1164c0d46bb44208e1b64ae6d3b0b62a9b23fb7fa3ff6cf WHIRLPOOL d8ff05cd17bfa5d8c92409dc47a471f59f1a8e9ab3fe59c20c59940bccffeb20dd5740fd7f8f8ad0fb11139f7d955369705e2e1fd4bbd9ac1a6882cbce752594
+MISC ChangeLog-2015 844 SHA256 4e49b7bf92d3cd43e2736b3037ba6abae622286bd8ed2b84aaf2574973b3125b SHA512 2bdf0a62a29cb69149ed7d8fffaf976abf73cd102243fba6fe959504fbfc38f58dd2a93153729257d1bb63cc55e437602cf6f1ce7e48afaae7c39193cca136ba WHIRLPOOL f5bf0ad423cdcc6d796e654fd54f0a47929947179aa34d958e0b9d40d55f0e5d436709f5daa7995a2410c189960dcb0a430e8919e6d59df4041f378adec52b56
+MISC metadata.xml 263 SHA256 bc3ed66da9a359018966a0a199721a238e033433a289439c60668e6f3802f874 SHA512 f72954ee8887da0e1b3e59effb6eb40294102e91b1060c2d736fa47a3a12513d959b44e77fc62f881408e38d30a47f1c5b1c4a0d9c3646b5fb75118e5295ea5d WHIRLPOOL f8c00193f85a48eb02651a6baeff8bab0acd7878475cd28ff9e29858bd10979f95d441318e34f5917687f45e2aa0533d5ab2083b5d2bb2b87df414de5567ad11
diff --git a/sys-apps/lsadb/files/lsadb-makefile.patch b/sys-apps/lsadb/files/lsadb-makefile.patch
new file mode 100644
index 000000000000..fb396cc85b22
--- /dev/null
+++ b/sys-apps/lsadb/files/lsadb-makefile.patch
@@ -0,0 +1,10 @@
+--- Makefile.bak 2009-11-30 14:31:07.000000000 -0500
++++ Makefile 2009-11-30 14:31:34.000000000 -0500
+@@ -1,6 +1,2 @@
+-
+-
+ lsadb: lsadb.c lsadb.h
+- gcc -Wall -O2 -o $@ $< && strip $@
+-
+-
++ ${CC} -Wall ${CFLAGS} -o $@ $<
diff --git a/sys-apps/lsadb/lsadb-0.1.3.ebuild b/sys-apps/lsadb/lsadb-0.1.3.ebuild
new file mode 100644
index 000000000000..8c526cc30bfa
--- /dev/null
+++ b/sys-apps/lsadb/lsadb-0.1.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Prints out information on all devices attached to the ADB bus"
+HOMEPAGE="http://pbbuttons.berlios.de/projects/lsadb/"
+#SRC_URI="mirror://berlios/pub/pbbuttons/${PN}-${PV}.tgz"
+SRC_URI="mirror://gentoo/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~ppc"
+IUSE=""
+DEPEND=""
+RDEPEND="$DEPEND"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-makefile.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dobin lsadb
+ doman lsadb.1
+ dodoc README
+}
diff --git a/sys-apps/lsadb/metadata.xml b/sys-apps/lsadb/metadata.xml
new file mode 100644
index 000000000000..0d70baf208e1
--- /dev/null
+++ b/sys-apps/lsadb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/lsb-release/Manifest b/sys-apps/lsb-release/Manifest
new file mode 100644
index 000000000000..1c73aa9cf5b3
--- /dev/null
+++ b/sys-apps/lsb-release/Manifest
@@ -0,0 +1,9 @@
+AUX lsb-release-1.4-os-release.patch 614 SHA256 45c55bfeedd4eeee28356c0b16f9c3efcbcd12b6f01362359ed02516cfb12680 SHA512 289795f45144071f5f166a3dfd387267fd3327767bae9d8e9c48818de0c60b961ac35952eb8b42b3ebfd415b337c096fa2db8009fdfbc218814a3ace633a8483 WHIRLPOOL f65d2a9a78af434f508dd0d8155f873e0aeb40abeddf0b85c2f8fba1880dcc37a85add6021ed8945c03e954e9d98af9ee32a023d8bfbf6fb06214904234ab228
+DIST lsb-release-1.4.tar.gz 10769 SHA256 99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172 SHA512 84f6f8794380463587005043f601b7a40190cd9e3409abff7f5ce7658cf029a14346eff87838296d90307192bdeff68cc00480c5c04814da7acdb3e220640fde WHIRLPOOL e8e322f3d5fddf589ae1cdc97d143da907aad418ab6099f79e90e988450a3304c58d483e2ba8c80a9a7093f73af515e6c66a1c33881681bef2da70a35c31c28d
+EBUILD lsb-release-1.4-r1.ebuild 732 SHA256 1f4c61b7648822ba4c64e182730f86401e23dca33b662742deaa2fdfa7927c58 SHA512 ec24e3ade879837b901ac4beee6bd354d0070965386683c40ce27d3b239ad8a5522f77ffc07f96a91c685c4ccbeeae006257e1420d60d58e6a59ba33cd7550a9 WHIRLPOOL b2e42dfd6c67f85cb78ab685f24220616cd2be780a9a16b7de0472f0b941c349d91eb10913bdb7c09cd21cb71663d920fc2a6f432a1077119375cbbd7be3aec4
+EBUILD lsb-release-1.4-r2.ebuild 854 SHA256 83321d32c81cde0990a2de0f1be3b52dbe9763877c438be51a766dfa2c7f6c4b SHA512 ab5356625e24fc97349be711516cf346d21bb3a414c72ae5d6c95cf18b307df74ff8a1ded89d700ef65307b3c79205644e815d2281725c265e3ff61c4cef4dc8 WHIRLPOOL c5f1cf5a19211cdb9ddf8a71bd937a3048cf4254a3d86cc46e77087d0e327f5ce7e283f2f0f1f42cdd774c700250ed86054c8b3fe5ca1bba2642ff501b975a05
+EBUILD lsb-release-1.4-r3.ebuild 885 SHA256 b55f06e641f9073fc83630e4ceed267c7df5418e76614b75b4a83c46c978cee9 SHA512 c35a37af7d21abda5e144d6be1d64c0ddffbfc7fffbf8f3bc2f4c75a54b531758eaaf4fdb47c82ce8f8a7a339fe03000b386237ade019f71efebc498cdce5ec8 WHIRLPOOL db6179750f53f1d74b2c33cf687266791729f3e9bbb408c5029f1d1d4af9654275c13b6dead889c3bf0dd621bfb11256d7e9623f961a90952ddafd9f88d9dd92
+EBUILD lsb-release-1.4.ebuild 682 SHA256 b5c5c1a0d31bcc4d4af825417e887de1f0a5756bf3c4bcc051906abcabec5fcd SHA512 71356ec02e8d4bf81e89353224ec36b86ba6c082fdff2bee7456851e1feed034217a1b49aa9ebe0b43ad2a651161a5341361ff4eaa47baccc8b1c3e61aff6bbe WHIRLPOOL c82b6f0871bb23db10b5048bb32e39e8065254d3576c442e5659b4b44c04fea6a8c3a0a6146c703208cdc60b38032b1423fb07c72c906bfe746ec24b368c0e94
+MISC ChangeLog 2626 SHA256 36f4d1af5abb78a02ba9febb8ddd15c05a6bd4a485309b1a96570128ec279d7f SHA512 3429d68a17ef9649cc2a8224706dd8767081f715fe84a018bbf91031ea548bf349c5fb4d718a683e0c8302aebee37babc510a43caf2209d9a01cb01f059d9a06 WHIRLPOOL 44915d222bea7658fe268139371dc468625403b99489b8a9eab93695a0284ad7f1f464faa5aa894523d379241d48cf8ab73c21ed65b4505606f056ecfa9bae5c
+MISC ChangeLog-2015 2753 SHA256 0148ccf4661645a50e056efed76b096ba02c0cddc1706e9995f5073fc148223b SHA512 ba3dcc7eea0fb2f4fe33c85b0e1cabc223c351322b48ac6eca1169d19b342897b873c3bb66993c48c17437346259101b51fb755a0c0505ff1785280ea2de2b39 WHIRLPOOL 0443f961058dcc16013e7d7f57cc2b098eacb63ca138adcbf6ebf06baadd43985ecf1c4cd4843fd8298b86ccaef8aab3c644a475d65ed7728f27103b031a4b3b
+MISC metadata.xml 795 SHA256 3e92b1202af87d296a826931f27008602b8e9e4f341cbe747ba74e051f7c86b0 SHA512 e0951bbb925a0729e886a608c2b177fa9a68aea5571316d0d89f8cae3fa6f48c97aeb37c1393ae429f02ec40f640fe237836f018ba31c2a3d0b9a81ef2661dcf WHIRLPOOL 750bda4f6838cdddcc9d7cef3b7e26586884b164f8d7f618593eb1266cf256c07b0d12d51522c5dc8935b243f7f4b6055976bc73d4b12ee7ff863066f3a0c36f
diff --git a/sys-apps/lsb-release/files/lsb-release-1.4-os-release.patch b/sys-apps/lsb-release/files/lsb-release-1.4-os-release.patch
new file mode 100644
index 000000000000..830726074c7e
--- /dev/null
+++ b/sys-apps/lsb-release/files/lsb-release-1.4-os-release.patch
@@ -0,0 +1,10 @@
+--- a/lsb_release
++++ b/lsb_release
+@@ -250,6 +250,7 @@
+ CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \
+ -name \*$INFO_DISTRIB_SUFFIX \
+ -and ! -name $INFO_LSB_FILE \
++ -and ! -name os-release \
+ -and -type f \
+ 2>/dev/null \
+ | head -1 ) # keep one of the files found (if many)
diff --git a/sys-apps/lsb-release/lsb-release-1.4-r1.ebuild b/sys-apps/lsb-release/lsb-release-1.4-r1.ebuild
new file mode 100644
index 000000000000..933dc29fcdfb
--- /dev/null
+++ b/sys-apps/lsb-release/lsb-release-1.4-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="LSB version query program"
+HOMEPAGE="https://wiki.linuxfoundation.org/lsb/"
+SRC_URI="mirror://sourceforge/lsb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# Perl isn't needed at runtime, it is just used to generate the man page.
+DEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-os-release.patch # bug 443116
+}
+
+src_install() {
+ emake \
+ prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ install
+
+ dodir /etc
+ cat > "${D}/etc/lsb-release" <<- EOF
+ DISTRIB_ID="Gentoo"
+ EOF
+}
diff --git a/sys-apps/lsb-release/lsb-release-1.4-r2.ebuild b/sys-apps/lsb-release/lsb-release-1.4-r2.ebuild
new file mode 100644
index 000000000000..df16c8cd0457
--- /dev/null
+++ b/sys-apps/lsb-release/lsb-release-1.4-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="LSB version query program"
+HOMEPAGE="https://wiki.linuxfoundation.org/lsb/"
+SRC_URI="mirror://sourceforge/lsb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# Perl isn't needed at runtime, it is just used to generate the man page.
+DEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-os-release.patch # bug 443116
+
+ # use POSIX 'printf' instead of bash 'echo -e', bug #482370
+ sed -i -e "s:echo -e:printf '%b\\\n':g" lsb_release || die
+}
+
+src_install() {
+ emake \
+ prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ install
+
+ dodir /etc
+ cat > "${D}/etc/lsb-release" <<- EOF
+ DISTRIB_ID="Gentoo"
+ EOF
+}
diff --git a/sys-apps/lsb-release/lsb-release-1.4-r3.ebuild b/sys-apps/lsb-release/lsb-release-1.4-r3.ebuild
new file mode 100644
index 000000000000..6e80c09204c1
--- /dev/null
+++ b/sys-apps/lsb-release/lsb-release-1.4-r3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="LSB version query program"
+HOMEPAGE="https://wiki.linuxfoundation.org/lsb/"
+SRC_URI="mirror://sourceforge/lsb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+# Perl isn't needed at runtime, it is just used to generate the man page.
+DEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-os-release.patch # bug 443116
+
+ # use POSIX 'printf' instead of bash 'echo -e', bug #482370
+ sed -i \
+ -e "s:echo -e:printf '%b\\\n':g" \
+ -e 's:--long:-l:g' \
+ lsb_release || die
+}
+
+src_install() {
+ emake \
+ prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ install
+
+ dodir /etc
+ cat > "${D}/etc/lsb-release" <<- EOF
+ DISTRIB_ID="Gentoo"
+ EOF
+}
diff --git a/sys-apps/lsb-release/lsb-release-1.4.ebuild b/sys-apps/lsb-release/lsb-release-1.4.ebuild
new file mode 100644
index 000000000000..334652e4ce99
--- /dev/null
+++ b/sys-apps/lsb-release/lsb-release-1.4.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="LSB version query program"
+HOMEPAGE="https://wiki.linuxfoundation.org/lsb/"
+SRC_URI="mirror://sourceforge/lsb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+# Perl isn't needed at runtime, it is just used to generate the man page.
+DEPEND="dev-lang/perl"
+RDEPEND=""
+
+src_install() {
+ emake \
+ prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ install \
+ || die "emake install failed"
+
+ mkdir -p "${D}/etc"
+ cat > "${D}/etc/lsb-release" <<- EOF
+ DISTRIB_ID="Gentoo"
+ EOF
+}
diff --git a/sys-apps/lsb-release/metadata.xml b/sys-apps/lsb-release/metadata.xml
new file mode 100644
index 000000000000..bb4a0b6679e2
--- /dev/null
+++ b/sys-apps/lsb-release/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <longdescription lang="en">
+ This program forms part of the required functionality of
+ the LSB (Linux Standard Base) specification.
+
+ The program queries the installed state of the distribution
+ to display certain properties such as the version of the
+ LSB against which the distribution claims compliance as
+ well. It can also attempt to display the name and release
+ of the distribution along with an identifier of who produces
+ the distribution.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lsb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
new file mode 100644
index 000000000000..3eb828fae180
--- /dev/null
+++ b/sys-apps/lshw/Manifest
@@ -0,0 +1,10 @@
+AUX lshw-02.16b-gentoo.patch 4972 SHA256 101e0bdc47a3deb489317454c66d2f3bfc5cf502f54e426c18a25b8c9fdf4203 SHA512 723a67b91972d3192a422fbead27fc6c3c7020bc0d0afb0d88792659e345f3379be423517f649eda7555d20bc26583ce8298ba101eba63ba6669e7bf213c8aef WHIRLPOOL 1f7c2ce9aa8644554573767048be837a1aa32c194eb702a7c72846bdc56269cef9ccd59196d3ebd39580a8dccd99c3e13fb1053e0a04f1533468ca3999c42e06
+AUX lshw-02.18b-gentoo.patch 4819 SHA256 a3dec0e5c310caea3d3fcfe45a8294f5ce03a5910901bcdd18be012d11e70044 SHA512 c9492cf301ba06f225d8afab62ab889572f9acede7b63cfc0ae665275b1056981dd85b02d4d49fc6294194a71fc405ded6bf27b3f461e550b0e5a3dc6fb939d7 WHIRLPOOL e857417bddeaed9900138eae4196cfaac7f8914278bee5df2d470f5685f03f552b10cd3da681d506d50caf2c1b5767c3ee77532e57a30e4fe9ca772ddb3e4d48
+AUX lshw-02.18b-gettext-array.patch 924 SHA256 0a714fd5c4e106bdd87b321dc2c5b955870c8cd8d7ec9afc28649937ef319961 SHA512 60f09dcfbb6813fdeb06e7ca3161c768e4b138a65a2a1c27a19d241ddabbc8e511e31922a998c15e944056bf79eafd907073e419e0887c09180b87de24f4d5ee WHIRLPOOL 100a8d32f62b68ab342c9d80177f7c390741f4beaf50338805c6338414b0ce50ced064c994a3e97ff6c336dd6f033a15b4184d80342e0c6316d11d47b17a149b
+DIST lshw-B.02.16.tar.gz 1845891 SHA256 809882429555b93259785cc261dbff04c16c93d064db5f445a51945bc47157cb SHA512 ad3bd3d7b6f36f912265f0853f5aa37158c6d420a90a5e84b3e8fcd8a3c6137f7505cb5361e3eceb49954332d2466c686c946dcda8db0da3d51b3c48e343c2ab WHIRLPOOL 8e3200b726432859965be744c6afa437ffb4b57166084432064621773018b6f997a282ddea813916bc7faeced22a1286044b91bd69422b83372f03cf0878ca2d
+DIST lshw-B.02.18.tar.gz 2322176 SHA256 ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f SHA512 4385db86101178b8bd33a80e991718e14f83277c66b3d63ae97cb4339196873b6e9b31a174024bf43d16fe66e1d7f8cf5cea56076697878087880c8821b11e47 WHIRLPOOL 42a76daa9426dbca1f9acd9afc5e66542ea87e4e6cc53c2a125443d3338765ce55845981d1d50b380201dc10c8f0cae6fd1eb573573eb7262ce87c85d74f3e20
+EBUILD lshw-02.16b-r2.ebuild 1578 SHA256 f8e14606435cd2a8ea7b63ea20a0aa814a625fa25fc248604eb8059ac5c8fb51 SHA512 04bdbaab93a5afea433f2bda35b1254c3bbf3b6ce9f918acfdb2d7bf33f0f0d08df5473a7506efe10e04be8036d18e8d9e4ae0f7a37955d906893af546dc99a7 WHIRLPOOL 1c06cd8a5fc6cc3d7634582be3380e3b4f9179edbbd2ec1c14d5c40fcac7d2bfb1e96f175c32f8861db19bc9d7a39791c8d200b44c28fc7df621c2aa9a1119fa
+EBUILD lshw-02.18b.ebuild 1733 SHA256 c132f4be4a6a683c1f132898574b920b20078aa3cfc23777566a4932cd1e91c5 SHA512 71ba3f14b2b0a074c4718cc8a01c96b81db4b848d1dbab6ae56ddb510f22c4118dbf3556afddcd966171f4be3c8ad70c840e29fb7374b213e826d6617f3f3dc5 WHIRLPOOL 31d7b44e52cd941cbfdfa0ece98d76c0f110c72d826429ca351583efa052a1409926d81dada6e891fb11520e93330c432541d2c3792d7ace22e3d42f275fb3e9
+MISC ChangeLog 3814 SHA256 0d1b50caaf76df36646baf5439f54572d6da1e16fd63d42aaf29aa7d91e01cb5 SHA512 c2c3507d1ca0e12cfc07c3a0dffd8865e264fefeed0ba2390e5be9c3df1874a782b546a5540be5fda081228931553c0c4da7bef8fc0cbe31ded9e721651bf6fe WHIRLPOOL 8efbb8e044d7171f32946bba36b8cbe376559ae1f5f748f351a322be268d64e8343152653a35b6989e2885766a05522d3cdfbf2b4ea46b7c47386197e6631a46
+MISC ChangeLog-2015 14670 SHA256 2ef10eddb9a1be131708ee0af8db0abf5d06d3179fe8f9887355a04499050f43 SHA512 5cc4886c2865cb99c5e90d60de96b861cf031fc4a0821c5c75f6b27ee098e980624e5ba78e12224b9ddf5dc54e33ae78939480d00327d0abdc59a994a28d045f WHIRLPOOL b0eab89bee9d39e40a7a8f22f3aa80347a1c9f138c2b3ddcf6fde670d020e9b9c4a65d9115385e0e89435307b0d07e9f14924f0cdcc9fca9b8d4e15d69f354c4
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/lshw/files/lshw-02.16b-gentoo.patch b/sys-apps/lshw/files/lshw-02.16b-gentoo.patch
new file mode 100644
index 000000000000..dfd2c8983704
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.16b-gentoo.patch
@@ -0,0 +1,161 @@
+--- lshw-B.02.16.orig/src/core/Makefile
++++ lshw-B.02.16/src/core/Makefile
+@@ -1,10 +1,9 @@
+ PACKAGENAME?=lshw
+
+-CXX=c++
++CXX?=c++
+ INCLUDES=
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ LDSTATIC=
+ LIBS=
+
+--- lshw-B.02.16.orig/src/gui/Makefile
++++ lshw-B.02.16/src/gui/Makefile
+@@ -1,5 +1,7 @@
+ PACKAGENAME?=lshw
+
++SQLITE?=0
++
+ CXX?=c++
+ CC?=cc
+ STRIP?=strip
+@@ -8,13 +10,14 @@ OBJCOPY?=objcopy
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+ GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
+ INCLUDES=-I../core $(GTKINCLUDES)
+-CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ CFLAGS=$(CXXFLAGS) $(DEFINES)
+ GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
+-LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
+-LDFLAGS=
+-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+- LDFLAGS+= -Wl,--as-needed
++LIBS=-L../core -llshw -lresolv $(GTKLIBS)
++
++ifeq ($(SQLITE), 1)
++ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
++ LIBS+= $(shell pkg-config --libs sqlite3)
+ endif
+
+ OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
+@@ -39,8 +42,7 @@ gtk-$(PACKAGENAME): $(OBJS) ../core/libl
+ $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ install: all
+- $(STRIP) gtk-$(PACKAGENAME)
+-
++
+ clean:
+ rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
+
+--- lshw-B.02.16.orig/src/Makefile
++++ lshw-B.02.16/src/Makefile
+@@ -21,11 +21,11 @@ export SQLITE
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ ifeq ($(SQLITE), 1)
+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
+ endif
+-LDFLAGS=-L./core/ -g
++LDFLAGS += -L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -39,27 +39,25 @@ export CXXFLAGS
+ export LIBS
+ export LDFLAGS
+
+-DATAFILES = pci.ids usb.ids oui.txt manuf.txt
+-
+-all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
++all: $(PACKAGENAME) $(PACKAGENAME).1
+
+ .cc.o:
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ .PHONY: core
+ core:
+- +make -C core all
++ $(MAKE) -C core all
+
+ $(PACKAGENAME): core $(PACKAGENAME).o
+ $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+
+ .PHONY: po
+ po:
+- +make -C po all
++ $(MAKE) -C po all
+
+ .PHONY: gui
+ gui: core
+- +make -C gui all
++ $(MAKE) -C gui all
+
+ .PHONY: nologo
+ nologo:
+@@ -70,7 +68,6 @@ static: $(PACKAGENAME)-static
+
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+ $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+- $(STRIP) $@
+
+ .PHONY: compressed
+ compressed: $(PACKAGENAME)-compressed
+@@ -93,14 +90,13 @@ oui.txt:
+ manuf.txt:
+ wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
+
+-install: all
++install:
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- make -C po install
++ $(MAKE) -C po install
+
+ install-gui: gui
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+@@ -112,8 +108,8 @@ install-gui: gui
+
+ clean:
+ rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
+- make -C core clean
+- make -C gui clean
++ $(MAKE) -C core clean
++ $(MAKE) -C gui clean
+
+ .timestamp:
+ date --utc +%Y%m%d%H%M%S > $@
+--- lshw-B.02.16.orig/src/core/pci.cc
++++ lshw-B.02.16/src/core/pci.cc
+@@ -17,7 +17,7 @@ __ID("@(#) $Id
+
+ #define PROC_BUS_PCI "/proc/bus/pci"
+ #define SYS_BUS_PCI "/sys/bus/pci"
+-#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
++#define PCIID_PATH "/usr/share/misc/pci.ids"
+
+ #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
+ #define PCI_VENDOR_ID 0x00 /* 16 bits */
+--- lshw-B.02.16.orig/src/core/usb.cc
++++ lshw-B.02.16/src/core/usb.cc
+@@ -27,7 +27,7 @@
+
+ #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
+ #define SYSBUSUSBDEVICES "/sys/bus/usb/devices"
+-#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
++#define USBID_PATH "/usr/share/misc/usb.ids"
+
+ #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
+ #define USB_CLASS_AUDIO 1
diff --git a/sys-apps/lshw/files/lshw-02.18b-gentoo.patch b/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
new file mode 100644
index 000000000000..0a50e9dc868c
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
@@ -0,0 +1,161 @@
+--- lshw-B.02.18/src/Makefile
++++ lshw-B.02.18/src/Makefile
+@@ -21,11 +21,11 @@
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ ifeq ($(SQLITE), 1)
+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
+ endif
+-LDFLAGS=-L./core/ -g
++LDFLAGS += -L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -39,27 +39,25 @@
+ export LIBS
+ export LDFLAGS
+
+-DATAFILES = pci.ids usb.ids oui.txt manuf.txt
+-
+-all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
++all: $(PACKAGENAME) $(PACKAGENAME).1
+
+ .cc.o:
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ .PHONY: core
+ core:
+- +make -C core all
++ $(MAKE) -C core all
+
+ $(PACKAGENAME): core $(PACKAGENAME).o
+ $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+
+ .PHONY: po
+ po:
+- +make -C po all
++ $(MAKE) -C po all
+
+ .PHONY: gui
+ gui: core
+- +make -C gui all
++ $(MAKE) -C gui all
+
+ .PHONY: nologo
+ nologo:
+@@ -70,7 +68,6 @@
+
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+ $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+- $(STRIP) $@
+
+ .PHONY: compressed
+ compressed: $(PACKAGENAME)-compressed
+@@ -93,14 +90,13 @@
+ manuf.txt:
+ wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
+
+-install: all
++install:
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- make -C po install
++ $(MAKE) -C po install
+
+ install-gui: gui
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+@@ -112,8 +108,8 @@
+
+ clean:
+ rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
+- make -C core clean
+- make -C gui clean
++ $(MAKE) -C core clean
++ $(MAKE) -C gui clean
+
+ .timestamp:
+ date --utc +%Y%m%d%H%M%S > $@
+--- lshw-B.02.18/src/core/Makefile
++++ lshw-B.02.18/src/core/Makefile
+@@ -1,10 +1,9 @@
+ PACKAGENAME?=lshw
+
+-CXX=c++
++CXX?=c++
+ INCLUDES=
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ LDSTATIC=
+ LIBS=
+
+--- lshw-B.02.18/src/core/pci.cc
++++ lshw-B.02.18/src/core/pci.cc
+@@ -17,7 +17,7 @@
+
+ #define PROC_BUS_PCI "/proc/bus/pci"
+ #define SYS_BUS_PCI "/sys/bus/pci"
+-#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
++#define PCIID_PATH "/usr/share/misc/pci.ids"
+
+ #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
+ #define PCI_VENDOR_ID 0x00 /* 16 bits */
+--- lshw-B.02.18/src/core/usb.cc
++++ lshw-B.02.18/src/core/usb.cc
+@@ -27,7 +27,7 @@
+
+ #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
+ #define SYSKERNELDEBUGUSBDEVICES "/sys/kernel/debug/usb/devices"
+-#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
++#define USBID_PATH "/usr/share/misc/usb.ids"
+
+ #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
+ #define USB_CLASS_AUDIO 1
+--- lshw-B.02.18/src/gui/Makefile
++++ lshw-B.02.18/src/gui/Makefile
+@@ -1,5 +1,7 @@
+ PACKAGENAME?=lshw
+
++SQLITE?=0
++
+ CXX?=c++
+ CC?=cc
+ STRIP?=strip
+@@ -8,14 +10,15 @@
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+ GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
+ INCLUDES=-I../core $(GTKINCLUDES)
+-CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ CFLAGS=$(CXXFLAGS) $(DEFINES)
+ GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
+-LIBS=-L../core -llshw -lresolv $(GTKLIBS)
+-LDFLAGS=
+-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+- LDFLAGS+= -Wl,--as-needed
+-endif
++LIBS=-L../core -llshw -lresolv $(GTKLIBS)
++
++ifeq ($(SQLITE), 1)
++ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
++ LIBS+= $(shell pkg-config --libs sqlite3)
++endif
+
+ OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
+ SRCS = $(OBJS:.o=.c)
+@@ -39,7 +42,6 @@
+ $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ install: all
+- $(STRIP) gtk-$(PACKAGENAME)
+
+ clean:
+ rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
diff --git a/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch b/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
new file mode 100644
index 000000000000..4aea6420d7c1
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
@@ -0,0 +1,31 @@
+patch sent upstream
+
+From 1fb7ebed787ec1b73218c1f12cbb71b103433375 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 14 Mar 2017 22:25:12 -0700
+Subject: [PATCH] fix array access with string translations
+
+The code forgot to rebase the num to 0 before indexing the string array.
+It also provides 5 strings, but was only allowing 4 to be accessed.
+---
+ src/core/dmi.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/dmi.cc b/src/core/dmi.cc
+index 250f48572d54..0db074975f2d 100644
+--- a/src/core/dmi.cc
++++ b/src/core/dmi.cc
+@@ -510,8 +510,8 @@ static const char *dmi_memory_array_location(u8 num)
+ };
+ if (num <= 0x0A)
+ return _(memory_array_location[num]);
+- if (num >= 0xA0 && num < 0xA4)
+- return _(jp_memory_array_location[num]);
++ if (num >= 0xA0 && num <= 0xA4)
++ return _(jp_memory_array_location[num - 0xA0]);
+ return "";
+ }
+
+--
+2.12.0
+
diff --git a/sys-apps/lshw/lshw-02.16b-r2.ebuild b/sys-apps/lshw/lshw-02.16b-r2.ebuild
new file mode 100644
index 000000000000..36348d30564e
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.16b-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit flag-o-matic eutils toolchain-funcs
+
+MAJ_PV=${PV:0:${#PV}-1}
+MIN_PVE=${PV:0-1}
+MIN_PV=${MIN_PVE/b/B}
+
+MY_P="$PN-$MIN_PV.$MAJ_PV"
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk )"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ sqlite? ( dev-db/sqlite:3 )"
+DEPEND="${RDEPEND}
+ gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+RDEPEND="${RDEPEND}
+ sys-apps/hwids"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ local langs
+
+ for i in $(cd po ; echo *.po | sed 's/\.po//') ; do
+ if has ${i} ${LINGUAS} ; then
+ langs+=" ${i}"
+ fi
+ done
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $langs/" \
+ src/po/Makefile || die
+ fi
+}
+
+src_compile() {
+ tc-export CC CXX AR
+ use static && append-ldflags -static
+
+ local sqlite=$(usex sqlite 1 0)
+
+ emake SQLITE=$sqlite all
+ if use gtk ; then
+ emake SQLITE=$sqlite gui
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+ dodoc README docs/*
+ if use gtk ; then
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
+ make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
+ fi
+}
diff --git a/sys-apps/lshw/lshw-02.18b.ebuild b/sys-apps/lshw/lshw-02.18b.ebuild
new file mode 100644
index 000000000000..ce73d9167e88
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.18b.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PLOCALES='fr'
+
+inherit flag-o-matic eutils toolchain-funcs l10n
+
+MAJ_PV=${PV:0:${#PV}-1}
+MIN_PVE=${PV:0-1}
+MIN_PV=${MIN_PVE/b/B}
+
+MY_P="$PN-$MIN_PV.$MAJ_PV"
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk )"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ sqlite? ( dev-db/sqlite:3 )"
+DEPEND="${RDEPEND}
+ gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+RDEPEND="${RDEPEND}
+ sys-apps/hwids"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-02.18b-gentoo.patch
+ "${FILESDIR}"/${PN}-02.18b-gettext-array.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ l10n_find_plocales_changes "src/po" "" ".po" || die
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
+ src/po/Makefile || die
+ sed -i \
+ -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
+ src/Makefile src/gui/Makefile || die
+}
+
+src_compile() {
+ tc-export CC CXX AR PKG_CONFIG
+ use static && append-ldflags -static
+
+ # Need two sep make statements to avoid parallel build issues. #588174
+ local sqlite=$(usex sqlite 1 0)
+ emake SQLITE=${sqlite} all
+ use gtk && emake SQLITE=${sqlite} gui
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
+ dodoc README.md docs/*
+ if use gtk ; then
+ newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
+ make_desktop_entry \
+ "${EPREFIX}"/usr/sbin/gtk-lshw \
+ "${DESCRIPTION}"
+ fi
+}
diff --git a/sys-apps/lshw/metadata.xml b/sys-apps/lshw/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/lshw/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/lssbus/Manifest b/sys-apps/lssbus/Manifest
new file mode 100644
index 000000000000..17994ecf96a1
--- /dev/null
+++ b/sys-apps/lssbus/Manifest
@@ -0,0 +1,5 @@
+DIST lssbus-0.1.tar.gz 13576 SHA256 d88a03ecfeef505cfbe4444013ea46832cf0a3297c34b87e78c494b0e31896e0 SHA512 1eb294329b628463e8914303a60454221ed17554c94a37bf836b1b0ea797b88abc4853e74a0def50e95bc59fefd85f6acd416a5dd06833cf2049a8ee98bd7e80 WHIRLPOOL 1dfb35ed7b17956d6abdb36ecce88db8a33c25d2a75d0e9452cda495ebe8d50e7fc121aa19f36435d56d1993f526b9db7a8f2df85a6b69470d8437ac780bd6c2
+EBUILD lssbus-0.1.ebuild 428 SHA256 b80ab2d7b0629136fd71708c6282890e65e87751429a64be0df0b276e11c3ddd SHA512 e99d851b3be1dd700f3503d6e2ef41a62f643eb8c2585bc40839f7bd29c6b9e342fd2b4928730ec74dac6d35e22612f98139d46436cd8ce1011d6e93ba194cfd WHIRLPOOL 445116d9165a4475ff0a1bc1f8e423fbf9c55843c386b11b69ee027df8a34fabad18ea99f145bb344c5a929340ca059856e868be2e671138fd6cf2042a4a9840
+MISC ChangeLog 2579 SHA256 1d8a5bddf1297e9e6272470a412142a1a0b7e6f2e1c306558e1201d502ab90e0 SHA512 43c3b768b221e33aa8f890dac9b62c26aa97b43e19d538ecb105e193b84c2ce87c2aa2967f40ff12bd987f4251fbe7f4538f0f4b8df400003e43914b8c273bf6 WHIRLPOOL 682958e7ea0a377e1b139749323fcc9a6a09f85d1b3605464f7e4c325b03f22853d0508f267da5a1401ebd5f38a7d67a02e1d40a77c48dac0b5465e384014ac3
+MISC ChangeLog-2015 473 SHA256 f76b9edb8c8a6c9c7c114475307d00c191d94cf36ea349822fe93438fcf06e09 SHA512 0a82c8a814d0542d266b662b82784f635415e9889cc1c6d90a42ead78617cec1fafe9b29a35afa4a42140cee1b68803626d035d25bbb5dd14980d5c7ff4c2629 WHIRLPOOL 0fc67f181096de3b9da8c1f3fa729bc83f689d961a74002ca141ea4f7b86e6ff583ec241e9d1c609cd969f18dfc0f45ad680392cff26ea84ff7cab46c5847d6e
+MISC metadata.xml 346 SHA256 9b56c4a58336c684fde6bd40a4738a60142497ee5a198c3f984731c347049870 SHA512 1f826e90dd909ca1428f771415646b48c0815881abba1a9ae4c23a605b5ea64ac950253ae937c4204dfd42c4e9600f9ee5e76d34fa3df941a2df9a5214ecc985 WHIRLPOOL 39604ad990d227637d4c14bf7a24f03327bd5d9e5f654e879ce3649e7e440161b7670f56f11a357ee68dd6e79447b588bd1277b4597dd7e2888272a4fcb0461d
diff --git a/sys-apps/lssbus/lssbus-0.1.ebuild b/sys-apps/lssbus/lssbus-0.1.ebuild
new file mode 100644
index 000000000000..bbed46cf60e0
--- /dev/null
+++ b/sys-apps/lssbus/lssbus-0.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Small utility for Linux/SPARC that list devices on SBUS"
+HOMEPAGE="https://people.redhat.com/tcallawa/lssbus/"
+SRC_URI="https://people.redhat.com/tcallawa/lssbus/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* sparc"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ dosbin lssbus
+ dodoc COPYING README
+}
diff --git a/sys-apps/lssbus/metadata.xml b/sys-apps/lssbus/metadata.xml
new file mode 100644
index 000000000000..bc4eda024a56
--- /dev/null
+++ b/sys-apps/lssbus/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 type="project">
+ <email>sparc@gentoo.org</email>
+ <name>Sparc Team</name>
+</maintainer>
+<longdescription>
+lssbus is a tool to list sbus devices in a manner similar to lspci.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/makedev/Manifest b/sys-apps/makedev/Manifest
new file mode 100644
index 000000000000..f3524c16ed70
--- /dev/null
+++ b/sys-apps/makedev/Manifest
@@ -0,0 +1,6 @@
+AUX makedev-3.23.1-headers.patch 433 SHA256 6a8b842af468bfed5c91309dcb6243a50446bd8530eece27df5fd0c6aab089c4 SHA512 ffc80692b9bc317c0c14c5e7211155c4a7849967a9a3588a811f21feb6034da264c7aecdb7ce4e67786aa2a28f8d33af381ff410afd118ab44f47edddc421d0d WHIRLPOOL ace403881f0e7fd34b77c17a4dc33aa12f9589d725adc4f914fca5559aad9546e83b015b0b1dff204838d5f4aa90edd0e686cdafcf409ed60eb74d7a6e1af785
+DIST MAKEDEV-3.23-1.tar.gz 122613 SHA256 46cebf1e5e36838a5637bdd2b7af07eb1773599e1288c2d1c777e2875d721965 SHA512 5ca82cdcc4544042ede552370acf6266929fa34d177bd8e831573ccc1c57e06ec87766b9e60a686ec1449b204ae0ac3c048eab32b57ce8d610366219d3a77dbc WHIRLPOOL fa11a2e0a143755af7c877171f67a95f6ea566cf0e9e8218bd412b98e75e50763e06cfc1c659527596a50f39cc905a3484f2fd5578a96d6389c7dc22ecadd103
+EBUILD makedev-3.23.1.ebuild 1377 SHA256 d6dbcbb5231f43e037af677785c10bfc1b85e5036519826536ad277d2185274c SHA512 6dd5eb8d3d1bcbe7d459bcebd0eb69e9dbdbb69c6d42e4231bfd0f46261b5f3fd99e9084217c56011a8036f477429accf6e355e21ef0e1613d8e4358ac921b60 WHIRLPOOL 900cd49b2e5109efe980e84305995cdcb0696ae39b0fa19fb4e499e6ba9c1adce3cdccf77b1089e369849340b2bb984a6cf6e6b57b6d0974477a684942fb064f
+MISC ChangeLog 3251 SHA256 5767ab5de5cb508da51e1389af9605685a842c18c5991398fc354f0fd371a520 SHA512 60a840de23d2ff025ee4b643ddbebbdbe14fd08ce4f5fa520b4f42d7c2332f53b5ce759383dfb83e79fb9db437cc2a147c73cbc5285149d5ebb5e90bafc48020 WHIRLPOOL 559404e2b8b300f95835e636adcca8b97c84ca6c6c146acdf9f3aa0c164d0ccab7ea979ef39d4fb410961459978fb8f52ce3fb96da56b4be3b8e7a2f304ad451
+MISC ChangeLog-2015 2344 SHA256 efeb9a1be38752d052c3126e980314f35dd4edf9dfbd17eb968dabc4332ca18c SHA512 329dc869c068370f3367a113c605f99119dd6810d7f0f8d66cb221de4beec7b53c98a8d850386d52391b55071eaccd607595a927ebd64a77e9f33f771d5198f8 WHIRLPOOL 4830be71933f555b02a0e7c9f20be6252d04375e37cb4f39e5245821643a437c68dc997a11a39ed364546d351286f8c090018e9fab0fd93a2e047120255d6f2e
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/makedev/files/makedev-3.23.1-headers.patch b/sys-apps/makedev/files/makedev-3.23.1-headers.patch
new file mode 100644
index 000000000000..981a80b14ed5
--- /dev/null
+++ b/sys-apps/makedev/files/makedev-3.23.1-headers.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/339674
+
+--- a/sel.h
++++ b/sel.h
+@@ -18,6 +18,7 @@
+ */
+
+ #ifdef MAKEDEV_SELINUX
++#include <limits.h>
+ #include <selinux/selinux.h>
+ static char secontextname[PATH_MAX + 2];
+ static char secontextflag[PATH_MAX + 7];
+
+https://bugs.gentoo.org/580500
+
+--- a/MAKEDEV.c
++++ b/MAKEDEV.c
+@@ -17,6 +17,7 @@
+ *
+ */
+
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
diff --git a/sys-apps/makedev/makedev-3.23.1.ebuild b/sys-apps/makedev/makedev-3.23.1.ebuild
new file mode 100644
index 000000000000..a2b5d6f17d4c
--- /dev/null
+++ b/sys-apps/makedev/makedev-3.23.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+MY_PN="MAKEDEV"
+MY_VER=${PV%.*}
+MY_REL=${PV#${MY_VER}.}
+MY_P="${MY_PN}-${MY_VER}"
+DESCRIPTION="program used for creating device files in /dev"
+HOMEPAGE="https://people.redhat.com/nalin/MAKEDEV/"
+SRC_URI="https://people.redhat.com/nalin/MAKEDEV/${MY_P}-${MY_REL}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="build selinux"
+
+RDEPEND="!<sys-apps/baselayout-2.0.0_rc"
+DEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-headers.patch #339674
+}
+
+src_compile() {
+ use selinux && export SELINUX=1
+ emake CC="$(tc-getCC)" OPTFLAGS="${CFLAGS}" || die
+}
+
+src_install() {
+ # set devdir to makedevdir so we dont have to worry about /dev
+ emake install DESTDIR="${D}" makedevdir=/sbin devdir=/sbin || die
+ dodoc *.txt
+ keepdir /dev
+}
+
+pkg_postinst() {
+ if use build ; then
+ # set up a base set of nodes to make recovery easier #368597
+ "${ROOT}"/sbin/MAKEDEV -c "${ROOT}"/etc/makedev.d \
+ -d "${ROOT}"/dev console hda input ptmx std sd tty
+ # trim useless nodes
+ rm -f "${ROOT}"/dev/fd[0-9]* # floppy
+ rm -f "${ROOT}"/dev/sd[a-d][a-z]* "${ROOT}"/dev/sd[e-z]* # excess sata/scsi
+ rm -f "${ROOT}"/dev/tty[a-zA-Z]* # excess tty
+ fi
+}
diff --git a/sys-apps/makedev/metadata.xml b/sys-apps/makedev/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/makedev/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/man-db/Manifest b/sys-apps/man-db/Manifest
new file mode 100644
index 000000000000..c73dc890769f
--- /dev/null
+++ b/sys-apps/man-db/Manifest
@@ -0,0 +1,6 @@
+AUX man-db.cron 217 SHA256 5b2e690a12e6c5335ca3e7d180baa367d54adf18647f0e4a821f14b0ae45ade0 SHA512 81a7082d7f0cdf17d8277af7142aaa98feb8c12cf41bb96c12af53fdd3e436a4d15a57ef76fb90390133cfdb25e1bb1b16e17a39b39b6517afc529b871426331 WHIRLPOOL bda82f5a771cbe68077430798fdb9cacf9d2011f2ae598cba164bf0a2fb95c30348bba94208f78112cfd8bf19741c13699b940650b5c29755a2c13d39e56abe6
+DIST man-db-2.7.6.1.tar.xz 1541316 SHA256 08edbc52f24aca3eebac429b5444efd48b9b90b9b84ca0ed5507e5c13ed10f3f SHA512 623c5e7f8b7c289908b2c926f8777293b8d39aeceef0d2509d701a8b0bfa81408650f655c8608318221786c751a79ee91124b07993de5298cd7fa6d8bb737301 WHIRLPOOL 10ca0e397a53354ba6687c4057c8d8b7f57c0a97b806727ee05285a5aa1d8f2d17eae9f532b0edb364edde149108c765f812e4ecd6a28932cdceef56e0b5dbee
+EBUILD man-db-2.7.6.1-r2.ebuild 3145 SHA256 d69d4a0bd97c49bdbc87543269e4111394a7ef6f49020a4001a771649a0951a2 SHA512 323d3f53ce81d65d6012b310db9b31acb732bb457b0cd1a5e36d5d741668006711e3ed6ca4155c189c0ae59dd747ee36c67c63563ff08a3df0fb06100eac8651 WHIRLPOOL 64b1cff7a4286fd2a09b620be4519a0753cbef2aff3a6f4f9cda5dbba0fb3a3d025a5f5685a4228d23bb3aaefae96d7a13d9d8f99c25600256488ee58687aad0
+MISC ChangeLog 9327 SHA256 cb45d2db7d1cbf34fdbf354f7a6673b5556dbbe81ac6082ef1ee1994fec4ae8f SHA512 aa4100bd98703ab350cea86f9b73c6d8088e6a3f91eaa073db809d079d964387e53038a4438081bf939d06f1addf4d40332847556c0ff8c699b2ad8d2719c2e8 WHIRLPOOL 6fccb055c9e7e41e0c8078940353033c7f1154fc7f7c5c0b9671e0ecc2991c35195aa0e1ff53a52e157b8dd16a7909b76d932ccc210239c9231e24190d51eaa1
+MISC ChangeLog-2015 10778 SHA256 61a539cf1188343ade360c912c661e1519caecb69a988ca71a72851112a5522a SHA512 81a3235e84a62bc6f8d14c753676d1263f93d76707ab0ea4d02f0c445c34c45b0f4ae3a6e81152186abd81a99ca3d414874214cdcd7cfc7261d84d2f664e2e76 WHIRLPOOL 0fa35ef0a80cf94f055c16cb547be92ecbbeaa1bff2d03b48b74e14817fb118a5859d75a02e1c32fce7ed7396b3a062172e88a207a87d7fd3431b62122acf961
+MISC metadata.xml 342 SHA256 c81419f3ac855515743a636bfbd46d0534455d7d2d20f46e907f95dcd04af484 SHA512 553cf56ab0b3b6c9403612a7ccd1db073f557b432c68d60adb4716169250a9986b4c112023f6ae200a6fbc2df31cdafd9ab08e04d92ca35cffb81f690bd43d79 WHIRLPOOL 155a9ad5b173dd5ac75e4c93315b0ddd9ba5ec6299a778c63e2281f7aed499cae99e573585270fdd5d7e29b93160ac967785eeeaa78f9a933147764d56107fff
diff --git a/sys-apps/man-db/files/man-db.cron b/sys-apps/man-db/files/man-db.cron
new file mode 100644
index 000000000000..b3794f255734
--- /dev/null
+++ b/sys-apps/man-db/files/man-db.cron
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Use same perms/settings as the ebuild.
+cachedir="/var/cache/man"
+if [ ! -d "${cachedir}" ]; then
+ mkdir -p "${cachedir}"
+ chown man:man "${cachedir}"
+ chmod 0755 "${cachedir}"
+fi
+
+exec nice mandb --quiet
diff --git a/sys-apps/man-db/man-db-2.7.6.1-r2.ebuild b/sys-apps/man-db/man-db-2.7.6.1-r2.ebuild
new file mode 100644
index 000000000000..11c66d57a07f
--- /dev/null
+++ b/sys-apps/man-db/man-db-2.7.6.1-r2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user versionator
+
+DESCRIPTION="a man replacement that utilizes berkdb instead of flat files"
+HOMEPAGE="http://www.nongnu.org/man-db/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="berkdb +gdbm +manpager nls selinux static-libs zlib"
+
+CDEPEND=">=dev-libs/libpipeline-1.4.0
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ !berkdb? ( !gdbm? ( sys-libs/gdbm ) )
+ sys-apps/groff
+ zlib? ( sys-libs/zlib )
+ !sys-apps/man"
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? (
+ >=app-text/po4a-0.45
+ sys-devel/gettext
+ )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-mandb )
+"
+PDEPEND="manpager? ( app-text/manpager )"
+
+pkg_setup() {
+ # Create user now as Makefile in src_install does setuid/chown
+ enewgroup man 15
+ enewuser man 13 -1 /usr/share/man man
+
+ if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150
+ ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings"
+ fi
+}
+
+src_configure() {
+ export ac_cv_lib_z_gzopen=$(usex zlib)
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d \
+ --enable-setuid \
+ --enable-cache-owner=man \
+ --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm))
+
+ # Disable color output from groff so that the manpager can add it. #184604
+ sed -i \
+ -e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \
+ src/man_db.conf || die
+}
+
+src_install() {
+ default
+ dodoc docs/{HACKING,TODO}
+ prune_libtool_files
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/man-db.cron man-db #289884
+}
+
+pkg_preinst() {
+ local cachedir="${EROOT}var/cache/man"
+ # If the system was already exploited, and the attacker is hiding in the
+ # cachedir of the old man-db, let's wipe them out.
+ # see bug #602588 comment 18
+ local _replacing_version=
+ local _setgid_vuln=0
+ for _replacing_version in ${REPLACING_VERSIONS}; do
+ if version_is_at_least '2.7.6.1-r2' "${_replacing_version}"; then
+ debug-print "Skipping security bug #602588 ... existing installation (${_replacing_version}) should not be affected!"
+ else
+ _setgid_vuln=1
+ debug-print "Applying cleanup for security bug #602588"
+ fi
+ done
+ [[ ${_setgid_vuln} -eq 1 ]] && rm -rf "${cachedir}"
+
+ # Fall back to recreating the cachedir
+ if [[ ! -d ${cachedir} ]] ; then
+ mkdir -p "${cachedir}" || die
+ chown man:man "${cachedir}" || die
+ fi
+
+ # Update the whatis cache
+ if [[ -f ${cachedir}/whatis ]] ; then
+ einfo "Cleaning ${cachedir} from sys-apps/man"
+ find "${cachedir}" -type f '!' '(' -name index.bt -o -name index.db ')' -delete
+ fi
+}
+
+pkg_postinst() {
+ if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then
+ einfo "Rebuilding man-db from scratch with new database format!"
+ mandb --quiet --create
+ fi
+}
diff --git a/sys-apps/man-db/metadata.xml b/sys-apps/man-db/metadata.xml
new file mode 100644
index 000000000000..c4bde0209254
--- /dev/null
+++ b/sys-apps/man-db/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="manpager">Enable manpager wrapper for colorizing output</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/man-pages-posix/Manifest b/sys-apps/man-pages-posix/Manifest
new file mode 100644
index 000000000000..70699821bc9d
--- /dev/null
+++ b/sys-apps/man-pages-posix/Manifest
@@ -0,0 +1,5 @@
+DIST man-pages-posix-2013-a.tar.xz 930736 SHA256 19633a5c75ff7deab35b1d2c3d5b7748e7bd4ef4ab598b647bb7e7f60b90a808 SHA512 e6ec8eb57269fadf368aeaac31b5a98b9c71723d4d5cc189f9c4642d6e865c88e44f77481dccbdb72e31526488eb531f624d455016361687a834ccfcac19fa14 WHIRLPOOL d2dcd2c09e0696f8eaffec7b2c64b73e1fc2965edfd45c2e0b547acb6035ce6ac60cf3cc247dd3754050fc7520adf04e7ba0a411605206cfead2d15d05d67665
+EBUILD man-pages-posix-2013a.ebuild 783 SHA256 eeceb6148ed0454fb2ecbcbaff92eb2ee7ea31152220811e258fe27f1a32e7f0 SHA512 8d0d1d6a53cb78e892bebb474c7763c8f5366e6182ac9b36ec60339636bb969688a0bd72dc32aa9698a928d9c68d634ce3ba7b236dc546a5c342c91c3bbf1998 WHIRLPOOL 67150fc938f8a502a3b3dc8e2d0d7a521d8290bd68e681875ed7972674c7782068922adcebefa83e1224858f26978726332a05a4c9b3c11adc14d443ec38ea96
+MISC ChangeLog 3159 SHA256 7f1fb078f08836fea02d4ca70c40315546522b0d1b179332421b7f073b6a0ae0 SHA512 7e7dc6db6fba47778f99d55eb6ab005a215fb953a6def3ed641168e93d4f6bf6a571767dfd4531e100ded144afb27c7c46a2f770efeac9918d9109b829ba79e3 WHIRLPOOL 7f35d1c562c937e6a273f38fee18d01df2d92c758d5c7fc3f155d107bd40605d498c39e74a6a3e24437f91dbef9f4655c91eba24b67216552c7a1443dc8d2ece
+MISC ChangeLog-2015 2601 SHA256 52b2222f71227a08f4824846214ef06012c05914b33e560e29694c6c5ee54b4d SHA512 c001e8c8b0f55b53c59586f951541d4c2526aca456a0f15e7ff11f51770216046d8c1df703f0a03ff9b0a815bbc1717133e24a693e714cfddf01442e3753cd34 WHIRLPOOL 2c108eb829e3785c5cb5112ed66b6f10ac7886f90d476fa11000f8a5ef38a1e5d2b6f36e6976afb035bd9479cadc3d49b07ef5a4e4a454c8f6427bdace317ac9
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/man-pages-posix/man-pages-posix-2013a.ebuild b/sys-apps/man-pages-posix/man-pages-posix-2013a.ebuild
new file mode 100644
index 000000000000..7e6d878f0611
--- /dev/null
+++ b/sys-apps/man-pages-posix/man-pages-posix-2013a.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+MY_P="${PN}-${PV:0:4}-${PV:0-1}"
+DESCRIPTION="POSIX man-pages (0p, 1p, 3p)"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/${PN}/${MY_P}.tar.xz"
+
+LICENSE="man-pages-posix-2013"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+RESTRICT="binchecks"
+
+RDEPEND="virtual/man !<sys-apps/man-pages-3"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() { :; }
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install DESTDIR="${ED}" || die
+ dodoc man-pages-*.Announce README
+}
diff --git a/sys-apps/man-pages-posix/metadata.xml b/sys-apps/man-pages-posix/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/man-pages-posix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/man-pages/Manifest b/sys-apps/man-pages/Manifest
new file mode 100644
index 000000000000..d28314481188
--- /dev/null
+++ b/sys-apps/man-pages/Manifest
@@ -0,0 +1,14 @@
+DIST man-pages-4.09.tar.xz 1521560 SHA256 a574a08e4a62a24dc639cb4ee3e7aa68e7cd8ef2c14a5d54b90d09ac137e809c SHA512 695f90b9f4721d041de0441e240afce88e49f4ea5ffea855262da3cdd0f3f2b6401f2728786da3afa2245aef84d41c0c449415e7e78e408b69c9214ddb4c74ad WHIRLPOOL 6b937d95cbefddf94658a54ec8cc820f7a970830ecc0857cc36577946586084a13fadc7cbcf48c5eddc31b6cc9b2f3b08509b33b1b96e023f0e07927d8c9ec97
+DIST man-pages-4.10.tar.xz 1556948 SHA256 7395dfc391d545385a998d23df9accb60f2020451c53940eaf8a07b6ea8a63fa SHA512 6c5b8e1339a02054a5346ca3ff665c414ef178e69fe0d064d4ad7dc372ba364df2753bf605a682cc366c12661c42b9fd17567c72a0f24173f9b086d79cf354d4 WHIRLPOOL d15515e5525797bb40b9d640ad130e82998d2a07e8464231ad422f5b2e38228c60616223cdb8bbb208edef6eed509374efe10db8ec414ca7157168836a1bbc0a
+DIST man-pages-4.11.tar.xz 1574380 SHA256 adde80495f5efb26d077f4e5309bafdc4859e080b7529263720f7cb5f403f524 SHA512 cc1282467255d5c078b099ab6dbc407c5f56fa66fb3f5789286bc66c98b229cae88bf8afdafa7c9609a37c87cdb1401bb381cec25c64690ab69faf4d00787187 WHIRLPOOL 31fb2e76223861fe03d2c00a25d161716c0b603dff41731ee8665856ecc6625e8b5d568e17e40453ac12ca7ee1ac9b68b01a5394c4c61b0f2b104280d4cd1b23
+DIST man-pages-4.12.tar.xz 1583664 SHA256 6f6d79d991fed04e16e7c7a15705304b0b9d51de772c51c57428555039fbe093 SHA512 03ab6fb4d3136ef31add16859706f965f954249bd0a44250c8a081b3e1260dce74d50112f1f56af079c08c46049aeaa71b48ccb7d1a3e57a1fc4a495c38647ce WHIRLPOOL 698112ec2b53922bdae7055f72c68310466d1541da6ae111be400a09c5c6c43bc6fecbc2ec25390160dfe8d788e51fbe5aad8d535f9570ce2f75dfbe82bee399
+DIST man-pages-4.13.tar.xz 1593424 SHA256 d5c005c5b653248ab6680560de00ea8572ff39e48a57bd5be1468d986a0631bf SHA512 86479372cbe2ba5fcad3e2049f52ec788a4aa2d8056cadf7b248eaa776064e1c9387a42d0a77f4bde4385214c11aac117b1e99745459260ca639c656c01698b7 WHIRLPOOL 6d2180f32d31d52eba2d82768edf384593a85c831892ce195f1e3f4b32ff047b6ab1dee927f61b942486b9e83c435e774773d7618dfc96b5736bfea0aae2f11e
+DIST man-pages-gentoo-2.tar.bz2 5141 SHA256 b7d9423c2069e587deb7671273d4a1ffed7d31b9f95a689b128a759d636762f0 SHA512 6e6524b8ad6f1b8c9b147665ee32af49e05603dac61d433acd6b4f1164adef27cd542898f272b07d8659725013dac59c7f34a858968cc054a4785c945e14a770 WHIRLPOOL dcacb319a54ccd2a965786c816684de286581dee6f7b3f8ba4c97cc368e2e50abc92aad403dbdb7b0c15764accb06cd562046bcf14229ad12be242bb2bc7f651
+EBUILD man-pages-4.09.ebuild 1621 SHA256 6c1f28eda315330bd2455661988a8732fcf2fbe33ed18a022ebe01cbda22f14d SHA512 6f6ea6f112514a64ffb90ad4be93e5106ac88558037619b3c6532833fd988ebae8029680e4aa2dfd6e4ec3c901369d4f09674cb98e6c3d703883697ed5163646 WHIRLPOOL b10a28bf435675d0bb4d10f3da00275a8b92c13191e2401465ebb3ad998c8750c76bfcb8d9b0d386768f21ea1cbf95b46e24684731c2f9f5a694682484ef6e3f
+EBUILD man-pages-4.10.ebuild 1672 SHA256 d9b499135a7dd2c0f00a2cde96659eefc1a375230b795c629213ed918289b89f SHA512 b4740db0a08368d4437de045e0c731c53977818083846cf09b47eb398a67cbe17790c74376ac526eb68ffa46198637d64647ba0ffe5b6d805d7c3eba47482cf8 WHIRLPOOL c0e1731cece147781f4e4502fc1a9db3ed5c82bb2580f7d160380ac5589af3cd33e8bdc8611ff4e8c964c29a3eb30da647614417320ce0d689fa1eeb6e71adfb
+EBUILD man-pages-4.11.ebuild 1708 SHA256 43607e0c8bf40e3c0c674cdcb66b55cc0afa51ddc0857a7e595cddfe2ca1594e SHA512 79d8ada8174877aa2fb081fd5ca70c4f812644e802cb469b3e12f34f8db434cb1a97000f999e8ec5679005c67fa289fc8a4423e6e5de15324f35d0d0ada200a5 WHIRLPOOL 5d085bbb88846a9abcb7b80ac3189763d8d4aae4754c8d26abaea7e577bdb9bf30f371502f22462053c1fbc46cbba0b485c2e767f0b31802f1674dbb56292825
+EBUILD man-pages-4.12.ebuild 1708 SHA256 43607e0c8bf40e3c0c674cdcb66b55cc0afa51ddc0857a7e595cddfe2ca1594e SHA512 79d8ada8174877aa2fb081fd5ca70c4f812644e802cb469b3e12f34f8db434cb1a97000f999e8ec5679005c67fa289fc8a4423e6e5de15324f35d0d0ada200a5 WHIRLPOOL 5d085bbb88846a9abcb7b80ac3189763d8d4aae4754c8d26abaea7e577bdb9bf30f371502f22462053c1fbc46cbba0b485c2e767f0b31802f1674dbb56292825
+EBUILD man-pages-4.13.ebuild 1708 SHA256 43607e0c8bf40e3c0c674cdcb66b55cc0afa51ddc0857a7e595cddfe2ca1594e SHA512 79d8ada8174877aa2fb081fd5ca70c4f812644e802cb469b3e12f34f8db434cb1a97000f999e8ec5679005c67fa289fc8a4423e6e5de15324f35d0d0ada200a5 WHIRLPOOL 5d085bbb88846a9abcb7b80ac3189763d8d4aae4754c8d26abaea7e577bdb9bf30f371502f22462053c1fbc46cbba0b485c2e767f0b31802f1674dbb56292825
+MISC ChangeLog 7711 SHA256 87b40ee151bba3dfd65259e3faabb9910619066898c46f57ea9b447648236f04 SHA512 c79cc4f6d22bacdef20f6248f9e6be0e96a4fbbe3daf3b17065bd79c4ff93d44c58fdac92b7a50f4ebc33860c9bfc2323a67ed73a50660c7fa674634ce76b2d1 WHIRLPOOL 959157dfc863415fed27f8e8e11c9bb3b5c01d8a559284a0af4ef154a4f2457cd35b75dc8aa9e826b794b4f9a6ebd9ffac8ad5ee69185e547fb0f2145da0f357
+MISC ChangeLog-2015 32780 SHA256 d47f4d1f1d9a784b8181fef378eb0604dbfd39ada83eb90e7972061c66e2d759 SHA512 ef79e581aeadee729f57c1642421ce02d5d3b7d0e85a164d0a092e74fb9be3576bf0ca98ff899ea5e52866fb88f4f469806de8e677567557b5607c5a21593496 WHIRLPOOL 0bf669d8ddf8b182aaceaccc4ea604d5c32fb9449f3e60b7bad0a0727d6f9bee457ddc8c1accac8ed6ed8ee6dfd6d8a03cb5e8427f76a76471e2570f54b7c7c5
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/man-pages/man-pages-4.09.ebuild b/sys-apps/man-pages/man-pages-4.09.ebuild
new file mode 100644
index 000000000000..02403e5770ee
--- /dev/null
+++ b/sys-apps/man-pages/man-pages-4.09.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+GENTOO_PATCH=2
+
+DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/Archive/${P}.tar.xz
+ mirror://kernel/linux/docs/man-pages/${P}.tar.xz
+ mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
+ https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2"
+
+LICENSE="man-pages GPL-2+ BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE_L10N=" da de fr it ja nl pl ro ru zh-CN"
+IUSE="nls ${IUSE_L10N// / l10n_}"
+RESTRICT="binchecks"
+
+# Block packages that used to install colliding man pages #341953 #548900
+RDEPEND="virtual/man
+ !<sys-apps/attr-2.4.47-r2
+ !<dev-libs/libaio-0.3.109-r2"
+PDEPEND="nls? (
+ l10n_da? ( app-i18n/man-pages-da )
+ l10n_de? ( app-i18n/man-pages-de )
+ l10n_fr? ( app-i18n/man-pages-fr )
+ l10n_it? ( app-i18n/man-pages-it )
+ l10n_ja? ( app-i18n/man-pages-ja )
+ l10n_nl? ( app-i18n/man-pages-nl )
+ l10n_pl? ( app-i18n/man-pages-pl )
+ l10n_ro? ( app-i18n/man-pages-ro )
+ l10n_ru? ( app-i18n/man-pages-ru )
+ l10n_zh-CN? ( app-i18n/man-pages-zh_CN )
+ )
+ sys-apps/man-pages-posix"
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
+ dodoc man-pages-*.Announce README Changes*
+
+ # Override with Gentoo specific or additional Gentoo pages
+ cd "${WORKDIR}"/man-pages-gentoo
+ doman */*
+ dodoc README.Gentoo
+}
diff --git a/sys-apps/man-pages/man-pages-4.10.ebuild b/sys-apps/man-pages/man-pages-4.10.ebuild
new file mode 100644
index 000000000000..ddfd9b5a5b60
--- /dev/null
+++ b/sys-apps/man-pages/man-pages-4.10.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+GENTOO_PATCH=2
+
+DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/Archive/${P}.tar.xz
+ mirror://kernel/linux/docs/man-pages/${P}.tar.xz
+ mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
+ https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2"
+
+LICENSE="man-pages GPL-2+ BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE_L10N=" da de fr it ja nl pl ro ru zh-CN"
+IUSE="nls ${IUSE_L10N// / l10n_}"
+RESTRICT="binchecks"
+
+# Block packages that used to install colliding man pages #341953 #548900 #612640
+RDEPEND="virtual/man
+ !<sys-apps/keyutils-1.5.9-r3
+ !<sys-apps/attr-2.4.47-r2
+ !<dev-libs/libaio-0.3.109-r2"
+PDEPEND="nls? (
+ l10n_da? ( app-i18n/man-pages-da )
+ l10n_de? ( app-i18n/man-pages-de )
+ l10n_fr? ( app-i18n/man-pages-fr )
+ l10n_it? ( app-i18n/man-pages-it )
+ l10n_ja? ( app-i18n/man-pages-ja )
+ l10n_nl? ( app-i18n/man-pages-nl )
+ l10n_pl? ( app-i18n/man-pages-pl )
+ l10n_ro? ( app-i18n/man-pages-ro )
+ l10n_ru? ( app-i18n/man-pages-ru )
+ l10n_zh-CN? ( app-i18n/man-pages-zh_CN )
+ )
+ sys-apps/man-pages-posix"
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
+ dodoc man-pages-*.Announce README Changes*
+
+ # Override with Gentoo specific or additional Gentoo pages
+ cd "${WORKDIR}"/man-pages-gentoo
+ doman */*
+ dodoc README.Gentoo
+}
diff --git a/sys-apps/man-pages/man-pages-4.11.ebuild b/sys-apps/man-pages/man-pages-4.11.ebuild
new file mode 100644
index 000000000000..257d28c42577
--- /dev/null
+++ b/sys-apps/man-pages/man-pages-4.11.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+GENTOO_PATCH=2
+
+DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/Archive/${P}.tar.xz
+ mirror://kernel/linux/docs/man-pages/${P}.tar.xz
+ mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
+ https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2"
+
+LICENSE="man-pages GPL-2+ BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE_L10N=" da de fr it ja nl pl ro ru zh-CN"
+IUSE="nls ${IUSE_L10N// / l10n_}"
+RESTRICT="binchecks"
+
+# Block packages that used to install colliding man pages #341953 #548900 #612640 #617462
+RDEPEND="virtual/man
+ !<sys-apps/keyutils-1.5.9-r3
+ !<sys-apps/attr-2.4.47-r2
+ !<dev-libs/libaio-0.3.109-r2
+ !<dev-libs/libbsd-0.8.3-r1"
+PDEPEND="nls? (
+ l10n_da? ( app-i18n/man-pages-da )
+ l10n_de? ( app-i18n/man-pages-de )
+ l10n_fr? ( app-i18n/man-pages-fr )
+ l10n_it? ( app-i18n/man-pages-it )
+ l10n_ja? ( app-i18n/man-pages-ja )
+ l10n_nl? ( app-i18n/man-pages-nl )
+ l10n_pl? ( app-i18n/man-pages-pl )
+ l10n_ro? ( app-i18n/man-pages-ro )
+ l10n_ru? ( app-i18n/man-pages-ru )
+ l10n_zh-CN? ( app-i18n/man-pages-zh_CN )
+ )
+ sys-apps/man-pages-posix"
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
+ dodoc man-pages-*.Announce README Changes*
+
+ # Override with Gentoo specific or additional Gentoo pages
+ cd "${WORKDIR}"/man-pages-gentoo
+ doman */*
+ dodoc README.Gentoo
+}
diff --git a/sys-apps/man-pages/man-pages-4.12.ebuild b/sys-apps/man-pages/man-pages-4.12.ebuild
new file mode 100644
index 000000000000..257d28c42577
--- /dev/null
+++ b/sys-apps/man-pages/man-pages-4.12.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+GENTOO_PATCH=2
+
+DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/Archive/${P}.tar.xz
+ mirror://kernel/linux/docs/man-pages/${P}.tar.xz
+ mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
+ https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2"
+
+LICENSE="man-pages GPL-2+ BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE_L10N=" da de fr it ja nl pl ro ru zh-CN"
+IUSE="nls ${IUSE_L10N// / l10n_}"
+RESTRICT="binchecks"
+
+# Block packages that used to install colliding man pages #341953 #548900 #612640 #617462
+RDEPEND="virtual/man
+ !<sys-apps/keyutils-1.5.9-r3
+ !<sys-apps/attr-2.4.47-r2
+ !<dev-libs/libaio-0.3.109-r2
+ !<dev-libs/libbsd-0.8.3-r1"
+PDEPEND="nls? (
+ l10n_da? ( app-i18n/man-pages-da )
+ l10n_de? ( app-i18n/man-pages-de )
+ l10n_fr? ( app-i18n/man-pages-fr )
+ l10n_it? ( app-i18n/man-pages-it )
+ l10n_ja? ( app-i18n/man-pages-ja )
+ l10n_nl? ( app-i18n/man-pages-nl )
+ l10n_pl? ( app-i18n/man-pages-pl )
+ l10n_ro? ( app-i18n/man-pages-ro )
+ l10n_ru? ( app-i18n/man-pages-ru )
+ l10n_zh-CN? ( app-i18n/man-pages-zh_CN )
+ )
+ sys-apps/man-pages-posix"
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
+ dodoc man-pages-*.Announce README Changes*
+
+ # Override with Gentoo specific or additional Gentoo pages
+ cd "${WORKDIR}"/man-pages-gentoo
+ doman */*
+ dodoc README.Gentoo
+}
diff --git a/sys-apps/man-pages/man-pages-4.13.ebuild b/sys-apps/man-pages/man-pages-4.13.ebuild
new file mode 100644
index 000000000000..257d28c42577
--- /dev/null
+++ b/sys-apps/man-pages/man-pages-4.13.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+GENTOO_PATCH=2
+
+DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
+HOMEPAGE="https://www.kernel.org/doc/man-pages/"
+SRC_URI="mirror://kernel/linux/docs/man-pages/Archive/${P}.tar.xz
+ mirror://kernel/linux/docs/man-pages/${P}.tar.xz
+ mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
+ https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2"
+
+LICENSE="man-pages GPL-2+ BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE_L10N=" da de fr it ja nl pl ro ru zh-CN"
+IUSE="nls ${IUSE_L10N// / l10n_}"
+RESTRICT="binchecks"
+
+# Block packages that used to install colliding man pages #341953 #548900 #612640 #617462
+RDEPEND="virtual/man
+ !<sys-apps/keyutils-1.5.9-r3
+ !<sys-apps/attr-2.4.47-r2
+ !<dev-libs/libaio-0.3.109-r2
+ !<dev-libs/libbsd-0.8.3-r1"
+PDEPEND="nls? (
+ l10n_da? ( app-i18n/man-pages-da )
+ l10n_de? ( app-i18n/man-pages-de )
+ l10n_fr? ( app-i18n/man-pages-fr )
+ l10n_it? ( app-i18n/man-pages-it )
+ l10n_ja? ( app-i18n/man-pages-ja )
+ l10n_nl? ( app-i18n/man-pages-nl )
+ l10n_pl? ( app-i18n/man-pages-pl )
+ l10n_ro? ( app-i18n/man-pages-ro )
+ l10n_ru? ( app-i18n/man-pages-ru )
+ l10n_zh-CN? ( app-i18n/man-pages-zh_CN )
+ )
+ sys-apps/man-pages-posix"
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
+ dodoc man-pages-*.Announce README Changes*
+
+ # Override with Gentoo specific or additional Gentoo pages
+ cd "${WORKDIR}"/man-pages-gentoo
+ doman */*
+ dodoc README.Gentoo
+}
diff --git a/sys-apps/man-pages/metadata.xml b/sys-apps/man-pages/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/man-pages/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/man/Manifest b/sys-apps/man/Manifest
new file mode 100644
index 000000000000..1a218613aa95
--- /dev/null
+++ b/sys-apps/man/Manifest
@@ -0,0 +1,20 @@
+AUX makewhatis.cron 115 SHA256 3e7f377a6c9ecdeff6e85f918993a4af0cf8bb5bcc63bf7a35e6426d50e434a4 SHA512 378f1980da40d67d82e3ed6a8d470df58180ca3eeee1d9f6df5d8eec7101461ee0af2f5d7c1da81af086f0aad0665bdffd4c6ee65418dff5f7c187a39b2e79b8 WHIRLPOOL edead434db104a859f8d325451e6da42920ad76ba218224563294396638a1c35dd3f0436d3195646a0b12a9869f084dff3a667a2938617c4036042fa57640bbf
+AUX man-1.5m2-apropos.patch 450 SHA256 c524c12eaa1f40e26eba40e3c6b88b32b5b24bd4cb75d2ba9a0361a539877ec9 SHA512 cf8c5f6debe6de3a424d1b4cb4cd234e2524477150fb726f7dc659ed436d491c0506649f63d06f1b825765d48e18736ef6476dcbbb27aabe1d1a3b47d7bf7317 WHIRLPOOL 95f64f954b9a963392bdc75bc82e76562bcff10ed9cb4ec4c102123c02b4b6df9a5bf366a194e106a734603b3bb9867c412e2fb3a1ab0bdfb63fac9229419a95
+AUX man-1.6-cross-compile.patch 1744 SHA256 ddc610cde46bd13e86802db0b86c21200c5695b88c9b660e386cd8c0a7d03540 SHA512 8be42b2ac831d7ba7de7e2f54c0b5d4ca2d1c88e6b3125b0bb2b9996c15daaf659f3e4e1c9edf05bf9628ea9e043cb9781e05987dcb34abb3c937b19d4787204 WHIRLPOOL 14d51eb9ab1495f65957d5a54ea9f9fc1a18a21e108637160c5af849e4f4175fbc5408e9dff2ee4e6b6864578c205972d3c71f728a911819dd9bef44925781c2
+AUX man-1.6c-cut-duplicate-manpaths.patch 2148 SHA256 a9557114725da765265891a4c1cf846b6a8f0b38c0180628a7fec7dfb1b76a4d SHA512 00141e89313e5dd4bf781c2010ca1aea4f8c265339cb4a46ee596870388b41e78135191b0266f4d1046a15f92d404477622139baf5f92a9692c8f9ee79d3a820 WHIRLPOOL 265069c0bb580472bddae9ea88273694bb50fb5303c70eaf30a54a03e5496aa9d3f80563b39033a437085be5f832253b7ddc7a7e98908a3c0bfcb72361d982d4
+AUX man-1.6e-headers.patch 241 SHA256 d62108e3baaec771d99226eff07a6f604a8b9afefd25ec596b9817574a638e20 SHA512 0fb92a896fe6889289198ac2674ae238e1067e8e3681b6d9c6fee12843f5272a49b80899985ed6e718d84181c036ca7e7c00d8cdb5bdfca299cf4ec00681e925 WHIRLPOOL 20f458cf9812ad7f007ce6aef59405b6767570b9c1f75cb4d66a934107c717f707b5ac1d542471a8c3b79e32eba2741fd104d1131ad45eb34020761c320e1bda
+AUX man-1.6f-makewhatis-compression-cleanup.patch 2384 SHA256 885fde98225f122597dc16ab05cd5666c808df9d2004589e3aefe7ba63860267 SHA512 24e85bda51ab9ce27d15bae0403b7528cd808b32642e677512806cd88afb6ba2b76cfc6550eeb18cf7cdc7fcf348eca01bbed1b0da3680f53ffb73f824316c10 WHIRLPOOL 73af923df3acf344ce8ced046c335b3053c7c444d7bd8b19d56ca63775eecbf39a92971fed5c6d6decaea8d96d0cecbf842bccac1aa4f7730c0e2196b1779387
+AUX man-1.6f-man2html-compression-2.patch 1725 SHA256 f9df05eabad2408a017790954f46ac06eb565fed4de603d6d20bb3145439f97a SHA512 c7dc78f75876882e4f241ededd61ab1dad9292e2aa91d82c09e0e4a81c6a97d6537c8bb4b9154a17cb1db47d8716464b8146ccd487545e3f5c317482ad86e0bb WHIRLPOOL dd2116a61ab88e35b4dd152c0bd7f1ec3bdcbb9b7ddef030cc778230ee7f0b4f27bf817f1003ff378847349fe4a26a41d7e12855581c7ae92b1773b5a28b5c36
+AUX man-1.6f-parallel-build.patch 2312 SHA256 158a5bfb6bcfe7f82b1ed4586a62a30cbd7c7688244e3c274fcb490112c18d13 SHA512 03bfd0c86d9d17eba4073a94d59a2d1fabc88fc373831796d65c1caf3f45ff17014f3bd314ece01be80746845961ef7f03e7b8e153e3e71ced77f43736f34bf8 WHIRLPOOL 4d2ef8279f4f9b438ca747f9711395a07c8ec173301e74f537245307226a20709e8c9bdaeb04e475529ab1b221376f89413f415a4da365eadc1523b86424ef85
+AUX man-1.6f-so-search-2.patch 1062 SHA256 8f4c6bcfde17291f92c677b82e2367458916488a1a8de6ba345eecd5bfccb2e8 SHA512 af21ff66a9bb0f6a47d98c1fe73fe99a4c0addce6496be154ccd7ede2efb51e80464156337ae40df9aed3a10daceb486f8785dd1130b50d59d4e991406dc70c6 WHIRLPOOL d8f2a9beab76d3ab1e6f4d78ed5d9396e354f127741b31545fb84de5f9f9ed69604fd3bf271a8ece5d65696bc37e87f601fa853984afd8442f94d32877b52c81
+AUX man-1.6f-unicode.patch 656 SHA256 1c7624b5824e5585abd1c3d27ffd8e2d9207a05bf67e268aeaabaddf842d4709 SHA512 f91ebf0886794bb1f3ccc2207cd5fb7dbd83f0dd727470a9270481c7c33dcf1c78e99a62d097232ca964b639764fc1c76ae88380775dc79ee4ed18a6cd677b97 WHIRLPOOL 1052baf2cad3052335a21a6ca31ae740fb2e344940307117725974e5f6857ad85e34f461169a80b90b1a4a30fd8c740954b182b587a9c6c9f04e97e1f3854ba0
+AUX man-1.6g-compress.patch 343 SHA256 96945eded649cfe908088b75da4a71e7bfb461795e463d0126f34985410bd40f SHA512 eab984c95b75bbf29b65ff38029bbcfa870972fa2cff208da5d4d43c89dd0ceeb32a8faceb43836ced9ff50ee5765d2a5c4f1faf51f5507f0ea97b6ffcfe36c8 WHIRLPOOL ccfb29da707bed5c6e2ad9ace2ba51882d3cdea36c29010a78b1359969b8dcd303467d7566c497cc2a4068e2fb13b8bd2a559c8f96ae60af47e5212d355347db
+AUX man-1.6g-echo-escape.patch 630 SHA256 31ae1e0f3321b2e9e16b604c71cbd9a806d061e80e80a3ff1ae24b22c8a501df SHA512 d66aa7ccc97fe1af2afe1165e2305c4ad4cd4ec48078707432a1ccd79db80f7ff11ad977175651fb6c6875e31461a1e04352f2a3b542762afaf9a07290fe03c0 WHIRLPOOL 447949c0a7a953fbce4598e532ded3acb45bd0bb7d2aa5ef89c38c9f451b90f75f2d68425ab314821de43ff31df06f55b7cca0fa16ec880967fd06451322796e
+AUX man-1.6g-fbsd.patch 366 SHA256 fd4e50be32571103e9880b9291c691d45a225a7d6f2b27ff05168d22dbce7336 SHA512 4019267584b1350b2c9da9aa1851a2e4e96f271265d189ecd677206be20dac67cd212b2887f844f43c10d96076a76613a12e53f3b29a185ec62ed4bff4c5a502 WHIRLPOOL 60bc8aff0c96036ba2842e0113adaa3851a7b0e179b73f013e8e5b42e12511eb1cf07e5c3cbd07f8d7613c4cf2ccb40f6276cc50e9f2ffb7ee9cecf435f0bb77
+AUX man-1.6g-xz.patch 1848 SHA256 7c11114ec34f017d0641c9a7ecd9ad8b93f6c226e9bdd54fd0fedf1313451634 SHA512 6a883fa800a6d3b11c76a70e1a31c0736d380271c9f21315863ddaca9529e3d613b587724287fb94bab2b0d97215f6ccb3f1438a5c5e339e5a2edf872c92515c WHIRLPOOL 4f2ffd7d09ddda0a3bc49d4a1b36a7ef953f9afde4d0dfa164a917783516e549e9a12196994239f65d9c26b3ef1c64553601bb68fcfad4286e882fb0465cb0aa
+DIST man-1.6g.tar.gz 256906 SHA256 ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f SHA512 c786fa2201aed92293e5590dc3ad5d550cf14e5059fa274ef7719af86ee4c892e747576495b6dc0a09286e73e2f0f0caf860216e0c8032d9ef13e5d26853048b WHIRLPOOL 1b531476108c27a3993023da430831c2d20f8045a51490d559a7f588f0771931defd7a3a745e9f1f03797e681eea8767aad4a27ab9abdd5d06ad935dc96a5020
+EBUILD man-1.6g-r1.ebuild 3703 SHA256 c55e2c1754295d5d5db68a5181c64a8f650596e0a68068581cefb79eabef795f SHA512 2e6306b888a1c9be4f80f3b7e407cff67e05aae868fbff29c85793002aa209d5d38946c829b717969583017d5564747d7fbe61881640d06b86d9986fb798ec4d WHIRLPOOL beadab2ff6bc09ebc5568571cb5d473f94f34431d14fc0460c8d3be668c846bef435e9a5587fc6101e6aaae2f9af8c23a9948c4a55696ebac8130f6fe67c23ee
+EBUILD man-1.6g.ebuild 3627 SHA256 fc3c4f2c9123f9e8ab8212d13dc112f742638357ba6a4361beb524cfe502fa5b SHA512 ab6b2d67d6944d07a1291c3518c7ecd9d6c69e9d6ef10c5a18794e5808cb34871044ef9e5180e0c45171478076e90bb2fb0919c55fc0cb647112dbdd7554f9e8 WHIRLPOOL 60a4df1f93d1983d46e8d5c5bf7eeda0c32b179fe82cb5c96124cb1c86e4611bf4ce3049e668e9f234500c6c70f49547c2c59bb861f3d558d5e3053764c34a10
+MISC ChangeLog 3470 SHA256 cc5330586a2685b9b6d769bb7193665f7a4ec7b7f0498aa840330c809823daa1 SHA512 607ee613cc1657e34ad70fd4af61a4be4d60458de6103c85aa5252a5f7346d10042b3a0382b077d0dc698f35818eb92bebcf6b6618f40dcc1034ca47509d1b3e WHIRLPOOL 60db0fd1a0d5a2eecc28ce3816c34aae9543f318e301c70a7e0484bc63d4283fc861a891a18856ead992abc3c666aa463216e6797b5cadc082635c9c5e16038c
+MISC ChangeLog-2015 24815 SHA256 246995690bfdf8b7c1e7d0a012a15d21955983967365cb3201ade29a38e2faa8 SHA512 231e4ad86a93dff35f11c3676c7db9c19cb49cf1a3a91ec9dc7e484cb11d42cda0b5492fee75fa881f23f4a340b526fe469a0c773ebf7074c7b01a3298b65b26 WHIRLPOOL 3c692e40173882cf0600b518910e685b0598c99a1b93c3e52797de32505b0c6a7b5b1d285341c29f440c83297bdab0c3516e25d33391ea6388d346618827c06f
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/man/files/makewhatis.cron b/sys-apps/man/files/makewhatis.cron
new file mode 100644
index 000000000000..bef5ea6d1e2d
--- /dev/null
+++ b/sys-apps/man/files/makewhatis.cron
@@ -0,0 +1,5 @@
+#!/bin/sh
+# this is part of the man package
+# it updates the search database for manpages
+
+exec nice makewhatis -u
diff --git a/sys-apps/man/files/man-1.5m2-apropos.patch b/sys-apps/man/files/man-1.5m2-apropos.patch
new file mode 100644
index 000000000000..9735a5330e88
--- /dev/null
+++ b/sys-apps/man/files/man-1.5m2-apropos.patch
@@ -0,0 +1,16 @@
+Ripped from Fedora
+
+--- man-1.5m2/src/apropos.sh
++++ man-1.5m2/src/apropos.sh
+@@ -19,9 +19,9 @@
+
+ # When man pages in your favorite locale look to grep like binary files
+ # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
+-aproposgrepopt1='i'
++aproposgrepopt1='ai'
+ aproposgrepopt2=''
+-whatisgrepopt1='iw'
++whatisgrepopt1='aiw'
+ whatisgrepopt2='^'
+ grepopt1=$%apropos_or_whatis%grepopt1
+ grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/sys-apps/man/files/man-1.6-cross-compile.patch b/sys-apps/man/files/man-1.6-cross-compile.patch
new file mode 100644
index 000000000000..184236918b91
--- /dev/null
+++ b/sys-apps/man/files/man-1.6-cross-compile.patch
@@ -0,0 +1,61 @@
+Fix up to work with cross-compiling ... most of these tests only
+need to see if the example compiled, not whether it runs ...
+
+--- configure
++++ configure
+@@ -232,15 +232,13 @@
+
+ echo checking for POSIX.1 header files
+ echo "#include <unistd.h>
+-main() {
+ #ifdef _POSIX_VERSION
+-exit(0);
++main() { exit(0); }
+ #else
+-exit(1);
+-#endif
+-}" > conftest.c
++# error no _POSIX_VERSION
++#endif" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ DEFS="$DEFS -DPOSIX"
+ fi
+ rm -f conftest conftest.c
+@@ -249,7 +247,7 @@
+ echo "#include <strings.h>
+ main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else DEFS="$DEFS -DUSG"
+ fi
+ rm -f conftest conftest.c
+@@ -258,7 +256,7 @@
+ echo '#include <sys/types.h>
+ main() { uid_t x; exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else
+ uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
+ DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
+@@ -291,7 +289,7 @@
+ #endif
+ main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
+ elif test -f /usr/lib/libPW.a; then LIBS="$LIBS -lPW"
+ else DEFS="$DEFS -DALLOCA_MISSING"
+@@ -321,7 +319,7 @@
+ struct option long_opts[] = { { "", no_argument, NULL, 0 } };
+ main() { exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ manpathoption="--path"
+ else
+ manpathoption="-w"
diff --git a/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch b/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch
new file mode 100644
index 000000000000..9ecaeb70e16e
--- /dev/null
+++ b/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch
@@ -0,0 +1,83 @@
+http://bugs.gentoo.org/90186
+
+If we have entries in MANPATH that are really symlinks to other entries,
+then many man functions will yield duplicate entries.
+
+Without this patch, we see this behavior:
+$ echo $MANPATH
+/usr/share/man:/usr/man
+$ man --path
+/usr/share/man:/usr/man
+$ ls -ld /usr/share/man /usr/man
+lrwxrwxrwx 1 /usr/man -> /usr/share/man
+drwxr-xr-x 36 /usr/share/man
+$ man -k passwd
+passwd (1) - change user password
+passwd (1) - change user password
+
+With this patch, we get:
+$ echo $MANPATH
+/usr/share/man:/usr/man
+$ man --path
+/usr/share/man
+$ ls -ld /usr/share/man /usr/man
+lrwxrwxrwx 1 /usr/man -> /usr/share/man
+drwxr-xr-x 36 /usr/share/man
+$ man -k passwd
+passwd (1) - change user password
+
+--- man-1.6c/src/manpath.c
++++ man-1.6c/src/manpath.c
+@@ -380,6 +380,44 @@
+ }
+ }
+
++void trim_symlinked_manpaths (void);
++void
++trim_symlinked_manpaths () {
++ /*
++ * Skip symlinks to other entries in path.
++ * Do this after we've built the entire list.
++ */
++ struct stat *stat_cache;
++ size_t i, j, size;
++
++ if (!mandirlist)
++ return;
++
++ for (size = 0; mandirlist[size]; ++size)
++ /* count # of elements */;
++ if (size == 0)
++ return;
++ /* cache stat information for every element */
++ stat_cache = (struct stat *) my_malloc (size * sizeof(*stat_cache));
++ for (i = 0; i < size; ++i)
++ stat(mandirlist[i], &stat_cache[i]);
++
++#define EQU_STAT(s,d) ((s).st_dev == (d).st_dev && (s).st_ino == (d).st_ino)
++ for (i = 0; i < size; ++i) {
++ for (j = i+1; j < size; ++j) {
++ if (EQU_STAT(stat_cache[i], stat_cache[j])) {
++ /* these two entries are the same, so cut out the second one */
++ memmove(mandirlist+j, mandirlist+j+1, (size-j)*sizeof(*mandirlist));
++ memmove(stat_cache+j, stat_cache+j+1, (size-j)*sizeof(*stat_cache));
++ mandirlist[--size] = NULL;
++ --j;
++ }
++ }
++ }
++
++ free(stat_cache);
++}
++
+ void
+ init_manpath () {
+ static int done = 0;
+@@ -391,6 +431,7 @@
+ (manp = getenv ("MANPATH")) == NULL)
+ manp = ""; /* default path */
+ split (manp, to_mandirlist, 0);
++ trim_symlinked_manpaths ();
+ done = 1;
+ }
+ }
diff --git a/sys-apps/man/files/man-1.6e-headers.patch b/sys-apps/man/files/man-1.6e-headers.patch
new file mode 100644
index 000000000000..9c6fd6f43516
--- /dev/null
+++ b/sys-apps/man/files/man-1.6e-headers.patch
@@ -0,0 +1,13 @@
+--- gencat/genlib.c
++++ gencat/genlib.c
+@@ -49,10 +49,8 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#ifdef SYSV
+ #include <sys/types.h>
+ #include <unistd.h>
+-#endif
+
+ #if !defined(__linux__) && !defined(__FreeBSD__)
+ #include <memory.h>
diff --git a/sys-apps/man/files/man-1.6f-makewhatis-compression-cleanup.patch b/sys-apps/man/files/man-1.6f-makewhatis-compression-cleanup.patch
new file mode 100644
index 000000000000..a7d74c32be3a
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-makewhatis-compression-cleanup.patch
@@ -0,0 +1,69 @@
+http://bugs.gentoo.org/331979
+
+patch by William Throwe <wthrowe@mit.edu>
+
+The problem is that a failed match() resets the RSTART variable used to
+extract filename_no_gz (visible in the trailing context of the patch),
+so it is important that no more match() commands are attempted after the
+successful one. Without the scoping, if (for example) the test for .bz2
+succeeds, it prevents testing for .lzma, but doesn't prevent testing for
+.xz. The failing .xz test causes RSTART to be set to zero so
+filename_no_gz becomes the empty string.
+
+--- man-1.6f/src/makewhatis.sh
++++ man-1.6f/src/makewhatis.sh
+@@ -234,7 +234,7 @@
+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
+
+ function readline() {
+- if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
++ if (use_compression) {
+ result = (pipe_cmd | getline);
+ if (result < 0) {
+ print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
+@@ -249,7 +249,7 @@
+ }
+
+ function closeline() {
+- if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
++ if (use_compression) {
+ return close(pipe_cmd);
+ } else {
+ return close(filename);
+@@ -263,16 +263,20 @@
+ if (verbose) {
+ print "adding " filename > "/dev/stderr"
+ }
+-
++
+ use_zcat = match(filename,"\\.Z$") ||
+ match(filename,"\\.z$") || match(filename,"\\.gz$");
+- if (!use_zcat)
++ if (!use_zcat) {
+ use_bzcat = match(filename,"\\.bz2");
+- if(!use_bzcat)
+- use_lzcat = match(filename,"\\.lzma");
+- if(!use_lzcat)
+- use_xzcat = match(filename,"\\.xz");
+- if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
++ if (!use_bzcat) {
++ use_lzcat = match(filename,"\\.lzma");
++ if (!use_lzcat) {
++ use_xzcat = match(filename,"\\.xz");
++ }
++ }
++ }
++ use_compression = (use_zcat || use_bzcat || use_lzcat || use_xzcat);
++ if (use_compression) {
+ filename_no_gz = substr(filename, 0, RSTART - 1);
+ } else {
+ filename_no_gz = filename;
+@@ -285,7 +289,7 @@
+ actual_section = section;
+ }
+ sub(/\..*/, "", progname);
+- if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
++ if (use_compression) {
+ if (use_zcat) {
+ pipe_cmd = "zcat \"" filename "\"";
+ } else if (use_bzcat) {
diff --git a/sys-apps/man/files/man-1.6f-man2html-compression-2.patch b/sys-apps/man/files/man-1.6f-man2html-compression-2.patch
new file mode 100644
index 000000000000..b79b3a1872f1
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-man2html-compression-2.patch
@@ -0,0 +1,61 @@
+add support for bzip2/lzma to man2html and friends
+
+--- man2html/glimpse_filters
++++ man2html/glimpse_filters
+@@ -1,3 +1,6 @@
++*.bz2 bzip2 -d -c
++*.lzma lzma -d -c
++*.xz xz -d -c
+ *.gz gzip -d -c
+ *.Z gzip -d -c
+
+--- man2html/scripts/cgi-bin/man/man2html
++++ man2html/scripts/cgi-bin/man/man2html
+@@ -93,6 +93,12 @@
+ *.bz2)
+ bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+ ;;
++ *.lzma)
++ lzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
++ *.xz)
++ xzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
+ *)
+ "$MAN2HTML" "$LL" "$PAGE"
+ ;;
+@@ -103,6 +106,12 @@
+ elif [ -r "$PAGE".bz2 ]
+ then
+ bzcat "$PAGE".bz2 | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".lzma ]
++then
++ lzcat "$PAGE".lzma | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".xz ]
++then
++ xzcat "$PAGE".xz | "$MAN2HTML" "$LL" -D "$PAGE"
+ else
+ "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+ fi
+--- man2html/scripts/cgi-bin/man/mansearch
++++ man2html/scripts/cgi-bin/man/mansearch
+@@ -153,7 +153,7 @@
+ }
+ print "<DT> <a href=\"" cgipath "/man2html?" fullname "\">";
+ textname = filename;
+- sub(/\.(gz)|Z|z$/, "", textname);
++ sub(/\.([zZ]|gz|bz2|lzma|xz)$/, "", textname);
+ sub(/\./, "(", textname);
+ textname = textname ")";
+ print textname;
+--- man2html/scripts/cgi-bin/man/mansec
++++ man2html/scripts/cgi-bin/man/mansec
+@@ -128,7 +128,7 @@
+ # Print out alphabetic quick index and other links
+ }
+ # Split page.n into "page" and "n" and generate an entry
+- sub(/[.]([zZ]|(gz))$/, "", manpage);
++ sub(/[.]([zZ]|gz|bz2|lzma|xz)$/, "", manpage);
+ match(manpage, /[.][^.]+$/);
+ title = substr(manpage, 1, RSTART - 1);
+ if (section != "all") {
diff --git a/sys-apps/man/files/man-1.6f-parallel-build.patch b/sys-apps/man/files/man-1.6f-parallel-build.patch
new file mode 100644
index 000000000000..41918d9244da
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-parallel-build.patch
@@ -0,0 +1,78 @@
+http://bugs.gentoo.org/207148
+
+patch by Kevin Pyle to fix parallel build issues
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -42,9 +42,12 @@
+ makemsg:
+ $(BUILD_CC) -o makemsg makemsg.c
+
+-msg.c gripedefs.h: ../msgs/mess.en makemsg
++gripedefs.h: ../msgs/mess.en makemsg
+ ./makemsg ../msgs/mess.en gripedefs.h msg.c
+
++# avoid parallel build issues with makemsg
++msg.c: gripedefs.h
++
+ # glob.c does not have prototypes
+ glob.o: glob.c ndir.h
+ $(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c
+
+http://bugs.gentoo.org/258916
+
+avoid:
+ make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
+
+--- a/man/Makefile.in
++++ b/man/Makefile.in
+@@ -3,7 +3,7 @@
+ MAN5 = man.conf
+ MAN8 = makewhatis
+ ALL = man.1 whatis.1 apropos.1 man.conf.5
+-MAYBE8 = makewhatis
++MAYBE8 = $(wildcard makewhatis.man)
+
+ .SUFFIXES: .man .1 .5 .8
+
+@@ -21,9 +21,7 @@
+ # Where to put the manual pages.
+ mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
+
+-all: $(ALL)
+- for i in $(MAYBE8); \
+- do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
++all: $(ALL) $(MAYBE8:.man=.8)
+
+ install: $(ALL)
+ mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
+@@ -39,18 +37,17 @@
+
+ spotless:
+
+-subdirs:
+- @for i in @languages@; do if test -d $$i; then echo; \
+- echo "==== Making the `cat $$i.txt` man pages. ===="; \
+- cd $$i; make -f ../Makefile; cd ..; \
+- else echo "==== No $$i man pages found. ===="; fi; done
+-
+-installsubdirs:
+- @for i in @languages@; do if test -d $$i; then echo; \
+- echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+- cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+- export SLANG; make -f ../Makefile install; cd ..; \
+- else echo "==== No $$i man pages found. ===="; fi; done
++MAN_LANGS = $(wildcard @languages@)
++subdirs: $(MAN_LANGS:=_lang_subdir)
++%_lang_subdir:
++ @echo "==== Making the `cat $(@:_lang_subdir=).txt` man pages. ===="
++ $(MAKE) -f ../Makefile -C $(@:_lang_subdir=)
++
++installsubdirs: $(MAN_LANGS:=_lang_installsubdir)
++%_lang_installsubdir:
++ @echo "==== Making the `cat $(@:_lang_installsubdir=).txt` man pages. ===="
++ $(MAKE) -f ../Makefile -C $(@:_lang_installsubdir=) install \
++ SLANG=`s=$(@:_lang_installsubdir=); test $$s = en || echo /$$s`
+
+ cleansubdirs:
+ @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
diff --git a/sys-apps/man/files/man-1.6f-so-search-2.patch b/sys-apps/man/files/man-1.6f-so-search-2.patch
new file mode 100644
index 000000000000..ac42c8df7b37
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-so-search-2.patch
@@ -0,0 +1,34 @@
+improve the uncompressed .so search
+
+--- a/src/man.c
++++ b/src/man.c
+@@ -381,13 +381,23 @@ again:
+ }
+ /*
+ * Some people have compressed man pages, but uncompressed
+- * .so files - we could glob for all possible extensions,
+- * for now: only try .gz
++ * .so files - we should discover this list dynamically, but
++ * for now just hardcode it.
+ */
+- else if (fp == NULL && get_expander(".gz") &&
+- strlen(name)+strlen(".gz") < BUFSIZE) {
+- strcat(name, ".gz");
+- fp = fopen (name, "r");
++ else if (fp == NULL) {
++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
++ size_t i, name_len = strlen(name);
++ const char *extensions[] = { ".gz", ".bz2", ".lzma", ".xz", ".z", ".Z" };
++ for (i = 0; i < ARRAY_SIZE(extensions); ++i) {
++ const char *comp = extensions[i];
++ name[name_len] = '\0';
++ if (get_expander(comp) && name_len+strlen(comp) < BUFSIZE) {
++ strcat(name, comp);
++ fp = fopen(name, "r");
++ if (fp)
++ break;
++ }
++ }
+ }
+
+ if (fp == NULL) {
diff --git a/sys-apps/man/files/man-1.6f-unicode.patch b/sys-apps/man/files/man-1.6f-unicode.patch
new file mode 100644
index 000000000000..89d3821df3ca
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-unicode.patch
@@ -0,0 +1,28 @@
+let the active locale work its magic
+
+http://bugs.gentoo.org/146315
+
+--- man-1.6f/configure
++++ man-1.6f/configure
+@@ -473,9 +473,9 @@
+ then
+ if test $Fnroff = "missing"
+ then
+- nroff="nroff -Tlatin1 -mandoc"
++ nroff="nroff -Tascii -c -mandoc"
+ else
+- nroff="$Fnroff -Tlatin1 -mandoc"
++ nroff="$Fnroff -mandoc"
+ fi
+ troff="troff -mandoc"
+ echo "Warning: could not find groff"
+@@ -484,7 +484,7 @@
+ then
+ nroff="$Fgroff -Tlatin1 -mandoc"
+ else
+- nroff="$Fnroff -Tlatin1 -mandoc"
++ nroff="$Fnroff -mandoc"
+ fi
+ troff="$Fgroff -Tps -mandoc"
+ jnroff="$Fgroff -Tnippon -mandocj"
+
diff --git a/sys-apps/man/files/man-1.6g-compress.patch b/sys-apps/man/files/man-1.6g-compress.patch
new file mode 100644
index 000000000000..374d80730074
--- /dev/null
+++ b/sys-apps/man/files/man-1.6g-compress.patch
@@ -0,0 +1,17 @@
+allow selection of default cache compressor
+
+http://bugs.gentoo.org/205147
+
+--- configure
++++ configure
+@@ -1012,6 +1012,10 @@
+ done
+ done
+
++ if [ x$COMPRESS != x ]; then
++ compress=$COMPRESS
++ fi
++
+ if [ x$default = x ]; then
+ echo ""
+ echo "What program should be used to compress the formatted pages?"
diff --git a/sys-apps/man/files/man-1.6g-echo-escape.patch b/sys-apps/man/files/man-1.6g-echo-escape.patch
new file mode 100644
index 000000000000..96e950a51e86
--- /dev/null
+++ b/sys-apps/man/files/man-1.6g-echo-escape.patch
@@ -0,0 +1,15 @@
+avoid using escape sequences in echo as they're not portable
+
+https://bugs.gentoo.org/523874
+
+--- a/src/man.c
++++ b/src/man.c
+@@ -626,7 +626,7 @@ make_roff_command (const char *path, const char *file) {
+ the current position plus 10 lines. This plus setpl()
+ gives us a single page that just contains the whole
+ man page. (William Webber, wew@cs.rmit.edu.au) */
+- strcat(buft, "; echo \".\\\\\\\"\"; echo \".pl \\n(nlu+10\"");
++ strcat(buft, "; echo \".\\\\\\\"\"; echo \".pl \"; echo \"(nlu+10\"");
+ #if 0
+ /* In case this doesnt work for some reason,
+ michaelkjohnson suggests: I've got a simple
diff --git a/sys-apps/man/files/man-1.6g-fbsd.patch b/sys-apps/man/files/man-1.6g-fbsd.patch
new file mode 100644
index 000000000000..ef01a6e01fc0
--- /dev/null
+++ b/sys-apps/man/files/man-1.6g-fbsd.patch
@@ -0,0 +1,15 @@
+Fixes compilation in FreeBSD
+
+http://bugs.gentoo.org/138123
+
+--- man-1.6g/gencat/genlib.c
++++ man-1.6g/gencat/genlib.c
+@@ -54,7 +54,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if !defined(__linux__) && !defined(__CYGWIN__)
++#if !defined(__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
+ #include <memory.h>
+ static int bcopy(src, dst, length)
+ char *src, *dst;
diff --git a/sys-apps/man/files/man-1.6g-xz.patch b/sys-apps/man/files/man-1.6g-xz.patch
new file mode 100644
index 000000000000..fcf91f71d376
--- /dev/null
+++ b/sys-apps/man/files/man-1.6g-xz.patch
@@ -0,0 +1,53 @@
+add support for xz
+
+http://bugs.gentoo.org/302380
+
+--- a/src/makewhatis.sh
++++ b/src/makewhatis.sh
+@@ -230,7 +230,7 @@
+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
+
+ function readline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ result = (pipe_cmd | getline);
+ if (result < 0) {
+ print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
+@@ -245,7 +245,7 @@
+ }
+
+ function closeline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ return close(pipe_cmd);
+ } else {
+ return close(filename);
+@@ -266,7 +266,9 @@
+ use_bzcat = match(filename,"\\.bz2");
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+- if (use_zcat || use_bzcat || use_lzcat ) {
++ if(!use_lzcat)
++ use_xzcat = match(filename,"\\.xz");
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ filename_no_gz = substr(filename, 0, RSTART - 1);
+ } else {
+ filename_no_gz = filename;
+@@ -279,13 +281,15 @@
+ actual_section = section;
+ }
+ sub(/\..*/, "", progname);
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ if (use_zcat) {
+ pipe_cmd = "zcat \"" filename "\"";
+ } else if (use_bzcat) {
+ pipe_cmd = "bzcat \"" filename "\"";
+- } else {
++ } else if (use_lzcat) {
+ pipe_cmd = "lzcat \"" filename "\"";
++ } else {
++ pipe_cmd = "xzcat \"" filename "\"";
+ }
+ # try to avoid suspicious stuff
+ if (filename ~ /[;&|`$(]/) {
diff --git a/sys-apps/man/man-1.6g-r1.ebuild b/sys-apps/man/man-1.6g-r1.ebuild
new file mode 100644
index 000000000000..eda4969dce0a
--- /dev/null
+++ b/sys-apps/man/man-1.6g-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+lzma nls selinux"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="|| ( >=sys-apps/groff-1.19.2-r1 app-doc/heirloom-doctools )
+ !sys-apps/man-db
+ !<app-arch/lzma-4.63
+ lzma? ( app-arch/xz-utils )
+ selinux? ( sec-policy/selinux-makewhatis )"
+
+pkg_setup() {
+ enewgroup man 15
+ enewuser man 13 -1 /usr/share/man man
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+ epatch "${FILESDIR}"/man-1.6f-unicode.patch #146315
+ epatch "${FILESDIR}"/man-1.6c-cut-duplicate-manpaths.patch
+ epatch "${FILESDIR}"/man-1.5m2-apropos.patch
+ epatch "${FILESDIR}"/man-1.6g-fbsd.patch #138123
+ epatch "${FILESDIR}"/man-1.6e-headers.patch
+ epatch "${FILESDIR}"/man-1.6f-so-search-2.patch
+ epatch "${FILESDIR}"/man-1.6g-compress.patch #205147
+ epatch "${FILESDIR}"/man-1.6f-parallel-build.patch #207148 #258916
+ epatch "${FILESDIR}"/man-1.6g-xz.patch #302380
+ epatch "${FILESDIR}"/man-1.6f-makewhatis-compression-cleanup.patch #331979
+ epatch "${FILESDIR}"/man-1.6g-echo-escape.patch #523874
+ # make sure `less` handles escape sequences #287183
+ sed -i -e '/^DEFAULTLESSOPT=/s:"$:R":' configure
+}
+
+echoit() { echo "$@" ; "$@" ; }
+src_configure() {
+ strip-linguas $(eval $(grep ^LANGUAGES= configure) ; echo ${LANGUAGES//,/ })
+
+ unset NLSPATH #175258
+
+ tc-export CC BUILD_CC
+
+ local mylang=
+ if use nls ; then
+ if [[ -z ${LINGUAS} ]] ; then
+ mylang="all"
+ else
+ mylang="${LINGUAS// /,}"
+ fi
+ else
+ mylang="none"
+ fi
+ export COMPRESS
+ if use lzma ; then
+ COMPRESS=/usr/bin/xz
+ else
+ COMPRESS=/bin/bzip2
+ fi
+ echoit \
+ ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang ${mylang} \
+ || die "configure failed"
+}
+
+src_install() {
+ unset NLSPATH #175258
+
+ emake PREFIX="${D}" install || die "make install failed"
+ dosym man /usr/bin/manpath
+
+ dodoc LSM README* TODO
+
+ # makewhatis only adds man-pages from the last 24hrs
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/makewhatis.cron makewhatis
+
+ keepdir /var/cache/man
+ diropts -m0775 -g man
+ local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-)
+ for x in ${mansects//:/ } ; do
+ keepdir /var/cache/man/cat${x}
+ done
+}
+
+pkg_postinst() {
+ einfo "Forcing sane permissions onto ${ROOT}var/cache/man (Bug #40322)"
+ chown -R root:man "${ROOT}"/var/cache/man
+ chmod -R g+w "${ROOT}"/var/cache/man
+ [[ -e ${ROOT}/var/cache/man/whatis ]] \
+ && chown root:0 "${ROOT}"/var/cache/man/whatis
+
+ echo
+
+ local f files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ for f in ${files} ; do
+ [[ ${f} == */etc/cron.daily/makewhatis ]] && continue
+ [[ $(md5sum "${f}") == "8b2016cc778ed4e2570b912c0f420266 "* ]] \
+ && rm -f "${f}"
+ done
+ files=$(ls "${ROOT}"etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ if [[ ${files/$'\n'} != ${files} ]] ; then
+ ewarn "You have multiple makewhatis cron files installed."
+ ewarn "You might want to delete all but one of these:"
+ ewarn ${files}
+ fi
+
+ if has_version app-doc/heirloom-doctools; then
+ ewarn "Please note that the /etc/man.conf file installed will not"
+ ewarn "work with heirloom's nroff by default (yet)."
+ ewarn ""
+ ewarn "Check app-doc/heirloom-doctools elog messages for the proper"
+ ewarn "configuration."
+ fi
+}
diff --git a/sys-apps/man/man-1.6g.ebuild b/sys-apps/man/man-1.6g.ebuild
new file mode 100644
index 000000000000..c72bff3d0c25
--- /dev/null
+++ b/sys-apps/man/man-1.6g.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+lzma nls selinux"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="|| ( >=sys-apps/groff-1.19.2-r1 app-doc/heirloom-doctools )
+ !sys-apps/man-db
+ !<app-arch/lzma-4.63
+ lzma? ( app-arch/xz-utils )
+ selinux? ( sec-policy/selinux-makewhatis )"
+
+pkg_setup() {
+ enewgroup man 15
+ enewuser man 13 -1 /usr/share/man man
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+ epatch "${FILESDIR}"/man-1.6f-unicode.patch #146315
+ epatch "${FILESDIR}"/man-1.6c-cut-duplicate-manpaths.patch
+ epatch "${FILESDIR}"/man-1.5m2-apropos.patch
+ epatch "${FILESDIR}"/man-1.6g-fbsd.patch #138123
+ epatch "${FILESDIR}"/man-1.6e-headers.patch
+ epatch "${FILESDIR}"/man-1.6f-so-search-2.patch
+ epatch "${FILESDIR}"/man-1.6g-compress.patch #205147
+ epatch "${FILESDIR}"/man-1.6f-parallel-build.patch #207148 #258916
+ epatch "${FILESDIR}"/man-1.6g-xz.patch #302380
+ epatch "${FILESDIR}"/man-1.6f-makewhatis-compression-cleanup.patch #331979
+ # make sure `less` handles escape sequences #287183
+ sed -i -e '/^DEFAULTLESSOPT=/s:"$:R":' configure
+}
+
+echoit() { echo "$@" ; "$@" ; }
+src_configure() {
+ strip-linguas $(eval $(grep ^LANGUAGES= configure) ; echo ${LANGUAGES//,/ })
+
+ unset NLSPATH #175258
+
+ tc-export CC BUILD_CC
+
+ local mylang=
+ if use nls ; then
+ if [[ -z ${LINGUAS} ]] ; then
+ mylang="all"
+ else
+ mylang="${LINGUAS// /,}"
+ fi
+ else
+ mylang="none"
+ fi
+ export COMPRESS
+ if use lzma ; then
+ COMPRESS=/usr/bin/xz
+ else
+ COMPRESS=/bin/bzip2
+ fi
+ echoit \
+ ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang ${mylang} \
+ || die "configure failed"
+}
+
+src_install() {
+ unset NLSPATH #175258
+
+ emake PREFIX="${D}" install || die "make install failed"
+ dosym man /usr/bin/manpath
+
+ dodoc LSM README* TODO
+
+ # makewhatis only adds man-pages from the last 24hrs
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/makewhatis.cron makewhatis
+
+ keepdir /var/cache/man
+ diropts -m0775 -g man
+ local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-)
+ for x in ${mansects//:/ } ; do
+ keepdir /var/cache/man/cat${x}
+ done
+}
+
+pkg_postinst() {
+ einfo "Forcing sane permissions onto ${ROOT}var/cache/man (Bug #40322)"
+ chown -R root:man "${ROOT}"/var/cache/man
+ chmod -R g+w "${ROOT}"/var/cache/man
+ [[ -e ${ROOT}/var/cache/man/whatis ]] \
+ && chown root:0 "${ROOT}"/var/cache/man/whatis
+
+ echo
+
+ local f files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ for f in ${files} ; do
+ [[ ${f} == */etc/cron.daily/makewhatis ]] && continue
+ [[ $(md5sum "${f}") == "8b2016cc778ed4e2570b912c0f420266 "* ]] \
+ && rm -f "${f}"
+ done
+ files=$(ls "${ROOT}"etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ if [[ ${files/$'\n'} != ${files} ]] ; then
+ ewarn "You have multiple makewhatis cron files installed."
+ ewarn "You might want to delete all but one of these:"
+ ewarn ${files}
+ fi
+
+ if has_version app-doc/heirloom-doctools; then
+ ewarn "Please note that the /etc/man.conf file installed will not"
+ ewarn "work with heirloom's nroff by default (yet)."
+ ewarn ""
+ ewarn "Check app-doc/heirloom-doctools elog messages for the proper"
+ ewarn "configuration."
+ fi
+}
diff --git a/sys-apps/man/metadata.xml b/sys-apps/man/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/man/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/man2html/Manifest b/sys-apps/man2html/Manifest
new file mode 100644
index 000000000000..4a6fdfabe41c
--- /dev/null
+++ b/sys-apps/man2html/Manifest
@@ -0,0 +1,7 @@
+AUX man-1.6-cross-compile.patch 1743 SHA256 154568f9f0e62cd0ba48bde0c956ddbb5cb332547501a11cff63f50f7dc7226d SHA512 7052db54d42e634d637de96875f1b54803b2dc5fe990ea269a1071705664b4e431ab9531bedabade5f7de6c3fa33208c862a1ceabc3a472a134bbef37476e8c3 WHIRLPOOL a58a307a8220b500e030f20089e38331307a9d8c207dae8f564400346d72d4c914619246aadcd79e42e776f477e3f7f0ff2542b8b26442e23b8c777170bc4e53
+AUX man-1.6f-man2html-compression-2.patch 1725 SHA256 f9df05eabad2408a017790954f46ac06eb565fed4de603d6d20bb3145439f97a SHA512 c7dc78f75876882e4f241ededd61ab1dad9292e2aa91d82c09e0e4a81c6a97d6537c8bb4b9154a17cb1db47d8716464b8146ccd487545e3f5c317482ad86e0bb WHIRLPOOL dd2116a61ab88e35b4dd152c0bd7f1ec3bdcbb9b7ddef030cc778230ee7f0b4f27bf817f1003ff378847349fe4a26a41d7e12855581c7ae92b1773b5a28b5c36
+AUX man-1.6g-compress.patch 343 SHA256 96945eded649cfe908088b75da4a71e7bfb461795e463d0126f34985410bd40f SHA512 eab984c95b75bbf29b65ff38029bbcfa870972fa2cff208da5d4d43c89dd0ceeb32a8faceb43836ced9ff50ee5765d2a5c4f1faf51f5507f0ea97b6ffcfe36c8 WHIRLPOOL ccfb29da707bed5c6e2ad9ace2ba51882d3cdea36c29010a78b1359969b8dcd303467d7566c497cc2a4068e2fb13b8bd2a559c8f96ae60af47e5212d355347db
+DIST man-1.6g.tar.gz 256906 SHA256 ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f SHA512 c786fa2201aed92293e5590dc3ad5d550cf14e5059fa274ef7719af86ee4c892e747576495b6dc0a09286e73e2f0f0caf860216e0c8032d9ef13e5d26853048b WHIRLPOOL 1b531476108c27a3993023da430831c2d20f8045a51490d559a7f588f0771931defd7a3a745e9f1f03797e681eea8767aad4a27ab9abdd5d06ad935dc96a5020
+EBUILD man2html-1.6g.ebuild 1235 SHA256 cf21ccf52601370268a1bb345fba8ed2563fa1f2501eb00135bba57224ba1e29 SHA512 3c8c616e959c8b5b2d3ae801357f3122b7b50f22c4894df0074d418d9063226c9de9add2c0a575fd99ad59a548897cfef1380817ac0bd737ff8fb90d8203c1d6 WHIRLPOOL 1feb7ccb5b8a8dc5bdde96ee050a90beafad1ae093f49c34695c49f02447f19d5307fcdf299ff830cab8c7e9ae8d8f2353b4cb67204df6576546500d22c150ad
+MISC ChangeLog 605 SHA256 6a308505943753f3609d37632ce04845b8ef37e983ca4e06c88c8bcb83a63a74 SHA512 d5ab9bcf27880a9807f13a3b1c776a9801fa2958432c5cc78078b7afb55a638341522bddb9097e3a7628b5189e23f64a1201ce9c3226c2b4a251d08ee45e6670 WHIRLPOOL 22e51302c4a776ed7422ec77df1d2d13a5d5815c6e6109b5e42c7dffb2b894c3d373e22307e77745932e5f247935312b6ae5a5802d19a9176d445524ab3abb82
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/man2html/files/man-1.6-cross-compile.patch b/sys-apps/man2html/files/man-1.6-cross-compile.patch
new file mode 100644
index 000000000000..265265077a9c
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6-cross-compile.patch
@@ -0,0 +1,61 @@
+Fix up to work with cross-compiling ... most of these tests only
+need to see if the example compiled, not whether it runs ...
+
+--- configure
++++ configure
+@@ -232,15 +232,13 @@
+
+ echo checking for POSIX.1 header files
+ echo "#include <unistd.h>
+-main() {
+ #ifdef _POSIX_VERSION
+-exit(0);
++main() { exit(0); }
+ #else
+-exit(1);
+-#endif
+-}" > conftest.c
++# error no _POSIX_VERSION
++#endif" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ DEFS="$DEFS -DPOSIX"
+ fi
+ rm -f conftest conftest.c
+@@ -249,7 +247,7 @@
+ echo "#include <strings.h>
+ main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else DEFS="$DEFS -DUSG"
+ fi
+ rm -f conftest conftest.c
+@@ -258,7 +256,7 @@
+ echo '#include <sys/types.h>
+ main() { uid_t x; exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ else
+ uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
+ DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
+@@ -291,7 +289,7 @@
+ #endif
+ main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then :
++if test -s conftest ; then :
+ elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
+ elif test -f /usr/lib/libPW.a; then LIBS="$LIBS -lPW"
+ else DEFS="$DEFS -DALLOCA_MISSING"
+@@ -321,7 +319,7 @@
+ struct option long_opts[] = { { "", no_argument, NULL, 0 } };
+ main() { exit(0); }' > conftest.c
+ eval $compile
+-if test -s conftest && ./conftest 2>/dev/null; then
++if test -s conftest ; then
+ manpathoption="--path"
+ else
+ manpathoption="-w"
diff --git a/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch b/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch
new file mode 100644
index 000000000000..b79b3a1872f1
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6f-man2html-compression-2.patch
@@ -0,0 +1,61 @@
+add support for bzip2/lzma to man2html and friends
+
+--- man2html/glimpse_filters
++++ man2html/glimpse_filters
+@@ -1,3 +1,6 @@
++*.bz2 bzip2 -d -c
++*.lzma lzma -d -c
++*.xz xz -d -c
+ *.gz gzip -d -c
+ *.Z gzip -d -c
+
+--- man2html/scripts/cgi-bin/man/man2html
++++ man2html/scripts/cgi-bin/man/man2html
+@@ -93,6 +93,12 @@
+ *.bz2)
+ bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+ ;;
++ *.lzma)
++ lzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
++ *.xz)
++ xzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
++ ;;
+ *)
+ "$MAN2HTML" "$LL" "$PAGE"
+ ;;
+@@ -103,6 +106,12 @@
+ elif [ -r "$PAGE".bz2 ]
+ then
+ bzcat "$PAGE".bz2 | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".lzma ]
++then
++ lzcat "$PAGE".lzma | "$MAN2HTML" "$LL" -D "$PAGE"
++elif [ -r "$PAGE".xz ]
++then
++ xzcat "$PAGE".xz | "$MAN2HTML" "$LL" -D "$PAGE"
+ else
+ "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+ fi
+--- man2html/scripts/cgi-bin/man/mansearch
++++ man2html/scripts/cgi-bin/man/mansearch
+@@ -153,7 +153,7 @@
+ }
+ print "<DT> <a href=\"" cgipath "/man2html?" fullname "\">";
+ textname = filename;
+- sub(/\.(gz)|Z|z$/, "", textname);
++ sub(/\.([zZ]|gz|bz2|lzma|xz)$/, "", textname);
+ sub(/\./, "(", textname);
+ textname = textname ")";
+ print textname;
+--- man2html/scripts/cgi-bin/man/mansec
++++ man2html/scripts/cgi-bin/man/mansec
+@@ -128,7 +128,7 @@
+ # Print out alphabetic quick index and other links
+ }
+ # Split page.n into "page" and "n" and generate an entry
+- sub(/[.]([zZ]|(gz))$/, "", manpage);
++ sub(/[.]([zZ]|gz|bz2|lzma|xz)$/, "", manpage);
+ match(manpage, /[.][^.]+$/);
+ title = substr(manpage, 1, RSTART - 1);
+ if (section != "all") {
diff --git a/sys-apps/man2html/files/man-1.6g-compress.patch b/sys-apps/man2html/files/man-1.6g-compress.patch
new file mode 100644
index 000000000000..374d80730074
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6g-compress.patch
@@ -0,0 +1,17 @@
+allow selection of default cache compressor
+
+http://bugs.gentoo.org/205147
+
+--- configure
++++ configure
+@@ -1012,6 +1012,10 @@
+ done
+ done
+
++ if [ x$COMPRESS != x ]; then
++ compress=$COMPRESS
++ fi
++
+ if [ x$default = x ]; then
+ echo ""
+ echo "What program should be used to compress the formatted pages?"
diff --git a/sys-apps/man2html/man2html-1.6g.ebuild b/sys-apps/man2html/man2html-1.6g.ebuild
new file mode 100644
index 000000000000..605d4798b82a
--- /dev/null
+++ b/sys-apps/man2html/man2html-1.6g.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="man-${PV}"
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="!sys-apps/man"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+ epatch "${FILESDIR}"/man-1.6g-compress.patch #205147
+}
+
+echoit() { echo "$@" ; "$@" ; }
+src_configure() {
+ tc-export CC BUILD_CC
+
+ # Just a stub to disable configure check. man2html doesn't use it.
+ export COMPRESS=true
+ echoit \
+ ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang none \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake {src,man2html}/Makefile
+ emake -C src version.h
+ emake -C man2html
+}
+
+src_install() {
+ # A little faster to run this by hand than `emake install`.
+ cd man2html
+ dobin man2html
+ doman man2html.1
+ dodoc README TODO
+}
diff --git a/sys-apps/man2html/metadata.xml b/sys-apps/man2html/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/man2html/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/mawk/Manifest b/sys-apps/mawk/Manifest
new file mode 100644
index 000000000000..64e2dd9fe153
--- /dev/null
+++ b/sys-apps/mawk/Manifest
@@ -0,0 +1,9 @@
+DIST mawk-1.3.4-20150503.tgz 468794 SHA256 461673c7c4572e1e67e69e7bf7582e02d3c175b814485f2aa52c2c28099b3c6f SHA512 ac9dde6948328d8db94458448abdf7389f8862ae6093315dd19ed9d1cbeab60fca1fc7b084cda4ce09505010f7108612585e3c4ba9663ddf3adb869bf1d9d7b6 WHIRLPOOL 171c82659cfbae255c7209a1ef700a981bebb46ebcfabe37852ef4edfe60f28e6f3b8509700fbdf6edd10af2bdf4a5be898686666f2a61e59c1771b475645a0a
+DIST mawk-1.3.4-20160615.tgz 466312 SHA256 230a2a2c707e184eb7e56681b993862ab0c4ed2165a893df4e96fac61e7813ac SHA512 97062fe278f1ec30db2233f9bd5a2f60557e2362a2c785bce94a7b9eec9065138cf1349bc145c18194b5af56c8e943e63c95baea839282a65ba09062bdcca2ae WHIRLPOOL 981676b445bf6ed7edbfd3bbc5e62675d1467b5e047a692a006765fbc7e3da45314c59f9959585f7d4ca5ef3f736f6b134352e6d97ba3097cba8673490d89538
+DIST mawk-1.3.4-20161120.tgz 461464 SHA256 361ec1bb4968c1f1f3b91b77493cf11b31c73ff8516f95db30e4dc28de180c1e SHA512 c5edcbff4ab1e40eb9b178a045fcd426a5f3c93a3ab5bc1ca1fa85a0977b8c9060967fcbda4e4a6e9e68628f50a2814e22939676008dced529377d2cf9bda5b2 WHIRLPOOL 716a7f3c46c301bf2819c087dd1efa5f869fb5c3a7386e940fa21977b37451475a6d48f7d88bf9442e6111ab974398c5e1fcb41a2278f402f2948e1b4677587a
+EBUILD mawk-1.3.4_p20150503.ebuild 825 SHA256 8aec976d05bfdc4e72a6fbc698c6292954a84de8ed8260ddd96cf767f4245ba1 SHA512 7f7b0386ae02ee8bd6b2a3df4218f3dd732b22e9154b8bd37ed15afbeba2a145aa02161e64b8e2be78d4e6d9c2b58e3d4fa4c7d5b557f434c1cdf21e593bd749 WHIRLPOOL f4c28a536767977ede6e69330461aeb70fc085cada1258bf9cd73088da0b613eb50c7441dea90db07cc510cab0ecd965be5d8468b071aca62cce7ffc1fae3cac
+EBUILD mawk-1.3.4_p20160615.ebuild 870 SHA256 0e9558978041c3ac64b641ab2c7cd9a293958a85584a42b134fbdd57eba94d1a SHA512 5841a8486c4a59f16c1add9e9aceb89fc428b29a29359ce17e451dd46f66c0501b4260463f4b152e1403e391d86c30638edef328ee31ae9ec1b0b4aa0238afe8 WHIRLPOOL f2ae92be7cb80067b6d7faab0e4de2346c6b5017477a054e4739286784bd4af02fb845ed27f2c0bf5e4a663a85e694bdc8ee475e8aeeb8d3f9aa91023b7e7729
+EBUILD mawk-1.3.4_p20161120.ebuild 879 SHA256 4f2a11d20527de67f131a45c6197938cb6a65acc7d92240806b1b84e0c8cd9a5 SHA512 8479121ba985077b8002fe730ede99f548dfb806846ecb221aed06386e0c39879d915f6346ba9f71c16f864f315c0391bc4e6b8c2a1e105b826c0fe4bef8a670 WHIRLPOOL 7d292668423b5d4a1c3c540d6e27fab711757c3ab05aba5f8febd3e15a9a51de8713a97277ce5f22d817d57eaac62dab84ce646cc12b0e31b930151b32878281
+MISC ChangeLog 5025 SHA256 86fd8c312145601a0bf68d062227c505b9994da433bcd315eb47efff4a5e04e8 SHA512 9386e748de08c932f7b4a20a1d0732bb91aa0586bd307b5aaee2f8025af43933b508efb65a327575689f0daba6b842d78536d88d6c401def65b71e3b4e524366 WHIRLPOOL 06f7260bf239f911be59d9306a116a682066231afb50e2c429082ba5d7bfee2525f865aabdb8999922a2f4a8627802e75828f9b7a6acd56886fb35e2930739cd
+MISC ChangeLog-2015 4992 SHA256 1c6ac5da194c4afaa47d8ec5bfd785b1958dfc23d41aa28f97ede3f7b50cb8ef SHA512 7bd0aac3545bf64bfddc0d5adc5c4d45beb4586a295187c6a330db93ea5d07ed5823040394beb6b912bc8f8914bafde182b8584418b598b9ef15a61584a75c7c WHIRLPOOL c5be831abdad16a3b8ad1716d011340a3242d5295bc7a6ae13e72ceb01e11a86c544d0a15c3df5042f411f8b1a6cb5d2aa482baf7c86af210b013e8e1a002cf0
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/mawk/mawk-1.3.4_p20150503.ebuild b/sys-apps/mawk/mawk-1.3.4_p20150503.ebuild
new file mode 100644
index 000000000000..8a27fa6e4d1e
--- /dev/null
+++ b/sys-apps/mawk/mawk-1.3.4_p20150503.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+MY_P=${P/_p/-}
+DESCRIPTION="an (often faster than gawk) awk-interpreter"
+HOMEPAGE="https://invisible-island.net/mawk/mawk.html"
+SRC_URI="ftp://invisible-island.net/mawk/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ppc sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="app-eselect/eselect-awk"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( ACKNOWLEDGMENT CHANGES README )
+
+src_prepare() {
+ tc-export BUILD_CC
+}
+
+src_install() {
+ default
+
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+}
+
+pkg_postinst() {
+ eselect awk update ifunset
+}
+
+pkg_postrm() {
+ eselect awk update ifunset
+}
diff --git a/sys-apps/mawk/mawk-1.3.4_p20160615.ebuild b/sys-apps/mawk/mawk-1.3.4_p20160615.ebuild
new file mode 100644
index 000000000000..2638e7629c4a
--- /dev/null
+++ b/sys-apps/mawk/mawk-1.3.4_p20160615.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+MY_P=${P/_p/-}
+DESCRIPTION="an (often faster than gawk) awk-interpreter"
+HOMEPAGE="https://invisible-island.net/mawk/mawk.html"
+SRC_URI="ftp://invisible-island.net/mawk/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="app-eselect/eselect-awk"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( ACKNOWLEDGMENT CHANGES README )
+
+src_prepare() {
+ tc-export BUILD_CC
+}
+
+src_install() {
+ default
+
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+}
+
+pkg_postinst() {
+ eselect awk update ifunset
+}
+
+pkg_postrm() {
+ eselect awk update ifunset
+}
diff --git a/sys-apps/mawk/mawk-1.3.4_p20161120.ebuild b/sys-apps/mawk/mawk-1.3.4_p20161120.ebuild
new file mode 100644
index 000000000000..5db9517c4128
--- /dev/null
+++ b/sys-apps/mawk/mawk-1.3.4_p20161120.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+MY_P=${P/_p/-}
+DESCRIPTION="an (often faster than gawk) awk-interpreter"
+HOMEPAGE="https://invisible-island.net/mawk/mawk.html"
+SRC_URI="ftp://invisible-island.net/mawk/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="app-eselect/eselect-awk"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( ACKNOWLEDGMENT CHANGES README )
+
+src_prepare() {
+ default
+ tc-export BUILD_CC
+}
+
+src_install() {
+ default
+
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+}
+
+pkg_postinst() {
+ eselect awk update ifunset
+}
+
+pkg_postrm() {
+ eselect awk update ifunset
+}
diff --git a/sys-apps/mawk/metadata.xml b/sys-apps/mawk/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/mawk/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/mcstrans/Manifest b/sys-apps/mcstrans/Manifest
new file mode 100644
index 000000000000..12e0fdf9547a
--- /dev/null
+++ b/sys-apps/mcstrans/Manifest
@@ -0,0 +1,5 @@
+AUX mcstransd.init 659 SHA256 cf185fb243d5592a00c816ec4733f6a2390e63b6ebd54f83bfd31e24ff337fa6 SHA512 de97bb70286bd2b772ac6e98346ffcb96dcad95925ebb3bb44e6ffd4cf22b88d27aea103c89973f0fcc6334c98a9399d077e9cd52eaf7da70c5fce3da96ef3a3 WHIRLPOOL 0e88040a2e1a94241d62400ad6adaf4dfcf07438bfc5ae10501d1464af71abd3c8ecdd2a5fb83251966b8f7d3b4e1b28a46cdcd0e8eca6601df866a3914db7c1
+DIST mcstrans-2.7.tar.gz 41137 SHA256 cdca003282d160b50ad695ab5b013c05ca21387a419b2f89288534184d16e1e2 SHA512 2e59f26fad3423a0c8e2ea49d619f99022c72e1aebb00e842defb4fad56f187f9ed0f069ef78d3b209ba76f5ebdcba1668f51ff881b753dada5716ee942519b3 WHIRLPOOL 0a63443d0a0c1e11a000c923b9c23e8b6e128543665c11b84d122bcd8afec298617680b9543110ae5d44a9ea64564a2c361a8a9426f65c17505848c91f6ca555
+EBUILD mcstrans-2.7.ebuild 1217 SHA256 b7adfd4f0b8865b54c037c777616c14a1a22e1e3d72779025c3ea5efa62cf708 SHA512 d26037fd0d2f2ef722a21da5ba974410a5441608e32fb35d8674ebae48dd2eb485b30af50d7f54a3d3181b8c7af838e03d744336181f8bd3b8d8b8a47a906250 WHIRLPOOL f0ca1e7fe9071e598c8af92164f5386a2c63677ea9c4dc77adce54c0de789e21596da72ccd86995bebbefcb6ee58ca2086a4de21b21a209223ebc53808132ee4
+EBUILD mcstrans-9999.ebuild 1219 SHA256 9936177900b96b9c7807dba2822c55a41783799b531231ca68e31ac944a275f5 SHA512 12506c47944a8c532374d87be5f8a6ff7c9b7b7d71a9a22571852866533cbd1e8fa4f9392dd14a40449acce30094a1b9848fea7e1f6226ad2249c132b512483a WHIRLPOOL 737711cd01b65c6a5f2bb7408a2a3e596f907f29d88304220fffed7fc5a4277dc86d8370185f3be8881ed060aa5dc37aeddf6d7f74665124ef894c5bbb134bf4
+MISC metadata.xml 451 SHA256 0d5731e927ea28aca4af67827a099005c4d384920bd0a87208c6556f82db7ee1 SHA512 9d1f5669661c1fe232b18517a954640350c8f0c606d3ca91e429f53790532bfc9b73d7c18e575c4055d3ea7ba4a5ade632d1814700ed1d3d000fe5ebfa065744 WHIRLPOOL e36e3a495541222d89311cb424d9e462a3ec2ec9dc6c5f03c12bbaf5ce4fe158ce6373012e50848dac17331bdcb4f8bff1253589ebc1faa744dcf5c02df0ed64
diff --git a/sys-apps/mcstrans/files/mcstransd.init b/sys-apps/mcstrans/files/mcstransd.init
new file mode 100755
index 000000000000..7c90e771b383
--- /dev/null
+++ b/sys-apps/mcstrans/files/mcstransd.init
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 2006-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+is_selinux_enabled() {
+ local SE_ENABL="/usr/sbin/selinuxenabled"
+
+ if [ -x "$SE_ENABL" ]; then
+ $SE_ENABL && return 0 || return 1
+ else
+ ewarn "mcstransd: Unable to determine SELinux status"
+ return 1
+ fi
+}
+
+start() {
+ if is_selinux_enabled; then
+ ebegin "Starting mcstransd"
+ checkpath -q -d -m 0755 /run/setrans
+ start-stop-daemon --start --quiet --exec /sbin/mcstransd
+ eend $?
+ fi
+}
+
+stop() {
+ if is_selinux_enabled; then
+ ebegin "Stopping mcstransd"
+ start-stop-daemon --stop --quiet --name mcstransd
+ eend $?
+ fi
+}
diff --git a/sys-apps/mcstrans/mcstrans-2.7.ebuild b/sys-apps/mcstrans/mcstrans-2.7.ebuild
new file mode 100644
index 000000000000..48b476249e7e
--- /dev/null
+++ b/sys-apps/mcstrans/mcstrans-2.7.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="SELinux context translation to human readable names"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${PV}:=
+ >=sys-libs/libselinux-${PV}:=
+ dev-libs/libpcre:=
+ >=sys-libs/libcap-1.10-r10:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+
+ rm -rf "${D}/etc/rc.d" || die
+
+ newinitd "${FILESDIR}/mcstransd.init" mcstransd
+}
diff --git a/sys-apps/mcstrans/mcstrans-9999.ebuild b/sys-apps/mcstrans/mcstrans-9999.ebuild
new file mode 100644
index 000000000000..2f7feeef0119
--- /dev/null
+++ b/sys-apps/mcstrans/mcstrans-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="SELinux context translation to human readable names"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${PV}:=
+ >=sys-libs/libselinux-${PV}:=
+ dev-libs/libpcre:=
+ >=sys-libs/libcap-1.10-r10:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+
+ rm -rf "${D}/etc/rc.d" || die
+
+ newinitd "${FILESDIR}/mcstransd.init" mcstransd
+}
diff --git a/sys-apps/mcstrans/metadata.xml b/sys-apps/mcstrans/metadata.xml
new file mode 100644
index 000000000000..4236a792e95c
--- /dev/null
+++ b/sys-apps/mcstrans/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 type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ MCS translation daemon translates SELinux contexts to human readable format
+ </longdescription>
+ <upstream>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
new file mode 100644
index 000000000000..5ac3a7aa210a
--- /dev/null
+++ b/sys-apps/memtest86+/Manifest
@@ -0,0 +1,29 @@
+AUX 39_memtest86+ 1610 SHA256 f25141a2bac29deebbd2cf00423cbdcc3741abcf4df090b1b02c5342f8630b9f SHA512 49ff9ff7dccf92a2d287191b6e4c91d418f064f6018d19081d1086b18a2a61ee043ccf93077f129189b8da6598dec3af4f738ab992d9cddb1f7f39cd8b6e71ad WHIRLPOOL 3f652651dbbca4af2e6282d180b9a5f7cb686b429cc14b3c291372fdfef0b6c1d44c8836e7dd0510ad3fff30911c6f528bec3be94c4651ea11d2f19931137716
+AUX 39_memtest86+-r1 1702 SHA256 b0c0ec336e6e3a8b6bde2a76aa5d773507374312928ad0843637d3d6cc021a33 SHA512 ef2d86bd902f44905921880c630a85d3c9763bea3b79211f64346f1f55a5f31ed0b20a80f9f0c3914de1f33b7bd7d3471762f17065183ced185de52d34f2068f WHIRLPOOL 43777ed9ef4414574f8620a09ab024c5d77125022d7f3fb3b7387c10abf0f8883209af5275692a18c6a65d29c8b7e987e36208890cc9d40aa74512d172a30329
+AUX make-memtest86+-boot-floppy 2499 SHA256 88d8768592abdd224b9cd041152c78ef50eedeef3620f0d00f51c0eaeef8158a SHA512 28649d630c4624573a5cf4279f6207cf44707978d8a18f2c614997f641038f2da731bb5c3b26066812a5c02d926c40020e74820b1a4eb2b4732a76686c52c260 WHIRLPOOL c2600dd87a20aa8ab595e1af74a353bd2c4e8ae8b2e4738967503007ad242ff53d23525d6e3692e5990909aafc2456a5f4f8d7e4c23063bebbcf9331c4031438
+AUX make-memtest86+-boot-floppy.1 1165 SHA256 240c921fe2cbb4d70b5e06fc06d798c6018ece8a238fdeebf3ad02a6043ed5d7 SHA512 8b5b6397e50cf4d48aeda31de4c1f72493e97db52ff45966716df8f9b0fbbd8d4ed71e289c0113ef53fa52a7ea6df4c107c63ca70f90c951dd085c05b64db147 WHIRLPOOL bd7d87c7cd4b16c0bcec083d9c73a8ef8dc627699058318407a20b103014cb03fe34389f2e85f3e16e88521971983e50d9f3e1dd45b7471356e0797544e8a4d5
+AUX memtest86+-1.70-gnu_hash.patch 485 SHA256 07bb65affa496910f0c91457c5c21e31a0e523e0c360ebf602b47296748f4bac SHA512 3988daa31cefe88a207aaa56afcb9e1f70a7bccbf9c943e992084e43507497f20bcf72b06f6768ce436c36306b773ba4271d247bef17ab5ab529666d036823b8 WHIRLPOOL 96a44e3132aa97bdc26de8ada35dcb2a012f021d854967b07cdb1a098a65aa5700b10ae97bae098b2b204c2afc360a8db119862013f9122385d66ee24ced26bb
+AUX memtest86+-2.01-hardcoded_cc.patch 1209 SHA256 79de7846fc10bb70f018bda0daad82082600a5a7bc35d7715b25294018e47d97 SHA512 2295e2049e439471ae2d5700c92e0142060c6a0f6fa9c3814c0fe0d6153f575a4530b5effe6f2b17ece2589ec360f69d79eff396149d9c0a4658847acb588c2c WHIRLPOOL 6d12d33cc71044348f634b0cd31bf08fae9ac79ac478a2b5e88cc10586747d53acbc54497fbd0356fa225b0c326941642b1164abc8231c2832fc0ac75100a347
+AUX memtest86+-4.00-hardcoded_cc.patch 1217 SHA256 1e3df89afe8734cea0fdc90131b9daf3f93d8d96451d38771e5225fde2ba1c4f SHA512 d362b4f57209d6437c48f079b5820449badd88ee5efee3e83417cdfdf249804d17ccea6cb5ac7b4047e95466bbb50ad1c6725b3d0e51845ea3a32309965ac1a8 WHIRLPOOL d95b9845099e044a4d8384d849144ade4239ce6a69f6e0c678ce98873c21615d420ba3f20e6bddb740efa889103e8c22c1d020f81e920d2117b1022880fada29
+AUX memtest86+-4.20-hardcoded_cc.patch 1222 SHA256 fa8d1a7ac3b15975941aa562ec48700a671e951321713b3481e93758759c3f92 SHA512 ae15a6505af65ed176464f30f3beeb78a62799fb4f945e2003598fdbfcf54b75cd859afd868e9a1e9e4cab729411f072bf0a40bd296b9d770f6de140de14c7f1 WHIRLPOOL 8c8de61054cb32b4c192285ed6295ef991e72af7ac3f37fbd80d310a989f2c4999cdf42fc6b43cb43d11caecd82df2eb3c9e82b9dc26882ba2b2887a038ede73
+AUX memtest86+-5.01-gcc-473.patch 1308 SHA256 2b1e28c10afc766134154cf6419a8a7321eb43157573b9fe175a22a65a9a06cd SHA512 94427ae0b78c9e24a8f4db6285a04ec468d17b6b4bb26550abb006a9fa37b52c871cb4cfb0fb2489e373b0ea9748106938f7fb4ad0f31968e151e37294199a55 WHIRLPOOL 333307fac7c7ea7b7173cca6abcf6c9457845b4d9757400b6abc99de8d3083e4249f611312b52d596d892f33d4a149c08a0ccaf89d5cf0f161326ac5ead585a2
+AUX memtest86+-5.01-hardcoded_cc.patch 484 SHA256 883354dabd02201b95ce2c1948b2d1e4ce65bdefb81ff21e5c2ba673c0e3c245 SHA512 a7008dcc1136283cdfc0dd5e17b0c4c5816d2799d50fa7c63e14b258f0ce34031ec782e199b826a0cc909464ab1f5aaf651ede6681ddac7d5ca416b8412106be WHIRLPOOL d9d28af1793d946e842cb4f8bfe4923c0f4e3e6b432a1bcfec8d5de4e9cd280542486abe2615f069eb41bb9d2f331c1c26ddf4ab991c51684239346fe5bd58e8
+AUX memtest86+-5.01-io-extern-inline.patch 1183 SHA256 81df3823f115510155077047aa006428e1c868e3cbabb0760f75680de37683ed SHA512 c307d268d2e3fc0c4517f627eea0c53679cb6f76cba06bb822beb2b6121e0ce0bdbe59539ff5fe716f0fd0083fa987d8a44d2999b888ccc05f8d3d9d693ded0b WHIRLPOOL 17d28410ca6c8fb6c8f80f6cc899e2f5246d1e6a18cac5822bcd5e584de7089af9f3a5dec83ac6e7f147dd7796936f87f449bf065dfb3259bd2c3a5d5351258a
+AUX memtest86+-5.01-no-C-headers.patch 1078 SHA256 0108f8e7788d9d59121cb5d3ce0a445df3c3520a754583578e1075bd0de7cea0 SHA512 8720da16f03e7ea511b1b26ff19f105737e698f9604cd87256b5a3703a7347b0334c1e0ec9ef3b7aafa2a8bca1de6d6deeb865a1de343cc5c3ccd13663fa796e WHIRLPOOL 47870d020ed9daeae00779387f8fff267d26e7bc80f950ad71dd8c8d3be43eb32a57f79dcf94d439c3c36c05188142b9618727b44b97e6e09df6196f1d0fad2a
+AUX memtest86+-5.01-no-clean.patch 603 SHA256 1e7b306b219af4214dea3c706961c7f26af4613df678cada750f5a6768b8788f SHA512 39b86324428be68192f66a767d33b53e15cffb0f96857dfb4b0e96f0ba2e52953cfd2079a6891a31e73d529e33632122c40e03f227d2203a6ff25dc03f23a056 WHIRLPOOL c1cb1733f0ffc5cafbd4e1c82f6ce86709d02cf3be0eb7632382814641cfb20951a6dcf8f8f09fb00f29efb3f8b8620b94ad5fc15fd40d0e2be7857025628fa6
+AUX memtest86+-5.01-no-scp.patch 388 SHA256 9aa74285a2115f2b5c5ff403a6030cc93272989bea94aba06740e61f78e351cf SHA512 4b14e16fbe8e69a4d532e8327486fd2434798613a784aca24b381f1fb5ae39839344281494c32dfd0fe8a8a46b744abdaac7884be4a95a87b635e0baea63731a WHIRLPOOL 1dabef74285f5e6561c838d7c987b9a36285f2f91e9a73d1e022e84ca6f674b33694f46a26833338d1c358c683c4098df3d77e612ba00a80aaac536c19e30021
+AUX memtest86+-5.01-reboot-def.patch 326 SHA256 258696c3540a0be5cc87e390e4b92a0642490e801ba887170e6d55152356b32b SHA512 2309da17ae7bfd32137b02c0533a9d4f30c95d70dea309a009219457f07f36e0b9192e1ac55485513a23d6364247476886a4720ffe83d33a2c493124a82797a1 WHIRLPOOL 28b0bab567a7f4af588b730477a28800d552c6ed2bd206e7539c03f5183b127f79950c2a2479e6ee82d92f59b159efef7d573f76c7f38bb72d5fdb9c50bde8d2
+AUX memtest86+-5.01-test-random-cflags.patch 679 SHA256 53f50ee7b803c21159731fb5920e524b1dd7884d60eeeb51851020754400baa4 SHA512 a000cf28d69396b0707519bb995f086457f8fa5283299164d969dbf02abea86b566016d71fac7e887c6089bc39c58be9e5c885cfb5f8e7eb815ea1741e097bb6 WHIRLPOOL a083e078774310ff2aaff02d9c7a8695f29a838cdb18ac4346add029f9b8de6269e39020f62b95223a950912824e69d7f6bfb74bc18fac943a0d6791dd9fc290
+DIST memtest86+-2.01.tar.gz 165984 SHA256 35ad452f4fd12f07756abccccf1bce70d42596c2c5e9c29247ffc8e0b76bd1ae SHA512 fb8fd8f7e3f597701a031189c18bd95247fe1fc936838359411a32a24fb8845a0012ebd2e02bb399fad1fab0f493dbe475a3e646c272d10e6343af4646d8347b WHIRLPOOL ef08df9cd56f7f868c5dbe2740762ff804e2b7e0163e7ff89716bfdc038de7c5e7bd949a94eb7df3caf699b997e261ee96c0e488d3c3543215689e08732b35a9
+DIST memtest86+-4.00.tar.gz 270327 SHA256 6ec42f549da81b715bfc5c55b93b74774fb5c35f7578c7eecebab3ca37866ca4 SHA512 3d2075ec5fe18ce356f75bf473aa189ba6153269c63be263f13e7d553f468a57f147f1e62dad16ad9ec4fb57724e1c67c69eeffb33db3e1f6300357f26b586ba WHIRLPOOL c084f64ed1c658312ed8fe28e1366eb112acfb220f2cc516e9f35df6965fb280d7205b0786febc5bb402b41fee236d9aea6b629f20db09f8345d58a0d0777a71
+DIST memtest86+-4.20.tar.gz 206044 SHA256 5630ce978d0e6b671891df4253fc5c54659764d0cdfc7515ac0df3d8dd9e8737 SHA512 2213a64cd3036f840dd816dd49b62b0f082e1fbfe64e02f52370f04e39857f042dc8bc0044c1a88ba678e72c1eb8629aa706fabfd3c052e41c29c073f4e8c441 WHIRLPOOL 16b2f0a447516b24e4e29cf526ffc2ba03406105473c1d0cff44d737473b81db0482131385f2a39a5d202b3ccd52300f2c7109adf1b64b8bdb0a5244cb32d2cb
+DIST memtest86+-5.01.tar.gz 214877 SHA256 142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7 WHIRLPOOL c8e240c8420990c93156fcd407a4b00d350392bbf8e974398b4d51fa219d33012b4e0d60f58cb2dff59c06e36e322467031bc0231d77d4e773d97e30939d3c8f
+EBUILD memtest86+-2.01.ebuild 1274 SHA256 78f7c2d83735752efc1d3ebb396c24bb0894b41059e58c92e643bfd3ecec11f0 SHA512 655c83fac387e581f37a3e7e8971df20070f98c683eedc9e23d5aa9c0d6fbd769079b03085e1d7883026ad82cb5cebbf07ecd7be72cc64f36cf4335652401a54 WHIRLPOOL 4764032039e3da3cd25863d94abd505b5bceda9eabe7c3081cd54a87ddf86f44de88861c5d63cb00f866e9e5d70d51a0958c4ef952b424ba60feb9992509dc41
+EBUILD memtest86+-4.00.ebuild 1924 SHA256 70e86537974c3db74e77f72b9ee6cc721e9941995662a9c3636c0644970e0b8c SHA512 f8227e6fa3356670da2b6619aa5f3a2256e65727d6a030c625f9318c25938bceff3944c3f954fcdc5dd3e1f7cfc7deebb02266fe5a16c5c801804dc36b826c76 WHIRLPOOL 533ba6ab11154f1a14013eb02ba4290d83845a319e8f8f5375886ddfc9fc3caba1a1c4295fd5de4b9418c4ce63eeaaef6547516fafceb527c6f04fc6f56de949
+EBUILD memtest86+-4.20-r1.ebuild 1950 SHA256 9bf51887179808e669ab771450b1ce78c070b69bf06e5964988b1779b312fd5c SHA512 5bff802747e652f95f2b8bd7c4d73efaf581c5008f1bb6c17aa492335939012b9ef661a2986447a0e6f9493c522ea9cbd93f4ca3e6164f7142543b8a05adf2c4 WHIRLPOOL c03603846ca7198bf3e807a8a5531c56ec2da8d78bacbf8390c74538800a7b5eb08ab2120df23d1909d5cacf00ff2212d43ce4c74cf5ecb4d305911c90ad5a5b
+EBUILD memtest86+-4.20-r3.ebuild 1756 SHA256 3fc21de7456c7f625596a923cb3b18e3b4bf592f5765305b25bf4f6e38c6b53b SHA512 3cc41d0ccd74282b5ed2929359829f4377478605b06c868728e9446f3b1df8a5f38166d793f0c800428b17b724118e0eafdfb44791ef577c8bef87d614d422e2 WHIRLPOOL 9f2dbf8b8398607c8635263aeeda91a413cd6277e81eac048ee4f231603fcd2bfcadb2ce565c57335dff18287d4c7e4deec22f73d01659469e15896b5b7a5bcd
+EBUILD memtest86+-5.01-r2.ebuild 2384 SHA256 18048986af013056134c2f2a3b904203ce615e4dbf1c17ab12088ecbfdf544fe SHA512 a2912927e8d490829a187959711c85438649a912e440af637f1a9d401a574dcaf368203337123f5c9168897e5bdca0658170c2b07861bc4b10b40e53693820f4 WHIRLPOOL 47620812240b8573e38e97f2625ab1147cc76368115d79b7121c5cd9c0ca1cf3d31462f17c14236719100dfbf8bcfbf185c565a60ddcce2d1c498fe6c0966f23
+EBUILD memtest86+-5.01-r3.ebuild 2408 SHA256 7b1fa7072ccce8124e2a57c5be25824416fbb7260acc065267f327556c73d062 SHA512 8bd022e82a78e0832a97700499ad2842a6c1d9b4816a0a86418e443ddabfd231c35a9e4bb8fcdbc2b5f768dd2add1bc37f15c1aadc1f93a2dbb87c4e5200faf9 WHIRLPOOL ea0f09a6eaad6f7c7c9d61c843a4e5b39759577d93f6d5b7df2de6db32b5ca6ee298fbe64d55b98b3e0a6cf89d8632b2884e940dc4d97c1bc92c93efcd686e4c
+MISC ChangeLog 5555 SHA256 37a595591a6d71066d1ad9fb8924c84d0510cd4a0665e68c03a2fabb34f74a82 SHA512 e0d15acdb37cbe054aa67690545548769137581d173b3805d151897d1c605cf7f24def17652e3957742914b0509d97981875657c10eeecec652e9e4324a4312c WHIRLPOOL 2086cf3d2261280618621d2a04a6d2145dc63d7df92b9d103b5aab5a55ff30a56e7d10fe8db37a687546e059d05cf3a0022484891d2e3ac8115f73145fd198d6
+MISC ChangeLog-2015 12311 SHA256 25e201153484770fc7c6777e035d25ea82fe7b49cbbee171a84ef9f14bf43940 SHA512 43b5c903ea1f9ad582cef28eb0b432f4f5d8db4b515c9ce18278e88d0fe2478182178586a23af0a44b9ff543f80eab8de47ac0cab1b88ff26c7c4357fbe72fb4 WHIRLPOOL 874d3c8216c682e7cb23bd00a540ae73c041770858d9b201e2f7e4f292997e200bcee46c6213646ec4b8a754c5ff81d821faae2d8b694df8f918367838033de3
+MISC metadata.xml 476 SHA256 e062008b6d40cbe240c193e9af25b703e9d6ce03fc7fa28fbe3d97e3fa487a1e SHA512 2db5664e0ed634a23de2a1b03cec34a7ffb262730b2f561890ba1ff135296ce493cb13f83b4ef7b72b36ecd72f58d68905ddc408b02c3a152281e93086e11e1e WHIRLPOOL bf300cdfd5efb074369718ee5cd7e93d65d3bd4586c775a70cd3f4b0c7e1b6ffb739104543c35039bf4e9d922042f0cdbe4866066f2df129f61f6bb98dde32a2
diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+
new file mode 100644
index 000000000000..9c9067a5e736
--- /dev/null
+++ b/sys-apps/memtest86+/files/39_memtest86+
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86plus/memtest
+
+memtestbsd=/boot/memtest86plus/memtest.netbsd
+
+if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then
+ multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ submenu_indentation="${grub_tab}"
+ cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+if [ -f "${memtest}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+' {
+EOF
+
+ if [ -n "{submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ cat <<EOF
+ ${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ -f "${memtestbsd}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtestbsd}")"
+ path="$(make_system_path_relative_to_its_root "${memtestbsd}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+ (netbsd)' {
+EOF
+
+ if [ -n "${submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ cat <<EOF
+ ${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ cat <<EOF
+}
+EOF
+fi
diff --git a/sys-apps/memtest86+/files/39_memtest86+-r1 b/sys-apps/memtest86+/files/39_memtest86+-r1
new file mode 100644
index 000000000000..20422b74d65a
--- /dev/null
+++ b/sys-apps/memtest86+/files/39_memtest86+-r1
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86plus/memtest.bin
+
+memtestelf=/boot/memtest86plus/memtest
+
+if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then
+ multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ submenu_indentation="${grub_tab}"
+ cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+if [ -f "${memtest}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+' {
+EOF
+
+ if [ -n "{submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ cat <<EOF
+ ${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ -f "${memtestelf}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtestelf}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtestelf}")"
+ path="$(make_system_path_relative_to_its_root "${memtestelf}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86+ (ELF)' {
+EOF
+
+ if [ -n "${submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ # We use knetbsd as a lazy way of booting an ELF.
+ # It's not actually related to NetBSD at all.
+ cat <<EOF
+ ${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ cat <<EOF
+}
+EOF
+fi
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
new file mode 100644
index 000000000000..9c225c740bf4
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Script for making a memtest86 boot floppy using GRUB as bootloader
+#
+
+# (c) 2003 Peter Loje Hansen <pl@2m.dk>
+# - original version
+# (c) 2004 Yann Dirson <dirson@debian.org>
+# - added parameters
+# - ability to work on a floppy image instead of a real floppy
+# - adapted patches from Martin Koeppe <martin@koeppe-net.de>, to use
+# mtools and install full grub
+
+# TODO:
+# - add a flag to generate a default boot entry for (hd0)
+
+set -e
+
+MEMTEST=/boot/memtest86plus/memtest.bin
+FLOPPYIMAGE=/dev/fd0
+GRUBBIN=/sbin/grub
+GRUBLIB=/lib/grub
+MFORMAT=/usr/bin/mformat
+
+arch=$(uname -m)
+
+case "$arch" in
+ i386|i486|i686) GRUBARCH=i386-pc;;
+ x86_64) GRUBARCH=x86_64-pc;;
+ *) error "Unsupported architecture: $arch";;
+esac
+
+error()
+{
+ echo >&2 "$0: $*"
+ exit 1
+}
+
+needsarg()
+{
+ [ $1 -ge 2 ] || error "syntax error"
+}
+
+[ -d $GRUBLIB ] || error "Can't find $GRUBLIB - did you install a recent grub package (0.95+cvs20040624 or later) ?"
+[ -x $MFORMAT ] || error "Can't find mformat - did you install the mtools package ?"
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ --help) echo "$0 [--memtest $MEMTEST] [--floppyimage $FLOPPYIMAGE]"; exit 0 ;;
+ --memtest) needsarg $#; MEMTEST="$2"; shift ;;
+ --floppyimage) needsarg $#; FLOPPYIMAGE="$2"; shift ;;
+ *) error "syntax error" ;;
+ esac
+ shift
+done
+
+MOUNTPOINT=$(mktemp -d)
+
+if [ -b "$FLOPPYIMAGE" ]
+then
+ FINALDEV="$FLOPPYIMAGE"
+ FLOPPYIMAGE="$(mktemp)"
+else
+ FINALDEV=""
+fi
+
+echo "* Creating msdos file system"
+echo
+if [ ! -s "$FLOPPYIMAGE" ]; then
+ # unless a non-empty image exists, create a blank one first
+ dd bs=1024 count=1440 if=/dev/zero of="$FLOPPYIMAGE"
+fi
+# FIXME: "-f 1440" should probably be dropped
+mformat -i $FLOPPYIMAGE -f 1440 ::
+
+mmd -i $FLOPPYIMAGE ::/boot
+mmd -i $FLOPPYIMAGE ::/boot/grub
+
+echo
+echo "* Installing GRUB files"
+mcopy -v -i "$FLOPPYIMAGE" - ::/boot/grub/menu.lst <<EOF
+color green/black light-green/black
+default 0
+timeout 10
+title memtest
+kernel (fd0)/boot/memtest.bin
+EOF
+mcopy -v -i "$FLOPPYIMAGE" $GRUBLIB/$GRUBARCH/* ::/boot/grub
+
+echo
+echo "* Installing $MEMTEST"
+mcopy -v -i "$FLOPPYIMAGE" "$MEMTEST" ::/boot/memtest.bin
+
+echo
+echo -n "* Installing GRUB"
+$GRUBBIN --batch --device-map=/dev/null <<EOF
+device (fd0) $FLOPPYIMAGE
+root (fd0)
+setup (fd0)
+quit
+EOF
+
+if [ -n "$FINALDEV" ]; then
+ echo
+ echo "Insert a writable floppy for $FINALDEV and press enter"
+ read FOO
+
+ dd bs=1024 if="$FLOPPYIMAGE" of="$FINALDEV"
+ rm "$FLOPPYIMAGE"
+fi
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
new file mode 100644
index 000000000000..e1283e5efc8f
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
@@ -0,0 +1,39 @@
+.\" Man page for make-memtest86+-boot-floppy
+
+.TH make-memtest86+-boot-floppy 1
+
+.SH NAME
+make-memtest86+-boot-floppy \- create a memtest86+ boot-floppy using GRUB.
+
+.SH SYNOPSIS
+
+.B make-memtest86+-boot-floppy [ \-\-memtest
+.I <path to memtest86+-image>
+.B ] [ \-\-floppyimage
+.I <path to floppyimage/device>
+.B ]
+
+.SH DESCRIPTION
+.B make-memtest86+-boot-floppy
+can create a memtest86+ boot floppy using GRUB as the bootloader.
+
+.SH OPTIONS
+
+.IP "\-\-memtest <path to the memtest-image>"
+Path to the memtest86+-image, default is /boot/memtest86+.bin.
+
+.IP "\-\-floppyimage <path to the floppyimage or device>"
+File or device where the boot-image should be written to, default is /dev/fd0.
+
+.IP "\-\-help"
+Display a short message about the options of the tool.
+
+.SH AUTHOR
+This man-page has been written by Thomas Schmidt <thomas@thsnet.de>
+.PP
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL.
diff --git a/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch
new file mode 100644
index 000000000000..5a9e06dc06d7
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch
@@ -0,0 +1,11 @@
+diff -Naurp memtest86+-1.70-orig/memtest_shared.lds memtest86+-1.70/memtest_shared.lds
+--- memtest86+-1.70-orig/memtest_shared.lds 2007-01-27 13:34:16.000000000 +0100
++++ memtest86+-1.70/memtest_shared.lds 2007-01-27 13:41:30.000000000 +0100
+@@ -18,6 +18,7 @@ SECTIONS {
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ .dynamic : { *(.dynamic) }
+
+ .rel.text : { *(.rel.text .rel.text.*) }
diff --git a/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch
new file mode 100644
index 000000000000..3b07731daadd
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch
@@ -0,0 +1,30 @@
+diff -Naurp memtest86+-2.01-orig/Makefile memtest86+-2.01/Makefile
+--- memtest86+-2.01-orig/Makefile 2008-03-11 21:04:28.000000000 +0100
++++ memtest86+-2.01/Makefile 2008-03-11 21:05:25.000000000 +0100
+@@ -8,10 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+-CFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC
++CPPFLAGS=-m32
++CFLAGS=-Wall -m32 -march=i486 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++ASFLAGS=-32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o \
+@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
+- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin
diff --git a/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch
new file mode 100644
index 000000000000..f2950b64e807
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-4.00-hardcoded_cc.patch
@@ -0,0 +1,30 @@
+diff -Nuar --exclude '*.orig' --exclude '*rej' --exclude '*~' memtest86+-4.00.orig/Makefile memtest86+-4.00/Makefile
+--- memtest86+-4.00.orig/Makefile 2009-09-21 17:35:46.000000000 -0700
++++ memtest86+-4.00/Makefile 2009-09-25 09:04:23.000000000 -0700
+@@ -8,10 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+-CFLAGS= -Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC
++CPPFLAGS=-m32
++CFLAGS=-Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++ASFLAGS=-32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o linuxbios.o memsize.o pci.o controller.o random.o spd.o \
+@@ -47,10 +46,10 @@
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
+- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin
diff --git a/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch
new file mode 100644
index 000000000000..2eb750c8dd93
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-4.20-hardcoded_cc.patch
@@ -0,0 +1,30 @@
+diff -Naurp memtest86+-4.10-orig/Makefile memtest86+-4.10/Makefile
+--- memtest86+-4.10-orig/Makefile 2010-06-24 00:27:22.864634431 +0200
++++ memtest86+-4.10/Makefile 2010-06-24 00:28:42.402478590 +0200
+@@ -8,10 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+-CFLAGS= -Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++CFLAGS=-Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++CPPFLAGS=-m32
++ASFLAGS=-32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o linuxbios.o memsize.o pci.o controller.o random.o spd.o \
+@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
+- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie test.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
new file mode 100644
index 000000000000..af011d67c705
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
@@ -0,0 +1,33 @@
+http://forum.canardpc.com/threads/110950-fix-controller-loop-error
+
+--- memtest86+-5.01/controller.c
++++ memtest86+-5.01/controller.c
+@@ -292,7 +292,7 @@ static void setup_nhm(void)
+
+ /* First, locate the PCI bus where the MCH is located */
+
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
+ vid &= 0xFFFF;
+@@ -327,7 +327,7 @@ static void setup_nhm32(void)
+ ctrl.mode = ECC_NONE;
+
+ /* First, locate the PCI bus where the MCH is located */
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
+ vid &= 0xFFFF;
+--- memtest86+-5.01/Makefile
++++ memtest86+-5.01/Makefile
+@@ -12,7 +12,7 @@ FDISK=/dev/fd0
+ AS=as -32
+ CC=gcc
+
+-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
++CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch
new file mode 100644
index 000000000000..f140a7fc6605
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-hardcoded_cc.patch
@@ -0,0 +1,16 @@
+--- Makefile.orig 2015-02-01 01:08:33.000000000 +0300
++++ Makefile 2015-02-01 01:10:17.624757244 +0300
+@@ -9,11 +9,10 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+ CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++CPPFLAGS= -m32
++ASFLAGS= -32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o \
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
new file mode 100644
index 000000000000..682dd5d01a1e
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
@@ -0,0 +1,31 @@
+http://forum.canardpc.com/threads/110951-fix-build-with-newer-gcc-versions
+
+the meaning of extern inline changed between standards. use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
++++ b/io.h
+@@ -31,6 +31,6 @@
+ */
+
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
+
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; }
+
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
new file mode 100644
index 000000000000..ce7f906a19d5
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-C-headers.patch
@@ -0,0 +1,49 @@
+http://forum.canardpc.com/threads/110955-PATCH-don-t-pull-in-system-headers
+
+avoid using C library headers as it'd mean we'd need 32-bit glibc files available
+
+https://bugs.gentoo.org/592638
+
+--- a/dmi.c
++++ b/dmi.c
+@@ -10,7 +10,7 @@
+
+
+ #include "test.h"
+-#include <stdint.h>
++#include "stdint.h"
+
+
+ #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1))
+--- a/test.c
++++ b/test.c
+@@ -14,7 +14,28 @@
+ #include "stdint.h"
+ #include "cpuid.h"
+ #include "smp.h"
+-#include <sys/io.h>
++
++static inline unsigned char
++inb_p (unsigned short int __port)
++{
++ unsigned char _v;
++
++ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
++ return _v;
++}
++
++static inline void
++outb (unsigned char __value, unsigned short int __port)
++{
++ __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
++}
++
++static inline void
++outb_p (unsigned char __value, unsigned short int __port)
++{
++ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
++ "Nd" (__port));
++}
+
+ extern struct cpu_ident cpu_id;
+ extern volatile int mstr_cpu;
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
new file mode 100644
index 000000000000..e9cbf10399c3
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-clean.patch
@@ -0,0 +1,19 @@
+http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues
+
+
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@
+ smp.o vmem.o random.o
+
+
+-all: clean memtest.bin memtest
++all: memtest.bin memtest
+
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
new file mode 100644
index 000000000000..8d830e297ec2
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
@@ -0,0 +1,14 @@
+http://forum.canardpc.com/threads/110953-PATCH-don-t-try-to-scp-after-building
+
+this makes no sense in a sane build world
+
+--- a/Makefile
++++ b/Makefile
+@@ -21,7 +21,6 @@
+
+
+ all: clean memtest.bin memtest
+- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
+
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
new file mode 100644
index 000000000000..f4b42feb5fb3
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
@@ -0,0 +1,15 @@
+http://forum.canardpc.com/threads/110952-fix-build-due-to-missing-reboot-symbol
+
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
++++ b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+
+-inline void reboot(void)
++void reboot(void)
+ {
+
+ /* tell the BIOS to do a cold start */
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
new file mode 100644
index 000000000000..dcdccb8c6e97
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
@@ -0,0 +1,21 @@
+make sure we re-use the existing CFLAGS settings so that we get all the right
+flags (like -fno-stack-protector). just append the few changes we want (the
+optimization levels).
+
+https://bugs.gentoo.org/590974
+
+--- a/Makefile
++++ b/Makefile
+@@ -52,10 +52,10 @@ reloc.o: reloc.c
+ $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++test.o: CFLAGS += -O0 -fno-PIC
+
+ random.o: random.c
+- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
++random.o: CFLAGS += -O3 -fno-PIC
+
+ # rule for build number generation
+ build_number:
diff --git a/sys-apps/memtest86+/memtest86+-2.01.ebuild b/sys-apps/memtest86+/memtest86+-2.01.ebuild
new file mode 100644
index 000000000000..4eaf769135dc
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-2.01.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit mount-boot eutils
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="serial"
+RESTRICT="test"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-2.01-hardcoded_cc.patch
+ epatch "${FILESDIR}"/${PN}-1.70-gnu_hash.patch
+
+ if use serial ; then
+ sed -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' -i config.h
+ fi
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ insinto /boot/memtest86plus
+ doins memtest.bin || die
+ dodoc README README.build-process
+}
+
+pkg_postinst() {
+ einfo
+ einfo "memtest.bin has been installed in /boot/memtest86plus/"
+ einfo "You may wish to update your bootloader configs"
+ einfo "by adding these lines:"
+
+ einfo " - For grub: (replace '?' with correct numbers for your boot partition)"
+ einfo " > title=Memtest86Plus"
+ einfo " > root (hd?,?)"
+ einfo " > kernel /boot/memtest86plus/memtest.bin"
+
+ einfo " - For lilo:"
+ einfo " > image = /boot/memtest86plus/memtest.bin"
+ einfo " > label = Memtest86Plus"
+ einfo
+}
diff --git a/sys-apps/memtest86+/memtest86+-4.00.ebuild b/sys-apps/memtest86+/memtest86+-4.00.ebuild
new file mode 100644
index 000000000000..4f8aed6b61c9
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-4.00.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+QA_PRESTRIPPED=/boot/memtest86plus/memtest
+
+inherit mount-boot eutils
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="floppy serial"
+RESTRICT="test"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95 sys-fs/mtools )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-4.00-hardcoded_cc.patch
+
+ # Merged upstream
+ #epatch "${FILESDIR}"/${PN}-1.70-gnu_hash.patch
+
+ sed -i -e's/$(LD) -s /$(LD) /' Makefile
+ sed -i -e's,0x10000,0x100000,' memtest.lds
+
+ if use serial ; then
+ sed -i -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' config.h
+ fi
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ insinto /boot/memtest86plus
+ newins memtest.bin memtest || die
+ newins memtest memtest.netbsd || die
+ dosym memtest /boot/memtest86plus/memtest.bin
+ dodoc README README.build-process
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ einfo
+ einfo "memtest has been installed in /boot/memtest86plus/"
+ einfo "You may wish to update your bootloader configs"
+ einfo "by adding these lines:"
+ einfo " - For grub: (replace '?' with correct numbers for your boot partition)"
+ einfo " > title=Memtest86Plus"
+ einfo " > root (hd?,?)"
+ einfo " > kernel /boot/memtest86plus/memtest"
+ einfo " or try this if you get grub error 28:"
+ einfo " > title=Memtest86Plus"
+ einfo " > root (hd?,?)"
+ einfo " > kernel --type=netbsd /boot/memtest86plus/memtest.netbsd"
+ einfo
+ einfo " - For lilo:"
+ einfo " > image = /boot/memtest86plus/memtest"
+ einfo " > label = Memtest86Plus"
+ einfo
+}
diff --git a/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild
new file mode 100644
index 000000000000..b7a2c8ac38b3
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="floppy serial"
+
+BOOTDIR=/boot/memtest86plus
+QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.20-hardcoded_cc.patch
+
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+
+ cat - > "${T}"/39_${PN} <<EOF
+#!/bin/sh
+exec tail -n +3 \$0
+
+menuentry "${PN} ${PV}" {
+ linux16 ${BOOTDIR}/memtest
+}
+
+menuentry "${PN} ${PV} (netbsd)" {
+ insmod bsd
+ knetbsd ${BOOTDIR}/memtest.netbsd
+}
+EOF
+
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ newins memtest.bin memtest
+ newins memtest memtest.netbsd
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${T}"/39_${PN}
+
+ dodoc README README.build-process FAQ changelog
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ elog
+ elog "memtest has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs"
+ elog "by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub.d/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}
diff --git a/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
new file mode 100644
index 000000000000..6c1705fa9a2d
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="floppy serial"
+
+BOOTDIR=/boot/memtest86plus
+QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.20-hardcoded_cc.patch
+
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ newins memtest.bin memtest
+ newins memtest memtest.netbsd
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${FILESDIR}"/39_memtest86+
+
+ dodoc README README.build-process FAQ changelog
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ elog
+ elog "memtest has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs"
+ elog "by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub.d/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}
diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
new file mode 100644
index 000000000000..70ce682ffff9
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="floppy iso serial"
+
+BOOTDIR=/boot/memtest86plus
+QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest.netbsd"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+src_prepare() {
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+ epatch "${FILESDIR}/${P}-gcc-473.patch" \
+ "${FILESDIR}/${P}-hardcoded_cc.patch"
+ epatch "${FILESDIR}"/${P}-no-scp.patch
+ epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+ epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
+ epatch "${FILESDIR}"/${P}-no-clean.patch #557890
+ epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+ epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
+
+ sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+}
+
+src_configure() {
+ tc-ld-disable-gold #580212
+ tc-export AS CC LD
+}
+
+src_compile() {
+ emake
+ if use iso ; then
+ ./makeiso.sh || die
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ use iso && newins mt*.iso memtest.iso
+ newins memtest.bin memtest
+ newins memtest memtest.netbsd
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${FILESDIR}"/39_memtest86+
+
+ dodoc README README.build-process FAQ changelog
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ elog
+ elog "memtest has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs"
+ elog "by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub.d/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}
diff --git a/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild
new file mode 100644
index 000000000000..54b1ab6e21dc
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01-r3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+src_prepare() {
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+ epatch "${FILESDIR}/${P}-gcc-473.patch" \
+ "${FILESDIR}/${P}-hardcoded_cc.patch"
+ epatch "${FILESDIR}"/${P}-no-scp.patch
+ epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+ epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
+ epatch "${FILESDIR}"/${P}-no-clean.patch #557890
+ epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+ epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
+
+ sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+}
+
+src_configure() {
+ tc-ld-disable-gold #580212
+ tc-export AS CC LD
+}
+
+src_compile() {
+ emake
+ if use iso ; then
+ ./makeiso.sh || die
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto "${BOOTDIR}"
+ use iso && newins mt*.iso memtest.iso
+ doins memtest memtest.bin
+
+ exeinto /etc/grub.d
+ newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+ dodoc README README.build-process FAQ changelog
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+
+ elog "memtest86+ has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub.d/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest.bin"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest.bin"
+ elog " > label = ${PN}"
+ elog ""
+ elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+}
diff --git a/sys-apps/memtest86+/metadata.xml b/sys-apps/memtest86+/metadata.xml
new file mode 100644
index 000000000000..fc17238d1174
--- /dev/null
+++ b/sys-apps/memtest86+/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="serial">Compile with serial console support</flag>
+ <flag name="floppy">Install a script to create floppy disks containing memtest86+ binaries.</flag>
+ <flag name="iso">Compile an ISO image</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/memtest86/Manifest b/sys-apps/memtest86/Manifest
new file mode 100644
index 000000000000..75c5f255717b
--- /dev/null
+++ b/sys-apps/memtest86/Manifest
@@ -0,0 +1,12 @@
+AUX 39_memtest86 366 SHA256 d5f58bdfd78fc74433ae517846aa40b5199745c3c976cce856267cfbed532886 SHA512 2d672fa0836f31323b8eac5cf3b6300ce7601e635de395789b0bc11e6320af73888352ca577e2919086abf99f2eac1125742c3202b1a473cc808a0469f026493 WHIRLPOOL 13522708aef3acce8af539be12aa1491936469f8a953a18fa20a2eef6ae662965486be74180a81930f9839f97a1d6c26ff632d10146dbaf6e5ea32d4b22b7434
+AUX 39_memtest86-r1 1691 SHA256 ca493dc9bddf7135c5c51f65935610d6bd3105871d3092eef1460d0e52d35e57 SHA512 71a5bf7c7f85723386b0d6acdf0e4e9f51d845d676f0d15997bab397b1c7939fda9573a25823de15384682d9200026c48fbf968f5ffd2479cdf41838f4c9655f WHIRLPOOL 550413e31e364c66a701af778528e8cd00506f5334ccb54644cddc491a83ad5ff382fa00a7c048f3b5529a4bd728be232f5aa4f2868f5b306de808761f26e8d6
+AUX memtest86-4.3.3-build-nopie.patch 1727 SHA256 6f3a09dca27e518c599b2882959acd6ca5994d2994d250032aa6af2f0ed2ee96 SHA512 9aee733b27ce73243f14161606819f9161b9d1dee1bb34718b81ac4cd66238f904a2fc69be8a2a1bf13d3ba180257b130e2a7e708a295ad4300d0e869f76e8c8 WHIRLPOOL 76e6a62aa3c90b7f732c5c411a89f4e937c97cb48f570ef7a78a7b63c8aa64899a09de09d8983f603fab8926d59f745f66852ec34807d54aa11782d84e45188d
+AUX memtest86-4.3.7-io-extern-inline.patch 1128 SHA256 ac4d9ee036389d23c35e70bfb36ac7e103d7d06ecc30175611792e2a24c74fac SHA512 9ad8149bafee75aac120420838f20030d9e42fc60579f61114c76a5829e4c5197067e86dccea7c4cf306e62c43a1203028476fa9536e81f32d53c04e536e4f32 WHIRLPOOL 5cbac7b952276ac033ea5aceffddef3a12d35fd5baf6c09f60b7d78479b3781cd424c683a738c14376b34a8861eb035c632e127ef4612e40b2eef708a41eb79b
+AUX memtest86-4.3.7-no-clean.patch 636 SHA256 3733a00ae69d24d2fa04aef50bfd51ca510269da6b857803dac5031b1f6ec863 SHA512 7bac031e907a10bf66d260d29ef209362395bce3c1a735abf77bebd9a8662f0ecfc3bd2ed33abbfaeebae77da4868b5c53f0814e82a0ac930b4a01fd25a6e8b1 WHIRLPOOL 862c0487f14d47fa0278a3c3805b1255a6d465dacf2f02270b18dede51c49a1771019ba04c61d43229791fe695afe9f1bd09698bf0949f1bbe544573c081e939
+AUX memtest86-4.3.7-reboot-def.patch 253 SHA256 936e3f492b4cb6eaf11890b08b663fb4e91f0247c4dcf23c6a1b36df8ea85b88 SHA512 0587d2b4de397813f5a2a95859c7a656b0c760653dd711ffe8bd0d0602a64c4ed340c494fbfe2de6825f89aa21021df6a92c4a9e030b72aedf70f83b483a1160 WHIRLPOOL fa533bdb66950fc2d8f6ffc819b82094b809734591217b23032fb6066b8078390a644cb895a37093448f285dc81968751ea3c00382ea49b33403531efc1ea6c5
+DIST memtest86-4.3.7-src.tar.gz 125583 SHA256 784bf81107a8f8dbf06eadf5d8cc9f57a3249cade67c0635fea8b0e8691a96e7 SHA512 f1cee9085e157b399869222310c65e8094c028565d2b21fe40fd485505b988d20cff49b2c56559181ac114c39089b60c6eacb9aa5d7652df78b3f8e7530cb644 WHIRLPOOL 55283adb62b47f95e689e61e3bebdb65c51712b2d54e4cae0b012ffc4bb11f68309ad2a6ed31c911586e4e5ea5261d117fa827265935ce6e4f7341c58e5dc833
+EBUILD memtest86-4.3.7-r1.ebuild 1880 SHA256 b8b0e1f0df06f13c43692b7c6aff3bbbab42accd0073cc83e2871a3bae95011e SHA512 8ed4be4d2b0b40e91e9c29e3a4dbe349f9d5acef96a87f64ee4883edeca3f46a3548e8a79107a749483b1f3c96e673e36e0068d8897cc96f27932ba67a1d07d3 WHIRLPOOL 60999a50d5893c5f6a6fbfc1f0e88cb587c4f42d8366d6b9ba5bab7a3ee88a1840e39c7e102e6f692edba9576eafe5796500f7c6c838abc4193da54b529d6a8f
+EBUILD memtest86-4.3.7.ebuild 1718 SHA256 679f60dd353c4c44083ee905ccd0fac13b175fc0b0eea87bbd00db215357fd5a SHA512 4c88c1c46ae296b5138fa0f93c5e04cf3048662371db093a11d86c549fb799faa93398839fcb3ec5e1a904e928453f558d226138953eb884853d8b749770e894 WHIRLPOOL 3375b1c629731f7a036519e94b550fa64660b5167c0dbdc2fc960faa8dc3aa0ef3e51e8f469dabede6076335c0d4392d31e3e750fc200aea1d12fe35b3aa51da
+MISC ChangeLog 3592 SHA256 01ac3ea4ec2f61b3e81ea484f85aff8c6306a621c330856434c717120b1079e7 SHA512 2b14f8f44aed9cb6ab84b9b5b80ad79ecbea177301f16fb1a7f0683637d30e6be43d98ed018cc06578cde3a25059a78dd1593d19e70f8a8bba8c41b9a3f9ed41 WHIRLPOOL de09780ab0c9202ff1459db9ad00d7bee931153e6bd0f2a3bcfd50586f075127113d7d03cb5b69a39fe21e764d38d1ae59da513fbb2962a315f6982782be57b5
+MISC ChangeLog-2015 7940 SHA256 a7177ba4d5c52490a6a7bbc101b6f40c7d27cfbcf15aaac0a7f3dc524dacdb1c SHA512 cc71c6147641a6628ffd73f2121b6f56b575ececa4af3ee8b8d270149b53361995f18a88656f77e28d73c5ed9c3cce42d1ce0fe30cda041ec835d9bfc93725a8 WHIRLPOOL 1acd29cf6a1c83d27ad9da5b6b81ede0ecf826149e9c1af9e7409dad59247ed1e3ef14f36f6d04248867681a34c2f4d80497f883c618dab3783aeb49db76e69f
+MISC metadata.xml 330 SHA256 372bb0480d59bf12fcb04db42b879062a14f2d11201a228c559679095da4c048 SHA512 09543a0051e47f888e650455b2774012b9b4284a0ae01a4605f673b4548bc3f8bd1af0309c7de5887c5a2bafc6dde828d580c2a8e7c1ac74b93d70c6b6180d6b WHIRLPOOL d4ec144a858c9766cd05461a53447753afd78c5b692ff878f63695a45ae1a9559b269f4f0ae764cc7a8d18249a2095ed4556618fe28ac4917d9ceb54878bd33a
diff --git a/sys-apps/memtest86/files/39_memtest86 b/sys-apps/memtest86/files/39_memtest86
new file mode 100644
index 000000000000..a736bce6a316
--- /dev/null
+++ b/sys-apps/memtest86/files/39_memtest86
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86/memtest
+
+if [ -f "${memtest}" ]; then
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+menuentry "MemTest86" {
+EOF
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ cat <<EOF
+ linux16 "${path}"
+}
+EOF
+fi
diff --git a/sys-apps/memtest86/files/39_memtest86-r1 b/sys-apps/memtest86/files/39_memtest86-r1
new file mode 100644
index 000000000000..596a676cceb2
--- /dev/null
+++ b/sys-apps/memtest86/files/39_memtest86-r1
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86/memtest.bin
+
+memtestelf=/boot/memtest86/memtest
+
+if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then
+ multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ submenu_indentation="${grub_tab}"
+ cat <<EOF
+submenu 'Memtest86' {
+EOF
+fi
+
+if [ -f "${memtest}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86' {
+EOF
+
+ if [ -n "{submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ cat <<EOF
+ ${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ -f "${memtestelf}" ]; then
+ gettext_printf "Found memtest image: %s\n" "${memtestelf}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtestelf}")"
+ path="$(make_system_path_relative_to_its_root "${memtestelf}")"
+ cat <<EOF
+${submenu_indentation}menuentry 'Memtest86 (ELF)' {
+EOF
+
+ if [ -n "${submenu_indentation}" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ # We use knetbsd as a lazy way of booting an ELF.
+ # It's not actually related to NetBSD at all.
+ cat <<EOF
+ ${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
+ cat <<EOF
+}
+EOF
+fi
diff --git a/sys-apps/memtest86/files/memtest86-4.3.3-build-nopie.patch b/sys-apps/memtest86/files/memtest86-4.3.3-build-nopie.patch
new file mode 100644
index 000000000000..adbbe6f86dc7
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.3-build-nopie.patch
@@ -0,0 +1,47 @@
+diff -Naur src.orig/Makefile src/Makefile
+--- src.orig/Makefile 2013-10-10 16:52:14.292140058 -0400
++++ src/Makefile 2013-10-10 16:51:37.431138380 -0400
+@@ -8,11 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
++ASFLAGS=-32
+
+-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
+- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector -fno-pie $(SMP_FL)
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o memsize.o error.o smp.o cpuid.o vmem.o random.o
+@@ -23,7 +21,7 @@
+ # symbols and then link it dynamically so I have full
+ # relocation information
+ memtest_shared: $(OBJS) memtest_shared.lds Makefile
+- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
++ $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds -m elf_i386 \
+ -o $@ $(OBJS) && \
+ $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+
+@@ -50,10 +48,10 @@
+ $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c $(CFLAGS:-fPIC=) -o $@ $<
+
+ random.o: random.c
+- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
++ $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie random.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \
+@@ -72,3 +70,7 @@
+ dos: all
+ cat mt86+_loader memtest.bin > memtest.exe
+
++head.o: head.s
++bootsect.o: bootsect.s
++setup.o: setup.s
++
diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch b/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
new file mode 100644
index 000000000000..3e6754d112b3
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
@@ -0,0 +1,29 @@
+the meaning of extern inline changed between standards. use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
++++ b/io.h
+@@ -31,6 +31,6 @@
+ */
+
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
+
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; }
+
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch b/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch
new file mode 100644
index 000000000000..cd8fc66ba094
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch
@@ -0,0 +1,16 @@
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o memsize.o error.o smp.o cpuid.o vmem.o random.o
+
+-all: clean memtest.bin memtest
++all: memtest.bin memtest
+
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full
diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch b/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch
new file mode 100644
index 000000000000..be9e35347fe7
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch
@@ -0,0 +1,13 @@
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
++++ b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+
+-inline void reboot(void)
++void reboot(void)
+ {
+
+ /* tell the BIOS to do a cold start */
diff --git a/sys-apps/memtest86/memtest86-4.3.7-r1.ebuild b/sys-apps/memtest86/memtest86-4.3.7-r1.ebuild
new file mode 100644
index 000000000000..73cf407c5484
--- /dev/null
+++ b/sys-apps/memtest86/memtest86-4.3.7-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="A stand alone memory test for x86 computers"
+HOMEPAGE="http://www.memtest86.com/"
+SRC_URI="http://www.memtest86.com/downloads/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="serial"
+
+S="${WORKDIR}/src"
+
+BOOTDIR="/boot/memtest86"
+QA_PRESTRIPPED="${BOOTDIR}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.3.3-build-nopie.patch #66630 + #206726
+ epatch "${FILESDIR}"/${PN}-4.3.7-io-extern-inline.patch #548312 #568292
+ epatch "${FILESDIR}"/${PN}-4.3.7-reboot-def.patch #548312 #568292
+ epatch "${FILESDIR}"/${PN}-4.3.7-no-clean.patch #557890
+
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+}
+
+src_configure() {
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto "${BOOTDIR}"
+ doins memtest memtest.bin
+
+ exeinto /etc/grub.d
+ newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+ dodoc README README.build-process README.background
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+
+ elog "${PN} has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub.d/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest.bin"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest.bin"
+ elog " > label = ${PN}"
+ elog ""
+ elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+}
diff --git a/sys-apps/memtest86/memtest86-4.3.7.ebuild b/sys-apps/memtest86/memtest86-4.3.7.ebuild
new file mode 100644
index 000000000000..0999afaccb77
--- /dev/null
+++ b/sys-apps/memtest86/memtest86-4.3.7.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="A stand alone memory test for x86 computers"
+HOMEPAGE="http://www.memtest86.com/"
+SRC_URI="http://www.memtest86.com/downloads/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="serial"
+S="${WORKDIR}/src"
+
+BOOTDIR=/boot/memtest86
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.3.3-build-nopie.patch #66630 + #206726
+ epatch "${FILESDIR}"/${PN}-4.3.7-io-extern-inline.patch #548312 #568292
+ epatch "${FILESDIR}"/${PN}-4.3.7-reboot-def.patch #548312 #568292
+ epatch "${FILESDIR}"/${PN}-4.3.7-no-clean.patch #557890
+
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ newins memtest.bin memtest
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${FILESDIR}"/39_memtest86
+
+ dodoc README README.build-process README.background
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ elog
+ elog "memtest has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs"
+ elog "by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}
diff --git a/sys-apps/memtest86/metadata.xml b/sys-apps/memtest86/metadata.xml
new file mode 100644
index 000000000000..0c07a560973d
--- /dev/null
+++ b/sys-apps/memtest86/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="serial">Compile with serial console support</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/memtester/Manifest b/sys-apps/memtester/Manifest
new file mode 100644
index 000000000000..b761dc08f151
--- /dev/null
+++ b/sys-apps/memtester/Manifest
@@ -0,0 +1,7 @@
+DIST memtester-4.2.2.tar.gz 20952 SHA256 a494569d58d642c796332a1b7f3b4b86845b52da66c15c96fbeecd74e48dae8e SHA512 9ddff98e3173583e3edd50fb5e8a951f20956a75768231c8576d33d091776f22eeb15717a8b87e968e9c49211c83551d518f62ad3a1b0ee1db76152fee925bfa WHIRLPOOL 5de1bab98cb6d0bc2b49f75608fed4f46f36616ff070587a2b06592e36b26db6a0d9389fec6aca59f087f1dc5e1ee6b1d0a146ee6942a4286af4525c3b3a0364
+DIST memtester-4.3.0.tar.gz 22113 SHA256 f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88 SHA512 045bcc73855706ff03e8ca65297a0d6e5b5ac02f99dae0f17cef1310b403efcb78d9a7295eca6d2de703b0a7b2f71b58a37f5a42040f01fc77a321a8d2205888 WHIRLPOOL 6f4389ba575134c9407939f9852bacbd29868da380a1df5a43dba9437e96c17b7cf8637ddbff971250d7dc78f42fc7f3235541d17f4b5879a46a9ab9ada7f2a8
+EBUILD memtester-4.2.2.ebuild 710 SHA256 4f60aca9d21b338fe6ed6e0dc526f2c12da07aa7c0f10abd9df81c516e706db1 SHA512 30f0319b8a4daf0911aae14c7fedceb8b081c1371e9e0ef1ea3923ab1215da3577bd763a1af445946a009e18313ad13a28ed54e53e190ffb2c95fc1b2161f3b8 WHIRLPOOL fe1d2c34c4644829fbfadede95166d29793fce22f8bb7fa5d53bd1ac58e12b5565d3cc357fe942bd096ba483a61cabc94ffdcde28056f3acdce70fcca07ae49b
+EBUILD memtester-4.3.0.ebuild 716 SHA256 6ea0b391c9b48f32f75220852aa0f38d4caa62d4c48fb61b786a7b9f33ada4d2 SHA512 976bc16d7b2acb0ad6c31d67c979be77e3ef351a2b8f949b235a3cd916d4047af71a0fda3fffec6cc2573fe4a27385baf5bc3421864d7c71f661a9d60ba9a233 WHIRLPOOL bee5d22ff1c99d72af61b5cc74e778e565a9b802b0ac7515e35459f8dbf174a4bdb98d6d34fc0acb08b4f9fca9d93bdd7a542c5a2fe3b6b854405d4ae1cf36ae
+MISC ChangeLog 2988 SHA256 ce4c1b2b827bfa7de07580a5a555d003ea8498fa59fc0fc8913e3e0cb80c209d SHA512 692503248f4181b943eaa77b0f501da9364d435c3b01805e98a6fb8f07751f94ee0be2fcfb0ce2de53ec7775b42d3fa16879808a42eb6543d56f425a13634fd6 WHIRLPOOL b3f1a88bdd812c2dc4f184d6a17fa3b3fde0b5a5b4632b72cc6300237a7e3507e4b5f95982fbe50168b73684c2bab2180ac7b8327a5b43db6d2b173696a6a9d3
+MISC ChangeLog-2015 5669 SHA256 bc00d5bc4a6f16a15f8c4b2e6ee08a1d6eda18dfc8666976378946a42b011bb4 SHA512 a963e2b0eb176550b2f758381df995155491c5c8fec482142a30b8d1c3ac1b5d8b5e8138c15dee3ff4f8f2032385cdb6daf2951da0203689644fd089f0272dd8 WHIRLPOOL 9018d6aaaf8f5f59b0fbd077fa6a856f4ba25c8c2c6395c5596438398cdfc307fd364b00a332e4bbda5abdd7230b75d8579668300721e1b30a0cacdc8e42ae26
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/memtester/memtester-4.2.2.ebuild b/sys-apps/memtester/memtester-4.2.2.ebuild
new file mode 100644
index 000000000000..78eb7e3c08de
--- /dev/null
+++ b/sys-apps/memtester/memtester-4.2.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="userspace utility for testing the memory subsystem for faults"
+HOMEPAGE="http://pyropus.ca/software/memtester/"
+SRC_URI="http://pyropus.ca/software/memtester/${P}.tar.gz
+ http://pyropus.ca/software/memtester/old-versions/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~mips ppc ppc64 ~sparc x86"
+IUSE=""
+
+src_prepare() {
+ echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -DPOSIX -c" > conf-cc
+ echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS}" > conf-ld
+}
+
+src_install() {
+ dosbin memtester
+ doman memtester.8
+ dodoc BUGS CHANGELOG README README.tests
+}
diff --git a/sys-apps/memtester/memtester-4.3.0.ebuild b/sys-apps/memtester/memtester-4.3.0.ebuild
new file mode 100644
index 000000000000..56a07613ef14
--- /dev/null
+++ b/sys-apps/memtester/memtester-4.3.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="userspace utility for testing the memory subsystem for faults"
+HOMEPAGE="http://pyropus.ca/software/memtester/"
+SRC_URI="http://pyropus.ca/software/memtester/${P}.tar.gz
+ http://pyropus.ca/software/memtester/old-versions/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+src_prepare() {
+ echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -DPOSIX -c" > conf-cc
+ echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS}" > conf-ld
+}
+
+src_install() {
+ dosbin memtester
+ doman memtester.8
+ dodoc BUGS CHANGELOG README README.tests
+}
diff --git a/sys-apps/memtester/metadata.xml b/sys-apps/memtester/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/memtester/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/metadata.xml b/sys-apps/metadata.xml
new file mode 100644
index 000000000000..e780a8953053
--- /dev/null
+++ b/sys-apps/metadata.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The sys-apps category contains various core system applications, and
+ some non-core system applications which have not yet been moved out into
+ other sys- categories.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría sys-apps contiene varios paquetes esenciales del sistema, y
+ algunos paquetes no esenciales que aún no han sido movidos a otras
+ categorías sys-.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie sys-apps enthält sowohl Programme die Bestandteil des Basissystems sind,
+ als auch Applikationen die noch nicht in eine der anderen sys- Kategorien eingeordnet
+ wurden.
+ </longdescription>
+ <longdescription lang="ja">
+ sys-appsカテゴリには様々なコアシステムアプリケーションの他、まだ他のsys-カテゴリに
+ 移動されていないシステムアプリケーションが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De sys-apps categorie bevat kerenbestanddelen van het systeem, en bepaalde
+ niet-kern toepassingen die nog niet in andere categorien zijn geplaatst.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm sys-apps chứa các phần mềm hệ thống cốt lõi, và vài phần mềm
+ hệ thống không phải cốt lõi mà chưa được chuyển sang các nhóm sys- khác.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria sys-apps contiene vari pacchetti essenziali per il sistema, e alcuni pacchetti
+ non essenziali che non sono ancora stati spostati in altre categorie sys-.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria sys-apps contém vários pacotes essenciais do sistema, e
+ algumas aplicações não-centrais que ainda não foram colocadas em
+ outras categorias sys-.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria sys-apps zawiera programy systemowe oraz inne dodatkowe
+ programy, których jeszcze nie przeniesiono do kategorii sys-.
+ </longdescription>
+</catmetadata>
+
diff --git a/sys-apps/microcode-ctl/Manifest b/sys-apps/microcode-ctl/Manifest
new file mode 100644
index 000000000000..f214899ae757
--- /dev/null
+++ b/sys-apps/microcode-ctl/Manifest
@@ -0,0 +1,13 @@
+AUX microcode_ctl.conf.d 210 SHA256 4297faf0863cd7dd952c666641d67eac196a8521ff17ab95574f299df71758bd SHA512 dfa157b0aaf4d5846fb09cc9ea570ce5400a6a31d5d9895f45d9200fa08271426289deff1d82a33a7b78a1830264e3ee4d325860f7526814764419f5db4564dd WHIRLPOOL 40d97095c75ccbbeecc19d3bb7692773ebe078a8c91a21b086060f32185218a372f1f5c961413c202edb8e2cc918ec6a92eb71af40ed0666abd0cc9449a147f8
+AUX microcode_ctl.rc 590 SHA256 27da2918f6d167c80db26808134e0883e021912aab48d1387d768870d11e2c05 SHA512 a81eaf5628b62472520b59773e58ffa99938e70d9efd0f1c25cfe8a953f7a8632879657347147323c7299cc022c89bc82a7409fdf2d2aa59afa7173ef9d13438 WHIRLPOOL 0272d5bf612f7795cd0921b7914b492419148cce8020e990e345a9d7fb44ea12be7139bcc08e37d7bd89ff81973b2cf03009feddb5d3937dfb57ab6743636177
+AUX microcode_ctl.rc-r1 621 SHA256 411e9aea174c137524aaaef47abdb1ac0e78521769ce72baf8243c4b67fbe308 SHA512 543e389ce415df3beac1a84f0d2b4dbdd7ad4a5f9bf33a51e4cbe34fc29249a5d0e044aeaefcaa17fcf38be1f53a5a75f04bd6116d7d5d9e91851bceb3329564 WHIRLPOOL ff11419e9aee070fe6bdac59e2e805430daa4976c3c1cdb9238e30dbad9b87eed458d8b2c64cf0c8b248390b70ce367e5ca935480e90cdfeb1cbb588152da58f
+DIST microcode_ctl-1.23.tar.xz 755448 SHA256 1a06416f56d54b748258499e1599e75bab6bbee82ac834982ecec0276e5992eb SHA512 f33b4fd43c39b3d4e9b6eb9a12285c7ea26ee43e6c4aa1e45f9aa92a0d2b7d55d1a950ee82d8aea5c86faa15dd1e85e829719b6c772a2c09f262bea630bc7edb WHIRLPOOL 09c4698ab72efbf6240f6c6461549311d01941d53dd81e9f5a08749535d589b0ea24c01999b13f5208626b639aa4611fbbf9c2d5a1fb203689b4405e37aa8b9a
+DIST microcode_ctl-1.27.tar.xz 856240 SHA256 bfaa2847954c6149912e4c7b8b5b5504fdbe09213c4efcf25d37e632a2a55f99 SHA512 ac4bce583f756b777488605687fe1bef0038763ed4a0afc51b454140f00caf04ef8a6d790d95684aa82c857f9cefd59b2413b96ad3d0c349da4b88166c5aa556 WHIRLPOOL b8b3b8094c0f1719126fe8208a7292adf9370633bce773cfd2684e5f207341e3cf6c51272520adfdeb0213ee2927d72d6565d840a3e240cf094d1707e38b27f6
+DIST microcode_ctl-1.28.tar.xz 876760 SHA256 be015f6c7aff736b01d0d57b7f9345aebcca6dd73e5c9026a6ad8a9c09107de2 SHA512 ed5deb0f96c895b7783c23a1c91d2e03f713a793a21140b049e1b5f08f553dce103b4a11016ebd5076424b1032342d009d952e0089badfea2e91ad486d2cf7f8 WHIRLPOOL eddabcf355b219564604fdf3ecfb94670df6d78412051f23b0c7024bad05fc18eb11eccfe84f3a7b4aff8e52e504c32f304e3e9b5762db05b189407421deb050
+EBUILD microcode-ctl-1.23.ebuild 1271 SHA256 8afe2c6f3512e27deda84f0d63927209a1f84c89b57d22983a2935c3bbb98289 SHA512 b5ef619c8b5821e4a52282f34e7e4880962e2d9d6f8f279f3ae7553ca5a72e28c69f4ac921b1370ea199635c63d705e89e78968ff3fe5520556c4732fbf68355 WHIRLPOOL 30cad3cda693b120c11fcda25099cac54191309cb226c6e8b82ffa2f7513875bf848bb3607a31fcd31de83d7bcf714211815b8ce37b2bbb0dc3b0cdd732c597d
+EBUILD microcode-ctl-1.27.ebuild 1273 SHA256 88c09deb244be29a54c6bf88c235e5029cfc808c92c79d9ae948425182058c9a SHA512 9d23c1914298105aaaf8937162cf7673a09d12dde1778c4bd99d708b09307527bafb3c45a556b78a02460aac3842001f30cf67bafadd5a64fec596013926434a WHIRLPOOL 493ad2a0ca5a974fbfdc3390101253901b2f405a79ac6c450703030b760c480dd88a96902365db1db7089a47c4f51995915161e71528fb12484a37268d7fba96
+EBUILD microcode-ctl-1.28-r1.ebuild 1035 SHA256 a59617fded43c9913ebd36d730a570643b80f92b25ba35886c87c9b5356f7b76 SHA512 a63bb4b08ada1fa9e4c114f4a7c8019201e29260282b75cc58247264602191bfe83a4076f8673bb591443f08c3e9e8723e1952f7bcf7bb0951a457572f527964 WHIRLPOOL f6f6b502de37f5c858d6f1840bc2028d3f49ad451a22f1c4efb099c63d6149db20330486d66442f62f9bd8a59c37f456b9a149222576dd32fc16c5873e402ba2
+EBUILD microcode-ctl-1.28.ebuild 1273 SHA256 88c09deb244be29a54c6bf88c235e5029cfc808c92c79d9ae948425182058c9a SHA512 9d23c1914298105aaaf8937162cf7673a09d12dde1778c4bd99d708b09307527bafb3c45a556b78a02460aac3842001f30cf67bafadd5a64fec596013926434a WHIRLPOOL 493ad2a0ca5a974fbfdc3390101253901b2f405a79ac6c450703030b760c480dd88a96902365db1db7089a47c4f51995915161e71528fb12484a37268d7fba96
+MISC ChangeLog 4412 SHA256 9884e383e6341c56cc78dddf38da9e51886531b62a8ed43c98d10faf563289e9 SHA512 55d13000ac7192f2b8451cbfa1e1d1b6c4fc7679ca923c843840a131776d380fc0d7bb08e9afdd8bd78b6d2c4a4ccccdc174412dff13c26f293c358150b5152b WHIRLPOOL c5e50c5def8534b1409e16bfde509a9f3ffbfc50caae63836da34863cc2066299445b84ee5bfd3a61afd28b56119fbc1457578b3b0da71d733adc49ffbd59315
+MISC ChangeLog-2015 6586 SHA256 3e5fa81875d29c303f282729e0a74d2ff8ae5328bb492e49be13e42aba6e6dbe SHA512 26a6fbfa1bb06a0be2522be0d5c1e2b7e7a8d76538fc43b6cfc42b9377576cdf4dbe9ac74e814ff20425db2a2764fd51f20f075e0d0b465f3fce16c8180bfb09 WHIRLPOOL b86e55a3e46dcd68845e45d8dca31e477476712371fcbaa4f5a5a267ca8e68db1fed1b8c497f57edc3589141c4945121fefcd1fbc3ef3aa33bfe619f6cb1df2f
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/microcode-ctl/files/microcode_ctl.conf.d b/sys-apps/microcode-ctl/files/microcode_ctl.conf.d
new file mode 100644
index 000000000000..0505a80ae92b
--- /dev/null
+++ b/sys-apps/microcode-ctl/files/microcode_ctl.conf.d
@@ -0,0 +1,11 @@
+# /etc/conf.d/microcode_ctl
+
+# Device to pass to microcode_ctl
+
+MICROCODE_DEV="/dev/cpu/microcode"
+
+
+# Should we try to unload the microcode module after we
+# update the cpu microcode ?
+
+MICROCODE_UNLOAD="yes"
diff --git a/sys-apps/microcode-ctl/files/microcode_ctl.rc b/sys-apps/microcode-ctl/files/microcode_ctl.rc
new file mode 100644
index 000000000000..2169e24ea85d
--- /dev/null
+++ b/sys-apps/microcode-ctl/files/microcode_ctl.rc
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+}
+
+start() {
+ local ret
+
+ # Make sure the kernel supports the microcode device ...
+ # if it doesnt, try to modprobe the kernel module
+ grep -qs ' microcode$' /proc/misc || modprobe -q microcode
+
+ ebegin "Updating microcode"
+ microcode_ctl -qu -d ${MICROCODE_DEV}
+ ret=$?
+ eend ${ret} "Failed to update microcode via '${MICROCODE_DEV}'"
+
+ [ "${MICROCODE_UNLOAD}" = "yes" ] && rmmod microcode >/dev/null 2>&1
+
+ return ${ret}
+}
diff --git a/sys-apps/microcode-ctl/files/microcode_ctl.rc-r1 b/sys-apps/microcode-ctl/files/microcode_ctl.rc-r1
new file mode 100644
index 000000000000..ed08c4a954b8
--- /dev/null
+++ b/sys-apps/microcode-ctl/files/microcode_ctl.rc-r1
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+}
+
+start() {
+ local ret
+
+ # Make sure the kernel supports the microcode device ...
+ # if it doesnt, try to modprobe the kernel module
+ grep -qs ' microcode$' /proc/misc || modprobe -q microcode
+
+ ebegin "Updating microcode"
+ microcode_ctl -qu -f /lib/firmware/microcode.dat -d ${MICROCODE_DEV}
+ ret=$?
+ eend ${ret} "Failed to update microcode via '${MICROCODE_DEV}'"
+
+ [ "${MICROCODE_UNLOAD}" = "yes" ] && rmmod microcode >/dev/null 2>&1
+
+ return ${ret}
+}
diff --git a/sys-apps/microcode-ctl/metadata.xml b/sys-apps/microcode-ctl/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/microcode-ctl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/microcode-ctl/microcode-ctl-1.23.ebuild b/sys-apps/microcode-ctl/microcode-ctl-1.23.ebuild
new file mode 100644
index 000000000000..1eb00abb9289
--- /dev/null
+++ b/sys-apps/microcode-ctl/microcode-ctl-1.23.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit linux-info toolchain-funcs
+
+MY_P=${PN/-/_}-${PV}
+DESCRIPTION="Intel processor microcode update utility"
+HOMEPAGE="https://fedorahosted.org/microcode_ctl/"
+SRC_URI="https://fedorahosted.org/released/${PN/-/_}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="selinux"
+
+DEPEND=""
+RDEPEND=">=sys-firmware/intel-microcode-20090330[monolithic(+)]
+ selinux? ( sec-policy/selinux-cpucontrol )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dosbin microcode_ctl
+ doman microcode_ctl.8
+ dodoc Changelog README
+
+ newinitd "${FILESDIR}"/microcode_ctl.rc-r1 microcode_ctl
+ newconfd "${FILESDIR}"/microcode_ctl.conf.d microcode_ctl
+}
+
+pkg_postinst() {
+ # Just a friendly warning
+ if ! linux_config_exists || ! linux_chkconfig_present MICROCODE; then
+ echo
+ ewarn "Your kernel must include microcode update support."
+ ewarn " Processor type and features --->"
+ ewarn " <*> /dev/cpu/microcode - microcode support"
+ echo
+ fi
+ elog "Microcode updates will be lost at every reboot."
+ elog "You can use the init.d script to update at boot time."
+}
diff --git a/sys-apps/microcode-ctl/microcode-ctl-1.27.ebuild b/sys-apps/microcode-ctl/microcode-ctl-1.27.ebuild
new file mode 100644
index 000000000000..0943b22c05d7
--- /dev/null
+++ b/sys-apps/microcode-ctl/microcode-ctl-1.27.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit linux-info toolchain-funcs
+
+MY_P=${PN/-/_}-${PV}
+DESCRIPTION="Intel processor microcode update utility"
+HOMEPAGE="https://fedorahosted.org/microcode_ctl/"
+SRC_URI="https://fedorahosted.org/released/${PN/-/_}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="selinux"
+
+DEPEND=""
+RDEPEND=">=sys-firmware/intel-microcode-20090330[monolithic(+)]
+ selinux? ( sec-policy/selinux-cpucontrol )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dosbin microcode_ctl
+ doman microcode_ctl.8
+ dodoc Changelog README
+
+ newinitd "${FILESDIR}"/microcode_ctl.rc-r1 microcode_ctl
+ newconfd "${FILESDIR}"/microcode_ctl.conf.d microcode_ctl
+}
+
+pkg_postinst() {
+ # Just a friendly warning
+ if ! linux_config_exists || ! linux_chkconfig_present MICROCODE; then
+ echo
+ ewarn "Your kernel must include microcode update support."
+ ewarn " Processor type and features --->"
+ ewarn " <*> /dev/cpu/microcode - microcode support"
+ echo
+ fi
+ elog "Microcode updates will be lost at every reboot."
+ elog "You can use the init.d script to update at boot time."
+}
diff --git a/sys-apps/microcode-ctl/microcode-ctl-1.28-r1.ebuild b/sys-apps/microcode-ctl/microcode-ctl-1.28-r1.ebuild
new file mode 100644
index 000000000000..f7ff8cd2c453
--- /dev/null
+++ b/sys-apps/microcode-ctl/microcode-ctl-1.28-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+MY_P=${PN/-/_}-${PV}
+DESCRIPTION="Intel processor microcode update utility"
+HOMEPAGE="https://fedorahosted.org/microcode_ctl/"
+SRC_URI="https://fedorahosted.org/released/${PN/-/_}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="selinux"
+
+DEPEND=""
+RDEPEND=">=sys-firmware/intel-microcode-20090330[monolithic(+)]
+ selinux? ( sec-policy/selinux-cpucontrol )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dosbin microcode_ctl
+ doman microcode_ctl.8
+ dodoc Changelog README
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-1.28-r1" ; then
+ elog "The init scripts have been removed as they are unsafe. If you want to update"
+ elog "the microcode in your system, please use an initramfs. See bug #528712#41 for"
+ elog "details (and bug #557278 for genkernel users)."
+ fi
+}
diff --git a/sys-apps/microcode-ctl/microcode-ctl-1.28.ebuild b/sys-apps/microcode-ctl/microcode-ctl-1.28.ebuild
new file mode 100644
index 000000000000..0943b22c05d7
--- /dev/null
+++ b/sys-apps/microcode-ctl/microcode-ctl-1.28.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit linux-info toolchain-funcs
+
+MY_P=${PN/-/_}-${PV}
+DESCRIPTION="Intel processor microcode update utility"
+HOMEPAGE="https://fedorahosted.org/microcode_ctl/"
+SRC_URI="https://fedorahosted.org/released/${PN/-/_}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="selinux"
+
+DEPEND=""
+RDEPEND=">=sys-firmware/intel-microcode-20090330[monolithic(+)]
+ selinux? ( sec-policy/selinux-cpucontrol )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dosbin microcode_ctl
+ doman microcode_ctl.8
+ dodoc Changelog README
+
+ newinitd "${FILESDIR}"/microcode_ctl.rc-r1 microcode_ctl
+ newconfd "${FILESDIR}"/microcode_ctl.conf.d microcode_ctl
+}
+
+pkg_postinst() {
+ # Just a friendly warning
+ if ! linux_config_exists || ! linux_chkconfig_present MICROCODE; then
+ echo
+ ewarn "Your kernel must include microcode update support."
+ ewarn " Processor type and features --->"
+ ewarn " <*> /dev/cpu/microcode - microcode support"
+ echo
+ fi
+ elog "Microcode updates will be lost at every reboot."
+ elog "You can use the init.d script to update at boot time."
+}
diff --git a/sys-apps/miller/Manifest b/sys-apps/miller/Manifest
new file mode 100644
index 000000000000..56334aec8aee
--- /dev/null
+++ b/sys-apps/miller/Manifest
@@ -0,0 +1,4 @@
+DIST miller-4.2.0.tar.gz 3373505 SHA256 2758a2364daad8672c4da85698b328f20178539d5f5d5866b19518cce1c83487 SHA512 f176dc2ce4e733ac1e4e331f17554d4ed089344a5f571bcc9d4b3b227f6c950fa0355f1a5b934e4f9467d9a22448e2842c586a4e6c424a98ec89170cd70b1714 WHIRLPOOL 8514bc6bde3cd3598caeb6e123ff7cec26a464818f6be43ddb51e43c8cee25f42403b3355ad5cfd11355788b8824ee497a12fb1172620935a17b28979f62fad2
+EBUILD miller-4.2.0.ebuild 1228 SHA256 8aa031faddb501689289b123be01d83f49754894e5c4dadc5a0db9c6c4d2d130 SHA512 0df8acbd893e5c67546b23a89b7b6f4ccb930d802e8648b636410d6ca71d5e8a9aaa2b4a452006efc54bcd9699ee32fb12310b0e7043d7f7151c24707c155b30 WHIRLPOOL 2d935a046bf57f21ab65287571b3af9cb8f05df3c08353407ff7a322c6ce8091b08e9cadfcb433257939ce0e26b0cf1571ef1c16c8e684151fd98f8f0496dc8f
+MISC ChangeLog 1051 SHA256 67cfe5c50f52492b3f5a7b492d3b97cace4e319189f59bc9dfbb29182a4d25a8 SHA512 e19f360c6820b762cfedc4030a819a2c06bd06edbe511911fc9673baa0b47957cae280d6004ffc996936aaddcd7e1ff7c7000d8f8436663e40b17e4469e4afe1 WHIRLPOOL 709f315d0693c61067d9615270a37768ef750e2bc33b43a91a80ec4c6396bec55aced3fb58f359fd1727e410f8df017f2be8541f4b49657b6ea76f26dab84312
+MISC metadata.xml 247 SHA256 2341b02572cf536f61adf9930bcbeb405919d8d2fd88775f7660b098b5f9d772 SHA512 1d569a62d1a657cfa27749346c970866599d29264aac8a94fb7db0aefa141edb879a083b1500c804463a7ee0a2e489cdd478ece3d7f2a7fdcc9630f99baf25eb WHIRLPOOL c02b5c09050e00a72c977aa5ea646eba327ac01a59311db13b695181676e0fa8294dd200932a90922a91fd1e0620ebee88c2713878b6abf36cce5f6f4e2f9e82
diff --git a/sys-apps/miller/metadata.xml b/sys-apps/miller/metadata.xml
new file mode 100644
index 000000000000..b514bd71d71f
--- /dev/null
+++ b/sys-apps/miller/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-needed -->
+ <upstream>
+ <remote-id type="github">johnkerl/miller</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/miller/miller-4.2.0.ebuild b/sys-apps/miller/miller-4.2.0.ebuild
new file mode 100644
index 000000000000..df616602dab7
--- /dev/null
+++ b/sys-apps/miller/miller-4.2.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="A tool like sed, awk, cut, join, and sort for name-indexed data (CSV, JSON, ..)"
+HOMEPAGE="http://johnkerl.org/miller"
+LICENSE="BSD-2"
+
+SLOT="0"
+SRC_URI="https://github.com/johnkerl/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="amd64 arm x86"
+IUSE="doc test"
+
+DEPEND="sys-devel/flex"
+
+my_for_each_test_dir() {
+ local test_dirs=( c/{reg,unit}_test )
+ if use test ; then
+ for d in "${test_dirs[@]}" ; do
+ pushd "${d}" >/dev/null || die
+ "${@}" || die
+ popd >/dev/null || die
+ done
+ fi
+}
+
+src_prepare() {
+ default
+
+ local sed_args=(
+ # respect FLAGS
+ -e '/.*FLAGS[^=]*=/ s:(-g|-pg|-O[0-9]) ::g'
+ )
+ find -type f -name "Makefile.am" | xargs sed -r "${sed_args[@]}" -i --
+ assert
+
+ # disable docs rebuilding as they're shipped prebuilt
+ sed -e '/SUBDIRS[^=]*=/ s:doc::g' -i -- Makefile.am || die
+
+ # disable building tests automagically
+ use test || sed -e '/SUBDIRS[^=]*=/ s:[^ ]*_test::g' -i -- c/Makefile.am || die
+
+ eautoreconf
+}
+
+src_test() {
+ my_for_each_test_dir emake check
+}
+
+src_install() {
+ local HTML_DOCS=( $(usev doc) )
+
+ default
+
+ doman 'doc/mlr.1'
+}
diff --git a/sys-apps/minised/Manifest b/sys-apps/minised/Manifest
new file mode 100644
index 000000000000..fd89958e7adf
--- /dev/null
+++ b/sys-apps/minised/Manifest
@@ -0,0 +1,5 @@
+DIST minised-1.15.tar.gz 32224 SHA256 ada36a55b71d1f2eb61f2f3b95f112708ce51e69f601bf5ea5d7acb7c21b3481 SHA512 82ebe5c70f24adebd5f1c37422bac543c06684bff40d1d1fab473abc248d4c5f93e7a4969204877170fed1f2616f6fb666bd485183115cc996ba691c7bb88a71 WHIRLPOOL cd5b02861904d095e210fcf9c39afc703d9b54206901ae97e61380165de3b0f8ce46830c8191aabb748bbe608ea15dd4f58b7609a1f1a3715c13b77584ffbc35
+EBUILD minised-1.15.ebuild 405 SHA256 e2b7f1f59f42ab587c50c934514724e71410e8f36bd9fa4c3b49aae3f8e0fb6b SHA512 a237dfcbe39ff7f7ad5690fb92e2daf200adbff29379f30069750749e31762845e11f76caae2a883b93208296bf5751585f9c7aebbc90f01790f5c58da84ba99 WHIRLPOOL a0875ef1aa60c4255aa510e692e96990164f8223b8bbdff489bb823bcaf135d8806c556f4213bd04925194f2364b3373ef655575377f5a509adf24639065d894
+MISC ChangeLog 2974 SHA256 09e3594b22ddc7be860c4859896ed104d04d4506782bb5241efb77c9db3bbf1c SHA512 76cb3fda20660d0b80857e1c5548a39048b0e6522a211208cbb7f75ab07ab9dac11230210ad51932df77bc74b0d84162c5854bc5a8d6eaa3cc82f6208377b813 WHIRLPOOL ae641aa277393b4b6d316ff8820f6bdc43276da88747d2212ad488960c9df8b91053ea92daee654016816e73da7f10619a39e90d39600f20cb9d6dbfbc3e4235
+MISC ChangeLog-2015 971 SHA256 b42998ecaf78fabe3faf7351a66729d00e27fb1fcb2016139280fe2b2e1d085c SHA512 fdaadaae7ceac694af79c947a8c06145e01cd6592aab3cfc241eb17ca39a88039d71bc177d4ebc58848aad3909a65b58a4861c94f953d53811acde2010db37f9 WHIRLPOOL a01eba2a74111a4508854cc48e681ee089d80f7725a6df7c0f1ed79cf2e2dc715e6ae0aa22103b22ca0c07543d68d6cfd9803bc5bd17a2bc398b43dab643766a
+MISC metadata.xml 361 SHA256 5973bb878bb78bd074bf51472bdb701c903adff717d1e23659a4e26ea7d2ec2f SHA512 d6341a279f0360ccf220cc061507c1557b1aba0c08469e54a7c855bda83de022142916479f0b461b5856d218046b047f8bb42103a42a2a9ae91995dc684a954c WHIRLPOOL 75e24b4d26e1342b0a15b63ee68bc093519939cce12a2bc81e94512149678004a75b126e3f05d0ed618fc9ec16cfa260023985c357e2584de8ac39b88bb5c504
diff --git a/sys-apps/minised/metadata.xml b/sys-apps/minised/metadata.xml
new file mode 100644
index 000000000000..7d2dede4ccb7
--- /dev/null
+++ b/sys-apps/minised/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 type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/minised/minised-1.15.ebuild b/sys-apps/minised/minised-1.15.ebuild
new file mode 100644
index 000000000000..a487b04f1d13
--- /dev/null
+++ b/sys-apps/minised/minised-1.15.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="a smaller, cheaper and faster sed implementation"
+HOMEPAGE="http://www.exactcode.de/oss/minised/"
+SRC_URI="http://dl.exactcode.de/oss/minised/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+src_prepare() {
+ default
+ tc-export CC
+}
diff --git a/sys-apps/miscfiles/Manifest b/sys-apps/miscfiles/Manifest
new file mode 100644
index 000000000000..3de8da7b8d10
--- /dev/null
+++ b/sys-apps/miscfiles/Manifest
@@ -0,0 +1,6 @@
+DIST UnicodeData-6.1.0.txt.xz 129972 SHA256 044c7f014c601ec4602d8e19c1541a952e2c7e30930c623acc65b1f45acb170a SHA512 9ada361d915f3883e673c6e55f351c7411dc970e180e7e0b05fef498c2f80a5a29bfd6c22513ff4b6b6c4c9fba5c77f0aca2dd54c7a76d3fa9b78623b1fdd93f WHIRLPOOL b052639f5ffe6acab1b875ee55aa917ed6f526deffce1f12f15530f1dd44d3cbb259516c40c725f7a35838d7ecb68f5452e099aef904d0763720cde87cebebf1
+DIST miscfiles-1.5.tar.gz 1585293 SHA256 6aaaa8898b0f6dac18bcaa5492874a6cd1243ffbe7a6dd347ca8f3ec3642a500 SHA512 d7ab23a709539278cce59e0c32bfcb3a0f11dc52ef537e3823e72382962af7f4fedb8b957f39ff1da51a93a00e3c4f6ec29f7332d7879c77fd7f4ec0ee4f82aa WHIRLPOOL 3d134944fcf75231f682d05320ad9b198b99f9eb4c27a949b67e724cb3b16181afedd61e83bcdb672fb7df516d8cdc43310209a07108b35fdb40ea9025be297a
+EBUILD miscfiles-1.5-r1.ebuild 1683 SHA256 cf88308bf724a00de5e3c622b648ad081825e09659ca0478ce3f2e273047f539 SHA512 f3d4498d846974f4a7afb0fc09ac4755ccaa0c4dcba7f5ff7184942ebd0b45c786a58525e12d0c8d3b38890c263511432f78f699ac7768a398abfa8eb6e6bf95 WHIRLPOOL c28a32016cae9f21e54d3cdfc76ab01feddaf9a24c403435d4d5bc82621d95e45d8c84aae513f72014500bcbf234080e59aa076b43845efb4da2b20afc76ea5c
+MISC ChangeLog 3246 SHA256 4338f42961bb7a42081b804cf62c5b291ee76202b6165981d38119711aca192f SHA512 67d7e76990ec5205a8530b3fefeec5e224d5b21aac50d7d0e554200b2d177cf5f493cbab4c6fffae339bd1eb9b5ad6199855042afcc3fc31e46e8703bff7a978 WHIRLPOOL cc563005543047c852cee7af44e2a8d5af8e101134f27cd3270e0aab6869208d9a64f84fc0513b2b4fd33718833ee445262d614c6b286785d4403f78420b0b8c
+MISC ChangeLog-2015 6414 SHA256 167fbc7454d6bd03e53a35f1dcb8ca641425ed8b0d7a8c5a52577bce34622047 SHA512 c67ae2d4c6c748a683aec27988c62f167be8b3502264a08bdf7e467fa0360f4150ddad3424630bf45d2d56018521df8ad3a435cc53d5ba1481c19a49088648f1 WHIRLPOOL 625f636d784a03c128afbfd1ffb4feaa17e81897dbbeb15f778df9602a216097635396c1c4e9025cc1401e944a748d26845343920ea43c4fe1ffedc2762ff21c
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/miscfiles/metadata.xml b/sys-apps/miscfiles/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/miscfiles/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/miscfiles/miscfiles-1.5-r1.ebuild b/sys-apps/miscfiles/miscfiles-1.5-r1.ebuild
new file mode 100644
index 000000000000..f4a54b376ea7
--- /dev/null
+++ b/sys-apps/miscfiles/miscfiles-1.5-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+
+UNI_PV=6.1.0
+DESCRIPTION="Miscellaneous files"
+HOMEPAGE="https://savannah.gnu.org/projects/miscfiles/"
+# http://www.unicode.org/Public/${UNI_PV}/ucd/UnicodeData.txt
+SRC_URI="mirror://gnu/miscfiles/${P}.tar.gz
+ mirror://gentoo/UnicodeData-${UNI_PV}.txt.xz"
+
+LICENSE="GPL-2 unicode"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="minimal"
+
+# Collides with older versions/revisions
+RDEPEND="!<sys-freebsd/freebsd-share-7.2-r1"
+DEPEND="app-arch/xz-utils"
+
+src_prepare() {
+ mv "${WORKDIR}"/UnicodeData-${UNI_PV}.txt unicode || die
+}
+
+src_configure() {
+ econf --datadir="${EPREFIX}"/usr/share/misc
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc NEWS ORIGIN README dict-README
+
+ # not sure if this is still needed ...
+ dodir /usr/share/dict
+ cd "${ED}"/usr/share/misc
+ mv $(awk '$1=="dictfiles"{$1="";$2="";print}' "${S}"/Makefile) ../dict/ || die
+ cd ../dict
+ ln -s web2 words || die
+ ln -s web2a extra.words || die
+
+ if use minimal ; then
+ cd "${ED}"/usr/share/dict
+ rm -f words extra.words
+ gzip -9 *
+ ln -s web2.gz words
+ ln -s web2a.gz extra.words
+ ln -s connectives{.gz,}
+ ln -s propernames{.gz,}
+ cd ..
+ rm -r misc rfc
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${ROOT} == "/" ]] && type -P create-cracklib-dict >/dev/null ; then
+ ebegin "Regenerating cracklib dictionary"
+ create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
+ eend $?
+ fi
+}
diff --git a/sys-apps/mlocate/Manifest b/sys-apps/mlocate/Manifest
new file mode 100644
index 000000000000..71e3bbe09aa1
--- /dev/null
+++ b/sys-apps/mlocate/Manifest
@@ -0,0 +1,8 @@
+AUX mlocate-cron.conf 237 SHA256 856c1ab465b3e7ffdf752ba323bea9867ac902297fc4247ae15a575419b279c7 SHA512 ab055b052980783b5c63c716d7c12dcb19961a9f990c077e4f8c9bef4ca591bd281ac3941f872659a558a18b81c014dbc0655ff0a1872310670d8efc1d27cb00 WHIRLPOOL f7974d6514f52727c1b5213ded5f2050067afcc1eb9666da55a07845eab06fccfb27d100be102c0169b95b12c0244d0d62019d35d4596fc672216e5b152f3150
+AUX mlocate.cron-r3 1389 SHA256 7507b0ea8b27331e3ae7a027a1476ad355492c0b51a76f8a0cc24ecc222028a0 SHA512 20a25a7f83886a43cb61599a65ae78170d1b5cececc953117986d27cbfb6707cbf3613b569e0bc24ce6416ce1f2cc792dd5968f0e1bf3a7a6ae72c4e10b638c2 WHIRLPOOL effb9ab764c50d6611680c401f264a350b18087252e67332c681557beefecb66925b87cc21d728aec3cf28d4bfdb28ccf955f852f3a0199154dff02bde24305a
+AUX updatedb.conf 898 SHA256 188a0cc9b9e8f01fa5f89b0974d8c223549b9cff810ae082b989157acfa54bc1 SHA512 8b0b32e949636aef46c5439b0c963cc113306cedb1e5c84dbbfa2efba6562ca6dd602fdbfa0b3bc9095b0cf30a619ebb366535406cdb461f20d012ec1af7ff9d WHIRLPOOL 82dbc16b74b738bba5f0555a4d0d1072981b9740368ad5dfa00850cefd2f0565dfb80688772c9895caddf2a37870c6e0ed790efb92af2c2fb98024e35498e86e
+DIST mlocate-0.26.tar.xz 359204 SHA256 3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e SHA512 b1207047e30a551cba39e70812439b554def567ebe9b8b81fed6f26435bb575beafe4875a21cd72876eadd85da4e7bfc942eb28b17c430b537c351690364837f WHIRLPOOL 7f0a2df135ce2ec74f2a113e7f88b29f3964aa53fff1c47eb9aa44df4447d7b41b59615571a7626a3b7395208df75641d407b7a9456e590338962cde85093129
+EBUILD mlocate-0.26-r2.ebuild 1568 SHA256 1253f6d12fc74d4bb6a11ce0d5d39452a4dee4384080cfa282c2fc1f27977b73 SHA512 f26ab45e80000cea9edb0631c0f62a58630f1126328f1c410779f5472264fda85458f5caf8b22001ac311c206b49bdc85cf576a6f8554b80ce9aebfb4c7aef65 WHIRLPOOL b08796886bac9c72265cda8cbb3c005675a4ee1af5a276a994424e30313b68fad0235b42fdcf3843eca4867691fe59937a759579df66899f51e2644905b05ad5
+MISC ChangeLog 4363 SHA256 c1ccc897ba8e1b01cc4ed27a84f64498e323dc40a12c699fe607cb0b53545ad5 SHA512 d455816662a5ba261562d0bf060ad1114e0fc711b41b6121d91797fc23d1d6c615f54a3d85989ad2c0c1975c08424506c4e00965afaa16203d2f2cf32696aed1 WHIRLPOOL 432fc319666e097721884e3d739e8093fc33b43e42c2bb2f8c19b59a7131d2a92335cb5ee16efe251ff9a4cbce1786597e4d6e10b7c64bace55cfd04c0ae1b76
+MISC ChangeLog-2015 14935 SHA256 74e87c766df6a94f3241a393c394daa7a190c6d0b75eac12f962c8fd6088bd89 SHA512 66d070a12ed4384cd1ba01dc1d28bdf2fa548d909147e91aeac5dce93ce8be5f7df4c1ad15824d2cdf87ad8a59203bc84064c8e05b2f1bf4e380eb4a92c361ce WHIRLPOOL b38bdf153d2b7e3fb45fa3273408ecda8836d6ad5faa365c8feba921534ed0fe370e6efa5eeec0669b4253e963235d6909d92627d33823e2750a05c3dfe511cf
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/mlocate/files/mlocate-cron.conf b/sys-apps/mlocate/files/mlocate-cron.conf
new file mode 100644
index 000000000000..f207344a9e6c
--- /dev/null
+++ b/sys-apps/mlocate/files/mlocate-cron.conf
@@ -0,0 +1,9 @@
+# nice value to run at: see -n in nice(1)
+NICE="19"
+
+# ionice class to run at: see -c in ionice(1)
+# you have to install sys-apps/util-linux manually
+IONICE_CLASS="2"
+
+# ionice priority to run at: see -n in ionice(1)
+IONICE_PRIORITY="7"
diff --git a/sys-apps/mlocate/files/mlocate.cron-r3 b/sys-apps/mlocate/files/mlocate.cron-r3
new file mode 100644
index 000000000000..7f3252e9cc76
--- /dev/null
+++ b/sys-apps/mlocate/files/mlocate.cron-r3
@@ -0,0 +1,51 @@
+#! /bin/sh
+set -e
+
+# check if we run on battery and if so then don't run
+if which on_ac_power >/dev/null 2>&1; then
+ ON_BATTERY=0
+ on_ac_power >/dev/null 2>&1 || ON_BATTERY=$?
+ if [ "${ON_BATTERY}" -eq 1 ]; then
+ exit 0
+ fi
+fi
+
+# check if we are already running (lockfile)
+LOCKFILE="/var/lock/mlocate.daily.lock"
+if [ -e "${LOCKFILE}" ]; then
+ echo >&2 "Warning: \"${LOCKFILE}\" already present, not running updatedb."
+ exit 1
+fi
+touch "${LOCKFILE}"
+# trap the lockfile only if we really run the updatedb
+trap "rm -f ${LOCKFILE}" EXIT
+
+# source the user specified variables
+if [ -f /etc/mlocate-cron.conf ]; then
+ . /etc/mlocate-cron.conf
+fi
+
+# check the config file
+NODEVS=""
+if [ ! -f /etc/updatedb.conf ]; then
+ NODEVS=$(awk '$1 == "nodev" && $2 != "rootfs" { print $2 }' /proc/filesystems)
+fi
+
+# alter the priority of the updatedb process
+if [ -x /usr/bin/renice ]; then
+ /usr/bin/renice +${NICE:-19} -p $$ > /dev/null 2>&1
+fi
+if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then
+ /usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1
+fi
+
+# Cleanup old temp files from previous unsuccessful runs
+rm -f /var/lib/mlocate/mlocate.db.*
+
+# run the updatedb if possible
+if [ -x /usr/bin/updatedb ]; then
+ /usr/bin/updatedb -f "${NODEVS}"
+else
+ echo >&2 "Warning: \"/usr/bin/updatedb\" is not executable, unable to run updatedb."
+ exit 0
+fi
diff --git a/sys-apps/mlocate/files/updatedb.conf b/sys-apps/mlocate/files/updatedb.conf
new file mode 100644
index 000000000000..6a00d3aa2b94
--- /dev/null
+++ b/sys-apps/mlocate/files/updatedb.conf
@@ -0,0 +1,16 @@
+# /etc/updatedb.conf: config file for slocate
+
+# This file sets variables that are used by updatedb.
+# For more info, see the updatedb.conf(5) manpage.
+
+# Filesystems that are pruned from updatedb database
+PRUNEFS="afs anon_inodefs auto autofs bdev binfmt binfmt_misc cgroup cifs coda configfs cramfs cpuset debugfs devfs devpts devtmpfs ecryptfs eventpollfs exofs futexfs ftpfs fuse fusectl gfs gfs2 hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre misc mqueue ncpfs nfs NFS nfs4 nfsd nnpfs ocfs ocfs2 pipefs proc ramfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs spufs sshfs subfs supermount sysfs tmpfs ubifs udf usbfs vboxsf vperfctrfs"
+
+# Paths which are pruned from updatedb database
+PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
+
+# Folder names that are pruned from updatedb database
+PRUNENAMES=".git .hg .svn CVS"
+
+# Skip bind mounts.
+PRUNE_BIND_MOUNTS="yes"
diff --git a/sys-apps/mlocate/metadata.xml b/sys-apps/mlocate/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/mlocate/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/mlocate/mlocate-0.26-r2.ebuild b/sys-apps/mlocate/mlocate-0.26-r2.ebuild
new file mode 100644
index 000000000000..5bc4fa3c0f64
--- /dev/null
+++ b/sys-apps/mlocate/mlocate-0.26-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user toolchain-funcs
+
+DESCRIPTION="Merging locate is an utility to index and quickly search for files"
+HOMEPAGE="https://pagure.io/mlocate"
+SRC_URI="http://releases.pagure.org/mlocate/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="nls selinux"
+
+RDEPEND="!sys-apps/slocate
+ !sys-apps/rlocate
+ selinux? ( sec-policy/selinux-slocate )"
+DEPEND="app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+"
+
+pkg_setup() {
+ enewgroup locate
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_compile() {
+ emake groupname=locate AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake groupname=locate DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README NEWS
+
+ insinto /etc
+ doins "${FILESDIR}"/updatedb.conf
+ doins "${FILESDIR}"/mlocate-cron.conf
+ fperms 0644 /etc/{updatedb,mlocate-cron}.conf
+
+ insinto /etc/cron.daily
+ newins "${FILESDIR}"/mlocate.cron-r3 mlocate
+ fperms 0755 /etc/cron.daily/mlocate
+
+ fowners 0:locate /usr/bin/locate
+ fperms go-r,g+s /usr/bin/locate
+
+ keepdir /var/lib/mlocate
+ chown -R 0:locate "${ED}"/var/lib/mlocate
+ fperms 0750 /var/lib/mlocate
+}
+
+pkg_postinst() {
+ elog "The database for the locate command is generated daily by a cron job,"
+ elog "if you install for the first time you can run the updatedb command manually now."
+ elog
+ elog "Note that the /etc/updatedb.conf file is generic,"
+ elog "please customize it to your system requirements."
+}
diff --git a/sys-apps/modutils/Manifest b/sys-apps/modutils/Manifest
new file mode 100644
index 000000000000..63cf8379f93c
--- /dev/null
+++ b/sys-apps/modutils/Manifest
@@ -0,0 +1,9 @@
+AUX modutils-2.4.27-alias.patch 2246 SHA256 453e3ab982088e2e85164e63b4944af58cd01c2b2d45d75fdcda6649a339878f SHA512 e843cdcdca309646d8cb9db148db61bb6d9605068fbfc006be7c392d3349856c101899f26d39e3778a674bc9b64830bdc273484d1ccf37994eaca1cff594edc6 WHIRLPOOL 16e4d475030f0e8b85a3e810d4281422b7a13c186f24058c602bafa6dda9565d33fb799767cc75a935de7b2f73f7d939306feb7f62b411c7ed0eb9b007dcdce9
+AUX modutils-2.4.27-flex.patch 805 SHA256 dbe0c3207751157e7b104d66bdfeea280343ceabe856dc5d51849c206fdccad9 SHA512 2d427b2c9b5d45866a704caa3b564c986106aeb1c60898efa54c7272bcb536fa13a46df6970a8a0b6020bdbe4c86903503a2ec0e15092d0c254f9b5a940c2374 WHIRLPOOL 9710819b491b015cfa4aaad506298d0da9a2559805ec447da6481ddd6d0ed5379407db4444a58d99919b0a58223670a0cdea4451149b1c0e75da8a4870518999
+AUX modutils-2.4.27-gcc.patch 6963 SHA256 48af5c56a1e6e616278b8ee16dd6e5a5df42fdfc852acf6bc76287f1dc33f2d4 SHA512 1d2f0f2118ab40310cbd90d73da5300530c8b41bd5fc3832f8cc09914bfe9efba7161b80c1d29b216ba92bceb8b4f066eea1bf9bb2c6affdc9b35e12235a1008 WHIRLPOOL e5570af6becf448a7a87e145fb25fe4746d811871d988e4aa47dd39e684d388bb98f827818c29418acfcb67337483ee9e7fc0108754722922cdd5d7acacc8548
+AUX modutils-2.4.27-no-nested-function.patch 1422 SHA256 3e9961a7c9411e8c01eb48d9053d7901ec7a90ee0e070e85bd766385f36d563d SHA512 0a01f28f9d3f803b1e148af382b396ad793354363c36e690ed5a731c31482bc8b909fcf77902b62f50967e1ed782ec9e53412c906117dc3d7d12b1f21ecf075a WHIRLPOOL 5999f108eb31a12be9fb1dab005d30f536f790b70a0d6d05bf31c6bbcb583076d3285824a9c84f8ffee15a68d0d0beae7866b451c4372d8b3c7ce69c9e324fb2
+DIST modutils-2.4.27.tar.bz2 234963 SHA256 ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0 SHA512 5a638ea757f9d2cd7e91a8711eadfc6c723ca3b75757363620c8128772b9c00ddeb46af853711ce4c845096ad322a1dd2e8429be3d2e0a371ca93b1c81aa089d WHIRLPOOL baf623c4e5fe2c92139c27caa317694d8e3e9c60b875c8470218d6ed450e8bb52f8c11c34a1dc855aa3399648b06b77578d08966ec177b1ad7169fb622aef590
+EBUILD modutils-2.4.27-r1.ebuild 926 SHA256 51b0f3736b7d39f4879b307588ebd80b065c63868ff865cd2a456889fd351d52 SHA512 5a3362edf1afb5d6a0c5f168ae20aa0b618300ded0662eff0df199c31e6072ab98501ac9cbb371b01ea8901afd278acd7d43de0966511b610411a63e420fae41 WHIRLPOOL 4494ed5bda66b26bf511ebf64b63d0e718920e97a453738312358f4f3a0e9ec23594e585e7d2c586d450f1cbcba145f33cada530d82444d8f00e8fa0f1ce37f5
+MISC ChangeLog 3264 SHA256 396d7e7ce3f5fee9e1e21e18897e3ff45e77b09a6027847fcc0ada00fcb09701 SHA512 4164085d2d2a2e4a999be1a7c775b651f77b1a839e608af01669fc32c211c985435f21a2b7a476565408cf1d442d212e0dadfc5422ab2dc506cd407d63a4dcb2 WHIRLPOOL 80a48a870a6b075471f40263f10b295014f54173d31ee1a00a7589f4347422a730c0b54318b0a0c25778373cee09edce54789ac193305dd3803e805125ea147f
+MISC ChangeLog-2015 8576 SHA256 0789ccd592771256729cd61b07f5c97a231652adca7943db35c87bb1441f7771 SHA512 1afc2129fd030295ca61870429e5c635a529a12e7fee602fbd81af6511e90e585199e9d7fded67b2f16701febd0e49b62cc1d0ebbdc19f041d4874b8b6ba3206 WHIRLPOOL 0a6dbfeb94a30f7c81c1c3b0e4a0aa622bef008f9d6074e86885646076bc39f4974044c7542696f311c8ce923adb74ff7a68bf12d727e8c7af9e1587c90d3daa
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/modutils/files/modutils-2.4.27-alias.patch b/sys-apps/modutils/files/modutils-2.4.27-alias.patch
new file mode 100644
index 000000000000..1fefffb62f85
--- /dev/null
+++ b/sys-apps/modutils/files/modutils-2.4.27-alias.patch
@@ -0,0 +1,86 @@
+Taken from Debian.
+
+Update misc alias cruft.
+
+--- util/alias.h
++++ util/alias.h
+@@ -52,7 +52,11 @@
+ "binfmt--310 binfmt_java",
+
+ "block-major-1 rd",
++#if defined(__s390__) || defined(__s390x__) || defined(__ia64__) || defined(__powerpc__)
++ "block-major-2 off",
++#else
+ "block-major-2 floppy",
++#endif
+ "block-major-3 ide-probe-mod",
+ "block-major-7 loop",
+ "block-major-8 sd_mod",
+@@ -107,6 +111,7 @@
+ /* /dev/sunmouse Sun mouse */
+ /* /dev/beep Fancy beep device */
+ /* /dev/modreq Kernel module load request */
++ "char-major-10-116 snd",
+ "char-major-10-130 wdt", /* /dev/watchdog Watchdog timer port */
+ "char-major-10-131 wdt", /* /dev/temperature Machine internal temperature */
+ /* /dev/hwtrap Hardware fault trap */
+@@ -116,7 +121,11 @@
+ "char-major-10-144 nvram", /* from Tigran Aivazian <tigran@sco.COM> */
+ "char-major-10-157 applicom", /* from David Woodhouse <dwmw2@infradead.org> */
+ "char-major-10-175 agpgart", /* /dev/agpgart GART AGP mapping access */
++ "char-major-10-181 toshiba",
++ "char-major-10-183 hw_random",
+ "char-major-10-184 microcode", /* Tigran Aivazian <tigran@veritas.com> */
++ "char-major-10-187 irnet",
++ "char-major-10-189 ussp",
+ "char-major-10-200 tun", /* Universal TUN/TAP device driver */
+ "char-major-10-250 hci_vhci",
+
+@@ -179,6 +203,11 @@
+ /* next two from <dairiki@matthews.dairiki.org> Thanks! */
+ "net-pf-17 af_packet",
+ "net-pf-19 off", /* acorn econet */
++ "net-pf-20 atm",
++ "net-pf-23 irda",
++ "net-pf-24 pppoe",
++ "net-pf-25 wanrouter",
++ "net-pf-26 llc",
+
+ "net-pf-31 bluez",
+
+@@ -199,6 +228,10 @@
+ "bt-proto-2 sco",
+ "bt-proto-3 rfcomm",
+ "bt-proto-4 bnep",
++ "bt-proto-5 cmtp",
++ "bt-proto-6 hidp",
++ "bt-proto-7 avdtp",
++
+
+ "plip0 plip",
+ "plip1 plip",
+@@ -228,6 +261,7 @@
+ "ppp-compress-21 bsd_comp",
+ "ppp-compress-24 ppp_deflate",
+ "ppp-compress-26 ppp_deflate",
++ "ppp ppp_async", /* for 2.4 */
+
+ #ifndef __sparc__
+ "parport_lowlevel parport_pc",
+@@ -271,9 +305,6 @@
+ */
+ char *above[] =
+ {
+- "hid keybdev mousedev",
+- "usbmouse hid",
+- "wacom evdev",
+ NULL /* marks the end of the list! */
+ };
+
+@@ -284,7 +315,6 @@
+ */
+ char *below[] =
+ {
+- "ov518_decomp ov511",
+ NULL /* marks the end of the list! */
+ };
diff --git a/sys-apps/modutils/files/modutils-2.4.27-flex.patch b/sys-apps/modutils/files/modutils-2.4.27-flex.patch
new file mode 100644
index 000000000000..c07e929b8b42
--- /dev/null
+++ b/sys-apps/modutils/files/modutils-2.4.27-flex.patch
@@ -0,0 +1,37 @@
+Taken from Debian.
+
+Build with newer flex versions.
+
+--- modutils-2.4.27.0.orig/genksyms/lex.l
++++ modutils-2.4.27.0/genksyms/lex.l
+@@ -130,6 +130,7 @@
+
+ static int suppress_type_lookup, dont_want_brace_phrase;
+ static struct string_list *next_node;
++ static int next_token = 0;
+
+ int token, count = 0;
+ struct string_list *cur_node;
+@@ -144,7 +145,12 @@
+ }
+
+ repeat:
+- token = yylex1();
++ if (next_token != 0) {
++ token = next_token;
++ next_token = 0;
++ }
++ else
++ token = yylex1();
+
+ if (token == 0)
+ return 0;
+@@ -425,7 +431,7 @@
+ {
+ /* Put back the token we just read so's we can find it again
+ after registering the expression. */
+- unput(token);
++ next_token = token;
+
+ lexstate = ST_NORMAL;
+ token = EXPRESSION_PHRASE;
diff --git a/sys-apps/modutils/files/modutils-2.4.27-gcc.patch b/sys-apps/modutils/files/modutils-2.4.27-gcc.patch
new file mode 100644
index 000000000000..3f90a9b2b2de
--- /dev/null
+++ b/sys-apps/modutils/files/modutils-2.4.27-gcc.patch
@@ -0,0 +1,280 @@
+Fix building with newer gcc versions.
+
+Most changes taken from Debian.
+
+--- obj/obj_ia64.c
++++ obj/obj_ia64.c
+@@ -127,6 +127,7 @@
+ return (*(bundle + 1) >> 23) & 0x1ffffffffff;
+
+ default:
++ ;
+ }
+ return (-1);
+ }
+--- depmod/depmod.c
++++ depmod/depmod.c
+@@ -1133,7 +1133,7 @@
+
+ for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
+ if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
+- ((char *)ksym->name) += 8;
++ ksym->name = ((char *)ksym->name) + 8;
+ assert(n_syms < MAX_MAP_SYM);
+ symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
+ }
+@@ -1265,7 +1265,7 @@
+ * error. Use the error() routine but do not count
+ * any errors. Remove in 2.5.
+ */
+- int save_errors = errors;
++ int save_errors = error_count;
+ if (!quiet && nberr == 0)
+ error("*** Unresolved symbols in %s",
+ ptmod->name);
+@@ -1274,7 +1274,7 @@
+ nberr++;
+ if (flag_unresolved_error)
+ ret = 1;
+- errors = save_errors;
++ error_count = save_errors;
+ }
+ }
+ verbose("%s\n", ptmod->name + skipchars);
+@@ -1675,6 +1675,6 @@
+ #else
+ int main(int argc, char **argv)
+ {
+- return depmod_main(argc, argv) || errors;
++ return depmod_main(argc, argv) || error_count;
+ }
+ #endif /* defined(COMMON_3264) && defined(ONLY_32) */
+--- genksyms/genksyms.c
++++ genksyms/genksyms.c
+@@ -45,7 +45,7 @@
+ int flag_debug, flag_dump_defs, flag_warnings;
+ int checksum_version = 1, kernel_version = version(2,0,0);
+
+-static int errors;
++static int num_errors;
+ static int nsyms;
+
+ static struct symbol *expansion_trail;
+@@ -458,7 +458,7 @@
+ va_end(args);
+ putc('\n', stderr);
+
+- errors++;
++ num_errors++;
+ }
+ }
+
+@@ -476,7 +476,7 @@
+ va_end(args);
+ putc('\n', stderr);
+
+- errors++;
++ num_errors++;
+ }
+ }
+
+@@ -597,5 +597,5 @@
+ nsyms, HASH_BUCKETS, (double)nsyms / (double)HASH_BUCKETS);
+ }
+
+- return errors != 0;
++ return num_errors != 0;
+ }
+--- include/util.h
++++ include/util.h
+@@ -39,8 +39,8 @@
+ extern int xftw(const char *directory, xftw_func_t);
+
+ /* Error logging */
+-extern int log;
+-extern int errors;
++extern int logging;
++extern int error_count;
+ extern const char *error_file;
+
+ extern int flag_verbose;
+--- insmod/insmod.c
++++ insmod/insmod.c
+@@ -275,7 +275,7 @@
+ if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
+ gplonly_seen = 1;
+ if (gpl)
+- ((char *)s->name) += 8;
++ s->name = ((char *)s->name) + 8;
+ else
+ continue;
+ }
+@@ -1679,7 +1679,7 @@
+ error_file = "insmod";
+
+ /* To handle repeated calls from combined modprobe */
+- errors = optind = 0;
++ error_count = optind = 0;
+
+ /* Process the command line. */
+ while ((o = getopt_long(argc, argv, "fhkLmnpqrsSvVxXyYNe:o:O:P:R:",
+@@ -2064,7 +2064,7 @@
+ goto out;
+ /**** No symbols or sections to be changed after kallsyms above ***/
+
+- if (errors)
++ if (error_count)
+ goto out;
+
+ /* If we were just checking, we made it. */
+@@ -2123,10 +2123,10 @@
+ test_read.m.read_start = m_addr + sizeof(struct module);
+ test_read.m.read_end = test_read.m.read_start + sizeof(test_read.data);
+ if (sys_init_module(m_name, (struct module *) &test_read)) {
+- int old_errors = errors;
++ int old_errors = error_count;
+ error("has persistent data but the kernel is too old to support it."
+ " Expect errors during rmmod as well");
+- errors = old_errors;
++ error_count = old_errors;
+ }
+ }
+
+@@ -2152,7 +2152,7 @@
+ #else
+ init_module(m_name, f, m_size, blob_name, noload, flag_load_map);
+ #endif
+- if (errors) {
++ if (error_count) {
+ if (!noload)
+ delete_module(m_name);
+ goto out;
+--- insmod/kallsyms.c
++++ insmod/kallsyms.c
+@@ -80,7 +80,7 @@
+ error_file = "kallsyms";
+
+ /* To handle repeated calls from combined modprobe */
+- errors = optind = 0;
++ error_count = optind = 0;
+
+ /* Process the command line. */
+ while ((c = getopt_long(argc, argv, "Vh",
+--- insmod/modprobe.c
++++ insmod/modprobe.c
+@@ -1023,7 +1023,7 @@
+ if (quiet)
+ my_argv[my_argc++] = "-q";
+
+- if (log)
++ if (logging)
+ my_argv[my_argc++] = "-s";
+
+ if (insmod_opt) {
+--- insmod/rmmod.c
++++ insmod/rmmod.c
+@@ -261,9 +261,9 @@
+ read_parm.m.read_start = mp->sym->value;
+ read_parm.m.read_end = read_parm.m.read_start + datasize;
+ if (sys_init_module(module, (struct module *) &read_parm)) {
+- int old_errors = errors;
++ int old_errors = error_count;
+ error("has persistent data but the kernel is too old to support it.");
+- errors = old_errors;
++ error_count = old_errors;
+ return(0);
+ }
+
+--- util/logger.c
++++ util/logger.c
+@@ -31,10 +31,10 @@
+
+ /*======================================================================*/
+
+-int log;
++int logging;
+ static int silent;
+
+-int errors;
++int error_count;
+ const char *error_file;
+ const char *program_name;
+
+@@ -75,7 +75,7 @@
+
+ if (silent)
+ ;
+- else if (log) {
++ else if (logging) {
+ char buf[2*PATH_MAX];
+ int n;
+
+@@ -100,7 +100,7 @@
+ putc('\n', stderr);
+ }
+
+- errors++;
++ error_count++;
+ }
+
+ void lprintf(const char *fmt,...)
+@@ -108,7 +108,7 @@
+ va_list args;
+
+ if (silent);
+- else if (log) {
++ else if (logging) {
+ char buf[2*PATH_MAX];
+ va_start(args, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, args);
+@@ -132,5 +132,5 @@
+ #ifdef STOREMSG
+ atexit(dumpmsg);
+ #endif
+- log = 1;
++ logging = 1;
+ }
+--- obj/obj_kallsyms.c
++++ obj/obj_kallsyms.c
+@@ -200,8 +200,8 @@
+
+ /* Initial contents, header + one entry per input section. No strings. */
+ osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
+- a_hdr = (struct kallsyms_header *) osec->contents =
+- xmalloc(osec->header.sh_size);
++ osec->contents = xmalloc(osec->header.sh_size);
++ a_hdr = (struct kallsyms_header *) osec->contents;
+ memset(osec->contents, 0, osec->header.sh_size);
+ a_hdr->size = sizeof(*a_hdr);
+ a_hdr->sections = loaded;
+@@ -275,8 +275,8 @@
+ a_hdr->symbol_off +
+ a_hdr->symbols*a_hdr->symbol_size +
+ strings_size - strings_left;
+- a_hdr = (struct kallsyms_header *) osec->contents =
+- xrealloc(a_hdr, a_hdr->total_size);
++ osec->contents = xrealloc(a_hdr, a_hdr->total_size);
++ a_hdr = (struct kallsyms_header *) osec->contents;
+ p = (char *)a_hdr + a_hdr->symbol_off;
+ memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
+ free(symbols);
+--- obj/obj_ppc.c
++++ obj/obj_ppc.c
+@@ -25,6 +25,7 @@
+ #include <obj.h>
+ #include <util.h>
+ #include <assert.h>
++#include <stdlib.h>
+
+
+ /*======================================================================*/
+@@ -255,7 +256,8 @@
+ archdata_sec->header.sh_size = 0;
+ sec = obj_find_section(f, "__ftr_fixup");
+ if (sec) {
+- ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
++ archdata_sec->contents = xmalloc(sizeof(*ad));
++ ad = (struct archdata *) (archdata_sec->contents);
+ memset(ad, 0, sizeof(*ad));
+ archdata_sec->header.sh_size = sizeof(*ad);
+ ad->__start___ftr_fixup = sec->header.sh_addr;
diff --git a/sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch b/sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch
new file mode 100644
index 000000000000..7af4599c7154
--- /dev/null
+++ b/sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch
@@ -0,0 +1,43 @@
+Patch by the PaX team to get rid of executable stacks.
+
+--- modutils/insmod/insmod.c
++++ modutils/insmod/insmod.c
+@@ -366,18 +366,21 @@ static void hide_special_symbols(struct
+ sym->info = ELFW(ST_INFO) (STB_LOCAL, ELFW(ST_TYPE) (sym->info));
+ }
+
++static struct obj_file *load_map_file;
++
++static int load_map_cmp(const void *a, const void *b) {
++ struct obj_symbol **as = (struct obj_symbol **) a;
++ struct obj_symbol **bs = (struct obj_symbol **) b;
++ unsigned long aa = obj_symbol_final_value(load_map_file, *as);
++ unsigned long ba = obj_symbol_final_value(load_map_file, *bs);
++ return aa < ba ? -1 : aa > ba ? 1 : 0;
++}
++
+ static void print_load_map(struct obj_file *f)
+ {
+ struct obj_symbol *sym;
+ struct obj_symbol **all, **p;
+ struct obj_section *sec;
+- int load_map_cmp(const void *a, const void *b) {
+- struct obj_symbol **as = (struct obj_symbol **) a;
+- struct obj_symbol **bs = (struct obj_symbol **) b;
+- unsigned long aa = obj_symbol_final_value(f, *as);
+- unsigned long ba = obj_symbol_final_value(f, *bs);
+- return aa < ba ? -1 : aa > ba ? 1 : 0;
+- }
+ int i, nsyms, *loaded;
+
+ /* Report on the section layout. */
+@@ -425,7 +428,9 @@ static void print_load_map(struct obj_fi
+ *p++ = sym;
+
+ /* Sort them by final value. */
++ load_map_file = f;
+ qsort(all, nsyms, sizeof(struct obj_file *), load_map_cmp);
++ load_map_file = NULL;
+
+ /* And list them. */
+ lprintf("\nSymbols:");
diff --git a/sys-apps/modutils/metadata.xml b/sys-apps/modutils/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/modutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/modutils/modutils-2.4.27-r1.ebuild b/sys-apps/modutils/modutils-2.4.27-r1.ebuild
new file mode 100644
index 000000000000..9123212c0c53
--- /dev/null
+++ b/sys-apps/modutils/modutils-2.4.27-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Standard kernel module utilities for linux-2.4 and older"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/kernel/modutils/"
+SRC_URI="mirror://kernel/linux/utils/kernel/${PN}/v2.4/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/kmod"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-alias.patch
+ epatch "${FILESDIR}"/${P}-gcc.patch
+ epatch "${FILESDIR}"/${P}-flex.patch
+ epatch "${FILESDIR}"/${P}-no-nested-function.patch
+}
+
+src_configure() {
+ econf \
+ --prefix=/ \
+ --disable-strip \
+ --enable-insmod-static \
+ --disable-zlib
+}
+
+src_install() {
+ einstall prefix="${D}"
+ rm -r "${ED}"/usr/share/man/man2 || die
+ dodoc CREDITS ChangeLog NEWS README TODO
+}
diff --git a/sys-apps/moreutils/Manifest b/sys-apps/moreutils/Manifest
new file mode 100644
index 000000000000..1335fa187b57
--- /dev/null
+++ b/sys-apps/moreutils/Manifest
@@ -0,0 +1,7 @@
+DIST moreutils-0.60.tar.gz 93137 SHA256 a095e9647ccde72d43a4d39ee215c6ac59a00b2cd1da17ccbcaf70e3923ae011 SHA512 b09b81606fc307abe26173fbd2e50ab3ee84db53b7242dc57a0747a83489088b1702435cfad5a171af00d56ab154b9d4c3062a3d4ac7c002dc03315c6fca0cab WHIRLPOOL 9d0183cf422a408957ccf027f5f141cae11ab5b99eaeff2b3a5949b88d87544b865a3466286a2e2208103bda7a91728f3ec5078361940d6ce3bc058277ba568a
+DIST moreutils-0.61.tar.gz 93234 SHA256 e361d7da29125a81bf7899275460ac91f6a2e538f3bb61160a0d1d3754af876f SHA512 6164680c8bfec02f7a84274b1d4342a1d6c296e14843496dcc9f9ac71b3e3b1663dea72e2251a546a646775afa70589483e8d5da71b388b1022476bb3dd91b56 WHIRLPOOL 3c5fa18c37ef9633f487d55605ad627dc64a3dc9ce3065ae2a43086efdad367d12badfbb71d3aebc986d56988334e84394e9ce3e3a4b6ea3d70c31d30296bd0b
+EBUILD moreutils-0.60-r1.ebuild 1478 SHA256 2ffe390e8005189d21ec0d9d744f95f9fe41e635aa683b9c12545a1ba82679d2 SHA512 2837b8041fa09763834a3ac0698bd6a16d246e9d58e1bc7957e2a527f85f0cfed145df81838c3e5f5f90521ac2e84acaeaa4b599befadac86e435cbc23d871a9 WHIRLPOOL 14df53aa40afff55c72c272165f714fa71dfac0a6f7f6e3d1ada0d57b37ae77b9960154af7854e14e5585677e037fc034152cb96ad6b59e50fffcf59b6a653a7
+EBUILD moreutils-0.61.ebuild 1478 SHA256 2ffe390e8005189d21ec0d9d744f95f9fe41e635aa683b9c12545a1ba82679d2 SHA512 2837b8041fa09763834a3ac0698bd6a16d246e9d58e1bc7957e2a527f85f0cfed145df81838c3e5f5f90521ac2e84acaeaa4b599befadac86e435cbc23d871a9 WHIRLPOOL 14df53aa40afff55c72c272165f714fa71dfac0a6f7f6e3d1ada0d57b37ae77b9960154af7854e14e5585677e037fc034152cb96ad6b59e50fffcf59b6a653a7
+MISC ChangeLog 3585 SHA256 a1b950b5a1a027e093d3fa0665a9d65224c093ec710d92d276585e14c9b323c8 SHA512 b12c0e42ede921abd9b8b5241a3e4849bdcfe45d790facb006fd399d6ac975c9e1000a918785cb8c041b80bb229577aa67e3f42c0c5260004987692c5cafab48 WHIRLPOOL 861bc4210a40f95d19b887037f10ed058da0a717715a6790da25d21a4b43c67773795f251703a468d1dcb4e29f0720b2999ce33ec19b812b2dd4f5de4ff5ee52
+MISC ChangeLog-2015 9793 SHA256 338078fc41f39f641af28c681ebc1a50c242ba288b1e84d957fb99fda93e53fc SHA512 f01387c6f90b49db4a625b245d3d498f59921e7a0677aa9f872067eb222523c79dd03f1fb1de42bb7f29dc559838b53da368c3db3455bf0f65ba2d65c63b9b59 WHIRLPOOL 4c0a58efaa5631181bad9bef137083dcf2714a3b299b5c42ca677b0a173f6e3dcbce5e6b374b9b9bcf2b21d889edec2c41f76a429df57b565d078ecf8f722392
+MISC metadata.xml 313 SHA256 546c140a0a196745ff23c1d9eea1415111f4028014d9a60b1d541d8e12c51684 SHA512 75fcc8c041bbe324b5c1bcd0b006b7cfc17b5b2ae4bf0ef711b9ef4d3233917d4a189320ef06f3165e23f33ac7e6e58d1545cb4c2082eb22a052d09817cecc6f WHIRLPOOL f8eb9050ada78eaf24a0d92b9d742c02a662771bc13f63c885480ceb3a383dfca9abb73e6f3af682f46978b72900813c3548481688e99f58842596b6ee808d6c
diff --git a/sys-apps/moreutils/metadata.xml b/sys-apps/moreutils/metadata.xml
new file mode 100644
index 000000000000..9dcebf680e36
--- /dev/null
+++ b/sys-apps/moreutils/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 type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+</maintainer>
+<use>
+ <flag name="perl">Install scripts written in Perl</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/moreutils/moreutils-0.60-r1.ebuild b/sys-apps/moreutils/moreutils-0.60-r1.ebuild
new file mode 100644
index 000000000000..b16d74ba1408
--- /dev/null
+++ b/sys-apps/moreutils/moreutils-0.60-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="a collection of tools that nobody thought to write when Unix was young"
+HOMEPAGE="https://joeyh.name/code/moreutils/"
+#SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.orig.tar.gz"
+SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ~ppc ~ppc64 x86 ~x86-linux"
+IUSE="+doc +perl"
+
+RDEPEND="
+ perl? (
+ dev-lang/perl
+ dev-perl/IPC-Run
+ dev-perl/Time-Duration
+ dev-perl/TimeDate
+ )"
+DEPEND="
+ app-admin/eselect
+ doc? (
+ dev-lang/perl
+ >=app-text/docbook2X-0.8.8-r2
+ app-text/docbook-xml-dtd:4.4
+ )"
+
+src_prepare() {
+ # don't build manpages
+ if ! use doc ; then
+ sed -i -e '/^all:/s/$(MANS)//' -e '/man1/d' Makefile || die
+ fi
+
+ # don't install perl scripts
+ if ! use perl ; then
+ sed -i -e '/PERLSCRIPTS/d' Makefile || die
+ fi
+
+ default
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}" DOCBOOK2XMAN=docbook2man.pl PREFIX="${EPREFIX}/usr"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" INSTALL_BIN=install install
+
+ # sys-process is more advanced than parallel from moreutils, rename it
+ if use doc; then
+ mv "${ED}"usr/share/man/man1/{,${PN}_}parallel.1 || die
+ fi
+ mv "${ED}"usr/bin/{,${PN}_}parallel || die
+}
+
+pkg_postinst() {
+ # try to make sure $EDITOR is valid for vipe (bug #604630)
+ eselect editor update
+}
diff --git a/sys-apps/moreutils/moreutils-0.61.ebuild b/sys-apps/moreutils/moreutils-0.61.ebuild
new file mode 100644
index 000000000000..b16d74ba1408
--- /dev/null
+++ b/sys-apps/moreutils/moreutils-0.61.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="a collection of tools that nobody thought to write when Unix was young"
+HOMEPAGE="https://joeyh.name/code/moreutils/"
+#SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.orig.tar.gz"
+SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ~ppc ~ppc64 x86 ~x86-linux"
+IUSE="+doc +perl"
+
+RDEPEND="
+ perl? (
+ dev-lang/perl
+ dev-perl/IPC-Run
+ dev-perl/Time-Duration
+ dev-perl/TimeDate
+ )"
+DEPEND="
+ app-admin/eselect
+ doc? (
+ dev-lang/perl
+ >=app-text/docbook2X-0.8.8-r2
+ app-text/docbook-xml-dtd:4.4
+ )"
+
+src_prepare() {
+ # don't build manpages
+ if ! use doc ; then
+ sed -i -e '/^all:/s/$(MANS)//' -e '/man1/d' Makefile || die
+ fi
+
+ # don't install perl scripts
+ if ! use perl ; then
+ sed -i -e '/PERLSCRIPTS/d' Makefile || die
+ fi
+
+ default
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}" DOCBOOK2XMAN=docbook2man.pl PREFIX="${EPREFIX}/usr"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" INSTALL_BIN=install install
+
+ # sys-process is more advanced than parallel from moreutils, rename it
+ if use doc; then
+ mv "${ED}"usr/share/man/man1/{,${PN}_}parallel.1 || die
+ fi
+ mv "${ED}"usr/bin/{,${PN}_}parallel || die
+}
+
+pkg_postinst() {
+ # try to make sure $EDITOR is valid for vipe (bug #604630)
+ eselect editor update
+}
diff --git a/sys-apps/most/Manifest b/sys-apps/most/Manifest
new file mode 100644
index 000000000000..61891329865a
--- /dev/null
+++ b/sys-apps/most/Manifest
@@ -0,0 +1,7 @@
+AUX most-5.0.0a-donot-hardcode-path.patch 969 SHA256 6d08644fe57f3a02bffe6ae935392f9d2323b4c0767a1cd49969dac53506f986 SHA512 6da3424b5e9763bd8f89998ffe019230cc8e9c7fc9722235cc13830d50647f590f6a934ae025a063fe8fc1e8bdd2b4fc067fbc1569c7a0ebfa220b868b999271 WHIRLPOOL 9b21c2b20910127db97c965ae362ffd5d8d4d34c2c80559b01f7fc59b7c65b9b053d55d2db4764150ff1624be33249f5cbf501f92e777e95630db24f7d18029d
+AUX most-5.0.0a-no-explicit-termcap.patch 6172 SHA256 06b1c19bbe5102a7960e38cba6179925e3859a0457fdb987dd7fe2a5ed3555c9 SHA512 48a87d66bda3b1464a214614c5ea23a5ba5a820da0da497de4db9ca4205288d7f63f460b08713047a4a14e8911bbb0b6a92ff2521cbec1acdf4e37e86a2c1346 WHIRLPOOL 4a5477b45a91106c97466f8551d30e1d8be2ae999e1b45cbd7e9b0e6e3ed75ff28024309d3d442bb1db663586c96564fef182d55559a629099f8fc5440cc5d36
+DIST most-5.0.0a.tar.bz2 131130 SHA256 94cb5a2e71b6b9063116f4398a002a757e59cd1499f1019dde8874f408485aa9 SHA512 0c101777250a15ed9cbe0bfbaa17d0ac5ef973a7e0730d096bd931ba578dbcbd4f244305c99a50bc8fd8aa1937b621a97a6452b3821fee7d72f33a02da278e5d WHIRLPOOL 26beeeed2b46b06edb5dcfb8cf009070964e74e42e78a29068c343b5863764e4b8fa8e8457481523589f37f72171b3be4b603d071fba80ad756dd9c3cdbac374
+EBUILD most-5.0.0a-r1.ebuild 902 SHA256 9d864dacc5ec73fc62a305bf824bffd2e5b8ce1d158f530d51a8a5fe87c2d492 SHA512 49a4d97841dc9e43abada91cdc720117da3358e3fb85b672bf3064514d254f72d4f09ad326287dff5997fd3b0cefdce3c216c3882f2525b7a61715a3d6e971bc WHIRLPOOL 7f635ccaa8b7a3de0da67f8685c317e4e8da975402f23213fa884ae5aa46e356dfc31aa7207fe492048e58523bda03d9a2e03fceccd293da13f75ea506e7cf75
+MISC ChangeLog 2712 SHA256 3e016f66feb10be65f7f2622e28478300cf6455b1302f084d1e5b5d8a2098a74 SHA512 bd687df610608a89635c0b6acff597b8df5edd2940cf15d8318b8a3b5ffe1a5d561f416e9703c6e4aab1c8f0dfce0d0da128618abfcd711af46b4413ad7e8934 WHIRLPOOL 51bed04ae683808f8bddcd3ca2802e643e9d0c8a4cda0580307627ad9523dd11ad98488913701a34439d5dc976332a8c2f684fbe5daf601797bdf51f38fae5e0
+MISC ChangeLog-2015 7287 SHA256 d6dbb5c9811c3be552c38d002ef0b07fa641913bb7980ce6ecf508a7a83cc650 SHA512 7803040b6e1cf4f2f20fd8f22d6c988071eb53181add255639f0580f00f8c22daf2a8c1b0f2e8be95d49961d96a97115fc18c95a57cbb33f988ad2c6be656258 WHIRLPOOL 1e4c0fc22a636f2d637e8abd6b70c10c25af7aa333f99b4e7ab1b80516f595816df48b797b237cdc59c351226222a827ecef5d7a999662f0dce7f9f3d97bb472
+MISC metadata.xml 271 SHA256 fb77ec802242340d65f4f1cf61787ffa6fb4d57ed02f61feebeed67d2dfb5467 SHA512 3e98f5382cf789992bdfc0f32e6e36eba31944be654c03f2ed9bd00baf56c8b768c256c4f8778d5775d6df38da4afcf8e32b6e6495a1ecfc8e7982c7c8943b1b WHIRLPOOL d6212acd36a69fee56b014b2e1724369857e776204569ac774915e589fd2242b3cd961226d9f125eed452d6c420468e60f038c9b49d1d2a8827d13766918f872
diff --git a/sys-apps/most/files/most-5.0.0a-donot-hardcode-path.patch b/sys-apps/most/files/most-5.0.0a-donot-hardcode-path.patch
new file mode 100644
index 000000000000..37e786c26b0c
--- /dev/null
+++ b/sys-apps/most/files/most-5.0.0a-donot-hardcode-path.patch
@@ -0,0 +1,33 @@
+Author: Benda Xu <heroxbd@gentoo.org>
+Date: 2014-12-08
+Forwarded: John E. Davis <jed@jedsoft.org>
+
+cp or rm does not necessarily reside in /bin. If it does, /bin is
+in $PATH by convention. In either case, hardcoding /bin/cp or /bin/rm
+is not a good idea.
+
+Index: most-5.0.0a/src/Makefile.in
+===================================================================
+--- most-5.0.0a.orig/src/Makefile.in
++++ most-5.0.0a/src/Makefile.in
+@@ -61,7 +61,7 @@ $(OBJDIR):
+ -mkdir $(OBJDIR)
+ #
+ $(CONFIG_H) : $(SRCDIR)/sysconf.h
+- /bin/cp $(SRCDIR)/sysconf.h $(CONFIG_H)
++ cp $(SRCDIR)/sysconf.h $(CONFIG_H)
+ #
+ slangversion: $(OBJDIR)/chkslang
+ $(OBJDIR)/chkslang $(EXEC) 20000
+@@ -75,9 +75,9 @@ $(SRCDIR)/version.h: $(SRCDIR)/../change
+ fi
+ #
+ clean:
+- /bin/rm -f $(OBJDIR)/* *~
++ rm -f $(OBJDIR)/* *~
+ distclean: clean
+- /bin/rm -rf $(OBJDIR) Makefile sysconf.h
++ rm -rf $(OBJDIR) Makefile sysconf.h
+ installdirs:
+ $(MKINSDIR) $(DEST_DOCDIR)
+ $(MKINSDIR) $(DEST_MANDIR)/man1
diff --git a/sys-apps/most/files/most-5.0.0a-no-explicit-termcap.patch b/sys-apps/most/files/most-5.0.0a-no-explicit-termcap.patch
new file mode 100644
index 000000000000..f858f56f7bc1
--- /dev/null
+++ b/sys-apps/most/files/most-5.0.0a-no-explicit-termcap.patch
@@ -0,0 +1,216 @@
+Author: Benda Xu <heroxbd@gentoo.org>
+Date: 2014-12-08
+Forwarded: John E. Davis <jed@jedsoft.org>
+
+"most" completely replies on slang to access terminfo/termcap, by
+SLtt_get_terminfo() and friends.
+
+Nothing should be considered by most but to find slang. Therefore it
+should not link against libtermcap in any case.
+
+ * configure.ac: remove JD_TERMCAP
+ * configure: regenerate with autoconf-2.61
+ * src/Makefile.in: remove libtermcap linking
+
+Index: most-5.0.0a/autoconf/configure.ac
+===================================================================
+--- most-5.0.0a.orig/autoconf/configure.ac
++++ most-5.0.0a/autoconf/configure.ac
+@@ -62,7 +62,6 @@ getpgrp tcgetpgrp \
+ )
+
+ JD_SET_OBJ_SRC_DIR
+-JD_TERMCAP
+ JD_WITH_LIBRARY(slang)
+ JD_GCC_WARNINGS
+ JD_GET_MODULES(src/modules.lis)
+Index: most-5.0.0a/configure
+===================================================================
+--- most-5.0.0a.orig/configure
++++ most-5.0.0a/configure
+@@ -700,8 +700,6 @@ X_EXTRA_LIBS
+ SRCDIR
+ OBJDIR
+ ELFDIR
+-TERMCAP
+-MISC_TERMINFO_DIRS
+ SLANG_LIB
+ SLANG_INC
+ PROGRAM_OFILES
+@@ -9064,13 +9062,11 @@ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <sys/types.h> /* for off_t */
+- #include <stdio.h>
++#include <stdio.h>
+ int
+ main ()
+ {
+-int (*fp) (FILE *, off_t, int) = fseeko;
+- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
++return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+ ;
+ return 0;
+ }
+@@ -9110,13 +9106,11 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #define _LARGEFILE_SOURCE 1
+-#include <sys/types.h> /* for off_t */
+- #include <stdio.h>
++#include <stdio.h>
+ int
+ main ()
+ {
+-int (*fp) (FILE *, off_t, int) = fseeko;
+- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
++return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+ ;
+ return 0;
+ }
+@@ -9777,42 +9771,6 @@ OBJDIR=$SRCDIR/"$ARCH"objs
+ ELFDIR=$SRCDIR/elf"$ARCH"objs
+
+
+-{ echo "$as_me:$LINENO: checking for Terminfo" >&5
+-echo $ECHO_N "checking for Terminfo... $ECHO_C" >&6; }
+-MISC_TERMINFO_DIRS="$FINKPREFIX/share/terminfo"
+-if test ! -d $MISC_TERMINFO_DIRS
+-then
+- MISC_TERMINFO_DIRS=""
+-fi
+-
+-JD_Terminfo_Dirs="/usr/lib/terminfo \
+- /usr/share/terminfo \
+- /usr/share/lib/terminfo \
+- /usr/local/lib/terminfo \
+- $MISC_TERMINFO_DIRS"
+-
+-TERMCAP=-ltermcap
+-
+-for terminfo_dir in $JD_Terminfo_Dirs
+-do
+- if test -d $terminfo_dir
+- then
+- { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+- TERMCAP=""
+- break
+- fi
+-done
+-if test "$TERMCAP"; then
+- { echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+- cat >>confdefs.h <<\_ACEOF
+-#define USE_TERMCAP 1
+-_ACEOF
+-
+-fi
+-
+-
+ if test "X$jd_prefix" = "X"
+ then
+ jd_prefix=$ac_default_prefix
+@@ -10858,8 +10816,6 @@ X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+ SRCDIR!$SRCDIR$ac_delim
+ OBJDIR!$OBJDIR$ac_delim
+ ELFDIR!$ELFDIR$ac_delim
+-TERMCAP!$TERMCAP$ac_delim
+-MISC_TERMINFO_DIRS!$MISC_TERMINFO_DIRS$ac_delim
+ SLANG_LIB!$SLANG_LIB$ac_delim
+ SLANG_INC!$SLANG_INC$ac_delim
+ PROGRAM_OFILES!$PROGRAM_OFILES$ac_delim
+@@ -10868,9 +10824,10 @@ PROGRAM_HFILES!$PROGRAM_HFILES$ac_delim
+ PROGRAM_OBJECTS!$PROGRAM_OBJECTS$ac_delim
+ PROGRAM_ELFOBJECTS!$PROGRAM_ELFOBJECTS$ac_delim
+ LIBOBJS!$LIBOBJS$ac_delim
++LTLIBOBJS!$LTLIBOBJS$ac_delim
+ _ACEOF
+
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+@@ -10906,50 +10863,6 @@ CEOF$ac_eof
+ _ACEOF
+
+
+-ac_delim='%!_!# '
+-for ac_last_try in false false false false false :; do
+- cat >conf$$subs.sed <<_ACEOF
+-LTLIBOBJS!$LTLIBOBJS$ac_delim
+-_ACEOF
+-
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 1; then
+- break
+- elif $ac_last_try; then
+- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+- { (exit 1); exit 1; }; }
+- else
+- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+- fi
+-done
+-
+-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+-if test -n "$ac_eof"; then
+- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+- ac_eof=`expr $ac_eof + 1`
+-fi
+-
+-cat >>$CONFIG_STATUS <<_ACEOF
+-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+-_ACEOF
+-sed '
+-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+-s/^/s,@/; s/!/@,|#_!!_#|/
+-:n
+-t n
+-s/'"$ac_delim"'$/,g/; t
+-s/$/\\/; p
+-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+-' >>$CONFIG_STATUS <conf$$subs.sed
+-rm -f conf$$subs.sed
+-cat >>$CONFIG_STATUS <<_ACEOF
+-:end
+-s/|#_!!_#|//g
+-CEOF$ac_eof
+-_ACEOF
+-
+-
+ # VPATH may cause trouble with some makes, so we remove $(srcdir),
+ # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+@@ -11193,7 +11106,7 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
+ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+ s&@INSTALL@&$ac_INSTALL&;t t
+ $ac_datarootdir_hack
+-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed 's/|#_!!_#|//g' >$tmp/out
+
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+Index: most-5.0.0a/src/Makefile.in
+===================================================================
+--- most-5.0.0a.orig/src/Makefile.in
++++ most-5.0.0a/src/Makefile.in
+@@ -3,7 +3,6 @@ CFLAGS = @CFLAGS@ @SLANG_DLL_CFLAGS@
+ LDFLAGS = @LDFLAGS@
+ SLANG_INC = @SLANG_INC@
+ SLANG_LIB = @SLANG_LIB@ -lslang
+-MISCLIBS = @TERMCAP@
+ RPATH = @RPATH@
+
+ #-----------------------------------------------------------------------------
+@@ -44,7 +43,7 @@ EXEC = most
+ CONFIG_H = config.h
+ INCS = $(SLANG_INC)
+ ALL_CFLAGS = $(CFLAGS) -Dunix $(INCS)
+-EXECLIBS = $(RPATH) $(SLANG_LIB) $(MISCLIBS) -lm
++EXECLIBS = $(RPATH) $(SLANG_LIB) -lm
+ #
+ most_O_DEP = $(SRCDIR)/version.h
+ UPDATE_VERSION_SCRIPT = $(HOME)/bin/update_changes_version
diff --git a/sys-apps/most/metadata.xml b/sys-apps/most/metadata.xml
new file mode 100644
index 000000000000..3e927f8d7480
--- /dev/null
+++ b/sys-apps/most/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/most/most-5.0.0a-r1.ebuild b/sys-apps/most/most-5.0.0a-r1.ebuild
new file mode 100644
index 000000000000..61881208048c
--- /dev/null
+++ b/sys-apps/most/most-5.0.0a-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Paging program that displays, one windowful at a time, the contents of a file"
+HOMEPAGE="ftp://space.mit.edu/pub/davis/most"
+SRC_URI="ftp://space.mit.edu/pub/davis/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~mips ~ppc64 ppc sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND=">=sys-libs/slang-2.1.3"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.0a-no-explicit-termcap.patch
+ epatch "${FILESDIR}"/${PN}-5.0.0a-donot-hardcode-path.patch
+ sed -i -e 's:$(INSTALL) -s:$(INSTALL):' src/Makefile.in || die
+ export MAKEOPTS+=" -j1"
+}
+
+src_configure() {
+ unset ARCH
+ econf
+}
+
+src_install() {
+ emake DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" \
+ install
+}
diff --git a/sys-apps/mount-gtk/Manifest b/sys-apps/mount-gtk/Manifest
new file mode 100644
index 000000000000..c405d8607d23
--- /dev/null
+++ b/sys-apps/mount-gtk/Manifest
@@ -0,0 +1,6 @@
+AUX mount-gtk-1.4.2-c++11.patch 1117 SHA256 4497cf667f0459e4e3479b1666ec61fad16b725c00983e7af056cd4886412d71 SHA512 369aea5b8b7b1df836e1970d7eec28708d6c3c833c960c38002a58f4536889fcbbe9f61d7a92907493f3aa04d164526c0fd7ead7a03cb916a2cf318ae027cf2e WHIRLPOOL 831de080f5857a4e5b2bc8fb1d12a948813fb9010c736f1992a30ca968073db7103dcdbe666b092481cefabfe3022a0253313777fde2813efa54aa2b6217cece
+DIST mount-gtk-1.4.2.tar.gz 232132 SHA256 755a4aae98c8c14c909dfc8da2e46f32ce720137edecdb3d8fcdc99fa02dbd03 SHA512 90fa174238d19bf009f5863e5571030091681038ddbfdc06c7a39f8859b78d9864b398899d66463d0f8a189e484201c7a32753b38898e0f5d55970feb85420ba WHIRLPOOL 17ea7baab7df013116e0c302c9fe9810c8a6d941e9de79cf05e3e9826a69fbc0ff49efb8d44d64658c472439019119b47adf7bab51a198616b5abda9708c47ea
+EBUILD mount-gtk-1.4.2.ebuild 858 SHA256 3bba7647e269cf30732e77fce4835e90ecf379dbe28ecf6228a0fc689bbc0476 SHA512 ccf32adf1b708c6330b706a9485a560e3ec5016f784e059ace30324b7c567a346fb8581d0efd9c79d707bef88475b8eadad1565ec42f23f2fabcedd22d4d574e WHIRLPOOL 248c75fc01bc44378ebfd6a972f0b27e4d8c6fc64dc03929a162e16a4a5219e3dbec0077f063b7502170eb941359201b397782b28a0e2c7b506aa3f471a5e973
+MISC ChangeLog 2590 SHA256 ece61b01ef3541d6e5df4c4780bf28e7c28e63b2a9474671dce06e618b135536 SHA512 58fd9d4b18f3676ae919d8d7c5c16735ca54a8ed27f2cd9f637554513dd545e1289e02348531d1a19fcb04ff24cea4a30d93aab315292d8c0c36636f7275a779 WHIRLPOOL a3f4dc1182550e0d90a081cbd1c437bf1ad169bccd07c3ece0131e3348251aae1181026378df8c61c2ed7121950eec65c73e944a3ea9788700ac9999868697fc
+MISC ChangeLog-2015 839 SHA256 e99b0cf9c3256dbf424252e67629955d3cf27e086c60cde1a4b71f6e82ad5edd SHA512 e9642a5082943baa47dbaa669f6f50c1a0403b89f486c3fe5ba4af46b5c99f37c700733c6f17205c524ae22ac6ef884910728de77c6aed62bc7874ebd275389c WHIRLPOOL e979dd5cfda22dfb4b69af6e288f548e576f26c75ab6662c5d1f3d349f7d63d1fedf9cf8b91fa86b9be54b8bbeb86ea486075028ea489f37b08cbbe50cb79e18
+MISC metadata.xml 355 SHA256 3563b9e498c6a0d6e31fff668d008b17a8165fcc72735ba94cd42629925299b1 SHA512 a2160b97106975c45262beb68b1c6e1412edf2df400868ece4a93c1318a2e24b0a178cca0b0a4ac7c766e0a3c1e98b1a812d0fe079ec1412a05aaa1eb5f8d8e3 WHIRLPOOL 4994f5aacb382573d8084fae99ce4a0112b680db7226cb071294e2b4be4d267aade6c8ca56b1e8416c7fb6d8010c82a14916f151dcd5f5e3bcd6d2449a3ce33f
diff --git a/sys-apps/mount-gtk/files/mount-gtk-1.4.2-c++11.patch b/sys-apps/mount-gtk/files/mount-gtk-1.4.2-c++11.patch
new file mode 100644
index 000000000000..f2898a0d2ca8
--- /dev/null
+++ b/sys-apps/mount-gtk/files/mount-gtk-1.4.2-c++11.patch
@@ -0,0 +1,31 @@
+http://bugs.gentoo.org/484264
+
+--- configure.ac
++++ configure.ac
+@@ -27,6 +27,7 @@
+ AC_LANG_CPLUSPLUS dnl switch to C++
+ AC_TYPE_SIZE_T
+ AC_CHECK_TYPES(ssize_t)
++AX_CHECK_COMPILE_FLAG([-std=c++11], [CXXFLAGS="$CXXFLAGS -std=c++11"])
+ AC_CHECK_RANGE_FOR_SUPPORT
+ AC_CHECK_LAMBDA_SUPPORT
+
+--- m4/ax_check_compile_flag.m4
++++ m4/ax_check_compile_flag.m4
+@@ -0,0 +1,16 @@
++# This macro is part of autoconf-archive with license GPL-3 or any later version
++AC_DEFUN([AX_CHECK_COMPILE_FLAG],
++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
++ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
++ [AS_VAR_SET(CACHEVAR,[yes])],
++ [AS_VAR_SET(CACHEVAR,[no])])
++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
++ [m4_default([$2], :)],
++ [m4_default([$3], :)])
++AS_VAR_POPDEF([CACHEVAR])dnl
++])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/sys-apps/mount-gtk/metadata.xml b/sys-apps/mount-gtk/metadata.xml
new file mode 100644
index 000000000000..d5655724c0ba
--- /dev/null
+++ b/sys-apps/mount-gtk/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 type="project">
+ <email>desktop-misc@gentoo.org</email>
+ <name>Gentoo Desktop Miscellaneous Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mount-gtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/mount-gtk/mount-gtk-1.4.2.ebuild b/sys-apps/mount-gtk/mount-gtk-1.4.2.ebuild
new file mode 100644
index 000000000000..1746bf782587
--- /dev/null
+++ b/sys-apps/mount-gtk/mount-gtk-1.4.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="GTK+ based UDisks2 frontend"
+HOMEPAGE="http://mount-gtk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.28
+ sys-fs/udisks:2
+ x11-libs/c++-gtk-utils:0
+ x11-libs/libX11
+ x11-libs/libnotify:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS BUGS ChangeLog )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-c++11.patch
+ sed -i -e 's:AC_CONFIG_HEADER:&S:' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ # acinclude.m4 is broken and environment flags override these:
+ append-cxxflags -fexceptions -frtti -fsigned-char -fno-check-new -pthread
+ econf --docdir=/usr/share/doc/${PF}
+}
diff --git a/sys-apps/mouseemu/Manifest b/sys-apps/mouseemu/Manifest
new file mode 100644
index 000000000000..a82128b1ffe9
--- /dev/null
+++ b/sys-apps/mouseemu/Manifest
@@ -0,0 +1,11 @@
+AUX mouseemu-0.12-fix.diff 1715 SHA256 8b1f4b14de46f5189f84dfd319d4d827faa38feaa42df68ff5d53c0c5c260ff7 SHA512 98963e74636d83621b17281ef539102718c8ffc087dd0864b524fcaf6e2d0b6c58fbc84abb9959402fc67cf51e97e2f8d3beeb71b7360da4faff73d5e4250f01 WHIRLPOOL e9f3923fada4c447e58b28361c44eb18536a2af96c6101225a5fba6e3adb1c4189e40578472f30f39eab8ce50013eaf013fcb689f644ba00c905cd2e5b4a7a1a
+AUX mouseemu-0.13-fix.patch 707 SHA256 eb67274a5fe0e8f14a2dfe0003ae8e7725a8e141ab051f1d79b4cacef3da4b96 SHA512 dfcd90a8e300d98e85ccb16455989a2a8e31f9b782887834e5ab3491391f0a681571f438e808860e095639e95fef4fbfc7f8d1c0edccd4b7b5d9bc915facfc87 WHIRLPOOL 5a9ea30279a0f81ced83f9a0ffd8d16e6f95ede0d8c431be65dec87f12f0c686fc7c16db389432c8b4e755339ec5df307d5a9a95ab9a2e0f2425c52f0c149e92
+AUX mouseemu-0.15-build.patch 191 SHA256 83d0ac3b50582084ba45468786bffe8785dcfa7f8738acddcd1e6030df61a507 SHA512 e0c55d7b77b18bfadd0b060d9fb6dd534e0fdf3cbcf5768262d8bdb8c26c0beb976c2c000bdf6cb9b26781dfb0e3dd5bb99cd005e34e49cfb0147ab4b19800e9 WHIRLPOOL 42e0a32919257837eb4bcb4de9a9043e2afd863079fe9ab244f86bd2b8ea579ff23d1c6e1bd1e7d3268c4e936e35dffdad8a47a33170574a87c16c80df1ea56b
+AUX mouseemu-0.15-openrc.patch 228 SHA256 c05b6be36c08770b3e31a3c4e6b8a3e9a6674654ba20f03247fd6b6e8bb299f4 SHA512 e26a9749c777852eb1a0feb5c15f6ed64635f40264e6065b4e9a7fb450db53357132e08b522724ae63735720d24fe92431f9a31d9b5ae2023783fc45f882269a WHIRLPOOL afea004eb2ec490d1019d07896f99cbc349796d6bc400598fa05733312aff43807a5606d7c4b825e9ae0577c3f83d9641a250aaa5419c3ab7bff049b9b63b3f1
+DIST mouseemu-0.15.tar.gz 13958 SHA256 bbef220a814931f8ee482c82dfd63ad0a8ec895fc7df7bac1a1ada880d59af59 SHA512 7a6cbb0526a9ca51632d589bf873adb182c02f4a666cf9e94cedba9499d6c6cc1ad2ac7e5a482d22949e64ad69f04f444cb0fa78ea728c5653989d150f62918b WHIRLPOOL 7f6df70683c8d017c9e1ad8f9963252016a869e097240f14ab35a83f74dc0ffdd33bfae0abab9651a4f877aad510fdc4dd7aad154727d5cbeaf7d572a0752afc
+DIST mouseemu.tar.gz 12019 SHA256 67d5015d2859a58794208278178eabb7b189cb9da106628085c75c7a50f7ee9c SHA512 192cb502d93ff6347082769444205597ef18f62b901033a9987f70c80b0f59fa0de2d79dc73ae2b04a90321842035549ff0d9c2f45284a2dc8324a944e85f514 WHIRLPOOL 21776bbb8604dfee3577059f6fdbe98ed492673d5e2fa0cb12efd52bcd4b471f4ea994ac25863324544a7206925ef8e3117850c1057ff5346c8e3727c0ef4228
+EBUILD mouseemu-0.12.ebuild 925 SHA256 45119abef0e6e0e57077b44a922703676ba7d4219a844fe3467a93bd04ffebc3 SHA512 b528fe4cd4b3a0592e67c6da8bb83fd803b0f0f555e12cbf3f4543118c73b61e8417b607a20bddc54540b4fac7e1cbe3c04c74304a62f236fd9288220a2081d3 WHIRLPOOL bd2930823a79f817e0e8b4776b86d44061dbc9ccca2cfcc5e5b23859531665b05b31d417472d19388108e1bd3a2ab34696a1b85e0bfb72ab783a951a0bd16aaa
+EBUILD mouseemu-0.15.ebuild 1010 SHA256 01dfcc04bd4bc6178ba10cd69d20d434d56ba44ad19cc5d2c7fece94ff22b8dd SHA512 dd4a627c303a281a43435829af6d6e60f61c04b4e53d76154c5b963f6cac0e8c42d44ba90130d7c397105ba50480d68d7887c1856f211d78b838f1c6bffe526e WHIRLPOOL 2a034d26aeaccfbc78b64c830295e4d52151eb1eba7fcf4116fc5cab997744ce45259131877186e43393fa062c2fb16f50110b758bbc935d39833d70533f1532
+MISC ChangeLog 2581 SHA256 9807789d3fa912329b3493ff9b6baa00b9f209c2f78208e75771ad344f4f63d3 SHA512 e07a2b8210d6ba87d7aa93315195f73bebef1804dfe738f8b6f7e779b049746a04f74fce3808b8986eb75f57ec30958c7bb5d12c6aeb89652ce947d086ab5f38 WHIRLPOOL bba2ed89fe3ced23b527d2961e30f5cf12b9d3f9914cb4e4dcf976fae0a981762857e41250b7e10da40c9e692a3d56d0afd3d291a4dc0399f24a09ef98af1e42
+MISC ChangeLog-2015 1444 SHA256 0de3cf61af0f1df0f07204c57b073c9d9d83740d9283d38f424d1c0d5824fbcd SHA512 783746866ffd117fa498be4be2dc4d1cb1fb04791af19c5b26a3f54bc3da82a08232a02ab6a20eb5eebcd592b279c2d0fcb76866ecd8f46db7996a8f63ed4ead WHIRLPOOL 4bbd9577563f06802cfe68fbfa3d57f455cea99f091802121c514d99f6550e0c512943f3ee2ba785b282ca2506c1b4f21bd1d3fa080941fe8a05652337f369b9
+MISC metadata.xml 259 SHA256 e7ac6b67c4c89040a00b23bda7a3b2fd4ac8affc1055daf3015ccc8580640f6f SHA512 ca71b1781806d20022c238e5b5d10f9154c78e0fa51f2603de34c48ecbe4cbc2c3190cf046526840546743644c691ee7fe51e31a4617b01bb7602dde803c1538 WHIRLPOOL 2a2aa19a448eca4dea84d129fd194a7ee4d77bdc1b5120abd3b667ce156cdeeb4616a7c7cd23fbccb7ba08e6e166aaba0fac63a6afa208d826acee37b0e560fe
diff --git a/sys-apps/mouseemu/files/mouseemu-0.12-fix.diff b/sys-apps/mouseemu/files/mouseemu-0.12-fix.diff
new file mode 100644
index 000000000000..993f7633e127
--- /dev/null
+++ b/sys-apps/mouseemu/files/mouseemu-0.12-fix.diff
@@ -0,0 +1,48 @@
+--- mouseemu-0.12.orig/Makefile
++++ mouseemu-0.12/Makefile
+@@ -1,6 +1,6 @@
+ all:
+- gcc -Wall -I/usr/src/linux/include -g -o mouseemu mouseemu.c
++ gcc -Wall -g -o mouseemu mouseemu.c
+ clean:
+ rm -f *.o core* mouseemu
+ install:
+- cp -f mouseemu /usr/sbin/
++ cp -f mouseemu $(DESTDIR)/usr/sbin/
+--- mouseemu-0.12.orig/mouseemu.conf
++++ mouseemu-0.12/mouseemu.conf
+@@ -0,0 +1,10 @@
++# Mouseemu Configuration File
++# Each uncommented line is read by the mouseemu initscript
++# (/etc/init.d/mouseemu). If you use mouseemu without the
++# initscript, source this file in your .bashrc/.cshrc/.zshrc
++# Keycodes can be found using the "showkey" program.
++
++#MID_CLICK="-middle 0 68" # F10 with no modifier
++#RIGHT_CLICK="-right 0 87" # F11 with no modifier
++#SCROLL="-scroll 56" # Alt key
++#TYPING_BLOCK="-typing-block 300" # block mouse for 300ms after a keypress
+--- mouseemu-0.12.orig/mouseemu.c
++++ mouseemu-0.12/mouseemu.c
+@@ -428,7 +428,7 @@
+ "\t[-nofork]\n",
+ argv[0]);
+ printf("Key codes can be found in "
+- "/usr/src/linux/include/linux.h,\n"
++ "/usr/src/linux/include/linux/input.h,\n"
+ "or by using `showkey` in console.\n"
+ "Use decimal values. BTN_LEFT(272) is usable as "
+ "B2_KEY or B3_KEY.\n\n");
+--- mouseemu-0.12.orig/mouseemu.init.gentoo.old
++++ mouseemu-0.12/mouseemu.init.gentoo
+@@ -13,6 +13,10 @@
+
+ start() {
+ ebegin "Starting mouseemu"
++ # Source configuration file /etc/mouseemu.conf
++ if [ -f /etc/mouseemu.conf ] ; then
++ . /etc/mouseemu.conf
++ fi
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/mouseemu -- \
+ $MID_CLICK $RIGHT_CLICK $SCROLL $TYPING_BLOCK > /var/log/mouseemu.log
diff --git a/sys-apps/mouseemu/files/mouseemu-0.13-fix.patch b/sys-apps/mouseemu/files/mouseemu-0.13-fix.patch
new file mode 100644
index 000000000000..f4d0aa981762
--- /dev/null
+++ b/sys-apps/mouseemu/files/mouseemu-0.13-fix.patch
@@ -0,0 +1,14 @@
+diff -Naur ../mouseemu.orig/mouseemu.conf ./mouseemu.conf
+--- ../mouseemu.orig/mouseemu.conf 1970-01-01 01:00:00.000000000 +0100
++++ ./mouseemu.conf 2005-02-14 09:10:30.236462888 +0100
+@@ -0,0 +1,10 @@
++# Mouseemu Configuration File
++# Each uncommented line is read by the mouseemu initscript
++# (/etc/init.d/mouseemu). If you use mouseemu without the
++# initscript, source this file in your .bashrc/.cshrc/.zshrc
++# Keycodes can be found using the "showkey" program.
++
++#MID_CLICK="-middle 0 68" # F10 with no modifier
++#RIGHT_CLICK="-right 0 87" # F11 with no modifier
++#SCROLL="-scroll 56" # Alt key
++#TYPING_BLOCK="-typing-block 300" # block mouse for 300ms after a keypress
diff --git a/sys-apps/mouseemu/files/mouseemu-0.15-build.patch b/sys-apps/mouseemu/files/mouseemu-0.15-build.patch
new file mode 100644
index 000000000000..ad4deae7bf22
--- /dev/null
+++ b/sys-apps/mouseemu/files/mouseemu-0.15-build.patch
@@ -0,0 +1,9 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ all:
+- gcc -Wall -g -o mouseemu mouseemu.c
++ gcc -Wall $(CFLAGS) $(LDFLAGS) -o mouseemu mouseemu.c
+ clean:
+ rm -f *.o core* mouseemu
+ install:
diff --git a/sys-apps/mouseemu/files/mouseemu-0.15-openrc.patch b/sys-apps/mouseemu/files/mouseemu-0.15-openrc.patch
new file mode 100644
index 000000000000..fdd7e4578633
--- /dev/null
+++ b/sys-apps/mouseemu/files/mouseemu-0.15-openrc.patch
@@ -0,0 +1,8 @@
+--- a/mouseemu.init.gentoo
++++ b/mouseemu.init.gentoo
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2004 Gentoo Technologies, Inc.
+ # Distributed under the terms of the GNU General Public License v2
+
diff --git a/sys-apps/mouseemu/metadata.xml b/sys-apps/mouseemu/metadata.xml
new file mode 100644
index 000000000000..5eb05198076b
--- /dev/null
+++ b/sys-apps/mouseemu/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/mouseemu/mouseemu-0.12.ebuild b/sys-apps/mouseemu/mouseemu-0.12.ebuild
new file mode 100644
index 000000000000..2b972aee53f3
--- /dev/null
+++ b/sys-apps/mouseemu/mouseemu-0.12.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Emulates scrollwheel, right- & left-click for one-button mice/touchpads"
+HOMEPAGE="http://geekounet.org/powerbook/"
+SRC_URI="http://geekounet.org/powerbook/files/${PN}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ppc"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${PN}
+PATCHES=( "${FILESDIR}"/${P}-fix.diff )
+
+src_install() {
+ dosbin mouseemu
+ einstalldocs
+
+ newinitd mouseemu.init.gentoo mouseemu
+ insinto /etc
+ doins mouseemu.conf
+}
+
+pkg_postinst() {
+ einfo "For mouseemu to work you need uinput support in your kernel:"
+ einfo " CONFIG_INPUT_UINPUT=y"
+ einfo "(Device Drivers->Input device support->Misc->User level driver support)"
+ einfo "Don't forget to add mouseemu to your default runlevel:"
+ einfo " rc-update add mouseemu default"
+ einfo "Configuration is in /etc/mouseemu.conf."
+}
diff --git a/sys-apps/mouseemu/mouseemu-0.15.ebuild b/sys-apps/mouseemu/mouseemu-0.15.ebuild
new file mode 100644
index 000000000000..2770a2215251
--- /dev/null
+++ b/sys-apps/mouseemu/mouseemu-0.15.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Emulates scrollwheel, right- & left-click for one-button mice/touchpads"
+HOMEPAGE="http://geekounet.org/powerbook/"
+SRC_URI="http://geekounet.org/powerbook/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~ppc"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${PN}
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.13-fix.patch
+ "${FILESDIR}"/${PN}-0.15-build.patch
+ "${FILESDIR}"/${PN}-0.15-openrc.patch
+)
+
+src_install() {
+ dosbin mouseemu
+ einstalldocs
+
+ newinitd mouseemu.init.gentoo mouseemu
+ insinto /etc
+ doins mouseemu.conf
+}
+
+pkg_postinst() {
+ einfo "For mouseemu to work you need uinput support in your kernel:"
+ einfo " CONFIG_INPUT_UINPUT=y"
+ einfo "(Device Drivers->Input device support->Misc->User level driver support)"
+ einfo "Don't forget to add mouseemu to your default runlevel:"
+ einfo " rc-update add mouseemu default"
+ einfo "Configuration is in /etc/mouseemu.conf."
+}
diff --git a/sys-apps/msr-tools/Manifest b/sys-apps/msr-tools/Manifest
new file mode 100644
index 000000000000..07e1c5e2477e
--- /dev/null
+++ b/sys-apps/msr-tools/Manifest
@@ -0,0 +1,5 @@
+DIST msr-tools-1.3.zip 7693 SHA256 f9457b5340f5f274da4239a461f0db6b514142b40461559d9c6150f05aab1d1e SHA512 9605eed0b6211d0ecbe48a14d66b5d61965770f249c5c1b15416d4f2e9a37a68ecfde171077c3acc74bb6b951749bcff186acbb4d6d8a3051695d2d97c0e332b WHIRLPOOL 94442d0ecf36e1c2b21e7658dbf02d9c0516a5e83e3998fd77e56f175e1190184106fad3327c79e895c7e84ba28c74dfcf8ba4d5c8356e9c2e82760b09e9b45a
+EBUILD msr-tools-1.3.ebuild 617 SHA256 ef2203d1954cf181993aede684a8cbd58024c668ec340bacf303ece9f32b9fd3 SHA512 03f27fe945f5d60c65c5fcf500b961acfca808ead9798ec2cb51e7e7482ed495adc443d2f6bbc615df2675362ef05ffca2589c9ce888e777abfabb395a785fb7 WHIRLPOOL cca92e107be5133feb32ee919c7bd335411b09d589819e99f978de42cbd1e4027379034e956a0efef635a80f87dcef3516e0ad9fd4cc74e6498fedf534907712
+MISC ChangeLog 2783 SHA256 24018d5ae0a97d289f15358d5f30de9a3ecf1ad1869d3d559630478f9b8bd984 SHA512 da2531d1c58dfe275ae128ded3e68cfba828b5d630c0a31c7a4fc997f9d0f0ca086c81980ca31bae5132a459e66a3ed35a5407bb6e5091968b9f94f36f4beb90 WHIRLPOOL 95748962a02d41845958a9aa00e4c801b5eb0df3d7848927c86108e7dd4e440f300c0b3d74ab8f12b481010a2a5f139a270a1e282253174171ff3b6af22ee968
+MISC ChangeLog-2015 507 SHA256 754a9bb813c85a151770370de0c094c26405757e7dd2569508397bccecf73cc6 SHA512 8961d7b0dd967e3cfd946de99107ff488a2c9a21c1889a7abccf250fae78e01814e989988eb0dfd7b1bf78a8844a11d7f8cbf1dec6ce46945dc2173c1261c6b6 WHIRLPOOL ba9bf7db425e5ad2cee6d675e85c147a1550b0710be3491ac3086994a7fd04bc23294311d93933b4d32194e392d1495411ba5300e767754bc000dc0e6e25fb66
+MISC metadata.xml 221 SHA256 c73636a70f6ee6e176f71ac32048a002355627ef4f1181fb245c6c0eb39be8b8 SHA512 e50d6cad26239ebf4260f0cf4bdf4e29ef2038e999039adf94f49b184b5993f02bb0d4cdb3de6c7b5cda99890db42dcd2b65c5342256be50dc19e6aab2406353 WHIRLPOOL 8e35f4dca402d63d64baae4aba21722f8daccb3a61861a0b453cb355305fb29dc8e9d1e1760eb2f13d264502aaaafc37d15258338e97dbb4aea15239944f25d6
diff --git a/sys-apps/msr-tools/metadata.xml b/sys-apps/msr-tools/metadata.xml
new file mode 100644
index 000000000000..69570e849328
--- /dev/null
+++ b/sys-apps/msr-tools/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 type="person">
+ <email>kensington@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/msr-tools/msr-tools-1.3.ebuild b/sys-apps/msr-tools/msr-tools-1.3.ebuild
new file mode 100644
index 000000000000..424b21ea6e63
--- /dev/null
+++ b/sys-apps/msr-tools/msr-tools-1.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CONFIG_CHECK="~X86_MSR"
+inherit eutils linux-info toolchain-funcs
+
+DESCRIPTION="Utilities allowing the read and write of CPU model-specific registers (MSR)"
+HOMEPAGE="https://01.org/msr-tools"
+SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.zip"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/${PN}-master
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dosbin rdmsr
+ dosbin wrmsr
+}
diff --git a/sys-apps/mtree/Manifest b/sys-apps/mtree/Manifest
new file mode 100644
index 000000000000..f4e992886c35
--- /dev/null
+++ b/sys-apps/mtree/Manifest
@@ -0,0 +1,7 @@
+DIST mtree-1.0.1.tar.gz 110979 SHA256 9f3283fc7b8b4961a611c8c66e1d873a4936fe0039998863ea9d116601a730c3 SHA512 47897a1763ba02d095d9d7179ffb513ca847c5e9bde27908a4ef94feced2d59baef6f95f8024cfce3c5f47e4f7b7ae64e283ce1589b2e3826fd14b13f88d4990 WHIRLPOOL 35c83ef93fed86b480b1be170c7b90d11f86a2b806270c559ccedbab2597706cb820dbd4e31dc053b3070bac9a73f09cbdc5549dd70f959ef9ccbcc7164b915d
+DIST mtree-1.0.3.tar.gz 32882 SHA256 bbbf2ae5f1f99119b3cb7f55f90015b0e06238cde2801c9990521109b2529eed SHA512 aea1d53ff114446d8e7dca20388f2184e6284f69021079eca4edce22f067b8218aafeabf6d08503fd197de3e4f271af8cb8dc310d87696c03360d42de4cac85a WHIRLPOOL e6af4d35479e906b7ae97922bcc2d33bf283d1afbd2a691c64e42c2f2b34189d8e9e784cf8b90a107259468ca16f2e2c36e4a9b907a670a060308c6b4c2f746c
+EBUILD mtree-1.0.1.ebuild 572 SHA256 3183381a01436018a4d9415708a7eaa041eae39c55f69b1d0808b37e1ca8029a SHA512 2d8c8e9e769c14e7841ac275ed5dcd0519827cfe77c2f2b2ac791b615d751776b6b04ba99d28918b20f42f5161ffbfaaf1eee89ec69e51d045818209962e3412 WHIRLPOOL 9225a412cdd59a56c0430bd92d32552e7e0b89cfcf987e09c90a95481587bfe0d86efe7cc956c94fd2253c29768117e1d835413badb92d49ace1d5b17d2523db
+EBUILD mtree-1.0.3.ebuild 643 SHA256 802abfaf2dadd84008034447e5c47e8912cd3d41e20f004f08352862159e84cf SHA512 ba5a7e4ef18108655bbdf7dc82b4332c6f9053f24843262ce31b20944e10b65c4a4c8359674fb4c8373d8f1926f543043d73d848d0e96e262b070870bfb75cf9 WHIRLPOOL 0d687171e7c377f481f4ac4739f8a16cc4202df9ccbaadb9a58c87b7b391fea28374d17b0367b2e315f543dc0691239cdc28e66c822b095ce21d76d16fc04c28
+MISC ChangeLog 3717 SHA256 70b6c0dc314c8300b5b89c1db3c588d1d3fe534cc89c3b1c198ada1eceb71dc9 SHA512 e26563a9b2f3ee795ba3733e4a0ab7e5d1d285b27228693fddf5b45b5c0e78fd3d71422e6bc1691a34e8052a8c3437e290c1dec472dbf4db831f1fdb4e17e905 WHIRLPOOL 3381073e1b8ac44d84f63819806ad1d31e127f48dd0765f2f5f59edb29656059e2d5904623a1b3cfb3155b61a9c207817da7920fd3318846e8eb7198b61d9a64
+MISC ChangeLog-2015 2036 SHA256 847395b712cf6de24daa4411d432eaa2c8a8a5dcfb58d70a18c921c3d29faa1d SHA512 587fad6fb22c8178251d6ffa377a12f1c3fa75e7a85e48be99f4554740f25f565937df19af9a0bd837d89e992e0881f2e1423ee57c3248e0c055610826826f17 WHIRLPOOL e7202ad18ddbe638cae49d3461a30f0d50fd05aa425c09f8b094ef8ac7a180c254e933f5e97cb9d3298b476095269b2d21dc932754031169edfd8811be8dad55
+MISC metadata.xml 337 SHA256 dd39460efbc5b172250222579bcb95e57f716600e2535354cd0cb09c63520101 SHA512 c55add92235705c893b62cfcfc0c56e40bb1720c0140a87274836a0e6a8a1958511170fbb1ed7335d074b0753b59bf797f3302c3bd8ad2333872adf95dee28b4 WHIRLPOOL c3bc8c04a40bfbbae4d49550a2f1be4eb9fc2b199bf52b582efb75a4162f3e6596372f6459850de36bf704b936c1502f62a2c9dca6dea89ed29480a52ea3bd4f
diff --git a/sys-apps/mtree/metadata.xml b/sys-apps/mtree/metadata.xml
new file mode 100644
index 000000000000..af4f34ce6e03
--- /dev/null
+++ b/sys-apps/mtree/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="github">archiecobbs/mtree-port</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/mtree/mtree-1.0.1.ebuild b/sys-apps/mtree/mtree-1.0.1.ebuild
new file mode 100644
index 000000000000..732721f0658a
--- /dev/null
+++ b/sys-apps/mtree/mtree-1.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="Directory hierarchy mapping tool from FreeBSD"
+HOMEPAGE="https://github.com/archiecobbs/mtree-port"
+SRC_URI="https://mtree-port.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ # don't install unneeded docs
+ sed -i '/doc_DATA=/d' Makefile.am || die
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ # avoid conflict with app-arch/libarchive
+ rm "${ED}usr/share/man/man5/mtree.5"
+}
diff --git a/sys-apps/mtree/mtree-1.0.3.ebuild b/sys-apps/mtree/mtree-1.0.3.ebuild
new file mode 100644
index 000000000000..151c42b2c734
--- /dev/null
+++ b/sys-apps/mtree/mtree-1.0.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Directory hierarchy mapping tool from FreeBSD"
+HOMEPAGE="https://github.com/archiecobbs/mtree-port"
+SRC_URI="https://github.com/archiecobbs/mtree-port/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${PN}-port-${PV}"
+
+src_prepare() {
+ default
+ # don't install unneeded docs
+ sed -i '/doc_DATA=/d' Makefile.am || die
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ # avoid conflict with app-arch/libarchive
+ rm "${ED%/}/usr/share/man/man5/mtree.5"
+}
diff --git a/sys-apps/nawk/Manifest b/sys-apps/nawk/Manifest
new file mode 100644
index 000000000000..bb963023bb6d
--- /dev/null
+++ b/sys-apps/nawk/Manifest
@@ -0,0 +1,7 @@
+AUX nawk-20121220-parallel-build.patch 1653 SHA256 27c6cffff736536c4593a537b5b50a6ddefe6c45fc5366fbe435b1d3cb19e145 SHA512 91201e4e09646726c10fb2d54b9418e4d1d410bfd0769613c766bacc1fda830d072ef14db15eddd7d3835d6e11fe48b2aa8e797e941649c0e114ee5c89b4e060 WHIRLPOOL 5441907a983ea2f99f131d34abb95959eb4095ed9e87e709ffe267075b7c332e3430eb16ad19492814f43b7c037701b3918651694a25b02f5c5d0f6c9f2b1aaf
+DIST nawk-20121220.tar.gz 88970 SHA256 8dc092165c5a4e1449f964286483d06d0dbfba4b0bd003cb5dab30de8f6d9b83 SHA512 1dd62e1aa4c8cfad7ce599b10d88e9b450ecae3217cf8327cc0f3ce77d0d0dcb731101b8f211066462d46dc4ef23e20ccd7f70d799d7d48940026abe8fa79d4f WHIRLPOOL 6d8effe600eaf49c9bce79b027732909992f606ba89e771ad041f5ef3b32a44e7b0fa41576fdeb3e220f1e4859e2701397946fa90cb0ee4a334eb0178fabee91
+EBUILD nawk-20121220-r2.ebuild 1046 SHA256 22ba07d4140192de6434507ec92fe2312d45e68ddc6acc720ea084ac42d874ac SHA512 68cdf046ac342d5f6f890d13b3725128d468880d4a5ea9cd984913e1806c409bf46d1c76c1c6fede254a33ad41d8df0025e002bf35390001f433ec0f95678d98 WHIRLPOOL fc8a6cd7d0890912324daef194ea08c00bcc0ac76e58798bd74ac0a23773c610ecf9a77e2c7575df06be94e3cf060af94f43f55ec0328c0dde317fe3b12b9f80
+EBUILD nawk-20121220-r3.ebuild 1100 SHA256 3ed8fc93bb23db59c5b71c19b17dabc065ff6cf9a44e1e3e05f11d2f49bd0748 SHA512 f8698df498f9ec6d7f9f6b0e22fcc4f2505223a2c2d9ab875e6b9f95199f467d36b59283a8e67de5405cc555efd4b0993d50a58955cdef1c026a5dccdd5ab2b9 WHIRLPOOL 59a030e99864d59261316f7a6d1107d4eb38308e89e2022a03adab00b672636901da0734ac6d6c69e07981c92ce29de9eb4f594c698d02bb757c29ae998c4bb9
+MISC ChangeLog 3097 SHA256 d7939b9ce06133058d5208fd79c77ef64e6b1f3779e73e262f075f4b8d721169 SHA512 4558562da37e82337a0d8496b0f43394c45f0ffd40d22605b7f5fa469a9e4eaf4eca4f004505e427983320f1296cda06fd52876cf7c971a75478b9932cba82c1 WHIRLPOOL da7236fa49c7119a1076d5a9c58bccf47e661bafac3cf1c7bad21f8bc2ccaf3ddcdd83c4b2a8c95d11ca830a58b2cc0e42120fa04dd2c93b6d57abdf31962291
+MISC ChangeLog-2015 2057 SHA256 2bb1c9ab65565e03d29aae31cdaf86abac882bfe0cae4aade13e2c8acb0a258d SHA512 2f75fa2c155e213e8ff0cc40bf97eaaa34ff22be3bcc5080514f77fd4f283f1e7ddc06227cf4bb38aa53b6c36eb9dcb150463bad858a8dfff4743467a11045e1 WHIRLPOOL d5c39c837e19fab81c1f60f02ad93ff385a672781f56108f5231c104805d31d573f0c912454abe301f8deeb38599b8be86b9492d99584369f78cfa297462ef0e
+MISC metadata.xml 330 SHA256 48c8b1f407773726f7c02c60978e17aa2c2f3ae21aaaf4dfe2e76f5c6947f748 SHA512 621c5fa8dc89857de39705622efcee6f0487e404de19424d0aaeec5b393a01176585139f98c2587d9169564c73585a339c86af21a41c2ab5ec084adee47d1ff3 WHIRLPOOL 12df1e68c3b125a9997cf07911bc267b0ddcf9302118efb39fe540188d974c89c0e8d46d2b7f38cc185cfc0c6dce97b9eadae5e3d5292a6cb39da7d23b188647
diff --git a/sys-apps/nawk/files/nawk-20121220-parallel-build.patch b/sys-apps/nawk/files/nawk-20121220-parallel-build.patch
new file mode 100644
index 000000000000..ee6421c665ad
--- /dev/null
+++ b/sys-apps/nawk/files/nawk-20121220-parallel-build.patch
@@ -0,0 +1,61 @@
+--- a/makefile 2013-02-06 10:26:36.452829647 -0700
++++ b/makefile 2013-02-07 09:12:13.293898947 -0700
+@@ -44,7 +44,7 @@
+ LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
+ lib.c run.c tran.c
+
+-SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile \
++SHIP = README FIXES $(SOURCE) makefile \
+ awk.1
+
+ a.out: ytab.o $(OFILES)
+@@ -52,11 +52,15 @@
+
+ $(OFILES): awk.h ytab.h proto.h
+
+-ytab.o: awk.h proto.h awkgram.y
++#Clear dependency for parallel build: (make -j)
++#YACC generated y.tab.c and y.tab.h at the same time
++#this needs to be a static pattern rules otherwise multiple target
++#are mapped onto multiple executions of yacc, which overwrite
++#each others outputs.
++y%.c y%.h: awk.h proto.h awkgram.y
+ $(YACC) $(YFLAGS) awkgram.y
+- mv y.tab.c ytab.c
+- mv y.tab.h ytab.h
+- $(CC) $(CFLAGS) -c ytab.c
++ mv y.$*.c y$*.c
++ mv y.$*.h y$*.h
+
+ proctab.c: maketab
+ ./maketab >proctab.c
+@@ -64,23 +68,23 @@
+ maketab: ytab.h maketab.c
+ $(CC) $(CFLAGS) maketab.c -o maketab
+
+-bundle:
++bundle: $(SHIP)
+ @cp ytab.h ytabh.bak
+ @cp ytab.c ytabc.bak
+- @bundle $(SHIP)
++ @bundle $(SHIP) ytabh.bak ytabc.bak
+
+-tar:
++tar: $(SHIP)
+ @cp ytab.h ytabh.bak
+ @cp ytab.c ytabc.bak
+ @bundle $(SHIP) >awk.shar
+- @tar cf awk.tar $(SHIP)
++ @tar cf awk.tar $(SHIP) ytabh.bak ytabc.bak
+ gzip awk.tar
+ ls -l awk.tar.gz
+- @zip awk.zip $(SHIP)
++ @zip awk.zip $(SHIP) ytabh.bak ytabc.bak
+ ls -l awk.zip
+
+ names:
+ @echo $(LISTING)
+
+ clean:
+- rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c
++ rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda ytab.c ytab.h # proctab.c
diff --git a/sys-apps/nawk/metadata.xml b/sys-apps/nawk/metadata.xml
new file mode 100644
index 000000000000..b919229edbc5
--- /dev/null
+++ b/sys-apps/nawk/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 type="person">
+ <email>junghans@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/nawk/nawk-20121220-r2.ebuild b/sys-apps/nawk/nawk-20121220-r2.ebuild
new file mode 100644
index 000000000000..fe1d7f62e133
--- /dev/null
+++ b/sys-apps/nawk/nawk-20121220-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Brian Kernighan's pattern scanning and processing language"
+HOMEPAGE="http://cm.bell-labs.com/cm/cs/awkbook/index.html"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-macos"
+IUSE=""
+
+RDEPEND="app-eselect/eselect-awk
+ !sys-freebsd/freebsd-ubin"
+DEPEND="${RDEPEND}
+ virtual/yacc"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ rm -f ytab.[hc]
+ epatch "${FILESDIR}/${P}"-parallel-build.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" CPPFLAGS=-DHAS_ISBLANK ALLOC="${LDFLAGS}" YACC=$(type -p yacc) YFLAGS="-d"
+}
+
+src_install() {
+ newbin a.out "${PN}"
+ sed -e 's/awk/nawk/g' \
+ -e 's/AWK/NAWK/g' \
+ -e 's/Awk/Nawk/g' \
+ awk.1 > "${PN}".1 || die "manpage patch failed"
+ doman "${PN}".1
+ dodoc README FIXES
+}
+
+pkg_postinst() {
+ eselect awk update ifunset
+}
+
+pkg_postrm() {
+ eselect awk update ifunset
+}
diff --git a/sys-apps/nawk/nawk-20121220-r3.ebuild b/sys-apps/nawk/nawk-20121220-r3.ebuild
new file mode 100644
index 000000000000..a52e72d09b28
--- /dev/null
+++ b/sys-apps/nawk/nawk-20121220-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Brian Kernighan's pattern scanning and processing language"
+HOMEPAGE="http://cm.bell-labs.com/cm/cs/awkbook/index.html"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-macos"
+
+RDEPEND="
+ app-eselect/eselect-awk
+ !sys-freebsd/freebsd-ubin"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/yacc"
+
+S="${WORKDIR}"
+
+PATCHES=( "${FILESDIR}/${P}"-parallel-build.patch )
+
+DOCS=( README FIXES )
+
+src_prepare() {
+ default
+ rm -v ytab.[hc] || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS=-DHAS_ISBLANK \
+ ALLOC="${LDFLAGS}" \
+ YACC=$(type -p yacc) \
+ YFLAGS="-d"
+}
+
+src_install() {
+ newbin a.out "${PN}"
+ sed \
+ -e 's/awk/nawk/g' \
+ -e 's/AWK/NAWK/g' \
+ -e 's/Awk/Nawk/g' \
+ awk.1 > "${PN}".1 || die "manpage patch failed"
+ doman "${PN}.1"
+ einstalldocs
+}
+
+pkg_postinst() {
+ eselect awk update ifunset
+}
+
+pkg_postrm() {
+ eselect awk update ifunset
+}
diff --git a/sys-apps/nca/Manifest b/sys-apps/nca/Manifest
new file mode 100644
index 000000000000..7d33f42cda53
--- /dev/null
+++ b/sys-apps/nca/Manifest
@@ -0,0 +1,6 @@
+AUX ncad.initd 348 SHA256 41552fd3cc69b23e716a2981a43a7bec0eeaff39c24ddd3a02e9f417eb05dcf0 SHA512 f70d471606d0eb8c7327c0c7693047d8e21d1273a36d14d764f74afb359cb39c559ebc7f5c6f62c717f061f77ccf2c0f3d53a6b961f316552c6c6071cdb47297 WHIRLPOOL 8fc4eeabeda0205227fcb82d9f19b34fb19b2fb49e539380e33fa4f6d0a5d68ed630b3b9d4727a64e26216a4ee1488a1b4f4a3611e82b900935850b8914a7e4e
+DIST nca-0.9.0.tar.gz 818721 SHA256 407144394f6f90e818c7ce992a691c4e99983defbe9de63f6a0adaa93a36ae03 SHA512 375dc747414af7e8971a9112fa6a4583dd543f6f4b3a84b2c16f45ee2487363929c2eed3c1837687b802161c630443885e6da20ac738017d219e9a608b4d700c WHIRLPOOL 60c726e918e3684fe9dc45eacbfb2aa264f7ea1fd71e46eacc2020252e5cf6b333345c000eb8efafba65965fe184ff1ad4cbc87886a623831476f18c052953d9
+EBUILD nca-0.9.0-r1.ebuild 955 SHA256 93a4b16a76af5a09bb41beab3af7f8a6ffe32275d931c850e4da4bc3fdb7c30f SHA512 92a0fca038ee1349599fe134a25511f108a47ace206a375fda0040412ba3b012406fb217d80fad42c8b4801c167beee6f2bfe06767223dac9ad015cbba9e350c WHIRLPOOL 173ae81b447784ca8c64c88bdde5a5407bf1a2623a45c65ef3b3e1789a48ceec383600ec45d45d812470878b08eebdbbeb223e23bf1f2365f51e1c32d6ec19c1
+MISC ChangeLog 2918 SHA256 b807f717771d53f2025fb9e28974fdb3486a1823a83a1121392adb0d054421d0 SHA512 51c2052149c47fcfcef4e534e67fac10b5949a91ead4e2c32b6907974cc5204d28d275380334cf9899e82f751ce29bf30f763a48243b88bc612443b0e8d648fe WHIRLPOOL 9b983af3552dc8b7fac6f7f5620cf4f45b83cf254f1b77d2d329ee4074351775d27f588aed458474c07a08b3a58b81c77f3553d250b2e5673474c6b5bdcce619
+MISC ChangeLog-2015 663 SHA256 5663c44f03f319521b2cc0f1912bf8408ed1f4e69c47ab7baf1ba6d93e8a5788 SHA512 0a54b20d3ca12bd7b159d481855751a8e65ba452793380e01ce72b22d32f44dcfb2087628c12eb4dfa02df7311a44da909f740549bb118bffbaf59231a65a2d6 WHIRLPOOL 085d69d9755e08a48fb7be039f6be5ca7e041363b03f636c2b0bfa0e1afb1a55859dee17de84f7957ec18a29bf8033610695b37ac648ec079be008028610144e
+MISC metadata.xml 699 SHA256 b0cb9e812244c6c96d5f0a018ec7613a50b2353d9ab93e8ce13ee54f00523898 SHA512 b852fdd4b6bb507c118af56a1e3880ae17843e74b172b2a33d637c46d3451450c27f55205b3b3f8d9ff67b831efbb89e2df3480d0af783881def31df1a8ca6e1 WHIRLPOOL c51c30269b9bfc2602ba7bfd3764dc4bf65c5578bb321830e18535fb33bd8be513e4d486c42d345323659ff340835e2356e1bdcc5105bddd44d3cc52bbe2cfc1
diff --git a/sys-apps/nca/files/ncad.initd b/sys-apps/nca/files/ncad.initd
new file mode 100644
index 000000000000..fa2adcd9b3ec
--- /dev/null
+++ b/sys-apps/nca/files/ncad.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /sbin/ncad
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --retry 5 --quiet --exec /sbin/ncad
+ eend ${?}
+}
diff --git a/sys-apps/nca/metadata.xml b/sys-apps/nca/metadata.xml
new file mode 100644
index 000000000000..f60fb571575b
--- /dev/null
+++ b/sys-apps/nca/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-needed -->
+ <longdescription lang="en">
+ nca connects a pseudo terminal to the console's virtual terminals
+ (/dev/tty0...n) that are normally only accessible to someone with
+ local keyboard access. It is particularly useful in conjunction with
+ ncad since it then provides remote console access via SSH; with some
+ appropriate system start up scripts, ncad can be started immediately
+ the root filesystem has been mounted read-only, providing a cheap,
+ and only marginally inferior alternative to a serial console.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/nca/nca-0.9.0-r1.ebuild b/sys-apps/nca/nca-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..1207d405ec81
--- /dev/null
+++ b/sys-apps/nca/nca-0.9.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Network Console on Acid"
+HOMEPAGE="http://www.xenoclast.org/nca/"
+SRC_URI="http://www.xenoclast.org/nca/download/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ sys-libs/zlib"
+
+DEPEND="dev-lang/perl
+ ${RDEPEND}"
+
+src_prepare() {
+ sed -i -e "s:^\([[:space:]]\+\$(MAKE) install\):\1 DESTDIR=\$(DESTDIR):g" \
+ -e "s:=\(\$(CFLAGS)\):=\"\1\":g" -e "s:=\(\$(CC)\):=\"\1\":g" Makefile
+
+ sed -i -e "s:-s sshd:sshd:g" ncad.patch
+
+ eapply_user
+}
+
+src_compile() {
+ emake -j1 CFLAGS="${CFLAGS}" CC=$(tc-getCC)
+}
+
+src_install() {
+ dodir /sbin
+ emake BINDIR="${D}sbin" MANDIR="${D}usr/share/man" SYSCONF_DIR="${D}etc" \
+ DESTDIR="${D}" install_nca install_ssh install_man
+
+ newinitd "${FILESDIR}/ncad.initd" ncad
+ dodoc ChangeLog README* rc/ncad.template
+}
diff --git a/sys-apps/net-tools/Manifest b/sys-apps/net-tools/Manifest
new file mode 100644
index 000000000000..7e155cd23dfe
--- /dev/null
+++ b/sys-apps/net-tools/Manifest
@@ -0,0 +1,9 @@
+AUX net-tools-1.60_p20161110235919-fix-building-w-older-linux-headers.patch 968 SHA256 5f9c5bec23e5a24d1dc6262a3e774a51044a83bd4d87ecf4aa7e3546c6cbdc4e SHA512 e732e809a4a17e3535c9ef009519808d5d1a6a792c1249e5cbaedc2aebc0245a16f4cdbc351c6ceaca676e942d909de548b036b8c59a62a68c277093aaa09445 WHIRLPOOL b7bc9cc78503c326a8be1d0276636e4df5e498ee01c5d23f7e25b02f68f122d2a38bb56cd811e7478eecc1598485ee0685ee01cbc82cef09df77e84a227fc1d5
+DIST net-tools-1.60_p20160215155418.tar.xz 227284 SHA256 9c9aee20e3b09213ab0b27c62329fafcb25e156143fc3999c16e8dcee72304b2 SHA512 3fac6e00f061daf5c9ed1c8038d14635333a6149b09ad1493db35e4f931095915ad47468c42cc10299a4df1b5c946d6609a92a00c326a50a4da166670f6608e4 WHIRLPOOL b04de5acd5cb17177d105168d8dd5d4e1cbb108d946bd656b162b11081098b9254993883088df851c3f2fc4eab2dbc18892cff96f20f1e2748663ab6f17ffac0
+DIST net-tools-1.60_p20161110235919.tar.xz 227552 SHA256 d9b52abb6bbf3305fde1fe414059602371a7819b214206312f6b16a2fde46fcd SHA512 06c2900305a5b11035bdb9d94e9d0a50c2ca832e14598d00d6907d99a4a3c981169475bbe916805888f9746a7d787829f20e6a4dec283731a2c85a72875b8e01 WHIRLPOOL 413553072466cee79c1f231742d6256f97d9a9e84647ee27aed97cf01eee16fd621c67fa67523174bcc0dd0c5f6181d2f6fcc698e3268fc9996eb2cbc7db1070
+EBUILD net-tools-1.60_p20160215155418.ebuild 2479 SHA256 869b801a0a8ad090c2db68edca53ad5f0e320e26f4b8daddff3e25a1edbcff27 SHA512 da7768af74f99fa957bc459151ebedb4afa51e81ccfd15973b2e6c15d01a084c4bb079537b191fb394526ff9b550d1acb32093b5ed551055525efa0f7b23696a WHIRLPOOL e3b1849fe0ea1ba420f1f640e027bd378d3b3e048ea2d1c28dc09f505ce8e3ac7986bd5ab7103ef70fdee92d26d72899dad74cf3148b6b8af09ee283767665ec
+EBUILD net-tools-1.60_p20161110235919.ebuild 2572 SHA256 8a916b251d563084523237d688e9f8dc06003844d73a354607da8062489caea2 SHA512 e53dc7e22e05c644da793c8d50bfde63cff2a21e7fbce24ea8e57282e1acf6b7235adf68c11c27ba61e6883dd5e699310ed8befd681b19f93692a3ad04d5e041 WHIRLPOOL 87050eb9e6f3e0eae4ba2f2ff2c040745f0d99e2d4c759ea4f39db06ec6d4e8cce1049f7f29f226865cd24ea668073bd51067adf54e5cb2c4dd8c158a4d3dbe6
+EBUILD net-tools-9999.ebuild 2492 SHA256 4fb8579e614ec23b72f43b2a79268c232121e09edfb3ddf6e8a2f7e174c34c39 SHA512 b45c414ea855d08d24bd0d0fa7ff565017e6d1581962429cb69317ccd20bd9bf821fee6ffd917c5702d5f32299e5bc86b06acacf143971b662ef84936eabe616 WHIRLPOOL 9e542ff19e5c5a23748cf892d15765b4623bd01e34e5e637df793cba4a84688dbe8b5b84f7749102aa8a9d2dbe0f2d70e7a2595a152606ab18ff4b2603ca4f5c
+MISC ChangeLog 9045 SHA256 3e2624c5a46782340f42e17453079c31876fdd4c526fb144c481d436ebbf77f7 SHA512 5f01d14852c3e87fc070d4a3601f17bd773edbfc163d5f93faf4859184f16772cb4fe8b7b64565c3c20b2719367b334ddbd3b05d0e5d87c969d847aa4d7c0516 WHIRLPOOL a28ec18d7c4b913fa43eb0e067c37c35a89115c40752d21ee5e28468a2a7a213c25ae68af134253f608af7131c81691563164294abe63be00d4c4837aac7d9a9
+MISC ChangeLog-2015 25006 SHA256 48a7f6ba1885082cc136ec093bb0fa60fdd15f750568b431008592701dd89b9e SHA512 9b862acae7f12b8197477fdfd5f18d18791a2d625f2bc9efacacd3d1dc50ce2818f4515af83f5f2a760c2829eaacf17449d8a56a5b5e85ee1a96242234d9e235 WHIRLPOOL 9a4dd77390d2dd49a004299dce7ce424cd94d6e98e7413ab4a2acec5afe9dd17ea8de02833326ec843de99f8425e5e56c26516dda7eb6438624eef9aacbfafa5
+MISC metadata.xml 687 SHA256 45ba9bb6b36c67c8defd1fb62b6a72c6a173c4aa37ccbbb391e161580bf7a938 SHA512 ef16e4cde591fcc5815fb7fee106e007bea128f52b05a71d050956df586e8037e58d6eb3bdd00ef4a0b9d55ddaea4c29d6a0ce12409a515e638452fc932e2037 WHIRLPOOL 90a45c8083bc23d64ab3f3f3d4799803952c40b49cd27d965ee2be9c08df3debd42adcc090ec8e810953ac47f14eeeb3b96176c2a09d0cd72158e14c05ef0640
diff --git a/sys-apps/net-tools/files/net-tools-1.60_p20161110235919-fix-building-w-older-linux-headers.patch b/sys-apps/net-tools/files/net-tools-1.60_p20161110235919-fix-building-w-older-linux-headers.patch
new file mode 100644
index 000000000000..5e330ace021c
--- /dev/null
+++ b/sys-apps/net-tools/files/net-tools-1.60_p20161110235919-fix-building-w-older-linux-headers.patch
@@ -0,0 +1,33 @@
+From ea3935bd7c0f36c86c40e5785326698fa3336c6a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 14 Nov 2016 22:48:42 -0500
+Subject: [PATCH] iptunnel: fix building w/older linux headers
+
+While linux-4.8+ headers work, older ones are missing includes.
+Dropping netinet/ip.h uncovered that mess, so add linux/ip.h.
+
+URL: https://bugs.gentoo.org/599542
+Reported-by: Conrad Kostecki <ck@bl4ckb0x.de>
+---
+ iptunnel.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/iptunnel.c b/iptunnel.c
+index 247ae10..d6e47e6 100644
+--- a/iptunnel.c
++++ b/iptunnel.c
+@@ -29,7 +29,12 @@
+ #include <arpa/inet.h>
+ #include <net/if.h>
+ #include <net/if_arp.h>
++/* We only care about linux/if_tunnel.h. Unfortunately, older Linux headers
++ * (pre linux-4.8) did not include all the proper headers leading to missing
++ * structs and types.
++ */
+ #include <linux/types.h>
++#include <linux/ip.h>
+ #include <linux/if_tunnel.h>
+
+ #include "config.h"
+--
+2.9.0
diff --git a/sys-apps/net-tools/metadata.xml b/sys-apps/net-tools/metadata.xml
new file mode 100644
index 000000000000..533583070f46
--- /dev/null
+++ b/sys-apps/net-tools/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="arp">build the arp and rarp tools (for manipulating the ARP cache)</flag>
+ <flag name="hostname">build the hostname and dnsdomainname tools</flag>
+ <flag name="plipconfig">build the plipconfig tool (for working with old PLIP hardware)</flag>
+ <flag name="slattach">build the slattach tool (for working with old serial ports)</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">net-tools</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/net-tools/net-tools-1.60_p20160215155418.ebuild b/sys-apps/net-tools/net-tools-1.60_p20160215155418.ebuild
new file mode 100644
index 000000000000..6853e6c5fd21
--- /dev/null
+++ b/sys-apps/net-tools/net-tools-1.60_p20160215155418.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/net-tools/code"
+ EGIT_PROJECT="${PN}"
+ inherit git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Standard Linux networking tools"
+HOMEPAGE="http://net-tools.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
+REQUIRED_USE="nis? ( hostname )"
+
+RDEPEND="selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ selinux? ( virtual/pkgconfig )
+ app-arch/xz-utils"
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" nls? ( sys-devel/gettext )"
+fi
+RDEPEND+="
+ hostname? ( !sys-apps/coreutils[hostname] )
+ !<sys-apps/openrc-0.9.9.3"
+
+maint_pkg_create() {
+ cd /usr/local/src/net-tools
+ #git-update
+ local stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d%H%M%S)
+ local pv="${PV/_p*}_p${stamp}"; pv=${pv/9999/1.60}
+ local p="${PN}-${pv}"
+ git archive --prefix="${p}/" master | tar xf - -C "${T}"
+ pushd "${T}" >/dev/null
+ emake -C "${p}/po" dist
+ sed -i "/^RELEASE/s:=.*:=${pv}:" */Makefile || die
+ tar cf - ${p}/ | xz > ${p}.tar.xz
+ popd >/dev/null
+
+ du -b "${T}"/*.tar.xz
+}
+
+pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} ]] && maint_pkg_create ; }
+
+set_opt() {
+ local opt=$1 ans
+ shift
+ ans=$("$@" && echo y || echo n)
+ einfo "Setting option ${opt} to ${ans}"
+ sed -i \
+ -e "/^bool.* ${opt} /s:[yn]$:${ans}:" \
+ config.in || die
+}
+
+src_configure() {
+ # Clear out env vars from the user. #599602
+ unset BASEDIR BINDIR SBINDIR
+
+ set_opt I18N use nls
+ set_opt HAVE_AFINET6 use ipv6
+ set_opt HAVE_HWIB has_version '>=sys-kernel/linux-headers-2.6'
+ set_opt HAVE_HWTR has_version '<sys-kernel/linux-headers-3.5'
+ set_opt HAVE_HWSTRIP has_version '<sys-kernel/linux-headers-3.6'
+ set_opt HAVE_SELINUX use selinux
+ set_opt HAVE_ARP_TOOLS use arp
+ set_opt HAVE_HOSTNAME_TOOLS use hostname
+ set_opt HAVE_HOSTNAME_SYMLINKS use nis
+ set_opt HAVE_PLIP_TOOLS use plipconfig
+ set_opt HAVE_SERIAL_TOOLS use slattach
+ if use static ; then
+ append-flags -static
+ append-ldflags -static
+ fi
+ tc-export AR CC
+ yes "" | ./configure.sh config.in || die
+}
+
+src_install() {
+ # We need to use emake by hand to pass ED. #567300
+ emake DESTDIR="${ED}" install
+ dodoc README THANKS TODO
+}
diff --git a/sys-apps/net-tools/net-tools-1.60_p20161110235919.ebuild b/sys-apps/net-tools/net-tools-1.60_p20161110235919.ebuild
new file mode 100644
index 000000000000..58514c0f19f2
--- /dev/null
+++ b/sys-apps/net-tools/net-tools-1.60_p20161110235919.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/net-tools/code"
+ EGIT_PROJECT="${PN}"
+ inherit git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Standard Linux networking tools"
+HOMEPAGE="http://net-tools.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
+REQUIRED_USE="nis? ( hostname )"
+
+RDEPEND="selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ selinux? ( virtual/pkgconfig )
+ app-arch/xz-utils"
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" nls? ( sys-devel/gettext )"
+fi
+RDEPEND+="
+ hostname? ( !sys-apps/coreutils[hostname] )
+ !<sys-apps/openrc-0.9.9.3"
+
+maint_pkg_create() {
+ cd /usr/local/src/net-tools
+ #git-update
+ local stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d%H%M%S)
+ local pv="${PV/_p*}_p${stamp}"; pv=${pv/9999/1.60}
+ local p="${PN}-${pv}"
+ git archive --prefix="${p}/" master | tar xf - -C "${T}"
+ pushd "${T}" >/dev/null
+ emake -C "${p}/po" dist
+ sed -i "/^RELEASE/s:=.*:=${pv}:" */Makefile || die
+ tar cf - ${p}/ | xz > ${p}.tar.xz
+ popd >/dev/null
+
+ du -b "${T}"/*.tar.xz
+}
+
+pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} ]] && maint_pkg_create ; }
+
+set_opt() {
+ local opt=$1 ans
+ shift
+ ans=$("$@" && echo y || echo n)
+ einfo "Setting option ${opt} to ${ans}"
+ sed -i \
+ -e "/^bool.* ${opt} /s:[yn]$:${ans}:" \
+ config.in || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix-building-w-older-linux-headers.patch"
+}
+
+src_configure() {
+ # Clear out env vars from the user. #599602
+ unset BASEDIR BINDIR SBINDIR
+
+ set_opt I18N use nls
+ set_opt HAVE_AFINET6 use ipv6
+ set_opt HAVE_HWIB has_version '>=sys-kernel/linux-headers-2.6'
+ set_opt HAVE_HWTR has_version '<sys-kernel/linux-headers-3.5'
+ set_opt HAVE_HWSTRIP has_version '<sys-kernel/linux-headers-3.6'
+ set_opt HAVE_SELINUX use selinux
+ set_opt HAVE_ARP_TOOLS use arp
+ set_opt HAVE_HOSTNAME_TOOLS use hostname
+ set_opt HAVE_HOSTNAME_SYMLINKS use nis
+ set_opt HAVE_PLIP_TOOLS use plipconfig
+ set_opt HAVE_SERIAL_TOOLS use slattach
+ if use static ; then
+ append-flags -static
+ append-ldflags -static
+ fi
+ tc-export AR CC
+ yes "" | ./configure.sh config.in || die
+}
+
+src_install() {
+ # We need to use emake by hand to pass ED. #567300
+ emake DESTDIR="${ED}" install
+ dodoc README THANKS TODO
+}
diff --git a/sys-apps/net-tools/net-tools-9999.ebuild b/sys-apps/net-tools/net-tools-9999.ebuild
new file mode 100644
index 000000000000..3a87f86eac55
--- /dev/null
+++ b/sys-apps/net-tools/net-tools-9999.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/net-tools/code"
+ EGIT_PROJECT="${PN}"
+ inherit git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Standard Linux networking tools"
+HOMEPAGE="http://net-tools.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
+REQUIRED_USE="nis? ( hostname )"
+
+RDEPEND="selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ selinux? ( virtual/pkgconfig )
+ app-arch/xz-utils"
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" nls? ( sys-devel/gettext )"
+fi
+RDEPEND+="
+ hostname? ( !sys-apps/coreutils[hostname] )
+ !<sys-apps/openrc-0.9.9.3"
+
+maint_pkg_create() {
+ cd /usr/local/src/net-tools
+ #git-update
+ local stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d%H%M%S)
+ local pv="${PV/_p*}_p${stamp}"; pv=${pv/9999/1.60}
+ local p="${PN}-${pv}"
+ git archive --prefix="${p}/" master | tar xf - -C "${T}"
+ pushd "${T}" >/dev/null
+ emake -C "${p}/po" dist
+ sed -i "/^RELEASE/s:=.*:=${pv}:" */Makefile || die
+ tar cf - ${p}/ | xz > ${p}.tar.xz
+ popd >/dev/null
+
+ du -b "${T}"/*.tar.xz
+}
+
+pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} ]] && maint_pkg_create ; }
+
+set_opt() {
+ local opt=$1 ans
+ shift
+ ans=$("$@" && echo y || echo n)
+ einfo "Setting option ${opt} to ${ans}"
+ sed -i \
+ -e "/^bool.* ${opt} /s:[yn]$:${ans}:" \
+ config.in || die
+}
+
+src_configure() {
+ # Clear out env vars from the user. #599602
+ unset BASEDIR BINDIR SBINDIR
+
+ set_opt I18N use nls
+ set_opt HAVE_AFINET6 use ipv6
+ set_opt HAVE_HWIB has_version '>=sys-kernel/linux-headers-2.6'
+ set_opt HAVE_HWTR has_version '<sys-kernel/linux-headers-3.5'
+ set_opt HAVE_HWSTRIP has_version '<sys-kernel/linux-headers-3.6'
+ set_opt HAVE_SELINUX use selinux
+ set_opt HAVE_ARP_TOOLS use arp
+ set_opt HAVE_HOSTNAME_TOOLS use hostname
+ set_opt HAVE_HOSTNAME_SYMLINKS use nis
+ set_opt HAVE_PLIP_TOOLS use plipconfig
+ set_opt HAVE_SERIAL_TOOLS use slattach
+ if use static ; then
+ append-flags -static
+ append-ldflags -static
+ fi
+ tc-export AR CC
+ yes "" | ./configure.sh config.in || die
+}
+
+src_install() {
+ # We need to use emake by hand to pass ED. #567300
+ emake DESTDIR="${ED}" install
+ dodoc README THANKS TODO
+}
diff --git a/sys-apps/netboot-base/Manifest b/sys-apps/netboot-base/Manifest
new file mode 100644
index 000000000000..2e13dac410fe
--- /dev/null
+++ b/sys-apps/netboot-base/Manifest
@@ -0,0 +1,5 @@
+DIST netboot-base-20050110.tar.bz2 4313 SHA256 0b756d457c6ac705548b903a30685860f3403f7389f6325f0460b7603d9d9bf8 SHA512 f40e289b178e75b9463605cc77ff395a08758e6641cd6298a62ef1900f21dd7be2d76e0bbad1a1140f60c8ee1a47496bc67fab7a93d2314cc6abd3ee306b265d WHIRLPOOL fde669e7c259584df4c1db5992d08cd4d6c32efc0439d4d9246e559f1ebc115cddddbe2d273b7cb20a8e078dcf30e33fb311830981c47e514d2bcf7a83e74cb3
+EBUILD netboot-base-20050110.ebuild 886 SHA256 d73cd98476837d3d0802bd60c83ac91c721d5728fb27bfd71dcd168c946ceb93 SHA512 c7742dd310c38f495051322558cb856db1db926740529e40f55f08ea145d8e043bbc3b7e270bc736237e2e3f62c698785feb449724e4150e00398dfd4c9bc545 WHIRLPOOL f59b57b26909a55d6035c1e5c58d1b6ba18e1d69dd23d6c2d1d59b1e19e5d61e55d83bc42539ceabaf21521a1f5ff2a8a2d06e8a236da80f49465a33d506172b
+MISC ChangeLog 2979 SHA256 ee5497e58977ac887b1186f19c50ea0ac57c9ae486f0bf137ed9e5166344a3d6 SHA512 a06cc10fcf25af28eb50a2f141d50e59b68e95012a42d55caa520f3c667527e4992b7d47fc50bd5275fbcd78467b4bd96472d8ea8ad3eb35d8714848cd58bea4 WHIRLPOOL aa1079e5374b1308de97a3b991eaf8f72dc6e28b641030c2fa1107e6dcd2f216ca9d61706dbb47af2efcc7350e59cdccd8bc8221e9f9406c784bc0ba9372f566
+MISC ChangeLog-2015 790 SHA256 cc7a4eec2d48fdb6330e0b9603540be2748f7f2697050cae34e3ef1688a82a34 SHA512 376b8a0769ab6520695b34689c26d7385e1fdcf997e4d4051e9d74fb8b555ab4b78a6d7df5f27ae63d1599f886f39b672c0a9c338aa11bea3d2d2a5609476b6d WHIRLPOOL 4a7b71e5fd2af3d23d64b1e0bec78c4b3c66dfcfa98f2c91207827ce46f5d1a70243969568010e6100a9618fb5fd112641751a0b05a528439674e34e48c1787b
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/netboot-base/metadata.xml b/sys-apps/netboot-base/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/netboot-base/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/netboot-base/netboot-base-20050110.ebuild b/sys-apps/netboot-base/netboot-base-20050110.ebuild
new file mode 100644
index 000000000000..9ba289517bb3
--- /dev/null
+++ b/sys-apps/netboot-base/netboot-base-20050110.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs
+
+DESCRIPTION="Baselayout for netboot systems"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://dev.gentoo.org/~vapier/${P}.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha arm hppa ~mips ppc sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+pkg_setup() {
+ [[ ${ROOT} = "/" ]] && die "refusing to emerge to /"
+}
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} src/consoletype.c -o sbin/consoletype || die
+ $(tc-getSTRIP) --strip-unneeded sbin/consoletype
+}
+
+src_install() {
+ rm -r src
+ cp -r * "${D}"/ || die
+}
+
+pkg_preinst() {
+ [[ ${ROOT} = "/" ]] && die "refusing to install to /"
+}
+
+pkg_postinst() {
+ cd "${ROOT}"
+ mkdir -p bin dev etc lib mnt proc sbin var
+ mkdir -p var/log
+ mkdir -p mnt/gentoo
+ ln -s . usr
+ ln -s . share
+}
diff --git a/sys-apps/netkit-base/Manifest b/sys-apps/netkit-base/Manifest
new file mode 100644
index 000000000000..c727f4d8d61c
--- /dev/null
+++ b/sys-apps/netkit-base/Manifest
@@ -0,0 +1,9 @@
+AUX 003_all_netkit-base-0.17-gcc4.patch 321 SHA256 8ab9c712ce08fc62591303e54348d9cacd36a6cd5a25b7c002edbdaa16cbba78 SHA512 a7ba0110ac7febb956933594cc6bb0bf804fd00b2f30ac6683d22d4abad7b4f091de18147e32b5a40203a30efaf5bf25b98ccfc084fe374e270bac42ed607edd WHIRLPOOL f18b5b14174b9d955631b6399bcdcdc8a57766a95a9a6c873d48acf61d90f893d01215318c92563ef462933a7b2dde71e11e5669350a14527ef7059eb8af2a97
+AUX 004_all_netkit-base-0.17-misc-fixes.patch 1601 SHA256 a820d7daef5b03a821f94f14a2a0998465db579a6abfbad17eece55a1753b1ef SHA512 86533af9f1784d976baf27695f9af25933886bfa1e571d6d967084d1952bb7b31620b5135d2d88c2881a1ce7a39f6be4d74bc9483d9d78236451a0c68f1488a5 WHIRLPOOL f1ef48758a6b7882b2f5466fc173e6ec98592fe25090f2674fe9003363292cc4a2324e825bf2346889ada912ef5a94ee9a7b5ed51732bffa8849980566fd0375
+AUX 005_all_netkit-base-0.17-no-rpc.patch 522 SHA256 fe76d64667a8ef0633cb4eb2d0cd8eede4732bc84ac79cd2eabf4635d940f9fe SHA512 0dff7bb005c1d480444b8ff61f53626ed0a5748730c2a1ff489a277a1bbd61e08bd9c46261acc040f5030d7048a291fa5f22cb7b1a58bb468d8264d4b6272d0b WHIRLPOOL b006d67dacb04db967718265d949c3c22dd1e229fa2c9d0d1c6eb37bfe3597201de014468effc09b2982669d0a46dc0858becd3622cac2b3c308c5853364a6c9
+AUX inetd.rc6 470 SHA256 de265032bdb3ed2f28b25a54122b79760d3e90a611b065ac9114ca5ad0f77e16 SHA512 525f4f948721553f051a929d5c6b7c49208256170c423ac10ad49427cc89fdc19dbadf81e7a3d8eed07c54c5a266e73cb0ac24c8f95f60f731fab571ccbbd5d2 WHIRLPOOL 9a97bd277dd11f94bca326eaf9b6f76084aa186f6fd1a8ea24de6266e1fd95804d2655a6c4e0d5072721fa3e808c4a36513536c58d2e25acfa1c99c873a9fd20
+DIST netkit-base-0.17.tar.gz 56473 SHA256 16dd81625ebfc8f5dcb0dfd2e6bac223aad325a9405d66a556fe349446b3c332 SHA512 2faae6471251647ea0d499c96d13faf72bc9aa4ab408f9f7f4c9fc41b1e1e2ce0bcad626ca027135b5a20f311362e90af57c7197885d02a0839beea5b4fdb821 WHIRLPOOL 9f9a61ec463b22ff3a1daa2da9673eb8854e2d6fa76c50f2bdb996d3119714246410938399f8bc92e661918434207f195bf1256cc8ade8755405bf3949a73bec
+EBUILD netkit-base-0.17-r9.ebuild 1010 SHA256 e009c35d4d07c0e689adc2213d7c54450da68060b853ceca24c3e493e4b04841 SHA512 d3260e5da8605ec369ed096f826c93e374caeddb72d5a53f3a751524cdc82a3b159e9238a09392833aef2ab299e499a703a2bc1aa514005bc05a6d65c5187e4c WHIRLPOOL e50d53b371b3dc51f5d9a33748ce312f5562870ff5729d1783bc167fe3ff8d00e9323f3eb6b985a99614a1febbee66d44cb90106e2353e252967231b4e54924d
+MISC ChangeLog 3232 SHA256 8645ddab9f49971a7c6cd807ccc5d01211043df0d5c2bddfee8514c2eb8018d5 SHA512 247d455618c82fe92f2d3384bc8a74d6ba75087b68da0aca51bf059310fa121635220729141c53658ff1feedf3705849f1d47b7bc6b407fd740f8a96299af12f WHIRLPOOL 96c334814d8362a3e475d82b187e285b7dbacf041b4ce2f68cac6ea5a93c00bd790ea4e699c05ccf5c855a6f436cab99de4ad37b39cca3063b4e7aae9279e24e
+MISC ChangeLog-2015 6564 SHA256 b9e969f6c427c0f9971c1121e89fd195fa76b49392e53641206792da48401370 SHA512 e3189228a12a727576be8cae752d6e025747f9ad769e7d4704e9ef5c0ae27eca926b96e91ecb61f67382ad214403491cb3d0dd868f6d487e7e650e779cf5b1b6 WHIRLPOOL 6a18c0edd51dcbcbd3301fae31a5af2641c39199d0c030580a910014b27b3ba7d6d7a58a754509fe84b62c54bdc25af7ecff488561666ff2206fdc3e5c69219b
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
new file mode 100644
index 000000000000..266df811fd77
--- /dev/null
+++ b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
@@ -0,0 +1,11 @@
+--- netkit-base-0.17/inetd/servtab.c
++++ netkit-base-0.17/inetd/servtab.c
+@@ -771,7 +771,7 @@
+ return;
+ }
+
+-#define SWAP(type, a, b) {type c=(type)a; (type)a=(type)b; (type)b=(type)c;}
++#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}
+
+ /*
+ * sep->se_wait may be holding the pid of a daemon
diff --git a/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
new file mode 100644
index 000000000000..9492d715e20f
--- /dev/null
+++ b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
@@ -0,0 +1,54 @@
+--- netkit-base-0.17/inetd/builtins.c
++++ netkit-base-0.17/inetd/builtins.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <time.h>
+
+ #include "servtab.h"
+ #include "builtins.h"
+--- netkit-base-0.17/inetd/inetd.c
++++ netkit-base-0.17/inetd/inetd.c
+@@ -869,8 +869,8 @@
+ int on = 1;
+
+ if ((sep->se_fd = socket(sep->se_family, sep->se_socktype, 0)) < 0) {
+- syslog(LOG_ERR, "%s: socket: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: socket: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+
+ if (errno == EMFILE) {
+ syslog(LOG_ALERT,
+@@ -888,8 +888,8 @@
+ syslog(LOG_ERR, "setsockopt (SO_REUSEADDR): %m");
+ #undef turnon
+ if (bind(sep->se_fd, &sep->se_ctrladdr, sep->se_ctrladdr_size) < 0) {
+- syslog(LOG_ERR, "%s: bind: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: bind: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ (void) close(sep->se_fd);
+ sep->se_fd = -1;
+ if (!timingout) {
+@@ -938,8 +938,8 @@
+ }
+ m = sizeof(sn);
+ if (getsockname(sep->se_fd, (struct sockaddr *)&sn, &m) < 0) {
+- syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ return;
+ }
+
+@@ -1026,7 +1026,7 @@
+ if (rl.rlim_cur <= rlim_ofile_cur) {
+ syslog(LOG_ERR,
+ "bump_nofile: cannot extend file limit, max = %d",
+- rl.rlim_cur);
++ (int)rl.rlim_cur);
+ return -1;
+ }
+
diff --git a/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
new file mode 100644
index 000000000000..3981b50e76e1
--- /dev/null
+++ b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
@@ -0,0 +1,26 @@
+the rpc logic here isn't terribly useful, so just punt it
+
+http://bugs.gentoo.org/371395
+
+--- a/inetd/inetd.c
++++ b/inetd/inetd.c
+@@ -158,8 +158,8 @@
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_clnt.h>
+ #undef __wait
+-#endif
+ #include <rpc/pmap_clnt.h>
++#endif
+
+ #ifndef MIN
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+--- a/inetd/inetd.h
++++ b/inetd/inetd.h
+@@ -4,7 +4,6 @@
+
+ #define RETRYTIME (60*10) /* retry time after bind/server fail */
+
+-#define RPC /* Use SunRPC */
+
+
+ /* globals */
diff --git a/sys-apps/netkit-base/files/inetd.rc6 b/sys-apps/netkit-base/files/inetd.rc6
new file mode 100644
index 000000000000..e124cf8b303d
--- /dev/null
+++ b/sys-apps/netkit-base/files/inetd.rc6
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting inetd"
+ (
+ # workaround for #25754
+ unset -f `declare -F | sed 's:declare -f::g'`
+ start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
+ )
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping inetd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid
+ eend $?
+}
diff --git a/sys-apps/netkit-base/metadata.xml b/sys-apps/netkit-base/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/netkit-base/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild b/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild
new file mode 100644
index 000000000000..02a23dbfa4de
--- /dev/null
+++ b/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Old-style inetd"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/*.patch
+}
+
+src_configure() {
+ tc-export CC
+ ./configure || die
+ sed -i \
+ -e "/^CFLAGS=/s:=.*:=${CFLAGS} -Wall -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline:" \
+ -e "/^LDFLAGS=/s:=.*:=${LDFLAGS}:" \
+ MCONFIG || die
+}
+
+src_install() {
+ sed -i \
+ -e 's:in\.telnetd$:in.telnetd -L /usr/sbin/telnetlogin:' \
+ etc.sample/inetd.conf
+
+ dosbin inetd/inetd
+ doman inetd/inetd.8
+ newinitd "${FILESDIR}"/inetd.rc6 inetd
+
+ dodoc BUGS ChangeLog README
+ docinto samples
+ dodoc etc.sample/*
+}
diff --git a/sys-apps/netloc/Manifest b/sys-apps/netloc/Manifest
new file mode 100644
index 000000000000..287cabb25b54
--- /dev/null
+++ b/sys-apps/netloc/Manifest
@@ -0,0 +1,5 @@
+DIST netloc-0.5.tar.gz 474646 SHA256 41a8d31097b9aeabff89596b42bd3d4590f6b7552378a0fc80ec7a02823c5d1a SHA512 88600c59302cd8e5ed024373a57b27e54b288288091ed0ab3852bee59c255a8b520d38c59d64f6c1eafe307f0d5e61d64c799a92e9695c42ecc1e33dcc2df6ba WHIRLPOOL d83dbe17bcea2c083ded5c364e344b904799fd6405a38e52318d9d88f041ee47b50383fd038003b2e558b36577544779c118c509de29cc1e2027314cf3b8b8b1
+EBUILD netloc-0.5.ebuild 583 SHA256 b926b6bdda0c4a386f67d92f368752d437477ee0dbff8c83319e2562bf32a7b6 SHA512 06630aff5b04084ee820ddbaf3eda2d59ad6b3ed09d856632cbad27d0b2d5a397a6fea38be179eb5b7f8c49b0cb4e96b1b3da7ea3fedc9eb744b12899b1ab386 WHIRLPOOL 63034686695fc1f709377bc42a40469bba4ca1fd112f6a900d8730906a9eb851f4475ee86c2631ff9210e93420aa6cc843b104ffd415e5106a0be605017eccee
+MISC ChangeLog 2420 SHA256 e83baee4f780b3c07628ca166ca0f51178b257819bdc44371ff63fbb5d048038 SHA512 809dd2460d4b51c90f0db5221c1c1efd4c4de81a2b289271e72d7f7d6d572d480854932253025653ac3fcb77859cf816bf516ea305aa427ad4e0baaa0afb8d34 WHIRLPOOL 6f925ac8956d70224b67af4a3dc535d6ad9c30489e53c92fd07d3d212445f14dfa25f77b8578a1cab286dc1494bcf87738e392cdc1ad7d42a0d8f3fea15d1ab5
+MISC ChangeLog-2015 379 SHA256 eb9fc0a3f64b6f2d7c102d081d98802bec83b5bb69c2107b4581a1b5fb194a32 SHA512 be96b9e151b5dad55b41e229cbea279517e3492699e17d71ba4951289b38e5c201051b00350ab8d67dd72f569e2d0ec2431579ab045a0f3e9e541c88cdd11a4d WHIRLPOOL 285c0f1d7003f63f99eb84629cd916fdcef9a75d47f592c6ca42fe655d4832c46fdb828ddcde86e9e8fa8bb2aef83c7fad99336dc57425a787ba7f62a1725faa
+MISC metadata.xml 804 SHA256 73f674db83a9e44197d76ddac681b92129984a2a05efe862005b862cadaee30f SHA512 137cc64ca02b01abb060c0a5b14b3d34d0c225ef1bf5af8eef5304df129a621aa8d8644ae2b324610d7405961f17f10fae6d15d50d3ddb6836ca71f1baacc5ad WHIRLPOOL 88f22ae69aefb99390189d081bddc44959aeb95973a7c1b59ad3ff7fa661f64c90b37e97df9ebc6ff24d972329cb70b3eb72d490919548b8e0c03bfb687a67ce
diff --git a/sys-apps/netloc/metadata.xml b/sys-apps/netloc/metadata.xml
new file mode 100644
index 000000000000..07151826f89f
--- /dev/null
+++ b/sys-apps/netloc/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 type="project">
+ <email>cluster@gentoo.org</email>
+ <name>Gentoo Cluster Project</name>
+</maintainer>
+<longdescription>
+ The Portable Network Locality (netloc) software package provides network topology discovery tools, and an abstract representation of those networks topologies for a range of network types and configurations. It is provided as a companion to the Portable Hardware Locality (hwloc) package. These two software packages work together to provide a comprehensive view of the HPC system topology, spanning from the processor cores in one server to the cores in another – including the complex network(s) in between.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/netloc/netloc-0.5.ebuild b/sys-apps/netloc/netloc-0.5.ebuild
new file mode 100644
index 000000000000..7367e7b04367
--- /dev/null
+++ b/sys-apps/netloc/netloc-0.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib versionator
+
+MY_PV=v$(get_version_component_range 1-2)
+
+DESCRIPTION="Portable Network Locality (netloc)"
+HOMEPAGE="http://www.open-mpi.org/projects/netloc/"
+SRC_URI="http://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+ dev-libs/jansson
+ sys-apps/hwloc"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ --with-jansson="${EPREFIX}/usr" \
+ --with-hwloc="${EPREFIX}/usr"
+}
diff --git a/sys-apps/netplug/Manifest b/sys-apps/netplug/Manifest
new file mode 100644
index 000000000000..d3d34b4eab8a
--- /dev/null
+++ b/sys-apps/netplug/Manifest
@@ -0,0 +1,10 @@
+AUX netplug-1.2.9-ignore-wireless.patch 938 SHA256 75cf296b40316a387c76db51ab2534426a3784ac8ea1ce94b9f32dddd8a3419a SHA512 a045d1a1dfc6d29334aff6ec035244d68e80887bb05f79d0512c87d7ac0dbb3cdf866569762e575b13a6306604e85e0ba951f10d54f88a39ef558ce2a65ddbed WHIRLPOOL 0468db7bb892e78b1313bd2c6dd115b05f84c6b5bd0499919e0d48f49d9a18dd5f9b95089a205bcdd2c8b767d560b596f14053d694f2c264f3bc4420df778156
+AUX netplug-1.2.9-remove-nest.patch 5516 SHA256 282b390c459c1190b55049cc42828916189097faa75695b738a9a6391079a5a4 SHA512 dfcb72f1977cefbdb231c0e7a1ab758e9c753c434d9e5ccc5336a7f606e787fcec943cd1055481d1ba9f2ce9da0e33bf93852a106eeda4b2539d0c66c433945b WHIRLPOOL fcab8a938dacbf8b34ffc91c8efbab459814eac38a2e655589bea2f65d3132bfdd8298197d341a011130160d7877b4fbb26a8610f4796f3305a2db6a2da08c9c
+AUX netplug-1.2.9.2-downandout.patch 340 SHA256 20378613d53c716040c8c47b7f241d24f21a155d577463211fa3d4c3868e8621 SHA512 b1b7e99afda7988245f574c7ecffcf50f78493be71290d0484f0df2c94580f25ee3037db01d5fc2e577a2cd1ec721f93663bce3e1b59dcb38dd009a133d034f8 WHIRLPOOL e38f2ce592ccd820ab227edd8119836356f678eda4659515767148b71cd2a8cfcb51226c74edad3769fb1b94610f2502fdeaca96252df8f788c0ebc7f75032f9
+AUX netplug-2 715 SHA256 aaa5549bedfa767d594e76c4fde3b29c2e20c8430a24df13c656b1a2a2a16b5c SHA512 11efb8b8916d40615840c5721aba089dc9f81bf30f2af6f47d6df2fd8f2b6f22e0cd59ebd37fd9875c4af31e064128e93acbef5cf859b3cabb553fbdd2f3c9ee WHIRLPOOL 956f75b28b23ecb862454d05d41148e3f4acf43f249e97325b40433ba58da3852cd300bc40a0a3f27d3474f82d391ee102e4768e6ab869acab612394feec61f6
+DIST netplug-1.2.9.2.tar.bz2 22332 SHA256 5180dfd9a7d3d0633a027b0a04f01b45a6a64623813cd48bd54423b90814864e SHA512 b68a00eb8874ec7dd6aa9f7b7f529a6e1d9ecece4b798c8cee996b7f3534c556656f642de0ac4b2a6d06fbaf18e3bfaab00934a9292b95939a4935e673e9ca8c WHIRLPOOL 51d54d4c7784b82b71b3a8964c9df3f17e8df1b21b11a95250f911c6f0917aabab1bf0fe5117884623b3222b1df0c443ce4416ad74f63c0d761f762e5f39216f
+EBUILD netplug-1.2.9.2-r1.ebuild 1289 SHA256 e66e3946280ea0618b84d2910c45e0d0cd8c171e4604f5df4589afe280e8cbc2 SHA512 fadc601d1e406c77af3a139a91c2ae3040039c17b6e948f07f892ed0235631e1bc4180cce9ebf80e2f09df7b8d71bd160953cdc8d174dbd93d8aeea1c882788a WHIRLPOOL c2efd205e17fc96a478041f539071d58b35557bcb402b741160c94f5d8011dbd053113f6bf282e4586d2f8e178b8a1a0c4df027075bc54760b85d671dfa0e482
+EBUILD netplug-1.2.9.2-r2.ebuild 1375 SHA256 7bedcc2dd17406ae894f07e89245840ec2ca88721f0cf11fd0412b9ace20fb73 SHA512 71a7c1615e2c848b54962bcae7dbc587a19f67ee96b163d5c6d86c86996526e1352a3e880ef4fd55003c665af36ca7f67dc118a12ffad49b96809c55443d902f WHIRLPOOL bccd71c5b932174c60130d1d653ee14ffa3eb19233836ae6f319e02881ee6864fdf5e5abdcfe3206015ffd6a526d82f45342f0567978f98056319b3bc2c9b9aa
+MISC ChangeLog 2645 SHA256 f965bc7846a1e136d3e32181dd2e55df74c21374b0987b20a4484ebe0935ea2a SHA512 33f85eebb972956dc24bc14ac27c0e22591e8978997df6e56602ad845e5a24ae49bd420a459097405be0825f02502417eddbf6df4e8139c8b2e5b8c308d8971f WHIRLPOOL dc5853e1bd56bf404a39f0c9d0d5958b76024726bcb5d570d9607a80e1c15cd70497ccaf3da22e1c3e0865064cd40861a5c3a9d2e46327021d1fcc29a6c8e44a
+MISC ChangeLog-2015 5415 SHA256 600478475c32b243904b680311920239fb093cf68694045fe4fc3ee86191c6b0 SHA512 268f20f234016ef0a94d81dec7705756601db257d4da183ad7bd54d3eea22b79b4714f46c516577b14a5e9ddcf073c580d583d815360c71311435ca405e01e5a WHIRLPOOL 5b5c5dc97eefcf7e83348901b92bef9c853d169936c63428bfc81727faaaa97dc83b83dec14d7e936d6ba1158af79a5e696cd3a26b5737465e0cb0280640dfa4
+MISC metadata.xml 367 SHA256 ee2ec084f92ba03f4fd0495ff04aec426ddd4daa25ef63734a7e111992b77646 SHA512 d2cdfcaac3690abf52d3ee9ebd7086815b84802d4918778911b63d4ecb36ac8928178ac7d02ebbf3823ee50ef2917069a20a4cdce319097298d7f66ad15e272c WHIRLPOOL 5a1ca40ca7144d447a7ece7af2a08fb6cb3caac84cb9ed3b97dae9c5fe9bc57745c1fdb72c19db058430e772fb3f938f3d9d4eeb259d4bfbe635be68437feb01
diff --git a/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch b/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch
new file mode 100644
index 000000000000..de5cba2cb08d
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch
@@ -0,0 +1,37 @@
+--- netplug-1.2.9/main.c
++++ netplug-1.2.9/main.c
+@@ -36,6 +36,10 @@
+
+ #include "netplug.h"
+
++/* Support old kernels without wireless */
++#ifndef IFLA_WIRELESS
++#define IFLA_WIRELESS (IFLA_MASTER + 1)
++#endif /* IFLA_WIRELESS */
+
+ int use_syslog;
+ static char *pid_file;
+@@ -63,6 +67,14 @@
+
+ parse_rtattrs(attrs, IFLA_MAX, IFLA_RTA(info), len);
+
++ /* Ignore wireless messages */
++ if (attrs[IFLA_WIRELESS] != NULL
++ && hdr->nlmsg_type == RTM_NEWLINK
++ && info->ifi_change == 0) {
++ do_log(LOG_DEBUG, "Ignoring wireless netlink message");
++ return 0;
++ }
++
+ if (attrs[IFLA_IFNAME] == NULL) {
+ do_log(LOG_ERR, "No interface name");
+ return -1;
+@@ -71,7 +83,7 @@
+ char *name = RTA_DATA(attrs[IFLA_IFNAME]);
+
+ if (!if_match(name)) {
+- do_log(LOG_INFO, "%s: ignoring event", name);
++ do_log(LOG_DEBUG, "%s: ignoring event", name);
+ return 0;
+ }
+
diff --git a/sys-apps/netplug/files/netplug-1.2.9-remove-nest.patch b/sys-apps/netplug/files/netplug-1.2.9-remove-nest.patch
new file mode 100644
index 000000000000..0a3b991a82bf
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-1.2.9-remove-nest.patch
@@ -0,0 +1,187 @@
+This patch replaces the for_each_iface nested funtion with a macro so that we
+don't have an executable stack and work correctly on NX capable hardware.
+See http://www.gentoo.org/proj/en/hardened/gnu-stack.xml for more information.
+
+Patch by Diego Pettenò (flameeyes@gentoo.org)
+
+Index: netplug-1.2.9/if_info.c
+===================================================================
+--- netplug-1.2.9.orig/if_info.c
++++ netplug-1.2.9/if_info.c
+@@ -29,8 +29,7 @@
+
+ #include "netplug.h"
+
+-#define INFOHASHSZ 16 /* must be a power of 2 */
+-static struct if_info *if_info[INFOHASHSZ];
++struct if_info *if_info[INFOHASHSZ];
+
+ static const char *
+ statename(enum ifstate s)
+@@ -95,17 +94,6 @@ flags_str(char *buf, unsigned int fl)
+ return buf;
+ }
+
+-void
+-for_each_iface(int (*func)(struct if_info *))
+-{
+- for(int i = 0; i < INFOHASHSZ; i++) {
+- for(struct if_info *info = if_info[i]; info != NULL; info = info->next) {
+- if ((*func)(info))
+- return;
+- }
+- }
+-}
+-
+ /* Reevaluate the state machine based on the current state and flag settings */
+ void
+ ifsm_flagpoll(struct if_info *info)
+@@ -284,6 +272,14 @@ ifsm_flagchange(struct if_info *info, un
+ info->lastchange = time(0);
+ }
+
++int find_pid(struct if_info *i, pid_t pid, struct if_info **info) {
++ if (i->worker == pid) {
++ *info = i;
++ return 1;
++ }
++ return 0;
++}
++
+ /* handle a script termination and update the state accordingly */
+ void ifsm_scriptdone(pid_t pid, int exitstatus)
+ {
+@@ -291,16 +287,8 @@ void ifsm_scriptdone(pid_t pid, int exit
+ struct if_info *info;
+ assert(WIFEXITED(exitstatus) || WIFSIGNALED(exitstatus));
+
+- int find_pid(struct if_info *i) {
+- if (i->worker == pid) {
+- info = i;
+- return 1;
+- }
+- return 0;
+- }
+-
+ info = NULL;
+- for_each_iface(find_pid);
++ for_each_iface(find_pid, pid, &info);
+
+ if (info == NULL) {
+ do_log(LOG_INFO, "Unexpected child %d exited with status %d",
+Index: netplug-1.2.9/main.c
+===================================================================
+--- netplug-1.2.9.orig/main.c
++++ netplug-1.2.9/main.c
+@@ -164,6 +164,23 @@ child_handler(int sig, siginfo_t *info,
+ write(child_handler_pipe[1], &ce, sizeof(ce));
+ }
+
++int pollflags_state(struct if_info *info, int sockfd) {
++ struct ifreq ifr;
++
++ if (!if_match(info->name))
++ return 0;
++
++ memcpy(ifr.ifr_name, info->name, sizeof(ifr.ifr_name));
++ if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0)
++ do_log(LOG_ERR, "%s: can't get flags: %m", info->name);
++ else {
++ ifsm_flagchange(info, ifr.ifr_flags);
++ ifsm_flagpoll(info);
++ }
++
++ return 0;
++}
++
+ /* Poll the existing interface state, so we can catch any state
+ changes for which we may not have neen a netlink message. */
+ static void
+@@ -180,28 +197,20 @@ poll_interfaces(void)
+ close_on_exec(sockfd);
+ }
+
+- int pollflags(struct if_info *info) {
+- struct ifreq ifr;
+-
+- if (!if_match(info->name))
+- return 0;
+-
+- memcpy(ifr.ifr_name, info->name, sizeof(ifr.ifr_name));
+- if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0)
+- do_log(LOG_ERR, "%s: can't get flags: %m", info->name);
+- else {
+- ifsm_flagchange(info, ifr.ifr_flags);
+- ifsm_flagpoll(info);
+- }
+-
+- return 0;
+- }
+-
+- for_each_iface(pollflags);
++ for_each_iface(pollflags_state, sockfd);
+ }
+
+ int debug = 0;
+
++/* Run over each of the interfaces we know and care about, and
++ make sure the state machine has done the appropriate thing
++ for their current state. */
++int poll_flags_check(struct if_info *i) {
++ if (if_match(i->name))
++ ifsm_flagpoll(i);
++ return 0;
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -331,17 +340,7 @@ main(int argc, char *argv[])
+ { child_handler_pipe[0], POLLIN, 0 },
+ };
+
+- {
+- /* Run over each of the interfaces we know and care about, and
+- make sure the state machine has done the appropriate thing
+- for their current state. */
+- int poll_flags(struct if_info *i) {
+- if (if_match(i->name))
+- ifsm_flagpoll(i);
+- return 0;
+- }
+- for_each_iface(poll_flags);
+- }
++ for_each_iface(poll_flags_check);
+
+ for(;;) {
+ int ret;
+Index: netplug-1.2.9/netplug.h
+===================================================================
+--- netplug-1.2.9.orig/netplug.h
++++ netplug-1.2.9/netplug.h
+@@ -28,6 +28,9 @@
+
+ #define NP_SCRIPT NP_SCRIPT_DIR "/netplug"
+
++#define INFOHASHSZ 16 /* must be a power of 2 */
++extern struct if_info *if_info[INFOHASHSZ];
++
+ /* configuration */
+
+ void read_config(char *filename);
+@@ -83,7 +86,14 @@ struct if_info *if_info_update_interface
+ struct rtattr *attrs[]);
+ int if_info_save_interface(struct nlmsghdr *hdr, void *arg);
+ void parse_rtattrs(struct rtattr *tb[], int max, struct rtattr *rta, int len);
+-void for_each_iface(int (*func)(struct if_info *));
++
++#define for_each_iface(func, ...) \
++ for(int i = 0; i < INFOHASHSZ; i++) { \
++ for(struct if_info *each_iface = if_info[i]; each_iface != NULL; each_iface = each_iface->next) { \
++ if (func (each_iface, ##__VA_ARGS__)) \
++ break; \
++ } \
++ }
+
+ void ifsm_flagpoll(struct if_info *info);
+ void ifsm_flagchange(struct if_info *info, unsigned int newflags);
diff --git a/sys-apps/netplug/files/netplug-1.2.9.2-downandout.patch b/sys-apps/netplug/files/netplug-1.2.9.2-downandout.patch
new file mode 100644
index 000000000000..be164e58a440
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-1.2.9.2-downandout.patch
@@ -0,0 +1,13 @@
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652418
+https://bugs.gentoo.org/599400
+
+--- a/if_info.c
++++ b/if_info.c
+@@ -186,6 +186,7 @@
+ if (newflags & IFF_UP) {
+ switch(info->state) {
+ case ST_DOWN:
++ case ST_DOWNANDOUT:
+ info->state = ST_INACTIVE;
+ break;
+
diff --git a/sys-apps/netplug/files/netplug-2 b/sys-apps/netplug/files/netplug-2
new file mode 100644
index 000000000000..539f1465516a
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-2
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Gentoo-specific netplug script
+#
+# This file gets called by netplug when it wants to bring an interface
+# up or down.
+#
+
+IFACE="$1"
+ACTION="$2"
+
+EXEC="/etc/init.d/net.${IFACE}"
+
+case "${ACTION}" in
+ in)
+ ARGS="--quiet start"
+ ;;
+ out)
+ ARGS="--quiet stop"
+ ;;
+ probe)
+ # Do nothing as we should already be up
+ exit 0
+ ;;
+ *)
+ echo "$0: wrong arguments" >&2
+ echo "Call with <interface> <in|out|probe>" >&2
+ exit 1
+ ;;
+esac
+
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+ ${EXEC} ${ARGS}
+ exit 0
+else
+ logger -t netplug "Error: Couldn't configure ${IFACE}, no ${EXEC} !"
+ exit 1
+fi
diff --git a/sys-apps/netplug/metadata.xml b/sys-apps/netplug/metadata.xml
new file mode 100644
index 000000000000..04c54cf1d796
--- /dev/null
+++ b/sys-apps/netplug/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 type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <longdescription lang="en">
+ Brings up/down ethernet ports automatically with cable detection
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/netplug/netplug-1.2.9.2-r1.ebuild b/sys-apps/netplug/netplug-1.2.9.2-r1.ebuild
new file mode 100644
index 000000000000..8456a5d68924
--- /dev/null
+++ b/sys-apps/netplug/netplug-1.2.9.2-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.red-bean.com/~bos/"
+SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc sparc x86"
+IUSE="debug doc"
+
+DEPEND="doc? ( app-text/ghostscript-gpl
+ media-gfx/graphviz )"
+RDEPEND=""
+
+src_prepare() {
+ # Remove debug flags from CFLAGS
+ if ! use debug; then
+ sed -i -e "s/ -ggdb3//" Makefile || die
+ fi
+
+ # Remove -O3 and -Werror from CFLAGS
+ sed -i -e "s/ -O3//" -e "s/ -Werror//" Makefile || die
+
+ # Remove nested functions, #116140
+ epatch "${FILESDIR}/${PN}-1.2.9-remove-nest.patch"
+
+ # Ignore wireless events
+ epatch "${FILESDIR}/${PN}-1.2.9-ignore-wireless.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake CC="${CC}"
+
+ if use doc; then
+ emake -C docs/
+ fi
+}
+
+src_install() {
+ into /
+ dosbin netplugd
+ doman man/man8/netplugd.8
+
+ dodir /etc/netplug.d
+ exeinto /etc/netplug.d
+ newexe "${FILESDIR}/netplug-2" netplug
+
+ dodir /etc/netplug
+ echo "eth*" > "${D}"/etc/netplug/netplugd.conf || die
+
+ dodoc ChangeLog NEWS README TODO
+
+ if use doc; then
+ dodoc docs/state-machine.ps
+ fi
+}
diff --git a/sys-apps/netplug/netplug-1.2.9.2-r2.ebuild b/sys-apps/netplug/netplug-1.2.9.2-r2.ebuild
new file mode 100644
index 000000000000..fefdce0fd90e
--- /dev/null
+++ b/sys-apps/netplug/netplug-1.2.9.2-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.red-bean.com/~bos/"
+SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86"
+IUSE="debug doc"
+
+DEPEND="doc? ( app-text/ghostscript-gpl
+ media-gfx/graphviz )"
+RDEPEND=""
+
+PATCHES=(
+ # Remove nested functions, #116140
+ "${FILESDIR}/${PN}-1.2.9-remove-nest.patch"
+
+ # Ignore wireless events
+ "${FILESDIR}/${PN}-1.2.9-ignore-wireless.patch"
+
+ # Fix DOWNANDOUT problem #599400
+ "${FILESDIR}/${P}-downandout.patch"
+)
+
+src_prepare() {
+ # Remove debug flags from CFLAGS
+ if ! use debug; then
+ sed -i -e "s/ -ggdb3//" Makefile || die
+ fi
+
+ # Remove -O3 and -Werror from CFLAGS
+ sed -i -e "s/ -O3//" -e "s/ -Werror//" Makefile || die
+
+ default
+}
+
+src_compile() {
+ tc-export CC
+ emake CC="${CC}"
+
+ if use doc; then
+ emake -C docs/
+ fi
+}
+
+src_install() {
+ into /
+ dosbin netplugd
+ doman man/man8/netplugd.8
+
+ dodir /etc/netplug.d
+ exeinto /etc/netplug.d
+ newexe "${FILESDIR}/netplug-2" netplug
+
+ dodir /etc/netplug
+ echo "eth*" > "${D}"/etc/netplug/netplugd.conf || die
+
+ dodoc ChangeLog NEWS README TODO
+
+ if use doc; then
+ dodoc docs/state-machine.ps
+ fi
+}
diff --git a/sys-apps/newrelic-sysmond/Manifest b/sys-apps/newrelic-sysmond/Manifest
new file mode 100644
index 000000000000..da3966ed483b
--- /dev/null
+++ b/sys-apps/newrelic-sysmond/Manifest
@@ -0,0 +1,6 @@
+AUX newrelic-sysmond.rc 501 SHA256 b9ba2e4c88bdb6e28e697fabc85a964872ce6ea29628ec05f3e0364a073e3c0a SHA512 89096078085eb637b868c67618d5d07e3eb03c4eb2bcd9a48d07f23c72181e7988e3e28d817de30235392c07c0e46383e6695e4b696b3e3c8520b384d57457de WHIRLPOOL f32052d195114128b8ea145e12ad1fc19e1df09b3ae50acfd7ba2ef566ee7999205b3b81d57d5d7d575ca4d20e3fac6b7862923223792a851c0943e72083f7bb
+DIST newrelic-sysmond-1.1.2.124-linux.tar.gz 2177939 SHA256 b77424b5dd98d38537503cfe49d772e9a8c220f436d87682010f03b5d3950b46 SHA512 beda4b9c3fc089a9cd836790a074f886a65980ee7b471d9e5fb54f56f369ef69172f00661962ae57482f2bffbc84bb27f9484dc01ca7b6a3b5d9a4ad7cf8c4b6 WHIRLPOOL 4ab79112c13f7fd00c28f0237ea6453694cf01d5d1ca9c145d4ffc6d152306febfb5108cb8a692b7a3c0906b0b957fbd115b998ca91adf3140f7a059bd6e9f0a
+EBUILD newrelic-sysmond-1.1.2.124-r1.ebuild 1278 SHA256 35e9764a26a40099d0ad6c9944978ee8ac37a38cb937dd8a848ddc635405b305 SHA512 16b39f638df8418a5e6cc1ccdd31f4a064f31e79ac870c146a88ccc5c7a001fbfe54bff65b04a8342c15a69185ecd5c763bf4c587399e7074dd1d5b16bdcbdfc WHIRLPOOL 58e603b53bb41ad88c83e1708227372833eb817922c0e29b3ce15e81026d865217d76a7fb589da319e494094860c5f417ba3feb73af60e6cc88a4eb73bf2131b
+MISC ChangeLog 3233 SHA256 0190aac96ecf2c88ebbed0dd480e4e28f0147df057a17305e30112ba1320ee6b SHA512 3daa1826a284d720fac564f9c0cd9d1737785e71df882d7469b406ce57bb2771a1b9ba4647631e5ca3d2a02e8ba6281f024530a4715c1d41397fa8c08e81d5ae WHIRLPOOL 6b6d13ad52a092e69484615590ce1392eff20ee23d32d863839ca9824e6d9f189a782f3dbd9e5bbde0a25a20d8fda9a9e0201c3088b51144727a517466e5619d
+MISC ChangeLog-2015 1309 SHA256 094bb9750cb80edc8f67b5a504bb5ea0907c9860d71d2fc0c36c4d2c2738a545 SHA512 07fa4bb4f1d540f7e5f8094a1d34a1102c3a6b4c21cba0c59a489521b2cc97ba8b7129e19ac32005192d9aea68da06061fca152eafcee5808dd4393808c9d681 WHIRLPOOL aba579c4820689127c7ca3e090edcb998528714f8348985f2831937747db900e759d8347eae3e6205df656fdad2ba0e54702b4dc476acaec2ea5798f5c3f0299
+MISC metadata.xml 229 SHA256 45148b043ad877191b672c9049482125420e04ba9f58ba0f58f9ed8d5a0bf399 SHA512 77ab994b01460b752cc315a7125c188bc44870f142ce6d1e07b8c598b8feb8747c3c7d83a55dbbc547d454436211e9b7db2dde7792438cb5c2b508c4856eb1b4 WHIRLPOOL 9fa19db2de5598f846d29ffffb8bc32b63f4dad5cda2d69dbf7ba453235c7403f91e275eb09876a3497c06540b2b046a0c582b71385ead059ef2f271c9ce4015
diff --git a/sys-apps/newrelic-sysmond/files/newrelic-sysmond.rc b/sys-apps/newrelic-sysmond/files/newrelic-sysmond.rc
new file mode 100644
index 000000000000..93524da5c95d
--- /dev/null
+++ b/sys-apps/newrelic-sysmond/files/newrelic-sysmond.rc
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting NewRelic System Monitor"
+ start-stop-daemon --start \
+ --user newrelic \
+ --exec /usr/sbin/nrsysmond -- \
+ -c /etc/newrelic/nrsysmond.cfg \
+ -p /var/run/newrelic/nrsysmond.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NewRelic System Monitor"
+ start-stop-daemon --stop --pidfile /var/run/newrelic/nrsysmond.pid
+ eend $?
+}
diff --git a/sys-apps/newrelic-sysmond/metadata.xml b/sys-apps/newrelic-sysmond/metadata.xml
new file mode 100644
index 000000000000..2f51530a73b8
--- /dev/null
+++ b/sys-apps/newrelic-sysmond/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>NewRelic System Monitor</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/newrelic-sysmond/newrelic-sysmond-1.1.2.124-r1.ebuild b/sys-apps/newrelic-sysmond/newrelic-sysmond-1.1.2.124-r1.ebuild
new file mode 100644
index 000000000000..2a3bb22d66bb
--- /dev/null
+++ b/sys-apps/newrelic-sysmond/newrelic-sysmond-1.1.2.124-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+
+DESCRIPTION="NewRelic System Monitor"
+HOMEPAGE="http://www.newrelic.com/"
+SRC_URI="http://download.newrelic.com/server_monitor/archive/${PV}/${P}-linux.tar.gz"
+
+LICENSE="newrelic Apache-2.0 MIT ISC openssl GPL-2"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE=""
+RESTRICT="strip"
+
+S="${WORKDIR}/${P}-linux"
+
+pkg_setup() {
+ enewgroup newrelic
+ enewuser newrelic -1 -1 -1 newrelic
+}
+
+src_install() {
+ if [[ "${ARCH}" == "amd64" ]]; then
+ NR_ARCH="x64"
+ elif [[ "${ARCH}" == "x86" ]]; then
+ NR_ARCH="x86"
+ else
+ die "Unsupported architecture (${ARCH})"
+ fi
+
+ dosbin "scripts/nrsysmond-config"
+ newsbin "daemon/nrsysmond.${NR_ARCH}" "nrsysmond"
+ newinitd "${FILESDIR}/newrelic-sysmond.rc" "newrelic-sysmond"
+
+ keepdir "/etc/newrelic"
+ insinto "/etc/newrelic"
+ doins nrsysmond.cfg
+
+ keepdir "/var/run/newrelic"
+ fowners newrelic.newrelic "/var/run/newrelic"
+ fperms 0775 "/var/run/newrelic"
+
+ keepdir "/var/log/newrelic"
+ fowners newrelic.newrelic "/var/log/newrelic"
+ fperms 0775 "/var/log/newrelic"
+
+ dodoc INSTALL.txt LICENSE.txt
+}
+
+pkg_postinst() {
+ elog "Remember to set your license key via:"
+ elog "$ nrsysmond-config --set license_key=\$YOUR_KEY"
+}
diff --git a/sys-apps/nix/Manifest b/sys-apps/nix/Manifest
new file mode 100644
index 000000000000..3aba3714d34b
--- /dev/null
+++ b/sys-apps/nix/Manifest
@@ -0,0 +1,14 @@
+AUX 60nix-remote-daemon 20 SHA256 0afe41dcbcc67939de658dedac9c305fe4e74978fc804c9ef9dd299d72e6861a SHA512 af3e8a4c0171fb52572d73b7111a07255c7768c765878cfc20e80a481a5a6f5d6c58643b3fdf8d9582bb0b903dee0e228b8e18f3e73d9479879f8f6862142363 WHIRLPOOL 406752b5c25e28c38a32ca5edcb99c8a1f2e3b16ccba2ad4121eb9b1af6844ac186cb0df52b6ffce69c379c6cf53e4680c06bef309d6fca66fe73707f0052c7e
+AUX nix-1.11.12-etc-fixes.patch 1275 SHA256 ecc10dd1291712224560f2424b70120e08d8314541dcbd713b128512a49aa185 SHA512 f449877a92473a0b07f20131195d7cab23341068c370e18b618d7870223bf65d47bf9f96cfdfdb41fe0be2e4390a341bebb2bf5a565ba589d6ba6babbf076a2c WHIRLPOOL d2319df6c0540bb3a2ee060d68c4c022ec417b829c00ec88f1162fba9c3b26e465f1b0d9284819eff59958142589b27706c065694c3b2d5452dbb0a59fc97a30
+AUX nix-1.11.14-etc-fixes.patch 350 SHA256 c2a510768ba263abf2b6a1e48ba1d402d967a5fbb5227906ee4deaeb7995e8e3 SHA512 ec742ca9fedbdbbfbac152303e62ef34457c7e70dcc69954a38d63581c6513670eb66cd4f01048fa848469aa2d6c55dc2109e59fafecae85269a2f13ee2970e1 WHIRLPOOL bf182c28194ac7014bb2bea9523657a1a27097d5e20e28c624a863619060558b524a14b7258ae845598e918ef0d5d83db5753b3a150fd9b117e9aef4980612a2
+AUX nix-1.11.14-glibc-2.26.patch 730 SHA256 464d76a9f76beef25bd972e53a5cb14a2e0f4d86be2cd9bb3ea4b289312a64a5 SHA512 2caae0b32f4be3a8b535e784628d4fc878645198adaa0d5440d768dc01cd3a7e43b11323eb75244d719b2eba0256c80415dcf081cbb05dcbb8250021106e95db WHIRLPOOL 443ae1942ec4f4f24dc53e016a6e0c5c90d78ecb301ae11b1bc6908a194fd9dd51d229e642d02102bafcbb92a76f84eafb1421c7dd3596986e50f4c0c74c36bb
+AUX nix-1.11.6-per-user.patch 554 SHA256 607d846262466e2f1ec4167e1396eab39309bf2c13dea0caeb9b7715d8778722 SHA512 ffc6b03ba9fa8a56cdb40caa271582b8648f9539d8abc69251d16356efa64c93902648bae29d06af938383dbf3be110fdaebbbd4af4635c112bb34d1077cb56a WHIRLPOOL 56540c433cdb420f6f366eb1151f1847593e99aa5771e976695e9f27a530350ac3db8b97176bef62af31505f8c21497cc6e29af34d2b324251230cd79b5d0f61
+AUX nix-1.11.6-respect-CXXFLAGS.patch 164 SHA256 3723f9749504ad5eca69fc7f4864a89c4f0766d20cd13b89a38f638bcc5c8e87 SHA512 2508d26888050bb4099f1654cee91d44405b00ca4dfdd6c1b1cf0f24e004333b106cc461b306404b1d56f41bb928ed1069536c09f9390b5ba287ca70b9bcb0c6 WHIRLPOOL cb03fe5dd3e5b4f5e512652254f4d981f8be4b7c395a1081f26618be02be805cbb331deebd36f88b8c52cfcec48774013120e12fd4021c19e6af67c329fd75ba
+AUX nix-1.11.6-respect-LDFLAGS.patch 2332 SHA256 55c3c294b35361f7f9edcd4eaaa69303f0065973c49c493e9876eb8187bfeea5 SHA512 aefc9b045794038b6513211ecaf18c469b7aa52110fcaa5168a1ca9f9af9b663aa6e90fe27c3c500bf9adc2714a8f73fc5243f3096fabe6bbb7e855e0ae7aa87 WHIRLPOOL 100f870808055e73fb8fd127a875b8332d8fc930a0a9f45dec74ad53f60894420efc001e6bc222d59e240f1b885e3a731d58fedac4dd698ee4a559cab4721e6d
+AUX nix-1.11.6-systemd.patch 394 SHA256 d763ab5f3e9de67b9265d1df77b0cb4eea0784a281035e5f7fdbeabdf572e1f9 SHA512 a5f39652c7fd829f11e75b1e3640a218129cac8a47c15a34b0390f51234fda45b7841e43ec6ed441803405483750ee6b82e7c3f918d22222d1e08a79e359c5dd WHIRLPOOL 571ea677e7265ac6eaca80ab921c0d96900683b5ba2cac11d5defc95508fb308d8e9bc02252850f91510fff2f2f6c10c23f5bf872f42bf4e745cc95645295738
+AUX nix-daemon.initd 369 SHA256 a7eae5bde2fbb0e503948477daa79d7efe3fc1dd3e4ceee2e7f8196536052c4a SHA512 e5a05a9f5efb179ebf3a98e58435a571e87716166a351045be4cbd19423e426cf11ed9b2eb2df6222d00e43e5d38fbed5da579820f776031e3c70de0206f980d WHIRLPOOL 30ca58cf8dfcaae4f68bc4ad75185fc16870a886368203e5ec387d72ee48af7b161cb18f056042dfd5b63d156e8cac4a34f55d937db33e4f83f7256ab9eab6d8
+DIST nix-1.11.14.tar.xz 632260 SHA256 26593c831addf1d40f6b7d131f394cb0f9fbec9e46471369faed16eaa2c4b7e4 SHA512 48ed17a090a161ad35c8e84652566e527f31586184b8722a5536a6d83eee1e81911b6c4d5f0661f57054db6c47b5d8211f2acf47899fbec72f2c4bf8a5262af5 WHIRLPOOL d6db1f452dd5bb430a0e02644af89a3e648f3f0f898b81b60ef4d7b8c8d7c9498c0992c3c33637eafd3ff1d23f55df3b76e1a1da957a0b7066a88e3eff1c35ef
+DIST nix-1.11.15.tar.xz 632544 SHA256 d20f20e45d519f54fae5c61d55eadcf53e6d7cdbde9870eeec80d499f9805165 SHA512 449b3c78b74c776215dfbe9d6d09b96d8c6abf996c69c525073df12d0cffb1a2868890d356fbb52c794e2c6f485018756395625e7b170166f7c6f9e2bdd364d9 WHIRLPOOL 740cdd89aa4d10af8e80329a52299c7333a5820ca4b943c4527b8342c60edf07e9bfaad3378546903e052a66155f974df36ee74f6119926714c5b12d9455f2f4
+EBUILD nix-1.11.14.ebuild 3143 SHA256 8b248ef08db138d0911a01862d76ce25d845a2f22fb6440076b972d0535521b7 SHA512 f7921c26693cacc9c049013592f048fe4d48f2b728b5cee4db91344e4d7057dc5e66194570059ac5cfc7610678b1012bde9eb82ac18d26e78a8189cb22421dee WHIRLPOOL c9244caf0e3ccd9ed3b528a26c90ad3b9fef0a28f4f57ee4d753af67c82126a8044183c3baffb1482710709b9c7040d0b899262ff3ba4dc53356dc41e51dc2f9
+EBUILD nix-1.11.15.ebuild 3097 SHA256 ff7426f036391af3dd7c3822252c04bf7eb3588ed1ed009b0bba95cda7850c7b SHA512 e7f826e5b8fec2d6ce824981e422a2828a08cb8c4d1ccacfc0d1807e72e3ec7ec6a0b7f2d4b2dba8aa7aaf5c0856261899e52ecce1769d62732bc28be0791498 WHIRLPOOL b7cad020f6caab66919e1fa188eeeea67e6bfdd6ea523a1097708cd0883f1c57d81ce8aa1d160b18496fa57c1dc0d614ec636216d7d5bebd178606dd04cdacf3
+MISC metadata.xml 566 SHA256 1e350b6aa72e84abc5d4a32308d6988d059b80a3dfbc555850fc269acc23337d SHA512 93d33392316264e30403abbf79a0bf836ed35f2eaf802f930743cb9f31955f939ac263946b93ee32bba34d2534329d95476e96816d1893747b077b0d9690281c WHIRLPOOL 3b1403c054d6ef3e107f478d2f99c80ee1fc3532489cb5b76479e80eec9e0a8cb73958c8c0f2bde838511b37e99a9adca7d36c6edc2e5093fafde8794039b00c
diff --git a/sys-apps/nix/files/60nix-remote-daemon b/sys-apps/nix/files/60nix-remote-daemon
new file mode 100644
index 000000000000..626058a94d15
--- /dev/null
+++ b/sys-apps/nix/files/60nix-remote-daemon
@@ -0,0 +1 @@
+NIX_REMOTE="daemon"
diff --git a/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch b/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch
new file mode 100644
index 000000000000..1973133e22bd
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch
@@ -0,0 +1,24 @@
+GNU coreutils has '-c' option for formatted output, not -f.
+Don't spam stderr when directory gets created.
+diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in
+index 7f46cc6..386f607 100644
+--- a/scripts/nix-profile-daemon.sh.in
++++ b/scripts/nix-profile-daemon.sh.in
+@@ -15,3 +15,3 @@ export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"
+ mkdir -m 0755 -p $NIX_USER_PROFILE_DIR
+-if test "$(stat -f '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then
++if test "$(stat -c '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then
+ echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2
+@@ -37,3 +37,3 @@ if test -w $HOME; then
+ mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR
+- if test "$(stat -f '%u' $NIX_USER_GCROOTS_DIR)" != "$(id -u)"; then
++ if test "$(stat -c '%u' $NIX_USER_GCROOTS_DIR)" != "$(id -u)"; then
+ echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR" >&2
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 4f09b55..e93ef42 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -5,3 +5,2 @@ if [ -n "$HOME" ]; then
+ if ! [ -L "$NIX_LINK" ]; then
+- echo "creating $NIX_LINK" >&2
+ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
diff --git a/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch b/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch
new file mode 100644
index 000000000000..07962838a224
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch
@@ -0,0 +1,8 @@
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 4f09b55..e93ef42 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -5,3 +5,2 @@ if [ -n "$HOME" ]; then
+ if ! [ -L "$NIX_LINK" ]; then
+- echo "creating $NIX_LINK" >&2
+ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
diff --git a/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch b/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch
new file mode 100644
index 000000000000..44c995e3239e
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch
@@ -0,0 +1,16 @@
+'context' is no more after:
+https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9
+
+'ucontext_t' is the new name.
+diff --git a/src/libmain/stack.cc b/src/libmain/stack.cc
+index 41b617d..695aaad 100644
+--- a/src/libmain/stack.cc
++++ b/src/libmain/stack.cc
+@@ -22,5 +22,5 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx)
+ #if defined(__x86_64__) && defined(REG_RSP)
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP];
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_RSP];
+ #elif defined(REG_ESP)
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_ESP];
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_ESP];
+ #else
diff --git a/sys-apps/nix/files/nix-1.11.6-per-user.patch b/sys-apps/nix/files/nix-1.11.6-per-user.patch
new file mode 100644
index 000000000000..9cea685c59a4
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-per-user.patch
@@ -0,0 +1,11 @@
+By default created symlink poins to a directory not accessible by user.
+Make a symlink the same way NixOS does symlinking.
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 672d1f0..e3b0978 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -6,3 +6,3 @@ if [ -n "$HOME" ]; then
+ echo "creating $NIX_LINK" >&2
+- _NIX_DEF_LINK=@localstatedir@/nix/profiles/default
++ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
+ @coreutils@/ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
diff --git a/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch b/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch
new file mode 100644
index 000000000000..091fdcacba76
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch
@@ -0,0 +1,9 @@
+diff --git a/configure.ac b/configure.ac
+index 3a24053..1b99702 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,4 +57,2 @@ fi
+
+-CFLAGS=
+-CXXFLAGS=
+ AC_PROG_CC
diff --git a/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch b/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..12c094eb6180
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch
@@ -0,0 +1,36 @@
+diff --git a/Makefile.config.in b/Makefile.config.in
+index f0de4da..c82fbfd 100644
+--- a/Makefile.config.in
++++ b/Makefile.config.in
+@@ -5,2 +5,3 @@ CXX = @CXX@
+ CXXFLAGS = @CXXFLAGS@
++LDFLAGS = @LDFLAGS@
+ HAVE_SODIUM = @HAVE_SODIUM@
+diff --git a/mk/libraries.mk b/mk/libraries.mk
+index 3cd7a53..f7bd015 100644
+--- a/mk/libraries.mk
++++ b/mk/libraries.mk
+@@ -88,3 +88,3 @@ define build-library
+ $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) | $$(_d)/
+- $$(trace-ld) $(CXX) -o $$(abspath $$@) -shared $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) $$($(1)_LDFLAGS_UNINSTALLED)
++ $$(trace-ld) $(CXX) -o $$(abspath $$@) -shared $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) $$($(1)_LDFLAGS_UNINSTALLED)
+
+@@ -102,3 +102,3 @@ define build-library
+ $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $(DESTDIR)$$($(1)_INSTALL_DIR)/
+- $$(trace-ld) $(CXX) -o $$@ -shared $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
++ $$(trace-ld) $(CXX) -o $$@ -shared $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
+
+diff --git a/mk/programs.mk b/mk/programs.mk
+index 3ac6449..f553ce2 100644
+--- a/mk/programs.mk
++++ b/mk/programs.mk
+@@ -34,3 +34,3 @@ define build-program
+ $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) | $$(_d)/
+- $$(trace-ld) $(CXX) -o $$@ $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
++ $$(trace-ld) $(CXX) -o $$@ $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
+
+@@ -48,3 +48,3 @@ define build-program
+ $(DESTDIR)$$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $(DESTDIR)$$($(1)_INSTALL_DIR)/
+- $$(trace-ld) $(CXX) -o $$@ $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
++ $$(trace-ld) $(CXX) -o $$@ $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
+
diff --git a/sys-apps/nix/files/nix-1.11.6-systemd.patch b/sys-apps/nix/files/nix-1.11.6-systemd.patch
new file mode 100644
index 000000000000..f890ee6f0470
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-systemd.patch
@@ -0,0 +1,10 @@
+Make 'nix-daemon' a goof unit for 'systemctl enable nix-daemon.service'.
+diff --git a/misc/systemd/nix-daemon.service.in b/misc/systemd/nix-daemon.service.in
+index 5fc04a3..2565520 100644
+--- a/misc/systemd/nix-daemon.service.in
++++ b/misc/systemd/nix-daemon.service.in
+@@ -9 +9,4 @@ ExecStart=@@bindir@/nix-daemon nix-daemon --daemon
+ KillMode=process
++
++[Install]
++WantedBy=multi-user.target
diff --git a/sys-apps/nix/files/nix-daemon.initd b/sys-apps/nix/files/nix-daemon.initd
new file mode 100644
index 000000000000..1fd42734c0a8
--- /dev/null
+++ b/sys-apps/nix/files/nix-daemon.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --background --exec /usr/bin/nix-daemon
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/bin/nix-daemon
+ eend ${?}
+}
diff --git a/sys-apps/nix/metadata.xml b/sys-apps/nix/metadata.xml
new file mode 100644
index 000000000000..ad64c7e5102b
--- /dev/null
+++ b/sys-apps/nix/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 type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <use>
+ <flag name="etc_profile">Install /etc/profile.d/ entry to inject nix support for all users.</flag>
+ <flag name="gc">Enable garbage collection in the Nix expression evaluator (use <pkg>dev-libs/boehm-gc</pkg>).</flag>
+ <flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for cryptography</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/nix/nix-1.11.14.ebuild b/sys-apps/nix/nix-1.11.14.ebuild
new file mode 100644
index 000000000000..55f0dba8e525
--- /dev/null
+++ b/sys-apps/nix/nix-1.11.14.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic readme.gentoo-r1 user
+
+DESCRIPTION="A purely functional package manager"
+HOMEPAGE="https://nixos.org/nix"
+
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+etc_profile +gc doc sodium"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ dev-db/sqlite
+ dev-libs/openssl:0=
+ net-misc/curl
+ sys-libs/libseccomp
+ sys-libs/zlib
+ gc? ( dev-libs/boehm-gc[cxx] )
+ doc? ( dev-libs/libxml2
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ sodium? ( dev-libs/libsodium )
+ dev-lang/perl:=
+ dev-perl/DBD-SQLite
+ dev-perl/WWW-Curl
+ dev-perl/DBI
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-2.6
+ >=sys-devel/flex-2.5.35
+ virtual/perl-ExtUtils-ParseXS
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch
+ "${FILESDIR}"/${PN}-1.11.6-per-user.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.14-glibc-2.26.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS=" Quick start user guide on Gentoo:
+
+[as root] enable nix-daemon service:
+ [systemd] # systemctl enable nix-daemon
+ [openrc] # rc-update add nix-daemon
+[as a user] relogin to get environment and profile update
+[as a user] fetch nixpkgs update:
+ \$ nix-channel --update
+[as a user] install nix packages:
+ \$ nix-env -i mc
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive
+ but please read https://github.com/NixOS/nixpkgs/issues/21820
+
+Next steps:
+ nix package manager user manual: http://nixos.org/nix/manual/
+"
+
+pkg_setup() {
+ enewgroup nixbld
+ for i in {1..10}; do
+ # we list 'nixbld' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
+ done
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/nix/var \
+ $(use_enable gc)
+}
+
+src_compile() {
+ local make_vars=(
+ OPTIMIZE=0 # disable hardcoded -O3
+ V=1 # verbose build
+ )
+ emake "${make_vars[@]}"
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ # here we use an eager variant of something that
+ # is lazily done by nix-daemon and root nix-env
+
+ # TODO: will need a tweak for prefix
+ keepdir /nix/store
+ fowners root:nixbld /nix/store
+ fperms 1775 /nix/store
+
+ keepdir /nix/var/nix/profiles/per-user
+ fperms 1777 /nix/var/nix/profiles/per-user
+
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh
+ keepdir /nix/var/nix/gcroots/per-user
+ fperms 1777 /nix/var/nix/gcroots/per-user
+
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon
+
+ if ! use etc_profile; then
+ rm "${ED}"/etc/profile.d/nix.sh || die
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die
+ fi
+}
+
+pkg_postinst() {
+ if ! use etc_profile; then
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)."
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/nix/nix-1.11.15.ebuild b/sys-apps/nix/nix-1.11.15.ebuild
new file mode 100644
index 000000000000..d4e616516f72
--- /dev/null
+++ b/sys-apps/nix/nix-1.11.15.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic readme.gentoo-r1 user
+
+DESCRIPTION="A purely functional package manager"
+HOMEPAGE="https://nixos.org/nix"
+
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+etc_profile +gc doc sodium"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ dev-db/sqlite
+ dev-libs/openssl:0=
+ net-misc/curl
+ sys-libs/libseccomp
+ sys-libs/zlib
+ gc? ( dev-libs/boehm-gc[cxx] )
+ doc? ( dev-libs/libxml2
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ sodium? ( dev-libs/libsodium )
+ dev-lang/perl:=
+ dev-perl/DBD-SQLite
+ dev-perl/WWW-Curl
+ dev-perl/DBI
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-2.6
+ >=sys-devel/flex-2.5.35
+ virtual/perl-ExtUtils-ParseXS
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch
+ "${FILESDIR}"/${PN}-1.11.6-per-user.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS=" Quick start user guide on Gentoo:
+
+[as root] enable nix-daemon service:
+ [systemd] # systemctl enable nix-daemon
+ [openrc] # rc-update add nix-daemon
+[as a user] relogin to get environment and profile update
+[as a user] fetch nixpkgs update:
+ \$ nix-channel --update
+[as a user] install nix packages:
+ \$ nix-env -i mc
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive
+ but please read https://github.com/NixOS/nixpkgs/issues/21820
+
+Next steps:
+ nix package manager user manual: http://nixos.org/nix/manual/
+"
+
+pkg_setup() {
+ enewgroup nixbld
+ for i in {1..10}; do
+ # we list 'nixbld' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
+ done
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/nix/var \
+ $(use_enable gc)
+}
+
+src_compile() {
+ local make_vars=(
+ OPTIMIZE=0 # disable hardcoded -O3
+ V=1 # verbose build
+ )
+ emake "${make_vars[@]}"
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ # here we use an eager variant of something that
+ # is lazily done by nix-daemon and root nix-env
+
+ # TODO: will need a tweak for prefix
+ keepdir /nix/store
+ fowners root:nixbld /nix/store
+ fperms 1775 /nix/store
+
+ keepdir /nix/var/nix/profiles/per-user
+ fperms 1777 /nix/var/nix/profiles/per-user
+
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh
+ keepdir /nix/var/nix/gcroots/per-user
+ fperms 1777 /nix/var/nix/gcroots/per-user
+
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon
+
+ if ! use etc_profile; then
+ rm "${ED}"/etc/profile.d/nix.sh || die
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die
+ fi
+}
+
+pkg_postinst() {
+ if ! use etc_profile; then
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)."
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/noexec/Manifest b/sys-apps/noexec/Manifest
new file mode 100644
index 000000000000..57b317d6c4d0
--- /dev/null
+++ b/sys-apps/noexec/Manifest
@@ -0,0 +1,5 @@
+DIST noexec-1.1.0.tar.gz 157097 SHA256 452744d3221cefe15b7d22560526d611923ad13fbfc1796486c3af37d8d09a51 SHA512 9a4fac2fd98fb4a0e1e3d9c7e67b76de623ec717f28e0ceade8dd39e2b0ca02f9fae77ebec256964faa05bed38d9cad23300e6606876ba71d64d757708ef648c WHIRLPOOL cc240b8e237ca4a549702f1ebc29acbb8b7c91495ee123d1b792d46ec0b829753b40b06b5ed1f55db110f69c1491d8a71b451849bd80ff95149090882603b714
+EBUILD noexec-1.1.0-r1.ebuild 361 SHA256 597bcef83d89f7ad3aa54a994ab27eee8972634ad1d8a82fa0dbea1b0d0e5cc2 SHA512 2dfbc322eff4e431524269d209973244de41e0ac93a818412ff32fe858ff10b38faf034775974a8fc8011a4b7569615a942af369b2b8729c306d9bfd93e7c018 WHIRLPOOL 265308a07e4b483de196fea905679ef01ad858a1b8364d1dead3abe74e10585238dddebd25e94e07f3f726cfb30d615703d09268265b5eafdd6017cf402492a4
+MISC ChangeLog 2519 SHA256 293bad3b9bed4ee4dc12e1c2f898d483a5a99a965de834e8a562badd64dd96d2 SHA512 696aa6e0a2984fb1198b1f6472d8c203d193dde1db986087c870fea728acb1a01afe3bcf2eb6b4b92a1de0061d38307b4f411fd029feb63e96ae147f97e268e6 WHIRLPOOL 17217f755e8e8e67fa4e506a0815b316c2f69eb80e7bfb902b2c1e155d7dbe9cdf41d51fed1463686e8c48bd3b9057decf31244ac90ae64a49c961f85031a948
+MISC ChangeLog-2015 1009 SHA256 104876acd02a323c0fe2aab438ffff8823be5758b0a2a3c2ddaab1a4b48c48b2 SHA512 193790e39ce33d787066008aac7ec03d4be891ce6afd84a04563498d29aae9921e288db8bc224b442454f0bfc49693f09e649f346f7020aba7e7463fa935f47e WHIRLPOOL f4e8c18189b7d032f51a94066c0c93f3b2691f80ef6659f6a7e9599f4398ead4b8dc6d24ae223d190ad77c9802212c08bcd1112307376cc0aa1d8edc597a0a63
+MISC metadata.xml 243 SHA256 787158cd9f7aaa692a12cb78362430e7b3bcaa7e7bd6e30e4f08c3cd8126571f SHA512 b1f85edcdecd75c132c22ded8c657a6bcb589ca7148ab043907ac4dbc172ba51bdce93dcd3d195eff2e423cd9c4495192125a7cf4f879eb4ba4a5799c69246e7 WHIRLPOOL efd1096aac38addbe7f9c407990fd09b04b7bbc8d7514755580e72abbf626b736f70e9b16ed06a045d7a9d851d1b4baaf2df4ffeafea87f4cf47b177cab58f64
diff --git a/sys-apps/noexec/metadata.xml b/sys-apps/noexec/metadata.xml
new file mode 100644
index 000000000000..6e9a51f0862e
--- /dev/null
+++ b/sys-apps/noexec/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">noexec</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/noexec/noexec-1.1.0-r1.ebuild b/sys-apps/noexec/noexec-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..5e25d33d7981
--- /dev/null
+++ b/sys-apps/noexec/noexec-1.1.0-r1.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="a package for preventing processes from using exec system calls"
+HOMEPAGE="http://noexec.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="sys-libs/glibc"
diff --git a/sys-apps/nvme-cli/Manifest b/sys-apps/nvme-cli/Manifest
new file mode 100644
index 000000000000..e3396ca24e4b
--- /dev/null
+++ b/sys-apps/nvme-cli/Manifest
@@ -0,0 +1,8 @@
+DIST nvme-cli-1.1.tar.gz 207679 SHA256 22883719cbab86d52e8d4755e86ebd70476416e87442385a79b31c981bd60de1 SHA512 339da4385c5e8659a8f3c2e11afadf437d9cdf02c294674e5cc569cd817174c8ccbd4fc8858ce6f5b8f63ccba68790b2140fc87fdf33b7d394b67999ac4afad0 WHIRLPOOL ae1225f7fad83cf2a8a00365cefdcccb251ad4779dd1194accfa4b0e38c4d2460723e4f7843a7cfe04fd2978f9ec507d14cdff8448f3860349eab578fb5d4b82
+DIST nvme-cli-1.2.tar.gz 228964 SHA256 f7ecd8138caba3a6d3a95d871a1ffcef64d77a015d3611e5cf962787bc354221 SHA512 42e31f9c7e5a4e3d5c500844e7a1f599bf52b3d4ea8312b518232ea94940487aa6f191b6711266b6595c8b3bca61f2f269168ca61201fe12e6d47c3a53629b00 WHIRLPOOL aebdefe1406b5b0139d822bc2b597520745cd3b2b779c98186928640e708873db00ef1a5e3a5d4b6820aaf30a968948050c8271094e4ddd872595a6dc9f92d79
+DIST nvme-cli-1.3.tar.gz 236788 SHA256 52eb45c9ef5a529580a3f6f9e02c067695675ac01b8ab8b8e0398c62e8a8646d SHA512 0794e72124e73af619a71dd01879d178ad48d30155326e854fb5447e0bb5b879049a7a0a2e3b5301a0de1207034fbbdca07ecf647ff7d4085d56dc793271b576 WHIRLPOOL 5fd3fabd30f6513bf155385fc7b512c748b6645fda0eb06d3075724929065c93dea43c78b06ac6b8515fb4bca351fb68affe576e1b05fdd3308016330787fa53
+EBUILD nvme-cli-1.1.ebuild 579 SHA256 234e2166b933469b282b9430696eb78bcdd78fa96003c26e927d49d7ca472103 SHA512 cfc6f7bd2f6dbc070c604c4e72ca406e29e2e2d240b14559836054039ae71f5f0eda82e808558115e97e4ac19d29d178c9fa584045ecf60458f1dcb743a62358 WHIRLPOOL 66ecc2952cbcabd6e2128afacff19ff80fd232f7d6cabb88e7412445e05effbe3660413ffc1fc6b1ef3a2425203298af2c510f1be21f2d1e08f8d5f747e9da69
+EBUILD nvme-cli-1.2.ebuild 595 SHA256 9524bb085cae10cbd4f52809ad0197b35c3191c677309db250663f5e35345102 SHA512 5cdc918133b831a3c5c8cb78af07107770e60c2aef399834b3c6c17ba0628986d902d90b22149ab8bc23be341653788e708d1a6dd4f8543001ee569262beacbe WHIRLPOOL 2ec88cdb8e5054e7567378b8362c3a31ebc9da6f70998aafb3b6d5778c15466b0d08863ab7a37782004108c8babd3b47ce4ff812a7289253c1260ab2462c3306
+EBUILD nvme-cli-1.3.ebuild 568 SHA256 2d164c2357c9de25393e3f6805fdd8950fd2310ae0765642108f094a77d2d710 SHA512 db12e2ecfcccab7cadaa134695e5235c98baffe34d76b889e12119a73b49c630fa5a82d6894caacb17dbaadaac4f4536031ef3b4dfeedc01a067999e897c999f WHIRLPOOL 3767862a9f997ddfdaf22e66e7d0a02b404822e906355aa04c1cbac36b36ff0399e5f7d7ece4220d547723e29705dc6e682091df45fddb969e7156186c918d38
+MISC ChangeLog 2331 SHA256 4c7f8e43874a05aef1f6924b03567be28384ed6dc5db8bdf34edf828eaf8aa45 SHA512 298e143843dead41c9494bae946b10f4f20f6eff92792832e22c759869be4ac830a0f18a6b299b7fd98d0e9cb8f2a81d70e76a2f8e7d3ec12ee5ea3d178e33d1 WHIRLPOOL 505d854292de48d4b20de7d7b291c94bd8e353eb136238f9fd4c6b02d5444eb0f4f3170389bf926f405e982c501e7a8b61bbac26fc4133e0cd25fe6c9ed55dbc
+MISC metadata.xml 310 SHA256 0777b5fc46da6e0ae285ebd0038be86e581a7e2dd69db709587c1233c0964ba5 SHA512 f32474bd2f6daa3306a5bcea0ad742c51142823dd6a14a6bd18c8201016c0182d2e87762c66b95882a42d5ff9083813ff995b0774d615745c2a6666c444bf616 WHIRLPOOL 09d1850437b36400efe105068ad2493f5c56aa6aa728e9c0ef5cd137749592b4f628346b4faf6de5d13b4ea0bc68ec87c9a2380b7f9c33665e4563e2ddcc0ac0
diff --git a/sys-apps/nvme-cli/metadata.xml b/sys-apps/nvme-cli/metadata.xml
new file mode 100644
index 000000000000..b267c4856951
--- /dev/null
+++ b/sys-apps/nvme-cli/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 type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">linux-nvme/nvme-cli</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/nvme-cli/nvme-cli-1.1.ebuild b/sys-apps/nvme-cli/nvme-cli-1.1.ebuild
new file mode 100644
index 000000000000..a0714eee9204
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-1.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="udev"
+
+RDEPEND="sys-libs/libcap:=
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ tc-export CC
+ export PREFIX="${EPREFIX}/usr"
+ MAKEOPTS+=" LIBUDEV=$(usex udev 0 1)"
+}
diff --git a/sys-apps/nvme-cli/nvme-cli-1.2.ebuild b/sys-apps/nvme-cli/nvme-cli-1.2.ebuild
new file mode 100644
index 000000000000..d99e37d94066
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-1.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="udev"
+
+RDEPEND="sys-libs/libcap:=
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ tc-export CC
+ export PREFIX="${EPREFIX}/usr"
+ MAKEOPTS+=" LIBUDEV=$(usex udev 0 1)"
+}
diff --git a/sys-apps/nvme-cli/nvme-cli-1.3.ebuild b/sys-apps/nvme-cli/nvme-cli-1.3.ebuild
new file mode 100644
index 000000000000..38e95aa90700
--- /dev/null
+++ b/sys-apps/nvme-cli/nvme-cli-1.3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="NVM-Express user space tooling for Linux"
+HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
+SRC_URI="${HOMEPAGE}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="udev"
+
+RDEPEND="sys-libs/libcap:=
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ tc-export CC
+ export PREFIX="${EPREFIX}/usr"
+ MAKEOPTS+=" LIBUDEV=$(usex udev 0 1)"
+}
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
new file mode 100644
index 000000000000..5be57c7635e8
--- /dev/null
+++ b/sys-apps/openrc/Manifest
@@ -0,0 +1,24 @@
+AUX openrc-9999-msg-style.patch 2775 SHA256 637fc2d13e0940b55b7d4613ebf8ebabdee87a802a2690191c01fd5ee7cb3581 SHA512 ffeaba677106929ed842d38b161a865a6b3bd26e4ed804bf922d7a1e3c749adbf23348a20ca1be44f41cc0abd7d113172f1865d29865f322e30fbac9f9b34cba WHIRLPOOL 3044d94c523ec2a33a2b9cfda5988070d67bfe631c1fba1314eaba5f432e9e4dfcbb307685e326c181c9205dfe12c161568e3707b276ceff2114bd92e9375ec0
+AUX openrc-9999-pause.patch 825 SHA256 ffa34418921d30c589ad762a5d6d7640c37e7279ca19af469912cb9f118cc75d SHA512 ebab7434c5e1b76b882d99d45069de33da07230c9fa9bf28212b18c2742d726aff7be62907964cad9c37b483c25d805dc07d0c5927349f8104fef2f957e69943 WHIRLPOOL 2f633409182e6ab0da4162fcd3a29e928eaad9aa72d008192aa0f4e9532b55492a122c61d9027766a04a766be2c74697624a0f15aaadc273de45cca554c13cd3
+AUX openrc.logrotate 43 SHA256 30a81fb2f761083088d4d6a3d435fc842966d44588e9837b45ffd03e48be6eb6 SHA512 12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec WHIRLPOOL 22e69eb14704cb5a47d176f2bee062267094c345ef17eb21c9c9dfd6e9c0767539f2d71e5720c9ec1ca51a5da5bc21e953961f4dd4aa65eeae2e748609f78ec1
+AUX start-stop-daemon.pam 63 SHA256 2681da17e4a122656b5303b7c7eca82b8fb182641290b153fdbe96b63638086d SHA512 85cf440611b8f87f51bf24bdd9fa03639a75b950f00096d81b8826c21ae85ff9784b8c56b8ddb482e70f08bce933d4561b30750346d51fb2cef3be34acc065cb WHIRLPOOL 4abc9f051155a62d3033258a06003a4ca3909d8104deca84d5c1605bc1c7e56167fd82b2b4b72fe7b707070de98a7628730de1ad3f14b924b5b1480fba5ef854
+DIST openrc-0.27.2.tar.gz 223572 SHA256 4e9c12c77c101b6ea255f1a9291c4c4d228c7ddc8b8ef4aa8d5d6f6900958ea5 SHA512 a3f3ed8f6dbd188065fc4ed0af1e4ca0d203dbad092bc67405bea182be359bf37c9c94cb97d898c0d34befef92e9d8a2f6a8b4bafe7e95fcaa291b5d0aabed22 WHIRLPOOL 4837d2244d5894dfdab0fcc36f791500eada82c0378e944443b4b76c7191abe67d9b3cacf5c6e787ebbfdaff2f8792878b7cb8894e3dbc3ff2444fab6596aeb4
+DIST openrc-0.28.tar.gz 224228 SHA256 9548b03ffc164f75887d810469f0535a16c5c8c2e615e250d5753a16e66cf317 SHA512 a10c293bf4287bcc4ffb9c996cbc1294f979483ea9fb2efb0dd1becee193f49ff114530c078850e8c11cf2c0a812be2e74801352fdbfe313b90cd9af5b8ccf93 WHIRLPOOL d55ae26bef0ebf4c17f484c476c08cefe40d0bdaf55a571bb4cfefaf67248661661eb28936e509c4bbccb2f4a0e36e8d01f7b6ae3dc2b1831f571b26d0ac6223
+DIST openrc-0.29.tar.gz 223275 SHA256 b919c4520e93ba02db24e7766d32688928d5bb0cc8fe2f250277c46274d99927 SHA512 1accc52c3e729432fee433395eb7551fa7913004999c595f6485a0505b7916338df6d9e7d95304e865adf67df54378525a758b34bb67beefe240a90700e4f7d8 WHIRLPOOL 341ae930257f23513fd3582a7e329c48f546d306c467bab3430a8838c343d5697db5941e3590a8f1c33f34a0eefac07f0fb9c0e4a752d1659293374057cc4aea
+DIST openrc-0.30.tar.gz 222383 SHA256 29b4d565bc37f51585c4a9aabedad46d79031861209cbda3a916a0a01c56e0bc SHA512 d1893adc776184cdb9a7ab884250d29357d1e4855f5f1f93577e6ca2ff30f3233d263d237672395caaff6e479bcba5e52c31c9089e8904ed70b40a29f10864cb WHIRLPOOL 68f931a6c8fb141d85217fa8d37e9a0507d583e7fc41a5db78b9700223f52ea06ffb514c19f541b93977609c351872804968fdd2ad0431055283c034c2a89698
+DIST openrc-0.31.1.tar.gz 224059 SHA256 2a5cb07ce64fec2b3fd35c11be6b7dfe383fdc6a5449278c67b2f0af026650cc SHA512 98001e05896d113e20fad27ba100e2db5588262cb9c0b52c2800b38fd320b9baf4a99302044ef4045ba3a746d685d0cc27f8fdb42dccbc0574e32c6db9e6d3d2 WHIRLPOOL 00cb1d252d79700b79828fed6e319c124ae1c89bd10f506ff2f0e36961288c1d9a7366abb19e77f866aaa1695b176ecaad892ddd4b5a26713d084d4744470acd
+DIST openrc-0.31.2.tar.gz 224891 SHA256 6865733e8abeced128537937587e1cecc233227dea4b760c92f3ed6b980341f6 SHA512 c7a43eddd0652b8b9a62914d7aebcb6eab5fbd8f041a25f95c68f15c97eab3d27802a335da3703ce1e9828bd9a4fdc7e7c311075b875164af024c82a181b10df WHIRLPOOL 5e0d1d90d50915bc9a5844a3dba6362504a22612bdd12397c3f830f5407986374f27fb550dabb97b0b6aac5cc661ac40967819582216a14256276db5c9024db6
+DIST openrc-0.31.tar.gz 223966 SHA256 9d1631b647b3b8981dcbb5251f9d2444859c6cf0791c1b6b07469953e657eeee SHA512 2c28daa5b2bfd3c31a2b87b08a7b39dc078ab0224c713a2b738e991f968f07d4761770a813fb449df551d6e3db58ed997ac8bbe210d1fb17b4c88ead859eba7b WHIRLPOOL 929dbd2724b6f6aaeaae1d9bce913068ac94ec3e21aefae859d782ed7f6f2a948042a5371afc3a8f631b10552776225b4b8487a11188847366877bfd12889001
+DIST openrc-0.32.tar.gz 223935 SHA256 d452f5c8dd49a0819de368e7faeb56bd7460f8704cb029d9cc4e0b1dc56e791e SHA512 a355ba31d50b1c58f724d446449a8e31bb6f4c13b2da886880579e2666bcefe612a4eae64732f3ef7549fbfc84f3e088c4ca98e6be30108adfbf0a6d648d2635 WHIRLPOOL 451d9e549a175d14b5ed23c9b16e2cf7815e8cf7e616d964161b1e583e899ad0ac1f7bfe4cc4fccd4e1f5155d1c85f8d77f206d083bc02a0f2ad6a1348ac776f
+EBUILD openrc-0.27.2.ebuild 10132 SHA256 a57f316547b3127cf92a991542579ff962a288625fc6fbfbf7b2f31ce8f7c2e1 SHA512 c63261e84ac5225167034db09feb5772a244de09b2ca084078122b7a968f737dff1eb3a1b8fb76333c7c7f57299bd30ae4c5a49a0ad120459474be30aea360d6 WHIRLPOOL 45fc659935bc090b2ec8568dec93407b8c4a851e73b1138643a4584ef1b3d9e9c485ba1e10a0a303be6825f35f92ee026fc2f640158d3e7c7add3b3f1dcf5a67
+EBUILD openrc-0.28.ebuild 10123 SHA256 850255977878f273ec0fb3f0bfa117f4637dc3507f855e5d549b3eaad904f6f2 SHA512 f32502ebbd8e1a8e13044cd23d8b0e136eaf26e86001ae5f225640f085069c78921392a492614d3d1b734542bb0f99a9c781706158bdf5cd1ec91634d9f89e72 WHIRLPOOL 40fff2659443e04b037a5d722f0380423977c70001cd10076020ea5a6107ab8c7436ea0727ad00a0371a707daa90dda840bd4143ba5e2b180165dcc07fd15186
+EBUILD openrc-0.29.ebuild 10132 SHA256 a57f316547b3127cf92a991542579ff962a288625fc6fbfbf7b2f31ce8f7c2e1 SHA512 c63261e84ac5225167034db09feb5772a244de09b2ca084078122b7a968f737dff1eb3a1b8fb76333c7c7f57299bd30ae4c5a49a0ad120459474be30aea360d6 WHIRLPOOL 45fc659935bc090b2ec8568dec93407b8c4a851e73b1138643a4584ef1b3d9e9c485ba1e10a0a303be6825f35f92ee026fc2f640158d3e7c7add3b3f1dcf5a67
+EBUILD openrc-0.30.ebuild 10132 SHA256 a57f316547b3127cf92a991542579ff962a288625fc6fbfbf7b2f31ce8f7c2e1 SHA512 c63261e84ac5225167034db09feb5772a244de09b2ca084078122b7a968f737dff1eb3a1b8fb76333c7c7f57299bd30ae4c5a49a0ad120459474be30aea360d6 WHIRLPOOL 45fc659935bc090b2ec8568dec93407b8c4a851e73b1138643a4584ef1b3d9e9c485ba1e10a0a303be6825f35f92ee026fc2f640158d3e7c7add3b3f1dcf5a67
+EBUILD openrc-0.31.1.ebuild 10132 SHA256 a57f316547b3127cf92a991542579ff962a288625fc6fbfbf7b2f31ce8f7c2e1 SHA512 c63261e84ac5225167034db09feb5772a244de09b2ca084078122b7a968f737dff1eb3a1b8fb76333c7c7f57299bd30ae4c5a49a0ad120459474be30aea360d6 WHIRLPOOL 45fc659935bc090b2ec8568dec93407b8c4a851e73b1138643a4584ef1b3d9e9c485ba1e10a0a303be6825f35f92ee026fc2f640158d3e7c7add3b3f1dcf5a67
+EBUILD openrc-0.31.2.ebuild 10170 SHA256 3ec2bd57a2c6846d5ae1ad1e32994f7dc8af2b7f7c66b274b8c3edf1d9e6687f SHA512 f3f73a4c8b85902145a350cf83fd80d19c4b8a5ff72d0f67ccdc5132ab7746a70bb7cb6873bf3c0f0f5475effd1204ec55c551a0921e32972bea4f08253aec4e WHIRLPOOL bee86e71f6c2401b1138cfc36efd0d9ca7ba7449471936250ac9ad9d422be08a2e485b527f47ca13717a0cbe767a5a04ed8071cb9c2d41f1c51b5a2c6039f80a
+EBUILD openrc-0.31.ebuild 10132 SHA256 a57f316547b3127cf92a991542579ff962a288625fc6fbfbf7b2f31ce8f7c2e1 SHA512 c63261e84ac5225167034db09feb5772a244de09b2ca084078122b7a968f737dff1eb3a1b8fb76333c7c7f57299bd30ae4c5a49a0ad120459474be30aea360d6 WHIRLPOOL 45fc659935bc090b2ec8568dec93407b8c4a851e73b1138643a4584ef1b3d9e9c485ba1e10a0a303be6825f35f92ee026fc2f640158d3e7c7add3b3f1dcf5a67
+EBUILD openrc-0.32.ebuild 10170 SHA256 3ec2bd57a2c6846d5ae1ad1e32994f7dc8af2b7f7c66b274b8c3edf1d9e6687f SHA512 f3f73a4c8b85902145a350cf83fd80d19c4b8a5ff72d0f67ccdc5132ab7746a70bb7cb6873bf3c0f0f5475effd1204ec55c551a0921e32972bea4f08253aec4e WHIRLPOOL bee86e71f6c2401b1138cfc36efd0d9ca7ba7449471936250ac9ad9d422be08a2e485b527f47ca13717a0cbe767a5a04ed8071cb9c2d41f1c51b5a2c6039f80a
+EBUILD openrc-9999.ebuild 10170 SHA256 3ec2bd57a2c6846d5ae1ad1e32994f7dc8af2b7f7c66b274b8c3edf1d9e6687f SHA512 f3f73a4c8b85902145a350cf83fd80d19c4b8a5ff72d0f67ccdc5132ab7746a70bb7cb6873bf3c0f0f5475effd1204ec55c551a0921e32972bea4f08253aec4e WHIRLPOOL bee86e71f6c2401b1138cfc36efd0d9ca7ba7449471936250ac9ad9d422be08a2e485b527f47ca13717a0cbe767a5a04ed8071cb9c2d41f1c51b5a2c6039f80a
+MISC ChangeLog 18468 SHA256 b0c4464a2179009f3683606b8c9ed6b6f1e5c543e5dee53d0b44e9cd51804d94 SHA512 f1269f5f534a2fb2c5643b8cb5735e969e4bc18f2f8474c23784cfebc92ac72a3ed77f00eafa7430ec2944b4a5476a4688172d9fc47a32eb04bbb43893a80143 WHIRLPOOL a912f296cb7272dded544d045cc9dee06c9319fc500dbdef9e000300c3fc73aaae4e72c7574428ce4dddeedcd2055e594acf315cfa53db95d48aaf20c8a8907a
+MISC ChangeLog-2015 57223 SHA256 df20987356d1c191a7f947374ec43989a1191abae87a47094832785ae87cc012 SHA512 314bdddce280e6a02e6c0bb8e7fc4b52e0fce8ab00ac9669c7d4dc36986017bb220d54ad743651e1b1d65a0b598f9e2f1fe34adfb755592671f4fac00a4a3ee9 WHIRLPOOL cb8531c90fd33e586741997db52abac7883ef4f128c22d60dd78e85eb01cdee6174d566b31a8ed43520e40de887b4223202f38705193215bf4cd8ae91e135c78
+MISC metadata.xml 497 SHA256 15f545b68f671e820e7d5f07f03e35bcb51f864f73d69a78e37fbfbdf8dad41f SHA512 c93291d7caeb45ad2aaebc778795d65fe20666ef125c2382dd07c0d71aace5380f5cc5dd5eb1e3a80b883084f1c91d3635540d5d0451a030ae5649ba74de10fb WHIRLPOOL 4d8fa0fff5366b0f77b42e8821d8dc13271b0a6fd883703f2ddabf84696eaed3ce5c11883896b72ce49052e708e84fb4aff5666408951e2cea488149a09f03ba
diff --git a/sys-apps/openrc/files/openrc-9999-msg-style.patch b/sys-apps/openrc/files/openrc-9999-msg-style.patch
new file mode 100644
index 000000000000..ac325bb79bcf
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-9999-msg-style.patch
@@ -0,0 +1,81 @@
+From 1e307244138c8f650ab37bffa7b3cc3e3b39cd64 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 24 Mar 2008 01:48:19 -0400
+Subject: [PATCH] restore old e* func output
+
+Gentoo has always used the sytle:
+ * moo ... [ ok ]
+Latest openrc now does:
+* moo... [ok]
+
+Realistically, 4 spaces out of 80 on reduced terminals doesn't make any
+sort of realistic difference and it's been just fine for the last 10
+years, so keep the default behavior.
+---
+ src/libeinfo/libeinfo.c | 15 ++++++---------
+ 1 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
+index 8a7613c..234b1af 100644
+--- a/src/libeinfo/libeinfo.c
++++ b/src/libeinfo/libeinfo.c
+@@ -643,7 +643,7 @@ static int EINFO_PRINTF(3, 0)
+ fprintf(f, "\n");
+ if (_eprefix)
+ fprintf(f, "%s%s%s|", _ecolor(f, color), _eprefix, _ecolor(f, ECOLOR_NORMAL));
+- fprintf(f, "%s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL));
++ fprintf(f, " %s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL));
+ retval += _eindent(f);
+ va_copy(ap, va);
+ retval += vfprintf(f, fmt, ap) + 3;
+@@ -800,7 +800,7 @@ ebegin(const char *EINFO_RESTRICT fmt, ...)
+ va_start(ap, fmt);
+ retval = _einfovn(fmt, ap);
+ va_end(ap);
+- retval += printf("...");
++ retval += printf(" ...");
+ if (colour_terminal(stdout))
+ retval += printf("\n");
+ LASTCMD("ebegin");
+@@ -817,7 +817,7 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg)
+ if (!msg)
+ return;
+
+- cols = get_term_columns(fp) - (strlen(msg) + 3);
++ cols = get_term_columns(fp) - (strlen(msg) + 5);
+
+ /* cons25 is special - we need to remove one char, otherwise things
+ * do not align properly at all. */
+@@ -831,18 +831,15 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg)
+ if (term_is_cons25)
+ cols--;
+
+- /* If extra spacing is required around msg, then please change
+- * via a runtime knob and leave this default as is as it saves 2
+- * valuable columns when running on 80 column screens. */
+ if (cols > 0 && colour_terminal(fp)) {
+- fprintf(fp, "%s%s %s[%s%s%s]%s\n", up, tgoto(goto_column, 0, cols),
++ fprintf(fp, "%s%s %s[%s %s %s]%s\n", up, tgoto(goto_column, 0, cols),
+ ecolor(ECOLOR_BRACKET), ecolor(color), msg,
+ ecolor(ECOLOR_BRACKET), ecolor(ECOLOR_NORMAL));
+ } else {
+ if (col > 0)
+ for (i = 0; i < cols - col; i++)
+ fprintf(fp, " ");
+- fprintf(fp, " [%s]\n", msg);
++ fprintf(fp, " [ %s ]\n", msg);
+ }
+ }
+
+@@ -1030,7 +1027,7 @@ ebeginv(const char *EINFO_RESTRICT fmt, ...)
+
+ va_start(ap, fmt);
+ retval = _einfovn(fmt, ap);
+- retval += printf("...");
++ retval += printf(" ...");
+ if (colour_terminal(stdout))
+ retval += printf("\n");
+ va_end(ap);
+--
+1.6.6.rc3
+
diff --git a/sys-apps/openrc/files/openrc-9999-pause.patch b/sys-apps/openrc/files/openrc-9999-pause.patch
new file mode 100644
index 000000000000..bf2c94f8dbec
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-9999-pause.patch
@@ -0,0 +1,29 @@
+From e82772a6b6d4374e81b7e19a593ffdef16753418 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 21 Dec 2009 09:02:35 -0500
+Subject: [PATCH] restore init.d pause option
+
+---
+ src/rc/runscript.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/rc/runscript.c b/src/rc/runscript.c
+index 5939dae..7147902 100644
+--- a/src/rc/runscript.c
++++ b/src/rc/runscript.c
+@@ -1316,6 +1316,12 @@ runscript(int argc, char **argv)
+ prefix = NULL;
+ retval = svc_exec("status", NULL);
+ } else {
++ if (strcmp(optarg, "pause") == 0) {
++ ewarn("WARNING: 'pause' is deprecated; please use '--nodeps stop'");
++ deps = false;
++ optarg = "stop";
++ }
++
+ if (strcmp(optarg, "conditionalrestart") == 0 ||
+ strcmp(optarg, "condrestart") == 0)
+ {
+--
+1.6.6.rc3
+
diff --git a/sys-apps/openrc/files/openrc.logrotate b/sys-apps/openrc/files/openrc.logrotate
new file mode 100644
index 000000000000..5e5e64b9b191
--- /dev/null
+++ b/sys-apps/openrc/files/openrc.logrotate
@@ -0,0 +1,4 @@
+/var/log/rc.log {
+ missingok
+ notifempty
+}
diff --git a/sys-apps/openrc/files/start-stop-daemon.pam b/sys-apps/openrc/files/start-stop-daemon.pam
new file mode 100644
index 000000000000..2127f6a70d57
--- /dev/null
+++ b/sys-apps/openrc/files/start-stop-daemon.pam
@@ -0,0 +1,2 @@
+account required pam_permit.so
+session include system-services
diff --git a/sys-apps/openrc/metadata.xml b/sys-apps/openrc/metadata.xml
new file mode 100644
index 000000000000..def837205561
--- /dev/null
+++ b/sys-apps/openrc/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 type="project">
+ <email>openrc@gentoo.org</email>
+ <name>Gentoo OpenRC Project</name>
+ </maintainer>
+ <use>
+ <flag name="netifrc">enable Gentoo's network stack (net.* scripts)</flag>
+ <flag name="newnet">enable the new network stack (experimental)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">openrc/openrc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/openrc/openrc-0.27.2.ebuild b/sys-apps/openrc/openrc-0.27.2.ebuild
new file mode 100644
index 000000000000..278de480e1f2
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.27.2.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.28.ebuild b/sys-apps/openrc/openrc-0.28.ebuild
new file mode 100644
index 000000000000..85f67e95d70a
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.28.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.29.ebuild b/sys-apps/openrc/openrc-0.29.ebuild
new file mode 100644
index 000000000000..278de480e1f2
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.29.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.30.ebuild b/sys-apps/openrc/openrc-0.30.ebuild
new file mode 100644
index 000000000000..278de480e1f2
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.30.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.31.1.ebuild b/sys-apps/openrc/openrc-0.31.1.ebuild
new file mode 100644
index 000000000000..278de480e1f2
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.31.1.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.31.2.ebuild b/sys-apps/openrc/openrc-0.31.2.ebuild
new file mode 100644
index 000000000000..15376774cd7c
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.31.2.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ >=sys-libs/libselinux-2.6
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ >=sec-policy/selinux-base-policy-2.20170204-r4
+ >=sec-policy/selinux-openrc-2.20170204-r4
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.31.ebuild b/sys-apps/openrc/openrc-0.31.ebuild
new file mode 100644
index 000000000000..278de480e1f2
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.31.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ sys-libs/libselinux
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ sec-policy/selinux-base-policy
+ sec-policy/selinux-openrc
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-0.32.ebuild b/sys-apps/openrc/openrc-0.32.ebuild
new file mode 100644
index 000000000000..15376774cd7c
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.32.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ >=sys-libs/libselinux-2.6
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ >=sec-policy/selinux-base-policy-2.20170204-r4
+ >=sec-policy/selinux-openrc-2.20170204-r4
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/openrc/openrc-9999.ebuild b/sys-apps/openrc/openrc-9999.ebuild
new file mode 100644
index 000000000000..15376774cd7c
--- /dev/null
+++ b/sys-apps/openrc/openrc-9999.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="https://github.com/openrc/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
+ unicode kernel_linux kernel_FreeBSD"
+
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? (
+ sys-auth/pambase
+ virtual/pam
+ )
+ audit? ( sys-process/audit )
+ kernel_linux? (
+ sys-process/psmisc
+ !<sys-process/procps-3.3.9-r2
+ )
+ selinux? (
+ sys-apps/policycoreutils
+ >=sys-libs/libselinux-2.6
+ )
+ !<sys-apps/baselayout-2.1-r1
+ !<sys-fs/udev-init-scripts-27"
+DEPEND="${COMMON_DEPEND}
+ virtual/os-headers
+ ncurses? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ !prefix? (
+ kernel_linux? (
+ >=sys-apps/sysvinit-2.86-r6[selinux?]
+ virtual/tmpfiles
+ )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
+ )
+ selinux? (
+ >=sec-policy/selinux-base-policy-2.20170204-r4
+ >=sec-policy/selinux-openrc-2.20170204-r4
+ )
+"
+
+PDEPEND="netifrc? ( net-misc/netifrc )"
+
+src_prepare() {
+ default
+
+ sed -i 's:0444:0644:' mk/sys.mk || die
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
+ fi
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
+ MKNET=$(usex newnet)
+ MKSELINUX=$(usex selinux)
+ MKAUDIT=$(usex audit)
+ MKPAM=$(usev pam)
+ MKSTATICLIBS=$(usex static-libs)"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install gentoo pam.d files
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
+
+ # install documentation
+ dodoc ChangeLog *.md
+ if use newnet; then
+ dodoc README.newnet
+ fi
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+
+ # these were added in 0.12.
+ if ! has_version ">=sys-apps/openrc-0.12"; then
+ add_boot_init loopback
+ add_boot_init tmpfiles.dev sysinit
+
+ # ensure existing /etc/conf.d/net is not removed
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
+ # this needs to stay in openrc ebuilds for a long time. :(
+ # Added in 0.12.
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then
+ einfo "Modifying conf.d/net to keep it from being removed"
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net
+
+# The network scripts are now part of net-misc/netifrc
+# In order to avoid sys-apps/${P} from removing this file, this comment was
+# added; you can safely remove this comment. Please see
+# /usr/share/doc/netifrc*/README* for more information.
+EOF
+ fi
+ fi
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
+
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then
+ add_boot_init mtab
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
+ ewarn "${EROOT}etc/mtab will be replaced with a"
+ ewarn "symbolic link to /proc/self/mounts on the next"
+ ewarn "reboot."
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
+ ewarn "if you do not want this to happen."
+ fi
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
+ "${EROOT}"etc/runlevels
+ fi
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
+ ewarn "The dependency data could not be migrated to /run/openrc."
+ ewarn "This means you need to reboot your system."
+ fi
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if ! use newnet && ! use netifrc; then
+ ewarn "You have emerged OpenRc without network support. This"
+ ewarn "means you need to SET UP a network manager such as"
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn."
+ ewarn "Or, you have the option of emerging openrc with the newnet"
+ ewarn "use flag and configuring /etc/conf.d/network and"
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces."
+ ewarn
+ fi
+
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
+ ewarn "Please add the network service to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ ewarn
+ fi
+}
diff --git a/sys-apps/opentmpfiles/Manifest b/sys-apps/opentmpfiles/Manifest
new file mode 100644
index 000000000000..85cc910bd004
--- /dev/null
+++ b/sys-apps/opentmpfiles/Manifest
@@ -0,0 +1,9 @@
+DIST opentmpfiles-0.1.1.tar.gz 5626 SHA256 903cdf8eca5ff9577b10fb569cf5f01a132d2c02769ba3536ecf1ba23b05e184 SHA512 9b8bc74c642c42e4591cc98df096f2d74d14acc5e795f49026b37401c795861ffcdf8d505f6e62980bab1cc4ee2b182668bcd5d4f4cea0984b46662643d6a0d5 WHIRLPOOL a2223a5a101b70442e8ac3fa393c93724589738bfe3d899c9843d1f8cfa42db602212771f58e8387083e7e4929dde4b2dc5439eaaf7e071be3e21b6284b81962
+DIST opentmpfiles-0.1.2.tar.gz 5614 SHA256 63f05adca95ea63fa555d371e8a5d74fe633088893be3a63bff2cdabb7b6bb3b SHA512 d86ba71e5fe96d7a8e1999e14b0b99c78e850c42fbfefd203916edca593d0269feaf2252aa01cc35a838906fc2909015430f72cde8370e2d5b1d478a11fe456d WHIRLPOOL ca349478cb0f0ca565c007b8315e7970c84d628edaf7088e53037679cafb46513cb284ac8c30cb383245368185a6ad6e27cd11c36f7c4c299a774fca856b0e4c
+DIST opentmpfiles-0.1.3.tar.gz 5691 SHA256 1fdd4587c62d815296fb4162002cf001e3ed7aae8727d9b4360f527169e6b3be SHA512 fd0b10ebfeb621466edadede50ec6e8f415861ab3b14b833c75bd71f7296e9c091e59144d39e1f9efd342b6d97776cade5a692c941085e33e9651fd885da7121 WHIRLPOOL c91f644a77655267fb8f783c0a11913f442ab9f9c22135d0ccf30dddce544014a083bc1c01e7f20c13630134adf2c51af6c633e7df16e09055c1b48775624e85
+EBUILD opentmpfiles-0.1.1.ebuild 1021 SHA256 6430783b743eff7593f5dc7bb631fa49b34a561cf37f5fa3f66f252efdc6a53c SHA512 77daf26e2de2f40f1f723a58e73fe1e1dbb76b2cd7299e1e6776491792df82aa003ad83d412909aae123d8d781143c5c7d6e1ca745e7f14fe473a968814df083 WHIRLPOOL 8b3013e4a3b1e65d778f2d3dfdf62c060cac13c282ef36b78ba1c9e54c9f52273d455380b1a24e67a9bab66f8e72cedee89a0c57deefdf1e4bcd2447eb19b274
+EBUILD opentmpfiles-0.1.2.ebuild 1120 SHA256 44f20fddccca4efbe04576c6dd14cb8bbbb6da0e1be7082e4078d79858f31611 SHA512 7231a5327564f6471dff75348d85c7d38bb3f8eff50ef55ef38136de21d8139791e6c32e2ef712b37d1faf82f7f08fec47ba41978a6c051cb7fbf3aa4fdfc0de WHIRLPOOL e7d8fa42398169eb15d7b8ebeb2a764787bfd628d324404cebd5a87abaa2ff022a18ac0ed997e308d5db20d116a7cb49995e888965f061d5f8d380da1ec16b1d
+EBUILD opentmpfiles-0.1.3.ebuild 1117 SHA256 7291b548460a3a57d39683772ae86844cec6a282d030816eefe232945af81acb SHA512 40f93a841fbab74d5707d9fdee228a9e146c51d674aa2bf9de022aff1fec2f3b9f3e369d80536c78075c0dd6f596b30110bb97ffce022d4f4bcc9b41b9fb1bc8 WHIRLPOOL dd2f0774f1da85974d3a5e3c0e896857a6252691b5928a6ff4264e5bae58c6a162bd959dfe7d0cee1ef155b77a09aafe87b5a55cfaaf37846f8efff7e197f2cd
+EBUILD opentmpfiles-9999.ebuild 1130 SHA256 0be09a5ce6f5e29695bd7231286ebce9706217e94bd404159b00765d21da07f2 SHA512 c873d8644c5a1c051fd67cb86ddbe08abd9b0338098158ea62e4a51876b0618a9af578db12ed15e5000bede727cfd8e7a54b27b7f10bf8a5b1a6da56b1da3060 WHIRLPOOL 2247ec1b982414635ac53c9f6f0a93d7935ba4415248c9352ccddfd61108e66de48f9138ac0f9532e12f4e44d87c258379fdab40c021c0850f160fa2fe3850b1
+MISC ChangeLog 926 SHA256 a174cb9f84a557a95fa164afce62c07d76a5e7ee22d53d10128d0fd65f070ee3 SHA512 5bc1ce4a6444e477c4678701ae8576e55470f97eb9ca554522dc571668dc41b23384c789782ab6ec9ed1b81553dadc97168c924c0973ea1462840a1cd2d328d8 WHIRLPOOL 8ba811518edc164482e2955ef4e198a2073dbfd4eaafb61f52dc600e0611c34f9462751b2e533f7a188a784254999429f9792532ab26e8cc9a8aa58968db5dee
+MISC metadata.xml 445 SHA256 9933623abf01dc5d715319cf764b7463faa42d3c7b1f4d18c3ec609d725eb58b SHA512 eef375fdacdf78b008c8205a8b1e86eb5715f6a18999df0b71ae81e02a366e052346222d7bbcb05857b2d1c882791972f143881d62ad8a9ca264f73911d10e33 WHIRLPOOL fc95d721016281cf5be166c8f7b1d754e83cfbc01c15a5ab79dfdd1f76137b03b9f8cc2c6c1fab4f0e2b8e018b9484b26c1ced4bf601209a748174e422503f90
diff --git a/sys-apps/opentmpfiles/metadata.xml b/sys-apps/opentmpfiles/metadata.xml
new file mode 100644
index 000000000000..26fecb1eb64b
--- /dev/null
+++ b/sys-apps/opentmpfiles/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 type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>openrc@gentoo.org</email>
+ <name>Gentoo OpenRC Team</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">openrc/opentmpfiles</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/opentmpfiles/opentmpfiles-0.1.1.ebuild b/sys-apps/opentmpfiles/opentmpfiles-0.1.1.ebuild
new file mode 100644
index 000000000000..12148204094e
--- /dev/null
+++ b/sys-apps/opentmpfiles/opentmpfiles-0.1.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openrc/${PN}"
+else
+ SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
+ ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+fi
+
+DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
+HOMEPAGE="https://github.com/openrc/opentmpfiles"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="!<sys-apps/openrc-0.23"
+
+src_install() {
+ default
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+}
diff --git a/sys-apps/opentmpfiles/opentmpfiles-0.1.2.ebuild b/sys-apps/opentmpfiles/opentmpfiles-0.1.2.ebuild
new file mode 100644
index 000000000000..47fc6ab98433
--- /dev/null
+++ b/sys-apps/opentmpfiles/opentmpfiles-0.1.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openrc/${PN}"
+else
+ SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
+ ${P}.tar.gz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86"
+fi
+
+DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
+HOMEPAGE="https://github.com/openrc/opentmpfiles"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="selinux"
+
+RDEPEND="!<sys-apps/openrc-0.23
+ selinux? ( sec-policy/selinux-base-policy )"
+
+src_install() {
+ default
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ if [[ -z $REPLACING_VERSIONS ]]; then
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+ fi
+}
diff --git a/sys-apps/opentmpfiles/opentmpfiles-0.1.3.ebuild b/sys-apps/opentmpfiles/opentmpfiles-0.1.3.ebuild
new file mode 100644
index 000000000000..bb0ba6227193
--- /dev/null
+++ b/sys-apps/opentmpfiles/opentmpfiles-0.1.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openrc/${PN}"
+else
+ SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
+ ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+fi
+
+DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
+HOMEPAGE="https://github.com/openrc/opentmpfiles"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="selinux"
+
+RDEPEND="!<sys-apps/openrc-0.23
+ selinux? ( sec-policy/selinux-base-policy )"
+
+src_install() {
+ default
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ if [[ -z $REPLACING_VERSIONS ]]; then
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+ fi
+}
diff --git a/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild
new file mode 100644
index 000000000000..c96bac4a3db0
--- /dev/null
+++ b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openrc/${PN}"
+else
+ SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
+ ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
+HOMEPAGE="https://github.com/openrc/opentmpfiles"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="selinux"
+
+RDEPEND="!<sys-apps/openrc-0.23
+ selinux? ( sec-policy/selinux-base-policy )"
+
+src_install() {
+ default
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ if [[ -z $REPLACING_VERSIONS ]]; then
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+ fi
+}
diff --git a/sys-apps/osinfo-db-tools/Manifest b/sys-apps/osinfo-db-tools/Manifest
new file mode 100644
index 000000000000..d2819ee72af0
--- /dev/null
+++ b/sys-apps/osinfo-db-tools/Manifest
@@ -0,0 +1,3 @@
+DIST osinfo-db-tools-1.1.0.tar.gz 481935 SHA256 a141cd2fc07c30d84801b5dbf6b11f2c2e708b0e81216277d052ac0b57fe546b SHA512 52e08e67b75fb84c7d7721dd76f1bf09f71c27deffc4d8391234aec939863de4e96cbd8fc9783944b2493fef183518a21ff185ec5a5d9934adc6d3c67bf0f972 WHIRLPOOL e80ff164d6af0aab33ad1b025490893e226c28792b4ba8e585c0a17a8188e05f311268b26048367f8347bf97d31b59f7a523218e7262e8c578d4becebb70a0e5
+EBUILD osinfo-db-tools-1.1.0.ebuild 758 SHA256 e3dcc3169d7002607c826c31c6bbb5d6e5cf555fc2f9ee0d44e8b0be60c44882 SHA512 7525aa39af972b0cdd54ff30cc68d48fd608cc22b8c8bf1d2a3bfdab836b0e69a38c0d326a94266217de812b84e18e6d1192c0c026c075f6af629d3a3f4946b8 WHIRLPOOL e58fd789283eab70d8a45122e85dd5f38671b798019c0572256b4589d4ef62471976fd36b2c1699f143f27bea09030a226a812c7d9c7745811000d6f424c534d
+MISC metadata.xml 249 SHA256 4505b0bfeadff287958620b7dc7b7209699065a8f17139a237a5dd409a726a97 SHA512 c40662134899a5c9f0369a1017806f35adf3280a0b3c91726f7a8ca6012a073a8b471583f5bfb6fe95faac1dcf607e8e2e43f8c91d48ec46f4a8824e2f551506 WHIRLPOOL 333a938ee1d2124595596c572697bf5ebad523a92ba12005cfb12e6bb6270881a94a911f0cc9c1cf2bb571559e8271e07dfd307dabe50058236dbe7103562b92
diff --git a/sys-apps/osinfo-db-tools/metadata.xml b/sys-apps/osinfo-db-tools/metadata.xml
new file mode 100644
index 000000000000..39980802b1da
--- /dev/null
+++ b/sys-apps/osinfo-db-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/osinfo-db-tools/osinfo-db-tools-1.1.0.ebuild b/sys-apps/osinfo-db-tools/osinfo-db-tools-1.1.0.ebuild
new file mode 100644
index 000000000000..99298c8f8751
--- /dev/null
+++ b/sys-apps/osinfo-db-tools/osinfo-db-tools-1.1.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit gnome2
+
+DESCRIPTION="Tools for managing the osinfo database"
+HOMEPAGE="http://libosinfo.org/"
+SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 x86"
+
+# Blocker on old libosinfo as osinfo-db-validate was part of it before
+RDEPEND="
+ >=dev-libs/glib-2.36:2
+ >=dev-libs/libxml2-2.6.0
+ >=app-arch/libarchive-3.0.0:=
+ !<sys-libs/libosinfo-1.0.0
+"
+# perl dep is for pod2man
+# libxslt is checked for in configure.ac, but never used in 1.1.0
+DEPEND="${RDEPEND}
+ >=dev-libs/libxslt-1.0.0
+ virtual/pkgconfig
+ >=dev-util/intltool-0.40.0
+ dev-lang/perl
+"
diff --git a/sys-apps/osinfo-db/Manifest b/sys-apps/osinfo-db/Manifest
new file mode 100644
index 000000000000..1184fd86902a
--- /dev/null
+++ b/sys-apps/osinfo-db/Manifest
@@ -0,0 +1,7 @@
+DIST osinfo-db-20170326.tar.xz 62696 SHA256 348e216cf26f905190de2bef321d2c0d3f3953775370cf6f58b81f4cc40ac7ee SHA512 06470488ea7442f1dacd2309a7c85ec90f05f55ad3b1f138e32e620f13b70addc203710e7c4cac840151899035fe61ca0ca93d73fdfbb7232d1425e9e5a593c5 WHIRLPOOL f4f23f1f14bbd0a1f827e9cf234d7a5ab6df50057fc96ad2633152b538884cf1391c3cb7d74b6c88ced12d192df47f3e479280d61654102ff8289795788f3a84
+DIST osinfo-db-20170423.tar.xz 63508 SHA256 1f21ba0bbee71fefbec9b71a63289f4456aa64b205ed071c0bcd8ca7d21dfa3b SHA512 5ca13ced160f19dced65f3552e17a0379a47a05f1aa3bdd533550022f0023050b6cc1b43b2da6cff3fa10451f81560fbb0db241a11ed072b9f101db1bd301833 WHIRLPOOL a3fe710504ad85cfcd716d4b6d72a09fca428f8260980a9d794cac24cb1a2e25d654a9a299f86414f13b0f72ed3e2d0fa2bc4fb5d67a843b64a8bb8e815ef5a1
+DIST osinfo-db-20170813.tar.xz 64424 SHA256 dc3922822d930947f4a80b24bbc2d2be6c09569215a053bc909f3aa58a18316d SHA512 0ae4906b5c3eb400ca397f0c3baf5146b8197ee2dc712b1b89dd2f443f9505aee208327f008118628407b54ce52390a8b6138425f3f6f974b94f4a8d79955653 WHIRLPOOL 78a2b63cab1fd6980a0d9654b9567950be71b42e5a2030d528aec9039af3394a4dca88e2241c09dcf81976a7228d4668329af27337cc8ef1164d8d5f84e587d6
+EBUILD osinfo-db-20170326.ebuild 657 SHA256 6c0ba87a38cc424ff2d5e1f73613becaad0525bdbac295e3344da845b1dfac3d SHA512 815012453a905dbcd4b641e86af5b52e3aea236b88c0df233d256e7ab35f3a47f3ce8d1e337f1ca5a609a34f0a512e4bcfc0adc2ec7d0f4b45cf807cfb95b954 WHIRLPOOL d12b2eaab4878bd5cfd6c469cec686e84c2d5764a2ed6efa9cebd6f6a566c879252d5eedfb982014a112af5b1800632c38a5ac076270db110dac74d0001104f8
+EBUILD osinfo-db-20170423.ebuild 666 SHA256 9c6de69d52ae268948739fa84ba6eff7598f893e682a1823f7127562a8a23ced SHA512 d01657ba7714a19ee5ff67d00321492a3bfe4711800b19518ae3ad779568ecb2262c312f6b95a56d838ce6cd5bbef0ac629881b90110dbe0d0da0b97f60605c3 WHIRLPOOL 770db9205993f4c67f5ce1f5e05b46c02803c3ace2312511b4034bbd99de5b6ef36ca45b9f82c014af2133baf4b8790050f8bbad2842c4a424c145d4e129bb34
+EBUILD osinfo-db-20170813.ebuild 666 SHA256 9c6de69d52ae268948739fa84ba6eff7598f893e682a1823f7127562a8a23ced SHA512 d01657ba7714a19ee5ff67d00321492a3bfe4711800b19518ae3ad779568ecb2262c312f6b95a56d838ce6cd5bbef0ac629881b90110dbe0d0da0b97f60605c3 WHIRLPOOL 770db9205993f4c67f5ce1f5e05b46c02803c3ace2312511b4034bbd99de5b6ef36ca45b9f82c014af2133baf4b8790050f8bbad2842c4a424c145d4e129bb34
+MISC metadata.xml 249 SHA256 4505b0bfeadff287958620b7dc7b7209699065a8f17139a237a5dd409a726a97 SHA512 c40662134899a5c9f0369a1017806f35adf3280a0b3c91726f7a8ca6012a073a8b471583f5bfb6fe95faac1dcf607e8e2e43f8c91d48ec46f4a8824e2f551506 WHIRLPOOL 333a938ee1d2124595596c572697bf5ebad523a92ba12005cfb12e6bb6270881a94a911f0cc9c1cf2bb571559e8271e07dfd307dabe50058236dbe7103562b92
diff --git a/sys-apps/osinfo-db/metadata.xml b/sys-apps/osinfo-db/metadata.xml
new file mode 100644
index 000000000000..39980802b1da
--- /dev/null
+++ b/sys-apps/osinfo-db/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/osinfo-db/osinfo-db-20170326.ebuild b/sys-apps/osinfo-db/osinfo-db-20170326.ebuild
new file mode 100644
index 000000000000..f27b34e1494a
--- /dev/null
+++ b/sys-apps/osinfo-db/osinfo-db-20170326.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="osinfo database files"
+HOMEPAGE="http://libosinfo.org/"
+SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 x86"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-apps/osinfo-db-tools
+"
+# we don't depend on intltool here, contrary to README, as the tarball already
+# contains the processed results with translations in XML files
+
+src_unpack() { :; }
+
+src_install() {
+ osinfo-db-import --root "${D}" --dir "/usr/share/osinfo" "${DISTDIR}/${A}"
+}
diff --git a/sys-apps/osinfo-db/osinfo-db-20170423.ebuild b/sys-apps/osinfo-db/osinfo-db-20170423.ebuild
new file mode 100644
index 000000000000..719da8f12a56
--- /dev/null
+++ b/sys-apps/osinfo-db/osinfo-db-20170423.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="osinfo database files"
+HOMEPAGE="http://libosinfo.org/"
+SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-apps/osinfo-db-tools
+"
+# we don't depend on intltool here, contrary to README, as the tarball already
+# contains the processed results with translations in XML files
+
+src_unpack() { :; }
+
+src_install() {
+ osinfo-db-import --root "${D}" --dir "/usr/share/osinfo" "${DISTDIR}/${A}"
+}
diff --git a/sys-apps/osinfo-db/osinfo-db-20170813.ebuild b/sys-apps/osinfo-db/osinfo-db-20170813.ebuild
new file mode 100644
index 000000000000..719da8f12a56
--- /dev/null
+++ b/sys-apps/osinfo-db/osinfo-db-20170813.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="osinfo database files"
+HOMEPAGE="http://libosinfo.org/"
+SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-apps/osinfo-db-tools
+"
+# we don't depend on intltool here, contrary to README, as the tarball already
+# contains the processed results with translations in XML files
+
+src_unpack() { :; }
+
+src_install() {
+ osinfo-db-import --root "${D}" --dir "/usr/share/osinfo" "${DISTDIR}/${A}"
+}
diff --git a/sys-apps/pacman/Manifest b/sys-apps/pacman/Manifest
new file mode 100644
index 000000000000..aead3f0385a1
--- /dev/null
+++ b/sys-apps/pacman/Manifest
@@ -0,0 +1,5 @@
+DIST pacman-5.0.2.tar.gz 3361701 SHA256 dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e SHA512 94a8cce1a52d2365a993c72f16537f4dbea6100feb8f22e8782cc7d2c1ef8a525a63f3c40bb183294c0faedcc743e3d806d2fc3c50a21ab9b03df2910039d628 WHIRLPOOL 2419486287d1ce26d97b3ad53513b4699d876cf5823f65b10d60d8f1df6b2150bc1b742677a60891dccc32bb2105a9a9bb10b58950f5403d0bd64859b0b8640b
+EBUILD pacman-5.0.2.ebuild 2282 SHA256 5a8fce3bd79e1b0fd3253920e875bf84ec0e84acd62c73140a2fdfa03da9d19c SHA512 0c881114145f65dee9b9bf8d85a7fd1310a7831c4177a9908f5ca5f3aa146e13d0e21e95acf9c1115c4c6e43acaa2d1fd558174826a74d218f4e87f84ae06f80 WHIRLPOOL a74b8fa87187d3ee22d937b70e2d71f1579cd3e48c876b361b3c48ee583b73130b7f4493b8d47d95c6788dfc49d3e34f95c5fce81622b7851fa663e1261d37ec
+MISC ChangeLog 2435 SHA256 26810ec8f60f84ae82db2eb984c5baaad1dd9e4076186e8828a69a94e77cda49 SHA512 06cb7f8b965bc7f68defd5c8aece4e42a7e36fd683d0ada55cc2763f51edf04bd0b088eead32bdba7c64a226d76adc19f173753309e90ec38655794fd2bcd55a WHIRLPOOL 7c47e10bb06b7816a5664b7b2ed7fd8616a19650f01c89eb36e09155392330fa221fbad95bf51ebe53fe98df889d210af40b06ed7b3f65437e608e1f64ed71fc
+MISC ChangeLog-2015 2764 SHA256 81556673523a44e3506ece515916d6817fb2da67e2bf66a1b9b73070e5936c5b SHA512 050bc1d6055e9d7658f685cf20c5896da296641ea801c4bde46e24ef66912b9066ee308f7121bc4136dafc528a18f43908c131575e1e3017dd435402b62b11ae WHIRLPOOL b2be033315bfbad356fe5812ca716838f543cb08e670985223dea36b81e85aec26080060b56dad43f8d666c60837f1bace8dd60239a9b98399fb9a8076eaf845
+MISC metadata.xml 799 SHA256 e11079a73d41829033ae30503ae71485a8019dfd84705627fd92f0aa1dfd03b6 SHA512 268cdde83c8ed3c9ca7729c8e0348e4fe18cff5bc5e56a492d87c73aaadf50a02afebbf80370a8ae5b570cc6f6d12ea385669747ddedc173506db778c2538533 WHIRLPOOL 593539e3423fdf49606d5ed76ae8f4fc855e0d56e7c7772dc4ac282d1483d95e62b3b43e5996375ad8bbfd0868dd7eacfb07c29eccf805b964f47d982e3ed1f3
diff --git a/sys-apps/pacman/metadata.xml b/sys-apps/pacman/metadata.xml
new file mode 100644
index 000000000000..24ba8965c722
--- /dev/null
+++ b/sys-apps/pacman/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>mailto:pacman-dev@archlinux.org</bugs-to>
+ <changelog>https://git.archlinux.org/pacman.git/tree/NEWS</changelog>
+ <doc>https://www.archlinux.org/pacman/</doc>
+ </upstream>
+ <maintainer type="person">
+ <email>holgersson@posteo.de</email>
+ <name>Nils Freydank</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="doc">Install extended documentation using <pkg>app-doc/doxygen</pkg>. (Man pages are included by default.)</flag>
+ <flag name="gpg">Enable GPG signature verification using <pkg>app-crypt/gpgme</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/pacman/pacman-5.0.2.ebuild b/sys-apps/pacman/pacman-5.0.2.ebuild
new file mode 100644
index 000000000000..2cea26f9fc53
--- /dev/null
+++ b/sys-apps/pacman/pacman-5.0.2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+
+DESCRIPTION="Archlinux's binary package manager"
+HOMEPAGE="https://archlinux.org/pacman/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.archlinux.org/pacman.git"
+else
+ SRC_URI="https://sources.archlinux.org/other/pacman/${P}.tar.gz"
+ # Do *not* re-add ~x86!
+ # https://www.archlinux.org/news/phasing-out-i686-support/
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="curl debug doc +gpg"
+COMMON_DEPEND="app-arch/libarchive:=[lzma]
+ gpg? ( >=app-crypt/gpgme-1.4.0:= )
+ dev-libs/openssl:0=
+ curl? ( net-misc/curl )
+ virtual/libiconv
+ virtual/libintl"
+RDEPEND="${COMMON_DEPEND}"
+# create manpages *everytime*
+DEPEND="${COMMON_DEPEND}
+ app-text/asciidoc
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ # Remove a line that adds -Werror in ./configure when --enable-debug
+ # is passed:
+ sed -i -e '/-Werror/d' configure.ac || die
+
+ default
+}
+
+src_configure() {
+ local myeconfargs=(
+ --localstatedir=/var
+ --disable-git-version
+ --with-openssl
+ # Help protect user from shooting his/her Gentoo installation
+ # in its foot.
+ --with-root-dir="${EPREFIX}/var/chroot/archlinux"
+ $(use_enable debug)
+ # build always manpages
+ --with-doc
+ # full doc with doxygen
+ $(use_enable doc doxygen)
+ $(use_with curl libcurl)
+ $(use_with gpg gpgme)
+ )
+ econf "${myeconfargs[@]}"
+}
+src_install() {
+ dodir /etc/pacman.d/
+ default
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "The default root dir was set to ${EPREFIX}/var/chroot/archlinux"
+ einfo "to avoid breaking Gentoo systems due to oscitancy."
+ einfo "You need to create this path by yourself (or choose another via"
+ einfo "pacman’s parameter -r|--root)."
+ einfo ""
+ einfo ""
+ einfo "You will need to setup at least one mirror in /etc/pacman.d/mirrorlist."
+ einfo "Please generate it manually according to the Archlinux documentation:"
+ einfo "https://wiki.archlinux.org/index.php/Mirror"
+ einfo ""
+ einfo ""
+ einfo "Archlinux is dropping support for x86 (i686 called there) entirely"
+ einfo "in Nov 2017. Keep this in mind when setting up new systems."
+ einfo "For more details see"
+ einfo "https://www.archlinux.org/news/phasing-out-i686-support"
+ einfo ""
+}
diff --git a/sys-apps/paludis/Manifest b/sys-apps/paludis/Manifest
new file mode 100644
index 000000000000..5dcff3afe07c
--- /dev/null
+++ b/sys-apps/paludis/Manifest
@@ -0,0 +1,8 @@
+DIST paludis-2.6.0.tar.bz2 1885055 SHA256 bde018c89fce95c2cc793d9171e5a51748ad682d06f839fab394e233257aaf4c SHA512 78a9c0a19703dbbc07934de389b749ab83365454e29b19c323d6c03304162e35ff4d92f7ac1f28067ad853057f2422be43418b3c6a57a193c4b8dd5a4e81eba4 WHIRLPOOL dc4f4ecad0ccbb4b8e6b1b4d0a2c71772b5be244f09dc5456fe42d5510b6b7432ca087f99ae86b2bbbd05b18f70a15371dca1193ead556751faffd01ef227dd6
+DIST paludis-3.0.0_pre20170219.tar.xz 1004380 SHA256 02b9f5e270edc31b967f58615390b3a6c8268ee000d4d1c093aa04651c4e5681 SHA512 46b970c3585aeba1151442256850d4ad1acd28ca911277459d84dfe2fa480c310e5a9cde83baa7f185a76837b84959ec2d01ee9c4f85ba4a9664993b82d61eb6 WHIRLPOOL 8e2384cca652e71bfb5620ed6e6f6b33568342dec1fa2b8403f9074ca83e3a71106de5061cf08240db91fe34d1c779e689bb8057d18a75cabfe641af2d3eb747
+EBUILD paludis-2.6.0.ebuild 3765 SHA256 f2fbe43ec2e715b3b6418325050d8ce855441b2cf3cd0bbc8f3ddaf4a3f0bb99 SHA512 585d750b8e8d6c48f8260acaeee567771adfa12cea0f8bfc7b7b069c280d29fd2d28784856c002f8ba51c3eb4e40835fe86b775cb3a6c35361aec37006ed300c WHIRLPOOL db3926f89b4019fffe8ced33a720fd0d72443751d3b0f11c2b120028b9874d05accbe4d8f9c332b2909bb787351e5abbafdcd42b2c2dbec4e3bad0833452a52e
+EBUILD paludis-3.0.0_pre20170219.ebuild 3766 SHA256 85b630a4f1e8dacab093afd56711aea3c26f0864bea12d8c383efd513e7e8968 SHA512 23cf386093f2f0c59d706b8a166550600dfc677e58986636846c0f180ed59629868f2a3d4c73df3d4bad00550ccaa5e22cddcbdfdf8195b9a15665db99cfa365 WHIRLPOOL fad8ae221b5b9be16430851f1e08fa145adc65e3e994cbb68ab2c453164e93f1f1e2606c053a234829d4410a8c77615929745741a0d84d737578b35d4516e582
+EBUILD paludis-9999.ebuild 3621 SHA256 848cd527c5f2d77878796a0de4378ec82b6e937395bfa5f179a6b1948a5cb599 SHA512 0e10e521b42d36c471fc8afaa59c5e7b6d380e32426bbd69f33568af445afdd42a3f0d4cd10c1448b40e7f2bac8783920dc93c5e78e80ca43b234b5fcf071014 WHIRLPOOL aee3869301770a0188744cbd453556af938872af596861887eb278bd9cf754067a5065aeffa84ec04983ce6509b974a82aeafa572164f3426c47151c99801f8a
+MISC ChangeLog 5959 SHA256 4018cab68a86f029bccc207bc84b15ae4502823335bc14f8265591f6bd1df0a1 SHA512 6e432a3a695e60a4380daf1741e4fd218fe3fed7a548622f13fc07cfa7b73ead4145c52879f3a722e81050005f2521afad3a036d4541dd7ebf0c623a108564ab WHIRLPOOL 34f5497ed1e1d62cb40c18b07d071a657f79fe94f23bca5037e0e7bb8f33aa3698edfb5b1ef61f30b982e111bfd86bf51f3517a4cf54e47ed88a98bdecb0efb7
+MISC ChangeLog-2015 40901 SHA256 53512c036950cc0304a1714a2a7b116940c4b14057137058e1ba778d0152e98f SHA512 d7e9b4646d3d450bfa8e74690b55cb8f56c1aa4a62d9fe1f3add02819955de39d563cf7878f09b54bce5d188f2cb41e83dd6839cf91205aebbd3322c3e09ae7b WHIRLPOOL 2ebd68e3f12f72b448dc5c71d2fb3529df4e1d7af81bad24844ae5010028340eff8686861d3b61a5f5cd396d157effe6b02832213e776c1efabde3f91ee6423b
+MISC metadata.xml 706 SHA256 c45c21c0c85d887b499d8c6b5576ae41c39ac7593c80529d06c61afb962c9e33 SHA512 ab32599364fb289dc43d8dc1574ee472585f014c663d2c80209700596b455e074346ab35e69bd05fee86a451902852790f1bb9dcd37f2118e8e8bc24b90a01ec WHIRLPOOL d35b406e15b8de19ff12cdebc8702e1a482228358b37da2b47f58f43986b895e9097a4f2332e5779051095ebe98aae9efcf43e5ca30851f79e6633a953f43e6e
diff --git a/sys-apps/paludis/metadata.xml b/sys-apps/paludis/metadata.xml
new file mode 100644
index 000000000000..40fe886164f8
--- /dev/null
+++ b/sys-apps/paludis/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="pbins">Enable binary package support. Adds dependency upon
+ <pkg>app-arch/libarchive</pkg></flag>
+ <flag name="pink">Use a less boring colourscheme than the default</flag>
+ <flag name="search-index">Enable cave search --index. Requires
+ <pkg>dev-db/sqlite</pkg>.</flag>
+ <flag name="xml">Build xml things for metadata.xml and GLSA support
+ (needs <pkg>dev-libs/libxml2</pkg>).</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/paludis/paludis-2.6.0.ebuild b/sys-apps/paludis/paludis-2.6.0.ebuild
new file mode 100644
index 000000000000..3b42a102df75
--- /dev/null
+++ b/sys-apps/paludis/paludis-2.6.0.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+# matching profile defaults for now
+RUBY_VER=2.2
+
+inherit bash-completion-r1 eutils python-single-r1 user
+
+DESCRIPTION="paludis, the other package mangler"
+HOMEPAGE="http://paludis.exherbo.org/"
+SRC_URI="http://paludis.exherbo.org/download/${P}.tar.bz2"
+
+IUSE="doc pbins pink python ruby ruby_targets_ruby${RUBY_VER/./} search-index test +xml"
+LICENSE="GPL-2 vim"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86"
+
+COMMON_DEPEND="
+ >=app-admin/eselect-1.2.13
+ >=app-shells/bash-3.2:0
+ dev-libs/libpcre[cxx]
+ sys-apps/file
+ pbins? ( >=app-arch/libarchive-3.1.2 )
+ python? (
+ ${PYTHON_DEPS}
+ <dev-libs/boost-1.63[python,${PYTHON_USEDEP}] )
+ ruby? ( dev-lang/ruby:${RUBY_VER} )
+ search-index? ( >=dev-db/sqlite-3 )
+ xml? ( >=dev-libs/libxml2-2.6 )"
+
+DEPEND="${COMMON_DEPEND}
+ >=app-text/asciidoc-8.6.3
+ app-text/htmltidy
+ app-text/xmlto
+ >=sys-devel/gcc-4.7
+ doc? (
+ app-doc/doxygen
+ python? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ ruby? ( dev-ruby/syntax[ruby_targets_ruby${RUBY_VER/./}] )
+ )
+ virtual/pkgconfig
+ test? ( >=dev-cpp/gtest-1.6.0-r1 )"
+
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/sandbox"
+
+PDEPEND="app-eselect/eselect-package-manager"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ ruby? ( ruby_targets_ruby${RUBY_VER/./} )"
+RESTRICT="!test? ( test )"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if id paludisbuild >/dev/null 2>/dev/null ; then
+ if ! groups paludisbuild | grep --quiet '\<tty\>' ; then
+ eerror "The 'paludisbuild' user is now expected to be a member of the"
+ eerror "'tty' group. You should add the user to this group before"
+ eerror "upgrading Paludis."
+ die "Please add paludisbuild to tty group"
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ enewgroup "paludisbuild"
+ enewuser "paludisbuild" -1 -1 "/var/tmp/paludis" "paludisbuild,tty"
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Fix the script shebang on Ruby scripts.
+ # https://bugs.gentoo.org/show_bug.cgi?id=439372#c2
+ sed -i -e "1s/ruby/&${RUBY_VER/./}/" ruby/demos/*.rb || die
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=(
+ --htmldir=/usr/share/doc/${PF}/html
+
+ $(use_enable doc doxygen)
+ $(use_enable test gtest)
+ $(use_enable pbins)
+ $(use_enable pink)
+ $(use_enable python)
+ $(use python && use_enable doc python-doc)
+ $(use_enable ruby)
+ $(use ruby && use_enable doc ruby-doc)
+ --with-ruby-version="${RUBY_VER}"
+ $(use_enable search-index)
+ $(use_enable xml)
+
+ --enable-vim
+ --with-config-framework=eselect
+ --with-environments=default,portage
+ --with-vim-install-dir=/usr/share/vim/vimfiles
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ dobashcomp bash-completion/cave
+
+ insinto /usr/share/zsh/site-functions
+ doins zsh-completion/_cave
+}
+
+src_test() {
+ # Work around Portage bugs
+ local -x PALUDIS_DO_NOTHING_SANDBOXY="portage sucks"
+ local -x BASH_ENV=/dev/null
+
+ if [[ ${EUID} == 0 ]] ; then
+ # hate
+ local -x PALUDIS_REDUCED_UID=0
+ local -x PALUDIS_REDUCED_GID=0
+ fi
+
+ if ! nonfatal emake -k check ; then
+ eerror "Tests failed. Looking for files for you to add to your bug report..."
+ find "${S}" -type f -name '*.epicfail' -or -name '*.log' | while read a ; do
+ eerror " $a"
+ done
+ die "Make check failed"
+ fi
+}
+
+pkg_postinst() {
+ local pm
+ if [[ -f ${ROOT}/etc/env.d/50package-manager ]] ; then
+ pm=$( source "${ROOT}"/etc/env.d/50package-manager ; echo "${PACKAGE_MANAGER}" )
+ fi
+
+ if [[ ${pm} != paludis ]] ; then
+ elog "If you are using paludis or cave as your primary package manager,"
+ elog "you should consider running:"
+ elog " eselect package-manager set paludis"
+ fi
+}
diff --git a/sys-apps/paludis/paludis-3.0.0_pre20170219.ebuild b/sys-apps/paludis/paludis-3.0.0_pre20170219.ebuild
new file mode 100644
index 000000000000..ce2a66279840
--- /dev/null
+++ b/sys-apps/paludis/paludis-3.0.0_pre20170219.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+RUBY_VER=2.3
+
+inherit bash-completion-r1 cmake-utils python-single-r1 user vcs-snapshot
+
+DESCRIPTION="paludis, the other package mangler"
+HOMEPAGE="http://paludis.exherbo.org/"
+SRC_URI="https://git.exherbo.org/paludis/paludis.git/snapshot/paludis-1bbd4440fe4fb82a9ebd61d3f17b9ffa259eb17f.tar.xz
+ -> ${P}.tar.xz"
+
+IUSE="doc pbins pink python ruby ruby_targets_ruby${RUBY_VER/./} search-index test +xml"
+LICENSE="GPL-2 vim"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+COMMON_DEPEND="
+ >=app-admin/eselect-1.2.13
+ >=app-shells/bash-3.2:0
+ dev-libs/libpcre:=[cxx]
+ sys-apps/file:=
+ pbins? ( >=app-arch/libarchive-3.1.2:= )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/boost-1.41.0:=[python,${PYTHON_USEDEP}] )
+ ruby? ( dev-lang/ruby:${RUBY_VER} )
+ search-index? ( >=dev-db/sqlite-3:= )
+ xml? ( >=dev-libs/libxml2-2.6:= )"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=app-text/asciidoc-8.6.3
+ app-text/htmltidy
+ app-text/xmlto
+ >=sys-devel/gcc-4.7
+ doc? (
+ app-doc/doxygen
+ python? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ ruby? ( dev-ruby/syntax[ruby_targets_ruby${RUBY_VER/./}] )
+ )
+ virtual/pkgconfig
+ test? ( >=dev-cpp/gtest-1.6.0-r1 )"
+
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/sandbox"
+
+PDEPEND="app-eselect/eselect-package-manager"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ ruby? ( ruby_targets_ruby${RUBY_VER/./} )"
+RESTRICT="!test? ( test )"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if id paludisbuild >/dev/null 2>/dev/null ; then
+ if ! groups paludisbuild | grep --quiet '\<tty\>' ; then
+ eerror "The 'paludisbuild' user is now expected to be a member of the"
+ eerror "'tty' group. You should add the user to this group before"
+ eerror "upgrading Paludis."
+ die "Please add paludisbuild to tty group"
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ enewgroup "paludisbuild"
+ enewuser "paludisbuild" -1 -1 "/var/tmp/paludis" "paludisbuild,tty"
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Fix the script shebang on Ruby scripts.
+ # https://bugs.gentoo.org/show_bug.cgi?id=439372#c2
+ sed -i -e "1s/ruby/&${RUBY_VER/./}/" ruby/demos/*.rb || die
+
+ eapply_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DOXYGEN=$(usex doc)
+ -DENABLE_GTEST=$(usex test)
+ -DENABLE_PBINS=$(usex pbins)
+ -DENABLE_PYTHON=$(usex python)
+ -DENABLE_PYTHON_DOCS=$(usex doc) # USE=python implicit
+ -DENABLE_RUBY=$(usex ruby)
+ -DENABLE_RUBY_DOCS=$(usex doc) # USE=ruby implicit
+ -DENABLE_SEARCH_INDEX=$(usex search-index)
+ -DENABLE_VIM=ON
+ -DENABLE_XML=$(usex xml)
+
+ -DPALUDIS_COLOUR_PINK=$(usex pink)
+ -DRUBY_VERSION=${RUBY_VER}
+ -DPALUDIS_ENVIRONMENTS=all
+ -DPALUDIS_DEFAULT_DISTRIBUTION=gentoo
+ -DPALUDIS_CLIENTS=all
+ -DCONFIG_FRAMEWORK=eselect
+
+ # GNUInstallDirs
+ -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dobashcomp bash-completion/cave
+
+ insinto /usr/share/zsh/site-functions
+ doins zsh-completion/_cave
+}
+
+src_test() {
+ # Work around Portage bugs
+ local -x PALUDIS_DO_NOTHING_SANDBOXY="portage sucks"
+ local -x BASH_ENV=/dev/null
+
+ if [[ ${EUID} == 0 ]] ; then
+ # hate
+ local -x PALUDIS_REDUCED_UID=0
+ local -x PALUDIS_REDUCED_GID=0
+ fi
+
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ local pm
+ if [[ -f ${ROOT}/etc/env.d/50package-manager ]] ; then
+ pm=$( source "${ROOT}"/etc/env.d/50package-manager ; echo "${PACKAGE_MANAGER}" )
+ fi
+
+ if [[ ${pm} != paludis ]] ; then
+ elog "If you are using paludis or cave as your primary package manager,"
+ elog "you should consider running:"
+ elog " eselect package-manager set paludis"
+ fi
+}
diff --git a/sys-apps/paludis/paludis-9999.ebuild b/sys-apps/paludis/paludis-9999.ebuild
new file mode 100644
index 000000000000..89cf081c10bc
--- /dev/null
+++ b/sys-apps/paludis/paludis-9999.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://git.exherbo.org/git/paludis/paludis.git"
+PYTHON_COMPAT=( python2_7 )
+RUBY_VER=2.3
+
+inherit bash-completion-r1 cmake-utils git-r3 python-single-r1 user
+
+DESCRIPTION="paludis, the other package mangler"
+HOMEPAGE="http://paludis.exherbo.org/"
+SRC_URI=""
+
+IUSE="doc pbins pink python ruby ruby_targets_ruby${RUBY_VER/./} search-index test +xml"
+LICENSE="GPL-2 vim"
+SLOT="0"
+KEYWORDS=""
+
+COMMON_DEPEND="
+ >=app-admin/eselect-1.2.13
+ >=app-shells/bash-3.2:0
+ dev-libs/libpcre:=[cxx]
+ sys-apps/file:=
+ pbins? ( >=app-arch/libarchive-3.1.2:= )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/boost-1.41.0:=[python,${PYTHON_USEDEP}] )
+ ruby? ( dev-lang/ruby:${RUBY_VER} )
+ search-index? ( >=dev-db/sqlite-3:= )
+ xml? ( >=dev-libs/libxml2-2.6:= )"
+
+DEPEND="${COMMON_DEPEND}
+ >=app-text/asciidoc-8.6.3
+ app-text/htmltidy
+ app-text/xmlto
+ >=sys-devel/gcc-4.7
+ doc? (
+ app-doc/doxygen
+ python? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ ruby? ( dev-ruby/syntax[ruby_targets_ruby${RUBY_VER/./}] )
+ )
+ virtual/pkgconfig
+ test? ( >=dev-cpp/gtest-1.6.0-r1 )"
+
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/sandbox"
+
+PDEPEND="app-eselect/eselect-package-manager"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ ruby? ( ruby_targets_ruby${RUBY_VER/./} )"
+RESTRICT="!test? ( test )"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if id paludisbuild >/dev/null 2>/dev/null ; then
+ if ! groups paludisbuild | grep --quiet '\<tty\>' ; then
+ eerror "The 'paludisbuild' user is now expected to be a member of the"
+ eerror "'tty' group. You should add the user to this group before"
+ eerror "upgrading Paludis."
+ die "Please add paludisbuild to tty group"
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ enewgroup "paludisbuild"
+ enewuser "paludisbuild" -1 -1 "/var/tmp/paludis" "paludisbuild,tty"
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Fix the script shebang on Ruby scripts.
+ # https://bugs.gentoo.org/show_bug.cgi?id=439372#c2
+ sed -i -e "1s/ruby/&${RUBY_VER/./}/" ruby/demos/*.rb || die
+
+ eapply_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DOXYGEN=$(usex doc)
+ -DENABLE_GTEST=$(usex test)
+ -DENABLE_PBINS=$(usex pbins)
+ -DENABLE_PYTHON=$(usex python)
+ -DENABLE_PYTHON_DOCS=$(usex doc) # USE=python implicit
+ -DENABLE_RUBY=$(usex ruby)
+ -DENABLE_RUBY_DOCS=$(usex doc) # USE=ruby implicit
+ -DENABLE_SEARCH_INDEX=$(usex search-index)
+ -DENABLE_VIM=ON
+ -DENABLE_XML=$(usex xml)
+
+ -DPALUDIS_COLOUR_PINK=$(usex pink)
+ -DRUBY_VERSION=${RUBY_VER}
+ -DPALUDIS_ENVIRONMENTS=all
+ -DPALUDIS_DEFAULT_DISTRIBUTION=gentoo
+ -DPALUDIS_CLIENTS=all
+ -DCONFIG_FRAMEWORK=eselect
+
+ # GNUInstallDirs
+ -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dobashcomp bash-completion/cave
+
+ insinto /usr/share/zsh/site-functions
+ doins zsh-completion/_cave
+}
+
+src_test() {
+ # Work around Portage bugs
+ local -x PALUDIS_DO_NOTHING_SANDBOXY="portage sucks"
+ local -x BASH_ENV=/dev/null
+
+ if [[ ${EUID} == 0 ]] ; then
+ # hate
+ local -x PALUDIS_REDUCED_UID=0
+ local -x PALUDIS_REDUCED_GID=0
+ fi
+
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ local pm
+ if [[ -f ${ROOT}/etc/env.d/50package-manager ]] ; then
+ pm=$( source "${ROOT}"/etc/env.d/50package-manager ; echo "${PACKAGE_MANAGER}" )
+ fi
+
+ if [[ ${pm} != paludis ]] ; then
+ elog "If you are using paludis or cave as your primary package manager,"
+ elog "you should consider running:"
+ elog " eselect package-manager set paludis"
+ fi
+}
diff --git a/sys-apps/paxctl/Manifest b/sys-apps/paxctl/Manifest
new file mode 100644
index 000000000000..5b4a5ce1eb42
--- /dev/null
+++ b/sys-apps/paxctl/Manifest
@@ -0,0 +1,9 @@
+DIST paxctl-0.7.tar.bz2 7642 SHA256 f7077784ca5695bf74061e6f66b86db855e0dcaa1fc94e6251f6ecd0b879cdc8 SHA512 d715d7466c5d5b402a7b6c44257b959c81234b8b72dc3bad4ad1080f66da784b348e73fadd3b2072ddec6c6b08f042a35cbf9d63cb890ef9efceb1e2e8d56d0a WHIRLPOOL f8bec0f10f134021fb1f6ca201719e4ad8893e07f81e7e0fa5c835cde423d2fe726cfab7f122352cfcd0788a3cfe415b8c754f65502a701f5adbc60c87959cf8
+DIST paxctl-0.8.tar.gz 8027 SHA256 b5022768ed011a95bfe1770804349bf22a6973220997687d9a9ac58263aeef80 SHA512 9357601a96a7780bf900621e8b88e8e7cd323159084f62f30cd6967319fffabe08efff3596612fd05a1daf639610bb15d998f4a954c980ab4f45c9a0cc80037c WHIRLPOOL 52e107950d8efd107e22d2a25a8edf97d79dda832b9c222493d1c7dd693846da6dd5b287fc90bc6eb7034686f654159fdb5422df97026da182b7e97537f2be36
+DIST paxctl-0.9.tar.gz 8109 SHA256 a330ddd812688169802a3ba29e5e3b19956376b8f6f73b8d7e9586eb04423c2e SHA512 4048544bd05ed6eb37866034ade8482b8d017110ed9a639f220e8d2e32bb3dfb6c913a986c8fd41829e88efa793f7552eaa2a6d6b2af533c44a5754a5ab8650f WHIRLPOOL a117a73a9dd3e256da0d0f2a4b7a103af212e4522498909bc6b843f16922a7f3f1aaa10ed9240c38627cb204c51303d95c8895449aafbfffea4cb6200faf53aa
+EBUILD paxctl-0.7-r2.ebuild 773 SHA256 89a425b5500d6c9acf41840613500fd54128eb566b97c54b95db4ad4c0becb07 SHA512 30107d12845e28cfec4d5a58b5e9e64e4adc6be575a0081a526a2200083cd48aeaf2355920c72e4e8efee9020336430df613b0e74942797f845bfdeda2c5e98a WHIRLPOOL d2d033e036bae8973c060866871730b0131477689a3b1b1d33a065b1387fccc11b119619ab95e2a6187d811cfaccb27147c488a1f8bb218afee5ba57e56c3d65
+EBUILD paxctl-0.8.ebuild 783 SHA256 8bc06aa8b76dfaae288ac10a527b0a2b150fc7e2f3a11cbd9273d1745af05e64 SHA512 d9814a93acff8543a038ee94f1cebbdee3543ab7a9be9a5e23e680f75307dd3d7284a0f28b36f5f66566e880b28e7ccfa6b64878d79be4c18bab85f4eac24c4f WHIRLPOOL 3ab5de53cf4c9473a0a431e1a6e528412fdec9890e37301c0fd82e4f0a9dda3d011ac9a7e4cf3d798da31f822d8dba1d25eb5a0baa6a7c8b305d2e452ae5a884
+EBUILD paxctl-0.9.ebuild 779 SHA256 c1d3a01ea72ef58702378432a0aa60cb5a6ca7fb73676dd80daad4fa524dbed7 SHA512 e6ffc6c8ef79ceea671269c5ff0d150f466afcf7fd54691d9a9d4b7f35595e54b222eebf0a4b2bc37ae54c9e24214447c5317d99f9b02c90b86576eee84db955 WHIRLPOOL 59d4878b853adbe93ea254fa034299f1d5e2c9a9cf84e48e8934b842a79b211a7313102f260cd544f640f25daace6631a0e466a0626ad324d6a4ecd4b6fe359a
+MISC ChangeLog 2518 SHA256 32d1d4bccff20c41a2fa6b33e63c9f865c31d509e76281864fac9d4bc7116cf9 SHA512 3bf7ec139293b6b60dfe532e157c1e679c707e2b5b5aacec61a8a8cd1a36a52ddfa803827e9d19a286c369466cc7cb3d74c1e80c2dc32604215e4dfd3bf4710f WHIRLPOOL 68ae7a2e16c9f49824c47b3fee54710615d5b4943fb02661c3ca1c9fa252405593ef3acc579faf265f2c3f1a2f26e35645dd8fe580658fe05ea48e93204ced70
+MISC ChangeLog-2015 8015 SHA256 df1e80dc1947e06d9ab6af30280fe639fbbfe18e0949155965bde896af17f641 SHA512 d3efc58be83abf2bebc1d41788f5e1082484a40401d201facc8ec8d9875e585bea6fc6a60a228e6c13ec316367a94fee93ad3cf0497e84f211418d638dc678b4 WHIRLPOOL 6386cb108e1fa46618156e9ed4beeb0656917990f826ab4ee51a0a26d39ad0c9e2a9d80daa5012968bd9652b971fccb67d0d65002459f1e13cc16e98b7e22f26
+MISC metadata.xml 363 SHA256 396a1b76d7e556b65a2cdadebd405a8aa196e63ed92c4fee89b2ecbee172c59a SHA512 b848c5de5ed09c4843c3e75d59ea4697c5d1c1fa2ce8c9e9a0bf38b5102d57f25aa626f3c6295f4f3a345b1cedc15553fb45b460bf41e73df43eb2eef6e00281 WHIRLPOOL 4b3c0f55297f9987a13cc2324c5f7f648743208f781ce3ba293a0cb6ac14d347532bfd0b39918b5f6ced8a8a7eb38f0115d44e9cab235675ce6a9f693da4072f
diff --git a/sys-apps/paxctl/metadata.xml b/sys-apps/paxctl/metadata.xml
new file mode 100644
index 000000000000..2fdcc0c0ceb0
--- /dev/null
+++ b/sys-apps/paxctl/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 type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+<maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/paxctl/paxctl-0.7-r2.ebuild b/sys-apps/paxctl/paxctl-0.7-r2.ebuild
new file mode 100644
index 000000000000..37fad4c8031e
--- /dev/null
+++ b/sys-apps/paxctl/paxctl-0.7-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Manages various PaX related program header flags for Elf32, Elf64, binaries"
+SRC_URI="http://pax.grsecurity.net/${P}.tar.bz2"
+HOMEPAGE="http://pax.grsecurity.net"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-devel/binutils-2.14.90.0.8-r1"
+RDEPEND=""
+
+src_prepare() {
+ sed \
+ "s:--owner 0 --group 0::g" \
+ -i Makefile || die
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install () {
+ emake DESTDIR="${ED}" install
+ dodoc README ChangeLog
+}
diff --git a/sys-apps/paxctl/paxctl-0.8.ebuild b/sys-apps/paxctl/paxctl-0.8.ebuild
new file mode 100644
index 000000000000..f975b8992c3a
--- /dev/null
+++ b/sys-apps/paxctl/paxctl-0.8.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Manages various PaX related program header flags for Elf32, Elf64, binaries"
+SRC_URI="http://pax.grsecurity.net/${P}.tar.gz"
+HOMEPAGE="http://pax.grsecurity.net"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-devel/binutils-2.14.90.0.8-r1"
+RDEPEND=""
+
+src_prepare() {
+ sed \
+ "s:--owner 0 --group 0::g" \
+ -i Makefile || die
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install () {
+ emake DESTDIR="${ED}" install
+ dodoc README ChangeLog
+}
diff --git a/sys-apps/paxctl/paxctl-0.9.ebuild b/sys-apps/paxctl/paxctl-0.9.ebuild
new file mode 100644
index 000000000000..1c8f9e7ab153
--- /dev/null
+++ b/sys-apps/paxctl/paxctl-0.9.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Manages various PaX related program header flags for Elf32, Elf64, binaries"
+SRC_URI="http://pax.grsecurity.net/${P}.tar.gz"
+HOMEPAGE="http://pax.grsecurity.net"
+
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-devel/binutils-2.14.90.0.8-r1"
+RDEPEND=""
+
+src_prepare() {
+ sed \
+ "s:--owner 0 --group 0::g" \
+ -i Makefile || die
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install () {
+ emake DESTDIR="${ED}" install
+ dodoc README ChangeLog
+}
diff --git a/sys-apps/paxctld/Manifest b/sys-apps/paxctld/Manifest
new file mode 100644
index 000000000000..99acc49c0867
--- /dev/null
+++ b/sys-apps/paxctld/Manifest
@@ -0,0 +1,9 @@
+DIST paxctld_1.1.orig.tar.gz 15977 SHA256 95c2805dc46edd443afceef283adf09943c6a62858944b516c9f5c0e06f8e99f SHA512 82b18d1b5d47831ac865b149dbd02c35062baf3da755312bbc2d7adeb31308b995be3441adb6d4a33ba19e79413df77bb4a7bc71d202bef6e1eb25f2c4f31631 WHIRLPOOL 633fe5a591ba1ed1f1fdddce03955c8150ee9ac9a0f039a7b808a769182e88bd836c317491f8c519c5f9da138faeb44c3b658c2620fcc38357461f7f902a63d9
+DIST paxctld_1.2.1.orig.tar.gz 16347 SHA256 176823d414d75f187951818bab545a0d4e89ce0a1f01415390842d77ea40505d SHA512 3daa072155d7eef6911fa716e2ffefe503d4351d375dfc89efaad0434da7e9f879a07f0da0f58f3a70361c5661cb1d5760b8c85fa88dc086dc8c1f113fdaa6a1 WHIRLPOOL 8060ac58f4f906bbc00a715ee966a713c414554fc26b1a1e052a8b9cb0a70a6608f7d951b9b191458888c323ef8c4af1ef7b42835d85d1bebc3d0912b0b9cbae
+DIST paxctld_1.2.orig.tar.gz 16080 SHA256 3117da5e21fd3c5c544cb30cc3967ed765c5ece35f3383e2e6345fd006bf9a25 SHA512 9b181fdc9e6b4d76fc7670e0773263c598164f90fe0db0c180601e8ba68e9baec4ef23281bba9ebac385e53edc20d8b79fbd7c9646e057334c21c6602013e198 WHIRLPOOL 21370a42630050596edd3cc521a14021f3f86c9224a1e61da82a28aea7ba64ef935c42aadcf7c5c1d5dacfde93624a6eff1096d5eb32cf1c8485ad19ad0a51b0
+EBUILD paxctld-1.1.ebuild 720 SHA256 50a4afa19aae9f2a73efbbef5fae1f9aee4151f385b9c2fdbf5101a2156918b7 SHA512 b924d46a92be6099e38ec63bb3c2c7cb0dc38d456bc4fc71c997cb64a1711efefa5779c2c1b3acac812429fcab7ec314a8530d27ff75e50fccf2a0550ef3e6d5 WHIRLPOOL 7fb15ceb2709c44af089bff39c79d1b3cc0bb88da9c6aa5145e04e9ac63e1e968ebf99a620f7f5ae5ac916892a468debc5dcb84a4ff36daad36699e89e78c03c
+EBUILD paxctld-1.2.1.ebuild 720 SHA256 50a4afa19aae9f2a73efbbef5fae1f9aee4151f385b9c2fdbf5101a2156918b7 SHA512 b924d46a92be6099e38ec63bb3c2c7cb0dc38d456bc4fc71c997cb64a1711efefa5779c2c1b3acac812429fcab7ec314a8530d27ff75e50fccf2a0550ef3e6d5 WHIRLPOOL 7fb15ceb2709c44af089bff39c79d1b3cc0bb88da9c6aa5145e04e9ac63e1e968ebf99a620f7f5ae5ac916892a468debc5dcb84a4ff36daad36699e89e78c03c
+EBUILD paxctld-1.2.ebuild 720 SHA256 50a4afa19aae9f2a73efbbef5fae1f9aee4151f385b9c2fdbf5101a2156918b7 SHA512 b924d46a92be6099e38ec63bb3c2c7cb0dc38d456bc4fc71c997cb64a1711efefa5779c2c1b3acac812429fcab7ec314a8530d27ff75e50fccf2a0550ef3e6d5 WHIRLPOOL 7fb15ceb2709c44af089bff39c79d1b3cc0bb88da9c6aa5145e04e9ac63e1e968ebf99a620f7f5ae5ac916892a468debc5dcb84a4ff36daad36699e89e78c03c
+MISC ChangeLog 3515 SHA256 9d1f84847ecbc0c70ff877bd26347aa5d0f9f841af50e96da76279f6500cc8b4 SHA512 f6e8c042d6b3cbfa265600cbdf043ddffa6aec3f36a510b981b6ce402b4bba389f6c3b707bde1cabd755093bc72653401324b393685fde8f9bb81f3d71d1faaa WHIRLPOOL ea7710228ebe36d6e14b5909283c146cd20aa1d19e15b0045f98812a73d71f4f878e29044a289c1224972479b3e291cfdb8fb796b37979b1cb88f125957709fc
+MISC ChangeLog-2015 414 SHA256 6a0a9615da074ca6c6cdd2cc5161e9d90dbf6917cb42547bf614662947b2c21e SHA512 c3e4f97440a904db04224a37b4c807ca6b07cb0afb00240acaf88c123c72b1669c71a54405a8d2db6854c1b14e13e9a65d61a932c8ec89719ef0914f6551d360 WHIRLPOOL f1bc4fd6543c3c048f9ff267ba58ebd9061abe4949c4c26378dd07f035306ef27000aab8f458b9c78b6fbf40729b0c9fcc4132a19bf79e5d9367c60301e9df83
+MISC metadata.xml 363 SHA256 396a1b76d7e556b65a2cdadebd405a8aa196e63ed92c4fee89b2ecbee172c59a SHA512 b848c5de5ed09c4843c3e75d59ea4697c5d1c1fa2ce8c9e9a0bf38b5102d57f25aa626f3c6295f4f3a345b1cedc15553fb45b460bf41e73df43eb2eef6e00281 WHIRLPOOL 4b3c0f55297f9987a13cc2324c5f7f648743208f781ce3ba293a0cb6ac14d347532bfd0b39918b5f6ced8a8a7eb38f0115d44e9cab235675ce6a9f693da4072f
diff --git a/sys-apps/paxctld/metadata.xml b/sys-apps/paxctld/metadata.xml
new file mode 100644
index 000000000000..2fdcc0c0ceb0
--- /dev/null
+++ b/sys-apps/paxctld/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 type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+<maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/paxctld/paxctld-1.1.ebuild b/sys-apps/paxctld/paxctld-1.1.ebuild
new file mode 100644
index 000000000000..7d222c6d4c29
--- /dev/null
+++ b/sys-apps/paxctld/paxctld-1.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit systemd
+
+DESCRIPTION="PaX flags maintenance daemon"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://www.grsecurity.net/${PN}/${PN}_${PV}.orig.tar.gz
+ https://dev.gentoo.org/~blueness/hardened-sources/${PN}/${PN}_${PV}.orig.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND=""
+
+src_prepare() {
+ # Respect Gentoo flags and don't strip
+ sed -i \
+ -e '/^CC/d' \
+ -e '/^CFLAGS/d' \
+ -e '/^LDFLAGS/d' \
+ -e '/STRIP/d' \
+ Makefile
+}
+
+src_install() {
+ default
+
+ systemd_dounit "${S}"/rpm/${PN}.service
+}
diff --git a/sys-apps/paxctld/paxctld-1.2.1.ebuild b/sys-apps/paxctld/paxctld-1.2.1.ebuild
new file mode 100644
index 000000000000..7d222c6d4c29
--- /dev/null
+++ b/sys-apps/paxctld/paxctld-1.2.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit systemd
+
+DESCRIPTION="PaX flags maintenance daemon"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://www.grsecurity.net/${PN}/${PN}_${PV}.orig.tar.gz
+ https://dev.gentoo.org/~blueness/hardened-sources/${PN}/${PN}_${PV}.orig.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND=""
+
+src_prepare() {
+ # Respect Gentoo flags and don't strip
+ sed -i \
+ -e '/^CC/d' \
+ -e '/^CFLAGS/d' \
+ -e '/^LDFLAGS/d' \
+ -e '/STRIP/d' \
+ Makefile
+}
+
+src_install() {
+ default
+
+ systemd_dounit "${S}"/rpm/${PN}.service
+}
diff --git a/sys-apps/paxctld/paxctld-1.2.ebuild b/sys-apps/paxctld/paxctld-1.2.ebuild
new file mode 100644
index 000000000000..7d222c6d4c29
--- /dev/null
+++ b/sys-apps/paxctld/paxctld-1.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit systemd
+
+DESCRIPTION="PaX flags maintenance daemon"
+HOMEPAGE="http://www.grsecurity.net/"
+SRC_URI="https://www.grsecurity.net/${PN}/${PN}_${PV}.orig.tar.gz
+ https://dev.gentoo.org/~blueness/hardened-sources/${PN}/${PN}_${PV}.orig.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="pam"
+
+RDEPEND=""
+DEPEND=""
+
+src_prepare() {
+ # Respect Gentoo flags and don't strip
+ sed -i \
+ -e '/^CC/d' \
+ -e '/^CFLAGS/d' \
+ -e '/^LDFLAGS/d' \
+ -e '/STRIP/d' \
+ Makefile
+}
+
+src_install() {
+ default
+
+ systemd_dounit "${S}"/rpm/${PN}.service
+}
diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest
new file mode 100644
index 000000000000..bb265d4c1436
--- /dev/null
+++ b/sys-apps/pciutils/Manifest
@@ -0,0 +1,12 @@
+AUX conf.d-pciparm 988 SHA256 ffdec7d6c510a502d212129d31a9b37c3b9c75393a48a8b1ee6010b7d4aa1887 SHA512 7c3513a9112318736907f4a1f3e94910d59752d8f51cf4f9f8ccd33b563250aca17a507e0937507bd9352d12a2b9a47e7419306908990b21a3460e6527dab6a4 WHIRLPOOL b5954d8897687a0c6d267c9f60feadb692ce637bf294f5b2f8b7eca479cf454ac541a4bfe904d43ff59e5a77a808c1cecd63aa1011817ba61152d7a4664c86ad
+AUX init.d-pciparm 1758 SHA256 783cbb24591fdab3b1f95f1fe8ea2d1b0e4fa1fbf0b55e57ec9d95fb849e3b5d SHA512 c5a527236039edf29f6876d3b07909045dd04e40d863d68014dd96cc021b7b61356470e67541b5b68487d996a299b60b3da46272259f9d0724ea1392e6243646 WHIRLPOOL 020f4e29cd7cca640f7d92241229f86b0ac63fdf3902c95bec3a54dff36b4431c3b4d7a954c22b82ad2956ee0896090bee448ab24599714a463ddd783b0305e5
+AUX pciutils-3.1.9-static-pc.patch 373 SHA256 81f8c664cf844adfe2238f6dc584100340de8781d361cb185035d5928aee82fe SHA512 e20286ae41569236b549d13c703266f920f335609c1ad2e5d67fd1561f9e9c68d4ac1fd530f93a4451ec79a5496ed226b83db0c74935499f44cd47e94eb74f49 WHIRLPOOL 9d5bf04b08a76bb786524e8fdc4de412154340f17dcccf48ebcb7504a6b5feb8a719337489a20dd8d94d77bdeb93e75009f66840a18ec63805d8fe36dc7e1981
+DIST pciutils-3.4.1.tar.gz 404166 SHA256 0196624282c33a9bcd4bd097d4100271c82af47797ecd7488ef2711fa5f043b2 SHA512 1394647d5e9d324d68bd8bdf4709a438ae06e6a83ded40b9e0026968c032f214073bc764fbf59e15da90b2e424d90dc430db5810d7ff5fbeab0f3e5c6250ee49 WHIRLPOOL 4391c84695dc1f0844129ff5d6056ac1332d855824e1b96ec105073b97d453db21e82d2a071f1bf7d977e26cf51421183b5a37d5a962bccbed9c2667c813cc4c
+DIST pciutils-3.5.4.tar.gz 423997 SHA256 1a650f10170423371d481c580071c27420b16a40eda995f3e906b8a9ade530c5 SHA512 cd3ed843b8b2a31f92234be6a59bb02cd5268afad7e353872f588df281984af5129b4a9e363332bcf173dd71fda2091e501237fbd4fc39575cfe0472456d4a34 WHIRLPOOL 4a99d7c95cebc42a369bd51db1f7682dd0c49ecf8023558781fb62dc57431a4993f41e01f2d128c99bb312e5d1d2fa97f653ae5dd6ee10f112aa5bded676ddfe
+DIST pciutils-3.5.5.tar.gz 437331 SHA256 58ad27f25c510598bdc5337160c8b573d6e9b328b3c5235636e89a1cc04d6a48 SHA512 b2c89e1d742c5a23cad662ed6bb1d47d7587b0d823fcbf3abc6d613735961473f7d29c83a4ccb49b64ec4f674026f17e88693eb34b42cb6c128abd1407c778ba WHIRLPOOL cfa15b7622d11495b1e83f543b1677ff42c2b54fb8acda6d99a4eb3a76387874da36147d04cadd0a801917e1499de87bd5e25cd80377b4695c68c2086ee2a6a1
+EBUILD pciutils-3.4.1.ebuild 2985 SHA256 183576a92c8dc2165f8ef3ab00bd907ae9e4d9bb58c49b119187a812af6c795f SHA512 55a6c8d02aac32c5115dd563ff1962dfc79fc09681cb062872cbd9c0dab0873eb3183efd51ed8bbd075a21815f9fa779fdbd5ec8c6556acbbf1dff44bf26af48 WHIRLPOOL 412fa4c43f62841826530c8ffd04b87cdd0b84c4ee27bfcb23864ad2bf2a61ceb160929a827a59d40f74f1e842e059ed88922c6c4a8d91256ad38ab4f4de0f2c
+EBUILD pciutils-3.5.4.ebuild 2912 SHA256 9465521eea7bbf44f5eff2e24c155d06f944bc8b1622ff98aee9f71686cbb618 SHA512 e30bf4f61ec643a7c6a61b4c72cb23ca41e0f24464655c7dc8031e135e80e4cf06545cdfeb0f513a9b72247949603a5510ae9ecf2196884efcb8e91dc68cb69b WHIRLPOOL b1f7b7f0884be2f5868d0076f70cfabedf45f96c6fe2756ba334effc622cf49cd3181f9bf63f8ac8200f30cfddef87c4f99ca3fe7cfae2db9d00c5f7e8a57923
+EBUILD pciutils-3.5.5.ebuild 2922 SHA256 9416882730b7a4510c1c9d309f00705411b35d0cfc8304c9533fe0562bce2e25 SHA512 7421156ce321c3cd979712debccf4908ace3dbdd70d0b033c15fecba3f010122b4675d567a302fb4ec594edf2e46535691c24abd23e37bf296fdddc0c9c41d9b WHIRLPOOL c69b503b0b61236c3797448d95779358eebb1270bb574f12316140d0cd350954dae17b7e7842fc1069ed6e1635128f0bcd2c6880480b004ca116a2d383ac2a02
+MISC ChangeLog 9557 SHA256 9371159f68be11c13c975c677207dcff3f06d2d72dfad5ca31079291f789475e SHA512 4076c2f56ec1800da9119650f2b408319a59d1ef79f94196db43ae2d41581701104eb60d3c65fab869cb358ad00682764af6947b2185cbfa7f91e29a3116852e WHIRLPOOL ecdfc701c679c908aaf79be7aaced993ee6fbf5f63cd151a7ccc006823a6f134b935766d1703a1f7c2df17958a6fa6d6869a8cbf5123ad8540b1d7bfe64e42f4
+MISC ChangeLog-2015 31500 SHA256 64e8281eb7979554390ef6c4c323f8d65f4da9a76bdc071d072f78d2c4a67ad6 SHA512 5baa5b45155b0df008de51298fdb54fda6d71b179a148bc799aa4f15a18c7d9de48240354826223fb7bcb1a4b44289dd72252a29204618dd54ddc336fcf245ec WHIRLPOOL 040a27595fe695d2bc4edd48697121b52d05abc302c6a1877e880a777d9a0417fd02cd324ca47b38ec38551296923f1bf157a6cf35fc2a0988d416031c208a45
+MISC metadata.xml 524 SHA256 11eae8d518033f12d6fd34b5624e1271900450dce2755cba0879d3c116155dd0 SHA512 881e7cb9a71e1ccbf84be8cbaab54cfd0258a782aa1e4def6f3398444f4c28790a23eb194c3facc6e7c77437c06e4c17db01e0360debb1f01349cbca69dd8020 WHIRLPOOL 499344b03bb97ab85fab18cc15c64318c047f58930b0d0bb545a8b29230639dcf8d7e13746e6fbb62d32d7f89e4d03c958a5271b5521977ab29459d7e573efa8
diff --git a/sys-apps/pciutils/files/conf.d-pciparm b/sys-apps/pciutils/files/conf.d-pciparm
new file mode 100644
index 000000000000..f036b15ad20c
--- /dev/null
+++ b/sys-apps/pciutils/files/conf.d-pciparm
@@ -0,0 +1,28 @@
+# PCI tweaking article:
+# http://www.gentoo.org/doc/en/articles/hardware-stability-p2.xml
+#
+# Apply to all devices:
+# PCIPARM_ALL="...."
+# Cards also can be addressed by vid:pid or by bus:slot.func
+# (see setpci man page relative to -d and -s options)
+# PCIPARM_(BUS|VENDOR)_#="...."
+# Where # is sequentially numbered from zero.
+
+# Examples:
+# "open up" the PCI bus by allowing fairly long bursts
+# for all devices, increasing performance
+# (equivalent to: setpci -v -d *:* latency_timer=b0)
+#PCIPARM_ALL="latency_timer=b0"
+
+# maximize latency timers for network and audio,
+# allowing them to transmit more data per burst,
+# preventing buffer over/under-run conditions
+#PCIPARM_BUS_0="00:04.0 latency_timer=ff"
+#PCIPARM_BUS_1="01:04.0 latency_timer=ff"
+#PCIPARM_VENDOR_0="1057:3410 latency_timer=ff"
+
+# -v : whether to be verbose about changes
+# -D : dry-run, no commit
+# -f : do not warn if the change is already set
+# (see the setpci manpage for more advanced options)
+SETPCI_OPT="-f"
diff --git a/sys-apps/pciutils/files/init.d-pciparm b/sys-apps/pciutils/files/init.d-pciparm
new file mode 100644
index 000000000000..734ca9935a3b
--- /dev/null
+++ b/sys-apps/pciutils/files/init.d-pciparm
@@ -0,0 +1,79 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before bootmisc hdparm
+ after localmount
+}
+
+checkconfig() {
+ if [ ! -f /etc/conf.d/pciparm ]; then
+ ewarn "/etc/conf.d/pciparm does not exist, skipping"
+ return 1
+ fi
+
+ if [ -z "${PCIPARM_ALL}" -a -z "${PCIPARM_BUS_0}" -a -z "${PCIPARM_VENDOR_0}" ]; then
+ ewarn "None of PCIPARM_ALL, PCIPARM_BUS_* or PCIPARM_VENDOR_* set in /etc/conf.d/pciparm"
+ return 1
+ fi
+}
+
+do_setpci() {
+ #ewarn "do_setpci: /usr/sbin/setpci $SETPCI_OPT $@"
+ SWITCH=$1
+ SPEC_ID=$2
+ shift 2
+ case "$SWITCH" in
+ -d) DESC=vendor ;;
+ -s) DESC=bus ;;
+ *) eerror "Unknown setpci type: $SWITCH" ; return 1 ;;
+ esac
+
+ if [ -z "$SPEC_ID" ]; then
+ eerror "Missing device specifier!"
+ return 1
+ fi
+ if [ -z "$*" ]; then
+ eerror "Missing configuration to set for ($DESC) $SPEC_ID!"
+ return 1
+ fi
+
+ ebegin "Setting PCI params for ($DESC) $SPEC_ID to $@"
+ /usr/sbin/setpci $SETPCI_OPT $SWITCH $SPEC_ID "$@"
+ rc=$?
+ eend $rc
+ return $rc
+}
+
+do_setpci_array() {
+ name=$1
+ shift
+ i=0
+ while true; do
+ eval opt="\$${name}_$i"
+ # End of loop
+ [ -z "${opt}" ] && break
+ # Pass in all other parameters here, in case we want to use multiple
+ # arguments later.
+ do_setpci "$@" $opt #|| return 1
+ i=$(($i+1))
+ done
+}
+
+start() {
+ if get_bootparam "nopciparm" ; then
+ ewarn "Skipping pciparm init as requested in kernel cmdline"
+ return 0
+ fi
+
+ checkconfig || return 1
+
+ # We do not exit after any errors presently, because it might be a
+ # stability-related fix after a failure.
+ [ -n "$PCIPARM_ALL" ] && \
+ do_setpci -d '*:*' $PCIPARM_ALL #|| return 1
+
+ do_setpci_array PCIPARM_BUS -s #|| return 1
+ do_setpci_array PCIPARM_VENDOR -d #|| return 1
+}
diff --git a/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch b/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch
new file mode 100644
index 000000000000..9e63b7ecd661
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-3.1.9-static-pc.patch
@@ -0,0 +1,13 @@
+make sure all lib entries get into libs.private in the .pc file
+
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -61,7 +61,7 @@ $(PCILIBPC): libpci.pc.in
+ -e 's,@LIBDIR@,$(LIBDIR),' \
+ -e 's,@IDSDIR@,$(IDSDIR),' \
+ -e 's,@VERSION@,$(VERSION),' \
+- -e 's,@LDLIBS@,$(LDLIBS),'
++ -e 's,@LDLIBS@,$(LDLIBS) $(LIB_LDLIBS),'
+
+ init.o: init.c $(INCL)
+ access.o: access.c $(INCL)
diff --git a/sys-apps/pciutils/metadata.xml b/sys-apps/pciutils/metadata.xml
new file mode 100644
index 000000000000..739960f0acfd
--- /dev/null
+++ b/sys-apps/pciutils/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="dns">Enable support for querying the central database of PCI IDs using DNS</flag>
+ <flag name="kmod">Enable <pkg>sys-apps/kmod</pkg> support for the -k switch in lspci command</flag>
+ <flag name="zlib">Support compressed pci.ids database</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/pciutils/pciutils-3.4.1.ebuild b/sys-apps/pciutils/pciutils-3.4.1.ebuild
new file mode 100644
index 000000000000..5688ca238f9c
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.4.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="Various utilities dealing with the PCI bus"
+HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
+SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="dns +kmod static-libs +udev zlib"
+
+# Have the sub-libs in RDEPEND with [static-libs] since, logically,
+# our libssl.a depends on libz.a/etc... at runtime.
+LIB_DEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+),${MULTILIB_USEDEP}] )"
+DEPEND="kmod? ( sys-apps/kmod )
+ static-libs? ( ${LIB_DEPEND} )
+ !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
+ udev? ( >=virtual/libudev-208[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ sys-apps/hwids
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${DEPEND}
+ kmod? ( virtual/pkgconfig )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
+
+ if use static-libs ; then
+ cp -pPR "${S}" "${S}.static" || die
+ mv "${S}.static" "${S}/static" || die
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ append-lfs-flags #471102
+}
+
+pemake() {
+ emake \
+ HOST="${CHOST}" \
+ CROSS_COMPILE="${CHOST}-" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ RANLIB="$(tc-getRANLIB)" \
+ DNS=$(usex dns) \
+ IDSDIR='$(SHAREDIR)/misc' \
+ MANDIR='$(SHAREDIR)/man' \
+ PREFIX="${EPREFIX}/usr" \
+ SHARED="yes" \
+ STRIP="" \
+ ZLIB=$(usex zlib) \
+ PCI_COMPRESSED_IDS=0 \
+ PCI_IDS=pci.ids \
+ LIBDIR="\${PREFIX}/$(get_libdir)" \
+ LIBKMOD=$(multilib_native_usex kmod) \
+ HWDB=$(usex udev) \
+ "$@"
+}
+
+multilib_src_compile() {
+ pemake OPT="${CFLAGS}" all
+ if use static-libs ; then
+ pemake \
+ -C "${BUILD_DIR}/static" \
+ OPT="${CFLAGS}" \
+ SHARED="no" \
+ lib/libpci.a
+ fi
+}
+
+multilib_src_install() {
+ pemake DESTDIR="${D}" install install-lib
+ use static-libs && dolib.a "${BUILD_DIR}/static/lib/libpci.a"
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README TODO
+
+ rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \
+ "${ED}"/usr/share/man/man8/update-pciids.8*
+
+ newinitd "${FILESDIR}"/init.d-pciparm pciparm
+ newconfd "${FILESDIR}"/conf.d-pciparm pciparm
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
+ elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
+ elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
+ fi
+}
diff --git a/sys-apps/pciutils/pciutils-3.5.4.ebuild b/sys-apps/pciutils/pciutils-3.5.4.ebuild
new file mode 100644
index 000000000000..7de545e32784
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.5.4.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="Various utilities dealing with the PCI bus"
+HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
+SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="dns +kmod static-libs +udev zlib"
+
+# Have the sub-libs in RDEPEND with [static-libs] since, logically,
+# our libpci.a depends on libz.a/etc... at runtime.
+LIB_DEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+),${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/libudev-208[static-libs(+),${MULTILIB_USEDEP}] )"
+DEPEND="kmod? ( sys-apps/kmod )
+ static-libs? ( ${LIB_DEPEND} )
+ !static-libs? ( ${LIB_DEPEND//static-libs(+),} )"
+RDEPEND="${DEPEND}
+ sys-apps/hwids"
+DEPEND="${DEPEND}
+ kmod? ( virtual/pkgconfig )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
+)
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ if use static-libs ; then
+ cp -pPR "${S}" "${S}.static" || die
+ mv "${S}.static" "${S}/static" || die
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ append-lfs-flags #471102
+}
+
+pemake() {
+ emake \
+ HOST="${CHOST}" \
+ CROSS_COMPILE="${CHOST}-" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ RANLIB="$(tc-getRANLIB)" \
+ DNS=$(usex dns) \
+ IDSDIR='$(SHAREDIR)/misc' \
+ MANDIR='$(SHAREDIR)/man' \
+ PREFIX="${EPREFIX}/usr" \
+ SHARED="yes" \
+ STRIP="" \
+ ZLIB=$(usex zlib) \
+ PCI_COMPRESSED_IDS=0 \
+ PCI_IDS=pci.ids \
+ LIBDIR="\${PREFIX}/$(get_libdir)" \
+ LIBKMOD=$(multilib_native_usex kmod) \
+ HWDB=$(usex udev) \
+ "$@"
+}
+
+multilib_src_compile() {
+ pemake OPT="${CFLAGS}" all
+ if use static-libs ; then
+ pemake \
+ -C "${BUILD_DIR}/static" \
+ OPT="${CFLAGS}" \
+ SHARED="no" \
+ lib/libpci.a
+ fi
+}
+
+multilib_src_install() {
+ pemake DESTDIR="${D}" install install-lib
+ use static-libs && dolib.a "${BUILD_DIR}/static/lib/libpci.a"
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README TODO
+
+ rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \
+ "${ED}"/usr/share/man/man8/update-pciids.8*
+
+ newinitd "${FILESDIR}"/init.d-pciparm pciparm
+ newconfd "${FILESDIR}"/conf.d-pciparm pciparm
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
+ elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
+ elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
+ fi
+}
diff --git a/sys-apps/pciutils/pciutils-3.5.5.ebuild b/sys-apps/pciutils/pciutils-3.5.5.ebuild
new file mode 100644
index 000000000000..953cbfc4aa60
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-3.5.5.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="Various utilities dealing with the PCI bus"
+HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ https://git.kernel.org/?p=utils/pciutils/pciutils.git"
+SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="dns +kmod static-libs +udev zlib"
+
+# Have the sub-libs in RDEPEND with [static-libs] since, logically,
+# our libpci.a depends on libz.a/etc... at runtime.
+LIB_DEPEND="
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+),${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/libudev-208[static-libs(+),${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ kmod? ( sys-apps/kmod )
+ static-libs? ( ${LIB_DEPEND} )
+ !static-libs? ( ${LIB_DEPEND//static-libs(+),} )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/hwids
+"
+DEPEND="
+ ${DEPEND}
+ kmod? ( virtual/pkgconfig )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
+)
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h )
+
+switch_config() {
+ [[ $# -ne 2 ]] && return 1
+ local opt=$1 val=$2
+
+ sed "s@^\(${opt}=\).*\$@\1${val}@" -i Makefile || die
+ return 0
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ if use static-libs ; then
+ cp -pPR "${S}" "${S}.static" || die
+ mv "${S}.static" "${S}/static" || die
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ append-lfs-flags #471102
+}
+
+pemake() {
+ emake \
+ HOST="${CHOST}" \
+ CROSS_COMPILE="${CHOST}-" \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ RANLIB="$(tc-getRANLIB)" \
+ DNS=$(usex dns) \
+ IDSDIR='$(SHAREDIR)/misc' \
+ MANDIR='$(SHAREDIR)/man' \
+ PREFIX="${EPREFIX}/usr" \
+ SHARED="yes" \
+ STRIP="" \
+ ZLIB=$(usex zlib) \
+ PCI_COMPRESSED_IDS=0 \
+ PCI_IDS=pci.ids \
+ LIBDIR="\${PREFIX}/$(get_libdir)" \
+ LIBKMOD=$(multilib_native_usex kmod) \
+ HWDB=$(usex udev) \
+ "$@"
+}
+
+multilib_src_compile() {
+ pemake OPT="${CFLAGS}" all
+ if use static-libs ; then
+ pemake \
+ -C "${BUILD_DIR}/static" \
+ OPT="${CFLAGS}" \
+ SHARED="no" \
+ lib/libpci.a
+ fi
+}
+
+multilib_src_install() {
+ pemake DESTDIR="${D}" install install-lib
+ use static-libs && dolib.a "${BUILD_DIR}/static/lib/libpci.a"
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README TODO
+
+ rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \
+ "${ED}"/usr/share/man/man8/update-pciids.8*
+
+ newinitd "${FILESDIR}"/init.d-pciparm pciparm
+ newconfd "${FILESDIR}"/conf.d-pciparm pciparm
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
+ elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
+ elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
+ fi
+}
diff --git a/sys-apps/pcmciautils/Manifest b/sys-apps/pcmciautils/Manifest
new file mode 100644
index 000000000000..da9da71f3647
--- /dev/null
+++ b/sys-apps/pcmciautils/Manifest
@@ -0,0 +1,8 @@
+AUX pcmciautils-018_p8-flex-2.6.3-fix.patch 593 SHA256 4158c6d4b52d0742dd83bab81eba30ac3a4e5e94d6b5d96bb338dbf859269fda SHA512 b96f9bc3176f1eeb936a31f8fab5a495ce14218e92fbae2350aa970328b53bd6732ade90721f1ca55d80a94436189773f83a300aa8af7c43ecc5ed62c95f3557 WHIRLPOOL ec3d33c95d6c525b2758b25a3905f917230f0d08edaa9f2611a0be14f36b3714025f83a134e2bbe48c32cd5bed077f9499ff5603574d3c1e1ef8c842a1d34d59
+DIST pcmciautils_018-8.debian.tar.gz 11213 SHA256 597879403120c4c258e5c064a2f695aad133529503d66aac0973a02e80756f36 SHA512 8a00d776e208b43d01fe22b9d4e889bc1b2c5982aa1bf225bdd613ffb0f5b37f5266ccc1cb91df9ac49c4ee3e3653ebb29807b61fff53c585e2cfed5aa2cd9e9 WHIRLPOOL 32083f28e4adbf0034df13bfde6936f885b54b22295e2603dc4992188d2ef9366dfc77358766d9cfb8eb31501c8949f1ba043e079d858f6822ac5cc7ad673296
+DIST pcmciautils_018.orig.tar.gz 48516 SHA256 b94b71347fa11b7c0eb8dae034b5f7f649b135ffacb80cf60572a5bcb118f095 SHA512 f0af1fc6155686ae61c1c85a6451b032088a3880dfbc05c1d1ed33ca8e975745f9d4bedb0f3ee0a1252461aa008bed8014c73ff850cddd89d930524a6d68d47d WHIRLPOOL c74aa10632748bbd28af892c767c59486ddf1cfa3e1c418e3c727a4867d8905af1770696b2ed9bd15c967fc911aad3b4494d923b42e768bd8c87a364e1aa0e77
+EBUILD pcmciautils-018_p8-r1.ebuild 1559 SHA256 67617d8ee3eab880b739ef2f44b4cf208e879f7e7e653c75d0f8ce8947b9a44a SHA512 1ccec3caa8303f8b393dc9bfc53a5eeec301ef0bd5e54b695ec2c72d7f73e6d78aa8a64145b74b7e3966f5df27de2b3d86be10fa86e16e56942170a56d767312 WHIRLPOOL df6a7684d4f87097777575d06160b97789780f8f0f4fea19098de509cef9c089223f2ed0e242adbc04183e6a35c67e85b4f3798f91c11c699b28f21fdecf7378
+EBUILD pcmciautils-018_p8.ebuild 1513 SHA256 8b7d787982c722c9102c4f406e9c926e10139f732f1fd4872bbcb17a771669eb SHA512 71f6ce9e540765a471c79ae5dd7b0aacf942c5f60bde01c7b99e5697360dd347045282a2daa30b26ef8851caa7be66c255e5594b2709c78d0a45f5c7c13c0fca WHIRLPOOL f487c2efaa319cd4b88fa4391675df42c864ff3f261473e750a26e559ccebae4e7d67a097dafa4d34f5c84959886e6bfd3465af2b3d8d6b53d8df86a806eb22b
+MISC ChangeLog 2997 SHA256 b6d814daa9a83659d8e85e45c459216a3331db11f03c5fcdd50123680750e2ca SHA512 7d1b68253357d200cac091ad3b16aa01d5b66bcef2ab56b857e0493e8f2e746321d0e42b19a5934d3a930218949bc814bf4d82652ce7747e6249c7c48f0f0622 WHIRLPOOL 71ca6d9fe11ec90843f400bb823ecdda63338ab3cfe0c89fa815cd9e18ba6606154f36da48c9ed2020d96fd9b0cc3d095c5270851979ce4d97144b747026ed1f
+MISC ChangeLog-2015 7586 SHA256 e8248e9583e4ce4089e3d41fbb3315e1a65f6c184d34ac4b943715593abf0797 SHA512 b017d5274531996f8d2103d9711bfa935c10b402b013211e25a676fdca8698241aea9df389f7671ef81a3e7aa945131ea4669a67b4f55f09fbebba5c841cd24e WHIRLPOOL 8e5610da5bfb98356518fd75ae77029c7f3d277fe1144f44cd2370c9ccab84f002fcd0e37bff3fce73257f92c18c5d73bf04a26958e3fc9c82211b73f984e85d
+MISC metadata.xml 244 SHA256 62e847c7541b8c2c37176f849bf1ff7d108a524440c57ea9c9945dc228298f57 SHA512 5c9aa921d361b670fdacbc49e93fb5e3a8ed161e0866ebc08ec0940c480a6bed654059642675e37596d1ede56f0ca5b55ae31ed96040fcf8d01f9f683ce444f6 WHIRLPOOL 60cbea775f4af6a505f613f1b3951d182a5465a1f83d9cd43cf0d88945f2c51616b01b782606cc322c4a2ceef1642933234f916ba9170ddf0b95edb6d56d100f
diff --git a/sys-apps/pcmciautils/files/pcmciautils-018_p8-flex-2.6.3-fix.patch b/sys-apps/pcmciautils/files/pcmciautils-018_p8-flex-2.6.3-fix.patch
new file mode 100644
index 000000000000..e30abb0d1076
--- /dev/null
+++ b/sys-apps/pcmciautils/files/pcmciautils-018_p8-flex-2.6.3-fix.patch
@@ -0,0 +1,27 @@
+--- pcmciautils-018/src/lex_config.l
++++ pcmciautils-018/src/lex_config.l
+@@ -1,8 +1,8 @@
+ /* Special state for handling include files */
+ %x src
+-%option noinput nounput
++%option noinput nounput noyywrap
+
+ %{
+ /*
+ * Startup tool for non statically mapped PCMCIA sockets
+ *
+@@ -75,14 +75,10 @@ module /* skip */ ;
+
+ . return yytext[0];
+
+ %%
+
+-#ifndef yywrap
+-int yywrap() { return 1; }
+-#endif
+-
+ /*======================================================================
+
+ Stuff to parse basic data types
+
+ ======================================================================*/
diff --git a/sys-apps/pcmciautils/metadata.xml b/sys-apps/pcmciautils/metadata.xml
new file mode 100644
index 000000000000..2c7c2f6db07d
--- /dev/null
+++ b/sys-apps/pcmciautils/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-needed -->
+<use>
+ <flag name="staticsocket">Add support for static sockets</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/pcmciautils/pcmciautils-018_p8-r1.ebuild b/sys-apps/pcmciautils/pcmciautils-018_p8-r1.ebuild
new file mode 100644
index 000000000000..a0cc1e8133a3
--- /dev/null
+++ b/sys-apps/pcmciautils/pcmciautils-018_p8-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic linux-info toolchain-funcs udev
+
+DEB_REV=${PV#*_p}
+MY_PV=${PV%_p*}
+
+DESCRIPTION="PCMCIA userspace utilities for Linux"
+HOMEPAGE="https://packages.qa.debian.org/pcmciautils"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}-${DEB_REV}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
+IUSE="debug staticsocket"
+
+RDEPEND="virtual/modutils"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+pkg_setup() {
+ CONFIG_CHECK="~PCMCIA"
+ linux-info_pkg_setup
+
+ kernel_is lt 2 6 32 && ewarn "${P} requires at least kernel 2.6.32."
+
+ mypcmciaopts=(
+ STARTUP=$(usex staticsocket false true)
+ exec_prefix=/usr
+ UDEV=true
+ DEBUG=false
+ STATIC=false
+ V=true
+ udevdir="$(get_udevdir)"
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC)"
+ AR="$(tc-getAR)"
+ STRIP=true
+ RANLIB="$(tc-getRANLIB)"
+ OPTIMIZATION="${CFLAGS} ${CPPFLAGS}"
+ DESTDIR="${D}"
+ )
+
+ use debug && append-cppflags -DDEBUG
+}
+
+PATCHES=(
+ "${WORKDIR}"/debian/patches/no-modprobe-rules.patch
+ "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch
+ "${FILESDIR}"/${P}-flex-2.6.3-fix.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e '/CFLAGS/s:-fomit-frame-pointer::' \
+ -e '/dir/s:sbin:bin:g' \
+ Makefile || die
+}
+
+src_compile() {
+ emake "${mypcmciaopts[@]}"
+}
+
+src_install() {
+ emake "${mypcmciaopts[@]}" install
+
+ dodoc doc/*.txt
+}
diff --git a/sys-apps/pcmciautils/pcmciautils-018_p8.ebuild b/sys-apps/pcmciautils/pcmciautils-018_p8.ebuild
new file mode 100644
index 000000000000..ccfdd306b052
--- /dev/null
+++ b/sys-apps/pcmciautils/pcmciautils-018_p8.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils flag-o-matic linux-info toolchain-funcs udev
+
+DEB_REV=${PV#*_p}
+MY_PV=${PV%_p*}
+
+DESCRIPTION="PCMCIA userspace utilities for Linux"
+HOMEPAGE="https://packages.qa.debian.org/pcmciautils"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}-${DEB_REV}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc sh x86"
+IUSE="debug staticsocket"
+
+RDEPEND="virtual/modutils"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+pkg_setup() {
+ CONFIG_CHECK="~PCMCIA"
+ linux-info_pkg_setup
+
+ kernel_is lt 2 6 32 && ewarn "${P} requires at least kernel 2.6.32."
+
+ mypcmciaopts=(
+ STARTUP=$(usex staticsocket true false)
+ exec_prefix=/usr
+ UDEV=true
+ DEBUG=false
+ STATIC=false
+ V=true
+ udevdir="$(get_udevdir)"
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC)"
+ AR="$(tc-getAR)"
+ STRIP=true
+ RANLIB="$(tc-getRANLIB)"
+ OPTIMIZATION="${CFLAGS} ${CPPFLAGS}"
+ DESTDIR="${D}"
+ )
+
+ use debug && append-cppflags -DDEBUG
+}
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/debian/patches/no-modprobe-rules.patch \
+ "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch
+
+ sed -i \
+ -e '/CFLAGS/s:-fomit-frame-pointer::' \
+ -e '/dir/s:sbin:bin:g' \
+ Makefile || die
+}
+
+src_compile() {
+ emake "${mypcmciaopts[@]}"
+}
+
+src_install() {
+ emake "${mypcmciaopts[@]}" install
+
+ dodoc doc/*.txt
+}
diff --git a/sys-apps/pcsc-lite/Manifest b/sys-apps/pcsc-lite/Manifest
new file mode 100644
index 000000000000..a818f5dcfab6
--- /dev/null
+++ b/sys-apps/pcsc-lite/Manifest
@@ -0,0 +1,12 @@
+AUX 99-pcscd-hotplug.rules 358 SHA256 2e9a47146210fbb155eac910e5068cb364fae227627e0e0842ca4a19cf02a45b SHA512 74421fe073cb55f665c4a0350931beae7c252300b4954f69f215334e3e4e6dda927f51837540d24d893ba8ae862e3c1370b694d153508c4186e94959d37f918a WHIRLPOOL 0b11178d114e673dd0b7044e5da508844fc47cee45a5603115c4ed6ee21f283d81f2eedb368e1df1f3447c7d399b4e740367bb69549bd3c98f5b9e696dfb68f6
+AUX pcsc-lite-1.8.11-polkit-pcscd.patch 744 SHA256 23b26775b11c109dd2ff21a798cfafb95111ac07741837e7554eb9a7189c8079 SHA512 4f8b774ec888d51c0ad82431cb9d041be6b69af0bfa2a535c6b7e47afb0056147c08ab9265d7da2259a74347ceba9dba320ad0892d3a25797efc64b79113f4a5 WHIRLPOOL a0ad7472230eecdb20da0bed5eb9efee7aca3b0386a825c49e61a18ce3bbac6636fbca9d97d61db39df3aa84733a7191e121244387e49bae8259b26336295278
+AUX pcscd-init.7 408 SHA256 a30a73bab180997523e45beb3d344bc0ef5bbe774cd806bd112f567b07f032a8 SHA512 e4dac959dbea3d418a3e4012788a3cc7b8aeea295f56f1c3e2f0a599cf469d302f3eaadf05cd0b3c7929a583f8d0b6756177ebe2c497c404b70e9aed7fb7d003 WHIRLPOOL 421c9468494b2a8407587d0d9ad7c340573383579b7a66855151d33a5e7884fcfbe54f79d40ab74ee096a76565f96546abde0108602c0d0bd93d6820d80bced7
+DIST pcsc-lite-1.8.20.tar.bz2 745049 SHA256 ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2 SHA512 63fea660d71605ebced5600a59ab5b6a735c4ba3697faf7658d91b8e281a7fb2a2bca6831c8f8c8c87b87a54f7fd03ae818a4c496dcbac0afce523e3b6c606b8 WHIRLPOOL 1c758274a884cf5625d31ed4d56938ee147ba276613c701aee1465b70842a9a73daa92b889835decaaca55707da6be798e3b183aef16a64817d969734d19250a
+DIST pcsc-lite-1.8.21.tar.bz2 750879 SHA256 fe3365eb7d4ce0fe891e2b6d6248351c287435ca502103f1f1431b1710e513ad SHA512 bd3740f4444d2201efaa34a312d2a5f6b5808b0b7ff1d5696dce26df67ef198a63a96670d0acac97a6e693b33079afeeeaa6692746875b0ff72d69a2b0835990 WHIRLPOOL 7bc1040262974c94f9c15f48db5370f1ebd6d29f42267cbf73bcbe750974490dcc012f20a56213a17e26f1cb1dbbe2e9f8fbf0fb9c1db80841aa5863ffe4766c
+DIST pcsc-lite-1.8.22.tar.bz2 751724 SHA256 6a358f61ed3b66a7f6e1f4e794a94c7be4c81b7a58ec360c33791e8d7d9bd405 SHA512 762eccf6a25040653f563b93bf11262ddc015323d06d759a3472ba80af0489804410ba17c7e5330ccd4b5accc8b7314c80b5e99da278561d3818d8c381e6a025 WHIRLPOOL 39c7b6217fe75da42d062a2618cdb749b78c6a1dd04f60a92c45e974d551782ffa621f78198c600b350da9c7c30666a7e92409b7248b3642bc922f8ab9014036
+EBUILD pcsc-lite-1.8.20.ebuild 3191 SHA256 7dad4e3510efd0e16d59a773f02c35b9c1a2b7321aa017342ffb4bb3ae07a75f SHA512 e0b7db517537b165f4a50dc1cd30f0cf58729012bf9bdf526a50c3987ac0e73885c68d4e073a7538102d1969cb1602da3241d9d6a7ea3f9827b81ea1c65e9e92 WHIRLPOOL e6b45c7f3dc663f8422d8aa8a48570271028acf904bdba0b389606b486b04ce79fee59d1d290dad775ce01f907a7c35d48c8e8a0ffde57f2358efe61386451f2
+EBUILD pcsc-lite-1.8.21.ebuild 3216 SHA256 9d338509e9536c2277db57c2b1b62c477abeeb8f1c5f47f3a4b0a1ebd42b7f23 SHA512 ea8988c6ad6a11d50bf0dcdfc53d6cb142bf6e09155e7f8f000c5f631c578eb8155310408996970bc4ad3fac7af23d30f52b51bd873a57c5cfade93fe73d1c32 WHIRLPOOL 23404218b92a240ce19d644ae0c48bbc37d10315a8ad91e7c8d0379788a88ce4157332cd0b398bc54a8b4ea2271f41053621c88a1324d4b8081a39e839b09ee7
+EBUILD pcsc-lite-1.8.22.ebuild 3223 SHA256 dafb10f2c53473db8389939977c13b85c4ff4718901030dfde39edf6bb5e3f41 SHA512 f343c6af8dfb9c1e06bfaf4f58497f6946d098e3c1dcc4db2e8c28d0c31ae2060d771e0d67c7fba60c139505b7be4d3f228775fa2d6d023411fe97e4a7c90cb6 WHIRLPOOL 8120a2c8981faf033abc95e7f2357ab20df324f9f93164b0d1a85278dae98691ba9087c466a76e7c5b19763895de5ff805ecadfcb8b051506f531f228e99a270
+MISC ChangeLog 6395 SHA256 912a7140d0708d614b80b869e94aa569a62f237bd853a61c9fd71b1359edab89 SHA512 bb4df50e966384eb04788492279c3424d7d2e8694cae1f668ee05d25b7b6dd1ebf01c598ba38781d3f17942a460118a17f1e84e8ba8fc83b1f13715a4a5d3fc2 WHIRLPOOL 9af2a40a4c521ff040b545a8911690ef485efe0934784e58693742ae411f93270d7c7e1c64ca4a5863f5ca9746c0458e9edde9e5d28f759e80143991ec65c5a4
+MISC ChangeLog-2015 28207 SHA256 b31dab1f7a1c1bdef303428db1a473edd20ae2bff480e8e89c3d997eec0db2f0 SHA512 a78a50e69f87f99b32147530d00d3a3193a6ece444aaf6cec6843e0cd3c47a2185e2d34f0bb582f9a94bf44f64d607e59d80f5edf7e4d28d84e3d54969f7863a WHIRLPOOL 0219a49e792f088937cd8208677cec68b9c532ec388e3af20ba712e6ce966723008e2237e10f9e1b88cf0f9a962de38e804656db146ff51c80233795abbeb93e
+MISC metadata.xml 1077 SHA256 c2017a8d4069341862246712582099eff835dba057d0bef24d5623f4af1039c4 SHA512 4abc19855a868236dfdcfa6d42fcb901fdf52796e08b589a1413c78b931aee74fd482121ff67da632c2cf2e1ba018ff02f1122f1dac5c2185046f98952efd838 WHIRLPOOL fe32dbc636803d126b46ac2ed16429da44093f773ec0c8f8939d5efe3b9126a2c6bda01ab43acc4bc06edb95d048898ff07310a2bda0f15082525c9a0ec848a4
diff --git a/sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules b/sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules
new file mode 100644
index 000000000000..e6ee464344ff
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules
@@ -0,0 +1,6 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# We add this here so that it runs after ccid's and ifd-gempc's rules;
+# if we just added a pcscd-owned device, we hotplug the pcscd service.
+ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", RUN+="/bin/env IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start"
diff --git a/sys-apps/pcsc-lite/files/pcsc-lite-1.8.11-polkit-pcscd.patch b/sys-apps/pcsc-lite/files/pcsc-lite-1.8.11-polkit-pcscd.patch
new file mode 100644
index 000000000000..e7a7b515820e
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/pcsc-lite-1.8.11-polkit-pcscd.patch
@@ -0,0 +1,20 @@
+Index: pcsc-lite-1.8.11/doc/org.debian.pcsc-lite.policy
+===================================================================
+--- pcsc-lite-1.8.11.orig/doc/org.debian.pcsc-lite.policy
++++ pcsc-lite-1.8.11/doc/org.debian.pcsc-lite.policy
+@@ -15,6 +15,7 @@
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
++ <annotate key="org.freedesktop.policykit.owner">unix-user:pcscd</annotate>
+ </action>
+
+ <action id="org.debian.pcsc-lite.access_card">
+@@ -25,6 +26,7 @@
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
++ <annotate key="org.freedesktop.policykit.owner">unix-user:pcscd</annotate>
+ </action>
+
+ </policyconfig>
diff --git a/sys-apps/pcsc-lite/files/pcscd-init.7 b/sys-apps/pcsc-lite/files/pcscd-init.7
new file mode 100644
index 000000000000..f971cdbceaf8
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/pcscd-init.7
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+name="PC/SC Daemon"
+
+pidfile=/run/pcscd/pcscd.pid
+
+command=/usr/sbin/pcscd
+command_args="${EXTRA_OPTS}"
+
+start_stop_daemon_args="--user pcscd:pcscd"
+
+depend() {
+ need localmount
+ after udev openct dbus
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o pcscd:pcscd /run/pcscd
+}
diff --git a/sys-apps/pcsc-lite/metadata.xml b/sys-apps/pcsc-lite/metadata.xml
new file mode 100644
index 000000000000..a91aa068052e
--- /dev/null
+++ b/sys-apps/pcsc-lite/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+ </maintainer>
+ <longdescription>
+ PC/SC Architecture smartcard middleware library
+ </longdescription>
+
+ <use>
+ <flag name="libusb" restrict="&gt;=sys-apps/pcsc-lite-1.8.0">
+ Use <pkg>dev-libs/libusb</pkg> detection to hotplug new
+ smartcard readers. This flag should only be enabled if you're
+ running a non-Linux kernel or you don't want to use
+ <pkg>sys-fs/udev</pkg>.
+ </flag>
+
+ <flag name="udev">
+ Use <pkg>sys-fs/udev</pkg> rules to handle devices' permissions
+ and hotplug support. Unless you know what you're doing do not
+ disable this flag on Linux kernels. This is provided as an
+ option for completeness.
+ </flag>
+
+ <flag name="policykit">
+ Uses <pkg>sys-auth/polkit</pkg> to restrict access to smartcard readers or
+ smartcars to given users.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/pcsc-lite/pcsc-lite-1.8.20.ebuild b/sys-apps/pcsc-lite/pcsc-lite-1.8.20.ebuild
new file mode 100644
index 000000000000..935b738b30cf
--- /dev/null
+++ b/sys-apps/pcsc-lite/pcsc-lite-1.8.20.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 systemd udev user multilib-minimal
+
+DESCRIPTION="PC/SC Architecture smartcard middleware library"
+HOMEPAGE="http://pcsclite.alioth.debian.org/"
+
+STUPID_NUM="4203"
+MY_P="${PN}-${PV/_/-}"
+SRC_URI="http://alioth.debian.org/download.php/file/${STUPID_NUM}/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+# GPL-2 is there for the init script; everything else comes from
+# upstream.
+LICENSE="BSD ISC MIT GPL-3+ GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# This is called libusb so that it doesn't fool people in thinking that
+# it is _required_ for USB support. Otherwise they'll disable udev and
+# that's going to be worse.
+IUSE="python libusb policykit selinux +udev"
+
+REQUIRED_USE="^^ ( udev libusb ) \
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# No dependencies need the MULTILIB_DEPS because the libraries are actually
+# standalone, the deps are only needed for the daemon itself.
+CDEPEND="libusb? ( virtual/libusb:1 )
+ udev? ( virtual/udev )
+ policykit? ( >=sys-auth/polkit-0.111 )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<app-crypt/ccid-1.4.1-r1
+ !<sys-apps/baselayout-2
+ !<sys-apps/openrc-0.11.8
+ selinux? ( sec-policy/selinux-pcscd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.11-polkit-pcscd.patch
+)
+
+DOCS=( AUTHORS DRIVERS HELP README SECURITY ChangeLog )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ enewgroup openct # make sure it exists
+ enewgroup pcscd
+ enewuser pcscd -1 -1 /run/pcscd pcscd,openct
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-maintainer-mode \
+ --enable-usbdropdir="${EPREFIX}/usr/$(get_libdir)/readers/usb" \
+ --enable-ipcdir=/run/pcscd \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(multilib_native_use_enable udev libudev) \
+ $(multilib_native_use_enable libusb) \
+ $(multilib_native_use_enable policykit polkit)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ newinitd "${FILESDIR}"/pcscd-init.7 pcscd
+
+ if use udev; then
+ insinto "$(get_udevdir)"/rules.d
+ doins "${FILESDIR}"/99-pcscd-hotplug.rules
+ fi
+
+ for f in "${ED}/usr/bin/pcsc-spy"; do
+ if use python; then
+ python_fix_shebang "${f}"
+ else
+ rm "${f}"
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "Starting from version 1.6.5, pcsc-lite will start as user nobody in"
+ elog "the pcscd group, to avoid running as root."
+ elog ""
+ elog "This also means you need the newest drivers available so that the"
+ elog "devices get the proper owner."
+ elog ""
+ elog "Furthermore, a conf.d file is no longer installed by default, as"
+ elog "the default configuration does not require one. If you need to"
+ elog "pass further options to pcscd, create a file and set the"
+ elog "EXTRA_OPTS variable."
+ elog ""
+ if use udev; then
+ elog "Hotplug support is provided by udev rules; you only need to tell"
+ elog "the init system to hotplug it, by setting this variable in"
+ elog "/etc/rc.conf:"
+ elog ""
+ elog " rc_hotplug=\"pcscd\""
+ fi
+}
diff --git a/sys-apps/pcsc-lite/pcsc-lite-1.8.21.ebuild b/sys-apps/pcsc-lite/pcsc-lite-1.8.21.ebuild
new file mode 100644
index 000000000000..708ceb1c43a6
--- /dev/null
+++ b/sys-apps/pcsc-lite/pcsc-lite-1.8.21.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit python-single-r1 systemd udev user multilib-minimal
+
+DESCRIPTION="PC/SC Architecture smartcard middleware library"
+HOMEPAGE="http://pcsclite.alioth.debian.org/"
+
+STUPID_NUM="4216"
+MY_P="${PN}-${PV/_/-}"
+SRC_URI="http://alioth.debian.org/download.php/file/${STUPID_NUM}/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+# GPL-2 is there for the init script; everything else comes from
+# upstream.
+LICENSE="BSD ISC MIT GPL-3+ GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# This is called libusb so that it doesn't fool people in thinking that
+# it is _required_ for USB support. Otherwise they'll disable udev and
+# that's going to be worse.
+IUSE="python libusb policykit selinux +udev"
+
+REQUIRED_USE="^^ ( udev libusb ) \
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# No dependencies need the MULTILIB_DEPS because the libraries are actually
+# standalone, the deps are only needed for the daemon itself.
+CDEPEND="libusb? ( virtual/libusb:1 )
+ udev? ( virtual/udev )
+ policykit? ( >=sys-auth/polkit-0.111 )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<app-crypt/ccid-1.4.1-r1
+ !<sys-apps/baselayout-2
+ !<sys-apps/openrc-0.11.8
+ selinux? ( sec-policy/selinux-pcscd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.11-polkit-pcscd.patch
+)
+
+DOCS=( AUTHORS DRIVERS HELP README SECURITY ChangeLog )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ enewgroup openct # make sure it exists
+ enewgroup pcscd
+ enewuser pcscd -1 -1 /run/pcscd pcscd,openct
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-maintainer-mode \
+ --enable-usbdropdir="${EPREFIX}/usr/$(get_libdir)/readers/usb" \
+ --enable-ipcdir=/run/pcscd \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(multilib_native_use_enable udev libudev) \
+ $(multilib_native_use_enable libusb) \
+ $(multilib_native_use_enable policykit polkit)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ newinitd "${FILESDIR}"/pcscd-init.7 pcscd
+
+ if use udev; then
+ insinto "$(get_udevdir)"/rules.d
+ doins "${FILESDIR}"/99-pcscd-hotplug.rules
+ fi
+
+ for f in "${ED}/usr/bin/pcsc-spy"; do
+ if use python; then
+ python_fix_shebang "${f}"
+ else
+ rm "${f}"
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "Starting from version 1.6.5, pcsc-lite will start as user nobody in"
+ elog "the pcscd group, to avoid running as root."
+ elog ""
+ elog "This also means you need the newest drivers available so that the"
+ elog "devices get the proper owner."
+ elog ""
+ elog "Furthermore, a conf.d file is no longer installed by default, as"
+ elog "the default configuration does not require one. If you need to"
+ elog "pass further options to pcscd, create a file and set the"
+ elog "EXTRA_OPTS variable."
+ elog ""
+ if use udev; then
+ elog "Hotplug support is provided by udev rules; you only need to tell"
+ elog "the init system to hotplug it, by setting this variable in"
+ elog "/etc/rc.conf:"
+ elog ""
+ elog " rc_hotplug=\"pcscd\""
+ fi
+}
diff --git a/sys-apps/pcsc-lite/pcsc-lite-1.8.22.ebuild b/sys-apps/pcsc-lite/pcsc-lite-1.8.22.ebuild
new file mode 100644
index 000000000000..7f3ea5145333
--- /dev/null
+++ b/sys-apps/pcsc-lite/pcsc-lite-1.8.22.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit python-single-r1 systemd udev user multilib-minimal
+
+DESCRIPTION="PC/SC Architecture smartcard middleware library"
+HOMEPAGE="http://pcsclite.alioth.debian.org/"
+
+STUPID_NUM="4225"
+MY_P="${PN}-${PV/_/-}"
+SRC_URI="http://alioth.debian.org/download.php/file/${STUPID_NUM}/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+# GPL-2 is there for the init script; everything else comes from
+# upstream.
+LICENSE="BSD ISC MIT GPL-3+ GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# This is called libusb so that it doesn't fool people in thinking that
+# it is _required_ for USB support. Otherwise they'll disable udev and
+# that's going to be worse.
+IUSE="python libusb policykit selinux +udev"
+
+REQUIRED_USE="^^ ( udev libusb ) \
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# No dependencies need the MULTILIB_DEPS because the libraries are actually
+# standalone, the deps are only needed for the daemon itself.
+CDEPEND="libusb? ( virtual/libusb:1 )
+ udev? ( virtual/udev )
+ policykit? ( >=sys-auth/polkit-0.111 )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<app-crypt/ccid-1.4.1-r1
+ !<sys-apps/baselayout-2
+ !<sys-apps/openrc-0.11.8
+ selinux? ( sec-policy/selinux-pcscd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.11-polkit-pcscd.patch
+)
+
+DOCS=( AUTHORS DRIVERS HELP README SECURITY ChangeLog )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ enewgroup openct # make sure it exists
+ enewgroup pcscd
+ enewuser pcscd -1 -1 /run/pcscd pcscd,openct
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-maintainer-mode \
+ --enable-usbdropdir="${EPREFIX}/usr/$(get_libdir)/readers/usb" \
+ --enable-ipcdir=/run/pcscd \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(multilib_native_use_enable udev libudev) \
+ $(multilib_native_use_enable libusb) \
+ $(multilib_native_use_enable policykit polkit)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ newinitd "${FILESDIR}"/pcscd-init.7 pcscd
+
+ if use udev; then
+ insinto "$(get_udevdir)"/rules.d
+ doins "${FILESDIR}"/99-pcscd-hotplug.rules
+ fi
+
+ for f in "${ED}/usr/bin/pcsc-spy"; do
+ if use python; then
+ python_fix_shebang "${f}"
+ else
+ rm "${f}"
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "Starting from version 1.6.5, pcsc-lite will start as user nobody in"
+ elog "the pcscd group, to avoid running as root."
+ elog ""
+ elog "This also means you need the newest drivers available so that the"
+ elog "devices get the proper owner."
+ elog ""
+ elog "Furthermore, a conf.d file is no longer installed by default, as"
+ elog "the default configuration does not require one. If you need to"
+ elog "pass further options to pcscd, create a file and set the"
+ elog "EXTRA_OPTS variable."
+ elog ""
+ if use udev; then
+ elog "Hotplug support is provided by udev rules; you only need to tell"
+ elog "the init system to hotplug it, by setting this variable in"
+ elog "/etc/rc.conf:"
+ elog ""
+ elog " rc_hotplug=\"pcscd\""
+ fi
+}
diff --git a/sys-apps/pcsc-slb-rf72-drv/Manifest b/sys-apps/pcsc-slb-rf72-drv/Manifest
new file mode 100644
index 000000000000..1758905ae192
--- /dev/null
+++ b/sys-apps/pcsc-slb-rf72-drv/Manifest
@@ -0,0 +1,7 @@
+AUX pcsc-slb-rf72-drv-1.1.0-openct.patch 1211 SHA256 803c5af05198d0ce947d79dded3d0ec7557d7501170d7fdcb1f4b4200f9fcdb8 SHA512 c2191b78d507d59c0b4d8ab211eac37c0d7205aa9078dc9105129d0dc658a2fb94126cc862e60772272a314726d955e8f8c1d851fd649cfd27c3c48e65e65aba WHIRLPOOL 37f2b1309f3e21013ce2206b35af312c6f0830eff1f747d6eda7b4224f76a15f804213e492dab6a474a67b0eadac689367951597184007584c7f0083c9caa0ca
+AUX reader.conf 275 SHA256 98ae5f9a09fd11325c9996da0ed74eb93e6b78e70984ba1f30f3d71de89ea242 SHA512 8c7de2c3504b23ec27b3437e1b321a23dd87db9fef51ead002a8c5b3c569e713e36cebe06a40071c95508568712f10f3b42609d6adb6254f63acf8ecef79f32e WHIRLPOOL 4afb9a9378f1206bc7ddb7f566c4d0347b6102fa6fdc9ef32d646521fbc2ed3ae8a7b52c1e442d4ae437e566e4e5f8213fa839b837abab99edf517fcc218b7c6
+DIST slb_rf72-drv-1.1.0.tar.gz 53110 SHA256 9b1abb82fa805377472d158b79bea58abf3532b0559de540ff448b6d8939835c SHA512 93fd5dc9e38d89a0ae3f8c5adcdf2b4cefd8caabf7cac0e0551795b8b4190031ae7c7e30962dc90c6e8c5fcec6db99d4d14f00b8a7787ec043e366ef344ebd9e WHIRLPOOL ac987862bc7f54f4cfcdb56dae4b1d844d32b553955524f2a3d53678fa915e58ed0e5cf96c87035d7e33ee4cd859734e120c857dd480b6de6828e36e86229078
+EBUILD pcsc-slb-rf72-drv-1.1.0-r2.ebuild 1525 SHA256 c07c49617d8be799d9e19e354b96ad08c9549f34f63464ac040361cf87999c45 SHA512 3e883da42cd68e803ee3afdc563960c64fb8417279a7b1833e051706b2d3eacf85c2287028e70e3b2cd64b6be59bde6e20e9610bc285de64d8225870820da6c4 WHIRLPOOL 2b5bb45861b65a1b8e7b704efe8efb2a8c6603c37003800564665a6d67caf81ad58ac2de7cb0099fded710bc6cc51517b746170662f1c06ba7b100fd4eb81635
+MISC ChangeLog 3115 SHA256 fa978c025746d06301274452fcf78fb6878cea369bd7e085b545f7beaa9809e7 SHA512 9fabe50853c7c007590d263553afc2fb18e5465f08a300b6df292964ccaaa811d4ffacf85b2015c053c6e3d0e50776738001dd4efa2a3255280b4f383269d229 WHIRLPOOL 4412001d2663ca5f09123f56be33a27e36d516a1820a6f26ec8d32dc3d0420ce4c085f55d6f15d74035938e9ddab8aa60841414b14b20b6f3a423e6851d2e486
+MISC ChangeLog-2015 2884 SHA256 93263300112266c7c8400cc2c76476593c5e6029c6504e01ba7038ce5f9b9330 SHA512 ddeca0f0dc9353d8a94b035ed21129ee33f5ee444164c6d5d34d62eb49ddfc1d3ca8ae8d20538bc14153c3e7402d1ce860145ee22f43a13400258d2db59a553e WHIRLPOOL 21f5741c1164d4a46e44fce8e275a6550df1820e75f1b36247d9717e7feaf7bdcd414537897ed04b34296a7fca8e5e2a22ca01a8bed8e4c0f9c12983baf8d76e
+MISC metadata.xml 236 SHA256 dd25b46c95b0c63da84b7ff5778479e31449a385df066e9ee14bf0d7d176f42f SHA512 5f6cd6a85527534d5de7118de5af212ee3044c8c5530a7f7087a28074a2d4ab7be1728325bd985adc063dc795d3cf2b1c4e58a4c4c4ec02d739bd4bbc544ef08 WHIRLPOOL b15a2dfb001c41c8de2895842148b2531b74949e89e93ff8c366519c35792996e344918eaf9144fb081fc240796e47890be356d2339bea60b1e1d41830447d31
diff --git a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch
new file mode 100644
index 000000000000..c7ddb87a5a7f
--- /dev/null
+++ b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch
@@ -0,0 +1,41 @@
+From a0822b820d59a53b0aab87cc12c4d1eae2228561 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 17 Jun 2016 18:58:05 +0300
+Subject: [PATCH] build: use openct instead of embedded binary ctapi
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 4 ++--
+ ifdhandler.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cdba2b6..319449a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,7 @@ clean:
+ rm -f test *.o *.lo *.so
+
+ lib: $(OBJ)
+- $(LD) -G ifdhandler.o lib/libctapi.a -o libslb_rf72.so
++ $(CC) $(LDFLAGS) -shared `pkg-config --libs-only-L libopenct` -lopenctapi ifdhandler.o -o libslb_rf72.so
+
+ ifdhandler.o: ifdhandler.h ifdhandler.c
+- $(CC) $(CFLAGS) -c ifdhandler.c $(INCLUDES)
++ $(CC) $(CFLAGS) `pkg-config --cflags libopenct` -fPIC -DHAVE_PTHREAD_H -c ifdhandler.c $(INCLUDES)
+diff --git a/ifdhandler.c b/ifdhandler.c
+index cbb3a65..256605e 100644
+--- a/ifdhandler.c
++++ b/ifdhandler.c
+@@ -29,7 +29,7 @@
+ #include "pcscdefines.h"
+ #include "ifdhandler.h"
+ #include <ctapidefines.h>
+-#include <ctapi.h>
++#include <openct/ctapi.h>
+ #include <ctbcs.h>
+ #include <stdio.h>
+ #include <string.h>
+--
+2.7.3
+
diff --git a/sys-apps/pcsc-slb-rf72-drv/files/reader.conf b/sys-apps/pcsc-slb-rf72-drv/files/reader.conf
new file mode 100644
index 000000000000..fbf7898ba65e
--- /dev/null
+++ b/sys-apps/pcsc-slb-rf72-drv/files/reader.conf
@@ -0,0 +1,11 @@
+# Configuration file for pcsc-lite
+#
+
+# Schlumberger Reflex 72 reader
+FRIENDLYNAME "Schlumberger Reflex 72"
+# Update the following to the right COM port
+DEVICENAME /dev/null
+LIBPATH %PCSC_DRIVERS_DIR%/serial/libslb_rf72.so
+CHANNELID 1
+
+# End of file
diff --git a/sys-apps/pcsc-slb-rf72-drv/metadata.xml b/sys-apps/pcsc-slb-rf72-drv/metadata.xml
new file mode 100644
index 000000000000..f1c3d59fb213
--- /dev/null
+++ b/sys-apps/pcsc-slb-rf72-drv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild b/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild
new file mode 100644
index 000000000000..2ef864e624f7
--- /dev/null
+++ b/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_P="slb_rf72"
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="Schlumberger Reflex 72 Serial Smartcard Reader"
+HOMEPAGE="http://www.linuxnet.com/sourcedrivers.html"
+LICENSE="all-rights-reserved BSD LGPL-2.1+"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+SLOT="0"
+SRC_URI="mirror://gentoo/${MY_P}-drv-${PV}.tar.gz"
+
+RDEPEND="sys-apps/pcsc-lite
+ dev-libs/openct"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(
+ ERRATA README
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-openct.patch"
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)"
+}
+
+src_install () {
+ local pcscdir="$(pkg-config --variable=usbdropdir libpcsclite)"
+ local conf="/etc/reader.conf.d/${PN}.conf"
+
+ einstalldocs
+
+ dodir "${pcscdir}/serial"
+ insinto "${pcscdir}/serial"
+ insopts -m755
+ doins libslb_rf72.so
+
+ dodir "$(dirname "${conf}")"
+ insinto "$(dirname "${conf}")"
+ newins "${FILESDIR}/reader.conf" "$(basename "${conf}")"
+ sed -i "s#%PCSC_DRIVERS_DIR%#${pcscdir}#g" "${D}/${conf}"
+}
+
+pkg_postinst() {
+ einfo "NOTICE:"
+ einfo "1. modify ${conf}"
+ einfo "2. run update-reader.conf, yes this is a command..."
+ einfo "3. restart pcscd"
+}
+
+pkg_postrm() {
+ #
+ # Without this, pcscd will not start next time.
+ #
+ local conf="/etc/reader.conf.d/${PN}.conf"
+ if ! [ -f "$(grep LIBPATH "${conf}" | sed 's/LIBPATH *//' | sed 's/ *$//g' | head -n 1)" ]; then
+ rm "${conf}"
+ update-reader.conf
+ einfo "NOTICE:"
+ einfo "You need to restart pcscd"
+ fi
+}
diff --git a/sys-apps/pcsc-tools/Manifest b/sys-apps/pcsc-tools/Manifest
new file mode 100644
index 000000000000..8d62a29052f4
--- /dev/null
+++ b/sys-apps/pcsc-tools/Manifest
@@ -0,0 +1,6 @@
+AUX smartcard.cron 319 SHA256 f01e91705425e0c1d85bdc0e5eafb9ac423e94e2d109279f58bf75e02ee1d398 SHA512 cb34e75090ff0fde349b81867383ed776b4c89672039f42426e27d2fce77ba0575827d2627b82fc9c435d6091b26e7c2a0e51dbcd1bdd1c883b8c37000ed516e WHIRLPOOL b18f7aa7e4e2138a2cdc8177de9972710a575acb861687bd1b749d02c9a8a6a06bacd9def2073d9e93cbb92863c025b991e5a16e2b061871b9de7878e81275d6
+DIST pcsc-tools-1.4.27.tar.gz 192342 SHA256 aca73c890293de181cb214b675efac733853afdc97d0c151a3fb5ced28982e55 SHA512 f4532e6deab799c96fb344a8b3d07768b4c13d8800a486cf0bfe6200794e2b49dcd1c761dec86dca3c350d88577ec2bba420298c693449fddeeff93672449836 WHIRLPOOL d6a1b3762714eda3a57f436b19c3bacc4be090191f339dff47d7f6284e17836d86dfb0537385461aebcce8fbc209f27e4c2c3803c97c3cacc518dca7a0352686
+EBUILD pcsc-tools-1.4.27.ebuild 1443 SHA256 4fe96bd52719ad16926151e333d4099557633d0df2956e42a84db0db73be3500 SHA512 4f2c67271f3e343469e0d556980a760e376c143a35763ab740885ef154728d8416f8e36beeda24b924bad5986c814cb1604eef6301b1f1d0982ca2909d1a4d35 WHIRLPOOL 6de13462f4b42e1fd6af14cf666fc8e0a1750106f5ded8511f282e4e622db01634180e2c55477327e79137bf83ce50ca31143776345b00a4721fdb81a9639f3c
+MISC ChangeLog 4191 SHA256 f19a9afb75061a2e69ef4e352fc696ce1aa42db389db62dc152ee5272482417a SHA512 62b426d08d2f71c790a00216050aacf639292d1004e3603425e89a0f62c45e224ca58e7a322d37f28a37f114985c4b01843f75b358fc180b3e229507bd308f08 WHIRLPOOL 455cfd7dd05887f45660dffae0c7586cbfb4fe0aff3075db4e95d10902b4bfa6b67e0df853f11559039bb5515f8417f515d4ae17cc11ee8c104d4886685ba1d2
+MISC ChangeLog-2015 5159 SHA256 bfcd5a6614afa451163b12455b12bd8b9d160b4bb3332cf7be5c20b9070873f8 SHA512 23939d397148f7604f8c70a66875a24987234b33896548cd783398e0fd3c89e0fcc92f254f663d6c3200449ebb0a57ec477a1eb8c22063c1a822919ce797e4db WHIRLPOOL 5191d80220cffb5f682f37187a62894802d0da2aa000ace65e899a719098f21d0bfd0c090af417acc07cafa850c5697f33d4d9a0d63a2638723141d339050d0f
+MISC metadata.xml 470 SHA256 71a288b765cb24293a2e62930cce2c7b2d11e045d824a65b471dcce471a2ff9f SHA512 bd45fbe04b4a3e8b1501d3807f879dc1982288a10d4d209d01690e2ad1a2fbb8a475721961835717a2925e127e26135639bf6bb1f35e147595f9e8e619481079 WHIRLPOOL 276b68377a72bf810348192da6e358e7d853ee67dd451f4a20db7afa7fb3805e83b23810358a44ca3f99ec7598086fa6408690d2696de274ea66e5c21be6b804
diff --git a/sys-apps/pcsc-tools/files/smartcard.cron b/sys-apps/pcsc-tools/files/smartcard.cron
new file mode 100644
index 000000000000..314f46f107ef
--- /dev/null
+++ b/sys-apps/pcsc-tools/files/smartcard.cron
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+SRC=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
+DEST=/usr/share/pcsc/smartcard_list.txt
+
+touch ${DEST} >/dev/null 2>&1 || exit 1
+
+if ! wget --quiet --no-timestamping -O "${DEST}".new "$SRC"; then
+ rm -f "${DEST}".new
+fi
+
+chmod a+r "${DEST}".new
+mv "${DEST}".new "${DEST}"
diff --git a/sys-apps/pcsc-tools/metadata.xml b/sys-apps/pcsc-tools/metadata.xml
new file mode 100644
index 000000000000..36fdbc824dde
--- /dev/null
+++ b/sys-apps/pcsc-tools/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 type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+ </maintainer>
+ <longdescription>User tools for PC/SC SmartCard access (including pcsc_scan and the gscriptor GUI).</longdescription>
+
+ <use>
+ <flag name="network-cron">Monthly cronjob the update-smartcard_list script</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/pcsc-tools/pcsc-tools-1.4.27.ebuild b/sys-apps/pcsc-tools/pcsc-tools-1.4.27.ebuild
new file mode 100644
index 000000000000..3c46092e3b4d
--- /dev/null
+++ b/sys-apps/pcsc-tools/pcsc-tools-1.4.27.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils fdo-mime multilib toolchain-funcs
+
+DESCRIPTION="PC/SC Architecture smartcard tools"
+HOMEPAGE="http://ludovic.rousseau.free.fr/softwares/pcsc-tools/"
+SRC_URI="http://ludovic.rousseau.free.fr/softwares/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="gtk network-cron"
+
+RDEPEND=">=sys-apps/pcsc-lite-1.4.14"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${RDEPEND}
+ dev-perl/pcsc-perl
+ gtk? ( dev-perl/Gtk2 )"
+
+DOCS=(
+ README Changelog
+)
+
+src_prepare() {
+ default
+ sed -i -e 's:-Wall -O2:$(CFLAGS):g' Makefile
+}
+
+src_compile() {
+ # explicitly only build the pcsc_scan application, or the man
+ # pages will be gzipped first, and then unpacked.
+ emake pcsc_scan CC=$(tc-getCC)
+}
+
+src_install() {
+ einstalldocs
+
+ # install manually, makes it much easier since the Makefile
+ # requires fiddling with
+ dobin ATR_analysis scriptor pcsc_scan
+ doman pcsc_scan.1 scriptor.1p ATR_analysis.1p
+
+ if use gtk; then
+ domenu gscriptor.desktop
+ dobin gscriptor
+ doman gscriptor.1p
+ fi
+
+ if use network-cron ; then
+ exeinto /etc/cron.monthly
+ newexe "${FILESDIR}"/smartcard.cron update-smartcard_list
+ fi
+
+ insinto /usr/share/pcsc
+ doins smartcard_list.txt
+}
+
+pkg_postinst() {
+ use gtk && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/sys-apps/pick/Manifest b/sys-apps/pick/Manifest
new file mode 100644
index 000000000000..b243934606b0
--- /dev/null
+++ b/sys-apps/pick/Manifest
@@ -0,0 +1,7 @@
+AUX pick-1.8.0-cflags.patch 204 SHA256 fef0fe1ccfe02906ba0ece20aa49ada01ee0bdf1897df449981d749c24fed759 SHA512 63d5700af23b717641845db6c5d6e2bc6d94f1af4108b28fd7243fd7a46af5687371513fd9e423896b5c6e6245d5c575da5b4645d2db2cdd7c1fff10244fca26 WHIRLPOOL f6814908d7929904a152dfd61d86cea6ca207462b4e14891eec2f4f63a1f67903b03a16c72e0c5b11c5ebf1d0c72aa577865a8a05c0d13673d3f8da1f0155f1a
+AUX pick-1.8.0-tinfo.patch 783 SHA256 42a64432e7eed679b5ee47c498d1dbfc2d27bba14fd77ae16193580ff9ff6dc5 SHA512 bb7fb6308fa92bb0481fa1757041373d3dfbe09baa3e6e1f44c3630b771a35c272a6532ec2fea21d13eaf9831f2577e38a22ed07f93c2b0e864f5c91f9c8f19b WHIRLPOOL b83660f7067f46370c6cb1b357ca249776ddef8600e7d39d3708a4df3588ab17084fe325b73ecdd7d950c6867fef2735d82435781e88d965fc89a08f0a473ddd
+DIST pick-1.8.0.tar.gz 101366 SHA256 7834d3aef9e575ce07414f961d1f024776b49bb23c5dc3b7bb8f6b734131067d SHA512 ed8198dfefeafc1397cdc9f80f8b1b88e7fb813f044ae296b8e6ca2789c8790149d334fdf305bb0e57bb0d42262ad73c4f1e9201132ef059f6b1c289989c3c9f WHIRLPOOL 8cd4617635b7e5e0f3e5cd99e3657cb6f37230a34880275178774bccd081047e38c641e156b0af874176b2d0590ef42aed6f8889e9aa5b295d1143537b22cfe9
+DIST pick-1.9.0.tar.gz 106379 SHA256 97d3f310eb7de44fbe50ad3451c49d859d607fa14acd0c584aafae97eea65267 SHA512 78b799be40f6ba8c312edf7f970d6bd304c6fdf24531182c601ef04465806f5697ffa78015547b8908dd5df57d1c08798b5dc27146eef818425a476fdc247085 WHIRLPOOL a8549e48cf140ba133fe30bc161e11cb479fa1e50f05f67c58a9aac3dfc482bb1837195c9aeea0e4681f452677d17db9d67c8b0b9dde844809bd2afb6fd7ddd7
+EBUILD pick-1.8.0.ebuild 572 SHA256 db187b75129083410146356a78532a6ad4a5942b718e984b153807a5dc67c8d5 SHA512 dae5178511753a06e2632a6951ca34f385370bff17d1fb1e80d7c11f8c8b4a6f9347b6a8847d45db7c4ae341641e2166603e9956bd28aac6862665396b696370 WHIRLPOOL ff548663ebc291e63f34453a2520a7245676a577e3c5465dccaba2651994a28f85adb3e1fa0f7eb0696511728080c9a078376f4517d9f0acbada0340d535f685
+EBUILD pick-1.9.0.ebuild 547 SHA256 baaff9a8d5180c2f5ec1aa22dedc5780531dd8e8811a64a9ee6c3c99dcffbcb1 SHA512 f12167e04fee7a4fb0e38a796271afd6c334e9756a1c0a15ad2ee91f41da324df760ffdc64d6921c5b9b8bea46a335ba66e849051a21af79b7c52ad973de8730 WHIRLPOOL d4c87a9f4360582ee8f28c8c63200140a6e9f398dc81f8b20e5c8f4378d1496f7317c10b325490f2ae60a73bc1276721b7fd4fbc3637d63915347e022163b1b8
+MISC metadata.xml 331 SHA256 df361a75ef3ddcef74052eeeea0dd69c7850ab9b7b45ab3f63910f58c738774d SHA512 1cb3d78ef16d0587d81c649e338e4ff6136e57f6a735198a790935ed3b301292caad7dd1040e532f4892d65f12b9bc36050b18676014feeaccd463d65d04f5df WHIRLPOOL a90336404fd6f09909d247f4c4c026286cfbaf16adf2b79b1e84864c689683a7704739418ca15439bb99ad807cbaecb9709edd985e1cb647a03eacb3febea8ae
diff --git a/sys-apps/pick/files/pick-1.8.0-cflags.patch b/sys-apps/pick/files/pick-1.8.0-cflags.patch
new file mode 100644
index 000000000000..6d7834b5cad9
--- /dev/null
+++ b/sys-apps/pick/files/pick-1.8.0-cflags.patch
@@ -0,0 +1,10 @@
+--- pick-1.8.0/Makefile.am
++++ pick-1.8.0/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS=foreign
+
+-AM_CFLAGS=-Wall -Werror -Wextra
++AM_CFLAGS=-Wall -Wextra
+ AM_CPPFLAGS=-D_GNU_SOURCE
+
+ bin_PROGRAMS=pick
diff --git a/sys-apps/pick/files/pick-1.8.0-tinfo.patch b/sys-apps/pick/files/pick-1.8.0-tinfo.patch
new file mode 100644
index 000000000000..fec89fb90d4b
--- /dev/null
+++ b/sys-apps/pick/files/pick-1.8.0-tinfo.patch
@@ -0,0 +1,24 @@
+Use pkg-config to determine ncurses libs and cflags to use. Fixes when building
+against ncurses with libtinfo split out.
+
+--- pick-1.8.0/configure.ac
++++ pick-1.8.0/configure.ac
+@@ -5,13 +5,10 @@
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_CHECK_FUNCS([pledge reallocarray strtonum])
+-AC_SEARCH_LIBS([setupterm], [curses], [],
+- [
+- AC_SEARCH_LIBS([setupterm], [ncursesw],
+- [AC_DEFINE([HAVE_NCURSESW_H], [1], [Define if ncursesw is available])],
+- [AC_MSG_ERROR([unable to find setupterm function])]
+- )
+- ]
+-)
++PKG_CHECK_MODULES([NCURSES], [ncursesw],
++ [AC_DEFINE([HAVE_NCURSESW_H], [1], [Define if ncursesw is available])],
++ [PKG_CHECK_MODULES([NCURSES], [ncurses])])
++CFLAGS="$CFLAGS $NCURSES_CFLAGS"
++LIBS="$LIBS $NCURSES_LIBS"
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
diff --git a/sys-apps/pick/metadata.xml b/sys-apps/pick/metadata.xml
new file mode 100644
index 000000000000..10fe2acf6f32
--- /dev/null
+++ b/sys-apps/pick/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 type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">calleerlandsson/pick</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/pick/pick-1.8.0.ebuild b/sys-apps/pick/pick-1.8.0.ebuild
new file mode 100644
index 000000000000..5354631f4573
--- /dev/null
+++ b/sys-apps/pick/pick-1.8.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="a fuzzy search tool for the command-line"
+HOMEPAGE="https://github.com/calleerlandsson/pick"
+SRC_URI="https://github.com/calleerlandsson/pick/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses:0="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cflags.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
diff --git a/sys-apps/pick/pick-1.9.0.ebuild b/sys-apps/pick/pick-1.9.0.ebuild
new file mode 100644
index 000000000000..88c100aa3408
--- /dev/null
+++ b/sys-apps/pick/pick-1.9.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="a fuzzy search tool for the command-line"
+HOMEPAGE="https://github.com/calleerlandsson/pick"
+SRC_URI="https://github.com/calleerlandsson/pick/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses:0="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.0-cflags.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
diff --git a/sys-apps/pkgcore/Manifest b/sys-apps/pkgcore/Manifest
new file mode 100644
index 000000000000..dc06011c0004
--- /dev/null
+++ b/sys-apps/pkgcore/Manifest
@@ -0,0 +1,8 @@
+DIST pkgcore-0.9.4.tar.gz 593025 SHA256 741ec7df34b0b25e914adeadb8f0045ed077a79cfe65d2cf84fb2426373ed826 SHA512 c38fb5e4860e9b0442acfa60c431464b69791ffb2e6fe2429ae832c3ca66a54f4d263c031e6f72ae39080dd72b1058d93a5707009c1f9d9d02247b24f6001043 WHIRLPOOL 5367b3f272391bbc43b187880112242f007d538a75010ddaf021e80c56ec79f3a4b1937263dd65d8ba9faec80ca1d64b29e141618f4304433bb18b5e3ccb2f04
+DIST pkgcore-0.9.7.tar.gz 592202 SHA256 e14ab7ee3873e723c4956d5d370d60389d5b36f74d7beaff5c3b1455814a18fd SHA512 cb996fd35a8e4e73acfacf1942d498932ec092a282397bd41df72eea26b6d08c15e01b96ece8ebb6876e84281d85d4f8ef81e1f2ef107adff1b984ee592d6a6f WHIRLPOOL a669eede43a4e8e51e6d48671f3ad359b41165adff60773318849ee7da127e4c6497ab2c607fba496f928c3841c09adf8ebe406af9cd6436b73f98173cc5d911
+EBUILD pkgcore-0.9.4.ebuild 1431 SHA256 29c11917f46c9bb80dfedf1c81a46c461419865afb3007f802dc7eacec4d9b33 SHA512 fe0cd648df1713c8c442e880677515c9768b26afd19505168f69eb810866fe37cc970c04a6b64240646022c3bebeb09be861ecb5277569203d001f1cc8136da9 WHIRLPOOL e6f6b2cf6e1ab85d7389663648552f098b4031a8c70323d44b750b48373ff90b361d28b8fa33a341580d0339d9303b1a25f83f7bab09e72f02e1baee522f4642
+EBUILD pkgcore-0.9.7.ebuild 1497 SHA256 a5f7c8ab7112114cfac166542e218dea3b60b89aa1f0fef37783b55823a05e36 SHA512 07ad1813bc307022300766e424ae9b09a995300c802d2f89557be74dbb3783da1cdec9b56c409d6bcc647c2be49aa1524a8b63ab2f14f965d6f099a2e8deeeb5 WHIRLPOOL 71c69b52d0348ba59b6fb010bb07b92a9f289aeff52a7300ff40a7f6ac6c70887127cccae3dba270defd7ce0893acf2b0fccb77944656f289e4e8e56f28cae70
+EBUILD pkgcore-9999.ebuild 1497 SHA256 a5f7c8ab7112114cfac166542e218dea3b60b89aa1f0fef37783b55823a05e36 SHA512 07ad1813bc307022300766e424ae9b09a995300c802d2f89557be74dbb3783da1cdec9b56c409d6bcc647c2be49aa1524a8b63ab2f14f965d6f099a2e8deeeb5 WHIRLPOOL 71c69b52d0348ba59b6fb010bb07b92a9f289aeff52a7300ff40a7f6ac6c70887127cccae3dba270defd7ce0893acf2b0fccb77944656f289e4e8e56f28cae70
+MISC ChangeLog 3982 SHA256 158e4d1c3afe73ad9477309d865400461add0e112212b39e846f52e375eb2da5 SHA512 d7ca3a8b8abbce608cdcdb0b7f98364c564fc122f841be0905f1d031613a1a96d8d08715fcf1509f7a8017bff823c88eedb8d6e47ca14b78e0181721f0dd8ce2 WHIRLPOOL 28b31431215c65cedf0918fcf3f6fb9fd9bd0db007ff91eab3c500229c95ce7d0ab936877567e5754bd2e8a6f0a023e0a8c195c69d43b9b11f0c66c8dbc078b0
+MISC ChangeLog-2015 32139 SHA256 d8555ebdd853d10cb9c397279a0353fbc4cf1ac6c5c7fb837244fee266784b89 SHA512 99dfa808313143b26135e5fe4377f1d666d41b3d3bbbc3182957e5aee86fe587a35c13e332efc6e9b04a61a0f615622d3dced5091993f6fffafac6e3f5a2d49a WHIRLPOOL 8cb3833d8849a377919de5089662c3f725f2989ec80dc161a11bdb1965b715c4887d18f03291a67b2525c6b4d7b9b1d932e4e9cf5c0e75b58dc4ddd6742ddb98
+MISC metadata.xml 409 SHA256 700d8bfd2e1e39ea7d951ecef3c190c9270437ed0199915d93c45122f0a4ebc8 SHA512 ec04202f105a62a697511c7a89dad118b3618fdce4044c25648492e1557a95b9e29c01a08fca21e106273485471af98c52a6db6b2a40605a67a632938faebd29 WHIRLPOOL c7f771726218b1169c940aa688ac335faf2dc4e87684750a71056096bf94460ddc09f1edd60a2eeddb946bbcc4ca5c4e0cf8f7751357c219a8733adce67687b3
diff --git a/sys-apps/pkgcore/metadata.xml b/sys-apps/pkgcore/metadata.xml
new file mode 100644
index 000000000000..eed40afb00f9
--- /dev/null
+++ b/sys-apps/pkgcore/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 type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <use>
+ <flag name="doc">Build and install API docs.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pkgcore/pkgcore</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/pkgcore/pkgcore-0.9.4.ebuild b/sys-apps/pkgcore/pkgcore-0.9.4.ebuild
new file mode 100644
index 000000000000..9d7becddcc56
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-0.9.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_IN_SOURCE_BUILD=1
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ SRC_URI="https://github.com/pkgcore/${PN}/releases/download/v${PV}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+IUSE="doc test"
+
+if [[ ${PV} == *9999 ]] ; then
+ SPHINX="dev-python/sphinx[${PYTHON_USEDEP}]"
+else
+ SPHINX="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+fi
+RDEPEND=">=dev-python/snakeoil-0.7.0[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ ${SPHINX}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )
+"
+
+pkg_setup() {
+ # disable snakeoil 2to3 caching...
+ unset PY2TO3_CACHEDIR
+}
+
+python_compile_all() {
+ esetup.py build_man $(usex doc "build_docs" "")
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ distutils-r1_python_install install_man \
+ $(usex doc "install_docs --path="${ED%/}"/usr/share/doc/${PF}/html" "")
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ python_foreach_impl pplugincache
+}
diff --git a/sys-apps/pkgcore/pkgcore-0.9.7.ebuild b/sys-apps/pkgcore/pkgcore-0.9.7.ebuild
new file mode 100644
index 000000000000..90d96abc2cdf
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-0.9.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_IN_SOURCE_BUILD=1
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+IUSE="doc test"
+
+if [[ ${PV} == *9999 ]] ; then
+ SPHINX="dev-python/sphinx[${PYTHON_USEDEP}]"
+else
+ SPHINX="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+fi
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND="=dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND=">=dev-python/snakeoil-0.7.3[${PYTHON_USEDEP}]"
+fi
+DEPEND="${RDEPEND}
+ ${SPHINX}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )
+"
+
+pkg_setup() {
+ # disable snakeoil 2to3 caching...
+ unset PY2TO3_CACHEDIR
+}
+
+python_compile_all() {
+ esetup.py build_man $(usex doc "build_docs" "")
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ distutils-r1_python_install install_man \
+ $(usex doc "install_docs --path="${ED%/}"/usr/share/doc/${PF}/html" "")
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ python_foreach_impl pplugincache
+}
diff --git a/sys-apps/pkgcore/pkgcore-9999.ebuild b/sys-apps/pkgcore/pkgcore-9999.ebuild
new file mode 100644
index 000000000000..90d96abc2cdf
--- /dev/null
+++ b/sys-apps/pkgcore/pkgcore-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_IN_SOURCE_BUILD=1
+inherit distutils-r1
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="a framework for package management"
+HOMEPAGE="https://github.com/pkgcore/pkgcore"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+IUSE="doc test"
+
+if [[ ${PV} == *9999 ]] ; then
+ SPHINX="dev-python/sphinx[${PYTHON_USEDEP}]"
+else
+ SPHINX="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+fi
+if [[ ${PV} == *9999 ]]; then
+ RDEPEND="=dev-python/snakeoil-9999[${PYTHON_USEDEP}]"
+else
+ RDEPEND=">=dev-python/snakeoil-0.7.3[${PYTHON_USEDEP}]"
+fi
+DEPEND="${RDEPEND}
+ ${SPHINX}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )
+"
+
+pkg_setup() {
+ # disable snakeoil 2to3 caching...
+ unset PY2TO3_CACHEDIR
+}
+
+python_compile_all() {
+ esetup.py build_man $(usex doc "build_docs" "")
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ distutils-r1_python_install install_man \
+ $(usex doc "install_docs --path="${ED%/}"/usr/share/doc/${PF}/html" "")
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ python_foreach_impl pplugincache
+}
diff --git a/sys-apps/pmount-gui/Manifest b/sys-apps/pmount-gui/Manifest
new file mode 100644
index 000000000000..bab4155834b6
--- /dev/null
+++ b/sys-apps/pmount-gui/Manifest
@@ -0,0 +1,5 @@
+DIST pmount-gui-0_pre20130806.tar.xz 5132 SHA256 d08d3b717528f574eef8c29503e3f1d3b788b17e9997fbce643cf88265a25aea SHA512 97871dcfbd14a26f93186b8e08d5512c6b7d6fbf76c94a9e4f0f8e74404ce7a8e1139bb5d3fd432fb1b228ff48f9f56195124839431f6a5d3d82f43165a2b5ce WHIRLPOOL 6f51624ca294f1a24d1895e9a0a0698113e26893a25dbc443dadad6de25060965aed6ec314a7f942a3d5bbcc12b28160c0cfa864c47bca0a97356e30d950ece3
+EBUILD pmount-gui-0_pre20130806.ebuild 712 SHA256 1459a6a97c6db73957721bc651f2c80b2b299effd5064464886542f705398898 SHA512 fc69d3ae66631108c93754d4c96d31b441f19b30a743f2b87091b0a51957c0a8bc07ce5d8d040835f1e7eb8d0b8c463339059ea3a60d9bc395316a1e5b32021f WHIRLPOOL 1e8467a84f758b831f05cd6f821ebb25fec3fb658d260210979cbddf96def353d9a0412a7b76ef5cd485655ab9938397b92514f175c896e83d41ba58dd3963d5
+MISC ChangeLog 2696 SHA256 534093c1f57afd0a4861e4d6726916d6967c13a197662a6f88f0a8ae73e81495 SHA512 ad03eb848bb2bae414fd0c77bac390f0e5769a8664deb2527cc967c18e5e6021ef9830ecfca7917418a50176005b51eb5f6262ee9a06381fd3c0e63cc771042a WHIRLPOOL 703bad9a3ab0dcab22d4549236d32db5d7d5866d956cca729c7244fe111645279193ed05f6fa99ea3248a2195137695f991c426dc246e12badcf9ce23e990245
+MISC ChangeLog-2015 539 SHA256 d008775e2f90cdbeec3933750f3d93a917e332f4b40d94b8a98bc6bdad5c566f SHA512 c93e28cfdb3d67cfed183b99a8597c933a962e9a3aa2c666132c778616f461dc6f6c1daef9f47fd4a4ba792fd4646d2393fe393860268185d24e27f754fe2aa7 WHIRLPOOL 8794f9d3631bd04fbde4414b1ec4c6a64e25de8ec282ce7675c50256fadbe9a76641748a20b9cecc0608aca2bbaa8b50f2d2c4a0fac72f2a283b7fe73e69bc70
+MISC metadata.xml 276 SHA256 437f3dba7deca9da3b3f8ecda9bb5e97253de0412cbb3095d876f39140f3ea98 SHA512 3497963f4fb51bb32521472b54a995091cb457d2cda65c786bd4b46e5af325caf8f6d5c969cefa0c09fe717df09fb015ec59b52f5571c3b2b9d4ea33e6c843ab WHIRLPOOL 8550fd604cf609511bf7c34245ebd6682dd6d058d8cbfa099a77c94d1afcf592909eb679a28a0806957ac0949c6cff350675e0182303ec5890a5e2c2c26d29c5
diff --git a/sys-apps/pmount-gui/metadata.xml b/sys-apps/pmount-gui/metadata.xml
new file mode 100644
index 000000000000..2ba8e9e851e4
--- /dev/null
+++ b/sys-apps/pmount-gui/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>desktop-misc@gentoo.org</email>
+ <name>Gentoo Desktop Miscellaneous Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/pmount-gui/pmount-gui-0_pre20130806.ebuild b/sys-apps/pmount-gui/pmount-gui-0_pre20130806.ebuild
new file mode 100644
index 000000000000..e43bb34fb1ae
--- /dev/null
+++ b/sys-apps/pmount-gui/pmount-gui-0_pre20130806.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+if [ ${PV} = 9999* ]; then
+ EGIT_REPO_URI="git://git.tdb.fi/pmount-gui"
+ inherit git-2
+else
+ SRC_URI="https://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit toolchain-funcs
+
+DESCRIPTION="A simple graphical frontend for pmount"
+HOMEPAGE="http://git.tdb.fi/?p=pmount-gui.git;a=summary"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+COMMON_DEPEND="x11-libs/gtk+:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/pmount
+ virtual/udev"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+src_compile() {
+ emake CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README.txt
+}
diff --git a/sys-apps/pmount/Manifest b/sys-apps/pmount/Manifest
new file mode 100644
index 000000000000..d6fb8dfa710f
--- /dev/null
+++ b/sys-apps/pmount/Manifest
@@ -0,0 +1,9 @@
+AUX pmount-0.9.19-testsuite-missing-dir.patch 1354 SHA256 cbb513b5cfb8d12685e5967359ab4f99b78a144df255f4e6a3ce70686f8b7b10 SHA512 a606b937a39c558fa5c48544fa3451504d3c8f540de97d87630e0d3edd6a984b74d8c52fda189aef818e007820ee146daf6b3ce75aad03b3e8e4309723f5113c WHIRLPOOL 929e2e4e21df0efb56837ed0ec1c07c8a7a5cdb54725eca76aa878c39bbc22e795fea6d897dcb917c51e4758b410889ded997d9b680543192baa47b523d251a9
+AUX pmount-0.9.99_alpha-locale-regex.patch 749 SHA256 149a8e6cfaa5437d26f26d17ce7590dfb80ed6171cde0bc8aaed1f1e088f268e SHA512 9009544a6d424dc6449d8f1ba53521802741b904129e1f4cd729a1051735fda3d6fcfe85d5aa49f6fbc5df62abbcb21fd7ab578cee667efaf3e4c00dc1b8131c WHIRLPOOL 982438fc720b35453bd57e83487690aba07eef29713aec716f1e98e219597b0e7f5bb6afabc26d779631d10f76a4158602ce9d2e051d855032bba806a3cf39d4
+AUX pmount.bash-completion 2935 SHA256 7a184dfd34f2e89123e2d6561582d6ed8ca3a03d0acb299497950a96761b2335 SHA512 b57a37afc2a124c6a4f19924a367d03b315e93575d0b152acde06e43c7dcd1b3d5df46c02d2e5ceef35911edb4f96d1d4113fb6d7cd1e9531fd9840c3729f924 WHIRLPOOL f6767196c5cc253331675792a15e47fa4b85663b69fb31850dd0e66c6cc385ffec54aea0e9c120b85fac592c3b40b8e780b92fc544387bacb86394e0f80f4765
+DIST pmount_0.9.99-alpha.orig.tar.bz2 364282 SHA256 ca06bd0c429d3db9382433f378d07bf763534f70fe71015322678e321b0679e5 SHA512 12105674f099afb82302c0960f4f50a4bc75382071940e897d9c65b57a0f4de1fafdaa2a4c05f0fa5cba55453ae0c21376b9891353cad1afa88e5fbd9f63d5e9 WHIRLPOOL 18172b606f20f1b95ff0b60fa5c83de14c04fa2b774598fdf1ef21746c0cc77c63469ed436d752d7a172e90847b38635b08e3e80db28294fdf3d102408cbdfc9
+EBUILD pmount-0.9.99_alpha-r3.ebuild 2018 SHA256 59b683c296f1ba54db6eb2d7f2112da8080cf33748eb2d65d54f8d061b037c05 SHA512 179c2588a00cb8b856899f99078dc21970664407f5b1fb278b91733577d72687429986270db4ea94dcd7cefbfbf9f886be3884a5a1fb4baa3e0d39cfc6a32b06 WHIRLPOOL 833ff3b04d7663d88e4b6c224d23267a697d66ed53dfff1964b6e58eb9b41d2155bd1d7c8cd82e64f3a9dbef4236138a94fffc32bcfa1977828689d4eb482b5f
+EBUILD pmount-0.9.99_alpha-r5.ebuild 2135 SHA256 8588e5def51674b17b249ef9b50f31534137c781fae745f4207a82bb42892b4a SHA512 accd02aee14bc964e807a0c26528da8b7910172a5c9a289b7033ff4121d3669c8b3828b5e7a47a0fc39fe0b480eac60ae0c07d3e085fe9d4f7f68e07ca0158b6 WHIRLPOOL 1a6016ed78d0a4a385247bcd31d2295e3aae05d9e2691d9adc2e571c1ce426af8bdd46b45ff135eb94e513c143075a5e3c50d1af728c0375913f59b34b6e4615
+MISC ChangeLog 2397 SHA256 46d62225a7d4bc18a0b02584713b3a049153d07e53148b7285b077305a8462e7 SHA512 d750ac2e7a4c34c37cbfd388d826295ccf86358a05dad74d0247f807501e4a899079bf5b7fac705983d4c39983b2b92a3c2430efd4591630ac2c1723dc99f070 WHIRLPOOL 8c854ba910221a0b91ecf8899f340c48e10dc6a22f90ec53a3d3d25f8a648662f7f2256219a09cd2f767bed364555f85563611c8728d111fef48962408ef754d
+MISC ChangeLog-2015 14423 SHA256 c0db42f10691b74f16e34d90417b93e2904c1b24b98e08045151df7d1ba8077a SHA512 06f7abda04505fb8a230fd906b71ec7b0135218f9986726a10a88b2056a2032c581b271eaaf7abd8b4e4e2c4ef875888ba42eeac9327641c3c892b1be7995c5e WHIRLPOOL aadfcaa42bd5d15fb1e4a0f43a3771c8cd7177df476be377dbdd01f02033f2bb181f8e24ecc15a5c3693f74402fb4d7c3c22819904c096f7e51b18bd34c3462d
+MISC metadata.xml 247 SHA256 34d6ed4186bad4ac57e0b4c08b657b14e28852a83c4ccf4d8a62f7829063b1cf SHA512 d6e2ea8a9d74791bcbf3d6311a66bafc20b8f4db3a576d9a8d54b86d7afb231122b8d87f71f3f46360980adf8d815c633b6d5041f9a30fc8656e8fb66057a282 WHIRLPOOL fbd18b3e6e3d777e8d78e91b8d32c5e357fd2a1c754d2c9add4622be682521e59556f466cba397d913f0e63265202744ceaf76dc7823be0a172a9bf4da6a2579
diff --git a/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch b/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch
new file mode 100644
index 000000000000..93d0555f0f3d
--- /dev/null
+++ b/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch
@@ -0,0 +1,43 @@
+From d3f14cfd82cae939d9c487e9cb1a2973dc9b9a4f Mon Sep 17 00:00:00 2001
+From: Romain Perier <mrpouet@gentoo.org>
+Date: Wed, 23 Sep 2009 19:37:55 +0200
+Subject: [PATCH] Fix testsuite due to missing sub-directory (see gitweb on upstream)
+
+---
+ tests/check_fstab/a | 1 +
+ tests/check_fstab/d | 1 +
+ tests/check_fstab/fstab | 6 ++++++
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+ create mode 100644 tests/check_fstab/a
+ create mode 100644 tests/check_fstab/d
+ create mode 100644 tests/check_fstab/fstab
+
+diff --git a/tests/check_fstab/a b/tests/check_fstab/a
+new file mode 100644
+index 0000000..d16d1c5
+--- /dev/null
++++ tests/check_fstab/a
+@@ -0,0 +1 @@
++This file is a 'dummy device file' for the fstab check
+diff --git a/tests/check_fstab/d b/tests/check_fstab/d
+new file mode 100644
+index 0000000..d16d1c5
+--- /dev/null
++++ tests/check_fstab/d
+@@ -0,0 +1 @@
++This file is a 'dummy device file' for the fstab check
+diff --git a/tests/check_fstab/fstab b/tests/check_fstab/fstab
+new file mode 100644
+index 0000000..8ba6f6c
+--- /dev/null
++++ tests/check_fstab/fstab
+@@ -0,0 +1,6 @@
++# A dummy fstab file for
++
++# <file system> <mount point> <type> <options> <dump> <pass>
++check_fstab/a /test1 ext3 defaults 0 0
++check_fstab/e /test2 ext3 defaults 0 0
++
+--
+1.6.5.rc1
+
diff --git a/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch b/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch
new file mode 100644
index 000000000000..c96fc0554522
--- /dev/null
+++ b/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/416985
+
+--- src/conffile.c
++++ src/conffile.c
+@@ -372,7 +372,7 @@ static int cf_prepare_regexps()
+ /* A regexp matching a boolean value*/
+
+ if( regcomp(&declaration_RE,
+- "^[[:blank:]]*([-a-zA-Z_]+)[[:blank:]]*"
++ "^[[:blank:]]*([-[:alpha:]_]+)[[:blank:]]*"
+ "=[[:blank:]]*(.*)$",
+ REG_EXTENDED )) {
+ perror(_("Could not compile regular expression for boolean values"));
+@@ -392,7 +392,7 @@ static int cf_prepare_regexps()
+ }
+
+ if( regcomp(&uint_RE,
+- "^[[:blank:]]*([a-zA-Z_]+)[[:blank:]]*"
++ "^[[:blank:]]*([[:alpha:]_]+)[[:blank:]]*"
+ "=[[:blank:]]*([0-9]+)$",
+ REG_EXTENDED )) {
+ perror(_("Could not compile regular expression for integer values"));
diff --git a/sys-apps/pmount/files/pmount.bash-completion b/sys-apps/pmount/files/pmount.bash-completion
new file mode 100644
index 000000000000..31b63020910c
--- /dev/null
+++ b/sys-apps/pmount/files/pmount.bash-completion
@@ -0,0 +1,94 @@
+#-*- mode: shell-script;-*-
+#
+# Bash Completion snippet for the pmount command
+# Copyright (c) Eduard Bloch, 2009-2011
+#
+# Supports most (all?) of the possible option sets of version 0.9.18 except of
+# too many device/directory arguments, the charset search can also be improved
+#
+# Inputs:
+# $1 -- name of the command whose arguments are being completed
+# $2 -- word being completed
+# $3 -- word preceding the word being completed
+# $COMP_LINE -- current command line
+# $COMP_PONT -- cursor position
+# $COMP_WORDS -- array containing individual words in the current
+# command line
+# $COMP_CWORD -- index into ${COMP_WORDS} of the word containing the
+# current cursor position
+# Output:
+# COMPREPLY array variable contains possible completions
+
+_pmount() {
+
+ local cur prev options devices fslist
+
+ options=' -r --read-only -w --read-write -s --sync -A --noatime -e --exec \
+ -t filesystem --type filesystem -c charset --charset charset -u umask \
+ --umask umask --dmask dmask --fmask fmask -p file --passphrase file \
+ -h --help -d --debug -V --version'
+ fslist=' ascii cp1250 cp1251 cp1255 cp437 cp737 cp775 cp850 cp852 cp855 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp932 cp936 cp949 cp950 euc-jp iso8859-1 iso8859-13 iso8859-14 iso8859-15 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 iso8859-7 iso8859-9 koi8-r koi8-ru koi8-u utf8'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(t|-type))
+ COMPREPLY=( $( grep "^[[:space:]]$cur" /proc/filesystems ) )
+ return 0
+ ;;
+
+ -@(c|-charset))
+ COMPREPLY=( $( compgen -W "$fslist" -- $cur ) )
+ return 0
+ ;;
+ -@(u|d|-umask|-dmask))
+ COMPREPLY=( ${cur}0 ${cur}1 ${cur}2 ${cur}3 ${cur}4 ${cur}5 ${cur}6 ${cur}7 )
+ return 0
+ ;;
+
+ -@(p|-passphrase))
+ _filedir
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ devices="$( command ls $(grep -v '^[[:space:]]*#' /etc/pmount.allow ) $(grep 1 /sys/block/*/removable | sed -e 's,/sys/block/,/dev/,;s,/removable:1,*,') 2>/dev/null | sort -u | sed -e 's,\(^/dev/\)\(.*\),\1\2 \2,' )"
+ COMPREPLY=( $( compgen -W "$devices" -- $cur ) )
+ fi
+
+ return 0
+}
+
+
+_pumount() {
+
+ local cur prev options devices mdir
+
+ mdir="$(readlink -f /media)"
+
+ options=' -l --luks-force -h --help -d --debug --version'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ devices="$( grep $mdir /proc/mounts | sed -e 's,.*/$mdir/,,;s,\ .*,,;s,\(.*\),\1\n/dev/\1,;s,/dev//dev,/dev,' )"
+ COMPREPLY=( $( compgen -W "$devices" -- $cur ) )
+ fi
+
+ return 0
+}
+
+complete -F _pmount $filenames pmount
+complete -F _pumount $filenames pumount
+
diff --git a/sys-apps/pmount/metadata.xml b/sys-apps/pmount/metadata.xml
new file mode 100644
index 000000000000..0319eec4c8be
--- /dev/null
+++ b/sys-apps/pmount/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild b/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild
new file mode 100644
index 000000000000..7f24b703357e
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
+HOMEPAGE="http://pmount.alioth.debian.org/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
+#SRC_URI="http://alioth.debian.org/frs/download.php/3530/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86"
+IUSE="crypt"
+
+RDEPEND=">=sys-apps/util-linux-2.17.2
+ crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+S=${WORKDIR}/${P/_/-}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Restore default value from pmount <= 0.9.23 wrt #393633
+ sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
+
+ cat <<-EOF > po/POTFILES.skip
+ src/conffile.c
+ src/configuration.c
+ src/loop.c
+ EOF
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch \
+ "${FILESDIR}"/${P}-locale-regex.patch
+}
+
+src_configure() {
+ econf --disable-hal
+}
+
+src_test() {
+ local testdir=${S}/tests/check_fstab
+
+ ln -s $testdir/a $testdir/b && ln -s $testdir/d $testdir/c && \
+ ln -s $testdir/c $testdir/e \
+ || die "Unable to create fake symlinks required for testsuite"
+
+ emake check
+}
+
+src_install () {
+ # Must be run SETUID+SETGID, bug #250106
+ exeinto /usr/bin
+ exeopts -m 6710 -g plugdev
+ doexe src/{p,pu}mount
+
+ dodoc AUTHORS ChangeLog TODO
+ doman man/{{p,pu}mount.1,pmount.conf.5}
+
+ insinto /etc
+ doins etc/pmount.{allow,conf}
+
+ keepdir /media #501772
+}
+
+pkg_postinst() {
+ elog
+ elog "This package has been installed setuid and setgid."
+
+ elog "The permissions are as such that only users that belong to the plugdev"
+ elog "group are allowed to run this. But if a script run by root mounts a"
+ elog "device, members of the plugdev group will have access to it."
+ elog
+ elog "Please add your user to the plugdev group to be able to mount USB drives"
+}
diff --git a/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild b/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild
new file mode 100644
index 000000000000..9b9c545be948
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user bash-completion-r1
+
+DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
+HOMEPAGE="http://pmount.alioth.debian.org/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
+#SRC_URI="http://alioth.debian.org/frs/download.php/3530/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="crypt"
+
+RDEPEND=">=sys-apps/util-linux-2.17.2
+ crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+S=${WORKDIR}/${P/_/-}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Restore default value from pmount <= 0.9.23 wrt #393633
+ sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
+
+ cat <<-EOF > po/POTFILES.skip
+ src/conffile.c
+ src/configuration.c
+ src/loop.c
+ EOF
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch \
+ "${FILESDIR}"/${P}-locale-regex.patch
+}
+
+src_configure() {
+ econf --disable-hal
+}
+
+src_test() {
+ local testdir=${S}/tests/check_fstab
+
+ ln -s $testdir/a $testdir/b && ln -s $testdir/d $testdir/c && \
+ ln -s $testdir/c $testdir/e \
+ || die "Unable to create fake symlinks required for testsuite"
+
+ emake check
+}
+
+src_install () {
+ # Must be run SETUID+SETGID, bug #250106
+ exeinto /usr/bin
+ exeopts -m 6710 -g plugdev
+ doexe src/{p,pu}mount
+
+ dodoc AUTHORS ChangeLog TODO
+ doman man/{{p,pu}mount.1,pmount.conf.5}
+
+ insinto /etc
+ doins etc/pmount.{allow,conf}
+
+ keepdir /media #501772
+
+ newbashcomp "${FILESDIR}/${PN}.bash-completion" "${PN}"
+ bashcomp_alias pmount pumount
+}
+
+pkg_postinst() {
+ elog
+ elog "This package has been installed setuid and setgid."
+
+ elog "The permissions are as such that only users that belong to the plugdev"
+ elog "group are allowed to run this. But if a script run by root mounts a"
+ elog "device, members of the plugdev group will have access to it."
+ elog
+ elog "Please add your user to the plugdev group to be able to mount USB drives"
+}
diff --git a/sys-apps/policycoreutils/Manifest b/sys-apps/policycoreutils/Manifest
new file mode 100644
index 000000000000..792c49fdc7ae
--- /dev/null
+++ b/sys-apps/policycoreutils/Manifest
@@ -0,0 +1,18 @@
+AUX 0010-remove-sesandbox-support.patch 747 SHA256 af6969721dede49f4de4e1db8e98e8400a8f0e3ec0b55aee9295aea0d6ba3b9a SHA512 b7b54191d2b8703393dd23a7fcccbdc3e2b7234acd962e994c8549eebae6cae3b6f62055b47a2d5db94510739abfb2fa365090c452422b6fbc02ad625ebe4859 WHIRLPOOL 1ed396c3346123af9fc8a5e911a6c241e2b64d7424b2d5194b0cc7c6b44a960c70afde3d04a508ecf525af038a52c739bc424230db34fcb52096304b2cda2771
+AUX 0020-disable-autodetection-of-pam-and-audit.patch 3924 SHA256 5f322dcc8c24838ec30c1df3aa69876063989fd07389c60ef64802c6fe25e91e SHA512 0efcbe36fdaa369cb1837767e872189f9f18b58d738b38c304ef31c568e60d602cfb5f87328a3b1f209840e2ab102f2d0ee8c4e918b2866c0ca978f33252ad33 WHIRLPOOL 669a451f98f39607e6a5a235e67ab432e480327dfe8204c2fcbb7455f571da4a64e91d76926c34e7fc25cec393ed6fbabb33e46c00e4f7a30848f304ed96b61f
+AUX 0030-make-inotify-check-use-flag-triggered.patch 650 SHA256 1cf0d985c865d9afe134e598c50b40420e4a48f4fde6e5d1916a880b8c393a75 SHA512 9ae10652ae14abd8930690363d41d9cacf0d0003ff21cf75dfc52a4ab7a4ab3d1fa9f1dc6994de9ae874483297478d79ee071dae766dfabf07ba70092bd11ba4 WHIRLPOOL ebf776adb8115db80418313ee8ad80f8d03b71358b1aa790ac690cd81b3646f0818da6bbf5d2f570c4be4150e6a2b475ff848622239f65e1479f29c9eb6a44f1
+AUX 0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch 519 SHA256 63d4952efdf1fa8510485900e17f3bcb356086dda9440e3f4dd9fbcad83ec027 SHA512 c49b440ca07003688e115ea792188f37e5456d8afde0ee3be7a49af8c51ca7089e85e64ad237fbdc3c34685a58022f695f00fe443face1052f8181829678a256 WHIRLPOOL 1a246957e0aebf5129117644eb202a123ae8e43cca19b961796cc3940253e92c479819911a681d2434f794693115843cf351f04f9610e46171bef7048b59a8d1
+AUX 0110-build-mcstrans-bug-472912.patch 2509 SHA256 c89ee8947ba7d04c7df30eef7fee91233188da90718c05a93c07112eb272dd8d SHA512 97a6c17e8232dc62dd5beaf101efa1e0462eedfb9fb4eff93d96171bbd866bd12b19ada1c512eef20ba732813e6f009276debbe5385ece373dd3bad1b7e61765 WHIRLPOOL fdb2509aab5e98ed11a942457711132e5888a25c0426bde59a84fb8bd8dc3f065f0e6daba77730e94a114c1e1431a1cee17a6ccf305946a5abed328f027c0bd1
+AUX 0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch 483 SHA256 572d141797d2a164b50b081fd6167f3acd93f62cc878c8859f731580243deb7d SHA512 a8a81158924aa527038696a98503144e50ed941ba1afbf52d26fc5bb9373c7ac6fd3f864070ff717c5b45ddba0470bc43b142f02da134559af8896c15084234f WHIRLPOOL 17836a74dcd4ce605891f6bd1eeeca61d6ed1534d3f6d3e1c65d1ddd7096460cbf75eac868d2c7ef112c85f745c2b1af7ca2abf02644351c3ebbfbbffc90a99b
+AUX policycoreutils-2.7-0001-newrole-not-suid.patch 351 SHA256 5146c50018858ae42ec1be492db8aa5f9ca837df81871481240709e72bc3aafa SHA512 41c37a0711011ebdaafee01b357438ac3219b34b6c9e6ebe182c863d61c899e4819ae71bd9adf4b52bee37750c99b5b1cd40c6a92f119899bd227251d37ccd99 WHIRLPOOL 9a5496d01b53fc39c45153fc2adc658aee8bfb9074534f2ae31b61491227c606de51d335636b536d15d0f2963772fe3ba6e0c0c21ced38f2b673e217127ddb77
+AUX policycoreutils-2.7_rc1-0001-newrole-not-suid.patch 342 SHA256 a207960b6a3444dd6be69c63dee4b7cae5c9781a27ca2c3181356243a0ad8a58 SHA512 6d7296b8104d3968243d27a46b37c73155c2e37c2f842bdd8ce278a2c67891e00f08102b7baac8e57766e939213c854b9a6d860aa49470b4973880e0c77eb856 WHIRLPOOL d067a4ddd2603748bc010db6f503625fcd09e70a991716b2ae5a3fb0b37baca76b0ebec494e8ad319a5a6d17d9a47ee13878e8ccb4e717e3c109d07fcbe69ca7
+DIST policycoreutils-2.6.tar.gz 4660087 SHA256 68891b376f5048edc53c6ccb2fca44da3dc7f4563f4b6894e201d70c04a05a29 SHA512 ba289060bc348f9315bce84a5e5daf145600274289fdd2206edc10bb0ee03f9b02a9e40e9c118809961ddfe7844dee7d8952d8c9a239af7282f4fc1614c21e9d WHIRLPOOL c04a5f0f6bb044090e0d443f4497d828713fd32de4a0f5b5442e70e836da99e5e6e562a9deeedb566b07da1687c0a6b056c33b0bbe9836a71891fc6a449da60c
+DIST policycoreutils-2.7.tar.gz 2796707 SHA256 0a1b8a4a323b854981c6755ff025fe98a0f1cff307f109abb260f0490f13e4f4 SHA512 ce97d659f72058fd23d8dab8db98fc7c0003806a636c521fa15da465d7358d40ccc8e3eaa9675f00a9b0b8aaa1465d3fb650bc0ebbbf00164e121230673256fb WHIRLPOOL f2360ab5e83f1a9a0f9e63bf700a89c28b61d13f8101c9ea2b68e9f071ede23557a0a5bec9a077b96b42be063421018ab8b85c4443e3bc1021f0d251a62de301
+DIST policycoreutils-extra-1.35.tar.bz2 12124 SHA256 25983df35c0b98fb65423f109d71c02e4d6b86415452b7a7a6e92b5e4fa4a36e SHA512 8cc3c74afee7ec38d7d085744fdd60849d3ae97a75599d2181b12b5b472a6a4445868e8a6aff707e439c10d9c378fb55e329b4db21c0a771f41180bf3b9eabc1 WHIRLPOOL 863ca52e1897cbfb9252f1afe81fef497f27ede10c74e1150c07e9f355390eca0e64c9b0cc0a48e8a7442b310387b1e929b40e2b9c14a9a095850a00983cd5f6
+DIST policycoreutils-extra-1.36.tar.bz2 8830 SHA256 2dfbe799bbbf150e68fab7e168fd71b94505c992623f30c71873213447506e8f SHA512 c6a18e6fb2d65f51dc55b88907f23241f2fbfc033d3d2888b109596d9ed31d509b2c93456727ea4d1f98544831afb15c449ff72d6aedf93b9e474b27817f7fb3 WHIRLPOOL c9772dba472b9b466181204f5bd5fb13d839042c53c84db38999a8b077b0dee1e9e78089b7b5fe4bc4076a1ad1c420528354404b292abd428a73e6f95312d0c4
+EBUILD policycoreutils-2.6-r1.ebuild 5556 SHA256 4351a449551bccb6b379e0719ebd7703da433741490dd8b5f4c9de3d0e10b853 SHA512 657e73bbe5e5540f49ab1b1cceaae293c57a2c5abab67b24624d51549745e674b91ca35619da0ff71c51f31af91500d37784bae280b1d52e715b9eda6d9f9690 WHIRLPOOL 4be6d305b90a2f2754ac9de7c1a1153d293e098d049c179e2c516d9bbd637a2c020e590b4ea0f3a1333319bf64121bd40843553d595e7f6e618b425ed86177a1
+EBUILD policycoreutils-2.7.ebuild 4962 SHA256 894b22ac63ba9f5600a0f4bf18e9ac3fbfdb33d663cd5c3990270c8bbc1b3233 SHA512 e3ec9164a11c29bbd225887784b35bc54f306ee94d9fa80963158f218d2261c8d60a63583cbb96f4186863000294fa552a434bb438d0d1fb2754e8d074bb0c12 WHIRLPOOL a71810832fbc2667bb7fd84ee565ce9835af4369c6fb7a7393e756bdd3fbd180f93fde50d9279af6495b940db7246dcf52a8b7b7283bd4b6198482cd987a61fc
+EBUILD policycoreutils-9999.ebuild 4969 SHA256 9b55417597828165a48bf0e690cb39330f632d76aa795ced6a546611270e6ee6 SHA512 6cc7dd5c825bd0c9cc63f14dc3000bbb9f7692f1fef6f9ce0f0e6fa09094846e9994f5fa8f39dea42bc52e38f0118239698e6971643ea5d539ca3a8436d763ad WHIRLPOOL d451dbfef9c95b432e81da8f294f94d3d9f6bfbf63b0833991e6ce9468e0f17891fd80866cb8f78aaab1ea1c1e41388baacd00730d09b1af28b96ff9247aefc8
+MISC ChangeLog 6931 SHA256 1b8fdfb862fa904b8e3ed6b1682d163d6d1235bc30bd44c960379f6a39703013 SHA512 5231762bf1d5e909111830c6f75d6b6aa4609d22053a746684885e032b8f6639aacc971b3c13f52254fe67ce059668da77e6a39107deff3388e6546abdc67ea6 WHIRLPOOL a7a8f56e76eb81854e85fb40258b7e569cf0bba25d659cdedeb7290b57169530cf3e7f0944441144c6797b7ec84406f82dcbe445d1ec6901e3bd4a2027019815
+MISC ChangeLog-2015 27068 SHA256 004588c7a9a83bad3e2c4f8b328c77a570e916332eda797fa504a84750373d22 SHA512 b26e0cf65b36ecd72f30f7ae4a467843434374d6c82fb3a8ca67d3a7294073f3aa78e7225052f20b9647266cff4207c95239528c128b5d13eba04e69b04c34af WHIRLPOOL a05d316fa06a95f73ee98c2f247b0cd715da322725ee2f3f09c1e82d12b0fca83cc1f17e362ad6cfb9080fe5fceccb56fab66057afde3b9a4a81554357b0394b
+MISC metadata.xml 1117 SHA256 4b5df713eb05f5d1610a5de599ae97ba21335de28b889ea5128ab52d7819f925 SHA512 1f8703b31ced13b4e15311ecc9d4e03c085eb580e61394e8781744a9c33794e0f10144617415e69b703f5716ca5fd15ad6db14fe93a95c9b5d46c429542beac5 WHIRLPOOL 86f2ca768507b5d12de4d43348bd61f84ee1851beda15e6bc4e69906c31983ab7e4975b472ce041855960252fead92cbf5b8ee889e43b0e017dca77d30706a0c
diff --git a/sys-apps/policycoreutils/files/0010-remove-sesandbox-support.patch b/sys-apps/policycoreutils/files/0010-remove-sesandbox-support.patch
new file mode 100644
index 000000000000..52a34bd1f47b
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0010-remove-sesandbox-support.patch
@@ -0,0 +1,9 @@
+diff -uNr policycoreutils-2.4-rc2.orig/Makefile policycoreutils-2.4-rc2/Makefile
+--- policycoreutils-2.4-rc2.orig/Makefile 2014-08-28 20:13:23.212622408 +0200
++++ policycoreutils-2.4-rc2/Makefile 2014-08-28 20:14:24.136624808 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init sandbox secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll
++SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll
+
+ INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
+
diff --git a/sys-apps/policycoreutils/files/0020-disable-autodetection-of-pam-and-audit.patch b/sys-apps/policycoreutils/files/0020-disable-autodetection-of-pam-and-audit.patch
new file mode 100644
index 000000000000..a3eeaed901d5
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0020-disable-autodetection-of-pam-and-audit.patch
@@ -0,0 +1,108 @@
+diff -uNr policycoreutils-2.2.1.orig/newrole/Makefile policycoreutils-2.2.1/newrole/Makefile
+--- policycoreutils-2.2.1.orig/newrole/Makefile 2013-11-04 21:37:27.197018032 +0100
++++ policycoreutils-2.2.1/newrole/Makefile 2013-11-04 21:37:47.602018075 +0100
+@@ -4,8 +4,8 @@
+ MANDIR ?= $(PREFIX)/share/man
+ ETCDIR ?= $(DESTDIR)/etc
+ LOCALEDIR = /usr/share/locale
+-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
++PAMH ?= no
++AUDITH ?= no
+ # Enable capabilities to permit newrole to generate audit records.
+ # This will make newrole a setuid root program.
+ # The capabilities used are: CAP_AUDIT_WRITE.
+@@ -24,7 +24,7 @@
+ EXTRA_OBJS =
+ override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
+ LDLIBS += -lselinux -L$(PREFIX)/lib
+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
++ifeq ($(PAMH), yes)
+ override CFLAGS += -DUSE_PAM
+ EXTRA_OBJS += hashtab.o
+ LDLIBS += -lpam -lpam_misc
+@@ -32,7 +32,7 @@
+ override CFLAGS += -D_XOPEN_SOURCE=500
+ LDLIBS += -lcrypt
+ endif
+-ifeq ($(AUDITH), /usr/include/libaudit.h)
++ifeq ($(AUDITH), yes)
+ override CFLAGS += -DUSE_AUDIT
+ LDLIBS += -laudit
+ endif
+@@ -49,7 +49,7 @@
+ IS_SUID=y
+ endif
+ ifeq ($(IS_SUID),y)
+- MODE := 4555
++ MODE := 0555
+ LDLIBS += -lcap-ng
+ else
+ MODE := 0555
+@@ -66,7 +66,7 @@
+ test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
+ install -m $(MODE) newrole $(BINDIR)
+ install -m 644 newrole.1 $(MANDIR)/man1/
+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
++ifeq ($(PAMH), yes)
+ test -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d
+ ifeq ($(LSPP_PRIV),y)
+ install -m 644 newrole-lspp.pamd $(ETCDIR)/pam.d/newrole
+diff -uNr policycoreutils-2.2.1.orig/run_init/Makefile policycoreutils-2.2.1/run_init/Makefile
+--- policycoreutils-2.2.1.orig/run_init/Makefile 2013-11-04 21:37:27.115018032 +0100
++++ policycoreutils-2.2.1/run_init/Makefile 2013-11-04 21:37:47.603018075 +0100
+@@ -5,20 +5,20 @@
+ MANDIR ?= $(PREFIX)/share/man
+ ETCDIR ?= $(DESTDIR)/etc
+ LOCALEDIR ?= /usr/share/locale
+-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
++PAMH ?= no
++AUDITH ?= no
+
+ CFLAGS ?= -Werror -Wall -W
+ override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
+ LDLIBS += -lselinux -L$(PREFIX)/lib
+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
++ifeq ($(PAMH), yes)
+ override CFLAGS += -DUSE_PAM
+ LDLIBS += -lpam -lpam_misc
+ else
+ override CFLAGS += -D_XOPEN_SOURCE=500
+ LDLIBS += -lcrypt
+ endif
+-ifeq ($(AUDITH), /usr/include/libaudit.h)
++ifeq ($(AUDITH), yes)
+ override CFLAGS += -DUSE_AUDIT
+ LDLIBS += -laudit
+ endif
+@@ -38,7 +38,7 @@
+ install -m 755 open_init_pty $(SBINDIR)
+ install -m 644 run_init.8 $(MANDIR)/man8/
+ install -m 644 open_init_pty.8 $(MANDIR)/man8/
+-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
++ifeq ($(PAMH), yes)
+ install -m 644 run_init.pamd $(ETCDIR)/pam.d/run_init
+ endif
+
+diff -uNr policycoreutils-2.2.1.orig/setfiles/Makefile policycoreutils-2.2.1/setfiles/Makefile
+--- policycoreutils-2.2.1.orig/setfiles/Makefile 2013-11-04 21:37:27.198018032 +0100
++++ policycoreutils-2.2.1/setfiles/Makefile 2013-11-04 21:37:47.603018075 +0100
+@@ -3,7 +3,7 @@
+ SBINDIR ?= $(DESTDIR)/sbin
+ MANDIR = $(PREFIX)/share/man
+ LIBDIR ?= $(PREFIX)/lib
+-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
++AUDITH ?= no
+
+ PROGRESS_STEP=$(shell grep "^\#define STAR_COUNT" restore.h | awk -S '{ print $$3 }')
+ ABORT_ON_ERRORS=$(shell grep "^\#define ABORT_ON_ERRORS" setfiles.c | awk -S '{ print $$3 }')
+@@ -12,7 +12,7 @@
+ override CFLAGS += -I$(PREFIX)/include
+ LDLIBS = -lselinux -lsepol -L$(LIBDIR)
+
+-ifeq ($(AUDITH), /usr/include/libaudit.h)
++ifeq ($(AUDITH), yes)
+ override CFLAGS += -DUSE_AUDIT
+ LDLIBS += -laudit
+ endif
diff --git a/sys-apps/policycoreutils/files/0030-make-inotify-check-use-flag-triggered.patch b/sys-apps/policycoreutils/files/0030-make-inotify-check-use-flag-triggered.patch
new file mode 100644
index 000000000000..6a31e255a952
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0030-make-inotify-check-use-flag-triggered.patch
@@ -0,0 +1,14 @@
+diff -uNr policycoreutils-2.4-rc2.orig/Makefile policycoreutils-2.4-rc2/Makefile
+--- policycoreutils-2.4-rc2.orig/Makefile 2014-08-28 20:22:45.230644554 +0200
++++ policycoreutils-2.4-rc2/Makefile 2014-08-28 20:27:08.642654934 +0200
+@@ -1,8 +1,8 @@
+ SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll
+
+-INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
++INOTIFYH ?= no
+
+-ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)
++ifeq (${INOTIFYH}, yes)
+ SUBDIRS += restorecond
+ endif
+
diff --git a/sys-apps/policycoreutils/files/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch b/sys-apps/policycoreutils/files/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch
new file mode 100644
index 000000000000..7d438983bb7e
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch
@@ -0,0 +1,11 @@
+diff -uNr policycoreutils-2.2.1.orig/load_policy/Makefile policycoreutils-2.2.1/load_policy/Makefile
+--- policycoreutils-2.2.1.orig/load_policy/Makefile 2013-11-04 21:41:28.289018546 +0100
++++ policycoreutils-2.2.1/load_policy/Makefile 2013-11-04 21:43:31.118018808 +0100
+@@ -19,7 +19,6 @@
+ test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
+ install -m 644 load_policy.8 $(MANDIR)/man8/
+ -mkdir -p $(USRSBINDIR)
+- -ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy
+
+ clean:
+ -rm -f $(TARGETS) *.o
diff --git a/sys-apps/policycoreutils/files/0110-build-mcstrans-bug-472912.patch b/sys-apps/policycoreutils/files/0110-build-mcstrans-bug-472912.patch
new file mode 100644
index 000000000000..68033c705cd5
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0110-build-mcstrans-bug-472912.patch
@@ -0,0 +1,64 @@
+diff -uNr policycoreutils-2.4-rc2.orig/Makefile policycoreutils-2.4-rc2/Makefile
+--- policycoreutils-2.4-rc2.orig/Makefile 2014-08-28 20:31:19.563664821 +0200
++++ policycoreutils-2.4-rc2/Makefile 2014-08-28 20:32:25.900667435 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll
++SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man gui hll mcstrans
+
+ INOTIFYH ?= n
+
+diff -uNr policycoreutils-2.4-rc2.orig/mcstrans/src/Makefile policycoreutils-2.4-rc2/mcstrans/src/Makefile
+--- policycoreutils-2.4-rc2.orig/mcstrans/src/Makefile 2014-08-28 20:31:19.562664821 +0200
++++ policycoreutils-2.4-rc2/mcstrans/src/Makefile 2014-08-28 20:33:39.345670329 +0200
+@@ -1,23 +1,10 @@
+ ARCH = $(shell uname -i)
+-ifeq "$(ARCH)" "x86_64"
+- # In case of 64 bit system, use these lines
+- LIBDIR=/usr/lib64
+-else
+-ifeq "$(ARCH)" "i686"
+- # In case of 32 bit system, use these lines
+- LIBDIR=/usr/lib
+-else
+-ifeq "$(ARCH)" "i386"
+- # In case of 32 bit system, use these lines
+- LIBDIR=/usr/lib
+-endif
+-endif
+-endif
+ # Installation directories.
+ PREFIX ?= $(DESTDIR)/usr
+ SBINDIR ?= $(DESTDIR)/sbin
+ INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
+ SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd
++LIBDIR ?= $(PREFIX)/lib
+
+ PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c
+ PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))
+diff -uNr policycoreutils-2.4-rc2.orig/mcstrans/utils/Makefile policycoreutils-2.4-rc2/mcstrans/utils/Makefile
+--- policycoreutils-2.4-rc2.orig/mcstrans/utils/Makefile 2014-08-28 20:31:19.556664821 +0200
++++ policycoreutils-2.4-rc2/mcstrans/utils/Makefile 2014-08-28 20:34:14.145671701 +0200
+@@ -3,22 +3,7 @@
+ BINDIR ?= $(PREFIX)/sbin
+
+ ARCH = $(shell uname -i)
+-ifeq "$(ARCH)" "x86_64"
+- # In case of 64 bit system, use these lines
+- LIBDIR=/usr/lib64
+-else
+-ifeq "$(ARCH)" "i686"
+- # In case of 32 bit system, use these lines
+- LIBDIR=/usr/lib
+-else
+-ifeq "$(ARCH)" "i386"
+- # In case of 32 bit system, use these lines
+- LIBDIR=/usr/lib
+-endif
+-endif
+-endif
+-
+-
++LIBDIR ?= $(PREFIX)/lib
+ CFLAGS ?= -Wall
+ override CFLAGS += -I../src -D_GNU_SOURCE
+ LDLIBS += -L../src ../src/mcstrans.o ../src/mls_level.o -lselinux -lpcre $(LIBDIR)/libsepol.a
diff --git a/sys-apps/policycoreutils/files/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch b/sys-apps/policycoreutils/files/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch
new file mode 100644
index 000000000000..cf50664264e1
--- /dev/null
+++ b/sys-apps/policycoreutils/files/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch
@@ -0,0 +1,11 @@
+diff -uNr policycoreutils-2.4-rc2.orig/mcstrans/src/mcscolor.c policycoreutils-2.4-rc2/mcstrans/src/mcscolor.c
+--- policycoreutils-2.4-rc2.orig/mcstrans/src/mcscolor.c 2014-08-28 21:26:25.125795076 +0200
++++ policycoreutils-2.4-rc2/mcstrans/src/mcscolor.c 2014-08-28 21:27:03.509796589 +0200
+@@ -11,6 +11,7 @@
+ #include <syslog.h>
+ #include <selinux/selinux.h>
+ #include <selinux/context.h>
++#include <selinux/av_permissions.h>
+ #include "mcstrans.h"
+
+ /* Define data structures */
diff --git a/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch b/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch
new file mode 100644
index 000000000000..6049bbe282af
--- /dev/null
+++ b/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch
@@ -0,0 +1,13 @@
+diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile
+index bdefbb8..9cff135 100644
+--- policycoreutils/newrole/Makefile
++++ policycoreutils/newrole/Makefile
+@@ -49,7 +49,7 @@ ifeq ($(NAMESPACE_PRIV),y)
+ IS_SUID=y
+ endif
+ ifeq ($(IS_SUID),y)
+- MODE := 4555
++ MODE := 0555
+ override LDLIBS += -lcap-ng
+ else
+ MODE := 0555
diff --git a/sys-apps/policycoreutils/files/policycoreutils-2.7_rc1-0001-newrole-not-suid.patch b/sys-apps/policycoreutils/files/policycoreutils-2.7_rc1-0001-newrole-not-suid.patch
new file mode 100644
index 000000000000..d4aa531063ff
--- /dev/null
+++ b/sys-apps/policycoreutils/files/policycoreutils-2.7_rc1-0001-newrole-not-suid.patch
@@ -0,0 +1,13 @@
+diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile
+index bdefbb8..9cff135 100644
+--- policycoreutils/newrole/Makefile
++++ policycoreutils/newrole/Makefile
+@@ -49,7 +49,7 @@ ifeq ($(NAMESPACE_PRIV),y)
+ IS_SUID=y
+ endif
+ ifeq ($(IS_SUID),y)
+- MODE := 4555
++ MODE := 0555
+ LDLIBS += -lcap-ng
+ else
+ MODE := 0555
diff --git a/sys-apps/policycoreutils/metadata.xml b/sys-apps/policycoreutils/metadata.xml
new file mode 100644
index 000000000000..16effc34b8ee
--- /dev/null
+++ b/sys-apps/policycoreutils/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ Policycoreutils contains the policy core utilities that are required
+ for basic operation of a SELinux system. These utilities include
+ load_policy to load policies, setfiles to label filesystems, newrole
+ to switch roles, and run_init to run /etc/init.d scripts in the proper
+ context.
+
+ Gentoo-specific tools include rlpkg for relabeling packages by name,
+ avc_toggle to toggle between enforcing and permissive modes, and
+ avc_enforcing to query the current mode of the system, enforcing or
+ permissive.
+ </longdescription>
+ <use>
+ <flag name="audit">Enable support for <pkg>sys-process/audit</pkg> and use the audit_* functions (like audit_getuid instead of getuid())</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:redhat:policycoreutils</remote-id>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/policycoreutils/policycoreutils-2.6-r1.ebuild b/sys-apps/policycoreutils/policycoreutils-2.6-r1.ebuild
new file mode 100644
index 000000000000..6a544ae2b9dd
--- /dev/null
+++ b/sys-apps/policycoreutils/policycoreutils-2.6-r1.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE="xml"
+
+inherit multilib python-r1 toolchain-funcs bash-completion-r1
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20161014"
+EXTRAS_VER="1.35"
+SEMNG_VER="${PV}"
+SELNX_VER="${PV}"
+SEPOL_VER="${PV}"
+
+IUSE="audit pam dbus"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ SRC_URI="https://dev.gentoo.org/~swift/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ S1="${WORKDIR}/${MY_P}/${PN}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~swift/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ KEYWORDS="amd64 ~arm64 ~mips x86"
+ S1="${WORKDIR}/${MY_P}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}]
+ >=sys-libs/glibc-2.4
+ >=sys-libs/libcap-1.10-r10:=
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python,${PYTHON_USEDEP}]
+ sys-libs/libcap-ng:=
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.0[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ dev-python/ipy[${PYTHON_USEDEP}]
+ dbus? (
+ sys-apps/dbus
+ dev-libs/dbus-glib:=
+ )
+ audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] )
+ pam? ( sys-libs/pam:= )
+ ${PYTHON_DEPS}
+ !<sec-policy/selinux-base-policy-2.20151208-r6"
+# 2.20151208-r6 and higher has support for new setfiles
+
+### libcgroup -> seunshare
+### dbus -> restorecond
+
+# pax-utils for scanelf used by rlpkg
+RDEPEND="${DEPEND}
+ dev-python/sepolgen[${PYTHON_USEDEP}]
+ app-misc/pax-utils
+ !<sys-apps/openrc-0.14"
+
+src_unpack() {
+ # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
+ default
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ fi
+}
+
+src_prepare() {
+ S="${S1}"
+ cd "${S}" || die "Failed to switch to ${S}"
+ if [[ ${PV} != 9999 ]] ; then
+ # If needed for live ebuilds please use /etc/portage/patches
+ eapply "${FILESDIR}/0010-remove-sesandbox-support.patch"
+ eapply "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
+ eapply "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
+ eapply "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
+ eapply "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
+ eapply "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
+ fi
+
+ # rlpkg is more useful than fixfiles
+ sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 1 failed"
+ sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 2 failed"
+
+ eapply_user
+
+ sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+ # Our extra code is outside the regular directory, so set it to the extra
+ # directory. We really should optimize this as it is ugly, but the extra
+ # code is needed for Gentoo at the same time that policycoreutils is present
+ # (so we cannot use an additional package for now).
+ S="${S2}"
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ AUDIT_LOG_PRIVS="y" \
+ AUDITH="$(usex audit)" \
+ PAMH="$(usex pam)" \
+ INOTIFYH="$(usex dbus)" \
+ SESANDBOX="n" \
+ CC="$(tc-getCC)" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ S="${S1}" # Regular policycoreutils
+ python_foreach_impl building
+ S="${S2}" # Extra set
+ python_foreach_impl building
+}
+
+src_install() {
+ # Python scripts are present in many places. There are no extension modules.
+ installation-policycoreutils() {
+ einfo "Installing policycoreutils"
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ AUDITH="$(usex audit)" \
+ PAMH="$(usex pam)" \
+ INOTIFYH="$(usex dbus)" \
+ SESANDBOX="n" \
+ AUDIT_LOG_PRIV="y" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+ python_optimize
+ }
+
+ installation-extras() {
+ einfo "Installing policycoreutils-extra"
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="$(usex dbus)" SHLIBDIR="${D}$(get_libdir)/rc" install
+ python_optimize
+ }
+
+ S="${S1}" # policycoreutils
+ python_foreach_impl installation-policycoreutils
+ S="${S2}" # extras
+ python_foreach_impl installation-extras
+ S="${S1}" # back for later
+
+ # remove redhat-style init script
+ rm -fR "${D}/etc/rc.d" || die
+
+ # compatibility symlinks
+ dosym /sbin/setfiles /usr/sbin/setfiles
+ bashcomp_alias setsebool getsebool
+
+ # location for policy definitions
+ dodir /var/lib/selinux
+ keepdir /var/lib/selinux
+
+ # Set version-specific scripts
+ for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
+ python_replicate_script "${ED}/usr/bin/${pyscript}"
+ done
+ for pyscript in semanage rlpkg; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+
+ dodir /usr/share/doc/${PF}/mcstrans/examples
+ cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" || die
+}
+
+pkg_postinst() {
+ for POLICY_TYPE in ${POLICY_TYPES} ; do
+ # There have been some changes to the policy store, rebuilding now.
+ # https://marc.info/?l=selinux&m=143757277819717&w=2
+ einfo "Rebuilding store ${POLICY_TYPE} (without re-loading)."
+ semodule -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
+ done
+}
diff --git a/sys-apps/policycoreutils/policycoreutils-2.7.ebuild b/sys-apps/policycoreutils/policycoreutils-2.7.ebuild
new file mode 100644
index 000000000000..2f74519d79bd
--- /dev/null
+++ b/sys-apps/policycoreutils/policycoreutils-2.7.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE="xml"
+
+inherit multilib python-r1 toolchain-funcs bash-completion-r1
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20170804"
+EXTRAS_VER="1.36"
+SEMNG_VER="${PV}"
+SELNX_VER="${PV}"
+SEPOL_VER="${PV}"
+
+IUSE="audit pam dbus"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ S1="${WORKDIR}/${MY_P}/${PN}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ KEYWORDS="amd64 ~arm64 ~mips x86"
+ S1="${WORKDIR}/${MY_P}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}]
+ >=sys-libs/glibc-2.4
+ >=sys-libs/libcap-1.10-r10:=
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python,${PYTHON_USEDEP}]
+ sys-libs/libcap-ng:=
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.1.1[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ dev-python/ipy[${PYTHON_USEDEP}]
+ dbus? (
+ sys-apps/dbus
+ dev-libs/dbus-glib:=
+ )
+ audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] )
+ pam? ( sys-libs/pam:= )
+ ${PYTHON_DEPS}
+ !<sec-policy/selinux-base-policy-2.20151208-r6"
+# 2.20151208-r6 and higher has support for new setfiles
+
+### libcgroup -> seunshare
+### dbus -> restorecond
+
+# pax-utils for scanelf used by rlpkg
+RDEPEND="${DEPEND}
+ app-misc/pax-utils
+ !<sys-apps/openrc-0.14"
+
+PDEPEND="sys-apps/semodule-utils
+ sys-apps/selinux-python"
+
+src_unpack() {
+ # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
+ default
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ fi
+}
+
+src_prepare() {
+ S="${S1}"
+ cd "${S}" || die "Failed to switch to ${S}"
+ if [[ ${PV} != 9999 ]] ; then
+ # If needed for live ebuilds please use /etc/portage/patches
+ eapply "${FILESDIR}/policycoreutils-2.7-0001-newrole-not-suid.patch"
+ fi
+
+ # rlpkg is more useful than fixfiles
+ sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 1 failed"
+ sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 2 failed"
+
+ eapply_user
+
+ sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+ # Our extra code is outside the regular directory, so set it to the extra
+ # directory. We really should optimize this as it is ugly, but the extra
+ # code is needed for Gentoo at the same time that policycoreutils is present
+ # (so we cannot use an additional package for now).
+ S="${S2}"
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ AUDIT_LOG_PRIVS="y" \
+ AUDITH="$(usex audit y n)" \
+ PAMH="$(usex pam y n)" \
+ INOTIFYH="$(usex dbus y n)" \
+ SESANDBOX="n" \
+ CC="$(tc-getCC)" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ S="${S1}" # Regular policycoreutils
+ python_foreach_impl building
+ S="${S2}" # Extra set
+ python_foreach_impl building
+}
+
+src_install() {
+ # Python scripts are present in many places. There are no extension modules.
+ installation-policycoreutils() {
+ einfo "Installing policycoreutils"
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ AUDITH="$(usex audit y n)" \
+ PAMH="$(usex pam y n)" \
+ INOTIFYH="$(usex dbus y n)" \
+ SESANDBOX="n" \
+ AUDIT_LOG_PRIV="y" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+ python_optimize
+ }
+
+ installation-extras() {
+ einfo "Installing policycoreutils-extra"
+ emake -C "${BUILD_DIR}" \
+ DESTDIR="${D}" \
+ INOTIFYH="$(usex dbus)" \
+ SHLIBDIR="${D}$(get_libdir)/rc" \
+ install
+ python_optimize
+ }
+
+ S="${S1}" # policycoreutils
+ python_foreach_impl installation-policycoreutils
+ S="${S2}" # extras
+ python_foreach_impl installation-extras
+ S="${S1}" # back for later
+
+ # remove redhat-style init script
+ rm -fR "${D}/etc/rc.d" || die
+
+ # compatibility symlinks
+ dosym /sbin/setfiles /usr/sbin/setfiles
+ bashcomp_alias setsebool getsebool
+
+ # location for policy definitions
+ dodir /var/lib/selinux
+ keepdir /var/lib/selinux
+
+ # Set version-specific scripts
+ for pyscript in rlpkg; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+}
+
+pkg_postinst() {
+ for POLICY_TYPE in ${POLICY_TYPES} ; do
+ # There have been some changes to the policy store, rebuilding now.
+ # https://marc.info/?l=selinux&m=143757277819717&w=2
+ einfo "Rebuilding store ${POLICY_TYPE} (without re-loading)."
+ semodule -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
+ done
+}
diff --git a/sys-apps/policycoreutils/policycoreutils-9999.ebuild b/sys-apps/policycoreutils/policycoreutils-9999.ebuild
new file mode 100644
index 000000000000..9996621df2c0
--- /dev/null
+++ b/sys-apps/policycoreutils/policycoreutils-9999.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE="xml"
+
+inherit multilib python-r1 toolchain-funcs bash-completion-r1
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20170804"
+EXTRAS_VER="1.36"
+SEMNG_VER="${PV}"
+SELNX_VER="${PV}"
+SEPOL_VER="${PV}"
+
+IUSE="audit pam dbus"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ S1="${WORKDIR}/${MY_P}/${PN}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S1="${WORKDIR}/${MY_P}"
+ S2="${WORKDIR}/policycoreutils-extra"
+ S="${S1}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}]
+ >=sys-libs/glibc-2.4
+ >=sys-libs/libcap-1.10-r10:=
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python,${PYTHON_USEDEP}]
+ sys-libs/libcap-ng:=
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.1.1[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ dev-python/ipy[${PYTHON_USEDEP}]
+ dbus? (
+ sys-apps/dbus
+ dev-libs/dbus-glib:=
+ )
+ audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] )
+ pam? ( sys-libs/pam:= )
+ ${PYTHON_DEPS}
+ !<sec-policy/selinux-base-policy-2.20151208-r6"
+# 2.20151208-r6 and higher has support for new setfiles
+
+### libcgroup -> seunshare
+### dbus -> restorecond
+
+# pax-utils for scanelf used by rlpkg
+RDEPEND="${DEPEND}
+ app-misc/pax-utils
+ !<sys-apps/openrc-0.14"
+
+PDEPEND="sys-apps/semodule-utils
+ sys-apps/selinux-python"
+
+src_unpack() {
+ # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
+ default
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ fi
+}
+
+src_prepare() {
+ S="${S1}"
+ cd "${S}" || die "Failed to switch to ${S}"
+ if [[ ${PV} != 9999 ]] ; then
+ # If needed for live ebuilds please use /etc/portage/patches
+ eapply "${FILESDIR}/policycoreutils-2.7-0001-newrole-not-suid.patch"
+ fi
+
+ # rlpkg is more useful than fixfiles
+ sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 1 failed"
+ sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 2 failed"
+
+ eapply_user
+
+ sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+ # Our extra code is outside the regular directory, so set it to the extra
+ # directory. We really should optimize this as it is ugly, but the extra
+ # code is needed for Gentoo at the same time that policycoreutils is present
+ # (so we cannot use an additional package for now).
+ S="${S2}"
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ AUDIT_LOG_PRIVS="y" \
+ AUDITH="$(usex audit y n)" \
+ PAMH="$(usex pam y n)" \
+ INOTIFYH="$(usex dbus y n)" \
+ SESANDBOX="n" \
+ CC="$(tc-getCC)" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ S="${S1}" # Regular policycoreutils
+ python_foreach_impl building
+ S="${S2}" # Extra set
+ python_foreach_impl building
+}
+
+src_install() {
+ # Python scripts are present in many places. There are no extension modules.
+ installation-policycoreutils() {
+ einfo "Installing policycoreutils"
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ AUDITH="$(usex audit y n)" \
+ PAMH="$(usex pam y n)" \
+ INOTIFYH="$(usex dbus y n)" \
+ SESANDBOX="n" \
+ AUDIT_LOG_PRIV="y" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+ python_optimize
+ }
+
+ installation-extras() {
+ einfo "Installing policycoreutils-extra"
+ emake -C "${BUILD_DIR}" \
+ DESTDIR="${D}" \
+ INOTIFYH="$(usex dbus)" \
+ SHLIBDIR="${D}$(get_libdir)/rc" \
+ install
+ python_optimize
+ }
+
+ S="${S1}" # policycoreutils
+ python_foreach_impl installation-policycoreutils
+ S="${S2}" # extras
+ python_foreach_impl installation-extras
+ S="${S1}" # back for later
+
+ # remove redhat-style init script
+ rm -fR "${D}/etc/rc.d" || die
+
+ # compatibility symlinks
+ dosym /sbin/setfiles /usr/sbin/setfiles
+ bashcomp_alias setsebool getsebool
+
+ # location for policy definitions
+ dodir /var/lib/selinux
+ keepdir /var/lib/selinux
+
+ # Set version-specific scripts
+ for pyscript in rlpkg; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+}
+
+pkg_postinst() {
+ for POLICY_TYPE in ${POLICY_TYPES} ; do
+ # There have been some changes to the policy store, rebuilding now.
+ # https://marc.info/?l=selinux&m=143757277819717&w=2
+ einfo "Rebuilding store ${POLICY_TYPE} (without re-loading)."
+ semodule -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
+ done
+}
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
new file mode 100644
index 000000000000..91f0ec3e746c
--- /dev/null
+++ b/sys-apps/portage/Manifest
@@ -0,0 +1,14 @@
+AUX README.RESCUE 137 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4 SHA512 dba0f0d6d4cd140e636cc70dfb7bdb298e2f2fb040bc07b0874cac994bdbabd26bfd9361d85a0f8b9a92a185281e4901606b9e4f563afdc8867341bbe6af1cb0 WHIRLPOOL 713fcc790442999d56e13efaf536fec9954dadeda680b3642d0358311332096ddedf8b55697bd1ca620d84f0dc7d025ff7931e086c74c1f5032be72dca2ff8f5
+DIST portage-2.3.10.tar.bz2 939871 SHA256 f7cf1f74e62b7288fd4392c254940a3b70608f45c33ccfa9dbf60457d53cc28a SHA512 2db5d1f77f8f6dc7a88a22a7d213c6af441fdcced2ab3c8e60f6cd1b9f97aa25261f7a4de750303d3b1ea77d9e8c01b77b37f5d285b0704e884a57d800dbfd60 WHIRLPOOL 96178cc869e0b580ea813ab5fa38eb3226d094e6bdceb559cc88fcba9b1e71f0e2baebcd50ccebfc716ae037090534324ac6554318c5fd40b8aecb49041d7545
+DIST portage-2.3.11.tar.bz2 940732 SHA256 f2596fc8e5eaaaab19be88c5c0a92d9f304eddb14ebe1230ab6f8d841ae90720 SHA512 16047fae060eb400e0fd01ca4966d69c0413e90659b33e4511b34464a24e9beb510c4c785af713921240e893c3031d3c3c3f2332eb175a21bb34b414962058fd WHIRLPOOL b0d357e626710c3574dde9228c68d604eb70843d083917d761a0c55680702da96d2157566e04d7f7c6c900d8120909d1faa00e6ff2a8fe970d53da05288ae0ad
+DIST portage-2.3.6.tar.bz2 943085 SHA256 2f57545fcb142a4b23c2052c523d3d858754b232be21455ee6c6cd3ff0903cc2 SHA512 5bcfb678c1ea0cd97a983ee7520c9ecabd07d5bb0fd01c70b74fd7b6ce478f4a109aac84d40b82426719ca7c9ee6aed3affb3b9754045e62b4c664ae113cf055 WHIRLPOOL d0258c579597690e8bf2cc2a3ecc36d543e67a728c302a9b16ae361086023a7e059ac1a9e2e64f026b7d975d6b619d3b981062227042098ed3afc1b86658b636
+DIST portage-2.3.8.tar.bz2 938062 SHA256 19b73658dca848d215c5527d1d020c8106352007a84d7675e5efd0a7b9b48a8a SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8 WHIRLPOOL 0c576bbd8aaf8b27fa1746c863ac02b2a5f361d9011d17250ffbe4b830a8a6bf10a0aee48b5181a8aa6c55d8ad81ad411195da2a6253e9b324d3c7397053fe29
+EBUILD portage-2.3.10.ebuild 8216 SHA256 4396a5edc8391d04c412e20694e71311dc34a288ab1dd67b1455aa29524f8fde SHA512 8f5e923a644abc5cb704ba3cc0ab54c8dc254cb77e3f9fab207d40b6aa80dcffb2e6aedeaab649108a744ebd1d88c827cde81fa131e3e94360db921fcaf853f9 WHIRLPOOL a39d650d8fdba9181c1e1220bf9868467e31360e474ceca40f0548eebb1bd3eba088203fb86f62c5a674ca8f532e9180d916ed707cf0833623f74770d81faaa7
+EBUILD portage-2.3.11.ebuild 8216 SHA256 4396a5edc8391d04c412e20694e71311dc34a288ab1dd67b1455aa29524f8fde SHA512 8f5e923a644abc5cb704ba3cc0ab54c8dc254cb77e3f9fab207d40b6aa80dcffb2e6aedeaab649108a744ebd1d88c827cde81fa131e3e94360db921fcaf853f9 WHIRLPOOL a39d650d8fdba9181c1e1220bf9868467e31360e474ceca40f0548eebb1bd3eba088203fb86f62c5a674ca8f532e9180d916ed707cf0833623f74770d81faaa7
+EBUILD portage-2.3.6.ebuild 8661 SHA256 9590a689915eea31ffc5dd347154719d70cfb4b000a60e0f6e6294fe0c3e1df7 SHA512 53301757289cc37690020ac7b5379d026ff1e87f9d558c913eae213d0f33b75261045616c9259fe28684aa1031c27d4f58a52438e67eb91a97d186a80ad298a4 WHIRLPOOL c70770b2e9ac8b9af931d9f9918af82ac20eda198a33d9cc19c5d457701fe09c3cd5d45fb756457b05209cc0594c2b0b4efe3d544e1966d759c6a27fcf5b0743
+EBUILD portage-2.3.8.ebuild 8207 SHA256 dd61d45fccf60247d105993e2c73fb16a3ab59322add5701b636361b035ce6ec SHA512 24985286ffe9d4adc99aa65b26b4a15784b7edc84187a3a85b22751854f4845ea00573493a949f5aa6c3f270e4b52138a246006b71c9e6cc04ea402b820aee48 WHIRLPOOL e4ae75b7b4ee0ecf71328dcaebcfc4bb440e3c700156c2a17db3455b54066241285e8c625a5e2a2167c0d8ef31ec855d09219ab7cae1f5285057e95a1bb77165
+EBUILD portage-9999.ebuild 7697 SHA256 c7d91c34e7fb25283f6ac634a00686273fd3f286ecfb9fc1ab3bc685ae8fd9c4 SHA512 6b8342034752512df0345d386f67c025b0ba15439ae5758783b16973d16b3b3b4d866abfb65bac2e26424e270294bebe26e43f12539ef141891b567dc0f000ce WHIRLPOOL 0b2b3f122d57a5c9d3dd63ea09c7a7bd05e1eaf298cd5018d400543cd825469e108fdd981c06518d24a37f7a339195fb01b04480143c0d9f93cce18093119c42
+MISC ChangeLog 16208 SHA256 6196c5e06a7043cd46882ba3258ead8c490a89e650695d390b58f03d68639c0d SHA512 70e1da4a0b81f7c7fe902229d85ade010dfdb5e377f68577fd1f6d7ff75c92b6cc172fd3cbb171e18f40565e2679a14aab70b756e6eebce8f7076502ff9b2465 WHIRLPOOL 4b7dcff2f27e863ef276ee14ddb30adebd175c8a8913d1618c5fec36a9590d19d712878977b7c049f67730d15594a61cfb7839bdde35b30a697c540d59346706
+MISC ChangeLog-2012 133873 SHA256 157a7eb13d4cf2e2c94bfcb7e91f218af1ea88f5ff20c24a50546950a9839c94 SHA512 1241f4ccd7b31bdd340649417257b0e95202992feb66e0cd4d41fc2d35bf0baeac19680f34a831d2fefce0c0fec03aa6e7a191f783e59cf9b93aaf266f010a3f WHIRLPOOL b027bdba0f5ccc1b3a2dc18df92d82b473af5e55536816b7177071c1ae1a89e4d50d42c2093fa1bbe28b92a42014fbefbfc9e7daa4e6426ebecbd5bffc3d479f
+MISC ChangeLog-2015 66573 SHA256 79f5ff4870713087f1a71d78a608f7c63bd2ce52e9a9642ad23d88e4ea30c807 SHA512 6df0a78314635f8fc0f721a4acda85accfaaa4eb3cefffd90e1fadeec6a3290f813780adbe572e5cd2281be4d742627f893a88ded06413d88fb8f0c41b01890b WHIRLPOOL 7b0060b46d0f5637189f7e6f915576e2a51977f11ddfdb37b0aa0cf1dac21f869ba2ec80ff0a4e633b547668261284acbaaaf52a3015f4f676e860cf8d48280e
+MISC metadata.xml 1147 SHA256 c4832ae64ab0915c65eadca15e4540680d109c21d572464f69e218d14fe6bd8b SHA512 733193cbfc96da31252b5e4109d0b76f797e339c41eda2c1230cc1d5b0e75912177570ed0140218a7a7b85d9b8bc53e8e6931e88810269c499be87af40e6b86c WHIRLPOOL bf901ca7474f9b8358c458edad904f9c0c853187c6dc8ea0bc0c327bded60940c6f8b20f0231d78d86aa7dc5235b23d70c69f7153cca9e375fa271c7c93707b9
diff --git a/sys-apps/portage/files/README.RESCUE b/sys-apps/portage/files/README.RESCUE
new file mode 100644
index 000000000000..70c494ebb81b
--- /dev/null
+++ b/sys-apps/portage/files/README.RESCUE
@@ -0,0 +1,2 @@
+Please see http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml
+for a recovery guide for a broken portage installation.
diff --git a/sys-apps/portage/metadata.xml b/sys-apps/portage/metadata.xml
new file mode 100644
index 000000000000..c66241962c33
--- /dev/null
+++ b/sys-apps/portage/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>mailto:dev-portage@gentoo.org</bugs-to>
+ <changelog>https://gitweb.gentoo.org/proj/portage.git/plain/RELEASE-NOTES</changelog>
+ <doc>https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/Portage</doc>
+ </upstream>
+ <maintainer type="project">
+ <email>dev-portage@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="epydoc">Build html API documentation with epydoc.</flag>
+ <flag name="ipc">Use inter-process communication between portage and
+ running ebuilds.
+ </flag>
+ <flag name="native-extensions">
+ Compiles native "C" extensions (speedups, instead of using python
+ backup code). Currently includes libc-locales.
+ This should only be temporarily disabled for some bootstrapping
+ operations. Cross-compilation is not supported.
+ </flag>
+ <flag name="xattr">Preserve extended attributes (filesystem-stored metadata)
+ when installing files. Usually only required for hardened systems.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/portage/portage-2.3.10.ebuild b/sys-apps/portage/portage-2.3.10.ebuild
new file mode 100644
index 000000000000..af287ccb8752
--- /dev/null
+++ b/sys-apps/portage/portage-2.3.10.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(
+ pypy
+ python3_4 python3_5 python3_6
+ python2_7
+)
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+
+inherit distutils-r1
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
+
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ !build? (
+ >=sys-apps/sed-4.0.5
+ app-shells/bash:0[readline]
+ >=app-admin/eselect-1.2
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
+ python2_7 pypy)
+ ) )
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
+
+SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+TARBALL_PV=${PV}
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
+
+pkg_setup() {
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ if use native-extensions; then
+ printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ setup.cfg || die
+ fi
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -i cnf/repos.conf || die "sed failed"
+ if prefix-guest ; then
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+ fi
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+python_compile_all() {
+ local targets=()
+ use doc && targets+=( docbook )
+ use epydoc && targets+=( epydoc )
+
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install() {
+ # Install sbin scripts to bindir for python-exec linking
+ # they will be relocated in pkg_preinst()
+ distutils-r1_python_install \
+ --system-prefix="${EPREFIX}/usr" \
+ --bindir="$(python_get_scriptdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
+ --sbindir="$(python_get_scriptdir)" \
+ --sysconfdir="${EPREFIX}/etc" \
+ "${@}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ local targets=()
+ use doc && targets+=( install_docbook )
+ use epydoc && targets+=( install_epydoc )
+
+ # install docs
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+
+ # Due to distutils/python-exec limitations
+ # these must be installed to /usr/bin.
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
+ einfo "Moving admin scripts to the correct directory"
+ dodir /usr/sbin
+ for target in ${sbin_relocations}; do
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
+ done
+}
+
+pkg_preinst() {
+ # comment out sanity test until it is fixed to work
+ # with the new PORTAGE_PYM_PATH
+ #if [[ $ROOT == / ]] ; then
+ ## Run some minimal tests as a sanity check.
+ #local test_runner=$(find "${ED}" -name runTests)
+ #if [[ -n $test_runner && -x $test_runner ]] ; then
+ #einfo "Running preinst sanity tests..."
+ #"$test_runner" || die "preinst sanity tests failed"
+ #fi
+ #fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+
+ if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
+ has_version "<${CATEGORY}/${PN}-2.3.3"; then
+ SYNC_DEPTH_UPGRADE=true
+ else
+ SYNC_DEPTH_UPGRADE=false
+ fi
+}
+
+pkg_postinst() {
+ if ${SYNC_DEPTH_UPGRADE}; then
+ ewarn "Please note that this release no longer respects sync-depth for"
+ ewarn "git repositories. There have been too many problems and"
+ ewarn "performance issues. See bugs 552814, 559008"
+ fi
+ einfo ""
+ einfo "This release of portage NO LONGER contains the repoman code base."
+ einfo "Repoman has its own ebuild and release package."
+ einfo "For repoman functionality please emerge app-portage/repoman"
+ einfo "Please report any bugs you may encounter."
+ einfo ""
+}
diff --git a/sys-apps/portage/portage-2.3.11.ebuild b/sys-apps/portage/portage-2.3.11.ebuild
new file mode 100644
index 000000000000..af287ccb8752
--- /dev/null
+++ b/sys-apps/portage/portage-2.3.11.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(
+ pypy
+ python3_4 python3_5 python3_6
+ python2_7
+)
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+
+inherit distutils-r1
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
+
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ !build? (
+ >=sys-apps/sed-4.0.5
+ app-shells/bash:0[readline]
+ >=app-admin/eselect-1.2
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
+ python2_7 pypy)
+ ) )
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
+
+SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+TARBALL_PV=${PV}
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
+
+pkg_setup() {
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ if use native-extensions; then
+ printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ setup.cfg || die
+ fi
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -i cnf/repos.conf || die "sed failed"
+ if prefix-guest ; then
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+ fi
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+python_compile_all() {
+ local targets=()
+ use doc && targets+=( docbook )
+ use epydoc && targets+=( epydoc )
+
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install() {
+ # Install sbin scripts to bindir for python-exec linking
+ # they will be relocated in pkg_preinst()
+ distutils-r1_python_install \
+ --system-prefix="${EPREFIX}/usr" \
+ --bindir="$(python_get_scriptdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
+ --sbindir="$(python_get_scriptdir)" \
+ --sysconfdir="${EPREFIX}/etc" \
+ "${@}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ local targets=()
+ use doc && targets+=( install_docbook )
+ use epydoc && targets+=( install_epydoc )
+
+ # install docs
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+
+ # Due to distutils/python-exec limitations
+ # these must be installed to /usr/bin.
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
+ einfo "Moving admin scripts to the correct directory"
+ dodir /usr/sbin
+ for target in ${sbin_relocations}; do
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
+ done
+}
+
+pkg_preinst() {
+ # comment out sanity test until it is fixed to work
+ # with the new PORTAGE_PYM_PATH
+ #if [[ $ROOT == / ]] ; then
+ ## Run some minimal tests as a sanity check.
+ #local test_runner=$(find "${ED}" -name runTests)
+ #if [[ -n $test_runner && -x $test_runner ]] ; then
+ #einfo "Running preinst sanity tests..."
+ #"$test_runner" || die "preinst sanity tests failed"
+ #fi
+ #fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+
+ if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
+ has_version "<${CATEGORY}/${PN}-2.3.3"; then
+ SYNC_DEPTH_UPGRADE=true
+ else
+ SYNC_DEPTH_UPGRADE=false
+ fi
+}
+
+pkg_postinst() {
+ if ${SYNC_DEPTH_UPGRADE}; then
+ ewarn "Please note that this release no longer respects sync-depth for"
+ ewarn "git repositories. There have been too many problems and"
+ ewarn "performance issues. See bugs 552814, 559008"
+ fi
+ einfo ""
+ einfo "This release of portage NO LONGER contains the repoman code base."
+ einfo "Repoman has its own ebuild and release package."
+ einfo "For repoman functionality please emerge app-portage/repoman"
+ einfo "Please report any bugs you may encounter."
+ einfo ""
+}
diff --git a/sys-apps/portage/portage-2.3.6.ebuild b/sys-apps/portage/portage-2.3.6.ebuild
new file mode 100644
index 000000000000..997eb5d0ceb8
--- /dev/null
+++ b/sys-apps/portage/portage-2.3.6.ebuild
@@ -0,0 +1,277 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(
+ pypy
+ python3_4 python3_5 python3_6
+ python2_7
+)
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+
+inherit distutils-r1 multilib
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
+
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ !build? (
+ >=sys-apps/sed-4.0.5
+ app-shells/bash:0[readline]
+ >=app-admin/eselect-1.2
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
+ python2_7 pypy)
+ ) )
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
+
+SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+TARBALL_PV=${PV}
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
+
+pkg_setup() {
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ if use native-extensions; then
+ printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ setup.cfg || die
+ fi
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+python_compile_all() {
+ local targets=()
+ use doc && targets+=( docbook )
+ use epydoc && targets+=( epydoc )
+
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install() {
+ # Install sbin scripts to bindir for python-exec linking
+ # they will be relocated in pkg_preinst()
+ distutils-r1_python_install \
+ --system-prefix="${EPREFIX}/usr" \
+ --bindir="$(python_get_scriptdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
+ --sbindir="$(python_get_scriptdir)" \
+ --sysconfdir="${EPREFIX}/etc" \
+ "${@}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ local targets=()
+ use doc && targets+=( install_docbook )
+ use epydoc && targets+=( install_epydoc )
+
+ # install docs
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+
+ # Due to distutils/python-exec limitations
+ # these must be installed to /usr/bin.
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
+ einfo "Moving admin scripts to the correct directory"
+ dodir /usr/sbin
+ for target in ${sbin_relocations}; do
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
+ done
+}
+
+pkg_preinst() {
+ # comment out sanity test until it is fixed to work
+ # with the new PORTAGE_PYM_PATH
+ #if [[ $ROOT == / ]] ; then
+ ## Run some minimal tests as a sanity check.
+ #local test_runner=$(find "${ED}" -name runTests)
+ #if [[ -n $test_runner && -x $test_runner ]] ; then
+ #einfo "Running preinst sanity tests..."
+ #"$test_runner" || die "preinst sanity tests failed"
+ #fi
+ #fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+
+ if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
+ has_version "<${CATEGORY}/${PN}-2.3.3"; then
+ SYNC_DEPTH_UPGRADE=true
+ else
+ SYNC_DEPTH_UPGRADE=false
+ fi
+}
+
+get_ownership() {
+ case ${USERLAND} in
+ BSD)
+ stat -f '%Su:%Sg' "${1}"
+ ;;
+ *)
+ stat -c '%U:%G' "${1}"
+ ;;
+ esac
+}
+
+new_config_protect() {
+ # Generate a ._cfg file even if the target file
+ # does not exist, ensuring that the user will
+ # notice the config change.
+ local basename=${1##*/}
+ local dirname=${1%/*}
+ local i=0
+ while true ; do
+ local filename=$(
+ echo -n "${dirname}/._cfg"
+ printf "%04d" ${i}
+ echo -n "_${basename}"
+ )
+ [[ -e ${filename} ]] || break
+ (( i++ ))
+ done
+ echo "${filename}"
+}
+
+pkg_postinst() {
+ if ${SYNC_DEPTH_UPGRADE}; then
+ ewarn "Please note that this release no longer respects sync-depth for"
+ ewarn "git repositories. There have been too many problems and"
+ ewarn "performance issues. See bugs 552814, 559008"
+ fi
+ einfo ""
+ einfo "This release of portage NO LONGER contains the repoman code base."
+ einfo "Repoman has its own ebuild and release package."
+ einfo "For repoman functionality please emerge app-portage/repoman"
+ einfo "Please report any bugs you may encounter."
+ einfo ""
+}
diff --git a/sys-apps/portage/portage-2.3.8.ebuild b/sys-apps/portage/portage-2.3.8.ebuild
new file mode 100644
index 000000000000..1269aa43bf0e
--- /dev/null
+++ b/sys-apps/portage/portage-2.3.8.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(
+ pypy
+ python3_4 python3_5 python3_6
+ python2_7
+)
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+
+inherit distutils-r1
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
+
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ !build? (
+ >=sys-apps/sed-4.0.5
+ app-shells/bash:0[readline]
+ >=app-admin/eselect-1.2
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
+ python2_7 pypy)
+ ) )
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
+
+SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+TARBALL_PV=${PV}
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
+
+pkg_setup() {
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ if use native-extensions; then
+ printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ setup.cfg || die
+ fi
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -i cnf/repos.conf || die "sed failed"
+ if prefix-guest ; then
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+ fi
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+python_compile_all() {
+ local targets=()
+ use doc && targets+=( docbook )
+ use epydoc && targets+=( epydoc )
+
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install() {
+ # Install sbin scripts to bindir for python-exec linking
+ # they will be relocated in pkg_preinst()
+ distutils-r1_python_install \
+ --system-prefix="${EPREFIX}/usr" \
+ --bindir="$(python_get_scriptdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
+ --sbindir="$(python_get_scriptdir)" \
+ --sysconfdir="${EPREFIX}/etc" \
+ "${@}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ local targets=()
+ use doc && targets+=( install_docbook )
+ use epydoc && targets+=( install_epydoc )
+
+ # install docs
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+
+ # Due to distutils/python-exec limitations
+ # these must be installed to /usr/bin.
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
+ einfo "Moving admin scripts to the correct directory"
+ dodir /usr/sbin
+ for target in ${sbin_relocations}; do
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
+ done
+}
+
+pkg_preinst() {
+ # comment out sanity test until it is fixed to work
+ # with the new PORTAGE_PYM_PATH
+ #if [[ $ROOT == / ]] ; then
+ ## Run some minimal tests as a sanity check.
+ #local test_runner=$(find "${ED}" -name runTests)
+ #if [[ -n $test_runner && -x $test_runner ]] ; then
+ #einfo "Running preinst sanity tests..."
+ #"$test_runner" || die "preinst sanity tests failed"
+ #fi
+ #fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+
+ if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
+ has_version "<${CATEGORY}/${PN}-2.3.3"; then
+ SYNC_DEPTH_UPGRADE=true
+ else
+ SYNC_DEPTH_UPGRADE=false
+ fi
+}
+
+pkg_postinst() {
+ if ${SYNC_DEPTH_UPGRADE}; then
+ ewarn "Please note that this release no longer respects sync-depth for"
+ ewarn "git repositories. There have been too many problems and"
+ ewarn "performance issues. See bugs 552814, 559008"
+ fi
+ einfo ""
+ einfo "This release of portage NO LONGER contains the repoman code base."
+ einfo "Repoman has its own ebuild and release package."
+ einfo "For repoman functionality please emerge app-portage/repoman"
+ einfo "Please report any bugs you may encounter."
+ einfo ""
+}
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
new file mode 100644
index 000000000000..f75533d5124d
--- /dev/null
+++ b/sys-apps/portage/portage-9999.ebuild
@@ -0,0 +1,237 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=(
+ pypy
+ python3_4 python3_5 python3_6
+ python2_7
+)
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+
+inherit distutils-r1 git-r3
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
+
+LICENSE="GPL-2"
+KEYWORDS=""
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
+
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="
+ >=app-arch/tar-1.27
+ dev-lang/python-exec:2
+ !build? (
+ >=sys-apps/sed-4.0.5
+ app-shells/bash:0[readline]
+ >=app-admin/eselect-1.2
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
+ python2_7 pypy)
+ ) )
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
+
+SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage.git
+ https://github.com/gentoo/portage.git"
+
+pkg_setup() {
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ if use native-extensions; then
+ printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ setup.cfg || die
+ fi
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -i cnf/repos.conf || die "sed failed"
+ if prefix-guest ; then
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+ fi
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+python_compile_all() {
+ local targets=()
+ use doc && targets+=( docbook )
+ use epydoc && targets+=( epydoc )
+
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install() {
+ # Install sbin scripts to bindir for python-exec linking
+ # they will be relocated in pkg_preinst()
+ distutils-r1_python_install \
+ --system-prefix="${EPREFIX}/usr" \
+ --bindir="$(python_get_scriptdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
+ --sbindir="$(python_get_scriptdir)" \
+ --sysconfdir="${EPREFIX}/etc" \
+ "${@}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ local targets=()
+ use doc && targets+=( install_docbook )
+ use epydoc && targets+=( install_epydoc )
+
+ # install docs
+ if [[ ${targets[@]} ]]; then
+ esetup.py "${targets[@]}"
+ fi
+
+ # Due to distutils/python-exec limitations
+ # they must be installed to /usr/bin.
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
+ einfo "Moving admin scripts to the correct directory"
+ dodir /usr/sbin
+ for target in ${sbin_relocations}; do
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
+ done
+}
+
+pkg_preinst() {
+ # comment out sanity test until it is fixed to work
+ # with the new PORTAGE_PYM_PATH
+ #if [[ $ROOT == / ]] ; then
+ ## Run some minimal tests as a sanity check.
+ #local test_runner=$(find "${ED}" -name runTests)
+ #if [[ -n $test_runner && -x $test_runner ]] ; then
+ #einfo "Running preinst sanity tests..."
+ #"$test_runner" || die "preinst sanity tests failed"
+ #fi
+ #fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "This release of portage NO LONGER contains the repoman code base."
+ einfo "Repoman now has it's own ebuild and release package."
+ einfo "For repoman functionality please emerge app-portage/repoman"
+ einfo "Please report any bugs you may encounter."
+ einfo ""
+}
diff --git a/sys-apps/powerpc-utils/Manifest b/sys-apps/powerpc-utils/Manifest
new file mode 100644
index 000000000000..1bdc00dff2e9
--- /dev/null
+++ b/sys-apps/powerpc-utils/Manifest
@@ -0,0 +1,7 @@
+DIST powerpc-utils-cleanup.patch.bz2 7255 SHA256 05592c22230afdef79c92556c2161262ec32cee3feaf29e666bf29ba0ef9b39f SHA512 7ed3202f0ce1c78f9fe37f1a37add40f9a54b287318312fa50874e5d6cd14e0feb53c8f802fe821e62cecd9cafe292b0bcd05ac6e7eb3df7bbad5f0053763154 WHIRLPOOL 6dbef51ea346624470c082aef342d60ae3668d0ffb0de2bead880425c0b0c898fe94ebef44b01ee412fe6d7f45985369259887c2c1f6b3d01e517cd8b4b242f7
+DIST powerpc-utils_1.1.3-18.diff.gz 27252 SHA256 7cb699d5e647fe39a9cc1a0276a9e9dc381061a8ecba13671ce8bc1f1037edf4 SHA512 b9995113f98e5660464c89b2a0e4893433deb58055a286137a199eb25bec579eb14ae251b70ac35e8b7656c4471492611645f5640061be923cb528e6e57e9824 WHIRLPOOL 01c7ab029fc35aa33128d528ed960bda7691bc822479eefb5e99812c7b7abad3cd266ede7b5c364c622b912ae630fa729f22b9318dc9712bc62df02471f397b3
+DIST powerpc-utils_1.1.3.orig.tar.gz 25104 SHA256 fde422d13e75d0154fa5d9d94ba3c74f4a91dc0f8ba0351e675ee99eeaddbe95 SHA512 56b704f3371fa65150e25a5e0a54f3e23331f8f8ee9cd1e5cd3b482814394e6e131f42c262c45ca2ee684fa0ec67b5726a63b85fe2fe83117156b6627028ffbb WHIRLPOOL 7da3e3c5a2119e10d8e6b4015c9ec515dd6aa5525143e912b0cf84f1a215c0e7990219564a89e4aa4639af4b5f0853eba7a25da43f1cec1314225a650b27b39d
+EBUILD powerpc-utils-1.1.3.18-r2.ebuild 1597 SHA256 ef94a769d3730a86d6f6b5b01cb740e58b3ebaec9b8b32ad825ea614df0c8d5e SHA512 82d2217dad8e344fdcadd653f2fd635750b2ae36024f92bcc01aee8249f7eac57868e708e6a22151ccc5a72f55b20c6f1dc044f0a081c0111f8d9fd27cfdc6b3 WHIRLPOOL 8ec32bc32f5ff695984cfe399e92db44189e4880b3c1f4bcbbb2b9e15cac7f625c2b88581e2c4b0e422aabe4bc447ab504d422be2e254cd3937c5f1bff9b2b9f
+MISC ChangeLog 2457 SHA256 ed49afd97a02c00e42e4ffaac21c02de31c30dd041513c7944d381319eba37b0 SHA512 ca4d7dfba861272e93dfaceb6b183b8e36800620c486bb6dd355e5ea02a644d0f17dc8684596c86552acd494d403bf888bfd22c791c7fcbdd3c0e62db9ecf2f5 WHIRLPOOL afb80a0c01b0dab9df548b3b74850bf62a0c42090b2c56d5424e3bfca641344f10ed792bb87d3593da82606eedafb94064bf2234d0965257a1ad1216ac379121
+MISC ChangeLog-2015 4299 SHA256 a24567ff8efba0fc68c9d0a227c0be00e0142f43882f0527f4136d4f57c161bd SHA512 fa7103bf43bdd0ea30be16307af786805a462e44cf7574d5906feeae68646f5dfaa4efc2b8260c8d3e16e4a142981b510fb438d950a479bd489272354b8260c0 WHIRLPOOL 6ab157878c7c69eaa028f70415a6a58ff251d984317d1e6e8f9985b4f2fe2a652ce38018e44ccc3fc5d3d39bc2bae38b9bfe3b5af17ab9574d33ef85040e57ac
+MISC metadata.xml 259 SHA256 e7ac6b67c4c89040a00b23bda7a3b2fd4ac8affc1055daf3015ccc8580640f6f SHA512 ca71b1781806d20022c238e5b5d10f9154c78e0fa51f2603de34c48ecbe4cbc2c3190cf046526840546743644c691ee7fe51e31a4617b01bb7602dde803c1538 WHIRLPOOL 2a2aa19a448eca4dea84d129fd194a7ee4d77bdc1b5120abd3b667ce156cdeeb4616a7c7cd23fbccb7ba08e6e166aaba0fac63a6afa208d826acee37b0e560fe
diff --git a/sys-apps/powerpc-utils/metadata.xml b/sys-apps/powerpc-utils/metadata.xml
new file mode 100644
index 000000000000..5eb05198076b
--- /dev/null
+++ b/sys-apps/powerpc-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>
+<maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/powerpc-utils/powerpc-utils-1.1.3.18-r2.ebuild b/sys-apps/powerpc-utils/powerpc-utils-1.1.3.18-r2.ebuild
new file mode 100644
index 000000000000..c356821dabf7
--- /dev/null
+++ b/sys-apps/powerpc-utils/powerpc-utils-1.1.3.18-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils versionator toolchain-funcs
+
+BASEVER=$(get_version_component_range 1-3)
+DEBREV=$(get_version_component_range 4)
+
+DESCRIPTION="PowerPC utilities including nvsetenv, and additional OldWorld apps"
+SRC_URI="http://http.us.debian.org/debian/pool/main/p/powerpc-utils/${PN}_${BASEVER}.orig.tar.gz
+ http://http.us.debian.org/debian/pool/main/p/powerpc-utils/${PN}_${BASEVER}-${DEBREV}.diff.gz
+ mirror://gentoo/${PN}-cleanup.patch.bz2"
+
+HOMEPAGE="http://http.us.debian.org/debian/pool/main/p/powerpc-utils/"
+KEYWORDS="-* ppc ppc64"
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}"
+SLOT="0"
+LICENSE="GPL-2"
+
+S="${WORKDIR}/pmac-utils"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}_${BASEVER}-${DEBREV}.diff
+ epatch "${WORKDIR}"/${PN}-cleanup.patch
+
+ # use users CFLAGS, LDFLAGS and CC, bug 280400
+ sed -i -e "/LDFLAGS =/d" -e "/CC\t=/d" -e "s/CFLAGS\t=/CFLAGS +=/" \
+ -e "s/-g -O2/-Wstrict-prototypes/" Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ dosbin autoboot backlight bootsched clock fblevel fdeject fnset \
+ || die "dosbin failed"
+ dosbin macos mousemode nvsetenv nvsetvol nvvideo sndvolmix trackpad \
+ || die "dosbin failed"
+ doman autoboot.8 bootsched.8 clock.8 fblevel.8 fdeject.8 macos.8 \
+ || die "doman failed"
+ doman mousemode.8 nvsetenv.8 nvsetvol.8 nvvideo.8 sndvolmix.8 trackpad.8 \
+ || die "doman failed"
+
+ ewarn "The lsprop utility has been moved into the ibm-powerpc-utils package."
+}
diff --git a/sys-apps/prctl/Manifest b/sys-apps/prctl/Manifest
new file mode 100644
index 000000000000..cda0566d4e0e
--- /dev/null
+++ b/sys-apps/prctl/Manifest
@@ -0,0 +1,8 @@
+AUX prctl-1.6-no-implicits.patch 473 SHA256 18d1dc97ced202e587d7cd728e91e34055f63a9d46eb9b1e373a1b914dd48372 SHA512 641ccfd96886e682db4ffb31a372f81af4d514fd50ba66fb3329879971f2af5d32afa7cfd27c584452edaf11412cff81b6f61020147071374c94b674a0a41c7a WHIRLPOOL 6737b717142b561083836e6b80ddb3f27890c0e10ffd0cc8100aa1bc90e5faa3debd168ed6aa1f0cfebd36dde3bbaac4216a51a39d7e768d3098f4f1b837cce6
+DIST prctl-1.5.tar.gz 17507 SHA256 b3fed2cec8721518179355d1a443c4be58f73ea224aa4c0cc4ba30ec87479687 SHA512 60463a80fcadec9f2c6fbb0e179391affb594a15f116bc0c6dba350251b6fab1eb7bfca5753e0765cb27b723b76a86cbe19bdaa3ef50d4fee6696ed861e0bb96 WHIRLPOOL e494535cbb7aa2a2bf25dc461231b297dc98c24b87ab50fd6db74da63be9263bc64c07491a8e6c9434f2506022c0f1c7cc0bd2aab31ffa77a5f66589361b6c40
+DIST prctl-1.6.tar.gz 18876 SHA256 62cf7b519774dd5b655c9718fc9b16cc5f9feff199c6cd81f563c4da09fc8727 SHA512 c5b70abbb76f76f4a4c53cebcbd34fa4e87d7db2278a2ea17128da30dea958cc4e4d75b641cb3b9fbd8fa56fee482e97dbae5e61c697e80ef4d13f4b6d28cfda WHIRLPOOL 3fe30b105dc5561bfb34be15dcf42073f116ff3f59131d4a4a4792ad53e32b7950dca684ba4e64c353426a673db1b8467fe703db6d6d70673e49f78852fe4dcb
+EBUILD prctl-1.5.ebuild 535 SHA256 97b691e53cdd695df49c11ea4fe64250d7e07571d10c1599382902dff055a12e SHA512 8233568d1a1f7ad873e04b8cd87097778a5eb468af4894fe7ce40c0068a06667d8eca33eb68353cd86d7ae3655bcbcd407cae4d11acac6ae8081aceeaec61fb5 WHIRLPOOL 85af89a492639db25428232377edada3861c3134c1660d866b40de35f8d24914a41dec287ae3d91c6912180e5dbed1846ee507d7be409b09ca12d74893432c6b
+EBUILD prctl-1.6.ebuild 598 SHA256 36c1634f3f510885bc383e9daa92dc4ac65b02812a7909ba0b014d5d6374baf8 SHA512 5e203e0497d77c3ae3f7ff813fd77efb8a6bdc035e2773518f70253a2f7fb75808b55c53f3446652faecf23984a6592bb5a98b463aee4f985296c380e266e55f WHIRLPOOL 20175902768872f216b6341fe4af0f5d579fd59c691af51d412bae69f9cf1060bdd83b806805ac95bcf53d8a0f3d545d643cb5dda6e40b5df03da3a90dc617a1
+MISC ChangeLog 2839 SHA256 fcf6cec85b0c0e7392f76bd8d067e92e8d5ea42bb961458a208454d9b8a8d1e2 SHA512 c1a30cecb623b36501f5884dcfa7734b306bb8b65fa3d5ed22c76cf757b1fe46c1804f6afad65fb839ac974e11a3f0b0d58cd105d33ad2ff61e6076630159ab9 WHIRLPOOL aa8ece02e152a2ed3d04db8861bbc020b14e1df416553089525a2699c2f6d9115d16cdc0843d4b083883bbc510bc29f8ca7d94cbbf5e7e7e49103d8faff7dbf7
+MISC ChangeLog-2015 846 SHA256 edd9147e70dedd704addd08f404746ddec99266d9a6a0d32b6eb2d15914a27b6 SHA512 646ed708958020c77f920f2fde75e69649b7b93d86052ac11da38ceee6550ea9a4ee1bfcc7ff1722fcb88d0604e90f634151669d2bdd9441486ef195fa1b2dbd WHIRLPOOL 360a119f66a700e07c7530e0e77b5b2578835844f88f75744b769f865a536d28fde24c336bdb26885900a12c831583a93b87006a2cff9c4758184a1759a93f9d
+MISC metadata.xml 449 SHA256 ea5abff8d209a5b1c3deb4f915b904b4a3b93c61151ba9b66d9bc0b07529c844 SHA512 a254e2fa6263298f6f35967195a6f27ea434767c5690082df42e09f3bbb2439835643cfa4d030a09fd5a1829086ebadd6c5485cd53c49ed0ebf291e897f9290f WHIRLPOOL 1c75c7c4fe096764c4501aae594e0ed9b3ce5a6a927bf9931ef4a5a6b8aa6fe6e3d843b98cc09a9865940576e0fed719a8beedb0e67a1f0adaa7ae9bea4f3009
diff --git a/sys-apps/prctl/files/prctl-1.6-no-implicits.patch b/sys-apps/prctl/files/prctl-1.6-no-implicits.patch
new file mode 100644
index 000000000000..2bbf9aba69aa
--- /dev/null
+++ b/sys-apps/prctl/files/prctl-1.6-no-implicits.patch
@@ -0,0 +1,20 @@
+diff --git a/prctl.c b/prctl.c
+index 2dcda79..01c542f 100644
+--- a/prctl.c
++++ b/prctl.c
+@@ -27,3 +27,4 @@
+ #include <pwd.h>
+-#include <linux/prctl.h>
++#include <linux/prctl.h> /* prctl constants */
++#include <sys/prctl.h> /* prctl() proto */
+ #include <string.h>
+@@ -50,3 +51,3 @@ int verbose=0;
+
+-print_version(char *progname)
++void print_version(char *progname)
+ {
+@@ -55,3 +56,3 @@ print_version(char *progname)
+
+-usage(char *progname)
++void usage(char *progname)
+ {
diff --git a/sys-apps/prctl/metadata.xml b/sys-apps/prctl/metadata.xml
new file mode 100644
index 000000000000..370c6384288c
--- /dev/null
+++ b/sys-apps/prctl/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 type="project">
+ <email>ia64@gentoo.org</email>
+ <name>Gentoo Linux IA-64 Development</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">prctl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/prctl/prctl-1.5.ebuild b/sys-apps/prctl/prctl-1.5.ebuild
new file mode 100644
index 000000000000..9dc16202ad44
--- /dev/null
+++ b/sys-apps/prctl/prctl-1.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="Tool to query and modify process behavior"
+HOMEPAGE="https://sourceforge.net/projects/prctl/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ia64"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-apps/groff"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin prctl
+ doman prctl.1
+ dodoc ChangeLog
+}
diff --git a/sys-apps/prctl/prctl-1.6.ebuild b/sys-apps/prctl/prctl-1.6.ebuild
new file mode 100644
index 000000000000..24ac9dace8ef
--- /dev/null
+++ b/sys-apps/prctl/prctl-1.6.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="Tool to query and modify process behavior"
+HOMEPAGE="https://sourceforge.net/projects/prctl/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-apps/groff"
+
+PATCHES=("${FILESDIR}"/${P}-no-implicits.patch)
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin prctl
+ doman prctl.1
+ dodoc ChangeLog
+}
diff --git a/sys-apps/prefix-chain-utils/Manifest b/sys-apps/prefix-chain-utils/Manifest
new file mode 100644
index 000000000000..cdac25aaae23
--- /dev/null
+++ b/sys-apps/prefix-chain-utils/Manifest
@@ -0,0 +1,6 @@
+AUX prefix-chain-wrapper.in 2229 SHA256 01e5d68e599b3b4a33dfffbb4d2d509617856c8416599431a01794c24edc48c7 SHA512 9bdc4ef2ca011a60bdb6f28aa94d111bd9683884de051e214ef6911f7cd18387fec2a5ee684f27bb74dc81f59c5d7d14b01647e7860920e2c23c34e75d134afa WHIRLPOOL 44fa9672fb0e7439b40406f95617e727aaebe0490c870826cd720eea42a7e3cd2c5e6de9b7e2108ef5cd69ad414a8d1ebb023349aa30009e7987b2f77113fb63
+AUX startprefix.in 1630 SHA256 e39474665a3ecccc408c3756a42ea864f01cfe38c331580af30467c0b53b9a35 SHA512 2492a12ed4a58bbd3af596fdfbdf57b6f158b8ada18a00c5b07dcac737197f232a044bb6277c186a272f423eeee0d805bcb6bf9756c574fd9248570743b99d03 WHIRLPOOL 85bdb634e87088aef9780a6cf63b45cf2499d6359e949743b060075c3d2986d7c1c4f4ad3ecfa6a903eebd64878c868f5da42c17873ca9503b9f498979f30605
+EBUILD prefix-chain-utils-0.2-r7.ebuild 1678 SHA256 e3c3c4ffa4f2dd0b63322b50c5edc439aab15f4dc2b9bb61c3ec810301b7cd8f SHA512 a7dd2d2822bb27fea0d94539c84abbd04198e0c906e39513e6afa00cff97d2a95a29a51d21b48a2b483f1b82f947b0ca2cdc02a607169665e2198c32519c1c82 WHIRLPOOL 6543a4b805e2b0ec841189cf3fffffdb9f6e65c5bbc3d5afa7d632932ef1970417206a88aef00307d80c2081b70e823237df157153d6a593694bc2783c689dfa
+MISC ChangeLog 2555 SHA256 13acbdb6b63a70336e4ead007f0d87533aec105694966b51d0c6507f57991645 SHA512 8dbb7eb8bc1de8864f5a2b251c0ef596435277b0c9d63c479dc96159918eafdad1d6dbe2326e680eef82081c83b847bd5bcb1d37e8b575d666d8640147ac1cb6 WHIRLPOOL f21d3721001dabcc48c2de32ce6720603c3a9e2c482e35749d94535eca984e6293440671246ae25c5c6e243829a16ba03fd3a5bcf09a28d2f25be286f26c0dd7
+MISC ChangeLog-2015 1042 SHA256 df4d6e39c906820bb09ff1af57369af54d44bfd6c393ac19be7fe4ab2d49bcb6 SHA512 72308c8bf78679703fa77d835575b3caf815e64db5a0cd6228cab7a18a41a2bae5a1ffee5240d0fd40bf86722d5a48aa33f80b3461a3424bfc2141058f37aa59 WHIRLPOOL afb89ef8b1f829b98827cc9c0eacf3f13b39581cf1b7c146f5d74782dcd5341b3232a01880c18285e3503d675c8a0954c7da9bdb8accd4e7d84746cf77fce9fe
+MISC metadata.xml 243 SHA256 acb891975882d2b75bb5a1a76063f1d61ad1d96c799548e7f141e1623a0cc57e SHA512 8489be9ea6eac385511b0d193b1b61fad9c8e0d4cb86fd711e6faf04e66b2c935ae64ce6ce0a044d036e76de6787e5d440d67f831e89261a71e74b645a0999d9 WHIRLPOOL e06d2acbfdb38aa17edb0da41bcafece9c9a5d0542c9192ee3b74ae0b6250d24fb096e3a153f6a215a29d3dd7c5794f2c67f0917db3aa3f1cc65e86ea27e228f
diff --git a/sys-apps/prefix-chain-utils/files/prefix-chain-wrapper.in b/sys-apps/prefix-chain-utils/files/prefix-chain-wrapper.in
new file mode 100644
index 000000000000..d612cc46bb28
--- /dev/null
+++ b/sys-apps/prefix-chain-utils/files/prefix-chain-wrapper.in
@@ -0,0 +1,83 @@
+#!/usr/bin/env bash
+
+if [ -r /cygdrive/. ]; then
+ winpath2unix() { cygpath -u "$1"; }
+ unixpath2win() { cygpath -w "$1"; }
+fi
+
+link_dirs=()
+opts=()
+chost="@GENTOO_PORTAGE_CHOST@"
+prefix="@GENTOO_PORTAGE_EPREFIX@"
+absprefix=${prefix}
+if [[ ${CHOST} == *"-winnt"* ]]; then
+ # we may get called from windows binary, like pkgdata in dev-libs/icu
+ # in this case, PATH elements get the "/dev/fs/C/WINDOWS/SUA" prefix
+ absprefix=$(winpath2unix "$(unixpath2win "${absprefix}")")
+fi
+[[ $0 == *windres* ]] && mode=compile || mode=link
+orig_args=("$@")
+
+for opt in "$@"; do
+ case "$opt" in
+ -L) link_dirs=("${link_dirs[@]}" "-L$1"); shift ;;
+ -L*) link_dirs=("${link_dirs[@]}" "${opt}") ;;
+ *)
+ case "${opt}" in
+ -v)
+ # -v done right: only use mode version if -v is the _only_
+ # argument on the command line.
+ [[ ${#orig_args[@]} -gt 1 ]] || mode=version
+ ;;
+ --version) mode=version ;;
+ -c|-E|-S) mode=compile ;;
+ -print-search-dirs) mode=dirs ;;
+ esac
+ opts=("${opts[@]}" "${opt}")
+ ;;
+ esac
+done
+
+save_ifs=$IFS
+IFS=':'
+new_path=
+for p in $PATH; do
+ IFS=$save_ifs
+ [[ "${p#${absprefix}}" != "${p}" ]] && continue
+ if [[ -z "${new_path}" ]]; then
+ new_path="${p}"
+ else
+ new_path="${new_path}:${p}"
+ fi
+done
+IFS=$save_ifs
+
+PATH=${new_path}
+
+# toolchain-prefix-wrapper's ld-wrapper understands '-R' for aix and hpux too.
+# parity (winnt) understands -rpath only ...
+case "${chost}" in
+*-winnt*) rpath_opt="-Wl,-rpath," ;;
+*) rpath_opt="-Wl,-R," ;;
+esac
+
+pfx_link=("-L${prefix}/usr/lib" "-L${prefix}/lib")
+pfx_link_r=("${rpath_opt}${prefix}/lib" "${rpath_opt}${prefix}/usr/lib")
+pfx_comp=("-I${prefix}/include" "-I${prefix}/usr/include")
+
+case "$mode" in
+link) exec "$(basename $0)" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" ;;
+compile) exec "$(basename $0)" "${link_dirs[@]}" "${opts[@]}" "${pfx_comp[@]}" ;;
+version) exec "$(basename $0)" "${orig_args[@]}" ;;
+dirs)
+ "$(basename $0)" "${orig_args[@]}" | while read line; do
+ if [[ "${line}" == "libraries: ="* ]]; then
+ echo "libraries: =${prefix}/usr/lib:${prefix}/lib:${line#"libraries: ="}"
+ else
+ echo "${line}"
+ fi
+ done
+ ;;
+*) echo "cannot infer $0's mode from comamnd line arguments"; exit 1 ;;
+esac
+
diff --git a/sys-apps/prefix-chain-utils/files/startprefix.in b/sys-apps/prefix-chain-utils/files/startprefix.in
new file mode 100644
index 000000000000..3882ffe14a9c
--- /dev/null
+++ b/sys-apps/prefix-chain-utils/files/startprefix.in
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+if [[ -r "@GENTOO_PORTAGE_EPREFIX@"/lib/gentoo/functions.sh ]]; then
+ . "@GENTOO_PORTAGE_EPREFIX@"/lib/gentoo/functions.sh
+elif [[ -r "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh ]]; then
+ . "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh
+elif [[ -r "@GENTOO_PORTAGE_EPREFIX@"/sbin/functions.sh ]]; then
+ . "@GENTOO_PORTAGE_EPREFIX@"/sbin/functions.sh
+fi
+
+einfo "entering chained prefix @GENTOO_PORTAGE_EPREFIX@ ..."
+
+# inform profiles very early of us beeing interactive (or at least,
+# we will _start_ an interactive shell, so we want the according bits.)
+set -i
+
+. "@GENTOO_PORTAGE_EPREFIX@"/etc/profile
+
+# if there is no local portage, foreign portage instances need to know
+# where to merge to - and thus we need to set EPREFIX.
+# the other way round, if there is a local portage, EPREFIX may not
+# point anywhere else than to our local EPREFIX or be unset...
+
+# DISABLED: this is done by etc/profile now, to be able to start a
+# prefix environment by sourcing etc/profile.
+
+#if [[ -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/emerge ]]; then
+# if [[ -n "${EPREFIX}" ]] && [[ "${EPREFIX}" != "@GENTOO_PORTAGE_EPREFIX@" ]]; then
+# ewarn "EPREFIX is set. this will render portage unusable, unsetting"
+# unset EPREFIX
+# fi
+#else
+# export EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+#fi
+
+# a common problem: the child has no less installed, but baselayout insists
+# on setting PAGER to EPREFIX/usr/bin/less. everything gets back to normal
+# when unsetting PAGER in this case.
+if [[ ! -x "${PAGER}" ]]; then
+ unset PAGER
+fi
+
+bash --noprofile
+einfo "leaving chained prefix @GENTOO_PORTAGE_EPREFIX@ ..."
+
diff --git a/sys-apps/prefix-chain-utils/metadata.xml b/sys-apps/prefix-chain-utils/metadata.xml
new file mode 100644
index 000000000000..d33cce94b0d4
--- /dev/null
+++ b/sys-apps/prefix-chain-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>
+<maintainer type="project">
+ <email>prefix@gentoo.org</email>
+ <name>Gentoo Prefix</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/prefix-chain-utils/prefix-chain-utils-0.2-r7.ebuild b/sys-apps/prefix-chain-utils/prefix-chain-utils-0.2-r7.ebuild
new file mode 100644
index 000000000000..b447752a1536
--- /dev/null
+++ b/sys-apps/prefix-chain-utils/prefix-chain-utils-0.2-r7.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit prefix
+
+DESCRIPTION="Chained EPREFIX utilities and wrappers"
+HOMEPAGE="https://dev.gentoo.org/~haubi"
+SRC_URI=""
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~ppc-aix ~x86-linux ~sparc-solaris ~x86-solaris ~x86-winnt"
+IUSE=""
+
+DEPEND=""
+RDEPEND="sys-devel/gcc-config"
+
+src_unpack() {
+ mkdir -p "${S}"
+}
+
+src_install() {
+ cp "${FILESDIR}"/*.in "${T}"
+ eprefixify "${T}"/*.in
+
+ for x in "${T}"/*.in; do
+ mv ${x} ${x%.in}
+ done
+
+ # install toolchain wrapper.
+ wrapperdir=/usr/${CHOST}/gcc-bin/${CHOST}-prefix-chain-wrapper/${PV}
+ wrappercfg=${CHOST}-prefix-chain-wrapper-${PV}
+
+ exeinto $wrapperdir
+ sed -i -e "s,@GENTOO_PORTAGE_CHOST@,${CHOST},g" "${T}"/prefix-chain-wrapper
+ doexe "${T}"/prefix-chain-wrapper
+
+ dosym $wrapperdir/prefix-chain-wrapper $wrapperdir/${CHOST}-gcc
+ dosym $wrapperdir/prefix-chain-wrapper $wrapperdir/${CHOST}-g++
+ dosym $wrapperdir/prefix-chain-wrapper $wrapperdir/${CHOST}-cpp
+ dosym $wrapperdir/prefix-chain-wrapper $wrapperdir/${CHOST}-c++
+ dosym $wrapperdir/prefix-chain-wrapper $wrapperdir/${CHOST}-windres
+
+ dosym $wrapperdir/${CHOST}-gcc $wrapperdir/gcc
+ dosym $wrapperdir/${CHOST}-g++ $wrapperdir/g++
+ dosym $wrapperdir/${CHOST}-cpp $wrapperdir/cpp
+ dosym $wrapperdir/${CHOST}-c++ $wrapperdir/c++
+ dosym $wrapperdir/${CHOST}-windres $wrapperdir/windres
+
+ # LDPATH is required to keep gcc-config happy :(
+ cat > "${T}"/$wrappercfg <<EOF
+GCC_PATH="${EPREFIX}/$wrapperdir"
+LDPATH="${EPREFIX}/$wrapperdir"
+EOF
+
+ insinto /etc/env.d/gcc
+ doins "${T}"/$wrappercfg
+
+ # install startprefix script.
+ exeinto /
+ doexe "${T}"/startprefix
+}
diff --git a/sys-apps/preload/Manifest b/sys-apps/preload/Manifest
new file mode 100644
index 000000000000..ee1ec6a488b6
--- /dev/null
+++ b/sys-apps/preload/Manifest
@@ -0,0 +1,14 @@
+AUX 00-patch-configure.diff 554 SHA256 fde86c42379111b211fa750b6b32cd02ae4f0d1e2597fc7f9e85d841ebf71be3 SHA512 08d0ec88d15812e9a495e3b5bef080539f088163d3ad3b390fc6f5cffaefbdf8a6ac854c9a24ec0962466afead1223ba5621566649fea6bb84d80bcecbc16c3e WHIRLPOOL 87b800eeb873fd627f3f02985bd15da1a5c6516d1fe5ad127fe5062cf592f2fe233ec2d36210e1725f677afe26376f9adb9339f69916712604b3af7932f4d83e
+AUX 0001-Early-restart-of-forking-readahead-children.patch 1900 SHA256 13a2d3f91960f9ebddf4261aa9e53f64ce3111b5e1c5273f467f00d3ab0ac880 SHA512 c24b22605e7fc020a5f2a069a65b2ffac9caae69b70d7e5925953f9e4a71992ca34f4701de7b9e975321ae3418a2d6a6bd952e162b8167891bc68128dbdc51cf WHIRLPOOL 62bf4e4b9f67f7cbb7e176a3d59e71f92fdb9c914e3b9f476eac0b79d1d74b4f5dde9dfdf9359d9b9bddf62514d7eefde53965a254bdc0b38210daf2377fa835
+AUX 0002-Create-short-overlapping-io-bursts.patch 856 SHA256 1e92121abfa3549b18d4a7eefa26fa098e25539cc3948c3ffe492598d6ba9ae5 SHA512 ad9f8cc342e54cf36ade563351dec14d02bbcf1495f8dddae265a339531b623eeb3be100b6303670c33d588b2f0106d6162e74b449ec082e2f4257e2dd7b276b WHIRLPOOL f301b757e21ce3fc1d7312d1086d382599d695411e9e7a714ccaabc09dea2f3c1aedffbb8b1b70531512515939d73b8b6755a05df07ea915b6342d61102d96c8
+AUX 0003-Fix-wait_for_children-loop.patch 745 SHA256 1bbb777d7a92779cff1888bdb5b322ce3cd913c3a9dc38c3677774d98d0a4176 SHA512 32c107fde8d9afcf687e5e276dcb95006bc26fa0af6a1bc2223c80fbe9ec685d7952ae4e0452ed57c6edf3cffddc23fa0da4633c37f23c4450b5c68b3dbff274 WHIRLPOOL 2c98a84cd2f88e74c5440bc1ebd531b87c21f8324c553b4cd2b2ba8abfc23fc9f186cc7cdfc9e07f5bca3640e676052cf25c841a451b51ce1ce09a438de8ad11
+AUX 02-patch-preload_conf.diff 684 SHA256 f71c689becee188f67288869be70dc6712059e2b54601cd27bce5975c703957c SHA512 b5c6076cc4c97d917219d12d8aa30b3bc958085e2477b81c54449e2b4bc576fd86a1e01f64867933b1219842e3292e4861a1776486594ae3aa93f956fb919c9f WHIRLPOOL 6fb4d63dd28f6f63f721ef62b72ab813b7962410eeddd04be05f11bb0e804758a49d2a0ffd2f867dd70cd2c091cdfb64fb1d896bd38b3d4c18e8d139a28c2a4f
+AUX 02-patch-preload_sysconfig.diff 1297 SHA256 194fd5df6b9d29f1d9f02ce827c5358d5d1a73dd27c93f7347368a3c46aebea6 SHA512 bef0346e1b0c3fb15f9f1987a302cd0b349ce1898f387afaf6407833c2adfd3dfa985615840312d5cd09d22e330f072ab3a164cb3f7c9b356bfc51522fe924e3 WHIRLPOOL 4440a6325f782de36328ef84a20935dd76892fd7289f61fabad78175629e6f16a6908cd2ed08f4377a72b2ac486a64689d3cf52b29c42a55f13dae2d176483f4
+AUX preload-0.6.4-use-help2man-as-usual.patch 1170 SHA256 e3cfa2a98d4723fdaad8824828c6a48c3f11b7d391c56b272f21dd52e1270ee5 SHA512 cbd40b621974544f4737161a034f13d7d9e635822f7cca293ca93e7e5d7bb108260b02aa557e42fb43cbd48ca069bb19eb7946cb1f4fbf263dac84ac209de451 WHIRLPOOL c3a04a1ac943eb1914edb21b43d28ee46fd9bb232832cad9dd772d207b8481b6459aaf2db6beeada3c05270fd68d002324e26cc5a560f14dc54cfee1627fea9b
+AUX preload-0.6.4-use-make-dependencies.patch 533 SHA256 14370e962352510ed94bda04ddcd1882b5562fa1eaae93894ae485ec756591e7 SHA512 060c96b9b3fe38eac79d6a39945ff4efbe7639804e97715a290d5397fff523fb8d483393305187249c61ac1acbc719f4e56bb7e5a3c1513e6384ca915ad773a0 WHIRLPOOL 3bc1de6b69d6cdd27e7408c5efd964c0255763852a58b151c6e9717e30c68df189d9d865fb2b0c9070dac1e5fafc53818f12c0f9a02353c5fcd11746d3b5d45b
+AUX preload-0.6.4.init.in-r2 1506 SHA256 121b763074156a3dcfdb15d23da5dabd89250565596e8b7b3a8388aded2e8071 SHA512 0e6a058f1825f537152ddf1495dc4101f8add5ca4ce759c3cf6425025c19c5a4361d9abed447511b7d9f081c665d65d7d2f828c13a59ddfcb5f88e5529958e95 WHIRLPOOL 6cf01e0565e423a236f5b268189f2007b72e2875aa169f543fe9d67cbea5a2f5125e327488be87c1d81b20252c47ae95d5e2bb01324c86391206a4cc18fe2420
+DIST preload-0.6.4.tar.gz 140750 SHA256 d0a558e83cb29a51d9d96736ef39f4b4e55e43a589ad1aec594a048ca22f816b SHA512 ffb533059b8c9cd171b0d02d52fc8c9bc45284fb16e12b9698ab74345d0e4f66cee61e17922074f7fbfaa90db254e473f815718fc72a689bb55346fcda9e823c WHIRLPOOL dcee78e1933689e0860cee1b641625182c1cd35a30a71cb11d12dbd68dd513f7a49f69134f6623baa7fa9ab85f81fb45324ffd20aa191aac23ee054f939bb0d6
+EBUILD preload-0.6.4-r3.ebuild 1703 SHA256 e54520e940743c448972aa807ada060f1f9188082ca26318a9bbf6f584a715e6 SHA512 8091828a42c2aff05f2ec3e1e4995a7d50bc7468c0e004cdc568dbf5cb490bd8fc5ea12d74985eb23251befcc1df85189c897d4a13bb2b0a7b0677bc06228295 WHIRLPOOL a7f781cc5fc6f807adeb7b4c82e0af66ae12bf24c418512e61d8e3289d0c5579ca483b12942ca2e5c8f9cc29adc42e0381aa007f7b58a3463f559d0be2c873d5
+MISC ChangeLog 3152 SHA256 08074d2b7b172d13d975e89e1834e76d5abd7379eeb251474c245897782c43a6 SHA512 f93ac6761b04605e6580467c4620a6c265a8cb2c2ef087e82c808d3aca14f879f00ea1d6cc8e27be60f1b63b64a43c304e1460e94250ce11020e6f4ffd78159a WHIRLPOOL 0d399acf37ad07ee1705da6adba6cd78e6d5ea100f5ddeeb8fcfec19c641b3386168d03745dafbe9ba7bb083c322557accf44c0a1eb36ba7bc7eb41ba5cf74fe
+MISC ChangeLog-2015 6530 SHA256 e7a62a5492138814e6fac1332261f3a054de16860892f82fa8b3712bbf36625c SHA512 52944f1096056647ea1f04e9ecdcd9ad8456cf0552a8f459dd7939e3e2c3b3e12ad05e3dcc919687088010cc9e290c840ec72ee2795fce907a0cf92bdc1ff623 WHIRLPOOL 00ba7dee1a5f171203bbb71954d606a0f4b235cb1fca99b5361c9c9432999c977f7a21b8db36515138700eaa3ffd460726020c8ce60c805a3de05c9a1e3e679f
+MISC metadata.xml 501 SHA256 0e4a5ec82733dd6fc68b64d20a7801b607eab081a948a5a98cf6cf57bf6af542 SHA512 8909054cca7097e0d17a2bbbfc343065ade5a7d433b6729b8cf902ed9730856081303d7a3af13350a4fc78a20a00c01e8fd33b526cd28c82f5031fbe8abe7e76 WHIRLPOOL 9a8e50fddc7b1c8fd8c4dbbf305b07c4d79d44fadb40faa8448af24b65b76cf183f0e005d02e3224a6f4f6753e87f7784b0510f8ac07c017615c2826a8586dfe
diff --git a/sys-apps/preload/files/00-patch-configure.diff b/sys-apps/preload/files/00-patch-configure.diff
new file mode 100644
index 000000000000..0fa5feb47b1f
--- /dev/null
+++ b/sys-apps/preload/files/00-patch-configure.diff
@@ -0,0 +1,15 @@
+--- configure.ac~ 2009-04-15 23:47:52.000000000 +0200
++++ configure.ac 2010-03-29 17:59:39.000000000 +0200
+@@ -54,9 +54,9 @@
+ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14)
+
+ # Directories we need.
+-pkgdocdir='${datadir}/doc/'${PACKAGE_NAME}-${PACKAGE_VERSION}
+-initddir='${sysconfdir}/rc.d/init.d'
+-sysconfigdir='${sysconfdir}/sysconfig'
++pkgdocdir='${datadir}/doc/'${PF}
++initddir='${sysconfdir}/init.d'
++sysconfigdir='${sysconfdir}/conf.d'
+ logrotatedir='${sysconfdir}/logrotate.d'
+ logdir='${localstatedir}/log'
+ subsysdir='${localstatedir}/lock/subsys'
diff --git a/sys-apps/preload/files/0001-Early-restart-of-forking-readahead-children.patch b/sys-apps/preload/files/0001-Early-restart-of-forking-readahead-children.patch
new file mode 100644
index 000000000000..2143ba3cc15e
--- /dev/null
+++ b/sys-apps/preload/files/0001-Early-restart-of-forking-readahead-children.patch
@@ -0,0 +1,64 @@
+From 63cbd8862714a97c8ef752041dc8c351ba4fae1d Mon Sep 17 00:00:00 2001
+From: Kai Krakow <kai@kaishome.de>
+Date: Mon, 28 Jul 2008 19:50:22 +0200
+Subject: [PATCH] Early restart of forking readahead children
+
+This patch adds ability to wait_for_children() to restart
+forking new readahead children as soon as a slot becomes
+available which should make the effect of parallelism even
+more effective. Previous situation was:
+
+Wait for all children to exit as soon as the high water mark
+was reached. This resulted in 30 processes in peak, wait for
+them to reach 0 processes. Start another 30 processes in
+peak, wait again etc.
+
+New situation is: Start a new process as soon as a previous
+process exited which keeps the peak at 30 processes until
+the readahead list is finished.
+
+This introduces a new parameter to wait_for_children() which
+tells it to leave now more than XY processes running when
+returning.
+---
+ src/readahead.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/readahead.c b/src/readahead.c
+index c169e81..7617449 100644
+--- a/src/readahead.c
++++ b/src/readahead.c
+@@ -103,10 +103,10 @@ map_block_compare (const preload_map_t **pa, const preload_map_t **pb)
+ static int procs = 0;
+
+ static void
+-wait_for_children (void)
++wait_for_children (int maxprocs)
+ {
+ /* wait for child processes to terminate */
+- while (procs > 0)
++ while (procs >= maxprocs)
+ {
+ int status;
+ if (wait (&status) > 0)
+@@ -121,7 +121,7 @@ process_file(const char *path, size_t offset, size_t length)
+ int maxprocs = conf->system.maxprocs;
+
+ if (procs >= maxprocs)
+- wait_for_children ();
++ wait_for_children (maxprocs);
+
+ if (maxprocs > 0)
+ {
+@@ -257,7 +257,7 @@ preload_readahead (preload_map_t **files, int file_count)
+ path = NULL;
+ }
+
+- wait_for_children ();
++ wait_for_children (0);
+
+ return processed;
+ }
+--
+1.5.4.5
+
diff --git a/sys-apps/preload/files/0002-Create-short-overlapping-io-bursts.patch b/sys-apps/preload/files/0002-Create-short-overlapping-io-bursts.patch
new file mode 100644
index 000000000000..20ba67a1bb4b
--- /dev/null
+++ b/sys-apps/preload/files/0002-Create-short-overlapping-io-bursts.patch
@@ -0,0 +1,29 @@
+From 97814f566aeb84f60031008c3dda5457ba176fe7 Mon Sep 17 00:00:00 2001
+From: Kai Krakow <kai@kaishome.de>
+Date: Mon, 28 Jul 2008 20:57:06 +0200
+Subject: [PATCH] Create short overlapping io bursts
+
+Modify the wait_for_children() mechanism to create short
+burst instead of constant flow of new io requests. This
+is more fair and should enable the kernel to rearrange
+io requests better.
+---
+ src/readahead.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/readahead.c b/src/readahead.c
+index 7617449..466961d 100644
+--- a/src/readahead.c
++++ b/src/readahead.c
+@@ -121,7 +121,7 @@ process_file(const char *path, size_t offset, size_t length)
+ int maxprocs = conf->system.maxprocs;
+
+ if (procs >= maxprocs)
+- wait_for_children (maxprocs);
++ wait_for_children (maxprocs >> 1);
+
+ if (maxprocs > 0)
+ {
+--
+1.5.4.5
+
diff --git a/sys-apps/preload/files/0003-Fix-wait_for_children-loop.patch b/sys-apps/preload/files/0003-Fix-wait_for_children-loop.patch
new file mode 100644
index 000000000000..dc37548638a5
--- /dev/null
+++ b/sys-apps/preload/files/0003-Fix-wait_for_children-loop.patch
@@ -0,0 +1,27 @@
+From 536714622135e53db3f8a5673db32c5de9620aa8 Mon Sep 17 00:00:00 2001
+From: Kai Krakow <kai@kaishome.de>
+Date: Tue, 29 Jul 2008 08:15:55 +0200
+Subject: [PATCH] Fix wait_for_children() loop
+
+Brain damage repaired: One should not wait while zero or
+more children exist... That's always the case. :-(
+---
+ src/readahead.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/readahead.c b/src/readahead.c
+index 466961d..08d9f4f 100644
+--- a/src/readahead.c
++++ b/src/readahead.c
+@@ -106,7 +106,7 @@ static void
+ wait_for_children (int maxprocs)
+ {
+ /* wait for child processes to terminate */
+- while (procs >= maxprocs)
++ while (procs > maxprocs)
+ {
+ int status;
+ if (wait (&status) > 0)
+--
+1.5.4.5
+
diff --git a/sys-apps/preload/files/02-patch-preload_conf.diff b/sys-apps/preload/files/02-patch-preload_conf.diff
new file mode 100644
index 000000000000..70055c3bbb0f
--- /dev/null
+++ b/sys-apps/preload/files/02-patch-preload_conf.diff
@@ -0,0 +1,21 @@
+diff -urN preload-0.6.orig/src/preload.conf.in preload-0.6/src/preload.conf.in
+--- preload-0.6.orig/src/preload.conf.in 2008-07-24 02:02:11.000000000 +0200
++++ preload-0.6/src/preload.conf.in 2008-07-24 16:32:28.565184094 +0200
+@@ -132,7 +132,7 @@
+ # preload doesn't special-handle device files internally.
+ #
+ # default: (empty list, accept all)
+-mapprefix = /usr/;/lib;/var/cache/;!/
++mapprefix = /usr/;/lib;/var/cache/;/opt/;/home/;!/
+
+ # exeprefix:
+ #
+@@ -141,7 +141,7 @@
+ # files instead of maps.
+ #
+ # default: (empty list, accept all)
+-exeprefix = !/usr/sbin/;!/usr/local/sbin/;/usr/;!/
++exeprefix = !/usr/sbin/;!/usr/local/sbin/;/usr/;/opt/;/usr/libexec/;!/
+
+ # maxprocs
+ #
diff --git a/sys-apps/preload/files/02-patch-preload_sysconfig.diff b/sys-apps/preload/files/02-patch-preload_sysconfig.diff
new file mode 100644
index 000000000000..84308b6e14d8
--- /dev/null
+++ b/sys-apps/preload/files/02-patch-preload_sysconfig.diff
@@ -0,0 +1,39 @@
+diff -urN preload-0.6.4.orig/preload.sysconfig preload-0.6.4/preload.sysconfig
+--- preload-0.6.4.orig/preload.sysconfig 2008-10-23 03:08:20.000000000 +0200
++++ preload-0.6.4/preload.sysconfig 2009-05-01 13:51:03.493828659 +0200
+@@ -1,10 +1,30 @@
++# Copyright 1999-2008 Gentoo Foundation
++# $Id$
++# preload configuration file
++
++PIDFILE="/var/run/preload.pid"
++
++# verbosity. 0-10, Default is 1.
++#PRELOAD_VERBOSITY="1"
++
++# set this for niceness. Default is 15. Valid ranges are from -20 to 19. See
++# nice(1) man page.
++#PRELOAD_NICE="15"
++
++# log file (default is /var/log/preload.log )
++#PRELOAD_LOGFILE="/var/log/preload.log"
++
++# preload state file (default location is /var/lib/preload/preload.state )
++# Empty (commented out) means no state is saved.
++PRELOAD_STATEFILE="/var/lib/preload/preload.state"
++
+ # Miminum memory that the system should have for preload to be launched.
+-# In megabytes.
+-MIN_MEMORY="256"
++# In megabytes. Currently unused.
++#MIN_MEMORY="256"
+
+ # Command-line arguments to pass to the daemon. Read preload(8) man page
+ # for available options.
+-PRELOAD_OPTS="--verbose 1"
++#PRELOAD_OPTS="--verbose 1"
+
+-# Option to call ionice with. Leave empty to skip ionice.
+-IONICE_OPTS="-c3"
++# Option to call ionice with. Leave empty to use defaults.
++#IONICE_OPTS="-c3"
diff --git a/sys-apps/preload/files/preload-0.6.4-use-help2man-as-usual.patch b/sys-apps/preload/files/preload-0.6.4-use-help2man-as-usual.patch
new file mode 100644
index 000000000000..61db50692524
--- /dev/null
+++ b/sys-apps/preload/files/preload-0.6.4-use-help2man-as-usual.patch
@@ -0,0 +1,31 @@
+--- src/Makefile.am~ 2009-04-15 23:46:04.000000000 +0200
++++ src/Makefile.am 2010-04-09 12:56:45.000000000 +0200
+@@ -54,23 +54,11 @@
+
+ dist_man_MANS = preload.8
+
+-$(srcdir)/preload.8: cmdline.c ../configure.ac preload.8.i
+- $(MAKE) $(AM_MAKEFLAGS) preload
+- @echo "Creating $@ using help2man(1)"
+- @$(top_builddir)/missing --run \
+- help2man --no-info --section=8 --include=preload.8.i \
+- --help-option="-H" --output="$@.tmp" \
+- --name 'Adaptive readahead daemon' ./preload \
+- && mv "$@.tmp" "$@" \
+- || ($(RM) "$@"; \
+- echo Failed to update preload.8, the man page may be outdated >&2; \
+- (test -f "$@" || echo help2man is required to generate this file. >> "$@"));
+-
+-install-data-hook:
+- @cd "$(DESTDIR)$(man8dir)" && gzip -c preload.8 > preload.8.gz.tmp && mv preload.8.gz.tmp preload.8.gz && $(RM) preload.8
+-
+-uninstall-hook:
+- $(RM) "$(DESTDIR)$(man8dir)/preload.8.gz"
++preload.8: preload preload.8.i
++ help2man \
++ --no-info --section=8 --include=preload.8.i \
++ --help-option="-H" --output="$@" \
++ --name 'Adaptive readahead daemon' ./preload
+
+ ######################################################################
+
diff --git a/sys-apps/preload/files/preload-0.6.4-use-make-dependencies.patch b/sys-apps/preload/files/preload-0.6.4-use-make-dependencies.patch
new file mode 100644
index 000000000000..0f41780c31e4
--- /dev/null
+++ b/sys-apps/preload/files/preload-0.6.4-use-make-dependencies.patch
@@ -0,0 +1,21 @@
+--- src/Makefile.am~ 2010-04-09 12:56:45.000000000 +0200
++++ src/Makefile.am 2010-04-09 12:58:36.000000000 +0200
+@@ -8,8 +8,6 @@
+ -DLOGDIR='"${logdir}"' \
+ -DPKGLOCALSTATEDIR='"${pkglocalstatedir}"'
+
+-preload.o cmdline.o preload.8: Makefile
+-
+ sbin_PROGRAMS = preload
+
+ preload_SOURCES = \
+@@ -64,8 +62,7 @@
+
+ MAINTAINERCLEANFILES += preload.conf.debug
+
+-preload.conf.debug:
+- $(MAKE) $(AM_MAKEFLAGS) preload.conf
++preload.conf.debug: preload.conf
+ cp preload.conf preload.conf.debug
+
+ RUNPREQ = preload preload.conf.debug
diff --git a/sys-apps/preload/files/preload-0.6.4.init.in-r2 b/sys-apps/preload/files/preload-0.6.4.init.in-r2
new file mode 100644
index 000000000000..f8cae0c4d93e
--- /dev/null
+++ b/sys-apps/preload/files/preload-0.6.4.init.in-r2
@@ -0,0 +1,66 @@
+#!/sbin/openrc-run
+
+description='Start/stop the preload daemon'
+extra_started_commands='dump reload'
+description_dump='Dump the config and state of the daemon (to the logfile)'
+description_reload='Reload the daemon'
+
+PIDFILE="/var/run/preload.pid"
+
+depend() {
+ after localmount
+ use netmount ntpd
+}
+
+dump() {
+ local pid
+ pid=$(cat ${PIDFILE})
+
+ ebegin "Dumping the config and state of preload"
+ if [ -n "${pid}" ]; then
+ kill -USR1 ${pid}
+ kill -USR2 ${pid}
+ fi
+ eend ${?} && \
+ einfo "These should have been written to ${PRELOAD_LOGFILE:-/var/log/preload.log}"
+}
+
+reload() {
+ ebegin "Reloading preload"
+ kill -HUP $(cat ${PIDFILE})
+ eend ${?}
+}
+
+start() {
+ local ionice
+
+ ebegin "Starting preload"
+
+ #MIN_MEMORY=${MIN_MEMORY:-256}
+ # Check for > MIN_MEMORY MB
+ #free -m | awk '/Mem:/ {exit ($2 >= ('"$MIN_MEMORY"'))?0:1}' || exit 0
+
+ # First try to start with ionice; if that fails, try without.
+ for ionice in "ionice ${IONICE_OPTS:--c3}" ''; do
+ # Avoid 'ionice not found' errors
+ ${ionice} true >/dev/null 2>&1 || continue
+
+ ${ionice} start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile ${PIDFILE} \
+ --exec /usr/sbin/preload -- \
+ -l ${PRELOAD_LOGFILE:-/var/log/preload.log} \
+ -V ${PRELOAD_VERBOSITY:-1} \
+ -n ${PRELOAD_NICE:-15} \
+ -s ${PRELOAD_STATEFILE:-""} \
+ ${PRELOAD_OPTS} -f \
+ && break
+ done
+
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping preload (this may take a while)"
+ start-stop-daemon --stop --retry 120 --quiet --pidfile ${PIDFILE}
+ eend ${?}
+}
diff --git a/sys-apps/preload/metadata.xml b/sys-apps/preload/metadata.xml
new file mode 100644
index 000000000000..140f503ea594
--- /dev/null
+++ b/sys-apps/preload/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription> preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times. </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">preload</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/preload/preload-0.6.4-r3.ebuild b/sys-apps/preload/preload-0.6.4-r3.ebuild
new file mode 100644
index 000000000000..0a88e6470aff
--- /dev/null
+++ b/sys-apps/preload/preload-0.6.4-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils autotools
+
+DESCRIPTION="Adaptive readahead daemon"
+HOMEPAGE="https://sourceforge.net/projects/preload/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="vanilla"
+
+WANT_AUTOCONF="2.56"
+
+RDEPEND=">=dev-libs/glib-2.6:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-apps/help2man"
+
+src_prepare() {
+ epatch "${FILESDIR}"/00-patch-configure.diff
+ epatch "${FILESDIR}"/02-patch-preload_conf.diff
+ epatch "${FILESDIR}"/02-patch-preload_sysconfig.diff
+ epatch "${FILESDIR}"/${PN}-0.6.4-use-help2man-as-usual.patch
+ epatch "${FILESDIR}"/${PN}-0.6.4-use-make-dependencies.patch
+ use vanilla || epatch "${FILESDIR}"/000{1,2,3}-*.patch
+ cat "${FILESDIR}"/preload-0.6.4.init.in-r2 > preload.init.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --localstatedir=/var
+}
+
+src_install() {
+ default
+
+ # Remove log and state file from image or they will be
+ # truncated during merge
+ rm "${ED}"/var/lib/preload/preload.state || die "cleanup failed"
+ rm "${ED}"/var/log/preload.log || die "cleanup failed"
+ keepdir /var/lib/preload
+ keepdir /var/log
+}
+
+pkg_postinst() {
+ if [ "$(rc-config list default | grep preload)" = "" ] ; then
+ elog "You probably want to add preload to the default runlevel like so:"
+ elog "# rc-update add preload default"
+ fi
+
+ if has_version sys-fs/e4rat; then
+ elog "It appears you have sys-fs/e4rat installed. This may"
+ elog "has negative effects on it. You may want to disable preload"
+ elog "when using sys-fs/e4rat."
+ elog "http://e4rat.sourceforge.net/wiki/index.php/Main_Page#Debian.2FUbuntu"
+
+ fi
+}
diff --git a/sys-apps/progress/Manifest b/sys-apps/progress/Manifest
new file mode 100644
index 000000000000..65aab31c1990
--- /dev/null
+++ b/sys-apps/progress/Manifest
@@ -0,0 +1,4 @@
+DIST progress-0.13.tar.gz 57959 SHA256 160cb6156a0b8df32a3944f3dcecba956ae3e5579e91d53c9d7417bc4956718c SHA512 789e188e60137412f3ab0f47c82a969066eb1c312711982a4a77a28b1b334055a233b12d4840653a80ac6339e66f8c120e0312889369bbdc71fa10661e7c407e WHIRLPOOL 3cb04ba5f7be18d0ab2302863c9419c5852dd67f954a385a94134c599fda590d9ed1c1bcf7190be28bdcd8edfd9c3a49c59aac56f6f3a2f393b33ebebc67fe0b
+EBUILD progress-0.13.ebuild 614 SHA256 aa266963bfd2ff432d5eea99c99e87dc4839d8ad0d99d1eebd1e43340aa88edd SHA512 8c3855fc8fffffb11fd4d2caa66e150f02827792cc7bd4efa247380e3d920df4d2df83e7a127000c4ac77a23155fab19e7a1116c6c3f03d373aac3732c102f28 WHIRLPOOL efa838aa68ab9f21d76136620a9fcb0ae4f0541b6d2c9bb119b02430554caf686392765aa93435b66e0e6594af3ad7ca150a6ea15a5943a940328666a5e815d4
+MISC ChangeLog 810 SHA256 993b5c76598aa157a234151ab5cad25bb734282ff90fcda7977985199a89b6cc SHA512 d85a7a7873eb21d220fa6836fe5aa98835c11482305821945e3d514f3ec475df1843c9fbcb5420a6e885ec66637fc9f2e77745aa5ad5769e2b8f0989b364e42b WHIRLPOOL 136c226a343a331676d23f79f2ae9c5f29d13cde9405b6378521da17343784c118544892d5a3fa88991b11782e3b1cddfee04d6bd510c2b4a7c3fc979e764fde
+MISC metadata.xml 335 SHA256 84e41b13acd237c4ce472b9b9024525c6723cca750bdc4de38936a251f0f5c8a SHA512 903ec46393a006768a24ebf7be7fed66b5ce5eb1db5c68f29feda30e9d79812ff4ca9303b2ad00def4ffe4e4f1f31e1faa6ef4bf868059459beb026331a3232b WHIRLPOOL afcbda43e9c423ad673c2cbf3c99b45cecf8e73fe010ad7a7eb4633200fc38251ec9764fb4bb1739d6364b86c3ef287f8abaf74dab33b592b896d7bae2c21c83
diff --git a/sys-apps/progress/metadata.xml b/sys-apps/progress/metadata.xml
new file mode 100644
index 000000000000..9ccea8ae20b9
--- /dev/null
+++ b/sys-apps/progress/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 type="person">
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Xfennec/cv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/progress/progress-0.13.ebuild b/sys-apps/progress/progress-0.13.ebuild
new file mode 100644
index 000000000000..c63203a9bfcc
--- /dev/null
+++ b/sys-apps/progress/progress-0.13.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Coreutils Viewer: show progress for cp, rm, dd, and so forth"
+HOMEPAGE="https://github.com/Xfennec/progress"
+SRC_URI="${HOMEPAGE}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-g ::' \
+ Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ emake PREFIX="${D}/${EPREFIX}/usr" install
+ dodoc README.md
+}
diff --git a/sys-apps/proot/Manifest b/sys-apps/proot/Manifest
new file mode 100644
index 000000000000..f7575b03384a
--- /dev/null
+++ b/sys-apps/proot/Manifest
@@ -0,0 +1,17 @@
+AUX proot-2.3.1-lib-paths-fix.patch 700 SHA256 e85bcf46445a09eaa124a8446e41f9ade9367030761dfc0a9028778c36ee3703 SHA512 90c5b6fa8d9e98de79d2c1344508a82be22ccc334cfcf8b6d60a2004a445a1c683fa538dd57958ba6491e26a1997fcfa8daa44f3a8001424470c85ece56c34a9 WHIRLPOOL 2fa6f9017bb7c2972199e84e1abc7c54f7b5bfbe987eac5fb7e38741a89c9f822a83a4da49a54c61c6279407746c120d8aac0b48627d0387cc333347508d6f36
+AUX proot-3.2.1-makefile.patch 327 SHA256 65c4a51860444d37fd633486cb53a34f9630ed143d1b28f681c82905dc6ee463 SHA512 8c1614b5c47ffddbbf59f1a47d60d7fa43c03a31612a1b8c699c8ea9c0a4f319ab326bb713e0c0dc6bcb8d7b38282a181e89f7429c7aaccc7340da0769235a57 WHIRLPOOL bc94159a67f0b67f11d475b29764251ad77a60a8d6c9c33bc85c7eb4de9540eaaefdbf92425c57a9028bdd87933e5945c88bfe06b52aba267d8fd63f98b0609c
+AUX proot-3.2.2-build-care.patch 630 SHA256 81052a0b2aa34251da73e7d599f6fbdc06a42cd422975be1b7c3a613e725d734 SHA512 394d647a9b5054ca31b7c18a0993adb9d811123cc54fb9f9ea5560016562260966e61f73f3290697af1dc141482dd75d3bb4cbb7c84995af58e246f8977169b6 WHIRLPOOL 5d0f5540acdcf816d7b07a7d9a596184e21f50b5424c4f4e67556ef00eaa8bc4b2184d41b11e437dc56d8d747972a16002ed9ce573e24c58a02d1a58b01fa457
+AUX proot-4.0.1-argv.patch 3833 SHA256 84a85c26d9f8d0843de31a92fd436e1ef2f4f4c5928193efb1d832f302a3d8e2 SHA512 d0be9f636ecfd75fef3987d2ebb4c693aa134371e2fee6d975373ac89b0da79ad017301c388b4893667101db405f98d54a8de2cc851413356b1616337d274a14 WHIRLPOOL ed3da73ec05975eea8279f882f6632737f0ef7d4a2097bcffe4ba60758da02d952a42e96e6c313fa4963d79630c9304c72d3b0f76b9ce4bf036baebe19163737
+DIST proot-3.2.2.tar.gz 171047 SHA256 481296465027c48de8b8779c4cdad57948c765139f2a17b25590068b8d21a111 SHA512 baf8df06a463978f0faf36f9d81935d6583b99b7e8c54b8ac330478ed92bb3a5d5cd624e028247c50bb9bc6fbe1300c5736a38c0aff250b23614aa52f922dfdd WHIRLPOOL 426c1b2ee6f6ee9ecc3f0b056d3baaf5269c894c302449dca263a1fe45c94d2e76bc07592fd88b9556554550653495fe1ce81e5021b1487e65239026fd23b962
+DIST proot-4.0.1.tar.gz 218732 SHA256 fbb92835f6d4f4cf0560709a852bdb2880611d3b0398b65e9036fabe9857645e SHA512 df6ea412856268af65ed5fd3ede8ae099c70e9b08d7875e3e2d8e44e9d4288de93e3844aa361db0b7b579b68b5e7a983989ec0742a6d31d7bef889f739db2158 WHIRLPOOL 640dde65a3b2f24777e292a90c35ff9489fa508054bf8a7752b5e5adbdb25c9fc17d300ebb344473194942b4bf60bdaab5f2ccd743a4bab0798d629573cec6df
+DIST proot-4.0.3.tar.gz 222716 SHA256 743e253c11d737ddaa0904774b3a9a9f01b5a22778b65076437282ffdc7638cb SHA512 1c74219d44ea79a4573c6dd21a5b62df8e93522886cadb1175044b782f40a711193af348763663d24ab634fbe13b67264f0bff061a980947810e38850d0133f8 WHIRLPOOL ffc6088c65cbe535c465e9839df34fa45eb6986a766f1ec86dbf6b655363817b3e0c21bd5863537797da4a91eb770d9e9267321f13715a7597173613a73117ee
+DIST proot-5.0.0.tar.gz 250005 SHA256 e3f4f38132416e0306fe8e7e225f037e1630665231c65a659969f7c0555483a7 SHA512 0617142d5bfe40329c12f5cbe3c850d01b82f10a8b44d63acb64e7e880af652fb60d05610fb91ce317353986eb30f031d82114661e5d58a38696d242ccd366ee WHIRLPOOL f2027f953046ed84e9095f599d4b414a5ec0c6b91544a66ebeaaaa5e48359dc44f91823aae237227f90a682b2c8290e718198ec74dfd9d7f74404b154f0ffc1f
+DIST proot-5.1.0.tar.gz 253251 SHA256 50fcb882662b2de3e64e603b68d1af75e920d480191a49e11c0cb63d50040386 SHA512 26be26d405a8bcbe94377c3e9c18a571e4b61e3074f0716b0db3517d147d9d4a07c80f7312171cf9580ac7748e72e688efaf1b8e4a0ca3bfc31c802aa351346f WHIRLPOOL 0642496dc5adba8e3e08bfc0c994fa173bfcfaa4b17c4f0586498fbbc62b06afaaa98156bd4ea95530a88b5d436cdf4acb66cced9bff428515c1bd3b3317f19a
+EBUILD proot-3.2.2-r1.ebuild 1675 SHA256 b70311babab5c7d88e3554d6a2246b3d9dffd728e8e1bfdad09522904455ae51 SHA512 0b15670f67c14e86cd3af2238412d8a3d2c86a252d3228666497633096344eed528da23e6701ae06fb1f9190e0a3fc8f2f8493535b11369eea203a54cdc5bd5a WHIRLPOOL 7008599d597c60456447807ed348df9ae306c0ca65a3e9058577dba75f55540f61e12f54c7ccc05ee647bf7c7979a582916b915a431ca62bc151823800793c51
+EBUILD proot-4.0.1.ebuild 1616 SHA256 1fc3fa469eaf1b7fe644870c4fbd046d7e9f206ba26426a38f7cd40e04b12137 SHA512 8a6b2da2143283965926b722a661fdf820da7f868a347667c0d7e8ffd00e0dee2d9085861358accceb0e4461eb52f114b6e944ba8ab2adea937a43eb33eaed17 WHIRLPOOL 727884e2c9556a663006e8993a5d68a2835afd335114d9f21672e9617384f61d72b993f793707c8315739767ceb2bb0efa2c42a77dee96607110bdc43967478a
+EBUILD proot-4.0.3.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+EBUILD proot-5.0.0.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+EBUILD proot-5.1.0.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+MISC ChangeLog 2829 SHA256 d618aa3eb0f48c7822b5d692a41a45437e2f91e903b47997aa764362938c2ce1 SHA512 05e7b30979f185749a967a022c313e16f5d9749dd3c8904b9cd057643f69e926e434418232ddb367c7e8fffbc4052298edc4d5a31577f0318a74660f750e2d02 WHIRLPOOL 17d7a30f1f369747d5bdc0dc7b51fc5e80faf6810df21f2c41f37587974ba468eb7715f31c5328df9fe91a61bd17ff0f72be83aa0db631422f7b444b2d79565f
+MISC ChangeLog-2015 2611 SHA256 07cc0af09ec5c26ee4b0cabed5f34e1abd0a87adb1e147418e2f559851a911c3 SHA512 4c82b1191100b08cbcf02d9ae21f1c24f8f750621479609ed8b6c2501bf7b568476a197556bec2eb123c73b1c3a73f8a1ca90d7c768c9e436b2e66731adaed49 WHIRLPOOL e0652c1d648af0f952213ff8e74a416be181797109589513c4907fce410f5c42d4bc72a57fbad47dba6df7a60b9d7aefe1d5b3a001ae30ac442545a31ff1e389
+MISC metadata.xml 969 SHA256 f3d911f9783e3f57c67a1ebb7d342726faf839199713e812700500a8ab94648f SHA512 447fb399976f554931c6983af60c33567518fa21e40ef4b1732c9e7615dcf9796ab8bc1356b84eef947455f8e25111bdee0dfc5025d686fe978aa6f6e7343145 WHIRLPOOL 840f2849e5c49614432966e271a9570ef7acef9c6701fc063ae588a92e9ba347783759f485e7a07b90d0e3f80b45a7a25605df055d21dc63d3357179dc9d5032
diff --git a/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch b/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch
new file mode 100644
index 000000000000..43c0d03d978a
--- /dev/null
+++ b/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch
@@ -0,0 +1,19 @@
+--- src/execve/ldso.c 2013-01-23 16:22:37.870287856 +0400
++++ src/execve/ldso.c 2013-01-23 16:31:40.219283675 +0400
+@@ -285,16 +285,10 @@
+ /* 6. /lib, /usr/lib + /usr/local/lib */
+ if (IS_CLASS32(elf_header))
+ status = add_host_ldso_paths(host_ldso_paths,
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
+- "/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:"
+-#endif
+ "/lib32:/usr/lib32:/usr/local/lib32"
+ ":/lib:/usr/lib:/usr/local/lib");
+ else
+ status = add_host_ldso_paths(host_ldso_paths,
+-#if defined(ARCH_X86_64)
+- "/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:"
+-#endif
+ "/lib64:/usr/lib64:/usr/local/lib64"
+ ":/lib:/usr/lib:/usr/local/lib");
+ if (status < 0)
diff --git a/sys-apps/proot/files/proot-3.2.1-makefile.patch b/sys-apps/proot/files/proot-3.2.1-makefile.patch
new file mode 100644
index 000000000000..854c48ef0817
--- /dev/null
+++ b/sys-apps/proot/files/proot-3.2.1-makefile.patch
@@ -0,0 +1,11 @@
+--- src/GNUmakefile.orig 2013-12-06 10:47:18.554784621 +0400
++++ src/GNUmakefile 2013-12-06 10:47:43.129785804 +0400
+@@ -9,7 +9,7 @@
+ CC = gcc
+ LD = $(CC)
+ CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I. -I$(VPATH)
+-CFLAGS += -Wall -Wextra -O2
++CFLAGS += -Wall -Wextra
+ LDFLAGS += -ltalloc
+
+ OBJECTS = \
diff --git a/sys-apps/proot/files/proot-3.2.2-build-care.patch b/sys-apps/proot/files/proot-3.2.2-build-care.patch
new file mode 100644
index 000000000000..c52a39cf787b
--- /dev/null
+++ b/sys-apps/proot/files/proot-3.2.2-build-care.patch
@@ -0,0 +1,20 @@
+Skip check for building care, patch by Patrick Lauer <patrick AT gentoo.org>
+
+--- src/GNUmakefile 2014-02-25 16:42:04.336863622 +0800
++++ src/GNUmakefile.new 2014-02-25 16:42:26.063050467 +0800
+@@ -54,15 +54,6 @@
+ all: proot
+
+ ######################################################################
+-# Sanity checks
+-
+-ifneq (,$(findstring care,$(MAKECMDGOALS)))
+-ifneq ($(CARE_BUILD_ENV),ok)
+-$(error care is supposed to be built with: http://build.reproducible.io)
+-endif
+-endif
+-
+-######################################################################
+ # Beautified output
+
+ quiet_GEN = @echo " GEN $@"; $(GEN)
diff --git a/sys-apps/proot/files/proot-4.0.1-argv.patch b/sys-apps/proot/files/proot-4.0.1-argv.patch
new file mode 100644
index 000000000000..df580563458c
--- /dev/null
+++ b/sys-apps/proot/files/proot-4.0.1-argv.patch
@@ -0,0 +1,125 @@
+commit 520fa3601c36dd0a3c84e310bd2a1189259000bd
+Author: Cédric VINCENT <cedric.vincent@st.com>
+Date: Thu Aug 7 14:29:37 2014 +0200
+
+ Don't dereference argv[0] when launching a script through a symlink.
+
+ Reported-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+ Ref: https://bugs.gentoo.org/show_bug.cgi?id=517496
+
+ Also, don't complain about non-regular or non-executable files that
+ are not explicitely candidates.
+
+diff --git a/src/path/path.c b/src/path/path.c
+index 4225876..ecdef70 100644
+--- a/src/path/path.c
++++ b/src/path/path.c
+@@ -219,17 +219,21 @@ int which(Tracee *tracee, const char *paths, char host_path[PATH_MAX], char *con
+ /* Is the command available without any $PATH look-up? */
+ status = realpath2(tracee, host_path, command, true);
+ if (status == 0 && stat(host_path, &statr) == 0) {
+- if (!S_ISREG(statr.st_mode)) {
++ if (is_explicit && !S_ISREG(statr.st_mode)) {
+ notice(tracee, ERROR, USER, "'%s' is not a regular file", command);
+ return -EACCES;
+ }
+
+- if ((statr.st_mode & S_IXUSR) == 0) {
++ if (is_explicit && (statr.st_mode & S_IXUSR) == 0) {
+ notice(tracee, ERROR, USER, "'%s' is not executable", command);
+ return -EACCES;
+ }
+
+ found = true;
++
++ /* Don't dereference the final component to preserve
++ * argv0 in case it is a symlink to script. */
++ (void) realpath2(tracee, host_path, command, false);
+ }
+ else
+ found = false;
+@@ -274,8 +278,12 @@ int which(Tracee *tracee, const char *paths, char host_path[PATH_MAX], char *con
+ if (status == 0
+ && stat(host_path, &statr) == 0
+ && S_ISREG(statr.st_mode)
+- && (statr.st_mode & S_IXUSR) != 0)
+- return 0;
++ && (statr.st_mode & S_IXUSR) != 0) {
++ /* Don't dereference the final component to preserve
++ * argv0 in case it is a symlink to script. */
++ (void) realpath2(tracee, host_path, path, false);
++ return 0;
++ }
+ } while (*(cursor - 1) != '\0');
+
+ not_found:
+diff --git a/src/tracee/event.c b/src/tracee/event.c
+index 70668d6..5905c43 100644
+--- a/src/tracee/event.c
++++ b/src/tracee/event.c
+@@ -92,7 +92,7 @@ int launch_process(Tracee *tracee)
+ * guest rootfs. Note: Valgrind can't handle execve(2) on
+ * "foreign" binaries (ENOEXEC) but can handle execvp(3) on such
+ * binaries. */
+- execvp(tracee->exe, tracee->cmdline);
++ execv(tracee->exe, tracee->cmdline);
+ return -errno;
+
+ default: /* parent */
+diff --git a/tests/test-713b6910.sh b/tests/test-713b6910.sh
+new file mode 100644
+index 0000000..82e01fd
+--- /dev/null
++++ b/tests/test-713b6910.sh
+@@ -0,0 +1,51 @@
++if [ -z `which mcookie` ] || [ -z `which rm` ] || [ -z `which cat` ] || [ -z `which chmod` ] || [ -z `which ln` ] || [ -z `which grep` ] || [ -z `which mkdir` ] || [ ! -x ${ROOTFS}/bin/readlink ]; then
++ exit 125;
++fi
++
++######################################################################
++
++TMP1=/tmp/$(mcookie)
++TMP2=/tmp/$(mcookie)
++TMP3=/tmp/$(mcookie)
++TMP4=/tmp/$(mcookie)
++
++rm -fr ${TMP1} ${TMP2} ${TMP3} ${TMP4}
++
++######################################################################
++
++cat > ${TMP1} <<'EOF'
++#!/bin/sh
++echo $0
++EOF
++
++chmod +x ${TMP1}
++ln -s ${TMP1} ${TMP2}
++
++${PROOT} ${TMP2} | grep -v ${TMP1}
++${PROOT} ${TMP2} | grep ${TMP2}
++
++######################################################################
++
++mkdir -p ${TMP3}
++cd ${TMP3}
++
++ln -s $(which true) false
++! ${PROOT} false
++
++echo "#!$(which false)" > true
++chmod a-x true
++${PROOT} true
++
++######################################################################
++
++ln -s ${ROOTFS}/bin/readlink ${TMP4}
++
++TEST1=$(${PROOT} ${ROOTFS}/bin/readlink /proc/self/exe)
++TEST2=$(${PROOT} ${TMP4} /proc/self/exe)
++
++test "${TEST1}" = "${TEST2}"
++
++######################################################################
++
++cd /
++rm -fr ${TMP1} ${TMP2} ${TMP3} ${TMP4}
diff --git a/sys-apps/proot/metadata.xml b/sys-apps/proot/metadata.xml
new file mode 100644
index 000000000000..d2757b2e50de
--- /dev/null
+++ b/sys-apps/proot/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+ PRoot is a user-space implementation of chroot, mount --bind, and binfmt_misc.
+ This means that users don't need any privilege or setup to do things like: using an arbitrary directory as the new root filesystem,
+ making files accessible somewhere else in the filesystem hierarchy, or executing programs built for another CPU architecture
+ transparently through QEMU user-mode.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">cedric-vincent/PRoot</remote-id>
+ <maintainer>
+ <email>gentoo@reproducible.io</email>
+ <name>Cédric Vincent</name>
+ </maintainer>
+ </upstream>
+ <use>
+ <flag name="care">Build dynamic CARE binary (more info - http://reproducible.io/)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/proot/proot-3.2.2-r1.ebuild b/sys-apps/proot/proot-3.2.2-r1.ebuild
new file mode 100644
index 000000000000..ef14402f0834
--- /dev/null
+++ b/sys-apps/proot/proot-3.2.2-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils pax-utils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch" \
+ "${FILESDIR}/${P}-build-care.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(usex care "care" "" "" "")
+}
+
+src_install() {
+ if use care; then
+ # Workaround for bug #493416
+ pax-mark -Emp src/care
+ dobin src/care
+ fi
+ # Workaround for bug #493416
+ pax-mark -Emp src/proot
+
+ dobin src/proot
+ doman doc/proot.1
+ dodoc doc/*.txt doc/articles/*
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-4.0.1.ebuild b/sys-apps/proot/proot-4.0.1.ebuild
new file mode 100644
index 000000000000..33b2ca7192b2
--- /dev/null
+++ b/sys-apps/proot/proot-4.0.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch" \
+ "${FILESDIR}/${PN}-3.2.2-build-care.patch" \
+ "${FILESDIR}/${PN}-4.0.1-argv.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ use care && dobin src/care
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-4.0.3.ebuild b/sys-apps/proot/proot-4.0.3.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-4.0.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-5.0.0.ebuild b/sys-apps/proot/proot-5.0.0.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-5.0.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-5.1.0.ebuild b/sys-apps/proot/proot-5.1.0.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-5.1.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/pv/Manifest b/sys-apps/pv/Manifest
new file mode 100644
index 000000000000..451d59bce5da
--- /dev/null
+++ b/sys-apps/pv/Manifest
@@ -0,0 +1,7 @@
+DIST pv-1.6.0.tar.bz2 107723 SHA256 0ece824e0da27b384d11d1de371f20cafac465e038041adab57fcf4b5036ef8d SHA512 bd405901812ca50b910adbcf1d2c540dc0b8612f03687866734a79cfa5b5b8100024c18a1d1413c6613e1f2085989cbb77907da89bec7eda37cdeaa7597129d5 WHIRLPOOL 51312339fa1815a61f58fa0f49b0538289d0308b17c5d03c4c6a7e371052e9911d09cb7a9c1eb032b797a3f56eaa7e5dbfecaf6fb2c1faf3fd1b34c298782c1f
+DIST pv-1.6.6.tar.bz2 109220 SHA256 608ef935f7a377e1439c181c4fc188d247da10d51a19ef79bcdee5043b0973f1 SHA512 cc841b4bd00e4e8fcaed97da094ebac4a11af1c3f843ce5f73d0c3ab20aca29498c6b1a224c653d40127304d8269d96f413df66b980809e9278ff9544c834a26 WHIRLPOOL 0afb22c8fb84ed632ddf0657d0d8e2e054a08c16b14cf314b62b76a1afe79911b2c7133dc5ae7567c398305c9dd64d9dd8b2c9f97f4027faeac6d2ec32dfaabb
+EBUILD pv-1.6.0-r1.ebuild 1391 SHA256 4c94d2796c0b7597823ae423086fe226e4b2d08a95f8a1b2f564fb315faba638 SHA512 63861b0ffa75feca60f9c18b230999f6e24067d6a51124127b6251871ea3a024c4a74b551945c0c3150c70590968a2dfd05b5b8637dc47020b1e05742812599e WHIRLPOOL 9aea4119c22404b98032812d833527baf0b070d2eac372062c7f404870e4b8f99bdbaa6d164a3708322547ce0b5d83233d484ccb5b204c4605151632d5c59f8a
+EBUILD pv-1.6.6.ebuild 1411 SHA256 976c9c8195363f30a1b5f14d07c1ade42cfba80f7669a1b23aa6f62b0927757e SHA512 9899cc2a3459e7e7a1c5204a541e6512daf67d4d5c62d116d078e0bbc7c70cc51f724291eff5ee7da4d0319ecf1fcfe194f6cdadf212bb3d2db44fe574184406 WHIRLPOOL ea3410f80ffc91c5fdf31f9b4ed445a7cc1c24095251c9dd0fac4fa1539a6c31b7a6f19650667ed7eb87a02f201cab688bc1b919cacbb0ddbb326df0650affa1
+MISC ChangeLog 2533 SHA256 5ff542d682ebda5c9b6c0692c34c5e7b095d5fe77763bc870fad22a83df08960 SHA512 d00db5e42d3ee37081d5b05304e9469cde9c26d19c389c25093fd2bd1be2fa984ecf9db5ff0d49cfa75a7c6429cae280b240cbc1a4624245692a93ac6c49ce66 WHIRLPOOL e78eb00908b49964269daa6f1b93d194f7828a7f99db3ef21e8cd90cd3ef7490e19e9a20d37e7fc946a809ea321df3c351bd871aed6d555e298954547ca3e3e3
+MISC ChangeLog-2015 15934 SHA256 ccd9a4ff4622d4a221493c0b057c5ffde470082f4e1250b98aed259e976eac5a SHA512 95e937a14ca3442a5a4e5a8d40a27fbd274bcd58890ad177ce9669a95d1512cb497aa5491cf03f076603707c50a5a266407c8a83a482cd735e120c87ab420800 WHIRLPOOL 78c7c8ee2e6f55a4d34d9f995b959bce28240a51d2aee47502989c3f70247214c53dc10d21187149c0488ba780a82ac108ae683e1a2fc075b774b85bf61a83f2
+MISC metadata.xml 334 SHA256 0af2bdf2bf3fb34d7cda7f01bd8ffe38a4302df2da0ccf28e1be1bf7be987678 SHA512 ae252c205325a4937f8ab6c60c8be5a032ff8f11087b7a1fe737ed9c4fa6325b34dbcab9bc16467096de93baa330cec51909f72686cc4152d653fd1456333fb3 WHIRLPOOL fd85470603aea915be2cfeda3e86fe4f5e801b3cf1fb275a0608a7eeeca0568074528a68c39c50864d60ce9c89dfa98b0cbd1f0c6ed32a87d826ba1d9d889072
diff --git a/sys-apps/pv/metadata.xml b/sys-apps/pv/metadata.xml
new file mode 100644
index 000000000000..b9de93a595ea
--- /dev/null
+++ b/sys-apps/pv/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 type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">pipeviewer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/pv/pv-1.6.0-r1.ebuild b/sys-apps/pv/pv-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..1a443a659545
--- /dev/null
+++ b/sys-apps/pv/pv-1.6.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe"
+HOMEPAGE="http://www.ivarch.com/programs/pv.shtml"
+SRC_URI="http://www.ivarch.com/programs/sources/${P}.tar.bz2"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x86-solaris"
+IUSE="debug nls"
+
+PV_LINGUAS=( de fr pl pt )
+IUSE+=" ${PV_LINGUAS[@]/#/linguas_}"
+
+DOCS=( README doc/NEWS doc/TODO )
+
+pkg_setup() {
+ if use kernel_linux; then
+ CONFIG_CHECK="~SYSVIPC"
+ ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option."
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i configure -e 's|CFLAGS="-g -Wall"|:|g' || die
+ # These should produce the same end result (working `pv`).
+ sed -i \
+ -e 's:$(LD) $(LDFLAGS) -o:$(AR) rc:' \
+ autoconf/make/modules.mk~ || die
+}
+
+src_configure() {
+ tc-export AR
+ local lingua
+ for lingua in ${PV_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ sed -i configure -e "/ALL_LINGUAS=/s:${lingua}::g" || die
+ fi
+ done
+ econf $(use_enable debug debugging) $(use_enable nls)
+}
+
+src_test() {
+ sed -i -e 's:usleep 200000 || ::g' tests/019-remote-cksum || die
+ default
+}
diff --git a/sys-apps/pv/pv-1.6.6.ebuild b/sys-apps/pv/pv-1.6.6.ebuild
new file mode 100644
index 000000000000..b3b8222481a9
--- /dev/null
+++ b/sys-apps/pv/pv-1.6.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe"
+HOMEPAGE="http://www.ivarch.com/programs/pv.shtml"
+SRC_URI="http://www.ivarch.com/programs/sources/${P}.tar.bz2"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x86-solaris"
+IUSE="debug nls"
+
+PV_LINGUAS=( de fr pl pt )
+IUSE+=" ${PV_LINGUAS[@]/#/linguas_}"
+
+DOCS=( README doc/NEWS doc/TODO )
+
+pkg_setup() {
+ if use kernel_linux; then
+ CONFIG_CHECK="~SYSVIPC"
+ ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option."
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i configure -e 's|CFLAGS="-g -Wall"|:|g' || die
+
+ # These should produce the same end result (working `pv`).
+ sed -i \
+ -e 's:$(LD) $(LDFLAGS) -o:$(AR) rc:' \
+ autoconf/make/modules.mk~ || die
+}
+
+src_configure() {
+ tc-export AR
+ local lingua
+ for lingua in ${PV_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ sed -i configure -e "/ALL_LINGUAS=/s:${lingua}::g" || die
+ fi
+ done
+ econf $(use_enable debug debugging) $(use_enable nls)
+}
+
+src_test() {
+ sed -i -e 's:usleep 200000 || ::g' tests/019-remote-cksum || die
+ default
+}
diff --git a/sys-apps/pyrenamer/Manifest b/sys-apps/pyrenamer/Manifest
new file mode 100644
index 000000000000..1a839a0d2bed
--- /dev/null
+++ b/sys-apps/pyrenamer/Manifest
@@ -0,0 +1,5 @@
+DIST pyrenamer-0.6.0.tar.gz 255793 SHA256 57afbabd4814efa2378de9b6d84808986eb269bd54d13467f8cf20e0122dc92a SHA512 86bf38005c7f6e57546bb2aa7c2f52fd3ad98fb6500b73cc3ed911f221ff0f66262da8500e73ae7c759c5d725221b1226a63226bb37ead28a1ac47a7fdae7a10 WHIRLPOOL fa5ec1429f689c9395f1fba59668e225a7dba79d33410e01af646ff1b255c58caf8dcf4f6e2b72f911a34a923c774aaecbc9ee717dfd2e420fbba2367224739a
+EBUILD pyrenamer-0.6.0-r2.ebuild 831 SHA256 f243d9aae5a04b70e078b64936f7a73c8f24961939c5615e4dc5af98f685ae54 SHA512 07dd4c85455eaf77027c7c3d6d598db50ddd316c93f69b54621fda1748e4e624e32e4076bbf259ff708e71f8174de1f958a7636af8f722a0f71e9ecddc298c57 WHIRLPOOL 8ff6852ee8eaf9225939d6e993dd3b730e0d9720d66bbd2cabe66fc202f196d4551566552e7e04e993194fea0aa4bda83aa9bc8b96740201abd3b5efbc23e576
+MISC ChangeLog 2581 SHA256 d6e5d87e779dc2be026f7160e3f2e52aa266b517017f9010511a48f99748e9cb SHA512 e0ee0569484327c4ee90b92fb815e335d65954693a7c9505527efed72798f06f2125df216eaa33c5dd54e898833e9917769b20aebfb61fa169ca0b3d5dc1c907 WHIRLPOOL 5481e5c42f3eac4a596e7f229120376cf9c6a46a7b960b50e07a77ab7f86967faa6c6c772fdba0aa64f225c759c791480f195dd6c5012a79776cbfa061f8775d
+MISC ChangeLog-2015 1439 SHA256 c703a4f2c952a6dd93cd306bf82e57d5b8f8963e8661bcf0ce68702dc9b8725f SHA512 742154637cf93341cda79e839bb25f9214da71ea27244ae0a44c09d93df987f67ddb9e13446ca56f2b8acce2b26bd57472f4e9c07d0304faaf91bfddae85e372 WHIRLPOOL 73efdfb3a6816fad7b7607c36d9239e51303bf9b7c43df711f8c042182dfe7bea612468f4a79f5f48821704e5b3d74a1da564d082495eec4ad5b5da5ff9815f7
+MISC metadata.xml 323 SHA256 cc198cac20485fd9bb7a5d94a10b1c4a6d7e8ed0424f16dfefda1c7de807d52a SHA512 e86366c51a549dc1392716736f5939733e714fe2f30757032a7434e7cc5199dc6f37a0b652234ecb071f76b72a36df9af1854705c3616264806b1706b985a027 WHIRLPOOL eedca4750ff8f0a3df91b357df072ac370d97fe228b79e4d610e4a29472c92c7ea3a3c47345e9ddec3a037d2c9dd5cfd05408cf23af1b2b97d6be3d15b85a98d
diff --git a/sys-apps/pyrenamer/metadata.xml b/sys-apps/pyrenamer/metadata.xml
new file mode 100644
index 000000000000..dfcbe52e885e
--- /dev/null
+++ b/sys-apps/pyrenamer/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 type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+</maintainer>
+ <use>
+ <flag name="music">Enable support for renaming music</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/pyrenamer/pyrenamer-0.6.0-r2.ebuild b/sys-apps/pyrenamer/pyrenamer-0.6.0-r2.ebuild
new file mode 100644
index 000000000000..351029283fd5
--- /dev/null
+++ b/sys-apps/pyrenamer/pyrenamer-0.6.0-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 gnome2
+
+DESCRIPTION="Mass rename files"
+HOMEPAGE="http://www.infinicode.org/code/pyrenamer/"
+SRC_URI="http://www.infinicode.org/code/${PN}/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="music"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# TODO: Missing support for >=dev-python/eyeD3-0.7.x API that could
+# be used as alternative to app-misc/hachoir-metadata with || ( )
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/gconf-python[${PYTHON_USEDEP}]
+ music? ( app-misc/hachoir-metadata[${PYTHON_USEDEP}] )"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ python_fix_shebang .
+ gnome2_src_prepare
+}
diff --git a/sys-apps/qcontrol/Manifest b/sys-apps/qcontrol/Manifest
new file mode 100644
index 000000000000..20d06f2c027e
--- /dev/null
+++ b/sys-apps/qcontrol/Manifest
@@ -0,0 +1,9 @@
+AUX 0.4.2-Makefile.patch 706 SHA256 af1ad2aa6db4198c23d2b5a4643e97bf5526801af57d4f29bd45a1cdb18532a7 SHA512 c5f2066b6df7724f3eab33e2f8b93e1b981268863b7e9eec2ab0591fa00de4c9ee98566b0469c495ad04b27c977a06ed81afdfdeee6de687cd5382c7ca14a8e3 WHIRLPOOL cdb2500ea0817c311439a8b096f96dc9acd36bc9e7799dd54c883f412fe9decfcb1f557386fc220c8899651ce989e8b610ec0dc1038cd37222242bedbfd878cb
+AUX conf.d 133 SHA256 b25115ebda4ed6ccb5292efdc686d00e3bcacdb4dbb991d498d00c1c87fa548b SHA512 d2b0d1e75eb42c3be65065cb45efaeb3acece3f857cf77b5baf1db9d199d7676e42363ac4f84682e26f81da13ba700bb4f9fbb1b6d483c45a5864e87bc3f2db4 WHIRLPOOL 3c8433155531d03775425e1eb77738db17350cd9b45633f733ac8d1d19be8930517159a50dd7040d3be741445ab392b4e33456af9a0a9b09c02422979c3c6c98
+AUX init.d 2211 SHA256 2e5d58533de6be8a00d7ee5a4d3b2bee669be75b87a0515fd1949e1ddf8f17c6 SHA512 66c6c4f30e93f759ca7a9875e23ed82843d9cc728c14c7bc7fffee3fbbafefa57244155649986c547264f500a21d0099efd1195d1810b47370c8f77ed79e4dde WHIRLPOOL 1919f7735a284e5aa6bebafd4051748ccf19e201bec49a9b6ff6339fcfd96b4880251d4b1c9a33b40614ca5fb2056176c20e3c97b8f1770c4711201534bf6d86
+DIST qcontrol_0.4.2-6.diff.gz 11426 SHA256 11d45cebfe217a8bc0a0dbfc641fc098510c4b521cc83b993bd1fd493b834625 SHA512 ce450d04c72052c8e7ce0bf26d21d9942d3ea02b958b510efdf26d368ee69778eaf61bec2084c4d21cc1a5d281d1331e40b7bcaf388b4b59174a37ed037dd984 WHIRLPOOL 2d058db16afbb6b0a3b48bbc81887aad2aa0765e695544968ffa379026a9d38c06d2501133c3e49fef2f82bdb4c7a5d4b6907bdd2625c7ef489fdfab5c3562ee
+DIST qcontrol_0.4.2.orig.tar.gz 18344 SHA256 efe7311cdd460a51475d22f737540e7bb3c4303e5eba97b782d765c8f1e67055 SHA512 f132faff54833f11ae79622dc8e33b4e0f2516f7377633ff47a4ebe71335503c5e4892723c049b00888622ce059026cd97c6856b425b94163ec09887bd21e81e WHIRLPOOL 88e251dc4cd42a0f185a04742fbfe7d55d784322483c16c2b74593c20dd84a66b4937fe3f7e6b894c003f580df2fd896527e04b47fa6b2895dfc94a3b6e0ec47
+EBUILD qcontrol-0.4.2-r1.ebuild 1464 SHA256 969a90a421c72a6d0f20fa63170275cd71b053bc6a30f3cedd04a548d3ddfc2f SHA512 30c3015badece1cc6fff3769ce1cda6b91f5c1e640df2916d1c083228c63aba28c35ec059504f02ff0ca99df7a7ddd2592277f50afda70e1aef885b11ccacb16 WHIRLPOOL e2e9aec8c17a9b9458a75513545be5a32bf68e97e1032792d3daad6acc4212119d18ffb1c846b8dd6caf12b64e9fe439df1057cc17f0ad788ff0c1655daaf57c
+MISC ChangeLog 2744 SHA256 c3039248f722741398f0990a9a0f791fdf0af7600480cfb264b6292baa379421 SHA512 5334c3fe184a8ca20bb78ff65001b1c70d27720e84b7d142388033ce90bfc7253174678dfc77ccbcaf3cd423de601b1aec87f43f858902c66209f6b1fa249f28 WHIRLPOOL bb3aa76535f1adddeb6662a50439a9ee41e0dc22ddc679ea13e356b59645869425ac1bcd0af3ce987e4cf806894c8baefa2f6fec55e471ddfcb94a58aa7b0235
+MISC ChangeLog-2015 957 SHA256 75e1fc93f461d10b7f38fb1e50f83b8f0ad92b6ac15a48c8927b34b576b85856 SHA512 7d1fe7ef937803f13ddf2a8d136ae6824b02732fdeec5af328a95d23657848b42ca19cb5e1a95cab1e37ad7eaee328cfe188848560f12619bc6a7a895794bdd4 WHIRLPOOL 4aafb51ccee35630bda05f450009b3cf66c902642526ecb39bda834a00f3bf0678723e3bbf98ab64e7a8ffed857db0679b5829dc58c6b6917306df7586252203
+MISC metadata.xml 367 SHA256 bf52934f65c1ed50922e23fc257aa7400b17432b3e1cd3dd4cd2809d7da62a3a SHA512 ee0131a33df4a79331dfe2a7485d71b05f8f386d3b6ce0b26ab76a7c9f8d9b20efb931fda54d499feb9dd6c3feba34299cf8943fbac2ffea2076e634d49087de WHIRLPOOL de5dbd1af733f6c925ad91a42d6e6729141ea11d2b58e7a25d59fc286b6150d4a3346db9a08329cffcc2c4a131c30e1490d2a105d30847a3865d56609cde24a9
diff --git a/sys-apps/qcontrol/files/0.4.2-Makefile.patch b/sys-apps/qcontrol/files/0.4.2-Makefile.patch
new file mode 100644
index 000000000000..ad3701c549eb
--- /dev/null
+++ b/sys-apps/qcontrol/files/0.4.2-Makefile.patch
@@ -0,0 +1,22 @@
+--- Makefile.orig 2011-04-02 20:44:05.021252507 +0200
++++ Makefile 2011-04-02 20:45:21.751248966 +0200
+@@ -1,5 +1,4 @@
+-CFLAGS=-Os -Wall -I /usr/include/lua5.1
+-LDFLAGS=-llua5.1 -lpthread
++LDFLAGS=-llua -lpthread
+ LDFLAGS_UDEB=-lpthread -lm -ldl
+ SOURCES=qcontrol.c ts209.c ts219.c ts409.c ts41x.c evdev.c
+ OBJECTS=$(SOURCES:.c=.o)
+@@ -8,10 +7,10 @@
+ all: $(SOURCES) $(EXECUTABLE) qcontrol.udeb
+
+ $(EXECUTABLE): $(OBJECTS)
+- $(CC) $(LDFLAGS) $(OBJECTS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
+
+ qcontrol.udeb: $(OBJECTS)
+- $(CC) $(LDFLAGS_UDEB) $(OBJECTS) /usr/lib/liblua5.1.a -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS_UDEB) $(OBJECTS) /usr/lib/liblua.a -o $@
+
+ .cpp.o:
+ $(CC) $(CFLAGS) $< -o $@
diff --git a/sys-apps/qcontrol/files/conf.d b/sys-apps/qcontrol/files/conf.d
new file mode 100644
index 000000000000..6a732c48e2ff
--- /dev/null
+++ b/sys-apps/qcontrol/files/conf.d
@@ -0,0 +1,5 @@
+# /etc/conf.d/qcontrol: config file for /etc/init.d/qcontrol
+
+# Set to "no" to suppress the sounding of the buzzer
+#SOUND_BUZZER=no
+
diff --git a/sys-apps/qcontrol/files/init.d b/sys-apps/qcontrol/files/init.d
new file mode 100644
index 000000000000..1a2ea38eb4d4
--- /dev/null
+++ b/sys-apps/qcontrol/files/init.d
@@ -0,0 +1,74 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Header: $
+
+# Init script from Debian
+
+depend() {
+ after local
+}
+
+start() {
+ einfo "System boot completed"
+ if [ ! -c /dev/input/by-path/platform-gpio-keys-event- ]; then
+ eerror "qcontrol error: gpio_keys device not available"
+ return 1
+ fi
+ start-stop-daemon --start --quiet --background --pidfile /var/run/qcontrol.pid --make-pidfile --exec /usr/sbin/qcontrol -- -d
+ # Change status led to show green
+ device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
+ head -n1 | sed "s/^[^:]*: //")
+ case $device in
+ "QNAP TS-109/TS-209" | "QNAP TS-119/TS-219")
+ qcontrol statusled greenon || true
+ qcontrol powerled on || true
+ if [ "$SOUND_BUZZER" != no ]; then
+ qcontrol buzzer short || true
+ fi
+ ;;
+ "QNAP TS-409" | "QNAP TS-41x")
+ qcontrol statusled greenon || true
+ if [ "$SOUND_BUZZER" != no ]; then
+ qcontrol buzzer short || true
+ fi
+ ;;
+ *)
+ eerror "qcontrol error: device is not supported"
+ ;;
+ esac
+ start-stop-daemon --stop --quiet --pidfile /var/run/qcontrol.pid --name qcontrol
+ rm /var/run/qcontrol.sock
+}
+
+stop() {
+ einfo "Shutting down system"
+ if [ ! -c /dev/input/by-path/platform-gpio-keys-event- ]; then
+ eerror "qcontrol error: gpio_keys device not available"
+ return 1
+ fi
+ start-stop-daemon --start --quiet --background --pidfile /var/run/qcontrol.pid --make-pidfile --exec /usr/sbin/qcontrol -- -d
+ # Change status led to show red
+ device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
+ head -n1 | sed "s/^[^:]*: //")
+ case $device in
+ "QNAP TS-109/TS-209" | "QNAP TS-119/TS-219")
+ qcontrol statusled rednon || true
+ qcontrol powerled 1hz || true
+ if [ "$SOUND_BUZZER" != no ]; then
+ qcontrol buzzer short || true
+ fi
+ ;;
+ "QNAP TS-409" | "QNAP TS-41x")
+ qcontrol statusled redon || true
+ if [ "$SOUND_BUZZER" != no ]; then
+ qcontrol buzzer short || true
+ fi
+ ;;
+ *)
+ eerror "qcontrol error: device is not supported"
+ ;;
+ esac
+ start-stop-daemon --stop --quiet --pidfile /var/run/qcontrol.pid --name qcontrol
+ rm /var/run/qcontrol.sock
+}
diff --git a/sys-apps/qcontrol/metadata.xml b/sys-apps/qcontrol/metadata.xml
new file mode 100644
index 000000000000..fae618337e50
--- /dev/null
+++ b/sys-apps/qcontrol/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 type="project">
+ <email>arm@gentoo.org</email>
+ <name>Gentoo Linux ARM Development</name>
+</maintainer>
+<maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild
new file mode 100644
index 000000000000..bdda8dda130e
--- /dev/null
+++ b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Allows to send commands to some microcontrollers, for example to change leds or sound a buzzer"
+HOMEPAGE="http://qnap.nas-central.org/index.php/PIC_Control_Software"
+SRC_URI="mirror://debian/pool/main/q/qcontrol/${P/-/_}.orig.tar.gz
+ mirror://debian/pool/main/q/qcontrol/${P/-/_}-6.diff.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="arm"
+IUSE=""
+
+DEPEND=">=dev-lang/lua-5.1"
+RDEPEND="${DEPEND}"
+
+src_unpack () {
+ unpack ${A}
+ cd "${WORKDIR}"
+
+ epatch *.diff
+
+ cd "${S}"
+ epatch debian/patches/*.patch
+
+ epatch "${FILESDIR}"/${PV}-Makefile.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" qcontrol || die "emake failed"
+}
+
+src_install() {
+ dosbin qcontrol
+ doman "${S}"/debian/qcontrol.1
+
+ insinto /etc/qcontrol
+ doins "${S}"/debian/configs/*.lua
+
+ newconfd "${FILESDIR}"/conf.d qcontrol
+ newinitd "${FILESDIR}"/init.d qcontrol
+}
+
+pkg_postinst() {
+ device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
+ head -n1 | sed "s/^[^:]*: //")
+ case $device in
+ "QNAP TS-109/TS-209")
+ dosym /etc/qcontrol/ts209.lua /etc/qcontrol.conf ;;
+ "QNAP TS-119/TS-219")
+ dosym /etc/qcontrol/ts219.lua /etc/qcontrol.conf ;;
+ "QNAP TS-409")
+ dosym /etc/qcontrol/ts409.lua /etc/qcontrol.conf ;;
+ "QNAP TS-41x")
+ dosym /etc/qcontrol/ts41x.lua /etc/qcontrol.conf ;;
+ *)
+ ewarn "Your device is unsupported" ;;
+ esac
+}
diff --git a/sys-apps/qdirstat/Manifest b/sys-apps/qdirstat/Manifest
new file mode 100644
index 000000000000..eebab05601ab
--- /dev/null
+++ b/sys-apps/qdirstat/Manifest
@@ -0,0 +1,4 @@
+DIST qdirstat-1.4.tar.gz 2534241 SHA256 7f9a0a7304c55ebfad1e50c7747ba762b07068f48304b3d3919bdb65ee037999 SHA512 5711a78297f4224e4471ac14d8e42ee9ac746cc31315ff894dafa1db578eff4ff2a5c62edc525a49c523154a0de402f878200d96601c7924bf0273f0eac9ab74 WHIRLPOOL 4c0be459086411f649cae9d92caebe99a7bb608d6add3a5f34f2c5caa6e63b90a13e54e55c1e7f4a1c95dfc8e228c366bf4f2e2928881a9464226dbc754597cf
+EBUILD qdirstat-1.4.ebuild 750 SHA256 eacb8cdd1647466db6cd3e2af8493e19f997ed5ae31df1bf5d3d32378b39da37 SHA512 017e639e30a60f021541c547863bc2cdad0b70cb2b62981de9a2cc1a64c32a406f2b71691f0a59898d521ef128acb10d7a2e633a5bde16941711b01cf8aee75f WHIRLPOOL 48b81ef8940b5b3c029fea2bca9686e548434127f7e2a6e482912ee5fd28dea38f5894bd00b380ff6b1fb80863dc9a9facecf4d3f5686d22e1cd9371c50df29d
+MISC ChangeLog 1169 SHA256 61104f2bd818d95c94948cb137dd64e8008500dafbfcbc2284a2237667925dfc SHA512 57284bcca5300d897a36fef45bff307450ae55896a89139e39b47fe729ef05548986e0d7e752deb079eebfbfc3bbddce1698ae818c440dbeaeb559d5309a222f WHIRLPOOL 0853028cf0e68a59ca20f3db1ba03972558bc3f8dd92b7c7c87fb754969a86cb4b56f941e01fe53881c581db77cd505cc18e5e9a1d9f2557681e6bf60ee2f4d3
+MISC metadata.xml 934 SHA256 77551574e356bf1b673882d07e27d2c654296f2e25ba3ef1ea38a6160f138ed0 SHA512 8938ec964160af4bbf95642b132aa745c25124ed1f1ac12c64396ee2fa0c559033d992bdff5f1ea2c7db6a7c24a30605d43b72ce9fe2080ea6545ebe53f048c7 WHIRLPOOL 3d42c7c966472f09c7bc6837d0247f6f0640cd9b3bdef452f84694be079c013449e0d09f528c80e6cac1a478c07421804d78fdb4e3977711a0e60cc0f1e29642
diff --git a/sys-apps/qdirstat/metadata.xml b/sys-apps/qdirstat/metadata.xml
new file mode 100644
index 000000000000..dbe7f3c9c196
--- /dev/null
+++ b/sys-apps/qdirstat/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>j.scruggs@gmail.com</email>
+ <name>Jonathan Scruggs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ Qt-based directory statistics: KDirStat without any KDE -- from
+ the author of the original KDirStat.
+
+ QDirStat is a graphical application to show where your disk space
+ has gone and to help you to clean it up.
+
+ This is a Qt-only port of the old Qt3/KDE3-based KDirStat, now
+ based on the latest Qt 5. It does not need any KDE libs or
+ infrastructure. It runs on every X11-based desktop on Linux, BSD
+ and other Unix-like systems.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">shundhammer/qdirstat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/qdirstat/qdirstat-1.4.ebuild b/sys-apps/qdirstat/qdirstat-1.4.ebuild
new file mode 100644
index 000000000000..c7c59c77ebdb
--- /dev/null
+++ b/sys-apps/qdirstat/qdirstat-1.4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit gnome2-utils qmake-utils xdg-utils
+
+DESCRIPTION="Qt app to show where your disk space has gone and to help you clean it up"
+HOMEPAGE="https://github.com/shundhammer/qdirstat"
+SRC_URI="https://github.com/shundhammer/qdirstat/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-qt/qtgui:5
+ dev-qt/qtcore:5
+ dev-qt/qtwidgets:5"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake5
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}" install
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
diff --git a/sys-apps/qdiskusage/Manifest b/sys-apps/qdiskusage/Manifest
new file mode 100644
index 000000000000..491a3abdff10
--- /dev/null
+++ b/sys-apps/qdiskusage/Manifest
@@ -0,0 +1,5 @@
+DIST 107012-QDiskUsage-1.0.4.zip 79148 SHA256 4b6e28af09a4ea45c698da9f5128856be837feea4c898b9338b957bc8a8288df SHA512 ca3350823aa0f9e620f3ea782f4dcfaf6dcd91dcfe87a3e017f1a6d34165c134d095be135a6f365210c4c0a7b1b9d0b04ffbcd4d9ac1051731e19fa305b88520 WHIRLPOOL 1f5119fb743f6f791d1fee68d03e1266fed9d7fbb22e0f35f6a8c184a47afeb088c8372a761fd254da7ec8650fae580849d3ed43f6a249d1eea1ac47673e14c3
+EBUILD qdiskusage-1.0.4.ebuild 720 SHA256 491ba2a4e57e5a18638488e4bd1f78c354cc6e079ccbd7df97ce0a0412ec3066 SHA512 5f795099d0fd2e92f2cf6710ccd5d39118935801ccb1a8c05073482447b3e2a1d7765d65db95a5ec94f5a895b70c4463b440e0bcce9f3241a65b0931b1c826b9 WHIRLPOOL ce9ea62ea2ec16e98567c3ca07a55d894df652e3f542bd5e3c37ff98d148b62b48139273838c6896a7d4c659baed20e1948d4c672240459dc845b233e7e69bfa
+MISC ChangeLog 2829 SHA256 ea86ce8d3a228473407b168bea20f59e5da1148057ef01653fc4852921440673 SHA512 8d9eb37d46f0d711131d3f4f7b0dcde067f8cc80a464f1c064d6db58938ca4776c505d199247af2493d3c9cfd5eea31c7fc729f3352906dc9f6c3e445c15efe2 WHIRLPOOL 86889afd81d8261a14ffd7c1a68885ea140c7c24304dc28fb8aca41a366e49de0d3338f07937aea14e237f25b879559b19ef0bc5c7a6878c869d3381769ef973
+MISC ChangeLog-2015 1883 SHA256 e14388d0fce2ea5038825a26278ad38df5a7c28cfa9d9a0350f68d8cb536b7d1 SHA512 9f12a693944fcd728128ff7ffff3f1dbe7aeeb55cde1c4f2eef4de1bd05b049d61f9aeea5d09cbec2f8cc6256d4b867f025e436a44ab131bbe5f999e636a4476 WHIRLPOOL 79d76c4e6dd8e3b48106eaee766ab9c4e1f45fa529a3bb5d22c587e94442a7c227399793fbdc197cc49d45d5b1a405218111fc3ffcbf945241eaf47099e9b26b
+MISC metadata.xml 243 SHA256 40d70720dcef790c8b2af5864ea1d289f0a661e0db1e89d2c6a8a5c0d2ea971e SHA512 fc40891d1d0c8526f7ac87f25fbdb63e927494f972894e0006fe85eab8eef60ae79761cbc42febd202172da040283a2daa432908bf02ef83d27454660f20e72b WHIRLPOOL 0c09ba0a23280f3d5b0bd26ca7e3f3fe8e43302780afbcb20218599b9b8f426485b8aba8c97f1507f9adab1688d78cb132792cb4d13e130454c393b69fc662f4
diff --git a/sys-apps/qdiskusage/metadata.xml b/sys-apps/qdiskusage/metadata.xml
new file mode 100644
index 000000000000..32fe1293e9a9
--- /dev/null
+++ b/sys-apps/qdiskusage/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/qdiskusage/qdiskusage-1.0.4.ebuild b/sys-apps/qdiskusage/qdiskusage-1.0.4.ebuild
new file mode 100644
index 000000000000..c32f8bb028b6
--- /dev/null
+++ b/sys-apps/qdiskusage/qdiskusage-1.0.4.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+inherit eutils qt4-r2
+
+MY_PN="QDiskUsage"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Qt4 Graphical Disk Usage Analyzer"
+HOMEPAGE="http://www.qt-apps.org/content/show.php/QDiskUsage?content=107012"
+SRC_URI="http://qt-apps.org/CONTENT/content-files/107012-${MY_P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="dev-qt/qtgui:4"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install(){
+ newicon icon.png ${PN}.png || die "newicon failed"
+ newbin ${MY_PN} ${PN} || die "newbin failed"
+ dodoc README || die "dodoc failed"
+ make_desktop_entry ${PN} "QDiskUsage" ${PN}
+}
diff --git a/sys-apps/qingy/Manifest b/sys-apps/qingy/Manifest
new file mode 100644
index 000000000000..5d668ac7c310
--- /dev/null
+++ b/sys-apps/qingy/Manifest
@@ -0,0 +1,12 @@
+AUX 50qingy-gentoo.el 241 SHA256 66f0e2a345fb7f6cc3bf29879a6014165de11bbd9d1e921ea843780234cd9af3 SHA512 b4ee1fc4b2337647f775bdf38688c93bebad4c4beb5bc4e457c45da014c03832771c5d01112af4a3c3d55c5852b09fdfcde08519b0d506f978bc772c2afd991e WHIRLPOOL 2f066782c5af0876ac55dc8c77743a5a153127901a049e78ceb3a8f3242734b1ea4525b3b1e82af146915aa4bf32d6c35b1731e36de34260b687f8cf867d55da
+AUX qingy-1.0.0-tinfo.patch 1573 SHA256 f61c69bc7823e360b26b04a0ca16d7001dca8dcd07c932911298a79286296f27 SHA512 a37b92e3e4da0e87687461df7644fbf1b3adef81ecdee411073bb0593875c493cc110e9925c8131b99bc97d143a811190e5e6d03cc4992a18396135936697fcc WHIRLPOOL dfcfef8438856099d58d3e2c17504dfa8634bd8215f2f32a13bf1c1c0cfc4983d71a2865401fd62977c80cd0a873b103c634bad9f377f03a1a50a69d087ceee3
+AUX qingy-logrotate 75 SHA256 bf30d9b8a6cf3bf15ff22cd29134e06174fee0ce2aaef4ee383d3c14fe859e44 SHA512 3b22cac09fc7394a4a4aa5a786309378cd769c351eed1e2813b84230c6ec74f7c30bfec9c6a03682b2ad5063a30bbdaac679f9e07bab2cee75ec73dd137aca01 WHIRLPOOL 05e72c85f7c4a700aec7b440b157ec2b619324eebe9def716bb5e92f57da7958d2a75b2518d1d1531cadecfb165dad33fa98dec00f9b42c2e4997058fb72b793
+AUX qingy_at.service 391 SHA256 f61475c16726206c068200b3d9b8fa168d8f9d59825e1103a66bee4bc065837e SHA512 bbbfaea129f8b0ff89a66873f3d2ee2b774ce6f59adfb5efdd7bbaaf7d602a6933e888b68b73bf378864799088bf7f4e645785cbc16c51621bf2fed11a4cc55a WHIRLPOOL 1ec73c4e2b0f63c2d54d3add88372dc6f2f3c3854d086632b9fb2d478036b28b98fa89ffcbbf2b3a98a9fca0c63d8b678760f0be76c8d2d58a1fd20e58b4482a
+DIST qingy-1.0.0-consolekit-pam.patch.gz 9263 SHA256 ef1ccfb66e65d78aec93b8356e23f18a78641f2eba775af8acdd83305f7975e4 SHA512 e69743173ea0ff27265dca789f4203b58c271ec6acfeac1ffd87738a3a693f1393778ca70be5d0c8a3e461edfa350047cef3941d8e85679f7c930f3b63c1eeb1 WHIRLPOOL 038c5e77984d451305c522c72a009e235b11d599e8aa79314290c7973322a72d8cf8f8e146813907f4e6d1d76e502c958bddf3a81385c7019dfd987f908efd6c
+DIST qingy-1.0.0-screensavers.patch.gz 17372 SHA256 586e1d6e615252d7870789ed2a8438ca3a97efa5ecd71806811aa81dde7c5841 SHA512 563a146acf92d7a4757abd8f537ca912882501d4ef407a3f0ce44f2b334da2872edafe8b489acfc6e4fdafefb60992f8ca13c322047311e5ff16eed091827d64 WHIRLPOOL 18389cf6666e1ae8a4df700c8ee9bec1ed3eec8e3d4342ea837bc45ffccbaeaa53686961732882707e92df59c010f2a8c9ee5a33737b8eb86a6c5eb9742b6b75
+DIST qingy-1.0.0.tar.bz2 611393 SHA256 de4b4b398d5ba81ab2544729864676a04ddc6ae818b357ee09a8770293740cd3 SHA512 79af86de9d1530f429f21a32ef6542987f62f6b5461fe5ba6553deb4fcf36d5746cdb3c6ae8d7c08ace298dd4304cb90a11203239ac7f5c2093c3c5b80f34b54 WHIRLPOOL 6282fc649d2be91adae544732cef0e10ca77083b18c9cd2fdd3c6369061f797903e98bac34e01095ed7e060a3f12845d6d5523f3ff9e7979c3105dc8388aa24c
+DIST qingy-gentoo-theme-2.1.tar.bz2 150702 SHA256 1b770255577ed3fc89e1cfdf5019990bf4deffab26201e095084dd5bd97bf093 SHA512 4e5e35f3f14c831e3a383e846018cd39b07761c7f1977f94923ae8889383a3cc5f63cd061b85174c076488e697018ff58bdac3ddaeefab352a3058700a130abd WHIRLPOOL 2ef7e404a1e14229c895cb96de0dd3749e0e9837b884f2f16b71a741140586a56f52a85d2e942bc2963af2ea174d134d811e72655995285f827a16df9c671147
+EBUILD qingy-1.0.0-r2.ebuild 4075 SHA256 07e3e1ed28d9a364314cfa355e62a5f3eee1c7dac3e2472c85902fea6d87e074 SHA512 cc848a116d0dbbb728f385a0c6e3119c618a7584e10d41580cc35fcea2cfeb22a2fe1633cc8adc712a4b08a8fdfa2f5a26e118e7ffd342db02f22cb242776d39 WHIRLPOOL 18b99503ba3a31efd4365885cc6d403da6ec54f1cc64628b142c3bac00d020e6878f5142a6eb95cbd80e6bfd32d7977e6b094a7afecea559391e9d6034c69523
+MISC ChangeLog 3425 SHA256 a5dae1cc5263cd2aeff731c2b78fed32c33ac9978b31947fecbb56397bec2946 SHA512 69aad8a62132b30e1ee8f769879ddcdd8f3336cee37371fc521e178544c7b07beb61e2bf7aadd1833c253ae80d158f5a9b29ab1d5802ba7e2f20223f6fb59dfa WHIRLPOOL 3c00529deca263739e305a68e1010756917d358ca7568037e2e66a17bb5dc183e236921f7d6b3a1143bf2e753ca450630d4596b121a7858715ee42e233e9238e
+MISC ChangeLog-2015 12353 SHA256 47776572cb4cd8f22bfc2a9baafab203a1252b0622ad0125e1696c22b702e643 SHA512 1e1a0e8e564cf34c3082eb12baaaf775283471e6a54d8e5470fa4209c4bf05b3e1d583499fffcc4e5f180ba247a2e346b6c9a12237cd375bc9d4598bc55b2fb8 WHIRLPOOL c2d2553b6cbda46487785326ee953224f83b2415ed7194a8b355113809f4d1c6a2ecac9768699cf43033ed65709b4f2adb49c7408f4bf7d6ff6b19cc758f2efc
+MISC metadata.xml 520 SHA256 972eb2691e68f2ac4d74b67485dd4917b0791433f082c76897ced9938d11e39f SHA512 675beb88cd98c9e5e9c94b3292bf82aa91b1c17178b0718b0fc282202127b8fc0d58062f31ed4cd927aac4614dd3f975594a60fb293f3359e788cc8a2d1b8485 WHIRLPOOL b8e85e9a468a3747632bee15084990624ab78930dceb4ff084bc9c0252021e09d41a14c6faf99c9da1dca16f19d17e26686ba2b28e20c3138c1e9aa6a28a2056
diff --git a/sys-apps/qingy/files/50qingy-gentoo.el b/sys-apps/qingy/files/50qingy-gentoo.el
new file mode 100644
index 000000000000..bcb814bda0b7
--- /dev/null
+++ b/sys-apps/qingy/files/50qingy-gentoo.el
@@ -0,0 +1,7 @@
+
+;; qingy site initialisation file
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'qingy-mode "qingy-mode"
+ "Major mode for editing Qingy settings and themes" t)
+(add-to-list 'auto-mode-alist '("/\\(?:settings\\|theme\\)$" . qingy-mode))
diff --git a/sys-apps/qingy/files/qingy-1.0.0-tinfo.patch b/sys-apps/qingy/files/qingy-1.0.0-tinfo.patch
new file mode 100644
index 000000000000..f752996c92f5
--- /dev/null
+++ b/sys-apps/qingy/files/qingy-1.0.0-tinfo.patch
@@ -0,0 +1,42 @@
+Use ncurses.pc to get Libs: instead of using AC_CHECK_LIB because ncurses can be configured
+to have separate termcap library called libtinfo; and we need both -ltinfo and -lncurses for
+linking since symbols are used from both
+
+http://bugs.gentoo.org/459650
+
+--- configure.in
++++ configure.in
+@@ -125,12 +125,7 @@
+ # End compile emacs stuff
+
+ # Check for ncurses
+- HEADERS="curses.h term.h"
+- NCURSESLIB=""
+- AC_CHECK_HEADERS([$HEADERS],,[AC_MSG_ERROR([$HEADERS_ERROR_MESSAGE])],)
+- AC_CHECK_LIB(ncurses, setupterm, [NCURSESLIB="-lncurses"],[AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])] , )
+- AC_CHECK_LIB(ncurses, tputs, [NCURSESLIB="-lncurses"],[AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])] , )
+- AC_SUBST(NCURSESLIB)
++ PKG_CHECK_MODULES(NCURSES, ncurses, [], [AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])])
+ # End check for ncurses
+
+ # Check for PAM support
+--- src/libraries/Makefile.am
++++ src/libraries/Makefile.am
+@@ -4,7 +4,7 @@
+ INCLUDES = -I../.. -I../
+ BUILT_SOURCES = parse_settings.h
+
+-AM_CFLAGS = -DSETTINGS_DIR=\"$(sysconfdir)/qingy\" -DSBINDIR=\"$(sbindir)/\"
++AM_CFLAGS = -DSETTINGS_DIR=\"$(sysconfdir)/qingy\" -DSBINDIR=\"$(sbindir)/\" $(NCURSES_CFLAGS)
+
+ if !WANT_STATIC
+ pkglib_LTLIBRARIES = libqingy.la
+@@ -35,7 +35,7 @@
+ EXTRA_libqingy_la_SOURCES = \
+ crypto_openssl.c crypto_libgcrypt.c crypto.h
+
+-libqingy_la_LIBADD = @PASSWDLIB@ @CRYPTOLIB@ @NCURSESLIB@ @XLIBS@
++libqingy_la_LIBADD = @PASSWDLIB@ @CRYPTOLIB@ @XLIBS@ $(NCURSES_LIBS)
+ libqingy_la_LDFLAGS = -release @VERSION@
+
+ libqingy_static_la_SOURCES = $(libqingy_la_SOURCES)
diff --git a/sys-apps/qingy/files/qingy-logrotate b/sys-apps/qingy/files/qingy-logrotate
new file mode 100644
index 000000000000..f4acb30bc657
--- /dev/null
+++ b/sys-apps/qingy/files/qingy-logrotate
@@ -0,0 +1,6 @@
+/var/log/qingy.log {
+ missingok
+ rotate 5
+ size 100k
+ weekly
+}
diff --git a/sys-apps/qingy/files/qingy_at.service b/sys-apps/qingy/files/qingy_at.service
new file mode 100644
index 000000000000..b321d224a152
--- /dev/null
+++ b/sys-apps/qingy/files/qingy_at.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Qingy on %I
+Documentation=info:qingy
+After=systemd-user-sessions.service plymouth-quit-wait.service
+
+[Service]
+Environment=TERM=linux
+ExecStart=/sbin/qingy %I -n
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+KillMode=process
+IgnoreSIGPIPE=no
+
+[Install]
+Alias=getty.target.wants/qingy@tty1.service
diff --git a/sys-apps/qingy/metadata.xml b/sys-apps/qingy/metadata.xml
new file mode 100644
index 000000000000..a5a65bc91a7e
--- /dev/null
+++ b/sys-apps/qingy/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="consolekit">Enable native consolekit support</flag>
+ <flag name="opensslcrypt">Encrypt communications between qingy and its GUI using <pkg>dev-libs/openssl</pkg></flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">qingy</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/qingy/qingy-1.0.0-r2.ebuild b/sys-apps/qingy/qingy-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..e07aaae10bf2
--- /dev/null
+++ b/sys-apps/qingy/qingy-1.0.0-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools elisp-common eutils pam systemd
+
+GENTOO_THEME_VERSION=2.1
+
+DESCRIPTION="a DirectFB getty replacement"
+HOMEPAGE="http://qingy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ mirror://gentoo/${PN}-gentoo-theme-${GENTOO_THEME_VERSION}.tar.bz2
+ https://dev.gentoo.org/~gienah/2big4tree/sys-apps/qingy/${P}-screensavers.patch.gz
+ https://dev.gentoo.org/~gienah/2big4tree/sys-apps/qingy/${P}-consolekit-pam.patch.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="consolekit crypt directfb emacs gpm opensslcrypt pam static X"
+
+RDEPEND=">=sys-libs/ncurses-5.7-r7:=
+ opensslcrypt? ( dev-libs/openssl:0= )
+ crypt? ( >=dev-libs/libgcrypt-1.2.1:0= )
+ directfb? ( >=dev-libs/DirectFB-1.4.2[fbcon,jpeg,png,truetype] )
+ emacs? ( virtual/emacs )
+ pam? ( >=sys-libs/pam-0.75-r11 )
+ X? (
+ x11-libs/libX11:=
+ x11-libs/libXScrnSaver:=
+ x11-proto/scrnsaverproto
+ )"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4.1.4-r1
+ virtual/pkgconfig"
+RDEPEND="${RDEPEND}
+ consolekit? (
+ sys-auth/consolekit
+ sys-apps/dbus )
+ pam? ( sys-auth/pambase )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ # bug #359637 and bug #462634 - fixes from upstream
+ epatch "${DISTDIR}"/${P}-screensavers.patch.gz
+ # bug #372675 - fix from upstream
+ epatch "${DISTDIR}"/${P}-consolekit-pam.patch.gz
+ epatch_user #510738
+ eautoreconf
+}
+
+src_configure() {
+ local crypto_support="--disable-crypto"
+ local emacs_support="--disable-emacs --without-lispdir"
+
+ if use crypt && use opensslcrypt; then
+ echo
+ ewarn "You can have openssl or libgcrypt as a crypto library, not both."
+ ewarn "Using libgcrypt now..."
+ echo
+ fi
+
+ use emacs && emacs_support="--enable-emacs --with-lispdir=${SITELISP}/${PN}"
+ use opensslcrypt && crypto_support="--enable-crypto=openssl"
+ use crypt && crypto_support="--enable-crypto=libgcrypt"
+ econf \
+ --sbindir=/sbin \
+ --disable-optimizations \
+ $(use_enable consolekit) \
+ $(use_enable pam) \
+ $(use_enable static static-build) \
+ $(use_enable gpm gpm-lock) \
+ $(use_enable X x-support) \
+ $(use_enable directfb DirectFB-support ) \
+ ${crypto_support} \
+ ${emacs_support}
+}
+
+src_install() {
+ # Copy documentation manually as make install only installs info files
+ # INSTALL is left because it contains also configuration informations
+ dodoc AUTHORS ChangeLog INSTALL NEWS README THANKS TODO
+
+ # Install the program
+ emake DESTDIR="${D}" install
+
+ # Set the settings file umask to 600, in case somebody
+ # wants to make use of the autologin feature
+ /bin/chmod 600 "${D}"/etc/qingy/settings
+
+ # Install Gentoo theme
+ dodir /usr/share/${PN}/themes/gentoo
+ cp "${WORKDIR}"/gentoo/* "${D}"/usr/share/${PN}/themes/gentoo || die
+
+ # Alter config file so that it uses our theme
+ sed -i 's/theme = "default"/theme = "gentoo"/' "${D}"/etc/${PN}/settings
+
+ # Install log rotation policy
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}-logrotate ${PN}
+
+ use emacs && elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+
+ rm "${D}"/etc/pam.d/qingy
+ pamd_mimic system-local-login qingy auth account password session
+
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+}
+
+pkg_postinst() {
+ einfo "In order to use qingy you must first edit your /etc/inittab"
+ einfo "Check the documentation at ${HOMEPAGE}"
+ einfo "for instructions on how to do that."
+ echo
+ einfo "Also, make sure to adjust qingy settings file (/etc/qingy/settings)"
+ einfo "to your preferences/machine configuration..."
+
+ if use crypt; then
+ echo
+ einfo "You will have to create a key pair using 'qingy-keygen'"
+ echo
+ ewarn "Note that sometimes a generated key-pair may pass the internal tests"
+ ewarn "but fail to work properly. You will get a 'regenerate your keys'"
+ ewarn "message. If this is your case, please remove /etc/qingy/public_key"
+ ewarn "and /etc/qingy/private_key and run qingy-keygen again..."
+ fi
+
+ use emacs && echo && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-apps/raidutils/Manifest b/sys-apps/raidutils/Manifest
new file mode 100644
index 000000000000..88aaa38f8dd2
--- /dev/null
+++ b/sys-apps/raidutils/Manifest
@@ -0,0 +1,7 @@
+AUX raidutils-0.0.6-gcc45.patch 300 SHA256 b840a8cd023517902637a103ae6f28481c473a8f773138abd896ecd8afa37958 SHA512 a6074f7b70d536232f6b78fb39e886fd28b8c189c3827a491a664339fa9e8d47e72e3ab9f712216539692894ed21f5683b3b9d9e4ebedc132057018c148887bf WHIRLPOOL dbccf42039d8018e813ca07b0a6cb157412f23e14214343ff56d46d5c7937feccd258d75d0ba046d43aefd297ae7d542ab0acf3ad5762a135f583698d1ebb64c
+DIST raidutils-0.0.6.tar.bz2 968898 SHA256 ac350f60b9635d952a7a5664effa59e418ada9ad3deba66d46e6e0a094966d65 SHA512 8d6fc74a4fc20188a00b3ea8b91048ee9108bb772efd4b1e5d141f4d674cbb9a04a76f9a414f4ae74d09d58d672e2f7aa8c1476715bf5aa94c3ec7eeb105f892 WHIRLPOOL 43dae37e8bb956bc1235397b9c7e5088edde379042f962bbdc2528007192595a1f8aaab1d88d36cff45332ae48b199c3bf2cbc238a1c3932511b4c4d159d0873
+DIST raidutils-rpm.patch.bz2 6809 SHA256 adf851e55aac1a0acf7fd47dac36bbf76396154fa6f52fb98615473139d77651 SHA512 3d0f9e4b3722e26de835dedf86e00f2f7b56a885d5ac677bc1f0fc5009f5bafaf4c3ce67ae6abf1007973edb9273acea97e40e4d5bd3244d097c60c4c39b0f91 WHIRLPOOL 0d34038e4f0f5980782af6d37deed6ef19a1ec5c6d32fd9788760400ba528fe229775436f43930f85bbf3e261e15466fe61bb17d38346312b51bfff7be6fd420
+EBUILD raidutils-0.0.6-r2.ebuild 853 SHA256 985465ec0baf86d9fa32e675f552788179e7bf00355c31c694f95a21a901e980 SHA512 1cbf62f5d0e1dca686b9bab71e48abb867d03e4f96d160d3eecb914fc22fab47facd78f019ae7acd056b690b27b1cd7b958b1a8c9f8bf1af0a7ade8bb40e9de2 WHIRLPOOL 161e2e782e17b07d206a244c830952c1236714d3b2c58e7b610421bf1491c68e1191e3c1d0b51a663b47b7edfec8f3065aa2a9253888738ba66306635a8664de
+MISC ChangeLog 2965 SHA256 9060cd37a4810748d58fb1bb6783bbaa8bd529875ffefb6ee011fae5880e5a58 SHA512 29ba3b6eef172ebf9ac9d589180a57155d0b3e5f52d1d39d1fce18a2c64294bb45ea88f1d441222a712a5d89c1196e906ac866e6251d097b31d83adea5ed12e4 WHIRLPOOL 0af679ca9add9fd8bc0b40533205be7b44ce85b172f6c508ceec4b9da7f0cc9f55c9bec66ba6cf33ec099a8adf66026edea83e07897065c09af3260706ec2d77
+MISC ChangeLog-2015 2719 SHA256 b3c3078d2d5a0d861a2ba34a56b0a3a2c5756f6cecf6cd30ab2117988a821dc6 SHA512 96e36055660fd1ab3bb2019a83b15c960912eee5e85b086a45ffe1edd2f2f1f0d9e303998a2a950bdacac01e7190866c6a91d743272351d0bee6a616e9af05c7 WHIRLPOOL 6d88319f533a487bb09380a1dfd71e0a6b4010dc6a088e2a4a5586b088ee2c6d573821370c3f48c13a349824d0d52d59ca255bc217480729bd8f7e97c1b8e25c
+MISC metadata.xml 560 SHA256 e9bd889267f188317a886ddcca0035fa980e2592846c7982ee480c13f7c743c0 SHA512 2071cb86949806ec07a26ec136b2b6107e12534d0b2f01a98bc011bbe82147d051fbed47f29d32b653a639ae7e85362647b4af0f7db170e07464d6575c56db2a WHIRLPOOL b2d09e03d5b6f1e4c48e191e99dc3d611089343e30f5628c35619f5e0277281b276f0f7e99e796829978ca2a9c4e5af102fecef8e8391cf8b18b1e74bf9166bc
diff --git a/sys-apps/raidutils/files/raidutils-0.0.6-gcc45.patch b/sys-apps/raidutils/files/raidutils-0.0.6-gcc45.patch
new file mode 100644
index 000000000000..91c52270ee40
--- /dev/null
+++ b/sys-apps/raidutils/files/raidutils-0.0.6-gcc45.patch
@@ -0,0 +1,14 @@
+--- raidutil/flash.cpp
++++ raidutil/flash.cpp
+@@ -177,11 +177,7 @@
+ {
+ ENTER( "Flash::Flash(" );
+
+-#if defined _DPT_UNIXWARE || defined _DPT_SCO
+ Flash( right.source, right.Resync, right.hba_Num );
+-#else
+- Flash::Flash( right.source, right.Resync, right.hba_Num );
+-#endif
+
+ EXIT();
+ }
diff --git a/sys-apps/raidutils/metadata.xml b/sys-apps/raidutils/metadata.xml
new file mode 100644
index 000000000000..b509cb5f1c84
--- /dev/null
+++ b/sys-apps/raidutils/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-needed -->
+ <longdescription>
+ Suite of programs to manage some I2O-compliant RAID controllers; in
+ particular some Adaptec hardware; to be very specific those using the
+ dpt_i2o kernel module or CONFIG_SCSI_DPT_I2O driver. One can create/delete a
+ RAID array, add/remove a hot spare drive to/from an array, activate/silence
+ the alarm, and query array/disk status.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/raidutils/raidutils-0.0.6-r2.ebuild b/sys-apps/raidutils/raidutils-0.0.6-r2.ebuild
new file mode 100644
index 000000000000..77bb29a70db8
--- /dev/null
+++ b/sys-apps/raidutils/raidutils-0.0.6-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Utilities to manage i2o/dtp RAID controllers"
+HOMEPAGE="http://i2o.shadowconnect.com/"
+# http://cvs.fedoraproject.org/viewvc/rpms/raidutils/devel/
+SRC_URI="http://i2o.shadowconnect.com/raidutils/${P}.tar.bz2
+ mirror://gentoo/${PN}-rpm.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+DEPEND=">=sys-kernel/linux-headers-2.6"
+RDEPEND=""
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}-rpm.patch \
+ "${FILESDIR}"/${P}-gcc45.patch
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS
+ find "${D}" -name '*.la' -delete
+}
diff --git a/sys-apps/razercfg/Manifest b/sys-apps/razercfg/Manifest
new file mode 100644
index 000000000000..c862a5a050db
--- /dev/null
+++ b/sys-apps/razercfg/Manifest
@@ -0,0 +1,11 @@
+AUX razercfg-0.39-unit-variables.patch 712 SHA256 41b515c8d79d73e768b09b10f8affc6d59f51f3b13a06f816d0e9af200ed6a07 SHA512 c34c7f314420a1597b0c5aa44f6ae3b55e212d1bb9c00498f5e1525390bb2e62d68ebbe5dabc48468e79f0fe8f2f30b81459a5e9cc0b3e837239d39230fd7238 WHIRLPOOL ccf042f695db5e16dddcc09139eab0bd02fe01c777a45bca9c07057dd270a494d1b5ab6f486d899766f7191def150a5a565ac6d5f78197abfdde514025a99668
+AUX razerd.init.d-r1 448 SHA256 1692cc4e52fa4d8232d022cd68fc14f8b714a0aebd63aaa1a396b77ea051ea75 SHA512 4228b7d18c546e6c8d840c3ff3b4e3690e89e70bab156e3f6646c9fb68c23adb0ec0ca40fbbe28d3c768c75a0b27deec2890df26566e40c02e4dbe7f4890530a WHIRLPOOL bec0898ba58559365804caff0ec68de9eb8a2c227a1a8752c62e504877bf80772162616f915fe1923181e3f27fee9e35abc02e66a2410570e0a63d73dfc3d228
+AUX razerd.init.d-r2 447 SHA256 1c1c7b547fa1fbcb29ecc6379d10b1824d332f2b050d8c4fb4d8529f4f3fa820 SHA512 8c9e307bd2a76086f9fa462f04019c9c840681232f1833292d4f64ed030ce83392cf039919f9f830abb4b61e0be65e2637c6bfdb7551291f68626c876ec92af1 WHIRLPOOL 5522850950a4fd13181de0ed66e1aedfc5b1dd58d00ca5f2fa10971cf05f18278519ff5c088b20059f034c11c97715188c745db888eb61b71dafbe040bba6529
+DIST razercfg-0.23.tar.bz2 69425 SHA256 44bdc48588c504a937d811e84a0ecb054e35d3e2e4980d7d76b3ea8c2f0d1b43 SHA512 79c795870efa960b42abc70710b4bebe793acb9e732943207ca4b34d35ba926af4877993db888829dbacedbe327324fba0ab2ef82ced1d653b4aee23e154fd8b WHIRLPOOL 11c57842daeb241d19b3546db0c4b3a98e59b565176f89227dd159f31b3037ce08130014dc35ae4db5dc81744a94a405252787b6a42c67129857f81f6eb0411c
+DIST razercfg-0.39.tar.bz2 178142 SHA256 b8554a529fc02a05f515b56d335c326d660058d6fcdb2e3c4929b9b9dedf614d SHA512 165fee898a01b7f0086eb6705ef9f24fd8b8836025c071f7851a493181b8d193d0db70fc1731a8586de1f1c795aab4d20bb4ee8526b612c66ba3c434c6e10137 WHIRLPOOL eb5122226ad79594ea9396e141b9f7d98b52298fc09f06bcdd92be53101af6430a56864aa285c10b52ae004f734385c9155ba2d995ad661f764855e4a724ae05
+EBUILD razercfg-0.23.ebuild 1394 SHA256 b788cc096a579263bad6dfdad2dd74109f0402b7d4fb65a5c10ee9e5328a3bde SHA512 052e0c1258382a048f8d85e86788b9b69cdf7bc620c8d0434558fb55f3066564b4d9a7cbdf48b9b37f5a30f8f9a4dd4047df3954058d77823a7a3b1837e2e6af WHIRLPOOL 749cccdf78026b214a46e3225fc72c3b4cb39f4b3544b1554dccd0596615be13e02553ef193cf00849a57c77adc87e407485b53ef467be322a5391e5d94834b7
+EBUILD razercfg-0.39-r1.ebuild 2183 SHA256 8d933046d0ed94a2f9d6e752bb6ad3a549a8749d5c5f4ec7465097427a087c18 SHA512 3384e569c0fd3f20ea61aee8e65ba0c27a3af312be94bca6ed27ea4c1179a3ea0cd1b9431d5d1b8f997d5b4f99a6e74285a5fcf2fc50bdc9780e8cd08dfde260 WHIRLPOOL f378fdbe2a2dbd5a9e206d3df75d7561fea1c5388911d75400b31b8fd75e6ac0c25af577dc80385728af0a8ff9ef4a7d677c679636126b553d751652c28c8789
+EBUILD razercfg-0.39.ebuild 2068 SHA256 07e2ac08e11c7e18f7fc4b99ee18e9f46c21965a4ea32161f4a4eb526317277e SHA512 62d71180d95d67250ca7e44005274b62f561ceedd4bf5b71792513772c013a308b16e848f1396d6b6c25e513d17f2ca83d79f778721b2cd9cff4a13d6ae29ac3 WHIRLPOOL 882b028add037f52c043a073224c96c53ca87c9750cf59862e07a97725d09d67aec9049048cc07488b7ce20aa3abd209f55bccbf9093738478732b30681a8841
+MISC ChangeLog 3832 SHA256 57ee1f1ffcc4cdb9abdb1120eb3957f07dfa61a7c6aabed4581be81d94a47ed9 SHA512 082de68d14c326f154e24d44797a99f1e87fe529835bf206884b18bc863dcae468714f9b5ebd201e227dc953edd9f46fc03b4516226f250179e1575407599b96 WHIRLPOOL e12280e98e90a7e25ea2ae65fb186964573c5c66a389c57075e0cf1c41ea0bff2054472b67274d1fac5c994595ae4424487bdac056aa04fe1d5cc91391c53cc5
+MISC ChangeLog-2015 5436 SHA256 67f3a8e880c8437bc02b29b6e92c54829ee706e78cfb05da7beebce86a3dae88 SHA512 1fd478ee79b3f6d93fd5d858692b3d17f9d5a33e9d8b1d6ef894259bcc4c31bdbfdccc09adbc8263f7cae5fc54fadb12b9d4ed50c0987563f10c476810db32af WHIRLPOOL c521303e2152bd17358d79539d319168dc0894b8407a2571d0df78b31dac11d45ebf4716c8e50515786f20c076e1430ef1e3f78db653a49742ef7869f5f511dc
+MISC metadata.xml 886 SHA256 65366b8ec3bc391cb2e31a56cd9e455d24118134d047b320a676f7022fb39a3a SHA512 2076e37094d47851ca979be25c695bdb40533d1adfa81520992a1a6c88191c5cfac2e61f0ad2ee50efef0b7fcfe3b0aca993275aa1c05559d09644d37f466599 WHIRLPOOL 95fa33be10979d95123d4b765397f8de58c9229180900f9f82de479c0fb84a3bcc4a9f6031659517a004a418f91733849ddf80673a650365c3b509f447d4588d
diff --git a/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch b/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch
new file mode 100644
index 000000000000..c17e529c49f2
--- /dev/null
+++ b/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch
@@ -0,0 +1,21 @@
+We set these variables in the ebuild, so don't override them.
+
+--- a/scripts/cmake.global
++++ b/scripts/cmake.global
+@@ -27,16 +27,6 @@
+ include_directories(AFTER ${LIBUSB_INCLUDE_PATH})
+ set(CMAKE_REQUIRED_INCLUDES "${LIBUSB_INCLUDE_PATH};${CMAKE_REQUIRED_INCLUDES}")
+
+-execute_process(COMMAND pkg-config --variable=systemdsystemunitdir systemd
+- OUTPUT_VARIABLE SYSTEMD_UNIT_DIR
+- ERROR_QUIET
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-
+-execute_process(COMMAND pkg-config --variable=udevdir udev
+- OUTPUT_VARIABLE UDEV_DIR
+- ERROR_QUIET
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-
+ macro(INSTALL_EXEC_CMD _COMMAND _FAILMSG)
+ install(CODE "
+ execute_process(COMMAND ${_COMMAND} RESULT_VARIABLE install_exec_res)
diff --git a/sys-apps/razercfg/files/razerd.init.d-r1 b/sys-apps/razercfg/files/razerd.init.d-r1
new file mode 100644
index 000000000000..304d91196bc0
--- /dev/null
+++ b/sys-apps/razercfg/files/razerd.init.d-r1
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use logger
+}
+
+PIDFILE=/run/razerd/razerd.pid
+
+start() {
+ ebegin "Starting razerd"
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/razerd \
+ -- --background --pidfile ${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping razerd"
+ start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/sys-apps/razercfg/files/razerd.init.d-r2 b/sys-apps/razercfg/files/razerd.init.d-r2
new file mode 100644
index 000000000000..dd4ab9fd40b2
--- /dev/null
+++ b/sys-apps/razercfg/files/razerd.init.d-r2
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use logger
+}
+
+PIDFILE=/run/razerd/razerd.pid
+
+start() {
+ ebegin "Starting razerd"
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec /usr/bin/razerd \
+ -- --background --pidfile ${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping razerd"
+ start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/sys-apps/razercfg/metadata.xml b/sys-apps/razercfg/metadata.xml
new file mode 100644
index 000000000000..101f51bc68a6
--- /dev/null
+++ b/sys-apps/razercfg/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<longdescription>
+Utility to for advanced configuration of the following Razer mice: Copperhead
+Lachesis (Classic), DeathAdder (Classic, 3500 DPI, Black Edition, 2013), Taipan
+Naga (Classic, 2012, 2014, Hex), Krait, Boomslang CE. The tool architecture is
+based on "razerd", which is a background daemon doing all of the lowlevel
+privilege hardware accesses. The user interface tools are "razercfg", a
+commandline tool; and "qrazercfg", a QT4 based graphical device configuration
+tool.
+</longdescription>
+<!-- maintainer-needed -->
+<use>
+ <flag name="pm-utils">Installs the pm-utils hooks for suspend/resume and
+ requires <pkg>sys-power/pm-utils</pkg></flag>
+ <flag name="qt4">Installs a qt UI. Requires <pkg>dev-python/pyside</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/razercfg/razercfg-0.23.ebuild b/sys-apps/razercfg/razercfg-0.23.ebuild
new file mode 100644
index 000000000000..da7963b40fd4
--- /dev/null
+++ b/sys-apps/razercfg/razercfg-0.23.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils multilib eutils udev python-single-r1
+
+DESCRIPTION="Utility for advanced configuration of Razer mice (DeathAdder, Krait, Lachesis)"
+
+HOMEPAGE="http://bues.ch/cms/hacking/razercfg.html"
+SRC_URI="http://bues.ch/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="+pm-utils qt4"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ pm-utils? ( sys-power/pm-utils )
+ qt4? ( dev-python/PyQt4 )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e '/ldconfig/{N;d}' \
+ -e '/udevadm control/{N;d}' \
+ -e "s:/etc/udev/rules.d/:$(get_udevdir)/rules.d/:" \
+ -e 's:01-razer-udev.rules:40-razercfg.rules:' \
+ -e "s:/etc/pm/sleep.d:/usr/$(get_libdir)/pm-utils/sleep.d/:" \
+ -e 's:50-razer:80razer:' \
+ librazer/CMakeLists.txt \
+ || die "sed failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/razerd.init.d-r1 razerd
+ dodoc README razer.conf
+
+ if ! use qt4; then
+ rm "${D}"/usr/bin/qrazercfg
+ else
+ make_desktop_entry qrazercfg "Razer Mouse Settings" mouse "Qt;Settings"
+ fi
+
+ use pm-utils || rm "${D}"/usr/$(get_libdir)/pm-utils/sleep.d/80razer
+
+ python_fix_shebang "${ED}"usr/bin
+}
+
+pkg_postinst() {
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+}
diff --git a/sys-apps/razercfg/razercfg-0.39-r1.ebuild b/sys-apps/razercfg/razercfg-0.39-r1.ebuild
new file mode 100644
index 000000000000..ec711690643a
--- /dev/null
+++ b/sys-apps/razercfg/razercfg-0.39-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{3_4,3_5,3_6} )
+
+inherit cmake-utils python-single-r1 systemd udev
+
+DESCRIPTION="Utility for advanced configuration of Razer mice"
+HOMEPAGE="https://bues.ch/cms/hacking/razercfg.html"
+SRC_URI="https://bues.ch/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+pm-utils qt4 +udev"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ virtual/libusb:1
+ pm-utils? ( sys-power/pm-utils )
+ qt4? ( >=dev-python/pyside-1.2.1[${PYTHON_USEDEP}] )
+ udev? ( virtual/udev )
+"
+DEPEND="${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ virtual/libusb:1
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-unit-variables.patch" )
+
+src_prepare() {
+ default
+
+ sed -i CMakeLists.txt \
+ -e '/udevadm control/{N;d}' \
+ -e '/systemctl/{N;d}' \
+ -e "s:/etc/pm/sleep.d:/usr/$(get_libdir)/pm-utils/sleep.d/:" \
+ -e 's:50-razer:80razer:' \
+ || die
+
+ sed -i librazer/CMakeLists.txt \
+ -e '/ldconfig/{N;d}' \
+ -e "s:DESTINATION lib:DESTINATION $(get_libdir):" \
+ || die
+
+ sed -i razercfg.desktop.template \
+ -e '/^Categories=/s/=.*$/=Qt;Settings/' \
+ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DPYTHON="${PYTHON}"
+ -DSYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)"
+ -DUDEV_DIR="$(get_udevdir)"
+ )
+ RAZERCFG_PKG_BUILD=1 cmake-utils_src_configure
+}
+
+src_install() {
+ RAZERCFG_PKG_BUILD=1 cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/razerd.init.d-r2 razerd
+ dodoc README.* HACKING.* razer.conf
+
+ if ! use qt4; then
+ rm "${D%/}"/usr/bin/qrazercfg{,-applet} || die
+ rm "${D%/}"/usr/share/icons/hicolor/scalable/apps/razercfg* || die
+ rm "${D%/}"/usr/share/applications/razercfg.desktop || die
+ fi
+
+ if ! use pm-utils; then
+ rm "${D%/}/usr/$(get_libdir)/pm-utils/sleep.d/80razer" || die
+ fi
+}
+
+pkg_postinst() {
+ if use udev ; then
+ udevadm control --reload-rules
+ udevadm trigger --subsystem-match=usb
+ fi
+
+ if [[ -e "${ROOT%/}"/usr/bin/pyrazer.pyc ]]; then
+ eerror "A stale ${ROOT}usr/bin/pyrazer.pyc exists and will prevent"
+ eerror "the Python frontends from working until removed manually."
+ fi
+}
diff --git a/sys-apps/razercfg/razercfg-0.39.ebuild b/sys-apps/razercfg/razercfg-0.39.ebuild
new file mode 100644
index 000000000000..22ec48cf5caf
--- /dev/null
+++ b/sys-apps/razercfg/razercfg-0.39.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
+
+inherit cmake-utils multilib udev python-single-r1
+
+DESCRIPTION="Utility for advanced configuration of Razer mice"
+
+HOMEPAGE="http://bues.ch/cms/hacking/razercfg.html"
+SRC_URI="http://bues.ch/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+pm-utils qt4 systemd +udev"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ qt4? ( >=dev-python/pyside-1.2.1[${PYTHON_USEDEP}] )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/udev )
+ pm-utils? ( sys-power/pm-utils )
+ virtual/libusb:1"
+DEPEND="${PYTHON_DEPS}
+ virtual/pkgconfig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ virtual/libusb:1"
+
+src_prepare() {
+ default
+
+ sed -i CMakeLists.txt \
+ -e '/udevadm control/{N;d}' \
+ -e '/systemctl/{N;d}' \
+ -e "s:/etc/pm/sleep.d:/usr/$(get_libdir)/pm-utils/sleep.d/:" \
+ -e 's:50-razer:80razer:' \
+ || die "sed failed"
+
+ sed -i librazer/CMakeLists.txt \
+ -e '/ldconfig/{N;d}' \
+ -e "s:DESTINATION lib:DESTINATION $(get_libdir):" \
+ || die "sed failed"
+
+ sed -i razercfg.desktop.template \
+ -e '/^Categories=/s/=.*$/=Qt;Settings/' \
+ || die 'sed failed'
+}
+
+src_configure() {
+ mycmakeargs=( -DPYTHON="${PYTHON}" )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/razerd.init.d-r2 razerd
+ dodoc README.* HACKING.* razer.conf
+
+ if ! use qt4; then
+ rm "${D}"/usr/bin/qrazercfg{,-applet} || die
+ rm "${D}"/usr/share/icons/hicolor/scalable/apps/razercfg* || die
+ rm "${D}"/usr/share/applications/razercfg.desktop || die
+ fi
+
+ if ! use pm-utils; then
+ rm "${D}/usr/$(get_libdir)/pm-utils/sleep.d/80razer" || die
+ fi
+}
+
+pkg_postinst() {
+ if use udev ; then
+ udevadm control --reload-rules
+ udevadm trigger --subsystem-match=usb
+ fi
+
+ if [[ -e "${ROOT}"usr/bin/pyrazer.pyc ]]; then
+ eerror "A stale ${ROOT}usr/bin/pyrazer.pyc exists and will prevent"
+ eerror "the Python frontends from working until removed manually."
+ fi
+}
diff --git a/sys-apps/readahead-list/Manifest b/sys-apps/readahead-list/Manifest
new file mode 100644
index 000000000000..db5950e38092
--- /dev/null
+++ b/sys-apps/readahead-list/Manifest
@@ -0,0 +1,13 @@
+AUX conf.d-readahead-list 582 SHA256 8a444287a8dabe5f994bbeee84558da185b0b6a177dab94dcb83cacaa02a8c46 SHA512 00d5f750bdcfc1e68c602709575da4c329d22c8b1dd1e2c68ddb587217f4d2f2bca07ccec2bc0db19a47cd7864239a53f86786ee7c09eda438602fa4890bd0ea WHIRLPOOL fd2dc76ec7bb4afb951452d2f3b19c10772b5d5dfc545e9a0cd55093ab35cbd950185830622e0b91a99b7c479335b1fb3da7be314e8efb4b795b0fbca15605a9
+AUX init.d-readahead-list 517 SHA256 3e8b00a5e76733fed72fe266f7d8c5e9d3ed5b44c64dd618ea7dfa7bb8292b48 SHA512 aede2051cfdc41e6175517af532eb182b760ec61d12dcb756323694d017b1a3488f06db357a18790cd2fbcd951517f69fe0f9d16acd6b8bb6bd486acb926f445 WHIRLPOOL 2622f6d819d74f26825755e84f88d197a7285e0fa466fe612dc2faa5a0b8ba273b66c3a2b051c722e1cfa07e70ff233711931de15193281b00b348ca92ffad7e
+AUX init.d-readahead-list-early 516 SHA256 5943cc5ef09a1939938830810a4bd7757d368f4eb93a8d1757c47feb3162cbc4 SHA512 fc06d5008bb37b83e259b0868f168e51619a63aebca9b5105610e029c9130b633ca0bdcf44c7ccd741c13caab11b251bb34f051bcc8f76965ad68eb999c969f1 WHIRLPOOL 326e939bf0b0f320ceb721f65bce297b972b0418fcfba39132aae797afb6f3dfbf9275d7b9db2e16c54244e1b4c29577392ac598524ec7e33e20dd7b19fb019a
+AUX readahead-list-1.20060421.1016-gcc-4.3.patch 200 SHA256 f6ac98390667331716ba72b47b9737c5b49de3a552f248d6e6b18057a23370a7 SHA512 eb292b74e4fdc167a7edaf9d0f3f8ebabd69eff14a18b860ecbe26241708875153dd43ba3bce41a94bd83892093cf8f41d3f7bc421fadaab8a88d9728cb67795 WHIRLPOOL 6aa49275192239055b241f41cfa295fed5b2a52f266f2392667a7c7d0770e6e4bfa99d2e6c2a6d869d48a032e8121aeb61df47f0f84d6466e33551cbf59c8de1
+AUX readahead-list-1.20060421.1016-gcc6.patch 674 SHA256 0dd21aaa2db4f700b016939976949ccbb43e0e4bb7c489bacfd7c2c8839a48ea SHA512 3b070f6ffe5c396c2535e0fb7cbe8ba3ed87dcada1cacc39e9a607298c8a9fa4af37dd0942733b3a6d9bdbf55f6d1ad3916da7ac25bcce3188ce29c76711bdc8 WHIRLPOOL 86b155d3c1e2ad517acca322baa5c623185437ea6c980cda6d79cb5f56af1c9ba8ec64cc2866ebba25c8ea0d112aeca4fecdbab2da116a9970892abb5fa57eb9
+DIST readahead-list-1.20060421.1016.tar.bz2 108337 SHA256 b031f92e89756f4fd19ad2860f5d6ede80e57ddd1e973376c49e43fe142a6a82 SHA512 fa5644be139c37f9464823e20472a607d7ab754259c6545f83cc9679419bf643ee70aebd7aa4d496a8fb349048ba4836e2ac45ae727ade76156b5ad6e6889ec5 WHIRLPOOL 3d20c7743772abc80bc75717c88df97516defb2c1c0969f7ed3ae9f3a02b539a98fa45c6044c975fa2c63180fc4e2edc93a49d0acc4b93ca4f357d14ae76e0a1
+EBUILD readahead-list-1.20060421.1016-r1.ebuild 1565 SHA256 7b50818f95d42cd232cdc0ae39636178974e68b523cb6091fa29c0691c1e970f SHA512 9665223202d788db47dea77364657df4608be446b4c8a9c6e81e971f6ec934fc7e497943dac2ce3ff25031f7d5e4c375e9db902f4d6964f7e252bc3a2b78d636 WHIRLPOOL 09f4570fd08cfab4d8945b3528984ca2b46e4f93c317dbc168d69f0a6bb8a23deec055a1ee1d0e76e2343a647b1d584320f9b143705b8499dc88f2084e279f43
+EBUILD readahead-list-1.20060421.1016-r2.ebuild 1477 SHA256 1d8b495d4e1f36df9425fdcb1cb6dbab13c2e5d24114232721cee6e4169d65c4 SHA512 4e84737d1017d57a6ca536bd1a2bcb5bc2385cd67ceafb524cd502fad5609d8a0e3bc83b27a05b73d6f397547150336a81b713434d1c34a875642136945fd417 WHIRLPOOL 71f99194363735d244b58b9dc756a2aa7d1e05f40ba67268d991090f00c5b22b6ff75ce7587319084ff3a6a2a5f006bad10773eb14a3ccf740146fae1ca1102c
+EBUILD readahead-list-1.20060421.1016-r3.ebuild 1474 SHA256 8f1506b187e580d3f6fc772c2e640b55a767c3a28043f452bcfda218093db054 SHA512 8abf829d9b5765f6b734ba58a066326f1b8b0a9a4249e2ddfc0179fe42f45a9269d5bd63b7b479c37db2c6cbf6c01bc1e3a21fe6c55d5025896eefbf6c640f3d WHIRLPOOL bef652a5b3f8c1e145c8a29ccd414218424241d53578c93326c7aef0439e63671edbb5a1496f52867ce36a45e01fcfc54dd1c1d80f01c7a2a2d740ab05f2a6e3
+EBUILD readahead-list-1.20060421.1016.ebuild 1616 SHA256 7f8d059df6bb228ff1b2afd6a5fae79e4e71f34e019f95a268d50f85060be53d SHA512 88d19739d2aa452464f19e95f312383744f927ace3716a4375cf6c08b34b736d3558a8dc80e6ecbbcdbbbdc4a0007f908b86ca6de7af6437aef56979329747da WHIRLPOOL f85579835775b51d1305401be5212d405367de0ce037910800946f39f3ee7518e06b500d7368b8bd3e818a1848f8a88f3c56f8233c9098dde94f23251ea42624
+MISC ChangeLog 3422 SHA256 79e97a4a81c743a0ee6abd01da40dfbf474877ca98628925d694cd6b812a0351 SHA512 cbde3db4e9d12886c671b2af0fa5a48e6b6aa44bfc994345ac98a72ba2b90af87dbdf1c5860925b540669e3cd2d937aa2d9921e191b7042d594d55507313de55 WHIRLPOOL 2730164cd1f8152b5ebd1ba0a806a2fd80ac38d9e1f5e72cab8985b3cb3bb5bd7c92ada06237443b23eb68ba25045ef5f349a7f2d8ab862de6e7f272040c7ae3
+MISC ChangeLog-2015 3742 SHA256 c5ca41c61a6cafe6110139188f23cd5bceb39b4d5c30514b8b453255e949ca30 SHA512 e6d5907ef88579ad637dd036029554ed7253d300def5367ca343e65d5c6a84bf2e04a198397b8d3c1e2f25271e3c1408e550b95bce41edbf8ddc08a8d4b94397 WHIRLPOOL 91734d333912e915dbfd3493051eeb124796bb523a27845ec1b74e9d211f49eb0d9c507fe3053d3946d14d4d61081d9118f9797ffd2e77807875b0e4d2c4d568
+MISC metadata.xml 407 SHA256 3b32895602ee96b73768165c9f5340495ac57ca980e91968212d6e4bd20ac71d SHA512 a70ad465795004c9e3d4bfe6597597716d9618ed82a789121f78a69b259215757adba0e0eb66234c974d2f93681cffc9894c130ce96c9289e18aed13793aa67c WHIRLPOOL f042dc636cc848931afc0c665a345bffc49fb00b042d00a61360ffc5a1998082c018005839e7b2914036ea726ff3d927a34a9175534633ec583715c7f1ec0d6d
diff --git a/sys-apps/readahead-list/files/conf.d-readahead-list b/sys-apps/readahead-list/files/conf.d-readahead-list
new file mode 100644
index 000000000000..c5ea49b0ecd7
--- /dev/null
+++ b/sys-apps/readahead-list/files/conf.d-readahead-list
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net>
+# Distributed under the terms of the GNU General Public License v2
+
+# this list is intended for usage very early
+READAHEAD_LIST_exec_sbin_rc="/etc/readahead-list/exec_sbin_rc"
+
+# per-runlevel
+READAHEAD_LIST_runlevel_boot="/etc/readahead-list/runlevel-boot"
+READAHEAD_LIST_runlevel_default="/etc/readahead-list/runlevel-default"
+
+READAHEAD_LIST_call_early="${READAHEAD_LIST_exec_sbin_rc} ${READAHEAD_LIST_runlevel_boot}"
+READAHEAD_LIST_call_main="${READAHEAD_LIST_runlevel_default}"
+
+# vim: ts=4 sw=4
diff --git a/sys-apps/readahead-list/files/init.d-readahead-list b/sys-apps/readahead-list/files/init.d-readahead-list
new file mode 100644
index 000000000000..fa5d7fab8eb5
--- /dev/null
+++ b/sys-apps/readahead-list/files/init.d-readahead-list
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net>
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after localmount
+ # this should start as early as possible
+ # we can't do 'before *' as that breaks it
+ before clock bootmisc consolefont keymaps rmnologin serial urandom
+}
+
+start() {
+ # force reading
+ source /etc/conf.d/readahead-list
+
+ f="${READAHEAD_LIST_call_main}"
+ ebegin "readahead(2): ${f}"
+ /sbin/readahead-list ${f}
+ eend $?
+}
+
+# vim: ts=4 sw=4
diff --git a/sys-apps/readahead-list/files/init.d-readahead-list-early b/sys-apps/readahead-list/files/init.d-readahead-list-early
new file mode 100644
index 000000000000..dba700c6d398
--- /dev/null
+++ b/sys-apps/readahead-list/files/init.d-readahead-list-early
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net>
+# Distributed under the terms of the GNU General Public License v2
+
+
+depend() {
+ after checkroot
+ # this should start as early as possible
+ # we can't do 'before *' as that breaks it
+ before hostname modules domainname crypto-loop checkfs localmount
+}
+
+start() {
+ # force reading
+ source /etc/conf.d/readahead-list
+ f="${READAHEAD_LIST_call_early}"
+ ebegin "readahead(2): ${f}"
+ /sbin/readahead-list ${f}
+ eend $?
+}
+
+# vim: ts=4 sw=4
diff --git a/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc-4.3.patch b/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc-4.3.patch
new file mode 100644
index 000000000000..ccee025dcbf8
--- /dev/null
+++ b/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc-4.3.patch
@@ -0,0 +1,10 @@
+--- a/src/filelist-order.cxx
++++ b/src/filelist-order.cxx
+@@ -19,6 +19,7 @@
+ #include <iostream>
+ #include <fstream>
+ #include <vector>
++#include <cstdlib>
+
+ #include <assert.h>
+ #include <string.h>
diff --git a/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc6.patch b/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc6.patch
new file mode 100644
index 000000000000..a987e4aa767d
--- /dev/null
+++ b/sys-apps/readahead-list/files/readahead-list-1.20060421.1016-gcc6.patch
@@ -0,0 +1,15 @@
+filelist-order.cxx:276:37: error: unable to find string literal operator ‘operator""fmt’ with ‘const char [3]’, ‘long unsigned int’ arguments
+
+https://bugs.gentoo.org/594092
+
+--- a/src/filelist-order.cxx
++++ b/src/filelist-order.cxx
+@@ -273,7 +273,7 @@ void printItem(PAIR_COMPLETE_TYPE p,vector <OrderField*> *ofa) {
+ continue;
+ }
+ OrderField of = *ofp;
+-#define case_entry(fmt,func) printf("%s"fmt,(first ? "" : " "),func_##func(mk)); break;
++#define case_entry(fmt,func) printf("%s" fmt,(first ? "" : " "),func_##func(mk)); break;
+ switch(of.type) {
+ case ST_DEV: case_entry("%lld",ST_DEV);
+ case ST_INO: case_entry("%lld",ST_INO);
diff --git a/sys-apps/readahead-list/metadata.xml b/sys-apps/readahead-list/metadata.xml
new file mode 100644
index 000000000000..073af83c6e46
--- /dev/null
+++ b/sys-apps/readahead-list/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 type="person">
+ <email>robbat2@gentoo.org</email>
+ <description>Upstream author as well as maintainer for Gentoo.</description>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild
new file mode 100644
index 000000000000..5790a1d340e5
--- /dev/null
+++ b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit base
+
+DESCRIPTION="Preloads files into the page cache to accelerate program loading"
+HOMEPAGE="http://www.orbis-terrarum.net"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+PATCHES=( "${FILESDIR}/${P}-gcc-4.3.patch" )
+
+src_compile() {
+ econf --sbindir=/sbin || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # init scripts
+ #cd "${S}/contrib/init/gentoo/"
+ newinitd "${FILESDIR}"/init.d-readahead-list readahead-list
+ newinitd "${FILESDIR}"/init.d-readahead-list-early readahead-list-early
+ newconfd "${FILESDIR}"/conf.d-readahead-list readahead-list
+
+ # default config
+ insinto /etc/readahead-list
+ cd "${S}/contrib/data"
+ newins readahead.runlevel-default.list runlevel-default
+ newins readahead.runlevel-boot.list runlevel-boot
+ newins readahead._sbin_rc.list exec_sbin_rc
+
+ # docs
+ cd "${S}"
+ dodoc README
+ if use doc; then
+ docinto scripts
+ dodoc contrib/scripts/*
+ fi
+ # clean up a bit
+ find "${D}/usr/share/doc/${PF}/" -type f -name 'Makefile*' -exec rm -f \{\} \;
+}
+
+pkg_postinst() {
+ einfo "You should add readahead-list to your runlevels:"
+ einfo " rc-update add readahead-list-early boot"
+ einfo " rc-update add readahead-list boot"
+ einfo "Also consider customizing the lists in /etc/readahead-list"
+ einfo "for maximum performance gain."
+}
diff --git a/sys-apps/readahead-list/readahead-list-1.20060421.1016-r2.ebuild b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r2.ebuild
new file mode 100644
index 000000000000..80b37f7a964a
--- /dev/null
+++ b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Preloads files into the page cache to accelerate program loading"
+HOMEPAGE="http://www.orbis-terrarum.net"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/os-headers
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc-4.3.patch"
+ "${FILESDIR}/${P}-gcc6.patch"
+)
+
+src_configure() {
+ econf --sbindir=/sbin
+}
+
+src_install() {
+ default
+
+ # init scripts
+ #cd "${S}/contrib/init/gentoo/"
+ newinitd "${FILESDIR}"/init.d-readahead-list readahead-list
+ newinitd "${FILESDIR}"/init.d-readahead-list-early readahead-list-early
+ newconfd "${FILESDIR}"/conf.d-readahead-list readahead-list
+
+ # default config
+ insinto /etc/readahead-list
+ cd "${S}/contrib/data"
+ newins readahead.runlevel-default.list runlevel-default
+ newins readahead.runlevel-boot.list runlevel-boot
+ newins readahead._sbin_rc.list exec_sbin_rc
+
+ # docs
+ cd "${S}"
+ if use doc; then
+ docinto scripts
+ dodoc contrib/scripts/*
+ fi
+ # clean up a bit
+ find "${D}/usr/share/doc/${PF}/" -type f -name 'Makefile*' -exec rm -f \{\} \;
+}
+
+pkg_postinst() {
+ einfo "You should add readahead-list to your runlevels:"
+ einfo " rc-update add readahead-list-early boot"
+ einfo " rc-update add readahead-list boot"
+ einfo "Also consider customizing the lists in /etc/readahead-list"
+ einfo "for maximum performance gain."
+}
diff --git a/sys-apps/readahead-list/readahead-list-1.20060421.1016-r3.ebuild b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r3.ebuild
new file mode 100644
index 000000000000..b7033eeced8b
--- /dev/null
+++ b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Preloads files into the page cache to accelerate program loading"
+HOMEPAGE="http://www.orbis-terrarum.net"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/os-headers
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc-4.3.patch"
+ "${FILESDIR}/${P}-gcc6.patch"
+)
+
+src_configure() {
+ econf --sbindir=/sbin
+}
+
+src_install() {
+ default
+
+ # init scripts
+ #cd "${S}/contrib/init/gentoo/"
+ newinitd "${FILESDIR}"/init.d-readahead-list readahead-list
+ newinitd "${FILESDIR}"/init.d-readahead-list-early readahead-list-early
+ newconfd "${FILESDIR}"/conf.d-readahead-list readahead-list
+
+ # default config
+ insinto /etc/readahead-list
+ cd "${S}/contrib/data"
+ newins readahead.runlevel-default.list runlevel-default
+ newins readahead.runlevel-boot.list runlevel-boot
+ newins readahead._sbin_rc.list exec_sbin_rc
+
+ # docs
+ cd "${S}"
+ if use doc; then
+ docinto scripts
+ dodoc contrib/scripts/*
+ fi
+ # clean up a bit
+ find "${D}/usr/share/doc/${PF}/" -type f -name 'Makefile*' -exec rm -f \{\} \;
+}
+
+pkg_postinst() {
+ einfo "You should add readahead-list to your runlevels:"
+ einfo " rc-update add readahead-list-early boot"
+ einfo " rc-update add readahead-list boot"
+ einfo "Also consider customizing the lists in /etc/readahead-list"
+ einfo "for maximum performance gain."
+}
diff --git a/sys-apps/readahead-list/readahead-list-1.20060421.1016.ebuild b/sys-apps/readahead-list/readahead-list-1.20060421.1016.ebuild
new file mode 100644
index 000000000000..1e7b7b64fb1d
--- /dev/null
+++ b/sys-apps/readahead-list/readahead-list-1.20060421.1016.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit base
+
+DESCRIPTION="Preloads files into the page cache to accelerate program loading"
+HOMEPAGE="http://www.orbis-terrarum.net"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+
+# I'm not entirely certain about this
+# need to check if other libc variants provide readahead(2)
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+PATCHES=( "${FILESDIR}/${P}-gcc-4.3.patch" )
+
+src_compile() {
+ econf --sbindir=/sbin || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # init scripts
+ cd "${S}/contrib/init/gentoo/"
+ newinitd init.d-readahead-list readahead-list
+ newinitd init.d-readahead-list-early readahead-list-early
+ newconfd conf.d-readahead-list readahead-list
+
+ # default config
+ insinto /etc/readahead-list
+ cd "${S}/contrib/data"
+ newins readahead.runlevel-default.list runlevel-default
+ newins readahead.runlevel-boot.list runlevel-boot
+ newins readahead._sbin_rc.list exec_sbin_rc
+
+ # docs
+ cd "${S}"
+ dodoc README
+ if use doc; then
+ docinto scripts
+ dodoc contrib/scripts/*
+ fi
+ # clean up a bit
+ find "${D}/usr/share/doc/${PF}/" -type f -name 'Makefile*' -exec rm -f \{} \;
+}
+
+pkg_postinst() {
+ einfo "You should add readahead-list to your runlevels:"
+ einfo " rc-update add readahead-list-early boot"
+ einfo " rc-update add readahead-list boot"
+ einfo "Also consider customizing the lists in /etc/readahead-list"
+ einfo "for maximum performance gain."
+}
diff --git a/sys-apps/rename/Manifest b/sys-apps/rename/Manifest
new file mode 100644
index 000000000000..0ad947a8e9bd
--- /dev/null
+++ b/sys-apps/rename/Manifest
@@ -0,0 +1,10 @@
+AUX rename-1.3-build.patch 172 SHA256 83c350a317da9b15c809f742f24bdf20eec9d263d63f29d10c41737e755a3c35 SHA512 8b504f4082ceaf8ecb44abbb7010eb21d800f2886bf0334143fe9c533259866e70ba4bb239720843372d50ccd2b9a6441eafb10206afb6b5d9561c04d17ba0d9 WHIRLPOOL c7fbf9d68c02141d5cc2dfb3f8540488a347e9aa99c0fe6fb474790d0fa29f7d9ad2e776793c6a47f993740f9e7a4afbf09653be19058aabb0f52d65b2a75577
+AUX rename-1.3-gcc44.patch 330 SHA256 9eff9aea3f4c43755548ad662dc5b6dc4e4ea70099f3ed69932d3966edeefb43 SHA512 5a40ab4c81b4c197af051e01682f4fbb580b3fea9287539f601b4c07c6155c3aba802e38752566f9d2a41239cf2d20d748bfd64d2f7007eff578344cd12852c9 WHIRLPOOL a9139be4c8389dccf236609f94827edfe808b3d0e3cda3992ea2111c0d0bfd6c43e214bbc0c39f653742583ca9f7ecdf5e8fc675ba54762feae0984343d23ae1
+AUX rename-1.3-rename.patch 2345 SHA256 ecd8f23b62e4fe73f33317f3e388fb044dfd1706336f4d2600ef81c9feba1e45 SHA512 6d0d757c3991448a1937480bb5c1cd219b681e7cbb9b1fbdb27097715cac04b2d2c0bb0b9c77ab2b131f6bbb8e0774f4da5845e815918d4de6faf96f218adb47 WHIRLPOOL 408da93b25c878118ea0782818e208b61cf38ed49ab8944f392f2c019bfdf4c26e0e689263222e23f9efc20ca276de4a03a83bd708b3fbf6687f4870f01789ff
+DIST rename-1.3.tar.gz 83854 SHA256 02aed28f46b22213490a94b8490ee2a84b12c0962db33b4ea88c8c67a7adb8f4 SHA512 7959ef0417d02aecd23200fbc226acd0cc34595d16efdb931657c2292ec2a0b9ff794406b6baa5234db5c95b1eae8a1dcf1862936a40e66bb70710154c89e5dd WHIRLPOOL 83355f3dbbcb5f4c0af603a73c086dcaed662a7d087999331b5a4b73435f7e06221d8fe953c9f263a925dfa0d491c51c2b961fcd308db50241b49a353e17c4d2
+EBUILD rename-1.3-r1.ebuild 909 SHA256 c3228c41d597041b5e8820fa2da6651abfc56863dcff6b7b5789aa13ceca4f62 SHA512 cf894e062fb1d57cd665a688e89dcc9c8d18e67c1eea970137399e9926d43dc61731b48acd930cb9f0f54979fc0ccb52c4a55839bb861dfe83f793bc6529e3a7 WHIRLPOOL 85226c32fad308fd71a46ef58a02810712a325b19e864faaeea17864d1411dc701d539d7a698d335ca62124e3fdcd319e49aebab10d52ff1d6c8a0f2dbff5ef3
+EBUILD rename-1.3-r2.ebuild 911 SHA256 d79222a344c6eb2f15eab2285fcfa957f9f76eb9fdd7c1ccb220e7c80c23eedf SHA512 e6ccbd3606b69c26a96c8342c5a591e93ee995fff4652532b07fce79075faa1d63a0f22c5632793b0218d689694855f7a904d5733bf024daa2bce96b705e9119 WHIRLPOOL 6f3c5fa231283b85e55a59d1e85c20114f787f1c90ebbc6db7cf91ad3e820a7cb31336f008487fca45f2ce364d672b15cf3bc1b8435ec80bb0c36e7342b89598
+EBUILD rename-1.3.ebuild 901 SHA256 0eb9cf419dbf7cd8efee4373c7e4040fae16b817da5c4ea217e26854a0e519cb SHA512 494884b7cd285c34c5ae6139b3c93a3a6e42051a9431be5437a46d06ecc4ab9605f2752e6003f10c9103859edfa2e89d8bdc8266862b485ce890f608f1b6e269 WHIRLPOOL 39fc1ebe600a9f6a0b14262c5d2930cedf0b6fffb8f897c53642f5f5d6f9bd9b77b232b43692aa10c0a14983389241f8af801326a61fb6006480b715d6ac71b9
+MISC ChangeLog 3367 SHA256 a3f1c367895bc8467205e24cab82d0fe8660cb903205590fe81e80fe0c8631d3 SHA512 9c0d1839d56512d47cfaa9b78b7ce9f5f953124b51e6adb9d1b343772ad2b02a3b689ea9d05c0c027abe1cf68067ef3aaad0d5c318859d3eda4135db9d498282 WHIRLPOOL cd9cfb1bcbe825434b38d7b734a525e29950182f0a6d6d486c431390175869acc999549315b30e20722efd4e098d46fb55ab72177175cdc8f8f230cfb2428847
+MISC ChangeLog-2015 2778 SHA256 79784641242304981839737a6bcd1c595688fcac71c3d03febf7874460fabc92 SHA512 4036de4263a296c889922a546cfd6d6e47e8555593a041b84c257e80cac52712957a20b2241e73984c90e588ad7d3ec3021deef461f9071b0db3dcdaa3340d65 WHIRLPOOL 7240a0e76b95e0a86b2dd55eb67f46fc67d48cafa934412caad0cb542a35e17b908dbeb84c8710d5c993e57f3d8a9bbbd02130d92d2654a2982a64fd9c2e4fce
+MISC metadata.xml 326 SHA256 d8d2840675144d7f37538251739ef4d337c1b605c58f1655f4ac305474ae20f3 SHA512 5d7e26ff9fa47efcf1728be310c91822d85ef3e521a5903d66c9ae8e6449e72465f5f87a2fecc0a51086edc34a325545a0d40210ed320f56bd34af9db9fa45c0 WHIRLPOOL 4e8fd06831a11d53fcbd0c3cf1d7436e7ccb974d4684e3bfaf5c60025ea4fb24bef80072687f318eea0c058b3670b022cb184ae9cbde7f979895fde493d40acb
diff --git a/sys-apps/rename/files/rename-1.3-build.patch b/sys-apps/rename/files/rename-1.3-build.patch
new file mode 100644
index 000000000000..6d184435ddc1
--- /dev/null
+++ b/sys-apps/rename/files/rename-1.3-build.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -16,7 +16,7 @@
+ all: rename
+
+ rename: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+
+ static: $(OBJS)
diff --git a/sys-apps/rename/files/rename-1.3-gcc44.patch b/sys-apps/rename/files/rename-1.3-gcc44.patch
new file mode 100644
index 000000000000..71f5e88b3398
--- /dev/null
+++ b/sys-apps/rename/files/rename-1.3-gcc44.patch
@@ -0,0 +1,16 @@
+diff -NrU5 rename-1.3.original/rename.c rename-1.3/rename.c
+--- a/rename.c 2009-06-14 00:21:43.000000000 -0600
++++ b/rename.c 2009-06-14 00:22:21.000000000 -0600
+@@ -63,11 +63,11 @@
+ #endif
+ #endif
+
+ #if HAVE_REGEX_H
+ #include <regex.h>
+-#elif
++#else
+ #include "regex.h"
+ #endif
+
+ #if HAVE_GETOPT_H
+ #include <getopt.h>
diff --git a/sys-apps/rename/files/rename-1.3-rename.patch b/sys-apps/rename/files/rename-1.3-rename.patch
new file mode 100644
index 000000000000..127959fb3b34
--- /dev/null
+++ b/sys-apps/rename/files/rename-1.3-rename.patch
@@ -0,0 +1,95 @@
+--- a/rename.c
++++ b/rename.c
+@@ -594,7 +594,7 @@
+ } else {
+ rs = rename(oldp, new);
+ if (rs < 0)
+- perror("rename");
++ perror("renamexm");
+ else if (attr & MOD_VERBO)
+ printf("ok\n");
+
+@@ -628,8 +628,8 @@
+ {
+
+ char *help = "\
+-Usage: rename SOURCE DEST\n\
+- or: rename [OPTION] file ...\n\
++Usage: renamexm SOURCE DEST\n\
++ or: renamexm [OPTION] file ...\n\
+ Rename SOURCE to DEST, or substitute characters match the specified pattern\n\
+ in the filename.\n\
+ \n\
+--- a/rename.1
++++ b/rename.1
+@@ -1,16 +1,16 @@
+ .TH NAME SECTION
+ .SH Name
+-rename \- file rename tool
++renamexm \- file rename tool
+
+ .SH SYNOPSIS
+-.B rename
++.B renamexm
+ .I OldName NewName
+ .P
+-.B rename
++.B renamexm
+ .I [options] files ...
+
+ .SH DESCRIPTION
+ This
+-.I rename
++.I renamexm
+ is a quick and powerful tool for
+ .I upcasing,
+@@ -276,5 +276,5 @@
+ .SH EXAMPLES
+ .TP
+-.I rename foo food
++.I renamexm foo food
+ Change file 'foo' to 'food', just like
+ .I mv(1)
+@@ -282,23 +282,23 @@
+
+ .TP
+-.I rename -lR *
++.I renamexm -lR *
+ To lowcase all filenames, directories and filenames and directories under
+ subdirectories.
+
+ .TP
+-.I rename -s/abc/xyz/gi *.c
++.I renamexm -s/abc/xyz/gi *.c
+ Substitute all 'abc' substrings appeared in C sources files with 'xyz',
+ ignoring case.
+
+ .TP
+-.I rename -vs/.c/.cpp/s *.c
++.I renamexm -vs/.c/.cpp/s *.c
+ Change C sources suffix to C++ sources suffix, with verbose information.
+
+ .TP
+-.I rename -s/abc/12345/bi *
++.I renamexm -s/abc/12345/bi *
+ Find the last occurrence of 'abc' and replace it with '12345', ignoring case.
+
+ .TP
+-.I rename -o guest -R /home/custom
++.I renamexm -o guest -R /home/custom
+ change the owner of the file '/home/custom' to 'guest'. The 'guest' should
+ be an effective user in the current system. If '/home/custom' is a directory,
+@@ -306,5 +306,5 @@
+
+ .TP
+-.I rename -s/^[A-Z].*file/nofile/r *
++.I renamexm -s/^[A-Z].*file/nofile/r *
+ The target substring starts with a capital letter, and ends with string 'file'.
+ There are 0 or any numbers of characters between the capital letter and 'file'.
+@@ -312,5 +312,5 @@
+
+ .TP
+-.I rename -s/^[A-Z].+file/nofile/eg *
++.I renamexm -s/^[A-Z].+file/nofile/eg *
+ Similar to last example, except it uses extended regular expression, such as
+ the '+' metacharacter, and replaces all matching strings with 'nofile'.
diff --git a/sys-apps/rename/metadata.xml b/sys-apps/rename/metadata.xml
new file mode 100644
index 000000000000..d7e8089a7c64
--- /dev/null
+++ b/sys-apps/rename/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">rename</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/rename/rename-1.3-r1.ebuild b/sys-apps/rename/rename-1.3-r1.ebuild
new file mode 100644
index 000000000000..56e10c47853f
--- /dev/null
+++ b/sys-apps/rename/rename-1.3-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="tool for easily renaming files"
+HOMEPAGE="http://rename.sourceforge.net/"
+SRC_URI="http://${PN}/sourceforge.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-rename.patch
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-gcc44.patch
+)
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS/s:-O3:@CFLAGS@:' \
+ -e '/strip /s:.*::' \
+ Makefile.in || die
+ epatch "${PATCHES[@]}"
+ tc-export CC
+}
+
+src_install() {
+ newbin rename renamexm
+ newman rename.1 renamexm.1
+ dodoc README ChangeLog
+}
+
+pkg_postinst() {
+ ewarn "This has been renamed to 'renamexm' to avoid"
+ ewarn "a naming conflict with sys-apps/util-linux."
+}
diff --git a/sys-apps/rename/rename-1.3-r2.ebuild b/sys-apps/rename/rename-1.3-r2.ebuild
new file mode 100644
index 000000000000..4f06c0d345ec
--- /dev/null
+++ b/sys-apps/rename/rename-1.3-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Easily rename files"
+HOMEPAGE="http://rename.sourceforge.net/"
+SRC_URI="http://${PN}/sourceforge.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+MY_PATCHES=(
+ "${FILESDIR}"/${P}-rename.patch
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-gcc44.patch
+)
+
+DOCS=( README ChangeLog )
+
+src_prepare() {
+ default
+ sed -i \
+ -e '/^CFLAGS/s:-O3:@CFLAGS@:' \
+ -e '/strip /s:.*::' \
+ Makefile.in || die
+ epatch "${MY_PATCHES[@]}"
+ tc-export CC
+}
+
+src_install() {
+ newbin "${PN}" "${PN}xm"
+ newman "${PN}.1" "${PN}xm.1"
+}
+
+pkg_postinst() {
+ ewarn "This has been renamed to '${PN}xm' to avoid"
+ ewarn "a naming conflict with sys-apps/util-linux."
+}
diff --git a/sys-apps/rename/rename-1.3.ebuild b/sys-apps/rename/rename-1.3.ebuild
new file mode 100644
index 000000000000..4ca676599f64
--- /dev/null
+++ b/sys-apps/rename/rename-1.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="tool for easily renaming files"
+HOMEPAGE="http://rename.sourceforge.net/"
+SRC_URI="http://${PN}/sourceforge.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e '/^CFLAGS/s:-O3:@CFLAGS@:' \
+ -e '/strip /s:.*::' \
+ Makefile.in
+ epatch "${FILESDIR}"/${P}-rename.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-gcc44.patch
+ tc-export CC
+}
+
+src_install() {
+ newbin rename renamexm || die
+ newman rename.1 renamexm.1
+ dodoc README ChangeLog
+}
+
+pkg_postinst() {
+ ewarn "This has been renamed to 'renamexm' to avoid"
+ ewarn "a naming conflict with sys-apps/util-linux."
+}
diff --git a/sys-apps/renameutils/Manifest b/sys-apps/renameutils/Manifest
new file mode 100644
index 000000000000..b07e8da57a48
--- /dev/null
+++ b/sys-apps/renameutils/Manifest
@@ -0,0 +1,7 @@
+AUX renameutils-0.12.0-autopoint.patch 250 SHA256 0a3ab72c1080c022166968cd4371d6eb8cdcb5adc170f1eb86cf1f3a024833d2 SHA512 a9cff62242da7d71f05e57bcbd7b10b563c4a0e6262c0ded6c6890ce0f78796bb1b865f66a91dd01db29d5b7d645175e8509d76b30e9c4f60103a6ca9fd9c8b0 WHIRLPOOL 601ee5b5781aaa35fb190e0ee89cef6144d8a963e6fee809a3582125e226b044ff10c9c9f1f0cfa3b2264fbec01a647d625a9d5fbf2f771969d5020a1bbdac13
+AUX renameutils-0.12.0-typo.patch 659 SHA256 e7935852c2654edfc5b871fd1100ecd48ac583146762d1d2f318ed10d42a79e9 SHA512 0c8a84ec8cbc40c5f51e0a0066ae451ce2f44a2a7d13f73429c60a90dbf02ba0982f00280b16e38125763eeabc850d03f9c8c6f35bd924bd4fac54be85d7ea7d WHIRLPOOL 57c67c71f0d1da6dd271963328685463849e97baf04cb5548500cea63a04daa345d018fa7d1054e34c17eb2fb45ff3ba6e10672eaa9a4b4e25f5f0f7acbf18a2
+DIST renameutils-0.12.0.tar.gz 954114 SHA256 cbd2f002027ccf5a923135c3f529c6d17fabbca7d85506a394ca37694a9eb4a3 SHA512 8aae157e6ead86a2fbf970ecdb27d6067c2d35c04058ead9a3c0af3d99d466d37d8c4f1da0562ef2bea9cf9bd5f8de4d14340906427df421dba1a5c234c63bd6 WHIRLPOOL faeac0e2d6bdbb2da8d3937e777757b1585e3e54207e9248598ca0b97bab0d84524937110ed40b4fe2f9fd27ff8743db0f35d7c5dde381b79e23414fe41f144a
+EBUILD renameutils-0.12.0.ebuild 598 SHA256 3180c749e535bc27e5b20b91055ead8d5bf3a4c04361bb777b31b261532cb673 SHA512 a1c9fd745cece602cebcc908485716786a1f75f918730e956cf769c536b10ee24d5c03bca15d503ded0c3feca06aad76fd4bab7d0b730a88b8d96bcab2b553d9 WHIRLPOOL f2503aadc5fcf659ac6e0a1edc41f31b18deef65fdc7ed623a3f6b1224a14dd1cb6d12cb640dc989e0dc8fecfe8329a7b42cee2b6d2be6240127091f875bd856
+MISC ChangeLog 2428 SHA256 c4638fee88dc847c80137a3f11586b549597319c142a82f522ed68669ed8b896 SHA512 8694226833bdc569a4d4ef4883e05b4a4cc471ca0652303f0b6c6fbde98eb3c34216b2378d7253c0af377429004312fcc854132ed891abf68e97d99bf5ebb1ec WHIRLPOOL 7df44f7c7a7c803c15aa95031212a894b80a92c71b322d73060a7ff41284056ea9b89006c887e56e68821ca615c8525d971fa53e72bd8bde57356203ed26472d
+MISC ChangeLog-2015 2709 SHA256 4953b1f854f31a684703f128e0b5a5fad4e2a13ecec3a52f86a7cc5d9136cb06 SHA512 904a75f1b993fe2a03b65b8021402b13b75a68e76e0be4416fe36c6c610486a56a841c2b18f2410cac0ba8b22cb220b5979fa448a91a20985021c98ea733f2bd WHIRLPOOL 4c79eada7770d9331b6e910847a98f13d4330913bed564db7f4281c9fa4aea85f0f4950cf7f90053905135360777ede1a38087007925de13a41c2f2cc2e34238
+MISC metadata.xml 215 SHA256 f180ea0fd77023c37de6a42e921f95c7161886821b6faf95b9dfca6e4d815589 SHA512 f4081fcee65474c60f6ddd9c4f113e5f3222fa4f1b0b420dccd825409d62fd3664d2b6a8259a790c792f3e63bb0c63a9a0ef3c7461951a282bd7144a299258f3 WHIRLPOOL 8157dbb2f5266a06e57b6dce5a33df68c3912ee9458ace146cf0b1cf1c4765c265d02f9e61daba14f387ad5d2069544422a93df2653ee314bae49aa77a09df0c
diff --git a/sys-apps/renameutils/files/renameutils-0.12.0-autopoint.patch b/sys-apps/renameutils/files/renameutils-0.12.0-autopoint.patch
new file mode 100644
index 000000000000..858a5565f0ae
--- /dev/null
+++ b/sys-apps/renameutils/files/renameutils-0.12.0-autopoint.patch
@@ -0,0 +1,12 @@
+diff --git a/configure.ac b/configure.ac
+index 58feccb..86dbe49 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,6 +24,7 @@ gl_INIT
+
+ # Gettext
+ AM_GNU_GETTEXT([external])
++AM_GNU_GETTEXT_VERSION(0.18)
+
+ # Checks for libraries.
+ OL_LIB_READLINE
diff --git a/sys-apps/renameutils/files/renameutils-0.12.0-typo.patch b/sys-apps/renameutils/files/renameutils-0.12.0-typo.patch
new file mode 100644
index 000000000000..2a5dd6a2101c
--- /dev/null
+++ b/sys-apps/renameutils/files/renameutils-0.12.0-typo.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 21a1cb7..6cd9d08 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -49,7 +49,7 @@ all-local:
+ @[ -f icp ] || (echo $(LN_S) icmd icp ; $(LN_S) icmd icp)
+
+ install-exec-local:
+- $(mkdir_p) $(DESTDIR)($bindir)
++ $(mkdir_p) $(DESTDIR)$(bindir)
+ @[ -f $(DESTDIR)$(bindir)/qmv ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv)
+ @[ -f $(DESTDIR)$(bindir)/qcp ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp)
+ @[ -f $(DESTDIR)$(bindir)/imv ] || (echo $(LN_S) icmd $(DESTDIR)$(bindir)/imv ; $(LN_S) icmd $(DESTDIR)$(bindir)/imv)
diff --git a/sys-apps/renameutils/metadata.xml b/sys-apps/renameutils/metadata.xml
new file mode 100644
index 000000000000..586ba1531e9e
--- /dev/null
+++ b/sys-apps/renameutils/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 type="person">
+<email>dev-zero@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/renameutils/renameutils-0.12.0.ebuild b/sys-apps/renameutils/renameutils-0.12.0.ebuild
new file mode 100644
index 000000000000..95b7981085a1
--- /dev/null
+++ b/sys-apps/renameutils/renameutils-0.12.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Use your favorite text editor to rename files"
+HOMEPAGE="http://www.nongnu.org/renameutils/"
+SRC_URI="https://savannah.nongnu.org/download/renameutils/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls"
+
+DEPEND=">=sys-libs/readline-5.0-r2"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-typo.patch" \
+ "${FILESDIR}/${P}-autopoint.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
diff --git a/sys-apps/rescan-scsi-bus/Manifest b/sys-apps/rescan-scsi-bus/Manifest
new file mode 100644
index 000000000000..3acaf8ea9db7
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/Manifest
@@ -0,0 +1,10 @@
+DIST rescan-scsi-bus.sh-1.29 15654 SHA256 355f30d15b44159389baabac496882243974c9df4054d8a69ca2141822af8466 SHA512 dc6bfc5b8c4948c193bcf2522e6f4dedaacf9a9283eaedc9c3bcef0cf3db57a3ed8f3a95b8501853a75e1c83ad28850b291a76217b4c57690e663f3dc63587d7 WHIRLPOOL 1704b669a762b7f0a83afb394ad786dd9ae174a39a2e04325b83dbd2c4dfa58d3af9f94aaf1ce3c205ea44ac5ba8b8b8050916ebe6f7bce3b5d18a8ee539b288
+DIST rescan-scsi-bus.sh-1.56 22469 SHA256 d84a89a1f9162ca7711c5b1f18f4c036a41c231d15b4feeba0b50f815dcaf43d SHA512 bdd27471568b1ce8b4d9ccc6783f294d141d56c5d5fa5ad46a7ffe983efd46877e25ff67b7869edb4e22ad182d47140c2167a58b80a141f4b3dde9c7e10ae57b WHIRLPOOL 5ef7d71a653742c3ded4a4e3f570886e9161f7eab59692e57f46ecf0531de3c891d872328d0d5dc73fe67a90945e28bd9d08bbb15aad43f5e00a62084f87468d
+DIST rescan-scsi-bus.sh-1.57 22575 SHA256 91c3ffbbf27d799cb1adacc026a5a8f31d5d107b0adedc41e4b7d6af9fb3e70f SHA512 93a061af852e5f9dd3d64ad62692809a11d8ffaac68f5ce08ba1a4fd9201fc66a0a5482d3e6da6e5c36fb00805fa4f7483fc2c85c5aaf6bfc190690ccf7bc733 WHIRLPOOL 2568f857cd315d5b0c9259c6d0afa2ac5871c959ff77c1b408d734ba46860e0ec3bcadd8eed76d02e95ab87fd768fcfa707cf559c291ab45b1f65cff526fd421
+EBUILD rescan-scsi-bus-1.29.ebuild 966 SHA256 22741c4a16321e53044c7af9c424c1733d10ed0de66bd4cc48fbb397f6d6e6b3 SHA512 6e6248190eee9883982498adcec9fd3a9cdda60a4197f98dff774d2ae6e4803f480cbda05d76e18de72fd1d843c74f086bb367c46ee825d0e281d821366b8be4 WHIRLPOOL 7508c30b7db8a9b4ce5f8fd6f07f0f2e849266212520a9fd9e99c36636ac5d68dc7ffcbc060d3d405f9159c9adb7df77d94efd3573ee143fa27d33f5ebb87b03
+EBUILD rescan-scsi-bus-1.56.ebuild 982 SHA256 f7aad668ca49f9f3a76768f2b3057a48a731a1e5f0d5f46469920154ec720718 SHA512 1637009072361ca505628049144bd36e017e18aa48da739e42b518a09435d5e4283a9a35b226c07c02552441dd1568cfb820ca82d1dd793b88bd33dc5da6e03f WHIRLPOOL c9ca2808f51afa164340b58aca6d5ee3d0802b406f9cb5b95b57599eda23ffd1be8426fe85167c317eea2ff4c638838a73ebb3cb57492afcfb6096607e3a4274
+EBUILD rescan-scsi-bus-1.57-r1.ebuild 871 SHA256 7b01088fa03799afc202d9165206837487cae2f243c0d75ef2187ab69ff52191 SHA512 52d9d151e605f26f322a4250f39b10bff29b68e49432e527717ace3718d91237c8fb8e0a6632f97394f08376bf6dbf766cae0250259730ac978d311da6ccef99 WHIRLPOOL 8c8e9f1725537e73163da5a11d34f786e131e91db384bed108883892cf30564466f1d0f2fcd971002c8943cbc9a798e2fb95f3282abb35cd8795965134950583
+EBUILD rescan-scsi-bus-1.57.ebuild 828 SHA256 9691e474c7e23071487c55b5015e1d0429386a73a854aef384e39c7011975095 SHA512 52e3b43135892e7ec92e94b35704b99b53843c18e113ed326e8aee782ce7a44a65db58693d09983ec74498b7072cfe77d8031c91b172ef609826e93a56a7d1d9 WHIRLPOOL 5faf8751ba86f7c3816d2e1d76e6d1d47f8d4617e941c0eff102fbb2a9a8a3a7227db5dec2d5e7dc3936b90b401bc5454f910898b8253dbc8e768ea916877de7
+MISC ChangeLog 3218 SHA256 d046b27879480d70f7455578e44e24a5897854e8f5cd683aaac4d7b9c6e6a8da SHA512 385280509ba958502ed025e846ee4693eece54ed5559ca39c6e4448b44a828af4e38879106335b0f58a97066857776646ffd9394b2e2ad886d393418979b8c9d WHIRLPOOL a1c2225019fe0a5899849daa3d8ab3efce292302d73342e1c051a686b62be66647c5fece8a45a42a4a910e5b4f2ad7f2cfdac7f12d84f979427c91820a21f5a2
+MISC ChangeLog-2015 7050 SHA256 fbd5f39d7722222705035bc4e4c1e571839429bc2c72033a86da542e396eaf89 SHA512 d8a1e0f55cfdb8062d4ab7a0e4d1d100f8574e537495309137a30ad0be64fd0f250b8f210f37ba9bcc3299c3100039f774025a97539d7c04cf73a110a18a7735 WHIRLPOOL a736146550c8c025856450aa559c1ad0a2eb04ebe1302b6d00617de1bb277c36bb0f0c62a8b97a2802d7bcc601e4ef7062f54d24ae4a7f201369f4515f59257b
+MISC metadata.xml 329 SHA256 4ce73c4d5d41f458fc9039b8da317ba512dcc468f39b9db038e5d6416707179f SHA512 3baca06564c2219ea6175ea39cea467ada4e7bf21a4341fcdc9d5b885ae387f4ca4f93605464b900a2524d64badfae641c5459d0acd0569de1ce848528a46ee4 WHIRLPOOL 19cd1cebebe165ee3cde545b131693f98c677790b8cc07404639880f9c4c83576e5db8080af03f7e7409d0aa4b03b4053de460e6d30ae3ebbc8e645d984e1b56
diff --git a/sys-apps/rescan-scsi-bus/metadata.xml b/sys-apps/rescan-scsi-bus/metadata.xml
new file mode 100644
index 000000000000..9590fe15fc00
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.29.ebuild b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.29.ebuild
new file mode 100644
index 000000000000..532c98367098
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.29.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Script to rescan the SCSI bus without rebooting"
+HOMEPAGE="http://www.garloff.de/kurt/linux/"
+SCRIPT_NAME="${PN}.sh"
+SRC_NAME="${SCRIPT_NAME}-${PV}"
+SRC_URI="http://www.garloff.de/kurt/linux/${SRC_NAME}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=sys-apps/sg3_utils-1.24
+ virtual/modutils
+ app-shells/bash"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ einfo "Unpacking into ${WORKDIR}/"
+ cp -f "${DISTDIR}"/${SRC_NAME} "${WORKDIR}"/${SCRIPT_NAME}
+ #epatch "${FILESDIR}"/${P}-support-sysfs-only-systems.patch
+}
+
+src_compile() {
+ einfo "Nothing to compile"
+}
+
+src_install() {
+ into /usr
+ dosbin ${SCRIPT_NAME}
+ # Some scripts look for this without the trailing .sh
+ # Some look for it with the trailing .sh, so have a symlink
+ dosym ${SCRIPT_NAME} /usr/sbin/${PN}
+}
diff --git a/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.56.ebuild b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.56.ebuild
new file mode 100644
index 000000000000..b727c157a522
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.56.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Script to rescan the SCSI bus without rebooting"
+HOMEPAGE="http://www.garloff.de/kurt/linux/"
+SCRIPT_NAME="${PN}.sh"
+SRC_NAME="${SCRIPT_NAME}-${PV}"
+SRC_URI="http://www.garloff.de/kurt/linux/${SRC_NAME}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=sys-apps/sg3_utils-1.24
+ virtual/modutils
+ app-shells/bash"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ einfo "Unpacking into ${WORKDIR}/"
+ cp -f "${DISTDIR}"/${SRC_NAME} "${WORKDIR}"/${SCRIPT_NAME}
+ #epatch "${FILESDIR}"/${P}-support-sysfs-only-systems.patch
+}
+
+src_compile() {
+ einfo "Nothing to compile"
+}
+
+src_install() {
+ into /usr
+ dosbin ${SCRIPT_NAME}
+ # Some scripts look for this without the trailing .sh
+ # Some look for it with the trailing .sh, so have a symlink
+ dosym ${SCRIPT_NAME} /usr/sbin/${PN}
+}
diff --git a/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57-r1.ebuild b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57-r1.ebuild
new file mode 100644
index 000000000000..3f2cfb522833
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Script to rescan the SCSI bus without rebooting"
+HOMEPAGE="http://www.garloff.de/kurt/linux/"
+SCRIPT_NAME="${PN}.sh"
+SRC_NAME="${SCRIPT_NAME}-${PV}"
+SRC_URI="http://www.garloff.de/kurt/linux/${SRC_NAME}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" # alpha hppa ppc64 sparc
+
+RDEPEND=">=sys-apps/sg3_utils-1.24
+ app-admin/killproc
+ virtual/modutils
+ app-shells/bash"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp -f "${DISTDIR}"/${SRC_NAME} "${WORKDIR}"/${SCRIPT_NAME}
+}
+
+src_install() {
+ into /usr
+ dosbin ${SCRIPT_NAME}
+ # Some scripts look for this without the trailing .sh
+ # Some look for it with the trailing .sh, so have a symlink
+ dosym ${SCRIPT_NAME} /usr/sbin/${PN}
+}
diff --git a/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57.ebuild b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57.ebuild
new file mode 100644
index 000000000000..03a8e326cc23
--- /dev/null
+++ b/sys-apps/rescan-scsi-bus/rescan-scsi-bus-1.57.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Script to rescan the SCSI bus without rebooting"
+HOMEPAGE="http://www.garloff.de/kurt/linux/"
+SCRIPT_NAME="${PN}.sh"
+SRC_NAME="${SCRIPT_NAME}-${PV}"
+SRC_URI="http://www.garloff.de/kurt/linux/${SRC_NAME}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+RDEPEND=">=sys-apps/sg3_utils-1.24
+ virtual/modutils
+ app-shells/bash"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp -f "${DISTDIR}"/${SRC_NAME} "${WORKDIR}"/${SCRIPT_NAME}
+}
+
+src_install() {
+ into /usr
+ dosbin ${SCRIPT_NAME}
+ # Some scripts look for this without the trailing .sh
+ # Some look for it with the trailing .sh, so have a symlink
+ dosym ${SCRIPT_NAME} /usr/sbin/${PN}
+}
diff --git a/sys-apps/restartd/Manifest b/sys-apps/restartd/Manifest
new file mode 100644
index 000000000000..28e4e777f7ed
--- /dev/null
+++ b/sys-apps/restartd/Manifest
@@ -0,0 +1,5 @@
+DIST restartd_0.2.2.tar.gz 13777 SHA256 38e69e8f21b6b004f3469cea9cd073048cc9b3b3ef52a0a11a8f10e0dc44c182 SHA512 731d33e6ade389708801e6cb024c355062745d049ab389fc78fcc1918720c93601dc8fb3a56a8bbb626bffc0a240b16e33ff5a8614d27b2701eb6ca68018cc93 WHIRLPOOL d7462ded65d3acaf91a801a944c5e5f66645d37c6bdef04c6213b6a1d5b4278406ebff0e4b85bd85865073296216855547d1ee5537f6cac9f32cee5f91c36d07
+EBUILD restartd-0.2.2.ebuild 710 SHA256 48e2cee1b3d1707ab8ba7913bc08b5f3e31a835d9874831e1b4dfa93652d8b1c SHA512 01a3a9ae08d8fed30de029457650ca63ef240174444a9c2633ea8c017f63948090e87c27861ee78017c55d578765b51b977468bd6b43fbe110c6cd3d4c8a6740 WHIRLPOOL 6f0603f141ed2476ee6b5028cd72b83ce40996496f5ffcc9abdb67fe9cfd740244d93528c59856d0f659876cdda59146a23198e2894e9b62e9d9e5658a25408d
+MISC ChangeLog 2525 SHA256 96ae10daf1377e857bea52f48b62bc3722c39a02dffbe7f7bb6461e333b69626 SHA512 6d812ef1f106b5ea12a10b4895e6eb3cbce8cdc2afc07db46273f5bc24800e2ae97c8d87185bce5745fc93f86e1551444db11560afaf6450e79a1b9f222dcada WHIRLPOOL 98753ab6519fd0865e33d6f64edabe847df26f7c8318a7154608b560929246a379980e8e46162237a2593e94cfd49e57114c7ca7e425fb11b0561d650d4f5f8b
+MISC ChangeLog-2015 739 SHA256 f37552461357aabd35d4f621585074812d67e7d83388ce6a68804134d05b081a SHA512 8d17adefb0154e766ef6bd46b46a65b5e63d41a2a2efb5216159ac0a6de5893d34c2e08fc2f05dc1689fb34c217184bda00d98ed9b7edde3a437d45c535e6038 WHIRLPOOL de9e7e1a77084252d230dbbfb5783ec655c4de8a057ce6db34930c28acff73261d9d60e1251b6dc088deb984d8c679292cfc6345c185b1a24ed4df355e0f2a82
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/restartd/metadata.xml b/sys-apps/restartd/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/restartd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/restartd/restartd-0.2.2.ebuild b/sys-apps/restartd/restartd-0.2.2.ebuild
new file mode 100644
index 000000000000..1de6a97b5fd2
--- /dev/null
+++ b/sys-apps/restartd/restartd-0.2.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+MY_PV=${PV/_alpha/.a-}
+DESCRIPTION="A daemon for checking your running and not running processes"
+HOMEPAGE="http://packages.debian.org/unstable/utils/restartd"
+SRC_URI="mirror://debian/pool/main/r/restartd/${PN}_${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i Makefile -e 's|-o restartd|$(LDFLAGS) &|g' || die "sed Makefile"
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) C_ARGS="${CFLAGS}" || die
+}
+
+src_install() {
+ dodir /etc /usr/sbin /usr/share/man/man8 /usr/share/man/fr/man8/
+ emake DESTDIR="${D}" install || die
+}
diff --git a/sys-apps/restorecond/Manifest b/sys-apps/restorecond/Manifest
new file mode 100644
index 000000000000..0cd5d77f0413
--- /dev/null
+++ b/sys-apps/restorecond/Manifest
@@ -0,0 +1,5 @@
+AUX restorecond.init 650 SHA256 ecf64c87bb71852c42504f504764171d33ed10327f4005b6098fcfb00318fcba SHA512 ee0ff9bfe542124eff0217dbf9cc2e00586b4577e0eee2bfa67946f78a97fe009c6e5c337e8ad68e1cd9af2f69ec3ce3acba9157b4d53c2fdeeb01f9e0aa9d0a WHIRLPOOL 74cadd908737c58c384ba67b04f94c634c73800b2774a8caad6455951def8880a251b9ef75cd0c56967f22831c9b24297b7c4c53c584e552dac2d2587b4302f1
+DIST restorecond-2.7.tar.gz 17753 SHA256 cb8e0a8d706cb2c1f105125f3514dffffefcbcfb49199183a7f91ab0bdf1f24d SHA512 c81950e4f748a729c8951b13a4075ab1003530f8ada7a9d3fbe6428f76070df4819a37daaab557b63fc234aa8c8320ec41757fbdb24b76fa2c11747bde0038ad WHIRLPOOL 54ab5aec56100d459aecf2018326942498ee63236ccf9edcce33c8dbfd100a54c278ef895421b098ef4e2106fb777f116e7eab023491b7d26f9263090af3b6db
+EBUILD restorecond-2.7.ebuild 1230 SHA256 1dd287a84924470995963236346f661eaafc761d013f484d904106e4f55f2e31 SHA512 bac8e86d00ac5c116aa877938f69427a1fa5ce7758594db6400722d953e5ea3fd000f0c4520364a7390cb0e6cd91ba737487b747aea25a38358fbb9c7e8a38eb WHIRLPOOL f6ba9f2272239310141ec7c71f8bd4a7a77ed68eca6a153c98fd3d05ca49e49266ba7976ceeaeee9aa9d9b29725344eb2b51308c517667d40301f7b8c77ef536
+EBUILD restorecond-9999.ebuild 1232 SHA256 60759938fb135f16328c73c1befad49cca4c684df1a818955eca41b18adb5fc0 SHA512 0c51444d0c278aee93a8da5f35a122d6d9c0849eb1d78f1b347f91f5399e87e11d8cc40b141e1295d5a0df406921e21f16264fb63fb50fa488463a01b057b74e WHIRLPOOL a5fdd8a4a33455f39bc99c7e5548efe9a8b1b4af02f803ea1d98a0297f5518bda82072fb2487f25ecb3e742bd1ff0e96b9222040f0bdf0d89e529cc400f8ff22
+MISC metadata.xml 460 SHA256 6be09b1b665718a7177c8d3941ded31fe51ccc67ff29746a303bc2ec939cc0e6 SHA512 0e4910de5e3932eb2914ddf4ef3250ae919885428337b1939f6827037a4dc5a75b13c97531c7b81748b1c90e3eb2b10a4671c76ede69749dbd1955bc67b5ca0a WHIRLPOOL 932fd71c39bedb2b5f00a66bd6de2708ef473e5ad2573c72ff832d19047714e42c15fc8c77baf4098c40ba91821a4603a2cae4f0c81a600d362217d9a195045c
diff --git a/sys-apps/restorecond/files/restorecond.init b/sys-apps/restorecond/files/restorecond.init
new file mode 100755
index 000000000000..709f1d1b9ece
--- /dev/null
+++ b/sys-apps/restorecond/files/restorecond.init
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 2006-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+is_selinux_enabled() {
+ local SE_ENABL="/usr/sbin/selinuxenabled"
+
+ if [ -x "$SE_ENABL" ]; then
+ $SE_ENABL && return 0 || return 1
+ else
+ ewarn "Restorecond: Unable to determine SELinux status"
+ return 1
+ fi
+}
+
+start() {
+ if is_selinux_enabled; then
+ ebegin "Starting restorecond"
+ start-stop-daemon --start --quiet --exec /usr/sbin/restorecond
+ eend $?
+ fi
+}
+
+stop() {
+ if is_selinux_enabled; then
+ ebegin "Stopping restorecond"
+ start-stop-daemon --stop --quiet --pidfile /var/run/restorecond.pid
+ eend $?
+ fi
+}
diff --git a/sys-apps/restorecond/metadata.xml b/sys-apps/restorecond/metadata.xml
new file mode 100644
index 000000000000..bad7d3fa425c
--- /dev/null
+++ b/sys-apps/restorecond/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 type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ daemon that watches for file creation and then sets the default SELinux file context
+ </longdescription>
+ <upstream>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/restorecond/restorecond-2.7.ebuild b/sys-apps/restorecond/restorecond-2.7.ebuild
new file mode 100644
index 000000000000..a63282f7029d
--- /dev/null
+++ b/sys-apps/restorecond/restorecond-2.7.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Daemon to watch for creation and set default SELinux fcontexts"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${PV}:=
+ >=sys-libs/libselinux-${PV}:=
+ dev-libs/libpcre:=
+ >=sys-libs/libcap-1.10-r10:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+
+ rm -rf "${D}/etc/rc.d" || die
+
+ newinitd "${FILESDIR}/restorecond.init" restorecond
+}
diff --git a/sys-apps/restorecond/restorecond-9999.ebuild b/sys-apps/restorecond/restorecond-9999.ebuild
new file mode 100644
index 000000000000..3d679bcf4c7e
--- /dev/null
+++ b/sys-apps/restorecond/restorecond-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Daemon to watch for creation and set default SELinux fcontexts"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${PV}:=
+ >=sys-libs/libselinux-${PV}:=
+ dev-libs/libpcre:=
+ >=sys-libs/libcap-1.10-r10:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+
+ rm -rf "${D}/etc/rc.d" || die
+
+ newinitd "${FILESDIR}/restorecond.init" restorecond
+}
diff --git a/sys-apps/ripgrep/Manifest b/sys-apps/ripgrep/Manifest
new file mode 100644
index 000000000000..c3043a4c1f4b
--- /dev/null
+++ b/sys-apps/ripgrep/Manifest
@@ -0,0 +1,43 @@
+DIST aho-corasick-0.6.3.crate 24963 SHA256 500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699 SHA512 4d0d55d8a6657fe13009d66728b7417926325dd9ca4f7ad7cd5d40e59cf0a55b906cd109d724a0b385ee988526535fc64a467ded171419e452c5a8c90196ae45 WHIRLPOOL e29e10afbf4dfbd1c36fe15af475107116e83c4e85943ca48a1cf90def2556045fd31264b59eb2110ad0d2e8c7ed5fe7594ac92a8fc3328a25c9be90f4173b89
+DIST ansi_term-0.9.0.crate 11718 SHA256 23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6 SHA512 4b5297d80f2a7fa840aeb1c31e7b893b33abcc7ce7f6f54371f6d7fc8e2915b43b5e3be3baab32b0821e174d8f7b58961029569a4f9e59b8a46c05f24ecaf04b WHIRLPOOL e0287a6f23e41131613da054def04c53896a4ac0bb80bc315eead5da99a5355f917cfd9babe05f4e3c8416c1ba33dc271bb1ad68ffc3b6e0cd5cdaba41f015da
+DIST atty-0.2.2.crate 5124 SHA256 d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159 SHA512 6e6e2cede7f280a53a61c78126783ec0338c13a8e9bbabb91d4b6fc43aacc56a4f7e86556210029595acf18e444121998101992b40e35a64cce884ec08247d0a WHIRLPOOL 9fae4158651f25bb4b32d0ca31e72fc8c01bb7afca0d703770af124ab9035fa52e700e3a74a4698bf8d95ff65de9adec9a5933b82798ee9cdc06d11dc86ffab4
+DIST bitflags-0.9.1.crate 12406 SHA256 4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5 SHA512 3c106186aa8b5b8d0fba377818618e6428af38f60e4f707873142b44cb6f64d1d7f347840c8bfba084ff569ac8c57d87f2288c4a1d79e282bc02544d69f976c0 WHIRLPOOL 4d6389fcdbd28cfddebc668e1f6fe0b2d34b77ad0b43abf4530179417498b44f8dddfcb0d19dcab84042715e000f9eb9c6f2af169679b74dc6c41dec26f9193b
+DIST bytecount-0.1.7.crate 10121 SHA256 4bbeb7c30341fce29f6078b4bdf876ea4779600866e98f5b2d203a534f195050 SHA512 2482f06b62699251c70f45a67c29efa3cfce74568d261105ab14134853396dd6ee9a35ba29dd28e3b8dab4f1398f55708c4f648590330c8aea753ab27cb59c3c WHIRLPOOL 5bf5378548a0e2a86dc70ca55806d4411ebf2ca846ba2cf42cc155f9daf3526bf07f1910310607e9f35c5f495632c199af41614839335a07990f1e7d271605c5
+DIST cfg-if-0.1.2.crate 6668 SHA256 d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de SHA512 ed6732d8ef2c99d99861f5dcfec3bcd2d1b62dcf6e8e4e88ca25148b5566f86418270dbbe9a7d2fae62a8320d432c5e0474059fa25a11c0f66787084e36f36aa WHIRLPOOL 4b5e8a97b7dde903545e6e29e333ee7fd06435621cc6de5336974bc648e4c21da71e0a8c0b13235bc52577bd9dc230f46bb8008bf026b67f9e01f250eb12925d
+DIST clap-2.26.0.crate 180834 SHA256 2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0 SHA512 b1a610e889b21f8f23aa5f7d40ee50cc5721201d661feca05952b792274aa6dc3a35c54e8aa29cba1f6502596864303fdee881b6794dedb59cc9fd90355498b8 WHIRLPOOL fc2860f693743cd48403f7225afbdac2dda4ee6320db8112b965f302953fd9d2291b088462f3438797d50ccebdf1fc67fc2bd4c4eef39fe9ca930403c2121094
+DIST crossbeam-0.2.10.crate 32993 SHA256 0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97 SHA512 cdefcda7626c08ca59bdf5581e0e8d3e6367081089cc32dad6e84b5f643c7cbc5b08ce47034dd925fe2f5e2dfcfd18afb51fba511265ee3598fc1844838948f2 WHIRLPOOL 764f0a48c300a587ea56b5f0f7f55d40d8330d0148cd309599b3794d8c28399531b52641a58cd65eb9fb0107ede1a2e7f119c562d4781dee3a8c360b0a5af73e
+DIST encoding_rs-0.6.11.crate 1220572 SHA256 e00a1b1e95eb46988805ceee6f34cd95c46a6753e290cb3ff0486931989d4a4c SHA512 5409fc1d6b9af953ffb246a8c119e9aa0e03ce6c3f0d6ce3606340f789e9195f376b76e724f08fc5b9975c370abafe8cfd591d55ff5fa05375654d5ff2fa6954 WHIRLPOOL 7ad862e648b9d88ae2c7a92159111b21bc61cf97371d4268038161f118981a9407c5fe75d0d801b72900fc88d94f40b0b58d647c767fd2485f752fe36abe4889
+DIST env_logger-0.4.3.crate 10891 SHA256 3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b SHA512 ba2c10608f87804e528a2de28c236e780485413dbc3835b5bd9acf4a9c11d9c66665a310747b5d8a5ef7752186ab8a1ab5fbf6042657a3447380cb0869722246 WHIRLPOOL de63679ff8d1f02c57510020a459c8285ccb338f04dfa672a5cddc4718139fd4ddbc931237e81569209fbfa3eeaadc7b6f05649f58ef9018345bbdba2925d39b
+DIST fnv-1.0.5.crate 6295 SHA256 6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344 SHA512 a851ed060bf49224436acb1b5cc3125d30a3b527be9d7abd09f4170eee6243de8067b0bae5b136e62fdb8ee026e42a150109e90fcdf4cc4258f4de045d6069a8 WHIRLPOOL 31b0d787973ed378116947c8e30341a61e944be17866f17af241ce69f8385de3eb71c0fd1ea121aa1d19b1bcd67eb25b9cebb624ecb85c9d28e9bbf60156e9ac
+DIST fs2-0.4.2.crate 12815 SHA256 9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866 SHA512 626c5edadaf356ef9d13ac042ef517f317a376fefc76163e3dc7573eff024323a2ea0f9c1582db5d797eb2ea64f2d27e7877e774154f5d5dadc506c926a5dfef WHIRLPOOL 4a794853447219cf79fdf624a24f01b96169ff40be2389483e80bb1196238359c992703cb086c9be463f9b6bae170843515e01b710b9cb2e6118b00a56e48fae
+DIST kernel32-sys-0.2.2.crate 24537 SHA256 7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d SHA512 682bc7c629aefd035966a2873518fd60719121cca7d63d89d6c97ff5306f24d8b5055a3c91b4eedaec22b1d5dd3fb8b48ff7341a05bbd72d86e06c422dab473b WHIRLPOOL 036baa6611f13d76692a5c032e7e8e8b5a82e12bdf13d5a2cdcf4d33020b003c941331f0c8aa774e7f7cc7b36ad7403bb2cbdecb739d7645cff66aeecd59b09f
+DIST lazy_static-0.2.8.crate 9950 SHA256 3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf SHA512 21c6ea68cb40d187a19e6d960fe0d7e4671101f26b304e4cbe6124f1a3d983fc41c44c4ce9e0d9b984783b7ba94ea873236e48178bdf56cfb8c0a8cfb9ebe368 WHIRLPOOL 8350c49ad994d3404462141310d4050cbdce3ef75cdacd9ab085bf9aaf20e6db5a4dde134273d6ab0ec618275a08acf5c2d154b206d7e3c21d6d8c4fbfad67b7
+DIST libc-0.2.29.crate 182632 SHA256 8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264 SHA512 3ebb02800c2376ee4b56bc56e3e26f478e6974e826fa7c54aa105416736d5bdd1dbc46dacdb2a0ceba7c536fdee136d21122c5c6288cf10c72033241473369d5 WHIRLPOOL 96cf617bdd61b5dc0a6628eba640403bc5437c779b1af96187aa3e2ecae6b6b447d4f16bcfe16d38b1f900f751a2983f67d2d2e2cdb59c9774effee5b8ab610b
+DIST log-0.3.8.crate 17756 SHA256 880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b SHA512 9fc80f2a72855a2b0260d6bfbdd55085791c67cb1896fd20da0a4d624125003cb0a10d9080c2fd7810ca67e41652a94177e1d091bdadeb5ea65c7c4acd666bd7 WHIRLPOOL ab37737279257682083d3335f1f05d84dea3dbbf624763f739b64da190da64458cc7a3741aa6c35ba4b71e1dad9c3fd1bc7df5334358bba3574faaf3a539688d
+DIST memchr-1.0.1.crate 8221 SHA256 1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4 SHA512 70ee14fcba41cf896f563da48c8acc683f8cdf77c54cf9786d6a938bd14eca7bcc22c86d0d70a3cae56b2c2f9eeecad2950be759abf02fc98ef96a643af91be6 WHIRLPOOL aefc15c91d981becfdb7132c91f812430759408a6356aeb2ec3064956e55579895c59cd539ebfc4c76cd09bdf4fcaefa888f99e1ae98733e7f11654f5a8cac1e
+DIST memmap-0.5.2.crate 14465 SHA256 46f3c7359028b31999287dae4e5047ddfe90a23b7dca2282ce759b491080c99b SHA512 c2ccb0afa6795831f1a032c4995d74daeb3bd739059146007b2524ec066517f39f7a2fcf56e69d17a5d091511011b9c0794a8e3ada7322dfc5f20a3d9f6c1b05 WHIRLPOOL 2aaa34634e7aa970eeebfedf3452e10317b72c351e220701d10c162dc4828771dc9bf7aa20a2a60f129267dcc782b7bfed43a500cda2ec469745458c47c83cf8
+DIST num_cpus-1.6.2.crate 8442 SHA256 aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584 SHA512 6136c6cd3e4a9c0f165f037e3e6af6502a3ffcdd0cc2d38635902f243124e5c6ccbd4db8e0bcb624e2ef824284145c0dd31c1cd5f708478334bc91f842c6050e WHIRLPOOL 9d32f8b35d52028ed36a56968875cadcace904c133a9c8e43ec7ab6a8525ef5fca23c6fbbe28387bf3981488b0d1e095a2a7a49c504736bafe8981b2bb3dc84a
+DIST regex-0.2.2.crate 193403 SHA256 1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b SHA512 208b671d06b260e4a130718a86ced88ee7f183bd056461bc6d44a15a22260a9ee05a014682bdb8bb7ff674fd33ac4748687c7ebd847578c7fecc8efbbb1993b3 WHIRLPOOL dafb61f75a55f02dd790201156f6dbf042eadf3b54c7e71732653e3dc8db4552f43d281d96a1bf196e7336b638cc97b5d24bb43f6223caf312cb7b0351be827e
+DIST regex-syntax-0.4.1.crate 121453 SHA256 ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db SHA512 0c6996d0b8c16053f6e4e6324053f8b6924313827d9fec59e209852aed11a18902a51bdaa98b95ab706a4b65896a201549cda2972b54ac2e2a2c704b61690a0f WHIRLPOOL 841c41fe9ba5fdc733d93944252c4e7d07b448435bf620baefc8db28a9e3891e97f619361cb1c80adc00be5be8721bebe36b85881b68035040ab870a23615b62
+DIST ripgrep-0.5.2.tar.xz 48910752 SHA256 e0fadefc1718d967ac15ccc22131255606cddf969b700ccc243c1f973be81d90 SHA512 d8bc86e12be80568de4565c911a03b0c3a15577b22dfa2f1fd9b44f4e77354da1e80852247b9955e225fd13a540acbb3ca7b5a00d686bfa65fdf3f5f329dfcd5 WHIRLPOOL c33a828471a925da2be2f6b3730c28146182ff79b2a75e4f193a0c94f540256cb1670d5cc79470a39d0b898e8c55e20fabe5fdec1c42124339001ad7b437d02c
+DIST ripgrep-0.6.0.tar.gz 470996 SHA256 102aff26fae9f455a8bcc435759d488f4944a34bee4b22b852f1cac3245b1b5e SHA512 219ec95598c080ddeee65233d1abf58320662ef28681a25cdf9fb63fd38bdb149c75471625545188dcd1deedf05fd58fc32e25cf39fd63943f765c57394ede23 WHIRLPOOL 0100649443d80973f102f23af115b4404756de8838eb4daad71a6ad32ff5242f8c2bfda359acc0818e5dd8394fd3409ac38653b21b15384bbb7d5f751c97703a
+DIST same-file-0.1.3.crate 7078 SHA256 d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7 SHA512 2d3d03ab0dd4add93cd32e7ca43041d541bee41000fd8d98575a58cbd192fe4498234ab80baa3c4791de9f3d4214feae90f628fd655e3510ede61f757be3a82c WHIRLPOOL efd0b9caf419b8436d54895deca5ee3d7a5191a006051b975d65c0e3d8aea32f3ee866f4481d6a2a8d4ce9b5af7de4b11a295990dd1ca7a9889a255bff345525
+DIST simd-0.1.1.crate 39577 SHA256 63b5847c2d766ca7ce7227672850955802fabd779ba616aeabead4c2c3877023 SHA512 ed58383bbee3d0a5bc537629cdb242d5ae8ff46d4e8911df16e34a9fe9da693f1347b89f77614d1835391f57c27176824c46feb9733de89915ed4709217466f2 WHIRLPOOL 2177fdbfb33203350e55258cf94ddd0861314e720d43147039db5b7fcb3028caeeef71a4759ba8aef59c5b3cb72cfeb05f806be3e9c6ecd36f07ec42a43e513d
+DIST simd-0.2.0.crate 35102 SHA256 7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0 SHA512 97538d8811d6627d5c8c32bb59783aaa906887fb320679144d50330e520e85bac7060d7d4e4e7074097ae8928aab66085500344bcd5c4dc8e195e339c7b4f2fb WHIRLPOOL 52adbf67f610bee4dfe4495d085f34aebeb5f87d3d7bf300c8c29bc38d92555f735fe04cc4930f6a6488eb3b89950da15627c7f654b05ab186afd5567f1d4179
+DIST strsim-0.6.0.crate 8500 SHA256 b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694 SHA512 43cbcf2cab7f91515f52f20719e8013cff23807ca79a9a69f1997ec1ba2eacf713d64c88e33f4c9ba852fb3dda4b87e943587ae4b6ff5bfbbb81deb6dbf76a97 WHIRLPOOL 5fa5b91b22ed2d5ba22da674568e5ea374fb05d722796030c3d5198aa42552f7bf47b51b54ea6d62b4e9bbcfd50bdc7ef450ac23e6e2e99dc00130b972b460ca
+DIST term_size-0.3.0.crate 9932 SHA256 e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209 SHA512 a466470372c09a6152f1fdaa3d631395410f4db938d0ba1db1695d66bf1620177f4dab4a9aade47de1d48019712072bfc91630cf4c088c56a5775f4d27dded8c WHIRLPOOL 2156de368b592c3c6f5bbafe787a8163880d8a86e19fa8e1b8fa3c184534ae8e54333455cfe8acc6fbda2a08a90ca42a655dc6af60c62262178950106ee432ba
+DIST textwrap-0.7.0.crate 13341 SHA256 f728584ea33b0ad19318e20557cb0a39097751dbb07171419673502f848c7af6 SHA512 4829ecb3a0829f202c53a58ae063ff39f8f5a0a7c031ad30435b73751d5c1d3ef607e4b469e15479f980862e5cd2c947fcdb2e676963f8556a156cf4215f06d1 WHIRLPOOL 1320d3e81e5e5963080e3a796080bbbf37813017cbe179b14b864c880f311327b0aff65ad788dc3f61942eb42b4541f350803589cdacf9ccdb7b3107de75ac87
+DIST thread_local-0.3.4.crate 11760 SHA256 1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14 SHA512 51fc5e1f5046fafe794128e6655c3ed5fa54446d9db151abb5da6e2599b6fb03200746ff4e6adffb6b8a04d015966fd4860ea3eac50bc169ec04ba33978f849d WHIRLPOOL 27c100a56cc3b1b43225fc76de150ff9835e391ec778de6039aef7d97fd2d86b7bb3734258656d6549866d3a596af9da4c0ce77855db955e69fb4480f8208a03
+DIST unicode-segmentation-1.2.0.crate 67562 SHA256 a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946 SHA512 724fb05d4c02926a535a3380f0a718e5ca0b61c71173efccee6780e878b3e890f11e7941cd970c6c1763ac756f31fe338b0dba2ff31db2aad29670bd6e8b9bab WHIRLPOOL 5dd692641038299fcdb66311adca2b5ddf5ae3f23de4c9a6cde2ff05d4475290d3f5c9d524a5af6496ec98fb106561bc81311bd2b7c05babd6d71af99226829a
+DIST unicode-width-0.1.4.crate 15283 SHA256 bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f SHA512 f06b243e533ab9c68d88ccd06a283dfff5fd13e9340cf11bfa74473fc9100bb704c34e7fb66919202a97e7d2ba2e7eed968eced02d557835a06e6a0166865ea3 WHIRLPOOL ddbb1fda0e2806a6e9d4c017b9c31acce44b97b3470c2992e424e105b801d7a5d44ac9a7e2b4f2e10c79c95cef0075c416f56db485b82095e0cc44e51f79897e
+DIST unreachable-1.0.0.crate 6355 SHA256 382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56 SHA512 054e0a471d1068b7703853d838c7c381ac6865ac1f8abae08747581e3754416ccec5b80a5b04fedbcd01e68bfeba286b849e3b8ea67bbe62444f2974655e4948 WHIRLPOOL bd159d16ef4d6bb5dcf715fb193b99bd744a50c56e6cdd689ab486b5a8f6a917ae3596ca143d9c5323ea882c23d5a1a033baca173d9f97b6493569cd896990e1
+DIST utf8-ranges-1.0.0.crate 8599 SHA256 662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122 SHA512 da498433597582970860db1c66ff1cc2ed8b0e2bf816e6aabdb40424ec03c3f28e6ca5e7592e464442004077735dca4144acd13c8f6a2e799d67504699422643 WHIRLPOOL 58e23f2f0bbf86a8336dd16082fd0f00d32357b0ca1b3620634c54cf2678b7e27a1a8da91cc3d72fe8325e34fe3a06ba4e290bb71cae47d6ee8eb77b8599b59f
+DIST vec_map-0.8.0.crate 13742 SHA256 887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c SHA512 7ce0c05c0b410577b489adb4d35376bc2a55c6041ce50e011b78415e952b5fb7fcff89fdd00b95e086de742f26ff057e99e55585824bbc0482e0ac2134406520 WHIRLPOOL c8756c3aee87ddd37c2ed4bbe1bdaa27791cfdf59b613ac04b619139bde62f5da07830a9f92e71864e4dcc4498bcf5a77ba677f8ab507dc8cf55f4470b5c95e8
+DIST void-1.0.2.crate 2356 SHA256 6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d SHA512 1cc7d282600dc0164d7e410aa895d5dc99de1174991549c6733c94cc2027026517f66797751d737869eae58c560fa26edbf43f36b3015eb2fd99828fe40e0aa1 WHIRLPOOL a1e8bf644e79ce0bfcccc2b05ea357400fe6cb61bcd4adb0360b109affb866ec305b30a11549aa35b765fd0f32420e7d5cc741cfccd3c2263c60f1cf7acc0136
+DIST walkdir-1.0.7.crate 17883 SHA256 bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff SHA512 d5752c39c055dcd163bd74db3495a16e1865fd32e3f0cd779455fb818e78106ee4bdf0cbbcd36331f860c5ca8de658f848988a47194c5b9e130f28a77c4576d3 WHIRLPOOL 6cb9a8ea4803cc7d4bdae8294d44faf53a99f02526ba41cc80ac4cc189308ddc34fd7fbce996039b236c1bb8984e9876e06c478c12f2c0458f1919be7400153c
+DIST winapi-0.2.8.crate 455145 SHA256 167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a SHA512 115e6f027cdd4a56f77ca24f4ab249d2a6cac1e1f955c826a9b6ee05db4861790a533f5e674aebbb540370fff52ed41618c2cd7c906e73200e92df213109cebe WHIRLPOOL 3dce71a6927320e3882ba60a24630a9ba8d123b73d8da6b9330e422580af9d9b0a96748d7368767e3712185877ddec6978b924d40428341c4de19b76ed375af4
+DIST winapi-build-0.1.1.crate 669 SHA256 2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc SHA512 8b0a239e205a5368892f41c870a8a7ea16e3468c364b03382bef7fa3a2e7159b09c07661e95b1227578f6d72c14879daa4444b28c51ae20ef15d985d59ca5a77 WHIRLPOOL 036080513776fe806cc9dd68bbf5b797776b98ca9fdceaa4bd77c87c66d2e5bd0eec8b0e7f0100dab8f2ced754da058f67e651002c786b4992c2be416a5d52ff
+EBUILD ripgrep-0.5.2.ebuild 896 SHA256 9aecaa1db07ed81e0214df0a27cabde014ea1bb850de62f66e30594f28823991 SHA512 324534cbe4567dbb79c22cbf55ae1d6b064ef980040b749b808579956849e829ac1afdfd5e0c1949c19fa840386a7adc752e2308cb7943bcaf7d74371af6d0cb WHIRLPOOL 2a46991e5e81d2c7721c0371c1c4c61ac4de431ef2ac9871663f104d5d29da0a293e632b6fa7262e4f52974e5d03b8296140fc617575fdc6b04d6b6453212907
+EBUILD ripgrep-0.6.0-r1.ebuild 1244 SHA256 e41516304780a342e06e5d5e4f876d893abc8a90f57725f7a1e9d195978e8f39 SHA512 1cf77e3b841efa4e00b522e4bb8daa02d490393d17c4d34b4a64ea3ae58804d9020d8cd7e5f272501ee2296d17d483dc8cf45fc4b9ffbc10cc6fa598b77064ba WHIRLPOOL bb97f8605cd9c529fca7f9d384e9059f63a3af66790b193abb0b4a733224ac4eadba0852a5d4d6e67b0af83558dc2cb9d6a9f70324628892468d87fb05af169b
+MISC ChangeLog 1216 SHA256 3d967bc66c95e23bf577cfabe17dbc4783cdbbeb1f8a4aefdb1c1d1ad8626cac SHA512 8767c09bb2cfd50f755b98b4a86cca864bcd9d99b2516995456141f20a755bd69ac4c9d3c0e2383232fd00b621d9303cbc0d84e4f8a1d878a43cce8d236bb1a4 WHIRLPOOL ec18b3e66ce8c8ce7a004b6ee568d7be178fd5d5bbc547d76d9b4fb345c164176d293f18702c1037cbba41077018d73bc695a8cd50c64a6992077f8889bd3f34
+MISC metadata.xml 339 SHA256 2bf4aa2d3198a58a12a261b549da995a74f5e765b19ced77c275923dc17125cd SHA512 4501066b64cc47d58915b452027ea603d319b0eae3d9bcd45642f16bcca3e5bbba3fc998fe8501ce63c4717ccf5f404392b98b54d53b93c648e8c8de116141ef WHIRLPOOL 8324e194fb3165cee2231ad3b3198d92e21f59506777cd87ad6cabe93150b33d76c49b41f23feb611c430fc34ca42f5379936675004dd57251d9a63a4406087f
diff --git a/sys-apps/ripgrep/metadata.xml b/sys-apps/ripgrep/metadata.xml
new file mode 100644
index 000000000000..7cecc57b17f3
--- /dev/null
+++ b/sys-apps/ripgrep/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 type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">BurntSushi/ripgrep</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/ripgrep/ripgrep-0.5.2.ebuild b/sys-apps/ripgrep/ripgrep-0.5.2.ebuild
new file mode 100644
index 000000000000..ffb5e3686d04
--- /dev/null
+++ b/sys-apps/ripgrep/ripgrep-0.5.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="a search tool that combines the usability of ag with the raw speed of grep"
+HOMEPAGE="https://github.com/BurntSushi/ripgrep"
+#SRC_URI="https://github.com/BurntSushi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+# custom tarball bundling all deps and index, otherwise cargo fetches from the network
+SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.xz"
+
+LICENSE="|| ( MIT Unlicense )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ dev-util/cargo
+ >=dev-lang/rust-1.11
+"
+
+src_prepare() {
+ default
+
+ # move cache dir where cargo expects it
+ mv .cargo "${HOME}" || die
+}
+
+src_compile() {
+ cargo build --release --verbose || die
+}
+
+src_test() {
+ cargo test || die "tests failed"
+}
+
+src_install() {
+ dobin target/release/rg
+ doman doc/rg.1
+ dodoc CHANGELOG.md README.md
+}
diff --git a/sys-apps/ripgrep/ripgrep-0.6.0-r1.ebuild b/sys-apps/ripgrep/ripgrep-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..5c82b23a1594
--- /dev/null
+++ b/sys-apps/ripgrep/ripgrep-0.6.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CRATES="
+aho-corasick-0.6.3
+ansi_term-0.9.0
+atty-0.2.2
+bitflags-0.9.1
+bytecount-0.1.7
+cfg-if-0.1.2
+clap-2.26.0
+crossbeam-0.2.10
+encoding_rs-0.6.11
+env_logger-0.4.3
+fnv-1.0.5
+fs2-0.4.2
+kernel32-sys-0.2.2
+lazy_static-0.2.8
+libc-0.2.29
+log-0.3.8
+memchr-1.0.1
+memmap-0.5.2
+num_cpus-1.6.2
+regex-0.2.2
+regex-syntax-0.4.1
+same-file-0.1.3
+simd-0.1.1
+simd-0.2.0
+strsim-0.6.0
+term_size-0.3.0
+textwrap-0.7.0
+thread_local-0.3.4
+unicode-segmentation-1.2.0
+unicode-width-0.1.4
+unreachable-1.0.0
+utf8-ranges-1.0.0
+vec_map-0.8.0
+void-1.0.2
+walkdir-1.0.7
+winapi-0.2.8
+winapi-build-0.1.1
+"
+
+inherit cargo
+
+DESCRIPTION="a search tool that combines the usability of ag with the raw speed of grep"
+HOMEPAGE="https://github.com/BurntSushi/ripgrep"
+SRC_URI="https://github.com/BurntSushi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ $(cargo_crate_uris ${CRATES})"
+
+LICENSE="|| ( MIT Unlicense )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=virtual/rust-1.17"
+
+src_test() {
+ cargo test || die "tests failed"
+}
+
+src_install() {
+ cargo_src_install
+
+ doman doc/rg.1
+ dodoc CHANGELOG.md README.md
+
+ insinto /usr/share/zsh/site-functions
+ doins complete/_rg
+}
diff --git a/sys-apps/rkflashtool/Manifest b/sys-apps/rkflashtool/Manifest
new file mode 100644
index 000000000000..e9ded9bc9e00
--- /dev/null
+++ b/sys-apps/rkflashtool/Manifest
@@ -0,0 +1,9 @@
+AUX rkflashtool-5.1-missing-version.h 149 SHA256 b7bd8e3c66170d5f6e6a68c5add677ad365e37b4121251de87ad29e7fdf06cd6 SHA512 9a8164d7b86ea2cbbddc55a19cf0af36bcb2f34f6b085c3dd4996e2182124fbefcd0ecf7bd8d515a53c5822024f7ab6275415c9b46888b99c99e657385a455f4 WHIRLPOOL 41faded05cc3cd0ada335503c3b8a2101cc7a3bf1b72d48616988e52cf6de9414dae0893aa3b570c053053969cc0d06b1b981c5449845fc4477d3ff6727c6067
+AUX rkflashtool-6.1-missing-version.h 149 SHA256 314e714dba63f2267dd1354a61187e63312eb2e32579da88efe614ff832ba595 SHA512 796cf5691b7594d1a88d7f685f880b6f56955251b6203f7493170929d3c2b0161aa92cd9ec638a01825c1dbbcdbe6dd217bf8640287074cd33978fe49d66e810 WHIRLPOOL 2292b6fa2a8b22e3bff5f4f6227a2186c16046211ac44380e0f04447cba5b4df8ef9546c463346a1a4a074e8a56927e387166d3aaf380e27086b8835d4f4145b
+DIST rkflashtool-5.1-src.tar.xz 10548 SHA256 b802b4bd634a614df23f45f65cda8620695282e2646fb5eacd6a69001a110ed6 SHA512 0dbe69dc7fc224e91e170d5630e770e82257121c2215c6e196b2a8450a9e22bab583b57de50acb9aaad223b9d216b731a92260638c648018c319917705983fb2 WHIRLPOOL 6b1de8a5365e55eadb21d2c96c229a2876b31ae9c4a9dade50bebb8eb4e2cc5642ce33213b150487ca546215d47d2cd062f73b958508a6569f3f85c8c396017d
+DIST rkflashtool-6.1-src.tar.xz 13924 SHA256 d005f6cc5653a8367e4cabdd6b736a7e6f1d4d8dbe0f2ad1e1ce878505b42dfa SHA512 d7054e61a706ed3e51539556a1441f64cb20a2dafa6f625df384cec9296bdee30714a1c98cfd69d2a656e370387a2bdb86c258fe6b1216bd9c57831ed3de8ea7 WHIRLPOOL 1693043748d70be4563f41cd225b9abea0ff35dc300c22e9d5d9dbde53e604c74bea60bdacda69eb5dae222f9c498456fc8c6ea826856c86c46cdd6e0bf15eb2
+EBUILD rkflashtool-5.1.ebuild 762 SHA256 b035c241cbfaa39dd4597bd6ffd795d5d837438f9f63e5efefce78eb67ceba93 SHA512 cee4148c91cb3e800cbbd5fee073dad21e1690e935b87509f298987193f2afab869aad2e61f936775b615126cddf487c338a09b84a41368c277cbd6d56804574 WHIRLPOOL e49293e37deedf9b19b82685bb7406ab26fba2876b22ca2a0673df7090fac83c7596b48224de7685fd50be03b6c4ad3ce19f171ea479a24b53dc560867e1ffac
+EBUILD rkflashtool-6.1.ebuild 756 SHA256 0d8df76afd118628636eb6eaaa93f495a636055ffdc7b2c3c8c25a61ab892466 SHA512 18792da7cbdb0e7ba48cc5576144075e302d4841f72ed8c6bfab4f791cb6a3953fea8cc0ee0ece4653f871f0955a25469b8e1e60c1da9e3db0a8a4301e34ff57 WHIRLPOOL c8c3d2020ffac93808d311a38e0fd945866bbc353aba84b3634e21125d49dbdceefc17aa736b68b5a4d78dfb7ea70e9e2d4fde69046c3098a655af174440921b
+MISC ChangeLog 2342 SHA256 e031d2c76e32ed2cca21a7fbe0d4a3dd3c05fc328cbdb16b3e1e6fcc6e92bc45 SHA512 aa5361031d124d2f2d0edde757b25513f3cf1799829d95f8d5781717fdee0057a7095471fdfda0e2492402137515a1d3184e7267fa7c1e0b7a6e3a94319a2051 WHIRLPOOL 24e6254e1bb61167f497845bfa84abd341040879c5ec5b4607a4642844d5f30fd09770fa9bbab51efbcdc2baa60d296c579b73e759885f80df8ee2c52c43d60b
+MISC ChangeLog-2015 663 SHA256 f626a9f7f54fd1da8b51a1c8f50a6771772a39ddbf568b8d62dd093672a11bc4 SHA512 3ca7b1fc24bc1d6f772efb38bf8ce976b2e20ad65b6b4a47c4063ea314c70d698dda2a19d2b143689972e8b5d204cb988fe974521cd2c710298457618c302f13 WHIRLPOOL cc1a215c10c98e1da26cc65dd334b3428ea59f3413393b9fd88f7fba35370d1c52e8715db77c9c5d259930e36f11f91010a27faf176d555782ef7510c3128364
+MISC metadata.xml 326 SHA256 90a30c12ba5b37534fc2dfeb90a567321586d928860312902615ba7bfa4e1729 SHA512 6e4a866ad207c35d073816d679dde5b7dba8cfee1c0f148db223a30446f981b6ab21f264de330c96c4ce9620109776b49d6c76f372a7412bff4ed5c0734923a5 WHIRLPOOL 585233f24ea467f9e5d8db539d50dbd8c2971b58f7a609d3ad5553b936ee5c93b3fe29aa4e9fb05b2d9529dcf7c6e1c6a1aeefd47b2756e3b3bda49df51247cf
diff --git a/sys-apps/rkflashtool/files/rkflashtool-5.1-missing-version.h b/sys-apps/rkflashtool/files/rkflashtool-5.1-missing-version.h
new file mode 100644
index 000000000000..bfffda893a2f
--- /dev/null
+++ b/sys-apps/rkflashtool/files/rkflashtool-5.1-missing-version.h
@@ -0,0 +1,5 @@
+#ifndef RKFLASHTOOL_VERSION_H
+#define RKFLASHTOOL_VERSION_H
+#define RKFLASHTOOL_VERSION_MAJOR 5
+#define RKFLASHTOOL_VERSION_MINOR 1
+#endif
diff --git a/sys-apps/rkflashtool/files/rkflashtool-6.1-missing-version.h b/sys-apps/rkflashtool/files/rkflashtool-6.1-missing-version.h
new file mode 100644
index 000000000000..8869154aeac0
--- /dev/null
+++ b/sys-apps/rkflashtool/files/rkflashtool-6.1-missing-version.h
@@ -0,0 +1,5 @@
+#ifndef RKFLASHTOOL_VERSION_H
+#define RKFLASHTOOL_VERSION_H
+#define RKFLASHTOOL_VERSION_MAJOR 6
+#define RKFLASHTOOL_VERSION_MINOR 1
+#endif
diff --git a/sys-apps/rkflashtool/metadata.xml b/sys-apps/rkflashtool/metadata.xml
new file mode 100644
index 000000000000..3da7a348a621
--- /dev/null
+++ b/sys-apps/rkflashtool/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 type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">rkflashtool</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/rkflashtool/rkflashtool-5.1.ebuild b/sys-apps/rkflashtool/rkflashtool-5.1.ebuild
new file mode 100644
index 000000000000..685e3259bfea
--- /dev/null
+++ b/sys-apps/rkflashtool/rkflashtool-5.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Tool for flashing Rockchip devices"
+HOMEPAGE="https://sourceforge.net/projects/rkflashtool/"
+SRC_URI="mirror://sourceforge/project/${PN}/${P}/${P}-src.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+S=${WORKDIR}/${P}-src
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}"
+
+src_prepare(){
+ cp "${FILESDIR}"/${P}-missing-version.h version.h || die
+ sed -i -e "s/CC =/CC ?=/"\
+ -e "s/CFLAGS =/CFLAGS ?=/"\
+ -e "s/LDFLAGS =/LDFLAGS ?=/" Makefile || die
+ tc-export CC
+}
+
+src_install(){
+ dodoc README
+ dobin ${PN} rkcrc rkflashtool rkmisc rkpad rkparameters rkparametersblock rkunpack rkunsign
+}
diff --git a/sys-apps/rkflashtool/rkflashtool-6.1.ebuild b/sys-apps/rkflashtool/rkflashtool-6.1.ebuild
new file mode 100644
index 000000000000..8b4518ba94ab
--- /dev/null
+++ b/sys-apps/rkflashtool/rkflashtool-6.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Tool for flashing Rockchip devices"
+HOMEPAGE="https://sourceforge.net/projects/rkflashtool/"
+SRC_URI="mirror://sourceforge/project/${PN}/${P}/${P}-src.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+S=${WORKDIR}/${P}-src
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}"
+
+src_prepare(){
+ cp "${FILESDIR}"/${P}-missing-version.h version.h || die
+ sed -i -e "s/CC =/CC ?=/"\
+ -e "s/CFLAGS =/CFLAGS ?=/"\
+ -e "s/LDFLAGS =/LDFLAGS ?=/" Makefile || die
+ tc-export CC
+}
+
+src_install(){
+ dodoc README
+ dobin rkcrc rkflashtool rkmisc rkpad rkparameters rkparametersblock rkunpack rkunsign
+}
diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
new file mode 100644
index 000000000000..e1f64bba1495
--- /dev/null
+++ b/sys-apps/rng-tools/Manifest
@@ -0,0 +1,16 @@
+AUX rng-tools-5-fix-noctty.patch 2069 SHA256 f88650613a41cf0d91807897215c6471db3c2c00c4445083800751c843028949 SHA512 7555185f529ade3cdcd277624820717ede9dff8c004a15786ed8b73c74b9300d71da2d8a51deda63b18f1af07ddbd18fe4a5693a147e189886370f359243251e WHIRLPOOL 4cf145f248396d7f689b1c2feaff88c3edb9e783600a7aaf083b0322bf07377846a35390e11f92869dd38ec68dbb6babacb2f4e3063b30d82685d3a0afc479c7
+AUX rng-tools-5-fix-textrels-on-PIC-x86.patch 2677 SHA256 71fac69129bf3ac6f54cabdd995db2946d5ccc279212de42608cea19fa3c2ada SHA512 8c7c6bced6e0982069ba6ef99c169609ff452a55c32543c25f198a59f81d4e976caf400867cb52bbe2996363f22943ff73c678427da43ad3a019bbe29bd29ce1 WHIRLPOOL 2346261e9891f77a48e8ea54e647fc77e40ec79d099597dec4fd06e265ac3a255eec8d6e2ed46ae00e90fd900998b48a6c3a963bb89d9b81e3cba24cefb7ba11
+AUX rng-tools-5-man-fill-watermark.patch 765 SHA256 f286419c4b3fbbb67c9099ba99c9dc0d17d379d86435d916a517fb7fc9598550 SHA512 8bc7a9903f9f77da2d55321605a2421bef27d8cedd3ea67e5547f4e59b85b3139b3cf269efe4c3abd767d87666e3e28b03e4fbf6984122febf45ea14af3332a0 WHIRLPOOL a8f26673d529147976d335732c1fdf5f7b845502f4d9eae664e38ac80c23066ef3bed53995d31be6996a9782d06371131239c8e2688f09705fe60c03fcbd9771
+AUX rng-tools-5-man-rng-device.patch 398 SHA256 c2553914e0551e1a349b8dfb65cf02d3db66cda9e6aba5046340a7a4f8340f17 SHA512 cd4c0cbcc32f6ace0f05c0dca82461c2a676a986c000850a422c3b509d79f22ddb98732749e63a1d9ec6d90db1745b7a163a590ada61f0ebcdde07b160647d3f WHIRLPOOL 375aca63b539d4c64c5ee4c85f289b2029db2d9b38d07f001135034b725323e74d70b94e49c86722521ac846c438a0bf818ff62581deea5c3b828c4f6ab73924
+AUX rng-tools-6-fix-noctty.patch 2188 SHA256 7a1594cd968621c579efaa77a6257cef038e3d7ff53a5c5a04cd508a16c221d0 SHA512 dff3d3ef81e847d378ca45531e4eaa81f4028b2b08adc17c68bba108cb4604f3bf13daa8b0e46ccb8aec2626ff8fd983038544508f3117828cecfbb282762116 WHIRLPOOL 2893eaa2c37a91770e465344a0051cec645d1d725f903f5a3297bb359f1e24d6a3d102aa3bb76c76c42f521695c5293d90c9022ebacd44f99efab41444c0aef9
+AUX rngd-confd-4.1 562 SHA256 cdbd39f7446f12a9b78e87e9f135cfd0f6f364c4fa4ade0c96084b85c32afc38 SHA512 45e0e9cbe0180162f659bf05c15ee99fb8c1b80274cd8744384ba7f791b1c9a46a63e81eea665b4f492c13b7d5cc1fdb6e524a49a25af77f3791f527b31f688b WHIRLPOOL 87634cea70a1c8ffa7598cc8b0d93c79578433cc21b58bb13bc9144502b9502e2c4f151bcf282ad4ccef44a931f1be5d1e87ff7b9b6d07cfa0a4c288b4172ec3
+AUX rngd-initd-r1-4.1 494 SHA256 3ad9a52d86e54eb755923242b1314584d5c66ab55221f6063a16c23477957a25 SHA512 8bf9a0bd25bcc9c1cc4eacdf875077208ba0899c626a55e57f055cc93b62e23a427e0622859c5b4a31c3aebe550b180777528b43942a3efb2e2c0b4243c3c9c6 WHIRLPOOL 33365650149523b34c6ae38614038ffafd1393a1ec5c967d0e9f6b89557b84f8ebb45c76455844dd73fd0d3cb1768de69c6b9857c4b48015ce351bd61803a4d6
+AUX rngd.service 133 SHA256 a05b1075157d39302106221594e1640479fae5dee4595de09442901a3a2d1648 SHA512 51e9ea84b624cda8d3689d6a9a8d60da4a556aa9d2a1a04e698d9a1490717aa47172e152c93711f8d04be8a5b68b1dfd568a762bd8ee7219afb7cdfff15657d2 WHIRLPOOL 093b0cd19a147abd9fc10f366c2c5a167d31b839d755cf2e56f6ae35409b6eb764db0651858d20dc95b71fe1d90b4ca33bde88053c80e40665613d132357366a
+AUX test-for-argp.patch 1245 SHA256 56824e3d80c931c3f907486cd8bf7b5a3bcc20fa507f452a9c63286443c06756 SHA512 0fe4b37eb3d2e93ff9ce17aed8cfcaa29c7f04289ba692d10fd0f8ef6d9b1e5f64a5734a508aea548f13fd00217972a68bcbeaf6977e763087ad20c19d456ed6 WHIRLPOOL c515fc9a8adf6bd49a4a622c05881e9ad22b514634c25d4f894be96d46f67a886bdcc092cafa57521e17d53bba1f1a3995dc673c24292b0aca276792e575073b
+DIST rng-tools-5.tar.gz 122182 SHA256 60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e SHA512 58047c37cad4f5f1210b696e4dba122878f78e57d05d9cb822f79234240ecce31efd2d39061fea1eb5b2e81d48d8c3bf6b92d06451f1ce5d5db7117704e89c50 WHIRLPOOL 073dbeb9d27189db44658a9f25657b93a320b125fbfc8230f7ce7849b8e7c1f7802b4c3a53de3417525b02739194fab8a6e5eb03d5db317a23deb275d72fbb21
+DIST rng-tools-6.tar.gz 26024 SHA256 6d9c3f72824d1ea15dd2a80bfcf71f6a73c8843c6344f7f774a97a4ca7641b4c SHA512 2aea947c4dba5e8c4df33396957f7224b62200be0e3d10aac08c84155fa473a67df5f49e07a07b2cbea4dfd772d90c1b194e8fce3d8eea762463a7f4a16d6ce4 WHIRLPOOL 4e53c626288219a7cb9c94cf29d22878df5ad3298ca5ebedea46978e519d9b5b0ad94f765e217563105258f4b02b72b0033e551a7d37939ced9ca5d92f0a1048
+EBUILD rng-tools-5-r2.ebuild 1098 SHA256 a6e9a693947fdcff18969be0ea392e8171cab38be6367c6c30cda84f24137613 SHA512 b4a612e14a4e556c57c182a5e709bf497eb11c2b9ca850ca1dd32f94c313157d3273b02715eef907b570d5aaaa06e9786ce33f9085f83423d61fb5af4bbe1b52 WHIRLPOOL d27df6207498055f147981ff7b0f63c30fc1e0d458c8ab550829de00396b7772a5c50fa2d7f057764a35092ec3e30c45a79d5a48dfd94568bdc8e15dfceab603
+EBUILD rng-tools-6.ebuild 1114 SHA256 b783fda920969b210d53a6b8d84f519ded1bfa5be641b2390a93732a15205f91 SHA512 e218c2147b5879418647e85103d7c0bd3f5fe3fcfd42855d64441c1228eb3a2caf462b2b4e553125e88374db64c94894497645421606853968ccbb4ddb2d5f38 WHIRLPOOL fa5a977e4949cdb582902703e3212d8feea462f27c344a5782287b4da1eeda4f58bca03ecb68345da9b5b94a34c62377867a257f60c1ed504601229b453e72d0
+MISC ChangeLog 8067 SHA256 a232bfd53ae71bba942c0065e502fa2087a6af4b14bc5664cb3177c9e0f4ae40 SHA512 b9143f297136c37d810755bb899b4353008d2982eff54d29de73f62a9790506468ba0034206877f894fe681effed2921bf9e8af54e771f46ef60d288955aecc5 WHIRLPOOL 5c62a5780931f8d50387a08076410aa815d6c7637260eec4f69b17a1ea6f51278d3d15786cefda3213527f47816f9dfaa2e296ed240bb6a543dcb70c0ecd2383
+MISC ChangeLog-2015 10419 SHA256 429b14666b303f77b8081e33cb4d2bc4da29c06af72895b37cf17ae3658381ce SHA512 9ef68cdfe956b4918d101ec0cfe3a69a9cf748b52326976edf234b58a48eb8c48fdb32b011fa8fe5e3d0cde8576b212b24d5b4003f87a4e4b327dc2cc0ff59ea WHIRLPOOL 525eb6a7d62820bda06d801c2721e2c38a9ca8af5d26d961c57a9d62c26a8dfec1ab08573f4237f3e6f4ee576de03d6d63a5514424011e773541f29c2b8e3915
+MISC metadata.xml 435 SHA256 853adcedbd25773649ea54cda891d50ddb76210f8a09dccc387a7dd8f656d711 SHA512 8e6882d47d45613afd58beaa45cb41134740efab0c34381789eaabd5938441e98aa59fde0efb922766075ecf3f608b40c632bc4e4cdf786d256d954e502296b7 WHIRLPOOL 6dc3ea1f0a1273a6f33e76898b298b1b0e3cb827bf436380b9ab15f425b47f7e16ec1c2d95f2232c2012fa41da4c0992a3d7598ed844bd1e8f2611559b90d3ca
diff --git a/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch b/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
new file mode 100644
index 000000000000..568ebe04589d
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
@@ -0,0 +1,45 @@
+From: Gokturk Yuksek <gokturk@binghamton.edu>
+Subject: [PATCH] Fix rngd to open the entropy source with 'O_NOCTTY' flag
+
+When start-stop-daemon starts a rngd instance configured to use a tty
+device as its entropy source, the application crashes due to not being
+able to read from the entropy device. This is caused by
+start-stop-daemon calling setsid() before executing rngd, which
+disassociates the controlling terminal. When rngd attempts to open a
+hardware entropy source that's a tty device, per POSIX rules, the
+device becomes the controlling terminal for the process. Then rngd
+calls daemon(), which internally calls setsid(), and consequently
+disassociates the controlling terminal for the child. Meanwhile the
+parent rngd process exits. This results in tty device hanging up. By
+looking at the strace logs attached to the bug, it can be observed
+that although the parent rngd process is able to read() from the
+entropy source successfully, further attempts to read() by the child
+rngd process return 0. This complies with the POSIX, which states that
+read() calls on a hung up terminal shall return 0.
+
+Note that when rngd is started without start-stop-daemon, this problem
+does not happen because at the time of opening the entropy source rngd
+already has a controlling terminal.
+
+Prevent the entropy source from becoming the controlling terminal by
+passing 'O_NOCTTY' flag to open() when opening an entropy source. This
+flag prevents a tty device from becoming the controlling terminal for
+a process without a controlling terminal at the time of open().
+
+Thanks to John Bowler <jbowler@acm.org> for debugging the problem and
+pinpointing the issue as well as confirming the fix.
+
+Gentoo-Bug-URL: https://bugs.gentoo.org/556456
+Reported-By: John Bowler <jbowler@acm.org>
+
+--- a/rngd_entsource.c
++++ b/rngd_entsource.c
+@@ -175,7 +175,7 @@
+ */
+ int init_entropy_source(struct rng *ent_src)
+ {
+- ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
++ ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY | O_NOCTTY);
+ if (ent_src->rng_fd == -1) {
+ return 1;
+ }
diff --git a/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch b/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch
new file mode 100644
index 000000000000..5fa5f0b4ecf7
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch
@@ -0,0 +1,100 @@
+From: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+Subject: [PATCH] Fix assemby textrels on rdrand_asm.S on PIC x86
+
+This patch updates the fixes in the assembly in rdrand_asm.S in
+sys-apps/rng-tools-5 so it won't generate textrels on PIC systems.
+The main fixes are in the use of leal in SETPTR for such systems, the rest is
+the usual PIC support stuff.
+
+This should fix Gentoo bug #469962 and help fix #518210
+
+This patch is released under the GPLv2 or a higher version license as is the
+original file as long as the author and the tester are credited.
+
+Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=469962
+Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=518210
+Upstream-status: Not sent yet
+Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+Reported-by: cilly <cilly@cilly.mine.nu>
+Reported-by: Manuel Rüger <mrueg@gentoo.org>
+Tested-by: Anthony Basile <blueness@gentoo.org>
+
+--- rng-tools/rdrand_asm.S
++++ rng-tools/rdrand_asm.S
+@@ -2,6 +2,7 @@
+ * Copyright (c) 2011-2014, Intel Corporation
+ * Authors: Fenghua Yu <fenghua.yu@intel.com>,
+ * H. Peter Anvin <hpa@linux.intel.com>
++ * PIC code by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+@@ -174,7 +175,19 @@
+ jmp 4b
+ ENDPROC(x86_rdseed_or_rdrand_bytes)
+
++#if defined(__PIC__)
++#define INIT_PIC() \
++ pushl %ebx ; \
++ call __x86.get_pc_thunk.bx ; \
++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
++#define END_PIC() \
++ popl %ebx
++#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr
++#else
++#define INIT_PIC()
++#define END_PIC()
+ #define SETPTR(var,ptr) movl $(var),ptr
++#endif
+ #define PTR0 %eax
+ #define PTR1 %edx
+ #define PTR2 %ecx
+@@ -190,6 +203,7 @@
+ movl 8(%ebp), %eax
+ movl 12(%ebp), %edx
+ push %esi
++ INIT_PIC()
+ #endif
+ movl $512, CTR3 /* Number of rounds */
+
+@@ -280,6 +294,7 @@
+ movdqa %xmm7, (7*16)(PTR1)
+
+ #ifdef __i386__
++ END_PIC()
+ pop %esi
+ pop %ebp
+ #endif
+@@ -294,6 +309,7 @@
+ push %ebp
+ mov %esp, %ebp
+ movl 8(%ebp), %eax
++ INIT_PIC()
+ #endif
+
+ SETPTR(aes_round_keys, PTR1)
+@@ -323,6 +339,7 @@
+ call 1f
+
+ #ifdef __i386__
++ END_PIC()
+ pop %ebp
+ #endif
+ ret
+@@ -343,6 +360,16 @@
+
+ ENDPROC(x86_aes_expand_key)
+
++#if defined(__i386__) && defined(__PIC__)
++ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
++ .globl __x86.get_pc_thunk.bx
++ .hidden __x86.get_pc_thunk.bx
++ .type __x86.get_pc_thunk.bx, @function
++__x86.get_pc_thunk.bx:
++ movl (%esp), %ebx
++ ret
++#endif
++
+ .bss
+ .balign 64
+ aes_round_keys:
diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch b/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch
new file mode 100644
index 000000000000..ea249a5ebdfb
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/555094
+
+patch by Gokturk Yuksek <gokturk@binghamton.edu>
+
+--- a/rngd.8.in
++++ b/rngd.8.in
+@@ -66,7 +66,9 @@
+ .TP
+ \fB\-W\fI n\fR, \fB\-\-fill\-watermark=\fInnn\fR
+ Once we start doing it, feed entropy to \fIrandom-device\fR until at least
+-\fIfill-watermark\fR bits of entropy are available in its entropy pool (default: 2048).
++\fIfill-watermark\fR bits of entropy are available in its entropy pool.
++By default, this value is set to 75% of the entropy pool size or 2048 bits
++if the entropy pool size couldn't be determined.
+ Setting this too high will cause \fIrngd\fR to dominate the contents of the
+ entropy pool. Low values will hurt system performance during entropy
+ starves. Do not set \fIfill-watermark\fR above the size of the
diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch b/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch
new file mode 100644
index 000000000000..82a0cf295765
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/555106
+
+patch by Gokturk Yuksek <gokturk@binghamton.edu>
+
+--- a/rngd.8.in
++++ b/rngd.8.in
+@@ -59,7 +59,7 @@
+ .TP
+ \fB\-r\fI file\fR, \fB\-\-rng-device=\fIfile\fR
+ Kernel device used for random number input
+-(default: /dev/hwrandom)
++(default: /dev/hwrng)
+ .TP
+ \fB\-s\fI nnn\fR, \fB\-\-random-step=\fInnn\fR
+ Number of bytes written to random-device at a time (default: 64)
diff --git a/sys-apps/rng-tools/files/rng-tools-6-fix-noctty.patch b/sys-apps/rng-tools/files/rng-tools-6-fix-noctty.patch
new file mode 100644
index 000000000000..e915150adb58
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-6-fix-noctty.patch
@@ -0,0 +1,45 @@
+From: Gokturk Yuksek <gokturk@binghamton.edu>
+Subject: [PATCH] Fix rngd to open the entropy source with 'O_NOCTTY' flag
+
+When start-stop-daemon starts a rngd instance configured to use a tty
+device as its entropy source, the application crashes due to not being
+able to read from the entropy device. This is caused by
+start-stop-daemon calling setsid() before executing rngd, which
+disassociates the controlling terminal. When rngd attempts to open a
+hardware entropy source that's a tty device, per POSIX rules, the
+device becomes the controlling terminal for the process. Then rngd
+calls daemon(), which internally calls setsid(), and consequently
+disassociates the controlling terminal for the child. Meanwhile the
+parent rngd process exits. This results in tty device hanging up. By
+looking at the strace logs attached to the bug, it can be observed
+that although the parent rngd process is able to read() from the
+entropy source successfully, further attempts to read() by the child
+rngd process return 0. This complies with the POSIX, which states that
+read() calls on a hung up terminal shall return 0.
+
+Note that when rngd is started without start-stop-daemon, this problem
+does not happen because at the time of opening the entropy source rngd
+already has a controlling terminal.
+
+Prevent the entropy source from becoming the controlling terminal by
+passing 'O_NOCTTY' flag to open() when opening an entropy source. This
+flag prevents a tty device from becoming the controlling terminal for
+a process without a controlling terminal at the time of open().
+
+Thanks to John Bowler <jbowler@acm.org> for debugging the problem and
+pinpointing the issue as well as confirming the fix.
+
+Gentoo-Bug-URL: https://bugs.gentoo.org/556456
+Reported-By: John Bowler <jbowler@acm.org>
+
+--- rng-tools-rng-tools-6/rngd_entsource.c
++++ rng-tools-rng-tools-6/rngd_entsource.c
+@@ -162,7 +162,7 @@
+ struct sysfs_attribute *rngavail;
+ char buf[16];
+
+- ent_src->rng_fd = open(ent_src->rng_fname, O_RDONLY);
++ ent_src->rng_fd = open(ent_src->rng_fname, O_RDONLY | O_NOCTTY);
+ if (ent_src->rng_fd == -1) {
+ message(LOG_DAEMON|LOG_DEBUG, "Unable to open file: %s", ent_src->rng_fname);
+ return 1;
diff --git a/sys-apps/rng-tools/files/rngd-confd-4.1 b/sys-apps/rng-tools/files/rngd-confd-4.1
new file mode 100644
index 000000000000..77e5db583458
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-confd-4.1
@@ -0,0 +1,22 @@
+# /etc/conf.d/rngd
+
+# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
+
+# If a single device is preferred, then specify it here, otherwise we will
+# search for suitable devices.
+#DEVICE=
+
+# Random step (Number of bytes written to random-device at a time):
+STEP=64
+
+# Should TPM be avoided?
+# NO_TPM=0
+
+# Should RDRAND be avoided? Please note that unless this is commented
+# out, RDRAND _will_ be disabled, as any value will cause it to be
+# disabled.
+# NO_DRNG=1
+
+# Fill watermark
+# 0 <= n <= `sysctl kernel.random.poolsize`
+WATERMARK=2048
diff --git a/sys-apps/rng-tools/files/rngd-initd-r1-4.1 b/sys-apps/rng-tools/files/rngd-initd-r1-4.1
new file mode 100644
index 000000000000..b7777ebab71c
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-initd-r1-4.1
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ after urandom
+ provide entropy
+}
+
+command=/usr/sbin/rngd
+pidfile="/var/run/${SVCNAME}.pid"
+command_args="--pid-file ${pidfile} --background --random-step ${STEP:-64} ${NO_TPM:+--no-tpm=1} \
+ ${NO_DRNG:+--no-drng=1} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}"
+start_stop_daemon_args="--wait 1000"
+retry="SIGKILL/5000"
diff --git a/sys-apps/rng-tools/files/rngd.service b/sys-apps/rng-tools/files/rngd.service
new file mode 100644
index 000000000000..04793437e2d7
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+
+[Service]
+ExecStart=/usr/sbin/rngd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/rng-tools/files/test-for-argp.patch b/sys-apps/rng-tools/files/test-for-argp.patch
new file mode 100644
index 000000000000..4ed2aa40b6df
--- /dev/null
+++ b/sys-apps/rng-tools/files/test-for-argp.patch
@@ -0,0 +1,43 @@
+On glibc systems, argp is provided by libc. However, on
+uclibc and other systems which lack argp in their C library,
+argp might be provided by a stand alone library, libargp.
+This patch adds tests to the build system to find who provides
+argp.
+
+X-Gentoo-Bug: 292191
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
+Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,6 +47,28 @@
+ dnl Checks for optional library functions
+ dnl -------------------------------------
+
++dnl First check if we have argp available from libc
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <argp.h>],
++ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
++ )],
++ [libc_has_argp="true"],
++ [libc_has_argp="false"]
++)
++
++dnl If libc doesn't provide argp, then test for libargp
++if test "$libc_has_argp" = "false" ; then
++ AC_MSG_WARN("libc does not have argp")
++ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
++
++ if test "$have_argp" = "false"; then
++ AC_MSG_ERROR("no libargp found")
++ else
++ LIBS+=" -largp"
++ fi
++fi
++
+ dnl -----------------
+ dnl Configure options
+ dnl -----------------
diff --git a/sys-apps/rng-tools/metadata.xml b/sys-apps/rng-tools/metadata.xml
new file mode 100644
index 000000000000..6a6818baee38
--- /dev/null
+++ b/sys-apps/rng-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>
+<maintainer type="person">
+ <email>gokturk@gentoo.org</email>
+ <name>Göktürk Yüksek</name>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">gkernel</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/rng-tools/rng-tools-5-r2.ebuild b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
new file mode 100644
index 000000000000..0e193c1e76b5
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools systemd toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="http://gkernel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gkernel/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc x86"
+IUSE="selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+ dev-libs/libgpg-error"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-rngd )"
+
+src_prepare() {
+ echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+ epatch "${FILESDIR}"/test-for-argp.patch
+ epatch "${FILESDIR}"/${P}-fix-textrels-on-PIC-x86.patch #469962
+ epatch "${FILESDIR}"/${P}-man-fill-watermark.patch #555094
+ epatch "${FILESDIR}"/${P}-man-rng-device.patch #555106
+ epatch "${FILESDIR}"/${P}-fix-noctty.patch #556456
+ eautoreconf
+
+ sed -i '/^AR /d' Makefile.in || die
+ tc-export AR
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd
+ newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
+ systemd_dounit "${FILESDIR}"/rngd.service
+}
diff --git a/sys-apps/rng-tools/rng-tools-6.ebuild b/sys-apps/rng-tools/rng-tools-6.ebuild
new file mode 100644
index 000000000000..3a559236e0c7
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils autotools systemd toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="https://github.com/nhorman/rng-tools"
+SRC_URI="https://github.com/nhorman/${PN}/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86"
+IUSE="selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+ dev-libs/libgpg-error"
+RDEPEND="${DEPEND}
+ sys-fs/sysfsutils
+ selinux? ( sec-policy/selinux-rngd )"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+ "${FILESDIR}"/test-for-argp.patch
+ "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962
+ "${FILESDIR}"/${PN}-5-man-fill-watermark.patch #555094
+ "${FILESDIR}"/${PN}-6-fix-noctty.patch #556456
+)
+
+src_prepare() {
+ echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+ default
+ eautoreconf
+
+ sed -i '/^AR /d' Makefile.in || die
+ tc-export AR
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd
+ newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
+ systemd_dounit "${FILESDIR}"/rngd.service
+}
diff --git a/sys-apps/roccat-tools/Manifest b/sys-apps/roccat-tools/Manifest
new file mode 100644
index 000000000000..d57fb1f37f44
--- /dev/null
+++ b/sys-apps/roccat-tools/Manifest
@@ -0,0 +1,8 @@
+AUX README.gentoo 858 SHA256 4d7ee8978e4e08443eda0ce084db65d5caa99ae22fa8fc25956b9cd712aaf117 SHA512 3f88197dc83d4bf7e3cb8fd71079754ffa355ddf5fcf151304ae439090da44b3bdef3ed9deab44b36ffffb4b28ded2a71b1abffe5d3e1aa87f56bfa264920a7b WHIRLPOOL 2279ce5d4873c8c36e2bf6f433c62ba2eb21fce1b69069918a81583c9dfcafaf9b652f4b4c9e7f0d538af00193f52e5b0eaed29da5d52c2e9108177f847caeb2
+DIST roccat-tools-5.1.1.tar.bz2 3564442 SHA256 fe62bd1242a6343a01687740eb2c6750bb1987fcc6642b7984a6ae5375f6d8fd SHA512 c98469201be55ab7b534dc2b5ae43cd55c7a013e4bf0fd93f23c646f14de78daa2df3277d5f29b72076729b5c9ee07541ee22f0d51c2e5d9bd5c9f05da94fb4d WHIRLPOOL 025097627386897487c040f530812b85f736e7e18f39b03a4e4468e6fffe98b45996ae82673362d18ae30a2e5ae874585b15fcfe50106ff3a80ad3351114929d
+DIST roccat-tools-5.7.0.tar.bz2 3737735 SHA256 a6e21315c06e072fcea79c185518c8d2c8f19ed9681633613f26085319bdfd95 SHA512 209f9fa5302806a2d2681077e990a39a4913d47b82e73f9acd86f734affd8b3a7c0087e815e5cc1dfec1787d868d09b87211d9c2a90f2ced67c150eec1b2d290 WHIRLPOOL d2e7beba83de1c4a75827fb684a71528ad2f4a094083b3fa18e6af27969d0ee3f12b33c0e3c698032293df643d5b8c6262a2b0b2089adfd59780c1ac4a4d6ea8
+EBUILD roccat-tools-5.1.1.ebuild 2003 SHA256 fdb3e1d291f31c06bf530e85ed7083ea9a94ab852b73114cfe4d73e4350f8b5b SHA512 d0544ce6f8197fda801b3917ceb19550071c474b2eceb55844f7c802152025de9bd1aac690eb5ba3ddc17b29c95ddef7e33c4b376a75c589f2083c6b8101cad4 WHIRLPOOL 053d29ce712a49b0e880b07603c4932b5ec973bf5f89608e03c4e72d43b833e7d6c582bc05b25ef3447937c896a4729e82ab5dae7188017e281fffc02aaaf7c0
+EBUILD roccat-tools-5.7.0.ebuild 2444 SHA256 d09a5b1036f27cfa5a25e96815fd7c5eef86a8c87ced461dace532627d01d07a SHA512 e1f5502c88f00ba9b109d2f85fe985f0ff1ce849dee9f46df57a7ae74bc1dc806dd8ba86be294b8b5edf4654aeece1e82fe734f4b232949388903f33e57fe107 WHIRLPOOL 96ebf842f3ad79d92cd399e6437d9461953fa7f0f9e0ade424527ac3e5b5a8997e78595d64a58294c0509709d97664ab0947da7ca21c202d862a1593cac1340e
+MISC ChangeLog 4285 SHA256 c9510954f99e556d92210265f35deeba1ce7bf449619c60130e6afef78068d16 SHA512 d43a81b1c5610e505e7c131fc24fe7d59092e6d2841175a096a1b65a025225e5e36556f4528e20a781f660f6c0a9ecfa86799375290df270a37fabee4ff9a7d3 WHIRLPOOL 4866c3b5041388e7110aa8f85e1889a73930247c783fafbe06e7e63bc25f9705b5b71b7a415ad816a34570e98861737ac4a7b9c99b5b39dc79ad7953c620af1b
+MISC ChangeLog-2015 4283 SHA256 235f418023686e4743b7a17d6ce417985c47478e9ab113110586cace1f751e1f SHA512 255f81530cf654a5ac93c803bf881904506b9e0349d0ef410a903af106a59379c0303ff9afd6f877d001c19c5eee3f5ac165f5609b2d65ada9c9268d9b054dfe WHIRLPOOL c73e0ba9dd0ce128e3cbde8037491f7146953eab0c4b6655f98fdb2f2b067716237324e7d0f15425e584a56631fe015020729d53d327338321f8fbb31f615886
+MISC metadata.xml 866 SHA256 7fcbeef01e4906ae86f5f2305a2bc3d04e596a5a7d9e88f911bee0ec69dbb6b5 SHA512 ec2e80bd2d28f56e7811636d3ccc01d841c08e4f7eb7eabd300bf12f9dcbdfa9ade2bd49bab87552de6bfd320ddc3791b438a7533239e987b80662f7d29abb12 WHIRLPOOL 58994a15c10de3f2b51f45227c679d8db2b714edf6906d97cc72c257d275d5ddd2c84179e238057ae78cc7902a052104401a0d277d7694cbdd40a72df1363f30
diff --git a/sys-apps/roccat-tools/files/README.gentoo b/sys-apps/roccat-tools/files/README.gentoo
new file mode 100644
index 000000000000..55bc7407e314
--- /dev/null
+++ b/sys-apps/roccat-tools/files/README.gentoo
@@ -0,0 +1,17 @@
+To allow users to use all features add them to the 'roccat' group
+To allow udev to detect your device without reboot, run
+# udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+*************************
+*** Upstream message: ***
+*************************
+* Some devices (Arvo, Kone) need uinput for some features. To use it as normal
+* user you can either create an extra group like uinput-users and add yourself
+* to this group (as described above) or reuse group roccat.
+* Create a file like /etc/udev/rules.d/90-uinput.rules containing the line
+* KERNEL=="uinput", GROUP="uinput-users", MODE="0660"
+* and replace the group name with your choice.
+
+* In addition, you need to enable CONFIG_INPUT_UINPUT in your kernel
+
+* Do a logout/login to apply your new group ownership and replug your device
+* and everything should work as expected.
diff --git a/sys-apps/roccat-tools/metadata.xml b/sys-apps/roccat-tools/metadata.xml
new file mode 100644
index 000000000000..4ae444c4978d
--- /dev/null
+++ b/sys-apps/roccat-tools/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dpisklov@gmail.com</email>
+ <name>Dmitry Pisklov</name>
+ <description>Proxy maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="input_devices_roccat_ryosmkfx">Enable support for Ryos Mk FX keyboard.</flag>
+ <flag name="input_devices_roccat_skeltr">Enable support for Skeltr keyboard.</flag>
+ <flag name="input_devices_roccat_sova">Enable support for Sova keyboard.</flag>
+ <flag name="input_devices_roccat_suora">Enable support for Suora keyboard.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">roccat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/roccat-tools/roccat-tools-5.1.1.ebuild b/sys-apps/roccat-tools/roccat-tools-5.1.1.ebuild
new file mode 100644
index 000000000000..1b618b09cd42
--- /dev/null
+++ b/sys-apps/roccat-tools/roccat-tools-5.1.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit readme.gentoo cmake-utils gnome2-utils udev user
+
+DESCRIPTION="Utility for advanced configuration of Roccat devices"
+
+HOMEPAGE="http://roccat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/roccat/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE_INPUT_DEVICES="
+ input_devices_roccat_arvo
+ input_devices_roccat_isku
+ input_devices_roccat_iskufx
+ input_devices_roccat_kiro
+ input_devices_roccat_kone
+ input_devices_roccat_koneplus
+ input_devices_roccat_konepure
+ input_devices_roccat_konepuremilitary
+ input_devices_roccat_konepureoptical
+ input_devices_roccat_konextd
+ input_devices_roccat_konextdoptical
+ input_devices_roccat_kovaplus
+ input_devices_roccat_kova2016
+ input_devices_roccat_lua
+ input_devices_roccat_nyth
+ input_devices_roccat_pyra
+ input_devices_roccat_ryosmk
+ input_devices_roccat_ryostkl
+ input_devices_roccat_savu
+ input_devices_roccat_tyon
+"
+IUSE="${IUSE_INPUT_DEVICES}"
+
+RDEPEND="
+ =dev-libs/libgaminggear-0.13*
+ x11-libs/gtk+:2
+ x11-libs/libnotify
+ media-libs/libcanberra
+ virtual/libusb:1
+ dev-libs/dbus-glib
+ virtual/libgudev:=
+ || ( dev-lang/lua:5.1 dev-lang/lua:0 )
+"
+
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup roccat
+}
+
+src_configure() {
+ local UDEVDIR="$(get_udevdir)"/rules.d
+ local MODELS=${INPUT_DEVICES//roccat_/}
+ mycmakeargs=(
+ -DDEVICES=${MODELS// /;} \
+ -DUDEVDIR="${UDEVDIR/"//"//}"
+ -DWITH_LUA=5.1
+ )
+ cmake-utils_src_configure
+}
+src_install() {
+ cmake-utils_src_install
+ local stat_dir=/var/lib/roccat
+ keepdir $stat_dir
+ fowners root:roccat $stat_dir
+ fperms 2770 $stat_dir
+ readme.gentoo_src_install
+}
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+pkg_postinst() {
+ gnome2_icon_cache_update
+ readme.gentoo_print_elog
+ ewarn
+ ewarn "This version breaks stored data for some devices. Before reporting bugs please delete"
+ ewarn "affected folder(s) in /var/lib/roccat"
+ ewarn
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/sys-apps/roccat-tools/roccat-tools-5.7.0.ebuild b/sys-apps/roccat-tools/roccat-tools-5.7.0.ebuild
new file mode 100644
index 000000000000..ddaecc9fce6f
--- /dev/null
+++ b/sys-apps/roccat-tools/roccat-tools-5.7.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit readme.gentoo-r1 cmake-utils gnome2-utils udev user
+
+DESCRIPTION="Utility for advanced configuration of Roccat devices"
+
+HOMEPAGE="http://roccat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/roccat/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_INPUT_DEVICES=(
+ input_devices_roccat_arvo
+ input_devices_roccat_isku
+ input_devices_roccat_iskufx
+ input_devices_roccat_kiro
+ input_devices_roccat_kone
+ input_devices_roccat_koneplus
+ input_devices_roccat_konepure
+ input_devices_roccat_konepuremilitary
+ input_devices_roccat_konepureoptical
+ input_devices_roccat_konextd
+ input_devices_roccat_konextdoptical
+ input_devices_roccat_kovaplus
+ input_devices_roccat_kova2016
+ input_devices_roccat_lua
+ input_devices_roccat_nyth
+ input_devices_roccat_pyra
+ input_devices_roccat_ryosmk
+ input_devices_roccat_ryosmkfx
+ input_devices_roccat_ryostkl
+ input_devices_roccat_savu
+ input_devices_roccat_skeltr
+ input_devices_roccat_sova
+ input_devices_roccat_suora
+ input_devices_roccat_tyon
+)
+
+IUSE="${IUSE_INPUT_DEVICES[@]}"
+
+RDEPEND="
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ >=dev-libs/libgaminggear-0.15.1
+ sys-apps/dbus
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ virtual/libgudev:=
+ virtual/libusb:1
+ input_devices_roccat_ryosmk? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
+ input_devices_roccat_ryosmkfx? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
+ input_devices_roccat_ryostkl? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+DOCS=( Changelog KNOWN_LIMITATIONS README )
+
+pkg_setup() {
+ enewgroup roccat
+
+ local model
+ for model in ${IUSE_INPUT_DEVICES[@]} ; do
+ use ${model} && USED_MODELS+="${model/input_devices_roccat_/;}"
+ done
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DDEVICES="${USED_MODELS/;/}"
+ -DUDEVDIR="$(get_udevdir)/rules.d"
+ -DWITH_LUA=5.1
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ local stat_dir=/var/lib/roccat
+ keepdir ${stat_dir}
+ fowners root:roccat ${stat_dir}
+ fperms 2770 ${stat_dir}
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ readme.gentoo_print_elog
+ ewarn
+ ewarn "This version breaks stored data for some devices. Before reporting bugs please delete"
+ ewarn "affected folder(s) in /var/lib/roccat"
+ ewarn
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/sys-apps/s390-tools/Manifest b/sys-apps/s390-tools/Manifest
new file mode 100644
index 000000000000..8fdbd4d7b828
--- /dev/null
+++ b/sys-apps/s390-tools/Manifest
@@ -0,0 +1,10 @@
+AUX s390-tools-1.23.1-build.patch 4719 SHA256 22c69cbce18acd9a6ce2c02549714f35930c1ba28f5c4a2a8da21098204fdaef SHA512 ffb379479276a86e6b23e495beed69ad4fe49ce82b2096323216a371feecdd7a4056db46328bfe8423da70bd42168b8e1e1c1588bc51019e7f0ac535dda5d6a7 WHIRLPOOL 6895d048367013ea3575c1de1c49e3efa16f427210a5adf1e64d5ca84b18d829ff207221b7bea3649a121851a56d6d51b183980162a6c70b3ecbc67ebc363951
+DIST e2fsprogs-1.41.3.tar.gz 4365234 SHA256 ce77edae680d090cb8275eca9be282bdbc5fbef028d7bf6f772fb4f04b578d7a SHA512 2ab8eafe00b1706658b45b024adca91c3c01970b5b1888b193df30feea84fe209f684df6a24afcad48109cabe451e22d41f29d24fb170bb564e472fe440f4b37 WHIRLPOOL 769695287adf4fd674dba00f7d66e0507dd862211ab3a3c48a1467fdbdee14c2ee6a444d1b5d9d125116f511a47dde465ef115c1b31b1a2bdd5a39a4f07f3ca2
+DIST linux-2.6.27.tar.bz2 50355835 SHA256 0e99bf9e83f4d1ae0c656741a84dfddfa9c4d2469cf35475f5939d02dc3e4393 SHA512 fcafcea4148e15ffacb57e4eef731d8a2655bba15c6445a84f7345579bd6b6b9a68ad1a44a58f78e78a619efd84ce79c63ce3de3931ae7857af647a06ac052e2 WHIRLPOOL 537aed46a0e37dbc90605f8bfcf05895933d384e1db9d7bbd3a9054d2867569749446f677e55ffd839677cbd04f6ca0eec06cc7eee9c6e63e7554e520d83fe5d
+DIST s390-tools-1.23.1.tar.bz2 625295 SHA256 11175b1d7d0c10832dc0295880656f9e10866f004c07770379052a9f7c6ffd8f SHA512 c1f0fe79cfcbf6217e1aba74172e7644eee25f8886b70885e8558ad48342d6b41b35cefd398c3f5ff430d382ea6103b93ed8f666f0038d4f5abc3c3bc787d0eb WHIRLPOOL 501e0233a1f463bd156b2ab199bc75a30fccb4630c62654c4769eb5592e88735bfb718eeaae22b130e380b91b0c16e28f526763263cebbb8ccc45e0fca350fd8
+DIST s390-tools-1.36.1.tar.bz2 827505 SHA256 010bfa8af71e1df6d9019891bde2b5067cc2b7786374f60541c1b1f71ca9e675 SHA512 83b3456bce8af0d5e1f6a1b96335809a21b676b2371ca101e5f588a18e0de65b8e15a9a973a7dcc2cad800341ecf5997e8230a68b9670751cdf1d6f8d59be22c WHIRLPOOL c38653d81dd11b3b14963185e9b59191d375b3d0aa4b7aed1539141027380f44b677fae12cc47bf79b9c4d4e767b1589c6f7fa57a10316d532ab2ad4efc4f6d2
+EBUILD s390-tools-1.23.1.ebuild 1513 SHA256 b3cfb44c5914341f61c6520bd76b9536688566f12be4227938805a063c982fe6 SHA512 244e154909692e5c910925364da070800e18785a28785882299bc545ffab1c1a68de4328119e1d71ed616bd8ea8eef101d60dd6ac5934baa871fdbb624ffa796 WHIRLPOOL 145edfb945a5d7a317b7d99a13a9da0f13e2dfdb4fde1455f6b8dc8bb50717603181ccbdddbbaf37e0fa186ad804a065614814a95aa15a79c08b8021d3ff4e0d
+EBUILD s390-tools-1.36.1.ebuild 1232 SHA256 ff250d474114f0dcdcac8aa667220a9ea01595037d8f2be37935a2b6b5c50633 SHA512 4f640a57f79ca19c5734478bc97c0894bc73b7adf2938c14a3a33723fc8e5088ff9a0e38360ea103ecef6846e4826b9451a5974b0a75d5a7aaab160bc19226a2 WHIRLPOOL 8d81fb0b9c84a41630011f103e4a70f4a88f1b7be5e90335936b7ba572b9d5a788c16cbfa00f7267bffb74097323f193cfa59c1b6aee117354430d5e95206d7a
+MISC ChangeLog 3293 SHA256 d3af65cd06a5cc194bfbb88f58ec4dff2543bb36fd52c045f62605aef3739252 SHA512 7c5b7ea11d7f9d10d69122fedd3674440cce182c8064ab84517ab73ac6ee84b13f35d4625496a150acb0cb2af79946f5437a09982c7fd6b1a2acb12089ae0140 WHIRLPOOL a2b8f94b2e457b5665a0402c264779bd80d0f08cd6beb2c04f9319097672ec790572f215444acd051ee4041069f84256917344d4301c3aa841603f4a39c040f4
+MISC ChangeLog-2015 5412 SHA256 482920253b1c1e10f94abdef993cc74f6deb9190afc9bd3be966104bc29cb0b9 SHA512 8222a11bd6a0ae67528e72984b260b0ee0a458e9915677ed5528cb3ddda89c372610d5c9952c4dae40b69da8e4bfc986efa5440bc0147bca3fb28119cce333d6 WHIRLPOOL 92dab73e68d9218d44ac0d45c1f1f2e1d362b6cfa8364bc0fe0cfee7c1f1ce366048d2b83f55d17b86d6daff69e9cb4d6aad17d5938b1733b0d88849c03b8a17
+MISC metadata.xml 795 SHA256 c87a5f6674cf702a3ce38bfd58261fd6e9620ebe7a2492e97fcfc1679b02fd33 SHA512 23cd50f27b3b968621713e813ca1a822afccd90beb2f5641344ddc7abd2418d153d86309b690d0d1a84c51b47bc92e57a253a0bdeb34f22b5883a26035a53074 WHIRLPOOL ed5bfb118f673db0e4ddb6deabdef4d054c2e303f040c8075e314ad889ba34516f2f661bc1e148d101d2f095e7caef8c4e0280d8587830ee361ee48025b78962
diff --git a/sys-apps/s390-tools/files/s390-tools-1.23.1-build.patch b/sys-apps/s390-tools/files/s390-tools-1.23.1-build.patch
new file mode 100644
index 000000000000..1733f13f78e0
--- /dev/null
+++ b/sys-apps/s390-tools/files/s390-tools-1.23.1-build.patch
@@ -0,0 +1,153 @@
+ - fix errors in subdir makes
+ - parallelize subdir runs
+ - cleanup flag handling
+
+--- a/Makefile
++++ b/Makefile
+@@ -9,19 +9,19 @@
+ vmconvert vmcp man mon_tools dasdinfo vmur cpuplugd ipl_tools \
+ ziomon iucvterm hyptop cmsfs-fuse qethqoat
+
+-all: subdirs_make
++SUB_DIRS_ALL = $(patsubst %,subdirs_all_%,$(SUB_DIRS))
++SUB_DIRS_CLEAN = $(patsubst %,subdirs_clean_%,$(SUB_DIRS))
++SUB_DIRS_INSTALL = $(patsubst %,subdirs_install_%,$(SUB_DIRS))
+
+-subdirs_make:
+- set -e ; for dir in $(SUB_DIRS) ; do \
+- cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH); cd ..; \
+- done
++all: $(SUB_DIRS_ALL)
+
+-clean:
+- set -e ; for dir in $(SUB_DIRS) ; do \
+- cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) clean; cd ..; \
+- done
++_subdir = $(patsubst subdirs_%,%,$@)
++subdir = $(shell expr $(_subdir) : '[^_]*_\(.*\)')
++subtarget = $(shell expr $(_subdir) : '\([^_]*\)_.*')
++subdirs_%:
++ $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) -C $(subdir) $(subtarget)
++
++clean: $(SUB_DIRS_CLEAN)
+
+ install:
+- set -e ; for dir in $(SUB_DIRS) ; do \
+- cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) install; cd ..; \
+- done
++ $(MAKE) $(SUB_DIRS_INSTALL)
+--- a/common.mak
++++ b/common.mak
+@@ -17,10 +17,10 @@
+ # Cross Compiling Support
+ CROSS_COMPILE =
+ AS = $(call echocmd," AS ",/$@)$(CROSS_COMPILE)as
+-LINK = $(call echocmd," LINK ",/$@)$(CROSS_COMPILE)gcc
++LINK = $(call echocmd," LINK ",/$@)$(CROSS_COMPILE)gcc $(CFLAGS) $(LDFLAGS)
+ LD = $(call echocmd," LD ",/$@)$(CROSS_COMPILE)ld
+ CC = $(call echocmd," CC ",/$@)$(CROSS_COMPILE)gcc
+-LINKXX = $(call echocmd," LINKXX ",/$@)$(CROSS_COMPILE)g++
++LINKXX = $(call echocmd," LINKXX ",/$@)$(CROSS_COMPILE)g++ $(CXXFLAGS) $(LDFLAGS)
+ CXX = $(call echocmd," CXX ",/$@)$(CROSS_COMPILE)g++
+ CPP = $(call echocmd," CPP ",/$@)$(CROSS_COMPILE)gcc -E
+ AR = $(call echocmd," AR ",/$@)$(CROSS_COMPILE)ar
+@@ -41,14 +41,13 @@
+ ZFCPDUMP_RD = zfcpdump.rd
+ export ZFCPDUMP_DIR ZFCPDUMP_IMAGE ZFCPDUMP_RD
+
+-CFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
+- -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
+- -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
+- -g $(OPT_FLAGS)
+-CXXFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
+- -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
+- -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
+- -g $(OPT_FLAGS)
++CFLAGS += $(WARNFLAGS) $(OPT_FLAGS)
++CXXFLAGS += $(WARNFLAGS) $(OPT_FLAGS)
++CPPFLAGS += \
++ -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
++ -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
++ -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR)
++export CPPFLAGS
+
+ # make G=1
+ # Compile tools so that gcov can be used to collect code coverage data.
+@@ -76,7 +75,7 @@
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+
+ %: %.o
+- $(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
++ $(LINK) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+ all:
+
+--- a/zfcpdump/ramdisk/Makefile
++++ b/zfcpdump/ramdisk/Makefile
+@@ -12,16 +12,14 @@
+
+ all: $(ZFCPDUMP_RD)
+
+-CFLAGS += -D_FILE_OFFSET_BITS=64
++CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I../../include
++LDFLAGS += -static
++LDLIBS += -lz
+
+ $(ZFCPDUMP_RD): zfcp_dumper
+ /bin/sh ./create_rd.sh $(ARCH)
+
+-zfcp_dumper: zfcp_dumper.o
+- $(CC) -o zfcp_dumper -static zfcp_dumper.o -lz
+-
+ zfcp_dumper.o: zfcp_dumper.c zfcp_dumper.h
+- $(CC) $(CFLAGS) -c -I../../include zfcp_dumper.c
+
+ install: $(ZFCPDUMP_RD)
+ /bin/sh ./create_rd.sh -i
+@@ -29,6 +27,3 @@
+ clean clobber:
+ /bin/sh ./create_rd.sh -r
+ rm -f *.o
+-
+-%.o: %.c
+- $(CC) $(CFLAGS) -c -o $@ $<
+--- a/zfcpdump_v2/Makefile
++++ b/zfcpdump_v2/Makefile
+@@ -6,12 +6,13 @@
+ LINUX_DIR := linux-$(LINUX_VERSION)
+ E2FSPROGS := e2fsprogs-1.41.3
+
+-CFLAGS += -D_FILE_OFFSET_BITS=64
++CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DGZIP_SUPPORT
++LDFLAGS += -static
++LDLIBS += -lz
+
+ all: zfcpdump.image
+
+ zfcpdump: zfcpdump.c zfcpdump.h
+- $(CC) $(CFLAGS) -D GZIP_SUPPORT -static -o $@ zfcpdump.c -lz
+
+ e2fsck:
+ tar xfzv $(E2FSPROGS).tar.gz
+--- a/zipl/boot/Makefile
++++ b/zipl/boot/Makefile
+@@ -3,9 +3,8 @@
+
+ S390_TOOLS_VERSION_EBCDIC := $(shell echo -n $(S390_TOOLS_RELEASE) | dd conv=ebcdic 2> /dev/null | hexdump -v -e '/1 "0x%02x,"' | sed 's/.$$//')
+
+-CFLAGS += -I../include -D__ASSEMBLY__ \
++CPPFLAGS += -I../include -D__ASSEMBLY__ \
+ -DS390_TOOLS_VERSION_EBCDIC=$(S390_TOOLS_VERSION_EBCDIC)
+-LDFLAGS = -O2
+ FILES := fba0.bin fba1b.bin fba2.bin \
+ eckd0_ldl.bin eckd0_cdl.bin \
+ eckd1.bin eckd1b.bin eckd2.bin \
+@@ -16,7 +15,7 @@
+ %: %.S
+
+ %.o: %.S
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+ %.exec: %.o
+ @STAGE=$$( \
diff --git a/sys-apps/s390-tools/metadata.xml b/sys-apps/s390-tools/metadata.xml
new file mode 100644
index 000000000000..ae19b1043df6
--- /dev/null
+++ b/sys-apps/s390-tools/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>s390@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+A set of user space utilities that should be used together with the
+zSeries (s390) Linux kernel and device drivers
+ </longdescription>
+ <use>
+ <flag name="fuse">build cmsfs-fuse to read files stored on a z/VM CMS disk</flag>
+ <flag name="ncurses">build hyptop monitoring program</flag>
+ <flag name="pfm">build the cpacfstats tool</flag>
+ <flag name="zfcpdump">build the kernel disk dumping utility</flag>
+ <flag name="zlib">build the zgetdump utility</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">e2fsprogs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/s390-tools/s390-tools-1.23.1.ebuild b/sys-apps/s390-tools/s390-tools-1.23.1.ebuild
new file mode 100644
index 000000000000..8c977340c6ef
--- /dev/null
+++ b/sys-apps/s390-tools/s390-tools-1.23.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils udev
+
+# look at zfcpdump_v2/README
+E2FSPROGS_P=e2fsprogs-1.41.3
+LINUX_P=linux-2.6.27
+
+DESCRIPTION="User space utilities for the zSeries (s390) Linux kernel and device drivers"
+HOMEPAGE="http://www.ibm.com/developerworks/linux/linux390/s390-tools.html"
+SRC_URI="http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/${P}.tar.bz2
+ zfcpdump? (
+ mirror://sourceforge/e2fsprogs/${E2FSPROGS_P}.tar.gz
+ mirror://kernel/linux/kernel/v2.6/${LINUX_P}.tar.bz2
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* s390"
+IUSE="fuse ncurses snmp zfcpdump"
+
+RDEPEND="sys-libs/zlib
+ fuse? ( sys-fs/fuse )
+ ncurses? ( sys-libs/ncurses:0= )
+ snmp? ( net-analyzer/net-snmp )"
+DEPEND="${RDEPEND}
+ dev-util/indent
+ app-admin/genromfs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.23.1-build.patch
+
+ use snmp || sed -i -e 's:osasnmpd::' Makefile
+ use fuse || { sed -i -e 's:cmsfs-fuse::' Makefile; export WITHOUT_FUSE=1; }
+ use ncurses || sed -i -e 's:hyptop::' Makefile
+
+ if use zfcpdump ; then
+ local x
+ for x in ${E2FSPROGS_P}.tar.gz ${LINUX_P}.tar.bz2 ; do
+ ln -s "${DISTDIR}"/${x} zfcpdump_v2/${x} || die "ln ${x}"
+ done
+ sed -i -e '/^ZFCPDUMP_DIR/s:local/::' common.mak
+ sed -i -e '/^SUB_DIRS/s:=:=zfcpdump_v2 :' Makefile
+ fi
+
+ export MAKEOPTS+=" V=1"
+}
+
+src_install() {
+ emake install INSTROOT="${D}" USRBINDIR="${D}/sbin"
+ dodoc README
+ udev_dorules etc/udev/rules.d/*.rules
+}
diff --git a/sys-apps/s390-tools/s390-tools-1.36.1.ebuild b/sys-apps/s390-tools/s390-tools-1.36.1.ebuild
new file mode 100644
index 000000000000..5d8da04de42c
--- /dev/null
+++ b/sys-apps/s390-tools/s390-tools-1.36.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="User space utilities for the zSeries (s390) Linux kernel and device drivers"
+HOMEPAGE="http://www.ibm.com/developerworks/linux/linux390/s390-tools.html"
+SRC_URI="http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~s390"
+IUSE="fuse ncurses pfm snmp zlib"
+
+RDEPEND="fuse? ( sys-fs/fuse )
+ ncurses? ( sys-libs/ncurses:0= )
+ pfm? ( app-misc/pfm )
+ snmp? ( net-analyzer/net-snmp )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ dev-util/indent
+ app-admin/genromfs"
+
+src_configure() {
+ export MAKEOPTS+=" V=1"
+ export HAVE_DRACUT=0
+ export HAVE_FUSE=$(usex fuse 1 0)
+ export HAVE_NCURSES=$(usex ncurses 1 0)
+ export HAVE_SNMP=$(usex snmp 1 0)
+ export HAVE_PFM=$(usex pfm 1 0)
+ export HAVE_ZLIB=$(usex zlib 1 0)
+ tc-export AR BUILD_CC CC CXX LD NM OBJCOPY
+}
+
+src_compile() {
+ emake \
+ AR="${AR}" \
+ HOSTCC="${BUILD_CC}" \
+ CC="${CC}" LINK="${CC}" \
+ CXX="${CXX}" LINKXX="${CXX}" \
+ LD="${LD}" \
+ NM="${NM}" \
+ OBJCOPY="${OBJCOPY}"
+}
+
+src_install() {
+ default
+ udev_dorules etc/udev/rules.d/*.rules
+}
diff --git a/sys-apps/s6-linux-init/Manifest b/sys-apps/s6-linux-init/Manifest
new file mode 100644
index 000000000000..450509b3e0e3
--- /dev/null
+++ b/sys-apps/s6-linux-init/Manifest
@@ -0,0 +1,12 @@
+DIST s6-linux-init-0.0.1.4.tar.gz 21493 SHA256 80eeb8e3bf3095d69b86aaf8e6f5c28aab53a0eb6473e301a673870b56566b6a SHA512 84fabc9720f2aa2c68723c7b34023a8971f9e55c367b69c200c9c99d2c04bd23b598563facaca4deb4a11f732be3016361e38a40258a7d0ce68cb0f3c10a0235 WHIRLPOOL 55f6c6cac544b6c9ffa5b5f16639a20a47b1ba2ae61cdfe5c1446c254a11801cfab4f211c2b55c7381a37ff76509a06b25d2ec8710ec32f1682ee186efc8b805
+DIST s6-linux-init-0.1.0.0.tar.gz 22242 SHA256 4db16d235dc052f6376f4e88e5e4c0dd1cb84237e7eadb9eb4b440eececcaffc SHA512 8898ac09212d33d4160d0a1ccad4f6f24ed8010a16815daec4a68827f7af1948568807ae2063bb1f0fe901b87f605eb3cd199d0a3e9a217255b77ed4fc9eef08 WHIRLPOOL 4eed683de5c0846698c1d603e7be72299a425f1f91e3f944da98ed5fb0d9d988db1fb1931ec86ec41f837dab0b51bd61f828b2763c21ac520037021831e47543
+DIST s6-linux-init-0.2.0.0.tar.gz 24482 SHA256 131484e61eff0e671e112f0436b13e8e7d08752f810d8bec4924a68383eee2b9 SHA512 16c8c97b65ad533b70ed9dd189827778797dc8d0a70af0880655b5f89a1524cd9d3675cb681b99f4704d43c810a4211c9926bfeb743247d7c29559ec2f77606e WHIRLPOOL 45aad2584c8036f8fe9d9c72a7da3fb29e91f36a38d6b63297dbd1c201601971b6b11304290d16df09190f0706825c3e0cbd8c7f48657be17ece3ef27dffbd95
+DIST s6-linux-init-0.3.0.0.tar.gz 24692 SHA256 9376f76ae3ab24cb18a35a6956d0fa5fe88cc4c1dfd19bbafc47dcd4f91c2535 SHA512 9aa775fb2bb86680ba438a4a03b543fda696434eaf7ddea5009ec3adaebb899a2ed039a4727eb7d5427088ed3ff08a9eeaa853769f089789a7327a538f798c67 WHIRLPOOL b43e92c48fdc808100276c6b46382c8e1f938ead96e8e5e799cf6a7e17af1f9261e7d0e1ec9b169d9b8a38a2682086ccc5a01cfee5b135c0edc1b3eb20819dfb
+DIST s6-linux-init-0.3.1.0.tar.gz 25920 SHA256 d8854a01f41db88250b73bdff3a636ed31810b1c309acb2d724380c8b69aedd6 SHA512 f9c9b35daf8c7322c2146fb14f4df61131fafb6144a71666cfb77f5684e0669abee9689b238d1d1adfea04795a8cd1e88e61920b6c42432cb8a53c0861b776d8 WHIRLPOOL a17d643d17d14d23bbbd2aa995842b1a2b3195d328a5d23a1236591b8eeafe4e5e5d07968c1ab2852e4f1eb60d494a4246116e0fe7cd7fb8480c2c3e8e35ca8c
+EBUILD s6-linux-init-0.0.1.4.ebuild 1240 SHA256 9e3c9033436b84e9fd38daf829e1108c3e3932cfa97206dfad13b869aaa3aed4 SHA512 1fc85d43eb2767601b08957e0ea03ee7aa0393eddce7772997ace94ee78a3b1bc2518df338b0275b00f661081cfff8f0a75d83516df13de07bf77a0dbfb07b05 WHIRLPOOL 36cc18c0a6c684027f54f8fbe68c16e82da75536b44dd056dff54af8920c294ce896e07aaaf4ed0d3ae783f490d16b7301ea0b14e90be6bdd82c3c99617c841d
+EBUILD s6-linux-init-0.1.0.0.ebuild 1243 SHA256 74663ff81ff1df28c2d52a421cc44a45bbc6fc523aeb91fe9daa320291b5bfae SHA512 a41ca8126bbdd6b374315039fe58c25efea30f304873b3fc916d11ca9e06848ae011fc3e07333339f068517362c96b94548927eb9052edaa7693f4e9253750be WHIRLPOOL 79f12f8d9b372876ac03faf03c0ada2adf35c81ab7e50483ae7e703d0156fedd889411d3125124dc2ba8dfb05a73dd12aef2e8dc336a11b529c89e6fb7acd88f
+EBUILD s6-linux-init-0.2.0.0.ebuild 1241 SHA256 f331aada0361b2d0c498698a236ba9d085a5d871f1d0a2febbd1e199242de265 SHA512 642f101392debe4604565c5ff35ba6bea7b403a28351b5f1ad157e7189feef6710886f81e4d349b84379b3888c3c0318e801f5339e86e7e0c81782200c44c215 WHIRLPOOL 07cfe94dc061816e698b38745f368b5a519e379c74742b59f9ecf7eeee07213f0082b338798023df49a689cb295251ffffc535d43d579629cc860dc4f5fb92f2
+EBUILD s6-linux-init-0.3.0.0.ebuild 1333 SHA256 8ff5299494fb70e6b8faaceb4849cee293919b37b1d22e5a24d4a037cba0047d SHA512 c2d814c76f6edc99ae64c37743018179529b41ba41c4d87adec1e3f6d0f4570f78ad350d7983d2a7238628847f4901c2fa6b74ec939523dd76302878dac1ac88 WHIRLPOOL a7d5210dc8a985b2027aeb400f17c21d166798f8582775afd1fe49501229174cbf75b1aefaae69ed0eaca62477f83be20012dcad6ad753cd8a5faa9c89fc99a3
+EBUILD s6-linux-init-0.3.1.0.ebuild 1472 SHA256 16511fba169b2985f0e0a9e66364c748c47443daf75b29ad4a263c4b066fed8d SHA512 57607c57abc5adb22a22c1aa3d24545d591d83c9a7bfb87931a394229fd4ace887b5a5e859983c5b30fb6d08d151bc76f6cc88b69d31154d218b258221aebb89 WHIRLPOOL 1656f686f6687f5216faad585c42e5b1a18c196f4a8bda1dda5a40e5134a7dd3f4db97b1e66bfa5bf755abab034ccfdf1bd54cdb1ce9b6ba5739980f7a0c6e6b
+MISC ChangeLog 578 SHA256 9d6b549d019cc9eddfd42db57fbec5d0e60f5bf1c8de5a87b8aed6b2058b9ef0 SHA512 f7f7f2235e6bbeb0e448551265fcc2db166505c8a1b824d2b84a6c4a61c3c155f5449e45ddaaa7bd3daafe802692b2247b2196dc14ad6dadf0474b713b97125d WHIRLPOOL fd6a39132052f486377cfc7f2a7c827910a92e1929bb67c78a5ba901827b92adafeff5f5d5b0333bfdb36b6051a123d187923a1b2d6d11444d375679324ef900
+MISC metadata.xml 538 SHA256 661cba228986e0ca89a6d369c7f2aaa37bb606bfa574b3eaba919677ebd5d2e3 SHA512 a2d8e7031c5aa7cd310ad049b796c36498d1cf530c03f3d35d8f795530f49b2a8b59683c9ddc01910375a5883673072d8dab28b15ddd4c53e298e15b400cabeb WHIRLPOOL e6548172067128f98edc201ea193a261c780381edf79ef830db3cdc71309942564cbceb71a3ac76e7f81e3c7fda0599fc135f4ed72f7910c9c9abd2adf569648
diff --git a/sys-apps/s6-linux-init/metadata.xml b/sys-apps/s6-linux-init/metadata.xml
new file mode 100644
index 000000000000..1bf18c1a375e
--- /dev/null
+++ b/sys-apps/s6-linux-init/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aranea@aixah.de</email>
+ <name>Luis Ressel</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>samuel@sholland.org</email>
+ <name>Samuel Holland</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/s6-linux-init/s6-linux-init-0.0.1.4.ebuild b/sys-apps/s6-linux-init/s6-linux-init-0.0.1.4.ebuild
new file mode 100644
index 000000000000..6aa42b653bdd
--- /dev/null
+++ b/sys-apps/s6-linux-init/s6-linux-init-0.0.1.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generates an init binary for s6-based init systems"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-init/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.8.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+
+DOCS=(INSTALL examples/)
+HTML_DOCS=(doc/.)
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+pkg_postinst()
+{
+ einfo "The generated init script requires additional packages."
+ einfo "Read ${ROOT}usr/share/doc/${PF}/INSTALL for details."
+}
diff --git a/sys-apps/s6-linux-init/s6-linux-init-0.1.0.0.ebuild b/sys-apps/s6-linux-init/s6-linux-init-0.1.0.0.ebuild
new file mode 100644
index 000000000000..4dbdf86c2a5a
--- /dev/null
+++ b/sys-apps/s6-linux-init/s6-linux-init-0.1.0.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generates an init binary for s6-based init systems"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-init/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.10.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+
+DOCS=(INSTALL examples/)
+HTML_DOCS=(doc/.)
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+pkg_postinst()
+{
+ einfo "The generated init script requires additional packages."
+ einfo "Read ${ROOT}usr/share/doc/${PF}/INSTALL for details."
+}
diff --git a/sys-apps/s6-linux-init/s6-linux-init-0.2.0.0.ebuild b/sys-apps/s6-linux-init/s6-linux-init-0.2.0.0.ebuild
new file mode 100644
index 000000000000..823817826d98
--- /dev/null
+++ b/sys-apps/s6-linux-init/s6-linux-init-0.2.0.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generates an init binary for s6-based init systems"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-init/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ !<sys-apps/s6-linux-utils-2.2.0.0
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+DOCS="INSTALL examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
+
+pkg_postinst()
+{
+ einfo "The generated init script requires additional packages."
+ einfo "Read ${ROOT}usr/share/doc/${PF}/INSTALL for details."
+}
diff --git a/sys-apps/s6-linux-init/s6-linux-init-0.3.0.0.ebuild b/sys-apps/s6-linux-init/s6-linux-init-0.3.0.0.ebuild
new file mode 100644
index 000000000000..791ce6855b68
--- /dev/null
+++ b/sys-apps/s6-linux-init/s6-linux-init-0.3.0.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generates an init binary for s6-based init systems"
+HOMEPAGE="https://www.skarnet.org/software/s6-linux-init/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.0
+ >=sys-apps/s6-2.5.0.0
+ >=sys-apps/s6-linux-utils-2.3.0.0
+ >=sys-apps/s6-portable-utils-2.2.0.0
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+DOCS="INSTALL examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
+
+pkg_postinst()
+{
+ einfo "The generated init script requires additional packages."
+ einfo "Read ${ROOT}usr/share/doc/${PF}/INSTALL for details."
+}
diff --git a/sys-apps/s6-linux-init/s6-linux-init-0.3.1.0.ebuild b/sys-apps/s6-linux-init/s6-linux-init-0.3.1.0.ebuild
new file mode 100644
index 000000000000..d94588ab510a
--- /dev/null
+++ b/sys-apps/s6-linux-init/s6-linux-init-0.3.1.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generates an init binary for s6-based init systems"
+HOMEPAGE="https://www.skarnet.org/software/s6-linux-init/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.2
+ >=sys-apps/s6-2.6.1.0
+ >=sys-apps/s6-linux-utils-2.4.0.0
+ >=sys-apps/s6-portable-utils-2.2.1.1
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+DOCS="INSTALL examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
+
+pkg_postinst()
+{
+ einfo "The generated init script requires additional packages."
+ einfo "Read ${ROOT}usr/share/doc/${PF}/INSTALL for details."
+}
diff --git a/sys-apps/s6-linux-utils/Manifest b/sys-apps/s6-linux-utils/Manifest
new file mode 100644
index 000000000000..05a9ea1fbca4
--- /dev/null
+++ b/sys-apps/s6-linux-utils/Manifest
@@ -0,0 +1,14 @@
+DIST s6-linux-utils-2.0.2.3.tar.gz 40050 SHA256 f959ffb9bb79865018becc6664d29faef22cb747a43db252879e11886b1b8cc3 SHA512 10d919c67036dbd57ed8d0e2ba46e1957c621414cae2326c2c696a27b46496d928aa768465236585ed8be279a2866cc9a519f9feb51b9757f999e9b8b80faf2d WHIRLPOOL 7c5515d65fc2f5db1a0b14abedfd2ea462e621a6a16200da162487b0a57d1adce6f5ecc034524b1e8f066e531413f5a9c528187dee38b1980d3826a3a970d6c8
+DIST s6-linux-utils-2.1.0.0.tar.gz 40996 SHA256 3523ba84ba524198711b2de3edaaf620381a4e95d78ec6d13dcb7aba42397ead SHA512 a2bd997334b69c7d864ea14dd27af7b62c8a7b6ccf8f9431ed87f46590546e540a06577f04d2cf3e52299cd9819a31e926326862d751b8528bc98ec2f4e93913 WHIRLPOOL 3718fc4260b3ea1fe04d8b05021ce1a8ad2b1099e780da646df53d7174cabbe536c2e366f2b725a049258bcc057cdf9e226bd81a0fe575ad184f3df866112847
+DIST s6-linux-utils-2.2.0.0.tar.gz 40863 SHA256 587745abfbf2cc631bb54dd2b3fd29f39b723e3c50e28165138a85c98fda35f9 SHA512 5d0fcd29f7a03146b5296d7164326f76af95a8632df4204021d9ae30b1f03590e7f25d410f07639cf741a455f9624f9410b2e7836ae6838916da50be1527ae7f WHIRLPOOL 49f3ff3882100cc0176915bcc17f824b7b49c0e2bef8037c0643b1bf6e88df2221d5cdd8144110e03631433d80a0d35283b3fa8d338c3ecf2681c756c193280a
+DIST s6-linux-utils-2.3.0.0.tar.gz 40377 SHA256 6189d77bf4111d5cb80f7fd60525b2eeca5d2b3a9b16ccadacc7333da7b40c84 SHA512 09e5744f6ac35d33c9c61ffc0ae6c8697e5d1816e5bd83e2dd4385d54a8f6da9c43fe2b1cb1cacba6f30a53cd7d9487a12b44028b20b110c74d6c3016d0511a1 WHIRLPOOL 9747bd1f3b8b95381a5ce8787efa82dd5b64375050e67dd4b05c66b8afa18fbc90960e8831441de14d0396600795dcb6ac80eb54d03e2b92f0690e82a408480f
+DIST s6-linux-utils-2.4.0.0.tar.gz 44050 SHA256 3afb7b972a9d54042ac0aabde5489be90039374b6a90ef45f7f32ce2e83d1e63 SHA512 68f3dbd230d99afeeb47310ec544b7d9fa4658b580567f81100f988fd90d4db239938eae9b999d7be9ee384d9ac51ac61ff5d2d620a1b9711ff5663ff2aa6021 WHIRLPOOL 1ef2d55ef3f90c321c738a75135fe18a2e6fc1b92054db5574f0a84d2f87a60ab1dda7924c8bab7db7d16cb60971678b55290f5391532e109f5ed04e990b58cd
+DIST s6-linux-utils-2.4.0.1.tar.gz 44248 SHA256 9562ef293c916c4448d16fcbbc065eb28fd995ac34cd3538179cbc3ee056ab93 SHA512 91c1ed1ea329394158e859e8fd5741a2589ba8d0f8c2d0a0d14b989bd99dce3666d3de78f6be676b672824d21f0e40bf03ede198ec59e391791c092a65f835d5 WHIRLPOOL facb83f1749c4ee5f47c82e907c0ccc506dd69a0ce84a00568da4b39d60be66a30d6277c134fc1639b6a48c7e92b5a231364de1342eabd7c3becdfb58a49454d
+EBUILD s6-linux-utils-2.0.2.3.ebuild 1064 SHA256 135e0eda65ec125459cf444108788d967d601848bc722f07a649d22c08966eb5 SHA512 635bfc068b86ed52094aac3a64b8437d1f44b6239bca890f89be06c21b2d682fdc8fc027487855cd522b46f2c511ed9e067ef92cfb4b7ad38ff4f6a04b40721c WHIRLPOOL 90f5fa82bc73333a262bc4e4de5eb5e0991f1d7d259b8cdad14009ad25667d990135b86d68cbb7a0ea326e140cceb7f79e0340eb1b55c4f9f1fdfb7311593015
+EBUILD s6-linux-utils-2.1.0.0.ebuild 1049 SHA256 d65744eb5d2d76882df664dda8c6dfb13f6149ecca4c6cb51e8fd923e22fb2d6 SHA512 a08169031add46d92eef870cd4b374605471db8b603a5ff914b57aa1ec6396d590c2f7b0560bbe2f882c93737801aafda36e3a60233d0029d17c17096be479bd WHIRLPOOL 9572c029de0eefb528d3454dd991068c9572e5a4f3ec51a3e0a7de2d782bc1268e5d5f863722c31b83e2fead9f2d4247596ade96a727d798d911de0c5d0fb937
+EBUILD s6-linux-utils-2.2.0.0.ebuild 1013 SHA256 52af5aed450c98d1f6a74f8e915cab10909f47c2fb8c9c2befb54f917612a1ba SHA512 d9b18ff313baf6514f917a86554ea280a53ee4cb2350da90724047712118bb0aa7ef346c2a5b3938ddd7cff218e344129593046e74c88760fc7629b6d7f5fdb1 WHIRLPOOL d8af9045d09047a5a9bec79e2fbd153aabc64965fccbcc32b430a5d48bb99fb95b48df9fd32d2b800aff2712de411c843ad31b6c01bc503db11940651081967f
+EBUILD s6-linux-utils-2.3.0.0.ebuild 1015 SHA256 fa2c7b2226bed1408f8b0b67cf6abbe5639deceeeaab353da31757b1adda9568 SHA512 7f75497a328c2947d24320ddbbeb267f4bed39eec996d6eb9259cc7d9965982a4cd5db26e96a56b65290fc486697ff45ef14f0ff3990e7feabcef13abdde06d9 WHIRLPOOL 3bafc4c26071e1142bfa4a63a26eb6691c5f2c91bd0c8a5088b1454d3208dbd936cabd8fb40cbb66140969df160d9244bdd61c8c0e4c8e48c1de80cc4f13d879
+EBUILD s6-linux-utils-2.4.0.0.ebuild 1154 SHA256 2356b9ed3ff2c5e45aa588dffab612bb87ea7948c058f22027214b95ef599ac1 SHA512 5580711a1f971441d5a8f926fb049223a3d7817eaf366af0c6d6bede1119770f19b8eb72561ef0696983324a4ab3f406e2aa5585b623a3dd10c47eae982f3fca WHIRLPOOL 1efa1e17cf07e9a7a283b0ba93e61e774a6621eb76af10e9b173df20f7b765d9cd1fde662f209d177e8d5841850fbe93a78a951e56d7e696e12912afda8d4f90
+EBUILD s6-linux-utils-2.4.0.1.ebuild 1154 SHA256 2f94880c658b0226c779e179d22f06978907b5d51005a49e87345fad873cd1f7 SHA512 553c03ebb0b7d403cb47000f81943993e8005cba717b2c4c27cd7415817f226e5e26a4f750cc55ed35fafaaf03f6b09623595f68942741231a42d62084125983 WHIRLPOOL 6cc8bc3dba9d4a1f3d9203302dcba60d82de4ed4c01ab938bd4823d6e65fd963591af323bec5f4e26a9c796399a59b8d1352d38c2d069f107a471120d3a494ff
+MISC ChangeLog 626 SHA256 065e32ca3d6a056d7b9712d7c334bb4707e67a4c3b689600f933a956ffba222a SHA512 b5d5657212ee1d5857038c071ef63d80ec2f526c641e8a36f5a9a3c95b05944dbc62160aba4fdb8e887640e061622955637085c9d55ace602881766bd99239e1 WHIRLPOOL 5348e193e1252c67781775edf8981d607bb67abcc59d0a20a092bb5836af46f9e310b3f7130a025c8173e20ebe35e39957ca7104e786fb99ea62c1f0dff62ada
+MISC metadata.xml 538 SHA256 661cba228986e0ca89a6d369c7f2aaa37bb606bfa574b3eaba919677ebd5d2e3 SHA512 a2d8e7031c5aa7cd310ad049b796c36498d1cf530c03f3d35d8f795530f49b2a8b59683c9ddc01910375a5883673072d8dab28b15ddd4c53e298e15b400cabeb WHIRLPOOL e6548172067128f98edc201ea193a261c780381edf79ef830db3cdc71309942564cbceb71a3ac76e7f81e3c7fda0599fc135f4ed72f7910c9c9abd2adf569648
diff --git a/sys-apps/s6-linux-utils/metadata.xml b/sys-apps/s6-linux-utils/metadata.xml
new file mode 100644
index 000000000000..1bf18c1a375e
--- /dev/null
+++ b/sys-apps/s6-linux-utils/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aranea@aixah.de</email>
+ <name>Luis Ressel</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>samuel@sholland.org</email>
+ <name>Samuel Holland</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.0.2.3.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.0.2.3.ebuild
new file mode 100644
index 000000000000..11727787a717
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.0.2.3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Set of tiny linux utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.8.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+
+HTML_DOCS="doc/."
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.1.0.0.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.1.0.0.ebuild
new file mode 100644
index 000000000000..9aa08ac895f6
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.1.0.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Set of tiny linux utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.10.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+
+HTML_DOCS="doc/."
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.2.0.0.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.2.0.0.ebuild
new file mode 100644
index 000000000000..acadc49031dd
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.2.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny linux utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.3.0.0.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.3.0.0.ebuild
new file mode 100644
index 000000000000..c8808a355bd4
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.3.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny linux utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.0.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.0.ebuild
new file mode 100644
index 000000000000..3465861c965c
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny linux utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.1.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.1.ebuild b/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.1.ebuild
new file mode 100644
index 000000000000..148e80db555f
--- /dev/null
+++ b/sys-apps/s6-linux-utils/s6-linux-utils-2.4.0.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny linux utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-linux-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-portable-utils/Manifest b/sys-apps/s6-portable-utils/Manifest
new file mode 100644
index 000000000000..c3862d38f8d2
--- /dev/null
+++ b/sys-apps/s6-portable-utils/Manifest
@@ -0,0 +1,14 @@
+DIST s6-portable-utils-2.0.5.3.tar.gz 46300 SHA256 27be01b3d66df617ea7dbc21b55d253d5b9142463099f6944f90ef33587a2e09 SHA512 19e71457dc0ca8c1d161da36fb32902f2b8c60759745651806c9eebd19f3ec4d3d87d2d45fb226711eb16f6ae407671c363fc2a7df7d5746ecf3a4197012a122 WHIRLPOOL 1760eadf1eded5981aeb5b43df3a3c012a0b300ffed4ffdb22b51907e07962f65270763dff24937acbe7414d70f273497d8b91672360606827a002e968d2fa58
+DIST s6-portable-utils-2.0.6.0.tar.gz 46972 SHA256 233b7d13766a23661cc7ed5c052f29b9c558c1d516a538a281a17da22a909d4b SHA512 822c723f112550550591afb83908bf4d62f40e88fd46eacc6d56feb4c952bcfc4bad91c988f7379323cf7997c4fb823bb837e0c433ca6947762a63a1b8681557 WHIRLPOOL efa966bb5423bb4d0e7cd56c41d899430a7b6204e99646f376b8e9acba9ec8cc7b597fb420397a8808c2f3c4bec65826701e61f1d6e452fef2004e051a4d0d35
+DIST s6-portable-utils-2.1.0.0.tar.gz 47170 SHA256 cde145b7b9d1f1685f271c45c8aed635e74221689bb8ec21a11b3e5a252d1c4e SHA512 0b18304c63180c3233a5f29e1fc24b20c9c99c8949b042244d4a5b69cf2f15049ccbeddb2c3ffc5e88ee636bcfe836568670cc1626d5517381771ee3baff10c5 WHIRLPOOL aeca14c78f8cc5e95c56a14658b6bd41f93bd7bb301b219d2b9a49034f8f565de9e5c33736b029e1d9e5c78abbca75276538b56e442cc247b5971ec5699087a7
+DIST s6-portable-utils-2.2.0.0.tar.gz 47142 SHA256 7fd542e3600305411a8c3887599fefff974696098978cd414589915ff1b9896d SHA512 199f492dd5493ebd284a8cec278816c8d2586ce47d7be082e71926df32fcbcb2feeceb041ab75d20dd40c152cef7151748a75c8122312dc0d7681c8c9cf199ec WHIRLPOOL a4f60f0e95f1021b1e42d428844c013501a5e34105a54e72609346b2d77036bde226ad30ba20b697c2d5a797aa637a8245e0d5e46a9966eee453cce4ec79ea9d
+DIST s6-portable-utils-2.2.1.0.tar.gz 47651 SHA256 15b044017a1d24432affa26945793aaf93fff03ad0c0ff10a3a4973277fc009b SHA512 258419ab42683b4876337be467eb111699d5308c450cf281575a8b1b656fa853d2d46a34ae15b6b8d9fdc785703e5c6ed1b6286d1de000167e9db142f08e3193 WHIRLPOOL 25de3d7004be8259ca5f0eb02e281ef34bbc196122d430b596184bcd7f8e33ec2b3c0f931dca4b1242ee1e659a47fe4732657671e735c118ad836617999ca82c
+DIST s6-portable-utils-2.2.1.1.tar.gz 47138 SHA256 6ae239d2c458a81c92b5d616129e443874f925bf3da02589913a1a3b708c4531 SHA512 fba7a4d1f5e0c969dc254775f28c02f1b8673ead28022962175bd605125dc56012cfdeb177037c322780be93a5191a5292a47cb26cf5d466bb5eb081fa5a9657 WHIRLPOOL ea2cb04c8023d71e122b890917ec74bd9b121778c0695385fd3b129c94e4fdf34d1b91cb5fe3dcefe39c86fed4fafa637cde96fd165ac4c3442794466560a8da
+EBUILD s6-portable-utils-2.0.5.3.ebuild 1075 SHA256 246be2701722551b8a886c46756fa9135a5d58bfa5fbea97a6744d7807233997 SHA512 1b8fdf40510ca2a6289599b1808f2d6b66e89f3b5269975dbf69e69b7d5698f06972dc19f1c8962c91749561d1f01305c9d0077d527cb1860a08c17cd6d65294 WHIRLPOOL 65505fe15e85541c72e30baf5f68cf5da0552ce7a13cf22e59aad1976fba1866a773c0cb43d3dca918935aca7d4974b6d3be346bac94c1159e2ed1e6818bc47e
+EBUILD s6-portable-utils-2.0.6.0.ebuild 1060 SHA256 0fad332086317a40bc9558d8ab1b1f8feeeb73fac45af4a7ac8def9323345ff0 SHA512 f1062451890dd7e44bb032ce1b9cfc6413c83cd9e06bdd672317e4fc414160521038cc09ca87f6ca39f8ce7142858d8ec625c9ed9961ec3c773697130d5b510f WHIRLPOOL 7778476d32e1ce90216ece98341041cfb8b29f2d794b3eb4a862548053132a7bf537e929e74d8b3a83be50e48d64c4a30496b2e8ce91bb419111c63875eb0c1d
+EBUILD s6-portable-utils-2.1.0.0.ebuild 1024 SHA256 b56c5183c61cfb1aa167b86c7c364bea74a95fda5ebca116760a695714f18d7f SHA512 3e675676026bcc8224f7a21afaa24a8629628f236b99ab3832f365a5a9b7614006811cd1ccc0b4e570376d451436fa75f4121b01076ac5a2e1256e6bbb441e1e WHIRLPOOL 5bf0c46cf9c6287bca368c2d2da62dd3562ec8fa21ab78cdd38e019ddcbc7175038c1b39b0b53d249272bb5b2abd08f59972611193f733d381c164c2d23db66b
+EBUILD s6-portable-utils-2.2.0.0.ebuild 1026 SHA256 ef867746ca53db8fb5a55cfd7e22121c152f48dc83a89cb844383b805e383731 SHA512 1f576fec45d2d5c6d21abf0894aca73092a724e06c79d7bf6323e4f6026381c471efc63bcb0630aeee83936ae1e237e39da973d914c0cb17d7dd91b18a84ad15 WHIRLPOOL c11a2dcd039099912a90d406df82f41803c916a5c49bd54e9070e76f1b1c2229122309393fb557c90badd754aa22021ef3c5a70b9f2fbce21206b3fc173bab30
+EBUILD s6-portable-utils-2.2.1.0.ebuild 1165 SHA256 88a0eae6ad73b3a441833d589678fba41665983cc2c2f1ae3b6ff1cf2b0a338b SHA512 7080df68f673a2f8cbd9e7ce1dda3b6506a50ad54ef8d8a908cf15c57402703d1811b29bbf4d5479dc557e3192199ebe260acec53d4bc6242ca17a35f8ca6993 WHIRLPOOL b7cea6d9a929c2e4f1113f8a2947110a436483ed4e275962fb524bacd5b40384cc5487123c8a4c9e1f3ba0e4175b326014d64b64ca61b67fc568f62853d4cca8
+EBUILD s6-portable-utils-2.2.1.1.ebuild 1165 SHA256 69e5ddcc3e4229d2c9e23866e99866e43e40345ede15e4f5740d28ebb98e4198 SHA512 e29fc657d3088c4d160a0526ed09d6377d777ee3b9c4c5ff23db7eeb174e0ed52f14f08d7a02e3a72249391d0c91f038e1d348763071ed100a200b4611ccc5f3 WHIRLPOOL be2a21ccc8f3ff62b8a9d90db04be5fc0b60245d6c3b15496080310f5baa127d6aa4f02169d5059f794f23db376ba345381cc28bb0696b214e3e60d86ca5c28a
+MISC ChangeLog 641 SHA256 390bcefebd7250924a1d973dc3c1d2ef230bc77724dfa9a5bbea7f1dc128448a SHA512 70f445dd06a16fc9633cdffdef702cccaee4feba86aba5dbe78dd9a3fdab2356f5ec559048ed1d5bf5cff9e471a8178181d6baad4c0222dffcb03031f9802a53 WHIRLPOOL f122132c2356ef00f83d0c281f60f59b648dd04383e71386e847f2e683cfeecf11a51c56050d54d9669d61661df9ccb6d496b8b81efb7af4df41abb4a251fa0e
+MISC metadata.xml 538 SHA256 661cba228986e0ca89a6d369c7f2aaa37bb606bfa574b3eaba919677ebd5d2e3 SHA512 a2d8e7031c5aa7cd310ad049b796c36498d1cf530c03f3d35d8f795530f49b2a8b59683c9ddc01910375a5883673072d8dab28b15ddd4c53e298e15b400cabeb WHIRLPOOL e6548172067128f98edc201ea193a261c780381edf79ef830db3cdc71309942564cbceb71a3ac76e7f81e3c7fda0599fc135f4ed72f7910c9c9abd2adf569648
diff --git a/sys-apps/s6-portable-utils/metadata.xml b/sys-apps/s6-portable-utils/metadata.xml
new file mode 100644
index 000000000000..1bf18c1a375e
--- /dev/null
+++ b/sys-apps/s6-portable-utils/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aranea@aixah.de</email>
+ <name>Luis Ressel</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>samuel@sholland.org</email>
+ <name>Samuel Holland</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.0.5.3.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.0.5.3.ebuild
new file mode 100644
index 000000000000..3de06fd3619e
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.0.5.3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Set of tiny portable unix utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.8.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.8.0 )
+ "
+
+HTML_DOCS="doc/."
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.0.6.0.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.0.6.0.ebuild
new file mode 100644
index 000000000000..c4e21382c452
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.0.6.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Set of tiny portable unix utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND="
+ static? ( >=dev-libs/skalibs-2.3.10.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+RDEPEND="
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+ "
+
+HTML_DOCS="doc/."
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.1.0.0.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.1.0.0.ebuild
new file mode 100644
index 000000000000..96485ef8ba1d
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.1.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny portable unix utilities"
+HOMEPAGE="http://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.2.0.0.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.0.0.ebuild
new file mode 100644
index 000000000000..19b915f7e615
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny portable unix utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.0.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.0.ebuild
new file mode 100644
index 000000000000..a78156832d38
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny portable unix utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.1.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.1.ebuild b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.1.ebuild
new file mode 100644
index 000000000000..d303c8bb16a9
--- /dev/null
+++ b/sys-apps/s6-portable-utils/s6-portable-utils-2.2.1.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="set of tiny portable unix utilities"
+HOMEPAGE="https://www.skarnet.org/software/s6-portable-utils/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc)
+}
diff --git a/sys-apps/s6-rc/Manifest b/sys-apps/s6-rc/Manifest
new file mode 100644
index 000000000000..1d9f6103294c
--- /dev/null
+++ b/sys-apps/s6-rc/Manifest
@@ -0,0 +1,14 @@
+DIST s6-rc-0.0.2.1.tar.gz 85549 SHA256 93f30557e2e2e5c507b5becef2bd26f377be6b6c542fb4627c3122e1c2d83ef9 SHA512 9a83e272ba521e5ede17ded6b6143797d70205c6631fd08bdb9cbefc66e8ab6011de68e94876ec3c7af439ffbff21778207507db74f0ae91117e88fe36a7f65c WHIRLPOOL f10e515db0106816fb3c79c46dea0f171ac89653f326b9287aeccb1a9cc369fb6e6fec40c43eb3c3863763081608ec7cccf780cb8bcaaee7303e6c5d106c082d
+DIST s6-rc-0.0.3.0.tar.gz 86992 SHA256 5eb94e77961a075e6305e89e3a5c7e6c95fb7037682d4ea45277c1ab1625892e SHA512 66fe8cf1937671d3b6c06e7aca40e5b94502ca12a659b50e8120a178295084272091a378e8bbf9f69c560fbc69ca10ffdf08763cbd714ed2411d0d558437e325 WHIRLPOOL 54c1bddc6254eadf428806920f9cdf567cbb77d4496d7b8afd2b9c9daee5159719160a63f2ef257eb6bc86726161356864df070a80ed8acb3d3f7e0c8c748518
+DIST s6-rc-0.1.0.0.tar.gz 88520 SHA256 d04a8a765740ed55e38a33da3639197f51f83b3e498bdef5bc1d1d322b1acff3 SHA512 d58f52e4bc132eab6fddd1be3b406d0314cc4fdd61e476310a16348c117b032dafd3ef8701219dd7476247d5b9a6685621e94212705aa88934cb1eaee7b1e6fe WHIRLPOOL afac5177ca5220551575036e27b0881fe78712de93ef48e88158abf2c49a7494c47bebe58f48aec8b412a7e2075d29284f57514fe81d2b42b35cd441ff08e13e
+DIST s6-rc-0.2.0.0.tar.gz 90133 SHA256 b83a4f15ba0e13f935c7e4db8ef17229388e1fb4ca4e553b817ad039427404a5 SHA512 981d504382c9801ef53fb2a4a4f7410cf6165f1f49670cb5d42545c3e1bef6c0a50e6176b149fd61ec45ebe701411d12b5e7012cfb897d3472e52a1b8f76f636 WHIRLPOOL 297b7cfb73f480ee5e419197a13a7462849ee948f5445c29b1c0da31ad1d3eb2206afc1cccafb8a489f472ed8853298ff89662dedc57f69e4a95a6e2beaacaab
+DIST s6-rc-0.2.0.1.tar.gz 90345 SHA256 8b01d5b4c2380c6b30d320118b9a9b9ca174a25ed3c75afe8f59a4e840847a76 SHA512 d067f1b409146923531f5191e8c9d17c8e846cf4815fac11f08089fe983a55a1d11bba942a036d2d8f48d26390e1350f273bcd8705abcfbff33b9da2984cb8ef WHIRLPOOL dbfa8c726db19a87b1271c311a514ac71803ac4c66e5d1947785177d0825214630e4a149f21679c6126bcec966dcc3390688ee2b654003e34d29a11c06edb7da
+DIST s6-rc-0.2.1.2.tar.gz 90978 SHA256 4fa35cf8af41498c9fa0c21220dcdc7595a18ebc2975a254d719f7e1c864b1f0 SHA512 33951996cf1fc1e497c26a90254a916e992c69128134cbc64ed41c76e74c04e55c91036e2c7e836f3eda650fbcd670c52722b5b2d12ec4a3887101eb20c3347f WHIRLPOOL 89aa08ffd5f8073f506d7fb302f1e2363501f35248531cafb389aef092a3b3e6a1da202a320cecd927e0da9dc85e35c1def6dfd8505742fc428ebaed2257e916
+EBUILD s6-rc-0.0.2.1.ebuild 1296 SHA256 afd2c052d47ef4c06877aec9fabb76324a973fee43b1ae369721c0e93b82c238 SHA512 3f5c56e6c861a36ae0afead1b982b3596adb7929e8a26e66df33087ca89cf2950b8667303e640f164fc38298de6afc3e6f3d754d683209be618c93032c36d0f0 WHIRLPOOL 77ae06f77263fac1d6fd21d80e4ed53839dc59fdcd800141b52afc434aa6f3d84deb953fd795b75648c83d2576069f01536afac249bc01d75b72b8e431214ff7
+EBUILD s6-rc-0.0.3.0.ebuild 1299 SHA256 88c22aeff4e92a5e376e149e2b284bff89bfdd6775d06feb07be08ceacc90eab SHA512 1332f82db79db0a80d8e07904fa34c6465fabad96837efdd44ec81e5f4f63d2b8fc97fe3d58066be589ce760f780026211e7040f970cbe8a06a96c71c6bc0960 WHIRLPOOL bdc0fd8b8ce2c836f25cb924c0196bc5ff22237ef687680561a805b7e4781793c0eaacaa434687338b05424954bceb9c7c267a2312b9bf98f0f31730a5ebcb35
+EBUILD s6-rc-0.1.0.0.ebuild 1483 SHA256 c17e7b6ffbc3a619cd6af0b12b93279e00c2690a7326fa382e79526ed4b0c95b SHA512 e4e60d92632789123df84e325888dddf9d13297c90ae55ce9f8f9ec7425320d0ad3c0e0c24b816ea472c87d71908de091e72946b7b8722cc6551dd243eb4820c WHIRLPOOL d731a6f799dc7b923f04acf07a9a0134935340a7bbd220629af0e82acc2ae1268e3947cfafc161368609aa8376903e1d277e1d76978b0400daee59a09bf8a4a0
+EBUILD s6-rc-0.2.0.0.ebuild 1485 SHA256 19ae142ecdb00fd1dca0c4427907e4702188ed43753bb7526fe689c074cf6869 SHA512 6e2518ccb38a40d4520a464f7f124fdf03be30d9445cb6661a603c770a2db472cd9cd9b2e676b9deb278ba559aed6f12505205dbf3707af68cdb79aedf686ece WHIRLPOOL ea42b986daa6e6584cbaf4b38f79d118adb549f12208aaa006c7b3f0739c7d3f73f71f6254fadc3cc6f115ecd2e9f6f84263804327d34293593c173bd1941bd3
+EBUILD s6-rc-0.2.0.1.ebuild 1624 SHA256 be18b061f2ab78978dfe740ab18f69c0fa346f0f954e21532a4a39feea7c2255 SHA512 0737f02730bd5af03134199843fe2c0103c6ecd76342b8e0aada063777260158542ac25ff081eff10c4db0cfeed958f3e2b0a9ecada65da98877f8b985bd30a7 WHIRLPOOL bac5b78ebeff1cd6821928b6b5172713309c2c289112cb8f39beb146f3e3fd48b6ff49d0b0abb4f5e4a0623c6938a4ce05714a9aefb200edb85acfeaa6e2786e
+EBUILD s6-rc-0.2.1.2.ebuild 1624 SHA256 2a70327428ba8aed2c59946e5593b9b03d0a1873fe3b25a380e6ece1f05511cc SHA512 1461f37172187ecf8457db8ccd1f34e8197c554aca47d88b2f867ba7e5509f84984373da8cad06380d3ee1ccfb3b07ea0efa03ad2ad61bd5d5b7d3607c56068f WHIRLPOOL e697638a0d6fe716697888f471a4a662d4b9fa76aefcdb20c1ae5538d6bc5667f3c05c689ee0a37585b6f78d48d22720242daec74091ed67b3651947868c6aa1
+MISC ChangeLog 507 SHA256 9b892d7b9da785b1df61684c571f57bc7b7d04e12c0cbaf97ba18ff63568e8a6 SHA512 c5ad12d9c9322e182ce42971945948ff37afacd4cc93bfdf1ff0f534a36ee7be92e16892854f868cea62ceea2ca63d5186f10ba146bc4fd012b4ac1867d8b04e WHIRLPOOL 98405834d761128ab639a739fbd4ea41eacd2afec21f86e82ad6ed2df5bfb446b78d9543c01b573377bcc54a2b2b195961fbe2b06127f86b809a90b08f73ccdb
+MISC metadata.xml 538 SHA256 661cba228986e0ca89a6d369c7f2aaa37bb606bfa574b3eaba919677ebd5d2e3 SHA512 a2d8e7031c5aa7cd310ad049b796c36498d1cf530c03f3d35d8f795530f49b2a8b59683c9ddc01910375a5883673072d8dab28b15ddd4c53e298e15b400cabeb WHIRLPOOL e6548172067128f98edc201ea193a261c780381edf79ef830db3cdc71309942564cbceb71a3ac76e7f81e3c7fda0599fc135f4ed72f7910c9c9abd2adf569648
diff --git a/sys-apps/s6-rc/metadata.xml b/sys-apps/s6-rc/metadata.xml
new file mode 100644
index 000000000000..1bf18c1a375e
--- /dev/null
+++ b/sys-apps/s6-rc/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aranea@aixah.de</email>
+ <name>Luis Ressel</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>samuel@sholland.org</email>
+ <name>Samuel Holland</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/s6-rc/s6-rc-0.0.2.1.ebuild b/sys-apps/s6-rc/s6-rc-0.0.2.1.ebuild
new file mode 100644
index 000000000000..dd910dc1ab2d
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.0.2.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Service manager for the s6 supervision suite"
+HOMEPAGE="http://www.skarnet.org/software/s6-rc/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND="
+ static? (
+ >=dev-lang/execline-2.1.4.5[static-libs]
+ >=dev-libs/skalibs-2.3.8.3[static-libs]
+ >=sys-apps/s6-2.2.4.2[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.1.4.5
+ >=dev-libs/skalibs-2.3.8.3
+ >=sys-apps/s6-2.2.4.2
+ )
+ "
+RDEPEND="
+ !static? (
+ >=dev-lang/execline-2.1.4.5
+ >=dev-libs/skalibs-2.3.8.3
+ >=sys-apps/s6-2.2.4.2
+ )
+ "
+
+DOCS=("examples/")
+HTML_DOCS=("doc/.")
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-rc/s6-rc-0.0.3.0.ebuild b/sys-apps/s6-rc/s6-rc-0.0.3.0.ebuild
new file mode 100644
index 000000000000..c2cd0af9fe9c
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.0.3.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Service manager for the s6 supervision suite"
+HOMEPAGE="http://www.skarnet.org/software/s6-rc/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND="
+ static? (
+ >=dev-lang/execline-2.1.5.0[static-libs]
+ >=dev-libs/skalibs-2.3.10.0[static-libs]
+ >=sys-apps/s6-2.3.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.1.5.0
+ >=dev-libs/skalibs-2.3.10.0
+ >=sys-apps/s6-2.3.0.0
+ )
+ "
+RDEPEND="
+ !static? (
+ >=dev-lang/execline-2.1.5.0
+ >=dev-libs/skalibs-2.3.10.0
+ >=sys-apps/s6-2.3.0.0
+ )
+ "
+
+DOCS=("examples/")
+HTML_DOCS=("doc/.")
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6-rc/s6-rc-0.1.0.0.ebuild b/sys-apps/s6-rc/s6-rc-0.1.0.0.ebuild
new file mode 100644
index 000000000000..2233ae60574b
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.1.0.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="service manager for the s6 supervision suite"
+HOMEPAGE="http://www.skarnet.org/software/s6-rc/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.2.0.0[static-libs]
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ >=sys-apps/s6-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.2.0.0[static=]
+ >=dev-libs/skalibs-2.4.0.0
+ >=sys-apps/s6-2.4.0.0[static=]
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.2.0.0:=[!static?]
+ >=sys-apps/s6-2.4.0.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+DOCS="examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/s6 \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6-rc/s6-rc-0.2.0.0.ebuild b/sys-apps/s6-rc/s6-rc-0.2.0.0.ebuild
new file mode 100644
index 000000000000..0e7c6f01fd35
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.2.0.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="service manager for the s6 supervision suite"
+HOMEPAGE="https://www.skarnet.org/software/s6-rc/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.0[static-libs]
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ >=sys-apps/s6-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.0[static=]
+ >=dev-libs/skalibs-2.5.0.0
+ >=sys-apps/s6-2.5.0.0[static=]
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.0:=[!static?]
+ >=sys-apps/s6-2.5.0.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+DOCS="examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/s6 \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6-rc/s6-rc-0.2.0.1.ebuild b/sys-apps/s6-rc/s6-rc-0.2.0.1.ebuild
new file mode 100644
index 000000000000..4c43b7e5cd11
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.2.0.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="service manager for the s6 supervision suite"
+HOMEPAGE="https://www.skarnet.org/software/s6-rc/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.1[static-libs]
+ >=dev-libs/skalibs-2.5.1.0[static-libs]
+ >=sys-apps/s6-2.5.1.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.1[static=]
+ >=dev-libs/skalibs-2.5.1.0
+ >=sys-apps/s6-2.5.1.0[static=]
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.1:=[!static?]
+ >=sys-apps/s6-2.5.1.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0:=
+ )
+"
+
+DOCS="examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/s6 \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6-rc/s6-rc-0.2.1.2.ebuild b/sys-apps/s6-rc/s6-rc-0.2.1.2.ebuild
new file mode 100644
index 000000000000..e3e6bf37f0ad
--- /dev/null
+++ b/sys-apps/s6-rc/s6-rc-0.2.1.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="service manager for the s6 supervision suite"
+HOMEPAGE="https://www.skarnet.org/software/s6-rc/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.2[static-libs]
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ >=sys-apps/s6-2.6.1.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.2[static=]
+ >=dev-libs/skalibs-2.6.0.0
+ >=sys-apps/s6-2.6.1.0[static=]
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.2:=[!static?]
+ >=sys-apps/s6-2.6.1.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+DOCS="examples"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/s6 \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6/Manifest b/sys-apps/s6/Manifest
new file mode 100644
index 000000000000..228ae335dfa4
--- /dev/null
+++ b/sys-apps/s6/Manifest
@@ -0,0 +1,17 @@
+DIST s6-2.1.3.0.tar.gz 181237 SHA256 73057df188f1ac8db186b96298c0cb6081199aa73d3f2f8d5fabdbbe21c3ea04 SHA512 f5b962fb9f36a910fd8b56b1158cc28d1dab808f22f6beb309b8c23dab1863409aaecd2e3806b51ec34aef1c70f117d3b8af4c7167e0e854f6925fe278cdcaca WHIRLPOOL 03283a6c2a8a9419bf7e27a9e6c46fe2fe9ad0cbb384f4da0efaec56f5066ab36d20b00aae7a81408ca7b94a1325625feb83173e99e9ff9e85f28be69e6ba2c7
+DIST s6-2.2.4.3.tar.gz 192153 SHA256 f584ec56d5f2a3a2d81698d5f744b9b64d8fb6c22b56649faa71f3b62da7db3f SHA512 af2f06d31eeba3efeaa93e1df6afc50051eb4b13b034d24750314e0d7e9277953595cd04134eecbe239c0ea633e2242712d193a23389a3c1206a81bf7438b5bb WHIRLPOOL 5d00db61a036fa5e692892bc72391ad5d74144c57e505da73b708d8a152dc7a620e9bc7f04ef52e51220eb4ac3da15b7e31e35e0998c3c954a0d431593476c0b
+DIST s6-2.3.0.0.tar.gz 192887 SHA256 49c9a0476d93c6279c776ca5ae9c49b3fd39c356eda674828aebf78f8488e8e6 SHA512 40b9ae41b29a32a47a88211a3eb2a0771b5108fc57a2a7a0524e5c6b99bf31c465e99bd910b11c7de784f22b712c79bb32306e963bf8b1aa5270e5463577758c WHIRLPOOL 7052ece89b0bc4174b9583b3dba721322ee89974f9540a243fd9e4f4a5c43710360c31e5fd7596630f539e7204f7cb7bc92569e6a5d11a68cb520379078b5f37
+DIST s6-2.4.0.0.tar.gz 193534 SHA256 5e788d5935dbcce76ac9a99cfcf6ee46a2ffb84220c84225df7589e9a3585560 SHA512 bd294fd6ec6bd5b696c52f8ef43de278a82d2b5ec4bcea3f32ab45f15b22b33633210f38709c1e736bab8ac4c560af6a307b2617709adfc8d5f9c0bce329dff2 WHIRLPOOL 6c6fe574cfdd8d6d97279dac48d4a284941f1e2cce981fecac3fa5083fc3ddc9e960fa38676edf94881e48f7e85ce7875415c12a7f867ca847d2e639716e62d7
+DIST s6-2.5.0.0.tar.gz 190980 SHA256 11413aea4add3aea2d0f3f7515d274ac58d4adfb03661a1f6ce7fa2abd24dab1 SHA512 ffda119167fa334e2d87de1a453ddefafa541be0a71ced95f7eb2001dcc76a01db4a8bda04746c49d2cd26495453f0b39d3dbf57e2a76435c8537218b745da94 WHIRLPOOL 66a98dc92d0b83b3c67c6857d2d4ed2ba9e7abe0af77065430689a276b51088d6287b95fb381a77ee115288fe9ce48a4756aefd5221ccdce3b884fae0a6f4726
+DIST s6-2.5.1.0.tar.gz 191814 SHA256 73cd4c1975905db92122a7c7eebd0c480d046624426800b3bcc5a432e6af27cd SHA512 b8d40b541d6c9b4b78f2aea229eea3188f867dda4ed15626e590b549c0e6bd5114d015ad749faa520e69385272c0960cf6d635a4e51d4e14821e61cab7469fd0 WHIRLPOOL ad9e35e7c6097e07386846daf6a546cf16f0ea83c9ab646d6445fdec52f253aa4bdc64dc20a181125ecdbd28d33011cc0ea3376534852bc5968a3017a9cfb9b5
+DIST s6-2.6.1.0.tar.gz 195903 SHA256 f0de303791134302f2630b9fe76a936b064e1e3aa772c8ae1b891155a6ea2c79 SHA512 e29855cd3c0037d83270318569d2a79a8f616c681cb9c218cfc8c207d9c267cedbb6adc4a6379dbdd29323aef5549810363af08a9fdcc9308d8f6924c12399e6 WHIRLPOOL cf5d29fe60c9c857e8896ece9523c0401e236846bf27b4e6b35f107b5eb3058a2c95dd65673e18c631d1b74d5bf572af4996103ae23a5ac6ee3235d7c6861cd8
+EBUILD s6-2.1.3.0.ebuild 1284 SHA256 56df00eee98c4d6a44c651c690db712792b8d141765f8a8431c6bb0ca78fe690 SHA512 f5f2e6a032852380cd2991cd09c09f4c55d498c42b33af819893f3f81335db221827e5400633d99f18502d0fb9e8965728d7ce32129f1736aee049c498bcf193 WHIRLPOOL 6fc5fdde3b4cc2180206e7bbf1819a8bbe84e1083de3ffc4baf4f24abba268d87264418d8ff6552d249921410be09b9e7f12e8c6659e37c473f4e9d6e62a14d1
+EBUILD s6-2.2.4.3.ebuild 1252 SHA256 1007c149bba35aa6cd3bc193dbdb6fee0e2f79f8abb1a0b15f06737fbaddc4c5 SHA512 c7a6e48be8d4a208a0d1221bd86fb1da12ce3c9aecfc6f67f690084f4eef2f1afd7c785d8562c97190c27d394d36b6b2156c69c876647cff1509bb9b1e15674c WHIRLPOOL f403e6291e0329469f8d70cc8f58a2e99c618685aafbe0663ae99256b89620064b149c09c7a4affb0ad87f02970ede9748ba5b8c73fda95fadb7e780b2ec3ff9
+EBUILD s6-2.3.0.0.ebuild 1255 SHA256 9a2acfa325e465b5f61b74d0b04b2e3860008d94daa81a658adcdfed1ff90b77 SHA512 a18aa2c7103cd31793fd93cca6e0a6d96ee73351f9242c7818a67411bd4c2ea417c966c624c17c160315e9c222ab407d40a7bfb2bbfc61f88e470055efa4e57f WHIRLPOOL ef21745076cb89cb2989231540629a6eee5468e88ad663023130a8f47567febb01d3b062e121a9247ff2e153d2c9defa318bcc729349a7493c7e54b80ac40f3e
+EBUILD s6-2.4.0.0.ebuild 1367 SHA256 711fda90e1336cb0ff7e0df8f1a4df10cc2d956e6d0a8f2bccd6514128a0c42a SHA512 9b964b772d17c62a995c94d0f92358e9480bba71700fdc354b41e7f3da1a21d8ba7dc31c5c4cac7c94ef185907bcd2b744820d223ed6b2b1680c6abf0c08ae6d WHIRLPOOL 14c4c2587fdf77a04e86e51ae50f5f33369aefea9f87cbd494776d95fafca069603777272437689b04334f17deebcc6d349b044d27b0a20f3fbe64a857d1b6b3
+EBUILD s6-2.5.0.0.ebuild 1374 SHA256 784e583ebd0aa04a0f6ab3eba54c1a20d295dffd270c7b6dc2bcdfde1d9de09c SHA512 ef0e67375e3257ffe9cbd40aac8156d78ac5867e944e51ad8785634ba85162100dcad96382407edb41d075a1c39b5ea0d64f7429e3a4560c10271fefc5256af6 WHIRLPOOL 9e335bd67bbbb8434015fff38164a87578d5195a2b52e4b1e3576c2687af4e6d5bb017df1368b91111ffe8600c185b19b4e5a8ba6ab7b53565ff2b85d366fcba
+EBUILD s6-2.5.1.0.ebuild 1513 SHA256 364c545135e2b2c226013d2f248ce405af49f596ae641b35e0b0cbb0a3d32237 SHA512 4b63aa06da36d262803900b63fa5e4e5f392b4921e8dac29fe412ccf1f89f13a83e50f8647a98d2925d816f0168b93d80322739c3be4cc691408d7a6973c3bec WHIRLPOOL 7fc06479e67b17c9aab9e4b0172629c8c5e928f8cf508656d5dc2cee549f1c6b048acb3d82fa8b125b7dec73590d388ebd19d6b0040deac2134c676a0b08b1a9
+EBUILD s6-2.6.1.0.ebuild 1513 SHA256 891c750cf9c5ed92e8b00c702d26e08d82f99d6b920b964f84d613703ed61303 SHA512 7eac0267f0b72fea14074951d324e8c538a553fadcb14cb41b1d88fdaa79da74bc8ed57975123d06b131d08d21cb16520d85264fb3dfcab36aecff51a9051bc7 WHIRLPOOL fa9ab1c3c2a2ae7046840cbdfbf837abe646e61fbd2a8076fb6c73665245d4358ec0ab58ded7adb358efcf61685f26d0f6f38052621bf09be4b958246c959fc8
+MISC ChangeLog 2913 SHA256 eb8570413326ee9192d4f6dd0bffc429511824473e7ede4cb9de4fc43c8f40f5 SHA512 e7930577096d6773591ab4585b9f64d30a356f5eb9d1d4a59e5af588ca61aa112c3101a2b477e4328ace19af796a0c3e1c811c91606bde221c7a9fff71c64abd WHIRLPOOL d8c0c8d2eb58819509cf3adc71182a14aaa68b6c473de11f4d706930e9f23703e5d228c005ca953263a47f7d6dbcf78badc7fcd22c24528310c42bbfbc1b0cf3
+MISC ChangeLog-2015 1054 SHA256 049479a173db2aeba829767d2afb7c5b6256adccee8c600fc706a715559c912c SHA512 6f958a41c4c2ae028090a21240b9edfd64d91b0edee96387d5d5248a7aaf70f3f2de435ae71f4594bcc0eb94240ebdc95eeeec28ebcc0e494135b90714e6f583 WHIRLPOOL b364e1b6c15e266cd99ea47a4b895431bc1045e87c6a7d72408470ec1f6b918cb266791c5838083e82c12b645343735430c9b397b3bd33a9709751ce885a96ed
+MISC metadata.xml 413 SHA256 29dcb799242dd647f72a11287b178986e326f5877c55bf41dce6fbf9985cc8e2 SHA512 000e085535127bf6a340451b6cbd51549dd2f1f9cba1bcf76dde590f628f780fc756f344844982f1d3a6ef69299b6db4fb71ddd92f72650e38f7a24aa541257c WHIRLPOOL cdcc97a9f10edac6ca43cdd8eb0c1d4607199e7cda447a6ee4edb6f3d9147869fece74a74f2e9fe1fb218fbc2a7a7f3c11189d2c135e8d80e9914476e4404646
diff --git a/sys-apps/s6/metadata.xml b/sys-apps/s6/metadata.xml
new file mode 100644
index 000000000000..48d60bf54d56
--- /dev/null
+++ b/sys-apps/s6/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 type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ S6 is a small suite of programs for UNIX designed to allow
+ service supervision similar to daemontools or runit.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/s6/s6-2.1.3.0.ebuild b/sys-apps/s6/s6-2.1.3.0.ebuild
new file mode 100644
index 000000000000..e06f05e36281
--- /dev/null
+++ b/sys-apps/s6/s6-2.1.3.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="http://www.skarnet.org/software/s6/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static"
+
+DEPEND=">=sys-devel/make-4.0
+ static? (
+ >=dev-lang/execline-2.1.1.0[static-libs]
+ >=dev-libs/skalibs-2.3.2.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.1.1.0
+ >=dev-libs/skalibs-2.3.2.0
+ )
+ "
+RDEPEND="
+ !static? (
+ >=dev-lang/execline-2.1.1.0
+ >=dev-libs/skalibs-2.3.2.0
+ )
+ "
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+src_compile()
+{
+ emake DESTDIR="${D}"
+}
+
+src_install()
+{
+ default
+ dodoc -r examples
+ dohtml -r doc/*
+}
diff --git a/sys-apps/s6/s6-2.2.4.3.ebuild b/sys-apps/s6/s6-2.2.4.3.ebuild
new file mode 100644
index 000000000000..b2a3a2ca2298
--- /dev/null
+++ b/sys-apps/s6/s6-2.2.4.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="http://www.skarnet.org/software/s6/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-4.0
+ static? (
+ >=dev-lang/execline-2.1.4.5[static-libs]
+ >=dev-libs/skalibs-2.3.9.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.1.4.5
+ >=dev-libs/skalibs-2.3.9.0
+ )
+ "
+RDEPEND="
+ !static? (
+ >=dev-lang/execline-2.1.4.5
+ >=dev-libs/skalibs-2.3.9.0
+ )
+ "
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6/s6-2.3.0.0.ebuild b/sys-apps/s6/s6-2.3.0.0.ebuild
new file mode 100644
index 000000000000..36eee93e2aeb
--- /dev/null
+++ b/sys-apps/s6/s6-2.3.0.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="http://www.skarnet.org/software/s6/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-4.0
+ static? (
+ >=dev-lang/execline-2.1.5.0[static-libs]
+ >=dev-libs/skalibs-2.3.10.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.1.5.0
+ >=dev-libs/skalibs-2.3.10.0
+ )
+ "
+RDEPEND="
+ !static? (
+ >=dev-lang/execline-2.1.5.0
+ >=dev-libs/skalibs-2.3.10.0
+ )
+ "
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare()
+{
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
diff --git a/sys-apps/s6/s6-2.4.0.0.ebuild b/sys-apps/s6/s6-2.4.0.0.ebuild
new file mode 100644
index 000000000000..ab8f1fe5a452
--- /dev/null
+++ b/sys-apps/s6/s6-2.4.0.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="http://www.skarnet.org/software/s6/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.2.0.0[static-libs]
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.2.0.0[static=]
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.2.0.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6/s6-2.5.0.0.ebuild b/sys-apps/s6/s6-2.5.0.0.ebuild
new file mode 100644
index 000000000000..5eddf9e93b07
--- /dev/null
+++ b/sys-apps/s6/s6-2.5.0.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="https://www.skarnet.org/software/s6/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.0[static-libs]
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.0[static=]
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.0:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6/s6-2.5.1.0.ebuild b/sys-apps/s6/s6-2.5.1.0.ebuild
new file mode 100644
index 000000000000..622bd4a43122
--- /dev/null
+++ b/sys-apps/s6/s6-2.5.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="https://www.skarnet.org/software/s6/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.1[static-libs]
+ >=dev-libs/skalibs-2.5.1.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.1[static=]
+ >=dev-libs/skalibs-2.5.1.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.1:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0:=
+ )
+"
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/s6/s6-2.6.1.0.ebuild b/sys-apps/s6/s6-2.6.1.0.ebuild
new file mode 100644
index 000000000000..44dec59c63f3
--- /dev/null
+++ b/sys-apps/s6/s6-2.6.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="skarnet.org's small and secure supervision software suite"
+HOMEPAGE="https://www.skarnet.org/software/s6/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-lang/execline-2.3.0.2[static-libs]
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-lang/execline-2.3.0.2[static=]
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ >=dev-lang/execline-2.3.0.2:=[!static?]
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+DOCS="AUTHORS examples README*"
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/execline \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/sys-apps/salinfo/Manifest b/sys-apps/salinfo/Manifest
new file mode 100644
index 000000000000..af5430dc1c18
--- /dev/null
+++ b/sys-apps/salinfo/Manifest
@@ -0,0 +1,6 @@
+AUX salinfo-1.2-build.patch 1198 SHA256 7bed6fe36f57feaae9cbcbaabc68e39024685d0fda2093377aeb49331ab9b9b5 SHA512 fd037371b22fe3d6038ad2555fd6af485d45688006b02a35bace25c7a98b9f5b9f13cff0a0be4c47f356952b24b9622328b465e8439cd7056f7b288866068bec WHIRLPOOL c408e51eea20dc542613b75ba5f348afa63b44c076088a791acabc8b6594acc2a6d24087067ed611a5bbd326f3254d3749b77faeeababf9a3f0a72ca17e42abd
+DIST salinfo-1.2.tar.gz 40511 SHA256 4c5b19a38d29b9e2883fc9f5ef3a5e9198c4a323b7cd1b35da21e86f392e1498 SHA512 6a92eb6ff38965a93ea61f034ba3607b871b7250cb640ced21b0eabaf94214ad2df78a3fb059fa0c61eb7aa90a6fc4e592ea852b89629b259c36d2b17fb7c4ca WHIRLPOOL d831aa5f773d51ff8170d6c102b211887e49bf24636f9f85dbc0154a393211fa3716f78b1b9e39013ce454336333ff184fbee28fbc047057dd31832fcb5eb236
+EBUILD salinfo-1.2.ebuild 555 SHA256 53e0a280392ebe2ecd7f280d8776ad68ead2f172d6d7891e05a256ae1b7c697f SHA512 774b876b0fde0f03b797f7aa6da5c4a00199c72e7c9a830ec90870e3b7761d270f804689e233a2c152f067e4056328f0849e4a79c5e931f35ba0e592cb864f06 WHIRLPOOL c813f2c2d8b9b6c2607176302e0e1aca312b0a48a7fef2e433e6a4af97f876a4385b8a506ff69462a8347fdddebd47163f84b6211b8e862e93a80e10c31d0c0b
+MISC ChangeLog 2455 SHA256 05c6624b2567ca30b769180f0548edbf838acc3df82347013e9c34b91f1282da SHA512 d2f71018eb662c9051c0908b766dfbdb30402781ac496292350c6fd5a2de041919ff1c5be2435db25e2408c79961dd3cfa16b55d4ad4c0197ad7225730fc7275 WHIRLPOOL a31f55db81f9a4823e6919ad2ba864ee2b150afbd4ad3af20594df5d0f1f4c9d640d20e51a36a3053a3ef1432023eda7864e39010587cabe2152200f7a262848
+MISC ChangeLog-2015 374 SHA256 f0d7f2878ccdb382a0153c4706e8475b0fef209dc0423c2d5caef3b966a9d378 SHA512 b015645ac2d162e96fe7910f97911f0b3be4f7f2b7c6ee61f88e3387f4bb2595594a1ae7e74ca39fb1d7e6e95cfdd512da8169ea9a2185598e7c6b9472959ba3 WHIRLPOOL 9a683219ab72499c11f698a4e38cb199ef6291ace5dc0f731b66781a57520ae0fe3cd79f434f5d419402a0e4e2aa9e73dba565a0f57badadd8104339862e7e3f
+MISC metadata.xml 258 SHA256 e524b993ef23317ec64430fc8368f13d25672431a831cf856f4d1285819d4169 SHA512 0efa4eca2fddcb607098b6696ac01fc1d98cacfb3cab6e64821e306e8cc66d32bbeaa2a89960ccb9da74620d6ca3f85baf60891f5e70f647fae9e2a84781dd1a WHIRLPOOL cd67c5855e5b5b92cb5d5f373be5b475b2c128015acbfa2681442b2f1f7dbd5439300c414512155c142520153ec5fd94d75f3b9a79131dd3079987c7b1093d99
diff --git a/sys-apps/salinfo/files/salinfo-1.2-build.patch b/sys-apps/salinfo/files/salinfo-1.2-build.patch
new file mode 100644
index 000000000000..848b363939af
--- /dev/null
+++ b/sys-apps/salinfo/files/salinfo-1.2-build.patch
@@ -0,0 +1,47 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,4 @@
++prefix = $(DESTDIR)
+ mandir := /usr/share/man
+ sbindir := /usr/sbin
+ logdir := /var/log/salinfo
+@@ -5,7 +6,7 @@ initdir := /etc/rc.d/init.d
+ sysconfigdir := /etc/sysconfig
+ logrotate := /etc/logrotate.d
+
+-CFLAGS += -Wall -g -O2 $(EXTRA_CFLAGS)
++CFLAGS += -Wall $(EXTRA_CFLAGS)
+ export CFLAGS
+
+ ifneq ($(VPATH),)
+--- a/sal.h
++++ b/sal.h
+@@ -27,6 +27,8 @@
+ * Keith Owens <kaos@sgi.com>
+ */
+
++#include <asm/fpu.h>
++
+ #include "efi.h"
+ #include "pal.h"
+
+--- a/salinfo_decode.c
++++ b/salinfo_decode.c
+@@ -303,7 +303,7 @@ log_dropped_records(void)
+ snprintf(line, sizeof(line), ", %d %s",
+ dropped_all[i]->dropped, dropped_all[i]->name);
+ dropped_all[i]->dropped = 0;
+- strncat(log, line, sizeof(log));
++ strncat(log, line, sizeof(log) - strlen(log));
+ }
+ }
+ syslog(LOG_NOTICE, "%s", log);
+@@ -424,7 +424,7 @@ talk_to_sal (void)
+ int fd;
+ char filename[PATH_MAX];
+ snprintf(filename, sizeof(filename), "%s/%s/.check", directory, rd[i]);
+- if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC)) < 0) {
++ if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0) {
+ perror(filename);
+ goto out;
+ }
diff --git a/sys-apps/salinfo/metadata.xml b/sys-apps/salinfo/metadata.xml
new file mode 100644
index 000000000000..845394eb2687
--- /dev/null
+++ b/sys-apps/salinfo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>ia64@gentoo.org</email>
+ <name>Gentoo Linux IA-64 Development</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/salinfo/salinfo-1.2.ebuild b/sys-apps/salinfo/salinfo-1.2.ebuild
new file mode 100644
index 000000000000..83bb8edf39c9
--- /dev/null
+++ b/sys-apps/salinfo/salinfo-1.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="decode Itanium SAL records (e.g. various hardware errors)"
+HOMEPAGE="https://www.kernel.org/pub/linux/kernel/people/helgaas/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ia64"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ default
+ rm -rf "${ED}"/etc/{rc.d,sysconfig} "${ED}"/var || die
+}
diff --git a/sys-apps/sandbox/Manifest b/sys-apps/sandbox/Manifest
new file mode 100644
index 000000000000..645910f90b53
--- /dev/null
+++ b/sys-apps/sandbox/Manifest
@@ -0,0 +1,13 @@
+AUX 09sandbox 37 SHA256 73e9e9d12ba54f1c649813ec86107924050528852c890a8ba1e2853796781bbe SHA512 4e8a9c58debde6480224a45559c5f2db4765213d151e47937f9142f110cac3681bf6402acaf21249a37bb17398e7bc00ae7feee68ecdb5b9363c432eac1b052a WHIRLPOOL 80d55a34d3faf3314f2b9de2200d4b46a800128514be9e30eb59e5f03fb7a0a5197a9e5b5ab33d6b68d35bf83c86a1bd7ba734a33ccd382fe0af3b2c2a11d0bd
+AUX sandbox-2.10-disable-same.patch 2547 SHA256 09a11cf077ae69684080d1f0fd8fe83683fdf5f061e0a7a5261ca03463fd554a SHA512 bf005fbde7b6ba88df36bb75064658764e488dd2f3c96a6f92c69ad3f2e8d2db12ba2c7bafa9656326b7fde73301c330f68bd064efa0fce2a7eb28fff6ce0a1e WHIRLPOOL 27f0df961dcedc70819ecd1d0f105fb7176ecd77127ab187025d9aa52df9faa43941314c71a998dd72658105dfec4c5c6d3341dbae18e18b409af7dc6d9c31d6
+AUX sandbox-2.10-fix-opendir.patch 3311 SHA256 33e31a0331d75985e6fb254001d657988fbe7d0ff2f79128316530636391c76d SHA512 5c0650d6838b8171a87409ebd8565a90a42603874893708c2cdee5b50535e637f145fa2e51142db857c35a9bc11713b45b7e50c31f96f9ecd6ba342ce8d87928 WHIRLPOOL fbac85063c77b26af76761f0d377fac7c7a54e1f465fe0247b7ed90b98e077b75697ce127fa6c509fd28ff6af8313d7d65a0f34ecd969a6143af8b7246687602
+AUX sandbox-2.10-memory-corruption.patch 1515 SHA256 4876cc9962d56d3c5fc5418fe12ef1a399e34ff0272f12640c4a5c5b775e8888 SHA512 1eb650824cc7a876fabef382cafb451a507326a8422fb7bb5014699046b64ea8f4cf2bba9efcb75d7a2eac4eff493d06153422f85c119f49635ac0840071660c WHIRLPOOL db2c834119c7887ed746154e73e88cc09bf2a31184b3cda2732b70cb43dd8bc7f59f1072a4cc56ebcf593ba67330b9888832dc186ee55e009428d607f62293ab
+AUX sandbox-2.11-symlinkat-renameat.patch 3418 SHA256 74036803fd8cc07e903abdc2202167cff5e03a82d0db64ad8969b642201a993e SHA512 cbefae8aa9c289db0bfe7b2429f64aa4c437be0e269eaa657eb3b22a3086db1fca45a624cb181978b4157f0cb9b475b4ece2eb9337285bf8bede709ad4431c52 WHIRLPOOL d8943c3f4cda8428c7ab1a75decd67c5e743e5ca998d7e0ae8ba8828923b1c9dc4429c293af4dc9655d3a45e189020fd754f8152471f1626b113a50f69886c9b
+DIST sandbox-2.10.tar.xz 417068 SHA256 019d6a2646b3a5f9b6fc3fcb6ff99332901017eb845442bec8573b9901506fa6 SHA512 178b3b8fcb54e6ff67df1c8101866739b49e4d31a66717c21ef502dd2ab609fca70f1a0c662b913e207bfc1ba6994cefdcf5c92ff32add9dd98bd9707f301305 WHIRLPOOL 5d6cffa7317cafeba02af75de9ae914d4365a62b54d3dfcc14cb272e621f2f76a60a945591ccb57dd59d6750152087cb2f21e43ded3ec181d6b42df173147192
+DIST sandbox-2.12.tar.xz 424252 SHA256 265a490a8c528237c55ad26dfd7f62336fa5727c82358fc9cfbaa2e52c47fc50 SHA512 98bd2ee8807d81e65ee0c9f11cfaf2b37da2ee4d8763c68d18c0ff6b14f3cc847ae2d3a0aa30cbe86063a2108ed4d4dcf7cc3fc4f37cb7549d266d4c1989c2a9 WHIRLPOOL 4f3089746a11616c60057165f387122b74e8d2f30a2d77db296405a2b6f401fc625645bca73092436162f5d98a88bfb2a3b42909b0eceb9a59ab810d803441b0
+EBUILD sandbox-2.10-r3.ebuild 2168 SHA256 a76055435a8059b56c6079481c021cbaa9f42efc321d4e67069c6397e23c35d5 SHA512 13daa106179f4203616524cda931e3c79ecc510c09a0991f8165eedbb2e612569f648881183679941a75ee280757fcb3e6176cb61a0c2f2096573ac7a3110dfc WHIRLPOOL 12709e670cb48f463352ff3f6756f3f5193f21ac138b39d27171d97fe11950170c8c664d48c6e25e6187476d932652275f8656d596607d81c4b01f479fb21912
+EBUILD sandbox-2.10-r4.ebuild 2247 SHA256 bb8bafd4ad2c8ae8afb494354a836bb4127290796a2f29d2f9672caa25113af1 SHA512 6780124638eca9bdbf06289bd79129b44e5494c96bea8fe209bc865e2577796a0966e6f8b1bcd73012620f9020449ce65bc0f9e6c5cf083e539d6329decb67e6 WHIRLPOOL 209cf384f9941baaf42a4d510d28dbef1991de41dae7f2ca97e1fd4161f8bd85a664ff3667e7f11fe7a108ed8cc2459bf5ec05cf306fbe9f9b4fa5cdfdf53d04
+EBUILD sandbox-2.12.ebuild 1950 SHA256 51a702c9e6232003be3c10345e1be943b057211eeb4f6f07fd27b9edef866b22 SHA512 f0d3e1707225171c280902e612a5109ed78703d4bcd658a827c61e48ffbbb71c3ed86d2a2ae00289d07e46b264b10fbf48a962cf8e35c4709046c9263a473da0 WHIRLPOOL 968d03aafb5a859dfd0a2720dab7db20ce4e6d055adde0dd744021047e979464a2fb48a262dadb1e99ce799cf07204086dffce32764d173b731c7280df7023aa
+MISC ChangeLog 6831 SHA256 eb110ced56d7e173fa1fabd434fdec445259453c13ccb48a554947f9b5b359b6 SHA512 879732fd45e678aa041c18148f44db585bf077ed6ad237725dffd16be0cf4abc37ecf1aa683864b89a547e835927e6a05f0b6c24aec3f034d9a8d671d39cf3bf WHIRLPOOL a9786489a8235518c08350ad190563b8a782de07221cdf44a54bced7f7b4df51867a7a2ee6f0bfa015c514cac07f75d36bdb6d17e3942ab4ec1a5b1a55cf4093
+MISC ChangeLog-2015 25325 SHA256 9e1e3512cb2dceb07f7f480661aa00528d23e41765893244a6dae27bf039f0f6 SHA512 6c714a72b2d1848381543031478dca397fd8150a8ac82febdf4017a339ebdc0dfca8adac95aef4682311e2ada9742aaf9b86d49c9bb6768ca9c802af00744a53 WHIRLPOOL ebffa03ba18522039481fcdf1bfccc2ab5936e0fd4e0d081ae56eca0c784a8e250850855635e7a20025cb38e99e8f7dd80e448bf9e1ba70e6b8295f9aa502312
+MISC metadata.xml 266 SHA256 1681f248b3477c19f9d1228ea18ff9ebfba5415d691db4c90b9debbbec9b5a3d SHA512 8dcc34d3a08407d6807bc5e30b23c6696dbfc63c19106338780d4e2a61be360e17faeb54af993c962f347ada5d24cb314de866506484b04de4c619d6a88787e3 WHIRLPOOL 6c33192203bfded051b0003a2bd7cdb9b94d1167cd33bf2068222a1101c287c636e9e50a38a0af6b51fbd0ed0ec6452e006c4e25b47c6d8f8e160b4dd2755545
diff --git a/sys-apps/sandbox/files/09sandbox b/sys-apps/sandbox/files/09sandbox
new file mode 100644
index 000000000000..9181eb068caf
--- /dev/null
+++ b/sys-apps/sandbox/files/09sandbox
@@ -0,0 +1 @@
+CONFIG_PROTECT_MASK="/etc/sandbox.d"
diff --git a/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch b/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch
new file mode 100644
index 000000000000..296b322b0c50
--- /dev/null
+++ b/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch
@@ -0,0 +1,77 @@
+From 7a923f646ce10b7dec3c7ae5fe2079c10aa21752 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 20 Dec 2015 16:08:16 -0500
+Subject: [PATCH] libsbutil: gnulib: hand disable same_name usage
+
+We don't provide same_name because the one caller we don't use, but it
+relies on gc-sections to avoid link errors. That flag doesn't work on
+ia64 though, so we need to hand delete the one caller. Ugh.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ libsbutil/gnulib/hash-triple.c | 9 ---------
+ libsbutil/gnulib/same.h | 25 -------------------------
+ 2 files changed, 34 deletions(-)
+ delete mode 100644 libsbutil/gnulib/same.h
+
+diff --git a/libsbutil/gnulib/hash-triple.c b/libsbutil/gnulib/hash-triple.c
+index c3b6d9f..06cfbdf 100644
+--- a/libsbutil/gnulib/hash-triple.c
++++ b/libsbutil/gnulib/hash-triple.c
+@@ -24,7 +24,6 @@
+ #include <string.h>
+
+ #include "hash-pjw.h"
+-#include "same.h"
+ #include "same-inode.h"
+
+ #define STREQ(a, b) (strcmp (a, b) == 0)
+@@ -52,14 +51,6 @@ triple_hash_no_name (void const *x, size_t table_size)
+
+ /* Compare two F_triple structs. */
+ bool
+-triple_compare (void const *x, void const *y)
+-{
+- struct F_triple const *a = x;
+- struct F_triple const *b = y;
+- return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false;
+-}
+-
+-bool
+ triple_compare_ino_str (void const *x, void const *y)
+ {
+ struct F_triple const *a = x;
+diff --git a/libsbutil/gnulib/same.h b/libsbutil/gnulib/same.h
+deleted file mode 100644
+index ee313c5..0000000
+--- a/libsbutil/gnulib/same.h
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* Determine whether two file names refer to the same file.
+-
+- Copyright (C) 1997-2000, 2003-2004, 2009-2015 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/>. */
+-
+-#ifndef SAME_H_
+-# define SAME_H_ 1
+-
+-# include <stdbool.h>
+-
+-bool same_name (const char *source, const char *dest);
+-
+-#endif /* SAME_H_ */
+--
+2.6.2
+
diff --git a/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch b/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch
new file mode 100644
index 000000000000..2ff89bcdfcba
--- /dev/null
+++ b/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch
@@ -0,0 +1,79 @@
+From 3f668dc6ba1910085e61b3a24167ab1352c60d92 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Fri, 11 Nov 2016 12:34:48 +0200
+Subject: [PATCH] libsandbox: do not abort with a long name to opendir
+
+Add a pre-check for opendir that catches too long name arguments
+given to opendir, as it would get messed up and abort before it
+even gets to the open*() syscall (which would handle it correctly),
+due to opendir going through before_syscall/check_syscall, even
+though it isn't a true syscall and it getting cut to SB_PATH_MAX
+inbetween and getting confused somewhere.
+
+URL: https://bugs.gentoo.org/553092
+Signed-off-by: Mart Raudsepp <leio@gentoo.org>
+---
+ libsandbox/wrapper-funcs/opendir.c | 2 ++
+ libsandbox/wrapper-funcs/opendir_pre_check.c | 26 ++++++++++++++++++++++++++
+ libsandbox/wrappers.h | 1 +
+ 3 files changed, 29 insertions(+)
+ create mode 100644 libsandbox/wrapper-funcs/opendir_pre_check.c
+
+diff --git a/libsandbox/wrapper-funcs/opendir.c b/libsandbox/wrapper-funcs/opendir.c
+index 7670775..70c2692 100644
+--- a/libsandbox/wrapper-funcs/opendir.c
++++ b/libsandbox/wrapper-funcs/opendir.c
+@@ -10,4 +10,6 @@
+ #define WRAPPER_SAFE() SB_SAFE(name)
+ #define WRAPPER_RET_TYPE DIR *
+ #define WRAPPER_RET_DEFAULT NULL
++#define WRAPPER_PRE_CHECKS() sb_opendir_pre_check(STRING_NAME, name)
++
+ #include "__wrapper_simple.c"
+diff --git a/libsandbox/wrapper-funcs/opendir_pre_check.c b/libsandbox/wrapper-funcs/opendir_pre_check.c
+new file mode 100644
+index 0000000..60c869f
+--- /dev/null
++++ b/libsandbox/wrapper-funcs/opendir_pre_check.c
+@@ -0,0 +1,26 @@
++/*
++ * opendir() pre-check.
++ *
++ * Copyright 1999-2016 Gentoo Foundation
++ * Licensed under the GPL-2
++ */
++
++bool sb_opendir_pre_check(const char *func, const char *name)
++{
++ /* If length of name is larger than PATH_MAX, we would mess it up
++ * before it reaches the open syscall, which would cleanly error out
++ * via sandbox as well (actually with much smaller lengths than even
++ * PATH_MAX).
++ * So error out early in this case, in order to avoid an abort in
++ * check_syscall later on, which gets ran for opendir, despite it not
++ * being a syscall.
++ */
++ if (strnlen(name, PATH_MAX) == PATH_MAX) {
++ errno = ENAMETOOLONG;
++ sb_debug_dyn("EARLY FAIL: %s(%s): %s\n",
++ func, name, strerror(errno));
++ return false;
++ }
++
++ return true;
++}
+diff --git a/libsandbox/wrappers.h b/libsandbox/wrappers.h
+index 0aa58bb..bf5bf64 100644
+--- a/libsandbox/wrappers.h
++++ b/libsandbox/wrappers.h
+@@ -27,6 +27,7 @@ attribute_hidden bool sb_fopen64_pre_check (const char *func, const char *pathn
+ attribute_hidden bool sb_mkdirat_pre_check (const char *func, const char *pathname, int dirfd);
+ attribute_hidden bool sb_openat_pre_check (const char *func, const char *pathname, int dirfd, int flags);
+ attribute_hidden bool sb_openat64_pre_check (const char *func, const char *pathname, int dirfd, int flags);
++attribute_hidden bool sb_opendir_pre_check (const char *func, const char *name);
+ attribute_hidden bool sb_unlinkat_pre_check (const char *func, const char *pathname, int dirfd);
+ attribute_hidden bool sb_common_at_pre_check(const char *func, const char **pathname, int dirfd,
+ char *dirfd_path, size_t dirfd_path_len);
+--
+2.9.0
+
diff --git a/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch b/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch
new file mode 100644
index 000000000000..7dd27c9d2246
--- /dev/null
+++ b/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch
@@ -0,0 +1,42 @@
+From 529a388ebb1b4e9d6ad8a1bb61dd8211833a5976 Mon Sep 17 00:00:00 2001
+From: Denis Lisov <dennis.lissov@gmail.com>
+Date: Sat, 19 Dec 2015 19:13:58 +0300
+Subject: [PATCH] libsandbox: fix old_malloc_size check on realloc
+
+Realloc uses SB_MALLOC_TO_SIZE assuming it returns the usable size,
+while it is really the mmap size, which is greater. Thus it may fail
+to reallocate even if required.
+
+URL: https://bugs.gentoo.org/568714
+Signed-off-by: Denis Lisov <dennis.lissov@gmail.com>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ libsandbox/memory.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/libsandbox/memory.c b/libsandbox/memory.c
+index 8581128..a2d69a2 100644
+--- a/libsandbox/memory.c
++++ b/libsandbox/memory.c
+@@ -40,7 +40,8 @@ static int sb_munmap(void *addr, size_t length)
+
+ #define SB_MALLOC_TO_MMAP(ptr) ((void*)((uintptr_t)(ptr) - MIN_ALIGN))
+ #define SB_MMAP_TO_MALLOC(ptr) ((void*)((uintptr_t)(ptr) + MIN_ALIGN))
+-#define SB_MALLOC_TO_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr)))
++#define SB_MALLOC_TO_MMAP_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr)))
++#define SB_MALLOC_TO_SIZE(ptr) (SB_MALLOC_TO_MMAP_SIZE(ptr) - MIN_ALIGN)
+
+ void *malloc(size_t size)
+ {
+@@ -57,7 +58,7 @@ void free(void *ptr)
+ {
+ if (ptr == NULL)
+ return;
+- if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_SIZE(ptr)))
++ if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_MMAP_SIZE(ptr)))
+ sb_ebort("sandbox memory corruption with free(%p): %s\n",
+ ptr, strerror(errno));
+ }
+--
+2.6.2
+
diff --git a/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch b/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch
new file mode 100644
index 000000000000..e33011f74959
--- /dev/null
+++ b/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch
@@ -0,0 +1,124 @@
+From 4c47cfa22802fd8201586bef233d8161df4ff61b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 10 Mar 2017 10:15:50 -0800
+Subject: [PATCH] libsandbox: whitelist renameat/symlinkat as symlink funcs
+
+These funcs don't deref their path args, so flag them as such.
+
+URL: https://bugs.gentoo.org/612202
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ libsandbox/libsandbox.c | 4 +++-
+ tests/renameat-2.sh | 12 ++++++++++++
+ tests/renameat-3.sh | 11 +++++++++++
+ tests/renameat.at | 2 ++
+ tests/symlinkat-2.sh | 10 ++++++++++
+ tests/symlinkat-3.sh | 9 +++++++++
+ tests/symlinkat.at | 2 ++
+ 7 files changed, 49 insertions(+), 1 deletion(-)
+ create mode 100755 tests/renameat-2.sh
+ create mode 100755 tests/renameat-3.sh
+ create mode 100755 tests/symlinkat-2.sh
+ create mode 100755 tests/symlinkat-3.sh
+
+diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
+index e809308d717d..de48bd79ba53 100644
+--- a/libsandbox/libsandbox.c
++++ b/libsandbox/libsandbox.c
+@@ -650,8 +650,10 @@ static bool symlink_func(int sb_nr, int flags, const char *abs_path)
+ sb_nr == SB_NR_LCHOWN ||
+ sb_nr == SB_NR_REMOVE ||
+ sb_nr == SB_NR_RENAME ||
++ sb_nr == SB_NR_RENAMEAT ||
+ sb_nr == SB_NR_RMDIR ||
+- sb_nr == SB_NR_SYMLINK))
++ sb_nr == SB_NR_SYMLINK ||
++ sb_nr == SB_NR_SYMLINKAT))
+ {
+ /* These funcs sometimes operate on symlinks */
+ if (!((sb_nr == SB_NR_FCHOWNAT ||
+diff --git a/tests/renameat-2.sh b/tests/renameat-2.sh
+new file mode 100755
+index 000000000000..d0fbe8ae4574
+--- /dev/null
++++ b/tests/renameat-2.sh
+@@ -0,0 +1,12 @@
++#!/bin/sh
++# make sure we can clobber symlinks #612202
++
++addwrite $PWD
++
++ln -s /asdf sym || exit 1
++touch file
++renameat-0 0 AT_FDCWD file AT_FDCWD sym || exit 1
++[ ! -e file ]
++[ ! -L sym ]
++[ -e sym ]
++test ! -s "${SANDBOX_LOG}"
+diff --git a/tests/renameat-3.sh b/tests/renameat-3.sh
+new file mode 100755
+index 000000000000..9ae5c9a6511a
+--- /dev/null
++++ b/tests/renameat-3.sh
+@@ -0,0 +1,11 @@
++#!/bin/sh
++# make sure we reject bad renames #612202
++
++addwrite $PWD
++mkdir deny
++adddeny $PWD/deny
++
++touch file
++renameat-0 -1,EACCES AT_FDCWD file AT_FDCWD deny/file || exit 1
++[ -e file ]
++test -s "${SANDBOX_LOG}"
+diff --git a/tests/renameat.at b/tests/renameat.at
+index 081d7d20277e..eec4638deeaa 100644
+--- a/tests/renameat.at
++++ b/tests/renameat.at
+@@ -1 +1,3 @@
+ SB_CHECK(1)
++SB_CHECK(2)
++SB_CHECK(3)
+diff --git a/tests/symlinkat-2.sh b/tests/symlinkat-2.sh
+new file mode 100755
+index 000000000000..168362e8806f
+--- /dev/null
++++ b/tests/symlinkat-2.sh
+@@ -0,0 +1,10 @@
++#!/bin/sh
++# make sure we can clobber symlinks #612202
++
++addwrite $PWD
++
++symlinkat-0 0 /asdf AT_FDCWD ./sym || exit 1
++[ -L sym ]
++symlinkat-0 -1,EEXIST /asdf AT_FDCWD ./sym || exit 1
++[ -L sym ]
++test ! -s "${SANDBOX_LOG}"
+diff --git a/tests/symlinkat-3.sh b/tests/symlinkat-3.sh
+new file mode 100755
+index 000000000000..a01c750dd2b6
+--- /dev/null
++++ b/tests/symlinkat-3.sh
+@@ -0,0 +1,9 @@
++#!/bin/sh
++# make sure we reject bad symlinks #612202
++
++addwrite $PWD
++mkdir deny
++adddeny $PWD/deny
++
++symlinkat-0 -1,EACCES ./ AT_FDCWD deny/sym || exit 1
++test -s "${SANDBOX_LOG}"
+diff --git a/tests/symlinkat.at b/tests/symlinkat.at
+index 081d7d20277e..eec4638deeaa 100644
+--- a/tests/symlinkat.at
++++ b/tests/symlinkat.at
+@@ -1 +1,3 @@
+ SB_CHECK(1)
++SB_CHECK(2)
++SB_CHECK(3)
+--
+2.12.0
+
diff --git a/sys-apps/sandbox/metadata.xml b/sys-apps/sandbox/metadata.xml
new file mode 100644
index 000000000000..24b5738cbeb0
--- /dev/null
+++ b/sys-apps/sandbox/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sandbox@gentoo.org</email>
+ <description>Sandbox Maintainers</description>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/sandbox/sandbox-2.10-r3.ebuild b/sys-apps/sandbox/sandbox-2.10-r3.ebuild
new file mode 100644
index 000000000000..0f7d12d168dd
--- /dev/null
+++ b/sys-apps/sandbox/sandbox-2.10-r3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#
+# don't monkey with this ebuild unless contacting portage devs.
+# period.
+#
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils
+
+DESCRIPTION="sandbox'd LD_PRELOAD hack"
+HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ >=app-misc/pax-utils-0.1.19" #265376
+RDEPEND=""
+
+has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
+
+sandbox_death_notice() {
+ ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
+ ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-memory-corruption.patch #568714
+ epatch "${FILESDIR}"/${P}-disable-same.patch
+ epatch "${FILESDIR}"/${P}-fix-opendir.patch #553092
+ epatch_user
+}
+
+multilib_src_configure() {
+ filter-lfs-flags #90228
+
+ local myconf=()
+ host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092
+
+ ECONF_SOURCE="${S}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_test() {
+ # Default sandbox build will run with --jobs set to # cpus.
+ emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)"
+}
+
+multilib_src_install_all() {
+ doenvd "${FILESDIR}"/09sandbox
+
+ keepdir /var/log/sandbox
+ fowners root:portage /var/log/sandbox
+ fperms 0770 /var/log/sandbox
+
+ cd "${S}"
+ dodoc AUTHORS ChangeLog* NEWS README
+}
+
+pkg_preinst() {
+ chown root:portage "${ED}"/var/log/sandbox
+ chmod 0770 "${ED}"/var/log/sandbox
+
+ if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then
+ local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
+ if [[ -n ${old} ]] ; then
+ elog "Removing old sandbox libraries for you:"
+ find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then
+ chmod 0755 "${EROOT}"/etc/sandbox.d #265376
+ fi
+}
diff --git a/sys-apps/sandbox/sandbox-2.10-r4.ebuild b/sys-apps/sandbox/sandbox-2.10-r4.ebuild
new file mode 100644
index 000000000000..0f7929102049
--- /dev/null
+++ b/sys-apps/sandbox/sandbox-2.10-r4.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#
+# don't monkey with this ebuild unless contacting portage devs.
+# period.
+#
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils
+
+DESCRIPTION="sandbox'd LD_PRELOAD hack"
+HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ >=app-misc/pax-utils-0.1.19" #265376
+RDEPEND=""
+
+has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
+
+sandbox_death_notice() {
+ ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
+ ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-memory-corruption.patch #568714
+ epatch "${FILESDIR}"/${P}-disable-same.patch
+ epatch "${FILESDIR}"/${P}-fix-opendir.patch #553092
+ epatch "${FILESDIR}"/${PN}-2.11-symlinkat-renameat.patch #612202
+ epatch_user
+}
+
+multilib_src_configure() {
+ filter-lfs-flags #90228
+
+ local myconf=()
+ host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092
+
+ ECONF_SOURCE="${S}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_test() {
+ # Default sandbox build will run with --jobs set to # cpus.
+ emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)"
+}
+
+multilib_src_install_all() {
+ doenvd "${FILESDIR}"/09sandbox
+
+ keepdir /var/log/sandbox
+ fowners root:portage /var/log/sandbox
+ fperms 0770 /var/log/sandbox
+
+ cd "${S}"
+ dodoc AUTHORS ChangeLog* NEWS README
+}
+
+pkg_preinst() {
+ chown root:portage "${ED}"/var/log/sandbox
+ chmod 0770 "${ED}"/var/log/sandbox
+
+ if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then
+ local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
+ if [[ -n ${old} ]] ; then
+ elog "Removing old sandbox libraries for you:"
+ find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then
+ chmod 0755 "${EROOT}"/etc/sandbox.d #265376
+ fi
+}
diff --git a/sys-apps/sandbox/sandbox-2.12.ebuild b/sys-apps/sandbox/sandbox-2.12.ebuild
new file mode 100644
index 000000000000..6bea9b719117
--- /dev/null
+++ b/sys-apps/sandbox/sandbox-2.12.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils
+
+DESCRIPTION="sandbox'd LD_PRELOAD hack"
+HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/"
+SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ >=app-misc/pax-utils-0.1.19" #265376
+RDEPEND=""
+
+has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
+
+sandbox_death_notice() {
+ ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
+ ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox"
+}
+
+multilib_src_configure() {
+ filter-lfs-flags #90228
+
+ local myconf=()
+ host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092
+
+ ECONF_SOURCE="${S}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_test() {
+ # Default sandbox build will run with --jobs set to # cpus.
+ emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)"
+}
+
+multilib_src_install_all() {
+ doenvd "${FILESDIR}"/09sandbox
+
+ keepdir /var/log/sandbox
+ fowners root:portage /var/log/sandbox
+ fperms 0770 /var/log/sandbox
+
+ dodoc AUTHORS ChangeLog* NEWS README
+}
+
+pkg_preinst() {
+ chown root:portage "${ED}"/var/log/sandbox
+ chmod 0770 "${ED}"/var/log/sandbox
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ ${v} == 1.* ]] ; then
+ local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
+ if [[ -n ${old} ]] ; then
+ elog "Removing old sandbox libraries for you:"
+ find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete
+ fi
+ fi
+ done
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ ${v} == 1.* ]] ; then
+ chmod 0755 "${EROOT}"/etc/sandbox.d #265376
+ fi
+ done
+}
diff --git a/sys-apps/sdparm/Manifest b/sys-apps/sdparm/Manifest
new file mode 100644
index 000000000000..37bc1a6366cc
--- /dev/null
+++ b/sys-apps/sdparm/Manifest
@@ -0,0 +1,5 @@
+DIST sdparm-1.10.tgz 361464 SHA256 1ea1ed1bb1ee2aef62392618fa42da9ed027d5e655f174525c39235778292ab3 SHA512 1cfa95ced443d190ee9e4a899c9cfc6b98367ba39a9cc201c0db2f8c92dd4e74368182be3b8bfe28e51761b1ededf914ee669ef8ff6023d1ec1f05d69889a35f WHIRLPOOL 34b606c440ea0375927efa6136ff53554df9af282060ca58cf8edebe6c9aebce68c53e7498eec81a1422c1c4224b1746a55999250c0b2774b66f39a26148b0c7
+EBUILD sdparm-1.10.ebuild 1025 SHA256 881b71153805141fa80a6bed6daedb7632766fb930bb8caae18264ca4cbc6848 SHA512 bb1f74e0ac480e2b4aaabb71c966418536bf79da117d02eaeaa19f43becd02a4768fe2c8459c489673e6d07cf78756db78997e495266ba5dd0d09dbb67eeb263 WHIRLPOOL 6a6f549205bd964fe316b0c777058bf3d42c9f34b54214017deeec9edbd2fc5f31343c17efc0c0bcd39f048a33ae8dc49efacfd1cf62fa2bbaf0bb60b62f1727
+MISC ChangeLog 4792 SHA256 05f368aac416f29336789aac296de94df6315163d655872eb0edbd9d61d06b87 SHA512 d70023b2acb4a8fa0ab4a5ee0ad73680a6bf409b4dea62900346ff44fdd9647a05edf97fd02362a7c5d5309a251d5bb78f4d2d268bc2fbef1e2a9f41c4170cfa WHIRLPOOL 21f77e878e48c72d855633c35cae76217bce100483164816baacf9f385d97883f59cbaa7e864ec87c69edb39538be8be8dc8d2c0180b9d8d941e472a2ad14191
+MISC ChangeLog-2015 9819 SHA256 0cde8ced070c1934a51880d97c2c4f4ad68dbf03228f817fe9883835e969e381 SHA512 cf30e38ff99ced0e648343b4610472790106f10d232ae8ad188ff0be3ca512083279afa0f06b9f2e1459bb1093d82729b1fb8182f9fdd8a39c163aab282d63df WHIRLPOOL 2e4cb3513c6eaa04b9a609d256c396d7356ceda7d06e5f812ef72b29b6b10adc6981b1d6eb649ab9fd44c478f42b17564f150d1e5210fd7812115bc63e235c22
+MISC metadata.xml 372 SHA256 7f7cfc2e4268615aa55f820f6eb15aa74f75cc9aec8f901aeb6ff5551f902989 SHA512 ac15ece82367c7a5a7cee2248a418b2dc5912027f29805d2851643127ea90c7b4ff3d21c90afcf0255f6946b0290551884405bab7fe62d2d9ab0dcc10de4da5d WHIRLPOOL a7f589d38707dacc7a8a321349f35c1ba450941bd91156557d66c893bfdae3ab18fc03d858360da55cb17590d06ab7696b7bd21a2ce4f939786fe8653132ce9c
diff --git a/sys-apps/sdparm/metadata.xml b/sys-apps/sdparm/metadata.xml
new file mode 100644
index 000000000000..f67ae1a49196
--- /dev/null
+++ b/sys-apps/sdparm/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+ Utility to output and modify parameters on a SCSI device, like hdparm.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/sdparm/sdparm-1.10.ebuild b/sys-apps/sdparm/sdparm-1.10.ebuild
new file mode 100644
index 000000000000..ddd555e974f2
--- /dev/null
+++ b/sys-apps/sdparm/sdparm-1.10.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Utility to output and modify parameters on a SCSI device, like hdparm"
+HOMEPAGE="http://sg.danny.cz/sg/sdparm.html"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+# Older releases contain a conflicting sas_disk_blink
+RDEPEND=">=sys-apps/sg3_utils-1.42"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog CREDITS README notes.txt )
+
+src_configure() {
+ # sdparm ships with a local copy of this lib, but will use the system copy if it
+ # detects it (see the README file). Force the use of the system lib. #479578
+ export ac_cv_lib_sgutils2_sg_ll_inquiry=yes
+ default
+}
+
+src_install() {
+ default
+
+ # These don't exist yet. Someone wanna copy hdparm's and make them work? :)
+ #newinitd ${FILESDIR}/sdparm-init-1 sdparm
+ #newconfd ${FILESDIR}/sdparm-conf.d-1 sdparm
+}
diff --git a/sys-apps/secilc/Manifest b/sys-apps/secilc/Manifest
new file mode 100644
index 000000000000..b799caf34091
--- /dev/null
+++ b/sys-apps/secilc/Manifest
@@ -0,0 +1,8 @@
+DIST secilc-2.6.tar.gz 174543 SHA256 a84838c15bb7b0141238b48294b15ff0e1618107f547541a0067d1ddabcc9502 SHA512 5d59320d599d15754d76d36d981a1927d9633db9813f0248c29c9ff38bc59bf394910f4d56444a97df910b48e59f128d9997a85b6bd2ee8e0dd3ae31a9a2b7d0 WHIRLPOOL 34933ef3b67e6c665f7ef239beba577928a9d99d01d3b801931dfc44a0a602822361f3ec63dd03e8becde3dd5f1092d3f7b915ac83ecfb77fb5a9cfa107fa4b6
+DIST secilc-2.7.tar.gz 175733 SHA256 9ec63dd64645c718f66d33c96299adfe0445b0aa62d7ac8c642f873c570609c5 SHA512 cd828ad34e80151951f94414d27246b480cd4831d1d57cb35d5958ce23c30fe74f26ec1c4b29b51fe382bf03ec3144311b35ca645ffc6b914b7abfe677684c06 WHIRLPOOL 8e6107728df2a454a1482570480df0fedf377710151d046ba87ebcf33f028bf9bedf473cd2d374a834a2ce345e749ad916707ee7bd9caf6581e661d717241359
+EBUILD secilc-2.6.ebuild 856 SHA256 33641e796e6b11dca311df2df8a24162a0b29fb44805be47f77abd11debc95f1 SHA512 062650227a2625af512e415b5f9f85f74f3045962637ae543bfa0657312ae655532deb86932952d025517cdee7b350d294896addcdea55c55f559c23391afbf7 WHIRLPOOL 9ca4ca93ba412feca86b1987391353768d9f52505879a856c5f625b068c6dd8f3fa4fe44690addbb535880d2a01f8872ebd4eea2736d68bc60847af4114b8639
+EBUILD secilc-2.7.ebuild 922 SHA256 6334b0559381ae0429e93330bb698d3242ae6a787091ca1ad4a7a557487c7cb6 SHA512 dc913463e0a5d9c3367712c4e4d7a096b0ae84d0e188086f3328a66d081a92e45f2f12df86e8d5e7e175e9196ac6c3a3acbcf29870ca04f5e23aa8aa46715b28 WHIRLPOOL 7af92ea2d9ac8f2590f43a9dfdbb8207d78feba0f2285a3e60419016c179326321cf52a697acb6c0dc6a7e9a29154b696bba8cfa4155edc5139bb289395dc8fc
+EBUILD secilc-9999.ebuild 924 SHA256 c000a10033fdaaf79443e5b8371f4beea9117abbd83e4113453b60466116bdec SHA512 076b8a6a769f675eacc13713ff1421360af94c9a91dca76b6f1d2fffa4270289f61753f638111fd506ecd562883f7c465b0bdf768bed15dabe10888fc084d37b WHIRLPOOL 054b0afa76f916e5447525eaa55ec62f3214433f4bcac3ae8f3089ff28677d8275c83bc37dec757c18a1d90048c910e2324dd76612d2d9603d67c87c8d65ef43
+MISC ChangeLog 3317 SHA256 bbb1b5c18ec3b8f27c69c53c043722ba245f2887cfb4bf5e7a073b9e2af37d8b SHA512 90cc883eae608ce7b29f94b316de1d90a851ae1aa0bebbdc85ca8df358ada894005eace353830277c8530572fb7a1a3cab87e4385d9eb3b14cb50204a006c609 WHIRLPOOL 998e55071042e98d2dcb1b233513c0b0541bd54df3357535013de6206ef9e76781c66a7e6e37e11ca8d3d00ff6755be9b3560cb7c282b6eca678bf058ca98ac3
+MISC ChangeLog-2015 378 SHA256 f0c9286dc915f35b032160fb4300480b1e69f03533f61b0082d15bca1df8845d SHA512 2d45f26f81fb77175c99ef125d27f31876ead319a05eaadb5ae4d673dcebf3191d61cf048207cf4efc84208be3e221cf3ec119a273fb5b1e4a04d6641b5e74c2 WHIRLPOOL bf2f7c89779a51bee170cf5b44d5f248eb1cd210d923161d8de7ad7d9cac26ea47f5d1882e4b627d980fbbd40eabb17de47ba08ec79ee33cc2b95d10d31dfd99
+MISC metadata.xml 529 SHA256 875c9833e8587f5dd895dbd3552b91153422b8d8779d8101d1708cb4f21056fb SHA512 390d766e53aeb5b9e37d8796736b2fd98e06ed4620f8ad2af4fed980ac2468c7cb316caa46358f3247c77d9a1d7a32d30deb3ddb08359265defb265b3fbcb8c7 WHIRLPOOL 52a598cf3e8d036f9b02d010a401c5f7ad7ec7fa41b85ed6c8506e484a1552a4e22a173cb20078077be83f4874163fd7a4aa0b536d5c8b67d3ff98726e6b5e41
diff --git a/sys-apps/secilc/metadata.xml b/sys-apps/secilc/metadata.xml
new file mode 100644
index 000000000000..caa92457aea0
--- /dev/null
+++ b/sys-apps/secilc/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 type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ The SELinux CIL Compiler is a compiler that converts the CIL language as
+ described on the CIL design wiki into a kernel binary policy file.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/secilc/secilc-2.6.ebuild b/sys-apps/secilc/secilc-2.6.ebuild
new file mode 100644
index 000000000000..4dbf6ea81427
--- /dev/null
+++ b/sys-apps/secilc/secilc-2.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20161014"
+
+SEPOL_VER="${PV}"
+
+DESCRIPTION="SELinux Common Intermediate Language (CIL) Compiler"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ app-text/xmlto
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+RDEPEND="
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+
+# tests are not meant to be run outside of the
+# full SELinux userland repo
+RESTRICT="test"
diff --git a/sys-apps/secilc/secilc-2.7.ebuild b/sys-apps/secilc/secilc-2.7.ebuild
new file mode 100644
index 000000000000..0990b3608558
--- /dev/null
+++ b/sys-apps/secilc/secilc-2.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20170804"
+
+SEPOL_VER="${PV}"
+
+DESCRIPTION="SELinux Common Intermediate Language (CIL) Compiler"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ app-text/xmlto
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+RDEPEND="
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+
+# tests are not meant to be run outside of the
+# full SELinux userland repo
+RESTRICT="test"
+
+src_compile() {
+ tc-export CC
+ default
+}
diff --git a/sys-apps/secilc/secilc-9999.ebuild b/sys-apps/secilc/secilc-9999.ebuild
new file mode 100644
index 000000000000..7b5cd2063295
--- /dev/null
+++ b/sys-apps/secilc/secilc-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit toolchain-funcs
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20170804"
+
+SEPOL_VER="${PV}"
+
+DESCRIPTION="SELinux Common Intermediate Language (CIL) Compiler"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ app-text/xmlto
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+RDEPEND="
+ >=sys-libs/libsepol-${SEPOL_VER}
+ "
+
+# tests are not meant to be run outside of the
+# full SELinux userland repo
+RESTRICT="test"
+
+src_compile() {
+ tc-export CC
+ default
+}
diff --git a/sys-apps/sed/Manifest b/sys-apps/sed/Manifest
new file mode 100644
index 000000000000..3d7c66a28771
--- /dev/null
+++ b/sys-apps/sed/Manifest
@@ -0,0 +1,13 @@
+AUX sed-4.1.5-alloca.patch 413 SHA256 9b371d7e3db5f6955536b4c4a23739b7d84448b9865046f0cc3bd3903a04009a SHA512 dccdad774cbf1eb71744b9d1a49ce45e6c6197ffed66448b6de9302dc88d46246b52a6cbed95a5b86511f19a735a710af177003732d54ca01baa84ef21734d29 WHIRLPOOL a7c81b9229bb62946618053993c35db26a7f06d03880a499916aed28fcab9308b7038f6a90ba84e2f86caaef0383cf8daf59d5759f5de0c6b840f9cbbc6561b3
+AUX sed-4.3-dfa-segv-1.patch 6180 SHA256 08c109a3deaee657b7c0aaffc4ebc74d8b1ee592a28a6e848c6f06b3d1fcd994 SHA512 467a36bc863ee2bed90b8e87f0023b67615c606dea4376bc8da72356f13871a51f82e73965f1f17975d76b7768dfe20ad2d4b7373a2c208257981d8235b61e7b WHIRLPOOL 1b0df74d07893e7666f19ddbadb666b7821d31aa37fca6381e04303b25d78f894aba7ed7e19d1d422ba779e528e8ff91a1fbba7965f4f23f353fd9a524f7d7f3
+AUX sed-4.3-dfa-segv-2.patch 3797 SHA256 b0aa5ec7815a7f0102330f9d154e2a4b9bf77c73f85fa692aab204ed7f832470 SHA512 d346f71e4899d5bde9127f86428a8ab1ee149aee28247e6e04ff940eb9ee90392f81d3d61b525cef5f1c3e871ee4295b4168edcd00d802edfc3f8a2725a39072 WHIRLPOOL 8ab3a8c3d469593bd91739d85defd9eca44610e24d75171e038da01bcc829c93c3b014897ae8035b436bffc807b497eb1f5401c14ade7f9fc1021972f365613b
+AUX sed-4.3-dfa-segv-3.patch 5334 SHA256 cfed3226c7b487a3ecd0dd10605d271f3569764645b78c9911af359bb3c7f1bb SHA512 270a4917addf899d03b32fe544816d2132063ca113229cd1b5b72dacd1ebb6f087fea5cc362ceda3237966074cf542883f12e3f1d2da4b045a7f158f50017ccb WHIRLPOOL 0474a41c42cfb414534b793289d76d3023f3281f616dfdfed49a43e0d204789217df0ad986762b233b32937693c0a6899c37892a51b5533b727dcf7b66decaed
+DIST sed-4.2.2.tar.bz2 1059414 SHA256 f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7 SHA512 dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 WHIRLPOOL d816657c51a2718c2b309455facaff50c9da08b79d20985ab1d61faa5b42bffa0b33ea7d3368a8cdaa6079891cfc27cdab38788563c8323081580b4478c7e2b5
+DIST sed-4.3.tar.xz 1167168 SHA256 47c20d8841ce9e7b6ef8037768aac44bc2937fff1c265b291c824004d56bd0aa SHA512 4d76a099cf7115763b79b45be5c96338750baa47e34c36075f714e022614397aa9240099d6d009e69aa4d06b6cfc14dcc0f8313442a1465f448b36fb6874a26d WHIRLPOOL dc8ea635d7cd30fa73b163078ed7e48d3f85aaf37041b432f3c1579d556a41cb0afa2c8468f67a4474d7274578850b698b60933f6b4b3d041ee4f77ace344035
+DIST sed-4.4.tar.xz 1181664 SHA256 cbd6ebc5aaf080ed60d0162d7f6aeae58211a1ee9ba9bb25623daa6cd942683b SHA512 4e1b0a7403913f1e25047eb2292a0a9b3488b15b4463ce2803e05eaecbc2da19f477a18e6a70c992461c38ced90774415091aa2d8ce85cb74e391610d9eedb70 WHIRLPOOL 2437887adb4ec36ea884b319e6cfd16eed9890277665989aecd3726eea98cf3bf403c04c60a02700b7b4968018cfe48296d82b169317d354cee620bce70b5ec9
+EBUILD sed-4.2.2.ebuild 1715 SHA256 c596074758c3146f176b586352c5fe0f6f1c8af8499a484dfaf0f9ea5cb1c769 SHA512 512f3f3da20b8f556c9d0c65ff31a8c6876bc22f4075831dd3d147d856232f8e97293119dceec902534bc74478e4aaa83bcc0ef87737ae98879beb18bfdb82ae WHIRLPOOL 65f963489396743a8ef106854a488516cc4d9c77065d5d1c81d9ad058afb003323d18d744aa8476bfb273a35c5a0102b369016ad9334e49374429205c2b81fe6
+EBUILD sed-4.3-r1.ebuild 1483 SHA256 8f245bb552fd6e17b1ca417963f4238e88dbc16f706d648c774c9f9952ee396b SHA512 df98241b8a8f1b1d2bd2ba906fba4ae23d8fd3d1a4a09a129fde9f07261f306863078d27daee401085500be15536b1d87724c75d8382bae7673d6b3d0f75b7a5 WHIRLPOOL 990b196d433a0b28d56014e5b296fd6468b69cfc8df595c7d69bf69bd27d40695227f43dacf0395b77bb03a72c110e01e002077fd35cdaad8bcd1c03ba494e56
+EBUILD sed-4.4.ebuild 1443 SHA256 5f8327a368a5832854b89c69c80155ce6a1bf9b2e4d91f46d10ad49568c56a6e SHA512 cb5a40e371063b96b4c7f514944f8da502a83a526718214bf296a62dc1870def5074a1d91d99679011c2ea1619b85b3049f5ee6c77cf1ab911101b7c839bcfaa WHIRLPOOL 295b3365e98212bfdd91c3e0fe3dfe34b951585368a7e3e9baf9ff698515f64916232f560f0afc2b2ba24136b6e9b47fb77beedd86318417cccb219ccb28eba0
+MISC ChangeLog 4136 SHA256 3679cc29efbbc5e3171afd37fcb9fd6389941e57a8f3ee4bd3d4286d7168de34 SHA512 99db0b0302479b429d41184a5e6a146ad2eff5ded383073f7c100b2bc8ff5f3c73701cea8e62fd3c71e2f67076ffdd97e4f500a4ac356f9b8c0cf9f8b6b558aa WHIRLPOOL c8402c0bef4e4014364aca64ff79cfe4bb2a4ac898ef248bc8849737619dd6998575e828c88a9827cdc671a347141f40d930238ed0710bf627468ade040aa777
+MISC ChangeLog-2015 16503 SHA256 4ea4cf5813c3e62b75043c34314486e774f96cab7bffb94e11a90303f9140f82 SHA512 40c7fcca90187b31b54045a09fdc7ea6b8581ec37f88eb05e3df41ecb2d49d2ddffab1c84c0faacfae5151a148ee2d22d51acd3629225aa64b6596f401a8a669 WHIRLPOOL 5e9ba487e404f2be4cb200b8dc4e870e9846e4752b4bca683bad1fac63af55a582bfbcd001e9b7254320cdcc8ca88ef2ab2d3cb29fc28f39a93943bb8d298f7b
+MISC metadata.xml 323 SHA256 4574efa0a4c0db71c699957b59632b3212209a654e0bbcee1d6448b0b16074c5 SHA512 ec3a11f7aafded3d4b5e12680358f39dbeb166f96af51eae8dafb21b186024ddb9b5b9ba36bde626be01b1938fd6f4bbcb58f0f8bad2208a84d44eaadc95652e WHIRLPOOL d00ccb5adec759d4fb86b9e919d7f2a942edcf455b2e6681f4b299448396127a39b8f81e690bd873f678452ebcaf90e8a76c3789db7cc4269f4da303c15201be
diff --git a/sys-apps/sed/files/sed-4.1.5-alloca.patch b/sys-apps/sed/files/sed-4.1.5-alloca.patch
new file mode 100644
index 000000000000..89679c5362e3
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.1.5-alloca.patch
@@ -0,0 +1,14 @@
+fix building on BSD systems which often do not have alloca.h
+
+--- sed-4.1.5/lib/regex_internal.h
++++ sed-4.1.5/lib/regex_internal.h
+@@ -410,7 +410,9 @@ static unsigned int re_string_context_at
+ #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+ #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
+
++#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
++#endif
+
+ #ifndef _LIBC
+ # if HAVE_ALLOCA
diff --git a/sys-apps/sed/files/sed-4.3-dfa-segv-1.patch b/sys-apps/sed/files/sed-4.3-dfa-segv-1.patch
new file mode 100644
index 000000000000..f82adc712533
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.3-dfa-segv-1.patch
@@ -0,0 +1,175 @@
+fix from upstream gnulib (fudged to apply to sed-4.3)
+
+From 823b5cb589366f7c8742503af980803afad0978f Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 8 Jan 2017 12:44:29 -0800
+Subject: [PATCH] dfa: fix reallocation bug when matching newlines
+
+Problem reported for sed by S. Gilles (Bug#25390).
+* lib/dfa.c (realloc_trans_if_necessary): Move earlier.
+(dfastate): Reallocate before moving any newline transition ...
+(build_state): ... instead of reallocating here, where it is too late.
+---
+ ChangeLog | 8 +++++
+ lib/dfa.c | 114 ++++++++++++++++++++++++++++++--------------------------------
+ 2 files changed, 63 insertions(+), 59 deletions(-)
+
+diff --git a/lib/dfa.c b/lib/dfa.c
+index 8276db160a4b..141888a978fa 100644
+--- a/lib/dfa.c
++++ b/lib/dfa.c
+@@ -2574,6 +2574,40 @@ dfaanalyze (struct dfa *d, bool searchflag)
+ free (merged.elems);
+ }
+
++/* Make sure D's state arrays are large enough to hold NEW_STATE. */
++static void
++realloc_trans_if_necessary (struct dfa *d, state_num new_state)
++{
++ state_num oldalloc = d->tralloc;
++ if (oldalloc <= new_state)
++ {
++ state_num **realtrans = d->trans ? d->trans - 2 : NULL;
++ ptrdiff_t newalloc1 = realtrans ? d->tralloc + 2 : 0;
++ realtrans = xpalloc (realtrans, &newalloc1, new_state - oldalloc + 1,
++ -1, sizeof *realtrans);
++ realtrans[0] = realtrans[1] = NULL;
++ d->trans = realtrans + 2;
++ ptrdiff_t newalloc = d->tralloc = newalloc1 - 2;
++ d->fails = xnrealloc (d->fails, newalloc, sizeof *d->fails);
++ d->success = xnrealloc (d->success, newalloc, sizeof *d->success);
++ d->newlines = xnrealloc (d->newlines, newalloc, sizeof *d->newlines);
++ if (d->localeinfo.multibyte)
++ {
++ realtrans = d->mb_trans ? d->mb_trans - 2 : NULL;
++ realtrans = xnrealloc (realtrans, newalloc1, sizeof *realtrans);
++ if (oldalloc == 0)
++ realtrans[0] = realtrans[1] = NULL;
++ d->mb_trans = realtrans + 2;
++ }
++ for (; oldalloc < newalloc; oldalloc++)
++ {
++ d->trans[oldalloc] = NULL;
++ d->fails[oldalloc] = NULL;
++ if (d->localeinfo.multibyte)
++ d->mb_trans[oldalloc] = NULL;
++ }
++ }
++}
+
+ /* Return the transition out of state s of d for the input character uc,
+ updating the slots in trans accordingly.
+@@ -2810,20 +2844,25 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ }
+
+ /* Set the transitions for each character in the label. */
++ state_num maxstate = -1;
+ for (i = 0; i < NOTCHAR; i++)
+ if (tstbit (i, label))
+- switch (d->syntax.sbit[i])
+- {
+- case CTX_NEWLINE:
+- trans[i] = state_newline;
+- break;
+- case CTX_LETTER:
+- trans[i] = state_letter;
+- break;
+- default:
+- trans[i] = state;
+- break;
+- }
++ {
++ switch (d->syntax.sbit[i])
++ {
++ case CTX_NEWLINE:
++ trans[i] = state_newline;
++ break;
++ case CTX_LETTER:
++ trans[i] = state_letter;
++ break;
++ default:
++ trans[i] = state;
++ break;
++ }
++ if (maxstate < trans[i])
++ maxstate = trans[i];
++ }
+
+ #ifdef DEBUG
+ fprintf (stderr, "trans table %td", s);
+@@ -2840,6 +2879,9 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ free (follows.elems);
+ free (tmp.elems);
+
++ /* Reallocate now, to reallocate any newline transition properly. */
++ realloc_trans_if_necessary (d, maxstate);
++
+ /* Keep the newline transition in a special place so we can use it as
+ a sentinel. */
+ if (tstbit (d->syntax.eolbyte, label))
+@@ -2851,42 +2893,6 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ return trans[uc];
+ }
+
+-/* Make sure D's state arrays are large enough to hold NEW_STATE. */
+-static void
+-realloc_trans_if_necessary (struct dfa *d, state_num new_state)
+-{
+- state_num oldalloc = d->tralloc;
+- if (oldalloc <= new_state)
+- {
+- state_num **realtrans = d->trans ? d->trans - 2 : NULL;
+- ptrdiff_t newalloc, newalloc1;
+- newalloc1 = realtrans ? d->tralloc + 2 : 0;
+- realtrans = xpalloc (realtrans, &newalloc1, new_state - oldalloc + 1,
+- -1, sizeof *realtrans);
+- realtrans[0] = realtrans[1] = NULL;
+- d->trans = realtrans + 2;
+- d->tralloc = newalloc = newalloc1 - 2;
+- d->fails = xnrealloc (d->fails, newalloc, sizeof *d->fails);
+- d->success = xnrealloc (d->success, newalloc, sizeof *d->success);
+- d->newlines = xnrealloc (d->newlines, newalloc, sizeof *d->newlines);
+- if (d->localeinfo.multibyte)
+- {
+- realtrans = d->mb_trans ? d->mb_trans - 2 : NULL;
+- realtrans = xnrealloc (realtrans, newalloc1, sizeof *realtrans);
+- if (oldalloc == 0)
+- realtrans[0] = realtrans[1] = NULL;
+- d->mb_trans = realtrans + 2;
+- }
+- for (; oldalloc < newalloc; oldalloc++)
+- {
+- d->trans[oldalloc] = NULL;
+- d->fails[oldalloc] = NULL;
+- if (d->localeinfo.multibyte)
+- d->mb_trans[oldalloc] = NULL;
+- }
+- }
+-}
+-
+ /* Calculate the transition table for a new state derived from state s
+ for a compiled dfa d after input character uc, and return the new
+ state number. */
+@@ -2932,18 +2939,7 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
+ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NONE, s, *d))
+ d->success[s] |= CTX_NONE;
+
+- s = dfastate (s, d, uc, trans);
+-
+- /* Now go through the new transition table, and make sure that the trans
+- and fail arrays are allocated large enough to hold a pointer for the
+- largest state mentioned in the table. */
+- state_num maxstate = -1;
+- for (int i = 0; i < NOTCHAR; i++)
+- if (maxstate < trans[i])
+- maxstate = trans[i];
+- realloc_trans_if_necessary (d, maxstate);
+-
+- return s;
++ return dfastate (s, d, uc, trans);
+ }
+
+ /* Multibyte character handling sub-routines for dfaexec. */
+--
+2.11.0
+
diff --git a/sys-apps/sed/files/sed-4.3-dfa-segv-2.patch b/sys-apps/sed/files/sed-4.3-dfa-segv-2.patch
new file mode 100644
index 000000000000..4e4fb2c648cc
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.3-dfa-segv-2.patch
@@ -0,0 +1,112 @@
+fix from upstream gnulib (fudged to apply to sed-4.3)
+
+From aff55692da81f702ccbc461ad4f896b23c398638 Mon Sep 17 00:00:00 2001
+From: Norihiro Tanaka <noritnk@kcn.ne.jp>
+Date: Mon, 9 Jan 2017 07:46:13 +0900
+Subject: [PATCH] dfa: simplify transition table allocation
+
+* src/dfa.c (realloc_trans_if_necessary): Remove second argument.
+Its value is derived from other variable. Update callers.
+(dfastate): Remove calculation of max number of state.
+---
+ lib/dfa.c | 44 ++++++++++++++++++++------------------------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
+diff --git a/lib/dfa.c b/lib/dfa.c
+index 141888a978fa..bda4602b1094 100644
+--- a/lib/dfa.c
++++ b/lib/dfa.c
+@@ -2576,14 +2576,14 @@ dfaanalyze (struct dfa *d, bool searchflag)
+
+ /* Make sure D's state arrays are large enough to hold NEW_STATE. */
+ static void
+-realloc_trans_if_necessary (struct dfa *d, state_num new_state)
++realloc_trans_if_necessary (struct dfa *d)
+ {
+ state_num oldalloc = d->tralloc;
+- if (oldalloc <= new_state)
++ if (oldalloc < d->sindex)
+ {
+ state_num **realtrans = d->trans ? d->trans - 2 : NULL;
+ ptrdiff_t newalloc1 = realtrans ? d->tralloc + 2 : 0;
+- realtrans = xpalloc (realtrans, &newalloc1, new_state - oldalloc + 1,
++ realtrans = xpalloc (realtrans, &newalloc1, d->sindex - oldalloc,
+ -1, sizeof *realtrans);
+ realtrans[0] = realtrans[1] = NULL;
+ d->trans = realtrans + 2;
+@@ -2825,6 +2825,9 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ state_letter = state_index (d, &follows, CTX_LETTER);
+ else
+ state_letter = state;
++
++ /* Reallocate now, to reallocate any newline transition properly. */
++ realloc_trans_if_necessary (d);
+ }
+
+ /* If we are a searching matcher, the default transition is to a state
+@@ -2847,22 +2850,18 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ state_num maxstate = -1;
+ for (i = 0; i < NOTCHAR; i++)
+ if (tstbit (i, label))
+- {
+- switch (d->syntax.sbit[i])
+- {
+- case CTX_NEWLINE:
+- trans[i] = state_newline;
+- break;
+- case CTX_LETTER:
+- trans[i] = state_letter;
+- break;
+- default:
+- trans[i] = state;
+- break;
+- }
+- if (maxstate < trans[i])
+- maxstate = trans[i];
+- }
++ switch (d->syntax.sbit[i])
++ {
++ case CTX_NEWLINE:
++ trans[i] = state_newline;
++ break;
++ case CTX_LETTER:
++ trans[i] = state_letter;
++ break;
++ default:
++ trans[i] = state;
++ break;
++ }
+
+ #ifdef DEBUG
+ fprintf (stderr, "trans table %td", s);
+@@ -2879,9 +2878,6 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ free (follows.elems);
+ free (tmp.elems);
+
+- /* Reallocate now, to reallocate any newline transition properly. */
+- realloc_trans_if_necessary (d, maxstate);
+-
+ /* Keep the newline transition in a special place so we can use it as
+ a sentinel. */
+ if (tstbit (d->syntax.eolbyte, label))
+@@ -3042,7 +3038,7 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
+
+ separate_contexts = state_separate_contexts (&d->mb_follows);
+ s2 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+- realloc_trans_if_necessary (d, s2);
++ realloc_trans_if_necessary (d);
+
+ d->mb_trans[s][d->states[s1].mb_trindex] = s2;
+
+@@ -3137,7 +3133,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
+ }
+
+ if (!d->tralloc)
+- realloc_trans_if_necessary (d, 0);
++ realloc_trans_if_necessary (d);
+
+ s = s1 = 0;
+ p = mbp = (unsigned char const *) begin;
+--
+2.11.0
+
diff --git a/sys-apps/sed/files/sed-4.3-dfa-segv-3.patch b/sys-apps/sed/files/sed-4.3-dfa-segv-3.patch
new file mode 100644
index 000000000000..d85022f754f0
--- /dev/null
+++ b/sys-apps/sed/files/sed-4.3-dfa-segv-3.patch
@@ -0,0 +1,146 @@
+fix from upstream gnulib (fudged to apply to sed-4.3)
+
+From 7c345c68cdf62737ccc4a9d0ba2cd921fae850fa Mon Sep 17 00:00:00 2001
+From: Norihiro Tanaka <noritnk@kcn.ne.jp>
+Date: Mon, 9 Jan 2017 08:21:21 +0900
+Subject: [PATCH] dfa: melt down dfastate into build_state
+
+* src/dfa.c (dfastate): Remove it.
+(build_state): Insert content of dfastate() to bottom.
+---
+ lib/dfa.c | 97 +++++++++++++++++++++++++++++----------------------------------
+ 1 file changed, 45 insertions(+), 52 deletions(-)
+
+diff --git a/lib/dfa.c b/lib/dfa.c
+index bda4602b1094..6896ed320a7b 100644
+--- a/lib/dfa.c
++++ b/lib/dfa.c
+@@ -2609,8 +2609,10 @@ realloc_trans_if_necessary (struct dfa *d)
+ }
+ }
+
+-/* Return the transition out of state s of d for the input character uc,
+- updating the slots in trans accordingly.
++/*
++ Calculate the transition table for a new state derived from state s
++ for a compiled dfa d after input character uc, and return the new
++ state number.
+
+ Do not worry about all possible input characters; calculate just the group
+ of positions that match uc. Label it with the set of characters that
+@@ -2639,8 +2641,9 @@ realloc_trans_if_necessary (struct dfa *d)
+ If after comparing with every group there are characters remaining in C,
+ create a new group labeled with the characters of C and insert this
+ position in that group. */
++
+ static state_num
+-dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
++build_state (state_num s, struct dfa *d, unsigned char uc)
+ {
+ leaf_set group; /* Positions that match the input char. */
+ charclass label; /* The group's label. */
+@@ -2652,6 +2655,45 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ fprintf (stderr, "build state %td\n", s);
+ #endif
+
++ /* A pointer to the new transition table, and the table itself. */
++ state_num **ptrans = (ACCEPTING (s, *d) ? d->fails : d->trans) + s;
++ state_num *trans = *ptrans;
++
++ if (!trans)
++ {
++ /* MAX_TRCOUNT is an arbitrary upper limit on the number of
++ transition tables that can exist at once, other than for
++ initial states. Often-used transition tables are quickly
++ rebuilt, whereas rarely-used ones are cleared away. */
++ if (MAX_TRCOUNT <= d->trcount)
++ {
++ for (state_num i = d->min_trcount; i < d->tralloc; i++)
++ {
++ free (d->trans[i]);
++ free (d->fails[i]);
++ d->trans[i] = d->fails[i] = NULL;
++ }
++ d->trcount = 0;
++ }
++
++ d->trcount++;
++ *ptrans = trans = xmalloc (NOTCHAR * sizeof *trans);
++
++ /* Fill transition table with a default value which means that the
++ transited state has not been calculated yet. */
++ for (int i = 0; i < NOTCHAR; i++)
++ trans[i] = -2;
++ }
++
++ /* Set up the success bits for this state. */
++ d->success[s] = 0;
++ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NEWLINE, s, *d))
++ d->success[s] |= CTX_NEWLINE;
++ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_LETTER, s, *d))
++ d->success[s] |= CTX_LETTER;
++ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NONE, s, *d))
++ d->success[s] |= CTX_NONE;
++
+ group.elems = xnmalloc (d->nleaves, sizeof *group.elems);
+ group.nelem = 0;
+
+@@ -2889,55 +2931,6 @@ dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+ return trans[uc];
+ }
+
+-/* Calculate the transition table for a new state derived from state s
+- for a compiled dfa d after input character uc, and return the new
+- state number. */
+-
+-static state_num
+-build_state (state_num s, struct dfa *d, unsigned char uc)
+-{
+- /* A pointer to the new transition table, and the table itself. */
+- state_num **ptrans = (ACCEPTING (s, *d) ? d->fails : d->trans) + s;
+- state_num *trans = *ptrans;
+-
+- if (!trans)
+- {
+- /* MAX_TRCOUNT is an arbitrary upper limit on the number of
+- transition tables that can exist at once, other than for
+- initial states. Often-used transition tables are quickly
+- rebuilt, whereas rarely-used ones are cleared away. */
+- if (MAX_TRCOUNT <= d->trcount)
+- {
+- for (state_num i = d->min_trcount; i < d->tralloc; i++)
+- {
+- free (d->trans[i]);
+- free (d->fails[i]);
+- d->trans[i] = d->fails[i] = NULL;
+- }
+- d->trcount = 0;
+- }
+-
+- d->trcount++;
+- *ptrans = trans = xmalloc (NOTCHAR * sizeof *trans);
+-
+- /* Fill transition table with a default value which means that the
+- transited state has not been calculated yet. */
+- for (int i = 0; i < NOTCHAR; i++)
+- trans[i] = -2;
+- }
+-
+- /* Set up the success bits for this state. */
+- d->success[s] = 0;
+- if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NEWLINE, s, *d))
+- d->success[s] |= CTX_NEWLINE;
+- if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_LETTER, s, *d))
+- d->success[s] |= CTX_LETTER;
+- if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NONE, s, *d))
+- d->success[s] |= CTX_NONE;
+-
+- return dfastate (s, d, uc, trans);
+-}
+-
+ /* Multibyte character handling sub-routines for dfaexec. */
+
+ /* Consume a single byte and transit state from 's' to '*next_state'.
+--
+2.11.0
+
diff --git a/sys-apps/sed/metadata.xml b/sys-apps/sed/metadata.xml
new file mode 100644
index 000000000000..b738f8c54a01
--- /dev/null
+++ b/sys-apps/sed/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">sed</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/sed/sed-4.2.2.ebuild b/sys-apps/sed/sed-4.2.2.ebuild
new file mode 100644
index 000000000000..7c91a5f00047
--- /dev/null
+++ b/sys-apps/sed/sed-4.2.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl nls selinux static"
+
+RDEPEND="acl? ( virtual/acl )
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_bootstrap_sed() {
+ # make sure system-sed works #40786
+ export NO_SYS_SED=""
+ if ! type -p sed > /dev/null ; then
+ NO_SYS_SED="!!!"
+ ./bootstrap.sh || die "couldnt bootstrap"
+ cp sed/sed "${T}"/ || die "couldnt copy"
+ export PATH="${PATH}:${T}"
+ make clean || die "couldnt clean"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.1.5-alloca.patch
+
+ # don't use sed before bootstrap if we have to recover a broken host sed
+ src_bootstrap_sed
+ # this has to be after the bootstrap portion
+ sed -i \
+ -e '/docdir =/s:=.*/doc:= $(datadir)/doc/'${PF}'/html:' \
+ doc/Makefile.in || die "sed html doc"
+}
+
+src_configure() {
+ local myconf=()
+ if use userland_GNU; then
+ myconf+=( --exec-prefix="${EPREFIX}" )
+ else
+ myconf+=( --program-prefix=g )
+ fi
+
+ # Should be able to drop this hack in next release. #333887
+ tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes
+ export ac_cv_search_setfilecon=$(usex selinux -lselinux)
+ export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux)
+ use static && append-ldflags -static
+ econf \
+ $(use_enable acl) \
+ $(use_enable nls) \
+ "${myconf[@]}"
+}
diff --git a/sys-apps/sed/sed-4.3-r1.ebuild b/sys-apps/sed/sed-4.3-r1.ebuild
new file mode 100644
index 000000000000..fcc30b064a0e
--- /dev/null
+++ b/sys-apps/sed/sed-4.3-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl nls selinux static"
+
+RDEPEND="acl? ( virtual/acl )
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-dfa-segv-{1,2,3}.patch
+)
+
+src_bootstrap_sed() {
+ # make sure system-sed works #40786
+ export NO_SYS_SED=""
+ if ! type -p sed > /dev/null ; then
+ NO_SYS_SED="!!!"
+ ./bootstrap.sh || die "couldnt bootstrap"
+ cp sed/sed "${T}"/ || die "couldnt copy"
+ export PATH="${PATH}:${T}"
+ make clean || die "couldnt clean"
+ fi
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # don't use sed before bootstrap if we have to recover a broken host sed
+ src_bootstrap_sed
+}
+
+src_configure() {
+ local myconf=()
+ if use userland_GNU; then
+ myconf+=( --exec-prefix="${EPREFIX}" )
+ else
+ myconf+=( --program-prefix=g )
+ fi
+
+ export ac_cv_search_setfilecon=$(usex selinux -lselinux)
+ export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux)
+ use static && append-ldflags -static
+ myconf+=(
+ $(use_enable acl)
+ $(use_enable nls)
+ )
+ econf "${myconf[@]}"
+}
diff --git a/sys-apps/sed/sed-4.4.ebuild b/sys-apps/sed/sed-4.4.ebuild
new file mode 100644
index 000000000000..fcae761846b0
--- /dev/null
+++ b/sys-apps/sed/sed-4.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Super-useful stream editor"
+HOMEPAGE="http://sed.sourceforge.net/"
+SRC_URI="mirror://gnu/sed/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="acl nls selinux static"
+
+RDEPEND="acl? ( virtual/acl )
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+#PATCHES=(
+#)
+
+src_bootstrap_sed() {
+ # make sure system-sed works #40786
+ export NO_SYS_SED=""
+ if ! type -p sed > /dev/null ; then
+ NO_SYS_SED="!!!"
+ ./bootstrap.sh || die "couldnt bootstrap"
+ cp sed/sed "${T}"/ || die "couldnt copy"
+ export PATH="${PATH}:${T}"
+ make clean || die "couldnt clean"
+ fi
+}
+
+src_prepare() {
+ #epatch "${PATCHES[@]}"
+
+ # don't use sed before bootstrap if we have to recover a broken host sed
+ src_bootstrap_sed
+}
+
+src_configure() {
+ local myconf=()
+ if use userland_GNU; then
+ myconf+=( --exec-prefix="${EPREFIX}" )
+ else
+ myconf+=( --program-prefix=g )
+ fi
+
+ export ac_cv_search_setfilecon=$(usex selinux -lselinux)
+ export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux)
+ use static && append-ldflags -static
+ myconf+=(
+ $(use_enable acl)
+ $(use_enable nls)
+ )
+ econf "${myconf[@]}"
+}
diff --git a/sys-apps/selinux-python/Manifest b/sys-apps/selinux-python/Manifest
new file mode 100644
index 000000000000..7185c4f69ef3
--- /dev/null
+++ b/sys-apps/selinux-python/Manifest
@@ -0,0 +1,5 @@
+DIST selinux-python-2.7.tar.gz 2068004 SHA256 4217cb965ecda96c91e15ffcc2e7ddd13ecc2bf5631100f3cd072a7616f140ed SHA512 df8645e7ac9ca568f0c9d81c42b93d0abadc43c22f14d38451ab262b52132cfb7abd7742e3a00ab9c153f95dd5b23b3a496d84875debcd9787f75d940eb45c28 WHIRLPOOL b1848dec315b23009b192dbc54a4ccf2433b83f87c254ad36d8c090a9d33fb15fe45b87b22a6979b0f115c385605f4359a4f3da7ab4b0abec84ebdbbc86c2531
+EBUILD selinux-python-2.7.ebuild 2669 SHA256 22685849659d3969cff9beefbfb669f43e28642fc1a9aa6ec06582f2deaa9920 SHA512 7319def94fe6e2fca46f9a4cfa361cbda66f389c2874873a8efadec8aa5083644d9f888d82733a98aa44142b0fc888419139898ffcf3f3431fd2e2a9223576cd WHIRLPOOL a31d876e092babd8e070405c7efbc58aa6ee7972064612f609d90262ba7a774d7a1245578ca39619f366e8756db01bcb05894f27564159733fc79964ad54f7e2
+EBUILD selinux-python-9999.ebuild 2676 SHA256 6da0b5c4be2d460c2a0bd1a2e4fe6431cc82b5d97faddbbbcefdfdefc9e690c6 SHA512 c646ba210a01e9ccddd639681aab38ce98abf7bb1fc07627f6a56ad5bbfe25a3b2f4664da5b414efe8b03b469a40fbf5d8cd2100a45a6b71d2d0188834b2cee7 WHIRLPOOL 6180feb776b4897bcc655643dfd87608f39d5a32f96f3ba479595911df28f2d1e57b67ee18b8e79b53b33773c461d0ee57bcfb162355e1abc293e9a733ec7401
+MISC ChangeLog 363 SHA256 43ddceee058e75fea49283bcadd9f4b9a62f745ae6b593d508d013487524b4ca SHA512 993f34ccb279db00fb94b9aa9a366e72d33cbc570c01ab3cbb7d30a22a883c0e5f563310ecf3d5a2ca411260e71104763aacda662667d7f5fe82565240d86772 WHIRLPOOL 7aacd62cf13b6b952b904b8c5bfb3ea17cff3b2fb3578ae93f520663ac6f37d7cb29b833ec4f40ca681b88ed5d77dbfa825ce286c39aa19ca2909420a77814dd
+MISC metadata.xml 718 SHA256 2d75aacb884f0150e3a24ee15c8f741d7e64521e3a52a7f3a8a543427621453b SHA512 a45a1c3e516dd956e60be67ddce632d055a98ff0fb45b920adfb5d1253da77822286f9742865027a47e94386dad2a1478a5b51f2bf9a97e2c2571470fdb34e04 WHIRLPOOL 1226d55630fb3a2f9724eef78149c150d0a098c8976e9f5c2f0ccff289502e50eeba149ad0cea1cad77a991faa015625cc1e9e77e040536a4da257b40a0d76de
diff --git a/sys-apps/selinux-python/metadata.xml b/sys-apps/selinux-python/metadata.xml
new file mode 100644
index 000000000000..94e50a7ff05e
--- /dev/null
+++ b/sys-apps/selinux-python/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ selinux-python contains the core python selinux utilities and libraries
+ that are required for basic operation of a SELinux system. These
+ include semanage, sepolicy and sepolgen.
+ </longdescription>
+ <use>
+ <flag name="audit">Enable support for <pkg>sys-process/audit</pkg> and use the audit_* functions (like audit_getuid instead of getuid())</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/selinux-python/selinux-python-2.7.ebuild b/sys-apps/selinux-python/selinux-python-2.7.ebuild
new file mode 100644
index 000000000000..832b4b2d809c
--- /dev/null
+++ b/sys-apps/selinux-python/selinux-python-2.7.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE="xml"
+
+inherit python-r1 toolchain-funcs
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20170804"
+SEPOL_VER="${PV}"
+SELNX_VER="${PV}"
+SEMNG_VER="${PV}"
+
+IUSE="audit pam dbus"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN#selinux-}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.1.1[${PYTHON_USEDEP}]
+ dev-python/ipy[${PYTHON_USEDEP}]
+ !dev-python/sepolgen
+ ${PYTHON_DEPS}"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ CC="$(tc-getCC)" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ python_foreach_impl building
+}
+
+src_install() {
+ installation() {
+ emake -C "${BUILD_DIR}" \
+ DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Set version-specific scripts
+ for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
+ python_replicate_script "${ED}/usr/bin/${pyscript}"
+ done
+ for pyscript in semanage; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}
diff --git a/sys-apps/selinux-python/selinux-python-9999.ebuild b/sys-apps/selinux-python/selinux-python-9999.ebuild
new file mode 100644
index 000000000000..510a3b731c47
--- /dev/null
+++ b/sys-apps/selinux-python/selinux-python-9999.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE="xml"
+
+inherit python-r1 toolchain-funcs
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20170804"
+SEPOL_VER="${PV}"
+SELNX_VER="${PV}"
+SEMNG_VER="${PV}"
+
+IUSE="audit pam dbus"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN#selinux-}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.1.1[${PYTHON_USEDEP}]
+ dev-python/ipy[${PYTHON_USEDEP}]
+ !dev-python/sepolgen
+ ${PYTHON_DEPS}"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ CC="$(tc-getCC)" \
+ PYLIBVER="${EPYTHON}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ python_foreach_impl building
+}
+
+src_install() {
+ installation() {
+ emake -C "${BUILD_DIR}" \
+ DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Set version-specific scripts
+ for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
+ python_replicate_script "${ED}/usr/bin/${pyscript}"
+ done
+ for pyscript in semanage; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}
diff --git a/sys-apps/semodule-utils/Manifest b/sys-apps/semodule-utils/Manifest
new file mode 100644
index 000000000000..31fb439d67f4
--- /dev/null
+++ b/sys-apps/semodule-utils/Manifest
@@ -0,0 +1,5 @@
+DIST semodule-utils-2.7.tar.gz 15447 SHA256 90c98b3362a43b4da2a51a9176820a56f3e615225e23e3395bc566c4490786ba SHA512 5c7c2a2224949f50c1119edba90d937363e22af52a38f06525e957b29f5310a3e3444d03980b2f808ce995de0f9fc0a9dca8b6167bbfde29c1a33b9bc786d3c8 WHIRLPOOL 795b3300f186e12ba5083a76fb2f58e85d2443471f7278d4d6f18cfd4b82ca479f47c30acd3c5e7d741733b2ca8a571dc70d0432f5e2faac5fa16f1efeba89e8
+EBUILD semodule-utils-2.7.ebuild 1123 SHA256 47d42c79162f53571fbcfb42fd1d73195d842ed4a08c0f2a98800b9b6e083aea SHA512 66d018f1a8a2c16f6083972fb80d14806cd2671ab8150fd676fd164d21bfef12d43eb70b1f1e99a972f15cc19ed0c78d518788a79ca8805f9ce31dae9d10a38d WHIRLPOOL 0e81265b804d63aaa648f228869e57730c6ad2d823236f1198c7d155fe2b30a46429a4e295318afe7b4d755e3ab49e825a4b964f8bb6ad1bfb06837f5a4f3ce3
+EBUILD semodule-utils-9999.ebuild 1125 SHA256 1275cfe02db4ba6abf8606d5689bcadfec943f42eb94e02e7b8dc6ae49fc2817 SHA512 47d27f5e250d9f48cb4ea0fb36c09a3cdf67787d48361d7836d8d6ad71ba1006f0f147c7f6d6d8f1a7a93cb3957dc0c280dad3193e63ef1ab3e934a236311183 WHIRLPOOL 2e4b457273297b0c3d3e0e71ad3f462215f86f5ac6ae9237313103d3aec15b0e18f9d28eddb68e20fe5da9f7f8c3c587dc9839c686121217bc68e19ae10ddb73
+MISC ChangeLog 336 SHA256 bd1c437e44227e39a97d6fc2167beb1d73e707412761e47da2324736d3879efe SHA512 7ff9acc4570ec40979db650ad898e14f38b5e1bee9fa91c3c41b4c279799d8cad8693f9aa04b46ff6bd917aa100d239d54c424d95c866c8613b06cc94c94440a WHIRLPOOL 32f1e6df3aeb3d5e1a74a908c5036b5d0ff77079b0c2b66aa6d31c35949d936f915d40bd7f914a1d4ab9c523b1a07949ef9874168c834d520d4fbd69dcc6bc61
+MISC metadata.xml 521 SHA256 4c80afc6b7cc533b3b4c6948928326dce797b7d328bd82b77cdb69056400440f SHA512 e15b382ddf7059ff9c82887d636522dcc993e580e715d4a822106ed27c7fdb75b32e96c8c32a34cbdbbef4ad0f9c49bfb7c7420ea97852fa82e7740c4044a689 WHIRLPOOL ae4aa7a4ca3d855ef9668b6b1cdbc48445d60db63da8558c8c06e08a86330724af27051286c53a796456c2635830563916673b347bd6615344929e8456c5f924
diff --git a/sys-apps/semodule-utils/metadata.xml b/sys-apps/semodule-utils/metadata.xml
new file mode 100644
index 000000000000..35a209da7acf
--- /dev/null
+++ b/sys-apps/semodule-utils/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 type="project">
+ <email>selinux@gentoo.org</email>
+ <name>SELinux Team</name>
+ </maintainer>
+ <longdescription>
+ semodule-utils are utilities to create and link SELinux policy module packages.
+ </longdescription>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:redhat:policycoreutils</remote-id>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/semodule-utils/semodule-utils-2.7.ebuild b/sys-apps/semodule-utils/semodule-utils-2.7.ebuild
new file mode 100644
index 000000000000..a0ef418401f7
--- /dev/null
+++ b/sys-apps/semodule-utils/semodule-utils-2.7.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+SEPOL_VER="${PV}"
+SELNX_VER="${PV}"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="SELinux policy module utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+}
diff --git a/sys-apps/semodule-utils/semodule-utils-9999.ebuild b/sys-apps/semodule-utils/semodule-utils-9999.ebuild
new file mode 100644
index 000000000000..67891e9cf812
--- /dev/null
+++ b/sys-apps/semodule-utils/semodule-utils-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_RELEASEDATE="20170804"
+SEPOL_VER="${PV}"
+SELNX_VER="${PV}"
+
+MY_P="${P//_/-}"
+IUSE=""
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="SELinux policy module utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libsepol-${SEPOL_VER}:="
+
+RDEPEND="${DEPEND}
+ !<sys-apps/policycoreutils-2.7_pre"
+
+src_prepare() {
+ default
+
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
+ install
+}
diff --git a/sys-apps/servicelog/Manifest b/sys-apps/servicelog/Manifest
new file mode 100644
index 000000000000..75cdd3d0f999
--- /dev/null
+++ b/sys-apps/servicelog/Manifest
@@ -0,0 +1,11 @@
+DIST servicelog-1.0.1.tar.gz 159034 SHA256 3043c24569c118a02f8c25f27098011e73a5af80ae6a75cdb18f2a63c4fa1537 SHA512 a3e6c2c8e828de71ee81ead3435fea562501a90b3930a27087096b648a831fd351b4075f3d46359b41f88c1353dbeaf6039961ce72b1e3876734b7ad02b9f137 WHIRLPOOL ff9528d393b9247456f964ce06b39601ff1e19809a17ca0eaacb9e3d93a13b390e8dec194957e280f2b0a9472fb318324b937fd819b5adc77d035e7f1152953c
+DIST servicelog-1.1.11.tar.gz 318874 SHA256 1eb5b8bd4d56a35b770eb83c7b8773e4f8c9faa6793b9db3f22056c33184ba80 SHA512 45adabe828a2e700b0920cc89fa4f93ac923cbf0249facbd52e23e1507d3daf12a2e4f2b093539286cebf8291266b2cbdcfea1c17f83a75c537c368885fd398c WHIRLPOOL c07ba8a5b7b23c475f55055af638e386ae9ef7628224faee15960c40c013f8a77686e461b323c4d1ddf282dffa237409c3887c6752fb31be821bdf7319c9f6af
+DIST servicelog-1.1.13.tar.gz 357637 SHA256 195fe080ea5d465d6b1164c0d46ada83654938f0ad7bc805fe4f28d9af602ffa SHA512 2c9b2705825a98fbae3bc1c35f8acd014e5234d316d4c00fcceeb86b9263080fe525dfe71553c935092f8787b7125a3ed39c0cf07c069c56d1e816748698aa94 WHIRLPOOL 35ddabc190274422bcad05f1a32d9b8df67aea3e5ee0a14a9270aae5cec5a3a5c4f87581a2c472c2f996cb0bb560b44a0e14aba19b7849c3f6a9f38f153be0bb
+DIST servicelog-1.1.14.tar.gz 361289 SHA256 bcf6cddf07824725d8a9c46eb409bb0245aaa9a348a1d8533fff8237eca09ae5 SHA512 d7b5e4089f258d69a7a07a46e43f1083fad701a917c150af8b68542db26348c0160dbca6c0d94aa68eb7a4b77139a763780c1af8422b785009567489a5e587cb WHIRLPOOL 47f97d2678861d5f3a4b917d19367345ad061e973553cf27d48b400645871ad0d4c7840e4430504aa1a78ae0cbfc63712bb188f286f63a6c18291331495f7faa
+EBUILD servicelog-1.0.1.ebuild 574 SHA256 75d64947903afade1c08fafe67891002b8f100cf9e01a0759f03b7f16066df61 SHA512 4ee123ba29912a1c8f6af94ff340d9f161d3337948deccb0f58e2b81c4e5a6880afb38ea410287477ad8f3093a4b56e74e3c17fd09dbb94173724fdb13779634 WHIRLPOOL 7b8909c52a21817f5914f7e6c392560a8a194ee30a803e73f53194cba7c061d11d831efbad90eebaf7b6e000547ee75e057433a8035fcc7ac723a9d3fc810e65
+EBUILD servicelog-1.1.11.ebuild 576 SHA256 0ba007acc9a8abf9e15eeb1162e46bad565780f8d1d1914b11e4ee1f7434cdcf SHA512 0e71477018307af307dc692452f67c7bb60e17245a722c93f515aa0d315d2f4113379b2c13c52baab2a5a1bff069ff3e416bd233a1168d9cfd3424313883d791 WHIRLPOOL 2c7fe18a0e9d3eda75fc3cbc4d9a49217e207fd367cfb9f4dbf47b27a483a0b2962036f89ce414a5b7eb7359a67211c06b390029562ae3a68cde40736513d77c
+EBUILD servicelog-1.1.13.ebuild 576 SHA256 b09dab5127912b26fbf38e8e1ac8d9c87afc87730dd495ea9d084b6c6b960fa4 SHA512 bbcfae2bab5bb948e9fdf597ade226616bd0e98c759bc09567b67c94ca327b1209d02c25919a3f61860d22add096d546558a8145ab195a716aae100f408ad61c WHIRLPOOL e9999e8413b614fff274389604056714adddd94dbdcaed3c16230fc63a17518dbc9de250acc21e05a1619d77d1e6843db7c6c4d326f4d47db3ddc78fe5cd222e
+EBUILD servicelog-1.1.14.ebuild 434 SHA256 1424a8e91a861e93f7547db79de3721140fa600d6ad52cfd008508ddedb55034 SHA512 dfe858e3325b95cc6750cea5d99f7ffe6c55df4a97ff391b396ab38b758181aa4b2307e705308c9ad4b1fc5b48756d859615ecc6371b9623f33fbc7d0cb4eaf6 WHIRLPOOL 32d434edfd5eb8c4b9871e33f59ef307b1930c031268a7a29c1e3f7e5a59fcb22bc7715c23dc55ade401e52f0ab638709a1016c52fd8aedd9c4e78cbcac0969e
+MISC ChangeLog 2840 SHA256 f697d29d0a0f1532e0cc0831993bec05719ed172caae3cfe93699ad2d0ecdf0a SHA512 4d12385486ad4b63766b2afb833df74a15ac27491a5f5ea15f6055025c5bec1fa65f4147b697364b88084327565b9f33f73270e8041e41ab326d0c8f253486db WHIRLPOOL 330d2a08311c9a8e038ea61a210cf36b6c70199d830b84efa0eb80ed40c4444a8e68c6d14be186742fcbba47c07501cb25f91bcc3f3d5eb749f3b6c5bfd66173
+MISC ChangeLog-2015 934 SHA256 3ea0215c512e694247a0cf9fe76a9c34157e0ba7864346fb6dbf22007b8f9547 SHA512 9d683d64be621488227319793228bee67bc7c0a7bac4e2b3a58e3cbbf1cb599dddf2aa8ffaed8477c33c50029a7b4db51003378f126866fff8fa889fad2e87b6 WHIRLPOOL 5dd8490351b3abfd15a3f40ec4af8d142cedc5268a67a6a8ba5181f063a8603a6b6aacf9b1f28eb5e3246f8ed35b9ed8e07dd478d0cbf5a8afb2a40011fcb628
+MISC metadata.xml 343 SHA256 cb43aa113871ee8701e807f65f0bc9f0aa239bee5f1c5d93b11894ecd2477917 SHA512 42f1b8b76a107cfa61ae9db8b900aed22a3bc8e8d3573dbb3c507ebde688ef2c50f7f79847eb345e738365fbb99ba22d99aee56e302c6eed064379ddc1e3a710 WHIRLPOOL 04ce53dd94bcc65b2c05bbb4b8fdedaf856bafe33ea4e045b904cd531f1598a839aaaf280c9bd1714d8b6a4bc91ff7945806cd46c40d28fe585651a87d5b0c2d
diff --git a/sys-apps/servicelog/metadata.xml b/sys-apps/servicelog/metadata.xml
new file mode 100644
index 000000000000..2b8aee36a4fc
--- /dev/null
+++ b/sys-apps/servicelog/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 type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">linux-diag</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/servicelog/servicelog-1.0.1.ebuild b/sys-apps/servicelog/servicelog-1.0.1.ebuild
new file mode 100644
index 000000000000..b2c2e57e21c3
--- /dev/null
+++ b/sys-apps/servicelog/servicelog-1.0.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+S=${WORKDIR}/${PN}-${PV}
+DESCRIPTION="Provides utilities for logging service-related events"
+SRC_URI="mirror://sourceforge/linux-diag/${P}.tar.gz"
+HOMEPAGE="http://linux-diag.sourceforge.net/servicelog/"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="ppc ppc64"
+IUSE=""
+
+DEPEND="sys-libs/libservicelog"
+
+RDEPEND="${DEPEND}
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_compile() {
+ econf
+}
+src_install () {
+ emake install DESTDIR="${D}"
+ dodoc ChangeLog
+}
diff --git a/sys-apps/servicelog/servicelog-1.1.11.ebuild b/sys-apps/servicelog/servicelog-1.1.11.ebuild
new file mode 100644
index 000000000000..629067277a36
--- /dev/null
+++ b/sys-apps/servicelog/servicelog-1.1.11.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+S=${WORKDIR}/${PN}-${PV}
+DESCRIPTION="Provides utilities for logging service-related events"
+SRC_URI="mirror://sourceforge/linux-diag/${P}.tar.gz"
+HOMEPAGE="http://linux-diag.sourceforge.net/servicelog/"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+IUSE=""
+
+DEPEND="sys-libs/libservicelog"
+
+RDEPEND="${DEPEND}
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_compile() {
+ econf
+}
+src_install () {
+ emake install DESTDIR="${D}"
+ dodoc ChangeLog
+}
diff --git a/sys-apps/servicelog/servicelog-1.1.13.ebuild b/sys-apps/servicelog/servicelog-1.1.13.ebuild
new file mode 100644
index 000000000000..5496eb70dd9c
--- /dev/null
+++ b/sys-apps/servicelog/servicelog-1.1.13.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+S=${WORKDIR}/${PN}-${PV}
+DESCRIPTION="Provides utilities for logging service-related events"
+SRC_URI="mirror://sourceforge/linux-diag/${P}.tar.gz"
+HOMEPAGE="http://linux-diag.sourceforge.net/servicelog/"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+IUSE=""
+
+DEPEND="sys-libs/libservicelog"
+
+RDEPEND="${DEPEND}
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_compile() {
+ econf
+}
+src_install () {
+ emake install DESTDIR="${D}"
+ dodoc ChangeLog
+}
diff --git a/sys-apps/servicelog/servicelog-1.1.14.ebuild b/sys-apps/servicelog/servicelog-1.1.14.ebuild
new file mode 100644
index 000000000000..9b39ced25e63
--- /dev/null
+++ b/sys-apps/servicelog/servicelog-1.1.14.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Provides utilities for logging service-related events"
+SRC_URI="mirror://sourceforge/linux-diag/${P}.tar.gz"
+HOMEPAGE="http://linux-diag.sourceforge.net/servicelog/"
+
+SLOT="0"
+LICENSE="IBM"
+KEYWORDS="~ppc ~ppc64"
+
+DEPEND="
+ sys-libs/libservicelog
+"
+RDEPEND="
+ ${DEPEND}
+ virtual/logger
+"
+DOCS="ChangeLog"
diff --git a/sys-apps/setserial/Manifest b/sys-apps/setserial/Manifest
new file mode 100644
index 000000000000..98c7c8133139
--- /dev/null
+++ b/sys-apps/setserial/Manifest
@@ -0,0 +1,13 @@
+AUX serial-2.17-r4 504 SHA256 70136c1057e58b345b16d6a0436b4c09fd1ce54e1b5069f70b5fb35507fed061 SHA512 91e8be9fafdefc5dbdde832c3d0c85c5b99203fba65f1e934b390efc4c19ca74ec5fd5656f389152fa2b46e7d74d7cce33728a01d6b3413bc398f33a7dc19378 WHIRLPOOL 74727c6a80fa4e3a527310bfd0efdcae62a74135952ca4306fa4433cea579b6d918eca86ed8ea9d8cb885e8fd6cc7f215792c11f441ac958ba8dc4d2941a8d82
+AUX setserial-2.17-build.patch 322 SHA256 9d85006b3560c0def69eff8574d81e8d92a41adb4967bc51d2863c49ab90fc2d SHA512 558843dc66398c6050e9fe4b26b18ece2c100a3bab746b6bcc538c92639bd3a8bb05f132e37a1d9601c030da2ce16c8736696ed013d8a663ab353c8cbcbd5ced WHIRLPOOL fe651f90235f33aea382deb583699bc21a61ae749c2f991efd7535e84b29f996c4881f03e4d3cc83a48c86ebcdfd99b4186ba62118f0c48549721df41b647f46
+AUX setserial-2.17-darwin.patch 755 SHA256 ada24169fe75a3457a2a173e3b3caf1a36f631a846c065f0515cac4a8cd88654 SHA512 de95f5c0c7a5b371b97919091c60450bdeb8ebf543882def97537d558b540dc830699abe5d6b6bf341f74bd172273504eb7ede538b652cd1da7702c4d39f1bd2 WHIRLPOOL 14cbe2e232430aefc0e78e0c2911bce3d71c64a970922d7b1deb8c2ea1e758871818e5e7fd4bc535a781314f6792eadf129eeceee4a8035c24995ba6a18caad6
+AUX setserial-2.17-hayes-esp.patch 278 SHA256 b5de7517a40a827fb60083a1956f2e104a3916008f38279ad632217d87b69735 SHA512 f7e272d3acae953823550dc84c0fdc1e5cb33c7417fb44fedd5b13a211926ac51cb82eeaa19005f0d1a6b41edf365452016dfa5768891a7bc5028d910e8bbd47 WHIRLPOOL 6603d237f2408343734b2956d12e2182fbca3b54e66c25a7a20ab8f886df9ca43da2d6268515c1e5999b8c4fcd50eb72d5500ce04a94d808e66427c2765428d8
+AUX setserial-2.17-headers.patch 236 SHA256 14a6a052e4fd37cdd2b7fbd094494022dcbb311a76a0872ac9cc1560829d0460 SHA512 1c849d17fe67fedda59d8cd11015339131ce09dd280e1a5df67726009bbe974693bdd006c5f16dc1f76f37d48e84b4997dbe65446059ac54aad7551cb3972009 WHIRLPOOL 5a4ae48c57581eb106dc35c71d044f2da6fb55e0959d8704a9d421efc83f1aa7290b5e00cb4e00bd3b08493101f9eb7815ae4f2b6c487ac62d09d01f1dcecb80
+AUX setserial-2.17-manpage-updates.patch 1015 SHA256 f6e8e1f997bc6ff41599cbeda6b838de6b2a7a0628d5f53ea6d48441809adc4d SHA512 6041894014b3d139a8c2d59460003310c17aee407dab2fa3713f98ea2c29fd347906f68f3d988f052cbee45de43fa00afadc4359b562bfd34fd4931b48505cf8 WHIRLPOOL 77d9a136850d2d2da51fbe064babf743c33a3c090bce81c379fc9174c1975e2a030726c593f699c80166497072b2d07c51d1d1d41762cccdbff4c72fb7a66e39
+AUX setserial-2.17-spelling.patch 257 SHA256 d3eebac588db8a2d7b429fa8e9c238d7e182e937040f4b1669f61534de87ee58 SHA512 7511c46d4676cdd34d8abb0c124ca514d9d970078ea1cd03396b7e9699ec3fc2c0ff3ff04f01a50dd3fe28244ce75078566f8fe21aca89d063b939f1c2cb354c WHIRLPOOL 53778d0f969991957fbb8b59ff59e815f1d0e65056645bb0240670388e197269b3e92140f1a5ca2c54de5a573f79c07eab482a21d94af271a5bf9c901488ef29
+DIST setserial-2.17.tar.gz 52437 SHA256 7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a SHA512 27b4918d303302dfdbca2f8c4fe500685068cfbf3de70b4907bac5a9cdb2e643656c1d821e714c08723abcfbaf99129866002117450bef731a0a09cd38138645 WHIRLPOOL a27a04c111acc8e51874116d6e4f62701f4df5d30ba0e1fdadb6e94644710ec3228a8a419cc5d905d837eb63498d62ee4c08454773dab8eb859a50c6602bd276
+EBUILD setserial-2.17-r4.ebuild 1075 SHA256 7306f597afe085d2d73a01bee964aad0f9550bac4b05f7ea01967ce3b67d633f SHA512 358e3802389eab9aa24edd99ca22cfa7c1e16dcd7ffeb8251d56c70a1b36993eb31c067edd9d669b5b8ce74c5786e53e5de6da76592a32c721a181d825123b14 WHIRLPOOL 67505aff0bbfd0862219577c16c8d9fde8e3ebdf5cd516c67dafae37df5373a9569127fc99b485524f937a07030bcb6c5af3edc61c10da9dde7300a67bcc64c3
+EBUILD setserial-2.17-r5.ebuild 959 SHA256 8d7b016c69b15ab7f21a35237b2837a76ab579ed0c2c94fc243ede65f08aa187 SHA512 ffc2adf7fb6bc9245c0d2ea7ef3ac7213cec84009103a01ecdf10347aaa6d828d520e1c73b167d5f6095a89fb13277ebf97c084251ee45d8c3fcc2a83d5ef5fa WHIRLPOOL 3147fdf70eb8047f6c657215170d0d79e20c66e1a32f17e880e53799e8919ffda8c49ea2acf684abad6ea75ecc1b0a42595c611ac5a2b1df9366cc79b554b4c6
+MISC ChangeLog 3755 SHA256 f9e778062de1594ebd5706117bcc98b7ad4352eb90d5009f62dedfc355ba2b96 SHA512 e18d7487ba76392256cb6b1f58da3739b262373944e4937da9ce098d810a45c975bf98c1e6c5e0bf8f0724d3b0ef4a66e8a030f68bb971bb08d5700467dd85fa WHIRLPOOL f751356bccde1c94e4341fa6e1c6351597bf03da8daf0a216308cfb4842de670d66f71d5f463fe4146b62c2c57727def9c3925ffe5436516a49828e138375b90
+MISC ChangeLog-2015 3444 SHA256 030333153cfbede2a1cdd3054d725ac277906eba1295c02b4cfa79fc4ba3dc36 SHA512 07983254500ac282372e8b9a1709a5318e1f53215e0a35f5d99401c53d87c8bffbd681dd7cdfc639bf51415f451cb796a6b4395386b519b86782c0089eb0a48a WHIRLPOOL ae91973b3646cc5e7aec0593e4e4807d72009b8af7fd090650e14c470fcd26abc5e4c2affa47501d4e660581fee5308b454942e7efcb8fc3af96b35569465d80
+MISC metadata.xml 329 SHA256 ac883ada79e856674e152f7fcf0a650b21f3f8199ab1c5d94525a7c22c061d30 SHA512 7eb699d04a9f2d0c39997818037f6ba309499afd0b1635d3b2c28389331f19753928d78e69e4cad0b98de11335c350f092153357360bbc8b00d941400d1e2981 WHIRLPOOL e18b09b5a890936e51c19cbe93acaa1b10bc7aedeeb557649781145dbaa995fc5bd0533cdcfdd22700860d28b24374b3b307f0ab8b71662ac3ed8cf321be0e42
diff --git a/sys-apps/setserial/files/serial-2.17-r4 b/sys-apps/setserial/files/serial-2.17-r4
new file mode 100644
index 000000000000..fca37d67a480
--- /dev/null
+++ b/sys-apps/setserial/files/serial-2.17-r4
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ [ ! -e /etc/serial.conf ] && return 0
+
+ grep -v "^#\|^ \|^$\|^stty" /etc/serial.conf | while read device args
+ do
+ ebegin "Setting ${device} to $args"
+ setserial -b ${device} ${args}
+ eend $?
+ done
+ grep "^stty" /etc/serial.conf | while read x device args
+ do
+ ebegin "Setting (stty) ${device} to $args"
+ stty -F ${device} ${args}
+ eend $?
+ done
+
+ return 0
+}
diff --git a/sys-apps/setserial/files/setserial-2.17-build.patch b/sys-apps/setserial/files/setserial-2.17-build.patch
new file mode 100644
index 000000000000..7e7ea25c8a06
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-build.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -20,7 +20,7 @@
+ all: setserial setserial.cat
+
+ setserial: setserial.c
+- $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
+
+ setserial.cat: setserial.8
+ nroff -man setserial.8 > setserial.cat
diff --git a/sys-apps/setserial/files/setserial-2.17-darwin.patch b/sys-apps/setserial/files/setserial-2.17-darwin.patch
new file mode 100644
index 000000000000..681f793383cd
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-darwin.patch
@@ -0,0 +1,33 @@
+https://541536.bugs.gentoo.org/attachment.cgi?id=397618
+https://bugs.gentoo.org/show_bug.cgi?id=541536
+
+diff --git a/setserial.c b/setserial.c
+index 3474402..3ce8009 100644
+--- a/setserial.c
++++ b/setserial.c
+@@ -31,6 +31,25 @@
+
+ #include "version.h"
+
++#ifdef __APPLE__
++// see http://www.insanelymac.com/forum/topic/155999-compiling-setserial-on-mac-os-x/
++#ifndef TIOCGSERIAL
++#define TIOCGSERIAL 0x541E
++#endif
++#ifndef TIOCSERCONFIG
++#define TIOCSERCONFIG 0x5453
++#endif
++#ifndef TIOCSSERIAL
++#define TIOCSSERIAL 0x541F
++#endif
++#ifndef TIOCSERGWILD
++#define TIOCSERGWILD 0x5454
++#endif
++#ifndef TIOCSERSWILD
++#define TIOCSERSWILD 0x5455
++#endif
++#endif
++
+ static char version_str[] = "setserial version " SETSERIAL_VERSION ", "
+ SETSERIAL_DATE;
+
diff --git a/sys-apps/setserial/files/setserial-2.17-hayes-esp.patch b/sys-apps/setserial/files/setserial-2.17-hayes-esp.patch
new file mode 100644
index 000000000000..72783553c214
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-hayes-esp.patch
@@ -0,0 +1,15 @@
+recent versions of linux have dropped the hayes esp driver
+
+http://bugs.gentoo.org/309883
+
+--- a/setserial.c
++++ b/setserial.c
+@@ -21,6 +21,8 @@
+ #endif
+ #ifdef HAVE_LINUX_HAYESESP_H
+ #include <linux/hayesesp.h>
++#else
++#undef TIOCGHAYESESP
+ #endif
+ #include <linux/serial.h>
+
diff --git a/sys-apps/setserial/files/setserial-2.17-headers.patch b/sys-apps/setserial/files/setserial-2.17-headers.patch
new file mode 100644
index 000000000000..f8aed4c4862c
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-headers.patch
@@ -0,0 +1,12 @@
+--- a/setserial.c
++++ b/setserial.c
+@@ -15,6 +15,9 @@
+ #include <termios.h>
+ #include <string.h>
+ #include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
+
+ #ifdef HAVE_ASM_IOCTLS_H
+ #include <asm/ioctls.h>
diff --git a/sys-apps/setserial/files/setserial-2.17-manpage-updates.patch b/sys-apps/setserial/files/setserial-2.17-manpage-updates.patch
new file mode 100644
index 000000000000..3e6b7f016197
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-manpage-updates.patch
@@ -0,0 +1,36 @@
+--- a/setserial.8.in
++++ b/setserial.8.in
+@@ -34,7 +34,7 @@
+ program should be used. Typically it is called from an
+-.I rc.serial
++.I serial
+ script, which is usually run out of
+-.IR /etc/rc.local .
++.IR /etc/init.d/ .
+
+ The
+ .I device
+@@ -78,7 +78,7 @@
+ .B \-b
+ When reporting the configuration of a serial device, print a summary
+ of the device's configuration, which might be suitable for printing
+-during the bootup process, during the /etc/rc script.
++during the bootup process, in the /etc/init.d/serial script.
+ .TP
+ .B \-G
+ Print out the configuration information of the serial port in a form which
+@@ -504,12 +504,9 @@
+ CAUTION: Configuring a serial port to use an incorrect I/O port
+ can lock up your machine.
+ .SH FILES
+-.BR /etc/rc.local
+-.BR /etc/rc.serial
++.BR /etc/serial.conf
+ .SH "SEE ALSO"
+-.BR tty (4),
+-.BR ttys (4),
+-kernel/chr_drv/serial.c
++.BR tty (4)
+ .SH AUTHOR
+ The original version of setserial was written by Rick Sladkey
+ (jrs@world.std.com), and was modified by Michael K. Johnson
diff --git a/sys-apps/setserial/files/setserial-2.17-spelling.patch b/sys-apps/setserial/files/setserial-2.17-spelling.patch
new file mode 100644
index 000000000000..5275d4fa44c4
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-spelling.patch
@@ -0,0 +1,7 @@
+Ripped from Fedora.
+
+--- a/setserial.c
++++ b/setserial.c
+@@ -710,1 +710,1 @@
+- fprintf(stderr, "\t spd_normal\tuse 38.4kb when a buad rate of 38.4kb is selected\n");
++ fprintf(stderr, "\t spd_normal\tuse 38.4kb when a baud rate of 38.4kb is selected\n");
diff --git a/sys-apps/setserial/metadata.xml b/sys-apps/setserial/metadata.xml
new file mode 100644
index 000000000000..8b2e572c528e
--- /dev/null
+++ b/sys-apps/setserial/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">setserial</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/setserial/setserial-2.17-r4.ebuild b/sys-apps/setserial/setserial-2.17-r4.ebuild
new file mode 100644
index 000000000000..ef2843bfe222
--- /dev/null
+++ b/sys-apps/setserial/setserial-2.17-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Configure your serial ports with it"
+HOMEPAGE="http://setserial.sourceforge.net/"
+SRC_URI="ftp://tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz
+ ftp://ftp.sunsite.org.uk/Mirrors/tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-spelling.patch
+ epatch "${FILESDIR}"/${P}-manpage-updates.patch
+ epatch "${FILESDIR}"/${P}-headers.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-hayes-esp.patch #309883
+ epatch "${FILESDIR}"/${P}-darwin.patch #541536
+}
+
+src_compile() {
+ tc-export CC
+ econf || die
+ emake setserial || die
+}
+
+src_install() {
+ doman setserial.8
+ into /
+ dobin setserial || die
+
+ insinto /etc
+ doins serial.conf
+ newinitd "${FILESDIR}"/serial-2.17-r4 serial
+
+ dodoc README
+ docinto txt
+ dodoc Documentation/*
+}
diff --git a/sys-apps/setserial/setserial-2.17-r5.ebuild b/sys-apps/setserial/setserial-2.17-r5.ebuild
new file mode 100644
index 000000000000..2eaa330900e5
--- /dev/null
+++ b/sys-apps/setserial/setserial-2.17-r5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Configure your serial ports with it"
+HOMEPAGE="http://setserial.sourceforge.net/"
+SRC_URI="
+ ftp://tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz
+ ftp://ftp.sunsite.org.uk/Mirrors/tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-spelling.patch
+ "${FILESDIR}"/${P}-manpage-updates.patch
+ "${FILESDIR}"/${P}-headers.patch
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-hayes-esp.patch
+ "${FILESDIR}"/${P}-darwin.patch
+)
+
+src_compile() {
+ tc-export CC
+ emake "${PN}"
+}
+
+src_install() {
+ doman "${PN}.8"
+ into /
+ dobin "${PN}"
+
+ insinto /etc
+ doins serial.conf
+ newinitd "${FILESDIR}"/serial-2.17-r4 serial
+
+ einstalldocs
+ docinto txt
+ dodoc Documentation/*
+}
diff --git a/sys-apps/sg3_utils/Manifest b/sys-apps/sg3_utils/Manifest
new file mode 100644
index 000000000000..9bac0abcfc13
--- /dev/null
+++ b/sys-apps/sg3_utils/Manifest
@@ -0,0 +1,11 @@
+AUX sg3_utils-1.26-stdint.patch 758 SHA256 4167dc24b3f7e9143709710e01fc10a9be902734fd6b7e5b118414b177c776e5 SHA512 e7a9b51595a17a33513accf4b1b2fb98914fb8328664e77ca9cc6a9ebd1f2bd32e85c53c8b854e3b617130b750e858d235bb259052fea632f367d430b1f1d8f0 WHIRLPOOL f31fc1d620bf153cdaa0933cffd907fae50133ae1a05661edaa931b4e2a79a84e74d373addfb209ddc52d017473fb6f942f9ecea47e88fa9b43e9f41013d1942
+AUX sg3_utils-1.42-sysmacros.patch 925 SHA256 d4b616076dd09b8cf66a911d8710730ee6b2ca507ff2bca353bedb7b996e3a26 SHA512 f90ecb687f851a45684ad0b1f13269c4d674e849f6782b4f328d7f43f04209ee8442a7b428c27a57610f0ffc4c04343f357e700b22a6817835a3da09300a4f89 WHIRLPOOL 8ac802dfb707e5a46bbd577b269a21eec9323f4bf9c62ccd80a9474eb743f96238508662ea7342982a4ae4774e3efa2befc85e4f290678d6a3a278cd7bdf828c
+DIST sg3_utils-1.40.tgz 1179730 SHA256 44a9ecfd3af018fa9f3586067a8fa5f4874451c3d773d74436d262a7e530ee83 SHA512 cf4909c46d509ea7c1c8930d81df2b20ce56c56092830f017e69fa4ce7eddb395ae1d17f51657d8dfb539fdd78229223e54e0db2d61d2612d23313cd6846043a WHIRLPOOL d092fdd6ab46da73cda9bf2b0a85dc468bb222a443ca20e8d2f55ad91ed83b8a523fbd4946cd2e40874a56673085629227996f1f5e686273c8d2d44093797687
+DIST sg3_utils-1.41.tgz 1194212 SHA256 c4e2893c36df1ee5b07840ab7c22129544f5dc8a55f7cc8815c9cd8e44ec31c0 SHA512 ceca778a2f4d16dd341dd47cc1d92df5bc85d7f75d75e6b7c1a99c31e03e98103a18abf624880172e162bd0b751f760f0e919cbbb989303a9e1fbe9ff3eb1f46 WHIRLPOOL 9476f0f180879f1386b824b367314648d616b6925ff7b735760f25de6e086e38efa0eb12dd8fb9f9305eb367f7d8c2053ceabc83fc6270492357abce25de9784
+DIST sg3_utils-1.42.tgz 1219231 SHA256 1dcb7a0309bd0ba3d4a83acb526973b80106ee26cd9f7398186cd3f0633c9ef3 SHA512 d16b65e36b2bccb4fc4c189f97e71fa38e6619f37d668a4ddd74a52c715fa62325288d9737812ed19c80547059dbd27be5a20565e27e1aabb571e8f5f8ac53ad WHIRLPOOL 7cf34461312c55031b317b18defb69b57190ca22e83a162e957e213c658f6cb990675ec60b78849da40f54679027fa27f0c809be568fb1bdd31a8498c8b8665f
+EBUILD sg3_utils-1.40.ebuild 958 SHA256 97eb426b1f0c2b11e4f3c8611a7386aaa576a3369c90f397a61adeef4094ecbc SHA512 e347e8fc51a5875b71f4f6350ae03a6d03c8d77b5aab42dab36c0ec43441ebf75a8b291a906dd6a2ee0f07d053bdb453dda8476d2a569c3e16b52eb95fec1102 WHIRLPOOL 336517798552c8da669921dbfdc40625a731683ae7fef0af8d6a2799614be8e4d4ef6ca3d12c1b20592d5923606ac1e4884169d8d21b9b5e21a6216ae4be8f0f
+EBUILD sg3_utils-1.41.ebuild 969 SHA256 dac8fa6858736292fcc8242138a2851eeaeabbdd717f30955e30f4936ee6f1e3 SHA512 542582bd4130f2cc0bbacbc30a2a487ff8300845b43f0f7e4b83edfea4274d34468ddcf65ce919123afb93ecbd2d76853d80ce708456c4852390cb207f2e4055 WHIRLPOOL 187bdb017cbc7e426c2b85c632974304ed7d7e7648b2e69360c4b3eb4fc4d50617d89f08b9bf56369fe22002700038a38792b0e92a88ffe8e8d45949946768a5
+EBUILD sg3_utils-1.42.ebuild 1030 SHA256 9076086de4233b973e793526f85ebc5983a7c7bf9b1dea768d3d3f6cd209aac4 SHA512 8e8ac9d7b4293e8361e593685988fd92fb38a22e58e22b5f556216160fe494d9f2862509225ffcc75064bb18dc3eb9088a9c8595d6d6a7ed978d9189b8de2b59 WHIRLPOOL f4b0ac1e6b1a16f4c06a584e05396bf29dd25bf20b4f266327f0bf96c0d0260f6d24d13916de21f0d4c9725378538192f68865c1b642c8bec44ba28d230adb26
+MISC ChangeLog 4613 SHA256 565d90151dbfb94aef57806f65991ad25bd3c12e4c95ea733f0537b83ed50d0d SHA512 335fb68fed08dc59dc5d6b09a815b8de37c2d8d77267bd96a877585b07ee0fcdbdaa74ad0ceb778a3b687228ecc61ebdc61ee109992ef79e106f2f415da8dd51 WHIRLPOOL 7aabc17f5d94f7383c4fdd213b422f9dca360b36293edf53ab08a45c2891f06918d637beb2ce389fdcbb211cc631c72e47ed62ef67f86ecfb0360d7b95e04313
+MISC ChangeLog-2015 17273 SHA256 f6ce86dfa22bafb48babe7138b5db42549f37e8e3b907c08723e586c10e05715 SHA512 d2e1e48dede7dc23241b5d5672479ab91390364429c585566e9a4600b319aab5f3dae3780633590589688111c83683fd382303a839d7b8f6c864c2cc22797a5e WHIRLPOOL e899a18712bd20a4f21681b86f4e1481f3a1f1e1167d50b118566487611f472fbad87245e28aaaef75d8e1dff5f51546352a8bf43405bda574808860c62e898f
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.26-stdint.patch b/sys-apps/sg3_utils/files/sg3_utils-1.26-stdint.patch
new file mode 100644
index 000000000000..a82ab6add9a4
--- /dev/null
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.26-stdint.patch
@@ -0,0 +1,31 @@
+From: Ed Catmur <ed@catmur.co.uk>
+Gentoo-Bug: 229653
+X-Gentoo-URL: http://bugs.gentoo.org/show_bug.cgi?id=229653
+X-Gentoo-URL: http://bugs.gentoo.org/attachment.cgi?id=158565&action=view
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+For uint64_t to be available, <stdint.h> must be included:
+http://www.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html
+
+--- include/sg_cmds_basic.h 2008/06/26 23:27:40 1.1
++++ include/sg_cmds_basic.h 2008/06/26 23:28:06
+@@ -30,6 +30,8 @@
+ *
+ */
+
++#include <stdint.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--- include/sg_cmds_extra.h 2008/06/26 23:27:40 1.1
++++ include/sg_cmds_extra.h 2008/06/26 23:29:02
+@@ -30,6 +30,8 @@
+ *
+ */
+
++#include <stdint.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
new file mode 100644
index 000000000000..e8440fb8c322
--- /dev/null
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
@@ -0,0 +1,31 @@
+From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:36:09 -0400
+Subject: [PATCH] include sys/sysmacros.h for major/minor funcs
+
+These functions are not part of any official spec, and glibc has always
+kept them in sys/sysmacros.h. As glibc moves to conform to POSIX, and
+more alternative C libraries come up, we need to include this header
+explicitly to get the prototypes. Otherwise we fail to build like:
+
+sg_map26.o: In function 'nd_match_scandir_select':
+sg_map26.c:(.text+0x37b): undefined reference to 'major'
+---
+ include/sg_lib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/sg_lib.h b/include/sg_lib.h
+index b3e741b..a0e483c 100644
+--- a/include/sg_lib.h
++++ b/include/sg_lib.h
+@@ -32,6 +32,7 @@
+
+ #include <stdio.h>
+ #include <stdint.h>
++#include <sys/sysmacros.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+--
+2.7.4
+
diff --git a/sys-apps/sg3_utils/metadata.xml b/sys-apps/sg3_utils/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/sg3_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>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/sg3_utils/sg3_utils-1.40.ebuild b/sys-apps/sg3_utils/sg3_utils-1.40.ebuild
new file mode 100644
index 000000000000..0a444d19b7d5
--- /dev/null
+++ b/sys-apps/sg3_utils/sg3_utils-1.40.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+DESCRIPTION="Apps for querying the sg SCSI interface"
+HOMEPAGE="http://sg.danny.cz/sg/"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="static-libs"
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.26-stdint.patch
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc COVERAGE doc/README examples/*.txt
+ newdoc scripts/README README.scripts
+
+ # Better fix for bug 231089; some packages look for sgutils2
+ local path lib
+ path="/usr/$(get_libdir)"
+ for lib in "${ED}"${path}/libsgutils2.*; do
+ lib=${lib##*/}
+ dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
+ done
+
+ prune_libtool_files
+}
diff --git a/sys-apps/sg3_utils/sg3_utils-1.41.ebuild b/sys-apps/sg3_utils/sg3_utils-1.41.ebuild
new file mode 100644
index 000000000000..d3355b724833
--- /dev/null
+++ b/sys-apps/sg3_utils/sg3_utils-1.41.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+DESCRIPTION="Apps for querying the sg SCSI interface"
+HOMEPAGE="http://sg.danny.cz/sg/"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static-libs"
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.26-stdint.patch
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc COVERAGE doc/README examples/*.txt
+ newdoc scripts/README README.scripts
+
+ # Better fix for bug 231089; some packages look for sgutils2
+ local path lib
+ path="/usr/$(get_libdir)"
+ for lib in "${ED}"${path}/libsgutils2.*; do
+ lib=${lib##*/}
+ dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
+ done
+
+ prune_libtool_files
+}
diff --git a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
new file mode 100644
index 000000000000..29a4170c556b
--- /dev/null
+++ b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Apps for querying the sg SCSI interface"
+HOMEPAGE="http://sg.danny.cz/sg/"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="static-libs"
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.26-stdint.patch #580236
+ epatch "${FILESDIR}"/${PN}-1.42-sysmacros.patch #580236
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc COVERAGE doc/README examples/*.txt
+ newdoc scripts/README README.scripts
+
+ # Better fix for bug 231089; some packages look for sgutils2
+ local path lib
+ path="/usr/$(get_libdir)"
+ for lib in "${ED}"${path}/libsgutils2.*; do
+ lib=${lib##*/}
+ dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
+ done
+
+ prune_libtool_files
+}
diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest
new file mode 100644
index 000000000000..94620e46e930
--- /dev/null
+++ b/sys-apps/shadow/Manifest
@@ -0,0 +1,15 @@
+AUX default/useradd 96 SHA256 31aa2cbe4a34a9f7d4d134c1fecd007c9bbf4d40e19d0dcddbcd396f1853b490 SHA512 87b01ac88c2065392fa988871489d8403ef93341b4cfbadb4504f39a2a3396ddef756efc6378868d00627a58a1feb9612eb52a8135558a211a09c6a9ccf3404f WHIRLPOOL 9022a371e34e96a4c3193f24752979da27cdcd60aec1c8db1d2b427ab880b16917578ddcb4d8af02fd1d0eedc6b346cf43d7ae892e8580321e32e50f5498980b
+AUX pam.d-include/passwd 144 SHA256 8c54d2e3aab50b2a8d3d36aa37f7d7bb32c15d9a3af9a10b7ec5b5ffcff9a5fb SHA512 31611a08d97cd2c129f18d451a555ff6c781f91603c77fc0c66ff406b5fa4a97db19ae4ce104816a6324529d10e131de0d5329646bdab2abc8dc3ee5b82b057f WHIRLPOOL 879370adfb6a78c0acdeebf2c10a503d94925c34dceadb8677693f6c34e4e973f2584b221a9a81fdf23f084c430bbafa23a03440c1a95c798b58faedf4d412bd
+AUX pam.d-include/shadow 152 SHA256 7fc1ccca85d2b1ac4dad9909792453c8d26e9aeab48c620d861a92b9355ac69f SHA512 d07611c350d0d6f3386db5080c80a84e4135cf33e44fd3a390cb1092e034f9bd2a69495fadd4bda6ede9962e9658e77f2c8e12d3189cdcda6c7b3c607336f0c3 WHIRLPOOL 2b5282f983b5bf52c0311c2153dba2d12f6c07ae803d1723010bf4bbf4962d120aea026d32b1f3b062778da5222e7cb16dc39660e53b72173fba723a57b616de
+AUX shadow-4.1.3-dots-in-usernames.patch 302 SHA256 2299ffaec204d20e00d791bf5b982571c9261a74c7a7b865a9f7cad1cdcb43ba SHA512 ad20fb3f4f0292f39b5da796e41df71e9e8b1b81dd11a99b2d988440c1b435b0061333a0a5a37a909598d5a840a75946e8c59c74426bae7452de88cf673a5f7d WHIRLPOOL f0258b24f7731ab7b15a1fca391593c8bbd6bdf2ddad57af1d7960d05af49bc5b706039caa576646cb3d817d2d4ad8e89526b12fe046301c63c1518d01dcf173
+AUX shadow-4.4-CVE-2017-2616.patch 2159 SHA256 1f6d321372ee9cf1260c9de3c5d5070f6e263e20c2761c1d93df176505fcb7df SHA512 72cba0857ac6611532a99769d22568816d21a29f77f76f9d22e6b5b400cb936088087e811e9715cb891c70a11c76321653611a2c49d85acb1b163158863634fe WHIRLPOOL cd85fc3377d92a6116b825a866cea041a2b8c783710767b68fcd08b7f33fc8d2544dc0c80e0686b24de06b9c48c09aea118402dc2437e11318042c39905ba5e5
+AUX shadow-4.4-load_defaults.patch 1027 SHA256 3c5679b99dd79d69d161e8916175b298540fad21e6391224e5c0021a27d04060 SHA512 c821149fdcb71b0c1c7b0de72126a3ec625bd54f2edaff1666ccd30abe3f3d516db329dbe873ae020a6670f93caaf7d235283666113d5b02936043d6dd976d36 WHIRLPOOL 81389edb7a04fa34ba1d8560e63b626eb83662c11c2a532d91e207a128337ffc3e6d4b1a8a99ab1693a943d156ad1dd82f3dd7b09f9e320fd9b2706b62a76430
+AUX shadow-4.4-prototypes.patch 1232 SHA256 5b66e3ae613a01209ea4be1ebdd4bf3e88e7a1a78ff3f27779865bd82007ae78 SHA512 970f79efaf77e91baa22049230f2a97e6a045f2f03ef846f4c35dc4f5702941e61db5b6544c24d112faafd6d516fc5054725039f28fe81e17926a5e8ef6f0432 WHIRLPOOL 1d9ec7f3c84046621e5176697b76ee9d428533d1f873d138ce61038fe780cd3475cbab869c00c7457fcb4535edd93bb5e596eae4c12a2d640356c212f016e4c4
+AUX shadow-4.4-su-snprintf.patch 849 SHA256 6a9c8f35de35a5cfd72b2983a58619b189e77afd970ef0d45efd3dc2b06f8fbd SHA512 2aaa1c847ec34002c6e63af66fb36664e0fc5dc0b719ab38959043f990e84191f5e2f85c2dc44e324abcfe67691c9a9b8181da49077031e2eaaf979dde95b2d9 WHIRLPOOL 20457ef69fde1e3e974640e27c16e70d030036bbe9e889bdc1e63e9220e88776dd6c04a1f84fbafbffd92293940aaaacc810569abdbaab07f9a514e318ea7a92
+DIST shadow-4.4.tar.gz 3706812 SHA256 2398fe436e548786c17ec387b4c41f5339f72ec9ee2f3f7a6e0cc2cb240bb482 SHA512 c1e0f65a4fbd0f9d8de38e488b4a374cac5c476180e233269fc666988d9201c0dcc694605c5e54d54f81039c2e30c95b14c12f10adef749a45cc31f0b4b5d5a6 WHIRLPOOL a22fc0f90ec0623cbbcef253378a16ad605cf71345074880e3fd12fb5914058d3e721f378730c9684497cc597595b7defc7e710206268ae320a090c8c35fd41e
+DIST shadow-4.5.tar.gz 3804933 SHA256 ed2d53bd0e80cf32261e82b8d93684334e8809266dba1ec7a42bfa747605989e SHA512 02d6482a1159689e404dd49a68b4e2db85e9ffdcdfbacc8efcbd9043f14a1ec3fc4d749700df915d375df67d589219b6b0f57a6cfd9fb5b197012888a608913b WHIRLPOOL 73552aff621cf34ef977095a05d9b679b7b6ffa78979d69eeb43089564aca5cc1d841dc9cbb6f0fba4c4f712f0e89f6cc683b733ea1041e4633b5d9fe58b5499
+EBUILD shadow-4.4-r2.ebuild 5520 SHA256 6faffddd4a8a4d950d3d5e962d6b09a9ca178c0ad4312e2a5698ec9337992f62 SHA512 c6becedeaf7faf85960cd3e198dff4c0e60d13af6b27127110f146f049bac0fdf068b65ba472ff035c97afc18aa3e9f5d2cdf2f17869b76828329ba7f481a51b WHIRLPOOL 6b0295f648bab88918ddebf10fd187a73790f42a9d1f152bb4f8595bdd28ba02c4ff36d28c81460f69e41d972d610147bf582d43234afa454b929d5e8a224a47
+EBUILD shadow-4.5.ebuild 5363 SHA256 ce3015885fd40e388d534a75af4442a5904251f7ce941ce871237fb132534ec8 SHA512 4f24d90b0e0e796915d3a0b6c4c100d2fb3d186e269bc64b973281d9e5f4071dfe0b22a9a9b38f07fb85f2153b01ce35174bb1dc46f9a2ea453bbbc172d8a936 WHIRLPOOL dffb76d9dfc424de739d23b4a8da3c5e1a22cbe4aaa3922969e49d45a07eaf5af4e0339c32095081daa7ae0b61d886a9d99783a2c0eda714e032df868be63dd0
+MISC ChangeLog 4723 SHA256 b09aaf93b341c840a85e4f81ed72b1ab7f421d1ff4e6e55410f79cbcd8060b15 SHA512 366b0aa5ff325929c4a8d9523e82e4eeda9dc0ed4e1dcfed123c08a9c632a7d79b50baee39c2c5a26325d7764295a03438d990b2b28f1dc3252ff4850fe97bb4 WHIRLPOOL 513e5c3afa9f5fe3036a35639b8cf926f42627101836ee201afcd4c9c8c463b71f387197e53112184511e057739ce6b43942a87a71cb49e77affe282e5364526
+MISC ChangeLog-2015 51089 SHA256 bbd5750c5403da96d5875738418b68a3884025a85391885fced1d202f97187ee SHA512 8741d75131d25e4524c7a243338e26e614ce81411c0c58725028717c16ace08ec3aa665b8af3eaa4a6f94a23debfed07524bda6d2e2652a05bc290c30322b9ab WHIRLPOOL eb08c4506cbab719018752c00167a531cc6ca5075965921466906cfc3db75dd69276e06115a5893cb7a22f099a563a86b295ccac7e410af037c968ea53c1620a
+MISC metadata.xml 565 SHA256 22160798da478d70befbd4da3ef283bc66ad650168d2cf8947a4aa9935748dc0 SHA512 be29faf2eb981bdb0d643ca691d48b10ee702c3a32ca7fca1d00365aa1c4beb5b1b4bec8104be4352fed32f3fabc3108061b8eb8f0054e612c268b5c6f4b1469 WHIRLPOOL 2194536e374b86cd2e2b078e076f2ce6b3758794ac8812a9db2a189d88013c35f142bc34e0ef4320b04f3b253632c317a8f8c2a901e965c0a85e9ba5bb5a32d9
diff --git a/sys-apps/shadow/files/default/useradd b/sys-apps/shadow/files/default/useradd
new file mode 100644
index 000000000000..ae81dbb3a02b
--- /dev/null
+++ b/sys-apps/shadow/files/default/useradd
@@ -0,0 +1,7 @@
+# useradd defaults file
+GROUP=100
+HOME=/home
+INACTIVE=-1
+EXPIRE=
+SHELL=/bin/bash
+SKEL=/etc/skel
diff --git a/sys-apps/shadow/files/pam.d-include/passwd b/sys-apps/shadow/files/pam.d-include/passwd
new file mode 100644
index 000000000000..960b32eab3eb
--- /dev/null
+++ b/sys-apps/shadow/files/pam.d-include/passwd
@@ -0,0 +1,8 @@
+#%PAM-1.0
+
+auth sufficient pam_rootok.so
+auth include system-auth
+
+account include system-auth
+
+password include system-auth
diff --git a/sys-apps/shadow/files/pam.d-include/shadow b/sys-apps/shadow/files/pam.d-include/shadow
new file mode 100644
index 000000000000..743b2f0260d6
--- /dev/null
+++ b/sys-apps/shadow/files/pam.d-include/shadow
@@ -0,0 +1,8 @@
+#%PAM-1.0
+
+auth sufficient pam_rootok.so
+auth required pam_permit.so
+
+account include system-auth
+
+password required pam_permit.so
diff --git a/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch
new file mode 100644
index 000000000000..efcb33dbd9ef
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch
@@ -0,0 +1,10 @@
+--- shadow-4.1.3/libmisc/chkname.c
++++ shadow-4.1.3/libmisc/chkname.c
+@@ -66,6 +66,7 @@
+ ( ('0' <= *name) && ('9' >= *name) ) ||
+ ('_' == *name) ||
+ ('-' == *name) ||
++ ('.' == *name) ||
+ ( ('$' == *name) && ('\0' == *(name + 1)) )
+ )) {
+ return false;
diff --git a/sys-apps/shadow/files/shadow-4.4-CVE-2017-2616.patch b/sys-apps/shadow/files/shadow-4.4-CVE-2017-2616.patch
new file mode 100644
index 000000000000..b788ec35342f
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.4-CVE-2017-2616.patch
@@ -0,0 +1,62 @@
+From 08fd4b69e84364677a10e519ccb25b71710ee686 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Thu, 23 Feb 2017 09:47:29 -0600
+Subject: [PATCH] su: properly clear child PID
+
+If su is compiled with PAM support, it is possible for any local user
+to send SIGKILL to other processes with root privileges. There are
+only two conditions. First, the user must be able to perform su with
+a successful login. This does NOT have to be the root user, even using
+su with the same id is enough, e.g. "su $(whoami)". Second, SIGKILL
+can only be sent to processes which were executed after the su process.
+It is not possible to send SIGKILL to processes which were already
+running. I consider this as a security vulnerability, because I was
+able to write a proof of concept which unlocked a screen saver of
+another user this way.
+---
+ src/su.c | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/su.c b/src/su.c
+index f20d230..d86aa86 100644
+--- a/src/su.c
++++ b/src/su.c
+@@ -379,11 +379,13 @@ static void prepare_pam_close_session (void)
+ /* wake child when resumed */
+ kill (pid, SIGCONT);
+ stop = false;
++ } else {
++ pid_child = 0;
+ }
+ } while (!stop);
+ }
+
+- if (0 != caught) {
++ if (0 != caught && 0 != pid_child) {
+ (void) fputs ("\n", stderr);
+ (void) fputs (_("Session terminated, terminating shell..."),
+ stderr);
+@@ -393,9 +395,22 @@ static void prepare_pam_close_session (void)
+ snprintf (wait_msg, sizeof wait_msg, _(" ...waiting for child to terminate.\n"));
+
+ (void) signal (SIGALRM, kill_child);
++ (void) signal (SIGCHLD, catch_signals);
+ (void) alarm (2);
+
+- (void) wait (&status);
++ sigemptyset (&ourset);
++ if ((sigaddset (&ourset, SIGALRM) != 0)
++ || (sigprocmask (SIG_BLOCK, &ourset, NULL) != 0)) {
++ fprintf (stderr, _("%s: signal masking malfunction\n"), Prog);
++ kill_child (0);
++ } else {
++ while (0 == waitpid (pid_child, &status, WNOHANG)) {
++ sigsuspend (&ourset);
++ }
++ pid_child = 0;
++ (void) sigprocmask (SIG_UNBLOCK, &ourset, NULL);
++ }
++
+ (void) fputs (_(" ...terminated.\n"), stderr);
+ }
+
diff --git a/sys-apps/shadow/files/shadow-4.4-load_defaults.patch b/sys-apps/shadow/files/shadow-4.4-load_defaults.patch
new file mode 100644
index 000000000000..4c0b84f68036
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.4-load_defaults.patch
@@ -0,0 +1,37 @@
+From 507f96cdeb54079fb636c7ce21e371f7a16a520e Mon Sep 17 00:00:00 2001
+From: Tomas Mraz <tmraz@fedoraproject.org>
+Date: Thu, 25 Aug 2016 11:20:34 +0200
+Subject: [PATCH] Fix regression in useradd not loading defaults properly.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The get_defaults() has to be called before processing the flags.
+
+Signed-off-by: Tomáš Mráz <tmraz@fedoraproject.org>
+---
+ src/useradd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index fefa234..6c43e7e 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -2027,6 +2027,8 @@ int main (int argc, char **argv)
+ is_shadow_grp = sgr_file_present ();
+ #endif
+
++ get_defaults ();
++
+ process_flags (argc, argv);
+
+ #ifdef ENABLE_SUBIDS
+@@ -2036,8 +2038,6 @@ int main (int argc, char **argv)
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
+ #endif /* ENABLE_SUBIDS */
+
+- get_defaults ();
+-
+ #ifdef ACCT_TOOLS_SETUID
+ #ifdef USE_PAM
+ {
diff --git a/sys-apps/shadow/files/shadow-4.4-prototypes.patch b/sys-apps/shadow/files/shadow-4.4-prototypes.patch
new file mode 100644
index 000000000000..5209a2988f7b
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.4-prototypes.patch
@@ -0,0 +1,42 @@
+https://github.com/shadow-maint/shadow/pull/53
+
+From 32c0b283ef5d68b63e4ec05fb22ed0db938fea67 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 5 Dec 2016 17:15:29 -0500
+Subject: [PATCH] include getdef.h for getdef_bool prototype
+
+Otherwise we get build warnings like:
+sgroupio.c:255:6: warning: implicit declaration of function 'getdef_bool' [-Wimplicit-function-declaration]
+shadowio.c:131:6: warning: implicit declaration of function 'getdef_bool' [-Wimplicit-function-declaration]
+---
+ lib/sgroupio.c | 1 +
+ lib/shadowio.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/lib/sgroupio.c b/lib/sgroupio.c
+index f2685779a12b..5423626a01da 100644
+--- a/lib/sgroupio.c
++++ b/lib/sgroupio.c
+@@ -40,6 +40,7 @@
+ #include "prototypes.h"
+ #include "defines.h"
+ #include "commonio.h"
++#include "getdef.h"
+ #include "sgroupio.h"
+
+ /*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent)
+diff --git a/lib/shadowio.c b/lib/shadowio.c
+index 6e44ab24d69c..5fa3d312bbf9 100644
+--- a/lib/shadowio.c
++++ b/lib/shadowio.c
+@@ -40,6 +40,7 @@
+ #include <shadow.h>
+ #include <stdio.h>
+ #include "commonio.h"
++#include "getdef.h"
+ #include "shadowio.h"
+ #ifdef WITH_TCB
+ #include <tcb.h>
+--
+2.11.0.rc2
+
diff --git a/sys-apps/shadow/files/shadow-4.4-su-snprintf.patch b/sys-apps/shadow/files/shadow-4.4-su-snprintf.patch
new file mode 100644
index 000000000000..45667c8e4bf9
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.4-su-snprintf.patch
@@ -0,0 +1,29 @@
+fix from upstream
+
+From 67d2bb6e0a5ac124ce1f026dd5723217b1493194 Mon Sep 17 00:00:00 2001
+From: Serge Hallyn <serge@hallyn.com>
+Date: Sun, 18 Sep 2016 21:31:18 -0500
+Subject: [PATCH] su.c: fix missing length argument to snprintf
+
+---
+ src/su.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/su.c b/src/su.c
+index 0c50a9456afd..93ffd2fbe2b4 100644
+--- a/src/su.c
++++ b/src/su.c
+@@ -373,8 +373,8 @@ static void prepare_pam_close_session (void)
+ stderr);
+ (void) kill (-pid_child, caught);
+
+- snprintf (kill_msg, _(" ...killed.\n"));
+- snprintf (wait_msg, _(" ...waiting for child to terminate.\n"));
++ snprintf (kill_msg, 256, _(" ...killed.\n"));
++ snprintf (wait_msg, 256, _(" ...waiting for child to terminate.\n"));
+
+ (void) signal (SIGALRM, kill_child);
+ (void) alarm (2);
+--
+2.11.0.rc2
+
diff --git a/sys-apps/shadow/metadata.xml b/sys-apps/shadow/metadata.xml
new file mode 100644
index 000000000000..2cabe8fe4fe6
--- /dev/null
+++ b/sys-apps/shadow/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>pam-bugs@gentoo.org</email>
+ <name>Pluggable Authentication Method maintenance</name>
+ </maintainer>
+ <!-- only for USE=pam -->
+ <upstream>
+ <remote-id type="cpe">cpe:/a:debian:shadow</remote-id>
+ <remote-id type="github">shadow-maint/shadow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/shadow/shadow-4.4-r2.ebuild b/sys-apps/shadow/shadow-4.4-r2.ebuild
new file mode 100644
index 000000000000..c14915cc1965
--- /dev/null
+++ b/sys-apps/shadow/shadow-4.4-r2.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils libtool pam multilib
+
+DESCRIPTION="Utilities to deal with user accounts"
+HOMEPAGE="https://github.com/shadow-maint/shadow http://pkg-shadow.alioth.debian.org/"
+SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="acl audit cracklib nls pam selinux skey xattr"
+# Taken from the man/Makefile.am file.
+LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW )
+IUSE+=" $(printf 'linguas_%s ' ${LANGS[*]})"
+
+RDEPEND="acl? ( sys-apps/acl:0= )
+ audit? ( >=sys-process/audit-2.6:0= )
+ cracklib? ( >=sys-libs/cracklib-2.7-r3:0= )
+ pam? ( virtual/pam:0= )
+ skey? ( sys-auth/skey:0= )
+ selinux? (
+ >=sys-libs/libselinux-1.28:0=
+ sys-libs/libsemanage:0=
+ )
+ nls? ( virtual/libintl )
+ xattr? ( sys-apps/attr:0= )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20150213 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch
+ "${FILESDIR}"/${P}-su-snprintf.patch
+ "${FILESDIR}"/${P}-prototypes.patch
+ "${FILESDIR}"/${P}-load_defaults.patch
+ "${FILESDIR}"/${P}-CVE-2017-2616.patch #610804
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ epatch_user
+ #eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --without-group-name-max-length \
+ --without-tcb \
+ --enable-shared=no \
+ --enable-static=yes \
+ $(use_with acl) \
+ $(use_with audit) \
+ $(use_with cracklib libcrack) \
+ $(use_with pam libpam) \
+ $(use_with skey) \
+ $(use_with selinux) \
+ $(use_enable nls) \
+ $(use_with elibc_glibc nscd) \
+ $(use_with xattr attr)
+ has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052
+
+ if use nls ; then
+ local l langs="po" # These are the pot files.
+ for l in ${LANGS[*]} ; do
+ use linguas_${l} && langs+=" ${l}"
+ done
+ sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die
+ fi
+}
+
+set_login_opt() {
+ local comment="" opt=$1 val=$2
+ if [[ -z ${val} ]]; then
+ comment="#"
+ sed -i \
+ -e "/^${opt}\>/s:^:#:" \
+ "${ED}"/etc/login.defs || die
+ else
+ sed -i -r \
+ -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \
+ "${ED}"/etc/login.defs
+ fi
+ local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs)
+ einfo "${res:-Unable to find ${opt} in /etc/login.defs}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" suidperms=4711 install
+
+ # Remove libshadow and libmisc; see bug 37725 and the following
+ # comment from shadow's README.linux:
+ # Currently, libshadow.a is for internal use only, so if you see
+ # -lshadow in a Makefile of some other package, it is safe to
+ # remove it.
+ rm -f "${ED}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la}
+
+ insinto /etc
+ if ! use pam ; then
+ insopts -m0600
+ doins etc/login.access etc/limits
+ fi
+
+ # needed for 'useradd -D'
+ insinto /etc/default
+ insopts -m0600
+ doins "${FILESDIR}"/default/useradd
+
+ # move passwd to / to help recover broke systems #64441
+ mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die
+ dosym /bin/passwd /usr/bin/passwd
+
+ cd "${S}"
+ insinto /etc
+ insopts -m0644
+ newins etc/login.defs login.defs
+
+ set_login_opt CREATE_HOME yes
+ if ! use pam ; then
+ set_login_opt MAIL_CHECK_ENAB no
+ set_login_opt SU_WHEEL_ONLY yes
+ set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict
+ set_login_opt LOGIN_RETRIES 3
+ set_login_opt ENCRYPT_METHOD SHA512
+ set_login_opt CONSOLE
+ else
+ dopamd "${FILESDIR}"/pam.d-include/shadow
+
+ for x in chpasswd chgpasswd newusers; do
+ newpamd "${FILESDIR}"/pam.d-include/passwd ${x}
+ done
+
+ for x in chage chsh chfn \
+ user{add,del,mod} group{add,del,mod} ; do
+ newpamd "${FILESDIR}"/pam.d-include/shadow ${x}
+ done
+
+ # comment out login.defs options that pam hates
+ local opt sed_args=()
+ for opt in \
+ CHFN_AUTH \
+ CONSOLE \
+ CRACKLIB_DICTPATH \
+ ENV_HZ \
+ ENVIRON_FILE \
+ FAILLOG_ENAB \
+ FTMP_FILE \
+ LASTLOG_ENAB \
+ MAIL_CHECK_ENAB \
+ MOTD_FILE \
+ NOLOGINS_FILE \
+ OBSCURE_CHECKS_ENAB \
+ PASS_ALWAYS_WARN \
+ PASS_CHANGE_TRIES \
+ PASS_MIN_LEN \
+ PORTTIME_CHECKS_ENAB \
+ QUOTAS_ENAB \
+ SU_WHEEL_ONLY
+ do
+ set_login_opt ${opt}
+ sed_args+=( -e "/^#${opt}\>/b pamnote" )
+ done
+ sed -i "${sed_args[@]}" \
+ -e 'b exit' \
+ -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \
+ -e ': exit' \
+ "${ED}"/etc/login.defs || die
+
+ # remove manpages that pam will install for us
+ # and/or don't apply when using pam
+ find "${ED}"/usr/share/man \
+ '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \
+ -delete
+
+ # Remove pam.d files provided by pambase.
+ rm "${ED}"/etc/pam.d/{login,passwd,su} || die
+ fi
+
+ # Remove manpages that are handled by other packages
+ find "${ED}"/usr/share/man \
+ '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \
+ -delete
+
+ cd "${S}"
+ dodoc ChangeLog NEWS TODO
+ newdoc README README.download
+ cd doc
+ dodoc HOWTO README* WISHLIST *.txt
+}
+
+pkg_preinst() {
+ rm -f "${EROOT}"/etc/pam.d/system-auth.new \
+ "${EROOT}/etc/login.defs.new"
+}
+
+pkg_postinst() {
+ # Enable shadow groups.
+ if [ ! -f "${EROOT}"/etc/gshadow ] ; then
+ if grpck -r -R "${EROOT}" 2>/dev/null ; then
+ grpconv -R "${EROOT}"
+ else
+ ewarn "Running 'grpck' returned errors. Please run it by hand, and then"
+ ewarn "run 'grpconv' afterwards!"
+ fi
+ fi
+
+ einfo "The 'adduser' symlink to 'useradd' has been dropped."
+}
diff --git a/sys-apps/shadow/shadow-4.5.ebuild b/sys-apps/shadow/shadow-4.5.ebuild
new file mode 100644
index 000000000000..343a1aa381d0
--- /dev/null
+++ b/sys-apps/shadow/shadow-4.5.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils libtool pam multilib
+
+DESCRIPTION="Utilities to deal with user accounts"
+HOMEPAGE="https://github.com/shadow-maint/shadow http://pkg-shadow.alioth.debian.org/"
+SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
+IUSE="acl audit cracklib nls pam selinux skey xattr"
+# Taken from the man/Makefile.am file.
+LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW )
+IUSE+=" $(printf 'linguas_%s ' ${LANGS[*]})"
+
+RDEPEND="acl? ( sys-apps/acl:0= )
+ audit? ( >=sys-process/audit-2.6:0= )
+ cracklib? ( >=sys-libs/cracklib-2.7-r3:0= )
+ pam? ( virtual/pam:0= )
+ skey? ( sys-auth/skey:0= )
+ selinux? (
+ >=sys-libs/libselinux-1.28:0=
+ sys-libs/libsemanage:0=
+ )
+ nls? ( virtual/libintl )
+ xattr? ( sys-apps/attr:0= )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20150213 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ epatch_user
+ #eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --without-group-name-max-length \
+ --without-tcb \
+ --enable-shared=no \
+ --enable-static=yes \
+ $(use_with acl) \
+ $(use_with audit) \
+ $(use_with cracklib libcrack) \
+ $(use_with pam libpam) \
+ $(use_with skey) \
+ $(use_with selinux) \
+ $(use_enable nls) \
+ $(use_with elibc_glibc nscd) \
+ $(use_with xattr attr)
+ has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052
+
+ if use nls ; then
+ local l langs="po" # These are the pot files.
+ for l in ${LANGS[*]} ; do
+ use linguas_${l} && langs+=" ${l}"
+ done
+ sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die
+ fi
+}
+
+set_login_opt() {
+ local comment="" opt=$1 val=$2
+ if [[ -z ${val} ]]; then
+ comment="#"
+ sed -i \
+ -e "/^${opt}\>/s:^:#:" \
+ "${ED}"/etc/login.defs || die
+ else
+ sed -i -r \
+ -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \
+ "${ED}"/etc/login.defs
+ fi
+ local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs)
+ einfo "${res:-Unable to find ${opt} in /etc/login.defs}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" suidperms=4711 install
+
+ # Remove libshadow and libmisc; see bug 37725 and the following
+ # comment from shadow's README.linux:
+ # Currently, libshadow.a is for internal use only, so if you see
+ # -lshadow in a Makefile of some other package, it is safe to
+ # remove it.
+ rm -f "${ED}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la}
+
+ insinto /etc
+ if ! use pam ; then
+ insopts -m0600
+ doins etc/login.access etc/limits
+ fi
+
+ # needed for 'useradd -D'
+ insinto /etc/default
+ insopts -m0600
+ doins "${FILESDIR}"/default/useradd
+
+ # move passwd to / to help recover broke systems #64441
+ mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die
+ dosym /bin/passwd /usr/bin/passwd
+
+ cd "${S}"
+ insinto /etc
+ insopts -m0644
+ newins etc/login.defs login.defs
+
+ set_login_opt CREATE_HOME yes
+ if ! use pam ; then
+ set_login_opt MAIL_CHECK_ENAB no
+ set_login_opt SU_WHEEL_ONLY yes
+ set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict
+ set_login_opt LOGIN_RETRIES 3
+ set_login_opt ENCRYPT_METHOD SHA512
+ set_login_opt CONSOLE
+ else
+ dopamd "${FILESDIR}"/pam.d-include/shadow
+
+ for x in chpasswd chgpasswd newusers; do
+ newpamd "${FILESDIR}"/pam.d-include/passwd ${x}
+ done
+
+ for x in chage chsh chfn \
+ user{add,del,mod} group{add,del,mod} ; do
+ newpamd "${FILESDIR}"/pam.d-include/shadow ${x}
+ done
+
+ # comment out login.defs options that pam hates
+ local opt sed_args=()
+ for opt in \
+ CHFN_AUTH \
+ CONSOLE \
+ CRACKLIB_DICTPATH \
+ ENV_HZ \
+ ENVIRON_FILE \
+ FAILLOG_ENAB \
+ FTMP_FILE \
+ LASTLOG_ENAB \
+ MAIL_CHECK_ENAB \
+ MOTD_FILE \
+ NOLOGINS_FILE \
+ OBSCURE_CHECKS_ENAB \
+ PASS_ALWAYS_WARN \
+ PASS_CHANGE_TRIES \
+ PASS_MIN_LEN \
+ PORTTIME_CHECKS_ENAB \
+ QUOTAS_ENAB \
+ SU_WHEEL_ONLY
+ do
+ set_login_opt ${opt}
+ sed_args+=( -e "/^#${opt}\>/b pamnote" )
+ done
+ sed -i "${sed_args[@]}" \
+ -e 'b exit' \
+ -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \
+ -e ': exit' \
+ "${ED}"/etc/login.defs || die
+
+ # remove manpages that pam will install for us
+ # and/or don't apply when using pam
+ find "${ED}"/usr/share/man \
+ '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \
+ -delete
+
+ # Remove pam.d files provided by pambase.
+ rm "${ED}"/etc/pam.d/{login,passwd,su} || die
+ fi
+
+ # Remove manpages that are handled by other packages
+ find "${ED}"/usr/share/man \
+ '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \
+ -delete
+
+ cd "${S}"
+ dodoc ChangeLog NEWS TODO
+ newdoc README README.download
+ cd doc
+ dodoc HOWTO README* WISHLIST *.txt
+}
+
+pkg_preinst() {
+ rm -f "${EROOT}"/etc/pam.d/system-auth.new \
+ "${EROOT}/etc/login.defs.new"
+}
+
+pkg_postinst() {
+ # Enable shadow groups.
+ if [ ! -f "${EROOT}"/etc/gshadow ] ; then
+ if grpck -r -R "${EROOT}" 2>/dev/null ; then
+ grpconv -R "${EROOT}"
+ else
+ ewarn "Running 'grpck' returned errors. Please run it by hand, and then"
+ ewarn "run 'grpconv' afterwards!"
+ fi
+ fi
+
+ einfo "The 'adduser' symlink to 'useradd' has been dropped."
+}
diff --git a/sys-apps/smartmontools/Manifest b/sys-apps/smartmontools/Manifest
new file mode 100644
index 000000000000..47e83d39ee81
--- /dev/null
+++ b/sys-apps/smartmontools/Manifest
@@ -0,0 +1,12 @@
+AUX smartd-r1.rc 614 SHA256 acef10e3d963a97c32f525da730eac00be424e7588ab2d7b24ad24dfe032ac88 SHA512 7a46212d2d76b335ac7470b51b44e40b1cdd4814e5db4a8a2f013803bb40ea5072fde64590ffd51754b03a6f80a43e835605a5bb3ac2c23e456633995191ec31 WHIRLPOOL a452c84a5a562c235f7ef633deea976ff414ce4d3132a201e210f91e8181d78c9a89749d54948d07e8d3206d22a9d111a42d59524b4496d257db2988071195d7
+AUX smartd.confd 107 SHA256 714cc1b253e1f59b884be89693757fec91ca878c62f37451a49ef6bb72263e85 SHA512 ff45462944f01c0e7cac99443078b253dcbaed4f99ffab85052b12361d9eec4beec81cab334fbede9148b3dd503d5205add32ef4327a788f02a8b1e37f460437 WHIRLPOOL 773405a2cc669f6eaae835bc3a6415151891b91ccf4111147f8b12d9763be26cbf65815879a70cd64ae12a36f59840ffcb15ff7e527479f88d9816130e704e76
+AUX smartmontools-update-drivedb 42 SHA256 53a766a094ef63b925e2c3f8c08322b67c2ab40b1f2b84d414e5de4f6747aca8 SHA512 8ad70fc85ab67b7c32eda95dd37517382c2447862df08b810a54dcdedb1eb8148f3a0e29f402a54adff31d1e88d80d09a258ed9e1e13b597ab2a358ebeda0ce8 WHIRLPOOL 3dd62cd6e26a18c9fe5555a1d3feb2597eea6773c857a2cf559331486fc0ef2ef67a0bcb7d1e03b14631d0c8809daae7688d6e1f83f02e8867b0dc23dfcafb55
+DIST smartmontools-6.4.tar.gz 822539 SHA256 eab75600c1eda9c34b13097db71138ab376f3dad8a6a4667fb4d1d081feb7a85 SHA512 366cd55ec668da1ca8a3d9ba79d5bee6e0c59032936b7f2f161f8fbb1c9f869c505d715cc10562b6241f808bb8b534feaf9d9fd752f6cb1593ee893611742adc WHIRLPOOL 72af8a0a4754bd75da9e98a008c64c083579fe27bdbd0655da81c8fe7a258dbc305cafd05f2f21d1954918ab8ff040cf1d54b916a1ce82fb8da64ba2e49b4de0
+DIST smartmontools-6.5.tar.gz 855642 SHA256 89e8bb080130bc6ce148573ba5bb91bfe30236b64b1b5bbca26515d4b5c945bc SHA512 dca7a6363ab7280ee4197155025f624c978886dcc94fc47b524f6f849138b62c471e966c0d4bf59c7bba50519dc122264618e5ded80a406863ddd10b43d928d3 WHIRLPOOL 639bb5c847c4e0e0f7156b764140f4382f650826eb3d59db6a712468e944a40788c87bbbe0149b9a4d1480947492b007b5875969e611213409f247ff4383fbd6
+EBUILD smartmontools-6.4-r1.ebuild 2534 SHA256 bfe58954437b13cc6fbf2a41cd1955dc67142ad5d86cf047f05ab2103c0c9e39 SHA512 1b0d02e5d4a493cd7926a93c92b3b78951f3580228ca19864113dbb09f12ce936866d50d528bdfb66f94b88b8f99660fa5d7181a81008b4badfaa7ef362a187c WHIRLPOOL 11a73a52a10bf7dedb37d3ff95fe6d69038f67ee25ee561c4fba2b2d44bd6fb958e814a6267a3dd2c709b37a53147a59bbe3e62a6b9129e79e44f61aa7fef9d0
+EBUILD smartmontools-6.4.ebuild 1639 SHA256 8a750c037710240049acaf6759199fa9bcc8e2521c8eec155871854c410120c8 SHA512 c9b07c80d4e4355bc2c4ebce895efe35ed70d5a31eab3eb8298c1cc947a42cb1c4bb81d57cb46816619580067aeec246f49bc581a788abb7c912d0ef898f8448 WHIRLPOOL f74cbde502853bffc5c88d8ef14202c908a772bd1e9a6a779f3958282655e5ec049666a75d339647d6f5cd9e3697ca4eaa616bc5462f90588e33ecccb2cc9ecb
+EBUILD smartmontools-6.5.ebuild 2726 SHA256 2a194cd89589b0a1be1be3ffe2ecce9c5740ff0069cb2cd209ccd92da895ee3c SHA512 15871d06fa4d9038ecdbb5d6e669526fd035e09cb43dee4fc9688fa3e9d1e5775ba46eb12c720d638ab5f7c0d808495f66c1fa7e404247f933c5c450411462cf WHIRLPOOL aa0fde02f7f195fddaf74a7a63a45c199b05d94a0c41a51d9d644f7ce7864527b5173e321f9fe0048ed3755716ae82dcca66279832bf8a4eb9c83f8488b7618a
+EBUILD smartmontools-9999.ebuild 2726 SHA256 2a194cd89589b0a1be1be3ffe2ecce9c5740ff0069cb2cd209ccd92da895ee3c SHA512 15871d06fa4d9038ecdbb5d6e669526fd035e09cb43dee4fc9688fa3e9d1e5775ba46eb12c720d638ab5f7c0d808495f66c1fa7e404247f933c5c450411462cf WHIRLPOOL aa0fde02f7f195fddaf74a7a63a45c199b05d94a0c41a51d9d644f7ce7864527b5173e321f9fe0048ed3755716ae82dcca66279832bf8a4eb9c83f8488b7618a
+MISC ChangeLog 5978 SHA256 ddb411f5922e15aa38c9850ff7b341b4b285fe0052dde1710e85a026d1170a5c SHA512 1a482b6059ce1f49f2d1c468389b520963942e4d8b02e0e883452a024a9b1557ce0d33cdb365f170568ea69a9050f61482656579a5179be3ff0d61c84a039d7f WHIRLPOOL 8113cae9710da5e3a758cca8b8760c4c30aef3ae7f2881a1b9028f1ce15539389f1d50a72c97839fb9ffba15d7df94ab904080e8f47c0412491bacc30001c815
+MISC ChangeLog-2015 20152 SHA256 f3ec99b8e802612e8f3dccf301c1f8ce46066fa26b1bf58c1eb34ec4e606fb3e SHA512 3969af254861ddb1bef5c129fc691732356ee56fd5ed29f3a76273593182c90d21239050c7d449560334976ae7d315d06fb25d3f815fe6c98b4ce93771b68d6c WHIRLPOOL 2c7d3763680d2572c2ee8f8f3c5a2da0bf6f602c06deb57d842ceea07f0a695d36ed92829166b4d29c10eb21090e65cc064d297d8f2a537c3a4aab93d0bcff8b
+MISC metadata.xml 517 SHA256 9498d60f66b4e752d70f5f34e5bcf2ed20bb9d113310d9f4344049dde7fc6087 SHA512 63c3af11414b2a8ac83351486b600c16dec940d01c07bacfefb762b3acb152f87db3f630772c0ec32cdc4b316ab3a98ed3efbda82d0af5680d76f0b24459ba14 WHIRLPOOL 4a7af5fe7bd02387df2ebd7c34379eff330710a4ffc7beed20953cac8c4ab2cfae4d1283c71bf1f79d1d765e681761b2e1a5ab19557ebb7e84c16aa143429f5c
diff --git a/sys-apps/smartmontools/files/smartd-r1.rc b/sys-apps/smartmontools/files/smartd-r1.rc
new file mode 100644
index 000000000000..1aa2ece803dc
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartd-r1.rc
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/smartd.pid"
+command="/usr/sbin/smartd"
+command_args="-p ${pidfile} ${SMARTD_OPTS}"
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ if [ ! -f "/etc/smartd.conf" ] ; then
+ eerror "You should setup your /etc/smartd.conf file!"
+ eerror "See the smartd.conf(5) manpage."
+ return 1
+ fi
+ return 0
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile ${pidfile} ${command##*/}
+ eend $?
+}
diff --git a/sys-apps/smartmontools/files/smartd.confd b/sys-apps/smartmontools/files/smartd.confd
new file mode 100644
index 000000000000..4b7db4dfd827
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartd.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/smartd: config file for /etc/init.d/smartd
+
+# Insert any other options needed
+SMARTD_OPTS=""
diff --git a/sys-apps/smartmontools/files/smartmontools-update-drivedb b/sys-apps/smartmontools/files/smartmontools-update-drivedb
new file mode 100644
index 000000000000..831f1e6541b5
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartmontools-update-drivedb
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/update-smart-drivedb
diff --git a/sys-apps/smartmontools/metadata.xml b/sys-apps/smartmontools/metadata.xml
new file mode 100644
index 000000000000..b35558848001
--- /dev/null
+++ b/sys-apps/smartmontools/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="minimal">Do not install the monitoring daemon and associated scripts.</flag>
+ <flag name="update_drivedb">Install a script to update the drivedb file.</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">smartmontools</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
new file mode 100644
index 000000000000..04fed0a4248c
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps minimal selinux static"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ !minimal? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+"
+
+src_prepare() {
+ # 580424
+ sed '/^SRCEXPR/s@http:@https:@' \
+ -i update-smart-drivedb.in \
+ || die
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use minimal && einfo "Skipping the monitoring daemon for minimal build."
+ use static && append-ldflags -static
+ # The build installs /etc/init.d/smartd, but we clobber it
+ # in our src_install, so no need to manually delete it.
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir=/var/db/${PN} #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
+ $(systemd_with_unitdir)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ local db_path="/var/db/${PN}"
+
+ if use minimal ; then
+ dosbin smartctl
+ doman smartctl.8
+ else
+ default
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}${db_path}/drivedb.h" "${T}" || die
+ keepdir "${db_path}"
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${PN}-update-drivedb
+ fi
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The existing copy of the drive database has been replaced with the version that"
+ ewarn "was shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h "${db_path}" || die
+ fi
+}
diff --git a/sys-apps/smartmontools/smartmontools-6.4.ebuild b/sys-apps/smartmontools/smartmontools-6.4.ebuild
new file mode 100644
index 000000000000..a9381a6c4d8c
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-6.4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps minimal selinux static"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ !minimal? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ #./autogen.sh
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use minimal && einfo "Skipping the monitoring daemon for minimal build."
+ use static && append-ldflags -static
+ # The build installs /etc/init.d/smartd, but we clobber it
+ # in our src_install, so no need to manually delete it.
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-initscriptdir="${EPREFIX}/etc/init.d" \
+ $(use_with caps libcap-ng) \
+ $(use_with selinux) \
+ $(systemd_with_unitdir)
+}
+
+src_install() {
+ if use minimal ; then
+ dosbin smartctl
+ doman smartctl.8
+ else
+ default
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+ fi
+}
diff --git a/sys-apps/smartmontools/smartmontools-6.5.ebuild b/sys-apps/smartmontools/smartmontools-6.5.ebuild
new file mode 100644
index 000000000000..dfe72e1dfdd6
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-6.5.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps minimal selinux static update_drivedb"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ !minimal? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use minimal && einfo "Skipping the monitoring daemon for minimal build."
+ use static && append-ldflags -static
+ # The build installs /etc/init.d/smartd, but we clobber it
+ # in our src_install, so no need to manually delete it.
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
+ $(systemd_with_unitdir)
+ $(use_with update_drivedb update-smart-drivedb)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ local db_path="/var/db/${PN}"
+
+ if use minimal ; then
+ dosbin smartctl
+ doman smartctl.8
+ else
+ default
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+
+ keepdir "${db_path}"
+ if use update_drivedb ; then
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}${db_path}/drivedb.h" "${T}" || die
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}/${PN}-update-drivedb"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The existing copy of the drive database has been replaced with the version that"
+ ewarn "was shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by: "
+
+ if ! use update_drivedb ; then
+ ewarn "re-merging ${PN} with USE='update_drivedb', then"
+ fi
+ ewarn "running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ if use update_drivedb ; then
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h "${db_path}" || die
+ fi
+ fi
+}
diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild b/sys-apps/smartmontools/smartmontools-9999.ebuild
new file mode 100644
index 000000000000..dfe72e1dfdd6
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-9999.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps minimal selinux static update_drivedb"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ !minimal? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use minimal && einfo "Skipping the monitoring daemon for minimal build."
+ use static && append-ldflags -static
+ # The build installs /etc/init.d/smartd, but we clobber it
+ # in our src_install, so no need to manually delete it.
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
+ $(systemd_with_unitdir)
+ $(use_with update_drivedb update-smart-drivedb)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ local db_path="/var/db/${PN}"
+
+ if use minimal ; then
+ dosbin smartctl
+ doman smartctl.8
+ else
+ default
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+
+ keepdir "${db_path}"
+ if use update_drivedb ; then
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}${db_path}/drivedb.h" "${T}" || die
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}/${PN}-update-drivedb"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The existing copy of the drive database has been replaced with the version that"
+ ewarn "was shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by: "
+
+ if ! use update_drivedb ; then
+ ewarn "re-merging ${PN} with USE='update_drivedb', then"
+ fi
+ ewarn "running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ if use update_drivedb ; then
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h "${db_path}" || die
+ fi
+ fi
+}
diff --git a/sys-apps/sparc-utils/Manifest b/sys-apps/sparc-utils/Manifest
new file mode 100644
index 000000000000..184648e7f049
--- /dev/null
+++ b/sys-apps/sparc-utils/Manifest
@@ -0,0 +1,7 @@
+AUX audioctl.init 455 SHA256 30339ccd0fcdcaa4e00c7e1484eeeae4a4dea442a3bc753c0ebcfdcae90ca307 SHA512 6ae87679c9e51876551babfaa35126a7ae94c15edc21c630154130652a1f9f754c489c5406c9c3166157a45495d05668bb06bce79ab34053a0b74c34b19c16a5 WHIRLPOOL ab15970ff77858f9b4ef43613ccfe25edfe2804478393d92752df7f8cf1c4c749956786ea56d8b7e37f3dc4b42e92b186f411e0202d244b1314fe9189d4f5d00
+DIST sparc-utils_1.9-3.diff.gz 10337 SHA256 f4ffae1a89fc816689da1ad2b50e776bbc079cf2212a0e539949e8a04c5ed983 SHA512 c6eba75261ffee55cc49e3da71ad3a2f12e04574158975c69db0bbd94d7c22ca4dec50f3140cf0bf9f35bb547865deca3cfd3e28e76c70b9173926bc0b8f34ee WHIRLPOOL 7e88535cfe5fc3a34280fda15ae3164014f600ca76b195687c69dc986b28e0f53c9abdcfa04f1f5da971eea235de873aaf485195f9a166e40ef264152e9230cd
+DIST sparc-utils_1.9.orig.tar.gz 110080 SHA256 b652bc27f95dcf10a7626b1d2943a1084e1e0b7f9bd3a97f9a46b6688370fe4b SHA512 bde05f1a98211aaf502be6dfd757ddfb21c136cedbb46ca84a4539706c71901815c9d8bedfebc3800c7340634b32276197c75f92f9cc829e4f50c37d203e9358 WHIRLPOOL 6860f34f7a5bf3fc679565ebf0e9bc2bc9816b2af4f21c86553bfe19b9ccc846487ad23ce3e936e4c8d59adb27fd1a946c69456faa43f132cd1953e2bd44fe81
+EBUILD sparc-utils-1.9-r4.ebuild 2304 SHA256 a12b7403159293b8807238d57d7ffdbbde205f761ae1f86ea41b07e861101beb SHA512 8d72473fb064d0a2c2fc5e4334d23f2af904fa9d7ff4c406193d9dd2f45c4728ed696bc842c6a558958623a5bf89109b37ce25ad7d071d16036ce17807390166 WHIRLPOOL be1433496c0deba259ce0baf67cb35cc35583496cc7351a2d6f703979786a3124a274e05158bbfa105b198a1429333c9e3dd57226a94e15efca4d9d0c9553086
+MISC ChangeLog 2593 SHA256 88e6b442d275fee2697027447785c9e0119a29a2297591b15b880d136f2b5f6e SHA512 4c003a732ba5a9192c576ab4bf52475207a25b47e1e6635d8288e294a2a46e1b8a4f7f249113a56054b3e6f6ee8f1d54a7b8813d621278fac44638309b728687 WHIRLPOOL bbf162e8b51873a5c585309fe39fecdd9a2265ab30e8f097fae7136ce91986a2acc05e61d96912dd62791f42d9e5989d844f40f143d0b88194eddb866d6af8be
+MISC ChangeLog-2015 3755 SHA256 218323fe5933a5459fcfc95723752349ab7a469f5240949dd849a57fcf2719fd SHA512 b7a2f49948267d98b791d94fb0900ec115c010b6bed7faacb2a37ab65702cf75f64eb035d28626640ce3b2f233846c6129885e4b44dbf61ae611776c3c0c0ff3 WHIRLPOOL 632b30859877180a1437818884bad7a68c59c1e2d156cfaaeeb1bbde834cbef0050193f54199d0aaf37743cfd7dc34e95d1c62a4baa75c9bd172bbea026894c2
+MISC metadata.xml 416 SHA256 0d2c917d48ead3facf0ebc6f2b5aba96cb5bd4310571e2092c2e8c04477b1cb5 SHA512 c057eea9ea65b87cb366e802dd8962901024335a85b3ec53caa6c342c9e1a23e656dcadc2a70692e5e7ab55a0ac82637ef052699844f50061461a645613b688d WHIRLPOOL 45099c429a77e86b1e0a00ed4007eba6334357b585a34d17dea2ff297588c1661912eb1b677bb43c6a4bd4c25d0685d416acdf92ef59a5e92f3f643017b5e176
diff --git a/sys-apps/sparc-utils/files/audioctl.init b/sys-apps/sparc-utils/files/audioctl.init
new file mode 100644
index 000000000000..10383d56ae8a
--- /dev/null
+++ b/sys-apps/sparc-utils/files/audioctl.init
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ -z "${PARAMS}" ]
+ then
+ eerror "Please make sure that /etc/conf.d/audioctl has \$PARAMS set"
+ return 1
+ fi
+}
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting audioctl"
+ if [ -n "${DEVICE}" ]; then
+ /usr/bin/audioctl -f ${DEVICE} -nw ${PARAMS}
+ else
+ /usr/bin/audioctl -nw ${PARAMS}
+ fi
+ eend $?
+}
diff --git a/sys-apps/sparc-utils/metadata.xml b/sys-apps/sparc-utils/metadata.xml
new file mode 100644
index 000000000000..7847744ddeea
--- /dev/null
+++ b/sys-apps/sparc-utils/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 type="project">
+ <email>sparc@gentoo.org</email>
+ <name>Sparc Team</name>
+</maintainer>
+<longdescription>
+sparc-utils is a set of utilities from Debian GNU/Linux that includes;
+audioctl, elftoaout, piggyback, piggyback64, prtconf, and eeprom.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild b/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild
new file mode 100644
index 000000000000..f19f07a176b4
--- /dev/null
+++ b/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Various sparc utilities from Debian GNU/Linux"
+HOMEPAGE="http://packages.debian.org/sparc-utils"
+SRC_URI="mirror://debian/pool/main/s/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/s/${PN}/${PN}_${PV}-3.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* sparc"
+IUSE=""
+
+DEPEND="virtual/os-headers"
+RDEPEND="|| ( >=sys-apps/util-linux-2.13-r1 sys-apps/setarch )"
+
+S=${WORKDIR}/${P}.orig
+
+# NOTE: If a system has >=sys-kernel/linux-headers-2.6.0, don't build audioctl
+# as the SPARC sound drivers have been replaced by their ALSA equivalents
+
+pkg_setup() {
+ has_version '>=sys-kernel/linux-headers-2.6.0' && \
+ einfo "Linux 2.6 kernel headers detected, not building audioctl"
+}
+
+src_unpack() {
+ unpack ${A}
+ epatch "${WORKDIR}/${PN}_${PV}-3.diff"
+ sed -i -e 's:#include <linux/elf.h>:#include <elf.h>:' \
+ ${S}/elftoaout*/elftoaout.c
+}
+
+src_compile() {
+ emake -C elftoaout-2.3 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die
+ emake -C src piggyback piggyback64 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die
+ emake -C prtconf-1.3 CC="$(tc-getCC)" all || die
+ has_version '>=sys-kernel/linux-headers-2.6.0' || \
+ emake -C audioctl-1.3 CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ # since the debian/piggyback64.1 manpage is a pointer to the
+ # debian/piggyback.1 manpage, copy debian/piggyback.1 to
+ # debian/piggyback64.1
+
+ cp ${S}/debian/piggyback.1 ${S}/debian/piggyback64.1
+
+ dobin elftoaout-2.3/elftoaout || die
+ dobin src/piggyback || die
+ dobin src/piggyback64 || die
+ dosbin prtconf-1.3/prtconf || die
+ dosbin prtconf-1.3/eeprom || die
+
+ if ! has_version '>=sys-kernel/linux-headers-2.6.0'; then
+ dobin audioctl-1.3/audioctl || die
+ newinitd "${FILESDIR}"/audioctl.init audioctl || die
+ newconfd debian/audioctl.def audioctl || die
+ doman audioctl-1.3/audioctl.1
+ fi
+
+ doman elftoaout-2.3/elftoaout.1
+ doman prtconf-1.3/prtconf.8
+ doman prtconf-1.3/eeprom.8
+ doman debian/piggyback.1
+ doman debian/piggyback64.1
+}
+
+pkg_postinst() {
+ ewarn "In order to have /usr/sbin/eeprom, make sure you build /dev/openprom"
+ ewarn "device support (CONFIG_SUN_OPENPROMIO) into the kernel, or as a"
+ ewarn "module (and that the module is loaded)."
+}
diff --git a/sys-apps/spu-tools/Manifest b/sys-apps/spu-tools/Manifest
new file mode 100644
index 000000000000..caf409514886
--- /dev/null
+++ b/sys-apps/spu-tools/Manifest
@@ -0,0 +1,7 @@
+AUX spu-tools-2.3.0.136-buildsystem.patch 983 SHA256 eb0b57a5355d36411819c2e1abace58b4c3206449855111cbc05c76ddedebfe0 SHA512 093f9c881a8b60d027d24ceb1b120d7f2d475a688dff82df3418b115b613218555e885067cc67e8bd1ebd3b66024d1b6ff6b51d8d2ea73f3244dc2339a5e805f WHIRLPOOL 9e4af644f68fe214c0cac74f71a735362c6a0f7310224d1b607fdd179b9c65b9a4202fb1cf705d583838a1b9b644970b98098b4418085e77b27864897f9880a4
+AUX spu-tools-2.3.0.136-format-security.patch 431 SHA256 f6ee487909a57a95a30bfdf95b6d973bfa0dcb3ca47ab5a15a26ce07e465ea77 SHA512 33ea0520587668e10876e3ce62f14cc0b751e69b1f4816456a0cdd4cfdfd542f9b3896ae80f6ba095eccb087253c10a924fac18cdc66a5f7cb88bb83bffdf488 WHIRLPOOL 8c7444594b9c6eb06b05e8440c08ca8029ef85a92035e20c1d61b616e77eabeb590aeea3357e74a6f379ee0b8ee50271debf53c9eaad1fba6f29304873b6370b
+DIST spu-tools-2.3.0.136.tar.gz 21981 SHA256 3b20bb66d42e77757390c62fe13ba6e57397f64c6c8688ae0dcfc901805642c4 SHA512 d25ef8fda067ee98eb698859c21f497ae1a09a6d791c0c2063957beb022b2f2946f9df7e78907b4d3b2f71021fa3c2f76012db7154faaee5be3285a0224c7612 WHIRLPOOL 6cd2b674d6c5e4c8ae9f1af75cdb46be2688bf8a5b441c93a3e66e4e0500746799a910eef396bec17fefd9453dd6961d23607f84017c7d25e5113ee13dd486c1
+EBUILD spu-tools-2.3.0.136.ebuild 744 SHA256 11436af02ef552a397bb5584fd36d02c421be9eb55d301ad8f5ff7e90019ff31 SHA512 ca89359550b69857cc32cdada73d34a821ab8c6cd1ee5edb874acaa7102ff935fd3d5a38ed02fd0542ff9d144fbc5319665445ff2bbc0352bd32bdd85c55ab2e WHIRLPOOL e87beaf2540b904c138ca9d3cb5eeb07d69247ce741bb3b54cd00c6da906a13fd236e8c08e67f5587c0c372b24a21888a4c520551ca6324e1b8f900d2ee12091
+MISC ChangeLog 3665 SHA256 d59cb821bc1e54c5ac831ef5c50c95c3921be807b4ce0532b784e2d0c40f9b4f SHA512 c4e6691cf599b1f1be0b4455660b5316e2a50a3f3110047b6e036d0d2ac0d8ac41a2f0d4bb7c8924ce3556dea2d5ad210dfa7bc50f006ec3cb0849fe57928249 WHIRLPOOL a9678baf7790e6ae73ecfacf41b68fe7278fb5aadce5772529fe563d831f6e69f8ecff8e2f0bf89b06685c9a99761524fd1fb4e9c3ac3b3e6da08f23669ec471
+MISC ChangeLog-2015 645 SHA256 93d7ee051e40802940f1c2da27206fac920c3900605e5025bd517f4ed9c6f402 SHA512 53b71e17f7b5da35ad43df72d985a9613bdd786e0039a3d446d975bc7a627b33c340fec89bb4607c185f424cd49f5aa95bf2a7e4851172d418f3ee07f29557bf WHIRLPOOL 7cb476ed6c80275ebb5ea025b4bb81d21730c2cd6accc6ce16872674f42c795bacab75512c89a5959b6859d445319a12bd6dcabf36a7e782ea7c794b9159cab9
+MISC metadata.xml 294 SHA256 9009317e3a2291c4f217c7d5d6ab6c1c33e4344ddf989f48cd70ef45608b9370 SHA512 f27b273f7396a60b20a0a8ddbec4a93b8b87730b00a190913a561f3f767248bb0dd0956c24f93ecb6f6423cc9fd3413f20ebe47f6b3cf2b94a900605482ca62e WHIRLPOOL 5b570d026d199a31123d11f0aa4d123cab43d7f883772f615cb56419232149a11babe3c0242fb9d6dce08b94d7ac627a00e67ea0bbd94f1637dbd1d7364b0291
diff --git a/sys-apps/spu-tools/files/spu-tools-2.3.0.136-buildsystem.patch b/sys-apps/spu-tools/files/spu-tools-2.3.0.136-buildsystem.patch
new file mode 100644
index 000000000000..0d1e25ec9659
--- /dev/null
+++ b/sys-apps/spu-tools/files/spu-tools-2.3.0.136-buildsystem.patch
@@ -0,0 +1,32 @@
+ Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9c4b69b..cf8958d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,9 @@
+ ARCHIV := spu-tools.tar.gz
+
+-CC = gcc
+-CFLAGS = -g -Wall
++CC ?= gcc
++CFLAGS ?= -g -Wall
+ PREFIX = $(DESTDIR)/usr
++LIBS ?= -lncurses
+
+ objs = ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o spu-ps.o
+ target = spu-top spu-ps
+@@ -16,10 +17,10 @@ spu-top.o: spu-top.c spu-tools.h
+ spu-ps.o: spu-ps.c spu-tools.h
+
+ spu-top: ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o
+- $(CC) $(CFLAGS) -lncurses ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o -o spu-top
++ $(CC) $(CFLAGS) $(LDFLAGS) ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o -o spu-top $(LIBS)
+
+ spu-ps: ctx-info.o spu-ps.o
+- $(CC) $(CFLAGS) ctx-info.o spu-ps.o -o spu-ps
++ $(CC) $(CFLAGS) $(LDFLAGS) ctx-info.o spu-ps.o -o spu-ps
+
+ clean:
+ @rm -Rf *.o *~ $(objs) $(target) spu-top.1 spu-ps.1
diff --git a/sys-apps/spu-tools/files/spu-tools-2.3.0.136-format-security.patch b/sys-apps/spu-tools/files/spu-tools-2.3.0.136-format-security.patch
new file mode 100644
index 000000000000..c039e2674e78
--- /dev/null
+++ b/sys-apps/spu-tools/files/spu-tools-2.3.0.136-format-security.patch
@@ -0,0 +1,16 @@
+ spu-ps.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spu-ps.c b/spu-ps.c
+index 8e0d667..e4e6ac0 100644
+--- a/spu-ps.c
++++ b/spu-ps.c
+@@ -59,7 +59,7 @@ static void dump_ctxs_or_spus(void **ctxs_or_spus, struct field *fields)
+ chars += print_ctx_field((struct ctx *)ctxs_or_spus[i],
+ buf+chars, fields[j].id, fields[j].format);
+ }
+- printf(buf);
++ printf("%s", buf);
+ printf("\n");
+ i++;
+ }
diff --git a/sys-apps/spu-tools/metadata.xml b/sys-apps/spu-tools/metadata.xml
new file mode 100644
index 000000000000..118d82b0c46f
--- /dev/null
+++ b/sys-apps/spu-tools/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 type="person">
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libspe</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/spu-tools/spu-tools-2.3.0.136.ebuild b/sys-apps/spu-tools/spu-tools-2.3.0.136.ebuild
new file mode 100644
index 000000000000..63f188280172
--- /dev/null
+++ b/sys-apps/spu-tools/spu-tools-2.3.0.136.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_P=${P/_p/-}
+
+DESCRIPTION="CELL spu ps and top alike utilities"
+HOMEPAGE="https://sourceforge.net/projects/libspe"
+SRC_URI="mirror://sourceforge/libspe/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="ppc ppc64"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+"
+DEPEND="
+ ${RDEPEND}
+ sys-apps/help2man
+"
+
+S="${WORKDIR}/${PN}/src"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-buildsystem.patch \
+ "${FILESDIR}"/${P}-format-security.patch
+ tc-export CC
+ append-cppflags -std=gnu89
+ export CFLAGS="${CFLAGS}"
+ export LDFLAGS="${LDFLAGS}"
+ export LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)"
+}
diff --git a/sys-apps/stroke/Manifest b/sys-apps/stroke/Manifest
new file mode 100644
index 000000000000..a1e3c56252fe
--- /dev/null
+++ b/sys-apps/stroke/Manifest
@@ -0,0 +1,5 @@
+DIST stroke-0.1.3.tar.gz 180438 SHA256 3c96fee2272fe37900d3f7c8cd2373170b47bc6856f0052d43d5793b6a680a05 SHA512 b500f9c158a66f5947a28bf3dbb7caddd20427b4c9bdc2849002995f830019d54a3f0e070e973a0a6475f755ffc14a2995c7c8736c355cf4ae06b22beb07897e WHIRLPOOL 927bffd3e78969b5d3947776373da32472e9bc46db1a9849db26f40e0e9b4e892aaa774625fea031653a7e6db48f97b6fa0232ffb9bcf037d6eeff30df494e4a
+EBUILD stroke-0.1.3-r1.ebuild 379 SHA256 608293b88c5c4c7b1c27a068fb68518d24e3d300151a0caafbe57a90edc4e6a6 SHA512 46604277ed1e5cec1f53c6b374cf583e309c7a592e2ef5be638fa1f6d4760fdad9964fdb4fe26c0d11cf4e550e22006b89a4e324c0e945e72e952f6cccd56d34 WHIRLPOOL c775accac25655ff6fdc63c6fd229a22dc812f7527f37662d782442b78b7610755808aa403eb78a82383255cf54a76e55ec8a544028b6f4bdb7c28579a331b2c
+MISC ChangeLog 2463 SHA256 323e4d61dd91a75737e7a9c4bc91ca73824d1417e948e460289e9d1f102677c7 SHA512 1dc7f55c134adbafad16484b44645edfd30523c2c7d087c7738777fb169d602bc1eaa0225ad432d4dc8be6ccd5daf1b9ec2f14e983b8239b8d14482f529eeb65 WHIRLPOOL d61e1b9c3f425890fe8fe7b7f93d9c78c031d0d5762223649317fbb5a19fefc29a4ef231bea632655b4a677ba577a12feb5076ebfd2268c9b22d972f967c2aa8
+MISC ChangeLog-2015 406 SHA256 cf64498a6d3a79ba459b8b1eef01a70651cc3f8c5f5286f5755f089edf0940d8 SHA512 176bcb320f5d9385c2bea1353a8b7ccc9f43a6dcc8ff3021bb833e10b6c9f84ebad4ac847fee6a69354149e724b22a3f232a4ea33b21a1a6ae2f6760b3ea820b WHIRLPOOL 74a991775e3cf20e26467a5977f733c0c00d9c253cda0fa390fcbfce1d2a9810d23b96f7efa2b2c2f2d7c7f4264c832b501ae85cb0c42c02c328b9ff311cdf41
+MISC metadata.xml 326 SHA256 44d44d8bdbcfc1bcd3f7525219c7aa9403a6205ca8a6aa7bafb05b27dec8bdd2 SHA512 8cbeca575b8dc687b4f41464f1a77dc54e5ed25c94ed5131023f22633bdeec18eadec2d0185cb1486e816b5a24e847a17332fcb695d56bec3361f453d8d7b8af WHIRLPOOL 22162e24f949fea119410e742480b4753b262467c125c81afc0223d6de1684b46202569efe198bb90592476a22e04d7de2c6a2411a6e7a329bffa64b3e27cdfe
diff --git a/sys-apps/stroke/metadata.xml b/sys-apps/stroke/metadata.xml
new file mode 100644
index 000000000000..63d64a20108f
--- /dev/null
+++ b/sys-apps/stroke/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 type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">stroke</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/stroke/stroke-0.1.3-r1.ebuild b/sys-apps/stroke/stroke-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..0014e6548605
--- /dev/null
+++ b/sys-apps/stroke/stroke-0.1.3-r1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A powerful tool to change file timestamps (including ctimes)"
+HOMEPAGE="http://stroke.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS=( AUTHORS ChangeLog README TODO )
diff --git a/sys-apps/superiotool/Manifest b/sys-apps/superiotool/Manifest
new file mode 100644
index 000000000000..7d77ea082172
--- /dev/null
+++ b/sys-apps/superiotool/Manifest
@@ -0,0 +1,7 @@
+AUX make-tarball.sh 671 SHA256 ee2fe95929d7ff12b9aa2c61bc4b73497bfac4be754aa7a573f024a0bbf21b68 SHA512 7f3efac359f6da1521b26da4e57efbe7333f2841335ced85452c2a6a7575d0506c5fa3f3062b2e07b85db4c35194c3ea4dd3755d71b236f601776e4e3c471b5c WHIRLPOOL 80eb830afe5329ccdaf8c6816bc87dcb259afaf57f78d03701567d788e044b2598bf960bca31c19f008c653cd38164fabd286758142e44d2d9fd339df2b0059f
+DIST superiotool-6637.tar.xz 27364 SHA256 e21e091c7679c2eeac66aa49499c02587d64a41b3b36449f4ec06dafc8f0ba21 SHA512 dafb732b33205d1bdd368c1f752c7ba78cfb9f6174fc72075b9e8dcae962ab9ef10eb0860052a5925167b91e5b056f6b8a4a316799661d3950a630020f4330fd WHIRLPOOL 70ee5da7946cd93d978db2094dee1466a91239db96f640e5e2b7aa6d9487ccc43229e570bd084dcd6ef27353752059dfaa6fdf5b414d4eadf657549d0998bf39
+EBUILD superiotool-6637.ebuild 945 SHA256 924bf7e9beeb5812c9a57ae852f9c8632c4491e2fcebb873bc893f09c9af1163 SHA512 36377d290c33c7003e8ab961a2f51d40d35220a326728dab6cda0c91d51507ef60f50c88bcbd27ba2534b661cf4b8004debf47c7ac4edfe1bdc55ce2bdaf09ae WHIRLPOOL 9ce2beaaa6719905b04845d05f98aa67ab5674427fb2f5f13cce268716bb94923b6499a05e84bfab380e1fd14b961cba774f4b184e9ea39997bfc791048f5052
+EBUILD superiotool-99999999.ebuild 945 SHA256 924bf7e9beeb5812c9a57ae852f9c8632c4491e2fcebb873bc893f09c9af1163 SHA512 36377d290c33c7003e8ab961a2f51d40d35220a326728dab6cda0c91d51507ef60f50c88bcbd27ba2534b661cf4b8004debf47c7ac4edfe1bdc55ce2bdaf09ae WHIRLPOOL 9ce2beaaa6719905b04845d05f98aa67ab5674427fb2f5f13cce268716bb94923b6499a05e84bfab380e1fd14b961cba774f4b184e9ea39997bfc791048f5052
+MISC ChangeLog 2276 SHA256 09dcb150ca1e6a3b758dfeeda7d90256ca02806e5971b1d5568f02441a4df912 SHA512 783f09c602e7b61278bd9d5fd90ce5f11c600ab327b39f746e8b1865948d21e34580c7a131f1633387912134db4fa9da3a27ca903a6d49210736b53726da2444 WHIRLPOOL 4e595f24136705b685e8f216fde2303fa083c59ce46155457b81d46dd811b75ead7d1f46efb36b58020042bc96e258233ed346fc0986b2336f71740b0eb5b727
+MISC ChangeLog-2015 1011 SHA256 e10d25cfe8dad3ba6e28187e3f440e95274ed6b45dae32f1a2679e1fee721c11 SHA512 4cff0c33ecbc0df3d7d0bfc63428d93eb916cff5cecc4c962f5f99f7ffc9e8645ffb5ca14225e7d159d76a0fc1c432b69f930fc0a5663fde49f590bca58479bc WHIRLPOOL ea96afa853c576e1073a0366d47edea0b2b02ea0f7cc316d75306035b6fa33f6f51341903a5f71517c8fff758e45b6f78764b08686259a49209bd50810db033b
+MISC metadata.xml 322 SHA256 8d53ae5d7a4a77bf08ed70a88802b0bee1d70d291fca2f611a7d095f2370c61d SHA512 b10b11adf9b11f1a01a62a9968a99ced6a5b5744ca65967e0d0cea6d30ff0b84a8b84c720eb0362f4963d42daebc9fbe6e2540d9c972f48561a29f3efb27ca43 WHIRLPOOL 6f54ef00b58aec24e00177b8013d93fffd98239e5ebed317fef0ca0af979d2c55cb0c38833e6607d1fb08afdf8ea2a53b4c91ca991806f2b0cd5faa52ea4c8fd
diff --git a/sys-apps/superiotool/files/make-tarball.sh b/sys-apps/superiotool/files/make-tarball.sh
new file mode 100755
index 000000000000..3711db140db3
--- /dev/null
+++ b/sys-apps/superiotool/files/make-tarball.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/init.d/functions.sh
+
+svnrev() { svn info "$1" | awk '$1 == "Revision:" { print $NF }'; }
+
+PN=superiotool
+SVN_ROOT=${2:-/usr/local/src}
+srcdir=${SVN_ROOT}/${PN}
+PV=${1:-$(svnrev "${srcdir}")}
+
+P=${PN}-${PV}
+T=/tmp
+
+if [[ -d ${srcdir} ]] ; then
+ cd "${T}" || die
+
+ rm -rf ${P}
+
+ ebegin "Exporting ${srcdir} ${PV} to ${P}"
+ svn export -q -r ${PV} ${srcdir} ${P}
+ eend $? || die
+
+ ebegin "Creating ${P}.tar.xz"
+ tar cf - ${P} | xz > ${P}.tar.xz
+ eend $?
+
+ einfo "Tarball now ready at: ${T}/${P}.tar.xz"
+else
+ einfo "You need to run:"
+ einfo " cd ${base}"
+ einfo " svn co svn://coreboot.org/coreboot/trunk/util/superiotool"
+ die "need svn checkout dir"
+fi
diff --git a/sys-apps/superiotool/metadata.xml b/sys-apps/superiotool/metadata.xml
new file mode 100644
index 000000000000..27a49c3348c6
--- /dev/null
+++ b/sys-apps/superiotool/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 type="person">
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="pci">Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/superiotool/superiotool-6637.ebuild b/sys-apps/superiotool/superiotool-6637.ebuild
new file mode 100644
index 000000000000..9cd57fadcfca
--- /dev/null
+++ b/sys-apps/superiotool/superiotool-6637.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+if [[ ${PV} == "99999999" ]] ; then
+ ESVN_REPO_URI="svn://coreboot.org/coreboot/trunk/util/${PN}"
+ inherit subversion
+ SRC_URI=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="util to detect Super I/O chips and functionality"
+HOMEPAGE="http://www.coreboot.org/Superiotool"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="pci"
+
+RDEPEND="pci? ( sys-apps/pciutils )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ sed -i \
+ -e 's:-Werror ::' \
+ -e 's:-O2 ::' \
+ -e 's:\s\+\?-lz\s\+\?::' \
+ -e "/^CONFIG_PCI =/s:=.*:=$(usex pci yes no):" \
+ -e '/PREFIX/s:=.*:= /usr:' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ SVNDEF="-D'SUPERIOTOOL_VERSION=\"${ESVN_WC_REVISION}\"'"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc README
+}
diff --git a/sys-apps/superiotool/superiotool-99999999.ebuild b/sys-apps/superiotool/superiotool-99999999.ebuild
new file mode 100644
index 000000000000..9cd57fadcfca
--- /dev/null
+++ b/sys-apps/superiotool/superiotool-99999999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+if [[ ${PV} == "99999999" ]] ; then
+ ESVN_REPO_URI="svn://coreboot.org/coreboot/trunk/util/${PN}"
+ inherit subversion
+ SRC_URI=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="util to detect Super I/O chips and functionality"
+HOMEPAGE="http://www.coreboot.org/Superiotool"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="pci"
+
+RDEPEND="pci? ( sys-apps/pciutils )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ sed -i \
+ -e 's:-Werror ::' \
+ -e 's:-O2 ::' \
+ -e 's:\s\+\?-lz\s\+\?::' \
+ -e "/^CONFIG_PCI =/s:=.*:=$(usex pci yes no):" \
+ -e '/PREFIX/s:=.*:= /usr:' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ SVNDEF="-D'SUPERIOTOOL_VERSION=\"${ESVN_WC_REVISION}\"'"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc README
+}
diff --git a/sys-apps/sydbox/Manifest b/sys-apps/sydbox/Manifest
new file mode 100644
index 000000000000..dd3f58c7ee25
--- /dev/null
+++ b/sys-apps/sydbox/Manifest
@@ -0,0 +1,3 @@
+DIST sydbox-1.0.7.tar.bz2 480350 SHA256 d8869d15f9631e16691f355667eee128bb041db4088fd6588c4f0e09685b2a92 SHA512 b14d0cc6929aa705380dc2710e772054e07ca52c2990a71cac42d1111c90baf22253e168e1fe20eaf94ccde4d1ea1a3c1c26e4b9dd292f20a1028dc78a4e80d5 WHIRLPOOL eca7f45e72494bb8fa81c49af0758ab7e97d19d07d870507adaf50088fe7998f37e6e8974fd6592f7f7a6b0262b09f5cdaa9e09f43b9d7b314e233ed765028cf
+EBUILD sydbox-1.0.7.ebuild 638 SHA256 27c85ee2ee4257be366620aea6d3462e22f7f714da0ba125aabeb14396bebec5 SHA512 60e9eea0b2e7975528a2f5740e76622a14e09f73524a76f809450f54de16f3080c28257b38661a9e7ecdb4da0d64176fb55d8cef528f17eec472db55aa439dfa WHIRLPOOL a445e1d9cba83e4155228b89c65f359377a82e1d743f3584d89380fa24deeee139faa22039f29c60a28f1dbcb84102e6e6a92d108e66f572f3cd796fc88b34c0
+MISC metadata.xml 247 SHA256 34d6ed4186bad4ac57e0b4c08b657b14e28852a83c4ccf4d8a62f7829063b1cf SHA512 d6e2ea8a9d74791bcbf3d6311a66bafc20b8f4db3a576d9a8d54b86d7afb231122b8d87f71f3f46360980adf8d815c633b6d5041f9a30fc8656e8fb66057a282 WHIRLPOOL fbd18b3e6e3d777e8d78e91b8d32c5e357fd2a1c754d2c9add4622be682521e59556f466cba397d913f0e63265202744ceaf76dc7823be0a172a9bf4da6a2579
diff --git a/sys-apps/sydbox/metadata.xml b/sys-apps/sydbox/metadata.xml
new file mode 100644
index 000000000000..0319eec4c8be
--- /dev/null
+++ b/sys-apps/sydbox/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/sydbox/sydbox-1.0.7.ebuild b/sys-apps/sydbox/sydbox-1.0.7.ebuild
new file mode 100644
index 000000000000..660422f3a516
--- /dev/null
+++ b/sys-apps/sydbox/sydbox-1.0.7.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="ptrace-based sandbox"
+HOMEPAGE="https://git.exherbo.org/sydbox-1.git"
+SRC_URI="http://distfiles.exherbo.org/distfiles/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug seccomp test"
+
+RDEPEND="sys-libs/pinktrace:=
+ debug? ( sys-libs/libunwind:= )"
+DEPEND="${RDEPEND}
+ test? ( app-portage/unsandbox )"
+
+src_configure() {
+ local myconf=(
+ $(use_enable debug)
+ $(use_enable seccomp)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # two sandboxes are never a good idea ;-)
+ unsandbox emake check
+}
diff --git a/sys-apps/syscriptor/Manifest b/sys-apps/syscriptor/Manifest
new file mode 100644
index 000000000000..9415edb0bd3a
--- /dev/null
+++ b/sys-apps/syscriptor/Manifest
@@ -0,0 +1,5 @@
+DIST syscriptor-1.5.15.tar.bz2 58732 SHA256 74c8bedc473e3b55171b6e2fdc4ed694983fdfa36a213c1356f6ad49872b62ef SHA512 12fadc8bee58b8001f805383f0bab5ca4999f5d463eb69ec15486aeb2eb407671d2a4007f017e35df450f3616c4e1096bc86b34413485bae4ca6a9460e9056bd WHIRLPOOL 43af7a5c4a92065407dae68827be261f97c21e70b2daba69729d5f299f55bb94bfebd8d597c5761cb12d434183529cdcad07a6f662376770beafdff4056909f0
+EBUILD syscriptor-1.5.15.ebuild 464 SHA256 e2f0dce677a0d679f725debbd2533752375e94a49493676ee74200d9f3bfce18 SHA512 8cd3b54c5adc05ec58c9958e4087d866a6598efecd49cc3bfd1451afa0d1629e3057011c1d0a72329c57ab8e3b51f3b46141246fe803bb49f234d230d135b742 WHIRLPOOL 01cdc6088ddba88489fd0b42f76d54467e1a5d8e5345d20829260bd4f69e37e75295bb4443f7ddf007a30c220e862efc5f5dda11e7cdedfb659bf6fc9280a332
+MISC ChangeLog 2937 SHA256 c2d6af65f3c85f6af4980f1a281010ba2190868d517eec33ab0338d7571261e2 SHA512 48539e24baed266e8a2b0ce0a2cee32a0e7cc5b519eef63c3a96c01088b07b0d14109cbb1453333a1a1fbc1096c323926c2b8414e4e2018e0dbe7c5a12e1dcd7 WHIRLPOOL 7ef71849ab9d4df8641f7766afd0c640e5fa86143b9dd696b1ff26dc3e69b515c53719d193dbf6c0f6bdaa3f6c9e6e012e7bb70f63585765eeaa3989261a3692
+MISC ChangeLog-2015 1715 SHA256 9e03935d53dc992de26ead0e3a38dff80d312825efd3f1471ff4b49e57f86221 SHA512 d736ea28f714ada968f830eeeaaf85943b66ac14f93619beb635042d77d6757883d2ef7b9e7e793b966bebc01976185902141f296a93890a0f563336f99be292 WHIRLPOOL 8cc9d1ee223cd66906d95a43628ca3d8fadcbe31e5e9e7cfb9fee20061e51b6f6e604349ebf6a4f433097389670222aafd32b53ed3dbaf38e4d1878620e910e3
+MISC metadata.xml 330 SHA256 ac4e9b23337fed80b74a10a4e52b4d97ac1867e1277594ebe301e20023f08d2a SHA512 746cc86310142135f45c241de444d7fe4c47e0d36d08c52bbe7bd6c60d391c28b3f299cbd58f0fc65751aff6bdb3077d7d2880e9e2380b7cf2142a2ba91abbe6 WHIRLPOOL b196f609208af241fbc6726878f45660779ed4bb7d87fc6b4017210baf83d796dfa1750ba6b06d2509920729c5d639971d3f3eadc9abfa04af510d5d999a19bb
diff --git a/sys-apps/syscriptor/metadata.xml b/sys-apps/syscriptor/metadata.xml
new file mode 100644
index 000000000000..87ecc347b577
--- /dev/null
+++ b/sys-apps/syscriptor/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">syscriptor</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/syscriptor/syscriptor-1.5.15.ebuild b/sys-apps/syscriptor/syscriptor-1.5.15.ebuild
new file mode 100644
index 000000000000..eeba6012f3e6
--- /dev/null
+++ b/sys-apps/syscriptor/syscriptor-1.5.15.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="display misc information about your hardware"
+HOMEPAGE="http://syscriptor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_install () {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS CREDITS ChangeLog HISTORY NEWS README TODO
+}
diff --git a/sys-apps/syslog-notify/Manifest b/sys-apps/syslog-notify/Manifest
new file mode 100644
index 000000000000..bb1db4315c23
--- /dev/null
+++ b/sys-apps/syslog-notify/Manifest
@@ -0,0 +1,5 @@
+DIST syslog-notify-0.2.tar.bz2 77178 SHA256 d554e1cd5c5e5399e313674e8f296185cd2f33877d4b2b63a4e4a57ce27fa159 SHA512 724696d9ecfe34ebea5cd37d122b1151a376fc57d747b4f3bf35ab897a9afddd5565dd174c9c576ba10c8441cd57cdf48141d0dab5b35c5ab27e766d10d27b6b WHIRLPOOL eeefd92ffd7f22debeea1591509d1b74dbba0a782df4c7b731d17b6a9a6e5283a28a3c060dd474ee30fd6fccfa85c94cfc6726679ccec3082d4f5e0bd3469721
+EBUILD syslog-notify-0.2.ebuild 966 SHA256 88ae238e0836949c3fc9ac9cd6655474022c04b0af52ddd148607afc5e30f14c SHA512 21716a3f7793e2ea71152ffd11aca06b1987cd1a833cf0ec73094ee26f0a6d42529cedfcdb482dad1f77dd67823681e81da84bf09940785356076c3f8c6a59a4 WHIRLPOOL bc35015d9c0c81b15d44af9e20c19e0ecda8bb3ba658122056901aeddae6940b9b82de773ecb6bcec25483c2c219606df327476531bf2ffae781e8bf5edab01a
+MISC ChangeLog 2814 SHA256 4253600d1fc213ab48222fb160bdcea6a1cd20c9e4d364c0ffd006495f9115f4 SHA512 dcf1a40b9e6eeca41c020a7d544ff4d760c2a0ee164d130bbc8c4ae36dd4f9ac689dc3decdb578964d4b7bfad722ea3487256b46a24edad31f8ad00f9292271a WHIRLPOOL 149635bee6ccf2f923a015284d5f53df8c07ab144cf9ab5e7c9a90bb0c9172490f92d45d801b5b6ebb794c0a88046bc640fe56da18b0cdc35df9ef994dc7791b
+MISC ChangeLog-2015 2043 SHA256 92f81adb9a25aefbecabe1c40822452c8707ea40fd63ef255fecc84bf244e9a2 SHA512 4f287f5a06d80b9a9dce85c66c497e4d8c3b2f0ebb6aae1558216b63cf2f1d4ce16eb649a85e2324feacfaf66580878c0830c598ebc1346476ed014a1bad3267 WHIRLPOOL 5b42491fa7bc73976445f7e273e9de638def6a9580f1d9f346eb625d935e24175ac1465503664f4e1b0a82d1b33dc9e5ffd4429e9efc8c17a0f448f95b0d6f84
+MISC metadata.xml 244 SHA256 218c89997b706a1af5ae06826d5c44f6cd3b1271deadac69bbbe897de31b22e2 SHA512 c0661c87a34d45258dc8236baf4e1fd4fcb3f418f4a6bb13670ae91141c7474ea8d423cb7df3c8f45cc4441e22783e6ceb807a84ccb8a75c574ea079f8a02117 WHIRLPOOL b1b2977b3b499a8169afe610ee2da26a72fa3d58f72e055fb9263c24ac0bec835e2c62685698fb6f712b7b7bbf48567adeacdf4e6eb244770a70632f64cec009
diff --git a/sys-apps/syslog-notify/metadata.xml b/sys-apps/syslog-notify/metadata.xml
new file mode 100644
index 000000000000..2028cee3c389
--- /dev/null
+++ b/sys-apps/syslog-notify/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/syslog-notify/syslog-notify-0.2.ebuild b/sys-apps/syslog-notify/syslog-notify-0.2.ebuild
new file mode 100644
index 000000000000..5f14dfa50ea5
--- /dev/null
+++ b/sys-apps/syslog-notify/syslog-notify-0.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit readme.gentoo
+
+DESCRIPTION="Notifications for syslog entries via libnotify"
+HOMEPAGE="https://jtniehof.github.com/syslog-notify/"
+SRC_URI="mirror://github/jtniehof/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=x11-libs/libnotify-0.7"
+RDEPEND="${DEPEND}
+ || ( app-admin/syslog-ng app-admin/rsyslog )"
+
+pkg_setup() {
+ DOCS="AUTHORS CHANGELOG HACKING README"
+ DISABLE_AUTOFORMATTING="yes"
+ DOC_CONTENTS="Add the following options on your /etc/syslog-ng/syslog-ng.conf
+file:
+# destination notify { pipe("/var/spool/syslog-notify"); };
+# log { source(src); destination(notify);};
+
+Remember to restart syslog-ng before starting syslog-notify."
+}
+
+src_install() {
+ default
+ dodir /var/spool
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ mkfifo "${EROOT}"/var/spool/syslog-notify
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/systemd-readahead/Manifest b/sys-apps/systemd-readahead/Manifest
new file mode 100644
index 000000000000..c52e279ff60d
--- /dev/null
+++ b/sys-apps/systemd-readahead/Manifest
@@ -0,0 +1,5 @@
+DIST systemd-216.tar.xz 3612960 SHA256 945d3db7d840d6ffe98aa68394428e13317161ae79905397faab6671619728f3 SHA512 f4eee6664368168eafd61939f1355ac21c7eeecce6247de98ef36f40bb6a942d12c006ced4ee15f3d8f11699c194990222d5a5115b45f2aa81f2a1abafebbdd2 WHIRLPOOL 505e09b55209a4f9d8cec077970571b2e1298e8db02946a6c79df139dece9d1a08e46c86ef6c8053274abfd46c9a5ea09157f5bc9dc1f7461322c596e84ef494
+EBUILD systemd-readahead-216.ebuild 4183 SHA256 336529b89b3992e9138afe5f543dace0c863ea986be053e60e11f73d82e41ada SHA512 c54289a199d7d448afdaa83cc2f341bff37544398bb062fe7f36a1a0a0b4054c89532f0d427d2cce9df6979706c401a0560dfd89e4158f404534a622a815dd11 WHIRLPOOL 0d5ac928ec69f58d1d664466d44505f4643b25159515fa8c52731ceeeeb5dd44d93e33c8f5f50f5808868ed299590b3020410aba4c0bd605d3c529f237a2a6dd
+MISC ChangeLog 3033 SHA256 e075c48a70faeea7e7aff920f696b02bf0df2ebc8533a334e6f963cf1924e6a3 SHA512 fbd75e7204eb31124f207a54492559b2e602e762ae43d44934a5e5d0afc93a83175b83c2f267f1944fc8ee44ac6e2243f9c78863ef26bf95d9c8cab22aa8b1e2 WHIRLPOOL 649f8f5c5f166924bdbfc33c648fa2c10355f420692fdce6abbd43b5537a731a8577f9add759cd58bb910e5978d82790a84637b9331ec7c62af53b8df4a75e6b
+MISC ChangeLog-2015 469 SHA256 c0b861226a2fd82476ff5473a54e775a16fee4783b3a31013622b0daaa96ebfe SHA512 6603b1bc3332d7fce063049ca1d0ccac9be4589e23d69a51005282bbaa75b3bdde2db1fa5b74e691046872e101d6a530a17fa045c9e485e5af7d21cce76ca4e7 WHIRLPOOL f0293c3e877295f7cf11482ffacdec0e50f7fce5bd1593a3b3c457b28edc6e44e6e1114b7b382d778c52d7da150270db019ff3bddfdccf08147a703854b9ba32
+MISC metadata.xml 243 SHA256 c2902f16dc6be36b40d0e76de3275bf3ccdea37d5f0522492f5f5a624b2e9285 SHA512 640630eb9d42c319ca1da37b03a03677a3dd4e48f28ce2690b64f6e4e7d5885cfda41d439f3f9d8b009be04891b043a5b0ac6f9d43b701f65c8fcc0e0613b04a WHIRLPOOL 2279bba195f44213fecf0414bb604a75ae7487b85697f97d4325054f67fdfce2809e751a39b6dc677e5e42a9cdb136409b846597841f2e759485e38e2c5a921a
diff --git a/sys-apps/systemd-readahead/metadata.xml b/sys-apps/systemd-readahead/metadata.xml
new file mode 100644
index 000000000000..3da97a9953cc
--- /dev/null
+++ b/sys-apps/systemd-readahead/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pacho@gentoo.org</email>
+ <name>Pacho Ramos</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/systemd-readahead/systemd-readahead-216.ebuild b/sys-apps/systemd-readahead/systemd-readahead-216.ebuild
new file mode 100644
index 000000000000..e29293a0a6cc
--- /dev/null
+++ b/sys-apps/systemd-readahead/systemd-readahead-216.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit systemd toolchain-funcs udev
+
+DESCRIPTION="Split of readahead systemd implementation"
+HOMEPAGE="https://dev.gentoo.org/~pacho/systemd-readahead.html"
+SRC_URI="https://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE=""
+
+S=${WORKDIR}/systemd-${PV}
+
+RDEPEND=">=sys-apps/systemd-217:="
+DEPEND="${RDEPEND}
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ >=sys-devel/binutils-2.23.1
+ >=sys-kernel/linux-headers-3.8
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # systemd-notify no longer supports readahead playing
+ sed -i -e 's:ExecStart=@SYSTEMD_NOTIFY@ --readahead=done:ExecStart=/bin/touch /run/systemd/readahead/done:' \
+ units/systemd-readahead-done.service.in || die
+}
+
+src_configure() {
+ # Keep using the one where the rules were installed.
+ MY_UDEVDIR=$(get_udevdir)
+ # Fix systems broken by bug #509454.
+ [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
+
+ local myeconfargs=(
+ # disable -flto since it is an optimization flag
+ # and makes distcc less effective
+ cc_cv_CFLAGS__flto=no
+
+ --enable-readahead
+
+ --disable-maintainer-mode
+ --localstatedir=/var
+ # make sure we get /bin:/sbin in $PATH
+ --enable-split-usr
+ # For testing.
+ --with-rootprefix="${ROOTPREFIX-/usr}"
+ --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
+ # disable sysv compatibility
+ --with-sysvinit-path=
+ --with-sysvrcnd-path=
+ # Disable most of the stuff
+ --disable-efi
+ --disable-ima
+ --disable-acl
+ --disable-apparmor
+ --disable-audit
+ --disable-libcryptsetup
+ --disable-libcurl
+ --disable-gtk-doc
+ --disable-elfutils
+ --disable-gcrypt
+ --disable-gudev
+ --disable-microhttpd
+ --disable-gnutls
+ --disable-libidn
+ --disable-introspection
+ --disable-kdbus
+ --disable-kmod
+ --disable-lz4
+ --disable-xz
+ --disable-pam
+ --disable-polkit
+ --without-python
+ --disable-python-devel
+ --disable-qrencode
+ --disable-seccomp
+ --disable-selinux
+ --disable-tests
+ --disable-dbus
+
+ --disable-smack
+ --disable-blkid
+ --disable-multi-seat-x
+ --disable-myhostname
+
+ # Disable optional binaries
+ --disable-backlight
+ --disable-binfmt
+ --disable-bootchart
+ --disable-coredump
+ --disable-firstboot
+ --disable-hostnamed
+ --disable-localed
+ --disable-logind
+ --disable-machined
+ --disable-networkd
+ --disable-quotacheck
+ --disable-randomseed
+ --disable-resolved
+ --disable-rfkill
+ --disable-sysusers
+ --disable-timedated
+ --disable-timesyncd
+ --disable-tmpfiles
+ --disable-vconsole
+
+ # not supported (avoid automagic deps in the future)
+ --disable-chkconfig
+
+ # dbus paths
+ --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
+ --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
+ --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
+ --with-dbusinterfacedir="${EPREFIX}/usr/share/dbus-1/interfaces"
+ )
+
+ # Work around bug 463846.
+ tc-export CC
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
+ emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
+
+ emake systemd-readahead
+ emake units/systemd-readahead-{drop,collect,replay,done}.service units/systemd-readahead-done.timer
+ emake man/{sd-readahead.3,sd_readahead.3,systemd-readahead-replay.service.8}
+}
+
+src_test() {
+ einfo "No specific tests for this"
+}
+
+src_install() {
+ # Install main app
+ exeinto /usr/lib/systemd/
+ doexe systemd-readahead
+
+ # Install unit files
+ systemd_dounit units/systemd-readahead-{drop,collect,replay,done}.service units/systemd-readahead-done.timer
+
+ # Install manpages and aliases
+ doman man/{sd-readahead.3,sd_readahead.3,systemd-readahead-replay.service.8}
+ newman man/systemd-readahead-replay.service.8 systemd-readahead-collect.service.8
+ newman man/systemd-readahead-replay.service.8 systemd-readahead-done.service.8
+ newman man/systemd-readahead-replay.service.8 systemd-readahead-done.timer.8
+ newman man/systemd-readahead-replay.service.8 systemd-readahead.8
+
+ # Install docs
+ dodoc TODO README
+}
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
new file mode 100644
index 000000000000..19650318f3f2
--- /dev/null
+++ b/sys-apps/systemd/Manifest
@@ -0,0 +1,27 @@
+AUX 218-Dont-enable-audit-by-default.patch 1027 SHA256 760365637ea7528623fa1685d454ecdbd2dbae29990062e0bb234a5e662b2123 SHA512 44e512d8bbadbc5714192896a3ba262e460af034846e4e9b9832b4143fff772e2734e655316fd88d1ef386509bd234c195dce2087348f220836b3bf4f26790e0 WHIRLPOOL 14c689ba78c7b4221657931fb909d9d37ab14078ade593986f1abaf643e82b5b0677dddd69134bdbf6e087b4f694d252d7cd6558c671d061a80f7dc3c99e5175
+AUX 228-noclean-tmp.patch 804 SHA256 6900f0cc8fa930d8cdbafbfc0e29e7454a1810723cc8bbc8bb4cc095676e6d38 SHA512 fc3297cb0ceacdab58cdbd5b6c70c6005312aaa790768f87eb637b8cb26be01ba7c2f5f608893689f0132ac35f19561bc0bc77e34d167f01bdfaea3644b56e71 WHIRLPOOL af6afd9cf051ab5dfc7576aceb78757b8672692bd74d08366a2902b9368aa0547098a7b4befa17aa2873e95961f4c0f5975334ae6db13fc35a3da6c52a831ca1
+AUX 233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch 14035 SHA256 7b955940e83bb08a3bd6a6f072f9db4a09c0f52fb651dc4611c4e1d49bdcb765 SHA512 ab2520e1ab714c9370eb640efe5b465902e7cdca8acbae25c79b5845614311ceab2ce3dbb7fe7b6a0362c6192a3dc812f8248aaa9f813f6e5323e344ccb945a9 WHIRLPOOL a1462175ecc50faa4c2b94360d88fc639ec09f4f48056d48cdc88067bb52d80f0b587b0aab1d1286a3191cd52e323185921fa0e275a7d9ff1f80cfdf75074c1b
+AUX 233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch 6124 SHA256 4cd638bde47a33da5434243a24dc235fc614e0732a0d89dfe3fa52891599b18c SHA512 4a700bc40d0b7948cd937a674c5e7b7bb6e2f08a81bebd8d316375662ad198cd9562835ec2da557ec0e5fa927e825cdad8cf2c63ec3e5a4c8d2506e6293125f3 WHIRLPOOL 99522e59fcc1677a9a75413dd3446d250ef370d470790b5cd72d57fb75bfe42fede1f12c8cb63e91d93bce2b64abb2e749f2ad4150f83171ba1a84c57b12e8fd
+AUX 233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch 16209 SHA256 698e3ea51911deabf181f1dd7b62837027e4c85520c865f02df7504638910156 SHA512 395c0a0a07f17ea5edc876c7541e5b0f7ebfb7e74ef675c7a685a32b5e86d80df0b59c09e345521a54d625093dfe6a9daa9d4ccc6b4529031bfedf16f9bbf824 WHIRLPOOL fc2bcf96a9f1d1fd18895c4ffe8466ee6daa6abc0189c8cf85671deb6fc054cb36a2c9be82a7b32a99bd490ce34a800e895df9ca2cbe6c86a467d6c1f21799a2
+AUX 233-CVE-2017-9445.patch 5491 SHA256 791c886ce40f04db2a447409494ea853d6c0858575dbd58dce8a36d981bd436e SHA512 16308657911dc3f85520d6de0ee85f04afed1a7940a8a23ece641af2b3766e44e88d8de21cb53afd4db7b8ad8324eeed2860009f3fcc05a227f0c6faafbf351f WHIRLPOOL 65ff961ab8848a9a54cfed9b973126eecd31ae159eeb889aef53caa6f54c5cdbb1906198d2870be3aa452dca9f3ae8958cb2c52a0bbcba71e5783a168f0a959c
+AUX 233-format-warnings.patch 3837 SHA256 20c4caf0bb173dbf60a7c98e581adefe8428f8be322412ab89edeab704542cbf SHA512 491cdbdb75e1ef338cd660fd89c776e3dd2881922eb04f505dda985104f14813e9da9e758393d906ff224e9e03888cafd05f7e665f71c43580a2989af54981bc WHIRLPOOL 669c61cb4a6f5c435722d8602b4c2634d3231c9ea43ba280132ee7e4999af45cfd7eb49bfa4a8a20d87ffb56074783c8c0c6c9568f13b754f805a165ac6ccdfe
+AUX 233-systemd-user-pam.patch 443 SHA256 3dc3895cac344d842c45ce78062bba10c169ac4d9fc9050a73cc18e7ebf87507 SHA512 0a47368b1b38995a4193492e3add5c716c063366a9bc53dec03b7cb59b524da644033e095344da6e15e01dc84d8f5b335e7510442eeaba26e06918403fed0e5c WHIRLPOOL a91ccdc8a9c584579afbe96b6ab3dd2d18a02893b7c90df025e6ce1d06dc8b15364320773c3504be2eef5ee3f46a2bef4f4dee821df8bae3eeecb9b1e864a7f8
+AUX 234-0002-cryptsetup-fix-infinite-timeout-6486.patch 1469 SHA256 995f0d80d3e047f40c65cb62e4d88b4ed9596ddb4af26dc55905bc9a15d83f2f SHA512 05ea81aa275921c5c9673e02a2da7c6c3bb43809fc5b6d0c51036735f502b58d062e553973055e964a66d667ffc8869e325323c9cf4347c2622227ed27f30be5 WHIRLPOOL 176b33d20967d9dbfe3246350bde1df5f1174d9b8f1aa4656f82562c1028b4d43745258481a0526941bda140e5bbe34190f93c248289c04faecece87d20bd705
+AUX 234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch 4075 SHA256 850e58021a8dbdf6a8d68918cb8d8f19aa1829471b071dbd2565eb7e7a9e14cd SHA512 1c5c882d0306d7f0663c8a31faba72601da8f159a2eea2a84e12416f473321be829268edf6db3aace7c3590b2f3b85afedd61fd3993346717b2fb0e8452d8ab2 WHIRLPOOL a87de517e43ecfec2f7ec1e931806abc48aba79bb5c527d1ba9e96ddc6417e4b62561eb884a81cda2595803d2bd30a52ffba04fe2455bf5ab8a39e0c7ef9b229
+AUX 234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch 821 SHA256 7cc3e4098242d9c3bf8db61dc206b38fc54a1128b6870fe2ea213271cd89a472 SHA512 b791f49036981cb6e91d8597e7c0433549208afb661fdbc9631dd66a868cdb0741847bf7188c514179c3a920721568e65f09a38ca9e133ca7226bfad6f4aa1c2 WHIRLPOOL d8837d19fe2b3da2c0149cfc3d958afa05207549056344346520d2fd2fba8c80d2f05a2e883ef45caa26d6ea6c43a433df5222722cd6a9a1967447b8ef08896b
+AUX 234-uucp-group.patch 536 SHA256 b3ef6c7d40d86dfc801ff7839876dcffb299d0b6d5b11fbf081adfe51ee0d8e6 SHA512 6ffaa3b50f36598682019c1c6b171ad121d57ba9cfd379be5f46f64621dc026a82069922b78a62a5c477bb117e700a31e0315872d78378755cd4150abd22a912 WHIRLPOOL dc9bbd2879af33a8ff27e7a13052c51b4ddc1b336bbd58ed0b5e28bb63229acbb355b6316cc58555b12eee8ed2d73ba25ee21286e8e0f429d6760e70dc6de5a4
+AUX 235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch 1280 SHA256 a448c39a3d172c03edf4ac303b02251d3c09a9d21c2512ae475c1a92905b97af SHA512 70dd0b3ed7926fc2406aae8fc592ba7bbbf9bdd94151d3045d94683921f2921dbe8184f7184e4e5a9cd4bf1556ddb93f20f741df3bead3c664f4c71757e75376 WHIRLPOOL bd3aeda654fffd90e2b49757f5bdc483284d034a78f134f3c2b1870f11f35d9604d6105b159ff9cd879bb82c57536e363d8bf8cbba1878514cfc894ca009a47f
+AUX 235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch 2414 SHA256 b67d5a0efd02e98d1524355ca16e7c0f39260f8c1907106ae75f11a19498abc9 SHA512 ddd39f42a809250428cef15507c2c5ae9233b28a217effed5cf078851d4358323c20f7b057b26d0872a0e0f93b16841d39745ce3e0ae2ff91f48153ce5457113 WHIRLPOOL 450c518fea75de1cf9f9e23419d32f66061dd47796e07b8298326c65c445358b160ace2fe9d8156bf4c0f1f0a8ebd3cf9f123aefd23d3f2bcc9032d114dbc962
+AUX generator-path.patch 1046 SHA256 aeb236e19bedc17737ada8953fed61272423b36fd186ffeaff0f14addc488549 SHA512 e9999afbf4d2d8a9e828d81dd0b54e2c2ba556e9778a4954dac3da885a15bc6dcc718f7e119c352eb2efd090e410735395ec20ce2eb3c84a481570bc8b5f66b3 WHIRLPOOL cbc5eb71fe2f61c95adefca78f29f1acd7ccb7bf9ccb7872326b2c7ed2704f4c856dd7456759c3320496995bef4f94d390b0d5f6d9b2585cb99c4a27faabdf2a
+AUX nsswitch.conf 698 SHA256 56aada9338fad1b105bc5755a85761cab57dc9aba180545be2df0b993b581eb3 SHA512 486581b096db702941589bbd3211df58df4979d17856dc935f6e22f7a268c5b6b1c4dfa643d38e21bc01eb258b0b97318d4e97ebab0e87abd718af1e391fde1a WHIRLPOOL 160d83a8a136c44d8d4d1fa9c8c321ff792746b6482c29662c93bcab720540591ea95c4c6a68252f024b449360fcdcebf4c78ee0e33be268e8801bede1286200
+DIST systemd-233-man.tar.gz 31386 SHA256 825e62eb82c4e23997061fc8f56f7ec9bb1e6ac1111d279c76c926cc2bfbf1dc SHA512 cc5215d3590ffc3c9203a64c14d6adeb0148c421c1396b8c1e43dcb58763b687ce99bdee327dd8a00abab7198171e73b22109a3f2032e4cec6adf2dcc85acf40 WHIRLPOOL ff1f36beff377f675047271df38503e8b71d615ea73c5fdfebf465edaf1fe29b4f89e3194d65cdf84eec9b7c3156de597627fdaffa4b86018520aaa127a7a159
+DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176
+DIST systemd-234.tar.gz 4800186 SHA256 da3e69d10aa1c983d33833372ad4929037b411ac421fb085c8cee79ae1d80b6a SHA512 762336a7d96c6583cf71cad62efce95a0ed93cd0a0d7251f128d10dba8200c0c8df0e5a7d168179ababa5b221295a231e73b7e7ea2697cb3fb5c1b33538efa68 WHIRLPOOL 9ff9f25ce82514db969a427eee51c0483b2bcaaa611f93c1fc17c356ea25eee712217708c54101ecaafd835cd8ac988b16e8ad411b48541a32442b9a0d148f07
+DIST systemd-235.tar.gz 6586406 SHA256 25811f96f5a027bf2a4c9383495cf5b623e385d84da31e473cf375932b3e9c52 SHA512 243f2eb5340fa37dd1286eaa63e83387bda9e03953af266cd6196a37535a13491482caf14c6ab10608bba4ed23b6c41923608e52017e0c26988ed72ddd2b9993 WHIRLPOOL 05e50b31f7b3b1cd756abd1580dddae0e114953857564133784fc43b9ecd0e203ee534aaf76531ca7af5c43b03b9b73c6cbbbb1caf5afb17502555cc52fe06cd
+EBUILD systemd-233-r4.ebuild 13626 SHA256 0dc86e550d767d12e945975267f4a6ff6c4a862f049253e966c9f2db699310f6 SHA512 3527bc62210aba9c50f663d8023440b73ae6185f1a90e6e31a48b6dcc13ac2dc0b312c433cbe74e942cb50ad894d4dd4212d81caf50d17971c9f965cae9535a0 WHIRLPOOL 8b4f723d82d0101b30838c5c21c89bdc1f23d18291ea3e5fd97f28357e8e35d6365725129cd4edda7d7b14f18b5e2cfe370971522a2d822f686fd61d1d08ab5d
+EBUILD systemd-234-r4.ebuild 13476 SHA256 56dcb5358bb37180167e69894032d20aa7121f2d1bf9f80d0eec780eb748956b SHA512 4276434de0bb01ac06a78b001017c91b2bf104ac0559666fcc28cad2b2d8545c8279db89afa4d1bf31d4106337f8662b3ee1c65cf75f3507081a47a52c1a126c WHIRLPOOL d8953a3b122b206f0b10f737543685ca3c429f6f6456f555fbe78972bab5c96e69b968df4cfe3a9df189a519e4ce384b92916575794e7e5ccc725acc58d970d9
+EBUILD systemd-235.ebuild 13371 SHA256 7c3878ac414fb307297d78b406fce8e3269b2b4976235820c7c4f168b21a8e2f SHA512 f5fe58053edfea11e0ac43a2201e4b3728bcd65f1f1ef416f9761705bf0972a421f693aeb8edc565999f7ff36050ee50f9b71d9e8aa3c54eddf5413a10b23165 WHIRLPOOL f09a192561a9815816c2cb35002734248a48c6ef62b1a4c33a28409ffdd16093ee7054d346187fab043372cef1b3d0956242e7f9537f6fcb9f6ee55a7687df2f
+EBUILD systemd-9999.ebuild 13203 SHA256 e6272c3919edc43df411e787330b5a332cf3f3948595009404065495ef04b07f SHA512 8f43ddd6b444f8c7dea0e4db7f719afd264593fd1ea20cf063ca46247abdedc08bd1c414f4016978f4af88858f3cb6808f1c2c41967b2f61ee3daa74fcbeed30 WHIRLPOOL 4d7fa3f8fc0db5c5bece1e2adfd299a39d022d3624634d4c58798af5f36e7c1487440eec0314b198d1c522ffa17e10b727256bb518ebe9ddcf855dfb93578522
+MISC ChangeLog 20141 SHA256 b01beaf5824021996a73fbd2fb1749b390e13c13eb309d336934fc758a73fd57 SHA512 041097f0655b5464023c1365d6e2813def67ffcdf6d2ae28c48497280bf3ed1ba49fca24ef661cb30de4af97ab1cee53575b4f51cb985fcc700535f3d4432481 WHIRLPOOL 854111ca90d15661843afd4c026028949b7d6f8916e750a2537f22993225aef0ef4076c0ff3d818609a9b166ca926ba152e26d2e3d30510a646a5bcb6b5c04fb
+MISC ChangeLog-2015 69416 SHA256 10adffab2046e41857e68c45b411fa011fe6206cf8d4cab42db78562cecf6bd8 SHA512 bc8f0ad8ebb6a31db74be738e97d9cd1183c0cc394615d90bf15633a315778557170bb93ce7e88b63bb93237c1a748f6f3d0ab89539f014d319f30ba9a0021fc WHIRLPOOL 7052513a02364742e297fea4c595da7045b5b6a517a397314992b7cf87f40d9ffa16383c6e413d466fdfa3173e9e8769257cf46116e4808fad7ae5c0f7990296
+MISC metadata.xml 2242 SHA256 bf36eb284ac3dc4d6720c2ff98e995a031866055225678a283c73bf420bbac4c SHA512 ba6691a001c80d3c273977b703e08976b81302d3056fa830776f7462efecb2e49deaaf574d5abcc3a4b7480e1dd810eb5fe66faed65e130a6d5279b1ed387619 WHIRLPOOL 081b145d6840d2794f61a653b0a7d3ec74ada237c98509f0fef2401db826d861ca4615d1b1dabc6e601b72539d80a243b57d163a5e7cd03e6e151a68f3bd6d17
diff --git a/sys-apps/systemd/files/218-Dont-enable-audit-by-default.patch b/sys-apps/systemd/files/218-Dont-enable-audit-by-default.patch
new file mode 100644
index 000000000000..f44b4be85d50
--- /dev/null
+++ b/sys-apps/systemd/files/218-Dont-enable-audit-by-default.patch
@@ -0,0 +1,30 @@
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Sun, 28 Dec 2014 12:49:35 +0100
+Subject: Don't enable audit by default
+
+It causes flooding of dmesg and syslog, suppressing actually important
+messages.
+
+Don't enable it for now, until a better solution is found:
+http://lists.freedesktop.org/archives/systemd-devel/2014-December/026591.html
+
+Bug-Debian: https://bugs.debian.org/773528
+---
+ src/journal/journald-audit.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c
+index 69742fa..25ef743 100644
+--- a/src/journal/journald-audit.c
++++ b/src/journal/journald-audit.c
+@@ -542,10 +542,5 @@ int server_open_audit(Server *s) {
+ if (r < 0)
+ return log_error_errno(r, "Failed to add audit fd to event loop: %m");
+
+- /* We are listening now, try to enable audit */
+- r = enable_audit(s->audit_fd, true);
+- if (r < 0)
+- log_warning_errno(r, "Failed to issue audit enable call: %m");
+-
+ return 0;
+ }
diff --git a/sys-apps/systemd/files/228-noclean-tmp.patch b/sys-apps/systemd/files/228-noclean-tmp.patch
new file mode 100644
index 000000000000..769aa04ccf6e
--- /dev/null
+++ b/sys-apps/systemd/files/228-noclean-tmp.patch
@@ -0,0 +1,28 @@
+From b23c098d5787e06770872b19f83fffa14d8a7d14 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 25 Sep 2015 10:26:18 -0400
+Subject: [PATCH] tmpfiles: Disable cleaning of /tmp and /var/tmp
+
+Bug: https://bugs.gentoo.org/490676
+---
+ tmpfiles.d/tmp.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
+index 6bbd1aa..a361062 100644
+--- a/tmpfiles.d/tmp.conf
++++ b/tmpfiles.d/tmp.conf
+@@ -8,8 +8,8 @@
+ # See tmpfiles.d(5) for details
+
+ # Clear tmp directories separately, to make them easier to override
+-q /tmp 1777 root root 10d
+-q /var/tmp 1777 root root 30d
++q /tmp 1777 root root
++q /var/tmp 1777 root root
+
+ # Exclude namespace mountpoints created with PrivateTmp=yes
+ x /tmp/systemd-private-%b-*
+--
+2.4.10
+
diff --git a/sys-apps/systemd/files/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch b/sys-apps/systemd/files/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch
new file mode 100644
index 000000000000..be41fc4ec22c
--- /dev/null
+++ b/sys-apps/systemd/files/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch
@@ -0,0 +1,456 @@
+From dac3407f02116b94866224e0b5ecd46a5fa1c161 Mon Sep 17 00:00:00 2001
+From: Michael Biebl <mbiebl@gmail.com>
+Date: Thu, 2 Mar 2017 19:11:37 +0100
+Subject: [PATCH] Avoid strict DM interface version dependencies (#5519)
+
+Compiling against the dm-ioctl.h header as provided by the Linux kernel
+will embed the DM interface version number. Running an older kernel can
+result in an error like this on shutdown:
+
+Could not detach DM dm-11: ioctl mismatch, kernel(4.34.4), user(4.35.4)
+
+Work around this by shipping a local copy of dm-ioctl.h. We need at
+least the version from 3.13 for DM_DEFERRED_REMOVE [1], so bump the
+requirements in README accordingly.
+
+[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2c140a246dc0bc085b98eddde978060fcec1080c
+
+Fixes: #5492
+---
+ Makefile.am | 1 +
+ README | 2 +-
+ src/core/umount.c | 2 +-
+ src/shared/dissect-image.c | 2 +-
+ src/shared/linux-3.13/dm-ioctl.h | 355 +++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 359 insertions(+), 3 deletions(-)
+ create mode 100644 src/shared/linux-3.13/dm-ioctl.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 2a5610740..65de9f16d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1018,6 +1018,7 @@ libshared_la_SOURCES = \
+ src/shared/gpt.h \
+ src/shared/udev-util.h \
+ src/shared/linux/auto_dev-ioctl.h \
++ src/shared/linux-3.13/dm-ioctl.h \
+ src/shared/initreq.h \
+ src/shared/dns-domain.c \
+ src/shared/dns-domain.h \
+diff --git a/README b/README
+index a4a649395..30b5f7187 100644
+--- a/README
++++ b/README
+@@ -35,7 +35,7 @@ LICENSE:
+ - except src/udev/* which is (currently still) GPLv2, GPLv2+
+
+ REQUIREMENTS:
+- Linux kernel >= 3.12
++ Linux kernel >= 3.13
+ Linux kernel >= 4.2 for unified cgroup hierarchy support
+
+ Kernel Config Options:
+diff --git a/src/core/umount.c b/src/core/umount.c
+index 2f4b12bdb..454383e7e 100644
+--- a/src/core/umount.c
++++ b/src/core/umount.c
+@@ -19,7 +19,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <linux/dm-ioctl.h>
+ #include <linux/loop.h>
+ #include <string.h>
+ #include <sys/mount.h>
+@@ -31,6 +30,7 @@
+ #include "escape.h"
+ #include "fd-util.h"
+ #include "fstab-util.h"
++#include "linux-3.13/dm-ioctl.h"
+ #include "list.h"
+ #include "mount-setup.h"
+ #include "path-util.h"
+diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
+index 39e724c51..1c9d21566 100644
+--- a/src/shared/dissect-image.c
++++ b/src/shared/dissect-image.c
+@@ -20,7 +20,6 @@
+ #ifdef HAVE_LIBCRYPTSETUP
+ #include <libcryptsetup.h>
+ #endif
+-#include <linux/dm-ioctl.h>
+ #include <sys/mount.h>
+
+ #include "architecture.h"
+@@ -32,6 +31,7 @@
+ #include "fs-util.h"
+ #include "gpt.h"
+ #include "hexdecoct.h"
++#include "linux-3.13/dm-ioctl.h"
+ #include "mount-util.h"
+ #include "path-util.h"
+ #include "stat-util.h"
+diff --git a/src/shared/linux-3.13/dm-ioctl.h b/src/shared/linux-3.13/dm-ioctl.h
+new file mode 100644
+index 000000000..c8a430209
+--- /dev/null
++++ b/src/shared/linux-3.13/dm-ioctl.h
+@@ -0,0 +1,355 @@
++/*
++ * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
++ * Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved.
++ *
++ * This file is released under the LGPL.
++ */
++
++#ifndef _LINUX_DM_IOCTL_V4_H
++#define _LINUX_DM_IOCTL_V4_H
++
++#include <linux/types.h>
++
++#define DM_DIR "mapper" /* Slashes not supported */
++#define DM_CONTROL_NODE "control"
++#define DM_MAX_TYPE_NAME 16
++#define DM_NAME_LEN 128
++#define DM_UUID_LEN 129
++
++/*
++ * A traditional ioctl interface for the device mapper.
++ *
++ * Each device can have two tables associated with it, an
++ * 'active' table which is the one currently used by io passing
++ * through the device, and an 'inactive' one which is a table
++ * that is being prepared as a replacement for the 'active' one.
++ *
++ * DM_VERSION:
++ * Just get the version information for the ioctl interface.
++ *
++ * DM_REMOVE_ALL:
++ * Remove all dm devices, destroy all tables. Only really used
++ * for debug.
++ *
++ * DM_LIST_DEVICES:
++ * Get a list of all the dm device names.
++ *
++ * DM_DEV_CREATE:
++ * Create a new device, neither the 'active' or 'inactive' table
++ * slots will be filled. The device will be in suspended state
++ * after creation, however any io to the device will get errored
++ * since it will be out-of-bounds.
++ *
++ * DM_DEV_REMOVE:
++ * Remove a device, destroy any tables.
++ *
++ * DM_DEV_RENAME:
++ * Rename a device or set its uuid if none was previously supplied.
++ *
++ * DM_SUSPEND:
++ * This performs both suspend and resume, depending which flag is
++ * passed in.
++ * Suspend: This command will not return until all pending io to
++ * the device has completed. Further io will be deferred until
++ * the device is resumed.
++ * Resume: It is no longer an error to issue this command on an
++ * unsuspended device. If a table is present in the 'inactive'
++ * slot, it will be moved to the active slot, then the old table
++ * from the active slot will be _destroyed_. Finally the device
++ * is resumed.
++ *
++ * DM_DEV_STATUS:
++ * Retrieves the status for the table in the 'active' slot.
++ *
++ * DM_DEV_WAIT:
++ * Wait for a significant event to occur to the device. This
++ * could either be caused by an event triggered by one of the
++ * targets of the table in the 'active' slot, or a table change.
++ *
++ * DM_TABLE_LOAD:
++ * Load a table into the 'inactive' slot for the device. The
++ * device does _not_ need to be suspended prior to this command.
++ *
++ * DM_TABLE_CLEAR:
++ * Destroy any table in the 'inactive' slot (ie. abort).
++ *
++ * DM_TABLE_DEPS:
++ * Return a set of device dependencies for the 'active' table.
++ *
++ * DM_TABLE_STATUS:
++ * Return the targets status for the 'active' table.
++ *
++ * DM_TARGET_MSG:
++ * Pass a message string to the target at a specific offset of a device.
++ *
++ * DM_DEV_SET_GEOMETRY:
++ * Set the geometry of a device by passing in a string in this format:
++ *
++ * "cylinders heads sectors_per_track start_sector"
++ *
++ * Beware that CHS geometry is nearly obsolete and only provided
++ * for compatibility with dm devices that can be booted by a PC
++ * BIOS. See struct hd_geometry for range limits. Also note that
++ * the geometry is erased if the device size changes.
++ */
++
++/*
++ * All ioctl arguments consist of a single chunk of memory, with
++ * this structure at the start. If a uuid is specified any
++ * lookup (eg. for a DM_INFO) will be done on that, *not* the
++ * name.
++ */
++struct dm_ioctl {
++ /*
++ * The version number is made up of three parts:
++ * major - no backward or forward compatibility,
++ * minor - only backwards compatible,
++ * patch - both backwards and forwards compatible.
++ *
++ * All clients of the ioctl interface should fill in the
++ * version number of the interface that they were
++ * compiled with.
++ *
++ * All recognised ioctl commands (ie. those that don't
++ * return -ENOTTY) fill out this field, even if the
++ * command failed.
++ */
++ __u32 version[3]; /* in/out */
++ __u32 data_size; /* total size of data passed in
++ * including this struct */
++
++ __u32 data_start; /* offset to start of data
++ * relative to start of this struct */
++
++ __u32 target_count; /* in/out */
++ __s32 open_count; /* out */
++ __u32 flags; /* in/out */
++
++ /*
++ * event_nr holds either the event number (input and output) or the
++ * udev cookie value (input only).
++ * The DM_DEV_WAIT ioctl takes an event number as input.
++ * The DM_SUSPEND, DM_DEV_REMOVE and DM_DEV_RENAME ioctls
++ * use the field as a cookie to return in the DM_COOKIE
++ * variable with the uevents they issue.
++ * For output, the ioctls return the event number, not the cookie.
++ */
++ __u32 event_nr; /* in/out */
++ __u32 padding;
++
++ __u64 dev; /* in/out */
++
++ char name[DM_NAME_LEN]; /* device name */
++ char uuid[DM_UUID_LEN]; /* unique identifier for
++ * the block device */
++ char data[7]; /* padding or data */
++};
++
++/*
++ * Used to specify tables. These structures appear after the
++ * dm_ioctl.
++ */
++struct dm_target_spec {
++ __u64 sector_start;
++ __u64 length;
++ __s32 status; /* used when reading from kernel only */
++
++ /*
++ * Location of the next dm_target_spec.
++ * - When specifying targets on a DM_TABLE_LOAD command, this value is
++ * the number of bytes from the start of the "current" dm_target_spec
++ * to the start of the "next" dm_target_spec.
++ * - When retrieving targets on a DM_TABLE_STATUS command, this value
++ * is the number of bytes from the start of the first dm_target_spec
++ * (that follows the dm_ioctl struct) to the start of the "next"
++ * dm_target_spec.
++ */
++ __u32 next;
++
++ char target_type[DM_MAX_TYPE_NAME];
++
++ /*
++ * Parameter string starts immediately after this object.
++ * Be careful to add padding after string to ensure correct
++ * alignment of subsequent dm_target_spec.
++ */
++};
++
++/*
++ * Used to retrieve the target dependencies.
++ */
++struct dm_target_deps {
++ __u32 count; /* Array size */
++ __u32 padding; /* unused */
++ __u64 dev[0]; /* out */
++};
++
++/*
++ * Used to get a list of all dm devices.
++ */
++struct dm_name_list {
++ __u64 dev;
++ __u32 next; /* offset to the next record from
++ the _start_ of this */
++ char name[0];
++};
++
++/*
++ * Used to retrieve the target versions
++ */
++struct dm_target_versions {
++ __u32 next;
++ __u32 version[3];
++
++ char name[0];
++};
++
++/*
++ * Used to pass message to a target
++ */
++struct dm_target_msg {
++ __u64 sector; /* Device sector */
++
++ char message[0];
++};
++
++/*
++ * If you change this make sure you make the corresponding change
++ * to dm-ioctl.c:lookup_ioctl()
++ */
++enum {
++ /* Top level cmds */
++ DM_VERSION_CMD = 0,
++ DM_REMOVE_ALL_CMD,
++ DM_LIST_DEVICES_CMD,
++
++ /* device level cmds */
++ DM_DEV_CREATE_CMD,
++ DM_DEV_REMOVE_CMD,
++ DM_DEV_RENAME_CMD,
++ DM_DEV_SUSPEND_CMD,
++ DM_DEV_STATUS_CMD,
++ DM_DEV_WAIT_CMD,
++
++ /* Table level cmds */
++ DM_TABLE_LOAD_CMD,
++ DM_TABLE_CLEAR_CMD,
++ DM_TABLE_DEPS_CMD,
++ DM_TABLE_STATUS_CMD,
++
++ /* Added later */
++ DM_LIST_VERSIONS_CMD,
++ DM_TARGET_MSG_CMD,
++ DM_DEV_SET_GEOMETRY_CMD
++};
++
++#define DM_IOCTL 0xfd
++
++#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
++#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
++#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
++
++#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
++#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
++#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
++#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
++#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
++#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
++
++#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
++#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
++#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
++#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
++
++#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
++
++#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
++#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
++
++#define DM_VERSION_MAJOR 4
++#define DM_VERSION_MINOR 27
++#define DM_VERSION_PATCHLEVEL 0
++#define DM_VERSION_EXTRA "-ioctl (2013-10-30)"
++
++/* Status bits */
++#define DM_READONLY_FLAG (1 << 0) /* In/Out */
++#define DM_SUSPEND_FLAG (1 << 1) /* In/Out */
++#define DM_PERSISTENT_DEV_FLAG (1 << 3) /* In */
++
++/*
++ * Flag passed into ioctl STATUS command to get table information
++ * rather than current status.
++ */
++#define DM_STATUS_TABLE_FLAG (1 << 4) /* In */
++
++/*
++ * Flags that indicate whether a table is present in either of
++ * the two table slots that a device has.
++ */
++#define DM_ACTIVE_PRESENT_FLAG (1 << 5) /* Out */
++#define DM_INACTIVE_PRESENT_FLAG (1 << 6) /* Out */
++
++/*
++ * Indicates that the buffer passed in wasn't big enough for the
++ * results.
++ */
++#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
++
++/*
++ * This flag is now ignored.
++ */
++#define DM_SKIP_BDGET_FLAG (1 << 9) /* In */
++
++/*
++ * Set this to avoid attempting to freeze any filesystem when suspending.
++ */
++#define DM_SKIP_LOCKFS_FLAG (1 << 10) /* In */
++
++/*
++ * Set this to suspend without flushing queued ios.
++ * Also disables flushing uncommitted changes in the thin target before
++ * generating statistics for DM_TABLE_STATUS and DM_DEV_WAIT.
++ */
++#define DM_NOFLUSH_FLAG (1 << 11) /* In */
++
++/*
++ * If set, any table information returned will relate to the inactive
++ * table instead of the live one. Always check DM_INACTIVE_PRESENT_FLAG
++ * is set before using the data returned.
++ */
++#define DM_QUERY_INACTIVE_TABLE_FLAG (1 << 12) /* In */
++
++/*
++ * If set, a uevent was generated for which the caller may need to wait.
++ */
++#define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */
++
++/*
++ * If set, rename changes the uuid not the name. Only permitted
++ * if no uuid was previously supplied: an existing uuid cannot be changed.
++ */
++#define DM_UUID_FLAG (1 << 14) /* In */
++
++/*
++ * If set, all buffers are wiped after use. Use when sending
++ * or requesting sensitive data such as an encryption key.
++ */
++#define DM_SECURE_DATA_FLAG (1 << 15) /* In */
++
++/*
++ * If set, a message generated output data.
++ */
++#define DM_DATA_OUT_FLAG (1 << 16) /* Out */
++
++/*
++ * If set with DM_DEV_REMOVE or DM_REMOVE_ALL this indicates that if
++ * the device cannot be removed immediately because it is still in use
++ * it should instead be scheduled for removal when it gets closed.
++ *
++ * On return from DM_DEV_REMOVE, DM_DEV_STATUS or other ioctls, this
++ * flag indicates that the device is scheduled to be removed when it
++ * gets closed.
++ */
++#define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */
++
++#endif /* _LINUX_DM_IOCTL_H */
+--
+2.12.0
+
diff --git a/sys-apps/systemd/files/233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch b/sys-apps/systemd/files/233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch
new file mode 100644
index 000000000000..fe30ef9ff617
--- /dev/null
+++ b/sys-apps/systemd/files/233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch
@@ -0,0 +1,117 @@
+From 433e7893c6c0f6cbc98d8911fc5149ee9beedb79 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 6 Jul 2017 13:54:42 -0400
+Subject: [PATCH 2/3] core/load-fragment: refuse units with errors in
+ RootDirectory/RootImage/DynamicUser
+
+Behaviour of the service is completely different with the option off, so the
+service would probably mess up state on disk and do unexpected things.
+---
+ src/core/load-fragment-gperf.gperf.m4 | 6 +++---
+ src/core/load-fragment.c | 7 +++++--
+ src/shared/conf-parser.c | 16 +++++++++++-----
+ 3 files changed, 19 insertions(+), 10 deletions(-)
+
+diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
+index cb9e6fea2..d0868bf40 100644
+--- a/src/core/load-fragment-gperf.gperf.m4
++++ b/src/core/load-fragment-gperf.gperf.m4
+@@ -18,8 +18,8 @@ struct ConfigPerfItem;
+ m4_dnl Define the context options only once
+ m4_define(`EXEC_CONTEXT_CONFIG_ITEMS',
+ `$1.WorkingDirectory, config_parse_working_directory, 0, offsetof($1, exec_context)
+-$1.RootDirectory, config_parse_unit_path_printf, 0, offsetof($1, exec_context.root_directory)
+-$1.RootImage, config_parse_unit_path_printf, 0, offsetof($1, exec_context.root_image)
++$1.RootDirectory, config_parse_unit_path_printf, true, offsetof($1, exec_context.root_directory)
++$1.RootImage, config_parse_unit_path_printf, true, offsetof($1, exec_context.root_image)
+ $1.User, config_parse_user_group, 0, offsetof($1, exec_context.user)
+ $1.Group, config_parse_user_group, 0, offsetof($1, exec_context.group)
+ $1.SupplementaryGroups, config_parse_user_group_strv, 0, offsetof($1, exec_context.supplementary_groups)
+@@ -35,7 +35,7 @@ $1.UMask, config_parse_mode, 0,
+ $1.Environment, config_parse_environ, 0, offsetof($1, exec_context.environment)
+ $1.EnvironmentFile, config_parse_unit_env_file, 0, offsetof($1, exec_context.environment_files)
+ $1.PassEnvironment, config_parse_pass_environ, 0, offsetof($1, exec_context.pass_environment)
+-$1.DynamicUser, config_parse_bool, 0, offsetof($1, exec_context.dynamic_user)
++$1.DynamicUser, config_parse_bool, true, offsetof($1, exec_context.dynamic_user)
+ $1.StandardInput, config_parse_exec_input, 0, offsetof($1, exec_context)
+ $1.StandardOutput, config_parse_exec_output, 0, offsetof($1, exec_context)
+ $1.StandardError, config_parse_exec_output, 0, offsetof($1, exec_context)
+diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
+index 5b7471c0d..ae4ec5cf0 100644
+--- a/src/core/load-fragment.c
++++ b/src/core/load-fragment.c
+@@ -242,6 +242,7 @@ int config_parse_unit_path_printf(
+ _cleanup_free_ char *k = NULL;
+ Unit *u = userdata;
+ int r;
++ bool fatal = ltype;
+
+ assert(filename);
+ assert(lvalue);
+@@ -250,8 +251,10 @@ int config_parse_unit_path_printf(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers on %s, ignoring: %m", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve unit specifiers on %s%s: %m",
++ fatal ? "" : ", ignoring", rvalue);
++ return fatal ? -ENOEXEC : 0;
+ }
+
+ return config_parse_path(unit, filename, line, section, section_line, lvalue, ltype, k, data, userdata);
+diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
+index 265ac83dc..ffb905fb6 100644
+--- a/src/shared/conf-parser.c
++++ b/src/shared/conf-parser.c
+@@ -614,6 +614,7 @@ int config_parse_bool(const char* unit,
+
+ int k;
+ bool *b = data;
++ bool fatal = ltype;
+
+ assert(filename);
+ assert(lvalue);
+@@ -622,8 +623,10 @@ int config_parse_bool(const char* unit,
+
+ k = parse_boolean(rvalue);
+ if (k < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, k, "Failed to parse boolean value, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, k,
++ "Failed to parse boolean value%s: %s",
++ fatal ? "" : ", ignoring", rvalue);
++ return fatal ? -ENOEXEC : 0;
+ }
+
+ *b = !!k;
+@@ -714,6 +717,7 @@ int config_parse_path(
+ void *userdata) {
+
+ char **s = data, *n;
++ bool fatal = ltype;
+
+ assert(filename);
+ assert(lvalue);
+@@ -722,12 +726,14 @@ int config_parse_path(
+
+ if (!utf8_is_valid(rvalue)) {
+ log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue);
+- return 0;
++ return fatal ? -ENOEXEC : 0;
+ }
+
+ if (!path_is_absolute(rvalue)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Not an absolute path, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Not an absolute path%s: %s",
++ fatal ? "" : ", ignoring", rvalue);
++ return fatal ? -ENOEXEC : 0;
+ }
+
+ n = strdup(rvalue);
+--
+2.13.2
+
diff --git a/sys-apps/systemd/files/233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch b/sys-apps/systemd/files/233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch
new file mode 100644
index 000000000000..28961b4b1e36
--- /dev/null
+++ b/sys-apps/systemd/files/233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch
@@ -0,0 +1,339 @@
+From f135524cd4cd6b71e7f6073b02389da30c6e94d9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 6 Jul 2017 13:28:19 -0400
+Subject: [PATCH 3/3] core/load-fragment: refuse units with errors in certain
+ directives
+
+If an error is encountered in any of the Exec* lines, WorkingDirectory,
+SELinuxContext, ApparmorProfile, SmackProcessLabel, Service (in .socket
+units), User, or Group, refuse to load the unit. If the config stanza
+has support, ignore the failure if '-' is present.
+
+For those configuration directives, even if we started the unit, it's
+pretty likely that it'll do something unexpected (like write files
+in a wrong place, or with a wrong context, or run with wrong permissions,
+etc). It seems better to refuse to start the unit and have the admin
+clean up the configuration without giving the service a chance to mess
+up stuff.
+
+Note that all "security" options that restrict what the unit can do
+(Capabilities, AmbientCapabilities, Restrict*, SystemCallFilter, Limit*,
+PrivateDevices, Protect*, etc) are _not_ treated like this. Such options are
+only supplementary, and are not always available depending on the architecture
+and compilation options, so unit authors have to make sure that the service
+runs correctly without them anyway.
+
+Fixes #6237, #6277.
+---
+ src/core/load-fragment.c | 116 ++++++++++++++++++++++++++++------------------
+ src/test/test-unit-file.c | 14 +++---
+ 2 files changed, 78 insertions(+), 52 deletions(-)
+
+diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
+index ae4ec5cf0..f38240af3 100644
+--- a/src/core/load-fragment.c
++++ b/src/core/load-fragment.c
+@@ -637,26 +637,36 @@ int config_parse_exec(
+
+ r = unit_full_printf(u, f, &path);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers on %s, ignoring: %m", f);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve unit specifiers on %s%s: %m",
++ f, ignore ? ", ignoring" : "");
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ if (isempty(path)) {
+ /* First word is either "-" or "@" with no command. */
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Empty path in command line, ignoring: \"%s\"", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Empty path in command line%s: \"%s\"",
++ ignore ? ", ignoring" : "", rvalue);
++ return ignore ? 0 : -ENOEXEC;
+ }
+ if (!string_is_safe(path)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path contains special characters, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Executable path contains special characters%s: %s",
++ ignore ? ", ignoring" : "", rvalue);
++ return ignore ? 0 : -ENOEXEC;
+ }
+ if (!path_is_absolute(path)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path is not absolute, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Executable path is not absolute%s: %s",
++ ignore ? ", ignoring" : "", rvalue);
++ return ignore ? 0 : -ENOEXEC;
+ }
+ if (endswith(path, "/")) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Executable path specifies a directory, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Executable path specifies a directory%s: %s",
++ ignore ? ", ignoring" : "", rvalue);
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ if (!separate_argv0) {
+@@ -709,12 +719,14 @@ int config_parse_exec(
+ if (r == 0)
+ break;
+ if (r < 0)
+- return 0;
++ return ignore ? 0 : -ENOEXEC;
+
+ r = unit_full_printf(u, word, &resolved);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to resolve unit specifiers on %s, ignoring: %m", word);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve unit specifiers on %s%s: %m",
++ word, ignore ? ", ignoring" : "");
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ if (!GREEDY_REALLOC(n, nbufsize, nlen + 2))
+@@ -725,8 +737,10 @@ int config_parse_exec(
+ }
+
+ if (!n || !n[0]) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Empty executable name or zeroeth argument, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Empty executable name or zeroeth argument%s: %s",
++ ignore ? ", ignoring" : "", rvalue);
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ nce = new0(ExecCommand, 1);
+@@ -1333,8 +1347,10 @@ int config_parse_exec_selinux_context(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve specifiers%s: %m",
++ ignore ? ", ignoring" : "");
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ free(c->selinux_context);
+@@ -1381,8 +1397,10 @@ int config_parse_exec_apparmor_profile(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve specifiers%s: %m",
++ ignore ? ", ignoring" : "");
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ free(c->apparmor_profile);
+@@ -1429,8 +1447,10 @@ int config_parse_exec_smack_process_label(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve specifiers%s: %m",
++ ignore ? ", ignoring" : "");
++ return ignore ? 0 : -ENOEXEC;
+ }
+
+ free(c->smack_process_label);
+@@ -1648,19 +1668,19 @@ int config_parse_socket_service(
+
+ r = unit_name_printf(UNIT(s), rvalue, &p);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers: %s", rvalue);
++ return -ENOEXEC;
+ }
+
+ if (!endswith(p, ".service")) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Unit must be of type service, ignoring: %s", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0, "Unit must be of type service: %s", rvalue);
++ return -ENOEXEC;
+ }
+
+ r = manager_load_unit(UNIT(s)->manager, p, NULL, &error, &x);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s: %s", rvalue, bus_error_message(&error, r));
++ return -ENOEXEC;
+ }
+
+ unit_ref_set(&s->service, x);
+@@ -1911,13 +1931,13 @@ int config_parse_user_group(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s, ignoring: %m", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s: %m", rvalue);
++ return -ENOEXEC;
+ }
+
+ if (!valid_user_group_name_or_id(k)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID, ignoring: %s", k);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID: %s", k);
++ return -ENOEXEC;
+ }
+
+ n = k;
+@@ -1975,19 +1995,19 @@ int config_parse_user_group_strv(
+ if (r == -ENOMEM)
+ return log_oom();
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
+- break;
++ log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax: %s", rvalue);
++ return -ENOEXEC;
+ }
+
+ r = unit_full_printf(u, word, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s, ignoring: %m", word);
+- continue;
++ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in %s: %m", word);
++ return -ENOEXEC;
+ }
+
+ if (!valid_user_group_name_or_id(k)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID, ignoring: %s", k);
+- continue;
++ log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid user/group name or numeric ID: %s", k);
++ return -ENOEXEC;
+ }
+
+ r = strv_push(users, k);
+@@ -2146,25 +2166,28 @@ int config_parse_working_directory(
+
+ r = unit_full_printf(u, rvalue, &k);
+ if (r < 0) {
+- log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in working directory path '%s', ignoring: %m", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, r,
++ "Failed to resolve unit specifiers in working directory path '%s'%s: %m",
++ rvalue, missing_ok ? ", ignoring" : "");
++ return missing_ok ? 0 : -ENOEXEC;
+ }
+
+ path_kill_slashes(k);
+
+ if (!utf8_is_valid(k)) {
+ log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue);
+- return 0;
++ return missing_ok ? 0 : -ENOEXEC;
+ }
+
+ if (!path_is_absolute(k)) {
+- log_syntax(unit, LOG_ERR, filename, line, 0, "Working directory path '%s' is not absolute, ignoring.", rvalue);
+- return 0;
++ log_syntax(unit, LOG_ERR, filename, line, 0,
++ "Working directory path '%s' is not absolute%s.",
++ rvalue, missing_ok ? ", ignoring" : "");
++ return missing_ok ? 0 : -ENOEXEC;
+ }
+
+- free_and_replace(c->working_directory, k);
+-
+ c->working_directory_home = false;
++ free_and_replace(c->working_directory, k);
+ }
+
+ c->working_directory_missing_ok = missing_ok;
+@@ -4444,8 +4467,11 @@ int unit_load_fragment(Unit *u) {
+ return r;
+
+ r = load_from_path(u, k);
+- if (r < 0)
++ if (r < 0) {
++ if (r == -ENOEXEC)
++ log_unit_notice(u, "Unit configuration has fatal error, unit will not be started.");
+ return r;
++ }
+
+ if (u->load_state == UNIT_STUB) {
+ SET_FOREACH(t, u->names, i) {
+diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
+index 12f48bf43..fd797b587 100644
+--- a/src/test/test-unit-file.c
++++ b/src/test/test-unit-file.c
+@@ -146,7 +146,7 @@ static void test_config_parse_exec(void) {
+ r = config_parse_exec(NULL, "fake", 4, "section", 1,
+ "LValue", 0, "/RValue/ argv0 r1",
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* honour_argv0 */");
+@@ -161,7 +161,7 @@ static void test_config_parse_exec(void) {
+ r = config_parse_exec(NULL, "fake", 3, "section", 1,
+ "LValue", 0, "@/RValue",
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* no command, whitespace only, reset */");
+@@ -220,7 +220,7 @@ static void test_config_parse_exec(void) {
+ "-@/RValue argv0 r1 ; ; "
+ "/goo/goo boo",
+ &c, u);
+- assert_se(r >= 0);
++ assert_se(r == -ENOEXEC);
+ c1 = c1->command_next;
+ check_execcommand(c1, "/RValue", "argv0", "r1", NULL, true);
+
+@@ -374,7 +374,7 @@ static void test_config_parse_exec(void) {
+ r = config_parse_exec(NULL, "fake", 4, "section", 1,
+ "LValue", 0, path,
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+ }
+
+@@ -401,21 +401,21 @@ static void test_config_parse_exec(void) {
+ r = config_parse_exec(NULL, "fake", 4, "section", 1,
+ "LValue", 0, "/path\\",
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* missing ending ' */");
+ r = config_parse_exec(NULL, "fake", 4, "section", 1,
+ "LValue", 0, "/path 'foo",
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* missing ending ' with trailing backslash */");
+ r = config_parse_exec(NULL, "fake", 4, "section", 1,
+ "LValue", 0, "/path 'foo\\",
+ &c, u);
+- assert_se(r == 0);
++ assert_se(r == -ENOEXEC);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* invalid space between modifiers */");
+--
+2.13.2
+
diff --git a/sys-apps/systemd/files/233-CVE-2017-9445.patch b/sys-apps/systemd/files/233-CVE-2017-9445.patch
new file mode 100644
index 000000000000..22a366ceba07
--- /dev/null
+++ b/sys-apps/systemd/files/233-CVE-2017-9445.patch
@@ -0,0 +1,149 @@
+From 29bb43cc46412366fc939c66331a916de07bfac4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sun, 18 Jun 2017 16:07:57 -0400
+Subject: [PATCH 1/4] resolved: simplify alloc size calculation
+
+The allocation size was calculated in a complicated way, and for values
+close to the page size we would actually allocate less than requested.
+
+Reported by Chris Coulson <chris.coulson@canonical.com>.
+
+CVE-2017-9445
+---
+ src/resolve/resolved-dns-packet.c | 8 +-------
+ src/resolve/resolved-dns-packet.h | 2 --
+ 2 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 652970284..2034e3c8c 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -47,13 +47,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+
+ assert(ret);
+
+- if (mtu <= UDP_PACKET_HEADER_SIZE)
+- a = DNS_PACKET_SIZE_START;
+- else
+- a = mtu - UDP_PACKET_HEADER_SIZE;
+-
+- if (a < DNS_PACKET_HEADER_SIZE)
+- a = DNS_PACKET_HEADER_SIZE;
++ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
+
+ /* round up to next page size */
+ a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
+diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
+index 2c92392e4..3abcaf8cf 100644
+--- a/src/resolve/resolved-dns-packet.h
++++ b/src/resolve/resolved-dns-packet.h
+@@ -66,8 +66,6 @@ struct DnsPacketHeader {
+ /* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
+ #define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
+
+-#define DNS_PACKET_SIZE_START 512
+-
+ struct DnsPacket {
+ int n_ref;
+ DnsProtocol protocol;
+--
+2.13.1
+
+
+From cd3d8a7ebc01cd6913eaa9a591f7d606038a7588 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Tue, 27 Jun 2017 14:20:00 -0400
+Subject: [PATCH 2/4] resolved: do not allocate packets with minimum size
+
+dns_packet_new() is sometimes called with mtu == 0, and in that case we should
+allocate more than the absolute minimum (which is the dns packet header size),
+otherwise we have to resize immediately again after appending the first data to
+the packet.
+
+This partially reverts the previous commit.
+---
+ src/resolve/resolved-dns-packet.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 2034e3c8c..9d806ab33 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -28,6 +28,9 @@
+
+ #define EDNS0_OPT_DO (1<<15)
+
++#define DNS_PACKET_SIZE_START 512
++assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
++
+ typedef struct DnsPacketRewinder {
+ DnsPacket *packet;
+ size_t saved_rindex;
+@@ -47,7 +50,14 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+
+ assert(ret);
+
+- a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
++ /* When dns_packet_new() is called with mtu == 0, allocate more than the
++ * absolute minimum (which is the dns packet header size), to avoid
++ * resizing immediately again after appending the first data to the packet.
++ */
++ if (mtu < UDP_PACKET_HEADER_SIZE)
++ a = DNS_PACKET_SIZE_START;
++ else
++ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
+
+ /* round up to next page size */
+ a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
+--
+2.13.1
+
+
+From a03fc1acd66d23e239f2545e9a6887c7d0aad7c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Tue, 27 Jun 2017 16:59:06 -0400
+Subject: [PATCH 3/4] resolved: define various packet sizes as unsigned
+
+This seems like the right thing to do, and apparently at least some compilers
+warn about signed/unsigned comparisons with DNS_PACKET_SIZE_MAX.
+---
+ src/resolve/resolved-dns-packet.c | 2 +-
+ src/resolve/resolved-dns-packet.h | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 9d806ab33..e2285b440 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -28,7 +28,7 @@
+
+ #define EDNS0_OPT_DO (1<<15)
+
+-#define DNS_PACKET_SIZE_START 512
++#define DNS_PACKET_SIZE_START 512u
+ assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
+
+ typedef struct DnsPacketRewinder {
+diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
+index 3abcaf8cf..5dff272fd 100644
+--- a/src/resolve/resolved-dns-packet.h
++++ b/src/resolve/resolved-dns-packet.h
+@@ -58,13 +58,13 @@ struct DnsPacketHeader {
+ /* The various DNS protocols deviate in how large a packet can grow,
+ but the TCP transport has a 16bit size field, hence that appears to
+ be the absolute maximum. */
+-#define DNS_PACKET_SIZE_MAX 0xFFFF
++#define DNS_PACKET_SIZE_MAX 0xFFFFu
+
+ /* RFC 1035 say 512 is the maximum, for classic unicast DNS */
+-#define DNS_PACKET_UNICAST_SIZE_MAX 512
++#define DNS_PACKET_UNICAST_SIZE_MAX 512u
+
+ /* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
+-#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
++#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096u
+
+ struct DnsPacket {
+ int n_ref;
+--
+2.13.1
diff --git a/sys-apps/systemd/files/233-format-warnings.patch b/sys-apps/systemd/files/233-format-warnings.patch
new file mode 100644
index 000000000000..7bb08f0a3201
--- /dev/null
+++ b/sys-apps/systemd/files/233-format-warnings.patch
@@ -0,0 +1,84 @@
+From 3e7d14d78c4d15ec7789299216cbf5c58e61547b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sat, 3 Jun 2017 05:41:17 -0400
+Subject: [PATCH] sd-bus: silence format warnings in kdbus code (#6072)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The code is mostly correct, but gcc is trying to outsmart us, and emits a
+warning for a "llu vs lu" mismatch, even though they are the same size (on alpha):
+
+src/libsystemd/sd-bus/bus-control.c: In function ‘kernel_get_list’:
+src/libsystemd/sd-bus/bus-control.c:267:42: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
+ if (asprintf(&n, ":1.%llu", name->id) < 0) {
+ ^
+src/libsystemd/sd-bus/bus-control.c: In function ‘bus_get_name_creds_kdbus’:
+src/libsystemd/sd-bus/bus-control.c:714:47: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
+ if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) {
+ ^
+This is hard to work around properly, because kdbus.h uses __u64 which is
+defined-differently-despite-being-the-same-size then uint64_t. Thus the simple
+solution of using %PRIu64 fails on amd64:
+
+src/libsystemd/sd-bus/bus-control.c:714:47: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64 {aka long long unsigned int}’ [-Werror=format=]
+ if (asprintf(&c->unique_name, ":1.%"PRIu64, conn_info->id) < 0) {
+ ^~~~~~
+
+Let's just avoid the whole issue for now by silencing the warning.
+After the next release, we should just get rid of the kdbus code.
+
+Fixes #5561.
+---
+ src/libsystemd/sd-bus/bus-control.c | 6 ++++++
+ src/libsystemd/sd-bus/bus-kernel.c | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
+index 9e58ffbd8..303ae0f23 100644
+--- a/src/libsystemd/sd-bus/bus-control.c
++++ b/src/libsystemd/sd-bus/bus-control.c
+@@ -264,10 +264,13 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
+ if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id && !(name->flags & KDBUS_HELLO_ACTIVATOR)) {
+ char *n;
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat"
+ if (asprintf(&n, ":1.%llu", name->id) < 0) {
+ r = -ENOMEM;
+ goto fail;
+ }
++#pragma GCC diagnostic pop
+
+ r = strv_consume(x, n);
+ if (r < 0)
+@@ -711,10 +714,13 @@ int bus_get_name_creds_kdbus(
+ }
+
+ if (mask & SD_BUS_CREDS_UNIQUE_NAME) {
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat"
+ if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) {
+ r = -ENOMEM;
+ goto fail;
+ }
++#pragma GCC diagnostic pop
+
+ c->mask |= SD_BUS_CREDS_UNIQUE_NAME;
+ }
+diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
+index c82caeb3f..ca6aee7c0 100644
+--- a/src/libsystemd/sd-bus/bus-kernel.c
++++ b/src/libsystemd/sd-bus/bus-kernel.c
+@@ -51,6 +51,8 @@
+ #include "user-util.h"
+ #include "util.h"
+
++#pragma GCC diagnostic ignored "-Wformat"
++
+ #define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t))
+
+ int bus_kernel_parse_unique_name(const char *s, uint64_t *id) {
+--
+2.13.2
+
diff --git a/sys-apps/systemd/files/233-systemd-user-pam.patch b/sys-apps/systemd/files/233-systemd-user-pam.patch
new file mode 100644
index 000000000000..eb2223e52f27
--- /dev/null
+++ b/sys-apps/systemd/files/233-systemd-user-pam.patch
@@ -0,0 +1,16 @@
+--- a/src/login/systemd-user.m4
++++ b/src/login/systemd-user.m4
+@@ -2,11 +2,7 @@
+ #
+ # Used by systemd --user instances.
+
+-account required pam_unix.so
+-m4_ifdef(`HAVE_SELINUX',
+-session required pam_selinux.so close
+-session required pam_selinux.so nottys open
+-)m4_dnl
+-session required pam_loginuid.so
++account include system-auth
++session include system-auth
+ session optional pam_keyinit.so force revoke
+ session optional pam_systemd.so
diff --git a/sys-apps/systemd/files/234-0002-cryptsetup-fix-infinite-timeout-6486.patch b/sys-apps/systemd/files/234-0002-cryptsetup-fix-infinite-timeout-6486.patch
new file mode 100644
index 000000000000..8ea131adfd07
--- /dev/null
+++ b/sys-apps/systemd/files/234-0002-cryptsetup-fix-infinite-timeout-6486.patch
@@ -0,0 +1,43 @@
+From 793c786f470aeedf443686cff30f97acaff23a04 Mon Sep 17 00:00:00 2001
+From: Andrew Soutar <andrew@andrewsoutar.com>
+Date: Mon, 31 Jul 2017 02:19:16 -0400
+Subject: [PATCH 2/3] cryptsetup: fix infinite timeout (#6486)
+
+0004f698d causes `arg_timeout` to be infinity instead of 0 when timeout=0. The
+logic here now matches this change.
+
+Fixes #6381
+---
+ src/cryptsetup/cryptsetup.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
+index 3b4c08616..08ed7e53b 100644
+--- a/src/cryptsetup/cryptsetup.c
++++ b/src/cryptsetup/cryptsetup.c
+@@ -56,7 +56,7 @@ static bool arg_tcrypt_veracrypt = false;
+ static char **arg_tcrypt_keyfiles = NULL;
+ static uint64_t arg_offset = 0;
+ static uint64_t arg_skip = 0;
+-static usec_t arg_timeout = 0;
++static usec_t arg_timeout = USEC_INFINITY;
+
+ /* Options Debian's crypttab knows we don't:
+
+@@ -670,10 +670,10 @@ int main(int argc, char *argv[]) {
+ if (arg_discards)
+ flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS;
+
+- if (arg_timeout > 0)
+- until = now(CLOCK_MONOTONIC) + arg_timeout;
+- else
++ if (arg_timeout == USEC_INFINITY)
+ until = 0;
++ else
++ until = now(CLOCK_MONOTONIC) + arg_timeout;
+
+ arg_key_size = (arg_key_size > 0 ? arg_key_size : (256 / 8));
+
+--
+2.14.0
+
diff --git a/sys-apps/systemd/files/234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch b/sys-apps/systemd/files/234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch
new file mode 100644
index 000000000000..e083f854107e
--- /dev/null
+++ b/sys-apps/systemd/files/234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch
@@ -0,0 +1,92 @@
+From 47d36aeaebc3083795de40c80e75f0fda48c3053 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Fri, 21 Jul 2017 07:51:07 -0400
+Subject: [PATCH 3/3] resolved: make sure idn2 conversions are roundtrippable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+While working on the gateway→_gateway conversion, I noticed that
+libidn2 strips the leading underscore in some names.
+https://gitlab.com/libidn/libidn2/issues/30 was resolved in
+https://gitlab.com/libidn/libidn2/commit/05d753ea69e2308cd02436d0511f4b844071dc79,
+which disabled "STD3 ASCII rules" by default, i.e. disabled stripping
+of underscores. So the situation is that with previously released libidn2
+versions we would get incorrect behaviour, and once new libidn2 is released,
+we should be OK.
+
+Let's implement a simple test which checks that the name survives the
+roundtrip, and if it doesn't, skip IDN resolution. Under old libidn2 this will
+fail in more cases, and under new libidn2 in fewer, but should be the right
+thing to do also under new libidn2.
+---
+ src/shared/dns-domain.c | 29 ++++++++++++++++++++++++++---
+ src/test/test-dns-domain.c | 6 ++++++
+ 2 files changed, 32 insertions(+), 3 deletions(-)
+
+diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
+index 12c4d65dd..139d286af 100644
+--- a/src/shared/dns-domain.c
++++ b/src/shared/dns-domain.c
+@@ -1274,15 +1274,38 @@ int dns_name_apply_idna(const char *name, char **ret) {
+
+ #if defined(HAVE_LIBIDN2)
+ int r;
++ _cleanup_free_ char *t = NULL;
+
+ assert(name);
+ assert(ret);
+
+- r = idn2_lookup_u8((uint8_t*) name, (uint8_t**) ret,
++ r = idn2_lookup_u8((uint8_t*) name, (uint8_t**) &t,
+ IDN2_NFC_INPUT | IDN2_NONTRANSITIONAL);
+- if (r == IDN2_OK)
++ log_debug("idn2_lookup_u8: %s → %s", name, t);
++ if (r == IDN2_OK) {
++ if (!startswith(name, "xn--")) {
++ _cleanup_free_ char *s = NULL;
++
++ r = idn2_to_unicode_8z8z(t, &s, 0);
++ if (r != IDN2_OK) {
++ log_debug("idn2_to_unicode_8z8z(\"%s\") failed: %d/%s",
++ t, r, idn2_strerror(r));
++ return 0;
++ }
++
++ if (!streq_ptr(name, s)) {
++ log_debug("idn2 roundtrip failed: \"%s\" → \"%s\" → \"%s\", ignoring.",
++ name, t, s);
++ return 0;
++ }
++ }
++
++ *ret = t;
++ t = NULL;
+ return 1; /* *ret has been written */
+- log_debug("idn2_lookup_u8(\"%s\") failed: %s", name, idn2_strerror(r));
++ }
++
++ log_debug("idn2_lookup_u8(\"%s\") failed: %d/%s", name, r, idn2_strerror(r));
+ if (r == IDN2_2HYPHEN)
+ /* The name has two hypens — forbidden by IDNA2008 in some cases */
+ return 0;
+diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c
+index 11cf0b1f0..cbd2d1e65 100644
+--- a/src/test/test-dns-domain.c
++++ b/src/test/test-dns-domain.c
+@@ -652,6 +652,12 @@ static void test_dns_name_apply_idna(void) {
+ test_dns_name_apply_idna_one("föö.bär.", ret, "xn--f-1gaa.xn--br-via");
+ test_dns_name_apply_idna_one("xn--f-1gaa.xn--br-via", ret, "xn--f-1gaa.xn--br-via");
+
++ test_dns_name_apply_idna_one("_443._tcp.fedoraproject.org", ret2,
++ "_443._tcp.fedoraproject.org");
++ test_dns_name_apply_idna_one("_443", ret2, "_443");
++ test_dns_name_apply_idna_one("gateway", ret, "gateway");
++ test_dns_name_apply_idna_one("_gateway", ret2, "_gateway");
++
+ test_dns_name_apply_idna_one("r3---sn-ab5l6ne7.googlevideo.com", ret2,
+ ret2 ? "r3---sn-ab5l6ne7.googlevideo.com" : "");
+ }
+--
+2.14.0
+
diff --git a/sys-apps/systemd/files/234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch b/sys-apps/systemd/files/234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch
new file mode 100644
index 000000000000..97230f9dd2ae
--- /dev/null
+++ b/sys-apps/systemd/files/234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch
@@ -0,0 +1,29 @@
+From f7d27d130eaac222b2d11c4d4415c9b599934da8 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Sat, 26 Aug 2017 15:19:26 +0200
+Subject: [PATCH] logind: make sure we don't process the same method call twice
+ (#6583)
+
+Tiny mistake, big effect.
+
+Fixes: #6375
+---
+ src/login/logind-session-dbus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
+index 22e5349a6..649f3c155 100644
+--- a/src/login/logind-session-dbus.c
++++ b/src/login/logind-session-dbus.c
+@@ -457,7 +457,7 @@ static int method_take_device(sd_bus_message *message, void *userdata, sd_bus_er
+ goto error;
+
+ session_save(s);
+- return 0;
++ return 1;
+
+ error:
+ session_device_free(sd);
+--
+2.14.1
+
diff --git a/sys-apps/systemd/files/234-uucp-group.patch b/sys-apps/systemd/files/234-uucp-group.patch
new file mode 100644
index 000000000000..89cf552c8295
--- /dev/null
+++ b/sys-apps/systemd/files/234-uucp-group.patch
@@ -0,0 +1,11 @@
+--- a/rules/50-udev-default.rules.in
++++ b/rules/50-udev-default.rules.in
+@@ -22,7 +22,7 @@
+ SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
+-KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
++KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
+
+ SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+
diff --git a/sys-apps/systemd/files/235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch b/sys-apps/systemd/files/235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch
new file mode 100644
index 000000000000..bd2b3364369a
--- /dev/null
+++ b/sys-apps/systemd/files/235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch
@@ -0,0 +1,44 @@
+From c013a410d0ec5f419ce8d53df19946795849591b Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 8 Oct 2017 09:47:05 -0400
+Subject: [PATCH] test: skip hwdb and sysv-generator if the features are
+ disabled
+
+---
+ test/meson.build | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/test/meson.build b/test/meson.build
+index 995a97177..c2df7ec22 100644
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -163,9 +163,11 @@ endif
+
+ ############################################################
+
+-sysv_generator_test_py = find_program('sysv-generator-test.py')
+-test('sysv-generator-test',
+- sysv_generator_test_py)
++if conf.get('HAVE_SYSV_COMPAT') == 1
++ sysv_generator_test_py = find_program('sysv-generator-test.py')
++ test('sysv-generator-test',
++ sysv_generator_test_py)
++endif
+
+ ############################################################
+
+@@ -181,6 +183,8 @@ udev_test_pl = find_program('udev-test.pl')
+ test('udev-test',
+ udev_test_pl)
+
+-hwdb_test_sh = find_program('hwdb-test.sh')
+-test('hwdb-test',
+- hwdb_test_sh)
++if conf.get('ENABLE_HWDB') == 1
++ hwdb_test_sh = find_program('hwdb-test.sh')
++ test('hwdb-test',
++ hwdb_test_sh)
++endif
+--
+2.14.2
+
diff --git a/sys-apps/systemd/files/235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch b/sys-apps/systemd/files/235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch
new file mode 100644
index 000000000000..99e7342ffb23
--- /dev/null
+++ b/sys-apps/systemd/files/235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch
@@ -0,0 +1,47 @@
+From 3bd3ac67477ea319cc169dbd1c377912cf8ff198 Mon Sep 17 00:00:00 2001
+From: Susant Sahani <susant@redhat.com>
+Date: Sun, 8 Oct 2017 21:51:35 +0530
+Subject: [PATCH] networkd: Don't stop networkd if CONFIG_FIB_RULES=n in
+ kernel.
+
+if FIB Rules in not supported by the kernel then networkd fails to
+start as it retuns error=-EOPNOTSUPP.
+In this case just ignore and let start networkd.
+
+````
+sendto(5, {{len=28, type=RTM_GETRULE, flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_DUMP, seq=8, pid=0}, {family=AF_UNSPEC, dst_len=0, src_len=0, tos=0, table=RT_TABLE_UNSPEC, action=FR_ACT_TO_TBL, flags=0}}, 28, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 16) = 28
+recvmsg(5, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=128->12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_NETLINK, cmsg_type=0x3}], msg_controllen=24, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 48
+recvmsg(5, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=128->12, msg_iov=[{iov_base={{len=48, type=NLMSG_ERROR, flags=0, seq=8, pid=8856}, {error=-EOPNOTSUPP, msg={{len=28, type=RTM_GETRULE, flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_DUMP, seq=8, pid=0}, {family=AF_UNSPEC, dst_len=0, src_len=0, tos=0, table=RT_TABLE_UNSPEC, action=FR_ACT_TO_TBL, flags=0}}}}, iov_len=7416}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_NETLINK, cmsg_type=0x3}], msg_controllen=24, msg_flags=0}, MSG_TRUNC) = 48
+```
+
+```
+Oct 08 10:22:24 naomi systemd[1]: Starting Network Service...
+Oct 08 10:22:24 naomi systemd-networkd[983]: Could not enumerate rules: Operation not supported
+Oct 08 10:22:24 naomi systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE
+```
+
+Fixes #7027
+---
+ src/network/networkd.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/network/networkd.c b/src/network/networkd.c
+index d5ba6893e..7f7223c0c 100644
+--- a/src/network/networkd.c
++++ b/src/network/networkd.c
+@@ -133,10 +133,8 @@ int main(int argc, char *argv[]) {
+ }
+
+ r = manager_rtnl_enumerate_rules(m);
+- if (r < 0) {
+- log_error_errno(r, "Could not enumerate rules: %m");
+- goto out;
+- }
++ if (r < 0)
++ log_warning_errno(r, "Could not enumerate rules: %m");
+
+ r = manager_start(m);
+ if (r < 0) {
+--
+2.14.2
+
diff --git a/sys-apps/systemd/files/generator-path.patch b/sys-apps/systemd/files/generator-path.patch
new file mode 100644
index 000000000000..6912b481f20b
--- /dev/null
+++ b/sys-apps/systemd/files/generator-path.patch
@@ -0,0 +1,27 @@
+From d9287b10d714175521e3bcd6c53de4819b1357c5 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 17 Jul 2017 11:21:25 -0400
+Subject: [PATCH 1/3] path-lookup: look for generators in
+ {,/usr}/lib/systemd/system-generators
+
+Bug: https://bugs.gentoo.org/625402
+---
+ src/shared/path-lookup.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
+index e2b3f8b74..1ee0e1cdb 100644
+--- a/src/shared/path-lookup.c
++++ b/src/shared/path-lookup.c
+@@ -821,6 +821,8 @@ char **generator_binary_paths(UnitFileScope scope) {
+ return strv_new("/run/systemd/system-generators",
+ "/etc/systemd/system-generators",
+ "/usr/local/lib/systemd/system-generators",
++ "/usr/lib/systemd/system-generators",
++ "/lib/systemd/system-generators",
+ SYSTEM_GENERATOR_PATH,
+ NULL);
+
+--
+2.14.0
+
diff --git a/sys-apps/systemd/files/nsswitch.conf b/sys-apps/systemd/files/nsswitch.conf
new file mode 100644
index 000000000000..00667c0c088e
--- /dev/null
+++ b/sys-apps/systemd/files/nsswitch.conf
@@ -0,0 +1,27 @@
+# Sample nss configuration for systemd
+
+# systemd-specific modules
+# See the manual pages fore further information.
+# nss-myhostname - host resolution for the local hostname
+# nss-mymachines - host, user, group resolution for containers
+# nss-resolve - host resolution using resolved
+# nss-systemd - dynamic user/group resolution (DynamicUser in unit files)
+
+passwd: compat mymachines systemd
+shadow: compat
+group: compat mymachines systemd
+gshadow: files
+
+hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
+networks: files
+
+services: db files
+protocols: db files
+rpc: db files
+ethers: db files
+netmasks: files
+netgroup: files
+bootparams: files
+
+automount: files
+aliases: files
diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml
new file mode 100644
index 000000000000..357ed6005f92
--- /dev/null
+++ b/sys-apps/systemd/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>systemd@gentoo.org</email>
+ <name>Gentoo systemd team</name>
+ </maintainer>
+ <slots>
+ <subslots>Incremented for ABI breaks in libudev or libsystemd</subslots>
+ </slots>
+ <use>
+ <flag name="apparmor">Enable AppArmor support</flag>
+ <flag name="audit">Enable support for <pkg>sys-process/audit</pkg></flag>
+ <!-- TODO: drop reference to systemd-import once the oldest release in tree is >218 -->
+ <flag name="curl">Enable support for uploading journals; required to build systemd-import/systemd-pull</flag>
+ <flag name="cryptsetup">Enable cryptsetup tools (includes unit generator for crypttab)</flag>
+ <flag name="doc">Generate systemd.index.7 and systemd.directives.7</flag>
+ <flag name="gnuefi">Enable EFI boot manager and stub loader (built using <pkg>sys-boot/gnu-efi</pkg>)</flag>
+ <flag name="elfutils">Enable coredump stacktraces in the journal</flag>
+ <!-- TODO: drop reference to systemd-import once the oldest release in tree is >218 -->
+ <flag name="gcrypt">Enable sealing of journal files using gcrypt; required to build systemd-import/systemd-pull</flag>
+ <flag name="http">Enable embedded HTTP server in journald</flag>
+ <flag name="importd">Enable import daemon</flag>
+ <flag name="kmod">Enable kernel module loading via <pkg>sys-apps/kmod</pkg></flag>
+ <flag name="libidn2">If IDN support is enabled, use <pkg>net-dns/libidn2</pkg> instead of <pkg>net-dns/libidn</pkg></flag>
+ <flag name="lz4">Enable lz4 compression for the journal</flag>
+ <flag name="nat">Enable support for network address translation in networkd</flag>
+ <flag name="qrcode">Enable qrcode output support in journal</flag>
+ <flag name="sysv-utils">Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown</flag>
+ <flag name="vanilla">Disable Gentoo-specific behavior and compatibility quirks</flag>
+ <flag name="xkb">Depend on <pkg>x11-libs/libxkbcommon</pkg> to allow logind to control the X11 keymap</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">systemd/systemd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/systemd/systemd-233-r4.ebuild b/sys-apps/systemd/systemd-233-r4.ebuild
new file mode 100644
index 000000000000..b263e395680b
--- /dev/null
+++ b/sys-apps/systemd/systemd-233-r4.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )"
+ KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 ~sparc x86"
+fi
+
+PYTHON_COMPAT=( python{3_4,3_5,3_6} )
+
+inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http
+ idn importd +kmod +lz4 lzma nat pam policykit
+ qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
+ curl? ( net-misc/curl:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=
+ ssl? ( >=net-libs/gnutls-3.1.4:0= )
+ )
+ idn? ( net-dns/libidn:0= )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ kmod? ( >=sys-apps/kmod-15:0= )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ sysv-utils? (
+ !sys-apps/systemd-sysv-utils
+ !sys-apps/sysvinit )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !sys-fs/eudev
+ !sys-fs/udev"
+
+# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
+PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ >=sys-kernel/linux-headers-${MINKV}
+ virtual/pkgconfig
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') )
+"
+
+python_check_deps() {
+ has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ # Bug 463376
+ sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
+
+ local PATCHES=(
+ "${FILESDIR}/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch"
+ "${FILESDIR}/233-CVE-2017-9445.patch"
+ "${FILESDIR}/233-format-warnings.patch"
+ "${FILESDIR}/233-0002-core-load-fragment-refuse-units-with-errors-in-RootD.patch"
+ "${FILESDIR}/233-0003-core-load-fragment-refuse-units-with-errors-in-certa.patch"
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/228-noclean-tmp.patch"
+ "${FILESDIR}/233-systemd-user-pam.patch"
+ )
+ fi
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # Keep using the one where the rules were installed.
+ MY_UDEVDIR=$(get_udevdir)
+ # Fix systems broken by bug #509454.
+ [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
+
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ use doc && python_setup
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ # disable -flto since it is an optimization flag
+ # and makes distcc less effective
+ cc_cv_CFLAGS__flto=no
+ # disable -fuse-ld=gold since Gentoo supports explicit linker
+ # choice and forcing gold is undesired, #539998
+ # ld.gold may collide with user's LDFLAGS, #545168
+ # ld.gold breaks sparc, #573874
+ cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
+
+ # Workaround for gcc-4.7, bug 554454.
+ cc_cv_CFLAGS__Werror_shadow=no
+
+ # Workaround for bug 516346
+ --enable-dependency-tracking
+
+ --disable-maintainer-mode
+ --localstatedir=/var
+ --with-pamlibdir=$(getpam_mod_dir)
+ # avoid bash-completion dep
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in $PATH
+ --enable-split-usr
+ # For testing.
+ --with-rootprefix="${ROOTPREFIX-/usr}"
+ --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
+ # disable sysv compatibility
+ --with-sysvinit-path=
+ --with-sysvrcnd-path=
+ # no deps
+ --enable-efi
+ --enable-ima
+
+ # Optional components/dependencies
+ $(multilib_native_use_enable acl)
+ $(multilib_native_use_enable apparmor)
+ $(multilib_native_use_enable audit)
+ $(multilib_native_use_enable cryptsetup libcryptsetup)
+ $(multilib_native_use_enable curl libcurl)
+ $(multilib_native_use_enable elfutils)
+ $(use_enable gcrypt)
+ $(multilib_native_use_enable gnuefi)
+ --with-efi-libdir="/usr/$(get_libdir)"
+ $(multilib_native_use_enable http microhttpd)
+ $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
+ $(multilib_native_use_enable idn libidn)
+ $(multilib_native_use_enable importd)
+ $(multilib_native_use_enable importd bzip2)
+ $(multilib_native_use_enable importd zlib)
+ $(multilib_native_use_enable kmod)
+ $(use_enable lz4)
+ $(use_enable lzma xz)
+ $(multilib_native_use_enable nat libiptc)
+ $(use_enable pam)
+ $(multilib_native_use_enable policykit polkit)
+ $(multilib_native_use_enable qrcode qrencode)
+ $(multilib_native_use_enable seccomp)
+ $(multilib_native_use_enable selinux)
+ $(multilib_native_use_enable test tests)
+ $(multilib_native_use_enable test dbus)
+ $(multilib_native_use_enable xkb xkbcommon)
+ $(multilib_native_use_with doc python)
+
+ # hardcode a few paths to spare some deps
+ KILL=/bin/kill
+ QUOTAON=/usr/sbin/quotaon
+ QUOTACHECK=/usr/sbin/quotacheck
+
+ # TODO: we may need to restrict this to gcc
+ EFI_CC="$(tc-getCC)"
+
+ # dbus paths
+ --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
+ --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
+ --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
+
+ --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+
+ # Breaks screen, tmux, etc.
+ --without-kill-user-processes
+ )
+
+ # Work around bug 463846.
+ tc-export CC
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ local mymakeopts=(
+ udevlibexecdir="${MY_UDEVDIR}"
+ )
+
+ if multilib_is_native_abi; then
+ emake "${mymakeopts[@]}"
+ else
+ emake built-sources
+ local targets=(
+ '$(rootlib_LTLIBRARIES)'
+ '$(lib_LTLIBRARIES)'
+ '$(pamlib_LTLIBRARIES)'
+ '$(pkgconfiglib_DATA)'
+ )
+ echo "gentoo: ${targets[*]}" | emake "${mymakeopts[@]}" -f Makefile -f - gentoo
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return 0
+ default
+}
+
+multilib_src_install() {
+ local mymakeopts=(
+ # automake fails with parallel libtool relinking
+ # https://bugs.gentoo.org/show_bug.cgi?id=491398
+ -j1
+
+ udevlibexecdir="${MY_UDEVDIR}"
+ dist_udevhwdb_DATA=
+ DESTDIR="${D}"
+ )
+
+ if multilib_is_native_abi; then
+ emake "${mymakeopts[@]}" install
+ else
+ mymakeopts+=(
+ install-rootlibLTLIBRARIES
+ install-libLTLIBRARIES
+ install-pamlibLTLIBRARIES
+ install-pkgconfiglibDATA
+ install-includeHEADERS
+ install-pkgincludeHEADERS
+ )
+
+ emake "${mymakeopts[@]}"
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if [[ ${PV} != 9999 ]]; then
+ use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7
+ fi
+
+ if use sysv-utils; then
+ for app in halt poweroff reboot runlevel shutdown telinit; do
+ dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
+ done
+ dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
+ else
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+ rm "${D}"/usr/share/man/man1/init.1 || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
+ /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
+ /var/log/journal/remote
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ # If we install these symlinks, there is no way for the sysadmin to remove them
+ # permanently.
+ rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
+ rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
+ rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
+ rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
+ rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
+ local locale_conf="${EROOT%/}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+pkg_postinst() {
+ newusergroup() {
+ enewgroup "$1"
+ enewuser "$1" -1 -1 -1 "$1"
+ }
+
+ enewgroup input
+ enewgroup systemd-journal
+ newusergroup systemd-bus-proxy
+ newusergroup systemd-coredump
+ newusergroup systemd-journal-gateway
+ newusergroup systemd-journal-remote
+ newusergroup systemd-journal-upload
+ newusergroup systemd-network
+ newusergroup systemd-resolve
+ newusergroup systemd-timesync
+
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/systemd/systemd-234-r4.ebuild b/sys-apps/systemd/systemd-234-r4.ebuild
new file mode 100644
index 000000000000..a4c94bd3a96c
--- /dev/null
+++ b/sys-apps/systemd/systemd-234-r4.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+fi
+
+PYTHON_COMPAT=( python{3_4,3_5,3_6} )
+
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http
+ idn importd +kmod libidn2 +lz4 lzma nat pam policykit
+ qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
+ curl? ( net-misc/curl:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=
+ ssl? ( >=net-libs/gnutls-3.1.4:0= )
+ )
+ idn? (
+ libidn2? ( net-dns/libidn2 )
+ !libidn2? ( net-dns/libidn )
+ )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ kmod? ( >=sys-apps/kmod-15:0= )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ sysv-utils? (
+ !sys-apps/systemd-sysv-utils
+ !sys-apps/sysvinit )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !sys-fs/eudev
+ !sys-fs/udev"
+
+# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
+PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ >=sys-kernel/linux-headers-${MINKV}
+ virtual/pkgconfig
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
+"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/234-0002-cryptsetup-fix-infinite-timeout-6486.patch
+ "${FILESDIR}"/234-0003-resolved-make-sure-idn2-conversions-are-roundtrippab.patch
+ "${FILESDIR}"/234-0004-logind-make-sure-we-don-t-process-the-same-method-ca.patch
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/228-noclean-tmp.patch"
+ "${FILESDIR}/233-systemd-user-pam.patch"
+ "${FILESDIR}/234-uucp-group.patch"
+ "${FILESDIR}/generator-path.patch"
+ )
+ fi
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ default
+}
+
+src_configure() {
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ python_setup
+
+ multilib-minimal_src_configure
+}
+
+meson_use() {
+ usex "$1" true false
+}
+
+meson_multilib() {
+ if multilib_is_native_abi; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+meson_multilib_native_use() {
+ if multilib_is_native_abi && use "$1"; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --localstatedir="${EPREFIX}/var"
+ -Dpamlibdir="$(getpam_mod_dir)"
+ # avoid bash-completion dep
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in $PATH
+ -Dsplit-usr=true
+ -Drootprefix="${EPREFIX}${ROOTPREFIX}"
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ # no deps
+ -Defi=$(meson_multilib)
+ -Dima=true
+ # Optional components/dependencies
+ -Dacl=$(meson_multilib_native_use acl)
+ -Dapparmor=$(meson_multilib_native_use apparmor)
+ -Daudit=$(meson_multilib_native_use audit)
+ -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
+ -Dlibcurl=$(meson_multilib_native_use curl)
+ -Delfutils=$(meson_multilib_native_use elfutils)
+ -Dgcrypt=$(meson_use gcrypt)
+ -Dgnu-efi=$(meson_multilib_native_use gnuefi)
+ -Defi-libdir="/usr/$(get_libdir)"
+ -Dmicrohttpd=$(meson_multilib_native_use http)
+ $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
+ -Dimportd=$(meson_multilib_native_use importd)
+ -Dbzip2=$(meson_multilib_native_use importd)
+ -Dzlib=$(meson_multilib_native_use importd)
+ -Dkmod=$(meson_multilib_native_use kmod)
+ -Dlz4=$(meson_use lz4)
+ -Dxz=$(meson_use lzma)
+ -Dlibiptc=$(meson_multilib_native_use nat)
+ -Dpam=$(meson_use pam)
+ -Dpolkit=$(meson_multilib_native_use policykit)
+ -Dqrencode=$(meson_multilib_native_use qrcode)
+ -Dseccomp=$(meson_multilib_native_use seccomp)
+ -Dselinux=$(meson_multilib_native_use selinux)
+ #-Dtests=$(meson_multilib_native_use test)
+ -Ddbus=$(meson_multilib_native_use test)
+ -Dxkbcommon=$(meson_multilib_native_use xkb)
+ # hardcode a few paths to spare some deps
+ -Dpath-kill=/bin/kill
+ -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+ # Breaks screen, tmux, etc.
+ -Ddefault-kill-user-processes=false
+
+ # multilib options
+ -Dbacklight=$(meson_multilib)
+ -Dbinfmt=$(meson_multilib)
+ -Dcoredump=$(meson_multilib)
+ -Denvironment-d=$(meson_multilib)
+ -Dfirstboot=$(meson_multilib)
+ -Dhibernate=$(meson_multilib)
+ -Dhostnamed=$(meson_multilib)
+ -Dhwdb=$(meson_multilib)
+ -Dldconfig=$(meson_multilib)
+ -Dlocaled=$(meson_multilib)
+ -Dman=$(meson_multilib)
+ -Dnetworkd=$(meson_multilib)
+ -Dquotacheck=$(meson_multilib)
+ -Drandomseed=$(meson_multilib)
+ -Drfkill=$(meson_multilib)
+ -Dsysusers=$(meson_multilib)
+ -Dtimedated=$(meson_multilib)
+ -Dtimesyncd=$(meson_multilib)
+ -Dtmpfiles=$(meson_multilib)
+ -Dvconsole=$(meson_multilib)
+ )
+
+ if multilib_is_native_abi && use idn; then
+ myconf+=(
+ -Dlibidn2=$(usex libidn2 true false)
+ -Dlibidn=$(usex libidn2 false true)
+ )
+ else
+ myconf+=(
+ -Dlibidn2=false
+ -Dlibidn=false
+ )
+ fi
+
+ meson_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_test() {
+ eninja test
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
+
+multilib_src_install_all() {
+ # meson doesn't know about docdir
+ mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
+
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if use sysv-utils; then
+ for app in halt poweroff reboot runlevel shutdown telinit; do
+ dosym "${EPREFIX}${ROOTPREFIX%/}/bin/systemctl" /sbin/${app}
+ done
+ dosym "${EPREFIX}${ROOTPREFIX%/}/lib/systemd/systemd" /sbin/init
+ else
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+ rm "${ED%/}"/usr/share/man/man1/init.1 || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
+ /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
+ /var/log/journal/remote
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ # If we install these symlinks, there is no way for the sysadmin to remove them
+ # permanently.
+ rm "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
+ rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
+ rm -r "${ED%/}"/etc/systemd/system/network-online.target.wants || die
+ rm -r "${ED%/}"/etc/systemd/system/sockets.target.wants || die
+ rm -r "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
+
+ rm -r "${ED%/}${ROOTPREFIX%/}/lib/udev/hwdb.d" || die
+
+ if [[ ! -e "${ED%/}"/usr/lib/systemd/systemd ]]; then
+ # Avoid breaking boot/reboot
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd" /usr/lib/systemd/systemd
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd-shutdown" /usr/lib/systemd/systemd-shutdown
+ fi
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
+ local locale_conf="${EROOT%/}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # If /lib/systemd and /usr/lib/systemd are the same directory, remove the
+ # symlinks we created in src_install.
+ if [[ $(realpath "${EROOT%/}${ROOTPREFIX}/lib/systemd") == $(realpath "${EROOT%/}/usr/lib/systemd") ]]; then
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd" || die
+ fi
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd-shutdown ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd-shutdown" || die
+ fi
+ fi
+}
+
+pkg_postinst() {
+ newusergroup() {
+ enewgroup "$1"
+ enewuser "$1" -1 -1 -1 "$1"
+ }
+
+ enewgroup input
+ enewgroup kvm 78
+ enewgroup systemd-journal
+ newusergroup systemd-bus-proxy
+ newusergroup systemd-coredump
+ newusergroup systemd-journal-gateway
+ newusergroup systemd-journal-remote
+ newusergroup systemd-journal-upload
+ newusergroup systemd-network
+ newusergroup systemd-resolve
+ newusergroup systemd-timesync
+
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${EROOT%/}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+
+ if [[ -e "${EROOT%/}"/usr/lib/systemd/system-generators ]]; then
+ ewarn "Please rebuild any packages which install system generators."
+ ewarn " emerge --oneshot --usepkg=n /usr/lib/systemd/system-generators"
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/systemd/systemd-235.ebuild b/sys-apps/systemd/systemd-235.ebuild
new file mode 100644
index 000000000000..ad4e3f4ab5fa
--- /dev/null
+++ b/sys-apps/systemd/systemd-235.ebuild
@@ -0,0 +1,446 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+PYTHON_COMPAT=( python{3_4,3_5,3_6} )
+
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http
+ idn importd +kmod libidn2 +lz4 lzma nat pam policykit
+ qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
+ curl? ( net-misc/curl:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=
+ ssl? ( >=net-libs/gnutls-3.1.4:0= )
+ )
+ idn? (
+ libidn2? ( net-dns/libidn2 )
+ !libidn2? ( net-dns/libidn )
+ )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ kmod? ( >=sys-apps/kmod-15:0= )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ sysv-utils? (
+ !sys-apps/systemd-sysv-utils
+ !sys-apps/sysvinit )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !sys-fs/eudev
+ !sys-fs/udev"
+
+# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
+PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ >=sys-kernel/linux-headers-${MINKV}
+ virtual/pkgconfig
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
+"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/235-0001-test-skip-hwdb-and-sysv-generator-if-the-features-ar.patch
+ "${FILESDIR}"/235-0002-networkd-Don-t-stop-networkd-if-CONFIG_FIB_RULES-n-i.patch
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/228-noclean-tmp.patch"
+ "${FILESDIR}/233-systemd-user-pam.patch"
+ "${FILESDIR}/234-uucp-group.patch"
+ "${FILESDIR}/generator-path.patch"
+ )
+ fi
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ default
+}
+
+src_configure() {
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ python_setup
+
+ multilib-minimal_src_configure
+}
+
+meson_use() {
+ usex "$1" true false
+}
+
+meson_multilib() {
+ if multilib_is_native_abi; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+meson_multilib_native_use() {
+ if multilib_is_native_abi && use "$1"; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --localstatedir="${EPREFIX}/var"
+ -Dpamlibdir="$(getpam_mod_dir)"
+ # avoid bash-completion dep
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in $PATH
+ -Dsplit-usr=true
+ -Drootprefix="${EPREFIX}${ROOTPREFIX}"
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ # no deps
+ -Defi=$(meson_multilib)
+ -Dima=true
+ # Optional components/dependencies
+ -Dacl=$(meson_multilib_native_use acl)
+ -Dapparmor=$(meson_multilib_native_use apparmor)
+ -Daudit=$(meson_multilib_native_use audit)
+ -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
+ -Dlibcurl=$(meson_multilib_native_use curl)
+ -Delfutils=$(meson_multilib_native_use elfutils)
+ -Dgcrypt=$(meson_use gcrypt)
+ -Dgnu-efi=$(meson_multilib_native_use gnuefi)
+ -Defi-libdir="/usr/$(get_libdir)"
+ -Dmicrohttpd=$(meson_multilib_native_use http)
+ $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
+ -Dimportd=$(meson_multilib_native_use importd)
+ -Dbzip2=$(meson_multilib_native_use importd)
+ -Dzlib=$(meson_multilib_native_use importd)
+ -Dkmod=$(meson_multilib_native_use kmod)
+ -Dlz4=$(meson_use lz4)
+ -Dxz=$(meson_use lzma)
+ -Dlibiptc=$(meson_multilib_native_use nat)
+ -Dpam=$(meson_use pam)
+ -Dpolkit=$(meson_multilib_native_use policykit)
+ -Dqrencode=$(meson_multilib_native_use qrcode)
+ -Dseccomp=$(meson_multilib_native_use seccomp)
+ -Dselinux=$(meson_multilib_native_use selinux)
+ #-Dtests=$(meson_multilib_native_use test)
+ -Ddbus=$(meson_multilib_native_use test)
+ -Dxkbcommon=$(meson_multilib_native_use xkb)
+ # hardcode a few paths to spare some deps
+ -Dpath-kill=/bin/kill
+ -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+ # Breaks screen, tmux, etc.
+ -Ddefault-kill-user-processes=false
+
+ # multilib options
+ -Dbacklight=$(meson_multilib)
+ -Dbinfmt=$(meson_multilib)
+ -Dcoredump=$(meson_multilib)
+ -Denvironment-d=$(meson_multilib)
+ -Dfirstboot=$(meson_multilib)
+ -Dhibernate=$(meson_multilib)
+ -Dhostnamed=$(meson_multilib)
+ -Dhwdb=$(meson_multilib)
+ -Dldconfig=$(meson_multilib)
+ -Dlocaled=$(meson_multilib)
+ -Dman=$(meson_multilib)
+ -Dnetworkd=$(meson_multilib)
+ -Dquotacheck=$(meson_multilib)
+ -Drandomseed=$(meson_multilib)
+ -Drfkill=$(meson_multilib)
+ -Dsysusers=$(meson_multilib)
+ -Dtimedated=$(meson_multilib)
+ -Dtimesyncd=$(meson_multilib)
+ -Dtmpfiles=$(meson_multilib)
+ -Dvconsole=$(meson_multilib)
+ )
+
+ if multilib_is_native_abi && use idn; then
+ myconf+=(
+ -Dlibidn2=$(usex libidn2 true false)
+ -Dlibidn=$(usex libidn2 false true)
+ )
+ else
+ myconf+=(
+ -Dlibidn2=false
+ -Dlibidn=false
+ )
+ fi
+
+ meson_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_test() {
+ eninja test
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
+
+multilib_src_install_all() {
+ # meson doesn't know about docdir
+ mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
+
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if use sysv-utils; then
+ for app in halt poweroff reboot runlevel shutdown telinit; do
+ dosym "${EPREFIX}${ROOTPREFIX%/}/bin/systemctl" /sbin/${app}
+ done
+ dosym "${EPREFIX}${ROOTPREFIX%/}/lib/systemd/systemd" /sbin/init
+ else
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+ rm "${ED%/}"/usr/share/man/man1/init.1 || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
+ /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
+ /var/log/journal/remote
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ # If we install these symlinks, there is no way for the sysadmin to remove them
+ # permanently.
+ rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
+ rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
+ rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
+ rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
+ rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
+ rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
+ rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
+
+ rm -r "${ED%/}${ROOTPREFIX%/}/lib/udev/hwdb.d" || die
+
+ if [[ ! -e "${ED%/}"/usr/lib/systemd/systemd ]]; then
+ # Avoid breaking boot/reboot
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd" /usr/lib/systemd/systemd
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd-shutdown" /usr/lib/systemd/systemd-shutdown
+ fi
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
+ local locale_conf="${EROOT%/}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # If /lib/systemd and /usr/lib/systemd are the same directory, remove the
+ # symlinks we created in src_install.
+ if [[ $(realpath "${EROOT%/}${ROOTPREFIX}/lib/systemd") == $(realpath "${EROOT%/}/usr/lib/systemd") ]]; then
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd" || die
+ fi
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd-shutdown ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd-shutdown" || die
+ fi
+ fi
+}
+
+pkg_postinst() {
+ newusergroup() {
+ enewgroup "$1"
+ enewuser "$1" -1 -1 -1 "$1"
+ }
+
+ enewgroup input
+ enewgroup kvm 78
+ enewgroup systemd-journal
+ newusergroup systemd-bus-proxy
+ newusergroup systemd-coredump
+ newusergroup systemd-journal-gateway
+ newusergroup systemd-journal-remote
+ newusergroup systemd-journal-upload
+ newusergroup systemd-network
+ newusergroup systemd-resolve
+ newusergroup systemd-timesync
+
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${EROOT%/}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
new file mode 100644
index 000000000000..089c6a2d7a7e
--- /dev/null
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -0,0 +1,444 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+PYTHON_COMPAT=( python{3_4,3_5,3_6} )
+
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http
+ idn importd +kmod libidn2 +lz4 lzma nat pam policykit
+ qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
+ curl? ( net-misc/curl:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=
+ ssl? ( >=net-libs/gnutls-3.1.4:0= )
+ )
+ idn? (
+ libidn2? ( net-dns/libidn2 )
+ !libidn2? ( net-dns/libidn )
+ )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ kmod? ( >=sys-apps/kmod-15:0= )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ sysv-utils? (
+ !sys-apps/systemd-sysv-utils
+ !sys-apps/sysvinit )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !sys-fs/eudev
+ !sys-fs/udev"
+
+# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
+PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ >=sys-kernel/linux-headers-${MINKV}
+ virtual/pkgconfig
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
+"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ local PATCHES=(
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/228-noclean-tmp.patch"
+ "${FILESDIR}/233-systemd-user-pam.patch"
+ "${FILESDIR}/234-uucp-group.patch"
+ "${FILESDIR}/generator-path.patch"
+ )
+ fi
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ default
+}
+
+src_configure() {
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ python_setup
+
+ multilib-minimal_src_configure
+}
+
+meson_use() {
+ usex "$1" true false
+}
+
+meson_multilib() {
+ if multilib_is_native_abi; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+meson_multilib_native_use() {
+ if multilib_is_native_abi && use "$1"; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --localstatedir="${EPREFIX}/var"
+ -Dpamlibdir="$(getpam_mod_dir)"
+ # avoid bash-completion dep
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in $PATH
+ -Dsplit-usr=true
+ -Drootprefix="${EPREFIX}${ROOTPREFIX}"
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ # no deps
+ -Defi=$(meson_multilib)
+ -Dima=true
+ # Optional components/dependencies
+ -Dacl=$(meson_multilib_native_use acl)
+ -Dapparmor=$(meson_multilib_native_use apparmor)
+ -Daudit=$(meson_multilib_native_use audit)
+ -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
+ -Dlibcurl=$(meson_multilib_native_use curl)
+ -Delfutils=$(meson_multilib_native_use elfutils)
+ -Dgcrypt=$(meson_use gcrypt)
+ -Dgnu-efi=$(meson_multilib_native_use gnuefi)
+ -Defi-libdir="/usr/$(get_libdir)"
+ -Dmicrohttpd=$(meson_multilib_native_use http)
+ $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
+ -Dimportd=$(meson_multilib_native_use importd)
+ -Dbzip2=$(meson_multilib_native_use importd)
+ -Dzlib=$(meson_multilib_native_use importd)
+ -Dkmod=$(meson_multilib_native_use kmod)
+ -Dlz4=$(meson_use lz4)
+ -Dxz=$(meson_use lzma)
+ -Dlibiptc=$(meson_multilib_native_use nat)
+ -Dpam=$(meson_use pam)
+ -Dpolkit=$(meson_multilib_native_use policykit)
+ -Dqrencode=$(meson_multilib_native_use qrcode)
+ -Dseccomp=$(meson_multilib_native_use seccomp)
+ -Dselinux=$(meson_multilib_native_use selinux)
+ #-Dtests=$(meson_multilib_native_use test)
+ -Ddbus=$(meson_multilib_native_use test)
+ -Dxkbcommon=$(meson_multilib_native_use xkb)
+ # hardcode a few paths to spare some deps
+ -Dpath-kill=/bin/kill
+ -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+ # Breaks screen, tmux, etc.
+ -Ddefault-kill-user-processes=false
+
+ # multilib options
+ -Dbacklight=$(meson_multilib)
+ -Dbinfmt=$(meson_multilib)
+ -Dcoredump=$(meson_multilib)
+ -Denvironment-d=$(meson_multilib)
+ -Dfirstboot=$(meson_multilib)
+ -Dhibernate=$(meson_multilib)
+ -Dhostnamed=$(meson_multilib)
+ -Dhwdb=$(meson_multilib)
+ -Dldconfig=$(meson_multilib)
+ -Dlocaled=$(meson_multilib)
+ -Dman=$(meson_multilib)
+ -Dnetworkd=$(meson_multilib)
+ -Dquotacheck=$(meson_multilib)
+ -Drandomseed=$(meson_multilib)
+ -Drfkill=$(meson_multilib)
+ -Dsysusers=$(meson_multilib)
+ -Dtimedated=$(meson_multilib)
+ -Dtimesyncd=$(meson_multilib)
+ -Dtmpfiles=$(meson_multilib)
+ -Dvconsole=$(meson_multilib)
+ )
+
+ if multilib_is_native_abi && use idn; then
+ myconf+=(
+ -Dlibidn2=$(usex libidn2 true false)
+ -Dlibidn=$(usex libidn2 false true)
+ )
+ else
+ myconf+=(
+ -Dlibidn2=false
+ -Dlibidn=false
+ )
+ fi
+
+ meson_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_test() {
+ eninja test
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
+
+multilib_src_install_all() {
+ # meson doesn't know about docdir
+ mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
+
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if use sysv-utils; then
+ for app in halt poweroff reboot runlevel shutdown telinit; do
+ dosym "${EPREFIX}${ROOTPREFIX%/}/bin/systemctl" /sbin/${app}
+ done
+ dosym "${EPREFIX}${ROOTPREFIX%/}/lib/systemd/systemd" /sbin/init
+ else
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+ rm "${ED%/}"/usr/share/man/man1/init.1 || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
+ /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
+ /var/log/journal/remote
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ # If we install these symlinks, there is no way for the sysadmin to remove them
+ # permanently.
+ rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
+ rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
+ rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
+ rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
+ rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
+ rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
+ rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
+
+ rm -r "${ED%/}${ROOTPREFIX%/}/lib/udev/hwdb.d" || die
+
+ if [[ ! -e "${ED%/}"/usr/lib/systemd/systemd ]]; then
+ # Avoid breaking boot/reboot
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd" /usr/lib/systemd/systemd
+ dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd-shutdown" /usr/lib/systemd/systemd-shutdown
+ fi
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
+ local locale_conf="${EROOT%/}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # If /lib/systemd and /usr/lib/systemd are the same directory, remove the
+ # symlinks we created in src_install.
+ if [[ $(realpath "${EROOT%/}${ROOTPREFIX}/lib/systemd") == $(realpath "${EROOT%/}/usr/lib/systemd") ]]; then
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd" || die
+ fi
+ if [[ -L ${ED%/}/usr/lib/systemd/systemd-shutdown ]]; then
+ rm "${ED%/}/usr/lib/systemd/systemd-shutdown" || die
+ fi
+ fi
+}
+
+pkg_postinst() {
+ newusergroup() {
+ enewgroup "$1"
+ enewuser "$1" -1 -1 -1 "$1"
+ }
+
+ enewgroup input
+ enewgroup kvm 78
+ enewgroup systemd-journal
+ newusergroup systemd-bus-proxy
+ newusergroup systemd-coredump
+ newusergroup systemd-journal-gateway
+ newusergroup systemd-journal-remote
+ newusergroup systemd-journal-upload
+ newusergroup systemd-network
+ newusergroup systemd-resolve
+ newusergroup systemd-timesync
+
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${EROOT%/}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
new file mode 100644
index 000000000000..5904c8f9fdcb
--- /dev/null
+++ b/sys-apps/sysvinit/Manifest
@@ -0,0 +1,13 @@
+AUX inittab-2.88 1928 SHA256 6980758105a80c7957f8444aaf3e9db8e3354e98fb463451529d3f43071c2f73 SHA512 71476e1e07e288796887c7cfdf359523403816adb939c5c364b4fafef3dabd3e7eefb354bc09343606af4804a10247b5f345b404a5490fcdae8937287a84a990 WHIRLPOOL a00d9a6a5fa01021a2c3f7998f2da4f5a27ecf557b8e403b4756ec0b6da47f3a273abd87157ceeb2d38581c32b620aa829c7f8e0ab029ed3c926b466bd69b26e
+AUX sysvinit-2.86-kexec.patch 3910 SHA256 a9d764afc05ae73c2153b024a3b9e3295ba913e14e9684ddf1fd94467e4bc823 SHA512 6ce3adf698554d15394edbe6dbfc62822859854d503b201c9f96bd81c2a8cd249ed44229a85dd8b97f454f9311abc5792e349f5cc512ff6d5570500d88044bee WHIRLPOOL aecabc2b97e80d401bba856a38ab92d66c038eb00fe58e56e7e87d6ecb4ef0ec8e07534430887eb3f204dfac20f2d94e6ea81e2d7597e3a937442f376f703887
+AUX sysvinit-2.86-shutdown-single.patch 1229 SHA256 78852ca410e7ee23bf69cb6e566cb90404d8c8b7bcc10b264f66c97e0359d431 SHA512 b1fa6225cdb0d5ed6d2d3128a9ad29dc76f14845c3fe57aa2edf234af456ae49f700b25ed4170a6337f662be224bd6ddfd424331483b0c482fd33cd045ddc575 WHIRLPOOL a770eec46053c67a047832742197b8d30d8b5e2e27cad0dc4f608cbccde0b5ece7e08102c51372cc0b33304e266e3b03156d12209db14fbe61800b312ad556aa
+AUX sysvinit-2.88-makefile.patch 1546 SHA256 933bf495538ac92a9b1f3a4623f423b0cb15b37aa4a09f3612f40069dd58a5b7 SHA512 8cc6d2b3fe43d9040aa9f54b2ac448c3dbe986de629638052ddc294b2589ed283b51cc25d9b73e8dac5c5183a5c0675799fa425cf44523636c3ad1a943f1e4a5 WHIRLPOOL 4f999b12dfd51628fa7696afb35381374daece9535d97b1aee4a56dc183c33bd8cd1445a75f561ae5c2ba85da0149dddb6d62053572521c8ec5e296c84fdf4da
+AUX sysvinit-2.88-selinux.patch 1041 SHA256 e987ab6e478e5b3987ae1c6e338cfc66ae356f704d0c3ea932f9e4335b4986f0 SHA512 46eeb3ab2dd25f314b9f60b2dc8a7da2aa2aafb978953a730ccc36456d240e317930e86df69ce2592cf45978f3307dfc2522b24ae1158e64ff17dfa6ed84dcb8 WHIRLPOOL 4fe319df09759addf9499367a6da47e8effe93ec0a4ba5b7e7b1d0c746b324a303cdc81eb360c81e529faf41260d69e2b4364d6695b390db9dba1e3d1693c872
+AUX sysvinit-2.88-shutdown-h.patch 1626 SHA256 642585158e6fbb185ed53804be2eeea85c037726ed19beb51a9ffb594e63ca0f SHA512 244ed7c2242f52674153ccfebb92c7a9bdc68a25f98aacbbf107ddfce11b195483e90150619fbeae3167136fcb54b878f8eb77e2dfe225d9f2eeb2c182e5e2fe WHIRLPOOL 6500d8be6313190e5ccf8ca0fe3d51ef879458f59e7ebe1849f666f3c20ffdea21d73f2951e978ac0bf7dce1f47be0113e129db784fdabb6f4407e4d78a3cb0d
+AUX sysvinit-2.88-sysmacros.patch 224 SHA256 64cc0d464fbf2292ea523c9e79702e6f6eb2af778c9beef24162f2b9cbe2cbc3 SHA512 217fc75d34a19caebcdc56967f7cc9664d46d1523fc09b17369d10d61389dd7b93b8863ec292427603ed55aa68e86d5a81839f1da480b7654d78a4b01d83df43 WHIRLPOOL b9ef59de6140be237a69b69c3779bee01dd81527562444bb555cc77d0eb2179df01530dae144b3d744c05aa8aa7b7db5131c0c87a5b7d56a40ce2ae3327de7b8
+AUX sysvinit-2.88-ttydefaults.patch 266 SHA256 ac2dd0cba71c1bb501a1e164222c8480e930df7b650d2c16dd3f6d471270ce33 SHA512 d27c0f0ae4d2c6ddb9622c76571c0a4260b2c537ec7fcbc3c56b4e461f43238e5c9f8072f2db582bf5e625320e963e840aac247c83ec2438c3454d7cdc1b3198 WHIRLPOOL 9c4e4e119ed87dbf099f01be92d47793816c4ac31ab0288881f4aeb981c373082be0eaf96b759488cee92c4585cd1ca05d2404adddb1bbed5253119c228d0940
+DIST sysvinit-2.88dsf.tar.bz2 105551 SHA256 60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519 SHA512 0bd8eeb124e84fdfa8e621b05f796804ee69a9076b65f5115826bfa814ac1d5d28d31a5c22ebe77c86a93b2288edf4891adc0afaecc4de656c4ecda8a83807bf WHIRLPOOL f4809e19ea2c72c733d3c09a4964d7a6e67b091d1f1d9ef276515b2f138148bfbf516034d3fb1009289f9520f2fbe9e29687f432bba06fb437ebd6e2b9ef570c
+EBUILD sysvinit-2.88-r9.ebuild 3470 SHA256 367ca905ea802223f4a32e2f71d078cb00d5e675c904bf635a8ba8f94bce459e SHA512 3beb173dc4b830874f20e16f9d079abba86c2813f81719d091c174aed9591a803fb92d5fa2d20884f8aebb755b6735fa6183613271a576cd93f51c17a072b0f5 WHIRLPOOL 38ec93137e525d96365c57f565206cc4b726e41c57732a7321f60d3398178d479c5efa187422f600a600c50e6c4fe6385057770cd41d8341806627a59bc845d6
+MISC ChangeLog 6609 SHA256 2927af5980b8b65ada7026409c1f00cd1b76ec58f72f2f11d9a14bde20ff10e1 SHA512 b5f6c71caf6ad0a506bb1804f7141a889c0857749bf1ba884d7d2a9302cf851fdfa4c261f440210ded970fe8cf065a425dd02019276909cf58c015886804faf2 WHIRLPOOL fda83760fdf5b9b7bf2e3ee720d6f920bbfbb342b8e20b1a24b33401f5a617eb2de510b4abf7175ba3fd0d745d24b361241c4a220c8a8a1859410dc75dfb38be
+MISC ChangeLog-2015 21167 SHA256 046ef182e1c055ba8c6a745a79fd9d89fbfc633f12f7ab82128f5c55e81df34e SHA512 4f7e35563a74ddf31e0d0e28ee3ae0c0369c12b0d2420506f53d1267d651a1b77f48a263dbaac00fd6e4d23f1980fe458ac8ff95313042c16361178721c8f78d WHIRLPOOL 399470a61330172d5bed008f9b57ff4820f7ff770cd399c7f244afca4be588196cdb1b7cc7de8858945918fddc74febae179ace497cf7a7dd390a3027db067ef
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/sysvinit/files/inittab-2.88 b/sys-apps/sysvinit/files/inittab-2.88
new file mode 100644
index 000000000000..baab75b31acc
--- /dev/null
+++ b/sys-apps/sysvinit/files/inittab-2.88
@@ -0,0 +1,59 @@
+#
+# /etc/inittab: This file describes how the INIT process should set up
+# the system in a certain run-level.
+#
+# Author: Miquel van Smoorenburg, <miquels@cistron.nl>
+# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
+# Modified by: Daniel Robbins, <drobbins@gentoo.org>
+# Modified by: Martin Schlemmer, <azarah@gentoo.org>
+# Modified by: Mike Frysinger, <vapier@gentoo.org>
+# Modified by: Robin H. Johnson, <robbat2@gentoo.org>
+# Modified by: William Hubbs, <williamh@gentoo.org>
+#
+
+# Default runlevel.
+id:3:initdefault:
+
+# System initialization, mount local filesystems, etc.
+si::sysinit:/sbin/openrc sysinit
+
+# Further system initialization, brings up the boot runlevel.
+rc::bootwait:/sbin/openrc boot
+
+l0:0:wait:/sbin/openrc shutdown
+l0s:0:wait:/sbin/halt -dhnp
+l1:1:wait:/sbin/openrc single
+l2:2:wait:/sbin/openrc nonetwork
+l3:3:wait:/sbin/openrc default
+l4:4:wait:/sbin/openrc default
+l5:5:wait:/sbin/openrc default
+l6:6:wait:/sbin/openrc reboot
+l6r:6:wait:/sbin/reboot -dkn
+#z6:6:respawn:/sbin/sulogin
+
+# new-style single-user
+su0:S:wait:/sbin/openrc single
+su1:S:wait:/sbin/sulogin
+
+# TERMINALS
+#x1:12345:respawn:/sbin/agetty 38400 console linux
+c1:12345:respawn:/sbin/agetty 38400 tty1 linux
+c2:2345:respawn:/sbin/agetty 38400 tty2 linux
+c3:2345:respawn:/sbin/agetty 38400 tty3 linux
+c4:2345:respawn:/sbin/agetty 38400 tty4 linux
+c5:2345:respawn:/sbin/agetty 38400 tty5 linux
+c6:2345:respawn:/sbin/agetty 38400 tty6 linux
+
+# SERIAL CONSOLES
+#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
+#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
+
+# What to do at the "Three Finger Salute".
+ca:12345:ctrlaltdel:/sbin/shutdown -r now
+
+# Used by /etc/init.d/xdm to control DM startup.
+# Read the comments in /etc/init.d/xdm for more
+# info. Do NOT remove, as this will start nothing
+# extra at boot if /etc/init.d/xdm is not added
+# to the "default" runlevel.
+x:a:once:/etc/X11/startDM.sh
diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch b/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
new file mode 100644
index 000000000000..4948806d9eb9
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
@@ -0,0 +1,142 @@
+halt: add a -k kexec flag
+
+--- a/man/halt.8
++++ b/man/halt.8
+@@ -40,6 +40,7 @@ halt, reboot, poweroff \- stop the system.
+ .RB [ \-d ]
+ .RB [ \-f ]
+ .RB [ \-i ]
++.RB [ \-k ]
+ .br
+ .B /sbin/poweroff
+ .RB [ \-n ]
+@@ -83,6 +84,8 @@ Put all hard drives on the system in stand-by mode just before halt or power-off
+ .IP \fB\-p\fP
+ When halting the system, switch off the power. This is the default when halt is
+ called as \fBpoweroff\fP.
++.IP \fB\-k\fP
++Try to reboot using \fBkexec\fP, if kernel supports it.
+ .\"}}}
+ .\"{{{ Diagnostics
+ .SH DIAGNOSTICS
+--- a/src/halt.c
++++ b/src/halt.c
+@@ -8,7 +8,7 @@
+ * execute an "shutdown -r". This is for compatibility with
+ * sysvinit 2.4.
+ *
+- * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p]
++ * Usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] [-k]
+ * -n: don't sync before halting the system
+ * -w: only write a wtmp reboot record and exit.
+ * -d: don't write a wtmp record.
+@@ -16,6 +16,7 @@
+ * -h: put harddisks in standby mode
+ * -i: shut down all network interfaces.
+ * -p: power down the system (if possible, otherwise halt).
++ * -k: reboot the system using kexec.
+ *
+ * Reboot and halt are both this program. Reboot
+ * is just a link to halt. Invoking the program
+@@ -74,8 +75,10 @@ extern void write_wtmp(char *user, char *id, int pid, int type, char *line);
+ */
+ void usage(void)
+ {
+- fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n",
+- progname, strcmp(progname, "halt") ? "" : " [-p]");
++ fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s%s\n",
++ progname,
++ strcmp(progname, "halt") ? "" : " [-p]",
++ strcmp(progname, "reboot") ? "" : " [-k]");
+ fprintf(stderr, "\t-n: don't sync before halting the system\n");
+ fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n");
+ fprintf(stderr, "\t-d: don't write a wtmp record.\n");
+@@ -84,6 +87,8 @@ void usage(void)
+ fprintf(stderr, "\t-i: shut down all network interfaces.\n");
+ if (!strcmp(progname, "halt"))
+ fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n");
++ if (!strcmp(progname, "reboot"))
++ fprintf(stderr, "\t-k: reboot the system using kexec.\n");
+ exit(1);
+ }
+
+@@ -182,6 +187,7 @@ int main(int argc, char **argv)
+ int do_ifdown = 0;
+ int do_hddown = 0;
+ int do_poweroff = 0;
++ int do_kexec = 0;
+ int c;
+ char *tm = NULL;
+
+@@ -201,7 +207,7 @@ int main(int argc, char **argv)
+ /*
+ * Get flags
+ */
+- while((c = getopt(argc, argv, ":ihdfnpwt:")) != EOF) {
++ while((c = getopt(argc, argv, ":ihdfnpwkt:")) != EOF) {
+ switch(c) {
+ case 'n':
+ do_sync = 0;
+@@ -225,6 +231,9 @@ int main(int argc, char **argv)
+ case 'p':
+ do_poweroff = 1;
+ break;
++ case 'k':
++ do_kexec = 1;
++ break;
+ case 't':
+ tm = optarg;
+ break;
+@@ -242,10 +251,24 @@ int main(int argc, char **argv)
+ (void)chdir("/");
+
+ if (!do_hard && !do_nothing) {
++ c = get_runlevel();
++
++ /*
++ * We can't reboot using kexec through this path.
++ */
++ if (c != '6' && do_reboot && do_kexec) {
++ fprintf(stderr, "ERROR: using -k at this"
++ " runlevel requires also -f\n"
++ " (You probably want instead to reboot"
++ " normally and let your reboot\n"
++ " script, usually /etc/init.d/reboot,"
++ " specify -k)\n");
++ exit(1);
++ }
++
+ /*
+ * See if we are in runlevel 0 or 6.
+ */
+- c = get_runlevel();
+ if (c != '0' && c != '6')
+ do_shutdown(do_reboot ? "-r" : "-h", tm);
+ }
+@@ -277,6 +300,15 @@ int main(int argc, char **argv)
+ if (do_nothing) exit(0);
+
+ if (do_reboot) {
++ /*
++ * kexec or reboot
++ */
++ if (do_kexec)
++ init_reboot(BMAGIC_KEXEC);
++
++ /*
++ * Fall through if failed
++ */
+ init_reboot(BMAGIC_REBOOT);
+ } else {
+ /*
+--- a/src/reboot.h
++++ b/src/reboot.h
+@@ -47,5 +47,8 @@
+ # define BMAGIC_POWEROFF BMAGIC_HALT
+ #endif
+
++/* for kexec support */
++#define BMAGIC_KEXEC 0x45584543
++
+ #define init_reboot(magic) reboot(magic)
+
diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
new file mode 100644
index 000000000000..b8e403f629f7
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
@@ -0,0 +1,36 @@
+This patch makes shutdown use the Single User runlevel by default so
+the gettys are shutdown too.
+
+Roy Marples <uberlord@gentoo.org>
+
+--- a/man/shutdown.8
++++ b/man/shutdown.8
+@@ -44,7 +44,7 @@ mail and news processing programs a chance to exit cleanly, etc.
+ \fBshutdown\fP does its job by signalling the \fBinit\fP process,
+ asking it to change the runlevel.
+ Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
+-to reboot the system, and runlevel \fB1\fP is used to put to system into
++to reboot the system, and runlevel \fBS\fP is used to put to system into
+ a state where administrative tasks can be performed; this is the default
+ if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
+ To see which actions are taken on halt or reboot see the appropriate
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -506,7 +506,7 @@ int main(int argc, char **argv)
+ usage();
+ exit(1);
+ }
+- strcpy(down_level, "1");
++ strcpy(down_level, "S");
+ halttype = NULL;
+
+ /* Process the options. */
+@@ -685,6 +685,8 @@ int main(int argc, char **argv)
+ strcpy(newstate, "for reboot");
+ break;
+ case '1':
++ case 'S':
++ case 's':
+ strcpy(newstate, "to maintenance mode");
+ break;
+ default:
diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch b/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
new file mode 100644
index 000000000000..73c0160803a8
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
@@ -0,0 +1,60 @@
+https://savannah.nongnu.org/bugs/index.php?29758
+
+From 2b7d90f04cdd0e343f413c5c7672615926c02706 Mon Sep 17 00:00:00 2001
+From: wfink <wfink@456724a4-4300-0410-8514-c89748c515a2>
+Date: Tue, 4 May 2010 07:50:12 +0000
+Subject: [PATCH] Fix sysvinit bug #29758
+
+git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@87 456724a4-4300-0410-8514-c89748c515a2
+
+diff --git a/src/Makefile b/src/Makefile
+index e2b8028..19675c5 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -92,9 +92,9 @@ all: $(BIN) $(SBIN) $(USRBIN)
+ init: LDLIBS += $(INITLIBS) $(STATIC)
+ init: init.o init_utmp.o
+
+-halt: halt.o ifdown.o hddown.o utmp.o reboot.h
++halt: halt.o ifdown.o hddown.o utmp.o
+
+-last: last.o oldutmp.h
++last: last.o
+
+ mesg: mesg.o
+
+@@ -109,7 +109,7 @@ sulogin: sulogin.o
+
+ wall: dowall.o wall.o
+
+-shutdown: dowall.o shutdown.o utmp.o reboot.h
++shutdown: dowall.o shutdown.o utmp.o
+
+ bootlogd: LDLIBS += -lutil
+ bootlogd: bootlogd.o
+@@ -118,14 +118,22 @@ sulogin.o: CPPFLAGS += $(SELINUX_DEF)
+ sulogin.o: sulogin.c
+
+ init.o: CPPFLAGS += $(SELINUX_DEF)
+-init.o: init.c init.h set.h reboot.h initreq.h
++init.o: init.c init.h initreq.h paths.h reboot.h set.h
+
+-utmp.o: utmp.c init.h
++utmp.o:
+
+ init_utmp.o: CPPFLAGS += -DINIT_MAIN
+-init_utmp.o: utmp.c init.h
++init_utmp.o: utmp.c init.h initreq.h paths.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
++utmpdump.o: utmpdump.c oldutmp.h
++
++shutdown.o: shutdown.c paths.h reboot.h initreq.h init.h
++
++halt.o: halt.c reboot.h
++
++last.o: last.c oldutmp.h
++
+ cleanobjs:
+ rm -f *.o *.bak
+
diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch b/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch
new file mode 100644
index 000000000000..91b7435b25ac
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch
@@ -0,0 +1,38 @@
+http://svn.savannah.nongnu.org/viewvc?view=rev&root=sysvinit&revision=90
+https://bugs.gentoo.org/326697
+
+--- sysvinit/trunk/src/init.c 2010/05/07 15:16:26 89
++++ sysvinit/trunk/src/init.c 2010/05/17 09:44:34 90
+@@ -54,10 +54,6 @@
+
+ #ifdef WITH_SELINUX
+ # include <selinux/selinux.h>
+-# include <sys/mount.h>
+-# ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */
+-# define MNT_DETACH 2
+-# endif
+ #endif
+
+ #ifdef __i386__
+@@ -2872,11 +2868,9 @@
+
+ #ifdef WITH_SELINUX
+ if (getenv("SELINUX_INIT") == NULL) {
+- const int rc = mount("proc", "/proc", "proc", 0, 0);
+- if (is_selinux_enabled() > 0) {
+- putenv("SELINUX_INIT=YES");
+- if (rc == 0) umount2("/proc", MNT_DETACH);
++ if (is_selinux_enabled() != 1) {
+ if (selinux_init_load_policy(&enforce) == 0) {
++ putenv("SELINUX_INIT=YES");
+ execv(myname, argv);
+ } else {
+ if (enforce > 0) {
+@@ -2887,7 +2881,6 @@
+ }
+ }
+ }
+- if (rc == 0) umount2("/proc", MNT_DETACH);
+ }
+ #endif
+ /* Start booting. */
diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
new file mode 100644
index 000000000000..716999c39c3b
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
@@ -0,0 +1,65 @@
+other inits have moved to not requiring the -h flag when used with -H/-P.
+modify sysvinit to be the same since it really doesn't matter.
+
+https://bugs.gentoo.org/449354
+
+patch by Doug Goldstein
+
+--- sysvinit-2.88dsf/man/shutdown.8
++++ sysvinit-2.88dsf/man/shutdown.8
+@@ -66,16 +66,15 @@
+ .\"}}}
+ .\"{{{ -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{ -P
+ .IP \fB\-P\fP
+-Halt action is to turn off the power.
++Action is to power-off the machine.
+ .\"}}}
+ .\"{{{ -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag. Halt action is to halt or drop into boot
+-monitor on systems that support it. Must be used with the -h flag.
++Action is to halt the machine.
+ .\"}}}
+ .\"{{{ -f
+ .IP \fB\-f\fP
+--- sysvinit-2.88dsf/src/shutdown.c
++++ sysvinit-2.88dsf/src/shutdown.c
+@@ -514,9 +514,11 @@
+ switch(c) {
+ case 'H':
+ halttype = "HALT";
++ down_level[0] = '0';
+ break;
+ case 'P':
+ halttype = "POWERDOWN";
++ down_level[0] = '0';
+ break;
+ case 'a': /* Access control. */
+ useacl = 1;
+@@ -532,6 +534,8 @@
+ break;
+ case 'h': /* Halt after shutdown */
+ down_level[0] = '0';
++ if (!halttype)
++ halttype = "POWERDOWN";
+ break;
+ case 'f': /* Don't perform fsck after next boot */
+ fastboot = 1;
+@@ -565,12 +569,6 @@
+ }
+ }
+
+- if (NULL != halttype && down_level[0] != '0') {
+- fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+- usage();
+- exit(1);
+- }
+-
+ /* Do we need to use the shutdown.allow file ? */
+ if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
+
diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-sysmacros.patch b/sys-apps/sysvinit/files/sysvinit-2.88-sysmacros.patch
new file mode 100644
index 000000000000..efbe47a30be2
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-sysmacros.patch
@@ -0,0 +1,12 @@
+Newer C libraries omit this include from sys/types.h.
+
+--- a/src/bootlogd.c
++++ b/src/bootlogd.c
+@@ -32,6 +32,7 @@
+ *
+ */
+
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-ttydefaults.patch b/sys-apps/sysvinit/files/sysvinit-2.88-ttydefaults.patch
new file mode 100644
index 000000000000..5db809067e13
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-ttydefaults.patch
@@ -0,0 +1,10 @@
+--- sysvinit/trunk/src/init.c 2014/01/26 16:40:03 134
++++ sysvinit/trunk/src/init.c 2014/01/26 22:00:42 135
+@@ -49,6 +49,7 @@
+ #include <utmp.h>
+ #include <ctype.h>
+ #include <stdarg.h>
++#include <sys/ttydefaults.h>
+ #include <sys/syslog.h>
+ #include <sys/time.h>
+
diff --git a/sys-apps/sysvinit/metadata.xml b/sys-apps/sysvinit/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/sysvinit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/sysvinit/sysvinit-2.88-r9.ebuild b/sys-apps/sysvinit/sysvinit-2.88-r9.ebuild
new file mode 100644
index 000000000000..06533bd44b12
--- /dev/null
+++ b/sys-apps/sysvinit/sysvinit-2.88-r9.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="/sbin/init - parent of all processes"
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
+SRC_URI="mirror://nongnu/${PN}/${P}dsf.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="selinux ibm static kernel_FreeBSD"
+
+CDEPEND="
+ selinux? (
+ >=sys-libs/libselinux-1.28
+ )"
+DEPEND="${CDEPEND}
+ virtual/os-headers"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-shutdown )
+ !<sys-apps/openrc-0.13
+"
+
+S=${WORKDIR}/${P}dsf
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.86-kexec.patch" #80220
+ "${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
+ "${FILESDIR}/${P}-makefile.patch" #319197
+ "${FILESDIR}/${P}-selinux.patch" #326697
+ "${FILESDIR}/${P}-shutdown-h.patch" #449354
+ "${FILESDIR}/${PN}-2.88-sysmacros.patch"
+ "${FILESDIR}/${PN}-2.88-ttydefaults.patch" #551626
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ sed -i '/^CPPFLAGS =$/d' src/Makefile || die
+
+ # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
+ sed -i -r \
+ -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
+ -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
+ src/Makefile || die
+
+ # pidof has moved to >=procps-3.3.9
+ sed -i -r \
+ -e '/\/bin\/pidof/d' \
+ -e '/^MAN8/s:\<pidof.8\>::g' \
+ src/Makefile || die
+
+ # Mung inittab for specific architectures
+ cd "${WORKDIR}"
+ cp "${FILESDIR}"/inittab-2.88 inittab || die "cp inittab"
+ local insert=()
+ use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
+ use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
+ use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
+ use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
+ use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
+ if use ibm ; then
+ insert+=(
+ '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
+ '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
+ )
+ fi
+ (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
+ if use kernel_FreeBSD ; then
+ sed -i \
+ -e 's/linux/cons25/g' \
+ -e 's/ttyS0/cuaa0/g' \
+ -e 's/ttyS1/cuaa1/g' \
+ inittab #121786
+ fi
+ if use x86 || use amd64 ; then
+ sed -i \
+ -e '/ttyS[01]/s:9600:115200:' \
+ inittab
+ fi
+ if [[ ${#insert[@]} -gt 0 ]] ; then
+ printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
+ fi
+}
+
+src_compile() {
+ local myconf
+
+ tc-export CC
+ append-lfs-flags
+ export DISTRO= #381311
+ use static && append-ldflags -static
+ use selinux && myconf=WITH_SELINUX=yes
+ emake -C src ${myconf} || die
+}
+
+src_install() {
+ emake -C src install ROOT="${D}"
+ dodoc README doc/*
+
+ insinto /etc
+ doins "${WORKDIR}"/inittab
+
+ # dead symlink
+ rm "${D}"/usr/bin/lastb || die
+}
+
+pkg_postinst() {
+ # Reload init to fix unmounting problems of / on next reboot.
+ # This is really needed, as without the new version of init cause init
+ # not to quit properly on reboot, and causes a fsck of / on next reboot.
+ if [[ ${ROOT} == / ]] ; then
+ # Do not return an error if this fails
+ /sbin/telinit U &>/dev/null
+ fi
+
+ elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
+ elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
+}
diff --git a/sys-apps/tcp-wrappers/Manifest b/sys-apps/tcp-wrappers/Manifest
new file mode 100644
index 000000000000..60f9d3a6e22e
--- /dev/null
+++ b/sys-apps/tcp-wrappers/Manifest
@@ -0,0 +1,9 @@
+AUX hosts.allow.example 585 SHA256 fbcdcedbdc985d8f0cc79e9a8752e69553b48aa38662321046cd4eae9f4d7e3b SHA512 63587dd4552b688dc5ed0adde3932e43e5287129315211498063f09e37c1f8beee0de60d7d4f69df7149bd500546a2fd59a6094d71f9c0be221426eae3cb869b WHIRLPOOL 449f28dad80a13497baa7d5d43cc99b8e7159b8e38dc7659947c9dd76ca2e8d7153de84a3706ec6658d94bb70d5b35554b72e9cf8f35bc8eaf27dacb8229cae9
+AUX tcp-wrappers-7.6-headers.patch 5419 SHA256 86d24cdf5d1c7f88d21b174988234d5024f506982e029e173c06cb5456c46bb0 SHA512 48cd3d8951ef0f0106c51f1a1de6116fe1f68bf49f321b956d4f9dac1b3f1b6c2964163deb3d1bb449a2ac672e471c4b216e0e616de4a2dad0665d767d13f786 WHIRLPOOL 721d65254fd0d39152e0ba1c860fba5bb8c08ab61d1c89a10e1da9ed274b41ba2734253e79e0c680fe72cdf720eba7243c7b7e6f33d383c074f078b2c64d923d
+AUX tcp-wrappers-7.6-redhat-bug11881.patch 956 SHA256 b8b3bbbe223d3496b25070d1fbc62d9a1424709e20d380b55390b13f03b46e03 SHA512 d530f788c3b40f5ec2836ba7c6e73df529869ef465b93fe2b2d8460dfcb5e9031e78c8e6a99c71d6262a05b82f25e694fdd717686198a87dfcb2c9b9d5a52ef4 WHIRLPOOL 05620832e55b9ef396601851d22e6fc1e60adb655340b1c1909c8138454b38338cba3bf9976d8458d157cc2ce8a3f30450efdf82943b885e325965b2d93697b7
+DIST tcp-wrappers_7.6.q-22.debian.tar.gz 41730 SHA256 0ff28337c5effe4f91e7ea43ddd65fc629c06922326f5ef2804f70943be64fb3 SHA512 cee45f265c34ec1c4e9e81d54be636dcd9702964f9cf5bb076f72d6772d2dbc638d2ef366560b51c24a216724807826bb3b7bf9d5d0f5c0923b71de7d0b002a8 WHIRLPOOL 4a22c083d3bfe18af020ea48663ab3eb5a77d613665bbeb935daffcce64641d66f5c32a88ef4e4dbf8b4edfe9d71bfc4e35601451d065c10806ea726430d2aa8
+DIST tcp_wrappers_7.6.tar.gz 99438 SHA256 9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d SHA512 2d9d003791f8d00912a36ae00579e2b8dd7ad8a7bf8eae259659bcaf5365b150540ff6c93c91765872c76041579b7a02b6e3c64528fb7f8235680399ba1d9dac WHIRLPOOL e04861d03a49dd6d6d5cd9eba86732a40e79deff39d981a5e883bcfae4979c6e1c2a388eabd84691927b159e606a5649073473a717cb62c12cbd8546d75635bf
+EBUILD tcp-wrappers-7.6.22-r1.ebuild 2646 SHA256 a7714fc579e20b6930cdaf028e71dba05f9e13d9d5c2b7c1b645d50fd698bfbb SHA512 14ee69fbebc7a93bd887284f110d67c33f6079f91d41b9e6b9819f758d73875c300c557378dc1f3146b736730de843be7cc94b7534bf34f5ad81bd23ef828115 WHIRLPOOL 828a664a6491193e2e485a9cf362048f08c17f1629bf0f3490bc80542e84bb6065f395d6a1ecbd115c1c52412c0e9591e222a036e9bd3cc26a2c2887fb96bb9f
+MISC ChangeLog 3067 SHA256 29e51eb852a26eb44c578a64eeca54b77cb3fade2db4b691704f20aba5084201 SHA512 824c6ed9803ed18b28ba05cec26b4b68d83526dbc0e8c278f783322e29dcd41ed61a2b0ef4b28831b233a67a8c00821fb2a77d9469c18f9a54a38c233ff82615 WHIRLPOOL c6b2ea7b936ac2308bcdfb63c62620d6e9e0432785983e7c6b4f318abe77687a95606cb1c2ff3e6348ac7c54338faccb44e6fdf859911e9beb9e3034555410d0
+MISC ChangeLog-2015 9465 SHA256 43739e3b74da006f224d644eeae490246e8528d333eb7345b4c7e11895dca00e SHA512 008ca06bccff5dcb4be6e4fc9383827dcc84bacd481da55d4eabf3e0d540389c8e2a9e0e02b2450532714637638742e5b6c0379e9c48d12416324ca9df35bd11 WHIRLPOOL c4d079b7bea29393935c9365c47d631bb74d2e728eaa691061395b3b259749ef223f25a1f4b847ec5638652bc2761a04ef319e52d21ff54230468ff45a66e78f
+MISC metadata.xml 440 SHA256 7cf7feea8b3221313ae2b674c64fa6bbf24cac03d83c120f22d2d4ba996c8bf9 SHA512 3075ada2500265fa53064720159a33779d79c46e4244a5cc6624d0c2de81dcacf62f89232162182bf29477c36025f4b3f4618d9ae3f592ebd714a658425428a5 WHIRLPOOL 9b7be91e1cd0f47d2ea6045ca653c1de5c23503342ec3cbf28e55fe9e8cad629277fafb9cbc77ea8fdbfcd320047067b773b9596682b485635ac6a4136305e4f
diff --git a/sys-apps/tcp-wrappers/files/hosts.allow.example b/sys-apps/tcp-wrappers/files/hosts.allow.example
new file mode 100644
index 000000000000..c473eb95155e
--- /dev/null
+++ b/sys-apps/tcp-wrappers/files/hosts.allow.example
@@ -0,0 +1,17 @@
+# For more information, please see the hosts.allow(5) manpage
+
+# Rule format:
+# daemon : client list
+# The value for 'daemon' is determined by the name of the binary.
+# OpenSSH runs as 'sshd' so you would use 'sshd' for 'daemon'.
+# Client list can be a list of ip's or hostnames.
+
+# Allow only sshd connections from ips matching 192.168.0.*
+#sshd: 192.168.0.
+
+# Only allow sendmail connections from the localhost
+#sendmail: localhost
+
+# Allow everyone from foobar.edu to access everything except for
+# the terminalserver
+#ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
diff --git a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch
new file mode 100644
index 000000000000..328a4a102618
--- /dev/null
+++ b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch
@@ -0,0 +1,295 @@
+--- a/options.c
++++ b/options.c
+@@ -34,6 +34,8 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+--- a/safe_finger.c
++++ b/safe_finger.c
+@@ -20,6 +20,11 @@
+
+ /* System libraries */
+
++#include <unistd.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <sys/wait.h>
++#include <grp.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <signal.h>
+@@ -27,7 +31,7 @@
+ #include <ctype.h>
+ #include <pwd.h>
+
+-extern void exit();
++int pipe_stdin(char **argv);
+
+ /* Local stuff */
+
+--- a/scaffold.c
++++ b/scaffold.c
+@@ -10,6 +10,7 @@
+
+ /* System libraries. */
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+@@ -27,7 +27,4 @@
+ #endif
+
+-#ifndef INET6
+-extern char *malloc();
+-#endif
+
+ /* Application-specific. */
+--- a/shell_cmd.c
++++ b/shell_cmd.c
+@@ -14,6 +14,10 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
++#include <stdlib.h>
++#include <fcntl.h>
++#include <sys/wait.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <signal.h>
+@@ -25,8 +25,6 @@
+ #include <syslog.h>
+ #include <string.h>
+
+-extern void exit();
+-
+ /* Local stuff. */
+
+ #include "tcpd.h"
+--- a/tcpdchk.c
++++ b/tcpdchk.c
+@@ -20,6 +20,8 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #ifdef INET6
+@@ -35,10 +36,7 @@
+ #include <netdb.h>
+ #include <string.h>
+
+-extern int errno;
+-extern void exit();
+-extern int optind;
+-extern char *optarg;
++int cidr_mask_addr(char *str);
+
+ #ifndef INADDR_NONE
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+--- a/clean_exit.c
++++ b/clean_exit.c
+@@ -13,8 +13,8 @@
+ #endif
+
+ #include <stdio.h>
+-
+-extern void exit();
++#include <unistd.h>
++#include <stdlib.h>
+
+ #include "tcpd.h"
+
+--- a/hosts_access.c
++++ b/hosts_access.c
+@@ -23,6 +23,7 @@
+
+ /* System libraries. */
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #ifdef INT32_T
+ typedef uint32_t u_int32_t;
+@@ -43,8 +44,8 @@
+ #include <netdb.h>
+ #endif
+
+-extern char *fgets();
+-extern int errno;
++static int match_pattern_ylo(const char *s, const char *pattern);
++int cidr_mask_addr(char *str);
+
+ #ifndef INADDR_NONE
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+--- a/inetcf.c
++++ b/inetcf.c
+@@ -9,15 +9,14 @@
+ static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
+ #endif
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
+
+-extern int errno;
+-extern void exit();
+-
++#include "scaffold.h"
+ #include "tcpd.h"
+ #include "inetcf.h"
+
+--- a/percent_x.c
++++ b/percent_x.c
+@@ -16,12 +16,12 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
+
+-extern void exit();
+-
+ /* Local stuff. */
+
+ #include "tcpd.h"
+--- a/rfc931.c
++++ b/rfc931.c
+@@ -15,6 +15,7 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <sys/types.h>
+--- a/tcpd.c
++++ b/tcpd.c
+@@ -16,6 +16,7 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -39,6 +39,8 @@
+ #include "patchlevel.h"
+ #include "tcpd.h"
+
++void fix_options(struct request_info *request);
++
+ int allow_severity = SEVERITY; /* run-time adjustable */
+ int deny_severity = LOG_WARNING; /* ditto */
+
+--- a/tcpdmatch.c
++++ b/tcpdmatch.c
+@@ -19,6 +19,8 @@
+
+ /* System libraries. */
+
++#include <unistd.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+@@ -30,9 +32,6 @@
+ #include <setjmp.h>
+ #include <string.h>
+
+-extern void exit();
+-extern int optind;
+-extern char *optarg;
+
+ #ifndef INADDR_NONE
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+--- a/update.c
++++ b/update.c
+@@ -19,6 +19,7 @@
+
+ /* System libraries */
+
++#include <unistd.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
+--- a/misc.c
++++ b/misc.c
+@@ -14,11 +14,10 @@
+ #include <arpa/inet.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <stdlib.h>
+
+ #include "tcpd.h"
+
+-extern char *fgets();
+-
+ #ifndef INADDR_NONE
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+ #endif
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -32,6 +32,7 @@
+
+ /* fix_options - get rid of IP-level socket options */
+
++void
+ fix_options(request)
+ struct request_info *request;
+ {
+@@ -38,11 +38,8 @@
+ #ifdef IP_OPTIONS
+ unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+ char lbuf[BUFFER_SIZE], *lp;
+-#ifdef __GLIBC__
+- size_t optsize = sizeof(optbuf), ipproto;
+-#else
+- int optsize = sizeof(optbuf), ipproto;
+-#endif
++ socklen_t optsize = sizeof(optbuf);
++ int ipproto;
+ struct protoent *ip;
+ int fd = request->fd;
+ unsigned int opt;
+--- a/socket.c
++++ b/socket.c
+@@ -95,11 +95,7 @@
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
+ #endif
+-#ifdef __GLIBC__
+- size_t len;
+-#else
+- int len;
+-#endif
++ socklen_t len;
+ char buf[BUFSIZ];
+ int fd = request->fd;
+
+@@ -430,11 +426,7 @@
+ #else
+ struct sockaddr_in sin;
+ #endif
+-#ifdef __GLIBC__
+- size_t size = sizeof(sin);
+-#else
+- int size = sizeof(sin);
+-#endif
++ socklen_t size;
+
+ /*
+ * Eat up the not-yet received datagram. Some systems insist on a
diff --git a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch
new file mode 100644
index 000000000000..4a6847621c57
--- /dev/null
+++ b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch
@@ -0,0 +1,35 @@
+--- tcp_wrappers_7.6/tcpd.c.bug11881
++++ tcp_wrappers_7.6/tcpd.c
+@@ -60,10 +60,10 @@
+ */
+
+ if (argv[0][0] == '/') {
+- strcpy(path, argv[0]);
++ strncpy(path, argv[0], sizeof(path));
+ argv[0] = strrchr(argv[0], '/') + 1;
+ } else {
+- sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);
++ snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]);
+ }
+
+ /*
+--- tcp_wrappers_7.6/eval.c.bug11881
++++ tcp_wrappers_7.6/eval.c
+@@ -111,7 +111,7 @@
+ return (hostinfo);
+ #endif
+ if (STR_NE(eval_user(request), unknown)) {
+- sprintf(both, "%s@%s", request->user, hostinfo);
++ snprintf(both, sizeof(both), "%s@%s", request->user, hostinfo);
+ return (both);
+ } else {
+ return (hostinfo);
+@@ -128,7 +128,7 @@
+ char *daemon = eval_daemon(request);
+
+ if (STR_NE(host, unknown)) {
+- sprintf(both, "%s@%s", daemon, host);
++ snprintf(both, sizeof(both), "%s@%s", daemon, host);
+ return (both);
+ } else {
+ return (daemon);
diff --git a/sys-apps/tcp-wrappers/metadata.xml b/sys-apps/tcp-wrappers/metadata.xml
new file mode 100644
index 000000000000..aedbb1a2c097
--- /dev/null
+++ b/sys-apps/tcp-wrappers/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="netgroups">
+ Support matching NIS (host) netgroup names via the @netgroup syntax
+ (if you don't know what this means, you most likely do not need it)
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild
new file mode 100644
index 000000000000..041dd954900f
--- /dev/null
+++ b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs versionator flag-o-matic multilib-minimal
+
+MY_PV=$(get_version_component_range 1-2)
+DEB_PV=$(get_version_component_range 3)
+MY_P="${PN//-/_}_${MY_PV}"
+DESCRIPTION="TCP Wrappers"
+HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html"
+SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz
+ mirror://debian/pool/main/t/${PN}/${PN}_${MY_PV}.q-${DEB_PV}.debian.tar.gz"
+
+LICENSE="tcp_wrappers_license"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="ipv6 netgroups static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ EPATCH_OPTS="-p1" \
+ epatch $(sed -e 's:^:../debian/patches/:' ../debian/patches/series)
+ epatch "${FILESDIR}"/${PN}-7.6-headers.patch
+ epatch "${FILESDIR}"/${PN}-7.6-redhat-bug11881.patch
+
+ multilib_copy_sources
+}
+
+temake() {
+ local mycppflags="-DHAVE_WEAKSYMS -DHAVE_STRERROR -DSYS_ERRLIST_DEFINED"
+ use ipv6 && mycppflags+=" -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len"
+ emake \
+ REAL_DAEMON_DIR="${EPREFIX}"/usr/sbin \
+ TLI= VSYSLOG= PARANOID= BUGS= \
+ AUTH="-DALWAYS_RFC931" \
+ AUX_OBJ="weak_symbols.o" \
+ DOT="-DAPPEND_DOT" \
+ HOSTNAME="-DALWAYS_HOSTNAME" \
+ NETGROUP=$(usex netgroups -DNETGROUPS "") \
+ STYLE="-DPROCESS_OPTIONS" \
+ LIBS=$(usex netgroups -lnsl "") \
+ LIB=$(usex static-libs libwrap.a "") \
+ AR="$(tc-getAR)" ARFLAGS=rc \
+ CC="$(tc-getCC)" \
+ RANLIB="$(tc-getRANLIB)" \
+ COPTS="${CFLAGS} ${CPPFLAGS} ${mycppflags}" \
+ LDFLAGS="${LDFLAGS}" \
+ "$@" || die
+}
+
+multilib_src_configure() {
+ tc-export AR RANLIB
+ temake config-check
+}
+
+multilib_src_compile() {
+ temake all
+}
+
+multilib_src_install() {
+ into /usr
+ use static-libs && dolib.a libwrap.a
+ dolib.so shared/libwrap.so*
+
+ insinto /usr/include
+ doins tcpd.h
+
+ if multilib_is_native_abi; then
+ gen_usr_ldscript -a wrap
+ dosbin tcpd tcpdchk tcpdmatch safe_finger try-from
+ fi
+}
+
+multilib_src_install_all() {
+ doman *.[358]
+ dosym hosts_access.5 /usr/share/man/man5/hosts.allow.5
+ dosym hosts_access.5 /usr/share/man/man5/hosts.deny.5
+
+ insinto /etc
+ newins "${FILESDIR}"/hosts.allow.example hosts.allow
+
+ dodoc BLURB CHANGES DISCLAIMER README*
+}
+
+pkg_preinst() {
+ # don't clobber people with our default example config
+ [[ -e ${EROOT}/etc/hosts.allow ]] && cp -pP "${EROOT}"/etc/hosts.allow "${ED}"/etc/hosts.allow
+}
diff --git a/sys-apps/texinfo/Manifest b/sys-apps/texinfo/Manifest
new file mode 100644
index 000000000000..a37b5013b6c2
--- /dev/null
+++ b/sys-apps/texinfo/Manifest
@@ -0,0 +1,11 @@
+DIST texinfo-6.1.tar.xz 4520376 SHA256 ac68394ce21b2420ba7ed7cec65d84aacf308cc88e9bf4716fcfff88286883d2 SHA512 ae47295f3bcfb728c3be59421cf830ecfa5fc7856a086e45da2bac89600d883aa4406a6ef62d7ee5dc2bab83a3efa1cec861a3b4b14b85bbecb53ebf3ebf7235 WHIRLPOOL 187f11681f041aa5f4260c6c2833cb877a4c74afda73d4f72008c61c8a089dd0393ff90257410d5e48b9501c36dd4991032db001c5c17b8224afb6f5819cd165
+DIST texinfo-6.3.tar.xz 4468048 SHA256 246cf3ffa54985118ec2eea2b8d0c71b92114efe6282c2ae90d65029db4cf93a SHA512 ef6c5878d9db497d7963bd9138418b30c39a5605c215bf2f4e8f1f083d93c3c99f8c459aa675f7da3b78da6189cb6bbf3cf19a2ee1d52e569de2f6ce82762bf4 WHIRLPOOL 45cb684cd14fdfc5da1ec54cee017e0835334481df9f4db35c18b2837509b1d15ea590d90a925edf4febae59669e9dc8e6287838368e8730f714811e70dbd417
+DIST texinfo-6.4.tar.xz 4497624 SHA256 6ae2e61d87c6310f9af7c6f2426bd0470f251d1a6deb61fba83a3b3baff32c3a SHA512 628e7fb64c4cb6d4ec879d5593e3660dbbbf41915c7aec68b6af209a1c496bee8a3879a69e4e047c3bee0cb476540ffd6ebdef5ec7b712edd191a82ce9ac4006 WHIRLPOOL 7cc7c955b4ef85ca72436668305bb9db0b0d09feb9953e4bdb812f2f1124957cfd59f16b01876f7d93e145692874f1902fb1d850e7ad8daae668ab8747a8e6fa
+DIST texinfo-6.5.tar.xz 4503048 SHA256 77774b3f4a06c20705cc2ef1c804864422e3cf95235e965b1f00a46df7da5f62 SHA512 06831b4c74a1ba7a9cff937069e40ab26db1204aa8761d63254651ffacf6b0cb95d7078ba1cc59d95427239ab7e4f4aedf582967854281bfea3850b1ed5b1fdc WHIRLPOOL f8d374c5279eb5d463192391875ed663ed2fa33e653a11d7304595549243cd68988b9f7f1e4b13ef61d2efa906344868c889293514b7b875b66a954a16466919
+EBUILD texinfo-6.1.ebuild 1118 SHA256 97e34de7e10129e1b0c7437fe4294fa50fa72e14183020733ec5091ad2485d5d SHA512 6b73e1c59c2e8ef12fa8ca5699a5c5b1da4e5f97b969fd5e31c292625a60fa09c7f9301a172a919e127de9287fcd2279a672459c0009d21f6686b2a1152e8165 WHIRLPOOL e0eb307078d336a47deadc1ec30c860c01b73a1d03cc1235579429b8de16b3fe5cd3fa9df76a8c64301b9512911894387bbd02fca78f3f71adfb4c243e19b592
+EBUILD texinfo-6.3.ebuild 1123 SHA256 8fc89f5d554edf744ee4ab5c018b6b5daf968791dcdac28e3d0d92afe11166c8 SHA512 bbdbbbbfc507aff742f1763027186738f0001e7f0017aa8ba9fe3498157ee3c799ffc2331b93492b06d0c3ae5f82e8b227e1ce97ae93bb94276c7da064fce8ce WHIRLPOOL 6fa51008b99556a0c4779c8ac34bf83231da2aa3230468982e2497bfb86be1398a7eedbc6f225b23ade88e88e984f5cce67083002c4920bb271b5100e644e49f
+EBUILD texinfo-6.4.ebuild 1131 SHA256 c8197227cf2f9cc09f195007d8e1c8fc7aaf4fe0cf3554010a420178ae3659e3 SHA512 b6500793ac06068572006959e5a029b06fe12099b2a6b34fbef76f6ca5f555400595e422ad8b4526ffd07d9c44d1e6ca8702e84b5c470fc9818d0a4abf92b7ad WHIRLPOOL 514483e5a6debb090c42c270a6ff3624dc9aed0b6b630eb0ebb480d690edcb4b785e43a70682ce4ac089e3970bc661285a04c9f78d0220d0b8712894a33c1103
+EBUILD texinfo-6.5.ebuild 1165 SHA256 5d892727fc224633bd0302fffa56274d238476b010e816a5d1b44e32cfb315da SHA512 e60fda9767bd71c97c52bebef5f4fc44369aef6b5a06a75f5368d74ad930976d45191770a56d282376442e5188fa9baea605df4ec90d4b8e21fdf0f12569c57e WHIRLPOOL 7199dfc6f5cfa9984412e0d78a7a6368934e34c9fc06bbb6c90f13d432c726660145b6d75cb817a0c2485cc2b063a8c7eb41fc738291c5e110e3e781d0e8767f
+MISC ChangeLog 7849 SHA256 bb7f658198db0595eb0f64c864c33df4f9c43b9d06242532af342d2b080f0193 SHA512 dfd5329177a6ad50999a08b8741c3f7ee386191c8383d8d8f224935bf9bae414da4a4634915c3deb89222d2b6c2cda0e80b3c75b115f0a49215467115eddfc11 WHIRLPOOL 5eb1cf89b01291eef35280ca871a8227fac5a21643e22769acee3004c8d46a7c17f25916d6832ceda6af463397ad622e855c2879e370eb1f456a7675fbf68b79
+MISC ChangeLog-2015 17403 SHA256 9a2b085d4a61c28d8f14ca6c0fbbd5317d52e48a1273bf998ae6e79ab6db5491 SHA512 e19967519610065c2d64211d924364c3fbe8b5450d22257380c5caae89b284d79ff26774aff9d78661bb19fb3070fb8babc17e9bea1dee2b1aa31fd5f12d3723 WHIRLPOOL cd190c17d154d3b30bc0108a77efddcbc1cdf95ca38ec58a644295164a9691f2b4634267ffb2940af5f10b29b4fad15ad99b50b562d9c684119333dda1d59c05
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/texinfo/metadata.xml b/sys-apps/texinfo/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/texinfo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/texinfo/texinfo-6.1.ebuild b/sys-apps/texinfo/texinfo-6.1.ebuild
new file mode 100644
index 000000000000..3eb60888fe80
--- /dev/null
+++ b/sys-apps/texinfo/texinfo-6.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: if your package uses the texi2dvi utility, it must depend on the
+# virtual/texi2dvi package to pull in all the right deps. The tool is not
+# usable out-of-the-box because it requires the large tex packages.
+
+EAPI="5"
+
+inherit flag-o-matic
+
+DESCRIPTION="The GNU info program and utilities"
+HOMEPAGE="https://www.gnu.org/software/texinfo/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+RDEPEND="
+ !=app-text/tetex-2*
+ >=sys-libs/ncurses-5.2-r2:0=
+ dev-lang/perl:=
+ dev-perl/libintl-perl
+ dev-perl/Unicode-EastAsianWidth
+ dev-perl/Text-Unidecode
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( >=sys-devel/gettext-0.19.6 )"
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --with-external-libintl-perl \
+ --with-external-Unicode-EastAsianWidth \
+ --with-external-Text-Unidecode \
+ $(use_enable nls)
+}
diff --git a/sys-apps/texinfo/texinfo-6.3.ebuild b/sys-apps/texinfo/texinfo-6.3.ebuild
new file mode 100644
index 000000000000..e0b156fd28e1
--- /dev/null
+++ b/sys-apps/texinfo/texinfo-6.3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: if your package uses the texi2dvi utility, it must depend on the
+# virtual/texi2dvi package to pull in all the right deps. The tool is not
+# usable out-of-the-box because it requires the large tex packages.
+
+EAPI="5"
+
+inherit flag-o-matic
+
+DESCRIPTION="The GNU info program and utilities"
+HOMEPAGE="https://www.gnu.org/software/texinfo/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+RDEPEND="
+ !=app-text/tetex-2*
+ >=sys-libs/ncurses-5.2-r2:0=
+ dev-lang/perl:=
+ dev-perl/libintl-perl
+ dev-perl/Unicode-EastAsianWidth
+ dev-perl/Text-Unidecode
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( >=sys-devel/gettext-0.19.6 )"
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --with-external-libintl-perl \
+ --with-external-Unicode-EastAsianWidth \
+ --with-external-Text-Unidecode \
+ $(use_enable nls)
+}
diff --git a/sys-apps/texinfo/texinfo-6.4.ebuild b/sys-apps/texinfo/texinfo-6.4.ebuild
new file mode 100644
index 000000000000..596690fa8512
--- /dev/null
+++ b/sys-apps/texinfo/texinfo-6.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: if your package uses the texi2dvi utility, it must depend on the
+# virtual/texi2dvi package to pull in all the right deps. The tool is not
+# usable out-of-the-box because it requires the large tex packages.
+
+EAPI="5"
+
+inherit flag-o-matic
+
+DESCRIPTION="The GNU info program and utilities"
+HOMEPAGE="https://www.gnu.org/software/texinfo/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+RDEPEND="
+ !=app-text/tetex-2*
+ >=sys-libs/ncurses-5.2-r2:0=
+ dev-lang/perl:=
+ dev-perl/libintl-perl
+ dev-perl/Unicode-EastAsianWidth
+ dev-perl/Text-Unidecode
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( >=sys-devel/gettext-0.19.6 )"
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --with-external-libintl-perl \
+ --with-external-Unicode-EastAsianWidth \
+ --with-external-Text-Unidecode \
+ $(use_enable nls)
+}
diff --git a/sys-apps/texinfo/texinfo-6.5.ebuild b/sys-apps/texinfo/texinfo-6.5.ebuild
new file mode 100644
index 000000000000..6e53f592081e
--- /dev/null
+++ b/sys-apps/texinfo/texinfo-6.5.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: if your package uses the texi2dvi utility, it must depend on the
+# virtual/texi2dvi package to pull in all the right deps. The tool is not
+# usable out-of-the-box because it requires the large tex packages.
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="The GNU info program and utilities"
+HOMEPAGE="https://www.gnu.org/software/texinfo/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+RDEPEND="
+ !=app-text/tetex-2*
+ >=sys-libs/ncurses-5.2-r2:0=
+ dev-lang/perl:=
+ dev-perl/libintl-perl
+ dev-perl/Unicode-EastAsianWidth
+ dev-perl/Text-Unidecode
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( >=sys-devel/gettext-0.19.6 )"
+
+src_configure() {
+ use static && append-ldflags -static
+ local myeconfargs=(
+ --with-external-libintl-perl
+ --with-external-Unicode-EastAsianWidth
+ --with-external-Text-Unidecode
+ $(use_enable nls)
+ )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/the_silver_searcher/Manifest b/sys-apps/the_silver_searcher/Manifest
new file mode 100644
index 000000000000..703a0cd9ba1a
--- /dev/null
+++ b/sys-apps/the_silver_searcher/Manifest
@@ -0,0 +1,7 @@
+DIST the_silver_searcher-2.0.0.tar.gz 160093 SHA256 ff7243863f22ed73eeab6f7a6d17cfff585a7eaa41d5ab3ae4f5d6db97701d5f SHA512 2587b9958fadcf5d95bc472f901904edb0d3d9bbc652dc6bb3801b77e7dfa744a97869bed4699776cc3fdcd7b0319fcecbe4b08ccfda617d1c2aa4ea8e9f990d WHIRLPOOL 4c2ca9594d4d7d0cff4141e4bc76c6d150ff58ed301269a7b6348616c75ae33c525eb5ec2534af21e1cf07da5f12d0c121802d0c1a97dce6621e53f90d8508cf
+DIST the_silver_searcher-2.1.0.tar.gz 163139 SHA256 cb416a0da7fe354a009c482ae709692ed567f8e7d2dad4d242e726dd7ca202f0 SHA512 9b49b1666bbb915b122eae45dbe5dbdba18539257b59f1dee9ba9ec86dbe73c7c8ecde1eff9d3e06951295685161fc4594fcdbfa5d19d7b466f2a7f95021e631 WHIRLPOOL 374ce8e15e4e9eee2175390d9af3d53d88528ee31c57cb97e33b7624bb6c8e344c213ab1dec69228501f1feec10fbd18e28ebb5ee78d95d1b660cf1bd997642f
+EBUILD the_silver_searcher-2.0.0.ebuild 919 SHA256 4568439a56422f80050c276c51be0de4d088f4899633b81000ec9a6b70b5662f SHA512 a8e46a1bea749feaa9f05560e89b7e88a0739a15f33391a1945f5232811703d71e1438ae68ed42e38208b92282fdb543f999edd756f2b0a7d993df8e7a7717ea WHIRLPOOL 9d6fe817119164986f269970801e437c35029d3f9b982a9d383ab3f906ef991426699626ee5673a7d566195904d51adbbb57c1985eaf67ba9a99cd19e6efc439
+EBUILD the_silver_searcher-2.1.0.ebuild 921 SHA256 3649004df76e5e438f0ab49dfc25cc2dc2a28056cda280788f4e6bdda5e89580 SHA512 93f159fe1c564b49c4bbb7ebfe7df4e4572a5219b3b091c71c6da671ca7000e4f49029eaad9918d928ab9bf877a3acbe22b89dae561d96046aa8ea14637728b6 WHIRLPOOL 63a713956bf29bc651a2d01099e1f021fd9c2dfe2928a7c9e5b8ef336d71080c94806e1f3d5a2f81979823f07479bf45ed4acddb9c806000c7a68202b59ad30c
+MISC ChangeLog 3871 SHA256 fca313abe1ac3b0924aa0ecc58689cfa440446163eb879084901ec79cbb75e5b SHA512 b3a8efa3c104382ae8760d3b4d8ab06ae067be1675088c3b534977368f5e1020bc7cfd51de4ef564101a372fabadae1c96b5c6971e6befc8abc19419af12f635 WHIRLPOOL e3b0ee6a875ddda8bd6c000d5867df8de470cf91d419878a963e9b5122368fcf4eb9513e21b4c58b573707f8f55e0100ec391692122d01e1a274b076902b7f05
+MISC ChangeLog-2015 7821 SHA256 b4852ace8af969c37c300d09e6b1c05f21b0cf24db68cc76e809b27c71d076ba SHA512 015d10ebcbc7b659d99d838de34a53b41652269444170664239ab0e7ffe5019f7197578d324e44110845aa322bce82dbb487e4d13f70db921312c98693dd09ae WHIRLPOOL e81ba5fe18c761d019b64449f23a9fd0dc4c38701cbd3dc488e19c344aa39ab8d0f0e4790ca006faaf81abdca3975347c099a93bffa94eedbab6ca86d2bbfa30
+MISC metadata.xml 347 SHA256 b657e83c610b7371301bed14ef3150bd098c63f104a2dfa3c71611957281baf1 SHA512 56848f01fba3974410effc1dbc30118c77bf97cf09fead70be94f7360dddb80d47005ebb3b3c7d5accb97b24db3a3f7735cf0f40d7af13dde58b78a4bef768b2 WHIRLPOOL d68304516706e99a877a93c9b2075dbaa9cf2fb9d64d0b9b499e422a971048ac397d420ac3a548cdc4aff11ccba6f689e1398edb5f8599b17a6a61a796ff3bc1
diff --git a/sys-apps/the_silver_searcher/metadata.xml b/sys-apps/the_silver_searcher/metadata.xml
new file mode 100644
index 000000000000..e1e8e9cb619b
--- /dev/null
+++ b/sys-apps/the_silver_searcher/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 type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ggreer/the_silver_searcher</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild
new file mode 100644
index 000000000000..e9a17ad16b6e
--- /dev/null
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools bash-completion-r1
+
+DESCRIPTION="A code-searching tool similar to ack, but faster"
+HOMEPAGE="https://github.com/ggreer/the_silver_searcher"
+SRC_URI="https://github.com/ggreer/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~mips ~ppc ~ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="lzma test zlib"
+
+RDEPEND="dev-libs/libpcre
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/cram )"
+
+DOCS="README.md"
+
+src_prepare() {
+ sed '/^dist_bashcomp/d' -i Makefile.am || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable lzma) \
+ $(use_enable zlib)
+}
+
+src_test() {
+ cram -v tests/*.t || die "tests failed"
+}
+
+src_install() {
+ default
+ newbashcomp ag.bashcomp.sh ag
+}
diff --git a/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild
new file mode 100644
index 000000000000..3f4a2aae03c0
--- /dev/null
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools bash-completion-r1
+
+DESCRIPTION="A code-searching tool similar to ack, but faster"
+HOMEPAGE="https://github.com/ggreer/the_silver_searcher"
+SRC_URI="https://github.com/ggreer/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="lzma test zlib"
+
+RDEPEND="dev-libs/libpcre
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/cram )"
+
+DOCS="README.md"
+
+src_prepare() {
+ sed '/^dist_bashcomp/d' -i Makefile.am || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable lzma) \
+ $(use_enable zlib)
+}
+
+src_test() {
+ cram -v tests/*.t || die "tests failed"
+}
+
+src_install() {
+ default
+ newbashcomp ag.bashcomp.sh ag
+}
diff --git a/sys-apps/timer_entropyd/Manifest b/sys-apps/timer_entropyd/Manifest
new file mode 100644
index 000000000000..687d0b8bd251
--- /dev/null
+++ b/sys-apps/timer_entropyd/Manifest
@@ -0,0 +1,9 @@
+AUX timer_entropyd-0.1-syslog.patch 833 SHA256 996148cde4eec366077bdd72791daf777236c3080ad97bd87c9a29b1ce4a82a1 SHA512 93eefcd75c2c61515d8304f13d196022d76a8244c9b74764247d330e518a2c06fd93e6c9859cde7d6be2ae7e50c05f9e45d5a0c68bf2aa057821b52f588187c7 WHIRLPOOL d030fd3c06e80e3b7c26a7bbb98a422594e3613796e029c5d0f0ac2d909363d599fc53bb70f994131d60720d836721eaf4828d120732ff72db437acc9429424d
+AUX timer_entropyd.initd.1 236 SHA256 c6c458c6c853e7b3c03ad3f93251580d0da9ec8d96ff67c645f7fd4a50260413 SHA512 78f0ef265ec514a781e9c53d4938a56fd83196c4e923882aaa368c40545f59196cd74aa63be08d500db083603ab871434365583b23932e284fffcf7a4f897f1d WHIRLPOOL 5317acc5891fd60ba46dd26a61ecad8713525bfccd3c6dffa6777d32ca4f4ddc5187c7b872fc24a27fdf7f59c35866aa584f189969a5d659a3cac1ea613c1b96
+DIST timer_entropyd-0.2.tgz 8323 SHA256 0cf2b976b78c1b1169a4bec5a6fc71d8b118de927bc05002686376a61f73989a SHA512 789f19c2652781593b9ce91c584eab4ef9210bb47f1afb6186311416a67c84235ed1a163ffdc017b6d50ff706bf7ff6a84013b4b31fe6c09eabe95a484805898 WHIRLPOOL 8fa8233d8a867f7f5290ba1fbd39a2ed80756cfe0948fcc5038c256b4f62b39bd1592a639e6c13ce11c481a9a85288dd30568fd082c36bd09f6ad5986c421d15
+DIST timer_entropyd-0.3.tgz 8329 SHA256 3a022b82363c3ecdd005cd6c5a7441d62a46aa88059581c2f7677bd84f393560 SHA512 bdfedb594ee32daf7fb961a703842ca3479de158fc19bd75664b183e44bcf2ef3e74645cc6097f340834933db6f9133710df7d433ac062b2375494de5c052dcc WHIRLPOOL 8806784ffc7ce6c370d15980dfe00e4afd89dcfdfd2d06b5eb9f8d9d8b46e4974d429e93703fb26ad9ade4b5d53c2c25c88356b31aec08ed16340711d1025142
+EBUILD timer_entropyd-0.2.ebuild 975 SHA256 62a2d539b90b5fccb60fb8162aacad071044f0ff1e2c8787ca781cd7c57ad875 SHA512 b529143760436b945583a8eddd0f4b0b26f772670b5e44f37262c2f13408c4c3997a59adb09f6db083c4a59001e0d1ca21e47a6cbdf5cf261ac821d9f3e7ba28 WHIRLPOOL 33780c698671a5417cd5f5976ca50adc9f6b850b35f8cfd9ff64427ae90873a25b86dffbda41082c490d6fcbf999294261e47efa627d364c6f11fd8f0c65d6b3
+EBUILD timer_entropyd-0.3.ebuild 977 SHA256 98447f32a30103668ede88031e68f6271590605d06967201c84de6ad530077e8 SHA512 6a5c0b79e7382c9d9c0a845ea4eb491285a826eb3e64ca5b037bff586898fb22dbc9706fbb198c08a9857a99ee14440dc8370505e6be3de7479f68587466da94 WHIRLPOOL 36998fe3896c46fb15ec5f24cd1a2b7ddf333fed9a264fbe9c47ee230dd54c16ebf769b3dec47a13916eb9375b3367e8f8d85876776f1fe17d40f0acc33dc26d
+MISC ChangeLog 3171 SHA256 86b1e040c489d3c8106d7523ce0ef2827c212adbaa7860cdeaa4aa7ac9f65df4 SHA512 42ee735aa2fd0e7d781db1db824ec229267c8c97280e54290728e55a5bfc33ab88b6bc77baf031c69d786d70fabd979ceedc0dffe2a6bc8d4c35a0f7730b6f4e WHIRLPOOL 6ea15ef31ed2b6f01dc96b58516c254d57f28600ecb2d4d8cdc934ee18c6263140a1ee63b78f7a7d20ce2a2239f23a5257d64865c46b1ad5ac4a5e6baefd9fbb
+MISC ChangeLog-2015 2994 SHA256 600f5aa4489b5c0a34089897dde8d8f8f106ee89bae9c4944c603933c83e108e SHA512 00ed49c574713e1520b26010ab0d895e6a02adff05a30e0653075935081aa2a6a6cb78bf8dd9eb142a343fbd20574266033879abdbcc5119a77b7c9dc83a8c07 WHIRLPOOL e111940d0e4c1afe58e3bfa8dfcce45462ac9841951fa9cde38206501252a66abfc80eb8903a92deaf2f03407867e9faf13d2c0511964da3c66d43aeb104d919
+MISC metadata.xml 274 SHA256 9ed0fe1c82284c6787b06b106db4687cf1802becbe9f7be9dff958461f7bd329 SHA512 22599f724e804e72e8db6fcab11ee7495bb5cd3c3a6e25a6424c33bc0ba343859cb88664ecfccb9805c3f35128342aba446f1145edfee5b0a39a92f20a48ad81 WHIRLPOOL ba422005d91bdd12f4c01326681d82d55acfba23c38c10dae1f9534445090b01679fa3151a5b952128ce5fa1dc1dd8ffb3edb71128870164b081ea9378bb10a3
diff --git a/sys-apps/timer_entropyd/files/timer_entropyd-0.1-syslog.patch b/sys-apps/timer_entropyd/files/timer_entropyd-0.1-syslog.patch
new file mode 100644
index 000000000000..91be4a2ffdf0
--- /dev/null
+++ b/sys-apps/timer_entropyd/files/timer_entropyd-0.1-syslog.patch
@@ -0,0 +1,28 @@
+From 51dc916e4466d0033728dd14f318203f995b3ad0 Mon Sep 17 00:00:00 2001
+From: Jeremy Olexa <darkside@gentoo.org>
+Date: Tue, 5 Apr 2011 14:19:49 +0000
+Subject: [PATCH] Move syslog call to ifdef _DEBUG
+
+In order to prevent logfile spamming (once every 7 seconds), move the
+syslog call only be used if compiled with -D_DEBUG
+---
+ main.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/main.c b/main.c
+index 13b95dd..781b321 100644
+--- a/main.c
++++ b/main.c
+@@ -66,8 +66,8 @@ int main(int argc, char *argv[])
+
+ kernel_rng_add_entropy(bytes, sizeof(bytes), cur_n_bits);
+
+- syslog(LOG_DEBUG, "added %d bits of entropy data", cur_n_bits);
+ #ifdef _DEBUG
++ syslog(LOG_DEBUG, "added %d bits of entropy data", cur_n_bits);
+ printf("added %d bits of entropy data\n", cur_n_bits);
+ #endif
+
+--
+1.7.3.4
+
diff --git a/sys-apps/timer_entropyd/files/timer_entropyd.initd.1 b/sys-apps/timer_entropyd/files/timer_entropyd.initd.1
new file mode 100644
index 000000000000..57178ca4b36f
--- /dev/null
+++ b/sys-apps/timer_entropyd/files/timer_entropyd.initd.1
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/libexec/timer_entropyd
+
+depend() {
+ need localmount
+ before net
+ use logger
+
+ provide entropy
+}
diff --git a/sys-apps/timer_entropyd/metadata.xml b/sys-apps/timer_entropyd/metadata.xml
new file mode 100644
index 000000000000..1173ca1a509c
--- /dev/null
+++ b/sys-apps/timer_entropyd/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-needed -->
+ <use>
+ <flag name="debug">Enable printf debugging and logging to the syslog at DEBUG level</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/timer_entropyd/timer_entropyd-0.2.ebuild b/sys-apps/timer_entropyd/timer_entropyd-0.2.ebuild
new file mode 100644
index 000000000000..2b3bcbaaca69
--- /dev/null
+++ b/sys-apps/timer_entropyd/timer_entropyd-0.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A timer-based entropy generator"
+HOMEPAGE="http://www.vanheusden.com/te/"
+SRC_URI="http://www.vanheusden.com/te/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips x86"
+IUSE="debug selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-entropyd )"
+
+src_prepare() {
+ sed -i -e 's:-O2::' Makefile || die
+ epatch "${FILESDIR}"/${PN}-0.1-syslog.patch
+}
+
+src_compile() {
+ use debug && append-cppflags -D_DEBUG
+
+ tc-export CC
+ emake DEBUG= || die
+}
+
+src_install() {
+ exeinto /usr/libexec
+ doexe ${PN}
+ dodoc Changes readme.txt
+ newinitd "${FILESDIR}/timer_entropyd.initd.1" ${PN} || die
+}
+
+pkg_postinst() {
+ elog "To start ${PN} at boot do rc-update add ${PN} default"
+ elog "To start ${PN} now do /etc/init.d/${PN} start"
+ elog "To check the amount of entropy, cat /proc/sys/kernel/random/entropy_avail"
+}
diff --git a/sys-apps/timer_entropyd/timer_entropyd-0.3.ebuild b/sys-apps/timer_entropyd/timer_entropyd-0.3.ebuild
new file mode 100644
index 000000000000..d1a0febbc6a9
--- /dev/null
+++ b/sys-apps/timer_entropyd/timer_entropyd-0.3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A timer-based entropy generator"
+HOMEPAGE="http://www.vanheusden.com/te/"
+SRC_URI="http://www.vanheusden.com/te/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="debug selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-entropyd )"
+
+src_prepare() {
+ sed -i -e 's:-O2::' Makefile || die
+ epatch "${FILESDIR}"/${PN}-0.1-syslog.patch
+}
+
+src_compile() {
+ use debug && append-cppflags -D_DEBUG
+
+ tc-export CC
+ emake DEBUG= || die
+}
+
+src_install() {
+ exeinto /usr/libexec
+ doexe ${PN}
+ dodoc Changes readme.txt
+ newinitd "${FILESDIR}/timer_entropyd.initd.1" ${PN} || die
+}
+
+pkg_postinst() {
+ elog "To start ${PN} at boot do rc-update add ${PN} default"
+ elog "To start ${PN} now do /etc/init.d/${PN} start"
+ elog "To check the amount of entropy, cat /proc/sys/kernel/random/entropy_avail"
+}
diff --git a/sys-apps/tomoyo-tools/Manifest b/sys-apps/tomoyo-tools/Manifest
new file mode 100644
index 000000000000..68112c8a2717
--- /dev/null
+++ b/sys-apps/tomoyo-tools/Manifest
@@ -0,0 +1,6 @@
+AUX tomoyo-tools-2.5.0_p20130214-warnings.patch 814 SHA256 d909698fe20d568efbb28828f261a4316c05725180ace3b1d1841a13a134eda4 SHA512 947caa5ce7f2c80e7e0b40042b09568c4fed731b530cf70c1fa24fa0f1a382dd41443f3db82a6aa6444c0ebcd25fd7de657c0f1990d69579e4645f3efa561e10 WHIRLPOOL 11a771b7857e37df98c289c11e79daed573bcbf56068d855d5511bfd7c16a8bbb60d98670862c1500d9246aa3fc4ca4a95e2b724a919b9dfd73c13142e0f60ee
+DIST tomoyo-tools-2.5.0-20130214.tar.gz 210892 SHA256 78344506be3108804c76108e2eb193d4eb556983649c8f11f76ad69eda69b1ee SHA512 1ba6f6b3a3d4e644e6ee742beb64b09c6d527f130b1fe6d09a2e19760ced26f540ac8cc1e6f83fddacc3ef8844c3c23425191e4e0098c8b72b5ba3086adc9dc4 WHIRLPOOL edb912dbcfc784d2845cf8c9f81499e6089e67e98e1478b7dd096406cf2d1abfd314f15caf4248fc388fc667f14fa25f6d694652d156a45a6a9d337fc50fed80
+EBUILD tomoyo-tools-2.5.0_p20130214.ebuild 1429 SHA256 e66e4e0ecf5fcf7d3350ad39405fc9061754dfd6dbf47fa17bbc9b1b72b7eec8 SHA512 842044f79e9cc812ec202629046fff0c148fd7d4a1c205c9a2b6a39a18008e4f5d9169f9b513e076051b41d7dd0287d68212a557b8f657ad0355e3bd40bf2b2a WHIRLPOOL 0fcf16655af636443e47133ff8301c70af9c4784e3d411c8915a14074bf1312f19b16706417885e1fa1de643d5307e0d0f0d4491155d0886a448d98b2437dc3f
+MISC ChangeLog 2662 SHA256 f3f2590cbd949f7e782b3dfc9cf499517d08f9e3c086019adaead7e9b741d420 SHA512 3721079b34872ce337c72c68610d965a9a51dca8d90637f85df832a961495f845ebe1b44b03c6f481f15f71bd4b708d0cb58a8458a0949de4267c801a98f21a4 WHIRLPOOL ec91a943da379e4fa812884adfa3189e24f30d7507c84adaa91884057083eb7dc784f508f422c5f316160ab16587bf8ac4970e54be10c991f5406aeb92a8d3a2
+MISC ChangeLog-2015 4428 SHA256 1a129cf6e5c6c952ad295030dcdf5d9caa580e3f064436c05a77b57c850aa6e9 SHA512 3203f95983c7902afd5b4e049e510e3c65dd60d68059b02119dbc13cfbd3b33018ab219d41fc9ee3c4f95fc9301653de1760565715647cf862b25db3bfbaeea0 WHIRLPOOL a1f69e17f2b394865c0930247a3fc936caf098ee896e574afe105696fc9b89fe3625d860a2eff33ee519428c4e98f8aaf53c9f391bad772d485300203a689387
+MISC metadata.xml 295 SHA256 abb58e82bf86a02b38ef03e58145d44478a371d6f984491e126d009826f1dba1 SHA512 bcad45a60a3abfcb3054f0c82a733ccf5e0562f796cdafe414d2fb6e95301371591b1032404d83365d4a39a60bb1f3b2dd81d6a85592f72cced041cf36393ff1 WHIRLPOOL 9082b5bbdfc50960e18718a2cba475da59e51651efc1f1b39f92666c44b657b318922fdb020e3b343e08cb0d0c9cdc98e0c0c1ade6255a3c3619108d664924f4
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch
new file mode 100644
index 000000000000..8201093bbecb
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch
@@ -0,0 +1,22 @@
+diff --git a/usr_sbin/editpolicy_offline.c b/usr_sbin/editpolicy_offline.c
+index dbbd11e..e699cf4 100644
+--- a/usr_sbin/editpolicy_offline.c
++++ b/usr_sbin/editpolicy_offline.c
+@@ -2882,7 +2882,7 @@ static bool ccs_parse_ipaddr_union(struct ccs_acl_param *param,
+ struct ccs_ipaddr_union *ptr)
+ {
+ struct ccs_ip_address_entry e;
+- memset(ptr, 0, sizeof(ptr));
++ memset(ptr, 0, sizeof(*ptr));
+ if (ccs_parse_ip(ccs_read_token(param), &e) == 0) {
+ memmove(&ptr->ip[0], e.min, sizeof(ptr->ip[0]));
+ memmove(&ptr->ip[1], e.max, sizeof(ptr->ip[1]));
+@@ -4745,7 +4745,7 @@ static void ccs_write_control(char *buffer, const size_t buffer_len)
+ *
+ * Returns nothing.
+ */
+-static void ccs_editpolicy_offline_init(coid)
++static void ccs_editpolicy_offline_init(void)
+ {
+ static _Bool first = true;
+ int i;
diff --git a/sys-apps/tomoyo-tools/metadata.xml b/sys-apps/tomoyo-tools/metadata.xml
new file mode 100644
index 000000000000..b844e843cf6b
--- /dev/null
+++ b/sys-apps/tomoyo-tools/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 type="person">
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge-jp">tomoyo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild
new file mode 100644
index 000000000000..581fb1868f8b
--- /dev/null
+++ b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/53357/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEPEND="sys-libs/ncurses"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ !sys-apps/ccs-tools"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-warnings.patch
+
+ # Fix libdir
+ sed -i \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ Include.make || die
+
+ # tinfo
+ sed -i \
+ -e 's|-lncurses|$(shell ${PKG_CONFIG} --libs ncurses)|g' \
+ usr_sbin/Makefile || die
+
+ echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/tomoyo/conf\"" > "${T}/50${PN}"
+
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ dodir /usr/"$(get_libdir)"
+
+ emake INSTALLDIR="${D}" install
+
+ doenvd "${T}/50${PN}"
+
+ # Fix out-of-place readme and license
+ rm "${D}"/usr/$(get_libdir)/tomoyo/{COPYING.tomoyo,README.tomoyo} || die
+ dodoc README.tomoyo || die
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial policy configuration:"
+ elog
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog
+ elog "For more information, please visit the following."
+ elog
+ elog "http://tomoyo.sourceforge.jp/"
+}
+
+pkg_config() {
+ /usr/$(get_libdir)/tomoyo/init_policy
+}
diff --git a/sys-apps/toybox/Manifest b/sys-apps/toybox/Manifest
new file mode 100644
index 000000000000..8bec418b3b64
--- /dev/null
+++ b/sys-apps/toybox/Manifest
@@ -0,0 +1,21 @@
+AUX toybox-0.7.0-includes.patch 556 SHA256 f822aaf3491329a11a3d87662495ebd554a43fa9d31fd8be21e9f7b43e9cbaf8 SHA512 83b243f10be79855ca007214055043bdb2da6fba8734a87355faf357a84796a647f6b1d312ee8223ad60122b9fab5f44cf6372b116fb43c408fc320221a39174 WHIRLPOOL 090a9e1a4020a9656806c4ee3e148c1bea6a18b55e3bce434942cfa0c31b09ea86e9f3cd32770424d849b09088733e8deae5f37189e9f52cb200931816ac3003
+AUX toybox-0.7.0-parallel-build.patch 1148 SHA256 6331786735d41eefa12185c6bf501c290d2d60c4f4c8a3ca82ee198e2c60428f SHA512 b60ce1e8cb33203bea57d9cc757a872f87c55b378a8315d90c125ab9dadbf60d6b7a4bb444f9ae7b08c82ed29e211014aeadb767d5c0954816df66d823c3ba02 WHIRLPOOL 15189643516dac26b5683561a46f58c60d26aa29a2e1e325dc3bcfcbbeec388645a46b3b6a208b62af51fe65565887e00e65b2455bc7720d0e844427d2f1bb7b
+AUX toybox-0.7.0-sysmacros.patch 768 SHA256 b7576ea7770fc0a425d86966238cb6d22109ef771ef28fcb3f1467d1bdd9bd84 SHA512 8c43465012b93f7ec175d6d166a8f73475dd37fc1a09df5be25b12de57248ab155b1056ac488cd091433c9de9a602443ed57238818eddd02e41355412d27d19b WHIRLPOOL 7991c5d70ceb6b56a9b4416a74f483f8e1050b402dafdf83f48cc87508ab3a6ccccc1b5231fa9d5b47ab245465b4e93773ce1c151dddea0b93e802293a962ab3
+DIST toybox-0.6.0.tar.gz 710572 SHA256 d0b9788f61b9f9cbc685eabc0bd89b6925201ecb15a0cb4fbbd5fbf658b99991 SHA512 ddbd2252cd64a3508b9cd9d8a0a574805583b5b9c3861c153d25e8a394115c28b5a58d02a5aa7d7f58b9b9f3effcd33ac3f55788e0f3c4ad4265233f49c6f3ff WHIRLPOOL 0a83bc9895fd0c43ac541afdbfb6caaa294639646c82e70090fd40b77cf5943009188bb8f1b12b1af82d9bb94dd345892b36a5f7849d7154d34efa0b1f1a5f17
+DIST toybox-0.6.1.tar.gz 736371 SHA256 122ceb30c6ca0e8b8e914a427b1aaa89715c53a3df500afc56524ce88426838c SHA512 256afdcb0303b8f7a0bfa411cd0300d45460229dac3bf86fa147bb9d7806dc1224d0b1e28e58472932d8468407491559c6369cb29e78f67691560825dc25a68a WHIRLPOOL 0a5194965d3b4f4521193a51523d59cd52f23999c95cf167234853004cb0c3503aa4df96e65ab1d524741ff8e1d47def8af072f7eb8e8d55caec9c24b5525039
+DIST toybox-0.7.0.tar.gz 759570 SHA256 65428816f88ad3fe92b67df86dc05427c8078fe03843b8b9715fdfa6d29c0f97 SHA512 805d576712897f32b1f4e75b000a19a284622c040c0410ffc53e11c8ab7e3234e48cf5079a36622f03e6386acc9cbfc9ab94ba9e3e25e524ac0fa430a7d7947b WHIRLPOOL 5a4f4f35a5846891c46070dd9e520a675142d8b9ea9f33b02ff228c6a3198198a5e999b84464f985cde2bff396c4e5d2e4856b530408e5826b2e24e73d7cabba
+DIST toybox-0.7.1.tar.gz 779835 SHA256 5bb3069f58faf12940d5cfde3209ac7f63210bebdd9023979b0c20cede126ea7 SHA512 6347ce8a917e7e7f2046ae2aaefbfffe1c8aca42a4770c57dc23739de93647dc476356a4c3875a75d423bd7fd027c01a1b45627dc16f69801ef0369dbae6799b WHIRLPOOL 4c47aec665f436a9171b7fe6f4b28d8b569aea3565f27ff71b8c9cc070b2c1d5284083b0afd77557700f618cc74dcc2619df28333b1ce1b97f9599ad246951f0
+DIST toybox-0.7.2.tar.gz 798101 SHA256 79da71c7c39cef0a5f7b834f0b17d0d436e7994dd33e912f581b4c12d3b1681f SHA512 ce579be77b628a8466718c13b28390dd2988bbdd5d51b8fac5cc18125cd13968105bd991dc8bf1e6a9618e8a9c07eded361f6371e2f02f4cd7181b42c135f1ef WHIRLPOOL 63666d100880034ea9b74f0983cea2fce6e0b594e6668371d833e02a7a24d602ff5132d02d103a61fb89a5e595baf27b9c58d19d69cdced11eff8e865b0f0f0f
+DIST toybox-0.7.3.tar.gz 806773 SHA256 e6469b508224e0d2e4564dda05c4bb47aef5c28bf29d6c983bcdc6e3a0cd29d6 SHA512 8f6fcf156fbfedb706f3048b535369e235c47a40087405e54f0b0de877691c41b700b2ddd8c0d5abd6e09367f313c2eef1bc659331b2391738f6f0eefc9115fd WHIRLPOOL 5ebdfb133203405379d2d7f1cbb50e54dc23cb5e9126fb794dbdebb5d7ef43998be501c70443b1f644d7a10d70b9a185656187535a4aac4d1d5b93eb71cc5c7e
+DIST toybox-0.7.4.tar.gz 817027 SHA256 49d74ca897501e5c981516719870fe08581726f5c018abe35ef52c6f0de113e7 SHA512 380e8c22f1bcea34ee345b9bcfd9459c7bcde8518d0f5c74227ced2e59b063f619e1b6314c1af4e0371d7300fe916d55510272469a061c4232005b7533b09022 WHIRLPOOL 21a7db472d642e3e78af9252e662c86a2756771ea0ee13a97f51b902f5e5ab66be993e014b0f56af01c523e258456d7504ddd27c6d48b34a9898a0ab8923d497
+EBUILD toybox-0.6.0.ebuild 1157 SHA256 b128fab6de0a94d8f06e68a02de834e053610dbb5a259351eb008b47e154777e SHA512 126a62f29b61547b936693fe20581385340373bfcea6ecda899612e6d506de063a7cdf2567573224d0f8face5792a18ca1ac60baab121c7d636742e749046918 WHIRLPOOL 7c03996bef459d2ab3312be6d5a969effe851894569d604f67dcadb161f055101637beec0a4e5a8072f477b69e842486bf01085a7691d2d3f50aa3cc2cedd360
+EBUILD toybox-0.6.1.ebuild 1143 SHA256 e04fcfbf35ff60966ed9f3eeae4d659ec795fb39bc118692becfa77eb29d289f SHA512 0cf11ea87fa8332074ee3df684e4431168d78d199daaaa52ec9559ccf266acdf8eab8b77c0a5a6710284dbe0327fed6bb4789503629b1c7135ad5677a5cbf96e WHIRLPOOL 2dd5d237e9e3d59890c925fe01463c96053ab240edac3fd0750070a14118ac1141b67c2252e7ca98f792626a5e8257f65e2f5ac75d1194dae525aea86e79cf69
+EBUILD toybox-0.7.0.ebuild 1276 SHA256 feaa8f0a567609d70dce12bf15ff5f86cd26db660baf18da28f5e7955369e2dd SHA512 3ee5aa13536fde7b6171c3e6b515d964c2abe307dc0c71a9aab2c487320ca943a6629f0aa9870a0bd23dfa2084437aeb394f0d52cd58d8d084ccb78f3c0a0e10 WHIRLPOOL 037e8aa710cfd194b6955c8bb1cc3bb4d352c375a486bdcd0b911c54694f5e1dfe724decc64b55ae9eca924c55e3bb7cbb272bf0a07c4601ee76e509331ba715
+EBUILD toybox-0.7.1.ebuild 1153 SHA256 822a775eba794d57364e86d7aafc732019a02358dc5821d6ec3073beb1fc5dff SHA512 10b39e903fae908242b95be60cbd7d08808952eadb4e2ca75008d18d9980d83ba632142ebd720bddb81f5c64fd8770d547d164092ff89863daedf644e6790658 WHIRLPOOL 5d3d8de49b570bac363532cbd20dfadf9f3f4d4349e41ad358c9ea5e4a7d2a838e5fa0623b92ec31bccc745b70800c227e47a6fab117f3c8da894d409c43128d
+EBUILD toybox-0.7.2.ebuild 1153 SHA256 822a775eba794d57364e86d7aafc732019a02358dc5821d6ec3073beb1fc5dff SHA512 10b39e903fae908242b95be60cbd7d08808952eadb4e2ca75008d18d9980d83ba632142ebd720bddb81f5c64fd8770d547d164092ff89863daedf644e6790658 WHIRLPOOL 5d3d8de49b570bac363532cbd20dfadf9f3f4d4349e41ad358c9ea5e4a7d2a838e5fa0623b92ec31bccc745b70800c227e47a6fab117f3c8da894d409c43128d
+EBUILD toybox-0.7.3.ebuild 1153 SHA256 82c407409d054d71c7eb885ff1b59bbcb86a8144ffc51764d9498de6cddf6b9c SHA512 5e70c6665773d9bbf334ffb8f0d90005e76b3e47c3eb8d1796738a619c5d5743a7eec476e1d4bbbe721b561916b7f15759c3ae2dd3f1e6952b9050b913ebdea5 WHIRLPOOL 8d1f544109f3c40b5c6c702a9e5f2a08cfce3267348597e66bf673ca27b19759700680d400a0c1c800b96a835ba7b04f3346e5dcd2be4f36dbfd759e70711f82
+EBUILD toybox-0.7.4.ebuild 1153 SHA256 82c407409d054d71c7eb885ff1b59bbcb86a8144ffc51764d9498de6cddf6b9c SHA512 5e70c6665773d9bbf334ffb8f0d90005e76b3e47c3eb8d1796738a619c5d5743a7eec476e1d4bbbe721b561916b7f15759c3ae2dd3f1e6952b9050b913ebdea5 WHIRLPOOL 8d1f544109f3c40b5c6c702a9e5f2a08cfce3267348597e66bf673ca27b19759700680d400a0c1c800b96a835ba7b04f3346e5dcd2be4f36dbfd759e70711f82
+EBUILD toybox-9999.ebuild 1147 SHA256 bacae7e834b201df5c2c5d3d70bcf55acd46d7fac95aa059be015b3ceb27c18c SHA512 cbe42d685c6837e010349b4c46d5527e85bc9a7c68a70ec882e6e56d79a71d39fa0fc763e5efd404d37138c8fa5c39708d314f6ba9c81e279de79929d353f4a9 WHIRLPOOL b692b6d99946b13053617d02eddcac77a934b319a171cf49594ed1efc331212de9d2d0800c5716c39191ef16236e684f493b59ae41b7c2dee53d4c75c1215b0c
+MISC ChangeLog 3603 SHA256 39658be31aaaacad4b30386affb6419d27a9ae0effc265c79bf0ee505a4dc451 SHA512 22a76ac7d575aa7dc73eb33407e560db21dae42e203dec84bdd10991ac5c7dae7f4bd072b7766cde9eb4278ea292129997660ac875dbdc750b9ee810248a48c3 WHIRLPOOL 3c4a92a85a88c80c50092448beca361dbdabcad7fad3f315980c6032278a9ddb005a560ab02d49585f564d70fe06e0395ed27276bef4b39f733d9268b573b40a
+MISC ChangeLog-2015 1507 SHA256 2176a1f30cf30403bd63749db07ae54623acf4f70f0d288439b2dce2de6d540b SHA512 407883f3698ab8d5e8f123f3df8486c70d44c713fa373f41a60fde782ea34f98b0b93d0a7dd7ef2fa5f9d3b7c385c1545c60ba9ca2798c9fd61f6b338f397820 WHIRLPOOL 356afc59b4b0f724683576185f3ef07b3b4ed80b2fdd30d94c201d5eba2d9aa9df9acfde876faba444092806e826c434572de3c8c5ae1e37fb7c971e98c2df06
+MISC metadata.xml 253 SHA256 0c78fc0afa8613e977eb4628a883b16145da7aadb7d5de8f1c46404cefd75e5b SHA512 303268e1f46e337e32c64b544c0962ecbe8de1799c42736b3c3515b6f31954a655830c402317bd0534cac12059e17eeb5f360d010432dff795a136662a5c10f1 WHIRLPOOL 7a7e49ac517082517073244d5b110e8f751910e5f5245d52dada566f95f2432696db1747492592bc84b35fdf48e947d2e9aeca6e44f1f2a5076c26f3d6e1870c
diff --git a/sys-apps/toybox/files/toybox-0.7.0-includes.patch b/sys-apps/toybox/files/toybox-0.7.0-includes.patch
new file mode 100644
index 000000000000..9a10e96510b0
--- /dev/null
+++ b/sys-apps/toybox/files/toybox-0.7.0-includes.patch
@@ -0,0 +1,24 @@
+From 5e1c429eec977cd365f490137ca9dede0caef662 Mon Sep 17 00:00:00 2001
+From: Rob Landley <rob@landley.net>
+Date: Fri, 5 Feb 2016 15:13:24 -0600
+Subject: [PATCH] Debian unstable is even more pedantic than previous debian.
+
+---
+ scripts/mktags.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/scripts/mktags.c b/scripts/mktags.c
+index 3604260..9c23cf1 100644
+--- a/scripts/mktags.c
++++ b/scripts/mktags.c
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <ctype.h>
+
+ int main(int argc, char *argv[])
+ {
+--
+2.6.2
+
diff --git a/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch b/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch
new file mode 100644
index 000000000000..ed0797cf86c8
--- /dev/null
+++ b/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch
@@ -0,0 +1,40 @@
+fix from upstream for flaky parallel builds
+
+From e17fbf19c4b48d763041761052e98c2b4ee95487 Mon Sep 17 00:00:00 2001
+From: Rob Landley <rob@landley.net>
+Date: Fri, 26 Feb 2016 00:22:15 -0600
+Subject: [PATCH] Switch to $! for make.sh process enumeration.
+
+---
+ scripts/make.sh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/scripts/make.sh b/scripts/make.sh
+index 84dda34..c73a03d 100755
+--- a/scripts/make.sh
++++ b/scripts/make.sh
+@@ -264,17 +264,17 @@ do
+ LFILES="$LFILES $OUT"
+ [ "$OUT" -nt "$i" ] && continue
+ do_loudly $BUILD -c $i -o $OUT &
++ PENDING="$PENDING $!"
+
+ # ratelimit to $CPUS many parallel jobs, detecting errors
+
+ while true
+ do
+- PENDING="$(echo $PENDING $(jobs -rp) | tr ' ' '\n' | sort -u)"
+- [ $(echo -n "$PENDING" | wc -l) -lt "$CPUS" ] && break;
++ [ $(echo "$PENDING" | wc -w) -lt "$CPUS" ] && break;
+
+- wait $(echo "$PENDING" | head -n 1)
++ wait $(echo "$PENDING" | awk '{print $1}')
+ DONE=$(($DONE+$?))
+- PENDING="$(echo "$PENDING" | tail -n +2)"
++ PENDING="$(echo "$PENDING" | sed 's/^ *[0-9]*//')"
+ done
+ [ $DONE -ne 0 ] && break
+ done
+--
+2.6.2
+
diff --git a/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch b/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch
new file mode 100644
index 000000000000..245ad23f4f71
--- /dev/null
+++ b/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch
@@ -0,0 +1,28 @@
+From 99e5c17b5fe5a93066e81cc6fcc7ebf386cb6183 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Feb 2016 13:35:05 -0500
+Subject: [PATCH] include sys/sysmacros.h
+
+The major/minor macros are defined in sys/sysmacros.h. This has
+historically been pulled in implicitly by sys/types.h, but C libs
+are moving away from that as they aren't in POSIX. Use the header
+directly as defined by BSD systems.
+---
+ toys.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/toys.h b/toys.h
+index 8a29730..5e640a1 100644
+--- a/toys.h
++++ b/toys.h
+@@ -34,6 +34,7 @@
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ #include <sys/statvfs.h>
++#include <sys/sysmacros.h>
+ #include <sys/time.h>
+ #include <sys/times.h>
+ #include <sys/utsname.h>
+--
+2.6.2
+
diff --git a/sys-apps/toybox/metadata.xml b/sys-apps/toybox/metadata.xml
new file mode 100644
index 000000000000..f3de5f693ed8
--- /dev/null
+++ b/sys-apps/toybox/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/toybox/toybox-0.6.0.ebuild b/sys-apps/toybox/toybox-0.6.0.ebuild
new file mode 100644
index 000000000000..a0eb514ef84d
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.6.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin toybox_unstripped toybox
+}
diff --git a/sys-apps/toybox/toybox-0.6.1.ebuild b/sys-apps/toybox/toybox-0.6.1.ebuild
new file mode 100644
index 000000000000..e154894f4704
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.6.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin toybox_unstripped toybox
+}
diff --git a/sys-apps/toybox/toybox-0.7.0.ebuild b/sys-apps/toybox/toybox-0.7.0.ebuild
new file mode 100644
index 000000000000..693e1fc02af0
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.7.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-parallel-build.patch
+ epatch "${FILESDIR}"/${P}-includes.patch
+ epatch "${FILESDIR}"/${P}-sysmacros.patch
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin toybox_unstripped toybox
+}
diff --git a/sys-apps/toybox/toybox-0.7.1.ebuild b/sys-apps/toybox/toybox-0.7.1.ebuild
new file mode 100644
index 000000000000..bd845a49cb54
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.7.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin generated/unstripped/toybox toybox
+}
diff --git a/sys-apps/toybox/toybox-0.7.2.ebuild b/sys-apps/toybox/toybox-0.7.2.ebuild
new file mode 100644
index 000000000000..bd845a49cb54
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.7.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin generated/unstripped/toybox toybox
+}
diff --git a/sys-apps/toybox/toybox-0.7.3.ebuild b/sys-apps/toybox/toybox-0.7.3.ebuild
new file mode 100644
index 000000000000..855407636080
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.7.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin generated/unstripped/toybox toybox
+}
diff --git a/sys-apps/toybox/toybox-0.7.4.ebuild b/sys-apps/toybox/toybox-0.7.4.ebuild
new file mode 100644
index 000000000000..855407636080
--- /dev/null
+++ b/sys-apps/toybox/toybox-0.7.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gfto/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin generated/unstripped/toybox toybox
+}
diff --git a/sys-apps/toybox/toybox-9999.ebuild b/sys-apps/toybox/toybox-9999.ebuild
new file mode 100644
index 000000000000..3fc7451c7023
--- /dev/null
+++ b/sys-apps/toybox/toybox-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multiprocessing savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/landley/toybox.git"
+else
+ SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+# makefile is stupid
+RESTRICT="test"
+
+DESCRIPTION="Common linux commands in a multicall binary"
+HOMEPAGE="http://landley.net/code/toybox/"
+
+# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ epatch_user
+ restore_config .config
+}
+
+src_configure() {
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ einfo "Could not locate user configfile, so we will save a default one"
+ emake defconfig > /dev/null
+ fi
+}
+
+src_compile() {
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ save_config .config
+ newbin toybox_unstripped toybox
+}
diff --git a/sys-apps/tuned/Manifest b/sys-apps/tuned/Manifest
new file mode 100644
index 000000000000..c290f8315f1b
--- /dev/null
+++ b/sys-apps/tuned/Manifest
@@ -0,0 +1,12 @@
+AUX tuned-2.7.0-upstream.patch 1261 SHA256 5f5bcc075114f8fc55f34519f341752bff43ee75137f871a4eca3168d79b8895 SHA512 f2002184dd1d9b6f40c90ba5d205e66ccae0a546ab20fcf8b76d703ab712f7871d5d0c0bf5ab025dffab861e066a991e0304894c9607fecd4a8102fa3973d8a4 WHIRLPOOL e90cf897c298c306069a603cfc6a4e3a15def5cebad2d79d5ec07eb796132184688161d55c176c276aed6412143bcf1d7c7ea632d1fade33a41609a1ad8847e7
+AUX tuned-2.7.1-makefile-rpm.patch 885 SHA256 7f954456f0fc09d884f445e49d8e75c62eb051d5cd11a72e5a380dd9a08418a0 SHA512 51b8b299c15aa225f4de473150a05acfe2b669c494f4ab364c0e2f278282b7b64945963623cc778c9742d175efa875ca8c1957e50a55536598dd7c9ae8959636 WHIRLPOOL da8cb01ae1608145b6f22d734b62af8244f232e261437b75d478fd318686f75522dde0f4b6a92fbfd3db82bbe2230f938e152b04aa52ebad006e3d04ca82e97a
+AUX tuned-2.7.1-sysctl.patch 328 SHA256 e4ab351badf6d94ab31c229f25c8e7564c6f209729190dd5bf79780386e39946 SHA512 7c6fa6a9425e9955c019ad192476d802cf7870e33ca713f29ec203d157f495f3cf62c9965faddf5db39113285e51e5eb03d72111fab654efc8fbb8d38f08e75c WHIRLPOOL d3d67327541f8793cb0010ef167cca3be66cbbbb5792ec721a1426ac7cfdcc38c73f7c40feeea18c9273c8e672ab0b2d02da2a8faa2ee0461abc76caf47fa46b
+AUX tuned.initd 421 SHA256 ee234417a3db82a1129a8fffccf3028da97ee21fbf802ecdc0e21fbbe5145883 SHA512 0123e60def031887040df8690222cc553d93b3c5eb7413e19f722ef04ccf2aeb6468709f66866d432d4d0b0c0ed6875929f1292fde8ad18c4a6b589d1b40fab4 WHIRLPOOL 9c5a2f0894b447889f49f54e0ec3f51d4c87f2a9829adb10f220415bd23255a26da1b44eb894e2d31dbca93fcf60d8287976d3be1bd29052fbccdc516d442bc8
+DIST tuned-2.7.0.tar.bz2 107541 SHA256 8f50718264690732504486a65931d7ef558d4d43da9a86bc6f5c6855e3a7e448 SHA512 ce09dd854e89762fa376f7f63a59feb384940b5dbc5ad74370b33bbda3f060f09e79d2988de3535b072ad749ab7be43ccaaa46a343a9df50eec6c40d7ab85d55 WHIRLPOOL 272e77e429097f9c14beb31f5d911762837008a0e8affeb9abbcaf03172edd8296064b1926ff56f0c1272a9a51d88cf9044ee4b45676844cb249d5be1865983c
+DIST tuned-2.7.1.tar.bz2 107471 SHA256 03333eda9f3744ec214b1c20d0f79528a6438dafd5c79ff459b411414491802d SHA512 4a4785e3d20ed7f1c2969066676f5fa3d8286b500de1c63169d745e701e1410092d29429d25c13c3515d37ef73dd297945d69db176d693d4152bfbe9ba626833 WHIRLPOOL 847d37179190565299350796b7f548b342db309d6cadd7856b575c614cee38dcbcf856079fb59a565b536fadfb49c7ff2ab7068b38dab4a8ce12868baa16d968
+EBUILD tuned-2.7.0.ebuild 1110 SHA256 467f0c6ff7b09170ab03c2f00e35fd3ba309a3a9c4da5f6ddebd520e5f43f9f1 SHA512 f745d80d4c25138f051764fa48af016c76cf9fac770b19b10f8901dcc010040ffaeb7d137e3685e90dbda331cecf48f0cf0abac97a95473f8f0cc0abdae0206e WHIRLPOOL 3804e3778aeae8aaae34ae56ad68f861dbad0e5d79b066d775cf133bbdb5ad3da53032703e496d03a969e79f16d30c9fa0731b7de0a26d8cd0335ff0e469f1f6
+EBUILD tuned-2.7.1-r2.ebuild 1109 SHA256 07471369e65f78342bff689c028e53780f1894fdde747a4fd502216cbd5617b1 SHA512 4b4ef8ca04d2451bc084fe6654676ea50eb707df880fb3989d88d7728c73f5f2dc38a1d855a28a141eb4cc2d7d6f9e7087c291689504854a6946d8ffdd1ef1cc WHIRLPOOL 8b762a21030290be52d06c1c7ac620e6adb24a6824acfc4edfe7db7ae4c299154a87b96da78084ce09d21972a8a1639a100480d3cfceb84c0a6f299e59024965
+EBUILD tuned-2.7.1-r3.ebuild 1100 SHA256 c71e39beecfeeb6363f42d9afb1d8e389d5e0b5af2b3c4b11137fa649fd83166 SHA512 b490acead79906d78289c354ef0e3ca7cb4f774c6915e010a386d1b80e27583633c918c6eb6e68222357001129bb86a3534ff7cceb396579712f6c373b5074b3 WHIRLPOOL 6d71f253b695bd7e797a03e9cd9db6f8129e6fa96fa33ed178445a6c49383e961462c9ea45606287c1061a848e8623a3f322f5714262706592ba415e9ea190b5
+MISC ChangeLog 4631 SHA256 018e86db09080547e7e7aa0acfd0fb3b62d3a5baad6266818ff44866656e99e2 SHA512 5fdac662c8e8488ab727213c6a58ffe4e3c765178acc4522b64322a81e1ab16eefc9ef9971d591cea6a609eda291f1a55a54cf8761a51ede647d285bffa74546 WHIRLPOOL c91d59543e9acd7bd3099f8ae974d4ee3b34d361d49cd765b765eb8c9c13ae7bda171ceb3f158c4f42b0098ab6db843fedda75025426e752adf5b2590f4ec48c
+MISC ChangeLog-2015 759 SHA256 42d87f48bf24bc53ceb24b8a56fa171ea31488d68a8fffc5457085b1ec61e2c2 SHA512 3639341864212fdae6f6ea813689ef6db0b30c1318b780b6084a704699b922624af799e2420e26c31d67c2c663cd824aec4e095c3d78bb8e0d58c47811b6434b WHIRLPOOL 82df65fd1c98ae04b252d310d054fcf98824ed5a7255e93c8365b15d7138f2f54d27a7a6107cc4fa7ac3b775ea198215fb9c4024dc935bfabc7bd63937d35131
+MISC metadata.xml 388 SHA256 d14d4b24ddce3521072439405176da1fdd9fba6e19f1cd1a7078bd3232ffd9f0 SHA512 6f25c8d915777f95c6f134ba77006290b2d4c02ba70c7254ce7225062da042d8c9f7eb312f842a2988866804ff5069f5f3871e54f97d23bfac936da994d456ea WHIRLPOOL 7f6863bfe0d77498ac7b4ace6ab24e02e2c74ea837ee0ea3c4a1cf6818cf11ef90cda153104cb849502cc35547556b301173a40a9b64b0ad9169f5ba89a4808d
diff --git a/sys-apps/tuned/files/tuned-2.7.0-upstream.patch b/sys-apps/tuned/files/tuned-2.7.0-upstream.patch
new file mode 100644
index 000000000000..f864433b1941
--- /dev/null
+++ b/sys-apps/tuned/files/tuned-2.7.0-upstream.patch
@@ -0,0 +1,39 @@
+diff --git a/tuned-gui.py b/tuned-gui.py
+index 0555404..b169dec 100755
+--- a/tuned-gui.py
++++ b/tuned-gui.py
+@@ -89,7 +89,7 @@ class Base(object):
+ try:
+ self.controller = \
+ tuned.admin.DBusController(consts.DBUS_BUS,
+- consts.DBUS_OBJECT, consts.DBUS_INTERFACE)
++ consts.DBUS_INTERFACE, consts.DBUS_OBJECT)
+ self.controller.is_running()
+ except tuned.admin.exceptions.TunedAdminDBusException, ex:
+ response = self.tuned_daemon_exception_dialog.run()
+diff --git a/tuned.spec b/tuned.spec
+index 3a2dcec..1b46daf 100644
+--- a/tuned.spec
++++ b/tuned.spec
+@@ -334,8 +334,6 @@ fi
+ %changelog
+ * Tue Jul 19 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7.0-1
+ - new-release
+- - rebase tuned to latest upstream
+- resolves: rhbz#1289048
+ - gui: fixed save profile
+ resolves: rhbz#1242491
+ - tuned-adm: added --ignore-missing parameter
+diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
+index ad501c0..cbdd1be 100644
+--- a/tuned/admin/admin.py
++++ b/tuned/admin/admin.py
+@@ -98,7 +98,7 @@ class Admin(object):
+
+ def _action_list(self):
+ self._print_profiles(self._profiles_locator.get_known_names_summary())
+- self._action_dbus_active()
++ self._action_active()
+ return True
+
+ def _dbus_get_active_profile(self):
diff --git a/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch b/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch
new file mode 100644
index 000000000000..408ef2b73c3a
--- /dev/null
+++ b/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index df2a139..6200cae 100644
+--- a/Makefile
++++ b/Makefile
+@@ -19,8 +19,12 @@ else
+ GIT_PSUFFIX = .$(GIT_SUFFIX)
+ RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX)
+ endif
+-UNITDIR = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo /usr/lib/systemd/system)
+-TMPFILESDIR = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo /usr/lib/tmpfiles.d)
++UNITDIR_FALLBACK = /usr/lib/systemd/system
++UNITDIR_DETECT = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo $(UNITDIR_FALLBACK))
++UNITDIR = $(UNITDIR_DETECT:%{_unitdir}=$(UNITDIR_FALLBACK))
++TMPFILESDIR_FALLBACK = /usr/lib/tmpfiles.d
++TMPFILESDIR_DETECT = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo $(TMPFILESDIR_FALLBACK))
++TMPFILESDIR = $(TMPFILESDIR_DETECT:%{_tmpfilesdir}=$(TMPFILESDIR_FALLBACK))
+ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX)
+
+ DATADIR = /usr/share
diff --git a/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch b/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch
new file mode 100644
index 000000000000..8e2a70fc377d
--- /dev/null
+++ b/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch
@@ -0,0 +1,11 @@
+--- a/tuned/plugins/plugin_sysctl.py
++++ b/tuned/plugins/plugin_sysctl.py
+@@ -67,7 +67,7 @@
+ self._write_sysctl(option, value)
+
+ def _execute_sysctl(self, arguments):
+- execute = ["/sbin/sysctl"] + arguments
++ execute = ["sysctl"] + arguments
+ log.debug("executing %s" % execute)
+ return self._cmd.execute(execute)
+
diff --git a/sys-apps/tuned/files/tuned.initd b/sys-apps/tuned/files/tuned.initd
new file mode 100644
index 000000000000..61a25347b2e3
--- /dev/null
+++ b/sys-apps/tuned/files/tuned.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+TUNED_PIDFILE="/run/tuned.pid"
+TUNED_LOGFILE="/var/log/tuned.log"
+
+command="/usr/sbin/tuned"
+command_args="-d --pid ${TUNED_PIDFILE} --log ${TUNED_LOGFILE}"
+pidfile=${TUNED_PIDFILE}
+
+description="tuned is a daemon for monitoring and adaptive tuning of system devices."
+
+depend() {
+ need dbus
+}
diff --git a/sys-apps/tuned/metadata.xml b/sys-apps/tuned/metadata.xml
new file mode 100644
index 000000000000..f7a37bd48e1a
--- /dev/null
+++ b/sys-apps/tuned/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 type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+</maintainer>
+<longdescription lang="en">
+A tool that performs monitoring and adaptive configuration of the system
+according to selected profile.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/tuned/tuned-2.7.0.ebuild b/sys-apps/tuned/tuned-2.7.0.ebuild
new file mode 100644
index 000000000000..94d7224a94c2
--- /dev/null
+++ b/sys-apps/tuned/tuned-2.7.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 systemd
+
+DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices"
+HOMEPAGE="https://fedorahosted.org/tuned/"
+SRC_URI="https://fedorahosted.org/releases/t/u/tuned/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pyudev[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/dbus
+ sys-power/powertop
+ dev-util/systemtap
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-upstream.patch
+
+ sed -i \
+ -e "/^UNITDIR = /s:\$(shell rpm --eval '%{_unitdir}'):$(systemd_get_unitdir):" \
+ -e "/\$(DESTDIR)\/run\/tuned/d" \
+ Makefile ||die
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/tuned.initd tuned
+
+ python_fix_shebang "${ED}"
+}
diff --git a/sys-apps/tuned/tuned-2.7.1-r2.ebuild b/sys-apps/tuned/tuned-2.7.1-r2.ebuild
new file mode 100644
index 000000000000..be0e99e3ef44
--- /dev/null
+++ b/sys-apps/tuned/tuned-2.7.1-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 systemd
+
+DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices"
+HOMEPAGE="https://fedorahosted.org/tuned/"
+SRC_URI="https://fedorahosted.org/releases/t/u/tuned/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pyudev[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/dbus
+ sys-apps/ethtool
+ sys-power/powertop
+ sys-process/procps
+ dev-util/systemtap
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sysctl.patch
+ epatch "${FILESDIR}"/${P}-makefile-rpm.patch
+
+ sed -i \
+ -e "/\$(DESTDIR)\/run\/tuned/d" \
+ Makefile ||die
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/tuned.initd tuned
+
+ python_fix_shebang "${ED}"
+}
diff --git a/sys-apps/tuned/tuned-2.7.1-r3.ebuild b/sys-apps/tuned/tuned-2.7.1-r3.ebuild
new file mode 100644
index 000000000000..d8d3a5fb28ad
--- /dev/null
+++ b/sys-apps/tuned/tuned-2.7.1-r3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 systemd
+
+DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices"
+HOMEPAGE="https://fedorahosted.org/tuned/"
+SRC_URI="https://fedorahosted.org/releases/t/u/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+CDEPEND="
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pyudev[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]"
+
+DEPEND="
+ ${CDEPEND}"
+
+RDEPEND="
+ ${CDEPEND}
+ sys-apps/dbus
+ sys-apps/ethtool
+ sys-power/powertop
+ sys-process/procps
+ dev-util/systemtap"
+
+PATCHES=(
+ "${FILESDIR}/${P}-sysctl.patch"
+ "${FILESDIR}/${P}-makefile-rpm.patch"
+)
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "/\$(DESTDIR)\/run\/tuned/d" \
+ Makefile || die
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ python_fix_shebang "${ED}"
+}
diff --git a/sys-apps/tuxonice-userui/Manifest b/sys-apps/tuxonice-userui/Manifest
new file mode 100644
index 000000000000..abd3ba3fac0b
--- /dev/null
+++ b/sys-apps/tuxonice-userui/Manifest
@@ -0,0 +1,7 @@
+AUX tuxonice-userui-1.1-freetype-2.5.patch 947 SHA256 1c7109a4059a25c2811bb6570ce383abb40fda72b6f47f594f0e85b057f44c43 SHA512 7dd5541e61b9093ed4d89de6905ab59f865e305a0f263a92c5978200556e891d6c868fd9eea0737f74274da253c54e118686e8d881ec1af916ad0750d84fd3bc WHIRLPOOL f44ebceba0aa03b0bcf91e85e48f5840fec1cc869f48d38bf3445d5e3fcc4dfbd639efc80ca60df4ae75a2d992b9488d53dcd2ac4f0de8c175a99b74bed77c8b
+DIST tuxonice-userui-1.1.tar 3317760 SHA256 dfbd5c9f5b07c17502a3d96df58be38d53268b088f095186d955e9bba4324d3a SHA512 b837e3302437ccfcc7e984817c52576be27c774681abc18b1ad34990eab342b5d11ec13cf48cfef07f419f425c111715843c7ca427a1d4778bd48f1d7352684a WHIRLPOOL c15bb0c0ea17bc9f34343175450919361afd22feea06a4d6e013fabff8a9aee1c1d0fe8cffb87ebc56080e823bd608fe377f81e96b916c71c06971a28722738a
+DIST tuxonice-userui_1.1-2~exp1.debian.tar.gz 7628 SHA256 042936fe036563706d9db6e04750d890706dde8d90d51dfcbf64a7328653f427 SHA512 5aebc331452f9d8cac3f3d4db9fcc04c5a68759df2236a70a9fdf5c6e03da27170b1db71031b4b9bb2939c4e5a98c4755d26b6ebf0f81362a71c35e77b688f0b WHIRLPOOL 47b3dd3c6aa310200f04902b62861f0abd98656133432ab1b160ad03e7f79838ab1adac7c9be8b6c5302267b92890f5a712cf41cf7917e480b4009b8efedbc1c
+EBUILD tuxonice-userui-1.1-r2.ebuild 1484 SHA256 5b081c81b808867f082eb65e3755e8a2415a7964b04a0b33c3ce570a1e710edc SHA512 4ee5a911ac596c1d3b5df7f584105777c5783fc0249fb97bc3080d951938e2021fa4092a28a348999466745a0e49dda9b596797b6677ac776ebf598ba99bf04a WHIRLPOOL f1f97311965920ddf76bb3ed7acbf388dea59ddd125703f1c47b834abea926267e8d553f73e2d95b9db6b8a4b23b2463ebf69f051e8049e725a33a48edd298a6
+MISC ChangeLog 3226 SHA256 43db6d3a93850543aec3c48eef62b2c4950755eff11a489c21d920072a6560c5 SHA512 df22f18a489ceb6e0cf9168a5eb1ad9635d85f0def1d36435ad8bd240780eea0253ac5a5c4001fef5421210e8d35c4193cc8f75520e113508dd571900fd939f7 WHIRLPOOL 5586c29571ffb146a87c8ba3966bebd6efd5ec0548d4ba5217ec1c3ea4dd74238e5316352a039e2a7edaf798245e074f333bc700d35b91e5cbc580fab6f35e87
+MISC ChangeLog-2015 10487 SHA256 dc28d35bb079d8dd90f8db6e502b12ac1fbf81ab363a0e7e7de44499854438a0 SHA512 ffd7d3fad587d93ef2df0239137fa956f911f2f37587a36b04426f99d84fa61431709dc5c75e458a17de7b889f3d9817f0fda751cd7ddf3b8ce9c3065f501c2c WHIRLPOOL fbbf7afb5350a148e1f77ef27fa23fe9e0d90f2521c4a218ed80c22cd0016fb371dc511f76b6fcbbd9f5b0f6aba10e2c669ed8b12840825d48ceb05b2ffedae6
+MISC metadata.xml 567 SHA256 9bc8587f3f8e1e82c766aebdfc4cf6f86581daaceeb00752a001e0359b916eb2 SHA512 748cfd9c9d26b2e92401c08c3d025b93e541a24bceca9bd89a7970b8cd7d2e61966759159a2fcd39a4916a37c740f0953e8adc50a2acdd6523ce91eb14dc1bd0 WHIRLPOOL a0aeb1ccd11c1ba60362de7217ff6316cab4d30fa09468007a4a11fc4f2a35f674d679e80319781d46080c6c18cd0f893efbf125e336f9ccda21d4d2d285daeb
diff --git a/sys-apps/tuxonice-userui/files/tuxonice-userui-1.1-freetype-2.5.patch b/sys-apps/tuxonice-userui/files/tuxonice-userui-1.1-freetype-2.5.patch
new file mode 100644
index 000000000000..f86f99a650fd
--- /dev/null
+++ b/sys-apps/tuxonice-userui/files/tuxonice-userui-1.1-freetype-2.5.patch
@@ -0,0 +1,38 @@
+From ed1b73cf2f073f39200be79c633deb292cb8d4af Mon Sep 17 00:00:00 2001
+From: Damjan Georgievski <gdamjan@gmail.com>
+Date: Mon, 6 Jan 2014 03:06:18 +0100
+Subject: [PATCH] fix #includes for recent freetype versions
+
+---
+ fbsplash/ttf.c | 3 +--
+ fbsplash/ttf.h | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/fbsplash/ttf.c b/fbsplash/ttf.c
+index 384f400..1dd841c 100644
+--- a/fbsplash/ttf.c
++++ b/fbsplash/ttf.c
+@@ -27,8 +27,7 @@
+ #include <assert.h>
+
+ #include <ft2build.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
++#include FT_FREETYPE_H
+
+ #include "splash.h"
+
+diff --git a/fbsplash/ttf.h b/fbsplash/ttf.h
+index 034bb9e..6a4da9d 100644
+--- a/fbsplash/ttf.h
++++ b/fbsplash/ttf.h
+@@ -1,8 +1,7 @@
+ #ifndef _TTF_H
+ #define _TTF_H
+ #include <ft2build.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
++#include FT_FREETYPE_H
+
+ #define CACHED_METRICS 0x10
+ #define CACHED_BITMAP 0x01
diff --git a/sys-apps/tuxonice-userui/metadata.xml b/sys-apps/tuxonice-userui/metadata.xml
new file mode 100644
index 000000000000..8dcef3c457fd
--- /dev/null
+++ b/sys-apps/tuxonice-userui/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 type="person">
+ <email>arfrever.fta@gmail.com</email>
+ <name>Arfrever Frehtes Taifersar Arahesis</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="fbsplash">Add support for framebuffer splash</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">NigelCunningham/Tuxonice-Userui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/tuxonice-userui/tuxonice-userui-1.1-r2.ebuild b/sys-apps/tuxonice-userui/tuxonice-userui-1.1-r2.ebuild
new file mode 100644
index 000000000000..3de4429bd9e1
--- /dev/null
+++ b/sys-apps/tuxonice-userui/tuxonice-userui-1.1-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User Interface for TuxOnIce"
+HOMEPAGE="http://tuxonice.nigelcunningham.com.au/ https://github.com/NigelCunningham/Tuxonice-Userui"
+SRC_URI="http://tuxonice.net/files/${P}.tar.gz -> ${P}.tar
+ mirror://debian/pool/main/t/${PN}/${PN}_${PV}-2~exp1.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="fbsplash"
+
+DEPEND="fbsplash? (
+ media-libs/freetype:2=
+ media-libs/libmng:0=
+ media-libs/libpng:0=
+ virtual/jpeg:0=
+ )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ local d=${WORKDIR}/debian/patches
+ EPATCH_SOURCE=${d} epatch $(<"${d}"/series)
+ epatch "${FILESDIR}"/${P}-freetype-2.5.patch
+ sed -i -e 's/make/$(MAKE)/' Makefile || die
+ sed -i -e 's/ -O3//' Makefile fbsplash/Makefile usplash/Makefile || die
+}
+
+src_compile() {
+ # Package contain binaries
+ emake clean
+
+ use fbsplash && export USE_FBSPLASH=1
+ emake CC="$(tc-getCC)" tuxoniceui
+}
+
+src_install() {
+ into /
+ dosbin tuxoniceui
+ dodoc AUTHORS ChangeLog KERNEL_API README TODO USERUI_API
+}
+
+pkg_postinst() {
+ if use fbsplash; then
+ einfo
+ elog "You must create a symlink from /etc/splash/tuxonice"
+ elog "to the theme you want tuxonice to use, e.g.:"
+ elog
+ elog " # ln -sfn /etc/splash/emergence /etc/splash/tuxonice"
+ fi
+ einfo
+ einfo "Please see /usr/share/doc/${PF}/README.* for further"
+ einfo "instructions."
+ einfo
+}
diff --git a/sys-apps/uam/Manifest b/sys-apps/uam/Manifest
new file mode 100644
index 000000000000..e81716d38cb2
--- /dev/null
+++ b/sys-apps/uam/Manifest
@@ -0,0 +1,10 @@
+DIST uam-0.3.1.tar.bz2 59632 SHA256 3f3b43d1aa7d58908d417fa5d35424b91c247c90a2bbec58c5f20198dfac9a5d SHA512 bcd7a37701eb73bf3443d1fa98372fc0788cb3101619265c012d010f83e2cccc17fa8bc033704396707aa6de9caf0a80c9637dd7c7d1f86b01fd844967dac5a5 WHIRLPOOL 55d0fdd5638eaeff95789cb43bdcb86e7fa9d3190445ece0830e8d74cb95cb868a2e902dc3897ad62e46d42e29e7d229dafc8c5e2fa6ef7d693baeee680a7f2c
+DIST uam-0.3.2.tar.bz2 60508 SHA256 f2aa2f98b2b270802d1b5d76d369cbf7615ae458a3fbc9a4f8d1f21623bf2170 SHA512 4a4ee9286b3762227fc5a03a10998cb3b4a2f110cd648bb2ed45f400e31218a17d3929c83450e9190255bda1f22f4001a7f33842999b79c27aa12fc11f286273 WHIRLPOOL 9ca2af7f823191aed523f1a0c44c59d1bfa70755c63fad6fe793ca808fe0f0409ee61f435a6db0f938b00cf38cf9230be8d2c22a45805396d5a19fbfe4d58376
+DIST uam-0.3.tar.bz2 58143 SHA256 fd31989ea9837edf9f26d07cf954f65fbbc00b0c97184fc84670f365df6c270b SHA512 6b5ce8b37ea7b430a492c4411ac005d6555e49bbc4849ae03c5bb16e7dd89e8cac32349dfa0507f01cc6b22bdb111eda69471141da4952f8425f9390035c6085 WHIRLPOOL 47874c1184cf08c3cd53b6e9cd5c7d1ed7ed33466974e23c6fb14cd2612c605567a034902f2ebea1f9e49c56c962b6eebc8e34a3b8fa6f055539f487ff056496
+EBUILD uam-0.3.1.ebuild 1492 SHA256 f231c7a796daac172d3610ee2b69333af90164f64af1117fcfbd6da26b887824 SHA512 358e8fe2c5723ecdd109c3934e30e3b91ab2eeca13163ad3894fe7c1bc33f1e3dfc2be58e1ef61f138064db5ba9186760921fe30d31b274329c08e93f04aeec2 WHIRLPOOL abcdcd6939040726cdbee0938ca0cf179006d13c26b376505cee1cb070cbdf1c966ed9ee95db69f4a3ff854823d001ba29ab7552596c4b24eb1db9405e948186
+EBUILD uam-0.3.2.ebuild 1490 SHA256 60215d6de2763f3b4c00edf6c48e2fe4b86dcf9ad960683aeca481ab3c2f31ee SHA512 6c5c47fedab034583c1f471a1768e800b37f7127482e28cf1449be1c4085fb2caf46c0acf57ed8dce9849b7987addc05972f1b6c08a4c8a0f246a1a8e5a38ecf WHIRLPOOL 99d95dfb38c22b17a310d0b05c1d73e34b5c72dc0fd539f315e26ebbb37e41824fbab1a9de3fc7a606e37a7b4f7f29de74c677603c249011119c0462de261566
+EBUILD uam-0.3.ebuild 1625 SHA256 8cb465bfc1f8901bd31b77f9d55b3b44ffba48db462bbceedc953c758b69ad59 SHA512 9b94e6faa63a32f8dcd88f13ad2b750f0c0e2caf17ea4539490ee34bccec89229dbff456fb8ce194e356bcf8fd48752366dc7134f7af7fab93190e9c15bf54bf WHIRLPOOL 29529cd2c6c21ff727cac79b9ecbf6b7277788627c6e6de2cecca267b7c460e4baf4a7232c65df77b7e84f902cdf07e8ec59b100d6ac55dae2d4d6f5e6bfb93a
+EBUILD uam-9999.ebuild 1641 SHA256 dd0355801488844d44213bfd5a4b4e896cff7492c4524b0bd9dfba302d4f8ac0 SHA512 73b2b1a6d4139eb4bc6e846aa4cb0baa582215f5baf0b0fadf712213c79a53749ed0ac31a34463da4beaf0932c8425602830582beffb1c7e4beb207c7bc7c293 WHIRLPOOL e4535d67d8094cf64acdf9369d91d36492f32ace133cbbe0bf31fcf592beadb6ea6c2807dfdb3c14b3ad15cc5ff12be16a82ec83e9ca491aaf84752526ded47c
+MISC ChangeLog 2428 SHA256 290e2ecb893114fcd20dd6abc988ab2db95715fe83a5ae9230b4d7de0b1bafda SHA512 1adb2193675f4a45a33b06192231c0a40f187e07a392ef703b0d35f7b3c3b3f46abce7537271e6e2189c9a69d8989669e90879f6b07e1f0ac26c7a5423f5fab2 WHIRLPOOL f997fb42cb2835bef3b1bc04bc14f877d72a00e83b39abf1bb00f44d186926a1d81705e34aca39e26656bb9da5fd9122edb19e5d28f3e63473662fa9d83c276e
+MISC ChangeLog-2015 5448 SHA256 16a4c6dca5095eea021ebd8c9232f61348a4f4622cdb1c56a4b86a547f31a5a1 SHA512 cf4046eec93ec72f27f4e864dda8a25924ddb192141603a25a512c2416020328143ef463358384eee793ba4358395c2728dae5a910155f4766ed55f539dfa661 WHIRLPOOL 9ef722f8d660a46d232e92b115828451900f80ed7c7e69144d720010d7f18899af5b92e2f9d2683a9e54da19f13fa67850aa614587b19285b2e84c02b6f7d1a4
+MISC metadata.xml 720 SHA256 b99f6fd0226f6562656fbd1b95990421a91c71c636b694e42cbad92c0db07091 SHA512 8603fba8cd8b329edef637f3030bc6b2d9ab4b40bcb511a501140e71eae5cc89be8c1a488c5e45e0f1daaf83334306e3ba86966ac74bceba6426b68cb1b2fbe3 WHIRLPOOL a866b3345db8f6fcbff6989291dc3880ddc525d8fe9498d821e8d418a6e5fd67e96a9570d68cdc484a00d1013c73928a4dd2d5bcc7626d04d4aa8b1b4d913f54
diff --git a/sys-apps/uam/metadata.xml b/sys-apps/uam/metadata.xml
new file mode 100644
index 000000000000..6a889f577ea0
--- /dev/null
+++ b/sys-apps/uam/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <longdescription>
+ A set of udev rules and scripts to mount USB media automatically
+ as soon as they are inserted. Features flexible configuration,
+ including mountpoint naming rules, and hooks.
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://bitbucket.org/mgorny/uam/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/uam</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/uam/uam-0.3.1.ebuild b/sys-apps/uam/uam-0.3.1.ebuild
new file mode 100644
index 000000000000..facab0b105e5
--- /dev/null
+++ b/sys-apps/uam/uam-0.3.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils udev user
+
+DESCRIPTION="Simple udev-based automounter for removable USB media"
+HOMEPAGE="https://bitbucket.org/mgorny/uam/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_postinst() {
+ # The plugdev group is created by pam, pmount and many other ebuilds
+ # in gx86. As we don't want to depend on any of them (even pmount is
+ # optional), we create it ourself too.
+ enewgroup plugdev
+
+ elog "To be able to access uam-mounted filesystems, you have to be"
+ elog "a member of the 'plugdev' group."
+ elog
+ elog "Note that uam doesn't provide any way to allow unprivileged user"
+ elog "to manually umount devices. The upstream suggested solution"
+ elog "is to use [sys-apps/pmount]. If you don't feel like installing"
+ elog "additional tools, remember to sync before removing your USB stick."
+ elog
+ elog "If you'd like uam to mount ejectable media like CDs/DVDs, you need"
+ elog "to enable in-kernel media polling, e.g.:"
+ elog " echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs"
+ elog "where 5000 would mean a poll will occur every 5 seconds."
+ elog
+ elog "If you'd like to receive libnotify-based notifications, you need"
+ elog "to install the [x11-misc/sw-notify-send] tool."
+
+ udev_reload
+}
diff --git a/sys-apps/uam/uam-0.3.2.ebuild b/sys-apps/uam/uam-0.3.2.ebuild
new file mode 100644
index 000000000000..1700a15a47c8
--- /dev/null
+++ b/sys-apps/uam/uam-0.3.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils udev user
+
+DESCRIPTION="Simple udev-based automounter for removable USB media"
+HOMEPAGE="https://bitbucket.org/mgorny/uam/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_postinst() {
+ # The plugdev group is created by pam, pmount and many other ebuilds
+ # in gx86. As we don't want to depend on any of them (even pmount is
+ # optional), we create it ourself too.
+ enewgroup plugdev
+
+ elog "To be able to access uam-mounted filesystems, you have to be"
+ elog "a member of the 'plugdev' group."
+ elog
+ elog "Note that uam doesn't provide any way to allow unprivileged user"
+ elog "to manually umount devices. The upstream suggested solution"
+ elog "is to use [sys-apps/pmount]. If you don't feel like installing"
+ elog "additional tools, remember to sync before removing your USB stick."
+ elog
+ elog "If you'd like uam to mount ejectable media like CDs/DVDs, you need"
+ elog "to enable in-kernel media polling, e.g.:"
+ elog " echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs"
+ elog "where 5000 would mean a poll will occur every 5 seconds."
+ elog
+ elog "If you'd like to receive libnotify-based notifications, you need"
+ elog "to install the [x11-misc/sw-notify-send] tool."
+
+ udev_reload
+}
diff --git a/sys-apps/uam/uam-0.3.ebuild b/sys-apps/uam/uam-0.3.ebuild
new file mode 100644
index 000000000000..097c74fe846f
--- /dev/null
+++ b/sys-apps/uam/uam-0.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils user
+
+DESCRIPTION="Simple udev-based automounter for removable USB media"
+HOMEPAGE="https://bitbucket.org/mgorny/uam/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( NEWS README )
+
+pkg_postinst() {
+ # The plugdev group is created by pam, pmount and many other ebuilds
+ # in gx86. As we don't want to depend on any of them (even pmount is
+ # optional), we create it ourself too.
+ enewgroup plugdev
+
+ elog "To be able to access uam-mounted filesystems, you have to be"
+ elog "a member of the 'plugdev' group."
+ elog
+ elog "Note that uam doesn't provide any way to allow unprivileged user"
+ elog "to manually umount devices. The upstream suggested solution"
+ elog "is to use [sys-apps/pmount]. If you don't feel like installing"
+ elog "additional tools, remember to sync before removing your USB stick."
+ elog
+ elog "If you'd like uam to mount ejectable media like CDs/DVDs, you need"
+ elog "to enable in-kernel media polling, e.g.:"
+ elog " echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs"
+ elog "where 5000 would mean a poll will occur every 5 seconds."
+ elog
+ elog "If you'd like to receive libnotify-based notifications, you need"
+ elog "to install the [x11-misc/sw-notify-send] tool."
+
+ if [[ -e "${EROOT}"/dev/.udev ]]; then
+ ebegin "Calling udev to reload its rules"
+ udevadm control --reload-rules
+ eend $?
+ fi
+}
diff --git a/sys-apps/uam/uam-9999.ebuild b/sys-apps/uam/uam-9999.ebuild
new file mode 100644
index 000000000000..512c8e51355b
--- /dev/null
+++ b/sys-apps/uam/uam-9999.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="https://bitbucket.org/mgorny/${PN}.git"
+
+inherit git-r3
+#endif
+
+inherit autotools-utils udev user
+
+DESCRIPTION="Simple udev-based automounter for removable USB media"
+HOMEPAGE="https://bitbucket.org/mgorny/uam/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+#endif
+
+pkg_postinst() {
+ # The plugdev group is created by pam, pmount and many other ebuilds
+ # in gx86. As we don't want to depend on any of them (even pmount is
+ # optional), we create it ourself too.
+ enewgroup plugdev
+
+ elog "To be able to access uam-mounted filesystems, you have to be"
+ elog "a member of the 'plugdev' group."
+ elog
+ elog "Note that uam doesn't provide any way to allow unprivileged user"
+ elog "to manually umount devices. The upstream suggested solution"
+ elog "is to use [sys-apps/pmount]. If you don't feel like installing"
+ elog "additional tools, remember to sync before removing your USB stick."
+ elog
+ elog "If you'd like uam to mount ejectable media like CDs/DVDs, you need"
+ elog "to enable in-kernel media polling, e.g.:"
+ elog " echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs"
+ elog "where 5000 would mean a poll will occur every 5 seconds."
+ elog
+ elog "If you'd like to receive libnotify-based notifications, you need"
+ elog "to install the [x11-misc/sw-notify-send] tool."
+
+ udev_reload
+}
diff --git a/sys-apps/ucspi-proxy/Manifest b/sys-apps/ucspi-proxy/Manifest
new file mode 100644
index 000000000000..3799f4dd0916
--- /dev/null
+++ b/sys-apps/ucspi-proxy/Manifest
@@ -0,0 +1,9 @@
+DIST ucspi-proxy-0.97.tar.gz 26717 SHA256 14f76fc17b63143245b6a6af86d0d2159c7552e89da40009cccab397cdf8a93b SHA512 92adb00ee6af43c12a89cfb22b00f140fd222bc42b3faa8e6d660278344a9dacd9e24280a3e2769bd7e15787e1be028ee33dd670e627e46ed92065f5c37e08e0 WHIRLPOOL bac7c38686d4cb6b3060138751a9c61c5a281cd80726f4ad11c27b2001ec826d3e375194847728ba1901e0ae62b51b2a3d93c7b7f2f5eea11ecd48cd287c7bd3
+DIST ucspi-proxy-0.98.tar.gz 35278 SHA256 bcdae7bc9443f1410b53808839c5af4ce41a398ef17a32287a76749f052f54d2 SHA512 db767fd19825753107965a3f8a7e8c588e053fb911b3cbe1060684e6100244f9ce720f73e97bdfb26a3af00f6dda2a011866f7e5008ff7edca71b0fe3319da1b WHIRLPOOL 8adc0d4a5ded66cc4aaceb6e98563b6dff8ae126add1b03e078da9d5463a9ba5d9529f7039e75527f46e1996c3920c7f5711b32b94e0ced5d0ef277d12f53f56
+DIST ucspi-proxy-0.99.tar.gz 35537 SHA256 42943e978f51875e587567c552d349e058b983723c0d80756d1816e3ad560beb SHA512 5bed82bd0db2501c3de8b38e23a07c39bf9937b9ce95166cf1822a6bd5551aec945dc01d6ba716d7ce35f4aa7f2a126d860d31f7df2d807f1f4eb5e355e93164 WHIRLPOOL 983cb72b72a1dba1b221a54f0bc314b8a016d3a3fea94b2e9996903d87b223b93b417bf306ba6a9fe418b08fa1c7fab743e63a5ae75712c9685b90e5f4d4dfd3
+EBUILD ucspi-proxy-0.97.ebuild 755 SHA256 30a5f506f0cc4d6785965c466689a1dcfe1c06865a27aaa51347710df4a62e5b SHA512 6089b38d3c801fedfb3d287a75b8410954210381711168c752853f86c696ebf0274c29b757bda50f134fd2225bec155d8fc9036620e4390dfadcaf28dd0b009c WHIRLPOOL 8a0c95313ed0cb6ae05e5e148265332f84f934d3954ec01794c6327f5e681e065c50ad7cef67a64e8bc738386f14fd29ed59f0d21f7386902dc75951bbd85707
+EBUILD ucspi-proxy-0.98.ebuild 865 SHA256 9e6e69501ecece5fc01ddbf96c8a7028f962b5a62034e4da2edd36fbe56adc25 SHA512 31e67ceb2cedc179f475e8a4178fec3d103b0143cd6f48769f5e5443cd98239f78dfe70849655acaa39fd24ea446c6d281c4253bd292b8467879b3d203179b30 WHIRLPOOL c3b5b22193297c9932519c22db4b7ae0a8043c4a867b3a5fa675ca71375ff593f21624a51c00ee26698c41a19f72b769a0d8475d619eeeff3360f3c777cc824c
+EBUILD ucspi-proxy-0.99.ebuild 797 SHA256 63051184d739432fd82212c1239cdb52e3ea6b47c0abab95825577ea54a484e6 SHA512 cde49ac55e24326af4d44cfe78e816a94d058f73c53db78c891330354e8a8523b3e5c7538db8632e46557eeab4e1947253777a394e5512c8b59be7efbb1c047f WHIRLPOOL 4af3894d2cbe86da7aa657d0ed3a7808b7a76203f35fd0d03865f8eb453ab52364e2a043d64524f8297eeb2540e7636ecd2d1005640f22021b558b862b047cda
+MISC ChangeLog 3054 SHA256 f740c9f2f360ac188e4f7476186145e72bba3c5efc3fc3fa4229857f5f772239 SHA512 463f217a98f0092f774b5c0d0d84573674d52015fb5a673b1e00bcc83683ddc665f49476f5739a19ec4df1295da3a8e74aa4f57edc93ab1065d05fa24dcae210 WHIRLPOOL f4bea883d736e61c08f1c0fe53e845aaa75aa4fd6160a808a0d444b3415c9e468b4f7a575c41da18c55599ad6fb004c0a48831468647caef9a00b0a59e303ad6
+MISC ChangeLog-2015 2738 SHA256 8bd246cac32cd5491d1772d85a6ee6703a58deeb4ef85173021d41e2d8239f6e SHA512 507b4b07ab739023510f9f08c28ffa9499bb4400ce6794fcdd63dccc7f658c4ade267bb3bc5d5343e2d3a622b84087c8d14d06055b4940cde5004f914fe2c613 WHIRLPOOL 07728ae642594d0bf9dc4575cd00386e99736b9cee0174f1b5b43fba42eef945bfa621620dd79a718e10ad013afd893d89bcbeb19a109aebde4223b945071e2e
+MISC metadata.xml 439 SHA256 c46a01e67a6eaaee198650c8bf60a3f57b3b9181f2a7135332245195d7406753 SHA512 86623b17b403875797df6844dd2fe579cd1eddfd0c859e785a9140ebee91c9e35ad3ee9de001ee5b9887f46d4a08e6bf459fdbe1984c4666993c9c4ccbbb3a40 WHIRLPOOL 4f998de9b1ae90dc8b391949bd7079f1dd3e05db41ef1b8dc285829b97a53abd67a3e5323d8e9ef5278497c2681e3627285d125a5f9e8a5c5c2ac3c21599e3e1
diff --git a/sys-apps/ucspi-proxy/metadata.xml b/sys-apps/ucspi-proxy/metadata.xml
new file mode 100644
index 000000000000..118cf69936e1
--- /dev/null
+++ b/sys-apps/ucspi-proxy/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+This package contains a proxy program that passes data back and forth
+between two connections set up by a UCSPI server and a UCSPI client.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ucspi-proxy/ucspi-proxy-0.97.ebuild b/sys-apps/ucspi-proxy/ucspi-proxy-0.97.ebuild
new file mode 100644
index 000000000000..5eeb9dcf1f2c
--- /dev/null
+++ b/sys-apps/ucspi-proxy/ucspi-proxy-0.97.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs
+
+DESCRIPTION="A proxy program for two connections set up by a UCSPI server and a UCSPI client"
+HOMEPAGE="http://untroubled.org/ucspi-proxy/"
+SRC_URI="${HOMEPAGE}archive/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+DEPEND=">=dev-libs/bglibs-1.025"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+ echo "${D}/usr/bin" > conf-bin
+ echo "${D}/usr/share/man/" > conf-man
+ echo "/usr/include/bglibs/" > conf-bgincs
+ echo "/usr/lib/bglibs/" > conf-bglibs
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ dodoc ANNOUNCEMENT NEWS README TODO
+}
diff --git a/sys-apps/ucspi-proxy/ucspi-proxy-0.98.ebuild b/sys-apps/ucspi-proxy/ucspi-proxy-0.98.ebuild
new file mode 100644
index 000000000000..7a54182bf1ba
--- /dev/null
+++ b/sys-apps/ucspi-proxy/ucspi-proxy-0.98.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit toolchain-funcs multilib
+
+DESCRIPTION="proxy program for two connections set up by a UCSPI server and a UCSPI client"
+HOMEPAGE="http://untroubled.org/ucspi-proxy/"
+SRC_URI="http://untroubled.org/ucspi-proxy/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/bglibs-1.106"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e '/^>bin$/ac:::755::ucspi-proxy' INSTHIER
+}
+
+src_configure() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+ echo "${D}/usr/bin" > conf-bin
+ echo "${D}/usr/share/man" > conf-man
+ echo "/usr/include/bglibs" > conf-bgincs
+ echo "/usr/$(get_libdir)/bglibs" > conf-bglibs
+}
+
+src_install() {
+ einstall || die
+ dodoc ANNOUNCEMENT NEWS README TODO
+}
diff --git a/sys-apps/ucspi-proxy/ucspi-proxy-0.99.ebuild b/sys-apps/ucspi-proxy/ucspi-proxy-0.99.ebuild
new file mode 100644
index 000000000000..74dda71447c1
--- /dev/null
+++ b/sys-apps/ucspi-proxy/ucspi-proxy-0.99.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs multilib
+
+DESCRIPTION="proxy program for two connections set up by a UCSPI server and a UCSPI client"
+HOMEPAGE="http://untroubled.org/ucspi-proxy/"
+SRC_URI="http://untroubled.org/ucspi-proxy/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/bglibs-1.106"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e '/^>bin$/ac:::755::ucspi-proxy' INSTHIER
+}
+
+src_configure() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+ echo "${D}/usr/bin" > conf-bin
+ echo "${D}/usr/share/man" > conf-man
+ echo "/usr/include/bglibs" > conf-bgincs
+ echo "/usr/$(get_libdir)/bglibs" > conf-bglibs
+}
diff --git a/sys-apps/ucspi-ssl/Manifest b/sys-apps/ucspi-ssl/Manifest
new file mode 100644
index 000000000000..81367f79e345
--- /dev/null
+++ b/sys-apps/ucspi-ssl/Manifest
@@ -0,0 +1,11 @@
+DIST ucspi-ssl-0.94.tgz 112640 SHA256 343c0281269d88650823eb053fe80bf34b81f52c12b895f27534706b983a23b4 SHA512 a2b7fcea0da4c99a02cd0cf9402d59e55309a65031232e8afc9f29134be268c2e385840f5616c2046649a3f421563f1abcb707a8a8e93c7d29e7aef4a368b604 WHIRLPOOL 1ef3f5b447810eab97532b7fabaf94c56ddd0818a51f1149ec31ad2265c8899e90c3cf5c497a1c3570fc83918576abca2103132db3a494181ea2a872590fadb2
+DIST ucspi-ssl-0.97.tgz 112640 SHA256 cb90cd56fdb1ab51dafa2b228dd6595b61da21816fefcae646f02f41864cbe5b SHA512 2cafa091f700e0b06b6e0ab23ac02b9459003d747c1ee0e8e95cf0922d94f8f32bde5c956307e333b193ce4514cf99078383a3cc7ffee45aadbd303e2eb454c7 WHIRLPOOL d4e69029a2945b92957c4bdd3e17d19802d3e11c9a4f4916366f89b3b4e3a8b854712295a49828cc10808a106cbd1f200d1b5ff64a124119da35cb2d5fcd76d5
+DIST ucspi-ssl-0.98b.tgz 112640 SHA256 10d4f47c7085d8b0b56b026901569d73bb366a73825f4042b6c99cbcde506ff3 SHA512 c9f6749048059f870b5221296ecb01d4b5c57c1d8c8b3574c67926b60569bce983f257afacfc3383b1b9a60d55b470a5a1548d2c19b0a505b953171a83cee12b WHIRLPOOL 8777cf317d0b4c913e6457d39083e3b86c722d2fe71605efffd50de2c1296be6ce4de435891047224f93e558834dbe635cd53782cf89b5271a94fca8f48489b9
+DIST ucspi-ssl-0.99.tgz 112640 SHA256 083421b4da939221e01f3e576a3d7c7d49c78ab46e782ef31f6310e8a847d6c3 SHA512 2fd29d0f6b31b54f2b53206c6ccd0cf35c759834f34aab26d2a883319d33ff2257163150fc85a2e450c7bd81ce7bbed7b59c4013d71a35a9b3446a6338cb406e WHIRLPOOL 5db993287beb0bc1422a5d53a4fb14eba3cb34fdd073a883555a95799ed09ccfb7f230adec0fa5a7d79d4816e0b8d0093022987e6f28362119a129f0d3c89355
+EBUILD ucspi-ssl-0.94-r1.ebuild 1222 SHA256 59f7357d3c8d9a033228e44780b98dc7e98b485f622a6429b05707d6441ef7e4 SHA512 91cdf4b6a63cc3f1dbd29e394218b74e4f6ebf319cb6f14807f59b3a813f077f3f9aa1cfeeed3ba8c882c72686d59555a0bcd5e508ac2d04f7bd9778bb0b1657 WHIRLPOOL e8aaee8929f2d25db53fc4ead4918092cefc68e08ea2481354bed6ea2b9d67c3ca6509c4a2cb9feb895308408d33d1326dda0f7d36f59ac91eca3b3334146f50
+EBUILD ucspi-ssl-0.97.ebuild 1291 SHA256 1e32ccbc980a7bf98d843928272a2ec2927e0563b7cd7a10eaf09fbeb54a8b95 SHA512 d24336736ccba8f460c3fa5b96acfd9a62c991f0d06529b4f8b86552fd5b7ba57765fcc28e848a0a9400f622cc964e41c8f74a52c4e23def67a1c135f7aa9db1 WHIRLPOOL 1e875942153e136d22b578ed84732c3292e62aca80990176f619b923f7c6d3acf6d0cff2bffe9d32a4ee12997db31f93184300e2ba786b31fc1f7ca93a299603
+EBUILD ucspi-ssl-0.98b.ebuild 1261 SHA256 bf6367553f77d7f9be084a3037c14cec4676d40ae677d9b94887f10eebe04d0a SHA512 9ea688005132662c54f243b7f4f5f9264c4f73b3c179de7fc65cd69b5b77f12b4c963fc76300ab463b4c11d8ec66dd06c7d67842c6e66a0eb39a88426150b14d WHIRLPOOL 000e113084a1456b52dab6d93c96555a6f4ffdeafa86ef5716ed1294842b346ec37c111e9739aa079c86668688267426d49c4aff1b21e676a65dc2edab059e9d
+EBUILD ucspi-ssl-0.99.ebuild 1254 SHA256 9fa89be9405d5734713de31e822521cc2d1e80e5a00a05122db281ced9264142 SHA512 d23fbfb1527c201cf0e3b5efab516ae85c16f21b17500331e1b60140f3ec3bc179e60acf01d61cf7cd9bd56bd7f95f6d8e01acd5343f0da8554e8f4a5401071d WHIRLPOOL a1f704a7addaf197ce47b1ede6af27707212ea42e2cede14948f88ec9c5bffa52db37eaf08e4888c5647c23233d457176a1bdba30f4372c241e418eae5c733ac
+MISC ChangeLog 2564 SHA256 7d3b7f476e91451263bced04a3a0460c888cc0d7ee4e3d831a0eccecca88c94c SHA512 11a9b3b19c0371d802ef1750e5c16ae575364e2ad731f5e259baa785c51299cb0f5b65d58f665eacfc5b400e5c9ab2a47c021ecb44d8b3a35fbe98509931ab55 WHIRLPOOL c7ae17d3fe48396d15aebf5059e4188d36896c0b3ba1067ad8aba3602b55e280dba79653005c566eee2f545ceef64a806dd239c98c740be3c08fae8c7b9eca4d
+MISC ChangeLog-2015 6109 SHA256 65d3aeef78c7782174a868b4ab8f5cde8f860abc123f22a27ef911967b3772aa SHA512 be5b86cbf1de4a08daf9dd6078bd62dcf6acfe2adff49dee08649bf0070545a19c0652f9dcb3c5fabf10101d0e9ac7434ca8c38d13cb677d960146d73ddf4b43 WHIRLPOOL 0a0d3c99ff27cb369ea4116804a8255f3c26349194583084900ca595fba20e2661a8b79606c782fd65227e92edb584be5290d1ffc738d7de81930b5f4a646edc
+MISC metadata.xml 695 SHA256 0602ea5c09f8e95620cd4d0a7bba5bee201aba220dfbc5df45e114e0e50a9c91 SHA512 3595a8f9476a53f5100c917faf2c5933e7bc472564225b20322390fd0d2d8e1530d9080d1dfc27c127eede473944c6a49409680e36f04599bda12c361965b08e WHIRLPOOL 4974a2e040a306fee0fa38fb0af5fdaed2edd710ed21fc1fc81d0758504ea81aa3b85f7db679a20d8424ff9dd1bd00bbb99d3f072aae768255f241a943e991a3
diff --git a/sys-apps/ucspi-ssl/metadata.xml b/sys-apps/ucspi-ssl/metadata.xml
new file mode 100644
index 000000000000..8ad7e767f396
--- /dev/null
+++ b/sys-apps/ucspi-ssl/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>mailto:feh@fehcom.de</bugs-to>
+ </upstream>
+ <maintainer type="person">
+ <email>powerman-asdf@yandex.ru</email>
+ <name>Alex Efros</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ sslserver, sslclient, and sslhandle are command-line tools for
+ building SSL client-server applications. They conform to the UNIX
+ Client-Server Program Interface, UCSPI.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ucspi-ssl/ucspi-ssl-0.94-r1.ebuild b/sys-apps/ucspi-ssl/ucspi-ssl-0.94-r1.ebuild
new file mode 100644
index 000000000000..e04657a7bf63
--- /dev/null
+++ b/sys-apps/ucspi-ssl/ucspi-ssl-0.94-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fixheadtails qmail
+
+DESCRIPTION="Command-line tools for building SSL client-server applications"
+HOMEPAGE="http://www.fehcom.de/ipnet/ucspi-ssl.html"
+SRC_URI="http://www.fehcom.de/ipnet/ucspi-ssl/${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="perl"
+
+DEPEND="
+ >=dev-libs/openssl-0.9.6g:=
+ perl? ( dev-lang/perl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/ucspi-tcp
+"
+
+S="${WORKDIR}"/host/superscript.com/net/${P}/src
+
+src_prepare() {
+ ht_fix_all
+ sed -i -e 's:HOME/command:/usr/bin:' sslcat.sh sslconnect.sh https\@.sh || die
+ sed -i -e 's:auto:gcc:' conf-cc || die
+ sed -i -e 's:-m64::' conf-ld || die
+
+ qmail_set_cc
+
+ echo "/usr/bin" > conf-tcpbin || die
+ echo "/usr/" > home || die
+ echo "/usr/share/ca-certificates/" > conf-cadir || die
+ echo "${QMAIL_HOME}/control/dh1024.pem" > conf-dhfile || die
+}
+
+src_compile() {
+ # build fails without setting to j1
+ emake -j1
+}
+
+src_install() {
+ dodoc ../doc/*
+ doman ../man/*.*
+ dobin sslserver sslclient sslcat sslconnect https\@ || die
+ use perl && dobin sslperl
+}
diff --git a/sys-apps/ucspi-ssl/ucspi-ssl-0.97.ebuild b/sys-apps/ucspi-ssl/ucspi-ssl-0.97.ebuild
new file mode 100644
index 000000000000..d74049d48c98
--- /dev/null
+++ b/sys-apps/ucspi-ssl/ucspi-ssl-0.97.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fixheadtails qmail
+
+DESCRIPTION="Command-line tools for building SSL client-server applications"
+HOMEPAGE="http://www.fehcom.de/ipnet/ucspi-ssl.html"
+SRC_URI="http://www.fehcom.de/ipnet/ucspi-ssl/${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="perl"
+
+DEPEND="
+ >=dev-libs/openssl-0.9.8z_p8:=
+ perl? ( dev-lang/perl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/ucspi-tcp
+"
+
+S="${WORKDIR}"/host/superscript.com/net/${P}
+
+src_prepare() {
+ ht_fix_all
+ sed -i -e 's:auto:gcc:' conf-cc || die
+ sed -i -e 's:-m64::' conf-ld || die
+
+ qmail_set_cc
+
+ echo "/usr/bin" > conf-tcpbin || die
+ echo "/usr/share/ca-certificates/" > conf-cadir || die
+ echo "${QMAIL_HOME}/control/dh1024.pem" > conf-dhfile || die
+
+ cd src || die
+ echo "/usr/" > home || die
+ sed -i -e 's:HOME/command:/usr/bin:' sslcat.sh sslconnect.sh https\@.sh || die
+
+ eapply_user
+}
+
+src_compile() {
+ # build fails without setting to j1
+ emake -j1 -C src
+}
+
+src_install() {
+ dodoc doc/*
+ doman man/*.*
+ dobin src/https\@ src/sslcat src/sslclient src/sslconnect src/sslprint src/sslserver || die
+ use perl && dobin src/sslperl
+}
diff --git a/sys-apps/ucspi-ssl/ucspi-ssl-0.98b.ebuild b/sys-apps/ucspi-ssl/ucspi-ssl-0.98b.ebuild
new file mode 100644
index 000000000000..48a8d1408469
--- /dev/null
+++ b/sys-apps/ucspi-ssl/ucspi-ssl-0.98b.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fixheadtails qmail
+
+DESCRIPTION="Command-line tools for building SSL client-server applications"
+HOMEPAGE="http://www.fehcom.de/ipnet/ucspi-ssl.html"
+SRC_URI="http://www.fehcom.de/ipnet/ucspi-ssl/${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="perl"
+
+DEPEND="
+ dev-libs/openssl:0=
+ perl? ( dev-lang/perl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/ucspi-tcp
+"
+
+S="${WORKDIR}"/host/superscript.com/net/${P}
+
+src_prepare() {
+ ht_fix_all
+ sed -i -e 's:auto:gcc:' conf-cc || die
+ sed -i -e 's:-m64::' conf-ld || die
+
+ qmail_set_cc
+
+ echo "/usr/bin" > conf-tcpbin || die
+ echo "/usr/share/ca-certificates/" > conf-cadir || die
+ echo "${QMAIL_HOME}/control/dh1024.pem" > conf-dhfile || die
+
+ cd src || die
+ echo "/usr/" > home || die
+ sed -i -e 's:HOME/command:/usr/bin:' sslcat.sh sslconnect.sh https\@.sh || die
+
+ eapply_user
+}
+
+src_compile() {
+ emake sysdeps -C src
+ emake -C src
+}
+
+src_install() {
+ dodoc doc/*
+ doman man/*.*
+ dobin src/https\@ src/sslcat src/sslclient src/sslconnect src/sslprint src/sslserver || die
+ use perl && dobin src/sslperl
+}
diff --git a/sys-apps/ucspi-ssl/ucspi-ssl-0.99.ebuild b/sys-apps/ucspi-ssl/ucspi-ssl-0.99.ebuild
new file mode 100644
index 000000000000..e6a8f93f5fea
--- /dev/null
+++ b/sys-apps/ucspi-ssl/ucspi-ssl-0.99.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fixheadtails qmail
+
+DESCRIPTION="Command-line tools for building SSL client-server applications"
+HOMEPAGE="http://www.fehcom.de/ipnet/ucspi-ssl.html"
+SRC_URI="http://www.fehcom.de/ipnet/ucspi-ssl/${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="perl"
+
+DEPEND="dev-libs/openssl:=
+ perl? ( dev-lang/perl:= )"
+RDEPEND="${DEPEND}
+ sys-apps/ucspi-tcp"
+
+S="${WORKDIR}"/host/superscript.com/net/${P}
+
+src_prepare() {
+ ht_fix_all
+
+ sed -i -e 's:auto:gcc:' conf-cc || die
+ sed -i -e 's:-m64::' conf-ld || die
+ qmail_set_cc
+
+ echo "/usr/bin" > conf-tcpbin || die
+ echo "/usr/share/ca-certificates/" > conf-cadir || die
+ echo "${QMAIL_HOME}/control/dh1024.pem" > conf-dhfile || die
+ echo "/usr/" > src/home || die
+ sed -i -e 's:HOME/command:/usr/bin:' \
+ src/sslcat.sh src/sslconnect.sh src/https\@.sh || die
+
+ eapply_user
+}
+
+src_compile() {
+ cd src || die
+ emake sysdeps
+ emake uint32.h
+ emake
+}
+
+src_install() {
+ dodoc doc/*
+ doman man/*.*
+
+ cd src || die
+ dobin $(<../package/commands-base)
+ use perl && dobin $(<../package/commands-sslperl)
+}
diff --git a/sys-apps/ucspi-tcp/Manifest b/sys-apps/ucspi-tcp/Manifest
new file mode 100644
index 000000000000..38c27d0a86fc
--- /dev/null
+++ b/sys-apps/ucspi-tcp/Manifest
@@ -0,0 +1,23 @@
+AUX 0.88-ar-ranlib.patch 545 SHA256 7a009a8a9101b21b0eb6a99da2c00897726c8ab83babcdc1237a076c98ce8477 SHA512 9788fff2aaa01f24ae101a1fd45512218dd5032946614eb73ab033d839b21ce9fa9ff967593eb7add15ba4735dd5656e67f79beaaee720d2a2cae1fe8889b7e9 WHIRLPOOL 9f6897c1e13180d7b93cf8bff456a8c5e02342ec2b18f93be90ea97a5c8c85f40124e1bff3a65812b2f483ce1dbdb1c36f16e5c4414f9d683d49d94865169ca5
+AUX 0.88-bigendian.patch 458 SHA256 c39de40e34f1240ba0ee74503b2addf96b99009e4c94271f32c35fab0308fcda SHA512 042d2810a8fc968cc8b456216465a349bbde19402a26a64204fb3c9bd2621dfda8ceed1283b11812df8d33ba0eb2f4133de289306ef906060b9a9f5775db3918 WHIRLPOOL dba2f8f096bdb825bdf9e3970f2453381b2657dd0c65bf62fac14c9b28d5a2e04f699cc7914179e45b8611cfbf41bdeefba8273df9c9559293ac9a121954d176
+AUX 0.88-errno.patch 200 SHA256 dcadeb622c61783d236ad4eac0728fc9ece0ce546476e5c4623159e487201bad SHA512 d5d22c44835d232c8e7bff370c27aa266c4b6017ee3a957843610b34c3f7beab61441a8da0db67207c59e03be6d4e93d912f57b34484e752670e01dda97693e3 WHIRLPOOL 60dd38213f0e857c102eb709c032a44af0710afbeb57fd8feebc0c09d036fdd21e5039838c8c99c3adcc42e98d4d8ec935d5006a06ca5f5895118e87f1503cda
+AUX 0.88-exit.patch 281 SHA256 ee2b6ee04e442817dab1716e9996ed0025bd50bfe30a2d3590d45dab31d0803a SHA512 457017ce0cb1b4e21a04adc1cf3376488f20c1b1dfaa764cbabeacf8fdd9ba00f087660823f3817d7f75fc2d4510eb9686b998052a765bbe7dcccab5afec99f9 WHIRLPOOL 5dcf39c7f2524c43d0864bb4269e12f255a0e43b302b2a5c5ec2953e816425e8392ca43dc3869bf4ecdd85d4ef621f2395044dbe352af5891f6a0cfa9299e498
+AUX 0.88-large-responses.patch 772 SHA256 c75f74e43ad8fcdf8c358f8eaad99d4eac1f4085ddcf4dc45a48750f09f83b54 SHA512 d429065d9fa232207e21c6fb1c2359b0e7d35ac0142ed28ee6b00e150b0b3c5756e7eb684ee1b8aea35236986bdb046eff529e127c9c09994c4ced41370c26b7 WHIRLPOOL 2b03725dac25c260d2dd80ef58bd82f209a6f51c0f4c67761548eb237f2cf265d4cfaaae0aa38bba5ec1c700d10f0d64d7f19a729630d05edb11093757219eb6
+AUX 0.88-protos-ipv6.patch 2127 SHA256 36a5a473092af381c4b80f660b0c9e4b49221b1dd235435b20cc4412d66654e9 SHA512 953b3a53246ad16636276f679c84c5f1b86f3dc49a910017fa9c05b175d25a184ed870a920437f4305e2b54021ee2aa2a1d6fa8b7e8d5a367bbc060617b3eb8f WHIRLPOOL 47321810d2cd6cae125a4563357c40e8a580ed518d22f37b98b87f7309752682e81052013a9324821a69e00a0bfa490735cf42c971cafc469f6d89f4d3928ab0
+AUX 0.88-protos-no-ipv6.patch 671 SHA256 e8cdd3b1f3d944ebb1b6a7f8cc1a49815d78369aaf5b2d055fa5e07bbfeebc84 SHA512 56557365c1951e437b6a6b0b8c80d865adc16e2d1fb464a85b367af2d43fbce99e64a6e5a6c8fd4aa0cff53025db6c1ed25458f96316b3c51189d20c5688c0ed WHIRLPOOL d40fdf2e640c8df4c1bccf55d47aa8042b7b90ec2959ed3a91af1cb673701a0b19b1db7d59b25ba932363ead75fd4c7296217220d2f0387d8f847be8590eadcd
+AUX 0.88-protos-rblspp.patch 214 SHA256 3c3269700d3bbec94903fa26ecc20c62fb96fe803a28323cff7f3cb8addf2c62 SHA512 f207ff2e03a0d2088b4a00ff224cc4678fbb2bee7289d6d9cc1b8034cdbc7013f3e94a336694ddf6ec599bc86c799caeb1e194f2e44598add909b9ffe37436f1 WHIRLPOOL 6297869e7f730c0fa68f32d28125b4e9ccc65df42d6d034d7c4d5393be1315a2f1bf07f18eccb3cc141d9b94473ebfb9440a36f141dbfaa0025d7c018a179a31
+AUX 0.88-protos.patch 12339 SHA256 b0951821025b50dda42199a62ec428fda9af446b15a7bb6b3afc1e35029ec8c3 SHA512 af68c2307a1246d1854662a8ee2bcb60d40ff78b8619f62399739d252588152a896ca3955951908b635a5e04ffc17021c06a9b58eea95101afc8104f13f33fea WHIRLPOOL 22ef05ab8548a912f9fc9030d798207e5485014de63fea53f3f731ea2d5bd74d6cac3135cb25089b375ca6f533a080566e3bfff5b142f62f660b85015048cb50
+AUX 0.88-rblsmtpd-ignore-on-RELAYCLIENT.patch 462 SHA256 6179c0d030f80ddb72423f2c7c88ffaca7b9b05c68708ecbb28500672a1670bd SHA512 7570d0d59f90b55966070e2b63b53d4e354a5261de5b4297d8529a8abe2d337980e5f583c7dca5a73f94841be2456cbfdd06f52b3842042d24239ae9831b7555 WHIRLPOOL 996fcdee5d6b12e720b16275cc994c315377fd93413ad80f4fe6d7e4538a3ea6e9371a658c742997225dac785b7d209e28862938abfc6bfe89c12b79a89d448a
+AUX 0.88-tcprules.patch 483 SHA256 d56314ef38eac7fda23a2735ac52be5795c41283b2967e79bfb0f9051b777a57 SHA512 94f83a23de742695c77ea05cf88ef0a1215d6bade587951104b70693a1217c0a2e2e1dc519e4b1c5abad03324fb3d42cc13adb6f15c9455869d5ed6417db4f8a WHIRLPOOL 95cefe9d7fdf444d95dc4f22e128dc67b96e41289fa715a1c17379da8f03ef075b2a70353adbc0692d1d2a818742d6a1ace5cbf295f442f8c56cb2ddbad657d5
+AUX 0.88-uint-headers.patch 3100 SHA256 d496c2f3bfb976b5d451f95cdd43fde646c6225c58a55bbb838793ced30199c7 SHA512 515ab4a81a420697b955578986f544bec082ca42a4384d7795f26e197d6948ded810862d500536ce431e2e7e8dccc8874ffc38c0f1fdea193e9c9e843535f5f6 WHIRLPOOL cc7f33509ad21239afaa36248b5da3e1ff0ca00141468406152ceaab60701e6738017873718c5c4d602e1076bc9733c3ec5ba1c14231a01aa3ba6584d5ffdbfe
+AUX tcprules-Makefile 168 SHA256 931cfb9797dc514d1fce3c43b71f59c22e929c3b12682089bf30ebdac057a1db SHA512 b119ef421dee61a939cb05407481d5a9c109c88cca86271c045d27a5c1b22f2cb73cd28d541d17bca6b13ab6f50c568be95fa8d4554a11a7b29653947a006a18 WHIRLPOOL d553e12953f6e4b3b729a95122ec2a141e118a17573eeccd3d675b32639e2b53c7607e7682362a918be963a9fc108a7eac2650db8e18dc199602281bf116f9f7
+DIST ucspi-rss.diff 1828 SHA256 5101354eb86d8e11edefd7b83df4e9c274a55b845f4cb2ce36dda912aced56f4 SHA512 643514c57570fc0b4e817b07e6d26e831cec5b4657c3d1b9948bd90267fe370a340b911897d575eb94192e24ba71a03ac68ceb2774ef7c0e7ff819c5b4285bc3 WHIRLPOOL 9fd5735f31de2918b0bd8c5e9d9ff19af5f90a02328d4932c08ab72872257cac8b531ad15d61504eb111112f59581fc96e78e63973c4fe9d21316e20972c9bda
+DIST ucspi-tcp-0.88-ipv6.diff19.bz2 22632 SHA256 35952cd290d714452c840580126004cbae8db65b1632df67ac9c8fad7d1f9ace SHA512 58e38f9437b03aab121c5c1b9260806b5abd5a72bf22d14468955d6ff7ad2fb2ab285cb7a37b5dc3a568389aa02b8b3ecff0026b49a097ea86cfd340f2b38000 WHIRLPOOL 9d7dffc707011c178b2a2245598005ef0c20b2dad86ff9c34f5ccebe2a4702c8dda1e32103a85dc9b60d8343a05af1f1b333b59b00a02e5611c1d16bc593fe87
+DIST ucspi-tcp-0.88-man.tar.gz 7562 SHA256 09b1dd69ca3722b62c030abb27df9560cb72ff5d6247e4628e0c61e957b408ef SHA512 e779d6d6b24a3af0edc362def229c657c704143e5f1dfba8d16d26b3e6bcacb9c8ceaabcccac61485a4719221c144bc0c36ebca5182985dca85a6d72101d4146 WHIRLPOOL de321315bd7998af4fe7a85c7cd27dc62de7b1977e64f8a703e6e08ff69f451da8b20c34a8e2251bd63c535244799ddb1afdeff8bff7d98303e99dfd4e455f06
+DIST ucspi-tcp-0.88-rblspp.patch 6565 SHA256 68aeeb8482be71d9b7dd15d97a2855af34b6b8401fa598207f8de93ccdbb03e9 SHA512 f3212d9d3bb59ec3b1f2b2bd09a80dce1eeeaf082dea68f18350a3aef818ef221eccfeb4dc7afff5c3f9e59003ec40f5e37fff86a2a5ab3145be1fe81297c990 WHIRLPOOL e49c04147269076416a74f5951e398ef71b76a5c825f527fc85e9b3be68b061f353f5bfe01a9ff92c26a7cd11a30273cafc353ed491f1fa0897c4cef3e7ae72a
+DIST ucspi-tcp-0.88.tar.gz 53019 SHA256 4a0615cab74886f5b4f7e8fd32933a07b955536a3476d74ea087a3ea66a23e9c SHA512 44efbd477dacf31d39fc970e2d2f74526dc815b905742f6127f0d5c80928ecc7e743089eaab0492386a58d5b97905113fbe8bbc7214ae179b7be27966b7566c7 WHIRLPOOL 6e15e0139b10a5668af0ae7bfa903556f39f81bb42c12255c0b8738a14e9be92f1775600b318fb0926aea295b25e6383428200191237393bfaa69d5da5d909eb
+EBUILD ucspi-tcp-0.88-r17.ebuild 2467 SHA256 d0dfa75324ef7f2bbdf2ad796e314727010373ebef3d4b4cc6e80c68da779b86 SHA512 5691a29591259022e80a6cfbaba6d4755846223b14bce64c7df0e0e7ef08c57877f612b6e2b19da7d90a0c4dc8b3d8d5c8885a1b21eac19bd48bf527739e10d3 WHIRLPOOL 74ceea6b202570b54e3adec78a0df1cf954cab34da2b613910eda5a6f5ebf13627b6627f3791b8d3c097c0d1e51eee876e42092283fcd7f3dc26b9bbe4b85560
+EBUILD ucspi-tcp-0.88-r18.ebuild 2119 SHA256 7c7ab774c957bbf4128ae3cded7cea863b14fe16ee0a43270797e7a23f34fd4e SHA512 956a8c8bca90885dc968974e7538a91b156effc3923a3ecf166073533e437dffb2de7bfcf475f1a2002398078aa894d8be61e81e648d84f32a73577b591a38c3 WHIRLPOOL d2013ab94fdc5086230669f13ee1c362d41b2fbd8e718119e3fa7194596fa9a184e8f843b821024b16c62e4d58a69f613bc39c1312952f2afa8376bc50d856b8
+MISC ChangeLog 2917 SHA256 b80a7eba2f7317a4b6115a00b71483511d69eb6f08a4f034e0f8199a17880c05 SHA512 5c2616e32017f88cf5ddd0fd52545ab6a0f5c1b09c8376da70c04721a216fedd54eedc9cf80fa0d3767e3d2cccafb47afa801f8e10c028f8d8174ddbf7ecd9d3 WHIRLPOOL e80fe22ba8f05df75269626a2ca2382aae5749d409dfecd883bee90647c3e7164626cbab4a3a4229c24416f6ef76b23f18f79567f7a518f40e03d68cb1c64d21
+MISC ChangeLog-2015 11703 SHA256 591f788bd8f24eddadb8ce411fd8861bdd45691aeda641d94cf52d4a0f8f8f72 SHA512 9833c50601764961db70e745ae79d08be26f9dec06bfdeecab0b65b17d96d36965578aa477ecfc76b6ad66b8af0f5f1ef7291f554bb903325d199231c9d4da07 WHIRLPOOL 03235b07833969a468debcdcf60ca824b04bf151c7ae607dddee76f3d3a828411895d517c7b289b2057e9204d36d3a13458a357d0588a9d02d9e7f90f0f34a90
+MISC metadata.xml 677 SHA256 fa015b094331f69ba4497d24daf24759dd3c466a7e985775aa4676c8ffd84ddd SHA512 cf774ef0c4584905cbac057f7239138025e6a92e55a6ae006a91aa438d9dcf0bd0cb9939b4bc6eb7ac1cc2ae67c7804312b5011da3d91fbe1d95f9205ea456ac WHIRLPOOL a4a6484c82588c59ae884452a07c597a65655e16b01efd2e86705f56e33dcb1b1104e0f4aa266e63a338e6666199e8fcbe157f1354bc2ed89b8f742284ea5ba8
diff --git a/sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch b/sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch
new file mode 100644
index 000000000000..e6c8ba32f9d0
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch
@@ -0,0 +1,27 @@
+--- a/Makefile
++++ b/Makefile
+@@ -394,12 +394,14 @@
+ ) > load
+ chmod 755 load
+
++AR ?= ar
++RANLIB ?= ranlib
+ makelib: \
+ warn-auto.sh systype
+ ( cat warn-auto.sh; \
+ echo 'main="$$1"; shift'; \
+ echo 'rm -f "$$main"'; \
+- echo 'ar cr "$$main" $${1+"$$@"}'; \
++ echo '$(AR) cr "$$main" $${1+"$$@"}'; \
+ case "`cat systype`" in \
+ sunos-5.*) ;; \
+ unix_sv*) ;; \
+@@ -408,7 +410,7 @@
+ dgux-*) ;; \
+ hp-ux-*) ;; \
+ sco*) ;; \
+- *) echo 'ranlib "$$main"' ;; \
++ *) echo '$(RANLIB) "$$main"' ;; \
+ esac \
+ ) > makelib
+ chmod 755 makelib
diff --git a/sys-apps/ucspi-tcp/files/0.88-bigendian.patch b/sys-apps/ucspi-tcp/files/0.88-bigendian.patch
new file mode 100644
index 000000000000..c5884b883c13
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-bigendian.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/18892
+
+patch by Michael Hanselmann <hansmi@gentoo.org>
+
+--- a/tcpserver.c
++++ b/tcpserver.c
+@@ -422,7 +422,11 @@
+ se = getservbyname(x,"tcp");
+ if (!se)
+ strerr_die3x(111,FATAL,"unable to figure out port number for ",x);
++#if __BYTE_ORDER == __BIG_ENDIAN || BYTE_ORDER == BIG_ENDIAN
++ localport = ntohs(se->s_port);
++#else
+ uint16_unpack_big((char*)&se->s_port,&localport);
++#endif
+ }
+
+ if (!*argv) usage();
diff --git a/sys-apps/ucspi-tcp/files/0.88-errno.patch b/sys-apps/ucspi-tcp/files/0.88-errno.patch
new file mode 100644
index 000000000000..0d15819b9390
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-errno.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/16804
+
+--- a/error.h
++++ b/error.h
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/sys-apps/ucspi-tcp/files/0.88-exit.patch b/sys-apps/ucspi-tcp/files/0.88-exit.patch
new file mode 100644
index 000000000000..4925441b49d2
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-exit.patch
@@ -0,0 +1,10 @@
+Index: ucspi-tcp-0.88/tcprulescheck.c
+===================================================================
+--- ucspi-tcp-0.88.orig/tcprulescheck.c
++++ ucspi-tcp-0.88/tcprulescheck.c
+@@ -1,3 +1,5 @@
++#include <unistd.h>
++
+ #include "byte.h"
+ #include "buffer.h"
+ #include "strerr.h"
diff --git a/sys-apps/ucspi-tcp/files/0.88-large-responses.patch b/sys-apps/ucspi-tcp/files/0.88-large-responses.patch
new file mode 100644
index 000000000000..65fd8f534ef9
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-large-responses.patch
@@ -0,0 +1,26 @@
+12 Aug 2003; Robin H. Johnson <robbat2@gentoo.org>:
+
+allow larger responses
+
+--- a/rblsmtpd.c
++++ b/rblsmtpd.c
+@@ -163,7 +163,7 @@ void rblsmtpd(void)
+ else
+ if (!stralloc_copys(&message,"553 ")) nomem();
+
+- if (text.len > 200) text.len = 200;
++ if (text.len > 500) text.len = 500;
+ if (!stralloc_cat(&message,&text)) nomem();
+ for (i = 0;i < message.len;++i)
+ if ((message.s[i] < 32) || (message.s[i] > 126))
+--- a/rblspp.c
++++ b/rblspp.c
+@@ -142,7 +142,7 @@ void rblspp(void)
+ else
+ if (!stralloc_copys(&message,"E553 ")) nomem();
+
+- if (text.len > 200) text.len = 200;
++ if (text.len > 500) text.len = 500;
+ if (!stralloc_cat(&message,&text)) nomem();
+ for (i = 0;i < message.len;++i)
+ if ((message.s[i] < 32) || (message.s[i] > 126))
diff --git a/sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch b/sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch
new file mode 100644
index 000000000000..7faa51260ab5
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch
@@ -0,0 +1,89 @@
+rely on standard POSIX headers to fix globs of warnings
+
+requires 0.88-protos.patch first
+
+--- a/FILES
++++ b/FILES
+@@ -222,7 +222,6 @@ dns_nd6.c
+ dns_sortip6.c
+ fmt_xlong.c
+ ip6_fmt.c
+-ip6_scan.c
+ scan_0x.c
+ socket_accept6.c
+ socket_bind6.c
+--- a/TARGETS
++++ b/TARGETS
+@@ -177,7 +177,6 @@ dns_nd6.o
+ dns_sortip6.o
+ fmt_xlong.o
+ ip6_fmt.o
+-ip6_scan.o
+ scan_0x.o
+ socket_accept6.o
+ socket_bind6.o
+--- a/ip6.h
++++ b/ip6.h
+@@ -4,10 +4,10 @@
+ #include "byte.h"
+
+ extern unsigned int scan_ip6(const char *src,char *ip);
+-extern unsigned int fmt_ip6(char *dest,const char *ip);
++extern unsigned int ip6_fmt(char *dest,char ip[16]);
+
+ extern unsigned int scan_ip6_flat(const char *src,char *);
+-extern unsigned int fmt_ip6_flat(char *dest,const char *);
++extern unsigned int ip6_fmt_flat(char *dest,char[16]);
+
+ /*
+ ip6 address syntax: (h = hex digit), no leading '0' required
+--- a/remoteinfo6.c
++++ b/remoteinfo6.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "fmt.h"
+ #include "buffer.h"
+ #include "socket.h"
+@@ -5,11 +6,12 @@
+ #include "iopause.h"
+ #include "timeoutconn.h"
+ #include "remoteinfo.h"
++#include "readwrite.h"
+
+ static struct taia now;
+ static struct taia deadline;
+
+-static int mywrite(int fd,char *buf,int len)
++static ssize_t mywrite(int fd,char *buf,int len)
+ {
+ iopause_fd x;
+
+@@ -27,7 +29,7 @@ static int mywrite(int fd,char *buf,int len)
+ return write(fd,buf,len);
+ }
+
+-static int myread(int fd,char *buf,int len)
++static ssize_t myread(int fd,char *buf,int len)
+ {
+ iopause_fd x;
+
+--- a/socket_tcp6.c
++++ b/socket_tcp6.c
+@@ -3,6 +3,7 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <errno.h>
++#include <unistd.h>
+ #include "ndelay.h"
+ #include "socket.h"
+ #include "haveip6.h"
+--- a/dns.h
++++ b/dns.h
+@@ -87,6 +87,7 @@ extern int dns_ip4_qualify(stralloc *,stralloc *,const stralloc *);
+ extern int dns_ip6_qualify_rules(stralloc *,stralloc *,const stralloc *,const stralloc *);
+ extern int dns_ip6_qualify(stralloc *,stralloc *,const stralloc *);
+
++extern int dns_name6(stralloc *,char [16]);
+ extern int dns_name6_domain(char *,char *);
+ #define DNS_NAME6_DOMAIN (4*16+11)
+
diff --git a/sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch b/sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch
new file mode 100644
index 000000000000..328f0369ebaf
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch
@@ -0,0 +1,36 @@
+rely on standard POSIX headers to fix globs of warnings
+
+fixes that overlap with the ipv6 patch
+
+--- a/error.h
++++ b/error.h
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
+--- a/dns_random.c
++++ b/dns_random.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "dns.h"
+ #include "taia.h"
+ #include "uint32.h"
+--- a/dns_rcrw.c
++++ b/dns_rcrw.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "taia.h"
+ #include "env.h"
+ #include "byte.h"
+--- a/dns_transmit.c
++++ b/dns_transmit.c
+@@ -1,3 +1,4 @@
++#include <sys/socket.h>
+ #include "socket.h"
+ #include "alloc.h"
+ #include "error.h"
diff --git a/sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch b/sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch
new file mode 100644
index 000000000000..8007ce19b323
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch
@@ -0,0 +1,11 @@
+rely on standard POSIX headers to fix globs of warnings
+
+requires 0.88-protos.patch first
+
+--- a/rblspp.c
++++ b/rblspp.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include "byte.h"
+ #include "str.h"
+ #include "scan.h"
diff --git a/sys-apps/ucspi-tcp/files/0.88-protos.patch b/sys-apps/ucspi-tcp/files/0.88-protos.patch
new file mode 100644
index 000000000000..050fd1dd9d66
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-protos.patch
@@ -0,0 +1,544 @@
+rely on standard POSIX headers to fix globs of warnings
+
+--- a/tcprulescheck.c
++++ b/tcprulescheck.c
+@@ -1,3 +1,5 @@
++#include <unistd.h>
++
+ #include "byte.h"
+ #include "buffer.h"
+ #include "strerr.h"
+--- a/buffer.c
++++ b/buffer.c
+@@ -1,6 +1,6 @@
+ #include "buffer.h"
+
+-void buffer_init(buffer *s,int (*op)(),int fd,char *buf,unsigned int len)
++void buffer_init(buffer *s,ssize_t (*op)(),int fd,char *buf,unsigned int len)
+ {
+ s->x = buf;
+ s->fd = fd;
+--- a/buffer.h
++++ b/buffer.h
+@@ -1,6 +1,8 @@
+ #ifndef BUFFER_H
+ #define BUFFER_H
+
++#include <sys/types.h>
++
+ typedef struct buffer {
+ char *x;
+ unsigned int p;
+@@ -13,7 +15,7 @@ typedef struct buffer {
+ #define BUFFER_INSIZE 8192
+ #define BUFFER_OUTSIZE 8192
+
+-extern void buffer_init(buffer *,int (*)(),int,char *,unsigned int);
++extern void buffer_init(buffer *,ssize_t (*)(),int,char *,unsigned int);
+
+ extern int buffer_flush(buffer *);
+ extern int buffer_put(buffer *,char *,unsigned int);
+--- a/exit.h
++++ b/exit.h
+@@ -1,6 +1,6 @@
+ #ifndef EXIT_H
+ #define EXIT_H
+
+-extern void _exit();
++#include <unistd.h>
+
+ #endif
+--- a/install.c
++++ b/install.c
+@@ -1,3 +1,4 @@
++#include <sys/stat.h>
+ #include "buffer.h"
+ #include "strerr.h"
+ #include "error.h"
+--- a/readwrite.h
++++ b/readwrite.h
+@@ -1,7 +1,6 @@
+ #ifndef READWRITE_H
+ #define READWRITE_H
+
+-extern int read();
+-extern int write();
++#include <unistd.h>
+
+ #endif
+
+--- a/auto-str.c
++++ b/auto-str.c
+@@ -5,6 +5,7 @@
+ char bspace[256];
+ buffer b = BUFFER_INIT(write,1,bspace,sizeof bspace);
+
++#define puts _puts
+ void puts(char *s)
+ {
+ if (buffer_puts(&b,s) == -1) _exit(111);
+--- a/buffer.h
++++ b/buffer.h
+@@ -8,7 +8,7 @@ typedef struct buffer {
+ unsigned int p;
+ unsigned int n;
+ int fd;
+- int (*op)();
++ ssize_t (*op)();
+ } buffer;
+
+ #define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
+--- a/fd_copy.c
++++ b/fd_copy.c
+@@ -1,4 +1,5 @@
+ #include <fcntl.h>
++#include <unistd.h>
+ #include "fd.h"
+
+ int fd_copy(int to,int from)
+--- a/fd_move.c
++++ b/fd_move.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "fd.h"
+
+ int fd_move(int to,int from)
+--- a/socket_tcp.c
++++ b/socket_tcp.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+--- a/chkshsgr.c
++++ b/chkshsgr.c
+@@ -1,8 +1,9 @@
++#include <grp.h>
+ #include "exit.h"
+
+ main()
+ {
+- short x[4];
++ gid_t x[4];
+
+ x[0] = x[1] = 0;
+ if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
+--- a/prot.c
++++ b/prot.c
+@@ -1,10 +1,10 @@
+ #include "hasshsgr.h"
+ #include "prot.h"
+
+-int prot_gid(int gid)
++int prot_gid(gid_t gid)
+ {
+ #ifdef HASSHORTSETGROUPS
+- short x[2];
++ gid_t x[2];
+ x[0] = gid; x[1] = 73; /* catch errors */
+ if (setgroups(1,x) == -1) return -1;
+ #else
+@@ -13,7 +13,7 @@ int prot_gid(int gid)
+ return setgid(gid); /* _should_ be redundant, but on some systems it isn't */
+ }
+
+-int prot_uid(int uid)
++int prot_uid(uid_t uid)
+ {
+ return setuid(uid);
+ }
+--- a/prot.h
++++ b/prot.h
+@@ -1,7 +1,10 @@
+ #ifndef PROT_H
+ #define PROT_H
+
+-extern int prot_gid(int);
+-extern int prot_uid(int);
++#include <unistd.h>
++#include <grp.h>
++
++extern int prot_gid(gid_t);
++extern int prot_uid(uid_t);
+
+ #endif
+--- a/fixcrio.c
++++ b/fixcrio.c
+@@ -6,6 +6,7 @@
+ #include "exit.h"
+ #include "iopause.h"
+ #include "pathexec.h"
++#include "fd.h"
+
+ #define FATAL "fixcrio: fatal: "
+
+--- a/hier.c
++++ b/hier.c
+@@ -1,5 +1,9 @@
+ #include "auto_home.h"
+
++extern void h(char *, int, int, int);
++extern void d(char *, char *, int, int, int);
++extern void c(char *, char *, char *, int, int, int);
++
+ void hier()
+ {
+ h(auto_home,-1,-1,02755);
+--- a/mconnect-io.c
++++ b/mconnect-io.c
+@@ -1,3 +1,4 @@
++#include <signal.h>
+ #include "sig.h"
+ #include "wait.h"
+ #include "fork.h"
+@@ -12,7 +13,7 @@ buffer bout;
+ char inbuf[512];
+ buffer bin;
+
+-int myread(int fd,char *buf,int len)
++ssize_t myread(int fd,char *buf,int len)
+ {
+ buffer_flush(&bout);
+ return read(fd,buf,len);
+--- a/tcprules.c
++++ b/tcprules.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include "strerr.h"
+ #include "stralloc.h"
+ #include "getln.h"
+@@ -6,6 +7,8 @@
+ #include "fmt.h"
+ #include "byte.h"
+ #include "cdb_make.h"
++#include "open.h"
++#include "scan.h"
+
+ #define FATAL "tcprules: fatal: "
+
+--- a/pathexec_run.c
++++ b/pathexec_run.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "error.h"
+ #include "stralloc.h"
+ #include "str.h"
+--- a/recordio.c
++++ b/recordio.c
+@@ -8,6 +8,7 @@
+ #include "fmt.h"
+ #include "iopause.h"
+ #include "pathexec.h"
++#include "fd.h"
+
+ #define FATAL "recordio: fatal: "
+
+--- a/seek_set.c
++++ b/seek_set.c
+@@ -1,7 +1,6 @@
++#include <unistd.h>
+ #include <sys/types.h>
+ #include "seek.h"
+
+-#define SET 0 /* sigh */
+-
+ int seek_set(int fd,seek_pos pos)
+-{ if (lseek(fd,(off_t) pos,SET) == -1) return -1; return 0; }
++{ if (lseek(fd,(off_t) pos,SEEK_SET) == -1) return -1; return 0; }
+--- a/socket_udp.c
++++ b/socket_udp.c
+@@ -2,6 +2,7 @@
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <unistd.h>
+ #include "ndelay.h"
+ #include "socket.h"
+
+--- a/tcprulescheck.c
++++ b/tcprulescheck.c
+@@ -5,6 +5,7 @@
+ #include "strerr.h"
+ #include "env.h"
+ #include "rules.h"
++#include "open.h"
+
+ void found(char *data,unsigned int datalen)
+ {
+
+the prototypes are added near the top to avoid conflicts w/ipv6 patch
+
+--- a/socket.h
++++ b/socket.h
+@@ -3,6 +3,9 @@
+ #ifndef SOCKET_H
+ #define SOCKET_H
+
++extern int socket_tcpnodelay(int);
++extern int socket_ipoptionskill(int);
++
+ #include "uint16.h"
+
+ extern int socket_tcp(void);
+--- a/remoteinfo.c
++++ b/remoteinfo.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "fmt.h"
+ #include "buffer.h"
+ #include "socket.h"
+@@ -5,11 +6,12 @@
+ #include "iopause.h"
+ #include "timeoutconn.h"
+ #include "remoteinfo.h"
++#include "readwrite.h"
+
+ static struct taia now;
+ static struct taia deadline;
+
+-static int mywrite(int fd,char *buf,int len)
++static ssize_t mywrite(int fd,char *buf,int len)
+ {
+ iopause_fd x;
+
+@@ -27,7 +29,7 @@ static int mywrite(int fd,char *buf,int len)
+ return write(fd,buf,len);
+ }
+
+-static int myread(int fd,char *buf,int len)
++static ssize_t myread(int fd,char *buf,int len)
+ {
+ iopause_fd x;
+
+--- a/alloc.c
++++ b/alloc.c
+@@ -1,7 +1,5 @@
+ #include "alloc.h"
+ #include "error.h"
+-extern char *malloc();
+-extern void free();
+
+ #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
+ #define SPACE 2048 /* must be multiple of ALIGNMENT */
+--- a/alloc.h
++++ b/alloc.h
+@@ -1,8 +1,10 @@
+ #ifndef ALLOC_H
+ #define ALLOC_H
+
+-extern /*@null@*//*@out@*/char *alloc();
+-extern void alloc_free();
++#include <stdlib.h>
++
++extern /*@null@*//*@out@*/char *alloc(unsigned int);
++extern void alloc_free(char *);
+ extern int alloc_re();
+
+ #endif
+--- a/buffer_0.c
++++ b/buffer_0.c
+@@ -1,7 +1,7 @@
+ #include "readwrite.h"
+ #include "buffer.h"
+
+-int buffer_0_read(fd,buf,len) int fd; char *buf; int len;
++ssize_t buffer_0_read(fd,buf,len) int fd; char *buf; int len;
+ {
+ if (buffer_flush(buffer_1) == -1) return -1;
+ return read(fd,buf,len);
+--- a/buffer_get.c
++++ b/buffer_get.c
+@@ -2,7 +2,7 @@
+ #include "byte.h"
+ #include "error.h"
+
+-static int oneread(int (*op)(),int fd,char *buf,unsigned int len)
++static int oneread(ssize_t (*op)(),int fd,char *buf,unsigned int len)
+ {
+ int r;
+
+--- a/buffer_put.c
++++ b/buffer_put.c
+@@ -3,7 +3,7 @@
+ #include "byte.h"
+ #include "error.h"
+
+-static int allwrite(int (*op)(),int fd,char *buf,unsigned int len)
++static int allwrite(ssize_t (*op)(),int fd,char *buf,unsigned int len)
+ {
+ int w;
+
+--- a/case.h
++++ b/case.h
+@@ -4,7 +4,7 @@
+ extern void case_lowers(char *);
+ extern void case_lowerb(char *,unsigned int);
+ extern int case_diffs(char *,char *);
+-extern int case_diffb(char *,unsigned int,char *);
++extern int case_diffb(const char *,unsigned int,const char *);
+ extern int case_starts(char *,char *);
+ extern int case_startb(char *,unsigned int,char *);
+
+--- a/case_diffb.c
++++ b/case_diffb.c
+@@ -1,6 +1,6 @@
+ #include "case.h"
+
+-int case_diffb(register char *s,register unsigned int len,register char *t)
++int case_diffb(register const char *s,register unsigned int len,const register char *t)
+ {
+ register unsigned char x;
+ register unsigned char y;
+--- a/open.h
++++ b/open.h
+@@ -1,10 +1,10 @@
+ #ifndef OPEN_H
+ #define OPEN_H
+
+-extern int open_read(char *);
+-extern int open_excl(char *);
+-extern int open_append(char *);
+-extern int open_trunc(char *);
+-extern int open_write(char *);
++extern int open_read(const char *);
++extern int open_excl(const char *);
++extern int open_append(const char *);
++extern int open_trunc(const char *);
++extern int open_write(const char *);
+
+ #endif
+--- a/open_read.c
++++ b/open_read.c
+@@ -2,5 +2,5 @@
+ #include <fcntl.h>
+ #include "open.h"
+
+-int open_read(char *fn)
++int open_read(const char *fn)
+ { return open(fn,O_RDONLY | O_NDELAY); }
+--- a/open_trunc.c
++++ b/open_trunc.c
+@@ -2,5 +2,5 @@
+ #include <fcntl.h>
+ #include "open.h"
+
+-int open_trunc(char *fn)
++int open_trunc(const char *fn)
+ { return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); }
+--- a/open_write.c
++++ b/open_write.c
+@@ -2,5 +2,5 @@
+ #include <fcntl.h>
+ #include "open.h"
+
+-int open_write(char *fn)
++int open_write(const char *fn)
+ { return open(fn,O_WRONLY | O_NDELAY); }
+--- a/openreadclose.c
++++ b/openreadclose.c
+@@ -3,7 +3,7 @@
+ #include "readclose.h"
+ #include "openreadclose.h"
+
+-int openreadclose(char *fn,stralloc *sa,unsigned int bufsize)
++int openreadclose(const char *fn,stralloc *sa,unsigned int bufsize)
+ {
+ int fd;
+ fd = open_read(fn);
+--- a/openreadclose.h
++++ b/openreadclose.h
+@@ -3,6 +3,6 @@
+
+ #include "stralloc.h"
+
+-extern int openreadclose(char *,stralloc *,unsigned int);
++extern int openreadclose(const char *,stralloc *,unsigned int);
+
+ #endif
+--- a/stralloc.h
++++ b/stralloc.h
+@@ -7,7 +7,7 @@ GEN_ALLOC_typedef(stralloc,char,s,len,a)
+
+ extern int stralloc_ready(stralloc *,unsigned int);
+ extern int stralloc_readyplus(stralloc *,unsigned int);
+-extern int stralloc_copy(stralloc *,stralloc *);
++extern int stralloc_copy(stralloc *,const stralloc *);
+ extern int stralloc_cat(stralloc *,stralloc *);
+ extern int stralloc_copys(stralloc *,const char *);
+ extern int stralloc_cats(stralloc *,const char *);
+--- a/stralloc_copy.c
++++ b/stralloc_copy.c
+@@ -1,7 +1,7 @@
+ #include "byte.h"
+ #include "stralloc.h"
+
+-int stralloc_copy(stralloc *sato,stralloc *safrom)
++int stralloc_copy(stralloc *sato,const stralloc *safrom)
+ {
+ return stralloc_copyb(sato,safrom->s,safrom->len);
+ }
+--- a/taia.h
++++ b/taia.h
+@@ -19,7 +19,7 @@ extern double taia_frac(struct taia *);
+ extern void taia_add(struct taia *,struct taia *,struct taia *);
+ extern void taia_sub(struct taia *,struct taia *,struct taia *);
+ extern void taia_half(struct taia *,struct taia *);
+-extern int taia_less(struct taia *,struct taia *);
++extern int taia_less(const struct taia *,const struct taia *);
+
+ #define TAIA_PACK 16
+ extern void taia_pack(char *,struct taia *);
+--- a/taia_less.c
++++ b/taia_less.c
+@@ -2,7 +2,7 @@
+
+ /* XXX: breaks tai encapsulation */
+
+-int taia_less(struct taia *t,struct taia *u)
++int taia_less(const struct taia *t,const struct taia *u)
+ {
+ if (t->sec.x < u->sec.x) return 1;
+ if (t->sec.x > u->sec.x) return 0;
+--- a/uint32.h1
++++ b/uint32.h1
+@@ -5,7 +5,7 @@ typedef unsigned int uint32;
+
+ extern void uint32_pack(char *,uint32);
+ extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(char *,uint32 *);
+-extern void uint32_unpack_big(char *,uint32 *);
++extern void uint32_unpack(const char *,uint32 *);
++extern void uint32_unpack_big(const char *,uint32 *);
+
+ #endif
+--- a/uint32.h2
++++ b/uint32.h2
+@@ -5,7 +5,7 @@ typedef unsigned long uint32;
+
+ extern void uint32_pack(char *,uint32);
+ extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(char *,uint32 *);
+-extern void uint32_unpack_big(char *,uint32 *);
++extern void uint32_unpack(const char *,uint32 *);
++extern void uint32_unpack_big(const char *,uint32 *);
+
+ #endif
+--- a/uint32_unpack.c
++++ b/uint32_unpack.c
+@@ -1,6 +1,6 @@
+ #include "uint32.h"
+
+-void uint32_unpack(char s[4],uint32 *u)
++void uint32_unpack(const char s[4],uint32 *u)
+ {
+ uint32 result;
+
+@@ -15,7 +15,7 @@ void uint32_unpack(char s[4],uint32 *u)
+ *u = result;
+ }
+
+-void uint32_unpack_big(char s[4],uint32 *u)
++void uint32_unpack_big(const char s[4],uint32 *u)
+ {
+ uint32 result;
+
diff --git a/sys-apps/ucspi-tcp/files/0.88-rblsmtpd-ignore-on-RELAYCLIENT.patch b/sys-apps/ucspi-tcp/files/0.88-rblsmtpd-ignore-on-RELAYCLIENT.patch
new file mode 100644
index 000000000000..cd75a71000c7
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-rblsmtpd-ignore-on-RELAYCLIENT.patch
@@ -0,0 +1,25 @@
+--- rblsmtpd.c 2005-01-30 16:28:09.000000000 +0100
++++ rblsmtpd.c 2005-01-30 16:30:52.000000000 +0100
+@@ -195,6 +195,7 @@
+ {
+ int flagwantdefaultrbl = 1;
+ char *x;
++ char *y;
+ int opt;
+
+ ip_init();
+@@ -213,6 +214,13 @@
+ }
+ }
+
++ y = env_get("RELAYCLIENT");
++ if (y) {
++ if (!*y) {
++ decision = 1;
++ }
++ }
++
+ while ((opt = getopt(argc,argv,"bBcCt:r:a:")) != opteof)
+ switch(opt) {
+ case 'b': flagrblbounce = 1; break;
+
diff --git a/sys-apps/ucspi-tcp/files/0.88-tcprules.patch b/sys-apps/ucspi-tcp/files/0.88-tcprules.patch
new file mode 100644
index 000000000000..2986fdeed0f2
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-tcprules.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/90679
+
+patch by Michael Hanselmann <hansmi@gentoo.org>
+
+--- a/tcprules.c
++++ b/tcprules.c
+@@ -127,6 +127,9 @@
+ for (;;) {
+ int tmp;
+ tmp = byte_chr(x + colon,len - colon,':');
++ if (colon == 0 && tmp == len) {
++ strerr_die2x(111, FATAL, "Unable to find colon on non-empty line.");
++ }
+ colon += tmp;
+ if (colon == len) continue;
+ if (byte_equal(x+colon+1,4,"deny") || byte_equal(x+colon+1,5,"allow")) break;
diff --git a/sys-apps/ucspi-tcp/files/0.88-uint-headers.patch b/sys-apps/ucspi-tcp/files/0.88-uint-headers.patch
new file mode 100644
index 000000000000..3b637f56b292
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-uint-headers.patch
@@ -0,0 +1,133 @@
+use stdint.h rather than hand guessing the underlying size
+
+--- a/tryulong32.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-main()
+-{
+- unsigned long u;
+- u = 1;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- if (!u) _exit(0);
+- _exit(1);
+-}
+--- a/tryulong64.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-main()
+-{
+- unsigned long u;
+- u = 1;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+- if (!u) _exit(1);
+- _exit(0);
+-}
+--- a/uint32.h1
++++ /dev/null
+@@ -1,11 +0,0 @@
+-#ifndef UINT32_H
+-#define UINT32_H
+-
+-typedef unsigned int uint32;
+-
+-extern void uint32_pack(char *,uint32);
+-extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(const char *,uint32 *);
+-extern void uint32_unpack_big(const char *,uint32 *);
+-
+-#endif
+--- a/uint32.h2
++++ /dev/null
+@@ -1,11 +0,0 @@
+-#ifndef UINT32_H
+-#define UINT32_H
+-
+-typedef unsigned long uint32;
+-
+-extern void uint32_pack(char *,uint32);
+-extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(const char *,uint32 *);
+-extern void uint32_unpack_big(const char *,uint32 *);
+-
+-#endif
+--- a/uint64.h1
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#ifndef UINT64_H
+-#define UINT64_H
+-
+-/* sysdep: -ulong64 */
+-
+-typedef unsigned long long uint64;
+-
+-#endif
+--- a/uint64.h2
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#ifndef UINT64_H
+-#define UINT64_H
+-
+-/* sysdep: +ulong64 */
+-
+-typedef unsigned long uint64;
+-
+-#endif
+--- /dev/null
++++ b/uint32.h
+@@ -0,0 +1,12 @@
++#ifndef UINT32_H
++#define UINT32_H
++
++#include <stdint.h>
++typedef uint32_t uint32;
++
++extern void uint32_pack(char *,uint32);
++extern void uint32_pack_big(char *,uint32);
++extern void uint32_unpack(const char *,uint32 *);
++extern void uint32_unpack_big(const char *,uint32 *);
++
++#endif
+--- /dev/null
++++ b/uint64.h
+@@ -0,0 +1,8 @@
++#ifndef UINT64_H
++#define UINT64_H
++
++#include <stdint.h>
++
++typedef uint64_t uint64;
++
++#endif
+--- a/Makefile
++++ b/Makefile
+@@ -788,13 +788,6 @@ uint16_unpack.o: \
+ compile uint16_unpack.c uint16.h
+ ./compile uint16_unpack.c
+
+-uint32.h: \
+-tryulong32.c compile load uint32.h1 uint32.h2
+- ( ( ./compile tryulong32.c && ./load tryulong32 && \
+- ./tryulong32 ) >/dev/null 2>&1 \
+- && cat uint32.h2 || cat uint32.h1 ) > uint32.h
+- rm -f tryulong32.o tryulong32
+-
+ uint32_pack.o: \
+ compile uint32_pack.c uint32.h
+ ./compile uint32_pack.c
+@@ -803,10 +796,6 @@ uint32_unpack.o: \
+ compile uint32_unpack.c uint32.h
+ ./compile uint32_unpack.c
+
+-uint64.h: \
+-choose compile load tryulong64.c uint64.h1 uint64.h2
+- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
+-
+ unix.a: \
+ makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \
+ buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \
diff --git a/sys-apps/ucspi-tcp/files/tcprules-Makefile b/sys-apps/ucspi-tcp/files/tcprules-Makefile
new file mode 100644
index 000000000000..dc686f2b554c
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/tcprules-Makefile
@@ -0,0 +1,11 @@
+-include Makefile.*
+.PHONY: all
+.SUFFIXES:
+.SUFFIXES: .cdb
+
+all: $(CDBS)
+ @echo = CDBLIST: $(CDBS)
+
+%.cdb:: %
+ @echo + Rebuilding $* from $<
+ tcprules $@ $@.tmp < $<
diff --git a/sys-apps/ucspi-tcp/metadata.xml b/sys-apps/ucspi-tcp/metadata.xml
new file mode 100644
index 000000000000..544451dafde0
--- /dev/null
+++ b/sys-apps/ucspi-tcp/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>net-mail@gentoo.org</email>
+ <name>Net-Mail</name>
+ </maintainer>
+ <longdescription>
+ ucspi-tcp is a replacement for inetd. It consists of tcpserver and
+ tcpclient. tcpserver can listen on sockets and start programs in an
+ inetd like fashion except that information like the IP address and
+ remote port are communicated via environment variables. tcpclient makes
+ a TCP connection and runs a program of your choice. It sets up the same
+ environment variables as tcpserver.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r17.ebuild b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r17.ebuild
new file mode 100644
index 000000000000..6fdc72f20f6b
--- /dev/null
+++ b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r17.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils fixheadtails flag-o-matic qmail
+
+DESCRIPTION="Collection of tools for managing UNIX services"
+HOMEPAGE="http://cr.yp.to/ucspi-tcp.html"
+SRC_URI="
+ http://cr.yp.to/${PN}/${P}.tar.gz
+ mirror://qmail/ucspi-rss.diff
+ http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+ http://xs3.b92.net/tomislavr/${P}-rblspp.patch
+"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE="qmail-spp selinux"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ !app-doc/ucspi-tcp-man
+ selinux? ( sec-policy/selinux-ucspitcp )"
+
+pkg_setup() {
+ if [[ -n "${UCSPI_TCP_PATCH_DIR}" ]]; then
+ eerror
+ eerror "The UCSPI_TCP_PATCH_DIR variable for custom patches"
+ eerror "has been removed from ${PN}. If you need custom patches"
+ eerror "you should create a copy of this ebuild in an overlay."
+ eerror
+ die "UCSPI_TCP_PATCH_DIR is not supported anymore"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PV}-errno.patch
+ epatch "${FILESDIR}"/${PV}-exit.patch
+ epatch "${DISTDIR}"/ucspi-rss.diff
+ epatch "${FILESDIR}"/${PV}-rblsmtpd-ignore-on-RELAYCLIENT.patch
+ epatch "${DISTDIR}"/${P}-rblspp.patch
+
+ ht_fix_file Makefile
+
+ # gcc-3.4.5 and other several versions contain a bug on some platforms that
+ # cause this error:
+ # tcpserver: fatal: temporarily unable to figure out IP address for 0.0.0.0: file does not exist
+ # To work around this, we use -O1 here instead.
+ replace-flags -O? -O1
+
+ qmail_set_cc
+ echo "/usr/" > conf-home
+
+ # allow larger responses
+ sed -i -e 's|if (text.len > 200) text.len = 200;|if (text.len > 500) text.len = 500;|g' \
+ rblsmtpd.c rblspp.c
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ dobin tcpserver tcprules tcprulescheck argv0 recordio tcpclient *\@ \
+ tcpcat mconnect mconnect-io addcr delcr fixcrio rblsmtpd || die
+
+ if use qmail-spp; then
+ insinto "${QMAIL_HOME}"/plugins
+ insopts -m 755
+ doins rblspp
+ fi
+
+ doman "${WORKDIR}"/${P}-man/*.[1-8]
+ dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
+
+ insinto /etc/tcprules.d/
+ newins "${FILESDIR}"/tcprules-Makefile Makefile
+}
+
+pkg_postinst() {
+ einfo
+ einfo "We have started a move to get all tcprules files into"
+ einfo "/etc/tcprules.d/, where we have provided a Makefile to"
+ einfo "easily update the CDB file."
+ einfo
+}
diff --git a/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r18.ebuild b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r18.ebuild
new file mode 100644
index 000000000000..85884df56cf1
--- /dev/null
+++ b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r18.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils qmail
+
+DESCRIPTION="Collection of tools for managing UNIX services"
+HOMEPAGE="http://cr.yp.to/ucspi-tcp.html"
+SRC_URI="
+ http://cr.yp.to/${PN}/${P}.tar.gz
+ mirror://qmail/ucspi-rss.diff
+ http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+ http://xs3.b92.net/tomislavr/${P}-rblspp.patch
+ ipv6? ( http://www.fefe.de/ucspi/${P}-ipv6.diff19.bz2 )
+"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE="ipv6 qmail-spp selinux"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ !app-doc/ucspi-tcp-man
+ selinux? ( sec-policy/selinux-ucspitcp )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-protos.patch
+ if use ipv6; then
+ epatch "${WORKDIR}"/${P}-ipv6.diff19
+ epatch "${FILESDIR}"/${PV}-protos-ipv6.patch
+ epatch "${FILESDIR}"/${PV}-tcprules.patch #135571
+ epatch "${FILESDIR}"/${PV}-bigendian.patch #18892
+ else
+ epatch "${FILESDIR}"/${PV}-protos-no-ipv6.patch
+ fi
+ epatch "${DISTDIR}"/ucspi-rss.diff
+ epatch "${FILESDIR}"/${PV}-rblsmtpd-ignore-on-RELAYCLIENT.patch
+ epatch "${DISTDIR}"/${P}-rblspp.patch
+ epatch "${FILESDIR}"/${PV}-protos-rblspp.patch
+ epatch "${FILESDIR}"/${PV}-large-responses.patch
+ epatch "${FILESDIR}"/${PV}-uint-headers.patch
+ epatch "${FILESDIR}"/${PV}-ar-ranlib.patch
+
+ epatch_user
+}
+
+src_configure() {
+ qmail_set_cc
+ # The AR/RANLIB logic probably should get moved to the qmail eclass.
+ # See also the patch above for generating the "makelib" script.
+ tc-export AR RANLIB
+
+ echo "${EPREFIX}/usr/" > conf-home
+}
+
+src_install() {
+ dobin tcpserver tcprules tcprulescheck argv0 recordio tcpclient *\@ \
+ tcpcat mconnect mconnect-io addcr delcr fixcrio rblsmtpd
+
+ if use qmail-spp; then
+ insinto "${QMAIL_HOME}"/plugins
+ insopts -m 755
+ doins rblspp
+ fi
+
+ doman "${WORKDIR}"/${P}-man/*.[1-8]
+ dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
+
+ insinto /etc/tcprules.d
+ newins "${FILESDIR}"/tcprules-Makefile Makefile
+}
diff --git a/sys-apps/ucspi-unix/Manifest b/sys-apps/ucspi-unix/Manifest
new file mode 100644
index 000000000000..fdd135c570da
--- /dev/null
+++ b/sys-apps/ucspi-unix/Manifest
@@ -0,0 +1,10 @@
+AUX ucspi-unix-0.36-fix-parallel-build.patch 507 SHA256 9b852dae310804c8939058a8724108f1ed1877f0899c6189ef264e281d37e644 SHA512 6cc195171769fc57654f0ad0dcdc8a54e9655759e53f5c0c68ef0ed77b416e4a2635a5574a53e2112db3dcbdf8097039917ea466ec28a4e2cde9e4b4cc1bfe28 WHIRLPOOL 3661be582aeadbfc471f075a8630b6f2189a8bc971e6e8c5b1715f5627aa933df66acfca444e4b6007a3a47409c3914e11b96ad8a7b7a7b5d384dee46c98808a
+AUX ucspi-unix-0.36-include-sys_socket.h.patch 339 SHA256 b84cd70caf30112503a25474e67cab0b73baa38d2fb9577dce1193ed4b3771a1 SHA512 a8628e664ec993ab964879ff34b2bea7e70901cbc1f812262057fcea0fe34c64b2b910e4e1c77ba66df84fc8dfed94b69c6dbe7b7da09ddf379764b070a97161 WHIRLPOOL 0e9605b66ac4b238ae1d671f5c5e20918a8b98da9b17befd9718306cb61d37efa52d4f1585945c8fbd69ba862ceddb9405f78151fc05f3a5018e1bb15f999300
+AUX ucspi-unix-gentoo-head.patch 1097 SHA256 50f675e44de2c10b917441cfa0bbd77b119b545ae2819cd2cfb623e12c75ddd8 SHA512 e1d5be425dcdf2bf09031c8a11c384b092a2bda38159db37abff111191dac1aa0b40a401cb068d86f97747dad684a0720f3b5b8f18c2d9caaf64368a71d46c3c WHIRLPOOL 6f9c757c108e111249877f9472830ae61d1da87264d7c94de4b8e312048b6c71be9a7c3fa81a720dbfb2ce9488d6f9cd52a93e585ffeee99992ed0b02250bc61
+DIST ucspi-unix-0.36.tar.gz 14175 SHA256 428d23fcc91b4dd66f64932978cd26316b82d2599cff7a512690ff1ec9df02e2 SHA512 56fc5145315ff43629f455996874d6434ebee16e9fccf78ce3dcdd6312daafc508e2dce0984ca9ea73b9ff0da5d2171fc678c8e200641e1c0be02e7863bc5633 WHIRLPOOL cd844fe51122c0157b6ef32907a0781b31a8fec709ac747c968dcb5a90b07e565afd00a4425982757985e9c33cf4f93a78c635a77f310b43381441ffa0f2274b
+EBUILD ucspi-unix-0.36-r2.ebuild 868 SHA256 aad680eb08cc196b03061087b0b21cd07833f8f8213c399b9cc95f2067b220bc SHA512 735c533c82e3c268e32c910d846d2c66a6d649e331090b31e549fbfc59192171fce5f819f0139927c961551cf493521d74dff2a1b790ec6c93f9e4c2117fe7e2 WHIRLPOOL 2bc4f897919d01bf1a1ab6eed583b09797b8a4abec2d0f32594107ef060e3d67f23d0626b96ffec2dc0b3c921fd99082999cf89cd6088c09775a6b00a018aac8
+EBUILD ucspi-unix-0.36-r3.ebuild 966 SHA256 b7d15b626df8145f0009663ce2184f64e5e8ffc39808dec7dd4f7ae4c980a48c SHA512 4d5c666ccb1eb116299aed23f02799e41c950771315704bcf586d9158fd9e6b1bc6250f9c12b043b2fc2246c0482ce0613014d984302c91964b16c21d9d3d408 WHIRLPOOL 25e3d85aae079afa98390887e59a5a65334ceef0a1531bd3895dfcb3e4b2f003db4f2681deef9fc579117338c8d2625fad7166e4ee84235178ba2d960692d3b9
+EBUILD ucspi-unix-0.36-r4.ebuild 1136 SHA256 b657830d3f04d9ec460c87b10d91adbe693327374a5cfdbb89412793bb844c49 SHA512 4544d8053f3c9a0c98396ae5c49114fb5b580637a3c95f90f494cb477b373e470f30b10b85fa0af9d81e40ba0c6ab9af4768028b093c45ffd5ae2e6ea577fcec WHIRLPOOL 5ae50867d037fb7eff090319439eefb903c173d2e4cec5b4bfe5f6f557fdbebfb14cbbdd5ba8c23c7607186ab7379ce36c91822b82e71f8d79e6a0586ede2bb5
+MISC ChangeLog 3724 SHA256 18c20bb1be44ccc0d8750ab111c10211b2ca7cf8ad72bc775e846270949f38ae SHA512 d368eb28916134b06575ebd1564c64cad980d3d768dca4b668caf5dd6d24af01ed91a45e5986b61e0b6021e1bcd857d8072bddc5e40a402bc60bac25103871ab WHIRLPOOL c3690a2e09dcc78c8df1f8168d57acb241ba1fdb2490c7a3db4c48dd4746177dde995c026a4c0ed25b10211ef5e07b8f638ec73f5d77aafd4b2374ac0e952d27
+MISC ChangeLog-2015 3266 SHA256 08b132cff5bf2c906e32e9b6c4d5f33d8af08e77608099ecf4072bd71681162e SHA512 ebee63e2d95174a704f8a6b62fe2c6e7a76f2faa38888930e89850fba3e78cdacb3b13043b5196ebd1b53cc6d06151ffa610548632b093235f2728b4dbed44c9 WHIRLPOOL 4edd3e6eeb2042b41a5c33304bd81e374dbad4bb2078007236dc75f39ebe02d57f0c0e4c51540ba114beb6d868f663d718ce2c2ae435be022355f8ef4a08f5cb
+MISC metadata.xml 433 SHA256 b77b70380b5c9b1508ab03b222cf275ace654c68b7d37580047af15f5d09f265 SHA512 73fcad2c3cf5f25d07fe4c38376e3375021ddd0e2a2a9e51d05728d86ee2e0b63a28ed5f70d9d31e1643d210852b4b81f0ce605b0d9876dbf131cfd444d6fd6e WHIRLPOOL 8bd2c4e9a6d0bda394d95759fa56a842d2eeb6ce637f26a38572171952bd03b56532a810fa67663728023bd1c8fe11a3b0207595e688947a10b4d8ec7f01dd66
diff --git a/sys-apps/ucspi-unix/files/ucspi-unix-0.36-fix-parallel-build.patch b/sys-apps/ucspi-unix/files/ucspi-unix-0.36-fix-parallel-build.patch
new file mode 100644
index 000000000000..94fc07cb0022
--- /dev/null
+++ b/sys-apps/ucspi-unix/files/ucspi-unix-0.36-fix-parallel-build.patch
@@ -0,0 +1,19 @@
+--- Makefile.orig 2010-01-14 14:42:14.000000000 +0100
++++ Makefile 2010-01-14 14:42:42.000000000 +0100
+@@ -41,14 +41,14 @@
+ ./load insthier -linstaller
+ mv insthier installer
+
+-instcheck: load insthier.o
++instcheck: load insthier.o installer instshow
+ ./load insthier -linstcheck
+ mv insthier instcheck
+
+ insthier.o: compile insthier.c conf_bin.c conf_man.c
+ ./compile insthier.c
+
+-instshow: load insthier.o
++instshow: load insthier.o installer
+ ./load insthier -linstshow
+ mv insthier instshow
+
diff --git a/sys-apps/ucspi-unix/files/ucspi-unix-0.36-include-sys_socket.h.patch b/sys-apps/ucspi-unix/files/ucspi-unix-0.36-include-sys_socket.h.patch
new file mode 100644
index 000000000000..0d96450911c5
--- /dev/null
+++ b/sys-apps/ucspi-unix/files/ucspi-unix-0.36-include-sys_socket.h.patch
@@ -0,0 +1,11 @@
+diff -Naur ucspi-unix-0.36.orig/env.c ucspi-unix-0.36/env.c
+--- ucspi-unix-0.36.orig/env.c 2002-06-10 23:12:06.000000000 +0200
++++ ucspi-unix-0.36/env.c 2008-11-06 16:31:09.000000000 +0100
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <sysdeps.h>
++#include <sys/socket.h>
+
+ extern const char* utoa(unsigned long);
+
diff --git a/sys-apps/ucspi-unix/files/ucspi-unix-gentoo-head.patch b/sys-apps/ucspi-unix/files/ucspi-unix-gentoo-head.patch
new file mode 100644
index 000000000000..fa360e53c1f1
--- /dev/null
+++ b/sys-apps/ucspi-unix/files/ucspi-unix-gentoo-head.patch
@@ -0,0 +1,33 @@
+--- ucspi-unix-0.36/Makefile.orig 2003-12-26 18:50:34.000000000 -0500
++++ ucspi-unix-0.36/Makefile 2003-12-26 18:50:56.000000000 -0500
+@@ -18,18 +18,18 @@
+ ( echo '#!/bin/sh'; \
+ echo 'source=$$1; shift'; \
+ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
+- echo exec `head -1 conf-cc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
++ echo exec `head -n 1 conf-cc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
+ ) >compile
+ chmod 755 compile
+
+ conf_bin.c: conf-bin
+- head -1 conf-bin | \
++ head -n 1 conf-bin | \
+ sed -e 's/"/\\"/g' \
+ -e 's/^/const char conf_bin[] = "/' \
+ -e 's/$$/";/' >conf_bin.c
+
+ conf_man.c: conf-man
+- head -1 conf-man | \
++ head -n 1 conf-man | \
+ sed -e 's/"/\\"/g' \
+ -e 's/^/const char conf_man[] = "/' \
+ -e 's/$$/";/' >conf_man.c
+@@ -55,7 +55,7 @@
+ load: conf-ld
+ ( echo '#!/bin/sh';\
+ echo 'main="$$1"; shift';\
+- echo exec `head -1 conf-ld` '-o "$$main" "$$main.o" $${1+"$$@"}' -lsysdeps;\
++ echo exec `head -n 1 conf-ld` '-o "$$main" "$$main.o" $${1+"$$@"}' -lsysdeps;\
+ ) >load
+ chmod 755 load
+
diff --git a/sys-apps/ucspi-unix/metadata.xml b/sys-apps/ucspi-unix/metadata.xml
new file mode 100644
index 000000000000..3f12c38d92fb
--- /dev/null
+++ b/sys-apps/ucspi-unix/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription lang="en">
+This package contains UNIX domain socket client and server programs that
+conform to UCSPI, the UNIX Client-Server Program Interface.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ucspi-unix/ucspi-unix-0.36-r2.ebuild b/sys-apps/ucspi-unix/ucspi-unix-0.36-r2.ebuild
new file mode 100644
index 000000000000..c199289d166f
--- /dev/null
+++ b/sys-apps/ucspi-unix/ucspi-unix-0.36-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A ucspi implementation for unix sockets"
+HOMEPAGE="http://untroubled.org/ucspi-unix/"
+SRC_URI="${HOMEPAGE}archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE=""
+
+DEPEND=">=dev-libs/bglibs-1.019-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-gentoo-head.patch
+}
+
+src_compile() {
+ use kernel_linux && PEERCRED="-DHASPEERCRED=1"
+ echo "$(tc-getCC) ${CFLAGS} -I/usr/lib/bglibs/include ${PEERCRED}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS} -L/usr/lib/bglibs/lib" > conf-ld
+ make || die #don't use emake b/c of jobserver
+}
+
+src_install() {
+ dobin unixserver unixclient unixcat || die
+ doman unixserver.1 unixclient.1
+ dodoc ANNOUNCEMENT NEWS PROTOCOL README TODO
+}
diff --git a/sys-apps/ucspi-unix/ucspi-unix-0.36-r3.ebuild b/sys-apps/ucspi-unix/ucspi-unix-0.36-r3.ebuild
new file mode 100644
index 000000000000..4510f80e066c
--- /dev/null
+++ b/sys-apps/ucspi-unix/ucspi-unix-0.36-r3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A ucspi implementation for unix sockets"
+HOMEPAGE="http://untroubled.org/ucspi-unix/"
+SRC_URI="http://untroubled.org/ucspi-unix/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND=">=dev-libs/bglibs-1.019-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-gentoo-head.patch
+ epatch "${FILESDIR}"/${P}-include-sys_socket.h.patch
+}
+
+src_compile() {
+ use kernel_linux && PEERCRED="-DHASPEERCRED=1"
+ echo "$(tc-getCC) ${CFLAGS} -I/usr/lib/bglibs/include ${PEERCRED} -D_GNU_SOURCE" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS} -L/usr/lib/bglibs/lib" > conf-ld
+ # fails parallel build, bug #297986
+ emake -j1 || die
+}
+
+src_install() {
+ dobin unixserver unixclient unixcat || die
+ doman unixserver.1 unixclient.1
+ dodoc ANNOUNCEMENT NEWS PROTOCOL README TODO
+}
diff --git a/sys-apps/ucspi-unix/ucspi-unix-0.36-r4.ebuild b/sys-apps/ucspi-unix/ucspi-unix-0.36-r4.ebuild
new file mode 100644
index 000000000000..4b303d44dde3
--- /dev/null
+++ b/sys-apps/ucspi-unix/ucspi-unix-0.36-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="A ucspi implementation for unix sockets"
+HOMEPAGE="http://untroubled.org/ucspi-unix/"
+SRC_URI="http://untroubled.org/ucspi-unix/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+# We statically link bglibs.
+DEPEND=">=dev-libs/bglibs-1.106"
+# Block other unixcat installers. #480546
+RDEPEND="!net-analyzer/mk-livestatus"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-gentoo-head.patch
+ epatch "${FILESDIR}"/${P}-include-sys_socket.h.patch
+ epatch "${FILESDIR}"/${P}-fix-parallel-build.patch
+}
+
+src_configure() {
+ local has_peercred
+ use kernel_linux && has_peercred="-DHASPEERCRED=1"
+
+ echo "$(tc-getCC) ${CPPFLAGS} ${CFLAGS} -I${SYSROOT}/usr/include/bglibs ${has_peercred} -D_GNU_SOURCE" > conf-cc
+ echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS} -L${SYSROOT}/usr/$(get_libdir)/bglibs" > conf-ld
+}
+
+src_install() {
+ dobin unixserver unixclient unixcat
+ doman unixserver.1 unixclient.1
+ dodoc ANNOUNCEMENT NEWS PROTOCOL README TODO
+}
diff --git a/sys-apps/udevil/Manifest b/sys-apps/udevil/Manifest
new file mode 100644
index 000000000000..3a303f21eac5
--- /dev/null
+++ b/sys-apps/udevil/Manifest
@@ -0,0 +1,11 @@
+AUX udevil-0.4.3-flags.patch 1047 SHA256 67f38afd87aa6e7c65b961c89ade081b2f2889722f1fe6dc2b74df1558c67dac SHA512 71ea30cc73e3ac56fe4e1278672e85434079fd2b6ead78409a30ba22a5d13dd308bfa20624fe1096f970a54fc5e6385219f1ec4d70d42c90c51273ca121bc480 WHIRLPOOL 303d39ab76374ec01cdb8406b6d236a43b872217a44920f45eca828112d4cd4ebb752b326bbda5392344b8b1ec98bff399d35aa1a7cf12074e701fed26e7a8bc
+AUX udevil-0.4.4-include-sysmacros-r1.patch 648 SHA256 1cbf784704b645cb870493b069e8b74031b464d8e357cd8a6ef6714a352f23a5 SHA512 c6acea65ec4e628013ef95b336cac921bcd25070c2604c7b457006ac248160d3c8a941b5e58070d1a1a352b735148cead85c2ca3d24bc2c1fcc9c86dec59865a WHIRLPOOL 2b5a4c02d61bd32a514bf1b2a580638ca251e880ffac15196a86e3c6ff3acf8dfe7f1692f73394c08058064f6b3ff49d714ed2bf6970d5881479b6d9b878dab4
+AUX udevil-0.4.4-include-sysmacros.patch 398 SHA256 ef87cff6108a185044ab1cf02c753e0274f81098dcf6a6b947bbd9cacd90a21a SHA512 ce9070dcce7fb0117e50cda0f8b27f493a24f881a9e11fef2024ff3e3b70a1804bb7beef35c9935247baa1f74a499a0ad928a9ff7dbcc586b8c7ee26c5a57776 WHIRLPOOL 2eeb2791b62b410bc4fe364e276e6c86eca50336cd1e2f5995e20b95bae6e8fdb34ff7635abc0476457767ceca7c2644e346a98f2b7f2c0ed07da4508832f971
+AUX udevil-0.4.4-stat.patch 230 SHA256 7d53ad7e72e2df27a1f1255ffc7300d439fc495b687593bbda82dc7e5e682230 SHA512 d7cbba53c3e52551f3a08774412f5ff23b8467bb02905fa7d60f28593a57a1eaeab6cd3f8d07f07779100c7d0c14e2973a5a5cc96f0cc010eafa2db15d3267d8 WHIRLPOOL b19303c1e4c06b63580493b3b68c07f4abc3831ec3ea786f17a421bdbdf4dd7581546d4f576eb59737768b93ee567b34640704d42a69a032c652471780f5542f
+DIST udevil-0.4.4.tar.gz 477254 SHA256 ad2fd8375bd62622718a04235e9772119459089938dbb78e657955e595822b7c SHA512 adce4916e06d1cc4965521abbcbc2901e53930691167f431cb18e28d3ef8bde740e95a6a5f40dfc58dfd7b4b661b4475d3dd2b6174a5d7a55ae7c65629b82327 WHIRLPOOL 6bd7b5e6792e9f556113260a86f1aa29b795a0d7ddc577f86fd286d2a95515ac32e80bdfc4677a1aa59b0efcbddd8e40eec83db4e63439e8d1fead6061b64bec
+EBUILD udevil-0.4.4-r1.ebuild 1922 SHA256 05af2aa6c95b622e93df2bb2dad452cab0bded25d5592ab7955ee75b6fcc2cdd SHA512 9ccb1b2e9fd377c02cedea8ee3e8bc7ee0b0ccf1647b733d34122969d24a284e40d251c3d0e294aeab1b830589d60621e793071e46d523bfe34ef12b5deacad9 WHIRLPOOL 7ddf3dcad74f00201448e8ae5524bd937f4010dcb78434052fe14979a942a91dc4c6d21e4c1d8983ca408e3521f3f591a477520fa0b751cc20882187e2059580
+EBUILD udevil-0.4.4-r2.ebuild 1988 SHA256 f6ee9de831cb6f8235c3eeb7127f1d7039b0fd916e0cdea500ceb01d70882eae SHA512 6802bb465b172e4a42fad2366bcb4ae1ae05b0c48f772e0ca545df5ef8409ad21c1dad721a9838fea188e6ba4bb7e693d03f18fa73895d60074641ca1050ab8a WHIRLPOOL f94e9ff0a12f908ec9878fe21d3c4126e5da19513f4182ee573935919bf464a4e9c7895c681890ddaa7926f158a96bd164b02cdc911061150e28367b9ffd97c5
+EBUILD udevil-0.4.4-r3.ebuild 1991 SHA256 9d2630aa2b02b2b044520c2d1012f2e97909d69fb0e3c4197fdb616108c92772 SHA512 4a8ab23fb5bc0fb16a7d1b73e3edcb43b4f542c0029b946f7e2d35d986b98412b39b1af8c69845641f05e8e5c9bdb87cdb6d742f54b92b75f72e187d08281429 WHIRLPOOL a4391d41f99834960a02f3e81636c27cf034fc52f7346890a4c5c109218dcf0d34b903f5c27f14b9a528bc692fa36ac17555e6454836e83c32347a85c694f72a
+MISC ChangeLog 3959 SHA256 aa418acf34e960d98d918762b8a55e4d9e1f44f22661b48dc436aa797021ca26 SHA512 7d02c9bc4694df61743affdff7f8161628afa7419a83085e5c61f44923ed3486cb15d4b32789a67dd4667e06b4c4731f022463f17dd77579eb3c45e12cc2e1dd WHIRLPOOL 81ae4cbeda83abded9fb344c8228d80d231b7183d767346d5c380a71ac6b4a0c7b517524ff4f32857ad1b2cdf0e2235fc7e6b9b69e4d6f28f3fbb9e7a42edc07
+MISC ChangeLog-2015 5481 SHA256 c86c51c498a065cdf33aba0962d5de945b648291970a0a6e5b9f55e3d6ac4f96 SHA512 02c89098f801288505b02525df2c7b234da43061c01dfe094055db625402511d4474d276c9005754ea2a4851b33a6982d7570a83c80fe398b431d7094afd427f WHIRLPOOL 2e26ffbb1994f1ae3b36dae8585efcc424c06ddd7a87d0da7c8e6115495528737c6c3fbf953e09c74659675d51a0dfff48a3c60e3f4dbc5ad210d2832753b816
+MISC metadata.xml 453 SHA256 c833a6570cffb4afd017770ef61616f99c4a86d5ffb86d6426fc8dcd5fe664e8 SHA512 92443a23495fc46cfba373d4e712d2e530080b68e4ebceff8cec159d71bf581eb3ea66c1c85134f4edcce3740a22d7eb00d9c5339efa6445318bf2f98028d78a WHIRLPOOL cb33dcf0cebb2cf16160bbcad9a04ea6a1402f3fb54aa6a8c10376415cdd3627cf08f508edce8cdee851393395ca3af87a34b8e5e80dd7b575d37e7d17d75a2c
diff --git a/sys-apps/udevil/files/udevil-0.4.3-flags.patch b/sys-apps/udevil/files/udevil-0.4.3-flags.patch
new file mode 100644
index 000000000000..166a4357e9f3
--- /dev/null
+++ b/sys-apps/udevil/files/udevil-0.4.3-flags.patch
@@ -0,0 +1,46 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Oct 21 19:33:04 UTC 2012
+Subject: build system
+
+ respect flags where possible
+
+--- configure.ac
++++ configure.ac
+@@ -18,26 +18,6 @@
+
+
+ dnl linker optimizations
+-AC_MSG_CHECKING([whether $LD accepts --as-needed])
+-case `$LD --as-needed -v 2>&1 </dev/null` in
+-*GNU* | *'with BFD'*)
+- LDFLAGS="$LDFLAGS -Wl,--as-needed"
+- AC_MSG_RESULT([yes])
+- ;;
+-*)
+- AC_MSG_RESULT([no])
+- ;;
+-esac
+-AC_MSG_CHECKING([whether $LD accepts -O1])
+-case `$LD -O1 -v 2>&1 </dev/null` in
+-*GNU* | *'with BFD'*)
+- LDFLAGS="$LDFLAGS -Wl,-O1"
+- AC_MSG_RESULT([yes])
+- ;;
+-*)
+- AC_MSG_RESULT([no])
+- ;;
+-esac
+ AC_MSG_CHECKING([whether $LD accepts -Bsymbolic-functions])
+ case `$LD -Bsymbolic-functions -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+@@ -49,10 +29,6 @@
+ ;;
+ esac
+
+-dnl advanced compiler tweaking
+-CPPFLAGS="$CPPFLAGS -fstrict-aliasing -fmessage-length=0"
+-
+-
+ # program paths
+ AC_ARG_WITH(mount-prog,
+ AC_HELP_STRING([--with-mount-prog=PATH], [Path to mount program (default: /bin/mount)]),
diff --git a/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros-r1.patch b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros-r1.patch
new file mode 100644
index 000000000000..2f9859d34e8c
--- /dev/null
+++ b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros-r1.patch
@@ -0,0 +1,27 @@
+# Include sysmacros.h, solves Gentoo bug 580364
+# Upstream has merged similar changes, should be present
+# in 0.4.5
+--- a/src/udevil.c 2015-05-04 06:34:32.000000000 -0700
++++ b/src/udevil.c 2017-01-02 07:25:14.744273858 -0800
+@@ -33,6 +33,9 @@
+ #include <netdb.h>
+ #include <arpa/inet.h>
+
++// major/minor, dev_t, needed for glibc>=2.25
++#include <sys/sysmacros.h>
++
+ // groups
+ #include <grp.h>
+
+--- a/src/device-info.h 2017-01-02 07:47:23.373180528 -0800
++++ b/src/device-info.h 2017-03-14 23:35:58.079222855 -0700
+@@ -18,6 +18,9 @@
+ // intltool
+ #include <glib/gi18n.h>
+
++// dev_t
++#include <sys/sysmacros.h>
++
+
+
+ typedef struct device_t {
diff --git a/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch
new file mode 100644
index 000000000000..7adda2893d07
--- /dev/null
+++ b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch
@@ -0,0 +1,15 @@
+# Include sysmacros.h, solves Gentoo bug 580364
+# Upstream has merged similar changes, should be present
+# in 0.4.5
+--- a/src/udevil.c 2015-05-04 06:34:32.000000000 -0700
++++ b/src/udevil.c 2017-01-02 07:25:14.744273858 -0800
+@@ -33,6 +33,9 @@
+ #include <netdb.h>
+ #include <arpa/inet.h>
+
++// major/minor, dev_t, needed for glibc>=2.25
++#include <sys/sysmacros.h>
++
+ // groups
+ #include <grp.h>
+
diff --git a/sys-apps/udevil/files/udevil-0.4.4-stat.patch b/sys-apps/udevil/files/udevil-0.4.4-stat.patch
new file mode 100644
index 000000000000..22e41d467821
--- /dev/null
+++ b/sys-apps/udevil/files/udevil-0.4.4-stat.patch
@@ -0,0 +1,11 @@
+Fixes bug #552072. Thanks Helmut Jarausch.
+--- src/device-info.h
++++ src/device-info.h
+@@ -14,6 +14,7 @@
+ #include <libudev.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/stat.h>
+
+ // intltool
+ #include <glib/gi18n.h>
diff --git a/sys-apps/udevil/metadata.xml b/sys-apps/udevil/metadata.xml
new file mode 100644
index 000000000000..77901d0e5ea1
--- /dev/null
+++ b/sys-apps/udevil/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 type="person">
+ <email>zlg@gentoo.org</email>
+ <name>Daniel Campbell</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>ThyArmageddon+Gentoo@Gmail.com</email>
+ <name>Elijah El Lazkani</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">IgnorantGuru/udevil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/udevil/udevil-0.4.4-r1.ebuild b/sys-apps/udevil/udevil-0.4.4-r1.ebuild
new file mode 100644
index 000000000000..9f3cd58b0b13
--- /dev/null
+++ b/sys-apps/udevil/udevil-0.4.4-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools user
+
+DESCRIPTION="mount and unmount removable devices without a password"
+HOMEPAGE="https://ignorantguru.github.com/udevil/"
+SRC_URI="https://github.com/IgnorantGuru/udevil/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=app-shells/bash-4.0:*
+ dev-libs/glib:2
+ sys-apps/util-linux
+ virtual/acl
+ >=virtual/udev-143"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup(){
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # This works for 0.4.4 too, no sense copying the patch
+ epatch "${FILESDIR}"/${PN}-0.4.3-flags.patch
+ epatch "${FILESDIR}"/${P}-stat.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-setfacl-prog="$(type -P setfacl)" \
+ --enable-systemd
+}
+
+src_install() {
+ default
+ fowners root:plugdev /usr/bin/udevil
+ fperms 4754 /usr/bin/udevil
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please add your user to the plugdev group"
+ elog "to be able to use ${PN} as a user"
+ elog
+ elog "Optional dependencies:"
+ elog " gnome-extra/zenity (devmon popups)"
+ elog " net-fs/davfs2 (mount WebDAV resources)"
+ elog " net-fs/cifs-utils (mounting samba shares)"
+ elog " net-fs/curlftpfs (mounting ftp shares)"
+ elog " net-fs/nfs-utils (mounting nfs shares)"
+ elog " net-fs/sshfs (mounting sftp shares)"
+ elog " virtual/eject (eject via devmon)"
+ if ! has_version 'sys-fs/udisks' ; then
+ elog
+ elog "When using ${PN} without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See https://ignorantguru.github.com/${PN}/#polling"
+ has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
+ kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
+ einfo
+ fi
+}
diff --git a/sys-apps/udevil/udevil-0.4.4-r2.ebuild b/sys-apps/udevil/udevil-0.4.4-r2.ebuild
new file mode 100644
index 000000000000..c93bc7b9dcc2
--- /dev/null
+++ b/sys-apps/udevil/udevil-0.4.4-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils autotools user
+
+DESCRIPTION="mount and unmount removable devices without a password"
+HOMEPAGE="https://ignorantguru.github.com/udevil/"
+SRC_URI="https://github.com/IgnorantGuru/udevil/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=app-shells/bash-4.0:*
+ dev-libs/glib:2
+ sys-apps/util-linux
+ virtual/acl
+ >=virtual/udev-143"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup(){
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # This works for 0.4.4 too, no sense copying the patch
+ epatch "${FILESDIR}"/${PN}-0.4.3-flags.patch
+ epatch "${FILESDIR}"/${P}-stat.patch
+ epatch "${FILESDIR}"/${P}-include-sysmacros.patch
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-setfacl-prog="$(type -P setfacl)" \
+ --enable-systemd
+}
+
+src_install() {
+ default
+ fowners root:plugdev /usr/bin/udevil
+ fperms 4754 /usr/bin/udevil
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please add your user to the plugdev group"
+ elog "to be able to use ${PN} as a user"
+ elog
+ elog "Optional dependencies:"
+ elog " gnome-extra/zenity (devmon popups)"
+ elog " net-fs/davfs2 (mount WebDAV resources)"
+ elog " net-fs/cifs-utils (mounting samba shares)"
+ elog " net-fs/curlftpfs (mounting ftp shares)"
+ elog " net-fs/nfs-utils (mounting nfs shares)"
+ elog " net-fs/sshfs (mounting sftp shares)"
+ elog " virtual/eject (eject via devmon)"
+ if ! has_version 'sys-fs/udisks' ; then
+ elog
+ elog "When using ${PN} without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See https://ignorantguru.github.com/${PN}/#polling"
+ has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
+ kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
+ einfo
+ fi
+}
diff --git a/sys-apps/udevil/udevil-0.4.4-r3.ebuild b/sys-apps/udevil/udevil-0.4.4-r3.ebuild
new file mode 100644
index 000000000000..d3d8bdc8ddaa
--- /dev/null
+++ b/sys-apps/udevil/udevil-0.4.4-r3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils autotools user
+
+DESCRIPTION="mount and unmount removable devices without a password"
+HOMEPAGE="https://ignorantguru.github.com/udevil/"
+SRC_URI="https://github.com/IgnorantGuru/udevil/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=app-shells/bash-4.0:*
+ dev-libs/glib:2
+ sys-apps/util-linux
+ virtual/acl
+ >=virtual/udev-143"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup(){
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # This works for 0.4.4 too, no sense copying the patch
+ epatch "${FILESDIR}"/${PN}-0.4.3-flags.patch
+ epatch "${FILESDIR}"/${P}-stat.patch
+ epatch "${FILESDIR}"/${P}-include-sysmacros-r1.patch
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-setfacl-prog="$(type -P setfacl)" \
+ --enable-systemd
+}
+
+src_install() {
+ default
+ fowners root:plugdev /usr/bin/udevil
+ fperms 4754 /usr/bin/udevil
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please add your user to the plugdev group"
+ elog "to be able to use ${PN} as a user"
+ elog
+ elog "Optional dependencies:"
+ elog " gnome-extra/zenity (devmon popups)"
+ elog " net-fs/davfs2 (mount WebDAV resources)"
+ elog " net-fs/cifs-utils (mounting samba shares)"
+ elog " net-fs/curlftpfs (mounting ftp shares)"
+ elog " net-fs/nfs-utils (mounting nfs shares)"
+ elog " net-fs/sshfs (mounting sftp shares)"
+ elog " virtual/eject (eject via devmon)"
+ if ! has_version 'sys-fs/udisks' ; then
+ elog
+ elog "When using ${PN} without udisks, and without the udisks-daemon running,"
+ elog "you may need to enable kernel polling for device media changes to be detected."
+ elog "See https://ignorantguru.github.com/${PN}/#polling"
+ has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
+ kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
+ einfo
+ fi
+}
diff --git a/sys-apps/ultracopier/Manifest b/sys-apps/ultracopier/Manifest
new file mode 100644
index 000000000000..41870206a1c7
--- /dev/null
+++ b/sys-apps/ultracopier/Manifest
@@ -0,0 +1,5 @@
+DIST ultracopier-src-0.2.0.16.tar.bz2 430736 SHA256 3c965899c491ddaa7381de805a62557d224a70c3379f68bb2a24f4bf07d36f30 SHA512 7ca0698bca73c9fa696b48d5aee09a5159c7a1bb6c8d8194476ed13d189c4b16b42c8aff0013fe1107889c95d9a048cc86953698f90b731b48d8ededac350693 WHIRLPOOL 8c901099bedeca8edd89c60fa05e4fbf164d8c28bb9bdeae9ec5d16d1c257549f8bc343d780bfb79d46060403e1c62ffbf24ad4cc05f2ad02b13911f1b292c47
+EBUILD ultracopier-0.2.0.16.ebuild 830 SHA256 c3911ce023a240ba8eb633935ffe7bcda67e6c2254b16c71580f5b7668d05807 SHA512 02779e06e9453b359016b4bb17dd9743fd4bd53f0ab0ff613738d7e7192dc2afad21304d4d955b6f7aa573954271de666ed24796ba3f0b3139343f14f7adeaf2 WHIRLPOOL fa3e6ab5f7f7c31c99e7138666bada19a5b9c1e29bb1196a126d0ed683a7d0bda025907c019769c497394864741207bf46634b577b855d17a13311aa7057c9cf
+MISC ChangeLog 2933 SHA256 6953ac4e4291fcc0fc04a1739d963bba1d3407138ea66abbc5f595504d272f7e SHA512 bd10a270fddcff2c868a6b9b284b240b4e09f5c33dbab7a91577802a7fc1c5a0b3b48e1dd0a91c67c3afd082c4a22448acc2ef045a58325df43ee4728ca63743 WHIRLPOOL 72da73e8c691d2ec73fd749c3a883dcf73991ffe7f291c523340db6a77bb3d7767465bc84fa7d164e32cbdc0c696ef757baa70cb991df797d37beff79f34f11e
+MISC ChangeLog-2015 704 SHA256 0267609b4f804f0efeb52d23e1a562dbf8f863c5bad66e249acee01c9ebf67b4 SHA512 62e56dfb931cdee84cc0c7b5d11fb2acfd3d786e22b532c4cc6fa5c6a635a11c9423845c592453e40675da8818589e77fbffb5ce0b4945787c9ebe8c87ac32a9 WHIRLPOOL dc21e590372b1fbb8ab9924f2b716ab7fc25f9e9d1943c8c45ea331a3ddf43ade70516a189bb93ede1a9eddc6b9613b4be5a6ff042e04f7b2dc6e6e1cee3dc1e
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/sys-apps/ultracopier/metadata.xml b/sys-apps/ultracopier/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/sys-apps/ultracopier/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-apps/ultracopier/ultracopier-0.2.0.16.ebuild b/sys-apps/ultracopier/ultracopier-0.2.0.16.ebuild
new file mode 100644
index 000000000000..ba8896b647cd
--- /dev/null
+++ b/sys-apps/ultracopier/ultracopier-0.2.0.16.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Advanced file copying tool"
+HOMEPAGE="http://ultracopier.first-world.info/"
+SRC_URI="http://files.first-world.info/${PN}/${PV}/${PN}-src-${PV}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ local debugl=0
+ use debug && debugl=100
+ sed -i -e "s/\(DEBUG_ULTRACOPIER\) 0/\1 ${debugl}/" src/var.h || die
+}
+
+src_install() {
+ dodoc CHANGELOG README || die
+
+ cd src || die
+ rm -f lang/en* lang/*.ts || die
+ rm -Rf styles/kde3 || die
+
+ dobin ${PN} || die
+ newicon other/${PN}-128x128.png ${PN}.png || die
+ domenu other/${PN}.desktop || die
+
+ insinto /usr/share/${PN}
+ doins -r lang styles || die
+}
diff --git a/sys-apps/unscd/Manifest b/sys-apps/unscd/Manifest
new file mode 100644
index 000000000000..e1b99a4a3115
--- /dev/null
+++ b/sys-apps/unscd/Manifest
@@ -0,0 +1,8 @@
+AUX unscd-tmpfiles.conf 29 SHA256 0c07016e3d1f189d5e01a663114974ac85ed61e952bdbb01b15a57c7dde35886 SHA512 2f5d67300493e32ba1efd31fbfd8483f42aff9e15950361b640e18451e76e0fc7a0ad08f547485ab5b1ed544407c8758b53c9b22a61d75bfe2f80b893dce0e77 WHIRLPOOL c41753c3b8e93880433f6309171915877600e6bdd7550c0b70addd5c3499290c5f645e8a56f5955dc7dcf200519a73638c8d24035ea7795b39593b221f0e4794
+AUX unscd.initd-r1 321 SHA256 1b56b023b6f50136b76d859b030a43890c0117b65e686009ddbb5fc123a1a040 SHA512 41def8b588f818b7e6e42809b37ab9d794d7d30c4be7dca047f64cdded55a401fa00cee962066125efe69a8efb9080fa2588c0941f4fc915243f1e111ac169c7 WHIRLPOOL 394b8067b8624f2a66555b971fa040a84a1d9a336d5546a557eb97a0e5e9cfc2fc59a5d5cf970ffe69f996cbffb572bcc322ad1ca04115dea59d7dbbc7bf4df2
+AUX unscd.service 513 SHA256 4951d198f1b31e5f2fb51a7e48c37a5d273159908190028b9278bb1923fa2cb0 SHA512 3a03be4807c06506caea41aa163bb036c2600566e7a73267e08ef0aebb3a288d37eb12e448740942277baee365654c6118102915479be882cb65dfefaf53917b WHIRLPOOL d43ff144dbb2b4b19a5d10468e341c4d4cc82950e43d6d6d11af96e4bd0147bf56180ec905117990a631eba6be6332288b27fcdb7feee49898187e1130b5624c
+DIST nscd-0.52.c 73144 SHA256 4c1f83dcd120469fceef749050cb29fa666fa4666bd308dfe92e933a4c200d55 SHA512 ba48410309fced9b8d9f929c52b39ca9a8caaf451fe73742bde7d4a4ab9980bc0f353551e19c846e96d6cb8a71e3c5edc7ddddf76cce0613282f0d01fde0612f WHIRLPOOL d98e305ee99da16e50dc379991fa3083f9608cb4ae9fbd50f03f50c0ae3d2eae8dc352fdc7fa690e47b36edd7b9c8c7cb029bd69c579d07310481b742634f0cd
+EBUILD unscd-0.52-r2.ebuild 721 SHA256 16938f56de2d2bd926befc669a078517826eee5aa0d5c44ef9c772ddde1c6e40 SHA512 d65568ef1c55d0bb689c7736e2ffaed83631abde06a4817797c937f508eefd8ec06362d8a17ff220c572e9253f5ecfc1de87329bc2e9599e1dbcde831bc11a9d WHIRLPOOL ff5a64ee1e4790a3173d48b8de489c1ce1063cf9115188c2ccf31af379237ccb4bd77c8d2d288b03797a5753a76e086e5a22d3850256fc78bbfcd93663ef9057
+MISC ChangeLog 3032 SHA256 d7c521e5c1a06ba58b30b9b77455f4c558c6a1165770be5807be197b58d47b1c SHA512 1dc35ad17c2901e0cd001f9ea73c7b4b0265a7ebfca65a729d2acd71ae2ea71f8645b51a8b125f81215b9953fad1782435496c7ad735c23eb37a98e00369117e WHIRLPOOL 0b3ea4d2d50b21ff1113172eb8510b6923c7a8632e7e851f1df9d80582ad22cdf730a4d95268152a5390b22dc3498bdd6972e0c50c99441f62383ede5790a2a0
+MISC ChangeLog-2015 3025 SHA256 b3b76cc9ff043712e708f40372c0b8a5680fd6d3c794f3a339a7fec7df00e181 SHA512 fd96a6d33f2da3ee2ed1441356d0e715367742969ee9aa575e2acf194c57d64d62deb4cb04ac2a96ff878016d3a2ff9dbe8d3a7623ba1657a0460f82a82eee96 WHIRLPOOL 67bed37f978d687d0490869e5334852a94df9447def7f966a608322ee588709409f110ada6729508e144c11463268f689328725d37adefb368baaf24a47b3489
+MISC metadata.xml 267 SHA256 1feea846ae1035ff00c23a7b2ba387520b2a1704db73a12513e7f134b3bee5cb SHA512 715bb37d958c1e508b2ef00711ab3a4abee982efe90867fd2bcf91fa91305d5a413a4f3d13d01ea6e27eb15f5f9dcb58fa13ecfed7025cae43745792ac1a105d WHIRLPOOL d5589bb2edf9c0aa9298d7d3992e749c1501c38ef8958c91a65d100216f9e35bb2483f257b029c2bdd802babbfd63e270183d0d69aa95105da9df831f09fb319
diff --git a/sys-apps/unscd/files/unscd-tmpfiles.conf b/sys-apps/unscd/files/unscd-tmpfiles.conf
new file mode 100644
index 000000000000..b5f25f6c5bb1
--- /dev/null
+++ b/sys-apps/unscd/files/unscd-tmpfiles.conf
@@ -0,0 +1 @@
+d /run/nscd 0755 root root -
diff --git a/sys-apps/unscd/files/unscd.initd-r1 b/sys-apps/unscd/files/unscd.initd-r1
new file mode 100644
index 000000000000..f49184724a41
--- /dev/null
+++ b/sys-apps/unscd/files/unscd.initd-r1
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+name="Name Service Cache Daemon (unscd)"
+command="/usr/sbin/unscd"
+pidfile="/run/nscd/nscd.pid"
+
+depend() {
+ use dns ldap net slapd
+}
+
+start_pre() {
+ checkpath -d --quiet --mode 755 /run/nscd
+}
diff --git a/sys-apps/unscd/files/unscd.service b/sys-apps/unscd/files/unscd.service
new file mode 100644
index 000000000000..d7c932b9587d
--- /dev/null
+++ b/sys-apps/unscd/files/unscd.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Name Service Cache Daemon (unscd)
+Wants=ldap.service network-online.target slapd.service
+After=ldap.service network-online.target nss-lookup.target nss-user-lookup.target slapd.service
+
+[Service]
+Type=forking
+PIDFile=/run/nscd/nscd.pid
+ExecStart=/usr/sbin/unscd
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i services
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/unscd/metadata.xml b/sys-apps/unscd/metadata.xml
new file mode 100644
index 000000000000..3a840c8dcd05
--- /dev/null
+++ b/sys-apps/unscd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/unscd/unscd-0.52-r2.ebuild b/sys-apps/unscd/unscd-0.52-r2.ebuild
new file mode 100644
index 000000000000..f61fb7591b5f
--- /dev/null
+++ b/sys-apps/unscd/unscd-0.52-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="simple & stable nscd replacement"
+HOMEPAGE="https://busybox.net/~vda/unscd/README"
+SRC_URI="https://busybox.net/~vda/unscd/nscd-${PV}.c"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="sys-libs/glibc[nscd(+)]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp "${DISTDIR}"/nscd-${PV}.c ${PN}.c || die
+}
+
+src_compile() {
+ tc-export CC
+ emake unscd
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/unscd.initd-r1 unscd
+ systemd_newtmpfilesd "${FILESDIR}"/unscd-tmpfiles.conf unscd.conf
+ systemd_dounit "${FILESDIR}"/unscd.service
+ dosbin unscd
+}
diff --git a/sys-apps/usb_modeswitch/Manifest b/sys-apps/usb_modeswitch/Manifest
new file mode 100644
index 000000000000..2ed455c3fc68
--- /dev/null
+++ b/sys-apps/usb_modeswitch/Manifest
@@ -0,0 +1,13 @@
+AUX usb_modeswitch.sh-tmpdir.patch 596 SHA256 9b0a59b3bf6757cf541a0fbfaa468257d3b1db8faa82a4ac2ba5b886b1c119f2 SHA512 45e3a3f78a9404293a8b7e864f22db94a617be1d34d2c91fdaddc9b6a183dee1e3e2b5f4376e417d2c56b13b772a70e5e5cb53d0a08adf4cdbe60f1378abfa1c WHIRLPOOL a5e7da138c6865ed4486d2cf99db2a7652951987fdf1bf2c9312989d60e66fef069372d073440e41393cbf8c67a82e4e4b5617571d6e97680881df29051e646e
+DIST usb-modeswitch-2.2.6.tar.bz2 263395 SHA256 7ee42be2fe26dde20c58f54bf678fb136d2706250e4aa74f06fc97268a46e90f SHA512 f19b4c88e9a32af55a4a552cf89a2d25343b499180e41fccf988d34613f8480d49b7586b9b123edabc7cdbbb23073678797e99b7b679dd758924c9300377e067 WHIRLPOOL 107bcbc886cb8fda0d4b754641f237e4d8aa9f491649ae5bf42ee0d589eefc003fa37fc59bea63fd722a4d408f226e427058a235cd27ec6fa984ca1dcfb0a3f3
+DIST usb-modeswitch-2.3.0.tar.bz2 263141 SHA256 f93e940c2eb0c585a5d2210177338e68a9b24f409e351e4a854132453246b894 SHA512 5b7a012f31612ab53f817132e5055b45c056e5862f6daf9cb910c004878a93a46c0676040ba20323c110bd7fe3d5d26f2e16200ead2411d12f83e03278ff3a6c WHIRLPOOL 9f6407f21a91db689b465a513aaf685b9f51e5f0d0dbbd4b999bc10cd2236d27aee6a8ffed3bffd29b726f0c336bc2ac4203666674dc9871a5e7040910319987
+DIST usb-modeswitch-2.4.0.tar.bz2 259433 SHA256 17dc32bf10df8e370f2369b5137d34dfd8f2347faaa51524c5f21c922f42e212 SHA512 cf232b8333509012415fe9afbd1becbf54bbf7ebbb6cd450d16546840afc2dbdbc253f8ae6ae294c1e3a490d935e675b984a02ddbe243b57d80443f5d265117c WHIRLPOOL 9fa63f2252113a22d75065ef80fb13938a407c3731b52b47069dac8cc2d12d6eec7caaa91fc21c79f8aa4fe1094c056be70ddff80f8ca091dff60890d95308bf
+DIST usb-modeswitch-data-20151101.tar.bz2 30350 SHA256 584d362bc0060c02016edaac7b05ebd6558d5dcbdf14f1ae6d0ec9630265a982 SHA512 416fcf5ca6834b0a7697df4ecdc3ca61c02da7ecd8aff8836b9b8a83be96f9df7fb85ed05befdb6257267875d96ee39ee30affedea9794250f9ea46c1aadd879 WHIRLPOOL 7f95be9e7237425eba32948a72614d4ee68956fad93f2ea0aacb6bf90a0e50240315b321602a1f60ddd4035a667e7ee5160089458220fd35e0634ead395664bd
+DIST usb-modeswitch-data-20160112.tar.bz2 31166 SHA256 d679a44a48b1d1f243fea6b4d2bd54e0e08010ff579dd81eaf698954c0c6dfa7 SHA512 2da14d9a6e355921605f5e2231420326bae68b67466907b852c91a4f544101e31bccd703a6ecbae74b69cb518ab86d6732ffcacf4cbeccff55eea5befaedcaa3 WHIRLPOOL 7da9e88f0ba280643a1b04ba4a3d583dbbee2fe557bfdd759cd8b2fe272969eff8f0dbd7ca248ce0e3484037eee63872e2c8718d9b87ca8adc82e503caeb846f
+DIST usb-modeswitch-data-20160803.tar.bz2 31943 SHA256 83f4a277c6e34b8537740ae16bf9275008f7bf3f326134e0f846656a61a756fe SHA512 53c9ce700af986463e211fb918a06732df610403c149565c69e2d29ee5b248def7d607b2d10ba46da2b2d0be93803c1279e739b33eb14049520df6d556335608 WHIRLPOOL c2e2939102a52d975a58860cee79b7b6e8ed2bc917488f05f716c00b6d708eeb99a611b2a018ed13ba26d5f4006c659833c48448d808539e02285c8cd6ed33d6
+EBUILD usb_modeswitch-2.2.6.ebuild 1617 SHA256 14fac268a51ed214439171f9134607074cf28b10b8d0ef1e5db1318be26b8935 SHA512 905090c51fe23cc47d3f36cbed21cd590eb1132857fbd49c3fa821f824e39e535917c96f48b4716a524cb9fa3d68b13a5221ce57109d59e7782cb17624112664 WHIRLPOOL 9ecb76c734dba1300cdc799756c49a64a3a382e8f77e8789e3896ffddbf8aaa905d3951f3ace5e476a1812dce311d88bcc438ba143cceaee623dbf307e7d9f71
+EBUILD usb_modeswitch-2.3.0.ebuild 1620 SHA256 d181de0a750544ee7a5e95bc47ab6ae9f8479e3d98569a98ea8001ffb962d53f SHA512 1bffa0315fe2dac3b7748b3f227a8942b9f0e26e91f581e9c6b24927f564bf85d73c08ce061224fc0aad9ac6429b1e4d160f60bdbe6ca0d3bc916827f29c761b WHIRLPOOL 1b42c5ab84fac58624e0d0efde79d375bff6deb8776e5175d96ce90e8c42679bb3b386d25a5a451b89bac61aa3732a8b0f2b6e56ac4c8b5c065863243cb2c857
+EBUILD usb_modeswitch-2.4.0-r1.ebuild 1673 SHA256 d7be4d09f612f5d1e2d7a320ae7da334a2e28981eece7ab0a967bea33ce4e670 SHA512 a3e049d75118661a57bf590234f399a43c2774c5908e2b7b804287f2173e65178b171197019e672d6101308d3e477a788ef8de650a95a194f0523573510ebb5b WHIRLPOOL 4ecb1b7b2988527c1904e46f2cfe68d16a3cdff47d8ec867194a204589c18c0c06756a426f5ffdcb2cfc044a9df56be3b71945172cf2d090bc5d07396a34da6d
+MISC ChangeLog 4954 SHA256 00b1f3d597a131cbccd563bcbff3fb12642eea0308d86c37b723ad0c2e3d6d2e SHA512 14e930a2650443a50a89b0698eb6e993a6b9c4f95c4224c21e0dfb754be8f95551f375d7e323c7748f6c776f27c5078ee3711af0e49c40f927227f63b8a361de WHIRLPOOL 81c34f375c7fed1dffdc6ea263a2196aaaf110b2a648788d70e3e4a8cf3421ea7ff1c635cdfe93fc03ad88ded5d2bd003a40e43cbedb3e2271aae9d3596e5818
+MISC ChangeLog-2015 10073 SHA256 e58d2fbcf3681936f310fa1b03eb211291b6fb1e58ce2576c5b04eb6d3293f16 SHA512 49af985da3846c2c7b0f3df849f698e557f7fe2461c596aee57b47d215a6d14731c4fd982f39d080131d519ad550acf437ec163025774c9a4b6799dd18f054f2 WHIRLPOOL c026465b033b4c2c563a9f0c963e3c739aa9a6f73147d06abfb4e3c813b60c73b2fa6c61ce41a1d6014ae0f656503b5f1aab40f677f826b5eea48b673909381b
+MISC metadata.xml 541 SHA256 153b5e70cfd16583e99e46a10fb5c856bb0796353162b71e12491f22ca1c300b SHA512 a7d85ab85e65702c21bb6235e55482a678fa3e990c0b75f147b91970286784e26f7aff11b6538278ac51ce7003f7e55cc8a0bc51ede9f219354c7e5693dad80b WHIRLPOOL 8c021f53d91b6ba025d15f34b2f60119b0d66414587651f51adaff9d8af4d3ac2e8009a375a57cc19d450025d24ec0e86a335b21f91069543c952341c429a3c0
diff --git a/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
new file mode 100644
index 000000000000..5039d44da1fd
--- /dev/null
+++ b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
@@ -0,0 +1,18 @@
+Script that this patch modifies and usb_modeswitch_dispatcher Tcl script
+that is being called by it both need a writable temporary directory which
+is a problematic requirement for example if usb_modeswitch is triggered
+by a module loaded during system startup.
+Fortunately, /run is available very early at boot so let's redirect them
+there instead.
+
+--- a/usb_modeswitch.sh 2016-11-29 17:29:47.000000000 +0100
++++ b/usb_modeswitch.sh 2016-11-30 01:11:51.747993839 +0100
+@@ -17,6 +17,8 @@
+ return 0
+ }
+
++export TMPDIR=/run
++
+ if [ $(expr "$1" : "--.*") ]; then
+ p_id=$4
+ if [ -z $p_id ]; then
diff --git a/sys-apps/usb_modeswitch/metadata.xml b/sys-apps/usb_modeswitch/metadata.xml
new file mode 100644
index 000000000000..8cf6d89f163c
--- /dev/null
+++ b/sys-apps/usb_modeswitch/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="jimtcl">Use <pkg>dev-lang/jimtcl</pkg> instead of <pkg>dev-lang/tcl</pkg> for smaller memory footprint</flag>
+ </use>
+ <maintainer type="person">
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+<maintainer type="project">
+ <email>freedesktop-bugs@gentoo.org</email>
+ <name>Gentoo Freedesktop Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.2.6.ebuild b/sys-apps/usb_modeswitch/usb_modeswitch-2.2.6.ebuild
new file mode 100644
index 000000000000..9a9951b501df
--- /dev/null
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.2.6.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils linux-info toolchain-funcs udev systemd
+
+MY_PN=${PN/_/-}
+MY_P=${MY_PN}-${PV/_p*}
+#DATA_VER=${PV/*_p}
+DATA_VER="20151101"
+
+DESCRIPTION="A tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks"
+HOMEPAGE="http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt"
+SRC_URI="http://www.draisberghof.de/${PN}/${MY_P}.tar.bz2
+ http://www.draisberghof.de/${PN}/${MY_PN}-data-${DATA_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="jimtcl"
+
+COMMON_DEPEND="
+ virtual/udev
+ virtual/libusb:1
+"
+RDEPEND="${COMMON_DEPEND}
+ jimtcl? ( dev-lang/jimtcl )
+ !jimtcl? ( dev-lang/tcl:0 )" # usb_modeswitch script is tcl
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~USB_SERIAL"
+
+src_prepare() {
+ sed -i -e '/install.*BIN/s:-s::' Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ SYSDIR="${D}/$(systemd_get_unitdir)" \
+ UDEVDIR="${D}/$(get_udevdir)" \
+ $(usex jimtcl install-shared install)
+
+ # Even if we set SYSDIR above, the Makefile is causing automagic detection of `systemctl` binary,
+ # which is why we need to force the .service file to be installed:
+ systemd_dounit ${PN}@.service
+
+ dodoc ChangeLog README
+
+ pushd ../${MY_PN}-data-${DATA_VER} >/dev/null
+ emake \
+ DESTDIR="${D}" \
+ RULESDIR="${D}/$(get_udevdir)/rules.d" \
+ files-install db-install
+ docinto data
+ dodoc ChangeLog README
+ popd >/dev/null
+}
diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.3.0.ebuild b/sys-apps/usb_modeswitch/usb_modeswitch-2.3.0.ebuild
new file mode 100644
index 000000000000..8b257c026853
--- /dev/null
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.3.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils linux-info toolchain-funcs udev systemd
+
+MY_PN=${PN/_/-}
+MY_P=${MY_PN}-${PV/_p*}
+#DATA_VER=${PV/*_p}
+DATA_VER="20160112"
+
+DESCRIPTION="A tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks"
+HOMEPAGE="http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt"
+SRC_URI="http://www.draisberghof.de/${PN}/${MY_P}.tar.bz2
+ http://www.draisberghof.de/${PN}/${MY_PN}-data-${DATA_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="jimtcl"
+
+COMMON_DEPEND="
+ virtual/udev
+ virtual/libusb:1
+"
+RDEPEND="${COMMON_DEPEND}
+ jimtcl? ( dev-lang/jimtcl )
+ !jimtcl? ( dev-lang/tcl:0 )" # usb_modeswitch script is tcl
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~USB_SERIAL"
+
+src_prepare() {
+ sed -i -e '/install.*BIN/s:-s::' Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ SYSDIR="${D}/$(systemd_get_unitdir)" \
+ UDEVDIR="${D}/$(get_udevdir)" \
+ $(usex jimtcl install-shared install)
+
+ # Even if we set SYSDIR above, the Makefile is causing automagic detection of `systemctl` binary,
+ # which is why we need to force the .service file to be installed:
+ systemd_dounit ${PN}@.service
+
+ dodoc ChangeLog README
+
+ pushd ../${MY_PN}-data-${DATA_VER} >/dev/null
+ emake \
+ DESTDIR="${D}" \
+ RULESDIR="${D}/$(get_udevdir)/rules.d" \
+ files-install db-install
+ docinto data
+ dodoc ChangeLog README
+ popd >/dev/null
+}
diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild b/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild
new file mode 100644
index 000000000000..bee31d5c818f
--- /dev/null
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils linux-info toolchain-funcs udev systemd
+
+MY_PN=${PN/_/-}
+MY_P=${MY_PN}-${PV/_p*}
+#DATA_VER=${PV/*_p}
+DATA_VER="20160803"
+
+DESCRIPTION="A tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks"
+HOMEPAGE="http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt"
+SRC_URI="http://www.draisberghof.de/${PN}/${MY_P}.tar.bz2
+ http://www.draisberghof.de/${PN}/${MY_PN}-data-${DATA_VER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="jimtcl"
+
+COMMON_DEPEND="
+ virtual/udev
+ virtual/libusb:1
+"
+RDEPEND="${COMMON_DEPEND}
+ jimtcl? ( dev-lang/jimtcl )
+ !jimtcl? ( dev-lang/tcl:0 )" # usb_modeswitch script is tcl
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~USB_SERIAL"
+
+src_prepare() {
+ sed -i -e '/install.*BIN/s:-s::' Makefile || die
+ epatch "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ SYSDIR="${D}/$(systemd_get_unitdir)" \
+ UDEVDIR="${D}/$(get_udevdir)" \
+ $(usex jimtcl install-shared install)
+
+ # Even if we set SYSDIR above, the Makefile is causing automagic detection of `systemctl` binary,
+ # which is why we need to force the .service file to be installed:
+ systemd_dounit ${PN}@.service
+
+ dodoc ChangeLog README
+
+ pushd ../${MY_PN}-data-${DATA_VER} >/dev/null
+ emake \
+ DESTDIR="${D}" \
+ RULESDIR="${D}/$(get_udevdir)/rules.d" \
+ files-install db-install
+ docinto data
+ dodoc ChangeLog README
+ popd >/dev/null
+}
diff --git a/sys-apps/usbmon/Manifest b/sys-apps/usbmon/Manifest
new file mode 100644
index 000000000000..17d64f9ae02e
--- /dev/null
+++ b/sys-apps/usbmon/Manifest
@@ -0,0 +1,8 @@
+AUX usbmon-6-sysmacros.patch 1103 SHA256 aac849b5e3459f814bc0c6f9e746595b6dbc326bc68188f6d2cdf9a7dccb8dec SHA512 e3a1b55effd247ac8911c07220c187bc099db011269608d09a8b6698670b5e3d1c34a8cd60acdbfd69ae3bae24ab4cdcb69927b4c9b8c573bfc7045c5e3d1a0f WHIRLPOOL 26ded66bcb3bc4d441ae9ac29ab8869c29ead591d0fb24cbef8304fed614cf88fd216fd2553ae5976b77f0c8c4af35056327512e68eed477bd45a55f5f33547c
+DIST usbmon-6.1.tar.gz 16358 SHA256 30985b48f3c29901a1ed2a18af6b1f70d290d5d45cc44c5afdc3ade6d1816b84 SHA512 580aa1edd6336ac86e562081a79698a98e6c7aa3dd8605a4c12201dd0e3ab1dc58b3d69f670742e007aeb76fb6ebfff9b5d10114df93814763e0c393b6473b54 WHIRLPOOL be28f04ea36db5698f0844f7b48fc38b1b1e512d4191cd44b0ad6a9edea3e315e948054fffe919064477265e3f35aafabf005da5b8f7c6d974827252ad41413d
+DIST usbmon-6.tar.gz 16796 SHA256 32a804ccdd7af002c3e44e7c8abb0e7e1b6ccd6c7b9a70c7371cd5558d07e459 SHA512 4ee41379196b86697a5156d4411860ba31540b98e50165c65f873e22eee1c3caadbc73a2c61903531f968797eca8e7f95490255a0820dc0778fba82c7eb260f5 WHIRLPOOL f985043dcba6fe2f0401f3588298b5a393d07cdd0745a93c684d3510550286a0a8dda7873954ef24e41cbb63679e4fa3093e15e583aef953ed939d50c40d5970
+EBUILD usbmon-6-r1.ebuild 631 SHA256 7c455838f9bbb119641452c97ddd5a8f2c87c6c0be75d877c5619e08acc06b51 SHA512 7cda0d060508e034f53c4c1465d340690f340ecf192f9b6a4bc63eb157966a03156f96d2d87a0fc3b2cb6cc131a1aad9b6371ecb01d339bbfc1b20f18b9971d8 WHIRLPOOL e784e247532a84e2c05a69117c6c50e10c6898d307c49be2e082df76d42bf794ab1ef4da9ff2bd0bb6819183d4dbebb3d5e63f212211322c57cda7c04b748f29
+EBUILD usbmon-6.1.ebuild 503 SHA256 76e42e20c740ac066c0e6ec1227090d501da199a5ea0e29d9c96d8c2ece14588 SHA512 1e467e5c4a2c8f4963e3833b20243e4f99516b90eda16cc55a24a9314daa1187734fe646f794a32231fba64a8d0bbcfd4d106830f7d4d07e017fdb733b50b637 WHIRLPOOL c0138bf11b686c12a5f2d128c5c780ade9ecd22457fe5b7eb307d8088786a35de5c25e62f899555d368ad82570b91c220d21746db8c667a8735f23b997d3cc8d
+MISC ChangeLog 2471 SHA256 79450978d268ebfefb80d6cfe824fc959cdaa6dfb6fd6599636e2347f89286af SHA512 c7610dee0c4993606cac28759645aaf3bd540c2c04fe1eaa4540ba8dc665612e01000d4cb1a527fc1941db77c7b832d94c486e3faa4e6d288e07e49e04156ffd WHIRLPOOL 9b0246345056e1fd56e6b20650d271af1f662559b9850bb3ae9681ed48b2cdea485392da290c59fc030a91b61cb05c0189a61e74d624fb224b6a7013f62c4200
+MISC ChangeLog-2015 1245 SHA256 75f7852661ffe20837f1ad79e780a55f043fd65767f036fc0d6a6ef0ab223b2d SHA512 ef925285346c0ef662de3be65b0fda1a9661a4601bfec06b189b226798889dc0d2dabf80b4c4a263cd234c734e42e51b31db2ae8e971fd668a50d35e0f2d8ecf WHIRLPOOL f117b002d3f552273875606af5fa96bef0961c7435431b36f1bffc78f47f5859857a18b49190367656b1b4c280d346236d63d3075871d7858e2fa86afa67719a
+MISC metadata.xml 222 SHA256 432ab13a142cc8c662b1cc100016536215338c0febabe341aaab6c9eef00c1f3 SHA512 05134582b0d0287f20fd3702d042ca556dc42f3ca4568bfa73f6d9886ed8027057936af758ffbb252a5677e1af876c46e8d044f5fc691148922c5fa0c5cddc03 WHIRLPOOL 1b0f798595484b98ce893ce86eb52280b053707ba333f37944cad64c1647cf4789b2ce9815328dba862b38711d0a07e1a354ecc6ec93902fb79bb27d731aaa16
diff --git a/sys-apps/usbmon/files/usbmon-6-sysmacros.patch b/sys-apps/usbmon/files/usbmon-6-sysmacros.patch
new file mode 100644
index 000000000000..109b4745dc0a
--- /dev/null
+++ b/sys-apps/usbmon/files/usbmon-6-sysmacros.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/580360
+
+From 449f591d0220e57face02898a9ae2617baace814 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:24:49 -0400
+Subject: [PATCH] usbmon: include sys/sysmacros.h for makedev func
+
+Since glibc has always placed these funcs in sys/sysmacros.h, and other
+C libs require this, include it directly. Otherwise we fail to build:
+usbmon.c: In function 'make_device':
+usbmon.c:966:8: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
+ dev = makedev(major, p->ifnum);
+ ^
+usbmon.c:966:2: warning: nested extern declaration of 'makedev' [-Wnested-externs]
+ dev = makedev(major, p->ifnum);
+ ^
+...
+usbmon.o: In function 'make_device':
+usbmon.c:966: undefined reference to 'makedev'
+---
+ usbmon.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usbmon.c b/usbmon.c
+index 37929f2..8d2acfc 100644
+--- a/usbmon.c
++++ b/usbmon.c
+@@ -32,6 +32,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <sys/sysmacros.h>
+ #include <inttypes.h>
+ #include <stdarg.h>
+
+--
+2.7.4
+
diff --git a/sys-apps/usbmon/metadata.xml b/sys-apps/usbmon/metadata.xml
new file mode 100644
index 000000000000..ee74e58c0375
--- /dev/null
+++ b/sys-apps/usbmon/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 type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/usbmon/usbmon-6-r1.ebuild b/sys-apps/usbmon/usbmon-6-r1.ebuild
new file mode 100644
index 000000000000..63b0e873be58
--- /dev/null
+++ b/sys-apps/usbmon/usbmon-6-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Userland for USB monitoring framework"
+HOMEPAGE="https://people.redhat.com/zaitcev/linux/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE=""
+
+DEPEND="!=sys-apps/usbutils-0.72-r2"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sysmacros.patch #580360
+ sed \
+ -e '/CFLAGS =/s, = , \+= ,g' \
+ -e 's:-O2::g' \
+ -i "${S}"/Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ dosbin ${PN}
+ doman ${PN}.8
+ dodoc README
+}
diff --git a/sys-apps/usbmon/usbmon-6.1.ebuild b/sys-apps/usbmon/usbmon-6.1.ebuild
new file mode 100644
index 000000000000..7bd8aa7653ff
--- /dev/null
+++ b/sys-apps/usbmon/usbmon-6.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Userland for USB monitoring framework"
+HOMEPAGE="https://people.redhat.com/zaitcev/linux/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE=""
+
+src_prepare() {
+ default
+ sed -e 's:-O2::g' -i "${S}"/Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ dosbin ${PN}
+ doman ${PN}.8
+ dodoc README
+}
diff --git a/sys-apps/usbredir/Manifest b/sys-apps/usbredir/Manifest
new file mode 100644
index 000000000000..9e0ffe0080e1
--- /dev/null
+++ b/sys-apps/usbredir/Manifest
@@ -0,0 +1,9 @@
+DIST usbredir-0.7.1.tar.bz2 329895 SHA256 407e9e27a1369f01264d5501ffbe88935ddd7d5de675f5835db05dc9c9ac56f3 SHA512 f8d26d59d5a530aa413fabe2402fbbd9662760453c2b4e83d34f2e5287c188114ea870f15ae1bc910297649986315be965f0d23d0a2b7b0cec2f207fc65d7598 WHIRLPOOL 8f85e7174e068fa1cffaa48e079d2348171fcc7907870eda3a5bef25c83dc6be5a468d19b84aee044fbc638fa8362aa63e98b372703065d3de3b4758ce20a310
+DIST usbredir-0.7.1_p20170503-patches.tar.xz 8120 SHA256 45b671997872170ccbdd111fd81d880a39f440fa2a997a22c6d2cf6f3f78c445 SHA512 b281d7a1ee191746e5fbe655b21c0cd9b2cf9cd69d5f28d91ab41de2d62a7f3c5c2a42f3f9c40c73d61a57d89423d996f4a779ebdff8f9d088030c2a4c2a24a7 WHIRLPOOL 9741309fdf10881708b964beecc10c08d0ed7073e4c2299a79b5a100c3c5cdf75ef3c87c68cc4d8f1e3d94d79e5fab5dcc63a983658e04fca53b5f625453ae08
+DIST usbredir-0.7.tar.bz2 317216 SHA256 0a63a0712b5dc62be9cca44f97270fea5d1ec1fe7dde0c11dc74a01c8e2006aa SHA512 f615fc52f195c7159d16b551f6ecd9426f2aad64222f24b964fbd66fbf59498d80d4d5cf851cc1be9ddd27a9d962afa05970e1379f1ef02e8ac304235e82ad4a WHIRLPOOL 3f7ad0bcde1a109fcc9b32c23019d6078a1ea1c8d72998ce2d3b0c42278a953cfb739c74f21b5083c4e3da8f558ad0e60a82db540c3e1da1a89fd52d9208ff2b
+EBUILD usbredir-0.7.1_p20170503.ebuild 996 SHA256 52b7cbb4fbf5c966dbbe16a058c5434a9969c035c410f2495e2f6e11f226dbca SHA512 6eedca169265c5cf0ff262a1b805a8832e95c05d9af297608984709125cc5d972ca504c42118ed907b91edf342fa8c83b6f08fbf9dcb2d1d600801d3a1e128dc WHIRLPOOL b087a56b71bbe760d197e13cf8de88a4fa54b7e3f98fa8a0335ef15c915308c080e4e785212b1bb4ea616fe5e1a14a26323f0bb1964f7f9a84a75ae8e23ac1b0
+EBUILD usbredir-0.7.ebuild 840 SHA256 2fdcc1b4f23ea45e98b5dd44d11b6ed28f6006ab55221af3c7ea94f3d6831589 SHA512 f4de5f68250391c49407597459a9b0fb6bf7976ef9275beebba72a390069a380fdf320cb4d1a832bbb066ccb55c6ba35b61bd4c9ba28c159ba6569a13c90c571 WHIRLPOOL b500590be112f81a5939056ef1bc7c837db80fd8a8884ad72ee44eade1b1c1fdf0788b768737407cc187eec3decb30875721a7ab8dc14d97b0a6d931f7722e03
+EBUILD usbredir-9999.ebuild 847 SHA256 99a21090db87fd657837247b6de531995a01fe59f2d68d8b2eb074873a8ac163 SHA512 18c1926ad3c95992bf65530a7e1b852cf177cee063e4f93373c166e70fe088f0dda0d94df99c7071c7e2f6c508ae153c234e4c958a96804815b3da7da57a2865 WHIRLPOOL c1498ed2f60af27216afd127357649cdffac1dc232c4125e8133a5e636e1be4c44838b9edf5a6dd016f8b08d6f1a59edb7340ba56737d56f643998c564da66eb
+MISC ChangeLog 4450 SHA256 a823f859c0e9f8f3441d32bfbd63825ad5efc3d6675345fb1a9f5d454bb5f570 SHA512 b7371fe56519f6c413cb9de65255b6053f060f6081206356fa5241bce7f2b34388b042fcd81db6e801a72675782d6bf423f47754bb0ea620e151cebcf385cf01 WHIRLPOOL a84201560ad2221b69b4491216afb5cbd70e88963daddcbe0527bdd3b477b5b26c5d6f3a977e96039f0e324f77ca3ff111b7c8d24312ac22caf635f2df50e458
+MISC ChangeLog-2015 5872 SHA256 46fa50b429af3d429d438ae3bb66dfafcc39a2d570b5cf2e7b9b47c45c2f573e SHA512 db144f37f8e8fb2a0c7061b3a947bcae99aea6fe4cbcd23cfb7f94ac78df05ced2ca4685e862e30f037554637b2bffe64930a19bd5dff8a1b75ceec5adc4a250 WHIRLPOOL ad7e407d4889304142b538e6a8ecd00eb692759026c6716c2da854bae5291744f4c37402efddf3806702f81418cb40527db75504cbcfc7c6b8e1e813306c583e
+MISC metadata.xml 361 SHA256 d9c195ae11ecb0539c073c96a1aae519d46b2097f546ee0b8e807e8c424c19f4 SHA512 3cf32d1610947c8e1fe9acdcce071a5b5d7ac6711c7d81f0c87f31e7e2d07b13a012312f1380e30c54c95f7371963cde9c76052914b6582507ce964621673cd6 WHIRLPOOL 8511522b9547ad4bb20ae2be74485da5623832a4cc80ff0fb35f6bbec081ac38aac0ffd413c260f10642d58df97b127e3d5d29a778775288ecf9dc7998c9ce84
diff --git a/sys-apps/usbredir/metadata.xml b/sys-apps/usbredir/metadata.xml
new file mode 100644
index 000000000000..7034c12b3ed5
--- /dev/null
+++ b/sys-apps/usbredir/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<maintainer type="project">
+ <email>qemu@gentoo.org</email>
+ <name>Gentoo QEMU Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/usbredir/usbredir-0.7.1_p20170503.ebuild b/sys-apps/usbredir/usbredir-0.7.1_p20170503.ebuild
new file mode 100644
index 000000000000..19fbe148a630
--- /dev/null
+++ b/sys-apps/usbredir/usbredir-0.7.1_p20170503.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic
+
+MY_PV=${PV/_p*/}
+
+DESCRIPTION="TCP daemon and set of libraries for usbredir protocol (redirecting USB traffic)"
+HOMEPAGE="https://www.spice-space.org/page/UsbRedir"
+SRC_URI="https://www.spice-space.org/download/usbredir/usbredir-${MY_PV}.tar.bz2
+ https://dev.gentoo.org/~tamiko/distfiles/${P}-patches.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 sparc x86"
+IUSE="static-libs"
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+PATCHES=(
+ "${S}_p20170503-patches"
+)
+
+DOCS="ChangeLog README* TODO *.txt"
+
+src_configure() {
+ # https://bugs.freedesktop.org/show_bug.cgi?id=54643
+ append-cflags -Wno-error
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ # noinst_PROGRAMS
+ dobin usbredirtestclient/usbredirtestclient
+}
diff --git a/sys-apps/usbredir/usbredir-0.7.ebuild b/sys-apps/usbredir/usbredir-0.7.ebuild
new file mode 100644
index 000000000000..9225004b14b2
--- /dev/null
+++ b/sys-apps/usbredir/usbredir-0.7.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="TCP daemon and set of libraries for usbredir protocol (redirecting USB traffic)"
+HOMEPAGE="https://www.spice-space.org/page/UsbRedir"
+SRC_URI="https://www.spice-space.org/download/usbredir/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libusb-1.0.19"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="ChangeLog README* TODO *.txt"
+
+src_configure() {
+ # https://bugs.freedesktop.org/show_bug.cgi?id=54643
+ append-cflags -Wno-error
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ # noinst_PROGRAMS
+ dobin usbredirtestclient/.libs/usbredirtestclient
+}
diff --git a/sys-apps/usbredir/usbredir-9999.ebuild b/sys-apps/usbredir/usbredir-9999.ebuild
new file mode 100644
index 000000000000..8c8f43ddda02
--- /dev/null
+++ b/sys-apps/usbredir/usbredir-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic autotools git-r3
+
+DESCRIPTION="TCP daemon and set of libraries for usbredir protocol (redirecting USB traffic)"
+HOMEPAGE="https://www.spice-space.org/page/UsbRedir"
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/spice/usbredir.git"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+IUSE="static-libs"
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="ChangeLog README* TODO *.txt"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # https://bugs.freedesktop.org/show_bug.cgi?id=54643
+ append-cflags -Wno-error
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ # noinst_PROGRAMS
+ dobin usbredirtestclient/usbredirtestclient
+}
diff --git a/sys-apps/usbutils/Manifest b/sys-apps/usbutils/Manifest
new file mode 100644
index 000000000000..f5d419b2cdb5
--- /dev/null
+++ b/sys-apps/usbutils/Manifest
@@ -0,0 +1,6 @@
+AUX usbutils-006-stdint.patch 701 SHA256 da7ffae1b7169bbf32446cf5e63b0983d2f87bbef2cae0ce1b69acbd5ac3310e SHA512 8854846ec60652490401932a751e1e7ea61f59afa83447dd976ac351f898418777780b5e240c76771580aa8a879dbb63928adc053a3a95649dde5d9fab52798a WHIRLPOOL 73fca2e8de3da1745a78de495f9a1132b0b788c7b15f0ce5ff25f8c66ebd881d18089dcf76734d8c179bb5fcae1c9343db3767cff1d04143e11c374878d2643f
+DIST usbutils-008.tar.xz 287052 SHA256 44741af0bae9d402a0ef160a29b2fa700bb656ab5e0a4b3343d51249c2a44c8c SHA512 ab1ad36467ff79ff5ab0b924620001612cae44def58c05ade01a4e58d8a4d48df61c09faba49a20497b7d6314045bbaf137b51a9f4e6b65ed0ea3bb339bf1c45 WHIRLPOOL 47898f8f0c8a93a200777e5006ec36c2bc805e126974ba415edc21983db9d35d3b8ec4a6be28359a36e5adda95cc4c8bc37ba4b651a9065e249b8ffe4c6b70aa
+EBUILD usbutils-008-r1.ebuild 1244 SHA256 4fdc622e1cf41112756fbe6c0a09b4c304bdf2b899cf33ec38851466c55a00eb SHA512 5384707b65c9801744ec1838e94396ee421ea007ec25c5afc1503134c2d7bf0231fdd1d9dce8b6af9892177b1dbe16b30303c810bb4e1d82b2082c2f32fe5964 WHIRLPOOL 0b14a778750fa54a603c17dff0fc5adc74663904fb011896944b273c052a7e92c6996504b24f0b75938718d6563facb51d8dcd28cdd9322d371929fdc02c038f
+MISC ChangeLog 3343 SHA256 8c2a9b18640b6e4fb9d19ce4c36de1ed459ccc2de7b67e49b85b714858230fb5 SHA512 f983694cf8f1a32b60a60352925205406a3d1e682fd5341121706c493301066f1cc6724ffeefc62bf8f0c7781d9c18410489184a17f22454c68cc57a2bc0b457 WHIRLPOOL 27d116e4e23308bd7469e5c1f998a4d35eac972ff6352e9ee58dd958edd2293ca35fb2fb5318d412a278d93bfb98afe768e8e45952ea5713984d990bbb729cd4
+MISC ChangeLog-2015 25971 SHA256 94168c0aa7942eb227d19c66f97b1ba623440a8f98afb7321571ab43b206b929 SHA512 7b63dc9df09ba42ef5fab1eaa4058bfc5d4aaab4db33fce153ab0b6cf1e72eb2c49d894a92145666a4f3c3ea122a03bc87dbc05cf979e4f639fdc0de5a7ab3b4 WHIRLPOOL a77db763110c01efda16e1de3ff8978dd1faf39aab1277f4d6dfe84e958eb0a0f1d108f03af097c84e5c19be07232db31adc41b219788b2efb866db13f7b9a99
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/usbutils/files/usbutils-006-stdint.patch b/sys-apps/usbutils/files/usbutils-006-stdint.patch
new file mode 100644
index 000000000000..3aecbdfec04c
--- /dev/null
+++ b/sys-apps/usbutils/files/usbutils-006-stdint.patch
@@ -0,0 +1,32 @@
+https://sourceforge.net/p/digimend/bugs/41/
+
+--- a/usbhid-dump/lib/iface.c
++++ b/usbhid-dump/lib/iface.c
+@@ -30,6 +30,7 @@
+ #include <assert.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <string.h>
+
+ bool
+--- a/usbhid-dump/lib/iface_list.c
++++ b/usbhid-dump/lib/iface_list.c
+@@ -30,6 +30,7 @@
+ #include <assert.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdint.h>
+
+ bool
+ uhd_iface_list_valid(const uhd_iface *list)
+--- a/usbhid-dump/src/usbhid-dump.c
++++ b/usbhid-dump/src/usbhid-dump.c
+@@ -40,6 +40,7 @@
+ #include <unistd.h>
+ #include <getopt.h>
+ #include <stdio.h>
++#include <stdint.h>
+
+ /* Define LIBUSB_CALL for libusb <= 1.0.8 */
+ #ifndef LIBUSB_CALL
diff --git a/sys-apps/usbutils/metadata.xml b/sys-apps/usbutils/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/usbutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/usbutils/usbutils-008-r1.ebuild b/sys-apps/usbutils/usbutils-008-r1.ebuild
new file mode 100644
index 000000000000..ef15f8b2fa1d
--- /dev/null
+++ b/sys-apps/usbutils/usbutils-008-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="USB enumeration utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/usb/usbutils/
+ https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/"
+SRC_URI="mirror://kernel/linux/utils/usb/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="virtual/libusb:1=
+ virtual/libudev:="
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ sys-apps/hwids
+ python? ( ${PYTHON_DEPS} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-006-stdint.patch
+ sed -i -e '/^usbids/s:/usr/share:/usr/share/misc:' lsusb.py || die
+ use python && python_fix_shebang lsusb.py
+}
+
+src_configure() {
+ econf \
+ --datarootdir="${EPREFIX}/usr/share" \
+ --datadir="${EPREFIX}/usr/share/misc"
+}
+
+src_install() {
+ default
+ newdoc usbhid-dump/NEWS NEWS.usbhid-dump
+
+ use python || rm -f "${ED}"/usr/bin/lsusb.py
+}
diff --git a/sys-apps/usermode-utilities/Manifest b/sys-apps/usermode-utilities/Manifest
new file mode 100644
index 000000000000..fb47c1cc54c7
--- /dev/null
+++ b/sys-apps/usermode-utilities/Manifest
@@ -0,0 +1,8 @@
+AUX usermode-utilities-20070815-headers.patch 551 SHA256 0f02af949a5692953212dc8eabd70bd67d22b1cdbfa79a8fe0b6e6dc8afdd59e SHA512 b22bf1d77b209996c24b400b3c27d37cef1fe8deddb07391394f5307fa5f0c41e36f78e5c09c6a40bc6618e7801220bdb139ef413fb712d68d73e54ed201a101 WHIRLPOOL 0bfbaec711ab4a63416e3194460505f3a80cd072778066df5ae0fe367cb70c82383f95a6242b31cfe5b12903d5914acdefa4608a91615343f99033c32bd0b282
+AUX usermode-utilities-20070815-humfsify-owner.patch 460 SHA256 e5118622f158da465e5e8a03b89f8993aecd7a3bd786b6912f81f0953ff05a4a SHA512 f048d1fde80a5fae33a67c99aad5927f64343a1bec15cdab94bb5c8798b96192fccedda66a9aa8f14fb90de803cba031ddec4d9bc6eec236b8245aaa7b74115f WHIRLPOOL f6161be0748f3258f9ce20443b1c7246528b138e4ac0383ac1765a0489f755be6234c92ff8e90fc3b4d342337d4e211fffa549c0945d8c6c414e75e8a5c76d7a
+AUX usermode-utilities-20070815-rollup.patch 4619 SHA256 06b9b613d94006cc4bda2baabf371e8de352593262417373bbd23698dd4710db SHA512 9cfc5a2fa98b7aff45c732629812ab691d3a56e5526f70d9ddb93dd666b9bf743296914f63043a94611e045915ed8046c87507a451deebc3d889d0827dc76439 WHIRLPOOL 8712020dbc151891e1c0ec0f2a5a9f595a38b99a6c7b68a11d4eb50d7af72574fdb960b87eaa403a8451947b68e8feef251523dbc8822e62108dbd4d310ec2e8
+DIST uml_utilities_20070815.tar.bz2 50159 SHA256 f815f591a1c177729546969acf720958c5fd72b8d4d36bae26fdc5b64669b60e SHA512 a246ca04bcba2282ceb976e69399f496cc85d14ee13c1e4704f943d7fcef032eda92e9e8c4341f6e8878c6353ed97c7f77b283e62e152987c792a7a6258f1d1a WHIRLPOOL 343e755da98d3d6a714a7c26cc917b01af7fc737c4a24806ad04c902e5a919cfdd831c3b18d7a2c5c7a271266f58d167ab9a788543b5a0f5671b9a6b639a37b1
+EBUILD usermode-utilities-20070815-r3.ebuild 1269 SHA256 45b2ff16f9bd033386d9ac403235509b4d52ac4d1566aa2afd21fb0b4a3831ca SHA512 21db6e3680315826e40397c9f9703de051ccd6db856afd48093ce5fa7a31d730e32030bcd9385c641830f9a07497cc638f4f1dd131333c9af926cdd726c9330f WHIRLPOOL fd8fcd3b1b9dca372809010d8bd48b4ecf7ce35005b7ef6a35b5383004c737329b1de7d260f36837caaaab4efc844c8d52e74f582195db7f8aeb2294fcb99f08
+MISC ChangeLog 3401 SHA256 778c9b00b49b87ec2cedfd3fd6f66eceb5ca3ce2356b2eee72e5e11633a79139 SHA512 7ca5f1413ffb87616d6c9762705f98415985d49a05a3cb3d60611ebd7e645f77cd32fecf1a3e2c102b81d673c19c0f6121431da71cae4c4c3f54c59f9019258b WHIRLPOOL d8d7715b6434ae879397bf6b3ac9be9f3b24ee8bdd44048e4900a55c88b83608766bf32b18630e1bfd121e38ede163d6c88ead0e87fe07d5f068995e493a9f71
+MISC ChangeLog-2015 7263 SHA256 ed2a66b85a69846aa200c2806aba12c87d9bc7be4e50a71cc6e5c8b68b1519f6 SHA512 3d7bff1dfba4d2353232a33bfc757a4c53ba2a216436671492e0788dc99f480a9aa8401e9ff472a0612bba92fac1d2ab35ef5bff778a02c40484f9e1e9a6b7da WHIRLPOOL 7976de219dbed33a2e65e1aeb9880df1d5ba047fef6d1785439a3280e38db16302a3bac3e87e4478848e7e9f5f65107b22e11b0fe1d30f2a21b8db9de818be7a
+MISC metadata.xml 340 SHA256 2769e2efea3686ded17f998579a6fefa901df1f04d208ee28adc882c86786de4 SHA512 cd72a8e80c3b9410363e3e9d3ddb194f858138598e3fd0375b38ab43d4ce82d29309aba07b71c3d2756e871168fbf1c8bb3f3ba87c00d0b27f1f3add2627734d WHIRLPOOL 8ec853fc14514ca58ae078fab6774accb043ce87fc715b0c8f5673bf930930f1cbccf8cbd6756bfc214893fadba5a4e9b7f5969c49a6cfd9d631b854c2205951
diff --git a/sys-apps/usermode-utilities/files/usermode-utilities-20070815-headers.patch b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-headers.patch
new file mode 100644
index 000000000000..13fd556ec98d
--- /dev/null
+++ b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-headers.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/580816
+
+include headers needed by targets
+
+--- b/tools-20070815/uml_net/ethertap.c
++++ a/tools-20070815/uml_net/ethertap.c
+@@ -13,6 +13,7 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
++#include <sys/select.h>
+ #include "host.h"
+ #include "output.h"
+
+
+for major/minor macros
+
+--- b/tools-20070815/uml_net/host.c
++++ a/tools-20070815/uml_net/host.c
+@@ -10,6 +10,7 @@
+ #include <ctype.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include "output.h"
+ #include "host.h"
+
diff --git a/sys-apps/usermode-utilities/files/usermode-utilities-20070815-humfsify-owner.patch b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-humfsify-owner.patch
new file mode 100644
index 000000000000..9d02498052f0
--- /dev/null
+++ b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-humfsify-owner.patch
@@ -0,0 +1,12 @@
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/humfsify/Makefile tools-20070815/humfsify/Makefile
+--- tools-20070815.orig/humfsify/Makefile 2006-05-25 14:37:01.000000000 -0400
++++ tools-20070815/humfsify/Makefile 2011-05-02 11:04:32.531034342 -0400
+@@ -4,7 +4,7 @@ all:
+
+ install:
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -o 0755 $(BIN) $(DESTDIR)$(BIN_DIR)
++ install -m 0755 $(BIN) $(DESTDIR)$(BIN_DIR)
+
+ clean:
+ rm -f *~
diff --git a/sys-apps/usermode-utilities/files/usermode-utilities-20070815-rollup.patch b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-rollup.patch
new file mode 100644
index 000000000000..f88e20663f5b
--- /dev/null
+++ b/sys-apps/usermode-utilities/files/usermode-utilities-20070815-rollup.patch
@@ -0,0 +1,101 @@
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/jail/Makefile tools-20070815/jail/Makefile
+--- tools-20070815.orig/jail/Makefile 2006-02-27 14:51:46.000000000 -0500
++++ tools-20070815/jail/Makefile 2010-08-04 22:17:56.869103217 -0400
+@@ -11,7 +11,7 @@ $(BIN) : $(OBJS)
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(SBIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(SBIN_DIR)
++ install $(BIN) $(DESTDIR)$(SBIN_DIR)
+
+ clean :
+ rm -rf *~ $(BIN) $(OBJS) cell[0-9]* core* tty_log_cell*
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/jailtest/Makefile tools-20070815/jailtest/Makefile
+--- tools-20070815.orig/jailtest/Makefile 2006-02-27 14:52:53.000000000 -0500
++++ tools-20070815/jailtest/Makefile 2010-08-04 22:17:56.870032258 -0400
+@@ -14,4 +14,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/mconsole/Makefile tools-20070815/mconsole/Makefile
+--- tools-20070815.orig/mconsole/Makefile 2006-02-27 15:03:01.000000000 -0500
++++ tools-20070815/mconsole/Makefile 2010-08-04 22:17:56.916031770 -0400
+@@ -15,4 +15,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/moo/Makefile tools-20070815/moo/Makefile
+--- tools-20070815.orig/moo/Makefile 2006-02-27 15:08:49.000000000 -0500
++++ tools-20070815/moo/Makefile 2010-08-04 22:17:56.938282085 -0400
+@@ -23,4 +23,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/port-helper/Makefile tools-20070815/port-helper/Makefile
+--- tools-20070815.orig/port-helper/Makefile 2006-02-27 15:18:40.000000000 -0500
++++ tools-20070815/port-helper/Makefile 2010-08-04 22:17:56.938282085 -0400
+@@ -15,4 +15,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(LIB_DIR)
+- install -s $(BIN) $(DESTDIR)$(LIB_DIR)
++ install $(BIN) $(DESTDIR)$(LIB_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/tunctl/Makefile tools-20070815/tunctl/Makefile
+--- tools-20070815.orig/tunctl/Makefile 2006-02-27 15:19:52.000000000 -0500
++++ tools-20070815/tunctl/Makefile 2010-08-04 22:17:56.939282225 -0400
+@@ -14,4 +14,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/umlfs/Makefile tools-20070815/umlfs/Makefile
+--- tools-20070815.orig/umlfs/Makefile 2006-02-27 16:11:25.000000000 -0500
++++ tools-20070815/umlfs/Makefile 2010-08-04 22:17:56.940282085 -0400
+@@ -16,4 +16,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/uml_net/Makefile tools-20070815/uml_net/Makefile
+--- tools-20070815.orig/uml_net/Makefile 2006-02-27 15:19:52.000000000 -0500
++++ tools-20070815/uml_net/Makefile 2010-08-04 22:23:40.459151826 -0400
+@@ -2,6 +2,7 @@ TUNTAP = $(shell [ -e /usr/include/linux
+
+ BIN = uml_net
+ CFLAGS ?= -g -Wall
++LDFLAGS += -Wl,-z,now
+ override CFLAGS += $(TUNTAP)
+
+ BIN_DIR ?= /usr/bin
+@@ -22,4 +23,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s -m 04755 $(BIN) $(DESTDIR)$(BIN_DIR)
++ install -m 04755 $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/uml_switch/Makefile tools-20070815/uml_switch/Makefile
+--- tools-20070815.orig/uml_switch/Makefile 2006-02-27 15:20:26.000000000 -0500
++++ tools-20070815/uml_switch/Makefile 2010-08-04 22:17:56.942283133 -0400
+@@ -21,4 +21,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN tools-20070815.orig/watchdog/Makefile tools-20070815/watchdog/Makefile
+--- tools-20070815.orig/watchdog/Makefile 2006-02-27 15:55:34.000000000 -0500
++++ tools-20070815/watchdog/Makefile 2010-08-04 22:17:56.943282225 -0400
+@@ -14,4 +14,4 @@ clean :
+
+ install : $(BIN)
+ install -d $(DESTDIR)$(BIN_DIR)
+- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
++ install $(BIN) $(DESTDIR)$(BIN_DIR)
diff --git a/sys-apps/usermode-utilities/metadata.xml b/sys-apps/usermode-utilities/metadata.xml
new file mode 100644
index 000000000000..2ffcb96e8fe0
--- /dev/null
+++ b/sys-apps/usermode-utilities/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-needed -->
+ <use>
+ <flag name="fuse">Build tools (currently umlmount) needing fuse</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">user-mode-linux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/usermode-utilities/usermode-utilities-20070815-r3.ebuild b/sys-apps/usermode-utilities/usermode-utilities-20070815-r3.ebuild
new file mode 100644
index 000000000000..86a15526f28f
--- /dev/null
+++ b/sys-apps/usermode-utilities/usermode-utilities-20070815-r3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Tools for use with Usermode Linux virtual machines"
+HOMEPAGE="http://user-mode-linux.sourceforge.net/"
+SRC_URI="http://user-mode-linux.sourceforge.net/uml_utilities_${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="fuse"
+
+RDEPEND="fuse? ( sys-fs/fuse )
+ sys-libs/readline:0="
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/tools-${PV}
+
+src_prepare() {
+ # Merge previous patches with fix for bug #331099
+ epatch "${FILESDIR}"/${P}-rollup.patch
+ # Fix owner of humfsify; bug #364531
+ epatch "${FILESDIR}"/${P}-humfsify-owner.patch
+ epatch "${FILESDIR}"/${P}-headers.patch #580816
+
+ sed -i -e 's:-o \$(BIN):$(LDFLAGS) -o $(BIN):' "${S}"/*/Makefile || die "LDFLAGS sed failed"
+ sed -i -e 's:-o \$@:$(LDFLAGS) -o $@:' "${S}"/moo/Makefile || die "LDFLAGS sed (moo) failed"
+ if ! use fuse; then
+ einfo "Skipping build of umlmount to avoid sys-fs/fuse dependency."
+ sed -i -e 's/\<umlfs\>//' Makefile || die "sed to remove sys-fs/fuse dependency failed"
+ fi
+}
+
+src_compile() {
+ tc-export AR CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS} -DTUNTAP -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -g -Wall" all
+}
diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest
new file mode 100644
index 000000000000..889aec23dfe7
--- /dev/null
+++ b/sys-apps/utempter/Manifest
@@ -0,0 +1,8 @@
+AUX utempter-0.5.5.6-build.patch 310 SHA256 580b9e1eb2a418edf1ac0f58aa5f0819fe6615bd9d2c52220ba22fadf3b66b97 SHA512 3dc62d5e7ce326524bf4373334d474f09fb48b65b6bd1e03fd08f4dcf88a0397194fcb0b04b7a67de5c960607c53b5cf0e456f74133e6d6fc4c208943c45ce22 WHIRLPOOL 93cae601b64630f22371b97bbcdaf4c35f2b5f1505edf7135c4a392635b9794183ee6086bc5b8c8c25c8f44546b3c6e782ec10ca8fe44e1c296c4a7df4b1ef4c
+AUX utempter-0.5.5.6-no_utmpx.patch 768 SHA256 d6e7b51a23c35d30adc75be556fb018ae7113c8c172c0e31946b28a5c265f0e8 SHA512 c6201252c8712578a5668346502f1143fabc717cb5be922a92f2af8787a1e757fa5d70aa447f5a2d6347d49edb6fce2106d21993cc6a0e85c111bd049efa3bf3 WHIRLPOOL 8b006c441f05bce2e525ff965bf5342e2bffe303ff7c70f65fe9bc99c68abb6a389d06eaec4ab91d792a724a3a382af5d2226e61306c966454b0222ca43dc076
+AUX utempter-0.5.5.6-soname-makefile-fix.patch 839 SHA256 ad1db5b94ad40f50da0862331ec08055d8606f1cd918865beedd2f7b4cc3d595 SHA512 a7bf938bd0cd9e486255f43dfa4436bfba63e1d21d14abf611128e41f9e8ce87b412f7ac15ad3c78c2c307e7c8ca45fe6c3ffd41a33bb4ae7f35b93547fff79b WHIRLPOOL 04d3b9b719ad2f61ae9d1aa5b2a82fa1cc6da78adc20cbc4458c5a9fb42b76878ad40ab997a73de998015a14ce88c7a01e685110e4e86d2d9d43834f49a2299d
+DIST utempter-0.5.5-6.src.rpm 21099 SHA256 617c28d579fa54349b8a706e8346c2442f2ef39523db7e0501701a0919651f3c SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 WHIRLPOOL 3ae0a32eae886f2ac14dcf36b4e96e4bb8c25966389c6608a83673149a3045b580b35832e5c69836a18a4f88b55e8c20d254470f84424e30f758a820a87ce13a
+EBUILD utempter-0.5.5.6.ebuild 1239 SHA256 180ff4ff5d68d7025c7ac85b5fd7c09271a299093111f39c7a6f193eb6ef52b9 SHA512 c4f621242f77152536e4137e1f13aa9aaf362ad4f620021a076008102284cce9246300c029e5dd0cfcfaf7624978fb8b3de1a0bd52a484f8f88244d06d07ea39 WHIRLPOOL 3fbb0b4d08702922c35e6959b0dce177319cb3c2a1dd3f1e6176625a13ca063a8d99fa9e9c5285c0d05fd2df2aba0572ebc9a6505c53155a936a169d9ed08deb
+MISC ChangeLog 3230 SHA256 defe865a12420012b9f3600433f69058f2413ed938ded5670a5fe93c1e9e86e8 SHA512 a634a41b2cd5fb80418e356ba49e8d3abf86726179d62607c3fd88da5fbf36ff3f52ca303f694f3b421a29b06e3d882a214b2e3d934f832e83585b2b32c0a45a WHIRLPOOL f501f6e108e6c3c93d1502bbd1b67c91310b6d743a29c5b26174b95ef5c0c30de71ad30a5fbc5ba5870faaee5608c35776a60178a491662f7db3571b0b16f846
+MISC ChangeLog-2015 7091 SHA256 602555eac9ea48a4a4db7f42ac6b9c6119899730acd69e92204a47014cc5faf2 SHA512 1129a089ab5d0b58bdc08cc72a1adf646f14ca9178a3a064713e35525d28a112d263d15e3282f4df75da38c8e85a69226ad5991ea9fe384d9dcc438557d969b2 WHIRLPOOL 314fffdb4804462a5f83adce3806b9d96da8ea8cdd93210a91860a377be81beac26e3d8c74952a7cea96fbbb6c862147115fe58ef6a4058256bb7eab4d4943a9
+MISC metadata.xml 344 SHA256 c1ff5b28d97a3d25b8bdd7bdf1f44d583b364107c662ae469624bfdca7aa8efd SHA512 77307533cb1ddb71561957493f7062330c1748f62ab1381f369c5fb864f0e2a6608cfa5c86005b816c2a9a2523bb9a2264c807f1d6c31a5e2bb6177876b94ed9 WHIRLPOOL 91066d3e43d3147d614f2b55a5af5bc346b05b6264d1bc806c8a927609d0b757c2b287643fa389505fd4c959d161a7a36919c7a038fd4e3617de84b07b67204e
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch
new file mode 100644
index 000000000000..8fbfb111196f
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -37,7 +37,7 @@
+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR)
+
+ $(SHAREDLIB): utmpintf.os
+- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
+
+ utmpintf.o: utmpintf.c utempter.h
+
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch
new file mode 100644
index 000000000000..8644db837f4a
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch
@@ -0,0 +1,38 @@
+--- utempter-0.5.5/utempter.c.mps 2004-12-11 14:54:06.000000000 +0100
++++ utempter-0.5.5/utempter.c 2004-12-11 14:57:46.000000000 +0100
+@@ -11,7 +11,9 @@
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
+ #include <utmp.h>
++#ifndef __UCLIBC__
+ #include <utmpx.h>
++#endif
+ #include <unistd.h>
+
+ static void usage(void) {
+@@ -82,7 +84,11 @@
+ }
+
+ int main(int argc, const char ** argv) {
++#ifndef __UCLIBC__
+ struct utmpx utx;
++#else
++ struct utmp utx;
++#endif
+ int add;
+ const char * device, * host;
+ struct passwd * pw;
+@@ -154,8 +160,13 @@
+
+ gettimeofday(&utx.ut_tv, NULL);
+
++#ifndef __UCLIBC__
+ pututxline(&utx);
+ updwtmpx(_PATH_WTMP, &utx);
++#else
++ pututline(&utx);
++ updwtmp(_PATH_WTMP, &utx);
++#endif
+
+ return 0;
+ }
diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch b/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch
new file mode 100644
index 000000000000..123c77eb357c
--- /dev/null
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch
@@ -0,0 +1,22 @@
+--- Makefile.orig 2005-04-15 08:54:32.000000000 -0400
++++ Makefile 2005-04-15 08:56:17.000000000 -0400
+@@ -5,6 +5,10 @@
+ CVSROOT=$(shell cat CVS/Root)
+ # major number of the .so lib
+ SOMAJOR = 0
++# minor number of the .so lib
++SOMINOR = 5
++# micro number of the .so lib
++SOMICRO = 5
+
+ SHAREDLIB = lib$(NAME).so
+ SONAME = $(SHAREDLIB).$(SOMAJOR)
+@@ -29,6 +33,8 @@
+ install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include
+ install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION)
+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB)
++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR).$(SOMINOR)
++ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR)
+
+ $(SHAREDLIB): utmpintf.os
+ $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc
diff --git a/sys-apps/utempter/metadata.xml b/sys-apps/utempter/metadata.xml
new file mode 100644
index 000000000000..910808b6e1f8
--- /dev/null
+++ b/sys-apps/utempter/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<maintainer type="project">
+ <email>x11@gentoo.org</email>
+ <name>X11</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/utempter/utempter-0.5.5.6.ebuild b/sys-apps/utempter/utempter-0.5.5.6.ebuild
new file mode 100644
index 000000000000..4866160d3cd1
--- /dev/null
+++ b/sys-apps/utempter/utempter-0.5.5.6.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit rpm eutils user
+
+MY_P=${P%.*}-${PV##*.}
+S=${WORKDIR}/${P%.*}
+DESCRIPTION="App that allows non-privileged apps to write utmp (login) info"
+HOMEPAGE="https://www.redhat.com/"
+SRC_URI="mirror://gentoo/${MY_P}.src.rpm"
+
+LICENSE="|| ( MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+RDEPEND="!sys-libs/libutempter
+ !dev-python/utmp"
+
+pkg_setup() {
+ enewgroup utmp 406
+}
+
+src_unpack() {
+ rpm_src_unpack
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-soname-makefile-fix.patch
+ epatch "${FILESDIR}"/${P}-no_utmpx.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" || die
+}
+
+src_install() {
+ emake \
+ RPM_BUILD_ROOT="${D}" \
+ LIBDIR=/usr/$(get_libdir) \
+ install || die
+ dobin utmp || die
+
+ fowners root:utmp /usr/sbin/utempter
+ fperms 2755 /usr/sbin/utempter
+}
+
+pkg_postinst() {
+ if [ -f "${ROOT}"/var/log/wtmp ] ; then
+ chown root:utmp "${ROOT}"/var/log/wtmp
+ chmod 664 "${ROOT}"/var/log/wtmp
+ fi
+ if [ -f "${ROOT}"/var/run/utmp ] ; then
+ chown root:utmp "${ROOT}"/var/run/utmp
+ chmod 664 "${ROOT}"/var/run/utmp
+ fi
+}
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
new file mode 100644
index 000000000000..a0580e93b527
--- /dev/null
+++ b/sys-apps/util-linux/Manifest
@@ -0,0 +1,20 @@
+AUX runuser-l.pamd 188 SHA256 3d825e3e6fe56f0e90fab528867cb476e24857c6cb0fc0a85a28ddaea0aa549b SHA512 86538adbd3d01c4b9e46fee00c38d298d2857fb1224461206425532404c212f03331308b74347c9af2e00583a3b50802085bdc6cb2bd393cf5e9d032e7290301 WHIRLPOOL e7ba3299d6ccecfdf81ada063786822b2590c42c3ea42043659ce933a6734192d8b45452c6f2679f9e06faa2b39deec6ae4713f638c46d5886aebb9fc69df080
+AUX runuser.pamd 278 SHA256 1b6b168edd9b4ec4d787bd0ef627881c035f7d8080a126a367105d0935e3e123 SHA512 a4c4d41078acdc7c7f1d1f1894d20d052d3d5a3c66d5680d7f76665e251c614fd76ca9678a27ea376147f49250c716a1b3b0c0afa9595bd74d26d2190d1680fd WHIRLPOOL 4c2ca705a0faf01eb627e8fe30fa104923be938fb2a56d463edf94a2ebf7d7fbd3a0558ab247515d360bac1b9b6b3967509c0ffeccf5f168aa7964bcae0ab1b2
+AUX util-linux-2.30-pylibmount_segfault.patch 823 SHA256 92aaa379c86dd721d77316f02e6411f40670c036415d29e9a4f4ad1a4f302509 SHA512 999474f53e8986af1c57ae73e21dd2264e70dedb9c91c2d83b584fdc68c6850489082df68353d666cc415dbb301e7238b6ad87ed3e3e7e738994d874ee44c809 WHIRLPOOL 88b41138873dbe2b2817d47991eda4deb57d99750d16d775ded1b55569feebb71f377a9371613ec6f45a23ec1ac479a1bec3901aa31ec730ebb38849a6f7348d
+DIST util-linux-2.28.2.tar.xz 4149700 SHA256 b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd SHA512 ac1c2d4c92bbc4eabed464cb0334c1d9b21e58df0f07f0b26e7adcfa188879de8632d195b65a4358c5e11e14ac6e09a1c6206265bbf1fab4ce122414bee7e940 WHIRLPOOL 1735e33620dba30cc1f42e60b707adb72234006b7fea242ac98c389295617bd0225563bcffa76b9d0753dfa100775dd9a2b73614843645ce667db5536842e308
+DIST util-linux-2.29.2.tar.xz 4277668 SHA256 accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3 SHA512 0a87e6758531f74276f3de7607ef545f324b9b36b444aa5d163140c5fb0f4f7602655d7ec9939f92550dcb320d922cd69521a2183199d463795e67d3c27fce79 WHIRLPOOL 1f45711e593c76c6e208a28892ed2bf2622adb5fa1334867e13c6bf775a8903c2f1ebf18c3238d96fe139c5b60d61abf496251cf594a339209ce044f2bb8c17a
+DIST util-linux-2.30.1.tar.xz 4459284 SHA256 1be4363a91ac428c9e43fc04dc6d2c66a19ec1e36f1105bd4b481540be13b841 SHA512 bcf1807198660c133c380e13d6ba5dcdb7470c47bcaeea03ccc5a78a0d834e3df3d13ae5ffc35fd7f8fff7ba062629d4b1f5cde78452b846c9315c51c9e108f5 WHIRLPOOL 19e78768cf2fd2d73bb7b45cb826101b4653bf49c9838bda10f05e508f06b117bb846ce517726465384bfe94ba24981f261d7b5091458242fb0c14d593d4b29e
+DIST util-linux-2.30.2.tar.xz 4442624 SHA256 7b5be5489e9b5b7177832836467aba1c87bf0e9bcbcb5a6f35d76cd4782589dc SHA512 b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d WHIRLPOOL 771d2af788241db337be1e11be499d42b67ec86fa43da2eb161914194d1f002e95d9080793117a4b58a57691df8677ac59e9356ae2da7076ca48188c185a1843
+DIST util-linux-2.31-rc1.tar.xz 4459892 SHA256 25771b2feb19bed4bf50597c597b2fed4f7580db135fb63a9421ceeeee123436 SHA512 027815da2ee4d342ff1578d5bba71ea63dc1cd6816ad753c644b5422b693e9dfe35ab158101ac9d7f8b7dbee1d2cf97e4930b24ed247eba7be1312e5292c3f9f WHIRLPOOL 6309c11499ee310b754780a31229385ee1fe87f31a84969b490d93d32d294f3a9c096c909abb363f06378e87bea3015bc7150620493989838ae47a4140912b18
+DIST util-linux-2.31-rc2.tar.xz 4472160 SHA256 adf02ca514d20fc31e608f158bf11de27875fb22db9a6702ed60c36dd052b275 SHA512 d5b882dbe566e5ad4cbf3ea328bc777ae643c271c4db4a119f270222ef50d89bdb2244524093df794caf0ec9a6b5f559c618f0e36f2c1e2ce30e24c60e876a97 WHIRLPOOL f790512822ca30c4b1086ed735e234506375eef57721cf9692b460440fb09fc38a9088379a3d74be34d0d46231bd6ef9155aa05ea6338e54f22585418871c36a
+DIST util-linux-2.31_rc2-losetup_types.patch 1472 SHA256 00f04271f725b7d373ffe3db1b591bd8fbaf740fd5641673c47c0e2678720b5f SHA512 353b90e87948fda6aa357470260d6945f0993e89589a1380293b481a839bfe8a4618a55ec92e4c1962e25fe5f74de400cbf2c12371cc0a9298711182d953b51a WHIRLPOOL ff5afe50e51427ab181451c4a823101ceed0d237bcd4c8cc5e30ef365456d3aa1f102d0845e5d84e06f59206edd5ed21f3dabb61d50455f2ca32d8d2d7294342
+EBUILD util-linux-2.28.2.ebuild 5508 SHA256 dcbe429af2023147f49d14efc6079f77b640fd5098a50131bf4773404ac43c53 SHA512 7ce97d8d0325171d047508c3081fa3adadc79837f0821a4c5d63683e52353186328501d09bb0b884f3715ac443757a557c1c205f79c451a93f20c65035fe9516 WHIRLPOOL ce00e83c6e4a432f195d1997823bfb26b995cdf2b6c9b77f5b55b25ab5b1a3c9294e3985274c65b77b44bf1ded47ff7e7ec7b38d8f0dbf8e8811b0bdad741c96
+EBUILD util-linux-2.29.2-r1.ebuild 6022 SHA256 6579bc49e505806dc5eb5511c204cbebcf1a72837544afd10ee0b2d187eb5cd0 SHA512 ede52a77a6cba1f06f6ae18ae64d2f836e6f5babc2d407409878867e7ef46614ffbd6f8267ceffb51d374d1ab87955d5ebfb3e92863078845aea06488dee6fe5 WHIRLPOOL f658c636808f16da62d95eb8805ad32a9b1c891256a9ec15a75ee81e1ed2db0a1a97e354a33571dbd8edcfb044eb828106a955f883015a173aa9d2ea3ebc8c63
+EBUILD util-linux-2.30.1.ebuild 6073 SHA256 1c3a5ed5a02034c10b341cc69d20727399f13db6fde950487d57133b79cc0acc SHA512 f6f247c6119337f79e3ab559de54b35ff8c892633323606e687c957c8b2db540487c9b8b5b37554ae59e29946ad0cdac563cbc2ca7a99cb723c69398aac52366 WHIRLPOOL 86feef252078e51fb3cf1961c513998ae67c709355b19069f86255ec9d27155bc9b93334b5bbca28dfcbf596ba6e3d8e66a161134234ef14a30febc4ff90391b
+EBUILD util-linux-2.30.2.ebuild 6073 SHA256 1c3a5ed5a02034c10b341cc69d20727399f13db6fde950487d57133b79cc0acc SHA512 f6f247c6119337f79e3ab559de54b35ff8c892633323606e687c957c8b2db540487c9b8b5b37554ae59e29946ad0cdac563cbc2ca7a99cb723c69398aac52366 WHIRLPOOL 86feef252078e51fb3cf1961c513998ae67c709355b19069f86255ec9d27155bc9b93334b5bbca28dfcbf596ba6e3d8e66a161134234ef14a30febc4ff90391b
+EBUILD util-linux-2.31_rc1.ebuild 6113 SHA256 75fd7e729162fb71616429f72762f9987e010c52369f676ae66912b8e7f70c25 SHA512 1dc5b46a29f3784843d9731de2723e8c0c6cf1d80bc80ee58c814384c44f8af7fc41e44d18cb6c902cf675170433a578218a071ccad89223160f5c76506cd885 WHIRLPOOL 6a17f9ae8531cc8ff3342113bc553896131d3c925399720e8f61320d2d8b57505d35c1a81003104024407387b10480758c9df5b541beb56c26306965ed310501
+EBUILD util-linux-2.31_rc2.ebuild 6310 SHA256 6d2803635c2f3fb5c7ab44f6b2e938d2b4208ac8cb2402c5c42c62e3a74de7ad SHA512 85b96206e7b76bce5fd83a591697867e8dfdcc44dc61c751ea5151fce74521db3bf865ce52f56e085afa93b3a5f1429d82d7fb2caf257e1c84b3d19f522de9ec WHIRLPOOL 10fb9991cac2aaa7f2d9d56c51b115c62c53016728c8190583bc3794611e915136b94491ef0cc6df1707952cdc677b5b3b9f7e40bbeb724856c89cf6f5748a7a
+EBUILD util-linux-9999.ebuild 6113 SHA256 75fd7e729162fb71616429f72762f9987e010c52369f676ae66912b8e7f70c25 SHA512 1dc5b46a29f3784843d9731de2723e8c0c6cf1d80bc80ee58c814384c44f8af7fc41e44d18cb6c902cf675170433a578218a071ccad89223160f5c76506cd885 WHIRLPOOL 6a17f9ae8531cc8ff3342113bc553896131d3c925399720e8f61320d2d8b57505d35c1a81003104024407387b10480758c9df5b541beb56c26306965ed310501
+MISC ChangeLog 12932 SHA256 d8b36c6a1492c24f0ff0c47ed2ba5a83168ff61b7e608da5d6d2f7b1ded9dca5 SHA512 3af940e4798129722304739796183a7f185e2bb46653e68722ec99caced6b8bc4a985e54511fba0feae333036928fc8daf4a74c081f589acf9ff23f5efd4afa6 WHIRLPOOL 51a5399b50e743a84499d5c0363103beaa140effc16d37eeaaa3f86172037533a737d0124c5c2bdb95177fabdfc79ae110dc42e88e886cd2d103559b0964a2d9
+MISC ChangeLog-2015 79222 SHA256 8f46bfb6fa3cf29ae15a63d9d482a64044196af6ccd6605972d93da5f9c78b37 SHA512 794cfd5f96e6da3247693c3adef7df1ce451c51e790d0b8f43ba221918053130bf39d4a8a3a8ef642ace608d979b604ba2c55ff348490b0dace4e6d9e53119b5 WHIRLPOOL af58c38f736bfe76bf98a72982165d72fb8523a4d5082d601179a1f93fa405e58c15854b899eb8614618bda566d2f682c7221a5c45984fadb4b555dbe7deb30b
+MISC metadata.xml 947 SHA256 07970446e1e05479e7a582190e17aaab8190197b6771c779d89d177a8036b619 SHA512 3822f7f3ccd120bbc788c64db0b79d55ad892bed99d01f8e0988c57ca7277a1936e03dbffd2898e68a2b6da25c301bc2cafb1da9658cdbbdfee1c9fb65e1699c WHIRLPOOL d0d33c91a68b44b8d4207b7acaeb0d180591944cacd5fe8fc918b161f24c107d5c69a17831e620eeab7504364f725a427272ac242041ed9da289f3ed3196ac6f
diff --git a/sys-apps/util-linux/files/runuser-l.pamd b/sys-apps/util-linux/files/runuser-l.pamd
new file mode 100644
index 000000000000..764143558ba1
--- /dev/null
+++ b/sys-apps/util-linux/files/runuser-l.pamd
@@ -0,0 +1,5 @@
+auth include system-local-login
+account include system-local-login
+password include system-local-login
+session optional pam_lastlog.so
+session include system-local-login
diff --git a/sys-apps/util-linux/files/runuser.pamd b/sys-apps/util-linux/files/runuser.pamd
new file mode 100644
index 000000000000..30c2834eac87
--- /dev/null
+++ b/sys-apps/util-linux/files/runuser.pamd
@@ -0,0 +1,8 @@
+auth sufficient pam_rootok.so
+auth required pam_wheel.so use_uid
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
+session required pam_env.so
+session optional pam_xauth.so
diff --git a/sys-apps/util-linux/files/util-linux-2.30-pylibmount_segfault.patch b/sys-apps/util-linux/files/util-linux-2.30-pylibmount_segfault.patch
new file mode 100644
index 000000000000..73fbc9949232
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.30-pylibmount_segfault.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/621176
+
+From 29b721bc9d20ed44858017689ce1745c220bd0d4 Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmedico@gentoo.org>
+Date: Wed, 7 Jun 2017 17:21:33 -0700
+Subject: [PATCH] pylibmount: NULL terminate kwlist in Context_init
+
+Fixes a segfault observed with python3.6.
+---
+ libmount/python/context.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libmount/python/context.c b/libmount/python/context.c
+index 6d82e1432..982414d01 100644
+--- a/libmount/python/context.c
++++ b/libmount/python/context.c
+@@ -90,7 +90,7 @@ static int Context_init(ContextObjext *self, PyObject *args, PyObject *kwds)
+ "source", "target", "fstype",
+ "options", "mflags", "fstype_pattern",
+ "options_pattern", "fs", "fstab",
+- "optsmode"
++ "optsmode", NULL
+ };
+
+ if (!PyArg_ParseTupleAndKeywords(
diff --git a/sys-apps/util-linux/metadata.xml b/sys-apps/util-linux/metadata.xml
new file mode 100644
index 000000000000..9a5be00a83a6
--- /dev/null
+++ b/sys-apps/util-linux/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="caps">build setpriv helper (run programs with diff capabilities)</flag>
+ <flag name="cramfs">build mkfs/fsck helpers for cramfs filesystems</flag>
+ <flag name="fdformat">build fdformat (floppy disk format)</flag>
+ <flag name="kill">build the kill program</flag>
+ <flag name="pam">build runuser helper</flag>
+ <flag name="suid">
+ install mount/umount as setuid so non-root users may mount/umount devices,
+ and wall/write as setgid so non-root users can notify other users
+ </flag>
+ <flag name="tty-helpers">install the mesg/wall/write tools for talking to local users</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:andries_brouwer:util-linux</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/util-linux/util-linux-2.28.2.ebuild b/sys-apps/util-linux/util-linux-2.28.2.ebuild
new file mode 100644
index 000000000000..ff8f436432d5
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.28.2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ $(use_enable kill) \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ $(multilib_native_use_with readline) \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild
new file mode 100644
index 000000000000..3fc8a7465b9d
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+
+ epatch_user
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --docdir='${datarootdir}'/doc/${PF}
+ $(multilib_native_use_enable nls)
+ --enable-agetty
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --enable-bash-completion
+ $(multilib_native_use_enable caps setpriv)
+ --disable-chfn-chsh
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(usex ncurses '' '--without-tinfo')
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ --disable-login
+ $(multilib_native_use_enable tty-helpers mesg)
+ --disable-nologin
+ --enable-partx
+ $(multilib_native_use_with python)
+ --enable-raw
+ $(multilib_native_use_with readline)
+ --enable-rename
+ --disable-reset
+ --enable-schedutils
+ --disable-su
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(use_with selinux)
+ $(multilib_native_use_with slang)
+ $(use_enable static-libs static)
+ $(multilib_native_use_with systemd)
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no")
+ $(multilib_native_use_with udev)
+ $(tc-has-tls || echo --disable-tls)
+ )
+ ECONF_SOURCE=${S} \
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.30.1.ebuild b/sys-apps/util-linux/util-linux-2.30.1.ebuild
new file mode 100644
index 000000000000..c8d83a120f7f
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.30.1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-nologin
+ --disable-reset
+ --disable-su
+ --docdir='${datarootdir}'/doc/${PF}
+ --enable-agetty
+ --enable-bash-completion
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --enable-line
+ --enable-partx
+ --enable-raw
+ --enable-rename
+ --enable-schedutils
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(multilib_native_use_enable caps setpriv)
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_use_enable nls)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_enable tty-helpers mesg)
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_with python)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ $(use_enable static-libs static)
+ $(use_with selinux)
+ $(usex ncurses '' '--without-tinfo')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.30.2.ebuild b/sys-apps/util-linux/util-linux-2.30.2.ebuild
new file mode 100644
index 000000000000..c8d83a120f7f
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.30.2.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-nologin
+ --disable-reset
+ --disable-su
+ --docdir='${datarootdir}'/doc/${PF}
+ --enable-agetty
+ --enable-bash-completion
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --enable-line
+ --enable-partx
+ --enable-raw
+ --enable-rename
+ --enable-schedutils
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(multilib_native_use_enable caps setpriv)
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_use_enable nls)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_enable tty-helpers mesg)
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_with python)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ $(use_enable static-libs static)
+ $(use_with selinux)
+ $(usex ncurses '' '--without-tinfo')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.31_rc1.ebuild b/sys-apps/util-linux/util-linux-2.31_rc1.ebuild
new file mode 100644
index 000000000000..b23afd5b6532
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.31_rc1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !net-wireless/rfkill
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-nologin
+ --disable-reset
+ --disable-su
+ --docdir='${datarootdir}'/doc/${PF}
+ --enable-agetty
+ --enable-bash-completion
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --enable-line
+ --enable-partx
+ --enable-raw
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(multilib_native_use_enable caps setpriv)
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_use_enable nls)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_enable tty-helpers mesg)
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_with python)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ $(use_enable static-libs static)
+ $(use_with selinux)
+ $(usex ncurses '' '--without-tinfo')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.31_rc2.ebuild b/sys-apps/util-linux/util-linux-2.31_rc2.ebuild
new file mode 100644
index 000000000000..493ecb1a0edf
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.31_rc2.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+
+ SRC_URI+=" https://github.com/karelzak/util-linux/commit/c4e60bc0807b04ab104594abc83301481d5d5995.patch -> ${PN}-2.31_rc2-losetup_types.patch"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !net-wireless/rfkill
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${DISTDIR}/${P}-losetup_types.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-nologin
+ --disable-reset
+ --disable-su
+ --docdir='${datarootdir}'/doc/${PF}
+ --enable-agetty
+ --enable-bash-completion
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --enable-line
+ --enable-partx
+ --enable-raw
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(multilib_native_use_enable caps setpriv)
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_use_enable nls)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_enable tty-helpers mesg)
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_with python)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ $(use_enable static-libs static)
+ $(use_with selinux)
+ $(usex ncurses '' '--without-tinfo')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
new file mode 100644
index 000000000000..b23afd5b6532
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-single-r1 multilib-minimal systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !net-wireless/rfkill
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-nologin
+ --disable-reset
+ --disable-su
+ --docdir='${datarootdir}'/doc/${PF}
+ --enable-agetty
+ --enable-bash-completion
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --enable-line
+ --enable-partx
+ --enable-raw
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(multilib_native_use_enable caps setpriv)
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_use_enable nls)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_enable tty-helpers mesg)
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_with python)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ $(use_enable static-libs static)
+ $(use_with selinux)
+ $(usex ncurses '' '--without-tinfo')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/vbetool/Manifest b/sys-apps/vbetool/Manifest
new file mode 100644
index 000000000000..80c93616c88f
--- /dev/null
+++ b/sys-apps/vbetool/Manifest
@@ -0,0 +1,6 @@
+AUX vbetool-1.0-build.patch 537 SHA256 48583507d03f140a185573b249abe1eefbd085e70c67f8ceb10327badb86deee SHA512 1b9b1b7471f09ec6dac8f535df1ea6bf09f8824f58c025b92e3e5d3e451a56e750e93836d03ee37e20f14868a9b75e97c548add36256412dfc154530c7a4be12 WHIRLPOOL de212f73ace796cb11f3eef2de25b70c74e7826ce101244159fec87b4bba321db2665d74240c79b8f1c8f5432f937ac547aa4dc687bf61e015e8dc369a28d47b
+DIST vbetool-1.1.tar.gz 182826 SHA256 4d26ddc43144593742349e69481e3536ce3482faaa9ad4494fdc7c8b7662f954 SHA512 09d8713516f074fe8e901ab3e24aba7e8b9ddf459b3ee3394b7604e4489a70a27c6dc3604cf1284c49233dba908f00da746c583562af2bc93b6df8ff413efd96 WHIRLPOOL 9b6d6b616c0b074e49c80291e48e2c951e83a2981780cf942ca535f2909e7e83a0d7cf1f9efdc6cea779a5db688635bb7a3740c3bd77a80a268776dea9b1d147
+EBUILD vbetool-1.1.ebuild 666 SHA256 fa39e9f9aa2ba62b28719d212797198298be865dcd05828fda2d660fb3516710 SHA512 95469f6822c95e15d225c263f7ded56eebb186509f89b27bd01a57990f4f621bb5eef5c97be4e8f0b7c1fec13b7cf9547ecd146ed8368f21b4a8af648ed1a2f5 WHIRLPOOL 8ec733369199dc6695a622be7d60c170ce7f42885df5f711e08cdef8b1ee880ff25b5ff08b6459ca663fd9ccd68c7df3b8ae0df0ccdc6fc9bb2919dee3553ea1
+MISC ChangeLog 2455 SHA256 5145d2bf445a0c62b73adb4c540376c8ececccb45a16ab19de9a17c0400d48bd SHA512 683da704609214e7779f2eec2ffb0527efff9c3b04c0d0cca09a121e0e9a6246a3c29d6f17b478d244fa61e418935d3809714f1a944ca9735171e26fc663ebb4 WHIRLPOOL 23d9460d772fca0ce18e6fd30e416737aaed210b895ab1f6e055767b18d9eb102d1373490968fea27e487360f41678489f1d62ed36c9d79e3f45e3231cd33e23
+MISC ChangeLog-2015 3520 SHA256 d39c08aaf1650d30deeaf924fddfe214f40e5ca0aa24f39f0617c04406067665 SHA512 8f1b3a684d0835677fab412f6099b32f928498072fdf2d397ddddc52d96ce88111c21b96af4e8e41d36ca639f16c8225d55c4012beccc44f8be6fc3f66f001e2 WHIRLPOOL ea11bb3f9ba50e150d9674f87f774e5c17aefe213dc1d69bcf3178ff265bf645420193ebb4c28d7abded9f6f6e57cb773e43935dd79954c467d033d1acfd2828
+MISC metadata.xml 309 SHA256 32e8cac3c6e0c3492c329fd33ab9ccec4ac49953a8791500a6c71805ab588404 SHA512 9068ab08a41974b1d807c0beb90e289c9fe22e70299c164d65d0a3e051a46964b91d77b5045df9f0dfdc7f23e1ee6d918819456f27b878890e343c86280b422c WHIRLPOOL 6dc68013efabd8fcb45a8d0f629245b91d53d76d8605fc537cd4305eb3fd06b875c47c863754cef17188c3dc949a78a7d1c0a6594c22bf3ccdb0de7b310290dd
diff --git a/sys-apps/vbetool/files/vbetool-1.0-build.patch b/sys-apps/vbetool/files/vbetool-1.0-build.patch
new file mode 100644
index 000000000000..69d2f7b341ba
--- /dev/null
+++ b/sys-apps/vbetool/files/vbetool-1.0-build.patch
@@ -0,0 +1,18 @@
+Index: vbetool-1.0/Makefile.am
+===================================================================
+--- vbetool-1.0.orig/Makefile.am
++++ vbetool-1.0/Makefile.am
+@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign
+
+ sbin_PROGRAMS = vbetool
+
+-vbetool_LDADD = $(libdir)/libpci.a
++vbetool_LDADD = -lpci -lz -lx86
+
+ man_MANS = vbetool.1
+ vbetool_SOURCES = vbetool.c $(x86)
+@@ -14,4 +14,3 @@ maintainer-clean-local:
+ $(RM) Makefile.in aclocal.m4 config.h.in stamp-h.in configure
+
+ AM_CFLAGS = -g -Wall -pedantic -std=gnu99
+-AM_LDFLAGS = -lz -lx86
diff --git a/sys-apps/vbetool/metadata.xml b/sys-apps/vbetool/metadata.xml
new file mode 100644
index 000000000000..a6ab4e944256
--- /dev/null
+++ b/sys-apps/vbetool/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>x11@gentoo.org</email>
+ <name>X11</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/vbetool/vbetool-1.1.ebuild b/sys-apps/vbetool/vbetool-1.1.ebuild
new file mode 100644
index 000000000000..0640554581a9
--- /dev/null
+++ b/sys-apps/vbetool/vbetool-1.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils autotools
+
+DESCRIPTION="Run real-mode video BIOS code to alter hardware state (i.e. reinitialize video card)"
+HOMEPAGE="http://www.codon.org.uk/~mjg59/vbetool/"
+SRC_URI="http://www.codon.org.uk/~mjg59/vbetool/download/vbetool-1.1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="sys-libs/zlib
+ sys-apps/pciutils
+ >=dev-libs/libx86-1.1-r1"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-build.patch
+ eaclocal # temp fix for #439614
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-x86emu
+}
diff --git a/sys-apps/watchdog/Manifest b/sys-apps/watchdog/Manifest
new file mode 100644
index 000000000000..bde7b1642005
--- /dev/null
+++ b/sys-apps/watchdog/Manifest
@@ -0,0 +1,13 @@
+AUX watchdog-5.15-musl-nfs.patch 736 SHA256 6320c916cdfc8431076b7ca79731b673c6e64dffff3d419389c2696916b560a0 SHA512 86c686f35c3934e652653620c84355ed35284bc1bd32fe493c766f4d7fdd4a3eeb77095b66c9cf229de642d1a1c168e6d27f527ebe58a926fe4c8f1d84421343 WHIRLPOOL cbdea1bbf7226495f8339f6d3307c37436e817832f67d6ef2c8c02758d3a77bc1072959260e8206d78d28bf24eb8ce1c64800c876d1802c6cd032790a438e38d
+AUX watchdog-5.15-musl.patch 669 SHA256 101294b15471ca290cd6ae6d02f94f9c628203fc3b6004c0f069aaca7528ebae SHA512 9286e22b34116fa832fec682f72b3989a1022e3d5618b80390d869ce4ce75ed2ccaeb4d61a17bc421968c8edb13acc6e032b139996838fd8593eceb0aa469220 WHIRLPOOL b3f06692f05a67853d9c9ab64a71f6b9d1f3778d3b68e09dfcb7d930a92068608b5544b7070f1cd72c48b9bbf57853e907f28826380b701ea3b39db0ada2180c
+AUX watchdog-conf.d 158 SHA256 8d7a149a0e92cc4b68f7db486464ebabda0ea983c0ac78869f2f942a4b16e92a SHA512 73178a2159a8f9420db1e5a6f2b3fea01315074f3e109acd5d02140e610db81aa771a2ab96b5ca1cf1cc1639679d26c0b42e511b1ab08a89957a8f4dd66f1c62 WHIRLPOOL 9f388a6ed9452899b2f5d5b1190edf1a46ceea9ad2e1b41c2251d6511649f7169920e931c7af3f830ca8427e9513ee2bbf1207381f6660a178ca2c0f64bf1cad
+AUX watchdog-init.d 861 SHA256 23d052547a3a3761b923a5cb135baf616cf59dd081f473cd31573c410f98191e SHA512 f1a84e90dd6f169a6e28f38b9f362e43256bba0b4266fead707578705a8f404d9f256022d94d24f1555847765a27e5a7017b5e1fa20a613fdb0a41d305638231 WHIRLPOOL b98776012f9bff06357598c5e6c547f2dedcc41e97f162b63c8877296fcd24df9f7ccceaae3a205198126500d9e463de97207f0f9b8429639d17637c8b25f0f0
+AUX watchdog-init.d-r1 773 SHA256 a82e9cfec062ab595c83e97ab8c7ccec0576aeb062786733889c079e0427acab SHA512 c07f0e3f026a86ecbcaa839c5711420fe00433a9ce84c3a7e3f4de4a1d90bc5ad6646561acaa1d1df2d1adb638dd6817497c4c538574ac894deb6c7451b2964a WHIRLPOOL 3e0e885754dfb179a6807d9d17c7db0e3296fd216351d81043b1ef702a62b5d0f269fe391237fdbc41375b593fc9ce3a97090ec059db1c2701e59e09113d2e0b
+AUX watchdog.service 146 SHA256 91b021d969dcdf9d87f24c01f88da4dccae5a6697306231e04fe474b8fbe4500 SHA512 5eb489e72351db8a881d84fc15730a91ca2a108641031196ad5374aec5e01fa5b859872fa27c3382b4637482a5c8dab7efa61057f4663ae6c49c4ed01e9d8abd WHIRLPOOL ffd1c299b12059407f376f646998708a78aa480cac83f384bd81017d6eada423e7cf4a0689ef2c626eec7bd950e2f4dbd4bcbea4c24e9357a3cf5d050808e000
+DIST watchdog-5.14.tar.gz 216384 SHA256 620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1 SHA512 ccfaca7a68a47cff42dbeae047dfa691e1cfc23851f9ca0634ea6315ff55a13cdbb0020bde7df38b702c82c0535ad41f520617dd639037e171701a6b0f8991aa WHIRLPOOL 5520e0a4970a20c25780d507260380acf2056828bad8702de98039876526c39a40f884eb1b684cf39386479e6d40c08f3134b138cc6caf51b4150289a364239c
+DIST watchdog-5.15.tar.gz 228132 SHA256 ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c SHA512 a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75 WHIRLPOOL ebd7ee604ddbad856760949b16615693b1665289d57312f7dee10cea1d358dbd20f2beb2656e549a80c81ad08e5e6de8621cda3ad4eb696e9af7b63b8b4045b9
+EBUILD watchdog-5.14.ebuild 869 SHA256 430adbaaca9917d8ffe45bd554b217ca5ec075ef496f3b51f1240efe9449db3c SHA512 7223acbd16f44a78cab8af57d283453f1e72fe49bab38100a2f3dfdfcdc9cc02caf3c07f75b77b06bdae6d14cd7c31069709d1f4374dcb852fa059cd4e57089a WHIRLPOOL c3afdedd4a2e202d0b5e686f8d6a70e2cec9ae449d3d2cc259fe85fe4d32cb41708665f9c25e8a80c02e9d46a163bf9e729847d76ec32d5623f3795b9777ff70
+EBUILD watchdog-5.15.ebuild 989 SHA256 7e0c4a7adb845a41c529f8b500c5d6c19ebd1ce02b93321476412847fc89d680 SHA512 6172c8dcbb3f7b5b60d2ad8eb3bd781b266aeb4f0326ece639b4b802096519287ca49dd64192ed3727ee6b9714533ad006634e93644fe10cd3619cba5146eead WHIRLPOOL d51cfbebfbbfa484f9d2294b8af0a498c22db604005914ae5c92f19929eef441c6b010d33cb2f2004cd34ba1a8ba9ddb9cb02fc18135679c57dc358652ffc936
+MISC ChangeLog 3880 SHA256 915c9c460b0bfc5c1670fdb65f4717d8dbc32b8b7a8972adaa470f193d6cd440 SHA512 2cb2cd163bf174932fc1dfe46a7be022aab6181ff86d652f1004b1dd0bc71e8d71d8bac33ff59b7bc8d11fdd141277a87b3eeb8c82fce54265d8a7383f56f352 WHIRLPOOL f6e9d1616d1aefc4749696b5925721d4c81dba5f3fce323124e0734a296ba9aab9e279382b9ac1cb2f9048419cabb281f798fd14e7871c5f1dc193a4564cf601
+MISC ChangeLog-2015 9452 SHA256 501a797fde1443b1d6f6ce7c4d06b90d06fb62885eb5227936a5e1dbf390d60b SHA512 e7ca9fe3f0fe4260a0d8ce9de02c4623302a96d784413a6267acd7e35b0c243690818769fdfe0715a1c3f2b310db04afed4a3fcc615ad1d703fb6b73cb4cc0d5 WHIRLPOOL 47467f72fe4634602da7ea87eb3b7cd2ca852ea20b1c205e9e8b08262aed934ae9ad1ab8325f47e147283195171441c96660470e5d330dd16bbb180326c1c3aa
+MISC metadata.xml 405 SHA256 df8b3f543f03f2448f223bdc8555d159448a5f111f21ee74db2ae213e3ad275e SHA512 36da0e0199b41608190b0e39de2b82bea5516890208c57744b93e527904501de01b1bfd4e20fc74450bd7b9ac4d152e0d57e31a35deca0b1edddc9ce60846d0b WHIRLPOOL 88b9d34283d0ebe4d570cc6062e375998f5687b1f33ac1e93476b7c9e27763670a671a1a7488b2a9b04f2ba23722ddae446064436bcdeb9d1c2f5501d992e0b6
diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
new file mode 100644
index 000000000000..bee4ddc8d7bc
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
@@ -0,0 +1,27 @@
+commit f52c40680f0aad44b9ae16648803453ec00cbb2c
+Author: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Fri Dec 30 15:55:45 2016 +0000
+
+ Compile with musl when nfs is disabled
+
+ musl does by default not ship with rpc headers. The watchdog should
+ not require rpc headers when nfs support is disabled.
+
+ Patch by Felix Janda <fjanda@users.sf.net>
+
+diff --git a/include/sundries.h b/include/sundries.h
+index 4379982..98c489a 100644
+--- a/include/sundries.h
++++ b/include/sundries.h
+@@ -9,9 +9,11 @@
+ #include <signal.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
++#if HAVE_NFS
+ #if !defined(bool_t) && !defined(__GLIBC__)
+ #include <rpc/types.h>
+ #endif
++#endif
+
+ extern int mount_mount_quiet;
+ extern int mount_verbose;
diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl.patch b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
new file mode 100644
index 000000000000..ae62c8014e5b
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
@@ -0,0 +1,23 @@
+commit c5cb4e1a0339844ae3f55ff1dc4a716c28012f05
+Author: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Tue Jun 28 18:08:48 2016 +0100
+
+ Include linux/param.h for EXEC_PAGESIZE definition
+
+ Musl does not include linux/param.h whereas glibc does, so it fails
+ to build on musl. Patch supplied by Khem Raj <raj.khem@gmail.com>
+
+diff --git a/src/watchdog.c b/src/watchdog.c
+index acf6450..486384a 100644
+--- a/src/watchdog.c
++++ b/src/watchdog.c
+@@ -26,6 +26,9 @@
+ #include <sys/param.h> /* For EXEC_PAGESIZE */
+ #include <linux/oom.h>
+ #include <linux/watchdog.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ #include <string.h>
+
+ #include <libgen.h>
diff --git a/sys-apps/watchdog/files/watchdog-conf.d b/sys-apps/watchdog/files/watchdog-conf.d
new file mode 100644
index 000000000000..39c0f808eff0
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-conf.d
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# for more info, see watchdog(8)
+WATCHDOG_OPTS=""
diff --git a/sys-apps/watchdog/files/watchdog-init.d b/sys-apps/watchdog/files/watchdog-init.d
new file mode 100644
index 000000000000..734a02cdbcbe
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+start() {
+ ebegin "Starting watchdog"
+ start-stop-daemon --start \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ -- ${WATCHDOG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog-init.d-r1 b/sys-apps/watchdog/files/watchdog-init.d-r1
new file mode 100644
index 000000000000..363c8be9bd24
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d-r1
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/watchdog.pid"
+command="/usr/sbin/watchdog"
+command_args="${WATCHDOG_OPTS}"
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec ${command} --pidfile ${pidfile} \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog.service b/sys-apps/watchdog/files/watchdog.service
new file mode 100644
index 000000000000..9ec1076e6689
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=watchdog daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/watchdog/metadata.xml b/sys-apps/watchdog/metadata.xml
new file mode 100644
index 000000000000..36ad6a68bd69
--- /dev/null
+++ b/sys-apps/watchdog/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="nfs">enable support for checking nfs mounts</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">watchdog</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/watchdog/watchdog-5.14.ebuild b/sys-apps/watchdog/watchdog-5.14.ebuild
new file mode 100644
index 000000000000..f22eacd43f2a
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.14.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm m68k ~mips ppc s390 sh ~sparc x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}
diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild
new file mode 100644
index 000000000000..887cff300800
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.15.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${P}-musl-nfs.patch
+)
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d-r1 ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}
diff --git a/sys-apps/which/Manifest b/sys-apps/which/Manifest
new file mode 100644
index 000000000000..8138ac4a458e
--- /dev/null
+++ b/sys-apps/which/Manifest
@@ -0,0 +1,5 @@
+DIST which-2.21.tar.gz 149305 SHA256 f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad SHA512 d2f04a5c5291f2d7d1226982da7cf999d36cfe24d3f7bda145508efcfb359511251d3c68b860c0ddcedd66b15a0587b648a35ab6d1f173707565305c506dfc61 WHIRLPOOL e1712d2f2b48467300f5947d0a72c0cf759bc33001661ba41cd57cefe21cb9974cc318748d76ff73c71fb869c4d7a445973ad95777ab380f673c85095360fd57
+EBUILD which-2.21.ebuild 694 SHA256 82cd3bbc03d99cdf606c7f1860939df198a8202b48e48f4af3a204f79a580108 SHA512 0ab7b75309345083377b4e13ff91a3896479e19d22fc26cfc49dc90b6697851404c6dc2720b0e39f91e69c569ffd484491ba8c930e3025e246a113491ebacb46 WHIRLPOOL 7bb4e08da8c6680338a9677f633bc12e6897405ee1d1a2fcff5b119b9236fe9343c555f0c0fdfe315fb03f461ee58dee1462d6bcdbdb66d9db6bfaa29cddcafe
+MISC ChangeLog 4076 SHA256 f5aba6e504286afe38d565a091cb3253bf404949b489ac16fc7262406538c4ba SHA512 daa138b86bbd7760a516dca94e77052f31b222b3300db098904f94408b62d1410749db408df0ee08815ddcd44c27031304f94b8b204a7be7ff86e92132abb7f8 WHIRLPOOL 6d341b5b3712fd819fbda8c6e68d554b0e38dae0fcd4d6467aacd2002517289d3b15cdd886208785418503625c94528a0a90a97acb436813b3a61cc4587d2c50
+MISC ChangeLog-2015 6083 SHA256 35b22ff565712767e514c94500a653f01263f27054ce4e26760c7b3a0c6389cb SHA512 94f51ab2182652d46bf6280966ae9a663ba990fdb9506a379d29146ce6cc9d68c6c173ce8599352abaa6baa041ea9af5b4557c2ff988542d90281753bd93ea14 WHIRLPOOL 7c0c7f7a840df07298d88175cea8b90da04e92b403201dde48969d393a9e30ac417d2daf485f0286879f14ea0e00e24041d4bc3f61d254dee285f1cdd7e694ca
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/which/metadata.xml b/sys-apps/which/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/which/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/which/which-2.21.ebuild b/sys-apps/which/which-2.21.ebuild
new file mode 100644
index 000000000000..8afa8dab5298
--- /dev/null
+++ b/sys-apps/which/which-2.21.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Prints out location of specified executables that are in your path"
+HOMEPAGE="https://carlowood.github.io/which/"
+SRC_URI="https://carlowood.github.io/which/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ append-lfs-flags
+}
+
+src_configure() {
+ tc-export AR
+ default
+}
diff --git a/sys-apps/x86info/Manifest b/sys-apps/x86info/Manifest
new file mode 100644
index 000000000000..2e181f9bf487
--- /dev/null
+++ b/sys-apps/x86info/Manifest
@@ -0,0 +1,9 @@
+AUX 1.21-pic.patch 717 SHA256 af3dfe679472819d482df5b2c80dc8133b944787dbb13841fe22d30c1f668948 SHA512 bbb1cceaba649a23629b25f7cd6c18248ec3ed9d9072071aaf69ab7e50362b9698d734ad4a2d473d989d3a2cc75a01e8cb96ca7b764725c9d2c424adff406faf WHIRLPOOL 91f32c82caa5a0dc4607c014a320968ceecd8df31c39410283e82d8e4f0feb01f87d6f80fc3bc122ad3e056f25adad5798323f66a1218c7133d9422e9e491182
+AUX x86info-1.24-pic.patch 573 SHA256 7aeb0233c7a53b07fecbf84a848520cfdcf36a7fde6a8d00bf5684a58cba27af SHA512 9844411268f15a94fdd202c5f6f74deff22b6bd7a5a4f2e12aca8f86dae4d642055d7abc01dca4467b20000df9d1966cfa3055bdc4c6fad790b7894aebba0a76 WHIRLPOOL 482960efa8735448c04bf5e2f7bef546670262304a36f4c6cbef02932c8d53ccddd318703519e26426d33df424566f135a3ea4cc51593dbfb871a2751e1c5b5c
+AUX x86info-1.29-parallel-make-cleanup.patch 486 SHA256 292421927f7c53867872bf51dd309ba9a5eb7ba67d20375f7be94c47015fa9c8 SHA512 ff0ab367a0ed4b14dd0e705463ad63e8a6c4ee026bcfe4509413d8147397332aeac1c41a44684cc09eefe1d09842cf0ab1c27a7c9ea4c7fa8de5b7f04561792b WHIRLPOOL d242a62a978501f69beb4901e5661f1db08cfdbe9a779a3aa526d61ff3fd9d30a7221b0aa6b3fef599f5d790092101d99e8d9a94a0d57f35bd3f9987f9037751
+AUX x86info-modules.conf-rc 204 SHA256 868b0eb6949763f04a7e68d8c922e65aa2acbe5ece91cfef8d9d76675552336b SHA512 54557bb1ee77749b7207ac886a31278ae003b52f5c4e76709c3a367e59ab0086872e8b39d30f018ad9d8b07d037a54b4817815880b5c9ebde106cad73421af6b WHIRLPOOL 5f7545f25076c5851a13a09198e3fd8425143804f0b35ac239eeddd776eba8705994752225ac3c368715f6eb4b5f94da779d5100107b266a243627b41826efdc
+DIST x86info-1.30.tgz 95727 SHA256 fe3009850e93a9c5fa38ed6bf74d72686043329fead8f1b2be4b5943d4fc9428 SHA512 0b4c9f1be83a737aa26ec14d239d09465608fcf542766ef5b8634d2fe08f75857c0d2bd1969d971ab4b0d55cd3aa3e4e5f58b3b2865865aa68fd751377672e5f WHIRLPOOL 112b91421b8ff3ce8c01f7f22c5b26cad09a9d222fe4259b6644d8f28887a909f94947f1cd94325ae3acab7d440338bbea5693d2ed014f7464c8279a6079a336
+EBUILD x86info-1.30.ebuild 1688 SHA256 7bdad58ca4a29de9ccddfeec40d2d0696351e09dc9ca9b8a5d4e816f5faca920 SHA512 e0d8ff51be23dc2ad706192ebf677aa41a559a2703fc273b1b4b13c6d93fb619c03ae7ad5522bdaf3fbbfea8e3a346693a8d889167625df52f532e5ea2cd3654 WHIRLPOOL 76c4fd84c59d7fb4884ae591e1b71e9f25a61bcb86f0ad741777ed2e0428d74839762b49619a0bc245a946a751f571dc0254b98255cafa4f6016e87a975b93d3
+MISC ChangeLog 3063 SHA256 1590201fe8b9e7dda189694dff31b81338e67decece0ecffc267600819064796 SHA512 45fa54ed4d2c5047b5bedf2066b40d45be1cef88cabed90b61626fd24527b053c676b86949f0b812fcf8d99e1dbb0280df7c255a663dc60ad785695c8014eacf WHIRLPOOL ad1b6122617ef53ad564ed48a5a4477fac0feaf1aa978cf58f23af55bc30e752325d62f02a3316ecf971c9d6b06e431565b8672fbec74ce67bde005627bfeee1
+MISC ChangeLog-2015 5257 SHA256 454bbe8bc26a5d6238302542f3026290ee661e6ab3ef78a4b822235ceab4d5f6 SHA512 506773a2507596a863aa064b9fcc0004ce791d60229279b3c22334edb6485efe658de1e20175d46a49c3378408ef3649febebaf5dae4c8caa0c7dbf3e1406603 WHIRLPOOL 8c4d7629bd6740571250f524d8ec3fdbb7e7331f3f314d865264eaf7ff46ed1613c99890291f6f16a2b6e27b6b9556ed657ad4deb3b1ded21655eb7f4eb75a86
+MISC metadata.xml 329 SHA256 4ce73c4d5d41f458fc9039b8da317ba512dcc468f39b9db038e5d6416707179f SHA512 3baca06564c2219ea6175ea39cea467ada4e7bf21a4341fcdc9d5b885ae387f4ca4f93605464b900a2524d64badfae641c5459d0acd0569de1ce848528a46ee4 WHIRLPOOL 19cd1cebebe165ee3cde545b131693f98c677790b8cc07404639880f9c4c83576e5db8080af03f7e7409d0aa4b03b4053de460e6d30ae3ebbc8e645d984e1b56
diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch
new file mode 100644
index 000000000000..ddf24b293e14
--- /dev/null
+++ b/sys-apps/x86info/files/1.21-pic.patch
@@ -0,0 +1,15 @@
+diff -Nuar x86info-1.21.orig/bench/benchmarks.c x86info-1.21/bench/benchmarks.c
+--- x86info-1.21.orig/bench/benchmarks.c 2007-11-26 17:53:58.278467889 -0800
++++ x86info-1.21/bench/benchmarks.c 2007-11-26 17:54:32.014318066 -0800
+@@ -19,7 +19,10 @@
+ #ifdef __linux__
+ TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80");
+ #endif
+- TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid");
++ TIME(asm volatile("movl %%ebx,%%edi\n"
++ "cpuid\n"
++ "movl %%edi,%%ebx\n"
++ : : :"%eax", "%edx", "%ecx", "%edi"), "cpuid");
+
+ TIME(asm volatile("addl $1,0(%esp)"), "addl");
+ TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add");
diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch
new file mode 100644
index 000000000000..5cbd3a586f8e
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-1.24-pic.patch
@@ -0,0 +1,33 @@
+http://bugs.gentoo.org/270388
+
+--- cpuid.c
++++ cpuid.c
+@@ -62,12 +62,28 @@
+ sched_setaffinity(getpid(), sizeof(set), &set);
+ }
+
++#ifdef __PIC__
++ /* GCC on i386 bitches if you clobber ebx. So hide it behind
++ * gcc's back. */
++ asm(
++ "movl %%ebx,%%edi\n"
++ "cpuid\n"
++ "movl %%ebx,%1\n"
++ "movl %%edi,%%ebx\n"
++ : "=a" (a),
++ "=m" (b),
++ "+c" (c),
++ "=d" (d)
++ : "0" ((unsigned int)idx)
++ : "edi");
++#else
+ asm("cpuid"
+ : "=a" (a),
+ "=b" (b),
+ "+c" (c),
+ "=d" (d)
+ : "0" ((unsigned int)idx));
++#endif
+
+ if (eax!=NULL)
+ *eax = a;
diff --git a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch
new file mode 100644
index 000000000000..54208cab0843
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch
@@ -0,0 +1,13 @@
+diff -Nuar x86info-1.29.orig/Makefile x86info-1.29/Makefile
+--- x86info-1.29.orig/Makefile 2011-04-05 22:54:04.000000000 +0000
++++ x86info-1.29/Makefile 2011-05-15 18:19:42.204228978 +0000
+@@ -12,7 +12,8 @@
+ LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h
+
+ %.h: %.regs scripts/createheader.py
+- python scripts/createheader.py $< `basename $< .regs` >$@
++ python scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \
++ mv $@.tmp $@
+
+ LSMSR_SRC = \
+ lsmsr.c \
diff --git a/sys-apps/x86info/files/x86info-modules.conf-rc b/sys-apps/x86info/files/x86info-modules.conf-rc
new file mode 100644
index 000000000000..6a0e6b4fccd4
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-modules.conf-rc
@@ -0,0 +1,8 @@
+#
+# Aliases needed for x86info to probe data
+# these are so the modules auto-load as needed
+#
+alias char-major-202 msr
+alias char-major-203 cpuid
+alias /dev/cpu/*/msr msr
+alias /dev/cpu/*/cpuid cpuid
diff --git a/sys-apps/x86info/metadata.xml b/sys-apps/x86info/metadata.xml
new file mode 100644
index 000000000000..9590fe15fc00
--- /dev/null
+++ b/sys-apps/x86info/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 type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/x86info/x86info-1.30.ebuild b/sys-apps/x86info/x86info-1.30.ebuild
new file mode 100644
index 000000000000..7ef0bfa3f20b
--- /dev/null
+++ b/sys-apps/x86info/x86info-1.30.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils flag-o-matic linux-info toolchain-funcs
+
+DESCRIPTION="Dave Jones' handy, informative x86 CPU diagnostic utility"
+HOMEPAGE="http://www.codemonkey.org.uk/projects/x86info/"
+SRC_URI="http://www.codemonkey.org.uk/projects/x86info/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+RDEPEND="sys-apps/pciutils"
+DEPEND="${RDEPEND}"
+
+CONFIG_CHECK="~MTRR ~X86_CPUID"
+
+src_prepare() {
+ epatch "${FILESDIR}"/1.21-pic.patch
+ epatch "${FILESDIR}"/${PN}-1.24-pic.patch #270388
+ epatch "${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch
+}
+
+src_compile() {
+ # These flags taken from the 1.29 ebuild
+ append-flags -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls
+ append-ldflags -Wl,-z,relro,-z,now
+ emake x86info lsmsr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die "emake failed"
+}
+
+src_install() {
+ dobin x86info lsmsr || die
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/x86info-modules.conf-rc x86info.conf
+
+ dodoc TODO README
+ doman x86info.1 lsmsr.8
+ insinto /usr/share/doc/${PF}
+ doins -r results
+ prepalldocs
+}
+
+pkg_preinst() {
+ if [ -a "${ROOT}"/etc/modules.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info ] ; then
+ elog "Moving x86info from /etc/modules.d/ to /etc/modprobe.d/"
+ mv "${ROOT}"/etc/{modules,modprobe}.d/x86info
+ fi
+ if [ -a "${ROOT}"/etc/modprobe.d/x86info ] && [ ! -a "${ROOT}"/etc/modprobe.d/x86info.conf ] ; then
+ elog "Adding .conf suffix to x86info in /etc/modprobe.d/"
+ mv "${ROOT}"/etc/modprobe.d/x86info{,.conf}
+ fi
+}
diff --git a/sys-apps/xinetd/Manifest b/sys-apps/xinetd/Manifest
new file mode 100644
index 000000000000..5a973bde982e
--- /dev/null
+++ b/sys-apps/xinetd/Manifest
@@ -0,0 +1,14 @@
+AUX xinetd-2.3.14-DESTDIR.patch 1725 SHA256 928e078070c2b662cd53808c16c5217a9f7f46e31132254bbf19f5efc39b0bc4 SHA512 31976a84faf2f890a0fb33404c3e07d399be5eeaad49b00f52a459df38f12bb3ecd743577c5a7aa4f0fd90c025a262683307e736e97d51e35591756a7c69698b WHIRLPOOL 3eeda886bb7b6f5827583fd1197ae66a068364bccb6b61b9157ddaa74430c6e620d6daaadd49d46d74c94bdab9a168682ef6786524163ab2aec472e3ccc5e30c
+AUX xinetd-2.3.14-config.patch 154 SHA256 9aa8641d7462a2566770ad93efe13004c5b8c02374221f7b7bd1382c805ffc2e SHA512 ae8e7254e029da714e9f65cdeac3f3f9a8f09e962248aea38842e356a3c860f5bde5bb1ed81cd79cbad3e34989d8f37273791a725794b372ce0b5c5fedae1432 WHIRLPOOL 24077bbff1476c1bae633f890f3fb7f98dc87ec6b383f3830b2087e38224d9026cd997e859d7bec074e5c0b53ca49baad1f498e290d319fc4b260e86890ab667
+AUX xinetd-2.3.14-install-contrib.patch 728 SHA256 e76479ccf5f5763a1365f3ad59edf30f20e77147b8e012d2cee179fc72298d8a SHA512 15b8b1649b02e2d8834eb057bef7345497d230a4b10600e9b3e2a83511f9c7df115009ba1f38b1c4907417735454cafbbc41a96266fbb4370c584ecf1aa1638b WHIRLPOOL 0c60bd424911f5f5118e40692d53b758597ad0ebb16b3e4388e86da9098f3c3cd12026f442d2e652315952f78352224b2fcd73c930157d52258a03c69a1aaea9
+AUX xinetd-2.3.15-config.patch 437 SHA256 f30f607c9f73db8003d015ee0a5f80d353c2f0ab9bdae118df88315acccd8045 SHA512 58a9880ca154441c5cfc3ed978a0224601d406a4422435a430b885985a0fbe7ef0d750f54047cb0d7fc5c6ab7bc35433776bb5c6c2c61525e2a04b49d509ad66 WHIRLPOOL 819a4031165ad9ca7f4c11d13c87d9fd30d98f6500984ec59022083ca07632ce663b63cad6fc7ee6e326d9b0b5df5354a059f4db9ba3e820591ae2b143d97756
+AUX xinetd-2.3.15-creds.patch 367 SHA256 4b1d92406a64538cd64fda04a56e8bfc0f01eb7364a3ffc54394f735fb7fd828 SHA512 5d1d883620ed6c1ae0e391687a1a10769eb4c2436cf8bae60ddbbb7b8d1250272c2aa7068c308ee1f3540a41fcdf8ae890a7687ff0213553c59f6a91718f46c1 WHIRLPOOL 9341d8a8ca46de36d0da81d63fd3d45bd7c2cc31686d8c5a600b97f4678f8bb8098835ed3024ed2178d43f12ab88bd6dc59aee4ea0f8f64cddde7776899d9e21
+AUX xinetd.confd 90 SHA256 e401e2cf7c0180a170d3dc3e91d7e98002bae7b013df72813b7bcf89b864fb3a SHA512 03bf05e544c0e52bc2bdeadf494dabd49ace985687b656baae869be99ef65a5f7129492c37e062bf6f196f70561d6239f2d3c4e8171fddc04729d3e266bfe2b2 WHIRLPOOL e108afde9fa58ad0311a7df4d23d0ed82bcfd4faf1ce39932526666afa7492cb595add2cb2cd46fde5aa2147d4c35b8424d632e941538886e6295375db55a9c1
+AUX xinetd.rc6 721 SHA256 6934fee5e3997d7e152c26d0c1a8f8d2f7563287fcc1ae934e4552d523c39329 SHA512 bfe591f83a03e26ccbe06c489fa8c2e7af0f05203e0239b7cbde521dbe22700ba63d4bc50465e01a3fc101a7c7cfa40d0a6a02e881e950143bef7ac4046a6604 WHIRLPOOL a352a5cc685c30e02c386200530cecaf9d842af863dee024bcead97286afa0e55f70b778476e5bfe5c4a0ab7772883022a5c310b2ba260acc170affe6b1474b5
+AUX xinetd.service 192 SHA256 a14e390a742c2981fabbeae99bb2f22ea412d30c4857f34e3eed2ae72c26fe5c SHA512 c2b324c1116485996c414543f67c5dae89de3f82ac85634009da4dc04ea720a860626f6bb0ece0bb734616c6e4394e31ca00a71f697dc93e38b05fbad06dedc0 WHIRLPOOL d9f7d1e5c21b271e0b511ac7acac827ed954fc043ba5f6c7c125e387ff69635362cd739b8fa772f8b6e817d36c368cb7187ad78ea520c27f571b42f91e003a48
+DIST xinetd-2.3.15.tar.gz 309774 SHA256 bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3 SHA512 9d6fee1fbc90329629d84086ae7de5cd51c25af7b68e52aa704d6f74bee5f0e3d54ca1bcf780f90f74ddc8d336ae0abb5e5e368d43c426a26b8dd2c4676d26aa WHIRLPOOL 5bcf69b2cfac3b3713648da666e4c98d62caea4c506be9dc5cc84f1acdc643812460a158b092705274d7452d394d3f2c03b5635f135f5d900bb6a5406f0350c2
+EBUILD xinetd-2.3.15-r2.ebuild 1501 SHA256 f3019fb33c7eeba817e0936af04cc7efab9ca64fbb9db94a8cc8f94b4f6c3b25 SHA512 17ca405368e7cb718666a1bd1dfee814e0551c83dafbdc29d62b1d843459e8a322d119751363f38ae1dbc95cb4539964a5bba37d02ad71af79f808b96c4901e7 WHIRLPOOL 014cea85b5c8ee086377fa97c9446bb5d4addef3402a961980d95a3a5ef18694286b382aa476641c97c729621020f0a0315e3cb0c459914559561cf909978c81
+EBUILD xinetd-2.3.15-r3.ebuild 1541 SHA256 2fdbb6f2cbcee86aefd2819ec8acb3a0e7ee2acb1143ced35f66beca2a46f130 SHA512 099531720ff5c5e57eaaeab6e0216ae0dcf3eac4bd136f4a3522349f43bdec864938dc578ffc686006e09d9f46ceea0d8c41d4607a044d2e8610f53e4929f907 WHIRLPOOL 302b19c6378dff450102bc397c73ab0e399236b181d442d7c678255d272e629d493fa56eda8622c31ddd884d16bfd02970cc203545bc010fd318ab1a1273c1a0
+MISC ChangeLog 8067 SHA256 b3d1a2aa8b951efba53ddb049911b5015e9ed53d97c11224f4ed4d36e1c7aa32 SHA512 b2ec020e440a57a607cee1f2b699d2fdf376168a345759a3187a5055dbce858b78da9b5b624aa7983f23c37bf0db43ca097d3b3b0ab80189bacbc442b5ff8d35 WHIRLPOOL 4d91972e6a72c4e0fc9ef23345c03239237049b3daf9af57e25a78c21d54c1ebba4d5fcc10bf274375c6088d2475e24e9c72e4bf16bd5f3206ad93339f3d036f
+MISC ChangeLog-2015 10762 SHA256 9e0c488d21bea82bb45abc94a4d6c2ff4fd57c2ec13692a4e50ddce169433406 SHA512 4b2397a3c2884124016aed0b78747feecf98f12b08e23b4d52d106654046da10de650faf317bae70d243e6f8c0bda877bbd2f6e35833c2bc01b5452a0a175fd3 WHIRLPOOL d1fd6d0d9a6d62102350c80df3d2150cd4f142c0af5830ac207e195deddbd98841c4c324937256ec25dbb70ab9729dfed83f0a264e43859b9f636e6450ca5192
+MISC metadata.xml 401 SHA256 ea8c266cf998f413166f3779f3a99fad22920f8e70608603dad6ca3b7c295303 SHA512 35d6d241dfa7e9811b09f3df32805de026244d966a5e1c62654986c67541038f79acfe64a9b4b574f5cc14611fc68cba043d4d68dfa7cd8d198a738db5685cdb WHIRLPOOL 0ab4029e1c2f9f624ee4b26920a444247e6586bf7947e67e8f05042c1e1ceb87e638e09df30950078dcd017c5c4ea528e7e3e1a073aaa9024c4118ae1e69c1e0
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch b/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch
new file mode 100644
index 000000000000..2ebdf4c4f1b0
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch
@@ -0,0 +1,27 @@
+--- Makefile.in.orig 2005-10-29 22:08:54.000000000 -0400
++++ Makefile.in 2005-10-29 22:09:32.000000000 -0400
+@@ -75,15 +75,15 @@
+
+ install: build
+ for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \
+- test -d $$i || mkdir -p $$i ; done
+- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR)
+- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR)
+- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR)
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8
++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done
++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8
+ @echo "You must put your xinetd.conf in /etc/xinetd.conf"
+ @echo "There is a sample config file in xinetd/sample.conf and you can"
+ @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format"
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-config.patch b/sys-apps/xinetd/files/xinetd-2.3.14-config.patch
new file mode 100644
index 000000000000..c368dea56e1b
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-config.patch
@@ -0,0 +1,9 @@
+--- contrib/xinetd.conf
++++ contrib/xinetd.conf
+@@ -22,5 +22,5 @@
+ #
+ # no_access =
+-# only_from =
++ only_from = localhost
+ # max_load = 0
+ cps = 50 10
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch b/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch
new file mode 100644
index 000000000000..c1717e43902f
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch
@@ -0,0 +1,24 @@
+--- xinetd-2.3.14/Makefile.in
++++ xinetd-2.3.14/Makefile.in
+@@ -9,6 +9,7 @@
+ DESTDIR =
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
++ETCDIR = @sysconfdir@
+ DAEMONDIR = @sbindir@
+ MANDIR = @mandir@
+ topdir = @top_srcdir@
+@@ -97,7 +98,12 @@
+ rm -f $(MANDIR)/man8/xinetd.log.8
+ rm -f $(MANDIR)/man8/xinetd.8
+ rm -f $(MANDIR)/man8/itox.8
+-
++
++install-contrib:
++ test -d $(DESTDIR)$(ETCDIR)/xinetd.d || mkdir -p $(DESTDIR)$(ETCDIR)/xinetd.d
++ $(INSTALL_CMD) -m 644 contrib/xinetd.conf $(DESTDIR)$(ETCDIR)
++ $(INSTALL_CMD) -m 644 contrib/xinetd.d/* $(DESTDIR)$(ETCDIR)/xinetd.d
++
+ distclean: clean
+ rm -f config.cache config.log Makefile config.status xinetd/itox
+ rm -f config.h @srcdir@/libs/include/* @srcdir@/libs/man/*
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-config.patch b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
new file mode 100644
index 000000000000..b362a97dbe82
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
@@ -0,0 +1,22 @@
+set up some secure defaults:
+ - services can only be accessed from localhost
+ - sanitize the runtime environment (so root's shell vars don't bleed through)
+
+--- contrib/xinetd.conf
++++ contrib/xinetd.conf
+@@ -22,5 +22,5 @@
+ #
+ # no_access =
+-# only_from =
++ only_from = localhost
+ # max_load = 0
+ cps = 50 10
+@@ -35,7 +35,7 @@ defaults
+
+ # setup environmental attributes
+ #
+-# passenv =
++ passenv =
+ groups = yes
+ umask = 002
+
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
new file mode 100644
index 000000000000..39df3caf1156
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/488158
+
+taken from Fedora
+
+Patch by Thomas Swan <thomas.swan@gmail.com>
+
+--- a/xinetd/builtins.c
++++ b/xinetd/builtins.c
+@@ -695,7 +695,7 @@ static void tcpmux_handler( const struct server *serp )
+ if( SC_IS_INTERNAL( scp ) ) {
+ SC_INTERNAL(scp, nserp);
+ } else {
+- exec_server(nserp);
++ child_process(nserp);
+ }
+ }
+
diff --git a/sys-apps/xinetd/files/xinetd.confd b/sys-apps/xinetd/files/xinetd.confd
new file mode 100644
index 000000000000..ae211f3d8fcc
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.confd
@@ -0,0 +1,3 @@
+# /etc/conf.d/xinetd: config file for /etc/init.d/xinetd
+
+XINETD_OPTS="-stayalive -reuse"
diff --git a/sys-apps/xinetd/files/xinetd.rc6 b/sys-apps/xinetd/files/xinetd.rc6
new file mode 100644
index 000000000000..613f5dd4875c
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.rc6
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the BSD License
+
+extra_started_commands="reload dump check"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting xinetd"
+ start-stop-daemon --start --exec /usr/sbin/xinetd -- \
+ -pidfile /var/run/xinetd.pid ${XINETD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xinetd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
+ eend $?
+}
+
+do_sig() {
+ local sig=$1 ; shift
+ ebegin "$*"
+ start-stop-daemon --signal ${sig} --pidfile /var/run/xinetd.pid
+ eend $?
+}
+reload() { do_sig HUP "Reloading configuration" ; }
+dump() { do_sig USR1 "Dumping configuration" ; }
+check() { do_sig IOT "Performing Consistency Check" ; }
diff --git a/sys-apps/xinetd/files/xinetd.service b/sys-apps/xinetd/files/xinetd.service
new file mode 100644
index 000000000000..c6f6271fd97b
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=A secure replacement for inetd
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/xinetd -dontfork
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/xinetd/metadata.xml b/sys-apps/xinetd/metadata.xml
new file mode 100644
index 000000000000..e143258c6fa6
--- /dev/null
+++ b/sys-apps/xinetd/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 type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="rpc">support RPC services</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">xinetd-org/xinetd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
new file mode 100644
index 000000000000..a80e21a8c194
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+ rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+ perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-config.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+ find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+ if ! use rpc ; then
+ append-cppflags -DNO_RPC
+ export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+ fi
+ tc-export AR PKG_CONFIG
+ LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+ econf \
+ $(use_with tcpd libwrap) \
+ --with-loadavg
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install install-contrib
+ use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+ newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+ newconfd "${FILESDIR}"/xinetd.confd xinetd
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+ dodoc AUDIT INSTALL README TODO CHANGELOG
+}
diff --git a/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
new file mode 100644
index 000000000000..e0667ddfa98b
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/ https://github.com/xinetd-org/xinetd"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+ rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+ perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-config.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+ find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+ if ! use rpc ; then
+ append-cppflags -DNO_RPC
+ export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+ fi
+ tc-export AR PKG_CONFIG
+ LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+ econf \
+ $(use_with tcpd libwrap) \
+ --with-loadavg
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install install-contrib
+ use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+ newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+ newconfd "${FILESDIR}"/xinetd.confd xinetd
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+ dodoc AUDIT INSTALL README TODO CHANGELOG
+}
diff --git a/sys-apps/xmbmon/Manifest b/sys-apps/xmbmon/Manifest
new file mode 100644
index 000000000000..de6081734629
--- /dev/null
+++ b/sys-apps/xmbmon/Manifest
@@ -0,0 +1,11 @@
+AUX mbmon.confd 172 SHA256 16d57a77f03e358bc2f0b62100f35ee0531215588f37e8fb3a32a52c0a642aa7 SHA512 6d48cecc4b2e9f80866a5f1a6a908c91d7ee36b60673ed9ea9e935d26805099ee30c5e205e35f00928b79d9e0fa4d21fe7314ec8b7b8705b508f941460a779f4 WHIRLPOOL 1687955603cb0f0cfcbbe426ace345a9029bac96fe2584fbd4646924fad79c19bae4dbc60b37487c136475c9dadf786ebf574e76745d2baa74d7c540cbcc8cfe
+AUX mbmon.rc 385 SHA256 fa2f073a40b25a15e75f9cfe565ff8af4f92503bec87ef2df9e7116a57058e7a SHA512 d3c358c176b18d0314d4bca2c89ed0a0c07f38fb604d6eb450c9c2928a24febf5b871fb29150f6c2567638a5ee66c2ac07b1b0a0130ab0c352e74d4a681d5c7c WHIRLPOOL 8e0aa175aff39f0ee87576cacbf6ee74bce6430e5bf1e8e9e4694a2c3f17ce680feef6471738cf524dc34665b97320f05fd3502e8b97e526717e5566114d4f22
+AUX xmbmon-2.0.5-amd64.patch 674 SHA256 e80b14a78ff4d6f308a9d38f4998062121eba2ae3b42de4f882e33d17f9fdb7b SHA512 a024b87f841fcb8813b241c3ce9fcaba06bd42ce69241fd9f080feb92402b413200d6adbb644ae46b9e8fde76b2fcaec46dcb4be736bde3c8386ca34e55a7f83 WHIRLPOOL 8cfe80fd473b803cd55b41cab413fe5439800b133556a7c4b649666e28bc06efb1e0eb122fd45e892326e5aa778cf4caa0c02f894a075469d8188b9c06153b99
+AUX xmbmon-2.0.5-loopback.patch 1181 SHA256 f55f730a37de771846a215be7d5aad24e9df7fa35041a000679625a10e313ac5 SHA512 11104d1c46da9f3a01d4e49a010294feb94696d9a262340ebec3a7acd661089f70d5af3c0d93a8fa89c022275bfdf4becd4c24f6a0544ec2261fdc62d65fce5a WHIRLPOOL 64affa8c9f9c2fbc62378e39a0f7e81fdbfd16c03332c191745051952c10c2c8808970ad824bbe73fb19f6bc8b5c2e709bec55f9f7d1bec177e03940c0e212c6
+AUX xmbmon-2.0.5-pid.patch 505 SHA256 f57e6747dcd1a463892cd8302cbd4a0e62ea3995dd51e432d1c7329a903fe317 SHA512 9c6a569b0d1350715597cf582a558fe311e3eac00f088eb29890741ba814eb18cb934a49ad02532d4d0836ce147b07671f3cbdd45afb9842fc4bfbb8a3a229dc WHIRLPOOL 6c4cf66ff912584648fa4f7635e72760f11075fe79992c3e8642df299415d35cbfb0a77ac7a78a27df7664d219b03caaa847cb6066d75762b5e8da0c47d76ed6
+DIST xmbmon205.tar.gz 142987 SHA256 65b10ebfe53585ac22d6a31d8ef3fea552cb266cf2c124c00421dec1df5a4a4f SHA512 0ee2f3616976af6edc3777391f657d12670be1557f726f67f51edc23866d96d5cd4cfa9ac8aaad52cce2bdd2b9c616efd6edba1a019e4360a0fcaae0aef99a9c WHIRLPOOL f4a77e88315cb86fb6aa61566804cb22b382a6a18d56c96a09dd991033be005ec638361a03cfde21a95e6ef316ed65bbf15d72d03b10810e4dee59e1790e3d7b
+DIST xmbmon205_fflush.patch 242 SHA256 f837f465861ce46e4a90d1d3c7a680c1904f7fb91e14efcbad22313c90e2cdc7 SHA512 4ebd6f3870f3b35aafe9424da9e007b269bbdd6944a012e45a6bb18871a1df649245a0992862a2346dd92026e36430130b2061d8308286b93e13571e028684b5 WHIRLPOOL 3bb1a83e9e753642fe6a9bf0deea8743829fe3e27759786f049e03b3fb862adb5c7ed2d69a045d682e1e7afbb207d5f496dbff9d938625d1292583271a804b69
+EBUILD xmbmon-2.0.5-r1.ebuild 1851 SHA256 1d4a3540c4c8e340f16f4e699b66ac35ab21c9711d3dcd756176aea50f185595 SHA512 39508420cec49fa5a724312431188639094cf75aa94ec683b6176d0d2ebb5853ef2031197d659615387bc26bbf9bc4a403e5d68740718db8777d8810d6e6ecdc WHIRLPOOL eb53219fe076309ed1550fb3ac58719c6fe9931805e4fc3ce3d93da2a728dbdaa7812da7841c208ef4eaa2f05c734198954bca54d1180b3b1085dc70833fccee
+MISC ChangeLog 3195 SHA256 1d7ce9e06b892e182455ae6d0a70c8945fd1c0056ca838f0141196e28b0f29d9 SHA512 36a210701f135970162f7ff93c1ac918ea990154d0a9eb1abc8c1c1c5e28b15be72e9911b7cb1dee866ca07f938247544c116f41b573b2a25d01ae348d7d869f WHIRLPOOL b92826ab45f71d26e7854fd6581083dc9095eec9da2d526c1258cba46fafec6db62ad24b54765c5eaa92434f21978616ff6917d9fa05cfafea536e3ad43a5945
+MISC ChangeLog-2015 1870 SHA256 b9ac157eb6ed05ea451f0d6dcac762a1918b989dc28ba1b416c9bba0e3dee5d2 SHA512 121257ad73f856f4f28ee885df3985b4a36c64899a6b72302e21b8082fe019eeedeea9d148f4668d2924d76fac85fb51a73cd216d410fb79deb987fb6eab2964 WHIRLPOOL a3aae0005e5b5031242a2aaa4e0eae8ea155e91b4f2080eba94a48e03e49edf382b4bc5bd5d920c4cfb07ba1d6085f5b75907d775460bcf697497ce988b8c34e
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/xmbmon/files/mbmon.confd b/sys-apps/xmbmon/files/mbmon.confd
new file mode 100644
index 000000000000..01cc0ff6e5f0
--- /dev/null
+++ b/sys-apps/xmbmon/files/mbmon.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/mbmon
+
+# Port to listen on.
+
+MBMON_PORT="12912"
+
+# These are default options to use with gkrellm2.
+# See the mbmon(1) manpage for more info.
+
+MBMON_OPTS="-r"
diff --git a/sys-apps/xmbmon/files/mbmon.rc b/sys-apps/xmbmon/files/mbmon.rc
new file mode 100644
index 000000000000..b7fe6cbf7d5f
--- /dev/null
+++ b/sys-apps/xmbmon/files/mbmon.rc
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ einfo "Start Mother Board Monitor"
+ mbmon \
+ -P ${MBMON_PORT} \
+ ${MBMON_OPTS}
+ eend $?
+}
+
+stop() {
+ einfo "Stop Mother Board Monitor"
+ start-stop-daemon --stop --pidfile /var/run/mbmon.pid
+ local ret=$?
+ rm -f /var/run/mbmon.pid
+ eend ${ret}
+}
diff --git a/sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch
new file mode 100644
index 000000000000..27b150e9b0ba
--- /dev/null
+++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch
@@ -0,0 +1,24 @@
+diff -Naur xmbmon205.orig/configure xmbmon205/configure
+--- xmbmon205.orig/configure 2004-08-13 16:22:18.000000000 +0900
++++ xmbmon205/configure 2005-02-05 11:02:02.496163477 +0900
+@@ -3489,7 +3489,7 @@
+ i?86-*-freebsd*)
+ CC=cc
+ ;;
+- i?86-*-linux-*)
++ i?86-*-linux-* | x86_64-*-linux-*)
+ CC=gcc
+ HOSTDEF="-DLINUX"
+ ;;
+diff -Naur xmbmon205.orig/configure.in xmbmon205/configure.in
+--- xmbmon205.orig/configure.in 2004-08-13 16:06:31.000000000 +0900
++++ xmbmon205/configure.in 2005-02-05 11:01:35.414957216 +0900
+@@ -19,7 +19,7 @@
+ i?86-*-freebsd*)
+ CC=cc
+ ;;
+- i?86-*-linux-*)
++ i?86-*-linux-* | x86_64-*-linux-*)
+ CC=gcc
+ HOSTDEF="-DLINUX"
+ ;;
diff --git a/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch
new file mode 100644
index 000000000000..5a28b52f9ea2
--- /dev/null
+++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch
@@ -0,0 +1,40 @@
+Listen on loopback only with the -l option
+
+patch by Mike Frysinger
+
+--- mbmon.c
++++ mbmon.c
+@@ -41,4 +41,5 @@
+ static const char *MyName = "mbmon";
+ int port = 0;
++uint32_t listen_addr = INADDR_ANY;
+
+ int usage(void)
+@@ -61,4 +62,5 @@
+ " -c count: repeat <count> times and exit\n"
+ " -P port: run in daemon mode, using given port for clients\n"
++" -l: listen on local interface only\n"
+ " -T|F [1-7]: print Temperature|Fanspeed according to following styles\n"
+ " style1: data1\\n\n"
+@@ -318,5 +320,5 @@
+ while ((ch = getopt(argc,argv,"VSIAfdDYe:p:s:c:T:F:tunNirh")) != -1) {
+ #else
+- while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhP:")) != -1) {
++ while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhlP:")) != -1) {
+ #endif
+ switch(ch) {
+@@ -371,4 +373,7 @@
+ probe_request = optarg;
+ break;
++ case 'l':
++ listen_addr = INADDR_LOOPBACK;
++ break;
+ case 'P':
+ port = atoi (optarg);
+@@ -458,5 +463,5 @@
+ server.sin_family = AF_INET;
+ server.sin_port = htons (port);
+- server.sin_addr.s_addr = INADDR_ANY;
++ server.sin_addr.s_addr = htonl(listen_addr);
+ if (bind (fd, (struct sockaddr *) &server, sizeof (server)) < 0) {
+ perror("bind");
diff --git a/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch
new file mode 100644
index 000000000000..aecb5e7a9b7c
--- /dev/null
+++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch
@@ -0,0 +1,31 @@
+Write a pid when we daemonize
+
+patch by Mike Frysinger
+
+--- mbmon.c
++++ mbmon.c
+@@ -229,4 +229,5 @@
+ static void daemonize()
+ {
++ pid_t pid;
+ int fd;
+ struct sigaction sa_ign, sa_save;
+@@ -247,5 +248,5 @@
+ sigaction(SIGHUP, &sa_ign, &sa_save);
+
+- switch (fork()) {
++ switch ((pid=fork())) {
+ case 0:
+ break;
+@@ -259,4 +260,11 @@
+
+ default:
++ {
++ FILE *f = fopen("/var/run/mbmon.pid", "w");
++ if (f != NULL) {
++ fprintf(f, "%i", pid);
++ fclose(f);
++ }
++ }
+ exit(0);
+ /* NOTREACHED */
diff --git a/sys-apps/xmbmon/metadata.xml b/sys-apps/xmbmon/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/xmbmon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild b/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild
new file mode 100644
index 000000000000..da5cef958ffd
--- /dev/null
+++ b/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P=${PN}${PV//.}
+DESCRIPTION="Mother Board Monitor Program for X Window System"
+HOMEPAGE="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html"
+SRC_URI="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}.tar.gz
+ http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}_fflush.patch"
+# http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}_A7N8X-VM.patch
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE="X"
+
+DEPEND="X? ( x11-libs/libXt
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libICE )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # epatch "${DISTDIR}"/${MY_P}_A7N8X-VM.patch
+ epatch "${DISTDIR}"/${MY_P}_fflush.patch
+ epatch "${FILESDIR}"/${P}-amd64.patch
+ epatch "${FILESDIR}"/${P}-pid.patch
+ epatch "${FILESDIR}"/${P}-loopback.patch
+ sed -i \
+ -e "/^CFLAGS=/s/-O3/${CFLAGS}/" \
+ -e '/^LDFLAGS=-s$/d' \
+ Makefile.in || die
+ sed -i \
+ -e '/^[[:space:]]*CC=gcc/s,.*,:;,' \
+ configure || die
+}
+
+src_compile() {
+ econf || die "Configure failed"
+ emake mbmon || die "Make mbmon failed"
+ if use X ; then
+ emake xmbmon || die "Make xmbmon failed"
+ fi
+}
+
+src_install() {
+ dosbin mbmon || die "mbmon failed"
+ doman mbmon.1
+ dodoc ChangeLog* ReadMe* mbmon-rrd.pl
+
+ if use X ; then
+ dosbin xmbmon || die "xmbmon failed"
+ doman xmbmon.1x
+ insinto /etc/X11/app-defaults/
+ newins xmbmon.resources XMBmon
+ fi
+
+ newinitd "${FILESDIR}"/mbmon.rc mbmon
+ newconfd "${FILESDIR}"/mbmon.confd mbmon
+}
+
+pkg_postinst() {
+ echo
+ einfo "These programs access SMBus/ISA-IO ports without any kind"
+ einfo "of checking. It is, therefore, very dangerous and may cause"
+ einfo "a system-crash. Make sure you read ReadMe,"
+ einfo "section 4, 'How to use!'"
+ echo
+}
diff --git a/sys-apps/yarn/Manifest b/sys-apps/yarn/Manifest
new file mode 100644
index 000000000000..6aa074c03c54
--- /dev/null
+++ b/sys-apps/yarn/Manifest
@@ -0,0 +1,10 @@
+DIST yarn-v0.27.5.tar.gz 816114 SHA256 f0f3510246ee74eb660ea06930dcded7b684eac2593aa979a7add84b72517968 SHA512 a21615f3bf4996d6e2dc84b54c3e9ca8a58143941a80771121f6eb6f5dcf8fd655e1c9b9420e7a0ab3a7c26ecd6bdd3790451d76435d7e3d6fbb5ba8ac729dbd WHIRLPOOL e21887c715c72c490c58817ca0a6542899f4036ccd81fedfab4f751b13eca6196f82236d206f7a58d550e78f0bff4dac08fbfc44f287e2463ad119042b98a83b
+DIST yarn-v1.0.1.tar.gz 843398 SHA256 6b00b5e0a7074a512d39d2d91ba6262dde911d452617939ca4be4a700dd77cf1 SHA512 3d22bb7a7b32cff26bb7053a12e21fdabf4a2ff198e7164e034fd5e0b6a5760e0def19bcc6592f7df850108a3bf36d60a9337f1dc56a35ed72c98b14c0af95fb WHIRLPOOL 99826575498c7944ddf07c61c3bac5b7163c4fbe65f8196502b7322cc5978b1988ae524a4d2ae4ab69c78d5773d4bb66598fb1495394e139e7f72e3c2a32fe8c
+DIST yarn-v1.0.2.tar.gz 843696 SHA256 8a31f8fa50ab6d5f8852025fb0ea4a50f2f8b82792f060fa99de0acc370b0698 SHA512 21b24f4633517f001f0cf2529d67316b5a1aded787c6516504b0f7b89fec991c3f17f7a098590bcfcea88a5d9831121079facca2237c678495bd2124cdf07dad WHIRLPOOL 12dca2a10b2e946bf0587ac41254b86813a49ca9025e11d4939851de5da9178c5e9c7603711e7b876dea3f3aa01c2068f7c9df5142f8bb7117cbe9535842031d
+DIST yarn-v1.1.0.tar.gz 874168 SHA256 171c1f9ee93c488c0d774ac6e9c72649047c3f896277d88d0f805266519430f3 SHA512 7ce740ac47d8ba42c47d0262979fcd1d22daede2a298e1743341c52584bee7d4beca8758c118deccaefd9cb0bc2780a37e110ae3633af56ac6916ae0389eadf6 WHIRLPOOL 21fabd1824fc7bf3ef3cf4ac64103e19f97c547f968aa0220371ca0ddb3cba71e034cd6143047ac85fa8c8ff1d39c3364e7bf3de57f9628af244d9c8723a7498
+EBUILD yarn-0.27.5.ebuild 835 SHA256 101f221f5d8613dea088fec8790cb00ed312e1eb9b89e5625e1bf3c622efae3c SHA512 77b5aad546e5360d72c137ab356a20a51f43bf1b014bb315b81a4b09fc296eade7b3e871ddba371a3234d31c3b736ca3c2e5fec3a95da44e39ce45d5425cbc78 WHIRLPOOL d13f41aa657c47ce301595c609206e5083283caca0cde421c60e445db60f78d021334cc039a9d6f6028352aef74465c8c54728524da1bc5affa45953ecc9eaaf
+EBUILD yarn-1.0.1.ebuild 841 SHA256 c31c4b8ecdf31512767377f786363066c026966b60c04c7fdaca66431ca8416b SHA512 89b39480a4b8a24f7a1fe3a6231b25d9b5d70b21c2e8d3d4aab95581b9906b6e6be1aac50b4cf3914995f5e2c27482f40c56eade9cbb3efc59b24a5e899c86f5 WHIRLPOOL 3d899e46a31b59e476d8c40424049a50ebb8181131917bbee7929967d42b7d83e0445251cf0dcc58610ead0bd40c310d9c6c068db9b7762ef8e7b3172dc25201
+EBUILD yarn-1.0.2.ebuild 841 SHA256 c31c4b8ecdf31512767377f786363066c026966b60c04c7fdaca66431ca8416b SHA512 89b39480a4b8a24f7a1fe3a6231b25d9b5d70b21c2e8d3d4aab95581b9906b6e6be1aac50b4cf3914995f5e2c27482f40c56eade9cbb3efc59b24a5e899c86f5 WHIRLPOOL 3d899e46a31b59e476d8c40424049a50ebb8181131917bbee7929967d42b7d83e0445251cf0dcc58610ead0bd40c310d9c6c068db9b7762ef8e7b3172dc25201
+EBUILD yarn-1.1.0.ebuild 841 SHA256 c31c4b8ecdf31512767377f786363066c026966b60c04c7fdaca66431ca8416b SHA512 89b39480a4b8a24f7a1fe3a6231b25d9b5d70b21c2e8d3d4aab95581b9906b6e6be1aac50b4cf3914995f5e2c27482f40c56eade9cbb3efc59b24a5e899c86f5 WHIRLPOOL 3d899e46a31b59e476d8c40424049a50ebb8181131917bbee7929967d42b7d83e0445251cf0dcc58610ead0bd40c310d9c6c068db9b7762ef8e7b3172dc25201
+MISC ChangeLog 623 SHA256 cbca76454ad138533b7a87a50f03dbc06cd62b3d7d9361369c334c15b8f12a13 SHA512 57af4eb3b80a33408699ec59b3aeb5588c0e662035ad2d1ceefe2970b725c0d2ff8e61ea3a24e4298739bff64d988c694ffa3b0bad0b5b758216997669a334ed WHIRLPOOL 3b2c2e0da5c3f711d9833b6201b721783845d974cca843113b9a05083d41c5b1bce65dbc04287fa16a0c915e6756538154b44adb9ad147b8ff75d12bf0d0a689
+MISC metadata.xml 249 SHA256 23d2c373be07d71afb1a2c75f5ec9631d4779a020d6fd2a7c5c11431d175292e SHA512 d406f99c7fb4c5839522e07fbee81cf55330fc0c4ba6fff5281179f2ea7c21048e7cbd5563665b9a458f8b5a9724dd1fb9ac8641e2bb192f1514358902560f73 WHIRLPOOL 68a9fc21435a1948e13369c6a5312664bc9020aca52ec7108272be6d8ccd8bdb4bd00775b3d47311ea15a0adb4befd896ad8c8d23bfd4ebb91877b3df997bfed
diff --git a/sys-apps/yarn/metadata.xml b/sys-apps/yarn/metadata.xml
new file mode 100644
index 000000000000..b70cf1a5b6a1
--- /dev/null
+++ b/sys-apps/yarn/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-needed -->
+ <upstream>
+ <remote-id type="github">yarnpkg/yarn</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/yarn/yarn-0.27.5.ebuild b/sys-apps/yarn/yarn-0.27.5.ebuild
new file mode 100644
index 000000000000..631ba960a315
--- /dev/null
+++ b/sys-apps/yarn/yarn-0.27.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fast, reliable, and secure node dependency management"
+HOMEPAGE="https://yarnpkg.com"
+SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/yarn-v${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!dev-util/cmdtest
+ net-libs/nodejs"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/dist"
+
+src_install() {
+ local install_dir="/usr/$(get_libdir)/node_modules/yarn" path
+ insinto "${install_dir}"
+ doins -r .
+ dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
+ fperms a+x "${install_dir}/bin/yarn.js"
+ while read -r -d '' path; do
+ [[ $(head -n1 "${path}") == \#\!* ]] || continue
+ chmod +x "${path}" || die #614094
+ done < <(find "${ED}" -type f -print0)
+}
diff --git a/sys-apps/yarn/yarn-1.0.1.ebuild b/sys-apps/yarn/yarn-1.0.1.ebuild
new file mode 100644
index 000000000000..f028ad115d08
--- /dev/null
+++ b/sys-apps/yarn/yarn-1.0.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fast, reliable, and secure node dependency management"
+HOMEPAGE="https://yarnpkg.com"
+SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/yarn-v${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!dev-util/cmdtest
+ net-libs/nodejs"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-v${PV}
+
+src_install() {
+ local install_dir="/usr/$(get_libdir)/node_modules/yarn" path
+ insinto "${install_dir}"
+ doins -r .
+ dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
+ fperms a+x "${install_dir}/bin/yarn.js"
+ while read -r -d '' path; do
+ [[ $(head -n1 "${path}") == \#\!* ]] || continue
+ chmod +x "${path}" || die #614094
+ done < <(find "${ED}" -type f -print0)
+}
diff --git a/sys-apps/yarn/yarn-1.0.2.ebuild b/sys-apps/yarn/yarn-1.0.2.ebuild
new file mode 100644
index 000000000000..f028ad115d08
--- /dev/null
+++ b/sys-apps/yarn/yarn-1.0.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fast, reliable, and secure node dependency management"
+HOMEPAGE="https://yarnpkg.com"
+SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/yarn-v${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!dev-util/cmdtest
+ net-libs/nodejs"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-v${PV}
+
+src_install() {
+ local install_dir="/usr/$(get_libdir)/node_modules/yarn" path
+ insinto "${install_dir}"
+ doins -r .
+ dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
+ fperms a+x "${install_dir}/bin/yarn.js"
+ while read -r -d '' path; do
+ [[ $(head -n1 "${path}") == \#\!* ]] || continue
+ chmod +x "${path}" || die #614094
+ done < <(find "${ED}" -type f -print0)
+}
diff --git a/sys-apps/yarn/yarn-1.1.0.ebuild b/sys-apps/yarn/yarn-1.1.0.ebuild
new file mode 100644
index 000000000000..f028ad115d08
--- /dev/null
+++ b/sys-apps/yarn/yarn-1.1.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fast, reliable, and secure node dependency management"
+HOMEPAGE="https://yarnpkg.com"
+SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/yarn-v${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!dev-util/cmdtest
+ net-libs/nodejs"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-v${PV}
+
+src_install() {
+ local install_dir="/usr/$(get_libdir)/node_modules/yarn" path
+ insinto "${install_dir}"
+ doins -r .
+ dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
+ fperms a+x "${install_dir}/bin/yarn.js"
+ while read -r -d '' path; do
+ [[ $(head -n1 "${path}") == \#\!* ]] || continue
+ chmod +x "${path}" || die #614094
+ done < <(find "${ED}" -type f -print0)
+}
diff --git a/sys-apps/yum/Manifest b/sys-apps/yum/Manifest
new file mode 100644
index 000000000000..a70e58c80618
--- /dev/null
+++ b/sys-apps/yum/Manifest
@@ -0,0 +1,5 @@
+DIST yum-3.4.3_p20170619.tar.gz 1525362 SHA256 c97cb357ca7f1180130007e3f8c733de7868d144b6bdb70356370ed110832d41 SHA512 4dddc3e30be8e86162b7786d7cf4e4e6f00e67c03bc3b16f347df1e54c3c67e5eaa01456e19952452a4eeaa4bc40c9a82a042d43772ad304c87c44bdc36e7ea3 WHIRLPOOL bdca57657b7d2405e04607f622d74aa94d5966bea15e1249ed47a82f3239949e2d380d6415a3e5ee089996762de412c2f60bf0f86f25dac91916322b26725847
+EBUILD yum-3.4.3_p20170619.ebuild 1233 SHA256 04fd948a07e34d90cd9ea5687b8ac8c9b385ad10b746858b94371530b8dca46a SHA512 1d30eef5387d870909272e1395c6cc97ae07e49edea0ed6d599b65e9cd1550e6e2649230085e8a8d6f76a58ac779a9a51fcba07ba564abf494d8677d878efc4a WHIRLPOOL 95ca7a8b2e572db56cc9283f622d454926d9200e399fbbec97052f5cdc11d75e758b0180a1abb040c1061ebd8ee6b2fa910e5fde9e41fc0f0f511b0d127eeea7
+MISC ChangeLog 2848 SHA256 af83b03e627ea53a5e585f35b929c9980bb19ed6cbf68308f161c9e816ff8f4e SHA512 015c60b918f8735e4982ae25c7cc1a9f22ac0e1f7cc24dc808a2f2c2646a12818d2b4be8b0380b22662120889084c3c5daa4883913fffc36f039f4bbb427fa11 WHIRLPOOL 56398f946d71ca47363306df27c1ab81ff3c57aaa1e9f7e77e3539097ddd32b48cd60c3aaffa133914aa2bdbc8938890b53faf10f94d9de1ddb83c004ca39248
+MISC ChangeLog-2015 3631 SHA256 e291cd147c63c1440f6835e45668737749b198b0bd7cc0d0fc27c29b4897037f SHA512 a389c747d44cf6150e0851bcadad13e870799ccd7693776e253a60ec636380c33cac45203481a5864d352f9227d326b8ee17eae4d54931b2b5e871aacbb762f4 WHIRLPOOL 74dda5f4ee8fa2ebe5e6def84c8d992a9d3d7bf1cc3e5489141695093486c75ac726856e4cffd6af5d0ca6c63cbbd994235df17b12f56d76b54224bb809d85c0
+MISC metadata.xml 352 SHA256 74ba50f57d150ee1cfe377ec95cabdacef302d73843c88b0bbb19e814f3ea51d SHA512 f4fcf3273a1ac36af9d26ce85a5c859fd64b646ab8020fa2dcd4a6bd3120b1b0256d7485a7690458df1dd8a5a8f7d3a9037595d6b269cd4f065fb14a4d73fb68 WHIRLPOOL da6d861c40a1f9d7170378f79a011ed015b8ae2422d07599ed4807f38241feae0e16632637fa256e7214e90eebbb50e7da058f6dd6949069f2a10e734e6c54ca
diff --git a/sys-apps/yum/metadata.xml b/sys-apps/yum/metadata.xml
new file mode 100644
index 000000000000..22eb5e1427ef
--- /dev/null
+++ b/sys-apps/yum/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 type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription>
+ Automatic updater and package installer/remover for rpm systems
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/yum/yum-3.4.3_p20170619.ebuild b/sys-apps/yum/yum-3.4.3_p20170619.ebuild
new file mode 100644
index 000000000000..25ff9b059b59
--- /dev/null
+++ b/sys-apps/yum/yum-3.4.3_p20170619.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+inherit python-single-r1 systemd
+
+DESCRIPTION="automatic updater and package installer/remover for rpm systems"
+HOMEPAGE="http://yum.baseurl.org/"
+SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~ppc ~x86"
+
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ app-arch/rpm[python,${PYTHON_USEDEP}]
+ dev-python/sqlitecachec[${PYTHON_USEDEP}]
+ dev-libs/libxml2[python,${PYTHON_USEDEP}]
+ dev-python/pyliblzma[${PYTHON_USEDEP}]
+ dev-python/urlgrabber[${PYTHON_USEDEP}]"
+
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+src_prepare() {
+ sed -i -e 's/make/$(MAKE)/' Makefile || die
+ sed -i -e "s:lib:$(get_libdir):g" rpmUtils/Makefile yum/Makefile || die
+ default
+}
+
+src_install() {
+ emake INIT=systemd UNITDIR="$(systemd_get_systemunitdir)" DESTDIR="${ED}" install
+ python_optimize "${D%/}$(python_get_sitedir)" "${ED%/}/usr/share/yum-cli"
+ rm -r "${ED%/}/etc/rc.d" || die
+ # bug #563850
+ python_fix_shebang "${ED}/usr/bin/yum"
+}
diff --git a/sys-apps/zorroutils/Manifest b/sys-apps/zorroutils/Manifest
new file mode 100644
index 000000000000..cbfb4d15f1df
--- /dev/null
+++ b/sys-apps/zorroutils/Manifest
@@ -0,0 +1,7 @@
+AUX zorroutils-0.04-20021014.diff 2181 SHA256 8ce92b618957cc39d3a3672f4fb8a0cee1612c66ed4ca4b6dd6764e4427d76ac SHA512 f517be553f9be801dbdd21fa886df63fb1a10c151e8687d48c4efe66a202daf2cd3714f3d18167a6ced33fa7a9ae6c6e75fe0f7ee0e804f4ed1683bccc443599 WHIRLPOOL f671fa4451921d7ece151f75fcc355b5bae61ea4b715baa2baf83207a867e8fc97e3d3109e2ada6ede0185d5514d6816f12066172d040355867fb700a3b12aba
+AUX zorroutils-gentoo.diff 327 SHA256 c6f069e06a495753b0665c496445acdf597c33515216c72b0d5813365a09d351 SHA512 c8ef49ae4438140c1336e0cbf9381a5e42b39f310eeda9be5101b85a19c595a1bfb97fac451c4757596cd49d5b2410c9d999bbff0d36b6ada9828ae278d57497 WHIRLPOOL de1d3c38955e1464a895256977e08dd138586c080e0105df2c02766687b8c8fe82d5e4dac197c282d484ac311c944d1997826ea9ac01120f347e32b683ab5bbd
+DIST zorroutils-0.04.tar.gz 12205 SHA256 5aca30dec4f29b918d6b899d0467c95e4b9d0016dd7c647e9022bd7d4864676c SHA512 e00a621cc64f3c50ae940809eb79ee145dab7d042e5a2b7fafe14bc7f9f85ff2e1b592d8922e628c5dbcecab95e6bd634d0cbbc1cc84f72136a5235480e6274f WHIRLPOOL ca81347f5fca3ad595b6f50556fe295f680ca160b72dd2b05b7d13ee90c502a369d31a5741ad30e81c902d1ac385ee3c39b4f7ef2d81cbc751b995d42c86c3ef
+EBUILD zorroutils-0.04.ebuild 686 SHA256 1aa1287a32dff68bf882c483f03518c8a40a81a986fdb09ab24aef62cef4c2d2 SHA512 5c715f1f987fdec565743c59ee5e7518c4fc9214b7112d9f19182c467922292aa24b06d16ac24034c5487001c084a9fac26757c83b124309925ff25633ce4b18 WHIRLPOOL c0eb34f1305e48628bd101523a17ef1ed9063680271ca8db09ec76ea6d0d876900f9c0b152f88d0b7f47ad0d027cb1a5518324f64ebaca642cafc2551aec8a8a
+MISC ChangeLog 2505 SHA256 1e5f73960d48d4a2d22527131eb3d7fad83b9668e052eeb6d62bc0c568da98c1 SHA512 ac4e5ea11c9bcc80c2b6ef5c30091b19d730e4e6e3bb128af134b50774baa3217270e208b5e6b3f9f796a32ceb91056ebf155a5875d10db0768c65e7ed9c0280 WHIRLPOOL c77868ef25122a78d2a4ab782d89cba030ba3d02808f3883ab7783a1ad3b6c3b4c2b105785eeaeab0ad3b98f1955cbcdcedd88234e0546aa9d8548df731ad602
+MISC ChangeLog-2015 652 SHA256 ef5266576d46942f70f4909e4610fd631ac2640be3526676d09a2511b5f4bc3f SHA512 7db3985678a2577ae9cf0a42204258cb9fd2781c509a4de5914b8e1c1256a154459548799eab15ff36f9435ccd9d0df0e13f4e025cb57cc2e360b5b8eef4d435 WHIRLPOOL b84dfc106c3953e0b12287d7ff3cb25f50ac895136b880b0327415165a72f4982ed03d3c57d588d437ad87277dbacd1ea1dd891080c15fbbfa1f6790e70cb37f
+MISC metadata.xml 430 SHA256 8060f83c1a6fc8ba4555329522fd85adc3f55efbd02e3b22b5c10622ff50266a SHA512 8e8419f4e429758c2d1d42405505da55f47fc3ea7e30c69c994d825aeb6e45d8639533f8cf276d44e1d272062d6d8058f27651c8b38eae7f7ac8c5844523318b WHIRLPOOL 37ca23ed9a59a2c18b0ab83f0f297323e57b647b53818b0615dfb7796867c3a45736dfa4a4ff8d0d888823e4a9fccdc84f6a37a8e501a47512b1e014f0bbccde
diff --git a/sys-apps/zorroutils/files/zorroutils-0.04-20021014.diff b/sys-apps/zorroutils/files/zorroutils-0.04-20021014.diff
new file mode 100644
index 000000000000..70edf2fce1d7
--- /dev/null
+++ b/sys-apps/zorroutils/files/zorroutils-0.04-20021014.diff
@@ -0,0 +1,62 @@
+diff -Nru zorroutils-0.04.orig/zorro.ids zorroutils-0.04/zorro.ids
+--- zorroutils-0.04.orig/zorro.ids 2000-09-28 20:45:47.000000000 +0200
++++ zorroutils-0.04/zorro.ids 2002-10-14 15:08:58.000000000 +0200
+@@ -4,7 +4,7 @@
+ # Maintained by Geert Uytterhoeven <zorro@linux-m68k.org>
+ # If you have any new entries, please send them to the maintainer.
+ #
+-# $Id$
++# $Id$
+ #
+
+ # Manufacturers and Products. Please keep sorted.
+@@ -42,7 +42,7 @@
+ 5000 A2620 68020 [Accelerator and RAM Expansion]
+ 5100 A2630 68030 [Accelerator and RAM Expansion]
+ 5400 A4091 [SCSI Host Adapter]
+- 5a00 A2065 [Ethernet Card]]
++ 5a00 A2065 [Ethernet Card]
+ 6000 Romulator Card
+ 6100 A3000 Test Fixture [Miscellaneous Expansion Card]
+ 6700 A2386-SX [ISA Bus Bridge]
+@@ -56,7 +56,7 @@
+ 02ff Kolff Computer Supplies
+ 0000 KCS Power PC [ISA Bus Bridge]
+ 03ec Cardco Ltd.
+- 0400 Kronos 2000 [SCSI Host Adapter]]
++ 0400 Kronos 2000 [SCSI Host Adapter]
+ 0c00 A1000 [SCSI Host Adapter]
+ 0e00 Escort [SCSI Host Adapter]
+ f500 A2410 HiRes [Graphics Card]
+@@ -229,6 +229,7 @@
+ 0a00 Impact Series II [RAM Expansion]
+ 081e Interworks Network
+ 0820 Hardital Synthesis
++ 0100 Super Big Bang [Accelerator, SCSI Host Adapter and RAM Expansion]
+ 1400 TQM 68030+68882 [Accelerator]
+ 0828 Applied Engineering
+ 1000 DL2000 [Modem]
+@@ -363,7 +364,13 @@
+ 1300 Warp Engine 40xx [Accelerator, SCSI Host Adapter and RAM Expansion]
+ 089e ElBox Computer
+ 0600 1200/4 [RAM Expansion]
+- 1900 PowerFlyer [IDE Interface]
++ 0800 FastATA 1200 [IDE Interface]
++ 1200 FastATA 1200 [IDE Interface]
++ 1300 FastATA 1200 [IDE Interface]
++ 1800 FastATA 1200 [IDE Interface]
++ 1900 FastATA 4000 [IDE Interface]
++ 1d00 FastATA 4000 [IDE Interface]
++ 1e00 FastATA ZIV [IDE Interface]
+ 0a00 Harms Professional
+ 1000 030 Plus [Accelerator]
+ d000 3500 Professional [Accelerator and RAM Expansion]
+@@ -383,7 +390,7 @@
+ ff00 Pixel64 RAM [Graphics Card]
+ 1212 Individual Computers
+ 0000 Buddha [IDE Interface]
+- 1700 X-Surf [Ethernet Card]
++ 1700 X-Surf [Ethernet Card and IDE Interface]
+ 2a00 Catweasel [IDE Interface and Floppy Controller]
+ 1248 Kupke
+ 0100 Golem HD 3000 [HD Controller]
diff --git a/sys-apps/zorroutils/files/zorroutils-gentoo.diff b/sys-apps/zorroutils/files/zorroutils-gentoo.diff
new file mode 100644
index 000000000000..a0a7e44872bc
--- /dev/null
+++ b/sys-apps/zorroutils/files/zorroutils-gentoo.diff
@@ -0,0 +1,6 @@
+diff -Nru zorroutils-0.04.orig/zorroutils.h zorroutils-0.04/zorroutils.h
+--- zorroutils-0.04.orig/zorroutils.h 2000-09-28 20:46:14.000000000 +0200
++++ zorroutils-0.04/zorroutils.h 2006-09-16 18:08:17.000000000 +0200
+@@ -16,1 +16,1 @@
+-#define ZORRO_ID_DB "/usr/share/zorro.ids"
++#define ZORRO_ID_DB "/usr/share/misc/zorro.ids"
diff --git a/sys-apps/zorroutils/metadata.xml b/sys-apps/zorroutils/metadata.xml
new file mode 100644
index 000000000000..0a210accc7d8
--- /dev/null
+++ b/sys-apps/zorroutils/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 type="project">
+ <email>m68k@gentoo.org</email>
+</maintainer>
+<maintainer type="person">
+ <email>gentoo@kolla.no</email>
+ <name>Kolbjørn Barmen</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/zorroutils/zorroutils-0.04.ebuild b/sys-apps/zorroutils/zorroutils-0.04.ebuild
new file mode 100644
index 000000000000..59c90eecef3d
--- /dev/null
+++ b/sys-apps/zorroutils/zorroutils-0.04.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Zorro bus utility for Amigas running 2.1 and later kernels"
+HOMEPAGE="http://users.telenet.be/geertu/Download/#zorro"
+SRC_URI="http://users.telenet.be/geertu/Download/${P}.tar.gz"
+IUSE=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="m68k ~ppc"
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/${PN}-0.04-20021014.diff
+ epatch "${FILESDIR}"/${PN}-gentoo.diff
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die
+}
+
+src_install() {
+ dosbin lszorro
+ doman *.8
+
+ insinto /usr/share/misc
+ doins zorro.ids
+}