git: 9ee5b874b6f3 - main - graphics/fotocx: update the port to the latest version 26.8.1

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 03:15:55 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9ee5b874b6f361584311e108be3a68e6cdbc914e

commit 9ee5b874b6f361584311e108be3a68e6cdbc914e
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2026-10-06 03:13:40 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2026-10-06 03:13:40 +0000

    graphics/fotocx: update the port to the latest version 26.8.1
    
    - libchamplain had been replaced with webkit2gtk-4.1 which is better
      maintained upstream and has better functionality than libchamplain
    - Because webkit2gtk-4.1 is rather heavy dependency, make the world
      map feature optional, but enabled by default so package users can
      enjoy the program's full functionality (discussed with the author)
    - Whack one more case of linuxish `/proc/self/exe' usage and provide
      better uninstall instructions while here
    
    Reported by:    portscout
---
 graphics/fotocx/Makefile                 | 14 ++++-----
 graphics/fotocx/distinfo                 |  6 ++--
 graphics/fotocx/files/patch-Makefile     | 37 +++++++++++++++++------
 graphics/fotocx/files/patch-f.file.cc    | 52 ++++++++++++++++++++++++++++++++
 graphics/fotocx/files/patch-f.meta.cc    | 51 +++++++++++++++++++++++++++++++
 graphics/fotocx/files/patch-f.widgets.cc | 43 ++++++++++++++++++++++++++
 graphics/fotocx/pkg-plist                | 10 +++---
 7 files changed, 189 insertions(+), 24 deletions(-)

diff --git a/graphics/fotocx/Makefile b/graphics/fotocx/Makefile
index 5b07f3922de7..c315a76ee39e 100644
--- a/graphics/fotocx/Makefile
+++ b/graphics/fotocx/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	fotocx
-PORTVERSION=	26.6.1
+PORTVERSION=	26.8.1
 CATEGORIES=	graphics
 MASTER_SITES=	https://kornelix.net/downloads/downloads/ \
 		https://fossies.org/linux/misc/ \
@@ -12,9 +12,7 @@ WWW=		https://kornelix.net/fotocx/fotocx.html
 
 LICENSE=	GPLv3+
 
-LIB_DEPENDS=	libchamplain-gtk-0.12.so:graphics/libchamplain \
-		libclutter-gtk-1.0.so:graphics/clutter-gtk3 \
-		libjxl.so:graphics/libjxl \
+LIB_DEPENDS=	libjxl.so:graphics/libjxl \
 		libpng.so:graphics/png \
 		libtiff.so:graphics/tiff
 RUN_DEPENDS=	xdg-open:devel/xdg-utils \
@@ -28,10 +26,12 @@ CXXFLAGS+=	-Wno-register -Wno-writable-strings
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=	DOCS NETMAP
+OPTIONS_DEFAULT=	NETMAP
+NETMAP_DESC=	World map support (requires WebKit)
 
-post-patch:
-	@${REINPLACE_CMD} -e '/Uninstall/d' ${WRKSRC}/f.widgets.cc
+NETMAP_LIB_DEPENDS=	libwebkit2gtk-4.1.so:www/webkit2-gtk@41
+NETMAP_MAKE_ENV=	NETMAP_SUPPORT=1
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
diff --git a/graphics/fotocx/distinfo b/graphics/fotocx/distinfo
index b9e870f0947f..4a86e8a6e9be 100644
--- a/graphics/fotocx/distinfo
+++ b/graphics/fotocx/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1783148746
-SHA256 (fotocx-26.6.1-source.tar.gz) = 47cc993eec17c43f2421c494029f6b8dd1e13ae26dd42a5f6366eb3b3401905e
-SIZE (fotocx-26.6.1-source.tar.gz) = 12990469
+TIMESTAMP = 1790767294
+SHA256 (fotocx-26.8.1-source.tar.gz) = ee7c75f10cfddbe9eed7e2f394c396a8255a81f2a385ad5879bb2ff58dc10281
+SIZE (fotocx-26.8.1-source.tar.gz) = 12879706
diff --git a/graphics/fotocx/files/patch-Makefile b/graphics/fotocx/files/patch-Makefile
index ca3a7f0ea90c..b84024d0bb95 100644
--- a/graphics/fotocx/files/patch-Makefile
+++ b/graphics/fotocx/files/patch-Makefile
@@ -1,4 +1,4 @@
---- Makefile.orig	2025-07-10 05:25:44 UTC
+--- Makefile.orig	2026-09-30 11:06:25 UTC
 +++ Makefile
 @@ -1,6 +1,7 @@
  #  fotocx Makefile
@@ -8,7 +8,7 @@
  #  export CXX=g++          gnu compiler
  #  export CXX=clang++      clang compiler
  #  export DEBUG=x          debug build with address checking
-@@ -27,6 +28,7 @@ else                                                  
+@@ -27,10 +28,11 @@ else
                    -Wno-format-truncation -Wno-stringop-truncation
     endif
  endif
@@ -16,12 +16,31 @@
  
  PKG_CONFIG ?= pkg-config
  
-@@ -34,7 +36,7 @@ CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c                   
-          `$(PKG_CONFIG) --cflags gtk+-3.0 --cflags champlain-gtk-0.12`
+-CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c `$(PKG_CONFIG) --cflags gtk+-3.0 webkit2gtk-4.1`
++CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c $(shell $(PKG_CONFIG) --cflags gtk+-3.0)
  
- LIBS = `$(PKG_CONFIG) --libs gtk+-3.0`                                           \
--         -lrt -lpthread -ltiff -lpng -ljpeg                                      \
-+         -lrt -lpthread -ltiff -lpng -ljpeg -lexecinfo \
-          -lclutter-1.0 -lclutter-gtk-1.0                                         \
-          -lchamplain-0.12 -lchamplain-gtk-0.12
+ ifdef DEBUG
+    CFLAGS += -DDEBUG
+@@ -39,14 +41,19 @@ endif
+ JXL_CFLAGS := $(shell pkg-config --cflags libjxl) 
+ JXL_LDFLAGS := $(shell pkg-config --libs libjxl libjxl_threads libhwy            \
+                                      libbrotlicommon libbrotlidec)
+-NETMAP_LDFLAGS := $(shell pkg-config --libs webkit2gtk-4.1)
  
+-LIBS = `$(PKG_CONFIG) --libs gtk+-3.0` -lrt -lpthread -ltiff -lpng -ljpeg
++LIBS = $(shell $(PKG_CONFIG) --libs gtk+-3.0) -lpthread -ltiff -lpng -ljpeg -lexecinfo
+ 
+ ALLFILES = fotocx.o f.widgets.o f.file.o f.gallery.o f.albums.o f.select.o       \
+            f.meta.o f.edit.o f.repair.o f.refine.o f.effects.o f.warp.o          \
+            f.combine.o f.mashup.o f.tools.o f.batch.o f.pixmap.o f.develop.o     \
+-           f.netmap.o zfuncs.o
++           zfuncs.o
++
++ifdef NETMAP_SUPPORT
++CFLAGS += $(shell $(PKG_CONFIG) --cflags webkit2gtk-4.1) -DNETMAP_SUPPORT
++NETMAP_LDFLAGS = $(shell $(PKG_CONFIG) --libs webkit2gtk-4.1)
++ALLFILES += f.netmap.o
++endif
+ 
+ fotocx: $(ALLFILES)
+ 	$(CXX) $(ALLFILES) $(LIBS) -o fotocx $(LDFLAGS) $(JXL_CFLAGS) $(JXL_LDFLAGS) $(NETMAP_LDFLAGS)
diff --git a/graphics/fotocx/files/patch-f.file.cc b/graphics/fotocx/files/patch-f.file.cc
new file mode 100644
index 000000000000..ca2f87c33e45
--- /dev/null
+++ b/graphics/fotocx/files/patch-f.file.cc
@@ -0,0 +1,52 @@
+--- f.file.cc.orig	2026-09-30 11:06:25 UTC
++++ f.file.cc
+@@ -133,12 +133,11 @@ void new_session(ch *args)
+    xx += 100;                                                                          //  shift down and right
+    yy += 100;
+ 
+-   cc = readlink("/proc/self/exe",progexe,300);                                        //  get own program path
+-   if (cc <= 0) {
+-      zmessageACK(Mwin,"cannot get /proc/self/exe");
++   cc = get_prog_path(progexe, sizeof progexe);
++   if (cc == -1) {
++      zmessageACK(Mwin, "could not obtain program path");
+       return;
+    }
+-   progexe[cc] = 0;
+ 
+    if (! args) args = "";
+ 
+@@ -2839,30 +2838,18 @@ void quitxx()
+ void m_uninstall(GtkWidget *, ch *)
+ {
+    zdialog  *zd;
+-   ch       *pp, baseloc[300];
+    ch       text[200];
+-   int      cc;
+ 
+    F1_help_topic = TX("HELP MENU");
+ 
+    printf("m_uninstall \n");
+ 
+-   cc = readlink("/proc/self/exe",baseloc,300);                                        //  get own program path
+-   if (cc <= 0) {                                                                      //  [baseloc]/bin/fotocx
+-      zmessageACK(Mwin,"cannot get /proc/self/exe");
+-      return;
+-   }
+-   baseloc[cc] = 0;
+-
+-   pp = strstr(baseloc,"/bin/");
+-   if (pp) *(pp+1) = 0;
+-   
+-   snprintf(text,200,"Delete fotocx program files: \n"
+-                     "$ sudo find %s -path \"*fotocx*\" -type l,f,d -delete \n"
++   snprintf(text, sizeof text, "Uninstall fotocx package:\n"
++                     "$ sudo pkg del fotocx\n"
+                      "\n"
+                      "Delete fotocx user data: \n"
+                      "$ rm -f -d -R %s",
+-                     baseloc, get_zhomedir());
++                     get_zhomedir());
+    
+    zd = zdialog_new(TX("copy and paste commands"),Mwin,"X",null);
+    zdialog_add_widget(zd,"text","text","dialog",text,"space=3");
diff --git a/graphics/fotocx/files/patch-f.meta.cc b/graphics/fotocx/files/patch-f.meta.cc
new file mode 100644
index 000000000000..84eddcc3d175
--- /dev/null
+++ b/graphics/fotocx/files/patch-f.meta.cc
@@ -0,0 +1,51 @@
+--- f.meta.cc.orig	2026-09-30 11:06:25 UTC
++++ f.meta.cc
+@@ -975,7 +975,9 @@ void m_meta_edit_main(GtkWidget *, ch *menu)
+       zdialog_add_widget(zd,"button","geofind","hbgeo",TX("Find"),"space=5");
+       zdialog_add_widget(zd,"button","geoprev","hbgeo",TX("Previous"),"space=5");      //  25.1
+       zdialog_add_widget(zd,"button","geoclear","hbgeo",TX("Clear"),"space=5");
++#ifdef NETMAP_SUPPORT
+       zdialog_add_widget(zd,"button","geomap","hbgeo",TX("Map"),"space=5");            //  26.7
++#endif
+ 
+       zdialog_add_widget(zd,"hsep","sep","dialog",0,"space=3");
+ 
+@@ -1018,7 +1020,9 @@ void m_meta_edit_main(GtkWidget *, ch *menu)
+       zdialog_add_ttip(zd,"geofind",TX("search known locations"));
+       zdialog_add_ttip(zd,"geoprev",TX("use previous location"));
+       zdialog_add_ttip(zd,"geoclear",TX("clear inputs"));
++#ifdef NETMAP_SUPPORT
+       zdialog_add_ttip(zd,"geomap",TX("set location from world map"));                 //  26.7
++#endif
+ 
+       load_defkeywords(0);                                                             //  stuff defined keywords into dialog
+       defkeywords_stuff(zd,"ALL");
+@@ -1230,6 +1234,7 @@ int editmeta_dialog_event(zdialog *zd, ch *event)
+       return 1;
+    }
+    
++#ifdef NETMAP_SUPPORT
+    if (strmatch(event,"geomap")) {                                                     //  choose geocoordinates from map        26.7
+       m_show_on_map(0,0);
+       return 1;
+@@ -1239,6 +1244,7 @@ int editmeta_dialog_event(zdialog *zd, ch *event)
+       Fmetamod++;
+       return 1;
+    }
++#endif
+    
+    if (strmatch(event,"geoprev"))                                                      //  [previous] use previous location      25.1
+    {
+@@ -4537,10 +4543,12 @@ int batch_geotags_dialog_event(zdialog *zd, ch *event)
+    if (zstat == 1)                                                                     //  [find]
+    {
+       nn = find_location(zd);                                                          //  search image location data            26.0
++#ifdef NETMAP_SUPPORT
+       if (nn < 2) {                                                                    //  multiple geocoordinates?
+          zmessage_post(Mwin,"40/40",3,TX("choose location"));                          //  inform user                           26.7
+          m_show_on_map(0,0);                                                           //  resolve multiple geocoordinates       26.7
+       }
++#endif
+       return 1;
+    }
+ 
diff --git a/graphics/fotocx/files/patch-f.widgets.cc b/graphics/fotocx/files/patch-f.widgets.cc
new file mode 100644
index 000000000000..d7876946df4b
--- /dev/null
+++ b/graphics/fotocx/files/patch-f.widgets.cc
@@ -0,0 +1,43 @@
+--- f.widgets.cc.orig	2026-09-30 11:06:25 UTC
++++ f.widgets.cc
+@@ -454,8 +454,10 @@ void build_widgets()
+    MENU(mGallery,  TX("Select Files"), 0,          select_files_tip,             m_select_files, 0 );
+    MENU(mGallery,  TX("Bookmarks"), 0,             bookmarks_tip,                m_bookmarks, 0 );
+ 
++#ifdef NETMAP_SUPPORT
+    mMaps = create_popmenu();
+    MENU(mMaps,     TX("Show on Map"), 0,         show_on_map_tip,              m_show_on_map,  0 );                          //  26.7
++#endif
+ 
+    mAlbums = create_popmenu();                                                                                               //  25.1
+    MENU(mAlbums,   TX("Create Album"), 0,        create_album_tip,             m_album_create, 0 );
+@@ -828,7 +830,9 @@ void build_widgets()
+    KBshort(TX("Set Colors"),            m_set_colors,              0     );
+    KBshort(TX("Settings"),              m_settings,                0     );
+    KBshort(TX("Sharpen"),               m_sharpen,                 0     );
++#ifdef NETMAP_SUPPORT
+    KBshort(TX("Show on Map"),           m_show_on_map,             0     );
++#endif
+    KBshort(TX("Show Resources"),        m_resources,               0     );
+    KBshort(TX("Metadata Tags"),         m_meta_tags,               0     );
+    KBshort(TX("Timeline"),              m_meta_timeline,           0     );
+@@ -968,7 +972,9 @@ void popup_menufunc(GtkWidget *, ch *menu)
+    if (strmatch(menu,"local contrast")) m_localcon(0,0);
+    if (strmatch(menu,"amplify contrast")) m_amplifycon(0,0);
+    if (strmatch(menu,"saturation")) m_saturation(0,0);
++#ifdef NETMAP_SUPPORT
+    if (strmatch(menu,"show on map")) m_show_on_map(0,0);
++#endif
+    if (strmatch(menu,"add to selection")) add_file_to_selection(curr_file);
+    if (strmatch(menu,"popimage")) gallery_popimage();
+    if (strmatch(menu,"albumaddselfiles")) album_add_selfiles(2);
+@@ -1138,7 +1144,9 @@ void viewmode(ch fgm)                                 
+       Cdrawin = 0;
+       Fgdkwin = 0;
+ 
++#ifdef NETMAP_SUPPORT
+       m_load_netmap(0,0);                                                              //  show internet map
++#endif
+    }
+ 
+    return;
diff --git a/graphics/fotocx/pkg-plist b/graphics/fotocx/pkg-plist
index 0a9aace837b1..b68be0ebc7c5 100644
--- a/graphics/fotocx/pkg-plist
+++ b/graphics/fotocx/pkg-plist
@@ -36,7 +36,6 @@ share/applications/fotocx.desktop
 %%DATADIR%%/data/custom_scripts/sharpen-tiles2-emboss
 %%DATADIR%%/data/custom_scripts/voodoo
 %%DATADIR%%/data/grid_picklist
-%%DATADIR%%/data/map_regions
 %%DATADIR%%/data/markup/raised text effect
 %%DATADIR%%/data/meta_picklist
 %%DATADIR%%/data/meta_report_tags
@@ -124,11 +123,9 @@ share/applications/fotocx.desktop
 %%DATADIR%%/data/patterns/wood.jpg
 %%DATADIR%%/data/plugins
 %%DATADIR%%/data/raw_commands
-%%DATADIR%%/data/slideshow-tone.oga
 %%DATADIR%%/data/translations/$ AI prompts
 %%DATADIR%%/data/translations/$ language codes
 %%DATADIR%%/data/translations/$ translation procedures
-%%DATADIR%%/data/translations/$ undo-redo translations
 %%DATADIR%%/data/translations/gui_de
 %%DATADIR%%/data/translations/gui_el
 %%DATADIR%%/data/translations/gui_en
@@ -138,9 +135,9 @@ share/applications/fotocx.desktop
 %%DATADIR%%/data/translations/gui_hu
 %%DATADIR%%/data/translations/gui_it
 %%DATADIR%%/data/translations/gui_ja
+%%DATADIR%%/data/translations/gui_ko
 %%DATADIR%%/data/translations/gui_pl
 %%DATADIR%%/data/translations/gui_pt
-%%DATADIR%%/data/translations/gui_ro
 %%DATADIR%%/data/translations/gui_ru
 %%DATADIR%%/data/translations/gui_tr
 %%DATADIR%%/data/translations/gui_zh
@@ -153,9 +150,9 @@ share/applications/fotocx.desktop
 %%DATADIR%%/data/translations/ug_hu
 %%DATADIR%%/data/translations/ug_it
 %%DATADIR%%/data/translations/ug_ja
+%%DATADIR%%/data/translations/ug_ko
 %%DATADIR%%/data/translations/ug_pl
 %%DATADIR%%/data/translations/ug_pt
-%%DATADIR%%/data/translations/ug_ro
 %%DATADIR%%/data/translations/ug_ru
 %%DATADIR%%/data/translations/ug_tr
 %%DATADIR%%/data/translations/ug_zh
@@ -334,6 +331,7 @@ share/applications/fotocx.desktop
 %%DATADIR%%/images/search-images.jpg
 %%DATADIR%%/images/select-area-finish.png
 %%DATADIR%%/images/select-area.jpg
+%%DATADIR%%/images/select-hairy.jpg
 %%DATADIR%%/images/select-image-files.jpg
 %%DATADIR%%/images/select.png
 %%DATADIR%%/images/set-colors1.jpg
@@ -384,6 +382,8 @@ share/applications/fotocx.desktop
 %%DATADIR%%/images/vignette2.jpg
 %%DATADIR%%/images/vignette3.png
 %%DATADIR%%/images/warning.png
+%%DATADIR%%/images/warp-linear1.jpg
+%%DATADIR%%/images/warp-linear2.jpg
 %%DATADIR%%/images/warp.png
 %%DATADIR%%/images/warp_radial.png
 %%DATADIR%%/images/warps4.jpg