sys-power/iasl: bump to the new upstream version 20241212

* Added more metadata
* Added 'examples' USE flag
* Improved build verboseness
* Simplified and fixed .ebuild
* Simplified patch
* Fixed direct use of 'bison' and 'flex'

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@drgrin.dev>
Closes: https://github.com/gentoo/gentoo/pull/40382
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Karlson2k (Evgeny Grin)
2025-01-30 13:26:42 +01:00
committed by Sam James
parent 13ba48a8d0
commit d270bea20a
5 changed files with 349 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST acpica-unix-20200717.tar.gz 1847795 BLAKE2B 84af34884bbea39aed9ea7ec86f20a27f3dd10fa68456b5f12de2bdecf9f205c43b4b4e5dcfb55325571a5682794cdc2e0c5a83c646036a15cc90f81223aefff SHA512 16de55b97a3b478dd2dd44fcbe51b871c7cc6174d337939b873bcbc871bee10487a796aa86abaa7b54ff6b75279cdbf9ec48e19f6baaea4290daf1ad56bdbc46
DIST acpica-unix-20241212.tar.gz 1952563 BLAKE2B 325ed37b858f2d88d4fadf54d4a45eac9f0edef183152e02328fdba25c880226e9d254a56441bc24e018cbab595582f2b1f9d69101aee38b9eaa5972fc4b5379 SHA512 daa4243f927451ac18c337cf17c27849e68329b3f7eb25b8c3379fda9c6a484201b73d4ffccab89a0ae22cc5e432f141ba149015a003834b0515bdb3d4efe0a8
DIST acpitests-unix-20200717.tar.gz 2212717 BLAKE2B 939e8022c5ecb7c5e862767f89c0b0de6146e23014dc0100d7dee0f3502e7adcbba72a468c828f804317e75d3a80ba5864c5497a7695f70be0bc1e3dcc69b4e6 SHA512 02c6674cbb2d98f783f25c71b1f391713de6fb3b56e5b57de9a7ccba0927453be4db8aea513e6e7ad491fcf3a0b2c14fefe8a2b82877a2ae01ea1d7832d36844
DIST acpitests-unix-20241212.tar.gz 2006353 BLAKE2B bab6e3ac4ee8d6822f854557c0af32f02e16d5b7efe513ed22a8e5f9beb9ea6012dc7be7d55c8a647a21d6946925018475ca7c77fbf50814b2503c2bc92f7b76 SHA512 9c9b0ccd116ef0cbb51bc0b365f80e42dddd474f5e43cac2362974b0d8539ce609fd7f3c25bd1182c322f929cb55647e24a8faef8d321e6e7f078adad60fd3b6

View File

