Hi,

Here is an update for qiv to 2.3.2. It brings many bugfixes and
runtime changes [0].

There are a number of changes port-wise:

- move HOMEPAGE to https, refresh WANTLIB
- fix improper manpath [0] -- i reported to upstream thinking it was
  an OpenBSD quirk. I had a fix, but upstream committed one with a 
  greater scope.
- fix "implicit conversion from 'int' to 'float'" warnings while
  building with clang-10 (upstreamed [0])

I've built and run that update on macppc and amd64 without issues.

Comments/feedback are welcome,

Charlène.


[0] https://spiegl.de/qiv/changes.shtml
[1] https://codeberg.org/ciberandy/qiv/commit/195fe9d5


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/qiv/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile    12 Jul 2019 20:47:09 -0000      1.30
+++ Makefile    12 Dec 2020 13:18:32 -0000
@@ -2,23 +2,22 @@
 
 COMMENT=               very small and pretty fast gdk/Imlib image viewer
 
-DISTNAME=              qiv-2.3.1
+DISTNAME=              qiv-2.3.2
 CATEGORIES=            graphics
-REVISION=              0
 
 EXTRACT_SUFX=          .tgz
 
-HOMEPAGE=              http://spiegl.de/qiv/
+HOMEPAGE=              https://spiegl.de/qiv/
 
 MASTER_SITES=          ${HOMEPAGE}/download/
 
 # GPLv2
 PERMIT_PACKAGE=        Yes
 
-WANTLIB =  Imlib2 X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
-WANTLIB += Xrandr Xrender c cairo exif fontconfig freetype gdk-x11-2.0
-WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 iconv intl jpeg
-WANTLIB += lcms2 m magic pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread
+WANTLIB += Imlib2 X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi
+WANTLIB += Xinerama Xrandr Xrender c cairo exif fontconfig freetype
+WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
+WANTLIB += harfbuzz intl jpeg lcms2 magic pango-1.0 pangocairo-1.0
 WANTLIB += tiff z
 
 LIB_DEPENDS=           devel/libmagic \
Index: distinfo
===================================================================
RCS file: /cvs/ports/graphics/qiv/distinfo,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 distinfo
--- distinfo    23 Aug 2014 14:33:07 -0000      1.8
+++ distinfo    12 Dec 2020 13:18:32 -0000
@@ -1,2 +1,2 @@
-SHA256 (qiv-2.3.1.tgz) = Z1OWtTnmURE1/nPIZ/n91tkSwkx1Ynl8sEfCfQwsjuY=
-SIZE (qiv-2.3.1.tgz) = 130621
+SHA256 (qiv-2.3.2.tgz) = SOCgiKDVz1+sIxSmCzrtYsSRPnkmJ/ZPA5hoZa1wgNU=
+SIZE (qiv-2.3.2.tgz) = 133614
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/graphics/qiv/patches/patch-Makefile,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 patch-Makefile
--- patches/patch-Makefile      23 Aug 2014 14:33:07 -0000      1.8
+++ patches/patch-Makefile      12 Dec 2020 13:18:32 -0000
@@ -1,6 +1,11 @@
 $OpenBSD: patch-Makefile,v 1.8 2014/08/23 14:33:07 kirby Exp $
---- Makefile.orig      Fri Dec 20 04:50:37 2013
-+++ Makefile   Thu Aug 14 14:06:52 2014
+
+Hunk #4 is a fix for bogus manpaths that can be removed for qiv>2.3.2,
+see https://codeberg.org/ciberandy/qiv/commit/195fe9d5
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
 @@ -4,7 +4,7 @@
  #######################################################################
  
@@ -8,9 +13,9 @@ $OpenBSD: patch-Makefile,v 1.8 2014/08/2
 -PREFIX = /usr/local
 +PREFIX ?= /usr/local
  
- # Font to use for statusbar in fullscreen mode
+ # Fonts to use for statusbar and comments
  STATUSBAR_FONT = "Monospace 9"
-@@ -30,7 +30,7 @@ GETOPT_LONG = -DHAVE_GETOPT_LONG
+@@ -31,7 +31,7 @@ GETOPT_LONG = -DHAVE_GETOPT_LONG
  
  # This program will be run on the manual page after it is installed.
  # If you don't want to compress the manpage, change it to 'true'.
@@ -19,23 +24,35 @@ $OpenBSD: patch-Makefile,v 1.8 2014/08/2
  
  # Comment this line out if your system doesn't have lcms2 installed
  # (for minimal Color Management support)
-@@ -49,11 +49,11 @@ EXIF = -DHAVE_EXIF
- # Do not edit below here!
+@@ -51,14 +51,12 @@ EXIF = -DHAVE_EXIF
  ######################################################################
  
