Hi ports --

I would like to add an ldc FLAVOR to devel/dub. This requires the lang/ldc port posted earlier. The logic behind this is that dub requires a D compiler to build and run, but does not specify which D compiler. This allows D users to select the D compiler they would like to have on their system, since each will have different dependencies and reasons for users to choose that D compiler. It is also just a good test of each D compiler to make sure they actually work, as the FLAVOR dictates which D compiler builds dub as well.

I am happy to support this arrangement of FLAVORS.

With the ldc FLAVOR, I am able to produce a working version of dub that passes all tests but one (due to an OOM error, not terribly uncommon for D unfortunately). The dub+ldc combo works just as well as dub+dmd and dub+gdc for me.

For now, this ldc FLAVOR is ONLY_FOR_ARCHS=amd64 because the ldc port is marked the same.

OK? (Once lang/ldc is committed, of course.)

~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/dub/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile	19 Oct 2021 13:35:27 -0000	1.1.1.1
+++ Makefile	21 Oct 2021 01:04:15 -0000
@@ -12,7 +12,7 @@ MAINTAINER =	Brian Callahan <bcallah@ope
 # MIT
 PERMIT_PACKAGE =	Yes
 
-FLAVORS =	dmd
+FLAVORS =	dmd ldc
 FLAVOR ?=
 
 .if ${FLAVOR:Mdmd}
@@ -26,6 +26,17 @@ RUN_DEPENDS =	lang/dmd
 
 DC =	${LOCALBASE}/bin/dmd
 DMD =	${LOCALBASE}/bin/dmd
+.elif ${FLAVOR:Mldc}
+ONLY_FOR_ARCHS =	amd64
+
+WANTLIB += c c++abi m pthread
+
+BUILD_DEPENDS =	${RUN_DEPENDS}
+
+RUN_DEPENDS =	lang/ldc
+
+DC =	${LOCALBASE}/bin/ldmd2
+DMD =	${LOCALBASE}/bin/ldmd2
 .else
 WANTLIB += c m pthread
 

Reply via email to