gif2png: update to 3.0.0.

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

Changes:
Rewritten in golang.
This commit is contained in:
wiz 2019-11-15 09:05:56 +00:00
parent 2016245a57
commit 796369af40
5 changed files with 74 additions and 29 deletions

View file

@ -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).
===========================================================================

View file

@ -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
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
TOOL_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
LDFLAGS= ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
BUILD_MAKE_FLAGS= LDFLAGS=${LDFLAGS:Q}
INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
post-install:
${MV} ${DESTDIR}${PREFIX}/share/man/man1/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
REPLACE_PYTHON+= ${WRKSRC}/web2png
.include "../../graphics/png/buildlink3.mk"
post-build:
cd ${WRKSRC} && \
xmlto man gif2png.xml && \
xmlto man web2png.xml
post-install:
${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 "../../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"

View file

@ -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

View file

@ -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

View file

@ -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;