commit:     8c15db6c8467d9fe8e97f76849ced826994f6e0d
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Tue Apr 22 19:17:00 2025 +0000
Commit:     Horodniceanu Andrei <a.horodniceanu <AT> proton <DOT> me>
CommitDate: Tue Apr 22 19:39:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=8c15db6c

dev-lang/dmd: add 2.111.0

A relevant change upstream is the removal of the compiler samples
folder, which was installed with USE examples.

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

 dev-lang/dmd/Manifest            |  4 ++++
 dev-lang/dmd/dmd-2.111.0.ebuild  | 13 +++++++++++++
 eclass/dlang-compilers-r1.eclass |  1 +
 eclass/dmd-r1.eclass             | 37 ++++++++++++++++++++++++++++++++-----
 profiles/use.desc                |  2 ++
 5 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/dev-lang/dmd/Manifest b/dev-lang/dmd/Manifest
index f87b65a..9c7ba66 100644
--- a/dev-lang/dmd/Manifest
+++ b/dev-lang/dmd/Manifest
@@ -3,7 +3,9 @@ DIST dmd-2.108.1.tar.gz 5984240 BLAKE2B 
839dd385389590ec47450f4bcb56b48c3fcdcbda
 DIST dmd-2.109.1.tar.gz 6017602 BLAKE2B 
ba5ba5c4e879b086591c77fbab4ef1bed2726a843a213f8662c3cbbcf4d4897ea01725cff2b44b785674ef511dd75c011450711e3e18a45f821dd23a81dc8526
 SHA512 
d4b6d4da6ff9f471ea028688fa3694440d3cf3b98f30f7a3665f0a61e667b4f78c2d4554d4ea2d78a0ab2c890e74b079150b6759fdc1ac612b9e374a730b837c
 DIST dmd-2.110.0-beta.1.tar.gz 6007288 BLAKE2B 
6153de8ddabb45f19e9707fb04ab4b82681938027883ee9b175a66df268ba7e70c193e9a51b691defe8f2e120b98dcba73fa24859c4c246daf24823b5155acae
 SHA512 
c71e101606bf76f14c3e5985c11f789a7ebca1d737277945e81d834e30602ef1a9012f2ef3987fc85bcef32c599099381fd796535d78d1251e3b4727b5e47b94
 DIST dmd-2.110.0.tar.gz 6011457 BLAKE2B 
c53e39babeb69cdd5f5afef7a0a824a052f84bb1df0e2d19a57467720c8a5ea0757e3839d5b022337e5cc75fecc5e946158939fd74f181bfadc2134be60c692e
 SHA512 
ae16c760a7f9339e7256344dfb93bd97a13b36e04fd291973f4e8074cde845d633033307f1d312c89dbd8b7f8c280e8f22555c6225458b73ca664a0fa5987893
+DIST dmd-2.111.0.tar.gz 6110729 BLAKE2B 
0468bb01f1a4682be030c31ea7961cf515b6a473e0f176ddbb63b481962a09f802478df398862fe1b780123e724f45f508f471acc88c5583c06623abf83b09cd
 SHA512 
424e10683ecaedd5fe84d21fecfc084507b45141616c4a1ff11dd15878f76904eea64d58ec19a53d38bbe85c42cdfcb6e59be43f0fb71cc53ccbe5a15ed17214
 DIST dmd-man-pages-2.110.0.tar.xz 3960 BLAKE2B 
6caf59777b608afa9df55edb6e88179de219c14cd5c7f282957b7f358ceb2fbb983431f6ffc99805765ad3cdc50a0649f64e2af55f4b00f5d7618f93192e3103
 SHA512 
9c7966943ceac35b04daba980a57e3dda5671868f1f600850deb41115871bb1098af2ab36bc80e8b33fffb1a59ef038db9173373b5ff6940c8fea453a12bde1a
+DIST dmd-man-pages-2.111.0.tar.xz 4088 BLAKE2B 
607a53e85fefdcfcbb42171103197a74f11bc07ad355142e3556a88eff288411d534b70d760b0a61573c01c43dee90dcde761ceb84418b679141e00d8dd4351a
 SHA512 
f8209e454c01633a8f49fd5766ff1cd4ec0ef0934a739d59ad42a72a65e4fb6eed01379ee3af479224b7cb38a23cdfae0dc617a43dfbc8329d02be03e8db321a
 DIST dmd.2.101.2.linux.tar.xz 22666828 BLAKE2B 
