apmd: upgrade to 3.2.2-14

[Patches]
  KEEP    _unlinux.patch_: remove reference to build system paths
  DISABLE _libtool.patch_: this patch adds a "--tag=CC" to be compatible with libtool2.2.4.
                           however with latest 2.2.10 libtool, w/o this patch it still works. From
                           the manual, CC is the default tag actually. So disable it for now, and once
                           same error happens again, it'll be re-neabled and if necessary push to upstream
  DISABLE _workaround.patch_: a SIGUSR1 is hooked to signal suspend event as a so-called 'workaround'.
                              however no exact commit is found for exact usage case. So disable it.
  REMOVE  _debian.patch_: in upstream

[Recipe]
  Add license checksum

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
Kevin Tian 2010-07-13 16:46:46 +08:00 committed by Richard Purdie
parent cb249ed2f0
commit 75fff51661
11 changed files with 62 additions and 89 deletions

View File

@ -0,0 +1,29 @@
# Add by RP to address "unable to infer tagged configuration" error:
# commit 35de05e61b88c0808a5e885bb0efdf420555d5ad
# Author: Richard Purdie <rpurdie@rpsys.net>
# Date: Sun Jun 1 16:13:38 2008 +0000
#
# apmd: Use libtool --tag options to avoid problems with libtool 2.2.4 (from poky)
#
# However I didn't see same issue with current libtool-2.2.10. Also per my understanding,
# the default tag, if not specified, falls back to CC. So disable it from patching, but
# keep it here. If we encounter similar issue in the future, we could then push upstream
#
# Comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-16
Index: apmd-3.2.2.orig/Makefile
===================================================================
--- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000
+++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100
@@ -58,9 +57,8 @@
#CFLAGS=-O3 -m486 -fomit-frame-pointer
#LDFLAGS=-s
-LIBTOOL=libtool --quiet
-LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
-LT_LINK = $(LIBTOOL) --mode=link $(CC)
+LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
+LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
LT_INSTALL = $(LIBTOOL) --mode=install install
LT_CLEAN = $(LIBTOOL) --mode=clean rm

View File

@ -0,0 +1,21 @@
# copy OE commit message here:
# commit 9456cdc1cf43e3ba9e6d88c63560c1b6fdee4359
# Author: Michael Krelin <hacker@klever.net>
# Date: Tue May 29 12:27:45 2007 +0000
#
# apmd: prevent build from interferring with host kernel headers. Closes #1257
#
# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
--- apmd-3.2.2.orig/Makefile
+++ apmd-3.2.2/Makefile
@@ -43,8 +43,7 @@
CC=gcc
CFLAGS=-O -g
-XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \
- -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
+XTRACFLAGS=-Wall -pipe -I. \
-DVERSION=\"$(VERSION)\" \
-DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
LDFLAGS=

View File

@ -1,4 +1,8 @@
# this workaround is there in OE since 2003. It looks to provide a workaround
# allowing others sending SIGUSR1 to cause an apm suspend event. Disable it for
# now.
#
# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

View File

@ -1,54 +0,0 @@
--- apmd-3.2.2.orig/apmd.c
+++ apmd-3.2.2/apmd.c
@@ -343,7 +343,7 @@
/* parent */
int status, retval;
ssize_t len;
- time_t time_limit;
+ time_t countdown;
if (pid < 0) {
/* Couldn't fork */
@@ -356,8 +356,9 @@
/* Capture the child's output, if any, but only until it terminates */
close(fds[1]);
fcntl(fds[0], F_SETFL, O_RDONLY|O_NONBLOCK);
- time_limit = time(0) + proxy_timeout;
+ countdown = proxy_timeout;
do {
+ countdown -= 1;
while ((len = read(fds[0], line, sizeof(line)-1)) > 0) {
line[len] = 0;
APMD_SYSLOG(LOG_INFO, "+ %s", line);
@@ -372,16 +373,16 @@
goto proxy_done;
}
- sleep(1);
+ while (sleep(1) > 0) ;
} while (
- (time(0) < time_limit)
+ (countdown >= 0)
|| (proxy_timeout < 0)
);
APMD_SYSLOG(LOG_NOTICE, "Proxy has been running more than %d seconds; killing it", proxy_timeout);
kill(pid, SIGTERM);
- time_limit = time(0) + 5;
+ countdown = 5;
do {
retval = waitpid(pid, &status, WNOHANG);
if (retval == pid)
@@ -392,9 +393,9 @@
goto proxy_done;
}
- sleep(1);
+ while (sleep(1) > 0) ;
- } while (time(0) < time_limit);
+ } while (countdown >= 0);
kill(pid, SIGKILL);
status = __W_EXITCODE(0, SIGKILL);

View File

@ -1,16 +0,0 @@
Index: apmd-3.2.2.orig/Makefile
===================================================================
--- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000
+++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100
@@ -58,9 +57,8 @@
#CFLAGS=-O3 -m486 -fomit-frame-pointer
#LDFLAGS=-s
-LIBTOOL=libtool --quiet
-LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
-LT_LINK = $(LIBTOOL) --mode=link $(CC)
+LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
+LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
LT_INSTALL = $(LIBTOOL) --mode=install install
LT_CLEAN = $(LIBTOOL) --mode=clean rm

View File

@ -1,12 +0,0 @@
--- apmd-3.2.2.orig/Makefile
+++ apmd-3.2.2/Makefile
@@ -43,8 +43,7 @@
CC=gcc
CFLAGS=-O -g
-XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include \
- -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
+XTRACFLAGS=-Wall -pipe -I. \
-DVERSION=\"$(VERSION)\" \
-DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
LDFLAGS=

View File

@ -2,20 +2,20 @@ DESCRIPTION = "Set of tools for managing notebook power consumption."
SECTION = "base"
PRIORITY = "required"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://apm.h;firstline=6;endline=18;md5=c9a1f79036ab14aa157e15ed75ffd769"
DEPENDS = "libtool-cross"
PR = "r13"
PR = "r0"
SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz \
file://debian.patch \
file://workaround.patch \
SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz \
${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.diff.gz \
file://unlinux.patch \
file://libtool.patch \
file://init \
file://default \
file://apmd_proxy \
file://apmd_proxy.conf"
S = "${WORKDIR}/apmd-${PV}.orig"
S = "${WORKDIR}/apmd-3.2.2.orig"
inherit update-rc.d
@ -23,6 +23,7 @@ INITSCRIPT_NAME = "apmd"
INITSCRIPT_PARAMS = "defaults"
do_compile() {
# apmd doesn't use whole autotools. Just libtool for installation
oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool" apm apmd
}