/[gentoo-x86]/sys-power/iasl/iasl-20080514.ebuild
Gentoo

Contents of /sys-power/iasl/iasl-20080514.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Wed Mar 26 07:48:25 2014 UTC (4 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Version bump. Removed old. Added myself as maintainer

(Portage version: 2.2.9-r1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-power/iasl/iasl-20080514.ebuild,v 1.6 2011/12/25 22:45:59 robbat2 Exp $
4
5 inherit toolchain-funcs flag-o-matic eutils
6
7 MY_PN=acpica-unix
8 MY_P=${MY_PN}-${PV}
9 MY_TESTS_P=${MY_PN/ca/tests}-${PV}
10 DESCRIPTION="Intel ACPI Source Language (ASL) compiler"
11 HOMEPAGE="http://www.intel.com/technology/iapc/acpi/"
12 SRC_URI="http://www.acpica.org/download/${MY_P}.tar.gz
13 test? ( http://www.acpica.org/download/${MY_TESTS_P}.tar.gz )"
14
15 LICENSE="iASL"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
18 IUSE="test"
19
20 DEPEND="sys-devel/bison
21 sys-devel/flex"
22 RDEPEND=""
23
24 S=${WORKDIR}/${MY_P}
25
26 pkg_setup() {
27 if use test && has test ${FEATURES}; then
28 ewarn 'You have selected USE="test". This will install the test results'
29 ewarn "into /usr/share/${PF}/, compressed as a tarball."
30 ewarn 'The tests themselves will only rarely die, but the test results'
31 ewarn 'are interesting for arch testing. The tests may take quite some'
32 ewarn 'time to complete.'
33 fi
34 }
35
36 src_compile() {
37 local target bin
38 append-flags -fno-strict-aliasing
39
40 for target in compiler tools/acpisrc tools/acpixtract tools/acpiexec
41 do
42 einfo "Compiling in ${target}/"
43 cd "${S}"/${target}
44 case "${target}" in
45 compiler) bin=iasl;;
46 *) bin=${target#*/};;
47 esac
48
49 emake -j1 CC="$(tc-getCC)" || die "emake in ${target} failed"
50 einfo "Finished compiling ${target}"
51
52 mv ${bin} "${T}" || die "mv ${bin} failed"
53 einfo "Finished moving ${bin}"
54
55 make clean || die "make clean in ${target} failed"
56 einfo "Finished cleaning ${target}"
57
58 echo ${bin} >>"${T}"/binlist
59 done
60 einfo "$(<"${T}"/binlist)"
61 }
62
63 src_test() {
64 aslts_test
65 #aapits_test
66 #The aapits test currently fails, missing include probably.
67 }
68
69 src_install() {
70 local bin
71 for bin in $(<"${T}"/binlist) ; do
72 dobin "${T}"/${bin}
73 done
74 dodoc README changes.txt
75 if use test && has test ${FEATURES}; then
76 tb="${T}"/testresults.tar.bz2
77 export ASLTSDIR="$(<"${T}"/asltdir)"
78 ebegin "Creating Test Tarball"
79 tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed"
80 eend $?
81 dodir /usr/share/${PF}
82 insinto /usr/share/${PF}
83 doins ${tb} || die "doins testresults.tar.bz2 failed"
84 fi
85
86 }
87
88 aslts_test() {
89 export ASL="${T}"/iasl \
90 acpiexec="${T}"/acpiexec \
91 ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts
92 export PATH="${PATH}:${ASLTSDIR}/bin"
93 echo "$ASLTSDIR" >"${T}"/asltdir
94 cd "${ASLTSDIR}"
95 edos2unix $(find . -type 'f')
96 make install || die "make install aslts test failed"
97 chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed"
98
99 #The below Do commands runs the tests twice and then dies if the results aren't
100 #Identical.
101 Do 1 || die "failed Do 1"
102 Do 2 || die "failed Do 2"
103 }
104
105 aapits_test() {
106 mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed"
107 cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits"
108 edos2unix $(find . -type 'f')
109 chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed"
110 make || die "make in aapits failed"
111 cd asl || die "cd asl failed"
112 make || die "make in asl failed"
113 cd ../bin
114 ./aapitsrun || die "aapitsrun failed"
115 }

  ViewVC Help
Powered by ViewVC 1.1.20