Index: head/devel/relx/Makefile =================================================================== --- head/devel/relx/Makefile (revision 433884) +++ head/devel/relx/Makefile (revision 433885) @@ -1,80 +1,81 @@ # $FreeBSD$ PORTNAME= relx PORTVERSION= 3.22.2 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= devel MASTER_SITES+= LOCAL/olgeni:deps \ http://olgeni.olgeni.com/~olgeni/distfiles/:deps \ https://s3.amazonaws.com/s3.hex.pm/tarballs/:hex DISTFILES= relx-cache-13${EXTRACT_SUFX}:deps EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \ relx-cache-13${EXTRACT_SUFX} MAINTAINER= olgeni@FreeBSD.org COMMENT= Sane, simple release creation for Erlang LICENSE= APACHE20 BUILD_DEPENDS= ${LOCALBASE}/bin/erl:lang/erlang \ rebar3>=0:devel/rebar3 RUN_DEPENDS:= ${BUILD_DEPENDS} PLIST_SUB= VERSION="${PORTVERSION}" # Use either erlware or tsloughter, depending on who actually # published the package on hex.pm USE_GITHUB= yes GH_ACCOUNT= erlware REBAR_DEPS= bbmustache-1.0.4 \ cf-0.2.2 \ erlware_commons-0.22.0 \ getopt-0.8.2 \ providers-1.6.0 .for _dep in ${REBAR_DEPS} DISTFILES+= ${_dep}.tar:hex .endfor # rebar3 insists on downloading dependencies, and some kind of package # index into the user's HOME. We need to trick it into behaving by # providing both before building. post-extract: .for _dep in ${REBAR_DEPS} @${MKDIR} ${WRKSRC}/_build/default/lib/${_dep:C/-.*//} @${TAR} xOf ${DISTDIR}/${_dep}.tar contents.tar.gz |\ ${TAR} xfz - -C ${WRKSRC}/_build/default/lib/${_dep:C/-.*//} .endfor post-patch: @${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \ ${WRKSRC}/src/${PORTNAME}.app.src do-build: @${RM} ${WRKSRC}/rebar.lock @cd ${WRKSRC} && HOME=${WRKDIR} rebar3 compile @${RM} ${WRKSRC}/rebar.lock @cd ${WRKSRC} && HOME=${WRKDIR} rebar3 escriptize post-build: @${LN} -s ${WRKSRC}/_build/dev/lib/${PORTNAME}/ebin ${WRKSRC} do-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION} @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/include @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/priv @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src ${INSTALL_DATA} ${WRKSRC}/include/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/include ${INSTALL_DATA} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src ${INSTALL_DATA} ${WRKSRC}/_build/default/lib/relx/ebin/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/priv ${INSTALL_SCRIPT} ${WRKSRC}/_build/default/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR} .include Index: head/devel/relx/files/patch-src_rlx__prv__assembler.erl =================================================================== --- head/devel/relx/files/patch-src_rlx__prv__assembler.erl (nonexistent) +++ head/devel/relx/files/patch-src_rlx__prv__assembler.erl (revision 433885) @@ -0,0 +1,37 @@ +--- src/rlx_prv_assembler.erl.orig 2016-12-27 16:21:42 UTC ++++ src/rlx_prv_assembler.erl +@@ -121,7 +121,10 @@ format_error({start_clean_script_generat + rlx_util:indent(2), Module:format_error(Errors)]; + format_error({strip_release, Reason}) -> + io_lib:format("Stripping debug info from release beam files failed becuase ~s", +- [beam_lib:format_error(Reason)]). ++ [beam_lib:format_error(Reason)]); ++format_error({rewrite_app_file, AppFile, Error}) -> ++ io_lib:format("Unable to rewrite .app file ~s due to ~p", ++ [AppFile, Error]). + + %%%=================================================================== + %%% Internal Functions +@@ -255,13 +258,16 @@ rewrite_app_file(State, App, TargetDir) + ,AppData2 + ,{modules, OldModules -- ExcludedModules}) + end, +- Spec = io_lib:format("~p.\n", [{application, AppName, AppData3}]), +- write_file_if_contents_differ(AppFile, Spec). ++ Spec = [{application, AppName, AppData3}], ++ case write_file_if_contents_differ(AppFile, Spec) of ++ ok -> ok; ++ Error -> ?RLX_ERROR({rewrite_app_file, AppFile, Error}) ++ end. + +-write_file_if_contents_differ(Filename, Bytes) -> +- ToWrite = iolist_to_binary(Bytes), +- case file:read_file(Filename) of +- {ok, ToWrite} -> ++write_file_if_contents_differ(Filename, Spec) -> ++ ToWrite = io_lib:format("~p.\n", Spec), ++ case file:consult(Filename) of ++ {ok, Spec} -> + ok; + {ok, _} -> + file:write_file(Filename, ToWrite); Property changes on: head/devel/relx/files/patch-src_rlx__prv__assembler.erl ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property