--CC        = gcc
-+CC        ?= gcc
+ ifeq ($(origin CC),default)
+-CC = gcc
++CC ?= gcc
+ endif
+ 
+ PKG_CONFIG ?= pkg-config
  #CFLAGS    = -O0 -g -Wall
 -CFLAGS    = -O2 -Wall \
 -          -fcaller-saves -ffast-math -fno-strength-reduce \
 -          -fthread-jumps #-march=pentium #-DSTAT_MACROS_BROKEN
-+#CFLAGS    = -O2 -Wall \
-+#         -fcaller-saves -ffast-math -fno-strength-reduce \
-+#         -fthread-jumps #-march=pentium #-DSTAT_MACROS_BROKEN
++CFLAGS    = -Wall
  #CFLAGS    = -O2 -Wall -fomit-frame-pointer -finline-functions \
  #         -fcaller-saves -ffast-math -fno-strength-reduce \
  #         -fthread-jumps #-march=pentium #-DSTAT_MACROS_BROKEN
-@@ -159,10 +159,6 @@ install: $(PROGRAM)
+@@ -153,8 +151,8 @@ install: $(PROGRAM)
+         echo install -d -m 0755 $(PREFIX)/man/man1; \
+         install -d -m 0755 $(PREFIX)/man/man1; \
+       fi
+-      install -m 0644 $(PROGRAM).1 $(PREFIX)/share/man/man1
+-      $(COMPRESS_PROG) $(PREFIX)/share/man/man1/$(PROGRAM).1
++      install -m 0644 $(PROGRAM).1 $(PREFIX)/man/man1
++      $(COMPRESS_PROG) $(PREFIX)/man/man1/$(PROGRAM).1
+       @if [ ! -e $(PREFIX)/share/pixmaps ]; then \
+         echo install -d -m 0755 $(PREFIX)/share/pixmaps; \
+         install -d -m 0755 $(PREFIX)/share/pixmaps; \
+@@ -165,10 +163,6 @@ install: $(PROGRAM)
          install -d -m 0755 $(PREFIX)/share/applications; \
        fi
        install -m 0644 qiv.desktop $(PREFIX)/share/applications/qiv.desktop
Index: patches/patch-options_c
===================================================================
RCS file: patches/patch-options_c
diff -N patches/patch-options_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-options_c     12 Dec 2020 13:18:32 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix "implicit conversion from 'int' to 'float' changes value from
+2147483647 to 2147483648"
+From https://codeberg.org/ciberandy/qiv/commit/195fe9d5
+
+Index: options.c
+--- options.c.orig
++++ options.c
+@@ -395,7 +395,7 @@ void options_read(int argc, char **argv, qiv_image *q)
+         char *fn;
+         int i, p;
+         for (i=0;i<images;i++) { /* simple insertion sort, fine for small num 
*/
+-          p = (int)(((float)rand()/RAND_MAX) * (images-i)) + i;
++          p = (int)(((float)rand()/(float)RAND_MAX) * (images-i)) + i;
+           fn = image_names[i];
+           image_names[i] = image_names[p];
+           image_names[p] = fn;
Index: patches/patch-qiv_1
===================================================================
RCS file: /cvs/ports/graphics/qiv/patches/patch-qiv_1,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-qiv_1
--- patches/patch-qiv_1 23 Aug 2014 14:33:07 -0000      1.1
+++ patches/patch-qiv_1 12 Dec 2020 13:18:32 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-qiv_1,v 1.1 2014/08/23 14:33:07 kirby Exp $
---- qiv.1.orig Thu Aug 14 14:33:47 2014
-+++ qiv.1      Thu Aug 14 14:37:26 2014
-@@ -307,6 +307,7 @@ changed to this new name and updates its internal file
+Index: qiv.1
+--- qiv.1.orig
++++ qiv.1
+@@ -322,6 +322,7 @@ changed to this new name and updates its internal file
  This is very useful when using qiv-command to rename files.
  .P
  Please also see the example that came together with qiv.
Index: patches/patch-utils_c
===================================================================
RCS file: patches/patch-utils_c
diff -N patches/patch-utils_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-utils_c       12 Dec 2020 13:18:32 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix "implicit conversion from 'int' to 'float' changes value from
+2147483647 to 2147483648"
+From https://codeberg.org/ciberandy/qiv/commit/195fe9d5
+
+Index: utils.c
+--- utils.c.orig
++++ utils.c
+@@ -608,7 +608,7 @@ int get_random(int replace, int num, int direction)
+ 
+       for (n=0;n<num;n++)   /* simple insertion sort, fine for num small */
+       {
+-        p=(int)(((float)rand()/RAND_MAX) * (num-n)) + n ; /* n <= p < num */
++        p=(int)(((float)rand()/(float)RAND_MAX) * (num-n)) + n ; /* n <= p < 
num */
+         q=rindices[n];
+         rindices[n]=rindices[p]; /* Switch the two numbers to make random 
order */
+         rindices[p]=q;

Reply via email to