svn commit: r340002 - in head/graphics/pngwriter: . files
Rusmir Dusko
nemysis at FreeBSD.org
Fri Jan 17 00:33:47 UTC 2014
Author: nemysis
Date: Fri Jan 17 00:33:46 2014
New Revision: 340002
URL: http://svnweb.freebsd.org/changeset/ports/340002
QAT: https://qat.redports.org/buildarchive/r340002/
Log:
- Use the new format for LIB_DEPENDS
- Disable all warnings with -w
- Support STAGEDIR
- Add DOCS and EXAMPLES Options
- Recreate patches with make makepatch
Added:
head/graphics/pngwriter/files/patch-src__pngwriter.cc (contents, props changed)
Deleted:
head/graphics/pngwriter/files/patch-pngwriter.cc
Modified:
head/graphics/pngwriter/Makefile
Modified: head/graphics/pngwriter/Makefile
==============================================================================
--- head/graphics/pngwriter/Makefile Thu Jan 16 23:50:58 2014 (r340001)
+++ head/graphics/pngwriter/Makefile Fri Jan 17 00:33:46 2014 (r340002)
@@ -10,14 +10,14 @@ MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
MAINTAINER= nemysis at FreeBSD.org
COMMENT= C++ library for creating PNG images
-LIB_DEPENDS= png15:${PORTSDIR}/graphics/png \
- freetype:${PORTSDIR}/print/freetype2
+LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \
+ libfreetype.so:${PORTSDIR}/print/freetype2
USES= pkgconfig
WRKSRC= ${WRKDIR}/${DISTNAME}
-CXXFLAGS+= `pkg-config --cflags freetype2 libpng15` -I${LOCALBASE}/include
+CXXFLAGS+= `pkg-config --cflags freetype2 libpng15` -I${LOCALBASE}/include -w
PLIST_FILES= include/pngwriter.h \
lib/libpngwriter.a \
@@ -29,8 +29,7 @@ PLIST_DIRS= %%DATADIR%%/fonts \
PORTDOCS= *
PORTEXAMPLES= *
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE= DOCS EXAMPLES
post-extract:
@${FIND} ${WRKSRC} -name "\.*" -delete
@@ -41,18 +40,11 @@ do-build:
&& ${AR} rv libpngwriter.a pngwriter.o
do-install:
- ${INSTALL_DATA} ${WRKSRC}/src/pngwriter.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/src/libpngwriter.a ${PREFIX}/lib
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} fonts ${DATADIR})
-
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR})
-.endif
-
-.if ${PORT_OPTIONS:MEXAMPLES}
- ${MKDIR} ${EXAMPLESDIR}
- @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
-.endif
+ ${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})
.include <bsd.port.mk>
Added: head/graphics/pngwriter/files/patch-src__pngwriter.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/pngwriter/files/patch-src__pngwriter.cc Fri Jan 17 00:33:46 2014 (r340002)
@@ -0,0 +1,57 @@
+--- ./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;
More information about the svn-ports-all
mailing list