8233d9f375291d73530a677cd5180153bc758076fd135c420cbb088bf84147fa1f0dc1cd563e94737e781823db26e4e0250af31d68819c3375224a92e53876b6
 SHA512 
7e1ce980fce7a2a995af92b2e05acdfcb2d8abc14780e11d8234792b80edead68c455e644e1830d360651bdacefa1aace963ce652fbfd3b0951dd9002fcfb87f
 DIST dmd.2.102.2.linux.tar.xz 22699620 BLAKE2B 
b0a8fc0650bfe5df4a40ccf20d160765a8ed7804915a1049366ff8b4044d7036ca7f27c8bc71146dc33bf60bf03bc09a9bd8758b9850b020480774f130325abd
 SHA512 
a2dab6efe46176bed0dca98fcf590c6823be9e4d5ca89bce0ff088e7c59a63f8eb4bb3742df1975cc90b5efd78c11377e682b0083fe44c394a73161cbb2b3aa3
 DIST dmd.2.103.1.linux.tar.xz 22747324 BLAKE2B 
b00f41b4ab48be9c5467342314995e69332d4c8bff86083474a940431721d179d5e5ef64734f355df2d96637983de2262d45516594434ad3ad6c4d57a0d7a54c
 SHA512 
854cf08d715506bd36d791c1471f2dd1d834f439bdf4489b4addf0cc5abdecbefceb966baeb764eb5ca816a5830ac7374818ba6fbcad24668d011d56a32a1f15
@@ -15,8 +17,10 @@ DIST dmd.2.108.1.linux.tar.xz 22554596 BLAKE2B 
9442455e84061fe832f93ae2658089156
 DIST dmd.2.109.1.linux.tar.xz 22635268 BLAKE2B 
1a188de152f530146461c1d58452baf7bd5fbb8eeb68f52a45a1e3e2eb79205b5226e029b1bf93c69a7e2f751ffebea52ef900d0d1c2cdc62de1ccdc44371585
 SHA512 
c9c977e8068ee8d6db9d7c8980b21d1bd32a2e703e11eddc963980c7c560e77bc78caf749a48a76b319d3d27027b83c4fa0d6289a31a46ddcbe59b8d46fb1282
 DIST dmd.2.110.0-beta.1.linux.tar.xz 22648340 BLAKE2B 
52218d3c29b4da74d509bb5092a5d7fc5b62468992b4a005e4d164124030623af57ff3a470ae5834f11a1ad5db918266059c6403d18b85026f7475c60a12345c
 SHA512 
b8b791c2347b52990263cc4a75ca64cd66812dd1563bf0936cbff287da02218568579ff710fcbb0cc2677407317f903d7d9e64061aa817c707a184c043bacdb6
 DIST dmd.2.110.0.linux.tar.xz 23607140 BLAKE2B 
e8919d6245ea5d062b86f92c4fba048c70d22ca1ff748b4e6b3efb166329e21f3dd8c17a170526f3d88e2ce465525d55d079457a68213253d31fa52d9eacee6e
 SHA512 
f0ad47f0abef9f4442227bfb69f22e94a127f4c908b1f9e13e17788d9f657421266c1f64f44ec5cf7974f50f2188564b56c914c39dcfaff528c236c4302f5d1d
+DIST dmd.2.111.0.linux.tar.xz 23812020 BLAKE2B 
5b92963178bb1362037f7c252f04a4bb1246184da19a7b8f2ee5feb4fe7c1fecebd6d4b4e0e219673f4e757ba171f371f4ec7eb3de0dc306fbbdd1a350600c21
 SHA512 
9b5c6cc1b4eda6f7a79e80535ee3909ecfecc1464c54b2237e4b8924ae619a12399df4b92fbecc187646be593cae3b90fff99d565f3f2b0187b9ee55aa4430ee
 DIST phobos-2.107.0.tar.gz 2756892 BLAKE2B 
604d19254e453f0a04e6659e46de187837f5ab82278f8a52ae9714b91d3554e3cc166086860ca32e39d722847c4e962762e26e8226ce685064d5dcc10d3a708b
 SHA512 
4002878851673bc4deaec66dd35d2dc3cfe5f72b7050e2b454bf53aeaa8b4a68fc425d248eab4fbea89f251298b66c726166c41666a69a5508092fd30a9903d5
 DIST phobos-2.108.1.tar.gz 2749901 BLAKE2B 
dcf5117d5a25b458f2eca77441ffbfb1778e559c11726730682662601035dd4c5202934d244604fdc8cfecc5aa36a92a7ad1f842014c8a77b9c43aa0ce6a9876
 SHA512 
