diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2022-03-17 15:56:03 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2022-03-17 17:44:49 +0000 |
commit | 51968412ce2dd65db6142c2ab6853b3b1b07b572 (patch) | |
tree | 866353b09960f1895cb1a018c65882027a7e3795 | |
parent | 4a390cd14a8079bfac0116d897d735e5b25184f3 (diff) | |
download | ports-51968412ce2dd65db6142c2ab6853b3b1b07b572.tar.gz ports-51968412ce2dd65db6142c2ab6853b3b1b07b572.zip |
graphics/devil: update 1.7.8 → 1.8.0
27 files changed, 126 insertions, 1045 deletions
diff --git a/graphics/devil/Makefile b/graphics/devil/Makefile index 9749b2903f7e..e128496b4369 100644 --- a/graphics/devil/Makefile +++ b/graphics/devil/Makefile @@ -1,97 +1,70 @@ -# Created by: Andreas Kohn <andreas@syndrom23.de> - PORTNAME= devil -PORTVERSION= 1.7.8 -PORTREVISION= 29 +DISTVERSIONPREFIX= v +DISTVERSION= 1.8.0 PORTEPOCH= 1 CATEGORIES= graphics -MASTER_SITES= SF/openil/DevIL/${PORTVERSION} -DISTNAME= DevIL-${PORTVERSION} MAINTAINER= amdmi3@FreeBSD.org -COMMENT= Full featured cross-platform image library +COMMENT= Cross-platform image library -LICENSE= LGPL21 +LICENSE= LGPL21+ +LICENSE_FILE= ${WRKSRC}/LICENSE -USES= alias autoreconf gmake libtool localbase pkgconfig -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-ILU --enable-ILUT \ - --disable-allegro --disable-directx8 --disable-directx9 \ - --without-libsquish -INSTALL_TARGET= install-strip +USES= cmake pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= DentonW +GH_PROJECT= DevIL USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/${DISTNAME:tl} - PORTDOCS= * +PORTEXAMPLES= * + +CMAKE_SOURCE_PATH= ${WRKSRC}/DevIL -# With EXR the library is not usable from plain C (instant segfault) -OPTIONS_DEFINE= JPEG JASPER LCMS MNG PNG TIFF EXR X11 SDL NVTT SIMD DOCS -OPTIONS_DEFAULT=JPEG JASPER LCMS MNG PNG TIFF X11 SDL NVTT -OPTIONS_DEFAULT_amd64=SIMD - -JPEG_DESC= Enable JPEG support -JASPER_DESC= Enable JPEG2000 support -LCMS_DESC= Enable LCMS support -MNG_DESC= Enable MNG support -PNG_DESC= Enable PNG support -TIFF_DESC= Enable TIFF support -EXR_DESC= Enable EXR support -X11_DESC= Enable X11 support -SDL_DESC= Enable SDL support -SQUISH_DESC= Enable DXT compression via libsquish -NVTT_DESC= Enable NVidia texture tools support -SIMD_DESC= Enable SIMD autodetection (AltiVec, SSE3,...) +OPTIONS_DEFINE= JPEG JASPER LCMS2 LIBMNG PNG TIFF SQUISH DOCS EXAMPLES +OPTIONS_DEFAULT=JPEG JASPER LCMS2 LIBMNG PNG TIFF SQUISH JPEG_USES= jpeg -JPEG_CONFIGURE_ENABLE= jpeg +JPEG_CMAKE_OFF= -DIL_NO_JPG=1 + JASPER_LIB_DEPENDS= libjasper.so:graphics/jasper -JASPER_CONFIGURE_ENABLE=jp2 -LCMS_LIB_DEPENDS= liblcms.so:graphics/lcms -LCMS_CONFIGURE_ENABLE= lcms -MNG_LIB_DEPENDS= libmng.so:graphics/libmng -MNG_CONFIGURE_ENABLE= mng +JASPER_CMAKE_OFF= -DIL_NO_JP2=1 + +LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2 +LCMS2_CMAKE_OFF= -DIL_NO_LCMS=1 + +LIBMNG_LIB_DEPENDS= libmng.so:graphics/libmng +LIBMNG_CMAKE_OFF= -DIL_NO_MNG=1 + PNG_LIB_DEPENDS= libpng.so:graphics/png -PNG_CONFIGURE_ENABLE= png -PNG_CONFIGURE_OFF= libpng_app=no +PNG_CMAKE_OFF= -DIL_NO_PNG=1 + TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff -TIFF_CONFIGURE_ENABLE= tiff -EXR_LIB_DEPENDS= libOpenEXR.so:graphics/openexr libImath.so:math/Imath -EXR_CONFIGURE_ENABLE= exr -#SQUISH_BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:graphics/squish -#SQUISH_CONFIGURE_WITH= libsquish -NVTT_LIB_DEPENDS= libnvtt.so:graphics/nvidia-texture-tools -NVTT_CONFIGURE_WITH= nvtt -X11_USES= gl xorg -X11_USE= GL=gl,glu,glut XORG=x11,xext,xmu,xi,xrender,sm,ice -X11_CONFIGURE_OFF= --disable-opengl --disable-x11 --disable-xpm --disable-shm --disable-render -SDL_USES= sdl -SDL_USE= SDL=sdl -SDL_CONFIGURE_OFF= --disable-sdl -SIMD_CONFIGURE_OFF= --disable-altivec --disable-sse --disable-sse2 --disable-sse3 - -post-patch: - @${REINPLACE_CMD} -e '/^SUBDIRS/s|docs||g' ${WRKSRC}/Makefile.am - @${REINPLACE_CMD} -e '/^pkgdir=/s|$$(libdir)/|$$(prefix)/libdata/|g' \ - ${WRKSRC}/data/Makefile.am - @${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g' \ - ${WRKSRC}/src-ILU/ilur/ilur.c - ${REINPLACE_CMD} -e 's/Imf::Int64/uint64_t/g' \ - ${WRKSRC}/src-IL/src/il_exr.cpp \ - ${WRKSRC}/src-IL/include/il_exr.h - -post-install: - @${RMDIR} ${STAGEDIR}${DATADIR}/examples - @${RMDIR} ${STAGEDIR}${DATADIR} +TIFF_CMAKE_OFF= -DIL_NO_TIF=1 + +# With OPENEXR the library is not usable from plain C (instant segfault) +# (but need to recheck with 1.8.0), also the detection is broken +#OPENEXR_LIB_DEPENDS= libOpenEXR.so:graphics/openexr +#OPENEXR_CMAKE_OFF= -DIL_NO_EXR=1 +CMAKE_ARGS+= -DIL_NO_EXR=1 + +SQUISH_DESC= Enable DXT compression via libsquish +SQUISH_LIB_DEPENDS= libsquish.so:graphics/squish +SQUISH_CMAKE_BOOL= IL_USE_DXTC_SQUISH + +# Fails to build with NVTT, uses not installed header +# (and NVTT is deprecated anyway) +#NVTT_DESC= Enable NVidia texture tools support +#NVTT_BROKEN= does not build +#NVTT_LIB_DEPENDS= libnvtt.so:graphics/nvidia-texture-tools +#NVTT_CMAKE_BOOL= IL_USE_DXTC_NVIDIA +CMAKE_ARGS+= -DIL_USE_DXTC_NVIDIA=0 post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for file in AUTHORS CREDITS ChangeLog Libraries.txt README TODO - ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} -.endfor - -do-test: - cd ${WRKSRC}/test && ${MAKE_CMD} testil - cd ${WRKSRC}/test && ${SH} format_test/format_checks.sh + cd ${WRKSRC}/DevIL-docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/ + cd ${WRKSRC}/DevIL && ${INSTALL_DATA} CREDITS NEWS README.md TODO ${STAGEDIR}${DOCSDIR}/ + +post-install-EXAMPLES-on: + cd ${WRKSRC}/DevIL/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/ .include <bsd.port.mk> diff --git a/graphics/devil/distinfo b/graphics/devil/distinfo index fb054179f999..2f3bca59d09b 100644 --- a/graphics/devil/distinfo +++ b/graphics/devil/distinfo @@ -1,2 +1,3 @@ -SHA256 (DevIL-1.7.8.tar.gz) = 682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd -SIZE (DevIL-1.7.8.tar.gz) = 2051993 +TIMESTAMP = 1647527149 +SHA256 (DentonW-DevIL-v1.8.0_GH0.tar.gz) = 52129f247b26fcb5554643c9e6bbee75c4b9717735fdbf3c6ebff08cee38ad37 +SIZE (DentonW-DevIL-v1.8.0_GH0.tar.gz) = 2949100 diff --git a/graphics/devil/files/patch-41 b/graphics/devil/files/patch-41 deleted file mode 100644 index e5d6b0d31437..000000000000 --- a/graphics/devil/files/patch-41 +++ /dev/null @@ -1,103 +0,0 @@ -See https://sourceforge.net/p/openil/patches/41/ - -This patch improves alpha-compositing in DevIL. - ---- src-IL/src/il_devil.c (revision 1654) -+++ src-IL/src/il_devil.c (working copy) -@@ -665,10 +665,10 @@ - ILuint c; - ILuint StartX, StartY, StartZ; - ILboolean DestFlipped = IL_FALSE; -+ ILboolean DoAlphaBlend = IL_FALSE; - ILubyte *SrcTemp; -- ILfloat Back; -- -- // Check if the desiination image really exists -+ ILfloat ResultAlpha; -+ // Check if the destination image really exists - if (DestName == 0 || iCurImage == NULL) { - ilSetError(IL_ILLEGAL_OPERATION); - return IL_FALSE; -@@ -680,6 +680,9 @@ - DestFlipped = IL_TRUE; - ilFlipImage(); - } -+ //determining destination alpha support -+ DoAlphaBlend = ilIsEnabled(IL_BLIT_BLEND); -+ - //DestOrigin = Dest->Origin; - ilBindImage(Source); - -@@ -688,7 +691,9 @@ - ilSetError(IL_INVALID_PARAM); - return IL_FALSE; - } -- -+ //determining source alpha support -+ DoAlphaBlend &= ilIsEnabled(IL_BLIT_BLEND); -+ - Src = iCurImage; - - //@TODO test if coordinates are inside the images (hard limit for source) -@@ -737,38 +742,49 @@ - const ILuint SrcIndex = (z+SrcZ)*ConvSizePlane + (y+SrcY)*ConvBps + (x+SrcX)*Dest->Bpp; - const ILuint DestIndex = (z+DestZ)*Dest->SizeOfPlane + (y+DestY)*Dest->Bps + (x+DestX)*Dest->Bpp; - const ILuint AlphaIdx = SrcIndex + bpp_without_alpha; -- ILfloat Front = 0; -+ ILfloat FrontAlpha = 0; // foreground opacity -+ ILfloat BackAlpha = 0; // background opacity - - switch (Dest->Type) - { - case IL_BYTE: - case IL_UNSIGNED_BYTE: -- Front = Converted[AlphaIdx]/((float)IL_MAX_UNSIGNED_BYTE); -+ FrontAlpha = Converted[AlphaIdx]/((float)IL_MAX_UNSIGNED_BYTE); -+ BackAlpha = Dest->Data[AlphaIdx]/((float)IL_MAX_UNSIGNED_BYTE); - break; - case IL_SHORT: - case IL_UNSIGNED_SHORT: -- Front = ((ILshort*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_SHORT); -+ FrontAlpha = ((ILshort*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_SHORT); -+ BackAlpha = ((ILshort*)Dest->Data)[AlphaIdx]/((float)IL_MAX_UNSIGNED_SHORT); - break; - case IL_INT: - case IL_UNSIGNED_INT: -- Front = ((ILint*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_INT); -+ FrontAlpha = ((ILint*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_INT); -+ BackAlpha = ((ILint*)Dest->Data)[AlphaIdx]/((float)IL_MAX_UNSIGNED_INT); - break; - case IL_FLOAT: -- Front = ((ILfloat*)Converted)[AlphaIdx]; -+ FrontAlpha = ((ILfloat*)Converted)[AlphaIdx]; -+ BackAlpha = ((ILfloat*)Dest->Data)[AlphaIdx]; - break; - case IL_DOUBLE: -- Front = (ILfloat)(((ILdouble*)Converted)[AlphaIdx]); -+ FrontAlpha = (ILfloat)(((ILdouble*)Converted)[AlphaIdx]); -+ BackAlpha = (ILfloat)(((ILdouble*)Dest->Data)[AlphaIdx]); - break; - } -- Back = 1.0f - Front; -- // In case of Alpha channel, the data is blended. Keeps the original alpha. -- if (ilIsEnabled(IL_BLIT_BLEND)) { -+ -+ // In case of Alpha channel, the data is blended. -+ // Computes composite Alpha -+ if (DoAlphaBlend) -+ { -+ ResultAlpha = FrontAlpha + (1.0f - FrontAlpha) * BackAlpha; - for (c = 0; c < bpp_without_alpha; c++) - { -- Dest->Data[DestIndex + c] = -- (ILubyte)(Converted[SrcIndex + c] * Front -- + Dest->Data[DestIndex + c] * Back); -+ Dest->Data[DestIndex + c] = (ILubyte)( 0.5f + -+ (Converted[SrcIndex + c] * FrontAlpha + -+ (1.0f - FrontAlpha) * Dest->Data[DestIndex + c] * BackAlpha) -+ / ResultAlpha); - } -+ Dest->Data[AlphaIdx] = (ILubyte)(0.5f + ResultAlpha * (float)IL_MAX_UNSIGNED_BYTE); - } - else { - for (c = 0; c < Dest->Bpp; c++) diff --git a/graphics/devil/files/patch-42 b/graphics/devil/files/patch-42 deleted file mode 100644 index d31bad6506ae..000000000000 --- a/graphics/devil/files/patch-42 +++ /dev/null @@ -1,46 +0,0 @@ -See https://sourceforge.net/p/openil/patches/42/ - -This patch allows luminance BMPs to be saved as straight grayscale, saving -lots of space for colorless images. ---- src-IL/src/il_bmp.c (revision 1662) -+++ src-IL/src/il_bmp.c (working copy) -@@ -928,6 +928,28 @@ - } - } - -+ if((iCurImage->Format == IL_LUMINANCE) && (iCurImage->Pal.Palette == NULL)) -+ { -+ // For luminance images it is necessary to generate a grayscale BGR32 -+ // color palette. Could call iConvertImage(..., IL_COLOR_INDEX, ...) -+ // to generate an RGB24 palette, followed by iConvertPal(..., IL_PAL_BGR32), -+ // to convert the palette to BGR32, but it seemed faster to just -+ // explicitely generate the correct palette. -+ -+ iCurImage->Pal.PalSize = 256*4; -+ iCurImage->Pal.PalType = IL_PAL_BGR32; -+ iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); -+ -+ // Generate grayscale palette -+ for (i = 0; i < 256; i++) -+ { -+ iCurImage->Pal.Palette[i * 4] = i; -+ iCurImage->Pal.Palette[i * 4 + 1] = i; -+ iCurImage->Pal.Palette[i * 4 + 2] = i; -+ iCurImage->Pal.Palette[i * 4 + 3] = 0; -+ } -+ } -+ - // If the current image has a palette, take care of it - TempPal = &iCurImage->Pal; - if( iCurImage->Pal.PalSize && iCurImage->Pal.Palette && iCurImage->Pal.PalType != IL_PAL_NONE ) { -@@ -948,8 +970,8 @@ - //BITMAPINFOHEADER, so that the written header refers to - //TempImage instead of the original image - -- // @TODO LUMINANCE converted to BGR insteaf of beign saved to luminance -- if (iCurImage->Format != IL_BGR && iCurImage->Format != IL_BGRA && iCurImage->Format != IL_COLOUR_INDEX) { -+ if ((iCurImage->Format != IL_BGR) && (iCurImage->Format != IL_BGRA) && -+ (iCurImage->Format != IL_COLOUR_INDEX) && (iCurImage->Format != IL_LUMINANCE)) { - if (iCurImage->Format == IL_RGBA) { - TempImage = iConvertImage(iCurImage, IL_BGRA, IL_UNSIGNED_BYTE); - } else { diff --git a/graphics/devil/files/patch-43 b/graphics/devil/files/patch-43 deleted file mode 100644 index 7a508447212e..000000000000 --- a/graphics/devil/files/patch-43 +++ /dev/null @@ -1,26 +0,0 @@ -See https://sourceforge.net/p/openil/patches/43/ - -This patch will cause TIFFs with only a single color channel to be -saved as such, rather than as RGB. - ---- src-IL/src/il_tiff.c (revision 1663) -+++ src-IL/src/il_tiff.c (working copy) -@@ -987,11 +987,15 @@ - TIFFSetField(File, TIFFTAG_IMAGEWIDTH, TempImage->Width); - TIFFSetField(File, TIFFTAG_IMAGELENGTH, TempImage->Height); - TIFFSetField(File, TIFFTAG_COMPRESSION, Compression); -- TIFFSetField(File, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); -+ if((TempImage->Format == IL_LUMINANCE) || (TempImage->Format == IL_LUMINANCE_ALPHA)) -+ TIFFSetField(File, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); -+ else -+ TIFFSetField(File, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField(File, TIFFTAG_BITSPERSAMPLE, TempImage->Bpc << 3); - TIFFSetField(File, TIFFTAG_SAMPLESPERPIXEL, TempImage->Bpp); -- if (TempImage->Bpp == 4) //TODO: LUMINANCE, LUMINANCE_ALPHA -- TIFFSetField(File, TIFFTAG_MATTEING, 1); -+ if ((TempImage->Bpp == ilGetBppFormat(IL_RGBA)) || -+ (TempImage->Bpp == ilGetBppFormat(IL_LUMINANCE_ALPHA))) -+ TIFFSetField(File, TIFFTAG_EXTRASAMPLES, EXTRASAMPLE_ASSOCALPHA); - TIFFSetField(File, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(File, TIFFTAG_ROWSPERSTRIP, 1); - TIFFSetField(File, TIFFTAG_SOFTWARE, ilGetString(IL_VERSION_NUM)); diff --git a/graphics/devil/files/patch-46 b/graphics/devil/files/patch-46 deleted file mode 100644 index ab16eccd9aa4..000000000000 --- a/graphics/devil/files/patch-46 +++ /dev/null @@ -1,81 +0,0 @@ -See: https://sourceforge.net/p/openil/patches/46/ - -Add the ability to alter the PNG-compression. - ---- include/IL/il.h (revision 1677) -+++ include/IL/il.h (working copy) -@@ -377,6 +377,7 @@ - #define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette at this index value (0-255) is considered transparent, -1 for no trasparent color - #define IL_JPG_PROGRESSIVE 0x0725 - #define IL_VTF_COMP 0x0726 -+#define IL_PNG_COMPRESSION 0x0727 - - - // DXTC definitions ---- src-IL/include/il_states.h (revision 1677) -+++ src-IL/include/il_states.h (working copy) -@@ -76,6 +76,7 @@ - ILboolean ilJpgProgressive; - ILenum ilDxtcFormat; - ILenum ilPcdPicNum; -+ ILuint ilPngCompression; - - ILint ilPngAlphaIndex; // this index should be treated as an alpha key (most formats use this rather than having alpha in the palette), -1 for none - // currently only used when writing out .png files and should obviously be set to -1 most of the time ---- src-IL/src/il_png.c (revision 1677) -+++ src-IL/src/il_png.c (working copy) -@@ -538,6 +538,8 @@ - // png_init_io(png_ptr, PngFile); - png_set_write_fn(png_ptr, NULL, png_write, flush_data); - -+ png_set_compression_level(png_ptr, iGetInt(IL_PNG_COMPRESSION)); -+ - switch (iCurImage->Type) - { - case IL_BYTE: ---- src-IL/src/il_states.c (revision 1677) -+++ src-IL/src/il_states.c (working copy) -@@ -70,6 +70,10 @@ - ilStates[ilCurrentPos].ilPngAlphaIndex = -1; - ilStates[ilCurrentPos].ilVtfCompression = IL_DXT_NO_COMP; - -+ // Default PNG compression setting as defined in libpng manual: -+ // http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-5.8 -+ ilStates[ilCurrentPos].ilPngCompression = 6; -+ - ilStates[ilCurrentPos].ilTgaId = NULL; - ilStates[ilCurrentPos].ilTgaAuthName = NULL; - ilStates[ilCurrentPos].ilTgaAuthComment = NULL; -@@ -500,6 +504,9 @@ - case IL_VTF_COMP: - *Param = ilStates[ilCurrentPos].ilVtfCompression; - break; -+ case IL_PNG_COMPRESSION: -+ *Param = ilStates[ilCurrentPos].ilPngCompression; -+ break; - - // Boolean values - case IL_CONV_PAL: -@@ -815,6 +822,7 @@ - ilStates[ilCurrentPos].ilPcdPicNum = ilStates[ilCurrentPos-1].ilPcdPicNum; - - ilStates[ilCurrentPos].ilPngAlphaIndex = ilStates[ilCurrentPos-1].ilPngAlphaIndex; -+ ilStates[ilCurrentPos].ilPngCompression = ilStates[ilCurrentPos-1].ilPngCompression; - - // Strings - if (ilStates[ilCurrentPos].ilTgaId) -@@ -1159,6 +1167,14 @@ - return; - } - break; -+ case IL_PNG_COMPRESSION: -+ // Valid PNG compression settings as defined in libpng manual: -+ // http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-5.8 -+ if (Param >= 0 && Param <= 9) { -+ ilStates[ilCurrentPos].ilPngCompression = Param; -+ return; -+ } -+ break; - - default: - ilSetError(IL_INVALID_ENUM); diff --git a/graphics/devil/files/patch-47 b/graphics/devil/files/patch-47 deleted file mode 100644 index 56744d6f98a8..000000000000 --- a/graphics/devil/files/patch-47 +++ /dev/null @@ -1,44 +0,0 @@ -See https://sourceforge.net/p/openil/patches/47/ - -From 5ab2eae2939463aba7fd7bf9a37cc43b9d8cdc43 Mon Sep 17 00:00:00 2001 -From: Jeff Epler <jepler@unpythonic.net> -Date: Thu, 3 Jun 2010 16:38:46 -0500 -Subject: [PATCH] PR20713: fix out of bounds access in iluGaussian - -the 'rightmost pixel' case in iluBlurGaussian was the same as the -'leftmost pixel' case, which makes it refer to pixels that are off the -right-hand side of the image by 1 or 2 pixels. In the final row they -are beyond the end of the image, and if the bytes just beyond the end of -the image are in an unmapped page, the program can segfault. - -change the 'rightmost' case to use the pixels to the left of the pixel -being filtered instead. - -Signed-off-by: Jeff Epler <jepler@unpythonic.net> - ---- src-ILU/src/ilu_filter.c -+++ src-ILU/src/ilu_filter.c -@@ -378,14 +378,14 @@ ILubyte *Filter(ILimage *Image, const ILint *matrix, ILint scale, ILint bias) - } - for (c = 0; c < Image->Bpp; c++) { - Num = Image->Data[y - Image->Bps + c] * matrix[0] + -- Image->Data[y - Image->Bps + Image->Bpp + c] * matrix[1]+ -- Image->Data[y - Image->Bps + 2 * Image->Bpp + c] * matrix[2]+ -+ Image->Data[y - Image->Bps - Image->Bpp + c] * matrix[1]+ -+ Image->Data[y - Image->Bps - 2 * Image->Bpp + c] * matrix[2]+ - Image->Data[y + c] * matrix[3]+ -- Image->Data[y + Image->Bpp + c] * matrix[4]+ -- Image->Data[y + 2 * Image->Bpp + c] * matrix[5]+ -+ Image->Data[y - Image->Bpp + c] * matrix[4]+ -+ Image->Data[y - 2 * Image->Bpp + c] * matrix[5]+ - Image->Data[y + Image->Bps + c] * matrix[6]+ -- Image->Data[y + Image->Bps + Image->Bpp + c] * matrix[7]+ -- Image->Data[y + Image->Bps + 2 * Image->Bpp + c] * matrix[8]; -+ Image->Data[y + Image->Bps - Image->Bpp + c] * matrix[7]+ -+ Image->Data[y + Image->Bps - 2 * Image->Bpp + c] * matrix[8]; - - Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); - if (Temp > 255) --- -1.7.1 - diff --git a/graphics/devil/files/patch-49 b/graphics/devil/files/patch-49 deleted file mode 100644 index 384227561539..000000000000 --- a/graphics/devil/files/patch-49 +++ /dev/null @@ -1,14 +0,0 @@ -See https://sourceforge.net/p/openil/patches/49/ -- this patch allows -DevIL to be configured with ILUT, but without X11: - ---- m4/devil-api_checks.m4 2009-03-08 10:10:05.000000000 +0300 -+++ m4/devil-api_checks.m4 2012-01-31 17:05:07.163553444 +0400 -@@ -137,7 +137,7 @@ - [main], - [dnl The use_x11 var is either "yes" already, or we don't want "no" to be overwritten - ILUT_LIBS="-lX11 $ILUT_LIBS"], -- [use_x11="no"]) ]) -+ [use_x11="no"]) ], [use_x11="no"]) - TEST_API([shm]) - AS_IF([test "x$enable_shm" = "xyes"], - [AC_CHECK_HEADER([X11/extensions/XShm.h], diff --git a/graphics/devil/files/patch-50 b/graphics/devil/files/patch-50 deleted file mode 100644 index 47a23359d544..000000000000 --- a/graphics/devil/files/patch-50 +++ /dev/null @@ -1,14 +0,0 @@ -See https://sourceforge.net/p/openil/patches/50/ - ---- src-IL/src/il_targa.c (revision 1678) -+++ src-IL/src/il_targa.c (working copy) -@@ -219,6 +219,9 @@ - ilSetError(IL_ILLEGAL_FILE_VALUE); - return IL_FALSE; - } -+ -+ if (bTarga==IL_FALSE) -+ return IL_FALSE; - - // @JASON Extra Code to manipulate the image depending on - // the Image Descriptor's origin bits. diff --git a/graphics/devil/files/patch-51 b/graphics/devil/files/patch-51 deleted file mode 100644 index d4ea5ca26323..000000000000 --- a/graphics/devil/files/patch-51 +++ /dev/null @@ -1,52 +0,0 @@ -See https://sourceforge.net/p/openil/patches/51/ - -*** src-ILU/src/ilu_scale2d.c Wed Oct 28 16:51:50 2009 ---- src-ILU/src/ilu_scale2d.c Tue Dec 18 12:11:08 2012 -*************** -*** 204,209 **** ---- 204,217 ---- - ILfloat SrcX, SrcY; - ILuint iSrcX, iSrcY, iSrcXPlus1, iSrcYPlus1, ulOff, llOff, urOff, lrOff; - -+ // only downscale is allowed -+ assert(ScaleX>0 && ScaleX<=1.0f); -+ assert(ScaleY>0 && ScaleY<=1.0f); -+ -+ // scale factors should match images size -+ assert( ((ILfloat)Width -0.5f) / ScaleX < Image->Width ); -+ assert( ((ILfloat)Height-0.5f) / ScaleY < Image->Height ); -+ - ImgBps = Image->Bps / Image->Bpc; - SclBps = Scaled->Bps / Scaled->Bpc; - -*************** -*** 213,226 **** - for (y = 0; y < Height; y++) { - for (x = 0; x < Width; x++) { - // Calculate where we want to choose pixels from in our source image. -! SrcX = (ILfloat)x / (ILfloat)ScaleX; -! SrcY = (ILfloat)y / (ILfloat)ScaleY; -! // Integer part of SrcX and SrcY -! iSrcX = (ILuint)floor(SrcX); -! iSrcY = (ILuint)floor(SrcY); -! // Fractional part of SrcX and SrcY -! FracX = SrcX - (ILfloat)(iSrcX); -! FracY = SrcY - (ILfloat)(iSrcY); - - // We do not want to go past the right edge of the image or past the last line in the image, - // so this takes care of that. Normally, iSrcXPlus1 is iSrcX + 1, but if this is past the ---- 221,234 ---- - for (y = 0; y < Height; y++) { - for (x = 0; x < Width; x++) { - // Calculate where we want to choose pixels from in our source image. -! SrcX = (ILfloat)(x+0.5f) / (ILfloat)ScaleX; -! SrcY = (ILfloat)(y+0.5f) / (ILfloat)ScaleY; -! // indices of upper-left pixel -! iSrcX = (ILuint)(SrcX-0.5f); -! iSrcY = (ILuint)(SrcY-0.5f); -! // how far SrcX and SrcY are from upper-left pixel center -! FracX = SrcX - (ILfloat)(iSrcX) - 0.5f; -! FracY = SrcY - (ILfloat)(iSrcY) - 0.5f; - - // We do not want to go past the right edge of the image or past the last line in the image, - // so this takes care of that. Normally, iSrcXPlus1 is iSrcX + 1, but if this is past the diff --git a/graphics/devil/files/patch-52 b/graphics/devil/files/patch-52 deleted file mode 100644 index ff94644a86b1..000000000000 --- a/graphics/devil/files/patch-52 +++ /dev/null @@ -1,47 +0,0 @@ -See https://sourceforge.net/p/openil/patches/52/ - ---- src-IL/src/il_pcx.c (revision 1678) -+++ src-IL/src/il_pcx.c (working copy) -@@ -375,20 +375,26 @@ - if (Header->NumPlanes == 1 && Header->Bpp == 1) { - for (j = 0; j < iCurImage->Height; j++) { - i = 0; //number of written pixels -- while (i < iCurImage->Width) { -+ Bps = 0; -+ while (Bps<Header->Bps) { - if (iread(&HeadByte, 1, 1) != 1) - return IL_FALSE; -+ ++Bps; -+ // Check if we got duplicates with RLE compression - if (HeadByte >= 192) { - HeadByte -= 192; - if (iread(&Data, 1, 1) != 1) - return IL_FALSE; - -+ --Bps; -+ // duplicate next byte - for (c = 0; c < HeadByte; c++) { - k = 128; - for (d = 0; d < 8 && i < iCurImage->Width; d++) { - iCurImage->Data[j * iCurImage->Width + i++] = ((Data & k) != 0 ? 255 : 0); - k >>= 1; - } -+ ++Bps; - } - } - else { -@@ -408,8 +414,12 @@ - //If Width/8 is even no padding is needed, - //one pad byte has to be read otherwise. - //(let's hope the above is true ;-)) -- if(!((iCurImage->Width >> 3) & 0x1)) -- igetc(); // Skip pad byte -+ -+ // changed 2012-05-06 -+ // Not the good size - don't need it, padding inside data already ! -+ -+ // if(!((iCurImage->Width >> 3) & 0x1)) -+ // igetc(); // Skip pad byte - } - } - else if (Header->NumPlanes == 4 && Header->Bpp == 1){ // 4-bit images diff --git a/graphics/devil/files/patch-DevIL_cmake_Modules_FindMNG.cmake b/graphics/devil/files/patch-DevIL_cmake_Modules_FindMNG.cmake new file mode 100644 index 000000000000..3ef57ffba957 --- /dev/null +++ b/graphics/devil/files/patch-DevIL_cmake_Modules_FindMNG.cmake @@ -0,0 +1,11 @@ +--- DevIL/cmake/Modules/FindMNG.cmake.orig 2017-01-01 23:37:37 UTC ++++ DevIL/cmake/Modules/FindMNG.cmake +@@ -1,6 +1,6 @@ + # Denton: Modified from the libsquish one +-FIND_PATH(MNG_INCLUDE_DIR mng.h PATHS . mng .. ../mng DOC "Directory containing libmng headers") +-FIND_LIBRARY(MNG_LIBRARY NAMES mng libmng PATHS . mng .. ../mng PATH_SUFFIXES lib lib64 release minsizerel relwithdebinfo DOC "Path to libmng library") ++FIND_PATH(MNG_INCLUDE_DIR libmng.h) ++FIND_LIBRARY(MNG_LIBRARY NAMES mng) + + SET(MNG_LIBRARIES ${MNG_LIBRARY}) + diff --git a/graphics/devil/files/patch-DevIL_src-ILUT_CMakeLists.txt b/graphics/devil/files/patch-DevIL_src-ILUT_CMakeLists.txt new file mode 100644 index 000000000000..37c2ea41d36a --- /dev/null +++ b/graphics/devil/files/patch-DevIL_src-ILUT_CMakeLists.txt @@ -0,0 +1,11 @@ +--- DevIL/src-ILUT/CMakeLists.txt.orig 2017-01-01 23:37:37 UTC ++++ DevIL/src-ILUT/CMakeLists.txt +@@ -44,6 +44,8 @@ source_group("Resource Files" FILES ${ILUT_RSRC} ) + + # Remove SHARED to create a static library + add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) ++set_target_properties(ILUT PROPERTIES SOVERSION 1) ++set_target_properties(ILUT PROPERTIES VERSION 1.1.0) + + ## add link sub library info + target_link_libraries(ILUT diff --git a/graphics/devil/files/patch-DevIL_src-ILU_CMakeLists.txt b/graphics/devil/files/patch-DevIL_src-ILU_CMakeLists.txt new file mode 100644 index 000000000000..b8f32c54cd54 --- /dev/null +++ b/graphics/devil/files/patch-DevIL_src-ILU_CMakeLists.txt @@ -0,0 +1,11 @@ +--- DevIL/src-ILU/CMakeLists.txt.orig 2017-01-01 23:37:37 UTC ++++ DevIL/src-ILU/CMakeLists.txt +@@ -44,6 +44,8 @@ source_group("Resource Files" FILES ${ILU_RSRC} ) + + # Remove SHARED to create a static library + add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) ++set_target_properties(ILU PROPERTIES SOVERSION 1) ++set_target_properties(ILU PROPERTIES VERSION 1.1.0) + + + ## ILU requires IL diff --git a/graphics/devil/files/patch-DevIL_src-IL_CMakeLists.txt b/graphics/devil/files/patch-DevIL_src-IL_CMakeLists.txt new file mode 100644 index 000000000000..3dc87ff0acac --- /dev/null +++ b/graphics/devil/files/patch-DevIL_src-IL_CMakeLists.txt @@ -0,0 +1,11 @@ +--- DevIL/src-IL/CMakeLists.txt.orig 2017-01-01 23:37:37 UTC ++++ DevIL/src-IL/CMakeLists.txt +@@ -58,6 +58,8 @@ source_group("Text Files" FILES ${DevIL_TXT} ) + + if(BUILD_SHARED_LIBS) + add_library(IL SHARED ${DevIL_SRCS} ${DevIL_INC} ${DevIL_RSRC} ${DevIL_TXT}) ++ set_target_properties(IL PROPERTIES SOVERSION 1) ++ set_target_properties(IL PROPERTIES VERSION 1.1.0) + else(BUILD_SHARED_LIBS) + add_library(IL ${DevIL_SRCS} ${DevIL_INC} ${DevIL_RSRC} ${DevIL_TXT}) + endif(BUILD_SHARED_LIBS) diff --git a/graphics/devil/files/patch-DevIL_src-IL_src_il__dds-save.cpp b/graphics/devil/files/patch-DevIL_src-IL_src_il__dds-save.cpp new file mode 100644 index 000000000000..637a4ab95a36 --- /dev/null +++ b/graphics/devil/files/patch-DevIL_src-IL_src_il__dds-save.cpp @@ -0,0 +1,11 @@ +--- DevIL/src-IL/src/il_dds-save.cpp.orig 2017-01-01 23:37:37 UTC ++++ DevIL/src-IL/src/il_dds-save.cpp +@@ -708,7 +708,7 @@ ILuint Compress(ILimage *Image, ILenum DXTCFormat) + if (DXTCFormat == IL_DXT1 || DXTCFormat == IL_DXT1A || DXTCFormat == IL_DXT3 || DXTCFormat == IL_DXT5) { + // NVTT needs data as BGRA 32-bit. + if (Image->Format != IL_BGRA || Image->Type != IL_UNSIGNED_BYTE) { // No need to convert if already this format/type. +- ByteData = ilConvertBuffer(Image->SizeOfData, Image->Format, IL_BGRA, Image->Type, IL_UNSIGNED_BYTE, NULL, Image->Data); ++ ByteData = (ILubyte*)ilConvertBuffer(Image->SizeOfData, Image->Format, IL_BGRA, Image->Type, IL_UNSIGNED_BYTE, NULL, Image->Data); + if (ByteData == NULL) + return 0; + } diff --git a/graphics/devil/files/patch-DevIL_src-IL_src_il__jp2.cpp b/graphics/devil/files/patch-DevIL_src-IL_src_il__jp2.cpp new file mode 100644 index 000000000000..664d07fdff1a --- /dev/null +++ b/graphics/devil/files/patch-DevIL_src-IL_src_il__jp2.cpp @@ -0,0 +1,18 @@ +--- DevIL/src-IL/src/il_jp2.cpp.orig 2017-01-01 23:37:37 UTC ++++ DevIL/src-IL/src/il_jp2.cpp +@@ -314,13 +314,13 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILima + + + +-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) ++static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned int cnt) + { + obj; + return iread(buf, 1, cnt); + } + +-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) ++static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt) + { + obj; + return iwrite(buf, 1, cnt); diff --git a/graphics/devil/files/patch-clang b/graphics/devil/files/patch-clang deleted file mode 100644 index c77f80e99995..000000000000 --- a/graphics/devil/files/patch-clang +++ /dev/null @@ -1,376 +0,0 @@ -Submitted upstream as: - - https://sourceforge.net/p/openil/bugs/212/ - ---- lib/Makefile.am.orig 2009-03-08 20:45:36 UTC -+++ lib/Makefile.am -@@ -41,5 +41,5 @@ endif #BUILD_ILUT - - libIL_la_CPPFLAGS = -I $(il_include) -I $(all_include) - libIL_la_CFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ --libIL_la_CXXFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ -+libIL_la_CXXFLAGS = $(filter-out -std=% -fgnu89-inline,$(AM_CFLAGS)) @IL_CFLAGS@ - ---- src-IL/include/il_internal.h 2009-03-08 03:10:08.000000000 -0400 -+++ src-IL/include/il_internal.h 2014-12-20 01:11:39.000000000 -0500 -@@ -228,5 +228,5 @@ - ILboolean ilLoadBlpF(ILHANDLE File); - ILboolean ilLoadBlpL(const void *Lump, ILuint Size); --ILboolean ilIsValidBmp(ILconst_string CONST_RESTRICT FileName); -+ILboolean ilIsValidBmp(ILconst_string FileName); - ILboolean ilIsValidBmpF(ILHANDLE File); - ILboolean ilIsValidBmpL(const void *Lump, ILuint Size); ---- src-IL/src/il_exr.cpp 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_exr.cpp 2014-12-20 01:15:55.000000000 -0500 -@@ -11,5 +11,5 @@ - //----------------------------------------------------------------------------- - -- -+#include <machine/endian.h> - #include "il_internal.h" - #ifndef IL_NO_EXR -@@ -246,5 +246,5 @@ - in.readPixels (dataWindow.min.y, dataWindow.max.y); - } -- catch (const exception &e) -+ catch (const exception) - { - // If some of the pixels in the file cannot be read, -@@ -252,5 +252,4 @@ - // to the caller. - ilSetError(IL_LIB_EXR_ERROR); // Could I use something a bit more descriptive based on e? -- e; // Prevent the compiler from yelling at us about this being unused. - return IL_FALSE; - } ---- src-IL/include/il_endian.h 2009-03-08 03:10:08.000000000 -0400 -+++ src-IL/include/il_endian.h 2014-12-20 01:28:47.000000000 -0500 -@@ -15,14 +15,7 @@ - - #include "il_internal.h" -+#include <machine/endian.h> - --#ifdef WORDS_BIGENDIAN // This is defined by ./configure. -- #ifndef __BIG_ENDIAN__ -- #define __BIG_ENDIAN__ 1 -- #endif --#endif -- --#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \ -- || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) -- #undef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - #define Short(s) iSwapShort(s) - #define UShort(s) iSwapUShort(s) -@@ -39,7 +32,4 @@ - #define BigDouble(d) - #else -- #undef __BIG_ENDIAN__ -- #undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler... -- #define __LITTLE_ENDIAN__ - #define Short(s) - #define UShort(s) -@@ -168,5 +158,5 @@ - ILushort s; - iread(&s, sizeof(ILushort), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapUShort(&s); - #endif -@@ -177,5 +167,5 @@ - ILshort s; - iread(&s, sizeof(ILshort), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapShort(&s); - #endif -@@ -186,5 +176,5 @@ - ILuint i; - iread(&i, sizeof(ILuint), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapUInt(&i); - #endif -@@ -195,5 +185,5 @@ - ILint i; - iread(&i, sizeof(ILint), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapInt(&i); - #endif -@@ -204,5 +194,5 @@ - ILfloat f; - iread(&f, sizeof(ILfloat), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapFloat(&f); - #endif -@@ -213,5 +203,5 @@ - ILdouble d; - iread(&d, sizeof(ILdouble), 1); --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapDouble(&d); - #endif -@@ -223,5 +213,5 @@ - ILushort s; - iread(&s, sizeof(ILushort), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapUShort(&s); - #endif -@@ -233,5 +223,5 @@ - ILshort s; - iread(&s, sizeof(ILshort), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapShort(&s); - #endif -@@ -243,5 +233,5 @@ - ILuint i; - iread(&i, sizeof(ILuint), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapUInt(&i); - #endif -@@ -253,5 +243,5 @@ - ILint i; - iread(&i, sizeof(ILint), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapInt(&i); - #endif -@@ -263,5 +253,5 @@ - ILfloat f; - iread(&f, sizeof(ILfloat), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapFloat(&f); - #endif -@@ -273,5 +263,5 @@ - ILdouble d; - iread(&d, sizeof(ILdouble), 1); --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapDouble(&d); - #endif -@@ -280,5 +270,5 @@ - - INLINE ILubyte SaveLittleUShort(ILushort s) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapUShort(&s); - #endif -@@ -287,5 +277,5 @@ - - INLINE ILubyte SaveLittleShort(ILshort s) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapShort(&s); - #endif -@@ -295,5 +285,5 @@ - - INLINE ILubyte SaveLittleUInt(ILuint i) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapUInt(&i); - #endif -@@ -303,5 +293,5 @@ - - INLINE ILubyte SaveLittleInt(ILint i) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapInt(&i); - #endif -@@ -310,5 +300,5 @@ - - INLINE ILubyte SaveLittleFloat(ILfloat f) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapFloat(&f); - #endif -@@ -318,5 +308,5 @@ - - INLINE ILubyte SaveLittleDouble(ILdouble d) { --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - iSwapDouble(&d); - #endif -@@ -326,5 +316,5 @@ - - INLINE ILubyte SaveBigUShort(ILushort s) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapUShort(&s); - #endif -@@ -334,5 +324,5 @@ - - INLINE ILubyte SaveBigShort(ILshort s) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapShort(&s); - #endif -@@ -342,5 +332,5 @@ - - INLINE ILubyte SaveBigUInt(ILuint i) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapUInt(&i); - #endif -@@ -350,5 +340,5 @@ - - INLINE ILubyte SaveBigInt(ILint i) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapInt(&i); - #endif -@@ -358,5 +348,5 @@ - - INLINE ILubyte SaveBigFloat(ILfloat f) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapFloat(&f); - #endif -@@ -366,5 +356,5 @@ - - INLINE ILubyte SaveBigDouble(ILdouble d) { --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapDouble(&d); - #endif ---- src-IL/src/il_convert.c 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_convert.c 2014-12-20 01:36:37.000000000 -0500 -@@ -1018,5 +1018,5 @@ - } - /* Swap Colors on Big Endian !!!!! --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - // Swap endian - EndianSwapData(iCurImage); ---- src-IL/src/il_dicom.c 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_dicom.c 2014-12-20 01:36:37.000000000 -0500 -@@ -536,5 +536,5 @@ - - // We may have to swap the order of the data. --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - if (!Header.BigEndian) { - if (Header.Format == IL_RGB) ---- src-IL/src/il_icon.c 2009-03-08 08:10:09.000000000 +0100 -+++ src-IL/src/il_icon.c 2014-12-20 01:36:37.000000000 -0500 -@@ -555,5 +555,5 @@ - - //fix endianess --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - if (bit_depth == 16) - png_set_swap(ico_png_ptr); ---- src-IL/src/il_png.c 2009-03-08 08:10:09.000000000 +0100 -+++ src-IL/src/il_png.c 2014-12-20 01:36:37.000000000 -0500 -@@ -308,5 +308,5 @@ - - //fix endianess --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - if (bit_depth == 16) - png_set_swap(png_ptr); ---- src-IL/src/il_psd.c 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_psd.c 2014-12-20 01:36:37.000000000 -0500 -@@ -542,5 +542,5 @@ - return NULL; - } --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - for (i = 0; i < Head->Height * ChannelNum; i++) { - iSwapUShort(&RleTable[i]); ---- src-IL/src/il_tiff.c 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_tiff.c 2014-12-20 01:36:37.000000000 -0500 -@@ -611,5 +611,5 @@ - Image->Origin = IL_ORIGIN_LOWER_LEFT; // eiu...dunno if this is right - --#ifdef __BIG_ENDIAN__ //TIFFReadRGBAImage reads abgr on big endian, convert to rgba -+#if BYTE_ORDER == BIG_ENDIAN //TIFFReadRGBAImage reads abgr on big endian, convert to rgba - EndianSwapData(Image); - #endif -@@ -636,5 +636,5 @@ - case 3: - //TODO: why the ifdef?? --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); - #endif -@@ -647,5 +647,5 @@ - /* - //invert alpha --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - pImageData += 3; - #endif ---- src-ILUT/src/ilut_sdlsurface.c 2009-03-08 03:10:11.000000000 -0400 -+++ src-ILUT/src/ilut_sdlsurface.c 2014-12-20 01:36:37.000000000 -0500 -@@ -28,5 +28,5 @@ - { - //#if SDL_BYTEORDER == SDL_BIG_ENDIAN --#ifdef __BIG_ENDIAN__ -+#if BYTE_ORDER == BIG_ENDIAN - isBigEndian = 1; - rmask = 0xFF000000; -@@ -81,5 +81,5 @@ - } - else if (Image->Format != IL_COLOR_INDEX) { // We have to convert the image. -- #ifdef __BIG_ENDIAN__ -+ #if BYTE_ORDER == BIG_ENDIAN - Image = iConvertImage(Image, IL_RGBA, IL_UNSIGNED_BYTE); - #else ---- src-IL/src/il_ilbm.c 2009-03-08 04:30:11.000000000 -0400 -+++ src-IL/src/il_ilbm.c 2014-12-20 01:38:51.000000000 -0500 -@@ -620,5 +620,5 @@ - finalcolor = pixelcolor; - } --#if defined( __LITTLE_ENDIAN__ ) -+#if BYTE_ORDER == LITTLE_ENDIAN - { - *ptr++ = (Uint8)(finalcolor>>16); ---- src-IL/src/il_sgi.c 2009-03-08 03:10:09.000000000 -0400 -+++ src-IL/src/il_sgi.c 2014-12-20 01:40:37.000000000 -0500 -@@ -213,5 +213,5 @@ - ILboolean iReadRleSgi(iSgiHeader *Head) - { -- #ifdef __LITTLE_ENDIAN__ -+ #if BYTE_ORDER == LITTLE_ENDIAN - ILuint ixTable; - #endif -@@ -234,5 +234,5 @@ - goto cleanup_error; - --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - // Fix the offset/len table (it's big endian format) - for (ixTable = 0; ixTable < TableSize; ixTable++) { -@@ -290,5 +290,5 @@ - } - -- #ifdef __LITTLE_ENDIAN__ -+ #if BYTE_ORDER == LITTLE_ENDIAN - if (Head->Bpc == 2) - sgiSwitchData(iCurImage->Data, iCurImage->SizeOfData); -@@ -331,5 +331,5 @@ - return -1; - --#ifndef __LITTLE_ENDIAN__ -+#if BYTE_ORDER != LITTLE_ENDIAN - iSwapUShort(&Pixel); - #endif -@@ -347,5 +347,5 @@ - if (iread(&Pixel, Head->Bpc, 1) != 1) - return -1; --#ifndef __LITTLE_ENDIAN__ -+#if BYTE_ORDER != LITTLE_ENDIAN - iSwapUShort(&Pixel); - #endif -@@ -742,5 +742,5 @@ - StartTable[y] = DataOff; - DataOff += LenTable[y]; --#ifdef __LITTLE_ENDIAN__ -+#if BYTE_ORDER == LITTLE_ENDIAN - iSwapUInt(&StartTable[y]); - iSwapUInt(&LenTable[y]); diff --git a/graphics/devil/files/patch-configure.ac b/graphics/devil/files/patch-configure.ac deleted file mode 100644 index 81698f858102..000000000000 --- a/graphics/devil/files/patch-configure.ac +++ /dev/null @@ -1,19 +0,0 @@ ---- configure.ac.orig 2009-03-08 23:43:03.000000000 +0300 -+++ configure.ac 2013-10-17 08:08:52.015773416 +0400 -@@ -330,6 +330,8 @@ - dnl Give users chance to disable check for these two libraries that can't be disabled - dnl by any other means... - dnl -+AC_LANG_PUSH([C++]) -+ - AC_ARG_WITH([libsquish], - [AS_HELP_STRING([--with-squish[[=yes/no]]], - [Do you want to use the squish library if possible? (enables HW accelerated DXT compression, default="yes")]) ], -@@ -346,6 +348,7 @@ - AS_IF([test "x$with_nvtt" = "xyes"], - [DEVIL_CHECK_NVIDIA_TEXTOOLS]) - -+AC_LANG_POP([C++]) - dnl - dnl ILUT APIs library checking - dnl diff --git a/graphics/devil/files/patch-src-IL-src-il__icon.c b/graphics/devil/files/patch-src-IL-src-il__icon.c deleted file mode 100644 index ee808913268e..000000000000 --- a/graphics/devil/files/patch-src-IL-src-il__icon.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src-IL/src/il_icon.c.orig 2009-03-08 08:10:09.000000000 +0100 -+++ src-IL/src/il_icon.c 2010-03-29 08:57:55.000000000 +0200 -@@ -525,7 +525,7 @@ - - // Expand low-bit-depth grayscale images to 8 bits - if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { -- png_set_gray_1_2_4_to_8(ico_png_ptr); -+ png_set_expand_gray_1_2_4_to_8(ico_png_ptr); - } - - // Expand RGB images with transparency to full alpha channels diff --git a/graphics/devil/files/patch-src-IL-src-il__nvidia.cpp b/graphics/devil/files/patch-src-IL-src-il__nvidia.cpp deleted file mode 100644 index 1779d679d44b..000000000000 --- a/graphics/devil/files/patch-src-IL-src-il__nvidia.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- src-IL/src/il_nvidia.cpp.orig 2009-03-08 10:10:09.000000000 +0300 -+++ src-IL/src/il_nvidia.cpp 2009-03-18 18:32:29.000000000 +0300 -@@ -19,7 +19,6 @@ - - #ifdef IL_USE_DXTC_NVIDIA - #include <nvtt/nvtt.h> --#include <nvcore/Memory.h> - - using namespace nvtt; - diff --git a/graphics/devil/files/patch-src-IL-src-il__png.c b/graphics/devil/files/patch-src-IL-src-il__png.c deleted file mode 100644 index a1c4e5c0e02e..000000000000 --- a/graphics/devil/files/patch-src-IL-src-il__png.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src-IL/src/il_png.c.orig 2009-03-08 08:10:09.000000000 +0100 -+++ src-IL/src/il_png.c 2010-03-29 08:49:16.000000000 +0200 -@@ -105,7 +105,7 @@ - Read = iread(Signature, 1, 8); - iseek(-Read, IL_SEEK_CUR); - -- return png_check_sig(Signature, 8); -+ return !png_sig_cmp(Signature, 0, 8); - } - - -@@ -278,7 +278,7 @@ - - // Expand low-bit-depth grayscale images to 8 bits - if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { -- png_set_gray_1_2_4_to_8(png_ptr); -+ png_set_expand_gray_1_2_4_to_8(png_ptr); - } - - // Expand RGB images with transparency to full alpha channels diff --git a/graphics/devil/files/patch-src-ILUT-src-ilut__opengl.c b/graphics/devil/files/patch-src-ILUT-src-ilut__opengl.c deleted file mode 100644 index 685f82ea5a2a..000000000000 --- a/graphics/devil/files/patch-src-ILUT-src-ilut__opengl.c +++ /dev/null @@ -1,47 +0,0 @@ ---- src-ILUT/src/ilut_opengl.c.orig 2009-02-07 03:17:36.000000000 +0900 -+++ src-ILUT/src/ilut_opengl.c 2009-02-19 00:18:59.000000000 +0900 -@@ -58,7 +58,7 @@ - // #pragma comment(lib, "freeglut.lib") - #endif - --#ifdef linux -+#if defined(linux) || defined(__FreeBSD__) - // fix for glXGetProcAddressARB - #define GLX_GLXEXT_PROTOTYPES - #include <GL/glx.h> -@@ -84,7 +84,7 @@ - - static ILboolean HasCubemapHardware = IL_FALSE; - static ILboolean HasNonPowerOfTwoHardware = IL_FALSE; --#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__) -+#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__) || defined(__FreeBSD__) - ILGLTEXIMAGE3DARBPROC ilGLTexImage3D = NULL; - ILGLTEXSUBIMAGE3DARBPROC ilGLTexSubImage3D = NULL; - ILGLCOMPRESSEDTEXIMAGE2DARBPROC ilGLCompressed2D = NULL; -@@ -127,7 +127,7 @@ - IsExtensionSupported("GL_EXT_texture3D")) { - ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)wglGetProcAddress("glCompressedTexImage3DARB"); - } -- #elif linux -+ #elif (defined(linux) || defined(__FreeBSD__)) - if (IsExtensionSupported("GL_ARB_texture_compression") && - IsExtensionSupported("GL_EXT_texture_compression_s3tc")) { - ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC) -@@ -246,7 +246,7 @@ - ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLuint Target, ILimage *Image) - { - ILimage *ImageCopy, *OldImage; --#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) -+#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined(__FreeBSD__) - ILenum DXTCFormat; - ILuint Size; - ILubyte *Buffer; -@@ -259,7 +259,7 @@ - - OldImage = ilGetCurImage(); - --#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) -+#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined(__FreeBSD__) - if (ilutGetBoolean(ILUT_GL_USE_S3TC) && ilGLCompressed2D != NULL) { - if (Image->DxtcData != NULL && Image->DxtcSize != 0) { - DXTCFormat = GLGetDXTCNum(Image->DxtcFormat); diff --git a/graphics/devil/files/patch-src-IL__src__il_alloc.c b/graphics/devil/files/patch-src-IL__src__il_alloc.c deleted file mode 100644 index 4773d13e6d3a..000000000000 --- a/graphics/devil/files/patch-src-IL__src__il_alloc.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src-IL/src/il_alloc.c.orig 2009-03-08 10:10:09.000000000 +0300 -+++ src-IL/src/il_alloc.c 2014-10-07 01:39:56.201078445 +0400 -@@ -123,7 +123,7 @@ - { - if (ptr) - { --#ifdef MM_MALLOC -+#if defined(VECTORMEM) && defined(MM_MALLOC) - _mm_free((void*)ptr); - #else - #if defined(VECTORMEM) & !defined(POSIX_MEMALIGN) & !defined(VALLOC) & !defined(MEMALIGN) & !defined(MM_MALLOC) diff --git a/graphics/devil/files/patch-src-IL_src_il__jp2.c b/graphics/devil/files/patch-src-IL_src_il__jp2.c deleted file mode 100644 index 6cc7426fa6be..000000000000 --- a/graphics/devil/files/patch-src-IL_src_il__jp2.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src-IL/src/il_jp2.c.orig 2009-03-08 07:10:09 UTC -+++ src-IL/src/il_jp2.c -@@ -459,7 +459,7 @@ static void jas_stream_initbuf(jas_stream_t *stream, i - /* The buffer must be large enough to accommodate maximum - putback. */ - assert(bufsize > JAS_STREAM_MAXPUTBACK); -- stream->bufbase_ = JAS_CAST(uchar *, buf); -+ stream->bufbase_ = JAS_CAST(jas_uchar *, buf); - stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK; - } - } else { diff --git a/graphics/devil/files/patch-testing b/graphics/devil/files/patch-testing deleted file mode 100644 index 228a429aef81..000000000000 --- a/graphics/devil/files/patch-testing +++ /dev/null @@ -1,28 +0,0 @@ -Submitted upstream as https://sourceforge.net/p/openil/patches/53/ - -Fix to allow running with regular shell. Actually, even bash was erroring -out for some reason... ---- test/format_test/format_checks.sh.in 2009-03-08 03:10:07.000000000 -0400 -+++ test/format_test/format_checks.sh.in 2016-01-10 23:37:45.922896000 -0500 -@@ -27,8 +27,17 @@ - do - #echo expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*' -- if [ $(expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*') -eq 0 -o $(expr match "' $PROBLEMATIC '" '.*\s'$EXTENSION'\s.*') -ne 0 ] -- then # This extension is not considered as supported... -- continue; -- fi -+ case $CAN_SAVE in -+ *$EXTENSION*) -+ ;; -+ *) -+ # This extension is not considered as supported... -+ continue -+ ;; -+ esac -+ case $PROBLEMATIC in -+ *$EXTENSION*) -+ continue -+ ;; -+ esac - test -n "$VERBOSE" && echo $WINE ./testil@EXEEXT@ -e $EXTENSION - # EXEEXT comes in when one compiles on platforms that append extensions to executables (testil.exe) diff --git a/graphics/devil/pkg-plist b/graphics/devil/pkg-plist index ddc7f2ce7d81..92545140b529 100644 --- a/graphics/devil/pkg-plist +++ b/graphics/devil/pkg-plist @@ -1,18 +1,12 @@ -bin/ilur -include/IL/devil_cpp_wrapper.hpp include/IL/il.h include/IL/ilu.h -include/IL/ilu_region.h include/IL/ilut.h -lib/libIL.a lib/libIL.so lib/libIL.so.1 lib/libIL.so.1.1.0 -lib/libILU.a lib/libILU.so lib/libILU.so.1 lib/libILU.so.1.1.0 -lib/libILUT.a lib/libILUT.so lib/libILUT.so.1 lib/libILUT.so.1.1.0 |