From 8d731317eca9d486bea06c74aa9bdf042648fd4e Mon Sep 17 00:00:00 2001 From: Alan Hu Date: Tue, 24 Dec 2024 17:50:51 -0500 Subject: [PATCH 1/2] Prepare for LLVM 18, link to local repo for scripts and patches --- .../conf-llvm-shared/conf-llvm-shared.18/opam | 34 ++++++++++++ .../conf-llvm-static/conf-llvm-static.18/opam | 34 ++++++++++++ packages/llvm/llvm.18-shared/opam | 52 ++++++++++++++++++ packages/llvm/llvm.18-static/opam | 53 +++++++++++++++++++ 4 files changed, 173 insertions(+) create mode 100644 packages/conf-llvm-shared/conf-llvm-shared.18/opam create mode 100644 packages/conf-llvm-static/conf-llvm-static.18/opam create mode 100644 packages/llvm/llvm.18-shared/opam create mode 100644 packages/llvm/llvm.18-static/opam diff --git a/packages/conf-llvm-shared/conf-llvm-shared.18/opam b/packages/conf-llvm-shared/conf-llvm-shared.18/opam new file mode 100644 index 00000000000..b615b03aa44 --- /dev/null +++ b/packages/conf-llvm-shared/conf-llvm-shared.18/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: "Alan " +authors: "The LLVM team" +homepage: "http://llvm.org" +bug-reports: "https://llvm.org/bugs/" +license: "MIT" +build: [ + ["bash" "configure.sh" version "shared"] +] +depends: [ + "conf-bash" {build} +] +depexts: [ + ["llvm@18" "zstd"] {os-distribution = "homebrew" & os = "macos"} + ["llvm-18"] {os-distribution = "macports" & os = "macos"} + ["llvm-18-dev" "zlib1g-dev" "libzstd-dev"] {os-family = "debian"} + ["llvm18-dev"] {os-distribution = "alpine"} + ["llvm18"] {os-family = "arch"} + ["llvm18-devel"] {os-family = "suse" | os-family = "opensuse"} + ["llvm18-devel"] {os-distribution = "fedora" & os-version >= "41"} + ["llvm-devel"] {os-distribution = "fedora" & os-version = "40"} + ["llvm18-devel" "epel-release"] {os-distribution = "centos"} + ["devel/llvm18"] {os = "freebsd"} +] +synopsis: "Virtual package relying on llvm static library installation" +flags: conf +extra-source "configure.sh" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/conf-llvm-static/configure.sh.18" + checksum: [ + "sha256=13b22f406b6aa4be03cf5c70a55a8513bdb9bd804877a99c66d79cf0d6b2fbd2" + "md5=a64daab3f3768dd671fcd046bd2c1a04" + ] +} diff --git a/packages/conf-llvm-static/conf-llvm-static.18/opam b/packages/conf-llvm-static/conf-llvm-static.18/opam new file mode 100644 index 00000000000..6732c0b8e7d --- /dev/null +++ b/packages/conf-llvm-static/conf-llvm-static.18/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: "Alan " +authors: "The LLVM team" +homepage: "http://llvm.org" +bug-reports: "https://llvm.org/bugs/" +license: "MIT" +build: [ + ["bash" "configure.sh" version "static"] +] +depends: [ + "conf-bash" {build} +] +depexts: [ + ["llvm@18" "zstd"] {os-distribution = "homebrew" & os = "macos"} + ["llvm-18"] {os-distribution = "macports" & os = "macos"} + ["llvm-18-dev" "zlib1g-dev" "libzstd-dev"] {os-family = "debian"} + ["llvm18-dev"] {os-distribution = "alpine"} + ["llvm18"] {os-family = "arch"} + ["llvm18-devel"] {os-family = "suse" | os-family = "opensuse"} + ["llvm18-devel"] {os-distribution = "fedora" & os-version >= "41"} + ["llvm-devel"] {os-distribution = "fedora" & os-version = "40"} + ["llvm18-devel" "epel-release"] {os-distribution = "centos"} + ["devel/llvm18"] {os = "freebsd"} +] +synopsis: "Virtual package relying on llvm static library installation" +flags: conf +extra-source "configure.sh" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/conf-llvm-static/configure.sh.18" + checksum: [ + "sha256=13b22f406b6aa4be03cf5c70a55a8513bdb9bd804877a99c66d79cf0d6b2fbd2" + "md5=a64daab3f3768dd671fcd046bd2c1a04" + ] +} diff --git a/packages/llvm/llvm.18-shared/opam b/packages/llvm/llvm.18-shared/opam new file mode 100644 index 00000000000..74ea09b1ef2 --- /dev/null +++ b/packages/llvm/llvm.18-shared/opam @@ -0,0 +1,52 @@ +opam-version: "2.0" +maintainer: "Alan " +authors: [ + "whitequark " + "The LLVM team" +] +license: "MIT" +bug-reports: "http://llvm.org/bugs/" +dev-repo: "git+http://llvm.org/git/llvm.git" +doc: "http://llvm.org" +homepage: "http://llvm.org" +build: [ + ["bash" "-ex" "install.sh" "%{conf-llvm-shared:config}%" lib "%{conf-cmake:cmd}%" make "build" "shared"] +] +install: [ + ["bash" "-ex" "install.sh" "%{conf-llvm-shared:config}%" lib "%{conf-cmake:cmd}%" make "install" "shared"] +] +depends: [ + "ocaml" {>= "4.00.0"} + "ctypes" {>= "0.4"} + "ocamlfind" {build} + "conf-llvm-static" {build & = "18"} + "conf-cmake" {build} +] +patches: [ + "AddOCaml.cmake.patch" +] +synopsis: "The OCaml bindings distributed with LLVM" +description: "Note: LLVM should be installed first." +url { + src: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz" + checksum: [ + "sha256=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a" + "md5=81cd0be5ae6f1ad8961746116d426a96" + ] +} +extra-source "install.sh" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/llvm/install.sh.18" + checksum: [ + "sha256=91311c9a90258e6819adda4132f9f64df18f1f0b9df905e7f88be325ed18dce7" + "md5=70201a5ad01e104f7572e1fa0d498eaa" + ] +} +extra-source "AddOCaml.cmake.patch" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/llvm/AddOCaml.cmake.patch.18" + checksum: [ + "sha256=3c9abe430b0868e5937e9944133d521f62677244e0a345e511f66cb9502e406a" + "md5=a9ef328c5a793812c25a5f8777316ad9" + ] +} diff --git a/packages/llvm/llvm.18-static/opam b/packages/llvm/llvm.18-static/opam new file mode 100644 index 00000000000..c40a09b1664 --- /dev/null +++ b/packages/llvm/llvm.18-static/opam @@ -0,0 +1,53 @@ +opam-version: "2.0" +maintainer: "Alan " +authors: [ + "whitequark " + "The LLVM team" +] +license: "MIT" +bug-reports: "http://llvm.org/bugs/" +dev-repo: "git+http://llvm.org/git/llvm.git" +doc: "http://llvm.org" +homepage: "http://llvm.org" +build: [ + ["bash" "-ex" "install.sh" "%{conf-llvm-static:config}%" lib "%{conf-cmake:cmd}%" make "build" "static"] +] +install: [ + ["bash" "-ex" "install.sh" "%{conf-llvm-static:config}%" lib "%{conf-cmake:cmd}%" make "install" "static"] +] +depends: [ + "ocaml" {>= "4.00.0"} + "ctypes" {>= "0.4"} + "ocamlfind" {build} + "conf-llvm-static" {build & = "18"} + "conf-cmake" {build} +] +patches: [ + "AddOCaml.cmake.patch" +] +synopsis: "The OCaml bindings distributed with LLVM" +description: "Note: LLVM should be installed first." +url { + src: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz" + checksum: [ + "sha256=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a" + "md5=81cd0be5ae6f1ad8961746116d426a96" + ] +} +extra-source "install.sh" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/llvm/install.sh.18" + checksum: [ + "sha256=91311c9a90258e6819adda4132f9f64df18f1f0b9df905e7f88be325ed18dce7" + "md5=70201a5ad01e104f7572e1fa0d498eaa" + ] +} +extra-source "AddOCaml.cmake.patch" { + src: + "https://raw.githubusercontent.com/alan-j-hu/opam-source-archives/refs/heads/llvm-18-prep/patches/llvm/AddOCaml.cmake.patch.18" + checksum: [ + "sha256=3c9abe430b0868e5937e9944133d521f62677244e0a345e511f66cb9502e406a" + "md5=a9ef328c5a793812c25a5f8777316ad9" + ] +} + From 38580eb362d84f224ac4aaefcf758ed3a8866f05 Mon Sep 17 00:00:00 2001 From: Alan Hu Date: Tue, 24 Dec 2024 21:44:35 -0500 Subject: [PATCH 2/2] s/static/shared/ --- packages/conf-llvm-shared/conf-llvm-shared.18/opam | 2 +- packages/llvm/llvm.18-shared/opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/conf-llvm-shared/conf-llvm-shared.18/opam b/packages/conf-llvm-shared/conf-llvm-shared.18/opam index b615b03aa44..8a173d8408e 100644 --- a/packages/conf-llvm-shared/conf-llvm-shared.18/opam +++ b/packages/conf-llvm-shared/conf-llvm-shared.18/opam @@ -22,7 +22,7 @@ depexts: [ ["llvm18-devel" "epel-release"] {os-distribution = "centos"} ["devel/llvm18"] {os = "freebsd"} ] -synopsis: "Virtual package relying on llvm static library installation" +synopsis: "Virtual package relying on llvm shared library installation" flags: conf extra-source "configure.sh" { src: diff --git a/packages/llvm/llvm.18-shared/opam b/packages/llvm/llvm.18-shared/opam index 74ea09b1ef2..32b1d564b8d 100644 --- a/packages/llvm/llvm.18-shared/opam +++ b/packages/llvm/llvm.18-shared/opam @@ -19,7 +19,7 @@ depends: [ "ocaml" {>= "4.00.0"} "ctypes" {>= "0.4"} "ocamlfind" {build} - "conf-llvm-static" {build & = "18"} + "conf-llvm-shared" {build & = "18"} "conf-cmake" {build} ] patches: [