0267a0efabe1f447198810e71b11cee16f0cf7cfada7907a29133ca0483c5ce4f647b7afbf627d34b746f8afbf9bafa26183b3decf2c67d2c1329ad7b81bfad5
 DIST phobos-2.109.1.tar.gz 2781164 BLAKE2B 
8475ec1236dac6a711839387980986530e3671da603800dcffb09cc369f86b8c04ac27ee84629285857ba4255dfbfdff14c209f02db11e140a7aeced9fbd52d0
 SHA512 
712478d2fb60a792ce5703062f0af3bafcddb54970cb8b9b579b8cd2ff560f958c7007d18dd4a66f7d4f25f74b8765505fe2de59c1756a4f679c2064f8025bcb
 DIST phobos-2.110.0-beta.1.tar.gz 2779702 BLAKE2B 
b74ab35e5c59e10352452e50f6646c787c848912988f4810ca7d111d52ff2b7b2db276fcf62b093ec30815a1e63e22dd9f9f5cd397edcc802fa62c995ae0f9ef
 SHA512 
68f074775d28edf349e7e424dc30b5c3d698c7fb8388cb49ccdcd51498e0708c920546b8bd6aad6c46064423e5b4861577abd80ddb768c9ec071f9662a1ac52f
 DIST phobos-2.110.0.tar.gz 2781787 BLAKE2B 
1f8ff3fd8d24e236506c3da27bfb07eb064fa5291ce57ae8a8c0e50a9922d5e37b009ad4a55eea538da7d287562b89bcd6df90955377562b3df76c868e45e8e1
 SHA512 
ef28943e5f94f37965dc0ea0a2bb6edeaed2f217395ddb26c56f187ee6536eeaf109e1566bb9cd157a549379bbca8329e5fa8121f6f5f35071a60c7de15db76b
+DIST phobos-2.111.0.tar.gz 2852400 BLAKE2B 
0c8f15734b28066ee620e9fc4b25e120a5c4dcd6b79803e7a2fb77485a2f6f52fac7d4ba8a8df5852a76d826f1f9831295985c22ce1d79b77105ccf2e4d6972b
 SHA512 
6fdf2d14d5e7ddee2756cf6b2da00be2744f49d23c14a3102ece7146907540024566c9456cecb3279d8d36ca1da0327fad0a4d291de7dc07d4f6a27fe93a1aff

diff --git a/dev-lang/dmd/dmd-2.111.0.ebuild b/dev-lang/dmd/dmd-2.111.0.ebuild
new file mode 100644
index 0000000..44f7182
--- /dev/null
+++ b/dev-lang/dmd/dmd-2.111.0.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KEYWORDS="-* ~amd64 ~x86"
+DLANG_COMPAT=( dmd-2_{106..111} gdc-1{3,4} ldc2-1_{35..40} )
+
+inherit dmd-r1
+
+PATCHES=(
+       "${FILESDIR}/2.107-dmd-r1-link-32-bit-shared-lib-with-ld.bfd.patch"
+)

diff --git a/eclass/dlang-compilers-r1.eclass b/eclass/dlang-compilers-r1.eclass
index 56c3f55..805227e 100644
--- a/eclass/dlang-compilers-r1.eclass
+++ b/eclass/dlang-compilers-r1.eclass
@@ -47,6 +47,7 @@ readonly _DLANG_DMD_FRONTENDS=(
        "2.108 2.108 ~amd64 ~x86"
        "2.109 2.109 ~amd64 ~x86"
        "2.110 2.110 ~amd64 ~x86"
+       "2.111 2.111 ~amd64 ~x86"
 )
 
 # @ECLASS_VARIABLE: _DLANG_GDC_FRONTENDS

diff --git a/eclass/dmd-r1.eclass b/eclass/dmd-r1.eclass
index 76e1c1c..603cbb7 100644
--- a/eclass/dmd-r1.eclass
+++ b/eclass/dmd-r1.eclass
@@ -37,6 +37,13 @@ MULTILIB_COMPAT=( abi_x86_{32,64} )
 
 inherit desktop edos2unix dlang-single multilib-build multiprocessing 
optfeature
 
+# @FUNCTION: _have_examples
+# @INTERNAL
+# @RETURN: shell true if the package version has the samples folder
+_have_examples() {
+       ver_test -lt 2.111.0_beta1
+}
+
 LICENSE=Boost-1.0
 # A couple of files are public domain, e.g. 
dmd/compiler/src/dmd/backend/bcomplex.d
 LICENSE+=" public-domain"
