On Wed, Feb 09, 2011 at 06:52:45PM +0000, Stuart Henderson wrote: > Ports are primarily for building packages, and we want those builds to > be repeatable rather than change depending on what you've got installed. > > If you want the easier user experience, use packages where possible. > > > On 2011/02/09 16:19, Pascal Stumpf wrote: > > Hi ports@, > > > > found the following in devel/jdk/java.port.mk: > > > > [...] > > > > .elif ${MODJAVA_VER} == "1.3+" || ${MODJAVA_VER} == "1.4+" > > ONLY_FOR_ARCHS?= i386 amd64 > > . if ${NO_BUILD:L} != "yes" > > JAVA_HOME= ${LOCALBASE}/jdk-1.5.0 > > BUILD_DEPENDS+= jdk->=1.5.0,<1.6:devel/jdk/1.5 > > . endif > > > > [...] > > > > So, I’m curious: Why would MODJAVA_VER = 1.[34]+ imply ‘jdk 1.5 only’? > > This behaviour is essentially the same for 1.[56]+ too, setting > > RUN_DEPENDS as expected but forcing a specific jdk version for > > BUILD_DEPENDS. Can someone please explain if/why this is intended? > > > > IMO, for MODJAVA_VER = x.y+, it should detect whether a jdk is already > > present on the system, and use that as both BUILD_DEPENDS and > > RUN_DEPENDS (and if not, prompt the user to install the jdk-1.7 package). > > > > Cheers, > > Pascal > > > > I’m not sure what you mean by saying the ‘build’ should be repeatable, but I do agree that the resulting package should not depend on what was installed at build time. So to correct myself, I think RUN_DEPENDS should stay as-is, but the build system should not impose any artificial restriction on which jdk version is required. Changing BUILD_DEPENDS has no effect on the package, right?
I do know that packages are preferred, but *if* someone decides to build from ports, he should not be forced to install 2-3 different jdk versions (possibly with restrictive licenses) where jdk-1.7 would do perfectly fine.