commit: 9b95afbe8f0124bae394ca30944ed337eaf83f82
Author: Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Mon Jun 30 19:42:30 2025 +0000
Commit: Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Mon Jun 30 19:42:30 2025 +0000
URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=9b95afbe
dev-util/dub: add 1.40.0
Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
dev-util/dub/Manifest | 2 +
dev-util/dub/dub-1.40.0.ebuild | 122 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 124 insertions(+)
diff --git a/dev-util/dub/Manifest b/dev-util/dub/Manifest
index 2af5f28..779d2f7 100644
--- a/dev-util/dub/Manifest
+++ b/dev-util/dub/Manifest
@@ -1,6 +1,8 @@
DIST dub-1.35.1.tar.gz 1494965 BLAKE2B
400e210584660f7ac67732006ca6d88156adbbf2bf221aa244e317bf7c2772a6a01d9e141252fbf0cfde4c07302ee533593f3a2f418f9e120edc7359a83180cf
SHA512
a371a7ec7003a4a4fb642a3567fce0685c99f4940a02de94d026bdc6fe4e84512b16e4bb57673da4d3b8e25177cc3df329da41862086cecc7b98aec1ebf9e4e7
DIST dub-1.37.0.tar.gz 1515440 BLAKE2B
13bb5b5541af6ae11e45cf130e9bfb706e7fb59797e497a33e419500262fd70ef1ac657b2b230224010d78b36361f7974d38b22fd36fa70f580c3b7f7a578457
SHA512
dc4331b77681d05bc5c6f36f5179d2a1220f3e1cbfc64ba27104fb2b716bd7e2b70c5b3b4d0e8b786caf36632c2fd774bbd51b235389ff38cfde87138fc9de18
DIST dub-1.38.1.tar.gz 1517185 BLAKE2B
8d25b1f43059bc95cf921bd2aa8842abc82ef0d18321d2c9b46698a0d4a24a3fd4d740b20af7ba11cf6659f527b553378578040c9c0bac5d4629b4e024b3764a
SHA512
d08afc9c5266fa5df78cefd3439f4477a80a6441446e202ee5d07bfac35db7521b836eca7f0944dfa98b53da948759ee1c91f6b6903c6e04b6d155c7ed805e80
+DIST dub-1.40.0-man-pages.tar.gz 10397 BLAKE2B
2f2f28e7be3d4bda379b436b9d8765b6c93688283d4de880046a19adae9c42311deb9722dfc76a8ccbb798ba840458546802f72d79bf20710cee57bc65bccc08
SHA512
d392f796acfe72a156d993684212e4cbb997151de65185035092378aa7184cba2bc7c56b9a20d42bf6560e5e2fc590bd30d3fa00d0cd8ffa6ea4d955fcea1c34
+DIST dub-1.40.0.tar.gz 1525761 BLAKE2B
07b128a7783d1337104ccc8227b7078db5549832912e000019a627a3aa41de0628d66aede403417eb136178684b1a4289ed780c1acaf4b4db00262aec16065c2
SHA512
c8ffa874be206f6e8041635062cd1fa71853d8ccaf9c5eb70353f492b8659c81ab2277e4c19824945f3a527cd4f87b35adc2fa7572b0bf5f80abded63de32ba6
DIST gitcompatibledubpackage-1.0.1.zip 1354 BLAKE2B
60c3ff78c9cc0ca16f36bfdb4d91f6ec7e8d1bc7fb2fae9488e3f24b33fc3b578157f3c2fd9f892743b1fba7ec473267d9027febd3c27ac2af52733e146c341d
SHA512
0adb8a97cce0aaac1dbaea978aacf801071457c06413e618b0feb1adaf4169c7a1acbfac2d9c192fada4f2f8bd44e1ea3b9fce8c7cb3fb8bf364eba75f559122
DIST gitcompatibledubpackage-1.0.4.zip 2041 BLAKE2B
595080956881fd86753b17cdbb12108ab03161806ca51c748017f29251dd47a95a0aebde4442db1783602cfa67a9593014ebb6ca591dcfec2b08eef3d737e2cc
SHA512
12057117be99bb4d2351af74cfd36c050734383bfc44b185cf5f9737d982e9fd6840f6968a3246b625d4ec90e9d30f5e394f8fa1febb85464429d771bc8062d0
DIST urld-2.1.1.zip 15062 BLAKE2B
fe123fbef20167e07c81d0f7700a59c48dca28311329f9717283f3e7c88cc2430a1ffc26632c8c1512145b9d6fa6e432cee1677e99be3bd555247f02f7f42b67
SHA512
c4c8d349a8bbac9f234166ed9452ab221f8928e822c6ab95716b05948dbb21ae4309face4158909559698f23aa750c9faef5b2294feef7e601ccbc9a41c3b6bb
diff --git a/dev-util/dub/dub-1.40.0.ebuild b/dev-util/dub/dub-1.40.0.ebuild
new file mode 100644
index 0000000..453565b
--- /dev/null
+++ b/dev-util/dub/dub-1.40.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DLANG_COMPAT=( dmd-2_{106..111} gdc-1{3..5} ldc2-1_{35..40} )
+DUB_DEPENDENCIES=(
+ [email protected]
+ [email protected]
+ [email protected]
+)
+inherit dlang-single dub shell-completion
+
+DESCRIPTION="Package and build management system for D"
+HOMEPAGE="https://code.dlang.org/"
+
+GITHUB_URI="https://codeload.github.com/dlang"
+man_pages_uri="https://github.com/the-horo/distfiles/releases/download/init"
+SRC_URI="
+ ${GITHUB_URI}/${PN}/tar.gz/v${PV} -> ${P}.tar.gz
+ ${man_pages_uri}/${P}-man-pages.tar.gz
+ test? ( ${DUB_DEPENDENCIES_URIS} )
+"
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND+=" virtual/pkgconfig"
+
+src_unpack() {
+ dub_gen_settings
+ unpack "${P}.tar.gz" "${P}-man-pages.tar.gz"
+ use test && dub_copy_dependencies_locally "${DUB_DEPENDENCIES[@]}"
+}
+
+src_prepare() {
+ # Note, disabling tests is possible yet very hard. You have to
+ # create a bash variable containing a regex (to be used in =~) that
+ # matches all the tests that you want *to* run. It's probably easier
+ # to delete the subdirectory under ${S}/test.
+
+ # Tries to connect to github.com and fails due to the network sandbox
+ rm -r "${S}/test/git-dependency" || die
+
+ # gdc doesn't support #include's in its importC implementation.
+ if [[ ${EDC} == gdc* ]]; then
+ rm -r "${S}/test/use-c-sources" || die
+ rm -r "${S}/test/issue2698-cimportpaths-broken-with-dmd-ldc" ||
die
+ fi
+
+ # $(basename DC) not matching ^(dmd|ldc2|gdc)$ makes the test runner
+ # not skip known failures, so skip them here instead
+ if [[ ${EDC} == dmd* ]]; then
+ rm -r test/issue2258-dynLib-exe-dep || die
+ fi
+ if [[ ${EDC} != ldc2* ]]; then
+ rm -r test/depen-build-settings || die
+ fi
+
+ default
+}
+
+src_compile() {
+ # dmd misscompilation with -O
+ # https://github.com/dlang/dmd/issues/21400
+ dlang-filter-dflags dmd* -O*
+
+ local imports=source versions="DubApplication DubUseCurl"
+ dlang_compile_bin bin/dub $(<build-files.txt)
+}
+
+src_test() {
+ # Setup the environment for the tests.
+ local -x DUB="${S}/bin/dub"
+
+ # Specifying DFLAGS in the environment disables unittests. Outside
+ # of a better solution, put them in a wrapper file
+ local dflags=( ${DCFLAGS} ${DLANG_LDFLAGS} $(dlang_get_wno_error_flag) )
+
+ [[ ${EDC} == gdc* ]] && dflags+=( -fall-instantiations )
+
+ # -g causes ICE, only on tests
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817
+ [[ ${EDC} =~ gdc-1(3|4) ]] && dflags+=( -g0 )
+
+ mkdir -p "${T}/${PN}"
+
+ local wdc="${T}/${PN}/${EDC}"
+ cat > "${wdc}" <<-EOF || die
+ #!${BROOT}/bin/sh
+ ${DC} "\${@}" ${dflags[*]}
+ EOF
+ chmod +x "${wdc}"
+ local -x DC="${wdc}"
+
+ # Run the unittests in the source files.
+ "${DUB}" test --verbose -c application || die
+
+ # Some tests overwrite DUB_HOME messing up the configuration file
+ # so put it in one of the other available locations
+ mkdir -p "${S}/bin/../etc/dub" || die
+ cp "${DUB_HOME}/settings.json" "${S}/bin/../etc/dub/settings.json" ||
die
+
+ # Run the integration tests.
+ FRONTEND="$(dlang_get_fe_version)" test/run-unittest.sh \
+ || die "Tests failed"
+}
+
+src_install() {
+ dobin bin/dub
+ dodoc README.md
+
+ doman "${WORKDIR}/${P}-man-pages"/*
+
+ newbashcomp scripts/bash-completion/${PN}.bash ${PN}
+ dozshcomp scripts/zsh-completion/_${PN}
+ dofishcomp scripts/fish-completion/${PN}.fish
+}