pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gif2png gif2png: update to 3.0.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/67b2fcb9c843
branches:  trunk
changeset: 404630:67b2fcb9c843
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Nov 15 09:05:56 2019 +0000

description:
gif2png: update to 3.0.0.

Remove obsolete MESSAGE.
Thanks to bsiegert for help in packaging.

Changes:
Rewritten in golang.

diffstat:

 graphics/gif2png/MESSAGE                  |   9 ------
 graphics/gif2png/Makefile                 |  39 ++++++++++++++++++++----------
 graphics/gif2png/PLIST                    |   2 +-
 graphics/gif2png/distinfo                 |  11 ++++---
 graphics/gif2png/patches/patch-gif2png.go |  40 +++++++++++++++++++++++++++++++
 5 files changed, 73 insertions(+), 28 deletions(-)

diffs (137 lines):

diff -r c1f18df2cead -r 67b2fcb9c843 graphics/gif2png/MESSAGE
--- a/graphics/gif2png/MESSAGE  Thu Nov 14 23:07:20 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.2 2002/09/24 12:30:05 wiz Exp $
-
-The gif2png package has been installed on your system.  Please note
-that the included 'web2png' script was written in python, and will
-therefore only work if you have installed the python language from
-the package system (see category languages).
-
-===========================================================================
diff -r c1f18df2cead -r 67b2fcb9c843 graphics/gif2png/Makefile
--- a/graphics/gif2png/Makefile Thu Nov 14 23:07:20 2019 +0000
+++ b/graphics/gif2png/Makefile Fri Nov 15 09:05:56 2019 +0000
@@ -1,25 +1,38 @@
-# $NetBSD: Makefile,v 1.55 2019/11/02 22:37:57 rillig Exp $
+# $NetBSD: Makefile,v 1.56 2019/11/15 09:05:56 wiz Exp $
 
-DISTNAME=      gif2png-2.5.11
-PKGREVISION=   2
-CATEGORIES=    graphics converters
+DISTNAME=      gif2png-3.0.0
+CATEGORIES=    graphics
+#MASTER_SITES= https://gitlab.com/esr/gif2png/-/archive/master/
 MASTER_SITES=  http://www.catb.org/~esr/gif2png/
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://www.catb.org/~esr/gif2png/
-COMMENT=       Convert GIF files to PNG
-LICENSE=       zlib
+HOMEPAGE=      https://gitlab.com/esr/gif2png/
+COMMENT=       Convert GIFs to PNG format
+LICENSE=       modified-bsd
 
-REPLACE_PYTHON+=       web2png
+GO_SRCPATH=    ${DISTNAME}
+#GO_DIST_BASE= gif2png-master
 
-LDFLAGS=               ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
-BUILD_MAKE_FLAGS=      LDFLAGS=${LDFLAGS:Q}
-INSTALL_MAKE_FLAGS+=   prefix=${DESTDIR}${PREFIX}
+TOOL_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
+
 INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
 
+REPLACE_PYTHON+=       ${WRKSRC}/web2png
+
+post-build:
+       cd ${WRKSRC} && \
+               xmlto man gif2png.xml && \
+               xmlto man web2png.xml
+
 post-install:
-       ${MV} ${DESTDIR}${PREFIX}/share/man/man1/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${MV} ${DESTDIR}${PREFIX}/bin/${DISTNAME} ${DESTDIR}${PREFIX}/bin/gif2png
+       ${INSTALL_SCRIPT} ${WRKSRC}/web2png ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA} ${WRKSRC}/gif2png.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_DATA} ${WRKSRC}/web2png.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
-.include "../../graphics/png/buildlink3.mk"
+.include "../../security/go-crypto/buildlink3.mk"
+.include "../../devel/go-sys/buildlink3.mk"
+
+.include "../../lang/go/go-package.mk"
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r c1f18df2cead -r 67b2fcb9c843 graphics/gif2png/PLIST
--- a/graphics/gif2png/PLIST    Thu Nov 14 23:07:20 2019 +0000
+++ b/graphics/gif2png/PLIST    Fri Nov 15 09:05:56 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:50:55 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2019/11/15 09:05:56 wiz Exp $
 bin/gif2png
 bin/web2png
 man/man1/gif2png.1
