gnu: java-swt: Use 64-bit archive on x86_64.

* gnu/packages/java.scm (java-swt)[source]: Use separate source archive
for x86_64.
This commit is contained in:
Ricardo Wurmus 2016-05-09 16:09:31 +02:00
parent f82c58539e
commit 2d15f60126
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 24 additions and 10 deletions

View File

@ -51,21 +51,35 @@
#:use-module (gnu packages xorg) #:use-module (gnu packages xorg)
#:use-module (gnu packages zip) #:use-module (gnu packages zip)
#:use-module (gnu packages texinfo) #: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 (define-public java-swt
(package (package
(name "java-swt") (name "java-swt")
(version "4.5") (version "4.5")
(source (origin (source
(method url-fetch) ;; The types of many variables and procedures differ in the sources
(uri (string-append ;; dependent on whether the target architecture is a 32-bit system or a
"http://ftp-stud.fht-esslingen.de/pub/Mirrors/" ;; 64-bit system. Instead of patching the sources on demand in a build
"eclipse/eclipse/downloads/drops4/R-" version ;; phase we download either the 32-bit archive (which mostly uses "int"
"-201506032000/swt-" version "-gtk-linux-x86.zip")) ;; types) or the 64-bit archive (which mostly uses "long" types).
(sha256 (let ((hash32 "03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q")
(base32 (hash64 "1qq0pjll6030v4ml0hifcaaik7sx3fl7ghybfdw95vsvxafwp2ff")
"03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q")))) (file32 "x86")
(file64 "x86_64"))
(let-values (((hash file)
(match (or (%current-target-system) (%current-system))
("x86_64-linux" (values hash64 file64))
(_ (values hash32 file32)))))
(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) (build-system ant-build-system)
(arguments (arguments
`(#:jar-name "swt.jar" `(#:jar-name "swt.jar"