1 |
commit: 5cf79ad9c6f71a777a16954feb1e98133db145ad |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 08:37:24 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 14:52:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cf79ad9 |
7 |
|
8 |
dev-ml/llvm-ocaml: Add 16.0.0_pre20220930 snapshot |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-ml/llvm-ocaml/Manifest | 1 + |
13 |
.../llvm-ocaml-16.0.0_pre20220930.ebuild | 115 +++++++++++++++++++++ |
14 |
2 files changed, 116 insertions(+) |
15 |
|
16 |
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest |
17 |
index 4d1bc3f24027..8f6a1414d8a4 100644 |
18 |
--- a/dev-ml/llvm-ocaml/Manifest |
19 |
+++ b/dev-ml/llvm-ocaml/Manifest |
20 |
@@ -2,5 +2,6 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f |
21 |
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 |
22 |
DIST llvm-project-15.0.1.src.tar.xz 112068688 BLAKE2B 8fd6690445f7cbc8b47a7c1dd1f2c4fbc39f9a97f9d4a0015d466726454b090b0d1ff9b0d926eba7065e84782901687f74e6540a36dc6656a93f3c92c7bc7e06 SHA512 cef84bc173118a30db3ece5e5c6f874bf689c77afc40a4792fdcb7556555ac14a8e6de1dc811755405e5d162d63bc69abaecba30d220a42765160d69f0073fda |
23 |
DIST llvm-project-15.0.1.src.tar.xz.sig 438 BLAKE2B d8f634adab531bb19178fb27bc83b3a90c856e9402dd5af700f9af43813f68d20c21b9112dd95e9f6f10609ee51ed5aaf77edb96ca16fb93136b8aea432affd3 SHA512 cbf2570840d8dc12f6436c495a23cf9d439ee195755c01a6d1d5bcc20133599dc956dc43a0f5016698e3c9a960826f5f3c2840a73f993467e275856a67999fda |
24 |
+DIST llvm-project-215c9fa4deac9ec6b4e504843830551f03b60620.tar.gz 168942763 BLAKE2B 545c7c372c38667b7d811753464e91134aae600060d9054979eab8735d535a72d6bbb33a6008dc81f3b14513f58791ca3b8c3068e62ff146ccb14f32abb41a32 SHA512 d0c244357650ef5d56bc7afd836cd747cc2cce92d5f7fb4ddec3414e5bafe4e611acb2a7ff42343c184caad14a30fa9a6ced7e493df3ceb06fe8f9445aeb5a9b |
25 |
DIST llvm-project-303526ef3aa211c1930be2885deae15eeeda3b18.tar.gz 167503164 BLAKE2B 143c72c58517b3e40ee74c1a0df47bfd0d0f9e71926bc8c39a007e674a08df95d0ffe05f523f97e4409b248349e13719cabbc7ac6938feebe702959e84a07243 SHA512 9aa5c86de6c6be1d26c085eb29ea283429e41330e937e5fdbd545bb3f5b996ac82cd6268701fcbbd202e89ee35f2b67e595fc595bb7383778e9ad5fd52ca10a0 |
26 |
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f |
27 |
|
28 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0_pre20220930.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0_pre20220930.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..3f682163a64b |
31 |
--- /dev/null |
32 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0_pre20220930.ebuild |
33 |
@@ -0,0 +1,115 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{8..11} ) |
40 |
+inherit cmake llvm llvm.org python-any-r1 |
41 |
+ |
42 |
+DESCRIPTION="OCaml bindings for LLVM" |
43 |
+HOMEPAGE="https://llvm.org/" |
44 |
+ |
45 |
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" |
46 |
+SLOT="0/${PV}" |
47 |
+KEYWORDS="" |
48 |
+IUSE="debug test" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ >=dev-lang/ocaml-4.00.0:0= |
53 |
+ dev-ml/ocaml-ctypes:= |
54 |
+ ~sys-devel/llvm-${PV}:=[debug?] |
55 |
+ !sys-devel/llvm[ocaml(-)] |
56 |
+" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ ${RDEPEND} |
60 |
+" |
61 |
+BDEPEND=" |
62 |
+ ${PYTHON_DEPS} |
63 |
+ dev-lang/perl |
64 |
+ dev-ml/findlib |
65 |
+ >=dev-util/cmake-3.16 |
66 |
+" |
67 |
+ |
68 |
+LLVM_COMPONENTS=( llvm cmake third-party ) |
69 |
+LLVM_USE_TARGETS=llvm |
70 |
+llvm.org_set_globals |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
74 |
+ python-any-r1_pkg_setup |
75 |
+} |
76 |
+ |
77 |
+src_configure() { |
78 |
+ local libdir=$(get_libdir) |
79 |
+ local mycmakeargs=( |
80 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
81 |
+ |
82 |
+ -DBUILD_SHARED_LIBS=OFF |
83 |
+ -DLLVM_BUILD_LLVM_DYLIB=ON |
84 |
+ -DLLVM_LINK_LLVM_DYLIB=ON |
85 |
+ -DLLVM_OCAML_OUT_OF_TREE=ON |
86 |
+ |
87 |
+ # cheap hack: LLVM combines both anyway, and the only difference |
88 |
+ # is that the former list is explicitly verified at cmake time |
89 |
+ -DLLVM_TARGETS_TO_BUILD="" |
90 |
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" |
91 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
92 |
+ |
93 |
+ # disable various irrelevant deps and settings |
94 |
+ -DLLVM_ENABLE_FFI=OFF |
95 |
+ -DLLVM_ENABLE_TERMINFO=OFF |
96 |
+ -DHAVE_HISTEDIT_H=NO |
97 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
98 |
+ -DLLVM_ENABLE_EH=ON |
99 |
+ -DLLVM_ENABLE_RTTI=ON |
100 |
+ |
101 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
102 |
+ |
103 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
104 |
+ |
105 |
+ # disable go bindings |
106 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
107 |
+ |
108 |
+ # TODO: ocamldoc |
109 |
+ ) |
110 |
+ |
111 |
+ use test && mycmakeargs+=( |
112 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
113 |
+ ) |
114 |
+ |
115 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
116 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
117 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
118 |
+ cmake_src_configure |
119 |
+ |
120 |
+ local llvm_libdir=$(llvm-config --libdir) |
121 |
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml... |
122 |
+ cd "${BUILD_DIR}/${libdir}" || die |
123 |
+ ln -s "${llvm_libdir}"/*.so . || die |
124 |
+ |
125 |
+ if use test; then |
126 |
+ local llvm_bindir=$(llvm-config --bindir) |
127 |
+ # Force using system-installed tools. |
128 |
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \ |
129 |
+ "${BUILD_DIR}"/test/lit.site.cfg.py || die |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+src_compile() { |
134 |
+ cmake_build ocaml_all |
135 |
+} |
136 |
+ |
137 |
+src_test() { |
138 |
+ # respect TMPDIR! |
139 |
+ local -x LIT_PRESERVES_TMP=1 |
140 |
+ cmake_build check-llvm-bindings-ocaml |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ DESTDIR="${D}" \ |
145 |
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die |
146 |
+ |
147 |
+ dodoc bindings/ocaml/README.txt |
148 |
+} |