@@ -59,7 +66,7 @@ fi
 # dmd/compiler/samples/d2html.d has a license which sounds like the colt
 # license which is not free. The file has little value so it won't be
 # installed.
-LICENSE+=" examples? ( public-domain )"
+_have_examples && LICENSE+=" examples? ( public-domain )"
 
 SLOT=$(ver_cut 1-2)
 readonly MAJOR=$(ver_cut 1)
@@ -101,7 +108,8 @@ else
 fi
 
 SRC_URI+=" selfhost? ( $(_gen_dmd_tarball_uri "${MY_BOOTSTRAP_VER}") )"
-IUSE="examples +selfhost static-libs"
+IUSE="+selfhost static-libs"
+_have_examples && IUSE+=" examples"
 
 if [[ ${PV} != *9999* ]]; then
        SRC_URI+=" doc? ( $(_gen_dmd_tarball_uri "${MY_VER}") )"
@@ -303,6 +311,18 @@ dmd-r1_src_test() {
        # As opposed to old dmd.eclass we have access to actual tests. For
        # porting reasons we're going to keep only the old test,
        # hello_world.
+       cat <<-EOF > "${T}/hello.d"
+       import std.stdio;
+
+       void main(string[] args) {
+               writeln("hello world");
+               writefln("args.length = %d", args.length);
+
+               foreach (index, arg; args) {
+                       writefln("args[%d] = '%s'", index, arg);
+               }
+       }
+EOF
 
        test_hello_world() {
                local phobosDir=${S}/phobos/generated/linux/release/${MODEL}
@@ -320,7 +340,7 @@ dmd-r1_src_test() {
                        -Idmd/druntime/import
                )
 
-               "${GENERATED_DMD}" "${commandArgs[@]}" 
dmd/compiler/samples/hello.d \
+               "${GENERATED_DMD}" "${commandArgs[@]}" "${T}/hello.d" \
                        || die "Failed to build hello.d (${MODEL}-bit)"
                ./hello ${MODEL}-bit || die "Failed to run test sample 
(${MODEL}-bit)"
        }
@@ -373,7 +393,7 @@ dmd-r1_src_install() {
        insinto "${dmd_prefix}"/man/man5
        doins "${MAN_PAGES_S}"/dmd.conf.5
 
-       if use examples; then
+       if _use_examples; then
                # Problematic license
                rm dmd/compiler/samples/d2html.d || die
 
@@ -397,7 +417,7 @@ dmd-r1_src_install() {
 dmd-r1_pkg_postinst() {
        "${EROOT}"/usr/bin/eselect dlang update dmd
 
-       use examples &&
+       _use_examples &&
                elog "Examples can be found in: 
${EPREFIX}/usr/lib/${PN}/${SLOT}/samples"
        _use_doc && elog "HTML documentation is in: 
${EPREFIX}/usr/share/doc/${PF}/html"
 
@@ -415,6 +435,13 @@ _use_doc() {
        [[ ${PV} != *9999* ]] && use doc
 }
 
+# @FUNCTION: _use_examples
+# @INTERNAL
+# @RETURN: shell true if the examples use flag exists and is enabled
+_use_examples() {
+       _have_examples && use examples
+}
+
 # @FUNCTION: _gen_dmd.conf
 # @INTERNAL
 # @DESCRIPTION:

diff --git a/profiles/use.desc b/profiles/use.desc
index 3b71ac8..f39776f 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -8,6 +8,7 @@ dlang_single_target_dmd-2_107 - Build for DMD 2.107 only
 dlang_single_target_dmd-2_108 - Build for DMD 2.108 only
 dlang_single_target_dmd-2_109 - Build for DMD 2.109 only
 dlang_single_target_dmd-2_110 - Build for DMD 2.110 only
+dlang_single_target_dmd-2_111 - Build for DMD 2.111 only
 
 dlang_single_target_gdc-12 - Build for GCC 12 only
 dlang_single_target_gdc-13 - Build for GCC 13 only
@@ -33,6 +34,7 @@ dlang_targets_dmd-2_107 - Build with DMD 2.107
 dlang_targets_dmd-2_108 - Build with DMD 2.108
 dlang_targets_dmd-2_109 - Build with DMD 2.109
 dlang_targets_dmd-2_110 - Build with DMD 2.110
+dlang_targets_dmd-2_111 - Build with DMD 2.111
 
 dlang_targets_gdc-12 - Build with GCC 12
 dlang_targets_gdc-13 - Build with GCC 13

Reply via email to