commit: a9689d44f2b60c471b637ff5634757e338a49a4d Author: Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me> AuthorDate: Wed Sep 27 21:49:35 2023 +0000 Commit: Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me> CommitDate: Thu Sep 28 11:33:43 2023 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=a9689d44
dev-util/dub: add 1.33.0 Man page generation has been disabled due to linking errors when compiling the generator with gdc. Dependency on net-misc/curl has been removed as dub only uses the wrappers in phobos. For the same reason linking to libcurl and libz is redundant and has been removed. Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> proton.me> dev-util/dub/Manifest | 1 + dev-util/dub/dub-1.33.0.ebuild | 47 ++++++++++++++++++++++ .../dub/files/dub-1.33.0-gdc-dmd-pathfix.patch | 18 +++++++++ 3 files changed, 66 insertions(+) diff --git a/dev-util/dub/Manifest b/dev-util/dub/Manifest index 4c543e0..372e45d 100644 --- a/dev-util/dub/Manifest +++ b/dev-util/dub/Manifest @@ -1 +1,2 @@ DIST dub-1.29.0.tar.gz 1321720 BLAKE2B c24f55cb4d356538a22eda86b8abec0d0ccdb3ede6bc1e49424ba8350d0ac95b2c3b9307c6eaa9b9547be6a040548824ea32a019aac62287f8410c9beec07bd2 SHA512 f851ceccb7aa1ee00560c64fca2cf4239f0b260c7c2eee5c3688a555f7f37ff7bc4894cbc944ec0cf3a5b1cb1cf33d6d1e9cf23b24b42e098ccb3f432354a97c +DIST dub-1.33.0.tar.gz 1488522 BLAKE2B f3171c4c85dca2bdae133c1f9f8f4ef79726a882ace9242ee825716c2f38ade16171eb1f0395856117d2b7ed592dd19e8e223ddff78ba900716832b346162f7e SHA512 027c77ac6179cb0cf26618a04604c15bbe4ae668901b54a0029b63ce4585cd1017c463cd9b6bc58f2eabafab85fb58935feb2866714e69d281d1d5cbe0a3f806 diff --git a/dev-util/dub/dub-1.33.0.ebuild b/dev-util/dub/dub-1.33.0.ebuild new file mode 100644 index 0000000..2805d8b --- /dev/null +++ b/dev-util/dub/dub-1.33.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Package and build management system for D" +HOMEPAGE="https://code.dlang.org/" +LICENSE="MIT" + +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug" + +GITHUB_URI="https://codeload.github.com/dlang" +SRC_URI="${GITHUB_URI}/${PN}/tar.gz/v${PV} -> ${PN}-${PV}.tar.gz" +PATCHES="${FILESDIR}/${P}-gdc-dmd-pathfix.patch" + +# Upstream recommends the latest version available +DLANG_VERSION_RANGE="2.092-" +DLANG_PACKAGE_TYPE="single" + +inherit dlang + +d_src_compile() { + local imports=source versions="DubApplication DubUseCurl" + dlang_compile_bin bin/dub $(<build-files.txt) + + ## Currently broken with gdc + # Generate man pages + #bin/dub scripts/man/gen_man.d || die "Could not generate man pages." +} + +d_src_test() { + echo "Test phase disabled due to multiple problems." + #DUB="${S}/bin/dub" test/run-unittest.sh || die "Test phase failed" +} + +d_src_install() { + dobin bin/dub + dodoc README.md + + ## Currently broken with gdc + # All the files in the directory below, with the exception of gen_man.d and README, are man pages. + # To keep the ebuild simple, we will just glob on the files that end in .1 since there are currently + # no man pages in a different section. + #doman scripts/man/*.1 +} diff --git a/dev-util/dub/files/dub-1.33.0-gdc-dmd-pathfix.patch b/dev-util/dub/files/dub-1.33.0-gdc-dmd-pathfix.patch new file mode 100644 index 0000000..a32d54b --- /dev/null +++ b/dev-util/dub/files/dub-1.33.0-gdc-dmd-pathfix.patch @@ -0,0 +1,18 @@ +diff --git a/source/dub/generators/build.d b/source/dub/generators/build.d +index 8583eab..fc9a6d9 100644 +--- a/source/dub/generators/build.d ++++ b/source/dub/generators/build.d +@@ -211,11 +211,11 @@ class BuildGenerator : ProjectGenerator { + auto build_id = buildsettings.computeBuildID(config, settings); + + // make all paths relative to shrink the command line +- string makeRelative(string path) { return shrinkPath(NativePath(path), cwd); } ++ /+string makeRelative(string path) { return shrinkPath(NativePath(path), cwd); } + foreach (ref f; buildsettings.sourceFiles) f = makeRelative(f); + foreach (ref p; buildsettings.importPaths) p = makeRelative(p); + foreach (ref p; buildsettings.cImportPaths) p = makeRelative(p); +- foreach (ref p; buildsettings.stringImportPaths) p = makeRelative(p); ++ foreach (ref p; buildsettings.stringImportPaths) p = makeRelative(p);+/ + + // perform the actual build + bool cached = false;
