diff --git a/graphics/pngwriter/Makefile b/graphics/pngwriter/Makefile index db98c0f98c65..fdbf71945bd4 100644 --- a/graphics/pngwriter/Makefile +++ b/graphics/pngwriter/Makefile @@ -2,47 +2,25 @@ # $FreeBSD$ PORTNAME= pngwriter -PORTVERSION= 0.5.4 -PORTREVISION= 5 +PORTVERSION= 0.5.5 CATEGORIES= graphics devel -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= rakuco@FreeBSD.org COMMENT= C++ library for creating PNG images +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/doc/LICENSE + LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \ libfreetype.so:${PORTSDIR}/print/freetype2 -USES= pkgconfig - -WRKSRC= ${WRKDIR}/${DISTNAME} - -CXXFLAGS+= `pkg-config --cflags freetype2 libpng` -I${LOCALBASE}/include +USES= cmake:outsource +USE_GITHUB= yes +USE_LDCONFIG= yes +GH_ACCOUNT= ${PORTNAME} PLIST_FILES= include/pngwriter.h \ lib/libpngwriter.a \ - %%DATADIR%%/fonts/FreeMonoBold.ttf \ - %%DATADIR%%/fonts/FreeSansBold.ttf - -PORTDOCS= * -PORTEXAMPLES= * - -OPTIONS_DEFINE= DOCS EXAMPLES - -post-extract: - @${FIND} ${WRKSRC} -name "\.*" -delete - -do-build: - cd ${WRKSRC}/src \ - && ${CXX} ${CXXFLAGS} -c pngwriter.cc -o pngwriter.o \ - && ${AR} rv libpngwriter.a pngwriter.o - -do-install: - ${INSTALL_DATA} ${WRKSRC}/src/pngwriter.h ${STAGEDIR}${PREFIX}/include/ - ${INSTALL_DATA} ${WRKSRC}/src/libpngwriter.a ${STAGEDIR}${PREFIX}/lib/ - @(cd ${WRKSRC} && ${COPYTREE_SHARE} fonts ${STAGEDIR}${DATADIR}) - - @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) - @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) + lib/libpngwriter.so .include diff --git a/graphics/pngwriter/distinfo b/graphics/pngwriter/distinfo index 42726cdedb2e..344e2694a9c1 100644 --- a/graphics/pngwriter/distinfo +++ b/graphics/pngwriter/distinfo @@ -1,2 +1,2 @@ -SHA256 (pngwriter-0.5.4.tar.gz) = e17568e834f5195109a2a13509a679cca95d6087d27812564f7fcfc8ac700ee6 -SIZE (pngwriter-0.5.4.tar.gz) = 756781 +SHA256 (pngwriter-pngwriter-0.5.5_GH0.tar.gz) = ad9d061ddafb8da25f29f2ee552f410e59f34fbf3b9984168fa364d7a993ee8d +SIZE (pngwriter-pngwriter-0.5.5_GH0.tar.gz) = 549677 diff --git a/graphics/pngwriter/files/patch-src__pngwriter.cc b/graphics/pngwriter/files/patch-src__pngwriter.cc deleted file mode 100644 index 48af638b78f6..000000000000 --- a/graphics/pngwriter/files/patch-src__pngwriter.cc +++ /dev/null @@ -1,57 +0,0 @@ ---- ./src/pngwriter.cc.orig 2009-02-10 22:45:16.000000000 +0100 -+++ ./src/pngwriter.cc 2014-01-17 01:17:46.000000000 +0100 -@@ -988,19 +988,19 @@ - time(&gmt); - png_convert_from_time_t(&mod_time, gmt); - png_set_tIME(png_ptr, info_ptr, &mod_time); -- text_ptr[0].key = "Title"; -+ text_ptr[0].key = (char*)"Title"; - text_ptr[0].text = texttitle_; - text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; -- text_ptr[1].key = "Author"; -+ text_ptr[1].key = (char*)"Author"; - text_ptr[1].text = textauthor_; - text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; -- text_ptr[2].key = "Description"; -+ text_ptr[2].key = (char*)"Description"; - text_ptr[2].text = textdescription_; - text_ptr[2].compression = PNG_TEXT_COMPRESSION_NONE; -- text_ptr[3].key = "Creation Time"; -- text_ptr[3].text = png_convert_to_rfc1123(png_ptr, &mod_time); -+ text_ptr[3].key = (char*)"Creation Time"; -+ text_ptr[3].text = (char *)png_convert_to_rfc1123(png_ptr, &mod_time); - text_ptr[3].compression = PNG_TEXT_COMPRESSION_NONE; -- text_ptr[4].key = "Software"; -+ text_ptr[4].key = (char*)"Software"; - text_ptr[4].text = textsoftware_; - text_ptr[4].compression = PNG_TEXT_COMPRESSION_NONE; - png_set_text(png_ptr, info_ptr, text_ptr, 5); -@@ -1204,8 +1204,8 @@ - FILE *fp; - png_structp png_ptr; - png_infop info_ptr; -- unsigned char **image; -- unsigned long width, height; -+ png_byte **image; -+ png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - // png_uint_32 i; - // -@@ -1311,7 +1311,7 @@ - if(color_type == PNG_COLOR_TYPE_GRAY && bit_depth<8) - { - // png_set_expand(png_ptr); -- png_set_gray_1_2_4_to_8(png_ptr); // Just an alias of the above. -+ png_set_expand_gray_1_2_4_to_8(png_ptr); // Just an alias of the above. - transformation_ = 1; - } - -@@ -1530,7 +1530,7 @@ - fclose(fp); - return 0; - } -- if (setjmp((*png_ptr)->jmpbuf)) /*(setjmp(png_jmpbuf(*png_ptr)) )*////////////////////////////////////// -+ if (setjmp( png_jmpbuf((*png_ptr)))) - { - png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL); - std::cerr << " PNGwriter::read_png_info - ERROR **: This file may be a corrupted PNG file. (setjmp(*png_ptr)->jmpbf) failed)." << std::endl;