1 |
commit: 303bda8f035f6cb60a13560dec0d6311ae13d1c6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 28 17:11:40 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 28 17:41:31 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=303bda8f |
7 |
|
8 |
dev-ml/llvm-ocaml: Bump to 8.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-8.0.0_rc3.ebuild | 127 ++++++++++++++++++++++++++ |
14 |
2 files changed, 128 insertions(+) |
15 |
|
16 |
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest |
17 |
index 125298f8dbe..9bc4cc9159c 100644 |
18 |
--- a/dev-ml/llvm-ocaml/Manifest |
19 |
+++ b/dev-ml/llvm-ocaml/Manifest |
20 |
@@ -3,3 +3,4 @@ DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf |
21 |
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9 |
22 |
DIST llvm-7.0.1.src.tar.xz 28311056 BLAKE2B 737aa6144a415e41a4ff2c8bd5a727d6f14d7b1810c62cbefa5a25fe642c98cddf8a28e35c7e9783373aa3b96f5c0943229e229ad1b43e56e9ed6db0f27ab128 SHA512 ac43a3cb71a53deb55e3693653847cf20bf6f5d9056f224e6956c96d63bc59ebee9404f088eec9cabe65337b4607a905ef931354b373cf64e0004c6905a6b5df |
23 |
DIST llvm-8.0.0rc2.src.tar.xz 30492444 BLAKE2B e7afd3b66e3eb204e07348f0bc77f0ae03d8e9581de4c94cba7c0b43b53f36ecd891c1272ce43ea6c78999fd404a7db105266a2eaca22975133571e1152961af SHA512 9d93197848e9472cc2fef2477897e4f4d74a79b17a164fd43446b0ffb327e7f484cf64f0c294d9a99707c0b46282eb0d16e6ceb5d2d568f25e4235f70ae3c5e7 |
24 |
+DIST llvm-8.0.0rc3.src.tar.xz 30507604 BLAKE2B c9baaca537d292af9f12368df86090750508113eb7db393fe44c1ba7579df947f0a7092e6ddd4403bda9f9ed75fe8c049f3baf6d8671faa0c91e3267c584893a SHA512 82199841c2084cffe4e86b4f2d5ebe404059196f1f6d000ee69cfddba05d78c4500ad7499615fa67e9774ead6cba5a23db484dd85f752c8d08e8067f7d7b98ca |
25 |
|
26 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-8.0.0_rc3.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-8.0.0_rc3.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..75111b867fb |
29 |
--- /dev/null |
30 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-8.0.0_rc3.ebuild |
31 |
@@ -0,0 +1,127 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
38 |
+# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
39 |
+CMAKE_MIN_VERSION=3.7.0-r1 |
40 |
+PYTHON_COMPAT=( python2_7 ) |
41 |
+ |
42 |
+inherit cmake-utils llvm multiprocessing python-any-r1 |
43 |
+ |
44 |
+MY_P=llvm-${PV/_/}.src |
45 |
+DESCRIPTION="OCaml bindings for LLVM" |
46 |
+HOMEPAGE="https://llvm.org/" |
47 |
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz" |
48 |
+ |
49 |
+# Keep in sync with sys-devel/llvm |
50 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
51 |
+ NVPTX PowerPC Sparc SystemZ X86 XCore ) |
52 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
53 |
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
54 |
+ |
55 |
+LICENSE="UoI-NCSA" |
56 |
+SLOT="0/${PV}" |
57 |
+KEYWORDS="~amd64 ~arm ~x86" |
58 |
+IUSE="debug test ${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 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
67 |
+DEPEND="${RDEPEND} |
68 |
+ dev-lang/perl |
69 |
+ dev-ml/findlib |
70 |
+ test? ( dev-ml/ounit ) |
71 |
+ !!<dev-python/configparser-3.3.0.2 |
72 |
+ ${PYTHON_DEPS}" |
73 |
+ |
74 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
75 |
+ || ( ${ALL_LLVM_TARGETS[*]} )" |
76 |
+ |
77 |
+S=${WORKDIR}/${MY_P} |
78 |
+ |
79 |
+# least intrusive of all |
80 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
81 |
+ |
82 |
+pkg_setup() { |
83 |
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
84 |
+ python-any-r1_pkg_setup |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ # Python is needed to run tests using lit |
89 |
+ python_setup |
90 |
+ |
91 |
+ cmake-utils_src_prepare |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ local libdir=$(get_libdir) |
96 |
+ local mycmakeargs=( |
97 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
98 |
+ |
99 |
+ -DBUILD_SHARED_LIBS=ON |
100 |
+ -DLLVM_OCAML_OUT_OF_TREE=ON |
101 |
+ -DLLVM_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 |
+ -DWITH_POLLY=OFF |
109 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
110 |
+ -DLLVM_ENABLE_EH=ON |
111 |
+ -DLLVM_ENABLE_RTTI=ON |
112 |
+ |
113 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
114 |
+ |
115 |
+ # disable go bindings |
116 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
117 |
+ |
118 |
+ # TODO: ocamldoc |
119 |
+ ) |
120 |
+ |
121 |
+ use test && mycmakeargs+=( |
122 |
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
123 |
+ ) |
124 |
+ |
125 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
126 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
127 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
128 |
+ cmake-utils_src_configure |
129 |
+ |
130 |
+ local llvm_libdir=$(llvm-config --libdir) |
131 |
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml... |
132 |
+ cd "${BUILD_DIR}/${libdir}" || die |
133 |
+ ln -s "${llvm_libdir}"/*.so . || die |
134 |
+ |
135 |
+ if use test; then |
136 |
+ local llvm_bindir=$(llvm-config --bindir) |
137 |
+ # Force using system-installed tools. |
138 |
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \ |
139 |
+ "${BUILD_DIR}"/test/lit.site.cfg.py || die |
140 |
+ fi |
141 |
+} |
142 |
+ |
143 |
+src_compile() { |
144 |
+ cmake-utils_src_compile ocaml_all |
145 |
+} |
146 |
+ |
147 |
+src_test() { |
148 |
+ # respect TMPDIR! |
149 |
+ local -x LIT_PRESERVES_TMP=1 |
150 |
+ cmake-utils_src_make check-llvm-bindings-ocaml |
151 |
+} |
152 |
+ |
153 |
+src_install() { |
154 |
+ DESTDIR="${D}" \ |
155 |
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die |
156 |
+ |
157 |
+ dodoc bindings/ocaml/README.txt |
158 |
+} |