On Sun, Feb 12, 2017 at 06:51:06PM +0100, Joerg Jung wrote:
> 
> > On 31 Jan 2017, at 10:43, Landry Breuil <lan...@openbsd.org> wrote:
> > 
> > Hi,
> > 
> > so the following ports use www/webkit or www/webkit,gtk3:
> > 
> > cad/xtrkcad
> > graphics/ebook-viewer
> > mail/claws-mail
> > mail/geary
> > productivity/gnucash
> > www/luakit
> > www/midori
> > www/surf
> > www/vimb
> > 
> > www/webkit is the 2.4 branch, which is dead/abandoned/unmaintained
> > upstream, cf
> > https://blogs.gnome.org/mcatanzaro/2016/02/01/on-webkit-security-updates/
> > and https://lists.webkit.org/pipermail/webkit-gtk/2016-September/002779.html
> > 
> > The security circus being what it is (OMG YOUR OS SHIPS AN INSECURE
> > LIBRARY STOP THE PRESS IM GOING TO SHAME YOU ON TWITTER), it would be
> > nice to get rid of this, so can the ones maintaining those ports try to
> > reach the respective upstreams and see if there's a way to make those
> > ports use www/webkitgtk4 (which is maintained, until upstream webkit
> > becomes crazy again..) ? gmpc-wikipedia and py-webkitgtk have already
> > been removed.
> > 
> > I'll have a look at what can be done for geary and midori. As for surf,
> > there's surf2… ?
> 
> While surf is still under active development and repo is seeing commits,
> there seem to be no interest from the upstream maintainers to move
> to a newer webkit.
> AFAIK, surf2 is just a hand-rolled tarball from “experimental” branch 
> and has it’s own problems. 

Meanwhile, suckless upstream switched main surf repo to formerly surf2 
branch and released a 2.0 tarball.

Please find below a diff which brings surf to the latest release.

OK?

I think, once this is in, www/surf2 can be removed.

Thanks,
Regards,
Joerg


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/surf/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile    23 Dec 2015 20:40:03 -0000      1.22
+++ Makefile    23 May 2017 21:38:56 -0000
@@ -2,7 +2,7 @@
 
 COMMENT =      simple webbrowser based on webkit/gtk+
 
-DISTNAME =     surf-0.7
+DISTNAME =     surf-2.0
 CATEGORIES =   www
 HOMEPAGE =     http://surf.suckless.org/
 
@@ -11,18 +11,16 @@ MAINTAINER= Joerg Jung <j...@openbsd.org
 # MIT
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
-WANTLIB += Xrandr Xrender atk-1.0 c cairo fontconfig freetype
-WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
-WANTLIB += gtk-x11-2.0 javascriptcoregtk-1.0 pango-1.0 pangocairo-1.0
-WANTLIB += pangoft2-1.0 pthread soup-2.4 webkitgtk-1.0 z
+WANTLIB += X11 atk-1.0 c cairo cairo-gobject gdk-3 gdk_pixbuf-2.0
+WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gtk-3 javascriptcoregtk-4.0
+WANTLIB += pango-1.0 pangocairo-1.0 soup-2.4 webkit2gtk-4.0 intl
 
 MASTER_SITES = http://dl.suckless.org/surf/
 
-MODULES =      devel/gettext
-
-LIB_DEPENDS =  www/webkit>=1.6.1v0
-RUN_DEPENDS =  x11/dmenu
+LIB_DEPENDS =  devel/gettext \
+               www/webkitgtk4
+RUN_DEPENDS =  x11/dmenu \
+               net/curl
 
 # webkit browsing
 RUN_DEPENDS += multimedia/gstreamer1/plugins-libav
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/surf/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo    23 Dec 2015 20:40:03 -0000      1.6
+++ distinfo    23 May 2017 21:38:56 -0000
@@ -1,2 +1,2 @@
-SHA256 (surf-0.7.tar.gz) = lWCFRvtk0Bx6gVPDVr4OKE6+Egw8WWqU6z861H4cSUo=
-SIZE (surf-0.7.tar.gz) = 18792
+SHA256 (surf-2.0.tar.gz) = +u5MemLDj8l5Hv8a0GeHw8myt58ziAaCf1FSp7xUlR0=
+SIZE (surf-2.0.tar.gz) = 19056
Index: patches/patch-config_def_h
===================================================================
RCS file: /cvs/ports/www/surf/patches/patch-config_def_h,v
retrieving revision 1.4
diff -u -p -r1.4 patch-config_def_h
--- patches/patch-config_def_h  23 Dec 2015 20:40:03 -0000      1.4
+++ patches/patch-config_def_h  23 May 2017 21:38:56 -0000
@@ -1,43 +1,22 @@
 $OpenBSD: patch-config_def_h,v 1.4 2015/12/23 20:40:03 jung Exp $
