git: f9faa4a89b57 - main - www/deforaos-surfer: Add back latest version 0.3.1

From: Olivier Cochard <olivier_at_FreeBSD.org>
Date: Thu, 23 Nov 2023 12:34:33 UTC
The branch main has been updated by olivier:

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

commit f9faa4a89b5788a6f323c00a5fba5d419bfe433e
Author:     Pierre Pronchery <khorben@defora.org>
AuthorDate: 2023-11-23 00:20:54 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2023-11-23 12:30:51 +0000

    www/deforaos-surfer: Add back latest version 0.3.1
    
    DeforaOS desktop web browser
    WWW:    https://www.defora.org/
---
 MOVED                                              |  1 -
 www/Makefile                                       |  1 +
 www/deforaos-surfer/Makefile                       | 40 +++++++++++
 www/deforaos-surfer/distinfo                       |  3 +
 www/deforaos-surfer/files/patch-doc_Makefile       | 23 +++++++
 www/deforaos-surfer/files/patch-src_Makefile       | 80 ++++++++++++++++++++++
 www/deforaos-surfer/files/patch-src_download.c     | 12 ++++
 www/deforaos-surfer/files/patch-src_ghtml-webkit.c | 21 ++++++
 www/deforaos-surfer/files/patch-tools_Makefile     | 17 +++++
 www/deforaos-surfer/pkg-descr                      |  1 +
 www/deforaos-surfer/pkg-plist                      | 17 +++++
 11 files changed, 215 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index 20f0b2c5982f..8f335b3c5a8e 100644
--- a/MOVED
+++ b/MOVED
@@ -1472,7 +1472,6 @@ mail/claws-mail-fancy||2019-03-24|Has expired: webkit-gtk* last release in 2016
 multimedia/miro||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
 net/libproxy-webkit||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
 net-im/hotot||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
-www/deforaos-surfer||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
 www/gnome-web-photo||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issue
 www/hs-webkit||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
 www/p5-Gtk2-WebKit||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues
diff --git a/www/Makefile b/www/Makefile
index 7363c1f0c891..851729548418 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -132,6 +132,7 @@
     SUBDIR += davix
     SUBDIR += dddbl
     SUBDIR += ddgr
+    SUBDIR += deforaos-surfer
     SUBDIR += deno
     SUBDIR += devd
     SUBDIR += dezoomify-rs
