On 2021/08/15 18:13, Rafael Sadowski wrote:
> Looks like scrot has found a new home, so please find below a simple
> update diff. Used on amd64 for a while.
>
> Rafael
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/scrot/Makefile,v
> retrieving revision 1.17
> diff -u -p -u -p -r1.17 Makefile
> --- Makefile 12 Jul 2019 20:47:10 -0000 1.17
> +++ Makefile 15 Aug 2021 16:10:59 -0000
> @@ -2,22 +2,19 @@
>
> COMMENT= commandline screen capture util
>
> -DISTNAME= scrot-0.8
> -REVISION = 4
> +V= 1.6
> +DISTNAME= scrot-${V}
> +
> CATEGORIES= graphics
>
> -HOMEPAGE= http://www.linuxbrit.co.uk/scrot/
> +WANTLIB += Imlib2 X11 Xcomposite Xext Xfixes c
Can you move WANTLIB below PERMIT_PACKAGE please.
OK.
If there's anything else on top it can be added separately.
> # BSD
> PERMIT_PACKAGE= Yes
>
> -WANTLIB= X11 Xext c freetype m z \
> - giblib>=1 Imlib2>=1
> -
> -MASTER_SITES= http://www.linuxbrit.co.uk/downloads/
> +MASTER_SITES=
> https://github.com/resurrecting-open-source-projects/scrot/releases/download/${V}/
>
> -LIB_DEPENDS= devel/giblib \
> - graphics/imlib2
> +LIB_DEPENDS= graphics/imlib2
>
> CONFIGURE_STYLE= gnu
>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/graphics/scrot/distinfo,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 distinfo
> --- distinfo 18 Jan 2015 03:14:14 -0000 1.4
> +++ distinfo 15 Aug 2021 16:10:59 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (scrot-0.8.tar.gz) = YT0c9STCtizjxl8SMupPBcfa8kjV6C/ypoksmAk5lPI=
> -SIZE (scrot-0.8.tar.gz) = 74324
> +SHA256 (scrot-1.6.tar.gz) = QvZNOPBOxTDItOva4EzOi2iTsvjTBic5HTkO3LqRcJA=
> +SIZE (scrot-1.6.tar.gz) = 182032
> Index: patches/patch-src_Makefile_in
> ===================================================================
> RCS file: patches/patch-src_Makefile_in
> diff -N patches/patch-src_Makefile_in
> --- patches/patch-src_Makefile_in 8 Jul 2011 11:25:47 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,44 +0,0 @@
> -$OpenBSD: patch-src_Makefile_in,v 1.2 2011/07/08 11:25:47 jasper Exp $
> ---- src/Makefile.in.orig Mon Jun 23 14:13:34 2003
> -+++ src/Makefile.in Fri Jul 8 13:22:30 2011
> -@@ -73,13 +73,13 @@ VERSION = @VERSION@
> -
> - MAINTAINERCLEANFILES = Makefile.in
> -
> --LDFLAGS = -L/usr/X11R6/lib
> --INCLUDES = -g -O3 -Wall -I/usr/X11R6/include $(X_CFLAGS)
> -I$(prefix)/include -I$(includedir) -I. -DPREFIX=\""$(prefix)"\"
> @GIBLIB_CFLAGS@
> -+LDFLAGS = -L${X11BASE}/lib
> -+INCLUDES = -Wall -I${X11BASE}/include $(X_CFLAGS) -I$(prefix)/include
> -I$(includedir) -I. -DPREFIX=\""$(prefix)"\" @GIBLIB_CFLAGS@
> -
> - LIBOBJS = @LIBOBJS@
> -
> - bin_PROGRAMS = scrot
> --scrot_SOURCES = main.c getopt.c getopt1.c getopt.h scrot.h options.c
> options.h debug.h imlib.c structs.h
> -+scrot_SOURCES = main.c scrot.h options.c options.h debug.h imlib.c structs.h
> -
> - scrot_LDADD = -lX11 @GIBLIB_LIBS@
> - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
> -@@ -91,7 +91,7 @@ PROGRAMS = $(bin_PROGRAMS)
> - DEFS = @DEFS@ -I. -I$(srcdir) -I.
> - CPPFLAGS = @CPPFLAGS@
> - LIBS = @LIBS@
> --scrot_OBJECTS = main.o getopt.o getopt1.o options.o imlib.o
> -+scrot_OBJECTS = main.o options.o imlib.o
> - scrot_DEPENDENCIES =
> - scrot_LDFLAGS =
> - CFLAGS = @CFLAGS@
> -@@ -239,11 +239,9 @@ distdir: $(DISTFILES)
> - || cp -p $$d/$$file $(distdir)/$$file || :; \
> - fi; \
> - done
> --getopt.o: getopt.c config.h
> --getopt1.o: getopt1.c config.h getopt.h
> --imlib.o: imlib.c scrot.h getopt.h config.h structs.h debug.h options.h
> --main.o: main.c scrot.h getopt.h config.h structs.h debug.h options.h
> --options.o: options.c scrot.h getopt.h config.h structs.h debug.h \
> -+imlib.o: imlib.c scrot.h config.h structs.h debug.h options.h
> -+main.o: main.c scrot.h config.h structs.h debug.h options.h
> -+options.o: options.c scrot.h config.h structs.h debug.h \
> - options.h
> -
> - info-am:
> Index: patches/patch-src_main_c
> ===================================================================
> RCS file: patches/patch-src_main_c
> diff -N patches/patch-src_main_c
> --- patches/patch-src_main_c 8 Jul 2011 11:25:47 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,75 +0,0 @@
> -$OpenBSD: patch-src_main_c,v 1.2 2011/07/08 11:25:47 jasper Exp $
> ---- src/main.c.orig Mon Jun 23 14:05:48 2003
> -+++ src/main.c Fri Jul 8 13:22:30 2011
> -@@ -426,28 +426,28 @@ im_printf(char *str, struct tm *tm,
> - switch (*c) {
> - case 'f':
> - if (filename_im)
> -- strcat(ret, filename_im);
> -+ strlcat(ret, filename_im, sizeof(ret));
> - break;
> - case 'm': /* t was allready taken, so m as in mini */
> - if (filename_thumb)
> -- strcat(ret, filename_thumb);
> -+ strlcat(ret, filename_thumb, sizeof(ret));
> - break;
> - case 'n':
> - if (filename_im) {
> - tmp = strrchr(filename_im, '/');
> - if (tmp)
> -- strcat(ret, tmp + 1);
> -+ strlcat(ret, tmp + 1, sizeof(ret));
> - else
> -- strcat(ret, filename_im);
> -+ strlcat(ret, filename_im, sizeof(ret));
> - }
> - break;
> - case 'w':
> - snprintf(buf, sizeof(buf), "%d", gib_imlib_image_get_width(im));
> -- strcat(ret, buf);
> -+ strlcat(ret, buf, sizeof(ret));
> - break;
> - case 'h':
> - snprintf(buf, sizeof(buf), "%d", gib_imlib_image_get_height(im));
> -- strcat(ret, buf);
> -+ strlcat(ret, buf, sizeof(ret));
> - break;
> - case 's':
> - if (filename_im) {
> -@@ -456,22 +456,22 @@ im_printf(char *str, struct tm *tm,
> -
> - size = st.st_size;
> - snprintf(buf, sizeof(buf), "%d", size);
> -- strcat(ret, buf);
> -+ strlcat(ret, buf, sizeof(ret));
> - } else
> -- strcat(ret, "[err]");
> -+ strlcat(ret, "[err]", sizeof(ret));
> - }
> - break;
> - case 'p':
> - snprintf(buf, sizeof(buf), "%d",
> - gib_imlib_image_get_width(im) *
> - gib_imlib_image_get_height(im));
> -- strcat(ret, buf);
> -+ strlcat(ret, buf, sizeof(ret));
> - break;
> - case 't':
> -- strcat(ret, gib_imlib_image_format(im));
> -+ strlcat(ret, gib_imlib_image_format(im), sizeof(ret));
> - break;
> - case '$':
> -- strcat(ret, "$");
> -+ strlcat(ret, "$", sizeof(ret));
> - break;
> - default:
> - strncat(ret, c, 1);
> -@@ -482,7 +482,7 @@ im_printf(char *str, struct tm *tm,
> - switch (*c) {
> - case 'n':
> - if (filename_im)
> -- strcat(ret, "\n");
> -+ strlcat(ret, "\n", sizeof(ret));
> - break;
> - default:
> - strncat(ret, c, 1);
> Index: patches/patch-src_options_c
> ===================================================================
> RCS file: patches/patch-src_options_c
> diff -N patches/patch-src_options_c
> --- patches/patch-src_options_c 8 Jul 2011 11:25:47 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,26 +0,0 @@
> -$OpenBSD: patch-src_options_c,v 1.2 2011/07/08 11:25:47 jasper Exp $
> ---- src/options.c.orig Mon Jun 23 14:09:08 2003
> -+++ src/options.c Fri Jul 8 13:22:30 2011
> -@@ -141,6 +141,7 @@ name_thumbnail(char *name)
> -
> - length = strlen(name) + 7;
> - new_title = gib_emalloc(length);
> -+ memset(new_title, 0, sizeof(new_title));
> -
> - dot_pos = strrchr(name, '.');
> - if (dot_pos)
> -@@ -148,11 +149,11 @@ name_thumbnail(char *name)
> - diff = (dot_pos - name) / sizeof(char);
> -
> - strncpy(new_title, name, diff);
> -- strcat(new_title, "-thumb");
> -- strcat(new_title, dot_pos);
> -+ strlcat(new_title, "-thumb", length);
> -+ strlcat(new_title, dot_pos, length);
> - }
> - else
> -- sprintf(new_title, "%s-thumb", name);
> -+ snprintf(new_title, length, "%s-thumb", name);
> -
> - return new_title;
> - }
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/scrot/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 PLIST
> --- pkg/PLIST 8 Jul 2011 12:20:49 -0000 1.3
> +++ pkg/PLIST 15 Aug 2021 16:10:59 -0000
> @@ -4,5 +4,5 @@
> share/doc/scrot/
> share/doc/scrot/AUTHORS
> share/doc/scrot/ChangeLog
> -share/doc/scrot/README
> -share/doc/scrot/TODO
> +share/doc/scrot/README.md
> +share/doc/scrot/scrot.png
>