@@ -0,0 +1,93 @@
From 58e46dacfd83a7d33c8922fcb2ea110f37bee62f Mon Sep 17 00:00:00 2001
From: "Evgeny Grin (Karlson2k)" <k2k@drgrin.dev>
Date: Thu, 30 Jan 2025 11:25:24 +0100
Subject: [PATCH 1/2] Makefile fixes for Gentoo
Based on David Seifert patch seen as dadf5340788610052aeb2f4c5232fb744a8bd9f5
in Gentoo repo git
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
---
generate/unix/Makefile.config | 25 ++++++-------------------
generate/unix/acpiexec/Makefile | 4 ++--
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
index ae80ccf2e..8e985c691 100644
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -42,8 +42,8 @@ CC ?= gcc
#
OBJDIR = obj
BINDIR = bin
-COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
-LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS)
+COMPILEOBJ = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPT_CFLAGS) -o $@ $<
+LINKPROG = $(CC) $(LDFLAGS) $(OPT_LDFLAGS) $(OBJECTS) -o $(PROG) $(LIBS)
PREFIX ?= /usr
INSTALLDIR = $(PREFIX)/bin
UNAME_S := $(shell uname -s)
@@ -75,19 +75,16 @@ ifeq ($(UNAME_S), Haiku)
ACPI_HOST = _HAIKU
endif
+ifeq ($(UNAME_S), Linux)
+ACPI_HOST = _LINUX
+endif
+
ifeq ($(ACPI_HOST), _APPLE)
INSTALL = cp
INSTALLFLAGS ?= -f
else
INSTALL = install
-
-# Do not strip debug info when in debug mode
-ifeq ($(DEBUG),TRUE)
INSTALLFLAGS ?= -m 555
-else
-INSTALLFLAGS ?= -m 555 -s
-endif
-
endif
INSTALLPROG = \
@@ -174,16 +171,6 @@ CFLAGS +=-m32
LDFLAGS +=-m32
endif
-#
-# Optionally disable optimizations. Optimization causes problems on
-# some compilers such as gcc 4.4
-#
-ifneq ($(NOOPT),TRUE)
-OPT_CFLAGS += -O2
-else
-OPT_CFLAGS += -O0
-endif
-
#
# Optionally disable fortify source. This option can cause
# compile errors in toolchains where it is already defined.
diff --git a/generate/unix/acpiexec/Makefile b/generate/unix/acpiexec/Makefile
index 9e5852614..411178cf6 100644
--- a/generate/unix/acpiexec/Makefile
+++ b/generate/unix/acpiexec/Makefile
@@ -257,13 +257,13 @@ CFLAGS += \
endif
ifneq ($(ACPI_HOST),_QNX)
-LDFLAGS += -lpthread
+LIBS += -lpthread
endif
ifneq ($(ACPI_HOST),_APPLE)
ifneq ($(ACPI_HOST),_QNX)
ifneq ($(ACPI_HOST),_HAIKU)
-LDFLAGS += -lrt
+LIBS += -lrt
endif
endif
endif
--
2.45.2.windows.1

View File

