Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2012 19:01:49 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Jason Helfman <jgh@FreeBSD.org>
Cc:        freebsd-eclipse@FreeBSD.org, freebsd-java@FreeBSD.org
Subject:   Re: [RFC] New Port: Eclipse Java Compiler, java/eclipse-ecj
Message-ID:  <201203201901.50789.jkim@FreeBSD.org>
In-Reply-To: <20120320183828.GB13507@dormouse.experts-exchange.com>
References:  <20120318180225.GA51618@dormouse.experts-exchange.com> <201203201230.06968.jkim@FreeBSD.org> <20120320183828.GB13507@dormouse.experts-exchange.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 20 March 2012 02:38 pm, Jason Helfman wrote:
> On Tue, Mar 20, 2012 at 12:29:57PM -0400, Jung-uk Kim thus spake:
> >> I am unable to validate this with the jar that is built. Are you
> >> able to get it to work?
> >
> >No, current port builds unusable ecj.jar. :-(
>
> I am able to compile with it with no issue. What issues are you
> seeing?
>
> >> >While you are at it, please add these:
> >> >
> >> >USE_ZIP=        yes
> >>
> >> Why? It isn't a zip file, and why is this dependency required?
> >
> >A JAR file is essentially a ZIP file with additional meta-data,
> > just like a FreeBSD package is a tarball with meta-data.
> >
> >% file /usr/local/openjdk6/jre/lib/rt.jar
> >/usr/local/openjdk6/jre/lib/rt.jar: Zip archive data, at least
> > v1.0 to extract
> >
> >If you are really concerned about the additiaonal build
> > dependency, you may use jar but (bsd)tar is the worst choice.
>
> Tar is completely valid for uncompressing zip archives.

Yes, bsdtar is good enough for most cases.  But we also had some 
issues with it in the past.  I believe these problems are all fixed, 
however.  What's wrong with jar, BTW?

> >> >NO_WRKSUBDIR=   yes
> >>
> >> Can't see why this would be an issue to put in.
> >>
> >> >and remove these:
> >> >
> >> >BUILD_WRKSRC=   ${WRKDIR}
> >>
> >> Why?  Otherwise, I need to put:
> >> WRKSRC=	${WRKDIR}
> >
> >That's because it is easier to read/maintain for maintainer(s),
> >"FOO=yes" is easier to parse with scripts, it is the "official"
> > ports way to handle this case, etc, etc...
>
> Scripts can still parse and find both WRKDIR and WRKSRC in this
> port regardless of the option I use. If BUILD_WRKSRC is not easier,
> why is it bpm?
>
> I am also confused by this. What would I be setting to yes, to
> resolve this issue?

Defining NO_WRKSUBDIR eliminates needs for BUILD_WRKSRC or WRKSRC.

# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually
#          unpacks to.
#          Default: ${WRKDIR}/${DISTNAME} unless NO_WRKSUBDIR is set,
#          in which case simply ${WRKDIR}
...
# BUILD_WRKSRC  - Directory to do build in (default: ${WRKSRC}).

> >bsd.port.mk:
> ># NO_WRKSUBDIR  - Assume port unpacks directly into ${WRKDIR}.
>
> It does do this, and I have made this change, but haven't pushed it
> yet, as I would like to work out the style issue first.

Thanks.

> >> Seems silly when bpm supports a different BUILD worksource.
> >
> >I am sorry but I don't understand this because I don't use bpm.
>
> I am referring to bsd.port.mk

Oh, I see.

> >> >...
> >> >EXTRACT_CMD=	${TAR}
> >> >EXTRACT_BEFORE_ARGS=    xf
> >> >EXTRACT_AFTER_ARGS=     -C ${WRKDIR}
> >>
> >> Why on these, as well? I'm not using zip, and zip is in
> >> different locations based on different releases of the Operating
> >> System.
> >
> >Please see above.  Besides, what made you think bsdtar is
> > available and able extract a JAR file on "different releases of
> > the Operating System"? ;-)
>
> There are instances of using zip that don't work on 7.x with jar
> files. I have addressed this in a number of ports as a result of
> pointyhat failures.

Okay, I didn't know that.  However, I still believe 
${LOCALBASE}/bin/jar is better for extracting JAR files when USE_JAVA 
is set. ;-)

Jung-uk Kim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203201901.50789.jkim>