diff options
Diffstat (limited to 'yocto-poky/meta/recipes-bsp/apmd')
-rw-r--r-- | yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch | 53 | ||||
-rw-r--r-- | yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch | 26 | ||||
-rw-r--r-- | yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb | 8 |
3 files changed, 87 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch b/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch new file mode 100644 index 000000000..3d32c49cd --- /dev/null +++ b/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch @@ -0,0 +1,53 @@ +When building use the libtool intermediate .lo files instead of explicitly using +the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is +a static build, and .libs/foo.o is a shared build. + +If static libraries have been disabled globally then libtool won't generate them +and explicit references to foo.o won't be satisfied. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/Makefile b/Makefile +index bb695c6..5f60146 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,7 +28,7 @@ endif + + .SUFFIXES: + +-OBJS=apmlib.o ++OBJS=apmlib.lo + EXES=apm apmd xapm apmsleep + HEADERS=apm.h + +@@ -66,22 +66,22 @@ all: $(EXES) + + $(OBJS): $(HEADERS) + +-%.o: %.c ++%.lo: %.c + $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $< + +-%: %.o $(LIBAPM) ++%: %.lo $(LIBAPM) + $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) + +-xapm.o: xapm.c ++xapm.lo: xapm.c + $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $< + +-apmd: apmd.o ++apmd: apmd.lo + +-apmsleep: apmsleep.o ++apmsleep: apmsleep.lo + +-apmexists: apmexists.o ++apmexists: apmexists.lo + +-xapm: xapm.o $(LIBAPM) ++xapm: xapm.lo $(LIBAPM) + $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) $(XLDFLAGS) $(XLIBS) + + $(LIBAPM): apmlib.lo diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch b/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch new file mode 100644 index 000000000..c5faa85fa --- /dev/null +++ b/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch @@ -0,0 +1,26 @@ +Define non-posix W* funcitons + +C libraries like musl dont define them + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +Index: apmd-3.2.2.orig/apmd.c +=================================================================== +--- apmd-3.2.2.orig.orig/apmd.c ++++ apmd-3.2.2.orig/apmd.c +@@ -55,6 +55,14 @@ + #define MINIMUM_RATE_CALC_TIME 120 + #endif + ++#ifndef _POSIX_SOURCE ++ ++#define __WCOREFLAG 0200 ++#define __WCOREDUMP(x) (_W_INT(x) & __WCOREFLAG) ++#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) ++ ++#endif ++ + /* + * For the verbosity level feature to be useful, + * we rely on the fact that syslog.h assigns adjacent diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb index ea105268a..4ff6ad087 100644 --- a/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb +++ b/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb @@ -13,6 +13,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \ file://legacy.patch \ file://libtool.patch \ file://unlinux.patch \ + file://wexitcode.patch \ + file://linkage.patch \ file://init \ file://default \ file://apmd_proxy \ @@ -22,6 +24,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \ SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8" SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d" +# for this package we're mostly interested in tracking debian patches, +# and not in the upstream version where all development has effectively stopped +UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)" + S = "${WORKDIR}/apmd-3.2.2.orig" inherit update-rc.d systemd @@ -32,6 +38,8 @@ INITSCRIPT_PARAMS = "defaults" SYSTEMD_SERVICE_${PN} = "apmd.service" SYSTEMD_AUTO_ENABLE = "disable" +EXTRA_OEMAKE = "-e MAKEFLAGS=" + do_compile() { # apmd doesn't use whole autotools. Just libtool for installation oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" apm apmd |