From patchwork Mon Sep 3 07:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABl_PORTAY?= X-Patchwork-Id: 965268 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=savoirfairelinux.com 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 423hMV3cDfz9s1x for ; Mon, 3 Sep 2018 17:25:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3AC0886E47; Mon, 3 Sep 2018 07:25:38 +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 1kioajG1jcjo; Mon, 3 Sep 2018 07:25:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0730886D73; Mon, 3 Sep 2018 07:25:34 +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 1DEC51C2D35 for ; Mon, 3 Sep 2018 07:25:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 180A622812 for ; Mon, 3 Sep 2018 07:25:33 +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 VFzRlsEs+jHw for ; Mon, 3 Sep 2018 07:25:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by silver.osuosl.org (Postfix) with ESMTPS id 17EDC2280F for ; Mon, 3 Sep 2018 07:25:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 2933D9C3111; Mon, 3 Sep 2018 03:25:31 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5nHvJrMSobDk; Mon, 3 Sep 2018 03:25:30 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 9EEEF9C31EC; Mon, 3 Sep 2018 03:25:30 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p-Ha5ZT0JjDA; Mon, 3 Sep 2018 03:25:30 -0400 (EDT) Received: from t1000.mtl.sfl (unknown [192.168.50.190]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 724459C2555; Mon, 3 Sep 2018 03:25:30 -0400 (EDT) From: =?utf-8?q?Ga=C3=ABl_PORTAY?= To: buildroot@buildroot.org Date: Mon, 3 Sep 2018 03:25:26 -0400 Message-Id: <20180903072528.15744-2-gael.portay@savoirfairelinux.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180903072528.15744-1-gael.portay@savoirfairelinux.com> References: <20180903072528.15744-1-gael.portay@savoirfairelinux.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/3] leveldb: install memenv static library and header X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Ga=C3=ABl_Portay?= , Peter Seiderer , Steve James Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The project builds a tiny static library that consists of a single symbol which creates an in-memory LevelDB database. That library is not installed by default and may be used by other projects. This commit creates a config option that installs in the staging directory the libmemenv.a static library and the memenv.h header file when the option is set. Signed-off-by: Gaƫl PORTAY --- package/leveldb/Config.in | 10 ++++++++++ package/leveldb/leveldb.mk | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/package/leveldb/Config.in b/package/leveldb/Config.in index 163a75e8f2..4ceb2cfb5b 100644 --- a/package/leveldb/Config.in +++ b/package/leveldb/Config.in @@ -10,5 +10,15 @@ config BR2_PACKAGE_LEVELDB https://github.com/google/leveldb +if BR2_PACKAGE_LEVELDB + +config BR2_PACKAGE_LEVELDB_MEMENV + bool "memenv" + help + Installs memenv static library and header to create in-memory + LevelDB database. + +endif + comment "leveldb needs a toolchain w/ C++, threads" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/leveldb/leveldb.mk b/package/leveldb/leveldb.mk index 54942a0f27..c8c2e102c0 100644 --- a/package/leveldb/leveldb.mk +++ b/package/leveldb/leveldb.mk @@ -21,10 +21,18 @@ define LEVELDB_BUILD_CMDS $(LEVELDB_MAKE_ARGS) -C $(@D) endef +ifdef BR2_PACKAGE_LEVELDB_MEMENV +define LEVELDB_INSTALL_MEMENV + $(INSTALL) -m 0644 $(@D)/out-static/libmemenv.a $(STAGING_DIR)/usr/lib + $(INSTALL) -D -m 0644 $(@D)/helpers/memenv/memenv.h $(STAGING_DIR)/usr/include/helpers/memenv/memenv.h +endef +endif + define LEVELDB_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) \ INSTALL_ROOT=$(STAGING_DIR) INSTALL_PREFIX=/usr \ $(LEVELDB_MAKE_ARGS) -C $(@D) install + $(LEVELDB_INSTALL_MEMENV) endef define LEVELDB_INSTALL_TARGET_CMDS