Skip to content

Commit ec92f53

Browse files
authored
Prepare for LLVM 18, link to local repo for scripts and patches (#27178)
* Prepare for LLVM 18, link to local repo for scripts and patches * s/static/shared/ * Change links to upstream repo * Fix LLVM 18 for OCaml bytecode executables * Sync hashes with updated patch file * Set URL to local repo, update hash for llvm.18-static package * Try building again * Add zstd depext on freebsd * Revert "Add zstd depext on freebsd" This reverts commit c0297d7.
1 parent 5c627de commit ec92f53

File tree

4 files changed

+200
-0
lines changed
  • packages
    • conf-llvm-shared/conf-llvm-shared.18
    • conf-llvm-static/conf-llvm-static.18
    • llvm

4 files changed

+200
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
opam-version: "2.0"
2+
maintainer: "Alan <[email protected]>"
3+
authors: "The LLVM team"
4+
homepage: "http://llvm.org"
5+
bug-reports: "https://llvm.org/bugs/"
6+
license: "MIT"
7+
build: [
8+
["bash" "configure.sh" version "shared"]
9+
]
10+
depends: [
11+
"conf-bash" {build}
12+
]
13+
depexts: [
14+
["llvm@18" "zstd"] {os-distribution = "homebrew" & os = "macos"}
15+
["llvm-18"] {os-distribution = "macports" & os = "macos"}
16+
["llvm-18-dev" "zlib1g-dev" "libzstd-dev"] {os-family = "debian"}
17+
["llvm18-dev"] {os-distribution = "alpine"}
18+
["llvm18"] {os-family = "arch"}
19+
["llvm18-devel"] {os-family = "suse" | os-family = "opensuse"}
20+
["llvm18-devel"] {os-distribution = "fedora" & os-version >= "41"}
21+
["llvm-devel"] {os-distribution = "fedora" & os-version = "40"}
22+
["llvm18-devel" "epel-release"] {os-distribution = "centos"}
23+
["devel/llvm18"] {os = "freebsd"}
24+
]
25+
synopsis: "Virtual package relying on llvm shared library installation"
26+
flags: conf
27+
extra-source "configure.sh" {
28+
src:
29+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/refs/heads/main/patches/conf-llvm/configure.sh.18"
30+
checksum: [
31+
"sha256=3675ad30b93aab67f1d57aa7c700800a3b5954768610ef9ef29bba7483f16936"
32+
"md5=409c0a03dcea76a45719b80a06e2bd71"
33+
]
34+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
opam-version: "2.0"
2+
maintainer: "Alan <[email protected]>"
3+
authors: "The LLVM team"
4+
homepage: "http://llvm.org"
5+
bug-reports: "https://llvm.org/bugs/"
6+
license: "MIT"
7+
build: [
8+
["bash" "configure.sh" version "static"]
9+
]
10+
depends: [
11+
"conf-bash" {build}
12+
]
13+
depexts: [
14+
["llvm@18" "zstd"] {os-distribution = "homebrew" & os = "macos"}
15+
["llvm-18"] {os-distribution = "macports" & os = "macos"}
16+
["llvm-18-dev" "zlib1g-dev" "libzstd-dev"] {os-family = "debian"}
17+
["llvm18-dev"] {os-distribution = "alpine"}
18+
["llvm18"] {os-family = "arch"}
19+
["llvm18-devel"] {os-family = "suse" | os-family = "opensuse"}
20+
["llvm18-devel"] {os-distribution = "fedora" & os-version >= "41"}
21+
["llvm-devel"] {os-distribution = "fedora" & os-version = "40"}
22+
["llvm18-devel" "epel-release"] {os-distribution = "centos"}
23+
["devel/llvm18"] {os = "freebsd"}
24+
]
25+
synopsis: "Virtual package relying on llvm static library installation"
26+
flags: conf
27+
extra-source "configure.sh" {
28+
src:
29+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/refs/heads/main/patches/conf-llvm/configure.sh.18"
30+
checksum: [
31+
"sha256=3675ad30b93aab67f1d57aa7c700800a3b5954768610ef9ef29bba7483f16936"
32+
"md5=409c0a03dcea76a45719b80a06e2bd71"
33+
]
34+
}

packages/llvm/llvm.18-shared/opam

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
opam-version: "2.0"
2+
maintainer: "Alan <[email protected]>"
3+
authors: [
4+
"whitequark <[email protected]>"
5+
"The LLVM team"
6+
]
7+
license: "MIT"
8+
bug-reports: "http://llvm.org/bugs/"
9+
dev-repo: "git+http://llvm.org/git/llvm.git"
10+
doc: "http://llvm.org"
11+
homepage: "http://llvm.org"
12+
build: [
13+
["bash" "-ex" "install.sh" "build"
14+
"--llvm-config" "%{conf-llvm-shared:config}%"
15+
"--libdir" lib
16+
"--cmake" "%{conf-cmake:cmd}%"
17+
"--make" make
18+
"--link-mode" "shared"
19+
"--use-homebrew" {os-distribution = "homebrew"}
20+
]
21+
]
22+
install: [
23+
["bash" "-ex" "install.sh" "install"
24+
"--llvm-config" "%{conf-llvm-shared:config}%"
25+
"--libdir" lib
26+
"--cmake" "%{conf-cmake:cmd}%"
27+
"--make" make
28+
"--link-mode" "shared"
29+
"--use-homebrew" {os-distribution = "homebrew"}
30+
]
31+
]
32+
depends: [
33+
"ocaml" {>= "4.00.0"}
34+
"ctypes" {>= "0.4"}
35+
"ocamlfind" {build}
36+
"conf-llvm-shared" {build & = "18"}
37+
"conf-cmake" {build}
38+
]
39+
patches: [
40+
"AddOCaml.cmake.patch"
41+
]
42+
synopsis: "The OCaml bindings distributed with LLVM"
43+
description: "Note: LLVM should be installed first."
44+
url {
45+
src: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz"
46+
checksum: [
47+
"sha256=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a"
48+
"md5=81cd0be5ae6f1ad8961746116d426a96"
49+
]
50+
}
51+
extra-source "install.sh" {
52+
src:
53+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/llvm/install.sh.18"
54+
checksum: [
55+
"sha256=c1f95d0c7ae539fcbe97327c4ed64e7a86009143c34f7e721319407975965bae"
56+
"md5=6e458426d1008d4696662cf7d3432d8b"
57+
]
58+
}
59+
extra-source "AddOCaml.cmake.patch" {
60+
src:
61+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/llvm/AddOCaml.cmake.patch.18"
62+
checksum: [
63+
"sha256=a532adaa6938818fbd7f5a49d4de21c0a2d240ecb91636a76b2f745b4b8cb58f"
64+
"md5=432ec376b6ffbac44e640c8fb659a7df"
65+
]
66+
}

packages/llvm/llvm.18-static/opam

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
opam-version: "2.0"
2+
maintainer: "Alan <[email protected]>"
3+
authors: [
4+
"whitequark <[email protected]>"
5+
"The LLVM team"
6+
]
7+
license: "MIT"
8+
bug-reports: "http://llvm.org/bugs/"
9+
dev-repo: "git+http://llvm.org/git/llvm.git"
10+
doc: "http://llvm.org"
11+
homepage: "http://llvm.org"
12+
build: [
13+
["bash" "-ex" "install.sh" "build"
14+
"--llvm-config" "%{conf-llvm-static:config}%"
15+
"--libdir" lib
16+
"--cmake" "%{conf-cmake:cmd}%"
17+
"--make" make
18+
"--link-mode" "static"
19+
"--use-homebrew" {os-distribution = "homebrew"}
20+
]
21+
]
22+
install: [
23+
["bash" "-ex" "install.sh" "install"
24+
"--llvm-config" "%{conf-llvm-static:config}%"
25+
"--libdir" lib
26+
"--cmake" "%{conf-cmake:cmd}%"
27+
"--make" make
28+
"--link-mode" "static"
29+
"--use-homebrew" {os-distribution = "homebrew"}
30+
]
31+
]
32+
depends: [
33+
"ocaml" {>= "4.00.0"}
34+
"ctypes" {>= "0.4"}
35+
"ocamlfind" {build}
36+
"conf-llvm-static" {build & = "18"}
37+
"conf-cmake" {build}
38+
]
39+
patches: [
40+
"AddOCaml.cmake.patch"
41+
]
42+
synopsis: "The OCaml bindings distributed with LLVM"
43+
description: "Note: LLVM should be installed first."
44+
url {
45+
src: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz"
46+
checksum: [
47+
"sha256=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a"
48+
"md5=81cd0be5ae6f1ad8961746116d426a96"
49+
]
50+
}
51+
extra-source "install.sh" {
52+
src:
53+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/llvm/install.sh.18"
54+
checksum: [
55+
"sha256=c1f95d0c7ae539fcbe97327c4ed64e7a86009143c34f7e721319407975965bae"
56+
"md5=6e458426d1008d4696662cf7d3432d8b"
57+
]
58+
}
59+
extra-source "AddOCaml.cmake.patch" {
60+
src:
61+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/llvm/AddOCaml.cmake.patch.18"
62+
checksum: [
63+
"sha256=a532adaa6938818fbd7f5a49d4de21c0a2d240ecb91636a76b2f745b4b8cb58f"
64+
"md5=432ec376b6ffbac44e640c8fb659a7df"
65+
]
66+
}

0 commit comments

Comments
 (0)