<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/utils/lua/patches, branch v17.01.2</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>lua: Fixed broken __lt/__le operators caused by lnum patch.</title>
<updated>2016-05-13T15:03:53+00:00</updated>
<author>
<name>David Thornley</name>
<email>david.thornley@touchstargroup.com</email>
</author>
<published>2016-05-11T03:28:53+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=da0226fa7eece0b87bcc04d79bd1a9b198d09fd0'/>
<id>da0226fa7eece0b87bcc04d79bd1a9b198d09fd0</id>
<content type='text'>
This was found while investigating why luarocks does not work. It was
traced to a quite old lnum patch for 5.1.3. I compared against the
latest 5.1.4 patch - https://github.com/LuaDist/lualnum and discovered
the lessthan/lessequal evaluation was not falling through to the
call_orderTM (tag methods).

I have tested LuCI (simple tests) and used the following lua code to
validate the patch (both host and target patches supplied): -

&gt; local my_mt = {
&gt; __eq = function(v1, v2)
&gt; print("__eq")
&gt; return false
&gt; end,
&gt; __lt = function(v1, v2)
&gt; print("__lt")
&gt; return false
&gt; end,
&gt; __le = function(v1, v2)
&gt; print("__le")
&gt; return false
&gt; end
&gt; }
&gt;
&gt; function get_my(vstring)
&gt; local my = {}
&gt; my.string = vstring;
&gt; setmetatable(my, my_mt);
&gt; return my;
&gt; end
&gt;
&gt; local a = get_my("1.0")
&gt; local b = get_my("1.0")
&gt;
&gt; local eq_works = a == b;
&gt; local lt_works = a &lt; b;
&gt; local gt_works = a &gt; b;
&gt;
&gt; local lte_works = a &lt;= b;
&gt; local gte_works = a &gt;= b;

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley &lt;david.thornley@touchstargroup.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was found while investigating why luarocks does not work. It was
traced to a quite old lnum patch for 5.1.3. I compared against the
latest 5.1.4 patch - https://github.com/LuaDist/lualnum and discovered
the lessthan/lessequal evaluation was not falling through to the
call_orderTM (tag methods).

I have tested LuCI (simple tests) and used the following lua code to
validate the patch (both host and target patches supplied): -

&gt; local my_mt = {
&gt; __eq = function(v1, v2)
&gt; print("__eq")
&gt; return false
&gt; end,
&gt; __lt = function(v1, v2)
&gt; print("__lt")
&gt; return false
&gt; end,
&gt; __le = function(v1, v2)
&gt; print("__le")
&gt; return false
&gt; end
&gt; }
&gt;
&gt; function get_my(vstring)
&gt; local my = {}
&gt; my.string = vstring;
&gt; setmetatable(my, my_mt);
&gt; return my;
&gt; end
&gt;
&gt; local a = get_my("1.0")
&gt; local b = get_my("1.0")
&gt;
&gt; local eq_works = a == b;
&gt; local lt_works = a &lt; b;
&gt; local gt_works = a &gt; b;
&gt;
&gt; local lte_works = a &lt;= b;
&gt; local gte_works = a &gt;= b;

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley &lt;david.thornley@touchstargroup.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lua: honor LDFLAGS</title>
<updated>2015-06-18T10:55:57+00:00</updated>
<author>
<name>Steven Barth</name>
<email>cyrus@openwrt.org</email>
</author>
<published>2015-06-18T10:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=feeea1cd2811caa68e289de312f6ba0821223e19'/>
<id>feeea1cd2811caa68e289de312f6ba0821223e19</id>
<content type='text'>
Signed-off-by: Steven Barth &lt;steven@midlink.org&gt;

SVN-Revision: 46036
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Steven Barth &lt;steven@midlink.org&gt;

SVN-Revision: 46036
</pre>
</div>
</content>
</entry>
<entry>
<title>lua: link library with -Bsymbolic-functions</title>
<updated>2015-04-19T18:33:13+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2015-04-19T18:33:13+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5199a2316571d0d5e9ea6103894479e2e2ec1a16'/>
<id>5199a2316571d0d5e9ea6103894479e2e2ec1a16</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;

SVN-Revision: 45509
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;

SVN-Revision: 45509
</pre>
</div>
</content>
</entry>
<entry>
<title>packages: clean up the package folder</title>
<updated>2013-06-21T16:54:37+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2013-06-21T16:54:37+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4ebf19b48fafc8d94e14e4ba779969613b241a6a'/>
<id>4ebf19b48fafc8d94e14e4ba779969613b241a6a</id>
<content type='text'>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 37007
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 37007
</pre>
</div>
</content>
</entry>
</feed>
