From patchwork Mon Feb 17 23:37:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 321221 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3E87E2C00C4 for ; Tue, 18 Feb 2014 10:38:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 92F098B159; Mon, 17 Feb 2014 23:38:01 +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 IT3EOxciYIEh; Mon, 17 Feb 2014 23:37:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4F31F8B108; Mon, 17 Feb 2014 23:37:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1D4031C245A for ; Mon, 17 Feb 2014 23:37:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0A62A30424 for ; Mon, 17 Feb 2014 23:37:57 +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 TU+SMTElH4g1 for ; Mon, 17 Feb 2014 23:37:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by silver.osuosl.org (Postfix) with ESMTPS id C554126425 for ; Mon, 17 Feb 2014 23:37:55 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x12so2776638wgg.20 for ; Mon, 17 Feb 2014 15:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ElKd1lTw37MtwyLXGzM9vQwaZbq/1goOMISZkc/qt9A=; b=lYOD/rfMwdTiyVnqf/vHRbO9fni30QXdeNn6QuAB3I4pWrDM0BU/9J4Dk8IM1wk5ft wvNA3AQmZy0XkR+WY2NY6iSToTmXKq2l3MFd7ZQi5UtTCNMmF98qUja33erWF+UddLHr 3KLp46m/D+cZrfC3dqBoTSuIUUzklTfnu6hNAxXQq/GoNb0+AYYwR5bVGP/EoZDb59PA PqZ8UBBqrw19N5DA340Kzdxw3aF/thqQtlHpIRa9YA1zI4BvIbRCGOTfZ72TS6nxVcI6 XazAU4IalF3dqssfq4c6KqEqRPjyMjYYj2olPjJWu+/xNX/mHEM/1oQkN3u2dlcqVS8d P8ag== X-Received: by 10.180.79.7 with SMTP id f7mr15363729wix.20.1392680274341; Mon, 17 Feb 2014 15:37:54 -0800 (PST) Received: from localhost (13-105-190-109.dsl.ovh.fr. [109.190.105.13]) by mx.google.com with ESMTPSA id 12sm40620204wjm.10.2014.02.17.15.37.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 17 Feb 2014 15:37:53 -0800 (PST) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Tue, 18 Feb 2014 00:37:12 +0100 Message-Id: <1392680233-24585-4-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392680233-24585-1-git-send-email-maxime.hadjinlian@gmail.com> References: <1392680233-24585-1-git-send-email-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [PATCH v7 3/4] infra: Introduce BR2_HOST_NEEDS_JAVA X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net XBMC needs Java on the host in order to build, because it uses a code-generator which is build in two phases: In the first phase SWIG is used to parse C++ header files that define the API. SWIG outputs an XML file that contains a complete description of the structure of the API. In the second phase, the XML file is ingested by a Groovy (Java) program that then creates C++ code that forms the bridge to the scripting language (Python). The second phase is why we need java on the host. You can learn more at the XBMC's wiki: http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works In order to check that, this patch introduce this mechanism in dependencies.sh It also defines the variable in Config.in Signed-off-by: Maxime Hadjinlian --- Changes v6 -> v7: - Fixes old use of BUILDROOT_CONFIG instead of BR2_CONFIG - Add definition of the variable to Config.in Changes v5 -> v6: - Remove useless loop (Thomas Petazzoni) - Thanks to Martin Bark idea, change this patch to have a non package specific variable. Changes v1 -> v5: - Patch non existant before --- Config.in | 5 +++++ support/dependencies/dependencies.sh | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/Config.in b/Config.in index bcfefc7..8afd156 100644 --- a/Config.in +++ b/Config.in @@ -18,6 +18,11 @@ config BR2_EXTERNAL string option env="BR2_EXTERNAL" +# Hidden boolean selected by packages in need of Java in order to build +# (example: xbmc) +config BR2_HOST_NEEDS_JAVA + bool + # Hidden boolean selected by pre-built packages for x86, when they # need to run on x86-64 machines (example: pre-built external # toolchains, binary tools like SAM-BA, etc.). diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 0e7e1fa..05039ea 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -191,6 +191,14 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then done fi +if grep -q ^BR2_HOST_NEEDS_JAVA=y $BR2_CONFIG ; then + if ! which java > /dev/null ; then + echo >&2 + echo "You must install '$prog' on your build machine" >&2 + exit 1 + fi +fi + if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then if test ! -f /lib/ld-linux.so.2 ; then echo