diff --git a/www/deforaos-surfer/Makefile b/www/deforaos-surfer/Makefile
new file mode 100644
index 000000000000..0a1a0151b33a
--- /dev/null
+++ b/www/deforaos-surfer/Makefile
@@ -0,0 +1,40 @@
+PORTNAME=	surfer
+PORTVERSION=	0.3.1
+CATEGORIES=	www
+MASTER_SITES=	https://ftp.defora.org/pub/DeforaOS/Apps/Desktop/src/Surfer/
+PKGNAMEPREFIX=	deforaos-
+DISTNAME=	Surfer-${PORTVERSION}
+
+MAINTAINER=	olivier@FreeBSD.org
+COMMENT=	DeforaOS desktop web browser
+WWW=		https://www.defora.org/
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libSystem.so:devel/deforaos-libsystem \
+		libDesktop.so:x11/deforaos-libdesktop \
+		libwebkit2gtk-4.0.so:www/webkit2-gtk3 \
+		libharfbuzz.so:print/harfbuzz \
+		libsoup-2.4.so:devel/libsoup
+
+USES=		gnome desktop-file-utils pkgconfig gettext
+USE_XORG=	x11
+USE_GNOME=	gtk30 cairo gdkpixbuf2
+
+MAKE_ARGS=	PREFIX=${PREFIX}
+MAKE_ENV+=	MANDIR=${STAGEDIR}${MANPREFIX}/man
+
+OPTIONS_DEFINE=	DOCS
+OPTIONS_SUB=	yes
+DOCS_BUILD_DEPENDS=	xsltproc:textproc/libxslt \
+	${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl
+
+post-patch-DOCS-off:
+	${REINPLACE_CMD} 's|= data doc|= data|' \
+		${WRKSRC}/Makefile
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
+
+.include <bsd.port.mk>
diff --git a/www/deforaos-surfer/distinfo b/www/deforaos-surfer/distinfo
new file mode 100644
index 000000000000..1ae939c7f5d6
--- /dev/null
+++ b/www/deforaos-surfer/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1700695138
+SHA256 (Surfer-0.3.1.tar.gz) = 792c8c7e62226aa099e3f40597a91871eff7b094fce49e67602019a877a3ac22
+SIZE (Surfer-0.3.1.tar.gz) = 105578
diff --git a/www/deforaos-surfer/files/patch-doc_Makefile b/www/deforaos-surfer/files/patch-doc_Makefile
new file mode 100644
index 000000000000..46762cb6d693
--- /dev/null
+++ b/www/deforaos-surfer/files/patch-doc_Makefile
@@ -0,0 +1,23 @@
+--- doc/Makefile.orig	2023-11-23 00:09:28 UTC
++++ doc/Makefile
+@@ -1,4 +1,4 @@
+-TARGETS	= $(OBJDIR)download.1 $(OBJDIR)download.html $(OBJDIR)download.xml $(OBJDIR)helper.1 $(OBJDIR)helper.html $(OBJDIR)helper.xml $(OBJDIR)htmlapp.1 $(OBJDIR)htmlapp.html $(OBJDIR)htmlapp.xml $(OBJDIR)surfer.1 $(OBJDIR)surfer.html $(OBJDIR)surfer.xml
++TARGETS	= $(OBJDIR)helper.1 $(OBJDIR)helper.xml $(OBJDIR)htmlapp.1 $(OBJDIR)htmlapp.xml $(OBJDIR)surfer.1 $(OBJDIR)surfer.xml
+ OBJDIR	=
+ PREFIX	= /usr/local
+ DESTDIR	=
+@@ -64,14 +64,9 @@ install: all
+ 	$(RM) -- $(TARGETS)
+ 
+ install: all
+-	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)download.1"
+-	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)download.html"
+ 	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)helper.1"
+-	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)helper.html"
+ 	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)htmlapp.1"
+-	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)htmlapp.html"
+ 	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)surfer.1"
+-	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "$(OBJDIR)surfer.html"
+ 
+ uninstall:
+ 	./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "download.1"
diff --git a/www/deforaos-surfer/files/patch-src_Makefile b/www/deforaos-surfer/files/patch-src_Makefile
new file mode 100644
index 000000000000..03efe8125098
--- /dev/null
+++ b/www/deforaos-surfer/files/patch-src_Makefile
@@ -0,0 +1,80 @@
+--- src/Makefile.orig	2022-11-15 01:17:05 UTC
++++ src/Makefile
+@@ -1,15 +1,16 @@ SUBDIRS	= common
+ SUBDIRS	= common
+-TARGETS	= $(OBJDIR)download$(EXEEXT) $(OBJDIR)surfer$(EXEEXT)
++TARGETS	= $(OBJDIR)surfer$(EXEEXT)
+ OBJDIR	=
+ PREFIX	= /usr/local
+ DESTDIR	=
+ BINDIR	= $(PREFIX)/bin
+ SBINDIR	= $(PREFIX)/sbin
+ CC	= cc
+-CPPFLAGSF=
++CPPFLAGSF= -D WITH_WEBKIT2
+ CPPFLAGS=
+-CFLAGSF	=
++CFLAGSF	= `pkg-config --cflags libDesktop gtk+-x11-3.0 webkit2gtk-4.0`
+ CFLAGS	= -W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
++LDFLAGSF= `pkg-config --libs libDesktop gtk+-x11-3.0 webkit2gtk-4.0` -lintl
+ LDFLAGS	= -pie -Wl,-z,relro -Wl,-z,now
+ EXEEXT	=
+ RM	= rm -f
+@@ -27,13 +28,6 @@ subdirs:
+ 		$(MAKE) OBJDIR="$(OBJDIR)$$i/"; \
+ 		else $(MAKE); fi) || exit; done
+ 
+-download_OBJS = $(OBJDIR)download.o
+-download_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
+-download_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
+-
+-$(OBJDIR)download$(EXEEXT): $(download_OBJS)
+-	$(CC) -o $(OBJDIR)download$(EXEEXT) $(download_OBJS) $(download_LDFLAGS)
+-
+ surfer_OBJS = $(OBJDIR)surfer.o $(OBJDIR)ghtml.o $(OBJDIR)callbacks.o $(OBJDIR)main.o
+ surfer_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
+ surfer_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
+@@ -41,9 +35,6 @@ $(OBJDIR)surfer$(EXEEXT): $(surfer_OBJS)
+ $(OBJDIR)surfer$(EXEEXT): $(surfer_OBJS)
+ 	$(CC) -o $(OBJDIR)surfer$(EXEEXT) $(surfer_OBJS) $(surfer_LDFLAGS)
+ 
+-$(OBJDIR)download.o: download.c download.h ../config.h
+-	$(CC) -D WITH_MAIN $(download_CFLAGS) -o $(OBJDIR)download.o -c download.c
+-
+ $(OBJDIR)surfer.o: surfer.c callbacks.h common/find.c download.c download.h surfer.h ../config.h
+ 	$(CC) $(surfer_CFLAGS) -o $(OBJDIR)surfer.o -c surfer.c
+ 
+@@ -61,14 +52,14 @@ clean:
+ 		if [ -n "$(OBJDIR)" ]; then \
+ 		$(MAKE) OBJDIR="$(OBJDIR)$$i/" clean; \
+ 		else $(MAKE) clean; fi) || exit; done
+-	$(RM) -- $(download_OBJS) $(surfer_OBJS)
++	$(RM) -- $(surfer_OBJS)
+ 
+ distclean:
+ 	@for i in $(SUBDIRS); do (cd "$$i" && \
+ 		if [ -n "$(OBJDIR)" ]; then \
+ 		$(MAKE) OBJDIR="$(OBJDIR)$$i/" distclean; \
+ 		else $(MAKE) distclean; fi) || exit; done
+-	$(RM) -- $(download_OBJS) $(surfer_OBJS)
++	$(RM) -- $(surfer_OBJS)
+ 	$(RM) -- $(TARGETS)
+ 
+ install: all
+@@ -77,8 +68,6 @@ install: all
+ 		$(MAKE) OBJDIR="$(OBJDIR)$$i/" install; \
+ 		else $(MAKE) install; fi) || exit; done
+ 	$(MKDIR) $(DESTDIR)$(BINDIR)
+-	$(INSTALL) -m 0755 $(OBJDIR)download$(EXEEXT) $(DESTDIR)$(BINDIR)/download$(EXEEXT)
+-	$(MKDIR) $(DESTDIR)$(BINDIR)
+ 	$(INSTALL) -m 0755 $(OBJDIR)surfer$(EXEEXT) $(DESTDIR)$(BINDIR)/surfer$(EXEEXT)
+ 
+ uninstall:
+@@ -86,7 +75,6 @@ uninstall:
+ 		if [ -n "$(OBJDIR)" ]; then \
+ 		$(MAKE) OBJDIR="$(OBJDIR)$$i/" uninstall; \
+ 		else $(MAKE) uninstall; fi) || exit; done
+-	$(RM) -- $(DESTDIR)$(BINDIR)/download$(EXEEXT)
+ 	$(RM) -- $(DESTDIR)$(BINDIR)/surfer$(EXEEXT)
+ 
+ .PHONY: all subdirs clean distclean install uninstall
diff --git a/www/deforaos-surfer/files/patch-src_download.c b/www/deforaos-surfer/files/patch-src_download.c
new file mode 100644
index 000000000000..d647fb0dff0d
--- /dev/null
+++ b/www/deforaos-surfer/files/patch-src_download.c
@@ -0,0 +1,12 @@
+--- src/download.c.orig	2022-11-15 01:17:05 UTC
++++ src/download.c
+@@ -39,6 +39,9 @@
+ # include <sys/types.h>
+ # include <sys/socket.h>
+ # include <netdb.h>
++# include <sys/types.h>
++# include <sys/socket.h>
++# include <netinet/in.h>
+ # include <arpa/inet.h>
+ # include <webkit/webkit.h>
+ #elif defined(WITH_WEBKIT2)
diff --git a/www/deforaos-surfer/files/patch-src_ghtml-webkit.c b/www/deforaos-surfer/files/patch-src_ghtml-webkit.c
new file mode 100644
index 000000000000..69b9d2695a8c
--- /dev/null
+++ b/www/deforaos-surfer/files/patch-src_ghtml-webkit.c
@@ -0,0 +1,21 @@
+--- src/ghtml-webkit.c.orig	2022-11-15 01:17:05 UTC
++++ src/ghtml-webkit.c
+@@ -22,6 +22,9 @@
+ #include <errno.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <libintl.h>
+ #include <webkit/webkit.h>
+@@ -207,7 +210,7 @@ static void _new_init(GHtml * ghtml)
+ 	{
+ 		"/etc/pki/tls/certs/ca-bundle.crt",
+ 		"/etc/ssl/certs/ca-certificates.crt",
+-		"/etc/openssl/certs/ca-certificates.crt",
++		"/etc/ssl/cert.pem",
+ 		PREFIX "/etc/ssl/certs/ca-certificates.crt",
+ 		PREFIX "/etc/openssl/certs/ca-certificates.crt"
+ 	};
diff --git a/www/deforaos-surfer/files/patch-tools_Makefile b/www/deforaos-surfer/files/patch-tools_Makefile
new file mode 100644
index 000000000000..6accaa92ee26
--- /dev/null
+++ b/www/deforaos-surfer/files/patch-tools_Makefile
@@ -0,0 +1,17 @@
+--- tools/Makefile.orig	2023-11-22 23:50:08 UTC
++++ tools/Makefile
+@@ -6,11 +6,11 @@ CC	= cc
+ BINDIR	= $(PREFIX)/bin
+ SBINDIR	= $(PREFIX)/sbin
+ CC	= cc
+-CPPFLAGSF= -I ../src
++CPPFLAGSF= -D WITH_WEBKIT2 -I ../src
+ CPPFLAGS=
+-CFLAGSF	= `pkg-config --cflags libDesktop`
++CFLAGSF	= `pkg-config --cflags libDesktop gtk+-x11-3.0 webkit2gtk-4.0`
+ CFLAGS	= -W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
+-LDFLAGSF= `pkg-config --libs libDesktop`
++LDFLAGSF= `pkg-config --libs libDesktop gtk+-x11-3.0 webkit2gtk-4.0` -lintl
+ LDFLAGS	= -pie -Wl,-z,relro -Wl,-z,now
+ EXEEXT	=
+ RM	= rm -f
diff --git a/www/deforaos-surfer/pkg-descr b/www/deforaos-surfer/pkg-descr
new file mode 100644
index 000000000000..0aa581d112cc
--- /dev/null
+++ b/www/deforaos-surfer/pkg-descr
@@ -0,0 +1 @@
+DeforaOS desktop web browser
diff --git a/www/deforaos-surfer/pkg-plist b/www/deforaos-surfer/pkg-plist
new file mode 100644
index 000000000000..1432920e237e
--- /dev/null
+++ b/www/deforaos-surfer/pkg-plist
@@ -0,0 +1,17 @@
+bin/helper
+bin/htmlapp
+bin/surfer
+%%PORTDOCS%%man/man1/helper.1.gz
+%%PORTDOCS%%man/man1/htmlapp.1.gz
+%%PORTDOCS%%man/man1/surfer.1.gz
+share/applications/org.defora.helper.desktop
+share/applications/org.defora.htmlapp.desktop
+share/applications/org.defora.surfer.desktop
+share/icons/hicolor/16x16/apps/surfer-view-html-source.png
+share/icons/hicolor/24x24/apps/surfer-view-html-source.png
+share/doc/Surfer/COPYING
+share/doc/Surfer/README.md
+share/locale/de/LC_MESSAGES/Surfer.mo
+share/locale/es/LC_MESSAGES/Surfer.mo
+share/locale/fr/LC_MESSAGES/Surfer.mo
+share/locale/it/LC_MESSAGES/Surfer.mo