From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1GtdJd-00053a-8y for garchives@archives.gentoo.org; Mon, 11 Dec 2006 05:03:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kBB52JJh005863; Mon, 11 Dec 2006 05:02:19 GMT Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kBB52IQK028615 for ; Mon, 11 Dec 2006 05:02:19 GMT Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 11 Dec 2006 00:02:18 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.7.5a-GA) with ESMTP id MQK02855; Mon, 11 Dec 2006 00:02:10 -0500 (EST) Received: from 146-115-26-214.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com (HELO [192.168.1.2]) ([146.115.26.214]) by smtp01.lnh.mail.rcn.net with ESMTP; 11 Dec 2006 00:02:10 -0500 X-IronPort-AV: i="4.09,518,1157342400"; d="scan'208"; a="330447261:sNHT42578220" Message-ID: <457CE72F.7050906@gentoo.org> Date: Mon, 11 Dec 2006 00:05:51 -0500 From: Joshua Nichols User-Agent: Thunderbird 1.5.0.8 (X11/20061112) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java@lists.gentoo.org Subject: Re: [gentoo-java] RFC: Default src_compile for java-pkg-2.eclass References: <457AA9BF.6060705@gentoo.org> In-Reply-To: <457AA9BF.6060705@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed X-Junkmail-Status: score=42/50, host=mr02.lnh.mail.rcn.net X-Junkmail-SD-Raw: score=suspect(7), refid=str=0001.0A09020B.457CE52D.004E,ss=2,fgs=0, ip=207.172.4.11, so=2006-05-09 23:27:51, dmn=5.2.121/2006-09-27 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id kBB52JKC005863 X-Archives-Salt: 59a9f40a-8234-40d3-b92d-ff053eab3bc7 X-Archives-Hash: 560d27f95b31c89a08982dd0dda6d54f How many packages would benefit from this? Some ways to improve it... maybe have two variables, ie=20 EANT_BUILD_TARGET, EANT_DOC_TARGET, which could be set and respected by=20 src_compile, ie: java-pkg-2_src_compile() { local antflags=3D"${EANT_BUILD_TARGET:=3Djar}" hasq doc ${IUSE} && antflags=3D"${antflags} $(use_doc ${EANT_DOC_TARGET}= )" eant ${antflags} } By adding that, I think more ebuilds would be able to take advantage of i= t. One other thing... should definately check for the existence of a=20 build.xml... and additionally, could have a variable to specify where=20 the build file lives. Petteri R=C3=A4ty wrote: > I was looking at the output of qgrep eant to see how our ebuilds usuall= y > call eant and came up with the attached src_compile. > > Regards, > Petteri > =20 > -----------------------------------------------------------------------= - > > Index: java-pkg-2.eclass > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v > retrieving revision 1.5 > diff -u -r1.5 java-pkg-2.eclass > --- java-pkg-2.eclass 8 Dec 2006 12:12:04 -0000 1.5 > +++ java-pkg-2.eclass 9 Dec 2006 12:16:15 -0000 > @@ -33,7 +33,7 @@ > # --------------------------------------------------------------------= ---------- > RDEPEND=3D"${DEPEND}" > =20 > -EXPORT_FUNCTIONS pkg_setup > +EXPORT_FUNCTIONS pkg_setup src_compile > =20 > # --------------------------------------------------------------------= ---------- > # @eclass-pkg_setup > @@ -46,6 +46,17 @@ > } > =20 > # --------------------------------------------------------------------= ---------- > +# @eclass-src_compile > +# > +# Default src_compile for java packages > +# --------------------------------------------------------------------= ---------- > +java-pkg-2_src_compile() { > + local antflags=3D"jar" > + hasq doc ${IUSE} && antflags=3D"${antflags} $(use_doc)" > + eant ${antflags} > +} > + > +# --------------------------------------------------------------------= ---------- > # @note > # > # We need to initialize the environment in every function because Port= age > =20 --=20 Joshua Nichols Gentoo/Java Project Lead --=20 gentoo-java@gentoo.org mailing list