diff options
author | olgeni <olgeni@FreeBSD.org> | 2017-02-11 23:57:06 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2017-02-11 23:57:06 +0800 |
commit | 806acfb2c1d9460cb2ca12242b0c9fe303b7af75 (patch) | |
tree | 3254b40d58465af8483f4a91991314f00451b771 /devel | |
parent | d6f140f8b23451993b2eed3f3b16bd16c62ef5d0 (diff) | |
download | freebsd-ports-gnome-806acfb2c1d9460cb2ca12242b0c9fe303b7af75.tar.gz freebsd-ports-gnome-806acfb2c1d9460cb2ca12242b0c9fe303b7af75.tar.zst freebsd-ports-gnome-806acfb2c1d9460cb2ca12242b0c9fe303b7af75.zip |
devel/relx: fix usage of {include_erts,true} (GitHub pull request #565).
Diffstat (limited to 'devel')
-rw-r--r-- | devel/relx/Makefile | 1 | ||||
-rw-r--r-- | devel/relx/files/patch-src_rlx__prv__assembler.erl | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/devel/relx/Makefile b/devel/relx/Makefile index 17fc53021c31..8ad548848e5f 100644 --- a/devel/relx/Makefile +++ b/devel/relx/Makefile @@ -2,6 +2,7 @@ PORTNAME= relx PORTVERSION= 3.22.2 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= devel MASTER_SITES+= LOCAL/olgeni:deps \ diff --git a/devel/relx/files/patch-src_rlx__prv__assembler.erl b/devel/relx/files/patch-src_rlx__prv__assembler.erl new file mode 100644 index 000000000000..992b22ff89e1 --- /dev/null +++ b/devel/relx/files/patch-src_rlx__prv__assembler.erl @@ -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); |