diff options
-rw-r--r-- | graphics/Makefile | 1 | ||||
-rw-r--r-- | graphics/pnglite/Makefile | 28 | ||||
-rw-r--r-- | graphics/pnglite/distinfo | 3 | ||||
-rw-r--r-- | graphics/pnglite/files/patch-pnglite.c | 23 | ||||
-rw-r--r-- | graphics/pnglite/pkg-descr | 3 |
5 files changed, 58 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile index 993f6a2e66bf..d3ececa517fa 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -776,6 +776,7 @@ SUBDIR += png2ico SUBDIR += pngcheck SUBDIR += pngcrush + SUBDIR += pnglite SUBDIR += pngnq SUBDIR += pngquant SUBDIR += pngrewrite diff --git a/graphics/pnglite/Makefile b/graphics/pnglite/Makefile new file mode 100644 index 000000000000..8f73ed5ea2ed --- /dev/null +++ b/graphics/pnglite/Makefile @@ -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> diff --git a/graphics/pnglite/distinfo b/graphics/pnglite/distinfo new file mode 100644 index 000000000000..bd4002b059ea --- /dev/null +++ b/graphics/pnglite/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1546709629 +SHA256 (pnglite-0.1.17.zip) = 6444b13b9ec5b6f9de8f72513a00870325779e3b05bfcf554edb1ab0c90f5962 +SIZE (pnglite-0.1.17.zip) = 6516 diff --git a/graphics/pnglite/files/patch-pnglite.c b/graphics/pnglite/files/patch-pnglite.c new file mode 100644 index 000000000000..c729a2c9ac19 --- /dev/null +++ b/graphics/pnglite/files/patch-pnglite.c @@ -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; diff --git a/graphics/pnglite/pkg-descr b/graphics/pnglite/pkg-descr new file mode 100644 index 000000000000..1ea0ad39e4e7 --- /dev/null +++ b/graphics/pnglite/pkg-descr @@ -0,0 +1,3 @@ +Lightweight C library for loading PNG images. + +WWW: https://sourceforge.net/projects/pnglite/ |