1 |
commit: 34636ad00fb5cccc4d403de982842e981affd2ad |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 4 13:56:24 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 4 16:24:35 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34636ad0 |
7 |
|
8 |
dev-ml/llvm-ocaml: Bump to 10.0.0rc3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-ml/llvm-ocaml/Manifest | 1 + |
13 |
dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc3.ebuild | 125 +++++++++++++++++++++++++ |
14 |
2 files changed, 126 insertions(+) |
15 |
|
16 |
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest |
17 |
index db9ed54aa98..8c89b6e6c22 100644 |
18 |
--- a/dev-ml/llvm-ocaml/Manifest |
19 |
+++ b/dev-ml/llvm-ocaml/Manifest |
20 |
@@ -2,4 +2,5 @@ DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5cced |
21 |
DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 |
22 |
DIST llvmorg-10.0.0-rc1.tar.gz 120755822 BLAKE2B a729d37d96ba498cb865c6f708734dccb796b2caabb69167b9aa3b0e12c788f2a5980a048b99d5603da3d26af909fb31f406b4f4743cabae56c45f829a7bf695 SHA512 27137fc700971147c00ded6787eaae9f0bcf98c938fe227a5a559b38d983736f3d086f4ff6772d802c5f48a7d97a97c293261e4af88fcb5a720693b9cb5a4f02 |
23 |
DIST llvmorg-10.0.0-rc2.tar.gz 120795019 BLAKE2B 6e701eddbd2313e777c7b37dff8455a08d3c599d01055b60afc0319373d4709deb429aac6bf9e80c4d2e2ab8ade03bf5b398b6ccd8882e4bde608d10cdbf2284 SHA512 ee571c9258a2d9fc411964f56b0b92b2e7134349ed21dbe7963eb61ef65da506e0c4f7c69259a3b6cecec23f55d24636608287ee4457ee667031e141f8f09aae |
24 |
+DIST llvmorg-10.0.0-rc3.tar.gz 120814170 BLAKE2B 432fe0c1e74d3020a269a256e6e456cbfa0b7166dd3f86df6caf3a55e1931c022285fe8afdc4d8998c729c5471acf5308abb336782ddec2ef9b0f58d1ccb5a3c SHA512 aad1df86063612d20c48ea7046940330fe2ac572a146be22ff71d9e65fa3438184cb39a2533fc6afd1e74df26909a9f0d24ebcd7d62e74728cfd81e447f2ffbf |
25 |
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 |
26 |
|
27 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc3.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc3.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..8a7efe8fca4 |
30 |
--- /dev/null |
31 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc3.ebuild |
32 |
@@ -0,0 +1,125 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
39 |
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 |
40 |
+ |
41 |
+DESCRIPTION="OCaml bindings for LLVM" |
42 |
+HOMEPAGE="https://llvm.org/" |
43 |
+LLVM_COMPONENTS=( llvm ) |
44 |
+llvm.org_set_globals |
45 |
+ |
46 |
+# Keep in sync with sys-devel/llvm |
47 |
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) |
48 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
49 |
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore |
50 |
+ "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) |
51 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
52 |
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
53 |
+ |
54 |
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" |
55 |
+SLOT="0/${PV}" |
56 |
+KEYWORDS="" |
57 |
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}" |
58 |
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" |
59 |
+RESTRICT="!test? ( test )" |
60 |
+ |
61 |
+RDEPEND=" |
62 |
+ >=dev-lang/ocaml-4.00.0:0= |
63 |
+ dev-ml/ocaml-ctypes:= |
64 |
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?] |
65 |
+ !sys-devel/llvm[ocaml(-)]" |
66 |
+DEPEND="${RDEPEND}" |
67 |
+BDEPEND=" |
68 |
+ dev-lang/perl |
69 |
+ dev-ml/findlib |
70 |
+ test? ( dev-ml/ounit ) |
71 |
+ ${PYTHON_DEPS}" |
72 |
+ |
73 |
+# least intrusive of all |
74 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
78 |
+ python-any-r1_pkg_setup |
79 |
+} |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ # Python is needed to run tests using lit |
83 |
+ python_setup |
84 |
+ |
85 |
+ cmake-utils_src_prepare |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ local libdir=$(get_libdir) |
90 |
+ local mycmakeargs=( |
91 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
92 |
+ |
93 |
+ -DBUILD_SHARED_LIBS=OFF |
94 |
+ -DLLVM_BUILD_LLVM_DYLIB=ON |
95 |
+ -DLLVM_LINK_LLVM_DYLIB=ON |
96 |
+ -DLLVM_OCAML_OUT_OF_TREE=ON |
97 |
+ |
98 |
+ # cheap hack: LLVM combines both anyway, and the only difference |
99 |
+ # is that the former list is explicitly verified at cmake time |
100 |
+ -DLLVM_TARGETS_TO_BUILD="" |
101 |
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" |
102 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
103 |
+ |
104 |
+ # disable various irrelevant deps and settings |
105 |
+ -DLLVM_ENABLE_FFI=OFF |
106 |
+ -DLLVM_ENABLE_TERMINFO=OFF |
107 |
+ -DHAVE_HISTEDIT_H=NO |
108 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
109 |
+ -DLLVM_ENABLE_EH=ON |
110 |
+ -DLLVM_ENABLE_RTTI=ON |
111 |
+ |
112 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
113 |
+ |
114 |
+ # disable go bindings |
115 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
116 |
+ |
117 |
+ # TODO: ocamldoc |
118 |
+ ) |
119 |
+ |
120 |
+ use test && mycmakeargs+=( |
121 |
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
122 |
+ ) |
123 |
+ |
124 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
125 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
126 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
127 |
+ cmake-utils_src_configure |
128 |
+ |
129 |
+ local llvm_libdir=$(llvm-config --libdir) |
130 |
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml... |
131 |
+ cd "${BUILD_DIR}/${libdir}" || die |
132 |
+ ln -s "${llvm_libdir}"/*.so . || die |
133 |
+ |
134 |
+ if use test; then |
135 |
+ local llvm_bindir=$(llvm-config --bindir) |
136 |
+ # Force using system-installed tools. |
137 |
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \ |
138 |
+ "${BUILD_DIR}"/test/lit.site.cfg.py || die |
139 |
+ fi |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ cmake-utils_src_compile ocaml_all |
144 |
+} |
145 |
+ |
146 |
+src_test() { |
147 |
+ # respect TMPDIR! |
148 |
+ local -x LIT_PRESERVES_TMP=1 |
149 |
+ cmake-utils_src_make check-llvm-bindings-ocaml |
150 |
+} |
151 |
+ |
152 |
+src_install() { |
153 |
+ DESTDIR="${D}" \ |
154 |
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die |
155 |
+ |
156 |
+ dodoc bindings/ocaml/README.txt |
157 |
+} |