@@ -0,0 +1,129 @@
From 9b18ed925e1e33e5b45ae79b5f47deec78ea111d Mon Sep 17 00:00:00 2001
From: "Evgeny Grin (Karlson2k)" <k2k@drgrin.dev>
Date: Thu, 30 Jan 2025 11:25:24 +0100
Subject: [PATCH 2/2] Verbose make output
---
generate/unix/Makefile.rules | 4 ++--
generate/unix/iasl/Makefile | 34 +++++++++++++++++-----------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/generate/unix/Makefile.rules b/generate/unix/Makefile.rules
index f2a16be4d..838252719 100644
--- a/generate/unix/Makefile.rules
+++ b/generate/unix/Makefile.rules
@@ -12,12 +12,12 @@ $(FINAL_PROG) : $(PROG)
$(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS)
@echo "- Link" $(PROG)
- @$(LINKPROG)
+ $(LINKPROG)
$(RENAMEPROG)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
@echo $(PROG) $<
- @$(COMPILEOBJ)
+ $(COMPILEOBJ)
clean :
@rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC)
diff --git a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile
index 8fde63d46..271c7a704 100644
--- a/generate/unix/iasl/Makefile
+++ b/generate/unix/iasl/Makefile
@@ -322,42 +322,42 @@ safe_yacc = \
#
$(OBJDIR)/aslcompiler.y : $(ASL_PARSER)
@echo "- " $(MACROPROC) " Preprocess main iASL parser"
- @$(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $@
+ $(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $@
#
# Parser and Lexer - intermediate C files
#
$(OBJDIR)/aslcompilerlex.c : $(ASL_LEXER)
@echo "- " $(LEX) " "$<
- @$(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l
+ $(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l
$(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompiler.y
@echo "- " $(YACC) " "$<
- @$(call safe_yacc,AslCompiler,$<,$@)
+ $(call safe_yacc,AslCompiler,$<,$@)
$(OBJDIR)/dtcompilerparserlex.c : $(ASL_COMPILER)/dtcompilerparser.l $(OBJDIR)/dtcompilerparser.y.h
@echo "- " $(LEX) " "$<
- @$(LEX) $(DLFLAGS) -PDtCompilerParser -o$@ $<
+ $(LEX) $(DLFLAGS) -PDtCompilerParser -o$@ $<
$(OBJDIR)/dtcompilerparserparse.c $(OBJDIR)/dtcompilerparser.y.h : $(ASL_COMPILER)/dtcompilerparser.y
@echo "- " $(YACC) " "$<
- @$(call safe_yacc,DtCompilerParser,$<,$@)
+ $(call safe_yacc,DtCompilerParser,$<,$@)
$(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h
@echo "- " $(LEX) " "$<
- @$(LEX) $(DLFLAGS) -PDtParser -o$@ $<
+ $(LEX) $(DLFLAGS) -PDtParser -o$@ $<
$(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparser.y.h : $(ASL_COMPILER)/dtparser.y
@echo "- " $(YACC) " "$<
- @$(call safe_yacc,DtParser,$<,$@)
+ $(call safe_yacc,DtParser,$<,$@)
$(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l $(OBJDIR)/prparser.y.h
@echo "- " $(LEX) " "$<
- @$(LEX) $(LFLAGS) -PPrParser -o$@ $<
+ $(LEX) $(LFLAGS) -PPrParser -o$@ $<
$(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparser.y
@echo "- " $(YACC) " "$<
- @$(call safe_yacc,PrParser,$<,$@)
+ $(call safe_yacc,PrParser,$<,$@)
#
# Parsers and Lexers - final object files
@@ -367,32 +367,32 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparse
#
$(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/dtcompilerparserlex.o : $(OBJDIR)/dtcompilerparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/dtcompilerparserparse.o : $(OBJDIR)/dtcompilerparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
$(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
+ $(CC) -c $(CFLAGS) -Wall $(WERROR_FLAGS) -o$@ $<
--
2.45.2.windows.1

View File

@@ -0,0 +1,112 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edos2unix toolchain-funcs
MY_PN=acpica-unix
MY_P="${MY_PN}-${PV}"
MY_TESTS_P="${MY_PN/ca/tests}-${PV}"
REL_TAG="R${PV:0:4}_${PV:4:2}_${PV:6:2}"
DESCRIPTION="Intel ACPI Source Language (ASL) compiler"
HOMEPAGE="https://www.acpica.org/downloads/"
SRC_URI="
https://github.com/acpica/acpica/releases/download/${REL_TAG}/${MY_P}.tar.gz
test? ( https://github.com/acpica/acpica/releases/download/${REL_TAG}/${MY_TESTS_P}.tar.gz )"
S="${WORKDIR}/${MY_P}"
LICENSE="iASL"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
IUSE="examples test"
RESTRICT="!test? ( test )"
BDEPEND="
app-alternatives/yacc
app-alternatives/lex"
PATCHES=(
"${FILESDIR}"/${P}-Makefile-fixes.patch
"${FILESDIR}"/${P}-Makefile-verbose.patch
)
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_compile() {
emake -C generate/unix \
CC="$(tc-getCC)" \
'YACC=LC_ALL=C yacc' \
'YFLAGS=' \
'LEX=LC_ALL=C lex' \
NOFORTIFY=TRUE \
NOWERROR=TRUE
}
aslts_test() {
export ASL="${S}"/generate/unix/bin/iasl \
acpibin="${S}"/generate/unix/bin/acpibin \
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')
emake install
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"
emake
emake -C asl
cd ../bin || die
./aapitsrun || die "aapitsrun failed"
}
src_test() {
aslts_test
#The aapits test currently fails, missing include probably.
#aapits_test
}
src_install() {
emake -C generate/unix install DESTDIR="${D}"
if ! use examples; then
rm "${ED}/usr/bin/acpiexamples" || die
fi
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; 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 $?
insinto /usr/share/${PF}
doins ${tb}
fi
}

View File

@@ -4,4 +4,17 @@
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
<upstream>
<maintainer status="active">
<email>saket.dumbre@intel.com</email>
<name>Saket Dumbre</name>
</maintainer>
<doc lang="en">https://www.intel.com/content/www/us/en/developer/topic-technology/open/acpica/documentation.html</doc>
<bugs-to>https://github.com/acpica/acpica/issues</bugs-to>
<remote-id type="github">acpica/acpica</remote-id>
</upstream>
<use>
<flag name="examples">Install acpiexamples binary</flag>
<flag name="test">Perform tests (slow!) and install compressed test results</flag>
</use>
</pkgmetadata>