From patchwork Sun Oct 25 20:24:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1387262 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Sth55EEX; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CK8Sg546hz9sSs for ; Mon, 26 Oct 2020 07:19:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5EA5F84707; Sun, 25 Oct 2020 20:19:11 +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 0Z26YpZDV9KS; Sun, 25 Oct 2020 20:19:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B78CE86113; Sun, 25 Oct 2020 20:19:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C75351BF909 for ; Sun, 25 Oct 2020 20:19:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C43A18688B for ; Sun, 25 Oct 2020 20:19:06 +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 dbBOR4WtZ_5F for ; Sun, 25 Oct 2020 20:19:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C4495867ED for ; Sun, 25 Oct 2020 20:19:05 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id y16so7542372ljk.1 for ; Sun, 25 Oct 2020 13:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SHVVznr8Wc3Y+9ObXe3VM62hZupYC6RzZ4jU113mUDA=; b=Sth55EEXVEbFdGVfbY8CYblr2/VV4CFbVX5GdEW2Q9PSQdSL8mlrcr7b2wYCeK15JN 3Ot3hwZO4/o3qct1W7j0VW+mfQzlCYjBNSJbi1tmkdKSQMTtAZXouy8SVsvVnxvVXKVy V/EoBvANTi57G5blCCTLeEZdZJZOD7p/NPa3dhuydrV//OPwAolO2H4NsRezZUUbdKRD AThqxE4+ItpyLY6deZsKpsM20VU3I7bIRb4Lx8dIaYx6JHvzsostWJVpXNNMaqCRNGZ+ ZOeCp+VZK0Vi+TDOUjbKmr/S8iuhZH+Qid2PZyokOh2ADZPmjxSCRbsn+DA92qwLeQ4Y I8FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SHVVznr8Wc3Y+9ObXe3VM62hZupYC6RzZ4jU113mUDA=; b=IVnLerCXJGyiQFq3RtOkWYk72vq56h1y6rXObQEaIC2+Bc1Wih8NGRbqm6SGJuPV0C W/VqA5r+8Ytiy+QcPO6u7trtIypySuVEKgydlzEltyJzjAQ/Ujlx76+odTCNfHLRmNju pqQsa4AidufdDZdmj0KXrRsYbGuUuetkntQqV4gWg4t3hJnZrj2Z9T0Qu2XdFCr39PEM YrVmazvMXBOSDozrXYiXGG20DKKHz8hJoXUJOkJ50gY256BdpmfiRJ+W/zuGZ1/3whG5 8SHv1EIVxCKjI6bm+CS7a64rgL8ZCKEpBiPGY+f9RMe8pB4G3pY+Ic8bdhpQ87GbaGsB 4Vcg== X-Gm-Message-State: AOAM533OfCxDAYTqiuRUiubxVLZ6xiZNnSpteR4qJ7a8xYIaXHQ5f8uY z/Ue9Th+kVHMuc4E4CkvUSZLiBGOEyw= X-Google-Smtp-Source: ABdhPJwouwq9Ae6bnbGEDYfwAsVj4EpGpUWJ12pceNJkIeprNOY6bdrJUiZiEdykzOj4nQTHQ8ZeXw== X-Received: by 2002:a2e:8184:: with SMTP id e4mr4699585ljg.383.1603657143562; Sun, 25 Oct 2020 13:19:03 -0700 (PDT) Received: from localhost.localdomain ([5.188.167.245]) by smtp.googlemail.com with ESMTPSA id m11sm833240lfa.112.2020.10.25.13.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 13:19:03 -0700 (PDT) From: Sergey Matyukevich To: buildroot@buildroot.org Date: Sun, 25 Oct 2020 23:24:57 +0300 Message-Id: <20201025202457.1009025-3-geomatsi@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201025202457.1009025-1-geomatsi@gmail.com> References: <20201025202457.1009025-1-geomatsi@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/2] package/gpsd: enable python support and modules X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernd Kuhls , Olivier Dautricourt , Sergey Matyukevich , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add option that enables gpsd python support including modules, tools, and gpsfake test harness. If python is enabled then install python modules unconditionally. Note that gpsd python modules run compatibly under Python 2 and 3.x for x >= 2. So enable gpsd python support when any Python version is enabled in board configuration. If no Python is enabled, but gpsd Python support is requested, then select Python 3. Signed-off-by: Sergey Matyukevich --- package/gpsd/Config.in | 10 ++++++++++ package/gpsd/gpsd.mk | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in index 5dd57c34b8..e63c3d66b9 100644 --- a/package/gpsd/Config.in +++ b/package/gpsd/Config.in @@ -79,6 +79,16 @@ config BR2_PACKAGE_GPSD_MAX_DEV_VALUE config BR2_PACKAGE_GPSD_SQUELCH bool "squelch gpsd_report and gpsd_hexdump to save cpu" +config BR2_PACKAGE_GPSD_PYTHON + bool "build Python support and modules" + depends on BR2_USE_WCHAR # python + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON + help + Python libraries and tools for the gpsd service daemon including gpsfake test harness. + +comment "GPSD python support not available with toolchain w/o wide characters support" + depends on !BR2_USE_WCHAR + comment "Protocols" config BR2_PACKAGE_GPSD_AIVDM diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 62c4c611c3..c51d4768d4 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -23,7 +23,6 @@ GPSD_SCONS_OPTS = \ prefix=/usr \ sysroot=$(STAGING_DIR) \ strip=no \ - python=no \ qt=no \ systemd=$(if $(BR2_INIT_SYSTEMD),yes,no) @@ -186,6 +185,18 @@ endif ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y) GPSD_SCONS_OPTS += max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) endif +ifeq ($(BR2_PACKAGE_PYTHON3),y) + GPSD_SCONS_OPTS += \ + python=yes \ + python_libdir="/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages" +else ifeq ($(BR2_PACKAGE_PYTHON),y) + GPSD_SCONS_OPTS += \ + python=yes \ + python_libdir="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" +else + GPSD_SCONS_OPTS = \ + python=no +endif GPSD_SCONS_ENV += \ LDFLAGS="$(GPSD_LDFLAGS)" \