summaryrefslogtreecommitdiff
path: root/sys-process/acct
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-process/acct
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-process/acct')
-rw-r--r--sys-process/acct/Manifest29
-rw-r--r--sys-process/acct/acct-6.5.5-r4.ebuild43
-rw-r--r--sys-process/acct/acct-6.6.1.ebuild48
-rw-r--r--sys-process/acct/acct-6.6.2-r1.ebuild45
-rw-r--r--sys-process/acct/acct-6.6.2.ebuild45
-rw-r--r--sys-process/acct/acct-6.6.4-r1.ebuild44
-rw-r--r--sys-process/acct/acct-6.6.4.ebuild44
-rw-r--r--sys-process/acct/files/acct-6.5.5-cross-compile.patch323
-rw-r--r--sys-process/acct/files/acct-6.5.5-no-gets.patch22
-rw-r--r--sys-process/acct/files/acct-6.6.1-cross-compile.patch324
-rw-r--r--sys-process/acct/files/acct-6.6.1-math.patch27
-rw-r--r--sys-process/acct/files/acct-6.6.1-no-gets.patch25
-rw-r--r--sys-process/acct/files/acct-6.6.1-texi-failure.patch32
-rw-r--r--sys-process/acct/files/acct-6.6.2-cross-compile.patch320
-rw-r--r--sys-process/acct/files/acct-6.6.4-cross-compile.patch220
-rw-r--r--sys-process/acct/files/acct.confd13
-rw-r--r--sys-process/acct/files/acct.confd-r111
-rw-r--r--sys-process/acct/files/acct.initd36
-rw-r--r--sys-process/acct/files/acct.initd-r133
-rw-r--r--sys-process/acct/files/acct.initd-r265
-rw-r--r--sys-process/acct/files/acct.logrotate14
-rw-r--r--sys-process/acct/files/acct.logrotate-r118
-rw-r--r--sys-process/acct/files/acct.service14
-rw-r--r--sys-process/acct/metadata.xml8
24 files changed, 1803 insertions, 0 deletions
diff --git a/sys-process/acct/Manifest b/sys-process/acct/Manifest
new file mode 100644
index 000000000000..41f5af32ea36
--- /dev/null
+++ b/sys-process/acct/Manifest
@@ -0,0 +1,29 @@
+AUX acct-6.5.5-cross-compile.patch 8335 SHA256 368cd7d9598c1c63a082b8aa40989b4701fc04b97ccea136ebcc66ab8b0f0e83 SHA512 c30d71f7ef83ec1aea66bebe40eafcce55047b34f26e929ae1a93279c2371a69fca0934eaf3e1e915e451b2ec2d9ab97eab94d1dfe28e18532747d1815030e91 WHIRLPOOL 0e14c899a7d13f2b23e12229f7ef97280d6e9ce52848045bd00558d2738e4f271f6536bbab675ebee0dfa742d540ac86591d7906d3d3e2e3d1a1c0ed7b5d1b2e
+AUX acct-6.5.5-no-gets.patch 779 SHA256 0aa8aac492b2a380c9661362d3731c9827516052c008881182b01b3ca302eece SHA512 adefec843a1339ff1f14c71b2164f1fc77d5f17f053a6da45dfe74851891e89b4a90dda8ef8405b277c9e5f08c18eb6767aae6cc069566526127cd93eba3fd4e WHIRLPOOL 3d7a15bdaaed005c97d9934f09e94594e0e796bb3b4736502e6a77401c8423949d8c1d2caf5e594f2d0c6299d3b032a4c1b025710cb064cf37216707c30d5850
+AUX acct-6.6.1-cross-compile.patch 8519 SHA256 1dfc10e4756657233d4f289e82ef5b9dc8928e75d5425847ae94eb8072455793 SHA512 292a8cf149961c56dd70cdf7a119ae58e563bb42c06873720bd5e0050a88d7d661159d495b0e9171ba2dfe2d96ebbc042144f10a05f6910fd51b767455f33912 WHIRLPOOL b17b622f5a2f2bde8cd25229b26b9f3c33dacd41f9bd731fbf1192bf7fadb842df907f43a949c88bb896c2ec50d3421624bc893824b5fd2bbc9ad1b10619b63e
+AUX acct-6.6.1-math.patch 811 SHA256 5b606fed230e5e9370958187ce34e8a723a8e7b850ed9ea98dc94e6c232f5789 SHA512 68ce8785bbe36600a9768a7e249c0de992b5d46a32924b79499dd97e6e6382d74f235cdb1d083b97aee39017bb0f43cc6e574d169e01b5608f0cbc850fa68803 WHIRLPOOL 78cb77bd25bb28827eb9cec9e96c5f80e1f2557a538e5bda6036939cedef1879b3a6ebf6077379b2e39a09e15caf7531fe09f479e647613302859ef0294492a9
+AUX acct-6.6.1-no-gets.patch 834 SHA256 11c09905818c172ac312b32daaf4991846424db6b924df9cda8c37dae979b36a SHA512 2c3b98c798b751a739a3a48346f4749b6173eb65ce88f578cda67a101ac6342e8a7b9478bab755d60dcd13552928c4976c94d45e2c69ef3980cd6552f0c0b8d7 WHIRLPOOL d15e4004afe887824fec3c14200e81d454eacb648993268f247e568d8808fb5339e604d9c83d4cd1c22806a17cab04418cd499c3e99bbc52c18ca3598fac28d5
+AUX acct-6.6.1-texi-failure.patch 1122 SHA256 2f6d044706014d9571ed0de4b1a10c48164a0f2e1280b85beba0c11a3b7d322f SHA512 de33f73389220b440f484c96ec9ec323a640e420d4659bc09dd8b79da366a11d29631abec2be40f0a8d2b4579435b44a54f8f7f61eff8f785c1c28491213d8e3 WHIRLPOOL 574f0409ce70fab4d83dfde69b33d6255778a872e0613461918b97dd90c68f5830d8201c44b6d25e6322825e98f306369b14be6fa574a672c57e02ac13ed9c26
+AUX acct-6.6.2-cross-compile.patch 8540 SHA256 ad59ba4cb3c69445785a366944b30549a9441b716764b5a1c44f083b43217174 SHA512 3afeac0d0271944da5b2e6c9efe487db979025fbbd563a3e088fbdde76296efa4a6de52660bca0690e3c921d62b8c8b9864f689d1cb1dcbcf52a396eaea931f2 WHIRLPOOL 267cd223e4a52cc6d4c852cd5e229e1a68693455f6137d92bdc217f8320e4f2127b55e17fa728fe25a4426f5c36ed92f812c3aaacfb6f1535444af8e3b2708ea
+AUX acct-6.6.4-cross-compile.patch 6473 SHA256 45f0130b6ec869523fde0a58336d046834e29535f3cac4c249ba421e1fa0d2b4 SHA512 225f96ceb8ae09c149a7c69093d0dd0ca3a791122c22246bd52848fcc9876c2d85e757a9ab354212299779a5fa1d622c6340eceaad0bc4042a4019f4eed5c004 WHIRLPOOL 30164ad0c7edd2c3e22955b5802e16f9bc16dddd0cc23faa314747e9b5498a6ad785b5b08a50b654953d264fce0f6d2822be7d28198e7ab5f8d8a038419e157c
+AUX acct.confd 389 SHA256 03dec915e2f80746a5147f3a6ff34a5ce8d3dc4b0007a318a29c5f9ca91cdb31 SHA512 1d193d675f38ce8360251939ff0fdf89c1ba04244b2f2ee19a4180f180aa464447027dcd532cc044e9da7651c050c42e8bfe6ee350d29be3510395e44790c150 WHIRLPOOL 6298c8a8a8a64774d6fd5543e397c0b1e1f86dc20d440d34a9c6bc23cfd9ab55e59e569a75d2425c4b76d1cf5b407438a00e86057d19a317e4af150ec9617013
+AUX acct.confd-r1 389 SHA256 63b8a38be4404beaa9f0ddce508dc470dac3afa430d8f8a24ea5e1d0baa5e075 SHA512 7d4bfd60f4ef05a55f3e93535c49ad56784f24912fa84991935d3b109e46fb543afaf682fcd085c9183c6747724c9537d25af07799221153eb4659bf5b821992 WHIRLPOOL 94ce14bb6b85e1d13b9a3b16943a83a2b6c63f4c97c7dea37d796c62352e3462ba6a26b03d75a0c457165f4a9120dee9a7d20120d27d8c5d4e1705f8f8d01743
+AUX acct.initd 586 SHA256 6e4cd71f6255881e53a773844901770a0249216d456d1b7d025023a9fe3df003 SHA512 275b0bcbd2f9049d72b7d2699c03265592ac122d7a94f5e8d09bcf7081bcb186e9a52ff8094e1f7de1f275eb0717d19c79269fb583ce35e839fe7121f001f8aa WHIRLPOOL fecee585fbc2455f45ea9f0037b149562e79292ee7d99b9198926ed1024ecba08515a7304a4d30b76ea9faa51fddea3014c648440967f3a5fad4b8e850ea527d
+AUX acct.initd-r1 535 SHA256 66c4dbd1bf0da6e8844f55241c53586de7f11b514d9e5ebddcc0c89042dc0fed SHA512 a688d214cde9e485fa1cf4c251c313460a1d95f000770c1e0ae20b560534f84fc899b104be814386daa310ec860eb48a313d1b98b1554d9bf492feb8a20215e4 WHIRLPOOL 0660a6f597a59ae2e9f90ad1c0e5ef08750d99af12a4bc66a2face238bb4c4079346d13133df3bc065313b00ad71dd5586443c549ab67ec38f34b641b51067ba
+AUX acct.initd-r2 1080 SHA256 2460cf243392ee8c5bdc6b7d552acd7c595ceb74c7a8119a2f91cc2f503d74dd SHA512 1cf6143f65ce2a00646213b40d83d7aa29a206c740f2f6b81dc6674de3fa8a96ed86bcc32fefd58e2934ded17d49a95e40dfe1b805a6e92c35fa75b420a0b2a1 WHIRLPOOL f7d9f8abea825986e0de2ad09a223f04b920bd7fc60c1d2b15f5d0b5e5c821fc46258c8b15dd6173e196e6357792c2111a44f93cb5758f6836c459634ce49b4f
+AUX acct.logrotate 209 SHA256 e3f70c702dd95dc2309688354c08136fad83fdfc28789d6ea5b5ccbe1ea1512f SHA512 a91ac927ce536827eea6c4ce5c454df831d61120ff453582c4e2fa186b1e8ea52792ed529c242e58ce8a575ac5d26bc1a97670880fb51e8c08598d54894fb90e WHIRLPOOL 4a6330ccb4882d30e80c45f22253cdad4658e2f33f3a54aea4745171f1e1ecb9911116c86a5eaaeadfc062584d96eeb8bbee81556f6014cc75b3ff2d807a0b12
+AUX acct.logrotate-r1 304 SHA256 7897bc6985526febbd5a184f3cabdef0247d9845c862001f5ea03127e2d76eae SHA512 54fcb419f433df2a64eb51ecfc8122c4945960ca7d745d7a8816fec441586e15321cdfacb2db1feeec23c66b1b02b4191d3fc53355379a75c2956a00bc743332 WHIRLPOOL fbfe284670001adee5da99a52ff394b0ca5cb30bd3b8833301bae844924d8cc9bb7536965ba5857375d10aa68f7977486f8b3fa9dc0c8eff9e84aa8be5e4d6fe
+AUX acct.service 382 SHA256 468040c3fc5be494ba0f84492048c03b6c5919a24549cb94bd42da30a4483743 SHA512 8c2523526eb3185765eac62676761af6758d0090d68ba48aeacc59c7a45f0722c867fb97d02ff3ceaa8d77637d2b915938d545f7d782e4f7aa46861f25364bd3 WHIRLPOOL df650e7d412d95b1f3253ac1b90f6fa9f7e31d9aef514a3d5f400db57ac55358c0343cbc9810b42de61e5e1b783a615afa8768e0216b1add2fd07ceac79f5826
+DIST acct-6.5.5.tar.gz 747225 SHA256 4163c87b9e92a73a65eaeadc6c41caa4626da782ff26d6e7a945edcc140a6fd5 SHA512 6a36548cfe0e68829c94780aac4053f8a5840c5a704b88a9562758408dc64b4e26965743aec51ef02f7780efcfbf42d20805fecb12a68e7e1f279a1259151fb0 WHIRLPOOL 30c431dfe3af181770e261470090528fd21d41b45a234181ef0f1a62226979d4de38f851b1d5e200feba5b08acf30d2fe18a517f6096f3fcbc8e32dca9630be4
+DIST acct-6.6.1.tar.gz 2869677 SHA256 554515611ef9299012b7510050868a48fc178ce1544947123ab46ec50230ffcb SHA512 4bc3d6b41aeafcf8acfdd020057f1b6f15eea3589981387bca7e57aa8fe71d058e8def97f139dd2c11a1ac39f2d8b95bd103d31caff042cf716dd961b9588f5d WHIRLPOOL 097b7c5f55aac40dd5d63b6ce80a1c2809241f3999c15d5c2c3d8f418f1e51b90ed3c5937655dafd9d702fc72b1d1a6faae870e0c2722c3716e097d5d3b98cd1
+DIST acct-6.6.2.tar.gz 852375 SHA256 8ed47b2f893b08f0d67720880adbb48b835a826c314fa52fd52af1cee6870101 SHA512 5942aa3d1faebb29bd6d6ff97c2ba8525dc5a9c85522c3f549ce0772042d3736e19126ddd7e10fe0681a6ac496b8d3aafda0894577a3b64c59f3b78fc222d2b3 WHIRLPOOL 135be28fb3b99ae5c4fb03d21d73a2bb2659d4e209a1444bb4741ae95761191ac74874f0476d3413c4221e2b321de2adf45240b2335b5cac92083d32ab547ebe
+DIST acct-6.6.4.tar.gz 853273 SHA256 4c15bf2b58b16378bcc83f70e77d4d40ab0b194acf2ebeefdb507f151faa663f SHA512 413aa446caece8fd773c92e2995bbaa034f63dd0ced521815a676c49f118e02982862b9c0ab7e60be5212c87d1e82ba6325bda212cf4857392a068d359a1e2c2 WHIRLPOOL 28c5405da1e19aa0690fef35e11bbae906e1b9f66724584edbc0b444fb138c71a1d0c9cc5738c249061e32ff0c84053168a0ffe743a0bf583395d4b47b4ae89f
+EBUILD acct-6.5.5-r4.ebuild 1169 SHA256 8fb3cfb26d64d6120301e101f572aeb1d4b52d6d3d7d69492830cb874b6beca1 SHA512 666869908d8b461d08ac404d80ffeeb850f200e967a66ecce9caf67c995cfcbc8a995d1c59b3deff92e8ee17ca651fca6c0f6138f1d3183127fd037f5741f704 WHIRLPOOL deb481ed6920a08c133acb37328263a28c23fc7b834374f80d2461e515abee8f7a1f245f2d499e9272cda1d0788e4b3b73b4295eedc73b51428d8c84e58847d1
+EBUILD acct-6.6.1.ebuild 1215 SHA256 30125411aa487ca0adb2bbf971bb06f01b2b6aa0c7e4f5b5be1ed84cbb1a6a5a SHA512 75d43e3cc0e2ffc64db1165a7301d79a881f04ffa7f54aa7dfd9a10bffb28c431ed3ff6f537f445f060d51a3c24656984386bd459d21031aa54edef8c5d90986 WHIRLPOOL 26c761952f061b956514ac6840f0d5da707c117a77d922f56f2b49184252d6ff38eb85c357e2a81338965c6cc319f6f75f02127a9de3929f2a6af033203adc63
+EBUILD acct-6.6.2-r1.ebuild 1091 SHA256 fb7b0c8cdc3dfd935a8024a4ca208840253f3d7713caa2044fe4437768ccc26d SHA512 9b245d213f72bde8e5166b919b36a68b623a982e88829af8ec07645029a3badc11ed51d5e295f05fe6111361e922481bbdeb160bd806d85f373cf1c1a4be235f WHIRLPOOL 1abde0478fb7fbd631405e58e57e08eaa3eb8f6bcf13b8d1a41c98aeb7a273b4406f1fe38ccb8abc0c6398b6bcedd0ac9acd3699dc9245acdca023a25b07bd8e
+EBUILD acct-6.6.2.ebuild 1088 SHA256 6fdd0cf4b81622afff56b67a0fdd91bf3f69bbd602269ef2a09ce91b3f3ad578 SHA512 111fa62f46d1e12b475a8440d2577c5019f7812c33ec95a155ab01a784913231fab963c021f01051bd14f134bd378279bd677325f890183f6d4ff2f7cd553be7 WHIRLPOOL 9dec0e08755aa2fe2cf69b3890430e5df1cb75243eeeaf3e0434582709332d9c3ba5b094303d55606e7d4e7be213688bb8eeabc26aff6d603c7289d3e1774f8f
+EBUILD acct-6.6.4-r1.ebuild 1042 SHA256 1c149b4efa5c4c514d2d7ab4122be7e6034e3439e5b86bd8b18443297b320716 SHA512 e808a7f43f4f7f84d6dcd0bf240d13ec523b2f3d19e107f7908a3fbb8850f8a14e0a6812f3e626c2e81fff63e333f566a6ec3cb95df299733168c4b97c68ef50 WHIRLPOOL b94d98fd8d970f8ed06e3dd269146dfe09b36c0eb2f4534abd5a9f21e56468483904f1a771e0e08a7b8e166b2a50a81998db74abd9d8450fb01f5803e5c92d9c
+EBUILD acct-6.6.4.ebuild 1042 SHA256 39982601726fc79f158ef38ddc3c5ea8f00d987a244e40327889f94f6635f5b3 SHA512 bce6c29bc003e8261bf5c4dcdc985e75e39ae8178cbd4428b652b1b2415873804a0a61005326ec9fe85c96253af2fd1e5d5a7f9e1262929258c6927845c7ea5e WHIRLPOOL e458f9b6896de6ed761b431c01738b79082e9a5321294b352f82a64bda1e73a0a659168619271519db11a80c9775654a798503e8bec2c6597ceffbf3de52e55b
+MISC ChangeLog 3661 SHA256 325261c71d8cbed85afc836dc34eaecbc6f839c57c92779b6bcb173fca5f884d SHA512 7fdd8f00eb2294f6cc348e8d33c1c7b916978e6d38f12f3442a2389c981656ffe26ac7b19d4099833bd9dd70ac924ca4cdf64bc23a6f4a2e34da2cba289b14ac WHIRLPOOL 2ef5644ec756efaf713d302bafe314f18ed2e82794fc5ea859c78892b5a6ae1e3237d8a18a648469b013c731f4d9afb20e6bb2f51c308a6e0b6580ac62775be9
+MISC ChangeLog-2015 11230 SHA256 2f02e6be79718635e526360ba813100d82ff388efb2acf56e2477dbf9fdbd0b8 SHA512 4a2ac2eeeb80ef0325549792d930ff314c82bd48b9ef4798aa758d56601c396c014093496f263b912c4e29f1575f2ee9f4bb7d5014d48e93ebe57daa46b5fe91 WHIRLPOOL 42e69948eea7dcf175b25589d7def9c6dbf7e21129280636cf108351e1b287348c0c4c9f6d49036d85ba32288d7461b7c5187ff07fdae5ba0762e6ecedae739b
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-process/acct/acct-6.5.5-r4.ebuild b/sys-process/acct/acct-6.5.5-r4.ebuild
new file mode 100644
index 000000000000..fbfc364215c2
--- /dev/null
+++ b/sys-process/acct/acct-6.5.5-r4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+inherit eutils autotools systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-6.5.5-cross-compile.patch \
+ "${FILESDIR}"/${PN}-6.5.5-no-gets.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd-r1 acct || die
+ newconfd "${FILESDIR}"/acct.confd acct || die
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate acct || die
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/acct-6.6.1.ebuild b/sys-process/acct/acct-6.6.1.ebuild
new file mode 100644
index 000000000000..f1852b70af1b
--- /dev/null
+++ b/sys-process/acct/acct-6.6.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools base systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cross-compile.patch
+ "${FILESDIR}"/${P}-no-gets.patch
+ "${FILESDIR}"/${P}-texi-failure.patch
+ "${FILESDIR}"/${P}-math.patch
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd acct
+ newconfd "${FILESDIR}"/acct.confd acct
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate acct
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/acct-6.6.2-r1.ebuild b/sys-process/acct/acct-6.6.2-r1.ebuild
new file mode 100644
index 000000000000..22276e67c861
--- /dev/null
+++ b/sys-process/acct/acct-6.6.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools base systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.6.2-cross-compile.patch
+ "${FILESDIR}"/${PN}-6.6.1-no-gets.patch
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ default
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd-r1 acct
+ newconfd "${FILESDIR}"/acct.confd acct
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate acct
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/acct-6.6.2.ebuild b/sys-process/acct/acct-6.6.2.ebuild
new file mode 100644
index 000000000000..95199c408eed
--- /dev/null
+++ b/sys-process/acct/acct-6.6.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools base systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.6.2-cross-compile.patch
+ "${FILESDIR}"/${PN}-6.6.1-no-gets.patch
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ default
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd acct
+ newconfd "${FILESDIR}"/acct.confd acct
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate acct
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/acct-6.6.4-r1.ebuild b/sys-process/acct/acct-6.6.4-r1.ebuild
new file mode 100644
index 000000000000..d363f358de18
--- /dev/null
+++ b/sys-process/acct/acct-6.6.4-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.6.4-cross-compile.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ default
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd-r2 acct
+ newconfd "${FILESDIR}"/acct.confd-r1 acct
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate-r1 psacct
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/acct-6.6.4.ebuild b/sys-process/acct/acct-6.6.4.ebuild
new file mode 100644
index 000000000000..46888474a25d
--- /dev/null
+++ b/sys-process/acct/acct-6.6.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.6.4-cross-compile.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-linux-multiformat
+}
+
+src_install() {
+ default
+ keepdir /var/account
+ newinitd "${FILESDIR}"/acct.initd-r2 acct
+ newconfd "${FILESDIR}"/acct.confd-r1 acct
+ systemd_dounit "${FILESDIR}"/acct.service
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/acct.logrotate-r1 acct
+
+ # sys-apps/sysvinit already provides this
+ rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+ # accton in / is only a temp workaround for #239748
+ dodir /sbin
+ mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}
diff --git a/sys-process/acct/files/acct-6.5.5-cross-compile.patch b/sys-process/acct/files/acct-6.5.5-cross-compile.patch
new file mode 100644
index 000000000000..2fb7bfa7bc25
--- /dev/null
+++ b/sys-process/acct/files/acct-6.5.5-cross-compile.patch
@@ -0,0 +1,323 @@
+https://savannah.gnu.org/patch/?7473
+
+From 8958c3cb7b77ec50d8dae0490d8c80dee798e20d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Fri, 18 Feb 2011 06:13:20 +0100
+Subject: [PATCH] Don't generate files.h at build-time using an execution test.
+
+The *_LOC variables are never used in the build itself, but only in the
+built code; this means that they don't need to be known to ./configure at
+all.
+
+Since the previous method made acct not cross-compilable at all, this is
+much preferred.
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -66,11 +66,6 @@
+ SYS_AC = @SYS_AC@
+ SYS_SA = @SYS_SA@
+
+-WTMP_FILE_LOC = @WTMP_FILE_LOC@
+-ACCT_FILE_LOC = @ACCT_FILE_LOC@
+-SAVACCT_FILE_LOC = @SAVACCT_FILE_LOC@
+-USRACCT_FILE_LOC = @USRACCT_FILE_LOC@
+-
+ compare-ac: ac
+ @echo
+ @echo "Running tests for ac"
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,101 +159,6 @@
+ AC_EGREP_HEADER([comp_t],[sys/acct.h],[AC_DEFINE(HAVE_COMP_T, 1, Define if <sys/acct.h> uses the COMP_T type.)])
+ ) ]
+ )
+-dnl
+-dnl find out where utmp/pacct are stored
+-dnl
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <stdint.h> /* GNU/kFreeBSD */
+-#include <sys/acct.h>
+-#include <utmp.h>
+-
+-#ifndef WTMP_FILE
+-# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__)
+-# define WTMP_FILE "/var/log/wtmp"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define WTMP_FILE "/var/adm/wtmp"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# else
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef ACCT_FILE
+-# if defined(__FreeBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__)
+-# define ACCT_FILE "/var/account/pacct"
+-# else
+-# if defined(__NetBSD__)
+-# define ACCT_FILE "/var/account/acct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define ACCT_FILE "/var/adm/pacct"
+-# else
+-# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
+-# define ACCT_FILE "/usr/adm/pacct"
+-# else
+-# define ACCT_FILE "/usr/adm/acct"
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef SAVACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__)
+-# define SAVACCT_FILE "/var/account/savacct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define SAVACCT_FILE "/var/adm/savacct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# else
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef USRACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__)
+-# define USRACCT_FILE "/var/account/usracct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define USRACCT_FILE "/var/adm/usracct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# else
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-main ()
+-{
+- FILE *fp;
+- fp = fopen ("locs", "w");
+- fprintf (fp, "WTMP_FILE_LOC=%s\n", WTMP_FILE);
+- fprintf (fp, "ACCT_FILE_LOC=%s\n", ACCT_FILE);
+- fprintf (fp, "SAVACCT_FILE_LOC=%s\n", SAVACCT_FILE);
+- fprintf (fp, "USRACCT_FILE_LOC=%s\n", USRACCT_FILE);
+- fclose (fp);
+- exit(0);
+-}
+-]])],[. ./locs; rm locs],[echo "Error -- could not locate your wtmp and acct files."; exit 1],[echo "Sorry -- you cannot cross-compile this package (FIXME)."; exit 1 ])
+ AC_TYPE_PID_T dnl for sys/acct.h
+ AC_TYPE_UID_T dnl same as above
+ AC_TYPE_SIZE_T
+@@ -366,12 +271,6 @@
+ AC_SUBST(LASTCOMM_MAN)
+ AC_SUBST(SA_MAN)
+
+-dnl Substitutions for file locations
+-AC_SUBST(WTMP_FILE_LOC)
+-AC_SUBST(ACCT_FILE_LOC)
+-AC_SUBST(SAVACCT_FILE_LOC)
+-AC_SUBST(USRACCT_FILE_LOC)
+-
+ dnl Dump the makefiles and etc.
+-AC_CONFIG_FILES([Makefile lib/Makefile files.h version.h])
++AC_CONFIG_FILES([Makefile lib/Makefile version.h])
+ AC_OUTPUT
+--- /dev/null
++++ b/files.h
+@@ -0,0 +1,123 @@
++/* files.h
++ *
++ * file locations
++ *
++ */
++
++#ifndef FILES_H
++#define FILES_H
++
++#include "config.h"
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <stdint.h> /* GNU/kFreeBSD */
++
++#ifdef LINUX_MULTIFORMAT
++# include "linux-acct.h"
++#else
++# include <stdint.h> /* GNU/kFreeBSD */
++# include <sys/acct.h>
++# if defined __FreeBSD__ || defined __FreeBSD_kernel__
++# include <osreldate.h>
++# if __FreeBSD_kernel__
++# define __FreeBSD_version __FreeBSD_kernel_version
++# endif /* __FreeBSD_kernel__ */
++# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
++# define acct acctv2
++# define ac_flag ac_flagx
++# endif
++# endif
++#endif
++
++#include <utmp.h>
++
++#ifndef WTMP_FILE
++# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define WTMP_FILE "/var/log/wtmp"
++# else
++# if defined(sun) || defined(AMIX)
++# define WTMP_FILE "/var/adm/wtmp"
++# else
++# if defined(sgi) || defined(SVR4)
++# define WTMP_FILE "/usr/adm/wtmp"
++# else
++# define WTMP_FILE "/usr/adm/wtmp"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef ACCT_FILE
++# if defined(__FreeBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define ACCT_FILE "/var/account/pacct"
++# else
++# if defined(__NetBSD__)
++# define ACCT_FILE "/var/account/acct"
++# else
++# if defined(sun) || defined(AMIX)
++# define ACCT_FILE "/var/adm/pacct"
++# else
++# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
++# define ACCT_FILE "/usr/adm/pacct"
++# else
++# define ACCT_FILE "/usr/adm/acct"
++# endif
++# endif
++# endif
++# endif
++#endif
++
++#ifndef SAVACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define SAVACCT_FILE "/var/account/savacct"
++# else
++# if defined(sun) || defined(AMIX)
++# define SAVACCT_FILE "/var/adm/savacct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define SAVACCT_FILE "/usr/adm/savacct"
++# else
++# define SAVACCT_FILE "/usr/adm/savacct"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef USRACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define USRACCT_FILE "/var/account/usracct"
++# else
++# if defined(sun) || defined(AMIX)
++# define USRACCT_FILE "/var/adm/usracct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define USRACCT_FILE "/usr/adm/usracct"
++# else
++# define USRACCT_FILE "/usr/adm/usracct"
++# endif
++# endif
++# endif
++#endif
++
++#define WTMP_FILE_LOC WTMP_FILE
++#define ACCT_FILE_LOC ACCT_FILE
++#define SAVACCT_FILE_LOC SAVACCT_FILE
++#define USRACCT_FILE_LOC USRACCT_FILE
++
++/* Workaround for a kernel includes problem */
++#if defined(__linux__) && defined(__alpha__)
++#undef AHZ
++#define AHZ 1024
++#endif
++
++#ifndef AHZ
++#define AHZ 64
++#endif
++
++#endif /* ! FILES_H */
+--- a/files.h.in
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* files.h.in
+- *
+- * file locations
+- *
+- */
+-
+-#ifndef FILES_H
+-#define FILES_H
+-
+-#include "config.h"
+-
+-#include <sys/types.h>
+-
+-#ifdef LINUX_MULTIFORMAT
+-# include "linux-acct.h"
+-#else
+-# include <stdint.h> /* GNU/kFreeBSD */
+-# include <sys/acct.h>
+-# if defined __FreeBSD__ || defined __FreeBSD_kernel__
+-# include <osreldate.h>
+-# if __FreeBSD_kernel__
+-# define __FreeBSD_version __FreeBSD_kernel_version
+-# endif /* __FreeBSD_kernel__ */
+-# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
+-# define acct acctv2
+-# define ac_flag ac_flagx
+-# endif
+-# endif
+-#endif
+-
+-#include <utmp.h>
+-
+-#define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
+-#define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
+-#define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
+-#define USRACCT_FILE_LOC "@USRACCT_FILE_LOC@"
+-
+-/* Workaround for a kernel includes problem */
+-#if defined(__linux__) && defined(__alpha__)
+-#undef AHZ
+-#define AHZ 1024
+-#endif
+-
+-#ifndef AHZ
+-#define AHZ 64
+-#endif
+-
+-#endif /* ! FILES_H */
diff --git a/sys-process/acct/files/acct-6.5.5-no-gets.patch b/sys-process/acct/files/acct-6.5.5-no-gets.patch
new file mode 100644
index 000000000000..3478b66de9db
--- /dev/null
+++ b/sys-process/acct/files/acct-6.5.5-no-gets.patch
@@ -0,0 +1,22 @@
+hack until acct pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -125,7 +125,6 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/sys-process/acct/files/acct-6.6.1-cross-compile.patch b/sys-process/acct/files/acct-6.6.1-cross-compile.patch
new file mode 100644
index 000000000000..67ac7d56fad0
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.1-cross-compile.patch
@@ -0,0 +1,324 @@
+https://savannah.gnu.org/patch/?7473
+
+From 8958c3cb7b77ec50d8dae0490d8c80dee798e20d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Fri, 18 Feb 2011 06:13:20 +0100
+Subject: [PATCH] Don't generate files.h at build-time using an execution test.
+
+The *_LOC variables are never used in the build itself, but only in the
+built code; this means that they don't need to be known to ./configure at
+all.
+
+Since the previous method made acct not cross-compilable at all, this is
+much preferred.
+
+--- acct-6.6.1/configure.ac
++++ acct-6.6.1/configure.ac
+@@ -228,102 +228,6 @@
+ AC_EGREP_HEADER([comp_t],[sys/acct.h],[AC_DEFINE(HAVE_COMP_T, 1, Define if <sys/acct.h> uses the COMP_T type.)])
+ ) ]
+ )
+-dnl
+-dnl find out where utmp/pacct are stored
+-dnl
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <stdint.h> /* GNU/kFreeBSD */
+-#include <sys/acct.h>
+-#include <utmp.h>
+-
+-#ifndef WTMP_FILE
+-# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define WTMP_FILE "/var/log/account/wtmp"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define WTMP_FILE "/var/adm/wtmp"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# else
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef ACCT_FILE
+-# if defined(__FreeBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define ACCT_FILE "/var/log/account/pacct"
+-# else
+-# if defined(__NetBSD__)
+-# define ACCT_FILE "/var/log/account/acct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define ACCT_FILE "/var/adm/pacct"
+-# else
+-# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
+-# define ACCT_FILE "/usr/adm/pacct"
+-# else
+-# define ACCT_FILE "/usr/adm/acct"
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef SAVACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define SAVACCT_FILE "/var/log/account/savacct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define SAVACCT_FILE "/var/adm/savacct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# else
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef USRACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define USRACCT_FILE "/var/log/account/usracct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define USRACCT_FILE "/var/adm/usracct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# else
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-main ()
+-{
+- FILE *fp;
+- fp = fopen ("locs", "w");
+- fprintf (fp, "WTMP_FILE_LOC=%s\n", WTMP_FILE);
+- fprintf (fp, "ACCT_FILE_LOC=%s\n", ACCT_FILE);
+- fprintf (fp, "SAVACCT_FILE_LOC=%s\n", SAVACCT_FILE);
+- fprintf (fp, "USRACCT_FILE_LOC=%s\n", USRACCT_FILE);
+- fclose (fp);
+- exit(0);
+-}
+-]])],[. ./locs; rm locs],[echo "Error -- could not locate your wtmp and acct files."; exit 1],[echo "Sorry -- you cannot cross-compile this package (FIXME)."; exit 1 ])
+-
+ dnl types
+ AC_TYPE_PID_T dnl for sys/acct.h
+ AC_TYPE_UID_T dnl same as above
+@@ -366,12 +270,6 @@
+ AC_SUBST(LASTCOMM_MAN)
+ AC_SUBST(SA_MAN)
+
+-dnl Substitutions for file locations
+-AC_SUBST(WTMP_FILE_LOC)
+-AC_SUBST(ACCT_FILE_LOC)
+-AC_SUBST(SAVACCT_FILE_LOC)
+-AC_SUBST(USRACCT_FILE_LOC)
+-
+ dnl Dump the makefiles and etc.
+-AC_CONFIG_FILES([Makefile lib/Makefile files.h version.h])
++AC_CONFIG_FILES([Makefile lib/Makefile version.h])
+ AC_OUTPUT
+--- acct-6.6.1/files.h
++++ acct-6.6.1/files.h
+@@ -0,0 +1,123 @@
++/* files.h
++ *
++ * file locations
++ *
++ */
++
++#ifndef FILES_H
++#define FILES_H
++
++#include "config.h"
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <stdint.h> /* GNU/kFreeBSD */
++
++#ifdef LINUX_MULTIFORMAT
++# include "linux-acct.h"
++#else
++# include <stdint.h> /* GNU/kFreeBSD */
++# include <sys/acct.h>
++# if defined __FreeBSD__ || defined __FreeBSD_kernel__
++# include <osreldate.h>
++# if __FreeBSD_kernel__
++# define __FreeBSD_version __FreeBSD_kernel_version
++# endif /* __FreeBSD_kernel__ */
++# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
++# define acct acctv2
++# define ac_flag ac_flagx
++# endif
++# endif
++#endif
++
++#include <utmp.h>
++
++#ifndef WTMP_FILE
++# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define WTMP_FILE "/var/log/wtmp"
++# else
++# if defined(sun) || defined(AMIX)
++# define WTMP_FILE "/var/adm/wtmp"
++# else
++# if defined(sgi) || defined(SVR4)
++# define WTMP_FILE "/usr/adm/wtmp"
++# else
++# define WTMP_FILE "/usr/adm/wtmp"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef ACCT_FILE
++# if defined(__FreeBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define ACCT_FILE "/var/account/pacct"
++# else
++# if defined(__NetBSD__)
++# define ACCT_FILE "/var/account/acct"
++# else
++# if defined(sun) || defined(AMIX)
++# define ACCT_FILE "/var/adm/pacct"
++# else
++# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
++# define ACCT_FILE "/usr/adm/pacct"
++# else
++# define ACCT_FILE "/usr/adm/acct"
++# endif
++# endif
++# endif
++# endif
++#endif
++
++#ifndef SAVACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define SAVACCT_FILE "/var/account/savacct"
++# else
++# if defined(sun) || defined(AMIX)
++# define SAVACCT_FILE "/var/adm/savacct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define SAVACCT_FILE "/usr/adm/savacct"
++# else
++# define SAVACCT_FILE "/usr/adm/savacct"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef USRACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__)
++# define USRACCT_FILE "/var/account/usracct"
++# else
++# if defined(sun) || defined(AMIX)
++# define USRACCT_FILE "/var/adm/usracct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define USRACCT_FILE "/usr/adm/usracct"
++# else
++# define USRACCT_FILE "/usr/adm/usracct"
++# endif
++# endif
++# endif
++#endif
++
++#define WTMP_FILE_LOC WTMP_FILE
++#define ACCT_FILE_LOC ACCT_FILE
++#define SAVACCT_FILE_LOC SAVACCT_FILE
++#define USRACCT_FILE_LOC USRACCT_FILE
++
++/* Workaround for a kernel includes problem */
++#if defined(__linux__) && defined(__alpha__)
++#undef AHZ
++#define AHZ 1024
++#endif
++
++#ifndef AHZ
++#define AHZ 64
++#endif
++
++#endif /* ! FILES_H */
+--- acct-6.6.1/files.h.in
++++ acct-6.6.1/files.h.in
+@@ -1,48 +0,0 @@
+-/* files.h.in
+- *
+- * file locations
+- *
+- */
+-
+-#ifndef FILES_H
+-#define FILES_H
+-
+-#include "config.h"
+-
+-#include <sys/types.h>
+-
+-#ifdef LINUX_MULTIFORMAT
+-# include "linux-acct.h"
+-#else
+-# include <stdint.h> /* GNU/kFreeBSD */
+-# include <sys/acct.h>
+-# if defined __FreeBSD__ || defined __FreeBSD_kernel__
+-# include <osreldate.h>
+-# if __FreeBSD_kernel__
+-# define __FreeBSD_version __FreeBSD_kernel_version
+-# endif /* __FreeBSD_kernel__ */
+-# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
+-# define acct acctv2
+-# define ac_flag ac_flagx
+-# endif
+-# endif
+-#endif
+-
+-#include <utmp.h>
+-
+-#define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
+-#define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
+-#define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
+-#define USRACCT_FILE_LOC "@USRACCT_FILE_LOC@"
+-
+-/* Workaround for a kernel includes problem */
+-#if defined(__linux__) && defined(__alpha__)
+-#undef AHZ
+-#define AHZ 1024
+-#endif
+-
+-#ifndef AHZ
+-#define AHZ 64
+-#endif
+-
+-#endif /* ! FILES_H */
+--- acct-6.6.1/Makefile.am
++++ acct-6.6.1/Makefile.am
+@@ -66,11 +66,6 @@
+ SYS_AC = @SYS_AC@
+ SYS_SA = @SYS_SA@
+
+-WTMP_FILE_LOC = @WTMP_FILE_LOC@
+-ACCT_FILE_LOC = @ACCT_FILE_LOC@
+-SAVACCT_FILE_LOC = @SAVACCT_FILE_LOC@
+-USRACCT_FILE_LOC = @USRACCT_FILE_LOC@
+-
+ compare-ac: ac
+ @echo
+ @echo "Running tests for ac"
diff --git a/sys-process/acct/files/acct-6.6.1-math.patch b/sys-process/acct/files/acct-6.6.1-math.patch
new file mode 100644
index 000000000000..a1d6fe72e758
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.1-math.patch
@@ -0,0 +1,27 @@
+https://savannah.gnu.org/bugs/?42973
+https://bugs.gentoo.org/519552
+
+these files use frexp/ldexp which is in -lm
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,6 +26,7 @@ accton_SOURCES = accton.c common.c
+
+ dump_acct_SOURCES = dump-acct.c common.c file_rd.c \
+ pacct_rd.c
++dump_acct_LDADD = $(LDADD) -lm
+
+ dump_utmp_SOURCES = dump-utmp.c common.c file_rd.c \
+ utmp_rd.c
+@@ -37,9 +38,11 @@ last_SOURCES = last.c common.c file_rd.c hashtab.c \
+
+ lastcomm_SOURCES = lastcomm.c common.c dev_hash.c file_rd.c \
+ hashtab.c pacct_rd.c uid_hash.c
++lastcomm_LDADD = $(LDADD) -lm
+
+ sa_SOURCES = sa.c common.c file_rd.c hashtab.c \
+ pacct_rd.c uid_hash.c
++sa_LDADD = $(LDADD) -lm
+
+ noinst_HEADERS = common.h config.h dev_hash.h file_rd.h hashtab.h \
+ pacct_rd.h uid_hash.h utmp_rd.h al_share.cpp linux-acct.h
diff --git a/sys-process/acct/files/acct-6.6.1-no-gets.patch b/sys-process/acct/files/acct-6.6.1-no-gets.patch
new file mode 100644
index 000000000000..f2f83975d587
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.1-no-gets.patch
@@ -0,0 +1,25 @@
+hack until acct pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- acct-6.6.1/lib/stdio.in.h
++++ acct-6.6.1/lib/stdio.in.h
+@@ -699,10 +699,6 @@
+ so any use of gets warrants an unconditional warning; besides, C11
+ removed it. */
+ #undef gets
+-#if HAVE_RAW_DECL_GETS
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+-#endif
+-
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+ struct obstack;
diff --git a/sys-process/acct/files/acct-6.6.1-texi-failure.patch b/sys-process/acct/files/acct-6.6.1-texi-failure.patch
new file mode 100644
index 000000000000..aa9f3c3586b8
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.1-texi-failure.patch
@@ -0,0 +1,32 @@
+Description: Fix FTBFS with new texinfo.
+Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
+
+--- acct-6.5.5.orig/accounting.texi
++++ acct-6.5.5/accounting.texi
+@@ -66,7 +66,7 @@ approved by the Foundation.
+ @end titlepage
+
+ @c ----------------------------------------------------------------------
+-@ifinfo
++@ifnottex
+ @node Top, Preface, (dir), (dir)
+
+ Welcome to the GNU Accounting Utilities! If you don't have a clue about
+@@ -77,7 +77,7 @@ program's name.
+ This is Edition @value{EDITION} of the documentation, updated
+ @value{UPDATED} for version @value{VERSION} of the GNU Accounting
+ Utilities.
+-@end ifinfo
++@end ifnottex
+
+ @menu
+ * Preface:: general information about the accounting utilities
+@@ -468,7 +468,7 @@ overhead, it is forseeable that the entr
+ wrong order. GNU @code{ac} automatically compensates for this, but some
+ other @code{ac}s may not... beware.
+
+-@unnumberedsubsubsec The FTP Problem
++@unnumberedsubsec The FTP Problem
+
+ I've tested the standard @code{ac} in Ultrix 4.2 (DECstation/DECsystem),
+ SunOS 4.1.1 (Sun3, Sun4, Sparc), Mach 2.5 (Omron/Luna), and DomainOS
diff --git a/sys-process/acct/files/acct-6.6.2-cross-compile.patch b/sys-process/acct/files/acct-6.6.2-cross-compile.patch
new file mode 100644
index 000000000000..70b0556fd486
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.2-cross-compile.patch
@@ -0,0 +1,320 @@
+https://savannah.gnu.org/patch/?7473
+
+From 8958c3cb7b77ec50d8dae0490d8c80dee798e20d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Fri, 18 Feb 2011 06:13:20 +0100
+Subject: [PATCH] Don't generate files.h at build-time using an execution test.
+
+The *_LOC variables are never used in the build itself, but only in the
+built code; this means that they don't need to be known to ./configure at
+all.
+
+Since the previous method made acct not cross-compilable at all, this is
+much preferred.
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,11 +69,6 @@ SYS_LASTCOMM = @SYS_LASTCOMM@
+ SYS_AC = @SYS_AC@
+ SYS_SA = @SYS_SA@
+
+-WTMP_FILE_LOC = @WTMP_FILE_LOC@
+-ACCT_FILE_LOC = @ACCT_FILE_LOC@
+-SAVACCT_FILE_LOC = @SAVACCT_FILE_LOC@
+-USRACCT_FILE_LOC = @USRACCT_FILE_LOC@
+-
+ compare-ac: ac
+ @echo
+ @echo "Running tests for ac"
+--- a/configure.ac
++++ b/configure.ac
+@@ -229,101 +229,6 @@ AC_CHECK_HEADER(sys/acct.h,
+ AC_EGREP_HEADER([comp_t],[sys/acct.h],[AC_DEFINE(HAVE_COMP_T, 1, Define if <sys/acct.h> uses the COMP_T type.)])
+ ) ]
+ )
+-dnl
+-dnl find out where utmp/pacct are stored
+-dnl
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <stdint.h> /* GNU/kFreeBSD */
+-#include <sys/acct.h>
+-#include <utmp.h>
+-
+-#ifndef WTMP_FILE
+-# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define WTMP_FILE "/var/log/account/wtmp"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define WTMP_FILE "/var/adm/wtmp"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# else
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef ACCT_FILE
+-# if defined(__FreeBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define ACCT_FILE "/var/log/account/pacct"
+-# else
+-# if defined(__NetBSD__)
+-# define ACCT_FILE "/var/log/account/acct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define ACCT_FILE "/var/adm/pacct"
+-# else
+-# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
+-# define ACCT_FILE "/usr/adm/pacct"
+-# else
+-# define ACCT_FILE "/usr/adm/acct"
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef SAVACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define SAVACCT_FILE "/var/log/account/savacct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define SAVACCT_FILE "/var/adm/savacct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# else
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef USRACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define USRACCT_FILE "/var/log/account/usracct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define USRACCT_FILE "/var/adm/usracct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# else
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-main ()
+-{
+- FILE *fp;
+- fp = fopen ("locs", "w");
+- fprintf (fp, "WTMP_FILE_LOC=%s\n", WTMP_FILE);
+- fprintf (fp, "ACCT_FILE_LOC=%s\n", ACCT_FILE);
+- fprintf (fp, "SAVACCT_FILE_LOC=%s\n", SAVACCT_FILE);
+- fprintf (fp, "USRACCT_FILE_LOC=%s\n", USRACCT_FILE);
+- fclose (fp);
+- exit(0);
+-}
+-]])],[. ./locs; rm locs],[echo "Error -- could not locate your wtmp and acct files."; exit 1],[echo "Sorry -- you cannot cross-compile this package (FIXME)."; exit 1 ])
+
+ dnl types
+ AC_TYPE_PID_T dnl for sys/acct.h
+@@ -367,12 +272,6 @@ AC_SUBST(ACCTON_MAN)
+ AC_SUBST(LASTCOMM_MAN)
+ AC_SUBST(SA_MAN)
+
+-dnl Substitutions for file locations
+-AC_SUBST(WTMP_FILE_LOC)
+-AC_SUBST(ACCT_FILE_LOC)
+-AC_SUBST(SAVACCT_FILE_LOC)
+-AC_SUBST(USRACCT_FILE_LOC)
+-
+ dnl Dump the makefiles and etc.
+-AC_CONFIG_FILES([Makefile lib/Makefile files.h version.h])
++AC_CONFIG_FILES([Makefile lib/Makefile version.h])
+ AC_OUTPUT
+--- /dev/null
++++ b/files.h
+@@ -0,0 +1,120 @@
++/* files.h.in
++ *
++ * file locations
++ *
++ */
++
++#ifndef FILES_H
++#define FILES_H
++
++#include "config.h"
++
++#include <sys/types.h>
++
++#ifdef LINUX_MULTIFORMAT
++# include "linux-acct.h"
++#else
++# include <stdint.h> /* GNU/kFreeBSD */
++# include <sys/acct.h>
++# if defined __FreeBSD__ || defined __FreeBSD_kernel__
++# include <osreldate.h>
++# if defined __FreeBSD_kernel__
++# define __FreeBSD_version __FreeBSD_kernel_version
++# endif /* __FreeBSD_kernel__ */
++# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
++# define acct acctv2
++# define ac_flag ac_flagx
++# endif
++# endif
++#endif
++
++#include <utmp.h>
++
++#ifndef WTMP_FILE
++# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define WTMP_FILE "/var/log/account/wtmp"
++# else
++# if defined(sun) || defined(AMIX)
++# define WTMP_FILE "/var/adm/wtmp"
++# else
++# if defined(sgi) || defined(SVR4)
++# define WTMP_FILE "/usr/adm/wtmp"
++# else
++# define WTMP_FILE "/usr/adm/wtmp"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef ACCT_FILE
++# if defined(__FreeBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define ACCT_FILE "/var/log/account/pacct"
++# else
++# if defined(__NetBSD__)
++# define ACCT_FILE "/var/log/account/acct"
++# else
++# if defined(sun) || defined(AMIX)
++# define ACCT_FILE "/var/adm/pacct"
++# else
++# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
++# define ACCT_FILE "/usr/adm/pacct"
++# else
++# define ACCT_FILE "/usr/adm/acct"
++# endif
++# endif
++# endif
++# endif
++#endif
++
++#ifndef SAVACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define SAVACCT_FILE "/var/log/account/savacct"
++# else
++# if defined(sun) || defined(AMIX)
++# define SAVACCT_FILE "/var/adm/savacct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define SAVACCT_FILE "/usr/adm/savacct"
++# else
++# define SAVACCT_FILE "/usr/adm/savacct"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef USRACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define USRACCT_FILE "/var/log/account/usracct"
++# else
++# if defined(sun) || defined(AMIX)
++# define USRACCT_FILE "/var/adm/usracct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define USRACCT_FILE "/usr/adm/usracct"
++# else
++# define USRACCT_FILE "/usr/adm/usracct"
++# endif
++# endif
++# endif
++#endif
++
++#define WTMP_FILE_LOC WTMP_FILE
++#define ACCT_FILE_LOC ACCT_FILE
++#define SAVACCT_FILE_LOC SAVACCT_FILE
++#define USRACCT_FILE_LOC USRACCT_FILE
++
++/* Workaround for a kernel includes problem */
++#if defined(__linux__) && defined(__alpha__)
++#undef AHZ
++#define AHZ 1024
++#endif
++
++#ifndef AHZ
++#define AHZ 64
++#endif
++
++#endif /* ! FILES_H */
+--- a/files.h.in
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* files.h.in
+- *
+- * file locations
+- *
+- */
+-
+-#ifndef FILES_H
+-#define FILES_H
+-
+-#include "config.h"
+-
+-#include <sys/types.h>
+-
+-#ifdef LINUX_MULTIFORMAT
+-# include "linux-acct.h"
+-#else
+-# include <stdint.h> /* GNU/kFreeBSD */
+-# include <sys/acct.h>
+-# if defined __FreeBSD__ || defined __FreeBSD_kernel__
+-# include <osreldate.h>
+-# if defined __FreeBSD_kernel__
+-# define __FreeBSD_version __FreeBSD_kernel_version
+-# endif /* __FreeBSD_kernel__ */
+-# if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
+-# define acct acctv2
+-# define ac_flag ac_flagx
+-# endif
+-# endif
+-#endif
+-
+-#include <utmp.h>
+-
+-#define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
+-#define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
+-#define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
+-#define USRACCT_FILE_LOC "@USRACCT_FILE_LOC@"
+-
+-/* Workaround for a kernel includes problem */
+-#if defined(__linux__) && defined(__alpha__)
+-#undef AHZ
+-#define AHZ 1024
+-#endif
+-
+-#ifndef AHZ
+-#define AHZ 64
+-#endif
+-
+-#endif /* ! FILES_H */
diff --git a/sys-process/acct/files/acct-6.6.4-cross-compile.patch b/sys-process/acct/files/acct-6.6.4-cross-compile.patch
new file mode 100644
index 000000000000..c4938d956dd3
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.4-cross-compile.patch
@@ -0,0 +1,220 @@
+Don't generate files.h at build-time using an execution test.
+
+The *_LOC variables are never used in the build itself, but only in the
+built code; this means that they don't need to be known to ./configure at
+all.
+
+Since the previous method made acct not cross-compilable at all, this is
+much preferred.
+
+Author: Diego Elio Pettenò <flameeyes@gmail.com>
+Upstream: https://savannah.gnu.org/patch/?7473
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,11 +69,6 @@ SYS_LASTCOMM = @SYS_LASTCOMM@
+ SYS_AC = @SYS_AC@
+ SYS_SA = @SYS_SA@
+
+-WTMP_FILE_LOC = @WTMP_FILE_LOC@
+-ACCT_FILE_LOC = @ACCT_FILE_LOC@
+-SAVACCT_FILE_LOC = @SAVACCT_FILE_LOC@
+-USRACCT_FILE_LOC = @USRACCT_FILE_LOC@
+-
+ compare-ac: ac
+ @echo
+ @echo "Running tests for ac"
+--- a/configure.ac
++++ b/configure.ac
+@@ -229,97 +229,6 @@ AC_CHECK_HEADER(sys/acct.h,
+ AC_EGREP_HEADER([comp_t],[sys/acct.h],[AC_DEFINE(HAVE_COMP_T, 1, Define if <sys/acct.h> uses the COMP_T type.)])
+ ) ]
+ )
+-dnl
+-dnl find out where utmp/pacct are stored
+-dnl
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <stdint.h> /* GNU/kFreeBSD */
+-#include <sys/acct.h>
+-#include <utmp.h>
+-
+-#ifndef WTMP_FILE
+-# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define WTMP_FILE "/var/log/account/wtmp"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define WTMP_FILE "/var/adm/wtmp"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# else
+-# define WTMP_FILE "/usr/adm/wtmp"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef ACCT_FILE
+-# if defined(__FreeBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define ACCT_FILE "/var/log/account/pacct"
+-# else
+-# if defined(__NetBSD__)
+-# define ACCT_FILE "/var/log/account/acct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define ACCT_FILE "/var/adm/pacct"
+-# else
+-# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
+-# define ACCT_FILE "/usr/adm/pacct"
+-# else
+-# define ACCT_FILE "/usr/adm/acct"
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef SAVACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define SAVACCT_FILE "/var/log/account/savacct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define SAVACCT_FILE "/var/adm/savacct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# else
+-# define SAVACCT_FILE "/usr/adm/savacct"
+-# endif
+-# endif
+-# endif
+-#endif
+-
+-#ifndef USRACCT_FILE
+-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+- || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
+-# define USRACCT_FILE "/var/log/account/usracct"
+-# else
+-# if defined(sun) || defined(AMIX)
+-# define USRACCT_FILE "/var/adm/usracct"
+-# else
+-# if defined(sgi) || defined(SVR4)
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# else
+-# define USRACCT_FILE "/usr/adm/usracct"
+-# endif
+-# endif
+-# endif
+-#endif
+-]], [[
+- FILE *fp;
+- fp = fopen ("locs", "w");
+- fprintf (fp, "WTMP_FILE_LOC=%s\n", WTMP_FILE);
+- fprintf (fp, "ACCT_FILE_LOC=%s\n", ACCT_FILE);
+- fprintf (fp, "SAVACCT_FILE_LOC=%s\n", SAVACCT_FILE);
+- fprintf (fp, "USRACCT_FILE_LOC=%s\n", USRACCT_FILE);
+- fclose (fp);
+-]])],[. ./locs; rm locs],[echo "Error -- could not locate your wtmp and acct files."; exit 1],[echo "Sorry -- you cannot cross-compile this package (FIXME)."; exit 1 ])
+
+ dnl types
+ AC_TYPE_PID_T dnl for sys/acct.h
+@@ -363,12 +272,6 @@ AC_SUBST(ACCTON_MAN)
+ AC_SUBST(LASTCOMM_MAN)
+ AC_SUBST(SA_MAN)
+
+-dnl Substitutions for file locations
+-AC_SUBST(WTMP_FILE_LOC)
+-AC_SUBST(ACCT_FILE_LOC)
+-AC_SUBST(SAVACCT_FILE_LOC)
+-AC_SUBST(USRACCT_FILE_LOC)
+-
+ dnl Dump the makefiles and etc.
+ AC_CONFIG_FILES([Makefile lib/Makefile files.h version.h])
+ AC_OUTPUT
+--- a/files.h.in
++++ b/files.h.in
+@@ -30,6 +30,78 @@
+
+ #include <utmp.h>
+
++#ifndef WTMP_FILE
++# if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define WTMP_FILE "/var/log/account/wtmp"
++# else
++# if defined(sun) || defined(AMIX)
++# define WTMP_FILE "/var/adm/wtmp"
++# else
++# if defined(sgi) || defined(SVR4)
++# define WTMP_FILE "/usr/adm/wtmp"
++# else
++# define WTMP_FILE "/usr/adm/wtmp"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef ACCT_FILE
++# if defined(__FreeBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define ACCT_FILE "/var/log/account/pacct"
++# else
++# if defined(__NetBSD__)
++# define ACCT_FILE "/var/log/account/acct"
++# else
++# if defined(sun) || defined(AMIX)
++# define ACCT_FILE "/var/adm/pacct"
++# else
++# if defined(sgi) || defined(SVR4) || defined(M_XENIX)
++# define ACCT_FILE "/usr/adm/pacct"
++# else
++# define ACCT_FILE "/usr/adm/acct"
++# endif
++# endif
++# endif
++# endif
++#endif
++
++#ifndef SAVACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define SAVACCT_FILE "/var/log/account/savacct"
++# else
++# if defined(sun) || defined(AMIX)
++# define SAVACCT_FILE "/var/adm/savacct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define SAVACCT_FILE "/usr/adm/savacct"
++# else
++# define SAVACCT_FILE "/usr/adm/savacct"
++# endif
++# endif
++# endif
++#endif
++
++#ifndef USRACCT_FILE
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
++ || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
++# define USRACCT_FILE "/var/log/account/usracct"
++# else
++# if defined(sun) || defined(AMIX)
++# define USRACCT_FILE "/var/adm/usracct"
++# else
++# if defined(sgi) || defined(SVR4)
++# define USRACCT_FILE "/usr/adm/usracct"
++# else
++# define USRACCT_FILE "/usr/adm/usracct"
++# endif
++# endif
++# endif
++#endif
++
+ #define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
+ #define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
+ #define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
diff --git a/sys-process/acct/files/acct.confd b/sys-process/acct/files/acct.confd
new file mode 100644
index 000000000000..133efabcf62d
--- /dev/null
+++ b/sys-process/acct/files/acct.confd
@@ -0,0 +1,13 @@
+# /etc/conf.d/acct
+
+# ACCT_LOG specifies the accounting logging file.
+# Remember to create it manually if it doesn't yet exist.
+
+ACCT_LOG="/var/account/pacct"
+
+# REPORT_OPTS contains arguments for the "sa" command,
+# used for console-reporting.
+# Please run "sa --help" or "man sa" to get a description
+# of available options.
+
+REPORT_OPTS="--sort-real-time --list-all-names --percentage"
diff --git a/sys-process/acct/files/acct.confd-r1 b/sys-process/acct/files/acct.confd-r1
new file mode 100644
index 000000000000..4a05da34bcc5
--- /dev/null
+++ b/sys-process/acct/files/acct.confd-r1
@@ -0,0 +1,11 @@
+# /etc/conf.d/acct
+
+# ACCT_LOG specifies the accounting logging file.
+# Remember to create it manually if it doesn't yet exist.
+#ACCT_LOG="/var/account/pacct"
+
+# REPORT_OPTS contains arguments for the "sa" command,
+# used for console-reporting.
+# Please run "sa --help" or "man sa" to get a description
+# of available options.
+#REPORT_OPTS="--sort-real-time --list-all-names --percentage"
diff --git a/sys-process/acct/files/acct.initd b/sys-process/acct/files/acct.initd
new file mode 100644
index 000000000000..d6d9dfd62459
--- /dev/null
+++ b/sys-process/acct/files/acct.initd
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="report"
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ export ACCT_LOG=${ACCT_LOG:-/var/account/pacct}
+ if [ ! -e "${ACCT_LOG}" ] ; then
+ touch "${ACCT_LOG}"
+ chmod 600 "${ACCT_LOG}"
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting accounting"
+ accton "${ACCT_LOG}" >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping accounting"
+ accton off >/dev/null
+ eend $?
+}
+
+report() {
+ sa ${REPORT_OPTS} "${ACCT_LOG}"
+}
diff --git a/sys-process/acct/files/acct.initd-r1 b/sys-process/acct/files/acct.initd-r1
new file mode 100644
index 000000000000..09d9739fea23
--- /dev/null
+++ b/sys-process/acct/files/acct.initd-r1
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="report"
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ export ACCT_LOG=${ACCT_LOG:-/var/account/pacct}
+ checkpath -f -m 600 "${ACCT_LOG}"
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting accounting"
+ accton "${ACCT_LOG}" >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping accounting"
+ accton off >/dev/null
+ eend $?
+}
+
+report() {
+ sa ${REPORT_OPTS} "${ACCT_LOG}"
+}
diff --git a/sys-process/acct/files/acct.initd-r2 b/sys-process/acct/files/acct.initd-r2
new file mode 100644
index 000000000000..4b3a5f3a50b6
--- /dev/null
+++ b/sys-process/acct/files/acct.initd-r2
@@ -0,0 +1,65 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ : ${ACCT_LOG:=/var/account/pacct}
+ : ${REPORT_OPTS:="--sort-real-time --list-all-names --percentage"}
+
+extra_started_commands="report"
+
+depend() {
+ need localmount
+}
+
+_checkconfig() {
+ if [ -z "${ACCT_LOG}" ]; then
+ eerror "No accounting file specified!"
+ return 1
+ fi
+
+ checkpath -f -m 600 "${ACCT_LOG}"
+}
+
+_get_service_value() {
+ local _name=$1
+
+ local _default_value=
+ if [ -n "${2}" ]; then
+ _default_value=$2
+ fi
+
+ local _service_value=$(service_get_value ${_name})
+ if [ -n "${_service_value}" ]; then
+ echo "${_service_value}"
+ else
+ echo "${_default_value}"
+ fi
+
+ return 0
+}
+
+ACCT_LOG=$(_get_service_value ACCT_LOG "${ACCT_LOG}")
+
+start_pre() {
+ _checkconfig || return 1
+}
+
+start() {
+ ebegin "Starting accounting"
+ accton "${ACCT_LOG}" >/dev/null
+ eend $?
+}
+
+start_post() {
+ service_set_value ACCT_LOG "${ACCT_LOG}"
+}
+
+stop() {
+ ebegin "Stopping accounting"
+ accton off >/dev/null
+ eend $?
+}
+
+report() {
+ sa ${REPORT_OPTS} "${ACCT_LOG}"
+}
diff --git a/sys-process/acct/files/acct.logrotate b/sys-process/acct/files/acct.logrotate
new file mode 100644
index 000000000000..af6213434cd9
--- /dev/null
+++ b/sys-process/acct/files/acct.logrotate
@@ -0,0 +1,14 @@
+# Logrotate file for acct
+
+/var/account/pacct {
+ compress
+ delaycompress
+ notifempty
+ daily
+ rotate 31
+ create 0600 root root
+ missingok
+ postrotate
+ /etc/init.d/acct --quiet --ifstarted restart
+ endscript
+}
diff --git a/sys-process/acct/files/acct.logrotate-r1 b/sys-process/acct/files/acct.logrotate-r1
new file mode 100644
index 000000000000..07696f7329dc
--- /dev/null
+++ b/sys-process/acct/files/acct.logrotate-r1
@@ -0,0 +1,18 @@
+# Logrotate file for acct
+
+/var/account/pacct {
+ compress
+ delaycompress
+ notifempty
+ daily
+ rotate 31
+ create 0600 root root
+ missingok
+ postrotate
+ if test -d /run/systemd/system ; then
+ systemctl try-restart acct 1>/dev/null
+ else
+ /etc/init.d/acct --quiet --ifstarted restart
+ fi
+ endscript
+}
diff --git a/sys-process/acct/files/acct.service b/sys-process/acct/files/acct.service
new file mode 100644
index 000000000000..85a4cd3f7bcc
--- /dev/null
+++ b/sys-process/acct/files/acct.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Kernel process accounting
+After=syslog.target
+ConditionPathExists=/var/account
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/sh -c 'if [ ! -e /var/account/pacct ]; then /bin/touch /var/account/pacct ; /bin/chmod 0600 /var/account/pacct; fi'
+ExecStart=/sbin/accton /var/account/pacct
+ExecStop=/sbin/accton off
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-process/acct/metadata.xml b/sys-process/acct/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-process/acct/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>