Saturday, January 14, 2023

Re: Opinions - Multiple versions of lang/erlang needed?

On 2023/01/14 10:52, Volker Schlecht wrote:
> I never tried to submit a patch for dropping something, but
> here's an honest attempt - of course devel/rebar needs to be
> dropped as well, since it depends on erlang21.
>
> I validated the changed erlang.port.mk by rebuilding elixir,
> rebar3 and rabbitmq, which worked without problem.
>
> On 1/14/23 00:03, Antoine Jacoutot wrote:
> > I would love to remove erlang 21. It's in the way of the wxWidgets update.

Looks good to me, we will also need quirks/@pkgpath markers to handle
updates from 21 to 25 but whoever commits can do that.

Any objections?

> > —
> > Antoine
> >
> > > On 13 Jan 2023, at 20:08, Volker Schlecht <openbsd-ports@schlecht.dev> wrote:
> > >
> > > Hi,
> > >
> > > with database/riak not in ports anymore, we don't have a present need to keep erlang/21 and, for that matter, devel/rebar around any longer.
> > > What's the general opinion about keeping the infrastructure for multiple versions of erlang around? Is that generally still desirable or has it outlived its usefulness?
> > >
> > > regards,
> > > Volker
> > >
> >

> Index: Makefile
> ===================================================================
> RCS file: Makefile
> diff -N Makefile
> --- Makefile 11 Mar 2022 18:53:09 -0000 1.27
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,41 +0,0 @@
> -COMMENT= Erlang build tool
> -
> -GH_TAGNAME= 2.6.4
> -GH_ACCOUNT= rebar
> -GH_PROJECT= rebar
> -FULLPKGNAME = rebar${ERL_VERSION}-${GH_TAGNAME}
> -REVISION = 2
> -
> -CATEGORIES= devel lang/erlang
> -
> -HOMEPAGE= https://github.com/rebar/rebar
> -
> -# APLv2
> -PERMIT_PACKAGE= Yes
> -
> -# This port cannot use the erlang module for the module depends on this port.
> -# Keep in sync with erlang.port.mk
> -FLAVORS = erlang21
> -FLAVOR ?= erlang21
> -
> -.if ${FLAVOR:Merlang21}}
> -_EV = ${FLAVOR:C/.*([0-9][0-9]+\$)/\1/}
> -RUN_DEPENDS = lang/erlang/${_EV}
> -ERL_VERSION = ${_EV}
> -.else
> -ERRORS += "Invalid FLAVOR set: ${FLAVOR}"
> -.endif
> -
> -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/rebar${ERL_VERSION}
> -
> -.include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: distinfo
> diff -N distinfo
> --- distinfo 28 Jan 2019 20:44:21 -0000 1.9
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,2 +0,0 @@
> -SHA256 (rebar-2.6.4.tar.gz) = V3JGuvousrLD8dDBV0CGUERohFVb+HkBUIznHVzAvQc=
> -SIZE (rebar-2.6.4.tar.gz) = 213158
> Index: patches/patch-bootstrap
> ===================================================================
> RCS file: patches/patch-bootstrap
> diff -N patches/patch-bootstrap
> --- patches/patch-bootstrap 11 Mar 2022 18:53:09 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,8 +0,0 @@
> ---- 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
> -
> Index: patches/patch-src_rebar_escripter_erl
> ===================================================================
> RCS file: patches/patch-src_rebar_escripter_erl
> diff -N patches/patch-src_rebar_escripter_erl
> --- patches/patch-src_rebar_escripter_erl 11 Mar 2022 18:53:09 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,15 +0,0 @@
> -Index: src/rebar_escripter.erl
> ---- src/rebar_escripter.erl.orig
> -+++ src/rebar_escripter.erl
> -@@ -71,9 +71,9 @@ 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",
> -+ DefaultEmuArgs = ?FMT("%%! -escript main rebar -pa ~s/~s/ebin\n",
> - [AppNameStr, AppNameStr]),
> - EmuArgs = rebar_config:get(Config, escript_emu_args,
> - DefaultEmuArgs),
> Index: pkg/DESCR
> ===================================================================
> RCS file: pkg/DESCR
> diff -N pkg/DESCR
> --- pkg/DESCR 7 Jul 2012 14:28:59 -0000 1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,5 +0,0 @@
> -rebar is an Erlang build tool that makes it easy to compile and test
> -Erlang applications, port drivers and releases.
> -
> -For more information on using rebar, please have a look at the
> -documentation on the wiki provided at the homepage.
> Index: pkg/PLIST
> ===================================================================
> RCS file: pkg/PLIST
> diff -N pkg/PLIST
> --- pkg/PLIST 11 Mar 2022 18:53:09 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,3 +0,0 @@
> -@option no-default-conflict
> -@conflict rebar-<2.5.1p2
> -bin/rebar${ERL_VERSION}

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/erlang/Makefile,v
> retrieving revision 1.74
> diff -u -p -r1.74 Makefile
> --- Makefile 12 Jul 2022 20:45:15 -0000 1.74
> +++ Makefile 14 Jan 2023 09:50:22 -0000
> @@ -1,5 +1,4 @@
> SUBDIR =
> - SUBDIR += 21
> SUBDIR += 25
>
> .include <bsd.port.subdir.mk>
> Index: erlang.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/erlang/erlang.port.mk,v
> retrieving revision 1.30
> diff -u -p -r1.30 erlang.port.mk
> --- erlang.port.mk 31 Jul 2022 12:17:26 -0000 1.30
> +++ erlang.port.mk 14 Jan 2023 09:50:22 -0000
> @@ -20,36 +20,21 @@ FLAVOR?= # empty
>
> # When no flavor is explicitly set, assume MODERL_DEFAULT_VERSION
> .if ${FLAVOR:Merlang21}
> -MODERL_VERSION = 21
> -_MODERL_FLAVOR = ${FLAVOR}
> +ERRORS += "Invalid FLAVOR set: ${FLAVOR}."
> .else
> MODERL_VERSION ?= ${MODERL_DEFAULT_VERSION}
> _MODERL_FLAVOR ?= # empty
> .endif
>
> -.if ${MODERL_VERSION} == 21
> -_MODERL_FLAVOR = erlang21
> -.elif ${MODERL_VERSION} == 25
> +.if ${MODERL_VERSION} == 25
> _MODERL_FLAVOR = erlang25
> .else
> ERRORS += "Invalid MODERL_VERSION set: ${MODERL_VERSION}."
> .endif
>
> -# If no configure style is set, then assume "rebar"
> -.if ${CONFIGURE_STYLE} == "" && ${MODERL_VERSION} == 21
> -CONFIGURE_STYLE = rebar
> -.endif
> -
> -.if ${CONFIGURE_STYLE} == "" && ${MODERL_VERSION} >= 25
> +# If no configure style is set, then assume "rebar3"
> +.if ${CONFIGURE_STYLE} == ""
> CONFIGURE_STYLE = rebar3
> -.endif
> -
> -.if ${CONFIGURE_STYLE} == "rebar"
> -MODERL_BUILD_DEPENDS += devel/rebar
> -REBAR_BIN ?= ${LOCALBASE}/bin/rebar${MODERL_VERSION}
> -# Make sure rebar gets called as 'rebar', otherwise escript tries to call the
> -# binary name (e.g. rebar21) as the script entrypoint.
> -_MODERL_LINKS += rebar${MODERL_VERSION} rebar
> .endif
>
> .if ${CONFIGURE_STYLE} == "rebar3"
> Index: 21/Makefile
> ===================================================================
> RCS file: 21/Makefile
> diff -N 21/Makefile
> --- 21/Makefile 7 Nov 2022 22:24:47 -0000 1.14
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,92 +0,0 @@
> -BROKEN-alpha= beam/erl_process.c:6692: internal compiler error: in final_scan_insn, at final.c:2449
> -
> -COMMENT-main= ${COMMENT}
> -COMMENT-wx= WxWidgets bindings for Erlang
> -
> -PORTROACH= limit:^OTP-21\.
> -
> -V= 21.3.8.24
> -DISTNAME= otp_src_$V
> -PKGNAME= erlang-$V
> -PKGNAME-main= erlang-$V
> -PKGNAME-wx= erlang-wx-$V
> -EPOCH= 0
> -
> -REVISION-main= 2
> -REVISION-wx= 1
> -
> -VERSION_SPEC= >=21v0,<22v0
> -PKGSPEC-main= erlang-${VERSION_SPEC}
> -PKGSPEC-wx= erlang-wx-${VERSION_SPEC}
> -
> -BUILD_DEPENDS+= textproc/libxslt
> -
> -CONFIGURE_ARGS+=--without-jinterface \
> - --without-odbc \
> - --enable-threads \
> - --enable-kernel-poll \
> - --disable-hipe
> -
> -MULTI_PACKAGES = -main -wx
> -
> -WANTLIB = m pthread
> -WANTLIB-main = ${WANTLIB} c crypto kvm curses util z
> -
> -WANTLIB-wx += ${WANTLIB} GL GLU ${COMPILER_LIBCXX}
> -WANTLIB-wx += wx_baseu-3.0 wx_baseu_xml-3.0 wx_gtk3u_adv-3.0 wx_gtk3u_aui-3.0
> -WANTLIB-wx += wx_gtk3u_core-3.0 wx_gtk3u_gl-3.0 wx_gtk3u_html-3.0
> -WANTLIB-wx += wx_gtk3u_stc-3.0 wx_gtk3u_xrc-3.0
> -
> -LIB_DEPENDS-wx +=x11/wxWidgets>=2.8.12p10
> -RUN_DEPENDS-wx =${BASE_PKGPATH},-main>=${MAJ_V}
> -
> -DOC_DIR= ${PREFIX}/lib/erlang${MAJ_V}/
> -FAKE_FLAGS = libdir_suffix="/erlang${MAJ_V}"
> -
> -AUTOCONF_VERSION =2.69
> -
> -# Use the target 'gen-versions' to update this list
> -ERL_VERSIONS= \
> -ASN1_VSN 5.0.8 \
> -COMMON_TEST_VSN 1.17.2.1 \
> -COMPILER_VSN 7.3.2 \
> -CRYPTO_VSN 4.4.2.3 \
> -DEBUGGER_VSN 4.2.6 \
> -DIALYZER_VSN 3.3.2 \
> -DIAMETER_VSN 2.2.1 \
> -EDOC_VSN 0.10 \
> -EI_VSN 3.11.3.2 \
> -ELDAP_VSN 1.2.7 \
> -EMACS_VSN 2.7.0 \
> -ERL_DOCGEN_VSN 0.9 \
> -ERL_INTERFACE_VSN 3.11.3.2 \
> -ET_VSN 1.6.4 \
> -EUNIT_VSN 2.3.7 \
> -FTP_VSN 1.0.2.2 \
> -HIPE_VSN 3.18.3 \
> -INETS_VSN 7.0.7.2 \
> -JINTERFACE_VSN 1.9.1 \
> -KERNEL_VSN 6.3.1.3 \
> -MEGACO_VSN 3.18.4 \
> -MNESIA_VSN 4.15.6 \
> -OBSERVER_VSN 2.9 \
> -ODBC_VSN 2.12.3 \
> -OS_MON_VSN 2.4.7 \
> -OTP_MIBS_VSN 1.2.1 \
> -PARSETOOLS_VSN 2.1.8 \
> -PUBLIC_KEY_VSN 1.6.6.1 \
> -RELTOOL_VSN 0.7.8 \
> -RUNTIME_TOOLS_VSN 1.13.2.1 \
> -SASL_VSN 3.3 \
> -SNMP_VSN 5.2.12 \
> -SSH_VSN 4.7.6.6 \
> -SSL_VSN 9.2.3.7 \
> -STDLIB_VSN 3.8.2.4 \
> -SYNTAX_TOOLS_VSN 2.1.7.1 \
> -TFTP_VSN 1.0.1 \
> -TOOLS_VSN 3.1.0.1 \
> -WX_VSN 1.8.7 \
> -XMERL_VSN 1.3.20.1 \
> -ERTS_VSN 10.3.5.19
> -
> -.include <bsd.port.mk>
> Index: 21/distinfo
> ===================================================================
> RCS file: 21/distinfo
> diff -N 21/distinfo
> --- 21/distinfo 21 May 2022 12:01:42 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,4 +0,0 @@
> -SHA256 (otp_doc_man_21.3.8.24.tar.gz) = H47jDBrh0PCUnS7haNxQ/qgRihGiMjMb4ViedYIAqHI=
> -SHA256 (otp_src_21.3.8.24.tar.gz) = qC3ocde6QP0lZViyOjtMFTnmx+znUH1usrADMMYTUBI=
> -SIZE (otp_doc_man_21.3.8.24.tar.gz) = 1402291
> -SIZE (otp_src_21.3.8.24.tar.gz) = 88854458
> Index: 21/patches/patch-Makefile_in
> ===================================================================
> RCS file: 21/patches/patch-Makefile_in
> diff -N 21/patches/patch-Makefile_in
> --- 21/patches/patch-Makefile_in 21 May 2022 12:01:42 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,13 +0,0 @@
> -Create symlink so the build can handle versioned binaries
> -
> -Index: Makefile.in
> ---- Makefile.in.orig
> -+++ Makefile.in
> -@@ -562,6 +562,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: 21/patches/patch-erts_emulator_Makefile_in
> ===================================================================
> RCS file: 21/patches/patch-erts_emulator_Makefile_in
> diff -N 21/patches/patch-erts_emulator_Makefile_in
> --- 21/patches/patch-erts_emulator_Makefile_in 21 May 2022 12:01:42 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,17 +0,0 @@
> -Index: erts/emulator/Makefile.in
> ---- erts/emulator/Makefile.in.orig
> -+++ erts/emulator/Makefile.in
> -@@ -283,13 +283,7 @@ ifeq (@EMU_LOCK_CHECKING@,yes)
> - NO_INLINE_FUNCTIONS=true
> - endif
> -
> --ifneq ($(filter tile-%,$(TARGET)), )
> --# -O2 generally produces faster for tile-cc, because the code is smaller.
> --# Since tile-cc looks like gcc, we need to override the normal gcc -O3 setting.
> - OPT_LEVEL = -O2
> --else
> --OPT_LEVEL = -O3
> --endif
> -
> - ifeq ($(GCC),yes)
> - ifeq ($(NO_INLINE_FUNCTIONS),true)
> Index: 21/patches/patch-erts_etc_common_ct_run_c
> ===================================================================
> RCS file: 21/patches/patch-erts_etc_common_ct_run_c
> diff -N 21/patches/patch-erts_etc_common_ct_run_c
> --- 21/patches/patch-erts_etc_common_ct_run_c 11 Mar 2022 19:28:56 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -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
> -@@ -41,7 +41,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}"
> -

No comments:

Post a Comment