From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 783C8158043 for ; Sat, 13 Apr 2024 23:04:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB0A4E2A34; Sat, 13 Apr 2024 23:04:32 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 90616E2A34 for ; Sat, 13 Apr 2024 23:04:32 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A87683433A9 for ; Sat, 13 Apr 2024 23:04:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F159E16E2 for ; Sat, 13 Apr 2024 23:04:28 +0000 (UTC) From: "Horodniceanu Andrei" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Horodniceanu Andrei" Message-ID: <1713048450.251def323a040201f48b3fae348f6dee9af3e064.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-lang/ldc2/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-lang/ldc2/ldc2-1.36.0-r2.ebuild X-VCS-Directories: dev-lang/ldc2/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: 251def323a040201f48b3fae348f6dee9af3e064 X-VCS-Branch: master Date: Sat, 13 Apr 2024 23:04:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5378f010-0780-4518-a208-0dc0c94228bf X-Archives-Hash: 15784c8b63f6f80d01cbaf50e4a5ba8b commit: 251def323a040201f48b3fae348f6dee9af3e064 Author: Andrei Horodniceanu proton me> AuthorDate: Mon Mar 4 19:07:23 2024 +0000 Commit: Horodniceanu Andrei proton me> CommitDate: Sat Apr 13 22:47:30 2024 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=251def32 dev-lang/ldc2: port to dlang-single.eclass Additional changes: - remove the useless MULTILIB_COMPAT line since the variable was set post inherit and it is unwanted since ldc2 supports arm64. - change ROOT to EROOT in pkg_post_* - use llvm-r1.eclass instead of llvm.eclass Signed-off-by: Andrei Horodniceanu proton.me> dev-lang/ldc2/ldc2-1.36.0-r2.ebuild | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild b/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild new file mode 100644 index 0000000..84a0413 --- /dev/null +++ b/dev-lang/ldc2/ldc2-1.36.0-r2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-build cmake + +MY_PV="${PV//_/-}" +MY_P="ldc-${MY_PV}-src" +SRC_URI="https://github.com/ldc-developers/ldc/releases/download/v${MY_PV}/${MY_P}.tar.gz" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="LLVM D Compiler" +HOMEPAGE="https://github.com/ldc-developers/ldc" +KEYWORDS="~amd64 ~arm64 ~x86" +LICENSE="BSD" +# For first bump, set the subslot below to 0 and only increase if there +# is an actual ABI bkreakage. +SLOT="$(ver_cut 1-2)/$(ver_cut 3)" + +IUSE="static-libs" +RESTRICT="test" + +# Upstream supports LLVM 11.0 through 17.0. +LLVM_COMPAT=( {15..17} ) +DLANG_COMPAT=( dmd-2_{106..107} gdc-13 ldc2-1_{35..36} ) + +inherit llvm-r1 dlang-single + +REQUIRED_USE=${DLANG_REQUIRED_USE} +DEPEND=" + ${DLANG_DEPS} + $(llvm_gen_dep ' + sys-devel/llvm:${LLVM_SLOT}= + ') +" +IDEPEND=">=app-eselect/eselect-dlang-20140709" +RDEPEND=" + ${DEPEND} + ${IDEPEND} +" +BDEPEND=${DLANG_DEPS} + +PATCHES="${FILESDIR}/ldc2-1.15.0-link-defaultlib-shared.patch" + +src_configure() { + # We disable assertions so we have to apply the same workaround as for + # sys-devel/llvm: add -DNDEBUG to CPPFLAGS. + local CPPFLAGS="${CPPFLAGS} -DNDEBUG" + # https://bugs.gentoo.org/show_bug.cgi?id=922590 + append-flags -fno-strict-aliasing + local mycmakeargs=( + -DD_VERSION=2 + -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/lib/ldc2/$(ver_cut 1-2) + -DD_COMPILER="$(dlang_get_dmdw) $(dlang_get_dmdw_dcflags)" + -DLDC_WITH_LLD=OFF + -DCOMPILE_D_MODULES_SEPARATELY=ON + -DLDC_ENABLE_ASSERTIONS=OFF + -DBUILD_SHARED_LIBS=$(usex static-libs BOTH ON) + ) + use abi_x86_32 && use abi_x86_64 && mycmakeargs+=( -DMULTILIB=ON ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + rm -rf "${ED}"/usr/share/bash-completion +} + +pkg_postinst() { + # Update active ldc2 + "${EROOT}"/usr/bin/eselect dlang update ldc2 +} + +pkg_postrm() { + "${EROOT}"/usr/bin/eselect dlang update ldc2 +}