Subject: Re: devel/apache-ant problem
To: None <tech-pkg@netbsd.org>
From: Antoine Reilles <Antoine.Reilles@loria.fr>
List: tech-pkg
Date: 12/13/2005 22:34:38
--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Tue, Dec 13, 2005 at 02:03:36PM -0700, brook@biology.nmsu.edu wrote:
> I am having a problem with the devel/apache-ant package.  The problem
> seems to be associated with executing the $JAVACMD command inside the
> bin/ant wrapper program.

>      +# use ${PREFIX}/bin/java (wrapper)
>      +if [ "$JAVACMD" =3D "" ] ; then
>      +  JAVACMD=3D@PREFIX@/bin/java
>      +fi
=20
> The problem is that there is no $PREFIX/bin/java installed by java,
> and so the program fails.
It should be provided by pkg_alternatives
I don't know what happens if you do not have pkg_alternatives installed
pkg_alternatives should be installed as soon as you install a package
providing an alternative, and i counted on that for apache-ant.

A better solution for this would be to have a variable providing the
path to java in mk/java-vm.mk, and use it instead of the
pkg_alternatives wrapper

> If the definition of JAVACMD is changed to
>     JAVACMD=3D$JAVA_HOME/bin/java
> it seems to work fine.
yes, but that will probably work only for sun's java. kaffe also
provides a java_home/bin/java, but do all java vm do the same ?
If yes, this is a change we should take
 =20
> Is there some other magic package that is supposed to be installed, or
> do I have things misconfigured?  How is this supposed to work
> correctly as written?
it's pkg_alternatives, but i don;t know much on how it works
anyway, it would be better for apache-ant not to depend on that, since
it looks like it may break.

Best regards,
antoine

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDnz5u4VqmoGDE/mwRAp2HAJ9zr33Mj1TNx2/FC7RgDSOxoPlengCdFHsL
y9ObaOC4gbIbY+kOm0+ztl4=
=3Gau
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--