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 0A940158044 for ; Sat, 13 Apr 2024 23:04:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 606F7E2A3B; 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 3DDAFE2A3C for ; Sat, 13 Apr 2024 23:04:33 +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 170DC3433A4 for ; Sat, 13 Apr 2024 23:04:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D09716E8 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.aa21b2fcf88726f6c3a05701da8a240b37d533d8.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-util/dscanner/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-util/dscanner/dscanner-0.15.2-r1.ebuild X-VCS-Directories: dev-util/dscanner/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: aa21b2fcf88726f6c3a05701da8a240b37d533d8 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: 9641be2e-ef12-4b61-aea0-1d56047e01ee X-Archives-Hash: aa08847d35bf3ebb27ae3e5ba5761edc commit: aa21b2fcf88726f6c3a05701da8a240b37d533d8 Author: Andrei Horodniceanu proton me> AuthorDate: Sat Mar 9 17:12:21 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=aa21b2fc dev-util/dscanner: port to dlang-single.eclass Signed-off-by: Andrei Horodniceanu proton.me> dev-util/dscanner/dscanner-0.15.2-r1.ebuild | 99 +++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/dev-util/dscanner/dscanner-0.15.2-r1.ebuild b/dev-util/dscanner/dscanner-0.15.2-r1.ebuild new file mode 100644 index 0000000..e24c6bc --- /dev/null +++ b/dev-util/dscanner/dscanner-0.15.2-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Swiss-army knife for D source code" +HOMEPAGE="https://github.com/dlang-community/D-Scanner" +LICENSE="Boost-1.0" + +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug" + +CONTAINERS="116a02872039efbd0289828cd5eeff6f60bdf539" +DCD="1c60c5480f70db568279e4637a5033953c777406" +INIFILED="cecaff8037a60db2a51c9bded4802c87d938a44e" +LIBDDOC="fbbfb8245728484e5f96d717994d4b404a9789a4" +LIBDPARSE="fe6d1e38fb4fc04323170389cfec67ed7fd4e24a" +GITHUB_URI="https://codeload.github.com" +SRC_URI=" + ${GITHUB_URI}/dlang-community/${PN}/tar.gz/v${PV} -> ${P}.tar.gz + ${GITHUB_URI}/dlang-community/containers/tar.gz/${CONTAINERS} -> containers-${CONTAINERS}.tar.gz + ${GITHUB_URI}/dlang-community/DCD/tar.gz/${DCD} -> DCD-${DCD}.tar.gz + ${GITHUB_URI}/burner/inifiled/tar.gz/${INIFILED} -> inifiled-${INIFILED}.tar.gz + ${GITHUB_URI}/dlang-community/libddoc/tar.gz/${LIBDDOC} -> libddoc-${LIBDDOC}.tar.gz + ${GITHUB_URI}/dlang-community/libdparse/tar.gz/${LIBDPARSE} -> libdparse-${LIBDPARSE}.tar.gz + " +S="${WORKDIR}/D-Scanner-${PV}" +PATCHES=( "${FILESDIR}/${PV}-makefile-fixes.patch" ) + +DLANG_COMPAT=( dmd-2_{106..107} gdc-13 ldc2-1_{35..36} ) + +inherit dlang-single + +REQUIRED_USE=${DLANG_REQUIRED_USE} +DEPEND=${DLANG_DEPS} +BDEPEND=${DLANG_DEPS} +RDEPEND=${DLANG_DEPS} + +src_prepare() { + move_git_submodules + + mkdir "${S}"/bin || die "Failed to create 'bin' directory." + # Stop the makefile from executing git + echo "v${PV}" > "${S}"/bin/githash.txt || die "Could not generate githash" + + # Apply patches + default +} + +src_compile() { + if use debug; then + # Add a -debug compiler specific flag and enable the dparse_verbose version, + # like the debug target in the makefile except that it doesn't build everything in 1 go. + DCFLAGS+=" $(dlang_get_version_flag)=dparse_verbose" + + local debugFlag + case "${EDC}" in + dmd*) debugFlag="-debug" ;; + gdc*) debugFlag="-fdebug" ;; + ldc*) debugFlag="-d-debug" ;; + esac + DCFLAGS+=" ${debugFlag}" + fi + + emake DFLAGS="${DCFLAGS}" +} + +src_test() { + # We can specify user flags in (DMD|LDC|GDC)_TEST_FLAGS + local flagName=${EDC::3} + flagName="${flagName^^}_TEST_FLAGS" + + emake test "${flagName}=${DCFLAGS}" +} + +src_install() { + dobin bin/dscanner + dodoc README.md LICENSE_1_0.txt +} + +move_git_submodules() { + # Move all submodule dependencies into the appropriate folders. + # They have to be moved from ${WORKDIR}/${name}-${hash} to ${S}/${name} + local submodule submodules=( + "containers" "DCD" "inifiled" "libddoc" "libdparse" + ) + for submodule in "${submodules[@]}"; do + # make the name uppercase: inifiled -> INIFILED + local submodule_hash_var="${submodule^^}" + # and extract the hash + local submodule_hash="${!submodule_hash_var}" + + local submodule_directory="${WORKDIR}/${submodule}-${submodule_hash}" + + mv -T "${submodule_directory}" "${S}/${submodule}" \ + || die "Could not move submodule '${submodule}' to its subdirectory" + done +}