pkgsrc-WIP-changes archive

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

Add a package for the Go-using gif2png.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Tue Nov 12 17:38:49 2019 +0000
Changeset:	7fb29cee9d5be4760433638dc08adfe90ce1ecb3

Added Files:
	gif2png/DESCR
	gif2png/Makefile
	gif2png/PLIST
	gif2png/TODO
	gif2png/distinfo
	gif2png/patches/patch-gif2png.go

Log Message:
Add a package for the Go-using gif2png.

This is not fully complete (man pages are missing) but the Go bits work.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7fb29cee9d5be4760433638dc08adfe90ce1ecb3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gif2png/DESCR                    |  4 ++++
 gif2png/Makefile                 | 19 +++++++++++++++++++
 gif2png/PLIST                    |  2 ++
 gif2png/TODO                     |  2 ++
 gif2png/distinfo                 |  7 +++++++
 gif2png/patches/patch-gif2png.go | 37 +++++++++++++++++++++++++++++++++++++
 6 files changed, 71 insertions(+)

diffs:
diff --git a/gif2png/DESCR b/gif2png/DESCR
new file mode 100644
index 0000000000..b382414c88
--- /dev/null
+++ b/gif2png/DESCR
@@ -0,0 +1,4 @@
+  The gif2png program converts files from the obsolescent Graphic Interchange
+Format to Portable Network Graphics.  The conversion preserves all graphic
+information, including transparency, perfectly.  The gif2png program can even
+recover data from corrupted GIFs.
diff --git a/gif2png/Makefile b/gif2png/Makefile
new file mode 100644
index 0000000000..e1234ed849
--- /dev/null
+++ b/gif2png/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD$
+
+DISTNAME=	gif2png-master
+CATEGORIES=	graphics
+MASTER_SITES=	https://gitlab.com/esr/gif2png/-/archive/master/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://gitlab.com/esr/gif2png/
+COMMENT=	Convert GIFs to PNG format
+LICENSE=	modified-bsd
+
+GO_SRCPATH=	gitlab.com/esr/gif2png
+GO_DIST_BASE=	gif2png-master
+
+.include "../../security/go-crypto/buildlink3.mk"
+.include "../../devel/go-sys/buildlink3.mk"
+
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gif2png/PLIST b/gif2png/PLIST
new file mode 100644
index 0000000000..4decaf6fdd
--- /dev/null
+++ b/gif2png/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/gif2png
diff --git a/gif2png/TODO b/gif2png/TODO
new file mode 100644
index 0000000000..51d7b3a379
--- /dev/null
+++ b/gif2png/TODO
@@ -0,0 +1,2 @@
+- build and install manpages (needs xmlto as a tool)
+- figure out a way to have a stable distfile and version
diff --git a/gif2png/distinfo b/gif2png/distinfo
new file mode 100644
index 0000000000..40661e6aa9
--- /dev/null
+++ b/gif2png/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (gif2png-master.tar.gz) = 8fcfceeb270c0a5a2cd86b74b096182615f772ce
+RMD160 (gif2png-master.tar.gz) = e7cb8e4836ee38dd5808150aa135cddd1e3ddbb7
+SHA512 (gif2png-master.tar.gz) = 17d8bb83d53b8f5c61dbdd0e697c8b85999c8dfb54d57c9621fe3600effd1222acb29bd8e12c28db93736789d5db24e208a32868ed462e589527221c6846e0f6
+Size (gif2png-master.tar.gz) = 94713 bytes
+SHA1 (patch-gif2png.go) = 1b51a645cdd7b31bb0a122080611b5ac378de1e0
diff --git a/gif2png/patches/patch-gif2png.go b/gif2png/patches/patch-gif2png.go
new file mode 100644
index 0000000000..b5dd249c2e
--- /dev/null
+++ b/gif2png/patches/patch-gif2png.go
@@ -0,0 +1,37 @@
+$NetBSD$
+
+--- 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