From patchwork Tue Apr 30 20:11:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1093473 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=none (p=none dis=none) header.from=embedded.rocks 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 44tt2w10rNz9s9N for ; Wed, 1 May 2019 06:11:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5D7B985F89; Tue, 30 Apr 2019 20:11:34 +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 e3rCenAS2EhA; Tue, 30 Apr 2019 20:11:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A3C9485F71; Tue, 30 Apr 2019 20:11:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E813D1BF27A for ; Tue, 30 Apr 2019 20:11:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E520025A4D for ; Tue, 30 Apr 2019 20:11:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MrEkjqcEpUgl for ; Tue, 30 Apr 2019 20:11:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by silver.osuosl.org (Postfix) with ESMTPS id E81FA22DD3 for ; Tue, 30 Apr 2019 20:11:29 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 077672400E6 for ; Tue, 30 Apr 2019 22:11:26 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 44tt2k1mwDz9rxN for ; Tue, 30 Apr 2019 22:11:25 +0200 (CEST) Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id j5Hj6zseUaf8; Tue, 30 Apr 2019 22:11:24 +0200 (CEST) Received: from nzxt.fritz.box (port-92-193-186-113.dynamic.qsc.de [92.193.186.113]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 30 Apr 2019 22:11:24 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Tue, 30 Apr 2019 22:11:20 +0200 Message-Id: <20190430201121.15634-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/libzip: add host variant 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The updated host mfgtool package needs the host variant of libzip. Signed-off-by: Jörg Krause --- package/libzip/libzip.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/libzip/libzip.mk b/package/libzip/libzip.mk index b90ea76f5e..280ca6d8c7 100644 --- a/package/libzip/libzip.mk +++ b/package/libzip/libzip.mk @@ -11,6 +11,7 @@ LIBZIP_LICENSE = BSD-3-Clause LIBZIP_LICENSE_FILES = LICENSE LIBZIP_INSTALL_STAGING = YES LIBZIP_DEPENDENCIES = zlib +HOST_LIBZIP_DEPENDENCIES = host-zlib ifeq ($(BR2_PACKAGE_BZIP2),y) LIBZIP_DEPENDENCIES += bzip2 @@ -33,3 +34,4 @@ LIBZIP_CONF_OPTS += -DENABLE_OPENSSL=OFF endif $(eval $(cmake-package)) +$(eval $(host-cmake-package)) From patchwork Tue Apr 30 20:11:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1093474 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44tt2y6xQ9z9s9N for ; Wed, 1 May 2019 06:11:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DA91187916; Tue, 30 Apr 2019 20:11:34 +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 sZPQc41Or9qR; Tue, 30 Apr 2019 20:11:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5E2FA878F1; Tue, 30 Apr 2019 20:11:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 308021BF27A for ; Tue, 30 Apr 2019 20:11:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2E23B22DD3 for ; Tue, 30 Apr 2019 20:11:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MICsA9hBL8iy for ; Tue, 30 Apr 2019 20:11:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by silver.osuosl.org (Postfix) with ESMTPS id 0C0BD259AB for ; Tue, 30 Apr 2019 20:11:30 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 077502400E5 for ; Tue, 30 Apr 2019 22:11:26 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 44tt2k2gCRz9rxR for ; Tue, 30 Apr 2019 22:11:26 +0200 (CEST) Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id SKXX6pqmTRkj; Tue, 30 Apr 2019 22:11:25 +0200 (CEST) Received: from nzxt.fritz.box (port-92-193-186-113.dynamic.qsc.de [92.193.186.113]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 30 Apr 2019 22:11:25 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Tue, 30 Apr 2019 22:11:21 +0200 Message-Id: <20190430201121.15634-2-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430201121.15634-1-joerg.krause@embedded.rocks> References: <20190430201121.15634-1-joerg.krause@embedded.rocks> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/mfgtools: bump to version 1.2.91 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The version 0.02 was a pre-release and is dated from Nov 20, 2017. Meanwhile: * the repo owner switch to NXPmicro * latest version is 1.12.91 * the build system is CMake * the license is BSD-3 only Note, that mfgtools uses git to define a version string `GIT_VERSION`. It does so even when building from the provided source tarball. The problem is, that git provides the version information of Buildroot. To fix this, we patch the logic to retrieve the git version so it does not run git for mfgtools. Unfortunately, this breaks the build process because of the missing `gitversion.h` header file. Therefore, we add a post configure hook which generates this file with the correct version string. Signed-off-by: Jörg Krause --- .../0001-Fix-version-generation.patch | 38 +++++++++++++++++++ package/mfgtools/mfgtools.hash | 5 +-- package/mfgtools/mfgtools.mk | 35 ++++++----------- 3 files changed, 51 insertions(+), 27 deletions(-) create mode 100644 package/mfgtools/0001-Fix-version-generation.patch diff --git a/package/mfgtools/0001-Fix-version-generation.patch b/package/mfgtools/0001-Fix-version-generation.patch new file mode 100644 index 0000000000..ca48c522ab --- /dev/null +++ b/package/mfgtools/0001-Fix-version-generation.patch @@ -0,0 +1,38 @@ +From af9704ca3b7b02503f8ade069a77203869f0bcfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 30 Apr 2019 15:51:47 +0200 +Subject: [PATCH] Fix version generation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +mfgtools uses git to extract its own version number. + +This is an issue as the git-extracted version is conflicting when a top +level project, e.g. a package manager, itself is a git repository. + +Since these git calls are legitimate only if git is used for the mfgtools +subtree only, this patch adds a check: A .git directory has to exist at +the root of the project to enable git-extracted version string. + +Signed-off-by: Jörg Krause +--- + libuuu/gen_ver.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libuuu/gen_ver.sh b/libuuu/gen_ver.sh +index d4e8c1b..bcc04a2 100755 +--- a/libuuu/gen_ver.sh ++++ b/libuuu/gen_ver.sh +@@ -13,7 +13,7 @@ else + fi + + # Test if we are in a repo +-if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; ++if [ -d .git ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; + then + #echo "In a repo" + # Get the version of the last commit of the repo +-- +2.21.0 + diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash index 4932a80dba..4db97e6ae2 100644 --- a/package/mfgtools/mfgtools.hash +++ b/package/mfgtools/mfgtools.hash @@ -1,4 +1,3 @@ # locally computed -sha256 055d71227d18883d6e8bc9e854c076015f9a7749820a94272e19071bf0b25c89 mfgtools-v0.02.tar.gz -sha256 2655559a6bb1179eae514f5c7166f4ede4f2453efa9cf4dc3c045cab5d57dede LICENSE -sha256 0963b6e5086bf454265b0f57821a02b681d1211e40ad74c310231cb4d94815c9 README.txt +sha256 378caa930fdc1b06d49abf26811827f12103d995438b91302a7c6e34368419f9 mfgtools-uuu_1.2.91.tar.gz +sha256 cc8d47f7b9260f6669ecd41c24554c552f17581d81ee8fc602c6d23edb8bf495 LICENSE diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk index e4663a8af9..c42b18d43b 100644 --- a/package/mfgtools/mfgtools.mk +++ b/package/mfgtools/mfgtools.mk @@ -4,31 +4,18 @@ # ################################################################################ -MFGTOOLS_VERSION = v0.02 -MFGTOOLS_SITE = $(call github,codeauroraforum,mfgtools,$(MFGTOOLS_VERSION)) -MFGTOOLS_SUBDIR = MfgToolLib -MFGTOOLS_LICENSE = BSD-3-Clause or CPOL -MFGTOOLS_LICENSE_FILES = LICENSE README.txt -HOST_MFGTOOLS_DEPENDENCIES = host-libusb +MFGTOOLS_VERSION = uuu_1.2.91 +MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION)) +MFGTOOLS_LICENSE = BSD-3-Clause +MFGTOOLS_LICENSE_FILES = LICENSE +HOST_MFGTOOLS_DEPENDENCIES = host-libusb host-libzip host-zlib -HOST_MFGTOOLS_CFLAGS = \ - $(HOST_CFLAGS) $(HOST_LDFLAGS) -std=c++11 -lpthread \ - -L$(@D)/MfgToolLib -lMfgToolLib -I$(@D)/MfgToolLib \ - -lusb-1.0 -I$(HOST_DIR)/include/libusb-1.0 \ - -fpermissive -Wno-write-strings - -define HOST_MFGTOOLS_CLI_BUILD - $(HOST_CONFIGURE_OPTS) $(MAKE) CC="$(HOSTCXX)" \ - CFLAGS="$(HOST_MFGTOOLS_CFLAGS)" -C $(@D)/TestPrgm -endef - -HOST_MFGTOOLS_POST_BUILD_HOOKS += HOST_MFGTOOLS_CLI_BUILD - -define HOST_MFGTOOLS_INSTALL_CMDS - $(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \ - $(HOST_DIR)/lib/libMfgToolLib.so - $(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli \ - $(HOST_DIR)/bin/mfgtoolcli +# Version string generation is broken in mfgtools as it relies on git, even +# when building from a source tarball. We patch gen_ver.sh to prevent defining +# the GIT_VERSION in the build step and define GIT_VERSION ourself. +define MFGTOOLS_SET_VERSION + echo '#define GIT_VERSION "lib$(MFGTOOLS_VERSION)"' > $(@D)/libuuu/gitversion.h endef +HOST_MFGTOOLS_POST_CONFIGURE_HOOKS += MFGTOOLS_SET_VERSION $(eval $(host-cmake-package))