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.60) (envelope-from ) id 1GbDsW-0005vG-R5 for garchives@archives.gentoo.org; Sat, 21 Oct 2006 10:14:57 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9LAEE6i003906; Sat, 21 Oct 2006 10:14:14 GMT Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k9LAEEtn010328 for ; Sat, 21 Oct 2006 10:14:14 GMT Received: from mrp3.mail.saunalahti.fi (mrp3.mail.saunalahti.fi [62.142.5.32]) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id 4FDAF2166D9 for ; Sat, 21 Oct 2006 13:14:14 +0300 (EEST) Received: from [192.168.150.87] (a88-112-194-247.elisa-laajakaista.fi [88.112.194.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mrp3.mail.saunalahti.fi (Postfix) with ESMTP id EE6A0708002 for ; Sat, 21 Oct 2006 13:14:12 +0300 (EEST) Message-ID: <4539F2EF.9010208@gentoo.org> Date: Sat, 21 Oct 2006 13:14:07 +0300 From: =?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?= User-Agent: Thunderbird 1.5.0.7 (X11/20060930) 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] Making the --jar argument to dolauncher optional References: <4539E226.5080701@gentoo.org> <4539E301.2040407@gentoo.org> In-Reply-To: <4539E301.2040407@gentoo.org> X-Enigmail-Version: 0.94.0.0 OpenPGP: url=http://users.tkk.fi/~praty/public.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC038A8F29176F10A74EB4F2F" X-Archives-Salt: 005122dd-b822-4041-8169-455ddd90ffe5 X-Archives-Hash: 85039dec0156a0520605742019379aed This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC038A8F29176F10A74EB4F2F Content-Type: multipart/mixed; boundary="------------080607050402040300080902" This is a multi-part message in MIME format. --------------080607050402040300080902 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Petteri R=C3=A4ty kirjoitti: > Petteri R=C3=A4ty kirjoitti: >> When a package only install one jar that has the Main-class attribute >> set there should not be any need to specify the --jar argument to >> java-pkg_dolauncher so I made the --jar argument optional. >> >> Regards, >> Petteri >> >> >=20 > Just to note that you can't use this yet, as nothing as has been > committed yet and will need to depend on the new java-config version in= > your ebuild any way. Let's see if I can move all the magic to the eclas= s > so we would not need to depend on java-config directly. >=20 > Regards, > Petteri >=20 Attached is a version that only needs modifications to the eclass. Will commit this if no-one objects today evening. Regards, Petteri --------------080607050402040300080902 Content-Type: text/x-patch; name="java-utils-2.eclass.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="java-utils-2.eclass.patch" Index: java-utils-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-utils-2.eclass,v retrieving revision 1.24 diff -u -r1.24 java-utils-2.eclass --- java-utils-2.eclass 27 Sep 2006 21:35:54 -0000 1.24 +++ java-utils-2.eclass 21 Oct 2006 10:12:55 -0000 @@ -550,7 +550,9 @@ while [[ -n "${1}" && -n "${2}" ]]; do local var=3D${1} value=3D${2} if [[ "${var:0:2}" =3D=3D "--" ]]; then - echo "gjl_${var:2}=3D\"${value}\"" >> "${var_tmp}" + local var=3D${var:2} + echo "gjl_${var}=3D\"${value}\"" >> "${var_tmp}" + local gjl_${var}=3D${value} elif [[ "${var}" =3D=3D "-into" ]]; then target_dir=3D"${value}" elif [[ "${var}" =3D=3D "-pre" ]]; then @@ -559,6 +561,20 @@ shift 2 done =20 + # Test if no --jar and --main arguments were given and + # in that case check if the package only installs one jar + # and use that jar. + if [[ -z "${gjl_jar}" && -z "${gjl_main}" ]]; then + local cp=3D"${JAVA_PKG_CLASSPATH}" + if [[ "${cp/:}" =3D "${cp}" && "${cp%.jar}" !=3D "${cp}" ]]; then + echo "gjl_jar=3D\"${JAVA_PKG_CLASSPATH}\"" >> "${var_tmp}" + else + local msg=3D"Not enough information to create a launcher given." + msg=3D"${msg} Please give --jar or --main argument to ${FUNCNAME}." + die "${msg}" + fi + fi + # Write the actual script echo "#!/bin/bash" > "${target}" [[ -n "${pre}" ]] && [[ -f "${pre}" ]] && cat "${pre}" >> "${target}" --------------080607050402040300080902-- --------------enigC038A8F29176F10A74EB4F2F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFOfLzcxLzpIGCsLQRAts7AJ9HFgG+WdFx3tyZjUffCUf4gvJa6QCglni5 DfCHcrlr3saXB4SCoMPymrc= =d+QF -----END PGP SIGNATURE----- --------------enigC038A8F29176F10A74EB4F2F-- -- gentoo-java@gentoo.org mailing list