From patchwork Sun Apr 7 14:58:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1080143 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44ccC21GJ2z9sQp for ; Mon, 8 Apr 2019 00:59:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8D9A586938; Sun, 7 Apr 2019 14:59:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IVuTEFtvffgP; Sun, 7 Apr 2019 14:59:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 341A4868FF; Sun, 7 Apr 2019 14:59:05 +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 C6E7D1BF276 for ; Sun, 7 Apr 2019 14:59:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C113E85187 for ; Sun, 7 Apr 2019 14:59:03 +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 VCCuQTbx0plV for ; Sun, 7 Apr 2019 14:59:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 7E2F384D9A for ; Sun, 7 Apr 2019 14:59:02 +0000 (UTC) Received: from fwd37.aul.t-online.de (fwd37.aul.t-online.de [172.20.27.137]) by mailout04.t-online.de (Postfix) with SMTP id 3081541AD522; Sun, 7 Apr 2019 16:59:00 +0200 (CEST) Received: from fli4l.lan.fli4l (Sy-rNBZGghDsklhdNagO8sunSlg2Ueg9RnmloXMpOiTbrywKnR8CZwjEukiRyvkwiu@[84.161.185.164]) by fwd37.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1hD9G7-1NRoFU0; Sun, 7 Apr 2019 16:58:59 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:52534 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.92) (envelope-from ) id 1hD9G6-0001J2-LZ; Sun, 07 Apr 2019 16:58:59 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 7 Apr 2019 16:58:58 +0200 Message-Id: <20190407145858.19985-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-ID: Sy-rNBZGghDsklhdNagO8sunSlg2Ueg9RnmloXMpOiTbrywKnR8CZwjEukiRyvkwiu X-TOI-MSGID: ce86d204-fe24-468a-9993-aeb7bd8e694a Subject: [Buildroot] [PATCH 1/1] package/flatbuffers: Enable host build 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: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Host version of flatc compiler is needed for Kodi 18.x: https://github.com/xbmc/xbmc/blob/master/cmake/modules/FindFlatBuffers.cmake#L51 Added upstream patch to install flatc to $(HOST_DIR)/bin Signed-off-by: Bernd Kuhls --- .../0001-Install-flatc-as-requested.patch | 36 +++++++++++++++++++ package/flatbuffers/flatbuffers.mk | 10 ++++++ 2 files changed, 46 insertions(+) create mode 100644 package/flatbuffers/0001-Install-flatc-as-requested.patch diff --git a/package/flatbuffers/0001-Install-flatc-as-requested.patch b/package/flatbuffers/0001-Install-flatc-as-requested.patch new file mode 100644 index 0000000000..1fffe7c091 --- /dev/null +++ b/package/flatbuffers/0001-Install-flatc-as-requested.patch @@ -0,0 +1,36 @@ +From 6980818337bb562cf89f4c2e72fa5918a461d428 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 14 Feb 2019 22:19:36 +0100 +Subject: [PATCH] Install flatc as requested (#5180) + +If FLATBUFFERS_BUILD_FLATC and FLATBUFFERS_INSTALL are set, flatc should +be installed regardless of the configuration. + +Downloaded from upstream commit +https://github.com/google/flatbuffers/commit/6980818337bb562cf89f4c2e72fa5918a461d428 + +Signed-off-by: Bernd Kuhls +--- + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a27da3fb7..4211e58b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -393,7 +393,6 @@ if(FLATBUFFERS_INSTALL) + install( + TARGETS flatc EXPORT FlatcTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- CONFIGURATIONS Release + ) + + install( +@@ -401,7 +400,6 @@ if(FLATBUFFERS_INSTALL) + FILE FlatcTargets.cmake + NAMESPACE flatbuffers:: + DESTINATION ${FB_CMAKE_DIR} +- CONFIGURATIONS Release + ) + endif() + diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk index 69054885ea..8cee5019cc 100644 --- a/package/flatbuffers/flatbuffers.mk +++ b/package/flatbuffers/flatbuffers.mk @@ -20,4 +20,14 @@ else FLATBUFFERS_CONF_OPTS += -DFLATBUFFERS_BUILD_SHAREDLIB=ON endif +HOST_FLATBUFFERS_CONF_OPTS += \ + -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DFLATBUFFERS_BUILD_FLATLIB=OFF \ + -DFLATBUFFERS_BUILD_FLATC=ON \ + -DFLATBUFFERS_BUILD_FLATHASH=OFF \ + -DFLATBUFFERS_BUILD_GRPCTEST=OFF \ + -DFLATBUFFERS_BUILD_SHAREDLIB=OFF \ + -DFLATBUFFERS_BUILD_TESTS=OFF + $(eval $(cmake-package)) +$(eval $(host-cmake-package))