mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
sys-power/iasl: import from portage
Just copying the ebuilds from portage/ so hopefully no functional changes. BUG=chromium-os:26016 TEST=`cbuildbot arm-generic-full` works TEST=build_packages+build_image for x86-alex boots Change-Id: I66706ab4498157ac5af603d3f74202f88d214ae5 Reviewed-on: https://gerrit.chromium.org/gerrit/15430 Reviewed-by: Matt Tennant <mtennant@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
bd046ab507
commit
bd01d19909
2
sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest
vendored
Normal file
2
sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
DIST acpica-unix-20090123.tar.gz 926897 RMD160 a3079a3651f8320bf1411b95c4b46164a8da688b SHA1 423ae69b088ff63af7399fa2a3e9142dc9ae00a7 SHA256 497136355064aad9a1726f9f9ce9c6e60369ff30bceab0b4f155845b4a608250
|
||||
DIST acpitests-unix-20090123.tar.gz 1880717 RMD160 a8aea45b2d5ec2050db4cb2d474c55ff14a196b1 SHA1 eccb018d4fad73be67a34ac0848b23be575518be SHA256 d46788816bf677601ad050280260db5f04ddd30f7e2b131e2fc4f26f256de290
|
@ -0,0 +1,47 @@
|
||||
Index: acpica-unix-20080701.old/compiler/Makefile
|
||||
===================================================================
|
||||
--- acpica-unix-20080701.old.orig/compiler/Makefile
|
||||
+++ acpica-unix-20080701.old/compiler/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
PROG= iasl
|
||||
-SRCS= aslcompilerparse.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
|
||||
+SRCS= aslcompiler.y.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
|
||||
aslcompile.c aslerror.c aslfiles.c asllength.c \
|
||||
asllisting.c aslload.c asllookup.c aslmain.c aslmap.c aslopcodes.c \
|
||||
asloperands.c aslresource.c aslrestype1.c aslrestype2.c aslstartup.c \
|
||||
@@ -89,6 +89,7 @@ SRCS= aslcompilerparse.c aslcompilerlex.
|
||||
../tables/tbutils.c \
|
||||
../tables/tbxface.c \
|
||||
../osunixxf.c
|
||||
+OBJS = $(patsubst %.c,%.o, $(SRCS))
|
||||
|
||||
NOMAN= YES
|
||||
CFLAGS+= -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include
|
||||
@@ -105,17 +106,19 @@ YFLAGS+= -y -pAslCompiler
|
||||
#CFLAGS+= -D_USE_BERKELEY_YACC
|
||||
#.endif
|
||||
|
||||
-aslmain : $(patsubst %.c,%.o, $(SRCS))
|
||||
+aslmain : $(OBJS)
|
||||
$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) \
|
||||
$(LOADLIBES) $(LDLIBS) -o iasl
|
||||
|
||||
+$(OBJS): aslcompiler.y.h
|
||||
+
|
||||
CLEANFILES= y.output y.tab.c y.tab.h aslcompiler.y.h \
|
||||
- aslcompilerparse.c aslcompilerlex.c iasl
|
||||
+ aslcompiler.y.c aslcompilerlex.c iasl
|
||||
+
|
||||
+aslcompiler.y.h: aslcompiler.y.c
|
||||
|
||||
-aslcompilerparse.c: aslcompiler.y
|
||||
- ${YACC} ${YFLAGS} aslcompiler.y
|
||||
- cp y.tab.c aslcompilerparse.c
|
||||
- cp y.tab.h aslcompiler.y.h
|
||||
+aslcompiler.y.c: aslcompiler.y
|
||||
+ ${YACC} ${YFLAGS} aslcompiler.y -o aslcompiler.y.c
|
||||
|
||||
aslcompilerlex.c: aslcompiler.l
|
||||
${LEX} ${LFLAGS} -PAslCompiler -oaslcompilerlex.c aslcompiler.l
|
126
sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20090123.ebuild
vendored
Normal file
126
sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20090123.ebuild
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-power/iasl/iasl-20090123.ebuild,v 1.6 2009/10/07 16:15:23 nixnut Exp $
|
||||
|
||||
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="http://www.intel.com/technology/iapc/acpi/"
|
||||
SRC_URI="http://www.acpica.org/download/${MY_P}.tar.gz
|
||||
test? ( http://www.acpica.org/download/${MY_TESTS_P}.tar.gz )"
|
||||
|
||||
LICENSE="iASL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
||||
|
||||
IUSE="test"
|
||||
DEPEND="sys-devel/bison
|
||||
sys-devel/flex"
|
||||
|
||||
RDEPEND=""
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
pkg_setup() {
|
||||
if use test
|
||||
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
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/iasl-20080701-parallelmake.patch
|
||||
|
||||
sed -i -e 's:LDFLAGS=:LDLIBS+=:' \
|
||||
"${S}"/compiler/Makefile || die "unable to fix compiler Makefile"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local target bin
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
for target in compiler tools/acpisrc tools/acpixtract tools/acpiexec
|
||||
do
|
||||
einfo "Compiling in ${target}/"
|
||||
cd "${S}"/${target}
|
||||
case "${target}" in
|
||||
compiler) bin=iasl;;
|
||||
*) bin=${target#*/};;
|
||||
esac
|
||||
|
||||
emake CC="$(tc-getCC)" || die "emake in ${target} failed"
|
||||
einfo "Finished compiling ${target}"
|
||||
|
||||
mv ${bin} "${T}" || die "mv ${bin} failed"
|
||||
einfo "Finished moving ${bin}"
|
||||
|
||||
make clean || die "make clean in ${target} failed"
|
||||
einfo "Finished cleaning ${target}"
|
||||
|
||||
echo ${bin} >>"${T}"/binlist
|
||||
done
|
||||
einfo "$(<"${T}"/binlist)"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
aslts_test
|
||||
#aapits_test
|
||||
#The aapits test currently fails, missing include probably.
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local bin
|
||||
for bin in $(<"${T}"/binlist) ; do
|
||||
dobin "${T}"/${bin}
|
||||
done
|
||||
dodoc README changes.txt
|
||||
if use test ; 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} || die "doins testresults.tar.bz2 failed"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
aslts_test() {
|
||||
export ASL="${T}"/iasl \
|
||||
acpiexec="${T}"/acpiexec \
|
||||
ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts
|
||||
export PATH="${PATH}:${ASLTSDIR}/bin"
|
||||
echo "$ASLTSDIR" >"${T}"/asltdir
|
||||
cd "${ASLTSDIR}"
|
||||
edos2unix $(find . -type 'f') || die "edos2unix failed in aslts"
|
||||
make install || die "make install aslts test failed"
|
||||
chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || 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') || die "edos2unix failed in aapits"
|
||||
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
|
||||
./aapitsrun || die "aapitsrun failed"
|
||||
}
|
Loading…
Reference in New Issue
Block a user