Summary: | sys-power/acpi-1.4 gives floating point exception when battery voltage is null - ebuild and patch provided | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | po.valles <nibheis> |
Component: | New packages | Assignee: | Mobile Herd (OBSOLETE) <mobile+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch that avoids the FPE
acpi-1.4-r1.ebuild acpi-1.4-r1.ebuild, w/ "EAPI" before "inherit" patch that avoids the FPE acpi-1.4-r1.ebuild, w/ "EAPI" before "inherits", and typo fixed |
Description
po.valles
2009-11-05 10:24:09 UTC
btw, I checked bug #242040 and I confirm it can be closed. sys-power/acpi-1.4 uses my CFLAGS when compiling: # grep CFLAGS /etc/make.conf CFLAGS="-O2 -march=i686 -pipe" CXXFLAGS="${CFLAGS} [...] >>> Compiling source in /var/tmp/portage/sys-power/acpi-1.4-r1/work/acpi-1.4 ... make -j1 make all-am make[1]: Entering directory `/var/tmp/portage/sys-power/acpi-1.4-r1/work/acpi-1.4' i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Wall -O2 -march=i686 -pipe -c acpi.c i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Wall -O2 -march=i686 -pipe -c main.c i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Wall -O2 -march=i686 -pipe -c list.c i686-pc-linux-gnu-gcc -Wall -O2 -march=i686 -pipe -Wl,-O1 -o acpi acpi.o main.o list.o make[1]: Leaving directory `/var/tmp/portage/sys-power/acpi-1.4-r1/work/acpi-1.4' >>> Source compiled. [...] Created attachment 209306 [details]
patch that avoids the FPE
here is the patch... ebuild coming too
Created attachment 209308 [details]
acpi-1.4-r1.ebuild
mostly same as "acpi-1.4.ebuild", except:
- added an "inherit" statement for epatch usage
- added a src_prepare() section for the patching
btw, the ebuild (sys-power/acpi-1.4-r1) compiles and installs fine. Feel free to place it in portage. Now I get: # acpi -bi Battery 0: Unknown, 0% Battery 0: design capacity 60061 mWh, last full capacity 25290 mWh = 42% which is nicer than the FPE :) Won't probably matter for this eclass, but EAPI goes always before inherit. Created attachment 209338 [details]
acpi-1.4-r1.ebuild, w/ "EAPI" before "inherit"
Updated ebuild. Thanks for the comment.
Created attachment 209405 [details, diff]
patch that avoids the FPE
Created attachment 209406 [details]
acpi-1.4-r1.ebuild, w/ "EAPI" before "inherits", and typo fixed
patch typo corrected, and ebuild updated accordingly.
(In reply to comment #7) > Created an attachment (id=209405) [details] > patch that avoids the FPE > This seems to be fixed in 1.5 with similar looking code, if (!voltage) /* zero voltage makes all calculations mood */ voltage = -1; } |