a thread on tech@ made me discover this little port:

        https://marc.info/?l=openbsd-tech&m=165567563116773&w=2

it seems like a really nice graphical manpager, quickly tested but it's
nice :)

attaching a diff to update it to the latest version.  Upstream changelog
consists only of:

 - change windowing library from FreeGLUT to GLFW (suport for Wayland)
 - add smartcase search - if only lowercase characters are used, search
   case-insensitive

upstream doesn't seem to have updated the bundled copy of mandoc, but at
least it doesn't segfaults at startup anymore as Ingo noticed.

port-wise i've updated the patch for the makefile and removed the
configure.  If upstream provided one it would be nicer, but in the
meantime we can use CONFIGURE_SCRIPT = mandoc/configure and add -I. to
CFLAGS so that it correctly includes config.h (which is now generated in
${WRKSRC} instead that in mandoc/.)

ok?

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/sysutils/mangl/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    11 Mar 2022 19:57:40 -0000      1.4
+++ Makefile    20 Jun 2022 16:43:02 -0000
@@ -3,29 +3,27 @@ CATEGORIES =  sysutils x11
 
 GH_ACCOUNT =   zigalenarcic
 GH_PROJECT =   mangl
-GH_TAGNAME =   v1.0.3
+GH_TAGNAME =   v1.1.0
 
 MAINTAINER =   Brian Callahan <[email protected]>
 
 # BSD
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += GL c freetype glut m util z
+WANTLIB += GL c freetype glfw m util z
 
 DEBUG_PACKAGES =       ${BUILD_PACKAGES}
 
-LIB_DEPENDS =  graphics/freeglut
+LIB_DEPENDS =  graphics/glfw
 
 CONFIGURE_STYLE =      simple
+CONFIGURE_SCRIPT =     mandoc/configure
 
 USE_GMAKE =    Yes
 ALL_TARGET =   mangl
-MAKE_FLAGS =   CC="${CC}" CFLAGS="${CFLAGS} -std=c99"
+MAKE_FLAGS =   CC="${CC}" CFLAGS="${CFLAGS} -std=c99 -I."
 
 NO_TEST =      Yes
-
-do-gen:
-       chmod +x ${WRKSRC}/configure
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/mangl ${PREFIX}/bin
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/sysutils/mangl/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    22 Dec 2020 03:27:42 -0000      1.3
+++ distinfo    20 Jun 2022 16:24:07 -0000
@@ -1,2 +1,2 @@
-SHA256 (mangl-1.0.3.tar.gz) = O1k4HYcwIQL+YtTlGMvxfVVZAyW7fEE/SxagNl9lbOo=
-SIZE (mangl-1.0.3.tar.gz) = 1941169
+SHA256 (mangl-1.1.0.tar.gz) = E9rRU+JtJBuOy+Kh4yXz7VWcyYXCwaDAwn5n3jjNf7A=
+SIZE (mangl-1.1.0.tar.gz) = 1943498
Index: patches/patch-Makefile
===================================================================
RCS file: /home/cvs/ports/sysutils/mangl/patches/patch-Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Makefile
--- patches/patch-Makefile      11 Mar 2022 19:57:40 -0000      1.3
+++ patches/patch-Makefile      20 Jun 2022 16:31:14 -0000
@@ -5,9 +5,9 @@ Index: Makefile
 +++ Makefile
 @@ -1,5 +1,5 @@
 -CFLAGS = -g -O2 -Wall $(shell pkg-config --cflags zlib gl freetype2)
--LDFLAGS = -lm -lglut $(shell pkg-config --libs zlib gl freetype2)
-+CCFLAGS += -Wall $(shell pkg-config --cflags zlib gl freetype2) 
-I${LOCALBASE}/include
-+LDFLAGS += -lm -lutil -L${LOCALBASE}/lib -lglut $(shell pkg-config --libs 
zlib gl freetype2)
+-LDFLAGS = -lm -lglfw $(shell pkg-config --libs zlib gl freetype2)
++CCFLAGS += -Wall $(shell pkg-config --cflags zlib gl freetype2 glfw3)
++LDFLAGS += -lm -lutil $(shell pkg-config --libs zlib gl freetype2 glfw3)
  
  LIBMAN_OBJS    = mandoc/man.o \
                           mandoc/man_macro.o \
@@ -18,5 +18,5 @@ Index: Makefile
 -      $(CC) $(CFLAGS) -o $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(MANGL_SOURCES) 
$(LDFLAGS)
 +      $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) 
$(MANGL_SOURCES) $(LDFLAGS)
  
- .PHONY: install
- install: mangl
+ sanitizer: CFLAGS += -fsanitize=address
+ sanitizer: mangl
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure     11 Mar 2022 19:57:40 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-Need to configure mandoc separately before building.
-
-Index: configure
---- configure.orig
-+++ configure
-@@ -0,0 +1,3 @@
-+#!/bin/sh
-+
-+cd mandoc && ./configure

Reply via email to