From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH] gnu: java-swt: Use other archive on 64-bit systems. Date: Mon, 9 May 2016 21:03:42 +0300 Message-ID: <20160509180342.GA16597@debian-netbook> References: <1462803393-7913-1-git-send-email-rekado@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpXD-0001H1-8i for guix-devel@gnu.org; Mon, 09 May 2016 14:04:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azpX8-0008P1-VZ for guix-devel@gnu.org; Mon, 09 May 2016 14:03:58 -0400 Received: from flashner.co.il ([178.62.234.194]:43718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azpX7-0008JE-M4 for guix-devel@gnu.org; Mon, 09 May 2016 14:03:54 -0400 Content-Disposition: inline In-Reply-To: <1462803393-7913-1-git-send-email-rekado@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(-) >=20 > 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)) > =20 > (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 b= uild > + ;; 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-syste= m)) > + ("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" > --=20 > 2.7.3 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXMND6AAoJEPTB05F+rO6TOyoP/R1VSvnvtZEHiM+gx0zNTF6K gKjambgy+FSHi3czzj10aoX5opQjj76BCuxCTjezJgAxnKesPhKUHf6dD6v80YQI oF3SrMZ4MFqFH6uPEVLs90xNzVPWklpeSJZhHuK2vCMoek+9r6/LWvtoYuR/NVAw PXuDkx4aptCUJPa6Sd/55mQwZW4I42FhbctMfs2gzoo4rEEl6Pwu0f3K55eyIsyA BLO+nAKJyxvmRlC8V81OfFmaiwsjq3Umf6oxXa0TBGmwiCnqNsOwJSC78pKJDtNx dKsH4Rt7C2HJQXVQ5fqm9Ko2fAzswa+C7wFybWpjRnA91H3QyF0MadiVPg45NW4H 6u/chBQpQKZXHS+YwyYpLRsN9MOMf5rfLjD0YQohy3ENLMuF9yN9QpB7YQBA182f qlSWkBuCDMlO8hqgmK7FJn2Fiw7C1m+PAyBGieCleanC8WffypJcnMVMREeeg69V Cgzc+TOAstRnW9PJ+ZrCnbhFoIFCDeKgt5nrJDNqIlS8rmqbbth16ddET6sldgzT fynqVVo2J6r4TRFKEFEwOlvRprYmEKHiQzb8fF0+x1NxA5GnRBfZ7n55p4Le93YP K/lA+1viATZE02tQMhAJATPzXe9KFWzqLXIeGRSDICQqNVcIQLfh0eY+7ER71BCU mSR4XUrU1pxyEU8fMyic =9ovF -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--