Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2019 20:09:50 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r489376 - in head/graphics: . pnglite pnglite/files
Message-ID:  <201901052009.x05K9o2V082228@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sat Jan  5 20:09:50 2019
New Revision: 489376
URL: https://svnweb.freebsd.org/changeset/ports/489376

Log:
  - Add graphics/pnglite
  
  Lightweight C library for loading PNG images.
  
  WWW: https://sourceforge.net/projects/pnglite/

Added:
  head/graphics/pnglite/
  head/graphics/pnglite/Makefile   (contents, props changed)
  head/graphics/pnglite/distinfo   (contents, props changed)
  head/graphics/pnglite/files/
  head/graphics/pnglite/files/patch-pnglite.c   (contents, props changed)
  head/graphics/pnglite/pkg-descr   (contents, props changed)
Modified:
  head/graphics/Makefile

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Sat Jan  5 20:04:29 2019	(r489375)
+++ head/graphics/Makefile	Sat Jan  5 20:09:50 2019	(r489376)
@@ -776,6 +776,7 @@
     SUBDIR += png2ico
     SUBDIR += pngcheck
     SUBDIR += pngcrush
+    SUBDIR += pnglite
     SUBDIR += pngnq
     SUBDIR += pngquant
     SUBDIR += pngrewrite

Added: head/graphics/pnglite/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pnglite/Makefile	Sat Jan  5 20:09:50 2019	(r489376)
@@ -0,0 +1,28 @@
+# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	pnglite
+PORTVERSION=	0.1.17
+CATEGORIES=	graphics
+MASTER_SITES=	SF
+
+MAINTAINER=	amdmi3@FreeBSD.org
+COMMENT=	Lightweight PNG C library
+
+LICENSE=	ZLIB
+
+USES=		dos2unix zip
+USE_LDCONFIG=	yes
+
+NO_WRKSUBDIR=	yes
+
+PLIST_FILES=	include/pnglite.h lib/libpnglite.so
+
+do-build:
+	cd ${WRKSRC} && ${CC} -o libpnglite.so -shared ${CFLAGS} -fPIC ${LDFLAGS} -lz pnglite.c
+
+do-install:
+	${INSTALL_LIB} ${WRKSRC}/libpnglite.so ${STAGEDIR}${PREFIX}/lib
+	${INSTALL_DATA} ${WRKSRC}/pnglite.h ${STAGEDIR}${PREFIX}/include
+
+.include <bsd.port.mk>

Added: head/graphics/pnglite/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pnglite/distinfo	Sat Jan  5 20:09:50 2019	(r489376)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1546709629
+SHA256 (pnglite-0.1.17.zip) = 6444b13b9ec5b6f9de8f72513a00870325779e3b05bfcf554edb1ab0c90f5962
+SIZE (pnglite-0.1.17.zip) = 6516

Added: head/graphics/pnglite/files/patch-pnglite.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pnglite/files/patch-pnglite.c	Sat Jan  5 20:09:50 2019	(r489376)
@@ -0,0 +1,23 @@
+* Fix zlib include
+* Fix buffer size (obtained from teeworlds)
+	* this buffer will contain compressed data + "IDAT" string + CRC32, but the latter two were not accounted
+--- pnglite.c.orig	2019-01-05 19:00:10 UTC
++++ pnglite.c
+@@ -5,7 +5,7 @@
+ #define USE_ZLIB 1
+ 
+ #if USE_ZLIB
+-#include "../zlib/zlib.h"
++#include <zlib.h>
+ #else
+ #include "zlite.h"
+ #endif
+@@ -492,7 +492,7 @@ static int png_write_idats(png_t* png, unsigned char* 
+ 	(void)png_end_deflate;
+ 	(void)png_deflate;
+ 
+-	chunk = png_alloc(size);
++	chunk = png_alloc(size + 8);
+ 	memcpy(chunk, "IDAT", 4);
+ 	
+ 	written = size;

Added: head/graphics/pnglite/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pnglite/pkg-descr	Sat Jan  5 20:09:50 2019	(r489376)
@@ -0,0 +1,3 @@
+Lightweight C library for loading PNG images.
+
+WWW: https://sourceforge.net/projects/pnglite/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901052009.x05K9o2V082228>