summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-power/iasl/Manifest2
-rw-r--r--sys-power/iasl/iasl-20171215.ebuild127
2 files changed, 129 insertions, 0 deletions
diff --git a/sys-power/iasl/Manifest b/sys-power/iasl/Manifest
index 9d81480f0e8d..e8e7bdc9cc31 100644
--- a/sys-power/iasl/Manifest
+++ b/sys-power/iasl/Manifest
@@ -2,7 +2,9 @@ DIST acpica-unix-20121018.tar.gz 1272523 BLAKE2B 882d540bbfabc790dbdf13af819d838
DIST acpica-unix-20140828.tar.gz 1423788 BLAKE2B b694daafe34832ca8d14710b8c92066b9e29006d71b2789854714d9bfe60850349156c711746583cfedb8408b67e42accc6330d0896f66eab636244351eebbf1 SHA512 ab4cb8ba74c5abf05913b6ef39955698f2bb5c243f723d660bd8f9c397fcf2a959d5ec10326a699c53e05319a428e721f1d65a07249574200af3227676725398
DIST acpica-unix-20160729.tar.gz 1556095 BLAKE2B 2785d343d7aa0e3cce83d762bb70f8a7e76221da5d0e803eac3253b4a26dcaf852e114eadf811f387c7c040aeeb794de8cae37c47d8c29968f8cd0a0d76ed4b6 SHA512 37b0439b03e8d811c8b14d0c7c89471989227fb78b462f585c6290431afecc5b258073e568dde8dc982fa959ebce4b4d51589ea997f0066e66d4785ce185ccf2
DIST acpica-unix-20161222.tar.gz 1580428 BLAKE2B dcf44d1a19b51e43ad1a74b2ba5b4bfadeb83eca584ff5a5062aff9cc4b0a65153b1590d993b7bca602e35da747683d230ea56c380afbec3308fb83fdb03908a SHA512 ff733d210b3b013970d3f3a0bea45f346ca5cf78dd61b583d30114a69c80e8272af304d14248aa34e775e19bca1c2ddbbed1b4ba5e8ba660b28621a8ca45ae31
+DIST acpica-unix-20171215.tar.gz 1769116 BLAKE2B f15c1202244ce5f489d80240e6c89f7fda38a3c74cf0773c4530e265876f931502571e3086aabae0082654a2085f3d6e5eeed324fd892c199a91a8837fdb19e2 SHA512 4cd3755fe28344de3259dad5209a58c9548216ecaf50a830165a0ee8993af57d4b63836904faafd5f97b1651051ee2f17a908395e0a048bab20b13395fe0d3ff
DIST acpitests-unix-20121018.tar.gz 1978548 BLAKE2B 9a2d0c8cacffb509400bf272608c2f4adc9dd7f884f59d6b43927cc3f67d996a789eae2a34215c4b9608498b193b82422ed144723fde2a9c101f73a6e3c68e9c SHA512 4c565b9c3af3122f5acfd802e6467124071f45987db0e5d5b9bf87a2d82e433cd6bd1b6faed71dbe6b01694c0f79b390f220515cf287519588ccae71ebafe798
DIST acpitests-unix-20140828.tar.gz 2008060 BLAKE2B 9bde05aeec61db9d89ac29cb361e5cbf0f6b71501e6f3fd2a7f138be1f8936858d86cdfd9df4d8c3f08efe2e593791f58f1a8a79538f66c23ec599199bb204d9 SHA512 7c3d36c9c1054a56f9b473cd0204062d7ac93b66e1f4d448575182ac3fb0a819506701306be406dd7b8385d37c6f77d7bc4dadc57f6743203ac1bee36a975be5
DIST acpitests-unix-20160729.tar.gz 1829061 BLAKE2B 8dacb39c477ff8ba8b68a3f061b74e90a128a90eb287b9febd57d6871ff0878dfe2eaf616d9881af2b0bca6c8db57d48711ad9009c6ceb1ceba321bed182a51c SHA512 bf6073092a0dfb208f1d4b13ff3a3c5335be8e1326b1e58acd41def1a402ab0d843600f616019d1dde6593db8c53c6876bd9d489360fe98c6a7bee95d9215600
DIST acpitests-unix-20161222.tar.gz 1759278 BLAKE2B cb1b3ea882135e9ee87c4337df4710ac2e613b89f2606306c3ce68af049735f999ae6a37b1f75c112f0fb5f8bc5af6897bf18715f657c8dcac82a37637da2a57 SHA512 ff0435f40564a94ceb3bc6cfc11ac859a5467b650004238092d7f3e2f7d596e7eb2fb9d3c56f0860c8324d38fcbedf3c6f4bc3f0569f1148462b824c7c025408
+DIST acpitests-unix-20171215.tar.gz 2034932 BLAKE2B c36aaf6a8a7aadf54651f95486af918926b664069ed961993c3ee8a062a646a7bd4e40adeebe82a101a5997080b90762fa016724ed4be31af56086eb3c3b3ab9 SHA512 b405e87f18b15bd01540d32c021a7b900139abd7e698b55786ccbaf8536c5068087a8ba1e7adbb69e0954cdc6b347e9a88428f1e8f889e0e9eb3a472c11235f9
diff --git a/sys-power/iasl/iasl-20171215.ebuild b/sys-power/iasl/iasl-20171215.ebuild
new file mode 100644
index 000000000000..7bc182a44cec
--- /dev/null
+++ b/sys-power/iasl/iasl-20171215.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic eutils
+
+MY_PN=acpica-unix
+MY_P=${MY_PN}-${PV}
+MY_TESTS_P=${MY_PN/ca/tests}-${PV}
+DESCRIPTION="Intel ACPI Source Language (ASL) compiler"
+HOMEPAGE="https://www.acpica.org/downloads/"
+SRC_URI="http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz
+ test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )"
+
+LICENSE="iASL"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="test"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if use test && has test ${FEATURES}; then
+ ewarn 'You have selected USE="test". This will install the test results'
+ ewarn "into /usr/share/${PF}/, compressed as a tarball."
+ ewarn 'The tests themselves will only rarely die, but the test results'
+ ewarn 'are interesting for arch testing. The tests may take quite some'
+ ewarn 'time to complete.'
+ fi
+}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-20140828-locale.patch"
+ "${FILESDIR}/${PN}-20140214-nostrip.patch"
+)
+
+src_prepare() {
+ default
+
+ find "${S}" -type f -name 'Makefile*' -print0 | \
+ xargs -0 -I '{}' \
+ sed -r -e 's:-\<Werror\>::g' -i '{}' \
+ || die
+
+ # BITS is tied to ARCH - please set appropriately if you add new keywords
+ if [[ $ARCH == @(amd64|amd64-fbsd) ]] ; then
+ export BITS=64
+ else
+ export BITS=32
+ fi
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ cd generate/unix || die
+ emake BITS=${BITS}
+}
+
+src_test() {
+ aslts_test
+ #The aapits test currently fails, missing include probably.
+ #aapits_test
+}
+
+src_install() {
+ cd generate/unix || die
+ emake install DESTDIR="${D}" BITS=${BITS}
+ default_src_install
+ #local bin
+ #for bin in $(<"${T}"/binlist) ; do
+ # dobin "${T}"/${bin}
+ #done
+ dodoc "${S}"/changes.txt
+ newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt
+ newdoc "${S}"/generate/unix/readme.txt unix-readme.txt
+ newdoc "${S}"/generate/lint/readme.txt lint-readme.txt
+ newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt
+
+ if use test && has test ${FEATURES}; then
+ tb="${T}"/testresults.tar.bz2
+ export ASLTSDIR="$(<"${T}"/asltdir)"
+ ebegin "Creating Test Tarball"
+ tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed"
+ eend $?
+ dodir /usr/share/${PF}
+ insinto /usr/share/${PF}
+ doins ${tb}
+ fi
+
+}
+
+aslts_test() {
+ export ASL="${S}"/generate/unix/bin/iasl \
+ acpiexec="${S}"/generate/unix/bin/acpiexec \
+ ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts
+ export PATH="${PATH}:${ASLTSDIR}/bin"
+ echo "$ASLTSDIR" >"${T}"/asltdir
+ cd "${ASLTSDIR}" || die
+ edos2unix $(find . -type 'f')
+ make install || die "make install aslts test failed"
+ chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed"
+
+ #The below Do commands runs the tests twice and then dies if the results aren't
+ #Identical.
+ Do 1 || die "failed Do 1"
+ Do 2 || die "failed Do 2"
+}
+
+aapits_test() {
+ mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed"
+ cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits"
+ edos2unix $(find . -type 'f')
+ chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed"
+ make || die "make in aapits failed"
+ cd asl || die "cd asl failed"
+ make || die "make in asl failed"
+ cd ../bin || die
+ ./aapitsrun || die "aapitsrun failed"
+}