git: 07b93079da18 - main - lang/elixir-devel: remove hard dependency on erlang24

From: Dave Cottlehuber <dch_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 20:08:51 UTC
The branch main has been updated by dch:

URL: https://cgit.FreeBSD.org/ports/commit/?id=07b93079da18867999e5874fc96afc3b7cf27d15

commit 07b93079da18867999e5874fc96afc3b7cf27d15
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2022-06-17 18:46:28 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2022-06-17 20:04:53 +0000

    lang/elixir-devel: remove hard dependency on erlang24
    
    Since moving from OTP21 as default OTP in lang/erlang, to OTP24,
    we no longer have incompatible bytecode versions between default
    erlang and newer builds. Thus, there is no reason to hard-wire
    the dependency when a simple PATH will work as expected.
    
    Remove broken SRC as build option.
    
    PR:             264046
    PR:             257235
    Reported by:    Pat Maddox <pat@patmaddox.com>
    Sponsored by:   SkunkWerks, GmbH
---
 lang/elixir-devel/Makefile    | 14 +++-----------
 lang/elixir-devel/pkg-message | 20 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/lang/elixir-devel/Makefile b/lang/elixir-devel/Makefile
index 83c2d479b986..d55150436702 100644
--- a/lang/elixir-devel/Makefile
+++ b/lang/elixir-devel/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	elixir
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.13.4
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES+=	https://github.com/elixir-lang/elixir/releases/download/${DISTVERSIONPREFIX}${PORTVERSION}/:doc
 PKGNAMESUFFIX=	-devel
@@ -13,7 +14,6 @@ COMMENT=	Functional, meta-programming aware language built on top of Erlang VM
 LICENSE=	APACHE20
 
 BUILD_DEPENDS=	erlang-runtime${ERLANG_VER}>0:lang/erlang-runtime${ERLANG_VER}
-RUN_DEPENDS=	erlang-runtime${ERLANG_VER}>0:lang/erlang-runtime${ERLANG_VER}
 
 USES=		gmake
 
@@ -30,12 +30,9 @@ NO_ARCH=	yes
 MAKE_ENV+=	MAN_PREFIX=${PREFIX}/man \
 		PATH="${LOCALBASE}/lib/erlang${ERLANG_VER}/bin:${PATH}"
 
-OPTIONS_DEFINE=		DOCS SRC
-OPTIONS_DEFAULT=	DOCS SRC
+OPTIONS_DEFINE=		DOCS
 OPTIONS_SUB=		yes
 
-SRC_DESC=	Install source code
-
 ERLANG_VER=	24
 
 .include <bsd.port.options.mk>
@@ -43,17 +40,12 @@ ERLANG_VER=	24
 post-extract:
 	@${FIND} ${WRKDIR}/doc -name .build -delete
 
-post-patch:
-#	hard-wire elixir to the OTP version is was compiled with
-	@${REINPLACE_CMD} -e \
-		's|^ERTS_BIN=.*$$|ERTS_BIN=${PREFIX}/lib/erlang${ERLANG_VER}/bin/|' \
-		${WRKSRC}/bin/elixir
 
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKDIR}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}
 
-post-install-SRC-on:
+post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/elixir/lib
 	cd ${WRKSRC}/lib/ && for lib in *; do \
 		${MKDIR} ${STAGEDIR}${PREFIX}/lib/elixir/lib/$${lib}/lib; \
diff --git a/lang/elixir-devel/pkg-message b/lang/elixir-devel/pkg-message
new file mode 100644
index 000000000000..7b969028d8d3
--- /dev/null
+++ b/lang/elixir-devel/pkg-message
@@ -0,0 +1,20 @@
+[
+{ type: install
+  message: <<EOM
+Elixir requires a compatible Erlang/OTP runtime. Ensure that you have
+one of the following installed:
+
+- lang/erlang
+- lang/erlang-runtime24 or newer
+EOM
+}
+{ type: upgrade
+  message: <<EOM
+Elixir requires a compatible Erlang/OTP runtime. Ensure that you have
+one of the following installed:
+
+- lang/erlang
+- lang/erlang-runtime24 or newer
+EOM
+}
+]