git: 7f0f07a1e2b2 - main - www/netsurf: Fix crash on preferences dialog with certain languages

From: Neel Chauhan <nc_at_FreeBSD.org>
Date: Thu, 28 Apr 2022 18:25:17 UTC
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f0f07a1e2b21fa2809ffd325e574aec73b64a57

commit 7f0f07a1e2b21fa2809ffd325e574aec73b64a57
Author:     Marcin Cieślak <saper@saper.info>
AuthorDate: 2022-04-28 18:23:54 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-04-28 18:25:12 +0000

    www/netsurf: Fix crash on preferences dialog with certain languages
    
    This happens with certain languages like pl_PL.UTF-8.
    
    PR:     263498
---
 www/netsurf/Makefile                                | 2 +-
 www/netsurf/files/patch-frontends_gtk_preferences.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/netsurf/Makefile b/www/netsurf/Makefile
index 02e2a9559e62..0e41f353deb9 100644
--- a/www/netsurf/Makefile
+++ b/www/netsurf/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	netsurf
 PORTVERSION=	3.10
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	www
 MASTER_SITES=	http://download.netsurf-browser.org/netsurf/releases/source/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-src
diff --git a/www/netsurf/files/patch-frontends_gtk_preferences.c b/www/netsurf/files/patch-frontends_gtk_preferences.c
index 337e1bf73f03..b3b09646026c 100644
--- a/www/netsurf/files/patch-frontends_gtk_preferences.c
+++ b/www/netsurf/files/patch-frontends_gtk_preferences.c
@@ -22,7 +22,7 @@
 +	res = nsgtk_builder_new_from_resname(ui_lang, &preferences_builder);
 +        if (res != NSERROR_OK) {
 +                //LANG not found, so fall back to english i guess
-+                res = nsgtk_builder_new_from_resname("enoption", &preferences_builder);
++                res = nsgtk_builder_new_from_resname("enoptions", &preferences_builder);
 +        }
 +        if (res != NSERROR_OK) {
 +                NSLOG(netsurf, INFO, "Preferences UI builder init failed");