1 |
commit: ddafadb3a4b97eac26c9cce304ca0d4b3dbaef7b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 1 10:01:34 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 1 23:40:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddafadb3 |
7 |
|
8 |
dev-ml/llvm-ocaml: Bump to 5.0.1_rc2 |
9 |
|
10 |
dev-ml/llvm-ocaml/Manifest | 5 +- |
11 |
dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild | 122 ++++++++++++++++++++++++++ |
12 |
2 files changed, 125 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest |
15 |
index 69c3374ad8e..f3885fe97a4 100644 |
16 |
--- a/dev-ml/llvm-ocaml/Manifest |
17 |
+++ b/dev-ml/llvm-ocaml/Manifest |
18 |
@@ -1,2 +1,3 @@ |
19 |
-DIST llvm-4.0.1.src.tar.xz 21065652 SHA256 da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d WHIRLPOOL 1626ff270f7ce4801d02a0797b227fda9314ff5c0c01d653111599e9a4d2854c4d9edc3c698a7abee8d79d6bce8b18dc619fbced3c07ca610d44a248d65830cc |
20 |
-DIST llvm-5.0.0.src.tar.xz 23411980 SHA256 e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a WHIRLPOOL 6a99edbdc3e6726dc8ff9126b110fd7560faac46601407722e6dd80b5d894ff242521dc8fda7f4d879de83dac51c65645a37224f7e8def0d8d2f1e564b0531bb |
21 |
+DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d |
22 |
+DIST llvm-5.0.0.src.tar.xz 23411980 BLAKE2B bc3d8b75b766c83912252b51d6b57c8151c9d83415eff7bc771923d35138ed253a788d6c8e0a384c5e78ce1a1065f10d66ef5004df163b4c3b0c6274bb3aa6b7 SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a |
23 |
+DIST llvm-5.0.1rc2.src.tar.xz 23508164 BLAKE2B 3594d1658310a99787b4ff6f85aa8dd12a0405464bcb095ba4f205ce5b4ed3240a8ae1bef726ff98aba61ae5c8f8c10eeb8e415320d210af60f9e74bff7a8d5c SHA512 0a156e3949d22304b5e173dc9a3628161dff2798ad67924341c11494544350ef3a35a3ebb6ec8e7223b2407ce47cf12dafa6de8c006c5799a620e35a86c30b1b |
24 |
|
25 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..8d1eba230af |
28 |
--- /dev/null |
29 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild |
30 |
@@ -0,0 +1,122 @@ |
31 |
+# Copyright 1999-2017 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
37 |
+# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
38 |
+CMAKE_MIN_VERSION=3.7.0-r1 |
39 |
+PYTHON_COMPAT=( python2_7 ) |
40 |
+ |
41 |
+inherit cmake-utils llvm python-any-r1 |
42 |
+ |
43 |
+MY_P=llvm-${PV/_/}.src |
44 |
+DESCRIPTION="OCaml bindings for LLVM" |
45 |
+HOMEPAGE="https://llvm.org/" |
46 |
+SRC_URI="http://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz" |
47 |
+ |
48 |
+# Keep in sync with sys-devel/llvm |
49 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
50 |
+ NVPTX PowerPC Sparc SystemZ X86 XCore ) |
51 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
52 |
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
53 |
+ |
54 |
+LICENSE="UoI-NCSA" |
55 |
+SLOT="0/${PV}" |
56 |
+KEYWORDS="" |
57 |
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}" |
58 |
+ |
59 |
+RDEPEND=" |
60 |
+ >=dev-lang/ocaml-4.00.0:0= |
61 |
+ dev-ml/ocaml-ctypes:= |
62 |
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?] |
63 |
+ !sys-devel/llvm[ocaml(-)]" |
64 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
65 |
+DEPEND="${RDEPEND} |
66 |
+ dev-lang/perl |
67 |
+ dev-ml/findlib |
68 |
+ test? ( dev-ml/ounit ) |
69 |
+ !!<dev-python/configparser-3.3.0.2 |
70 |
+ ${PYTHON_DEPS}" |
71 |
+ |
72 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
73 |
+ || ( ${ALL_LLVM_TARGETS[*]} )" |
74 |
+ |
75 |
+S=${WORKDIR}/${MY_P} |
76 |
+ |
77 |
+# least intrusive of all |
78 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
79 |
+ |
80 |
+pkg_setup() { |
81 |
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
82 |
+ python-any-r1_pkg_setup |
83 |
+} |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ # Python is needed to run tests using lit |
87 |
+ python_setup |
88 |
+ |
89 |
+ cmake-utils_src_prepare |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ local libdir=$(get_libdir) |
94 |
+ local mycmakeargs=( |
95 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
96 |
+ |
97 |
+ -DBUILD_SHARED_LIBS=ON |
98 |
+ -DLLVM_OCAML_OUT_OF_TREE=ON |
99 |
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" |
100 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
101 |
+ |
102 |
+ # disable various irrelevant deps and settings |
103 |
+ -DLLVM_ENABLE_FFI=OFF |
104 |
+ -DLLVM_ENABLE_TERMINFO=OFF |
105 |
+ -DHAVE_HISTEDIT_H=NO |
106 |
+ -DWITH_POLLY=OFF |
107 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
108 |
+ -DLLVM_ENABLE_EH=ON |
109 |
+ -DLLVM_ENABLE_RTTI=ON |
110 |
+ |
111 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
112 |
+ |
113 |
+ # disable go bindings |
114 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
115 |
+ |
116 |
+ # TODO: ocamldoc |
117 |
+ ) |
118 |
+ |
119 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
120 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
121 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
122 |
+ cmake-utils_src_configure |
123 |
+ |
124 |
+ local llvm_libdir=$(llvm-config --libdir) |
125 |
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml... |
126 |
+ cd "${BUILD_DIR}/${libdir}" || die |
127 |
+ ln -s "${llvm_libdir}"/*.so . || die |
128 |
+ |
129 |
+ if use test; then |
130 |
+ local llvm_bindir=$(llvm-config --bindir) |
131 |
+ # Force using system-installed tools. |
132 |
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \ |
133 |
+ "${BUILD_DIR}"/test/lit.site.cfg || die |
134 |
+ fi |
135 |
+} |
136 |
+ |
137 |
+src_compile() { |
138 |
+ cmake-utils_src_compile ocaml_all |
139 |
+} |
140 |
+ |
141 |
+src_test() { |
142 |
+ # respect TMPDIR! |
143 |
+ local -x LIT_PRESERVES_TMP=1 |
144 |
+ cmake-utils_src_make check-llvm-bindings-ocaml |
145 |
+} |
146 |
+ |
147 |
+src_install() { |
148 |
+ DESTDIR="${D}" \ |
149 |
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die |
150 |
+ |
151 |
+ dodoc bindings/ocaml/README.txt |
152 |
+} |