From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59317) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9vsh-0002Lu-Es for guix-patches@gnu.org; Thu, 05 Mar 2020 14:10:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9vsg-00055k-84 for guix-patches@gnu.org; Thu, 05 Mar 2020 14:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9vsg-00055g-4P for guix-patches@gnu.org; Thu, 05 Mar 2020 14:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9vsg-0003W0-00 for guix-patches@gnu.org; Thu, 05 Mar 2020 14:10:02 -0500 Subject: [bug#39742] [PATCH 1/7] gnu: java-openjfx-build: Add helpful patch. Resent-Message-ID: Date: Thu, 5 Mar 2020 20:09:25 +0100 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20200305200925.31b637d4@alma-ubu> In-Reply-To: <20200222201755.50425-1-levenson@mmer.org> References: <20200222201755.50425-1-levenson@mmer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/Eg6sfKex2HsoDnF13m=Tn84"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Alexey Abramov Cc: Julien Lepiller , 39742@debbugs.gnu.org, Leo Famulari --Sig_/Eg6sfKex2HsoDnF13m=Tn84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Alexey, On Sat, 22 Feb 2020 21:17:49 +0100 Alexey Abramov wrote: > * gnu/packages/java.scm: Add patch > * gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch: > New file. Allows you to run gradlew to run properly. Useful for > debugging. --- This sentence sounds suspicious :-) In Guix, we build everything from source. If we need a compiler, library, or build-tool, we build that also from source. Here, the problem is that: gradle/wrapper/gradle-wrapper.jar is a binary JAR-file included in the sources, which is used by the 'gradlew' script. This jar-file should not be part of the original sources used to to compile this package. Whenever sources contain unwanted binaries, we use 'snippets' to remove them before doing any further steps. You will find them in many places in the java.scm file, just search for 'snippet', for example in the package java-cisd-jhdf5. For using gradle, we need to compile gradle from sources, but this is very hard, there are some bootstrapping problems involed in this. So, first we should first snipp away the jar-files from the original java-openjfx-build package by Julien. And second, I hope you don't rely on the gradle build in any way here :-) Bj=C3=B6rn > gnu/packages/java.scm | 3 ++- > .../java-openjfx-build-get_guix_jdk_version.patch | 14 > ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) > create mode 100644 > gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch >=20 > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index 9371901e1f..01541ee419 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -2355,7 +2355,8 @@ new Date();")) > (file-name (string-append name "-" version > "-checkout")) (sha256 > (base32 > - > "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")))) > + > "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) > + (patches (search-patches > "java-openjfx-build-get_guix_jdk_version.patch")))) (build-system > ant-build-system) (arguments > `(#:jar-name "java-openjfx.jar" > diff --git > a/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch > b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch > new file mode 100644 index 0000000000..214ef9949c --- /dev/null > +++ > b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch > @@ -0,0 +1,14 @@ +--- a/build.gradle > ++++ b/build.gradle > +@@ -742,9 +742,9 @@ > + if (inStream.readLine() !=3D null) { > + String v =3D inStream.readLine(); > + if (v !=3D null) { > +- int ib =3D v.indexOf(" (build "); > ++ int ib =3D v.indexOf(" (guix build "); > + if (ib !=3D -1) { > +- String ver =3D v.substring(ib + 8, v.size() - 1); > ++ String ver =3D v.substring(ib + 13, v.size() - 1); > +=20 > + defineProperty("jdkRuntimeVersion", ver) > + defineProperty("jdkVersion", > jdkRuntimeVersion.split("-")[0]) --Sig_/Eg6sfKex2HsoDnF13m=Tn84 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXmFOZQAKCRC/KGy2WT5f /a3MAKCQxe6l7eHCU+NO/79BawGXy4bWcwCgq5T0h6c6U5ft0iVehGG0H7jMLoc= =TSEv -----END PGP SIGNATURE----- --Sig_/Eg6sfKex2HsoDnF13m=Tn84--