From patchwork Wed Jun 3 20:41:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 480163 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 294CE1402B1 for ; Thu, 4 Jun 2015 06:42:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=XPmzmLnN; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A9C5694E55; Wed, 3 Jun 2015 20:42:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2KZ+sLcUv9pH; Wed, 3 Jun 2015 20:42:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B059394E29; Wed, 3 Jun 2015 20:42:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 087971C04C4 for ; Wed, 3 Jun 2015 20:42:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 05601A1572 for ; Wed, 3 Jun 2015 20:42:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5gTGMtBf3SZa for ; Wed, 3 Jun 2015 20:42:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2791DA156A for ; Wed, 3 Jun 2015 20:42:23 +0000 (UTC) Received: by wiga1 with SMTP id a1so27263596wig.0 for ; Wed, 03 Jun 2015 13:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=s0m3X+4kT+PH3iIM+i2q9XbY05cxatPZ1LbgGp6tcVI=; b=XPmzmLnNDtH2F7pxBMp5R35n0nY0/zVh9F7LtmEm+WnDcuAdxknlHBiPX386IC/Ji6 AmYX8nMMUAY5P0+EbeNhnkM1qCPn8IB3LWw9AsjfJ2tkTgzIZngl2pwqZ9TYeaj0Apy4 e/TXg9137ZnDaiODFnbBsWtfj2e+zesmUDo04JQa8bG+gEq9esl7eKMeiLcAp2wFsa1t rzBZO4IcW6LQyn0s7xBr5ADZh9KIp1q4pmSASdzcLUjG/T/FqhjY5FWZSPCGj8Zi1/6Y bBYB16OsY8m7cPNOKnbHuL5kCXXdp0QkMd3h6D/VENZvf/P4W+LDcGio+7ePjXlRLdcU oZuw== X-Received: by 10.194.176.201 with SMTP id ck9mr64076133wjc.108.1433364141833; Wed, 03 Jun 2015 13:42:21 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by mx.google.com with ESMTPSA id u7sm28119517wif.3.2015.06.03.13.42.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jun 2015 13:42:21 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Wed, 3 Jun 2015 22:41:47 +0200 Message-Id: <02cd165fbd70dc0144b7cbb257c09cd953c73886.1433362840.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 30/32 v2] package/matchbox-panel: use ACPI for the battery applet X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" It is possible to use ACPI to monitor the battery with the battery mini-applet. If ACPI is not explicitly enabled, then APM is used if available; if ACPI is not explcitly enabled and APM is not available, then the battery applet is not built. However, APM is not really current nowadays, and possibly missing for a bunch of architecture... What is a pity is that there is no way to explicitly enable or disable the applet; it only relies on auto-detection... :-( So, forcibly use ACPI on platforms that have it, that is x86 (32- and 64-bit) and AArch64. Signed-off-by: "Yann E. MORIN" Cc: Arnout Vandecappelle Reviewed-by: Arnout Vandecappelle --- Changes v1 -> v2: - force use of ACPI instead of making it an option (Arnout) - fix build of applet (Arnout) --- package/matchbox-panel/0003-mb-applet-battery.patch | 21 +++++++++++++++++++++ package/matchbox-panel/matchbox-panel.mk | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 package/matchbox-panel/0003-mb-applet-battery.patch diff --git a/package/matchbox-panel/0003-mb-applet-battery.patch b/package/matchbox-panel/0003-mb-applet-battery.patch new file mode 100644 index 0000000..585eb39 --- /dev/null +++ b/package/matchbox-panel/0003-mb-applet-battery.patch @@ -0,0 +1,21 @@ +mb-applet-battery: don't declare line_parse as static + +Fix this build failure: + mb-applet-battery.c: In function 'read_apm': + mb-applet-battery.c:181:2: error: invalid storage class for function 'line_parse' + +Reported-by: Arnout Vandecappelle +Signed-off-by: "Yann E. MORIN" + +diff -durN matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c matchbox-panel-0.9.3/applets/mb-applet-battery.c +--- matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c 2006-02-07 23:27:24.000000000 +0100 ++++ matchbox-panel-0.9.3/applets/mb-applet-battery.c 2015-05-02 17:13:00.843578796 +0200 +@@ -177,7 +177,7 @@ + unsigned long present_rate; + }; + +- static int ++ int + line_parse(char *line, struct entry *e) + { + char *ptr; diff --git a/package/matchbox-panel/matchbox-panel.mk b/package/matchbox-panel/matchbox-panel.mk index f7d699b..a5da780 100644 --- a/package/matchbox-panel/matchbox-panel.mk +++ b/package/matchbox-panel/matchbox-panel.mk @@ -20,6 +20,13 @@ else MATCHBOX_PANEL_CONF_OPTS += --disable-startup-notification endif +# Using ACPI is only possible on x86 (32- or 64-bit) or AArch64 +ifeq ($(BR2_aarch64)$(BR2_i386)$(BR2_x86_64),y) +MATCHBOX_PANEL_CONF_OPTS += --enable-acpi-linux +else +MATCHBOX_PANEL_CONF_OPTS += --disable-acpi-linux +endif + ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS),y) MATCHBOX_PANEL_DEPENDENCIES += wireless_tools endif