diff --git a/net/liferea/Makefile b/net/liferea/Makefile index 9b446c2ec46c..b9f162240884 100644 --- a/net/liferea/Makefile +++ b/net/liferea/Makefile @@ -1,43 +1,44 @@ PORTNAME= liferea DISTVERSION= 1.16.6 +PORTREVISION= 1 CATEGORIES= net gnome MASTER_SITES= https://github.com/lwindolf/liferea/releases/download/v${DISTVERSION}/ MAINTAINER= cmt@FreeBSD.org COMMENT= Simple RSS/RDF feed reader WWW= https://lzone.de/liferea/ LICENSE= GPLv2 LGPL3 LICENSE_COMB= multi LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING.LIB BUILD_DEPENDS= gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas LIB_DEPENDS= libfribidi.so:converters/fribidi \ libharfbuzz.so:print/harfbuzz \ libsoup-3.0.so:devel/libsoup3 \ libwebkit2gtk-4.1.so:www/webkit2-gtk@41 \ libpeas-2.so:devel/libpeas \ libjson-glib-1.0.so:devel/json-glib RUN_DEPENDS= gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas \ ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py-libpeas@${PY_FLAVOR} USES= compiler:c++11-lang cpe desktop-file-utils gettext \ gmake gnome libtool localbase \ pathfix pkgconfig python sqlite tar:bzip2 USE_GNOME= cairo dconf:run gtk30 gdkpixbuf intltool introspection \ libxslt libxml2 GLIB_SCHEMAS= net.sf.liferea.gschema.xml GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-introspection # Introspection starts the program, but it may hang or crash-abort # without an X server because the Webkit compositor tries to initialize # a graphics backend MAKE_ENV+= WEBKIT_DISABLE_COMPOSITING_MODE=1 INSTALL_TARGET= install-strip .include diff --git a/net/liferea/distinfo b/net/liferea/distinfo index c1c95a30332e..2788fe78f94a 100644 --- a/net/liferea/distinfo +++ b/net/liferea/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1761937559 -SHA256 (liferea-1.16.6.tar.bz2) = 6e5b9b1c3f55b3dda795c32c019afb6aa9e1124272020973b8e23ffba8c014cc -SIZE (liferea-1.16.6.tar.bz2) = 1769374 +TIMESTAMP = 1761989729 +SHA256 (liferea-1.16.6.tar.bz2) = 0fd9919a0d62c129726160ae626303cc29215308330c0ff50c4823e3d079f4b7 +SIZE (liferea-1.16.6.tar.bz2) = 1770946 diff --git a/net/liferea/files/patch-js_gopher-renderer.js b/net/liferea/files/patch-js_gopher-renderer.js deleted file mode 100644 index 625624bc0a21..000000000000 --- a/net/liferea/files/patch-js_gopher-renderer.js +++ /dev/null @@ -1,129 +0,0 @@ -diff --git js/gopher-renderer.js js/gopher-renderer.js -new file mode 100644 -index 00000000..1167e77e ---- /dev/null -+++ js/gopher-renderer.js -@@ -0,0 +1,122 @@ -+// vim: set ts=4 sw=4: -+/* -+ * @file gopher-renderer.js render gopher:// fetched resources in Lifereas internal browser -+ * -+ * Copyright (C) 2025 Lars Windolf -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+// Needed because Gopher is Latin-1 encoded and we want to render UTF-8 with emojis -+function convertLatin1ToUtf8(latin1String) { -+ try { -+ const decoder = new TextDecoder('iso-8859-1'); -+ const uint8Array = new Uint8Array(latin1String.split('').map(char => char.charCodeAt(0))); -+ const utf8String = decoder.decode(uint8Array); -+ return utf8String; -+ } catch (e) { -+ console.error("TextDecoder failed, falling back to original string"); -+ return latin1String; -+ } -+} -+ -+function renderListing(el, gopherData) { -+ const lines = gopherData.split('\n'); -+ lines.forEach(line => { -+ const [field1, path, host, port] = line.split('\t'); -+ const type = field1.charAt(0); -+ const title = field1.slice(1); -+ const item = document.createElement('div'); -+ let icon = ''; -+ switch (type) { -+ case '0': -+ icon = '📄'; -+ break; -+ case '1': -+ icon = '📁'; -+ break; -+ case '7': -+ icon = '🔍'; -+ break; -+ case 'g': -+ case 'I': -+ case ':': -+ icon = '🖼️'; -+ break; -+ case ';': -+ icon = '🎵'; -+ break; -+ case '<': -+ icon = '🎬'; -+ break; -+ case '9': -+ icon = '🔗'; -+ break; -+ } -+ -+ item.className = 'gopher-item'; -+ switch (type) { -+ case 'i': -+ item.innerHTML = (title === "") ? " " : title; -+ break; -+ case '0': -+ case '1': -+ case '7': -+ case '9': -+ case 'g': -+ case 'I': -+ case ':': -+ case ';': -+ case '<': -+ item.innerHTML = `${icon} ${title}`; -+ break; -+ default: -+ item.innerHTML = line; -+ break; -+ } -+ el.appendChild(item); -+ }); -+} -+ -+document.body.onload = function () { -+ const base64Data = document.body.innerText; -+ const gopherData = convertLatin1ToUtf8(atob(base64Data.replace(/=+$/, ''))); -+ const uriFields = window.location.pathname.split('/'); -+ let type = '1'; // default to directory listing -+ -+ if (uriFields.length >= 2 && uriFields[1].length > 0) -+ type = uriFields[1].charAt(0); -+ -+ document.body.innerHTML = '
'; -+ const div = document.getElementById('content'); -+ switch (type) { -+ case '0': -+ div.innerHTML = gopherData; -+ -+ // Replace all text HTTP and Gopher URIs in div with a link -+ const uriRegex = /(https?:\/\/\S+|gopher:\/\/\S+)/g; -+ div.innerHTML = div.innerHTML.replace(uriRegex, match => { -+ return `${match}`; -+ }); -+ break; -+ case '1': -+ renderListing(div, gopherData); -+ break; -+ default: -+ /* Should not happen at all, should be caught in Webkit protocol handler */ -+ div.innerHTML = 'Liferea does not support this Gopher item type "' + uriFields[1].charAt(0) + '" for rendering. You can open this link using the floodgap.com proxy click here.'; -+ break; -+ } -+} -\ No newline at end of file