[Buildroot] [PATCH v7 3/4] infra: Introduce BR2_HOST_NEEDS_JAVA

Maxime Hadjinlian maxime.hadjinlian at gmail.com
Tue Feb 18 16:41:17 UTC 2014


Hi Thomas, all
On Tue, Feb 18, 2014 at 5:18 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Dear Maxime Hadjinlian,
>
> On Tue, 18 Feb 2014 00:37:12 +0100, Maxime Hadjinlian wrote:
>> 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.
>
> People inventing such horrible code generation flows really have a
> problem. They should probably talk to M-x doctor.
What can I say ? :)
>
>> +# Hidden boolean selected by packages in need of Java in order to build
>> +# (example: xbmc)
>> +config BR2_HOST_NEEDS_JAVA
>> +     bool
>
> Do we need a kconfig bool for this? We have the same situation for
> classpath, and we haven't introduced a specific kconfig bool for it.
Yes, I had two patches:
  - One to introduce kconfig bool option for JAVAC and JAR
  - The second to make classpath uses them and remove the specific in
dependencies.sh

It seems cleaner and if another package has the same needs, it's already there.
>
> Moreover, I am not sure BR2_HOST_NEEDS_JAVA is the right name. It's not
> really the host that needs Java, it's the compilation process that
> requires a host Java. So BR2_NEEDS_HOST_JAVA is probably more
> technically correct.
True, I'll fix that.
>
> Thanks,
>
> Thomas
Thanks
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com



More information about the buildroot mailing list