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 E5497158043 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 1439FE2A39; 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 EFF0AE2A38 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 F08DB3433B8 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 35E0616E5 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.de4310f69a4a39a67e568b91facd959fc3588418.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-util/dcd/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-util/dcd/dcd-0.15.2-r1.ebuild X-VCS-Directories: dev-util/dcd/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: de4310f69a4a39a67e568b91facd959fc3588418 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: 4ad4cc17-1c31-4f4c-b020-12b781f8254c X-Archives-Hash: 9f725982238d1fd5e25d68ae99a59a6b commit: de4310f69a4a39a67e568b91facd959fc3588418 Author: Andrei Horodniceanu proton me> AuthorDate: Sat Mar 9 14:52: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=de4310f6 dev-util/dcd: port to dlang-single Additional changes: - update EAPI 7 -> 8 - enable tests Signed-off-by: Andrei Horodniceanu proton.me> dev-util/dcd/dcd-0.15.2-r1.ebuild | 95 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/dev-util/dcd/dcd-0.15.2-r1.ebuild b/dev-util/dcd/dcd-0.15.2-r1.ebuild new file mode 100644 index 0000000..bb66e8d --- /dev/null +++ b/dev-util/dcd/dcd-0.15.2-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Auto-complete program for the D programming language" +HOMEPAGE="https://github.com/dlang-community/DCD" +LICENSE="GPL-3" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="systemd" + +CONTAINERS="116a02872039efbd0289828cd5eeff6f60bdf539" +DTESTUTILS="206a2e6abd97b4462f3a320e4f2d23986fad3cff" +LIBDPARSE="592ef39a73a58439afc75a3e6c13a0d87d0b847d" +MSGPACK="480f3bf9ee80ccf6695ed900cfcc1850ba8da991" +SRC_URI=" + https://github.com/dlang-community/DCD/archive/v${PV}.tar.gz -> DCD-${PV}.tar.gz + https://github.com/economicmodeling/containers/archive/${CONTAINERS}.tar.gz -> containers-${CONTAINERS}.tar.gz + https://github.com/dlang-community/d-test-utils/archive/${DTESTUTILS}.tar.gz -> d-test-utils-${DTESTUTILS}.tar.gz + https://github.com/dlang-community/libdparse/archive/${LIBDPARSE}.tar.gz -> libdparse-${LIBDPARSE}.tar.gz + https://github.com/msgpack/msgpack-d/archive/${MSGPACK}.tar.gz -> msgpack-d-${MSGPACK}.tar.gz + " +S="${WORKDIR}/DCD-${PV}" + +DLANG_COMPAT=( dmd-2_{106..107} gdc-13 ldc2-1_{35..36} ) + +inherit dlang-single systemd bash-completion-r1 + +REQUIRED_USE=${DLANG_REQUIRED_USE} +DEPEND=${DLANG_DEPS} +RDEPEND=${DLANG_DEPS} +BDEPEND=${DLANG_DEPS} + +src_prepare() { + # Default ebuild unpack function places archives side-by-side ... + mv -T ../containers-${CONTAINERS} containers || die + mv -T ../d-test-utils-${DTESTUTILS} d-test-utils || die + mv -T ../libdparse-${LIBDPARSE} libdparse || die + mv -T ../msgpack-d-${MSGPACK} msgpack-d || die + # Stop makefile from executing git to write an unused githash.txt + mkdir bin || die "Coult not create output directory" + echo "v${PV}" > bin/githash.txt || die "Could not generate githash" + touch githash || die "Could not generate githash" + + # Apply patches + default +} + +src_compile() { + # Don't let the makefile overwrite user flags. + # The downside is that we have to also pass the include dirs. + local flags="${DCFLAGS} ${DLANG_LDFLAGS}" + flags+=" -Icontainers/src -Idsymbol/src -Ilibdparse/src -Imsgpack-d/src -Isrc -Jbin" + # An uppercase name of the compiler. It can be GDC, LDC or DMD + local name=${EDC::3} + name=${name^^} + + # Build client & server with the requested Dlang compiler. + local mymakeargs=( + # The path to the correct compiler + "${name}=${DC}" + # The flags for the client and the server + "${name}_CLIENT_FLAGS=${flags} $(dlang_get_output_flag)bin/dcd-client" + "${name}_SERVER_FLAGS=${flags} $(dlang_get_output_flag)bin/dcd-server" + # The target to build, the lowercase version of the compiler name + ${name,,} + ) + emake "${mymakeargs[@]}" + + # Write system include paths of host implementation into dcd.conf + dlang_print_system_import_paths > dcd.conf +} + +src_test() { + # Note, the makefile compiles the server with -g for tests. + cd tests && ./run_tests.sh || die "Tests failed" +} + +src_install() { + dobin bin/dcd-server + dobin bin/dcd-client + use systemd && systemd_douserunit "${FILESDIR}"/dcd-server.service + dobashcomp bash-completion/completions/dcd-server + dobashcomp bash-completion/completions/dcd-client + insinto /etc + doins dcd.conf + dodoc README.md + doman man1/dcd-client.1 man1/dcd-server.1 +} + +pkg_postinst() { + use systemd && elog "A systemd user service for 'dcd-server' has been installed." +}