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 7877D158043 for ; Sat, 13 Apr 2024 23:04:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1426CE2A38; Sat, 13 Apr 2024 23:04:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0CCCE2A39 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 DBB1F3433AF 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 2344C16E4 for ; Sat, 13 Apr 2024 23:04:29 +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: <1713048451.cf9db5873fd9d11b0e66faab7ef61a3b2a95c2f9.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-util/dub/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-util/dub/dub-1.36.0-r1.ebuild X-VCS-Directories: dev-util/dub/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: cf9db5873fd9d11b0e66faab7ef61a3b2a95c2f9 X-VCS-Branch: master Date: Sat, 13 Apr 2024 23:04:29 +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: 3e962f85-4795-4aa0-938c-a47de1a5aa7d X-Archives-Hash: e700c3019a995175c420f5054f0b7325 commit: cf9db5873fd9d11b0e66faab7ef61a3b2a95c2f9 Author: Andrei Horodniceanu proton me> AuthorDate: Sat Mar 9 14:39:38 2024 +0000 Commit: Horodniceanu Andrei proton me> CommitDate: Sat Apr 13 22:47:31 2024 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=cf9db587 dev-util/dub: port to dlang-single.eclass Signed-off-by: Andrei Horodniceanu proton.me> dev-util/dub/dub-1.36.0-r1.ebuild | 162 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/dev-util/dub/dub-1.36.0-r1.ebuild b/dev-util/dub/dub-1.36.0-r1.ebuild new file mode 100644 index 0000000..608e02a --- /dev/null +++ b/dev-util/dub/dub-1.36.0-r1.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Package and build management system for D" +HOMEPAGE="https://code.dlang.org/" +LICENSE="MIT" + +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc test" +RESTRICT="!test? ( test )" + +DLANG_COMPAT=( dmd-2_{106..107} gdc-13 ldc2-1_{35..36} ) + +inherit dlang-single shell-completion + +REQUIRED_USE=${DLANG_REQUIRED_USE} +DEPEND=${DLANG_DEPS} +BDEPEND=${DLANG_DEPS} +RDEPEND=${DLANG_DEPS} + +DUB_TEST_DEPS=( + gitcompatibledubpackage@1.0.1 + gitcompatibledubpackage@1.0.4 + urld@2.1.1 +) +generate_dub_test_dependencies() { + local dep + for dep in "${DUB_TEST_DEPS[@]}"; do + local depName depVersion + depName="${dep%@*}" + depVersion="${dep#*@}" + echo "https://code.dlang.org/packages/${depName}/${depVersion}.zip -> ${depName}-${depVersion}.zip" + done +} + +GITHUB_URI="https://codeload.github.com/dlang" +SRC_URI=" + ${GITHUB_URI}/${PN}/tar.gz/v${PV} -> ${PN}-${PV}.tar.gz + test? ( + $(generate_dub_test_dependencies) + ) +" + +PATCHES=( + "${FILESDIR}/${P}-fix-wno-error-not-applying.patch" +) + +src_unpack() { + unpack "${P}.tar.gz" + + if use test; then + # Copy the archives locally. Some tests do need to perform an + # actual fetch operation so make all of them available as + # archives and let dub figure out the rest. + local store="${T}/dub-test-deps" + mkdir -p "${store}" || die + + local dep + for dep in "${DUB_TEST_DEPS[@]}"; do + local depName depVersion + depName="${dep%@*}" + depVersion="${dep#*@}" + + cp "${DISTDIR}/${depName}-${depVersion}.zip" "${store}" || die + done + + # Generate a settings.json file that points to the directory with all the deps. + cat < "${T}/settings.json" +{ + "registryUrls": [ + "file://${store}" + ], + "skipRegistry": "all" +} +EOF + fi +} + +src_compile() { + local imports=source versions="DubApplication DubUseCurl" + dlang_compile_bin bin/dub $(/../etc/dub/settings.json as per + # https://dub.pm/dub-reference/settings so that it's picked up + # automatically. + mkdir -p "${S}/bin/../etc/dub" || die + cp "${T}/settings.json" "${S}/bin/../etc/dub/" \ + || die "Could not copy dub configuration file" + + # See https://bugs.gentoo.org/921581 we have to remove -op (preserve + # source path for output files) from the flags lest the sandbox + # trips us up. This shouldn't be a problem anymore with dlang-single. + dlang-filter-dflags "*" "--op" "-op" + + # Append -Wno-error or equivalent + DCFLAGS+=" $(dlang_get_wno_error_flag)" + + DFLAGS="${DCFLAGS}" FRONTEND="$(dlang_get_fe_version)" test/run-unittest.sh \ + || die "Tests failed" +} + +src_install() { + dobin bin/dub + dodoc README.md + + # Make sure there are no man files in any other section. + use doc && doman scripts/man/*.1 + + newbashcomp scripts/bash-completion/${PN}.bash ${PN} + dozshcomp scripts/zsh-completion/_${PN} + dofishcomp scripts/fish-completion/${PN}.fish +}