From: Volker Schlecht Subject: Re: net/ejabberd: new port (version 24.10) To: "Kirill A. Korinsky" Cc: OpenBSD ports Date: Mon, 18 Nov 2024 19:34:27 +0100 I didn't find the time to really look at ejabberd, but ok volker@ for the changes to erlang.port.mk. On 2024-11-09 12:54, Kirill A. Korinsky wrote: >ports@, > >I'd like to import net/ejabberd back into the ports and take care of it. > >To import it, I need to add small hacks inside lang/erlang/erlang.port.mk to >overstep the extreme fragile behavior of rebar on offline builds. > >I'd like to import net/ejabberd back to the ports and take care of it. > >To import it I need to add small hacks inside lang/erlang/erlang.port.mk to >overstep extream fragiel behaviour of rebar on offline builds. > >As part of my testing I've rebuild and check that it doesn't change PLIST: > - lang/lfe > - lang/gleam > - lang/elixir > - devel/rebar3 > - benchmarks/tsung > - net/rabbitmq >or all ports which depends on erlang.port.mk. > >Feedback? Ok? > >Index: infrastructure/db/user.list >=================================================================== >RCS file: /home/cvs/ports/infrastructure/db/user.list,v >diff -u -p -r1.452 user.list >--- infrastructure/db/user.list 8 Nov 2024 16:05:20 -0000 1.452 >+++ infrastructure/db/user.list 8 Nov 2024 17:55:30 -0000 >@@ -102,7 +102,7 @@ id user group port > 591 _bacula _bacula sysutils/bacula > 592 _imapproxy _imapproxy mail/imapproxy > #593 _nginx _nginx www/nginx >-#594 _ejabberd _ejabberd net/ejabberd >+594 _ejabberd _ejabberd net/ejabberd > 595 _poppassd _poppassd sysutils/openpoppassd > #596 _heartbeat _heartbeat sysutils/heartbeat > 597 _spotifyd _spotifyd audio/spotifyd >Index: lang/erlang/erlang.port.mk >=================================================================== >RCS file: /home/cvs/ports/lang/erlang/erlang.port.mk,v >diff -u -p -r1.41 erlang.port.mk >--- lang/erlang/erlang.port.mk 28 May 2024 19:53:48 -0000 1.41 >+++ lang/erlang/erlang.port.mk 9 Nov 2024 10:41:42 -0000 >@@ -72,7 +72,12 @@ _MODERL_FLAVOR ?= ${_MODERL_DEFAULT_FLAV > CONFIGURE_STYLE = rebar3 > .endif > >+MODERL_USE_REBAR3 ?= No > .if ${CONFIGURE_STYLE} == "rebar3" >+MODERL_USE_REBAR3 = Yes >+.endif >+ >+.if ${MODERL_USE_REBAR3:L} == yes > MODERL_BUILD_DEPENDS += devel/rebar3,${_MODERL_FLAVOR} > REBAR_BIN ?= ${LOCALBASE}/bin/rebar3-${MODERL_VERSION} > # Make sure rebar gets called as 'rebar3', otherwise escript tries to call the >@@ -125,6 +130,7 @@ MODERL_LIBROOT ?= lib/erlang${MODERL_VER > ERL_LIBDIR ?= ${ERL_LIBROOT}/${DISTNAME} > > # Common program shortcuts >+MODERL_EPMD = ${LOCALBASE}/bin/epmd${MODERL_VERSION} > MODERL_ERL = ${LOCALBASE}/bin/erl${MODERL_VERSION} > MODERL_ERLC = ${LOCALBASE}/bin/erlc${MODERL_VERSION} > >@@ -172,6 +178,22 @@ SITE_HEX = https://repo.hex.pm/tarballs > SITES.erl ?= ${SITE_HEX} > MODERL_DIST_SUBDIR ?= hex_modules > >+. for _m _v in ${MODERL_PLUGINS} >+MODERL_DISTFILES += ${MODERL_DIST_SUBDIR}/{}${_m}-${_v}.tar >+. endfor >+ >+. if ! empty(MODERL_PLUGINS) >+. for _m _v in ${MODERL_PLUGINS} >+MODERL_SETUP_WORKSPACE_PLUGINS += mkdir -p ${WRKDIR}/${MODERL_DIST_SUBDIR}/${_m}; \ >+ tar xf ${FULLDISTDIR}/${MODERL_DIST_SUBDIR}/${_m}-${_v}.tar -C ${WRKDIR}/${MODERL_DIST_SUBDIR}/${_m}; \ >+ mkdir -p ${WRKSRC}/_checkouts/${_m}; \ >+ mkdir -p ${WRKSRC}/_build/default/plugins; \ >+ tar xzf ${WRKDIR}/${MODERL_DIST_SUBDIR}/${_m}/contents.tar.gz -C ${WRKSRC}/_checkouts/${_m}; \ >+ ln -fs ${WRKSRC}/_checkouts/${_m} ${WRKSRC}/_build/default/plugins/${_m}; >+. endfor >+MODERLANG_post-extract += ${MODERL_SETUP_WORKSPACE_PLUGINS} >+. endif >+ > . for _m _v in ${MODERL_MODULES} > MODERL_DISTFILES += ${MODERL_DIST_SUBDIR}/{}${_m}-${_v}.tar > . endfor >@@ -183,9 +205,13 @@ MODERL_SETUP_WORKSPACE += mkdir -p ${WRK > mkdir -p ${WRKSRC}/_checkouts/${_m}; \ > mkdir -p ${WRKSRC}/_build/default/lib; \ > tar xzf ${WRKDIR}/${MODERL_DIST_SUBDIR}/${_m}/contents.tar.gz -C ${WRKSRC}/_checkouts/${_m}; \ >- cp -r ${WRKSRC}/_checkouts/${_m} ${WRKSRC}/_build/default/lib/; >+ ln -fs ${WRKSRC}/_checkouts/${_m} ${WRKSRC}/_build/default/lib/${_m}; >+MODERL_COPY_EBINS += if [ -d ${WRKSRC}/_build/default/checkouts/${_m}/ebin ]; then \ >+ cp -r ${WRKSRC}/_build/default/checkouts/${_m}/ebin \ >+ ${WRKSRC}/_build/default/lib/${_m}/ebin; fi; > . endfor > MODERLANG_post-extract += ${MODERL_SETUP_WORKSPACE} >+MODERLANG_pre-fake += ${MODERL_COPY_EBINS} > . endif > > . if defined(MODERL_DISTFILES) > > >-- >wbr, Kirill