commit:     a13c79bd2d962d41cff8ee461b6e00233089187a
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Wed Jan 24 23:23:58 2024 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Wed Jan 24 23:24:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=a13c79bd

dev-util/dfmt: add 0.15.1

Additional changes:
- add github upstream remote to metadata.xml
- keyword for ~arm64
- bump EAPI 7 -> 8

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

 dev-util/dfmt/Manifest           |  2 ++
 dev-util/dfmt/dfmt-0.15.1.ebuild | 62 ++++++++++++++++++++++++++++++++++++++++
 dev-util/dfmt/metadata.xml       |  6 +++-
 3 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/dev-util/dfmt/Manifest b/dev-util/dfmt/Manifest
index 0a7f59c..b37b76e 100644
--- a/dev-util/dfmt/Manifest
+++ b/dev-util/dfmt/Manifest
@@ -1,3 +1,5 @@
 DIST dfmt-0.13.4.tar.gz 92846 BLAKE2B 
4b16e8fc219004686315e6a478c349d0cdfc0a20b0ecc4e45a45a27774f1130c1346a78632ba44088c4b25ba1db6e4a78bec6ff33a680e17e7a30f241c274582
 SHA512 
997148a6234f446fbcc7eb75f8cb8b21b723131f997a84541f8486f98970d15d2330b0c0297b2fa3e834e03f6b35dce9623d59c439fdc3bf0881b72aef8b4281
+DIST dfmt-0.15.1.tar.gz 120509 BLAKE2B 
a50978d2070f53f47e0bfd959c72402847fbe5f1a9b25ddb48b7f3c62abf905e8264b494812320e13ea84718d4586bff2407ac7c96265aa5067271214b08fddf
 SHA512 
42c35905c90a68f351d1ffb4280d59394d38d81c0f8768dc964d310e9b03361bfc8ef817c9ea844e4867586f9be3160d88bf9b5fe96faf96bffe5254683d21ae
 DIST libdparse-9aefc9c5e6e1495aca094d5c403f35f1052677d1.tar.gz 145180 BLAKE2B 
c0050cf47a2f417b7cdc67adad5c642e44dad310d7f85ea46d81e29d054fa0e489cb7a2b83ac8d4c6891530961e986d700baa0d9771046ea5a3c314d956f92f3
 SHA512 
f66d83e72a9de42bcd21794809f22c5b8d3fde1af136f1f55a9991e30a430e1229f5183a2a6e172e6b49ec7e1139213523be419ff1a07826910f5067e7439490
+DIST libdparse-fe6d1e38fb4fc04323170389cfec67ed7fd4e24a.tar.gz 158963 BLAKE2B 
4fc7b52921d0c163051b4115076a1473fd7138244bad8052e79298beaccb1ed3c737bbf0ae754f2596133d32cede71704e4ac43c486d69a4390e5654c1993bfa
 SHA512 
cb36b7bfc7d33c0c2c9be25bf4bea1abdbad7c7c9860bbbe725be7d5859255f937fb3b4a2241b47eb4131dd1879819e47704eaadeeb660d5b245008f594107cf
 DIST stdx-allocator-ae237cabd1843774cc78aad0729c914a3dd579db.tar.gz 103650 
BLAKE2B 
8d03c2dc76194b18da92261c533c402b87bda1964662070d02ceacbab3dda91a834c0c8bfe45feb1d9a3d7669f96a2a1f7b9a6b7eff7ea53069480d8de8fe15e
 SHA512 
893e5ecefac86a64b3a91f034cc9f42aabc264d111b40accf890b505ec9d077fcaac0b29fc202400448994e4ff021263beef7716798734cb9b71b6aad1aaf394

diff --git a/dev-util/dfmt/dfmt-0.15.1.ebuild b/dev-util/dfmt/dfmt-0.15.1.ebuild
new file mode 100644
index 0000000..f2d464b
--- /dev/null
+++ b/dev-util/dfmt/dfmt-0.15.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Dfmt is a formatter for D source code"
+HOMEPAGE="https://github.com/dlang-community/dfmt";
+LICENSE="Boost-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+LIBDPARSE="fe6d1e38fb4fc04323170389cfec67ed7fd4e24a"
+ALLOCATOR="ae237cabd1843774cc78aad0729c914a3dd579db"
+SRC_URI="
+       https://github.com/dlang-community/dfmt/archive/v${PV}.tar.gz -> 
${PN}-${PV}.tar.gz
+       
https://github.com/dlang-community/libdparse/archive/${LIBDPARSE}.tar.gz -> 
libdparse-${LIBDPARSE}.tar.gz
+       
https://github.com/dlang-community/stdx-allocator/archive/${ALLOCATOR}.tar.gz 
-> stdx-allocator-${ALLOCATOR}.tar.gz
+       "
+
+DLANG_VERSION_RANGE="2.100-2.106"
+DLANG_PACKAGE_TYPE="single"
+
+inherit dlang bash-completion-r1
+
+src_prepare() {
+       mkdir bin || die "Failed to create 'bin' directory."
+       cat > bin/githash.txt << EOF
+v${PV}
+EOF
+       dlang_src_prepare
+}
+
+d_src_compile() {
+       local libdparse_src="../libdparse-${LIBDPARSE}/src"
+       local allocator_src="../stdx-allocator-${ALLOCATOR}/source"
+       local imports="src ${libdparse_src} ${allocator_src}"
+       local string_imports="bin"
+       local srcDirectories=(
+               "${S}/src"
+               "${S}/${libdparse_src}"
+               "${S}/${allocator_src}"
+       )
+       local sourceFile sourceFiles=()
+       while read -r -d '' sourceFile; do
+               sourceFiles+=("${sourceFile}")
+       done < <(find "${srcDirectories[@]}" -name '*.d' -print0)
+
+       dlang_compile_bin "bin/dfmt" "${sourceFiles[@]}"
+}
+
+d_src_test() {
+       cd tests || die
+
+       dlang_compile_bin "run_tests" "test.d"
+       ./run_tests || die "Tests failed"
+}
+
+d_src_install() {
+       dobin bin/dfmt
+       dodoc README.md LICENSE.txt
+       dobashcomp bash-completion/completions/dfmt
+}

diff --git a/dev-util/dfmt/metadata.xml b/dev-util/dfmt/metadata.xml
index 920817d..5cfa2c3 100644
--- a/dev-util/dfmt/metadata.xml
+++ b/dev-util/dfmt/metadata.xml
@@ -1,3 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
-<pkgmetadata/>
\ No newline at end of file
+<pkgmetadata>
+  <upstream>
+    <remote-id type="github">dlang-community/dfmt</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to