From bc4371c115d1aabf0740b60c3c0af9c0a78e420e Mon Sep 17 00:00:00 2001 From: Markham Date: Tue, 5 Oct 2021 22:10:16 +0200 Subject: [PATCH] update lua-feedparser.patch --- archive-patches/lua-feedparser.patch | 22 +++++++++++----------- make/archives.mk | 6 +++--- make/libraries.mk | 4 ++-- make/versions.mk | 1 - 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/archive-patches/lua-feedparser.patch b/archive-patches/lua-feedparser.patch index b1abeb0..7047f58 100644 --- a/archive-patches/lua-feedparser.patch +++ b/archive-patches/lua-feedparser.patch @@ -9,13 +9,13 @@ index 2d66b8c..93d1c65 100644 - _VERSION = "feedparser 0.71" + _VERSION = "feedparser 0.71b patched" } - + local blanky = XMLElement.new() --useful in a whole bunch of places @@ -73,7 +73,17 @@ local function parse_entries(entries_el, format_str, base) --content - elseif (format_str=='atom' and tag=='content') or - (format_str=='rss' and (tag=='body' or tag=='xhtml:body' or tag == 'fullitem' or tag=='content:encoded')) then -- entry.content=el:getText() + elseif (format_str=='atom' and tag=='content') or + (format_str=='rss' and (tag=='body' or tag=='xhtml:body' or tag == 'fullitem' or tag=='content:encoded')) then +- entry.content=el:getText() + entry.content=el:getText() + if el.lom and el.lom[2] and el.lom[2][2] and el.lom[2][2][2].attr and el.lom[2][2][2].attr.src then + local img = el.lom[2][2][2].attr.src @@ -28,14 +28,14 @@ index 2d66b8c..93d1c65 100644 + end + end --TODO: content_detail - + --published @@ -111,10 +121,30 @@ local function parse_entries(entries_el, format_str, base) } local author_url = (el:getChild('url') or blanky):getText() - if author_url and author_url ~= "" then entry.author_detail.href=resolve(author_url, rebase(el:getChild('url'), el_base)) end -- -- elseif tag=='category' or tag=='dc:subject' then + if author_url and author_url ~= "" then entry.author_detail.href=resolve(author_url, rebase(el:getChild('url'), el_base)) end +- +- elseif tag=='category' or tag=='dc:subject' then + elseif format_str =='atom' and tag=='media:group' then + local el_thumb = el:getChild('media:thumbnail') + if el_thumb then @@ -60,7 +60,7 @@ index 2d66b8c..93d1c65 100644 + entry.category = (el:getChild('term') or el):getText() + elseif tag=='dc:subject' then --todo -- +- elseif tag=='source' then --todo end @@ -75,8 +75,8 @@ index 2d66b8c..93d1c65 100644 height=(el:getChild('height') or blanky):getText() @@ -366,4 +396,4 @@ if _VERSION:sub(-3) < "5.3" then end - - + + -return feedparser \ No newline at end of file +return feedparser diff --git a/make/archives.mk b/make/archives.mk index b1f1563..e4e425d 100755 --- a/make/archives.mk +++ b/make/archives.mk @@ -309,11 +309,11 @@ $(ARCHIVE)/ethtool-$(ETHTOOL_VER).tar.xz: $(ARCHIVE)/expat-$(EXPAT_VER).tar.bz2: $(WGET) http://downloads.sourceforge.net/expat/expat-$(EXPAT_VER).tar.bz2 -$(ARCHIVE)/luaexpat-$(LUA_EXPAT_VER).tar.bz2: +$(ARCHIVE)/luaexpat-$(LUA_EXPAT_VER).tar.bz2: | $(HOSTPREFIX)/bin/get-git-archive.sh get-git-archive.sh https://github.com/tomasguisasola/luaexpat.git $(LUA_EXPAT_GIT) $(notdir $@) $(ARCHIVE) -$(ARCHIVE)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.bz2: | $(HOSTPREFIX)/bin/get-git-archive.sh - get-git-archive.sh https://github.com/slact/lua-feedparser.git $(LUA_FEEDPARSER_TAG) $(notdir $@) $(ARCHIVE) +$(ARCHIVE)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.gz: + $(WGET) https://github.com/slact/lua-feedparser/archive/$(LUA_FEEDPARSER_VER).tar.gz -O $(@) $(ARCHIVE)/lua-$(LUA_VER).tar.gz: $(WGET) http://www.lua.org/ftp/lua-$(LUA_VER).tar.gz diff --git a/make/libraries.mk b/make/libraries.mk index 44f5ec2..3525827 100755 --- a/make/libraries.mk +++ b/make/libraries.mk @@ -1048,10 +1048,10 @@ $(D)/lua-expat: $(ARCHIVE)/luaexpat-$(LUA_EXPAT_VER).tar.bz2 $(D)/expat | $(TARG $(REMOVE)/luaexpat-$(LUA_EXPAT_VER) $(TOUCH) -$(D)/lua-feedparser: $(ARCHIVE)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.bz2 $(D)/lua $(D)/luasocket $(D)/lua-expat | $(TARGETPREFIX) +$(D)/lua-feedparser: $(ARCHIVE)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.gz $(D)/lua $(D)/luasocket $(D)/lua-expat | $(TARGETPREFIX) $(START_BUILD) $(REMOVE)/lua-feedparser-$(LUA_FEEDPARSER_VER) - $(UNTAR)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.bz2; \ + $(UNTAR)/lua-feedparser-$(LUA_FEEDPARSER_VER).tar.gz; \ set -e; cd $(BUILD_TMP)/lua-feedparser-$(LUA_FEEDPARSER_VER); \ $(PATCH)/lua-feedparser.patch; \ sed -i -e "s/^PREFIX.*//" -e "s/^LUA_DIR.*//" Makefile ; \ diff --git a/make/versions.mk b/make/versions.mk index 9801cf9..8504376 100644 --- a/make/versions.mk +++ b/make/versions.mk @@ -166,7 +166,6 @@ LUA_EXPAT_GIT = 9878960 # lua-feedparser LUA_FEEDPARSER_VER=0.71 -LUA_FEEDPARSER_TAG=9b284bc LUASOCKET_VER = 2.0.2 LUASOCKET_GIT = 5a17f79 -- 2.39.5