From: Efraim Flashner <efraim@flashner.co.il>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: java-swt: Use other archive on 64-bit systems.
Date: Mon, 9 May 2016 21:03:42 +0300 [thread overview]
Message-ID: <20160509180342.GA16597@debian-netbook> (raw)
In-Reply-To: <1462803393-7913-1-git-send-email-rekado@elephly.net>
[-- Attachment #1: Type: text/plain, Size: 3263 bytes --]
On Mon, May 09, 2016 at 04:16:33PM +0200, Ricardo Wurmus wrote:
> * gnu/packages/java.scm (java-swt)[source]: Use separate source archive
> for 64-bit systems.
> ---
> gnu/packages/java.scm | 37 +++++++++++++++++++++++++++----------
> 1 file changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 45e5683..d2a93bc 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -51,21 +51,38 @@
> #:use-module (gnu packages xorg)
> #:use-module (gnu packages zip)
> #:use-module (gnu packages texinfo)
> - #:use-module ((srfi srfi-1) #:select (fold alist-delete)))
> + #:use-module ((srfi srfi-1) #:select (fold alist-delete))
> + #:use-module (srfi srfi-11)
> + #:use-module (ice-9 match))
>
> (define-public java-swt
> (package
> (name "java-swt")
> (version "4.5")
> - (source (origin
> - (method url-fetch)
> - (uri (string-append
> - "http://ftp-stud.fht-esslingen.de/pub/Mirrors/"
> - "eclipse/eclipse/downloads/drops4/R-" version
> - "-201506032000/swt-" version "-gtk-linux-x86.zip"))
> - (sha256
> - (base32
> - "03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q"))))
> + (source
> + ;; The types of many variables and procedures differ in the sources
> + ;; dependent on whether the target architecture is a 32-bit system or a
> + ;; 64-bit system. Instead of patching the sources on demand in a build
> + ;; phase we download either the 32-bit archive (which mostly uses "int"
> + ;; types) or the 64-bit archive (which mostly uses "long" types).
> + (let ((hash32 "03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q")
> + (hash64 "1qq0pjll6030v4ml0hifcaaik7sx3fl7ghybfdw95vsvxafwp2ff")
> + (file32 "x86")
> + (file64 "x86_64"))
> + (let-values (((hash file)
> + (match (or (%current-target-system) (%current-system))
> + ("i686-linux" (values hash32 file32))
> + ("x86_64-linux" (values hash64 file64))
> + ("armhf-linux" (values hash32 file32))
> + ("mips64el-linux" (values hash64 file64))
> + (_ (values hash32 file32)))))
If the catch-all is for 32-bit then you could leave out i686 and armhf.
With the values being x86 or x86_64, will it build on arm or mips?
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "http://ftp-stud.fht-esslingen.de/pub/Mirrors/"
> + "eclipse/eclipse/downloads/drops4/R-" version
> + "-201506032000/swt-" version "-gtk-linux-" file ".zip"))
> + (sha256 (base32 hash))))))
> (build-system ant-build-system)
> (arguments
> `(#:jar-name "swt.jar"
> --
> 2.7.3
>
>
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-09 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 14:16 [PATCH] gnu: java-swt: Use other archive on 64-bit systems Ricardo Wurmus
2016-05-09 18:03 ` Efraim Flashner [this message]
2016-05-09 20:03 ` Ricardo Wurmus
2016-06-07 10:43 ` Ricardo Wurmus
2016-06-07 11:44 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160509180342.GA16597@debian-netbook \
--to=efraim@flashner.co.il \
--cc=guix-devel@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).