Index: head/graphics/bitmap/Makefile =================================================================== --- head/graphics/bitmap/Makefile (revision 502837) +++ head/graphics/bitmap/Makefile (revision 502838) @@ -1,30 +1,33 @@ # $FreeBSD$ PORTNAME= bitmap DISTVERSION= g20181222 CATEGORIES= graphics PKGNAMESUFFIX= -graphics-library MAINTAINER= yuri@FreeBSD.org COMMENT= Minimalistic library manipulating 24-bit per pixel bitmap images LICENSE= MIT USE_GITHUB= yes GH_ACCOUNT= ArashPartow GH_TAGNAME= b02297f NO_BUILD= yes NO_ARCH= yes PLIST_FILES= include/bitmap_image.hpp do-install: ${INSTALL_DATA} ${WRKSRC}/bitmap_image.hpp ${STAGEDIR}${PREFIX}/include -do-test: # tests failure reported to the author: Error - Failed to open 'image.bmp' +do-test: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} bitmap_test && \ - ./bitmap_test + ${CXX} ${CXXFLAGS} -o mk-image ${FILESDIR}/mk-image.cpp -I. && \ + ./mk-image && \ + ./bitmap_test && \ + ${ECHO} "Tests succeeded" .include Index: head/graphics/bitmap/files/mk-image.cpp =================================================================== --- head/graphics/bitmap/files/mk-image.cpp (nonexistent) +++ head/graphics/bitmap/files/mk-image.cpp (revision 502838) @@ -0,0 +1,21 @@ +#include "bitmap_image.hpp" + +// creates the BMP image image.bmp that tests expect + +int main() +{ + bitmap_image base(1024, 800); + base.clear(); + + const double c1 = 0.8; + const double c2 = 0.4; + const double c3 = 0.2; + const double c4 = 0.6; + + ::srand(0xA5AA57A0); + plasma(base, 0, 0, base.width(), base.height(), c1, c2, c3, c4, 3.0, jet_colormap); + + base.save_image("image.bmp"); + + return 0; +} Property changes on: head/graphics/bitmap/files/mk-image.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property