add erlang version suffix to binary name so both flavors can be installed alongside
This commit is contained in:
parent
60ebf83f4f
commit
c480fb993d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2015/06/23 16:38:10 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2015/06/25 13:18:41 jasper Exp $
|
||||
|
||||
COMMENT= Erlang build tool
|
||||
|
||||
@ -6,7 +6,7 @@ GH_ACCOUNT= rebar
|
||||
GH_PROJECT= rebar
|
||||
GH_TAGNAME= 2.5.1
|
||||
DISTNAME= ${GH_PROJECT}-${GH_TAGNAME}
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
CATEGORIES= devel lang/erlang
|
||||
|
||||
@ -22,17 +22,24 @@ FLAVOR ?= erlang16
|
||||
|
||||
.if ${FLAVOR:Merlang16}
|
||||
RUN_DEPENDS = lang/erlang/16
|
||||
ERL_VERSION = 16
|
||||
.elif ${FLAVOR:Merlang17}
|
||||
RUN_DEPENDS = lang/erlang/17
|
||||
ERL_VERSION = 17
|
||||
.else
|
||||
ERRORS += "Invalid FLAVOR set: ${FLAVOR}"
|
||||
.endif
|
||||
|
||||
BUILD_DEPENDS= ${RUN_DEPENDS}
|
||||
BUILD_DEPENDS += ${RUN_DEPENDS}
|
||||
|
||||
SUBST_VARS += ERL_VERSION
|
||||
|
||||
NO_TEST= Yes
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/bootstrap ${WRKSRC}/src/rebar_escripter.erl
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/rebar ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/rebar ${PREFIX}/bin/rebar${ERL_VERSION}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
9
devel/rebar/patches/patch-bootstrap
Normal file
9
devel/rebar/patches/patch-bootstrap
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-bootstrap,v 1.1 2015/06/25 13:18:41 jasper Exp $
|
||||
--- bootstrap.orig Wed Jul 30 19:37:49 2014
|
||||
+++ bootstrap Thu Jun 25 10:45:11 2015
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env escript
|
||||
+#!/usr/bin/env escript${ERL_VERSION}
|
||||
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
|
||||
%% ex: ft=erlang ts=4 sw=4 et
|
||||
|
12
devel/rebar/patches/patch-src_rebar_escripter_erl
Normal file
12
devel/rebar/patches/patch-src_rebar_escripter_erl
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_rebar_escripter_erl,v 1.1 2015/06/25 13:18:41 jasper Exp $
|
||||
--- src/rebar_escripter.erl.orig Thu Jun 25 10:54:14 2015
|
||||
+++ src/rebar_escripter.erl Thu Jun 25 10:54:35 2015
|
||||
@@ -71,7 +71,7 @@ escriptize(Config0, AppFile) ->
|
||||
%% Archive was successfully created. Prefix that binary with our
|
||||
%% header and write to our escript file
|
||||
Shebang = rebar_config:get(Config, escript_shebang,
|
||||
- "#!/usr/bin/env escript\n"),
|
||||
+ "#!/usr/bin/env escript${ERL_VERSION}\n"),
|
||||
Comment = rebar_config:get(Config, escript_comment, "%%\n"),
|
||||
DefaultEmuArgs = ?FMT("%%! -pa ~s/~s/ebin\n",
|
||||
[AppNameStr, AppNameStr]),
|
@ -1,2 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/07/07 14:28:59 jasper Exp $
|
||||
bin/rebar
|
||||
@comment $OpenBSD: PLIST,v 1.2 2015/06/25 13:18:41 jasper Exp $
|
||||
@option no-default-conflict
|
||||
@conflict rebar-<2.5.1p2
|
||||
bin/rebar${ERL_VERSION}
|
||||
|
Loading…
x
Reference in New Issue
Block a user