From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1701092-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7836D15802C
	for <garchives@archives.gentoo.org>; Tue, 17 Dec 2024 21:37:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E15CAE08B0;
	Tue, 17 Dec 2024 21:37:33 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 33502E07E6
	for <gentoo-commits@lists.gentoo.org>; Tue, 17 Dec 2024 21:37:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 59A50340943
	for <gentoo-commits@lists.gentoo.org>; Tue, 17 Dec 2024 21:37:30 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A7BA41F42
	for <gentoo-commits@lists.gentoo.org>; Tue, 17 Dec 2024 21:37:28 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1734471431.b88c24f4c4779e54c97c5523b8576313eaeb5fe7.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/llvm/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-ml/llvm/Manifest dev-ml/llvm/llvm-19.1.6.ebuild
X-VCS-Directories: dev-ml/llvm/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: b88c24f4c4779e54c97c5523b8576313eaeb5fe7
X-VCS-Branch: master
Date: Tue, 17 Dec 2024 21:37:28 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b8ae507e-9b06-444e-8ae4-69fb68073a9b
X-Archives-Hash: d34d7c2a57e89b196f998564e8007744

commit:     b88c24f4c4779e54c97c5523b8576313eaeb5fe7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 17 21:34:26 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 17 21:37:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b88c24f4

dev-ml/llvm: Add 19.1.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-ml/llvm/Manifest           |   2 +
 dev-ml/llvm/llvm-19.1.6.ebuild | 108 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/dev-ml/llvm/Manifest b/dev-ml/llvm/Manifest
index cf145cec2b7a..1c0f7dd4592d 100644
--- a/dev-ml/llvm/Manifest
+++ b/dev-ml/llvm/Manifest
@@ -10,5 +10,7 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
 DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
 DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
+DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
+DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
 DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a

diff --git a/dev-ml/llvm/llvm-19.1.6.ebuild b/dev-ml/llvm/llvm-19.1.6.ebuild
new file mode 100644
index 000000000000..197b3e46acd2
--- /dev/null
+++ b/dev-ml/llvm/llvm-19.1.6.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit cmake llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="OCaml bindings for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-lang/ocaml-4.00.0:0=
+	dev-ml/ocaml-ctypes:=
+	~llvm-core/llvm-${PV}:=[debug?]
+	!llvm-core/llvm[ocaml(-)]
+"
+
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	dev-lang/perl
+	dev-ml/findlib
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	local libdir=$(get_libdir)
+	local mycmakeargs=(
+		-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+		-DBUILD_SHARED_LIBS=OFF
+		-DLLVM_BUILD_LLVM_DYLIB=ON
+		-DLLVM_LINK_LLVM_DYLIB=ON
+		-DLLVM_OCAML_OUT_OF_TREE=ON
+
+		# cheap hack: LLVM combines both anyway, and the only difference
+		# is that the former list is explicitly verified at cmake time
+		-DLLVM_TARGETS_TO_BUILD=""
+		-DLLVM_EXPERIMENTAL_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
+		-DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+		-DLLVM_ENABLE_EH=ON
+		-DLLVM_ENABLE_RTTI=ON
+
+		-DLLVM_HOST_TRIPLE="${CHOST}"
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+
+		# TODO: ocamldoc
+	)
+
+	use test && mycmakeargs+=(
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+	)
+
+	# 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_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_build ocaml_all
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	cmake_build check-llvm-bindings-ocaml
+}
+
+src_install() {
+	DESTDIR="${D}" \
+	cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die
+
+	dodoc bindings/ocaml/README.txt
+}