commit:     779c0df59965560ed35f49d0c38cf1be949065a2
Author:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Sun Nov 26 13:40:48 2023 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Sun Nov 26 13:41:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=779c0df5

dev-util/dcd: add 0.15.2

Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> proton.me>

 dev-util/dcd/Manifest          |   4 ++
 dev-util/dcd/dcd-0.15.2.ebuild | 104 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)

diff --git a/dev-util/dcd/Manifest b/dev-util/dcd/Manifest
index 412e722..61732ac 100644
--- a/dev-util/dcd/Manifest
+++ b/dev-util/dcd/Manifest
@@ -1,6 +1,10 @@
 DIST DCD-0.13.4.tar.gz 133944 BLAKE2B 
6a6fe85e70810c29101feed0c7417bfbcb9240e8fac882cbd9ed57e6563b19cdfda3a9313e07b2f9948f5ba8d96121103090a8349880c4eff770388b3a4ec9c2
 SHA512 
5f3d77b7d898b4bfbcfce1b6333f6f96395f85193ae874d7b8c043e2964eeb6136cc8c4331544d5b730a2d611aa8766dc78b8a3315fe06aa855d019a6ea6321a
+DIST DCD-0.15.2.tar.gz 171345 BLAKE2B 
1d85e2b00a201a3ba762fa0357269a3980eeac4db006cd6b82d4688b624af7ac4938e0cac7cf0d8bc37ac2d08cda2c4c1d5f44dc0451bd44427fef8e98282a8a
 SHA512 
b18a886521843b0e9b91a5c457620337073c0221bfe924c289cd5808f4433ec91078e10e6d1b7ba2f35359b2fe0fed140ca81381246322be3a02ef4e7ffd11ba
+DIST containers-116a02872039efbd0289828cd5eeff6f60bdf539.tar.gz 55518 BLAKE2B 
466c2452724b3d377ca2cec8793e27b8599e4388644ef7058de4e535d5f095f6e713e6aaf7e934f944b68726f9a96aed3f093100f993cfe4db1efd5dbd9e6cd4
 SHA512 
e98ecc56b7dac12c347b591f65b33fc213a183e22c455e6bd2727d9797922069db70143240d935d72c38738fc43b579ede33c4a6d8e7ac0e5194001d3b0d773f
 DIST containers-fc1625a5a0c253272b80addfb4107928495fd647.tar.gz 55220 BLAKE2B 
67851802c64c2e22c40688e050e8ba3825d6152df0fed2130d3585b77264ddd0ff0444c199d95330116887d6711935b82cdba392e557acf22d353b094c4be8a4
 SHA512 
ff13091bd8ccd2fbfdb18284d81cf3789f208cc3e9f07f36cfb87122efb36b364c3201c695c9b0267705576561270a6f2a9ec91ce8776a7d683db4bf36ca328b
+DIST d-test-utils-206a2e6abd97b4462f3a320e4f2d23986fad3cff.tar.gz 3188 BLAKE2B 
2b3b334a63595c5f3b85b3354b1d93035c727f494bcaf3a255db2aeb610aa00cd3639d0e08fb54b5ee2f41033173a7f5062ee30edf95c7279b87aeec32e8f39f
 SHA512 
14e3743400957b0fec4c0799c59719957b19c4cb6cf7727f1901adc4acaa4b89309b84f47798e7af8fc066349662c720e2a0298acb8ed5e36c9a96df41e2d960
 DIST dsymbol-f9a3d302527a9e50140991562648a147b6f5a78e.tar.gz 34796 BLAKE2B 
c9fb476a348b030d7c57e43b0e21fb8db255ba4b350f7bde6315750ed5888eef9ce32ec68428f55e321bf6e9f167433ce3279185ff0ce0b899fbf5257b4d40c5
 SHA512 
2133f1c8dc966920496b7851f9ae094f10170117d1d9961f96c5382df126c3f72a8eb678dbc106bac5f3b4c1f97848428bf9004656c57d1c1c5f2697b7d2a4da
 DIST libdparse-1393ee4d0c8e50011e641e06d64c429841fb3c2b.tar.gz 137198 BLAKE2B 
e2d4122f63847fe9c0aa7591f5d5cfb9b8708c02c45b02b24fbb488f17a9dc0986ab0525a573e6e4e43daa3a1b8880edc93e0b6061fd5486a39e8fd45f516dd4
 SHA512 
8339e339d667f7fbd524f12c89a824f95a2151ce126fae33bbf940f76dcc460d42c0c412fa169867eaa056dabb1ef2aaa89b95b47219294edfc166aafa48c89c
+DIST libdparse-592ef39a73a58439afc75a3e6c13a0d87d0b847d.tar.gz 150314 BLAKE2B 
bff8c5bd7d5f8cf542eed17f3f85bbd44f71572023a0153b8de0e9341651b137e22f7c4162a2c31abbd6d4981fd49dc3dafc227ef566687711db8c85572e5423
 SHA512 
7648c891f65cef4c52ff13a633568a6b4ac224300fb74455335efa132108790d62c49fb31034cce65d49128277ac3fdd2033ee6e80077d73a0b18d3c17256b1f
 DIST msgpack-d-480f3bf9ee80ccf6695ed900cfcc1850ba8da991.tar.gz 143848 BLAKE2B 
44ac6f1efbbdb455af694cc476524535bebe993777a8c47d93a7cff21d825c2b8ce4caaf0d9f072f1e37869a9e50821abbd60e23a38546e0522047809cd0695a
 SHA512 
76f7049c9f9f4128b9e9691e224c2ff5d8ee5400bf0796cc362386f0bc6f2359bb1694606923aec21eab539f65b93b828c2e018dee22358b91713365dd443e4d
 DIST stdx-allocator-d6e6ce4a838e0dad43ef13f050f96627339cdccd.tar.gz 103648 
BLAKE2B 
c08925df810761bb4825d6058375dcc5415f4838403b3668aeff5c1be93c7d04b49c1994da27aa498cd0f4abd1ff923e8d906ae53c922f94bc63dac334b7f138
 SHA512 
3a41f95505e92d79a6b966d21d96fe5b5bb2b2f3762b09998b27334684d815a82a3e705935faa1b543a93ffb274c67b9110b2b1b7364f7d405bd65d05b819271

diff --git a/dev-util/dcd/dcd-0.15.2.ebuild b/dev-util/dcd/dcd-0.15.2.ebuild
new file mode 100644
index 0000000..764505b
--- /dev/null
+++ b/dev-util/dcd/dcd-0.15.2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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_VERSION_RANGE="2.095-"
+DLANG_PACKAGE_TYPE="single"
+
+inherit dlang systemd bash-completion-r1
+
+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
+       dlang_src_prepare
+}
+
+d_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 $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
+       case "$DLANG_VENDOR" in
+               DigitalMars)
+                       name=DMD
+                       ;;
+               GNU)
+                       name=GDC
+                       ;;
+               LDC)
+                       name=LDC
+                       ;;
+               *)
+                       die "Unsupported compiler vendor: $DLANG_VENDOR"
+                       ;;
+       esac
+
+       # 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_OUTPUT_FLAG}bin/dcd-client"
+               "${name}_SERVER_FLAGS=${flags} 
${DLANG_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 compiler into dcd.conf
+       dlang_system_imports > dcd.conf
+}
+
+d_src_test() {
+       # The tests don't work too well in a sandbox, e.g. multiple permission 
denied errors.
+       cd tests
+       #./run_tests.sh || die "Tests failed"
+}
+
+d_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."
+}

Reply via email to