summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-ml/llvm-ocaml
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest16
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-10.0.0.9999.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-7.1.0.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-8.0.1.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-9.0.1.9999.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc2.ebuild (renamed from dev-ml/llvm-ocaml/llvm-ocaml-6.0.1.ebuild)28
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc3.ebuild118
8 files changed, 137 insertions, 35 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index ed9c0e03ecde..a58201c04639 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -1,11 +1,13 @@
-DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a
DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16
DIST llvm-9.0.0.src.tar.xz 32994768 BLAKE2B 7f09bff9bcada95ab9c920c78aef92b57e665d9188bab39c734084ceb03a801c942fed48ea77fabeeb6110c648cb69363c659a6ce93ebf67dbba5c187219b13b SHA512 1bb3341e1d231559b948f1505b33c2e2e03989f9b8bbfef0e0cdaff5ac43f85574c9ec5ac53399b914f497d6899425d861411024e8d7e1d1a338c1c6951ac658
-EBUILD llvm-ocaml-10.0.0.9999.ebuild 3330 BLAKE2B 1815f3c019b93e8948e7e28049143ece2f24dbe1d19005748b9e3bbc33b6bbb033c27a81ea9ecc6d64cdff2196e0beafc08395fa8b3e1f47c526df5885a1813e SHA512 9eed66a6a37fe0019f4d5af94dbe39a3a0a51c6a6b61c2d224881fdd728ecd938230a5d182837ce3efec8dd589aeb3bd4d3fa51bc0434234e4d46dbe65420a30
-EBUILD llvm-ocaml-6.0.1.ebuild 3121 BLAKE2B dca92122927a7fd4c8e3213f85393e134f194ddf51f436ac2dacef59585d340fd27e6ac77bb3b9306bee3560f998805abe06a695664d6f50920c250dce413147 SHA512 e328f56e4eb855be1528a4e5fafb4ef7ddaf23592369650fdb275b3a59a7fd318c9384cf93d0d4da46403ae9ceac409a1668db76f21a9662783e6666eabc89b8
-EBUILD llvm-ocaml-7.1.0.ebuild 3121 BLAKE2B dca92122927a7fd4c8e3213f85393e134f194ddf51f436ac2dacef59585d340fd27e6ac77bb3b9306bee3560f998805abe06a695664d6f50920c250dce413147 SHA512 e328f56e4eb855be1528a4e5fafb4ef7ddaf23592369650fdb275b3a59a7fd318c9384cf93d0d4da46403ae9ceac409a1668db76f21a9662783e6666eabc89b8
-EBUILD llvm-ocaml-8.0.1.ebuild 3166 BLAKE2B 6326a9a3811a74f7927d63187677f4b53b70b267e1f577773b9cd2cdd7205f164bb864993228b2b4ce1b0bf87a1fce56f11b2dd71f4242c0882dccfef5afa7c9 SHA512 c886ad555a335793ef8980007034c0e8b1606351783df88cab5fbf9fc96cd26a2dc27372a2d2d0fdfdcce6f03c4a7521c3a3125fb5ec4473ec418b5cb7a6b855
-EBUILD llvm-ocaml-9.0.0.ebuild 3032 BLAKE2B 9d1948d1d6642ff97c144a99488b727dc0aaf33b29e1cc059aaab8ff2c267ca0e455b27d4540f73c28ed80f4aa0c8ccf16c13ff6ea90b2e7be2f11ecd5e2f732 SHA512 180772648b054100a04520ae0feb5c769c34b2579bb66fc39ad42c2ebc07b961adf3396e4384671909bcee9459213ef733ce7400efc965e8b94eeae89b9fed8f
-EBUILD llvm-ocaml-9.0.1.9999.ebuild 3016 BLAKE2B 12fbb379cca9dc71e3b3972c82eddee3921e449ee0d4768f731c6330d2d4933f0f642acacedd1851a68b96a3e36bc9a2504eb3c3702362c68a320d4e3c718ba4 SHA512 8ec4f2c3e82caf64a562512aee875c7eb0864c4675b774e8d5e46b2541d5c47841fd5e29430d8b174d63c36def1b6c1bbf16395761e10ab31be889f971dad436
+DIST llvmorg-9.0.1-rc2.tar.gz 113203311 BLAKE2B 6e426060853e1587febedb75189444a1451236b713f800a4f3401c54318e48b0f5e0c484e9e4ef261faceed9b43b445a4153b061d4dadcc617047f9320b4f56a SHA512 fececd9365645920b9afdad1e94d5e10553ad4a39d84b3ac811b86014c395d51f7e4dabe54bb095a99481400c408bee3c9a2044168724d5e094e3258587a5d2c
+DIST llvmorg-9.0.1-rc3.tar.gz 113205740 BLAKE2B 3ca81e812833ecc2ac1bacfdeb86f54609ee125ba7390ce6af0113e949496149102360f35a9a0194dff93fb5cb6ade40a68382a03a7e55771a13198abb7ca9de SHA512 ea56a4ee57aacdd00a1d6551cdc768ecce3124a0eb6a9d09fe060bb147019a5119b2a9eaca576474be42e0296293daa923edd86dadb6759df0c2d7fc7a74f9f1
+EBUILD llvm-ocaml-10.0.0.9999.ebuild 3228 BLAKE2B b129cff30934d06d5593d3063c1cfab59c026033bc91fb966372dff69f9280fb5bca8201f4d821545890a4a8fc695f33d1f87cff5413c45603450b35b0da2f4f SHA512 9c66a27ffd2c3b693715c3280e4a50d5b991578d4258586159c9f54c87f855c24dc359e52f387bb1af45702196ef287eecf9bb50e3c31be96220ece3f77c2600
+EBUILD llvm-ocaml-7.1.0.ebuild 3019 BLAKE2B 3bb0282cbc65f6a10d75c82d329265a4b9420eb13219bcc446fba957bd96bc94d0ffc8821f81b094f814758891a63c011233742edfddac6b4bed166ff42f95ea SHA512 b5d0686406132877d2e34f6eaf9476511e398d495d4f0753374c6665fcf1c986f0099be24bb434c11f9265320f34b36a0aa807569e5379a9a6c44e133ea1051c
+EBUILD llvm-ocaml-8.0.1.ebuild 3064 BLAKE2B 41792ef0b7764c4b7c297a05ee56d4e613cbfbcb2e2157e7b70c8ecbb71aea698079abca2324291f9e0b9565e36509e81ee313bd152bb0c15c74c6b69c5f4dd6 SHA512 042075a171609318603e93320a6080f6b75319b7a6490a85bced7138001d30a72b45a0bf348a0e7c5a80f56c8c7cf3e6f921ed5fea41b62ece3226d00dde49d3
+EBUILD llvm-ocaml-9.0.0.ebuild 2930 BLAKE2B 75e7305a1538546960c59ce70dd9b33b041c3861075b7eb20b7f4337b26b0dbe019db672cc2498436fddf70668bbdd08ff76607c4f7928d8c1e056f3a68742bb SHA512 4f115b0008f38f2613c0a515ad1e3f85c5bafd20ba755bdc64151287c4a2648f5343828b5b16986620a74eccadb75f521269bd1e070518ed0e3bde5af0472e51
+EBUILD llvm-ocaml-9.0.1.9999.ebuild 2914 BLAKE2B 990b474f9bb2ef2a78e6df0b9c2041b48cffc62def03676210521a7da37291d6961b75bdcfff60af94bcd787420f43cb976e0a06459a06bfc1c03e2ddcb28941 SHA512 661257a87ab84be4e34ebd7296d2b62e1841a72b0962792b3f2b94363069034ae3fd536bd94b957e604d1991a5196dd53aea68fbd20c8623c55d905a714cade3
+EBUILD llvm-ocaml-9.0.1_rc2.ebuild 2930 BLAKE2B 75e7305a1538546960c59ce70dd9b33b041c3861075b7eb20b7f4337b26b0dbe019db672cc2498436fddf70668bbdd08ff76607c4f7928d8c1e056f3a68742bb SHA512 4f115b0008f38f2613c0a515ad1e3f85c5bafd20ba755bdc64151287c4a2648f5343828b5b16986620a74eccadb75f521269bd1e070518ed0e3bde5af0472e51
+EBUILD llvm-ocaml-9.0.1_rc3.ebuild 2930 BLAKE2B 75e7305a1538546960c59ce70dd9b33b041c3861075b7eb20b7f4337b26b0dbe019db672cc2498436fddf70668bbdd08ff76607c4f7928d8c1e056f3a68742bb SHA512 4f115b0008f38f2613c0a515ad1e3f85c5bafd20ba755bdc64151287c4a2648f5343828b5b16986620a74eccadb75f521269bd1e070518ed0e3bde5af0472e51
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0.9999.ebuild
index 4b0cb21a9496..9445259b89dd 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0.9999.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0.9999.ebuild
@@ -32,12 +32,10 @@ RDEPEND="
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
DEPEND="${RDEPEND}"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
BDEPEND="
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
# least intrusive of all
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-7.1.0.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-7.1.0.ebuild
index 8973393dd2af..a962e2d6f1cc 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-7.1.0.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-7.1.0.ebuild
@@ -32,12 +32,10 @@ RDEPEND="
dev-ml/ocaml-ctypes:=
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-8.0.1.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-8.0.1.ebuild
index 154f485d0514..7781bf0cb527 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-8.0.1.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-8.0.1.ebuild
@@ -32,12 +32,10 @@ RDEPEND="
dev-ml/ocaml-ctypes:=
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild
index 79b9b550b232..0381b55ac4ad 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild
@@ -30,12 +30,10 @@ RDEPEND="
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
DEPEND="${RDEPEND}"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
BDEPEND="
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
# least intrusive of all
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1.9999.ebuild
index 8084c82be3e6..e4629d049347 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1.9999.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1.9999.ebuild
@@ -30,12 +30,10 @@ RDEPEND="
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
DEPEND="${RDEPEND}"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
BDEPEND="
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
# least intrusive of all
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-6.0.1.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc2.ebuild
index 8973393dd2af..0381b55ac4ad 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-6.0.1.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc2.ebuild
@@ -1,30 +1,27 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1
-inherit cmake-utils llvm multiprocessing python-any-r1
-
-MY_P=llvm-${PV/_/}.src
DESCRIPTION="OCaml bindings for LLVM"
HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz"
+LLVM_COMPONENTS=( llvm )
+llvm.org_set_globals
# Keep in sync with sys-devel/llvm
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-LICENSE="UoI-NCSA"
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="debug test ${ALL_LLVM_TARGETS[*]}"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,18 +29,13 @@ RDEPEND="
dev-ml/ocaml-ctypes:=
~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
dev-lang/perl
dev-ml/findlib
test? ( dev-ml/ounit )
- !!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
-
-S=${WORKDIR}/${MY_P}
-
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc3.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc3.ebuild
new file mode 100644
index 000000000000..0381b55ac4ad
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1_rc3.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1
+
+DESCRIPTION="OCaml bindings for LLVM"
+HOMEPAGE="https://llvm.org/"
+LLVM_COMPONENTS=( llvm )
+llvm.org_set_globals
+
+# Keep in sync with sys-devel/llvm
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.00.0:0=
+ dev-ml/ocaml-ctypes:=
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
+ !sys-devel/llvm[ocaml(-)]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-lang/perl
+ dev-ml/findlib
+ test? ( dev-ml/ounit )
+ ${PYTHON_DEPS}"
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Python is needed to run tests using lit
+ python_setup
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_OCAML_OUT_OF_TREE=ON
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ # disable various irrelevant deps and settings
+ -DLLVM_ENABLE_FFI=OFF
+ -DLLVM_ENABLE_TERMINFO=OFF
+ -DHAVE_HISTEDIT_H=NO
+ -DWITH_POLLY=OFF
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ # disable go bindings
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
+
+ # TODO: ocamldoc
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ )
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ # also: custom rules for OCaml do not work for CPPFLAGS
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG"
+ cmake-utils_src_configure
+
+ local llvm_libdir=$(llvm-config --libdir)
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml...
+ cd "${BUILD_DIR}/${libdir}" || die
+ ln -s "${llvm_libdir}"/*.so . || die
+
+ if use test; then
+ local llvm_bindir=$(llvm-config --bindir)
+ # Force using system-installed tools.
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \
+ "${BUILD_DIR}"/test/lit.site.cfg.py || die
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile ocaml_all
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake-utils_src_make check-llvm-bindings-ocaml
+}
+
+src_install() {
+ DESTDIR="${D}" \
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die
+
+ dodoc bindings/ocaml/README.txt
+}