From patchwork Sat May 3 14:02:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 345315 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 383FC140172 for ; Sun, 4 May 2014 00:02:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7EBB28BF82; Sat, 3 May 2014 14:02:50 +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 edTzLGkPUmgK; Sat, 3 May 2014 14:02:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id F23948BF99; Sat, 3 May 2014 14:02:48 +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 A732A1C22FB for ; Sat, 3 May 2014 14:02:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A2831320E7 for ; Sat, 3 May 2014 14:02:46 +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 OOGN8thbLEct for ; Sat, 3 May 2014 14:02:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by silver.osuosl.org (Postfix) with ESMTPS id E069531F36 for ; Sat, 3 May 2014 14:02:45 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id x48so386175wes.36 for ; Sat, 03 May 2014 07:02:44 -0700 (PDT) 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=51MkRQhOrk2nFIHVM0q3mOz42sHXVoGIITVx2cOEo2U=; b=0RJCTqiKrRVvOt+bCjRlvoDV4uEwpTvroza8pqh5IPtY367eOpNkLA2WrnTNxn2YiF wVFhkuB+H7eF7TuGzG9/QjPYCDh9S0BhI1HtYrHL8rOhLmjSqPh6QpZvIDHnxcnTKiMv uHw2kiH79Qy31zkeRCFivjCQR18jZDbttNOJNM3URnc/jVE+nnOfdGrEwff04kLrHuAd wRzbIe/FU4I00OG5XiKg5LZkSoVpWg2Gw0V239HY9YQWloxlDtv1L5MnRxeF61yZgtIi /cAGxWiEns33/c+LEG2uSSAf1QFhqUEsuO4nqzLyHdC/8cOK5Kbcppq8rPlfHYrYFUzG bTIQ== X-Received: by 10.180.206.36 with SMTP id ll4mr7629697wic.57.1399125764423; Sat, 03 May 2014 07:02:44 -0700 (PDT) Received: from localhost (13-105-190-109.dsl.ovh.fr. [109.190.105.13]) by mx.google.com with ESMTPSA id fi2sm4335833wic.15.2014.05.03.07.02.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 03 May 2014 07:02:43 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sat, 3 May 2014 16:02:34 +0200 Message-Id: <1399125754-32118-2-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1399125754-32118-1-git-send-email-maxime.hadjinlian@gmail.com> References: <1399125754-32118-1-git-send-email-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [PATCH v2 2/2] classpath: Use generic check for host program 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 Remove the specific check that was done in dependencies.sh to use the generic one that were introduced by the previous patch. Also, introduce, BR2_NEEDS_HOST_JAVAC and BR2_NEEDS_HOST_JAR. In a following patch, we will remove the specific check done for classpath, and the classpath package will use these generic variant. Signed-off-by: Maxime Hadjinlian Reviewed-by: Thomas De Schampheleire --- Changes v1 -> v2: - Add the introduction of BR2_NEEDS_HOST_JAVAC & BR2_NEEDS_HOST_JAR in this patch instead of the previous one. --- Config.in | 10 ++++++++++ package/classpath/Config.in | 2 ++ support/dependencies/dependencies.sh | 18 ++++++++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Config.in b/Config.in index 79a455d..0d90ecc 100644 --- a/Config.in +++ b/Config.in @@ -23,6 +23,16 @@ config BR2_EXTERNAL config BR2_NEEDS_HOST_JAVA bool +# Hidden boolean selected by packages in need of javac in order to build +# (example: classpath) +config BR2_NEEDS_HOST_JAVAC + bool + +# Hidden boolean selected by packages in need of jar in order to build +# (example: classpath) +config BR2_NEEDS_HOST_JAR + 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/package/classpath/Config.in b/package/classpath/Config.in index 0153bca..a11845c 100644 --- a/package/classpath/Config.in +++ b/package/classpath/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_CLASSPATH bool "classpath" + select BR2_NEEDS_HOST_JAR + select BR2_NEEDS_HOST_JAVAC depends on BR2_PACKAGE_JAMVM depends on BR2_INET_IPV6 help diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 655b4c6..255a07b 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -187,20 +187,18 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BR2_CONFIG > /dev/null && \ fi fi -if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then - for prog in javac jar; do - if ! which $prog > /dev/null ; then - echo >&2 - echo "You must install '$prog' on your build machine" >&2 - exit 1 - fi - done -fi - if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then check_prog_host "java" fi +if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then + check_prog_host "javac" +fi + +if grep -q ^BR2_NEEDS_HOST_JAR=y $BR2_CONFIG ; then + check_prog_host "jar" +fi + if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then if test ! -f /lib/ld-linux.so.2 ; then echo