[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/15: gnu: llvm: Add helper procedure for constructing download URLs.
From: |
guix-commits |
Subject: |
06/15: gnu: llvm: Add helper procedure for constructing download URLs. |
Date: |
Mon, 24 Feb 2020 12:09:56 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit cd16014f7c22481a488415c82950072a5fd9fe4d
Author: Marius Bakke <address@hidden>
AuthorDate: Fri Feb 21 17:38:28 2020 +0100
gnu: llvm: Add helper procedure for constructing download URLs.
...in preparation for LLVM 9.0.1 which is no longer hosted on llvm.org.
* gnu/packages/llvm.scm (llvm-download-uri): New procedure.
(llvm-8, clang-runtime-from-llvm, clang-from-llvm, libcxx, libomp, llvm-9,
llvm-7, llvm-6, libcxx-6, llvm-3.9.1, llvm-3.8, llvm-3.7, llvm-3.6,
llvm-3.5)[source](uri): Use it.
---
gnu/packages/llvm.scm | 53 +++++++++++++++++++++++----------------------------
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index e7b196b..608e52a 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -76,6 +76,13 @@ as \"x86_64-linux\"."
("x86_64" => "X86")
("i686" => "X86"))))
+(define (llvm-download-uri component version)
+ (if (version>=? version "9.0.1")
+ (string-append "https://github.com/llvm/llvm-project/releases/download"
+ "/llvmorg-" version "/" component "-" version
".src.tar.xz")
+ (string-append "https://releases.llvm.org/" version "/" component "-"
+ version ".src.tar.xz")))
+
(define-public llvm-8
(package
(name "llvm")
@@ -83,8 +90,7 @@ as \"x86_64-linux\"."
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"0k124sxkfhfi1rca6kzkdraf4axhx99x3cw2rk55056628dvwwl8"))))
@@ -137,8 +143,7 @@ of programming tools as well as libraries with equivalent
functionality.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/compiler-rt-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "compiler-rt" version))
(sha256 (base32 hash))
(patches (map search-patch patches))))
(build-system cmake-build-system)
@@ -169,8 +174,10 @@ compiler. In LLVM this library is called
\"compiler-rt\".")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/cfe-" version ".src.tar.xz"))
+ (uri (llvm-download-uri (if (version>=? version "9.0.1")
+ "clang"
+ "cfe")
+ version))
(sha256 (base32 hash))
(patches (map search-patch patches))))
;; Using cmake allows us to treat llvm as an external library. There
@@ -354,8 +361,7 @@ output), and Binutils.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
- version "/libcxx-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "libcxx" version))
(sha256
(base32
"1qlx3wlxrnc5cwc1fcfc2vhfsl7j4294hi8y5kxj8hy8wxsjd462"))))
@@ -415,9 +421,7 @@ requirements according to version 1.1 of the OpenCL
specification.")
(version (package-version llvm))
(source (origin
(method url-fetch)
- (uri (string-append "https://releases.llvm.org/"
- version "/openmp-" version
- ".src.tar.xz"))
+ (uri (llvm-download-uri "openmp" version))
(sha256
(base32
"1mf9cpgvix34xlpv0inkgl3qmdvgvp96f7sksqizri0n5xfp1cgp"))
@@ -465,8 +469,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(version "9.0.0")
(source (origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"117ymdz1by2nkfq1c2p9m4050dp848kbjbiv6nsfj8hzy9f5d86n"))))
@@ -491,8 +494,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(version "7.0.1")
(source (origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3"))))))
@@ -516,8 +518,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(version "6.0.1")
(source (origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn"))))))
@@ -543,8 +544,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(inherit (package-source libcxx))
- (uri (string-append "http://llvm.org/releases/"
- version "/libcxx-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "libcxx" version))
(sha256
(base32
"0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
@@ -559,8 +559,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"))))))
@@ -585,8 +584,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))))))
@@ -609,8 +607,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))))))
@@ -633,8 +630,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(sha256
(base32
"153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn"))))))
@@ -656,8 +652,7 @@ with that of libgomp, the GNU Offloading and Multi
Processing Library.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
+ (uri (llvm-download-uri "llvm" version))
(patches
(search-patches "llvm-3.5-fix-clang-build-with-gcc5.patch"))
(sha256
- branch master updated (af52ba6 -> c9677ce), guix-commits, 2020/02/24
- 01/15: gnu: python-libarchive-c: Update to 2.9., guix-commits, 2020/02/24
- 02/15: gnu: libgme: Remove obsolete workaround., guix-commits, 2020/02/24
- 03/15: gnu: espeak-ng: Update to 1.50., guix-commits, 2020/02/24
- 05/15: gnu: clang@9: Fix search path handling., guix-commits, 2020/02/24
- 09/15: gnu: freecad. Fix build failure., guix-commits, 2020/02/24
- 04/15: gnu: node: Increase build timeouts., guix-commits, 2020/02/24
- 07/15: gnu: clang@9: Update to 9.0.1., guix-commits, 2020/02/24
- 06/15: gnu: llvm: Add helper procedure for constructing download URLs.,
guix-commits <=
- 08/15: gnu: qtbase: Add variant that fixes file name handling in CMake macros., guix-commits, 2020/02/24
- 12/15: gnu: clang: Use the correct CLANG-RUNTIME for versions 6 and 7., guix-commits, 2020/02/24
- 10/15: gnu: freecad. Use qt-build-system., guix-commits, 2020/02/24
- 11/15: gnu: Reorganize llvm.scm., guix-commits, 2020/02/24
- 13/15: gnu: mesa: Build with llvm@8 explicitly., guix-commits, 2020/02/24
- 15/15: gnu: mesa-opencl: Build with clang@8., guix-commits, 2020/02/24
- 14/15: gnu: LLVM: Promote LLVM 9 to the default 'llvm' package., guix-commits, 2020/02/24