!2 【编译失败处理】22.03:LTS:Next分支包编译失败
Merge pull request !2 from 王歌/openEuler-22.03-LTS-Next
This commit is contained in:
commit
055a35fe20
BIN
0.14.0.tar.gz
Normal file
BIN
0.14.0.tar.gz
Normal file
Binary file not shown.
@ -1,31 +0,0 @@
|
|||||||
From: Dmitry Klionsky <dm.klionsky@gmail.com>
|
|
||||||
Date: Tue, 27 Jun 2017 17:41:18 +0300
|
|
||||||
Subject: [PATCH] Support Erlang/OTP 20.0
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index d1e5019..d50acb2 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -2,6 +2,8 @@ language: erlang
|
|
||||||
sudo: false
|
|
||||||
otp_release:
|
|
||||||
# Test on all supported releases accepted by the `require_otp_vsn` in rebar.config
|
|
||||||
+ - 20.0
|
|
||||||
+ - 19.3
|
|
||||||
- 18.0
|
|
||||||
- 17.4
|
|
||||||
- 17.3
|
|
||||||
diff --git a/rebar.config b/rebar.config
|
|
||||||
index 3ac7c11..4680515 100644
|
|
||||||
--- a/rebar.config
|
|
||||||
+++ b/rebar.config
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
|
|
||||||
%% accept R15B02.., any R16B except R16B03
|
|
||||||
%% also accept OTP v17, altough it may not work properly on that release yet..
|
|
||||||
-{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19"}.
|
|
||||||
+{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20"}.
|
|
||||||
|
|
||||||
{erl_opts, [debug_info]}.
|
|
||||||
{yrl_opts, [{includefile, "include/erlydtl_preparser.hrl"}]}.
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
From: brigadier <eugeneim@gmail.com>
|
|
||||||
Date: Fri, 17 Aug 2018 00:38:56 +0300
|
|
||||||
Subject: [PATCH] compatibility with OTP 21
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/rebar.config b/rebar.config
|
|
||||||
index 4680515..8712dfa 100644
|
|
||||||
--- a/rebar.config
|
|
||||||
+++ b/rebar.config
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
|
|
||||||
%% accept R15B02.., any R16B except R16B03
|
|
||||||
%% also accept OTP v17, altough it may not work properly on that release yet..
|
|
||||||
-{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20"}.
|
|
||||||
+{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20|21"}.
|
|
||||||
|
|
||||||
{erl_opts, [debug_info]}.
|
|
||||||
{yrl_opts, [{includefile, "include/erlydtl_preparser.hrl"}]}.
|
|
||||||
diff --git a/src/erlydtl_filters.erl b/src/erlydtl_filters.erl
|
|
||||||
index 3fe1be3..43eeae8 100644
|
|
||||||
--- a/src/erlydtl_filters.erl
|
|
||||||
+++ b/src/erlydtl_filters.erl
|
|
||||||
@@ -355,10 +355,10 @@ floatformat(_, _) -> "".
|
|
||||||
floatformat_io(Number, []) ->
|
|
||||||
floatformat_io(Number, -1);
|
|
||||||
floatformat_io(Number, 0) ->
|
|
||||||
- hd(io_lib:format("~B", [erlang:round(Number)]));
|
|
||||||
+ lists:flatten(io_lib:format("~B", [erlang:round(Number)]));
|
|
||||||
floatformat_io(Number, Precision) when Precision > 0 ->
|
|
||||||
- hd(io_lib:format("~.*f",[Precision, Number]));
|
|
||||||
-floatformat_io(Number, Precision) when Precision < 0 ->
|
|
||||||
+ lists:flatten(io_lib:format("~.*f",[Precision, Number]));
|
|
||||||
+floatformat_io(Number, Precision) when Precision < 0 ->
|
|
||||||
Round = erlang:round(Number),
|
|
||||||
RoundPrecision = round(Number, -Precision),
|
|
||||||
if RoundPrecision == Round ->
|
|
||||||
@@ -590,11 +590,12 @@ stringformat(Input, Conversion) when is_binary(Conversion) ->
|
|
||||||
stringformat(Input, unicode:characters_to_list(Conversion));
|
|
||||||
stringformat(Input, Conversion) ->
|
|
||||||
ParsedConversion = re:replace(Conversion, "([\-#\+ ]?)([0-9\*]+)?(\.?)([0-9]?)([diouxXeEfFgGcrs])", "\\1 ,\\2 ,\\3 ,\\4 ,\\5 ", [{return,list}]),
|
|
||||||
+
|
|
||||||
?debugFmt("ParsedConversion: ~p~n", [ParsedConversion]),
|
|
||||||
ParsedConversion1 = lists:map(fun(X) -> string:strip(X) end, string:tokens(ParsedConversion, ",")),
|
|
||||||
[ConversionFlag, MinFieldWidth, Precision, PrecisionLength, ConversionType] = ParsedConversion1,
|
|
||||||
?debugFmt("ConversionFlag, MinFieldWidth, Precision, PrecisionLength, ConversionType: ~p, ~p, ~p, ~p, ~p ~n", [ConversionFlag, cast_to_integer(MinFieldWidth), Precision, cast_to_integer(PrecisionLength), ConversionType]),
|
|
||||||
- [String] = stringformat_io(Input, Conversion, ConversionFlag, cast_to_integer(MinFieldWidth), Precision, cast_to_integer(PrecisionLength), ConversionType),
|
|
||||||
+ String = stringformat_io(Input, Conversion, ConversionFlag, cast_to_integer(MinFieldWidth), Precision, cast_to_integer(PrecisionLength), ConversionType),
|
|
||||||
lists:flatten(String).
|
|
||||||
|
|
||||||
%% @doc
|
|
||||||
@@ -640,6 +641,7 @@ stringformat_io(Input, Conversion, _ConversionFlag, _MinFieldWidth,
|
|
||||||
io_lib:format(Format, [cast_to_float(Input)]);
|
|
||||||
stringformat_io(Input, Conversion, _ConversionFlag, _MinFieldWidth,
|
|
||||||
[], [], "d")->
|
|
||||||
+
|
|
||||||
%?debugMsg("plain d"),
|
|
||||||
%Conversion = [ConversionFlag, MinFieldWidth, Precision, PrecisionLength, ConversionType],
|
|
||||||
Format = "~" ++ re:replace(Conversion, "d", "B", [{return, list}] ),
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
From: brigadier <eugeneim@gmail.com>
|
|
||||||
Date: Sat, 18 Aug 2018 18:55:19 +0300
|
|
||||||
Subject: [PATCH] merl bug in OTP 21 workaround
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/erlydtl_beam_compiler.erl b/src/erlydtl_beam_compiler.erl
|
|
||||||
index 7ab3aa8..c7b149a 100644
|
|
||||||
--- a/src/erlydtl_beam_compiler.erl
|
|
||||||
+++ b/src/erlydtl_beam_compiler.erl
|
|
||||||
@@ -861,8 +861,9 @@ blocktrans_ast(Args, Contents, PluralContents, TreeWalker) ->
|
|
||||||
Body ->
|
|
||||||
{ok, DjangoParseTree} = do_parse_template(Body, TreeWalkerAcc#treewalker.context),
|
|
||||||
{{BodyAst, BodyInfo}, BodyTreeWalker} = body_ast(DjangoParseTree, TreeWalkerAcc),
|
|
||||||
+ Clause = erl_syntax:clause([erl_syntax:abstract(Locale)], none, [BodyAst]),
|
|
||||||
{merge_info(BodyInfo, AstInfoAcc), BodyTreeWalker,
|
|
||||||
- [?Q("_@Locale@ -> _@BodyAst")|ClauseAcc]}
|
|
||||||
+ [Clause | ClauseAcc]}
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{MergedInfo, TreeWalker3, []}, TLocales),
|
|
||||||
@@ -975,14 +976,15 @@ compiletime_trans_ast(TFun, Text, LContext,
|
|
||||||
}=TreeWalker) ->
|
|
||||||
ClAst = lists:foldl(
|
|
||||||
fun(Locale, ClausesAcc) ->
|
|
||||||
- [?Q("_@Locale@ -> _@translated",
|
|
||||||
- [{translated, case TFun(Text, phrase_locale(Locale, LContext)) of
|
|
||||||
- default -> string_ast(Text, Context);
|
|
||||||
- Translated -> string_ast(Translated, Context)
|
|
||||||
- end}])
|
|
||||||
- |ClausesAcc]
|
|
||||||
+ BodyAst = case TFun(Text, phrase_locale(Locale, LContext)) of
|
|
||||||
+ default -> string_ast(Text, Context);
|
|
||||||
+ Translated -> string_ast(Translated, Context)
|
|
||||||
+ end,
|
|
||||||
+ Clause = erl_syntax:clause([erl_syntax:abstract(Locale)], none, [BodyAst]),
|
|
||||||
+ [Clause | ClausesAcc]
|
|
||||||
end,
|
|
||||||
[], TLocales),
|
|
||||||
+
|
|
||||||
{{?Q(["case _CurrentLocale of",
|
|
||||||
" _@_ClAst -> _;",
|
|
||||||
" _ -> _@string",
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
From: Seb Maynard <seb@seb.so>
|
|
||||||
Date: Thu, 24 Jan 2019 14:47:14 +0000
|
|
||||||
Subject: [PATCH] Make sure that when checking if a function is exported that
|
|
||||||
the module in question is loaded by the code server
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/erlydtl_runtime.erl b/src/erlydtl_runtime.erl
|
|
||||||
index fad5872..e7efcc8 100644
|
|
||||||
--- a/src/erlydtl_runtime.erl
|
|
||||||
+++ b/src/erlydtl_runtime.erl
|
|
||||||
@@ -472,6 +472,7 @@ read_file(Module, Function, DocRoot, FileName, ReaderOptions) ->
|
|
||||||
throw({read_file, AbsName, Reason})
|
|
||||||
end.
|
|
||||||
read_file_internal(Module, Function, FileName, ReaderOptions) ->
|
|
||||||
+ _ = code:ensure_loaded(Module),
|
|
||||||
case erlang:function_exported(Module, Function,1) of
|
|
||||||
true ->
|
|
||||||
Module:Function(FileName);
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
Date: Mon, 11 Nov 2019 00:03:59 +0100
|
|
||||||
Subject: [PATCH] Support Erlang/OTP 22.0
|
|
||||||
|
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
|
|
||||||
diff --git a/rebar.config b/rebar.config
|
|
||||||
index 8712dfa..ea35569 100644
|
|
||||||
--- a/rebar.config
|
|
||||||
+++ b/rebar.config
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
|
|
||||||
%% accept R15B02.., any R16B except R16B03
|
|
||||||
%% also accept OTP v17, altough it may not work properly on that release yet..
|
|
||||||
-{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20|21"}.
|
|
||||||
+{require_otp_vsn, "R15B0[^1]|R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20|21|22"}.
|
|
||||||
|
|
||||||
{erl_opts, [debug_info]}.
|
|
||||||
{yrl_opts, [{includefile, "include/erlydtl_preparser.hrl"}]}.
|
|
||||||
@ -1,50 +1,56 @@
|
|||||||
%global realname erlydtl
|
%global realname erlydtl
|
||||||
%global upstream erlydtl
|
%global upstream erlydtl
|
||||||
Name: erlang-%{realname}
|
Name: erlang-%{realname}
|
||||||
Version: 0.12.1
|
Version: 0.14.0
|
||||||
Release: 1
|
Release: 1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Summary: Erlang implementation of the Django Template Language
|
Summary: Erlang implementation of the Django Template Language
|
||||||
License: MIT
|
License: MIT and Apache-2..0
|
||||||
URL: https://github.com/%{upstream}/%{realname}
|
URL: https://github.com/%{upstream}/%{realname}
|
||||||
VCS: scm:git:https://github.com/%{upstream}/%{realname}.git
|
VCS: scm:git:https://github.com/%{upstream}/%{realname}.git
|
||||||
Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
|
Source0: https://github.com/%{upstream}/%{realname}/archive/refs/tags/0.14.0.tar.gz
|
||||||
Patch1: erlang-erlydtl-0001-Verbose-testing.patch
|
Patch1: erlang-erlydtl-0001-Verbose-testing.patch
|
||||||
Patch2: erlang-erlydtl-0002-No-such-function-exported-gettext_compile-write_pret.patch
|
Patch2: erlang-erlydtl-0002-No-such-function-exported-gettext_compile-write_pret.patch
|
||||||
Patch3: erlang-erlydtl-0003-No-such-function-exported-gettext_compile-fmt_filein.patch
|
Patch3: erlang-erlydtl-0003-No-such-function-exported-gettext_compile-fmt_filein.patch
|
||||||
Patch4: erlang-erlydtl-0004-No-such-fun-gettext_compile-open_po_file-3.patch
|
Patch4: erlang-erlydtl-0004-No-such-fun-gettext_compile-open_po_file-3.patch
|
||||||
Patch5: erlang-erlydtl-0005-No-such-fun-gettext_compile-close_file-0.patch
|
Patch5: erlang-erlydtl-0005-No-such-fun-gettext_compile-close_file-0.patch
|
||||||
Patch6: erlang-erlydtl-0006-Support-Erlang-OTP-20.0.patch
|
Provides: ErlyDTL = %{version}-%{release}
|
||||||
Patch7: erlang-erlydtl-0007-compatibility-with-OTP-21.patch
|
BuildRequires: erlang-rebar
|
||||||
Patch8: erlang-erlydtl-0008-merl-bug-in-OTP-21-workaround.patch
|
|
||||||
Patch9: erlang-erlydtl-0009-Make-sure-that-when-checking-if-a-function-is-export.patch
|
|
||||||
Patch10: erlang-erlydtl-0010-Support-Erlang-OTP-22.0.patch
|
|
||||||
Provides: ErlyDTL = %{version}-%{release}
|
|
||||||
BuildRequires: erlang-rebar
|
|
||||||
%description
|
%description
|
||||||
ErlyDTL is an Erlang implementation of the Django Template Language. The
|
ErlyDTL is an Erlang implementation of the Django Template Language. The
|
||||||
erlydtl module compiles Django Template source code into Erlang bytecode. The
|
erlydtl module compiles Django Template source code into Erlang bytecode. The
|
||||||
compiled template has a "render" function that takes a list of variables and
|
compiled template has a "render" function that takes a list of variables and
|
||||||
returns a fully rendered document.
|
returns a fully rendered document.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{realname}-%{version}
|
%autosetup -p1 -n %{realname}-%{version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{erlang_compile}
|
%{erlang_compile}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{erlang_install}
|
%{erlang_install}
|
||||||
cp -arv priv %{buildroot}/%{erlang_appdir}/
|
cp -arv priv %{buildroot}/%{erlang_appdir}/
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{erlang_test -C rebar-tests.config}
|
%{erlang_test -C rebar-tests.config}
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CONTRIBUTING.md NEWS.md README.markdown README_I18N
|
%doc CONTRIBUTING.md NEWS.md README.markdown README_I18N
|
||||||
%{erlang_appdir}/
|
%{erlang_appdir}/
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Aug 29 2020 wangyue <wangyue92@huawei.com> - 0.12.1-1
|
* Fri Jan 21 2022 Ge Wang <wangge20@huawei.com> - 1.14.0-1
|
||||||
|
- update to version 1.14.0
|
||||||
|
|
||||||
|
* Sat Aug 29 2020 wangyue <wangyue92@huawei.com> - 1.12.1-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user