Date: Fri, 3 May 2019 17:50:36 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r500748 - in head/graphics/exact-image: . files Message-ID: <201905031750.x43HoaLY076904@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Fri May 3 17:50:35 2019 New Revision: 500748 URL: https://svnweb.freebsd.org/changeset/ports/500748 Log: - Update to version 0.9.2 and make it build on both amd64 and i386 by defining __LONG_LONG_SUPPORTED macro, which allows to pull llabs(3) for 64-bit numbers; was not a problem on amd64 because sizeof(long) == 8 there and thus no `long long' help needed - Bump required C++ standard to C++03; it's not quite ready for later ones due to the this: bardecode/code25i.hh:34:29: error: in-class initializer for static data member of type 'const double' requires 'constexpr' specifier - GC no-op `post-extract' target, patches that were applied upstream, and no longer relevant libungif -> libgif fixups in the Makefile Added: head/graphics/exact-image/files/patch-Makefile (contents, props changed) Deleted: head/graphics/exact-image/files/patch-bardecode__code128.hh head/graphics/exact-image/files/patch-codecs__bmp.cc head/graphics/exact-image/files/patch-codecs__xpm.cc head/graphics/exact-image/files/patch-frontends-bardecode.cc head/graphics/exact-image/files/patch-lib__ContourMatching.cc head/graphics/exact-image/files/patch-lib__ContourUtility.cc head/graphics/exact-image/files/patch-lib__ImageIterator2.hh head/graphics/exact-image/files/patch-libpng14 head/graphics/exact-image/files/patch-libpng15 Modified: head/graphics/exact-image/Makefile head/graphics/exact-image/distinfo head/graphics/exact-image/files/patch-codecs__gif.cc head/graphics/exact-image/files/patch-codecs_dcraw.h Modified: head/graphics/exact-image/Makefile ============================================================================== --- head/graphics/exact-image/Makefile Fri May 3 17:42:38 2019 (r500747) +++ head/graphics/exact-image/Makefile Fri May 3 17:50:35 2019 (r500748) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= exact-image -PORTVERSION= 0.9.1 -PORTREVISION= 2 +PORTVERSION= 0.9.2 CATEGORIES= graphics perl5 python MASTER_SITES= https://dl.exactcode.de/oss/exact-image/ @@ -14,7 +13,6 @@ LICENSE= GPLv2 BROKEN_armv6= fails to configure: C++ compiler is not installed or does not work correctly BROKEN_armv7= fails to configure: C++ compiler is not installed or does not work correctly -BROKEN_i386= call to 'abs' is ambiguous BUILD_DEPENDS= swig3.0:devel/swig30 LIB_DEPENDS= libagg.so:graphics/agg \ @@ -31,7 +29,7 @@ LIB_DEPENDS= libagg.so:graphics/agg \ #broken headers on c++ in base system: CPPFLAGS+= -fpermissive -I${LOCALBASE}/include USES= gmake jpeg perl5 pkgconfig python:2.7 tar:bzip2 -USE_CXXSTD= c++98 +USE_CXXSTD= c++03 USE_XORG= x11 HAS_CONFIGURE= yes INSTALL_WRKSRC= ${WRKSRC}/objdir @@ -43,12 +41,8 @@ PLIST_FILES= ${BINS:S|^|bin/|} \ %%PYTHON_SITELIBDIR%%/_ExactImage.so BINARY_ALIAS= swig=swig3.0 -post-extract: - @${RM} -r ${WRKSRC}/agg-2.4/ - post-patch: @${REINPLACE_CMD} -e '1s|/.*|/bin/sh|;s|/usr/local|${LOCALBASE}|;\ - s|libungif|giflib|; s|LIBUNGIF|GIFLIB|; \ /parse_options/d;s| cc | ${CC} |;s| c++ | ${CXX} |;\ s|python -V|${PYTHON_CMD} -V|;\ /PYTHONINCS/s|=.*$$|=-I${PYTHON_INCLUDEDIR}|; \ @@ -58,18 +52,16 @@ post-patch: @${REINPLACE_CMD} -e '/^Q =/d;s|$$[(]COMPILE.cc[)]|${CXX} $${CPPFLAGS} -c|;\ s|$$[(]CXX[)]|${CXX}|;s|$$[(]COMPILE.c[)]|${CC} $${CPPFLAGS} -c|'\ ${WRKSRC}/build/bottom.make - @${REINPLACE_CMD} -e '/^CFLAGS =/d;/^CXXFLAGS =/d;/march=/d;\ - /mtune=/d;/call cc-option/d;' ${WRKSRC}/Makefile - @${REINPLACE_CMD} -e 's|-lungif|-lgif|; s|LIBUNGIF|GIFLIB|' \ - ${WRKSRC}/codecs/Makefile @${REINPLACE_CMD} -e '/CFLAGS=/s|".*"|"${CFLAGS} -I${LOCALBASE}/include"|;\ /LIBS=/s|".*"|"-L${LOCALBASE}/lib -lX11"|' ${WRKSRC}/config/pkgcheck-x11.c @${REINPLACE_CMD} -e 's|$$prg|$$prg ${CPPFLAGS} -I${LOCALBASE}/include|;\ s|/usr/local|${PREFIX}|;/^var_remove/,/^}/d;/^parse_options/,/^}/d; \ s| ++errors | errors+=1 |g' \ ${WRKSRC}/config/functions - @${REINPLACE_CMD} -e 's|/usr/X11|${LOCALBASE}|' ${WRKSRC}/lib/vectorial.cc \ + @${REINPLACE_CMD} -e 's|/usr/X11|${LOCALBASE}|' \ + ${WRKSRC}/image/vectorial.cc \ ${WRKSRC}/edisplay/edisplay.cc + @${REINPLACE_CMD} -e 's| = {}||g' ${WRKSRC}/image/Colorspace.cc do-install: @cd ${INSTALL_WRKSRC}/&&for i in ${BINS};do\ Modified: head/graphics/exact-image/distinfo ============================================================================== --- head/graphics/exact-image/distinfo Fri May 3 17:42:38 2019 (r500747) +++ head/graphics/exact-image/distinfo Fri May 3 17:50:35 2019 (r500748) @@ -1,2 +1,3 @@ -SHA256 (exact-image-0.9.1.tar.bz2) = 79e6a58522897f9740aa3b5a337f63ad1e0361a772141b24aaff2e31264ece7d -SIZE (exact-image-0.9.1.tar.bz2) = 299565 +TIMESTAMP = 1480938306 +SHA256 (exact-image-0.9.2.tar.bz2) = 665b205740b17b4162fae73aa36eb7046f28bb216d612461ca0499ff47a566ba +SIZE (exact-image-0.9.2.tar.bz2) = 312995 Added: head/graphics/exact-image/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/exact-image/files/patch-Makefile Fri May 3 17:50:35 2019 (r500748) @@ -0,0 +1,32 @@ +--- Makefile.orig 2016-06-18 19:35:35 UTC ++++ Makefile +@@ -7,10 +7,10 @@ include utility/Makefile + X_BUILD_IMPLICIT=1 + + # -s silcently corrupts binaries on OS X, sigh -ReneR +-CFLAGS := -Wall -O2 # -O1 -ggdb # -fsanitize=address -fsanitize=undefined ++CFLAGS += -Wall # -O2 -O1 -ggdb # -fsanitize=address -fsanitize=undefined + + # for config.h +-CPPFLAGS += -I . ++CPPFLAGS += -I . -D__LONG_LONG_SUPPORTED + + # -frename-registers and -funroll-loops brings a lot performance on + # my AMD Turion - about 20% time decrease (though it is included in -funroll-loops anyway) !!! +@@ -28,6 +28,7 @@ endif + # TODO: improve to match i[3456]86 + ifneq "$(X_ARCH)" "i686" + CFLAGS += -fPIC ++CXXFLAGS += -fPIC + endif + + ifeq "$(X_ARCH)" "sparc64" +@@ -48,7 +49,7 @@ CFLAGS += $(call cc-option,-ftree-vectorize,) + # we have some unimplemented colorspaces in the Image::iterator :-( + CFLAGS += $(call cc-option,-Wno-switch -Wno-switch-enum,) + +-CXXFLAGS := $(CFLAGS) -Wno-sign-compare ++CXXFLAGS += -Wall -Wno-sign-compare + + ifeq "$(STATIC)" "1" + X_EXEFLAGS += -static Modified: head/graphics/exact-image/files/patch-codecs__gif.cc ============================================================================== --- head/graphics/exact-image/files/patch-codecs__gif.cc Fri May 3 17:42:38 2019 (r500747) +++ head/graphics/exact-image/files/patch-codecs__gif.cc Fri May 3 17:50:35 2019 (r500748) @@ -1,4 +1,4 @@ ---- codecs/gif.cc.orig 2010-03-03 21:04:44 UTC +--- codecs/gif.cc.orig 2015-03-28 15:35:58 UTC +++ codecs/gif.cc @@ -22,6 +22,24 @@ @@ -25,26 +25,26 @@ /* The way Interlaced image should. */ static const int InterlacedOffset[] = { 0, 4, 2, 1 }; -@@ -60,9 +78,13 @@ int GIFCodec::readImage (std::istream* s - ColorMapObject *ColorMap = NULL; - int ExtCode; +@@ -60,9 +78,13 @@ int GIFCodec::readImage (std::istream* stream, Image& + ColorMapObject *ColorMap = 0; + int GifError, ExtCode; +#if GIFLIB_MAJOR >= 5 -+ if ((GifFile = DGifOpen (stream, &GIFInputFunc, NULL)) == NULL) + if ((GifFile = DGifOpen (stream, &GIFInputFunc, &GifError)) == 0) +#else - if ((GifFile = DGifOpen (stream, &GIFInputFunc)) == NULL) ++ if ((GifFile = DGifOpen (stream, &GIFInputFunc)) == 0) +#endif { -- PrintGifError(); +- //PrintGifError(); + std::cerr << "\nGIF-LIB error: can't open GIF file" << std::endl; return false; } -@@ -74,7 +96,11 @@ int GIFCodec::readImage (std::istream* s +@@ -74,7 +96,11 @@ int GIFCodec::readImage (std::istream* stream, Image& /* Scan the content of the GIF file and load the image(s) in: */ do { if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -53,11 +53,11 @@ return false; } -@@ -83,7 +109,11 @@ int GIFCodec::readImage (std::istream* s +@@ -83,7 +109,11 @@ int GIFCodec::readImage (std::istream* stream, Image& switch (RecordType) { case IMAGE_DESC_RECORD_TYPE: if (DGifGetImageDesc(GifFile) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -66,11 +66,11 @@ return false; } -@@ -104,7 +134,11 @@ int GIFCodec::readImage (std::istream* s +@@ -104,7 +134,11 @@ int GIFCodec::readImage (std::istream* stream, Image& j += InterlacedJumps[i]) { if (DGifGetLine(GifFile, &image.getRawData()[j*image.stride()+Col], Width) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -79,11 +79,11 @@ return false; } } -@@ -113,7 +147,11 @@ int GIFCodec::readImage (std::istream* s +@@ -113,7 +147,11 @@ int GIFCodec::readImage (std::istream* stream, Image& for (int i = 0; i < Height; ++i) { if (DGifGetLine(GifFile, &image.getRawData()[Row++ * image.stride()+Col], Width) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -92,11 +92,11 @@ return false; } } -@@ -122,12 +160,20 @@ int GIFCodec::readImage (std::istream* s +@@ -122,12 +160,20 @@ int GIFCodec::readImage (std::istream* stream, Image& case EXTENSION_RECORD_TYPE: /* Skip any extension blocks in file: */ if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -104,9 +104,9 @@ +#endif return false; } - while (Extension != NULL) { + while (Extension != 0) { if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) { -- PrintGifError(); +- //PrintGifError(); +#if GIFLIB_MAJOR >= 5 + ExactImagePrintGifError(GifFile->Error); +#else @@ -115,74 +115,62 @@ return false; } } -@@ -155,7 +201,11 @@ int GIFCodec::readImage (std::istream* s +@@ -155,7 +201,11 @@ int GIFCodec::readImage (std::istream* stream, Image& // convert colormap to our 16bit "TIFF"format colorspace_de_palette (image, ColorMap->ColorCount, rmap, gmap, bmap); +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ EGifCloseFile(GifFile, NULL); + EGifCloseFile(GifFile, &GifError); +#else - EGifCloseFile(GifFile); ++ EGifCloseFile(GifFile); +#endif return true; } -@@ -166,7 +216,11 @@ bool GIFCodec::writeImage (std::ostream* - GifFileType* GifFile; +@@ -167,7 +217,11 @@ bool GIFCodec::writeImage (std::ostream* stream, Image GifByteType* Ptr; + int GifError; +#if GIFLIB_MAJOR >= 5 -+ if ((GifFile = EGifOpen (stream, &GIFOutputFunc, NULL)) == NULL) + if ((GifFile = EGifOpen(stream, &GIFOutputFunc, &GifError)) == 0) +#else - if ((GifFile = EGifOpen (stream, &GIFOutputFunc)) == NULL) ++ if ((GifFile = EGifOpen(stream, &GIFOutputFunc)) == 0) +#endif { std::cerr << "Error preparing GIF file for writing." << std::endl; return false; -@@ -175,7 +229,11 @@ bool GIFCodec::writeImage (std::ostream* +@@ -176,7 +230,11 @@ bool GIFCodec::writeImage (std::ostream* stream, Image int ColorMapSize = 256; // later use our own colormap generation +#if GIFLIB_MAJOR >= 5 -+ ColorMapObject* OutputColorMap = GifMakeMapObject(ColorMapSize, NULL); + ColorMapObject* OutputColorMap = GifMakeMapObject(ColorMapSize, 0); +#else - ColorMapObject* OutputColorMap = MakeMapObject(ColorMapSize, NULL); ++ ColorMapObject* OutputColorMap = MakeMapObject(ColorMapSize, 0); +#endif if (!OutputColorMap) return false; -@@ -203,7 +261,11 @@ bool GIFCodec::writeImage (std::ostream* +@@ -204,7 +262,11 @@ bool GIFCodec::writeImage (std::ostream* stream, Image } +#if GIFLIB_MAJOR >= 5 -+ if (GifQuantizeBuffer(image.w, image.h, &ColorMapSize, + if (GifQuantizeBuffer(image.w, image.h, &ColorMapSize, +#else - if (QuantizeBuffer(image.w, image.h, &ColorMapSize, ++ if (QuantizeBuffer(image.w, image.h, &ColorMapSize, +#endif RedBuffer, GreenBuffer, BlueBuffer, OutputBuffer, OutputColorMap->Colors) == GIF_ERROR) { return false; -@@ -215,7 +277,7 @@ bool GIFCodec::writeImage (std::ostream* - if (EGifPutScreenDesc(GifFile, image.w, image.h, - ColorMapSize, 0, OutputColorMap) == GIF_ERROR || - EGifPutImageDesc(GifFile, 0, 0, image.w, image.h, -- FALSE, NULL) == GIF_ERROR) -+ false, NULL) == GIF_ERROR) - { - std::cerr << "Error writing GIF header." << std::endl; - return false; -@@ -232,9 +294,13 @@ bool GIFCodec::writeImage (std::ostream* - } - free (OutputBuffer); +@@ -235,7 +297,11 @@ bool GIFCodec::writeImage (std::ostream* stream, Image -- delete (RedBuffer); delete (GreenBuffer); delete (BlueBuffer); -+ delete[] RedBuffer; delete[] GreenBuffer; delete[] BlueBuffer; + delete[] RedBuffer; delete[] GreenBuffer; delete[] BlueBuffer; +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ EGifCloseFile(GifFile, NULL); + EGifCloseFile(GifFile, &GifError); +#else - EGifCloseFile(GifFile); ++ EGifCloseFile(GifFile); +#endif return true; } Modified: head/graphics/exact-image/files/patch-codecs_dcraw.h ============================================================================== --- head/graphics/exact-image/files/patch-codecs_dcraw.h Fri May 3 17:42:38 2019 (r500747) +++ head/graphics/exact-image/files/patch-codecs_dcraw.h Fri May 3 17:50:35 2019 (r500748) @@ -1,16 +1,6 @@ ---- codecs/dcraw.h.orig 2013-10-22 14:00:07 UTC +--- codecs/dcraw.h.orig 2015-07-16 15:20:12 UTC +++ codecs/dcraw.h -@@ -775,7 +775,8 @@ struct jhead { - - int CLASS ljpeg_start (struct jhead *jh, int info_only) - { -- int c, tag, len; -+ int c,tag; -+ ushort len; - uchar data[0x10000]; - const uchar *dp; - -@@ -786,8 +787,9 @@ int CLASS ljpeg_start (struct jhead *jh, +@@ -843,8 +843,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only do { fread (data, 2, 2, ifp); tag = data[0] << 8 | data[1]; @@ -22,3 +12,49 @@ fread (data, 1, len, ifp); switch (tag) { case 0xffc3: +@@ -4393,22 +4394,22 @@ void CLASS vng_interpolate() + -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, + -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, + -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, +- -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, +- -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, ++ -1,-2,-1,+0,0,-128, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, ++ -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,-120, -1,-1,+1,-2,0,0x40, + -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, + -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, + -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, + -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, + -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, + -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, +- +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ++ +0,-2,+0,+0,1,-128, +0,-1,+0,+1,1,-120, +0,-1,+1,-2,0,0x40, + +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, + +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, + +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, + +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, + +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, +- +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, +- +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, ++ +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,-128, ++ +1,-1,+1,+1,0,-120, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, + +1,+0,+2,+1,0,0x10 + }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; + ushort (*brow[5])[4], *pix; +@@ -7771,7 +7772,7 @@ void CLASS adobe_coeff (const char *make, const char * + { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Phase One P65", 0, 0, + { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, +- { "Red One", 704, 0xffff, /* DJC */ ++ { "Red One", 704, -1, /* DJC */ + { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Samsung EX1", 0, 0x3e00, + { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, +@@ -9547,7 +9548,7 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) + strncpy (th->desc, desc, 512); + strncpy (th->make, make, 64); + strncpy (th->model, model, 64); +- strcpy (th->soft, "dcraw v"DCRAW_VERSION); ++ strcpy (th->soft, "dcraw v" DCRAW_VERSION); + t = localtime (×tamp); + sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", + t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905031750.x43HoaLY076904>