git: 6bf96e519271 - main - www/p5-RTx-Calendar: Add FLAVORS: rt44 rt50

From: Neel Chauhan <nc_at_FreeBSD.org>
Date: Wed, 16 Mar 2022 19:28:49 UTC
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6bf96e519271610c2d5b0395e6d47ae34ecacc38

commit 6bf96e519271610c2d5b0395e6d47ae34ecacc38
Author:     David Siebörger <drs-freebsd@sieborger.nom.za>
AuthorDate: 2022-03-16 19:28:25 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-03-16 19:28:25 +0000

    www/p5-RTx-Calendar: Add FLAVORS: rt44 rt50
    
    PR:     262565
---
 www/p5-RTx-Calendar/Makefile | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/www/p5-RTx-Calendar/Makefile b/www/p5-RTx-Calendar/Makefile
index 0966ab06e1cd..b9361516f469 100644
--- a/www/p5-RTx-Calendar/Makefile
+++ b/www/p5-RTx-Calendar/Makefile
@@ -22,10 +22,21 @@ RUN_DEPENDS=	p5-Date-ICal>0:devel/p5-Date-ICal      \
 		p5-DateTime-Set>0:devel/p5-DateTime-Set \
 		${LOCALBASE}/bin/rt:www/rt${RT_VER}
 
-USES=		perl5
-USE_PERL5=	configure
+FLAVOR?=	${FLAVORS:[1]}
+FLAVORS=	rt44 rt50
+rt44_PKGNAMEPREFIX=	p5-RT44-
+rt44_CONFLICTS_INSTALL= rt50
+rt50_PKGNAMEPREFIX=	p5-RT50-
+rt50_CONFLICTS_INSTALL= rt44
 
+.if ${FLAVOR} == rt44
 RT_VER=		44
+.elif ${FLAVOR} == rt50
+RT_VER=		50
+.endif
+
+USES=		perl5
+USE_PERL5=	configure
 
 NO_ARCH=	yes
 
@@ -35,7 +46,7 @@ post-patch:
 	@${FIND} ${WRKSRC} -name '*.orig' -delete
 
 # Note: You can install using an arbitrary $PREFIX but only if it
-# matches the $PREFIX used to install www/rt44.  Hence ignore
+# matches the $PREFIX used to install www/rt{44,50}.  Hence ignore
 # $PREFIX in the environment and inherit settings from RT.pm
 do-configure:
 	@cd ${CONFIGURE_WRKSRC} && \