Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/iasl/
Date: Wed, 19 Aug 2020 14:16:35
Message-Id: 1597846545.6edb47cd4c052e9b554f2d117b81bf0d76f7f05a.whissi@gentoo
1 commit: 6edb47cd4c052e9b554f2d117b81bf0d76f7f05a
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 19 14:15:45 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 19 14:15:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6edb47cd
7
8 sys-power/iasl: bump to v20200717
9
10 Package-Manager: Portage-3.0.3, Repoman-3.0.0
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-power/iasl/Manifest | 2 +
14 sys-power/iasl/iasl-20200717.ebuild | 126 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 128 insertions(+)
16
17 diff --git a/sys-power/iasl/Manifest b/sys-power/iasl/Manifest
18 index daac327fa72..111d98ac5ce 100644
19 --- a/sys-power/iasl/Manifest
20 +++ b/sys-power/iasl/Manifest
21 @@ -1,2 +1,4 @@
22 DIST acpica-unix-20200326.tar.gz 1850373 BLAKE2B 4b0c8548ff4b99fb774eb4301687368da2149bfaf68e02c638eecf890fc89974dadd75acc844233ecde8cfac2b98d75df79df2bb1bd6993dc8d502b3156c1012 SHA512 253ea7fc2bb540dd0cfa55552648c33562f39efb9a9b8cbab751ad7f4fea9bd3800eb241afb30313140e2008889b62b82b4427624e087a275353d81555403e76
23 +DIST acpica-unix-20200717.tar.gz 1847795 BLAKE2B 84af34884bbea39aed9ea7ec86f20a27f3dd10fa68456b5f12de2bdecf9f205c43b4b4e5dcfb55325571a5682794cdc2e0c5a83c646036a15cc90f81223aefff SHA512 16de55b97a3b478dd2dd44fcbe51b871c7cc6174d337939b873bcbc871bee10487a796aa86abaa7b54ff6b75279cdbf9ec48e19f6baaea4290daf1ad56bdbc46
24 DIST acpitests-unix-20200326.tar.gz 2212897 BLAKE2B d88d3d900ac06d165c4a50cddd65495b75db345009b10e76d9f38197ba42efe3ea396ec9828bef62da1fd96ac331d95623c03194e08b00037ff1234321fcf0d3 SHA512 332b4ed016cee48662a5f4572e6d170461f02ee1386109a3970fbe8d104f2a2b14c19235ea43ae9b26e8faf9ef9597cb3d2148e498741361aca62978d0b62189
25 +DIST acpitests-unix-20200717.tar.gz 2212717 BLAKE2B 939e8022c5ecb7c5e862767f89c0b0de6146e23014dc0100d7dee0f3502e7adcbba72a468c828f804317e75d3a80ba5864c5497a7695f70be0bc1e3dcc69b4e6 SHA512 02c6674cbb2d98f783f25c71b1f391713de6fb3b56e5b57de9a7ccba0927453be4db8aea513e6e7ad491fcf3a0b2c14fefe8a2b82877a2ae01ea1d7832d36844
26
27 diff --git a/sys-power/iasl/iasl-20200717.ebuild b/sys-power/iasl/iasl-20200717.ebuild
28 new file mode 100644
29 index 00000000000..5ef5112d8e5
30 --- /dev/null
31 +++ b/sys-power/iasl/iasl-20200717.ebuild
32 @@ -0,0 +1,126 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit eutils toolchain-funcs
39 +
40 +MY_PN=acpica-unix
41 +MY_P="${MY_PN}-${PV}"
42 +MY_TESTS_P="${MY_PN/ca/tests}-${PV}"
43 +
44 +DESCRIPTION="Intel ACPI Source Language (ASL) compiler"
45 +HOMEPAGE="https://www.acpica.org/downloads/"
46 +SRC_URI="
47 + http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz
48 + test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )"
49 +
50 +LICENSE="iASL"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
53 +IUSE="test"
54 +RESTRICT="!test? ( test )"
55 +
56 +BDEPEND="
57 + sys-devel/bison
58 + sys-devel/flex"
59 +
60 +S="${WORKDIR}/${MY_P}"
61 +
62 +PATCHES=( "${FILESDIR}"/${PN}-20200326-Makefile.patch )
63 +
64 +pkg_setup() {
65 + if use test && has test ${FEATURES}; then
66 + ewarn 'You have selected USE="test". This will install the test results'
67 + ewarn "into /usr/share/${PF}/, compressed as a tarball."
68 + ewarn 'The tests themselves will only rarely die, but the test results'
69 + ewarn 'are interesting for arch testing. The tests may take quite some'
70 + ewarn 'time to complete.'
71 + fi
72 +}
73 +
74 +src_prepare() {
75 + default
76 +
77 + find "${S}" -type f -name 'Makefile*' -print0 | \
78 + xargs -0 -I '{}' \
79 + sed -r -e 's:-\<Werror\>::g' -e "s:/usr:${EPREFIX}/usr:g" \
80 + -i '{}' \
81 + || die
82 +}
83 +
84 +src_configure() {
85 + tc-export CC
86 +
87 + # BITS is tied to ARCH - please set appropriately if you add new keywords
88 + if [[ $ARCH == @(amd64|amd64-fbsd) ]] ; then
89 + export BITS=64
90 + else
91 + export BITS=32
92 + fi
93 +}
94 +
95 +src_compile() {
96 + emake -C generate/unix BITS="${BITS}"
97 +}
98 +
99 +src_test() {
100 + aslts_test
101 + #The aapits test currently fails, missing include probably.
102 + #aapits_test
103 +}
104 +
105 +src_install() {
106 + cd generate/unix || die
107 + emake install DESTDIR="${D}" BITS=${BITS}
108 + default
109 + #local bin
110 + #for bin in $(<"${T}"/binlist) ; do
111 + # dobin "${T}"/${bin}
112 + #done
113 + dodoc "${S}"/changes.txt
114 + newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt
115 + newdoc "${S}"/generate/unix/readme.txt unix-readme.txt
116 + newdoc "${S}"/generate/lint/readme.txt lint-readme.txt
117 + newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt
118 +
119 + if use test && has test ${FEATURES}; then
120 + tb="${T}"/testresults.tar.bz2
121 + export ASLTSDIR="$(<"${T}"/asltdir)"
122 + ebegin "Creating Test Tarball"
123 + tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed"
124 + eend $?
125 + insinto /usr/share/${PF}
126 + doins ${tb}
127 + fi
128 +}
129 +
130 +aslts_test() {
131 + export ASL="${S}"/generate/unix/bin/iasl \
132 + acpibin="${S}"/generate/unix/bin/acpibin \
133 + acpiexec="${S}"/generate/unix/bin/acpiexec \
134 + ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts
135 + export PATH="${PATH}:${ASLTSDIR}/bin"
136 + echo "$ASLTSDIR" >"${T}"/asltdir
137 + cd "${ASLTSDIR}" || die
138 + edos2unix $(find . -type 'f')
139 + make install || die "make install aslts test failed"
140 + chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed"
141 +
142 + #The below Do commands runs the tests twice and then dies if the results aren't
143 + #Identical.
144 + Do 1 || die "failed Do 1"
145 + Do 2 || die "failed Do 2"
146 +}
147 +
148 +aapits_test() {
149 + mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed"
150 + cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits"
151 + edos2unix $(find . -type 'f')
152 + chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed"
153 + make || die "make in aapits failed"
154 + cd asl || die "cd asl failed"
155 + make || die "make in asl failed"
156 + cd ../bin || die
157 + ./aapitsrun || die "aapitsrun failed"
158 +}