---- config.def.h.orig  Sat Dec 19 15:59:30 2015
-+++ config.def.h       Sat Dec 19 20:45:50 2015
-@@ -16,9 +16,9 @@ static gfloat zoomlevel = 1.0;       /* Default zoom l
- 
- /* Soup default features */
- static char *cookiefile     = "~/.surf/cookies.txt";
--static char *cookiepolicies = "Aa@"; /* A: accept all; a: accept nothing,
-+static char *cookiepolicies = "@Aa"; /* A: accept all; a: accept nothing,
-                                       * @: accept all except third party */
--static char *cafile         = "/etc/ssl/certs/ca-certificates.crt";
-+static char *cafile         = "/etc/ssl/cert.pem";
- static Bool strictssl       = FALSE; /* Refuse untrusted SSL connections */
- static time_t sessiontime   = 3600;
- 
-@@ -29,11 +29,11 @@ static Bool enablediskcache       = TRUE;
- static int diskcachebytes         = 5 * 1024 * 1024;
- static Bool enableplugins         = TRUE;
- static Bool enablescripts         = TRUE;
--static Bool enableinspector       = TRUE;
-+static Bool enableinspector       = FALSE;
- static Bool enablestyle           = TRUE;
- static Bool loadimages            = TRUE;
- static Bool hidebackground        = FALSE;
--static Bool allowgeolocation      = TRUE;
-+static Bool allowgeolocation      = FALSE;
- 
- #define SETPROP(p, q) { \
-       .v = (char *[]){ "/bin/sh", "-c", \
-@@ -48,10 +48,9 @@ static Bool allowgeolocation      = TRUE;
+Index: config.def.h
+--- config.def.h.orig
++++ config.def.h
+@@ -30,7 +30,7 @@ static Parameter defconfig[ParameterLast] = {
+       SETB(SiteQuirks,         1),
+       SETB(SpellChecking,      0),
+       SETV(SpellLanguages,     ((char *[]){ "en_US", NULL })),
+-      SETB(StrictSSL,          0),
++      SETB(StrictSSL,          1),
+       SETB(Style,              1),
+       SETF(ZoomLevel,          1.0),
+ };
+@@ -58,7 +58,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTION
  /* DOWNLOAD(URI, referer) */
  #define DOWNLOAD(d, r) { \
-       .v = (char *[]){ "/bin/sh", "-c", \
--           "st -e /bin/sh -c \"curl -L -J -O --user-agent '$1'" \
--           " --referer '$2' -b $3 -c $3 '$0';" \
--           " sleep 5;\"", \
--           d, useragent, r, cookiefile, NULL \
-+           "xterm -e \"ftp -c '$2' -U '$1' '$0';" \
-+           "sleep 5;\"", \
-+           d, useragent, cookiefile, NULL \
-       } \
- }
- 
+         .v = (const char *[]){ "/bin/sh", "-c", \
+-             "st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \
++             "xterm -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \
+              " --referer '$2' -b $3 -c $3 '$0';" \
+              " sleep 5;\"", \
+              d, useragent, r, cookiefile, NULL \
Index: patches/patch-config_mk
===================================================================
RCS file: /cvs/ports/www/surf/patches/patch-config_mk,v
retrieving revision 1.7
diff -u -p -r1.7 patch-config_mk
--- patches/patch-config_mk     23 Dec 2015 20:40:03 -0000      1.7
+++ patches/patch-config_mk     23 May 2017 21:38:56 -0000
@@ -1,25 +1,26 @@
 $OpenBSD: patch-config_mk,v 1.7 2015/12/23 20:40:03 jung Exp $
-use TRUEPREFIX instead of patching Makefile to remove DESTDIR
---- config.mk.orig     Sat Dec 19 15:59:30 2015
-+++ config.mk  Sat Dec 19 20:58:35 2015
-@@ -4,27 +4,27 @@ VERSION = 0.7
+Index: config.mk
+--- config.mk.orig
++++ config.mk
+@@ -4,28 +4,28 @@ VERSION = 2.0
  # Customize below to fit your system
  
  # paths
 -PREFIX = /usr/local
 -MANPREFIX = ${PREFIX}/share/man
-+PREFIX ?= /usr/local 
++PREFIX ?= /usr/local
 +MANPREFIX = ${PREFIX}/man
+ LIBPREFIX = ${PREFIX}/lib/surf
  
 -X11INC = /usr/X11R6/include
 -X11LIB = /usr/X11R6/lib
 +X11INC = ${X11BASE}/include
 +X11LIB = ${X11BASE}/lib
  
--GTKINC = `pkg-config --cflags gtk+-2.0 webkit-1.0`
--GTKLIB = `pkg-config --libs gtk+-2.0 webkit-1.0`
-+GTKINC != pkg-config --cflags gtk+-2.0 webkit-1.0
-+GTKLIB != pkg-config --libs gtk+-2.0 webkit-1.0
+-GTKINC = `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0`
+-GTKLIB = `pkg-config --libs gtk+-3.0 webkit2gtk-4.0`
++GTKINC != pkg-config --cflags gtk+-3.0 webkit2gtk-4.0
++GTKLIB != pkg-config --libs gtk+-3.0 webkit2gtk-4.0
  
  # includes and libs
 -INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
@@ -28,11 +29,11 @@ use TRUEPREFIX instead of patching Makef
 +LIBS = -L${X11LIB} -lX11 ${GTKLIB}
  
  # flags
--CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
+-CPPFLAGS = -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" 
-D_DEFAULT_SOURCE
 -CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
--LDFLAGS = -g ${LIBS}
-+CPPFLAGS += -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
-+CFLAGS += -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+-LDFLAGS = -s ${LIBS}
++CPPFLAGS += -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" 
-D_DEFAULT_SOURCE
++CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
 +LDFLAGS += ${LIBS}
  
  # Solaris

Reply via email to