diff -r c1f18df2cead -r 67b2fcb9c843 graphics/gif2png/distinfo
--- a/graphics/gif2png/distinfo Thu Nov 14 23:07:20 2019 +0000
+++ b/graphics/gif2png/distinfo Fri Nov 15 09:05:56 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.19 2015/11/03 21:33:58 agc Exp $
+$NetBSD: distinfo,v 1.20 2019/11/15 09:05:56 wiz Exp $
 
-SHA1 (gif2png-2.5.11.tar.gz) = dd3033b4a164e813e7abd74f92851f0ac09c6080
-RMD160 (gif2png-2.5.11.tar.gz) = 37e57ecadea3107f7f8632d286317d681c419ff5
-SHA512 (gif2png-2.5.11.tar.gz) = c7e42aca45f941bca970ff14f49881f485c4dee18be448ae71aa7c80dabd9384bcba6d6de05a0a78757150b3e775d99df315231ddae8e32c91c08f1c9cfefb67
-Size (gif2png-2.5.11.tar.gz) = 31507 bytes
+SHA1 (gif2png-3.0.0.tar.gz) = 7fea41d8bd734217a9ec3b7b72693f183cddce1a
+RMD160 (gif2png-3.0.0.tar.gz) = 67404271170a902e478f7280908e6bd224528f35
+SHA512 (gif2png-3.0.0.tar.gz) = fd8c266444b17ca92973eeb3ca33bd23ca3bcab95870571133bb1d7d051e3b3ce2269f9d348621eb86c18dff3e5d36602d6aec7ba4ab87db5609067e439950ed
+Size (gif2png-3.0.0.tar.gz) = 81591 bytes
+SHA1 (patch-gif2png.go) = 44e8a24181a1df97cca322798888304513e8a835
diff -r c1f18df2cead -r 67b2fcb9c843 graphics/gif2png/patches/patch-gif2png.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gif2png/patches/patch-gif2png.go Fri Nov 15 09:05:56 2019 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-gif2png.go,v 1.1 2019/11/15 09:05:56 wiz Exp $
+
+Fix on NetBSD.
+https://gitlab.com/esr/gif2png/merge_requests/3
+
+--- gif2png.go.orig    2019-07-11 13:50:28.000000000 +0000
++++ gif2png.go
+@@ -98,7 +98,7 @@ func processfilter() int {
+ 
+ func processfile(name string, fp *os.File) int {
+       var suppressDelete int
+-      var timeBuf unix.Utimbuf
++      var timeBuf []unix.Timespec
+ 
+       if fp == nil {
+               return 1
+@@ -118,8 +118,12 @@ func processfile(name string, fp *os.Fil
+ 
+               // Ugh...Go doesn't have a way to retrieve access time.
+               // So we'll duplicare the mod time, alas.
+-              timeBuf.Actime  = fi.ModTime().Unix()
+-              timeBuf.Modtime = fi.ModTime().Unix()
++              ts, err := unix.TimeToTimespec(fi.ModTime())
++              if err != nil {
++                      return 1
++              }
++              timeBuf = append(timeBuf, ts)
++              timeBuf = append(timeBuf, ts)
+       }
+ 
+       fp.Close()
+@@ -170,7 +174,7 @@ func processfile(name string, fp *os.Fil
+               fp.Close()
+ 
+               if preserveMtime {
+-                      err =  unix.Utime(outname, &timeBuf)
++                      err =  unix.UtimesNano(outname, timeBuf)
+                       if err != nil {
+                               fmt.Fprintf(os.Stderr, "gifpng: could not set output file times\n");
+                               return 1;



Home | Main Index | Thread Index | Old Index