OK sthen@
On 2018/03/18 09:07, Bill Karh wrote: > Ports, > > Here's a patch to help the erlang tools find their versioned selves. Before > the patch a simple command line compile would fail: > > $ erlc16 user_default.erl > erlc: Error 2 executing 'erl'. > > With this patch: > $ erlc16 user_default.erl > > (it works) > > Tested on amd64 for erlang16 through erlang19. No problems building rebar, > tsung, or erl-mochiweb with this patch. > > Thanks, > Bill Karh > Index: Makefile.inc > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/Makefile.inc,v > retrieving revision 1.15 > diff -u -p -r1.15 Makefile.inc > --- Makefile.inc 9 Dec 2017 21:28:58 -0000 1.15 > +++ Makefile.inc 13 Mar 2018 17:03:28 -0000 > @@ -78,7 +78,13 @@ gen-versions: extract > > pre-configure: > ${SUBST_CMD} ${WRKSRC}/make/install_bin \ > + ${WRKSRC}/Makefile.in \ > + ${WRKSRC}/erts/etc/common/ct_run.c \ > + ${WRKSRC}/erts/etc/common/dialyzer.c \ > + ${WRKSRC}/erts/etc/common/erlc.c \ > ${WRKSRC}/erts/etc/common/escript.c \ > + ${WRKSRC}/erts/etc/common/typer.c \ > + ${WRKSRC}/lib/dialyzer/src/dialyzer_plt.erl \ > ${WRKSRC}/lib/wx/configure.in > > post-install: > Index: 16/Makefile > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/16/Makefile,v > retrieving revision 1.19 > diff -u -p -r1.19 Makefile > --- 16/Makefile 9 Dec 2017 21:28:58 -0000 1.19 > +++ 16/Makefile 3 Mar 2018 19:46:00 -0000 > @@ -12,7 +12,7 @@ DISTNAME= otp_src_${V} > PKGNAME-main= erlang-16b.03 > PKGNAME-wx= erlang-wx-16b.03 > > -REVISION-main= 13 > +REVISION-main= 14 > REVISION-wx= 2 > > VERSION_SPEC= >=16v0,<17v0 > Index: 16/patches/patch-Makefile_in > =================================================================== > RCS file: 16/patches/patch-Makefile_in > diff -N 16/patches/patch-Makefile_in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-Makefile_in 15 Mar 2018 17:01:52 -0000 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > + > +Create symlink so the build can handle versioned binaries > + > +Index: Makefile.in > +--- Makefile.in.orig > ++++ Makefile.in > +@@ -516,6 +516,7 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/e > + $(ERL_TOP)/erts/etc/unix/erl.src.src > \ > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > + @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > ++ @(cd $(BOOTSTRAP_ROOT)/bootstrap/bin && $(LN_S) ./erl erl${MAJ_V}) > + > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc > $(BOOTSTRAP_ROOT)/bootstrap/target > + @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc > Index: 16/patches/patch-erts_etc_common_ct_run_c > =================================================================== > RCS file: 16/patches/patch-erts_etc_common_ct_run_c > diff -N 16/patches/patch-erts_etc_common_ct_run_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-erts_etc_common_ct_run_c 15 Mar 2018 16:56:42 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang test runner handle versioned binaries. > + > +Index: erts/etc/common/ct_run.c > +--- erts/etc/common/ct_run.c.orig > ++++ erts/etc/common/ct_run.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 16/patches/patch-erts_etc_common_dialyzer_c > =================================================================== > RCS file: 16/patches/patch-erts_etc_common_dialyzer_c > diff -N 16/patches/patch-erts_etc_common_dialyzer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-erts_etc_common_dialyzer_c 15 Mar 2018 16:56:08 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let static analyzer handle versioned binaries. > + > +Index: erts/etc/common/dialyzer.c > +--- erts/etc/common/dialyzer.c.orig > ++++ erts/etc/common/dialyzer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 16/patches/patch-erts_etc_common_erlc_c > =================================================================== > RCS file: 16/patches/patch-erts_etc_common_erlc_c > diff -N 16/patches/patch-erts_etc_common_erlc_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-erts_etc_common_erlc_c 15 Mar 2018 16:55:01 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang compiler handle versioned binaries. > + > +Index: erts/etc/common/erlc.c > +--- erts/etc/common/erlc.c.orig > ++++ erts/etc/common/erlc.c > +@@ -52,7 +52,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 16/patches/patch-erts_etc_common_typer_c > =================================================================== > RCS file: 16/patches/patch-erts_etc_common_typer_c > diff -N 16/patches/patch-erts_etc_common_typer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-erts_etc_common_typer_c 15 Mar 2018 16:57:52 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang type inspection handle versioned binaries. > + > +Index: erts/etc/common/typer.c > +--- erts/etc/common/typer.c.orig > ++++ erts/etc/common/typer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 16/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > =================================================================== > RCS file: 16/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > diff -N 16/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 16/patches/patch-lib_dialyzer_src_dialyzer_plt_erl 15 Mar 2018 > 17:12:37 -0000 > @@ -0,0 +1,17 @@ > +$OpenBSD$ > + > +Prevent collisions during static analysis when multiple versions of > +erlang are installed > + > +Index: lib/dialyzer/src/dialyzer_plt.erl > +--- lib/dialyzer/src/dialyzer_plt.erl.orig > ++++ lib/dialyzer/src/dialyzer_plt.erl > +@@ -231,7 +231,7 @@ get_default_plt() -> > + false -> > + plt_error("The HOME environment variable needs to be set " ++ > + "so that Dialyzer knows where to find the default PLT"); > +- HomeDir -> filename:join(HomeDir, ".dialyzer_plt") > ++ HomeDir -> filename:join(HomeDir, ".dialyzer${MAJ_V}_plt") > + end; > + UserSpecPlt -> UserSpecPlt > + end. > Index: 17/Makefile > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/17/Makefile,v > retrieving revision 1.19 > diff -u -p -r1.19 Makefile > --- 17/Makefile 9 Dec 2017 21:28:58 -0000 1.19 > +++ 17/Makefile 3 Mar 2018 19:46:00 -0000 > @@ -12,7 +12,7 @@ DISTNAME= otp_src_$V > PKGNAME-main= erlang-$V > PKGNAME-wx= erlang-wx-$V > > -REVISION-main= 9 > +REVISION-main= 10 > REVISION-wx= 2 > > VERSION_SPEC= >=17v0,<18v0 > Index: 17/patches/patch-Makefile_in > =================================================================== > RCS file: 17/patches/patch-Makefile_in > diff -N 17/patches/patch-Makefile_in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-Makefile_in 16 Mar 2018 03:26:45 -0000 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > + > +Create symlink so the build can handle versioned binaries > + > +Index: Makefile.in > +--- Makefile.in.orig > ++++ Makefile.in > +@@ -528,6 +528,7 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/e > + $(ERL_TOP)/erts/etc/unix/erl.src.src > \ > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > + @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > ++ @(cd $(BOOTSTRAP_ROOT)/bootstrap/bin && $(LN_S) ./erl erl${MAJ_V}) > + > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc > $(BOOTSTRAP_ROOT)/bootstrap/target > + @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc > Index: 17/patches/patch-erts_etc_common_ct_run_c > =================================================================== > RCS file: 17/patches/patch-erts_etc_common_ct_run_c > diff -N 17/patches/patch-erts_etc_common_ct_run_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-erts_etc_common_ct_run_c 16 Mar 2018 03:27:04 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang test runner handle versioned binaries. > + > +Index: erts/etc/common/ct_run.c > +--- erts/etc/common/ct_run.c.orig > ++++ erts/etc/common/ct_run.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 17/patches/patch-erts_etc_common_dialyzer_c > =================================================================== > RCS file: 17/patches/patch-erts_etc_common_dialyzer_c > diff -N 17/patches/patch-erts_etc_common_dialyzer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-erts_etc_common_dialyzer_c 16 Mar 2018 03:27:17 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let static analyzer handle versioned binaries. > + > +Index: erts/etc/common/dialyzer.c > +--- erts/etc/common/dialyzer.c.orig > ++++ erts/etc/common/dialyzer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 17/patches/patch-erts_etc_common_erlc_c > =================================================================== > RCS file: 17/patches/patch-erts_etc_common_erlc_c > diff -N 17/patches/patch-erts_etc_common_erlc_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-erts_etc_common_erlc_c 16 Mar 2018 03:27:41 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang compiler handle versioned binaries. > + > +Index: erts/etc/common/erlc.c > +--- erts/etc/common/erlc.c.orig > ++++ erts/etc/common/erlc.c > +@@ -52,7 +52,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 17/patches/patch-erts_etc_common_typer_c > =================================================================== > RCS file: 17/patches/patch-erts_etc_common_typer_c > diff -N 17/patches/patch-erts_etc_common_typer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-erts_etc_common_typer_c 16 Mar 2018 03:28:01 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang type inspection handle versioned binaries. > + > +Index: erts/etc/common/typer.c > +--- erts/etc/common/typer.c.orig > ++++ erts/etc/common/typer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 17/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > =================================================================== > RCS file: 17/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > diff -N 17/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 17/patches/patch-lib_dialyzer_src_dialyzer_plt_erl 16 Mar 2018 > 03:28:24 -0000 > @@ -0,0 +1,17 @@ > +$OpenBSD$ > + > +Prevent collisions during static analysis when multiple versions of > +erlang are installed > + > +Index: lib/dialyzer/src/dialyzer_plt.erl > +--- lib/dialyzer/src/dialyzer_plt.erl.orig > ++++ lib/dialyzer/src/dialyzer_plt.erl > +@@ -231,7 +231,7 @@ get_default_plt() -> > + false -> > + plt_error("The HOME environment variable needs to be set " ++ > + "so that Dialyzer knows where to find the default PLT"); > +- HomeDir -> filename:join(HomeDir, ".dialyzer_plt") > ++ HomeDir -> filename:join(HomeDir, ".dialyzer${MAJ_V}_plt") > + end; > + UserSpecPlt -> UserSpecPlt > + end. > Index: 17/pkg/PLIST-main > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/17/pkg/PLIST-main,v > retrieving revision 1.3 > diff -u -p -r1.3 PLIST-main > --- 17/pkg/PLIST-main 29 Jun 2016 16:14:41 -0000 1.3 > +++ 17/pkg/PLIST-main 3 Mar 2018 19:46:00 -0000 > @@ -4558,7 +4558,7 @@ lib/erlang${SYSTEM_VSN}/lib/${XMERL}/src > lib/erlang${SYSTEM_VSN}/lib/${XMERL}/src/xmerl_xs.erl > lib/erlang${SYSTEM_VSN}/lib/${XMERL}/src/xmerl_xsd.erl > lib/erlang${SYSTEM_VSN}/lib/${XMERL}/src/xmerl_xsd_type.erl > -@comment lib/erlang${SYSTEM_VSN}/man/ > +lib/erlang${SYSTEM_VSN}/man/ > lib/erlang${SYSTEM_VSN}/man/man1/ > @man lib/erlang${SYSTEM_VSN}/man/man1/cdv.1 > @man lib/erlang${SYSTEM_VSN}/man/man1/ct_run.1 > Index: 18/Makefile > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/18/Makefile,v > retrieving revision 1.15 > diff -u -p -r1.15 Makefile > --- 18/Makefile 9 Dec 2017 21:28:58 -0000 1.15 > +++ 18/Makefile 3 Mar 2018 19:48:22 -0000 > @@ -12,7 +12,7 @@ DISTNAME= otp_src_$V > PKGNAME-main= erlang-$V > PKGNAME-wx= erlang-wx-$V > > -REVISION-main= 4 > +REVISION-main= 5 > REVISION-wx= 2 > > VERSION_SPEC= >=18v0,<19v0 > Index: 18/patches/patch-Makefile_in > =================================================================== > RCS file: 18/patches/patch-Makefile_in > diff -N 18/patches/patch-Makefile_in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-Makefile_in 16 Mar 2018 04:30:04 -0000 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > + > +Create symlink so the build can handle versioned binaries > + > +Index: Makefile.in > +--- Makefile.in.orig > ++++ Makefile.in > +@@ -528,6 +528,7 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/e > + $(ERL_TOP)/erts/etc/unix/erl.src.src > \ > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > + @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > ++ @(cd $(BOOTSTRAP_ROOT)/bootstrap/bin && $(LN_S) ./erl erl${MAJ_V}) > + > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc > $(BOOTSTRAP_ROOT)/bootstrap/target > + @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc > Index: 18/patches/patch-erts_etc_common_ct_run_c > =================================================================== > RCS file: 18/patches/patch-erts_etc_common_ct_run_c > diff -N 18/patches/patch-erts_etc_common_ct_run_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-erts_etc_common_ct_run_c 16 Mar 2018 04:30:26 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang test runner handle versioned binaries. > + > +Index: erts/etc/common/ct_run.c > +--- erts/etc/common/ct_run.c.orig > ++++ erts/etc/common/ct_run.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 18/patches/patch-erts_etc_common_dialyzer_c > =================================================================== > RCS file: 18/patches/patch-erts_etc_common_dialyzer_c > diff -N 18/patches/patch-erts_etc_common_dialyzer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-erts_etc_common_dialyzer_c 16 Mar 2018 04:30:43 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let static analyzer handle versioned binaries. > + > +Index: erts/etc/common/dialyzer.c > +--- erts/etc/common/dialyzer.c.orig > ++++ erts/etc/common/dialyzer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 18/patches/patch-erts_etc_common_erlc_c > =================================================================== > RCS file: 18/patches/patch-erts_etc_common_erlc_c > diff -N 18/patches/patch-erts_etc_common_erlc_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-erts_etc_common_erlc_c 16 Mar 2018 04:31:03 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang compiler handle versioned binaries. > + > +Index: erts/etc/common/erlc.c > +--- erts/etc/common/erlc.c.orig > ++++ erts/etc/common/erlc.c > +@@ -52,7 +52,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 18/patches/patch-erts_etc_common_typer_c > =================================================================== > RCS file: 18/patches/patch-erts_etc_common_typer_c > diff -N 18/patches/patch-erts_etc_common_typer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-erts_etc_common_typer_c 16 Mar 2018 04:33:00 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang type inspection handle versioned binaries. > + > +Index: erts/etc/common/typer.c > +--- erts/etc/common/typer.c.orig > ++++ erts/etc/common/typer.c > +@@ -49,7 +49,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 18/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > =================================================================== > RCS file: 18/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > diff -N 18/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 18/patches/patch-lib_dialyzer_src_dialyzer_plt_erl 16 Mar 2018 > 04:33:27 -0000 > @@ -0,0 +1,17 @@ > +$OpenBSD$ > + > +Prevent collisions during static analysis when multiple versions of > +erlang are installed > + > +Index: lib/dialyzer/src/dialyzer_plt.erl > +--- lib/dialyzer/src/dialyzer_plt.erl.orig > ++++ lib/dialyzer/src/dialyzer_plt.erl > +@@ -231,7 +231,7 @@ get_default_plt() -> > + false -> > + plt_error("The HOME environment variable needs to be set " ++ > + "so that Dialyzer knows where to find the default PLT"); > +- HomeDir -> filename:join(HomeDir, ".dialyzer_plt") > ++ HomeDir -> filename:join(HomeDir, ".dialyzer${MAJ_V}_plt") > + end; > + UserSpecPlt -> UserSpecPlt > + end. > Index: 19/Makefile > =================================================================== > RCS file: /depot/cvs/openbsd/ports/lang/erlang/19/Makefile,v > retrieving revision 1.9 > diff -u -p -r1.9 Makefile > --- 19/Makefile 9 Dec 2017 21:28:58 -0000 1.9 > +++ 19/Makefile 3 Mar 2018 19:46:00 -0000 > @@ -13,7 +13,7 @@ PKGNAME-main= erlang-$V > PKGNAME-wx= erlang-wx-$V > REVISION-wx= 0 > > -REVISION-main= 2 > +REVISION-main= 3 > > VERSION_SPEC= >=19v0,<20v0 > PKGSPEC-main= erlang-${VERSION_SPEC} > Index: 19/patches/patch-Makefile_in > =================================================================== > RCS file: 19/patches/patch-Makefile_in > diff -N 19/patches/patch-Makefile_in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-Makefile_in 16 Mar 2018 04:37:16 -0000 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > + > +Create symlink so the build can handle versioned binaries > + > +Index: Makefile.in > +--- Makefile.in.orig > ++++ Makefile.in > +@@ -529,6 +529,7 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/e > + $(ERL_TOP)/erts/etc/unix/erl.src.src > \ > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > + @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl > ++ @(cd $(BOOTSTRAP_ROOT)/bootstrap/bin && $(LN_S) ./erl erl${MAJ_V}) > + > + $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc > $(BOOTSTRAP_ROOT)/bootstrap/target > + @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc > Index: 19/patches/patch-erts_etc_common_ct_run_c > =================================================================== > RCS file: 19/patches/patch-erts_etc_common_ct_run_c > diff -N 19/patches/patch-erts_etc_common_ct_run_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-erts_etc_common_ct_run_c 16 Mar 2018 04:37:34 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang test runner handle versioned binaries. > + > +Index: erts/etc/common/ct_run.c > +--- erts/etc/common/ct_run.c.orig > ++++ erts/etc/common/ct_run.c > +@@ -50,7 +50,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 19/patches/patch-erts_etc_common_dialyzer_c > =================================================================== > RCS file: 19/patches/patch-erts_etc_common_dialyzer_c > diff -N 19/patches/patch-erts_etc_common_dialyzer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-erts_etc_common_dialyzer_c 16 Mar 2018 04:38:50 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let static analyzer handle versioned binaries. > + > +Index: erts/etc/common/dialyzer.c > +--- erts/etc/common/dialyzer.c.orig > ++++ erts/etc/common/dialyzer.c > +@@ -50,7 +50,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 19/patches/patch-erts_etc_common_erlc_c > =================================================================== > RCS file: 19/patches/patch-erts_etc_common_erlc_c > diff -N 19/patches/patch-erts_etc_common_erlc_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-erts_etc_common_erlc_c 16 Mar 2018 04:39:09 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang compiler handle versioned binaries. > + > +Index: erts/etc/common/erlc.c > +--- erts/etc/common/erlc.c.orig > ++++ erts/etc/common/erlc.c > +@@ -53,7 +53,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 19/patches/patch-erts_etc_common_typer_c > =================================================================== > RCS file: 19/patches/patch-erts_etc_common_typer_c > diff -N 19/patches/patch-erts_etc_common_typer_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-erts_etc_common_typer_c 16 Mar 2018 04:39:27 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Let erlang type inspection handle versioned binaries. > + > +Index: erts/etc/common/typer.c > +--- erts/etc/common/typer.c.orig > ++++ erts/etc/common/typer.c > +@@ -50,7 +50,7 @@ static int eargc; /* Number of arguments in > eargv. */ > + #else > + # define QUOTE(s) s > + # define IS_DIRSEP(c) ((c) == '/') > +-# define ERL_NAME "erl" > ++# define ERL_NAME "erl${MAJ_V}" > + #endif > + > + #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s) > Index: 19/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > =================================================================== > RCS file: 19/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > diff -N 19/patches/patch-lib_dialyzer_src_dialyzer_plt_erl > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ 19/patches/patch-lib_dialyzer_src_dialyzer_plt_erl 16 Mar 2018 > 04:40:05 -0000 > @@ -0,0 +1,17 @@ > +$OpenBSD$ > + > +Prevent collisions during static analysis when multiple versions of > +erlang are installed > + > +Index: lib/dialyzer/src/dialyzer_plt.erl > +--- lib/dialyzer/src/dialyzer_plt.erl.orig > ++++ lib/dialyzer/src/dialyzer_plt.erl > +@@ -235,7 +235,7 @@ get_default_plt() -> > + case os:getenv("DIALYZER_PLT") of > + false -> > + {ok,[[HomeDir]]} = init:get_argument(home), > +- filename:join(HomeDir, ".dialyzer_plt"); > ++ filename:join(HomeDir, ".dialyzer${MAJ_V}_plt"); > + UserSpecPlt -> UserSpecPlt > + end. > +