Simple update to update DevIL to the latest stable upstream version. I'm building and checking all consumers, if this passed, OK?
Rafael Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/DevIL/Makefile,v retrieving revision 1.31 diff -u -p -u -p -r1.31 Makefile --- Makefile 11 Mar 2022 19:22:04 -0000 1.31 +++ Makefile 13 Jul 2022 19:36:08 -0000 @@ -1,14 +1,14 @@ COMMENT= library for powerful image loading capabilities -DISTNAME= DevIL-1.7.8 -REVISION= 18 -SHARED_LIBS+= IL 1.0 # 2.0 -SHARED_LIBS+= ILU 1.0 # 2.0 -SHARED_LIBS+= ILUT 1.0 # 2.0 +DISTNAME= DevIL-1.8.0 + +SHARED_LIBS+= IL 2.0 # 2.0 +SHARED_LIBS+= ILU 2.0 # 2.0 +SHARED_LIBS+= ILUT 2.0 # 2.0 CATEGORIES= graphics devel -HOMEPAGE= http://openil.sourceforge.net/ +HOMEPAGE= https://openil.sourceforge.net/ # LGPLv2.1 PERMIT_PACKAGE= Yes @@ -16,60 +16,21 @@ PERMIT_PACKAGE= Yes MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openil/} EXTRACT_SUFX= .zip -WANTLIB += ${COMPILER_LIBCXX} GL GLU ICE Xau Xdmcp lzma xcb-shm zstd -WANTLIB += Iex-3_1 OpenEXR-3_1 OpenEXRCore-3_1 OpenEXRUtil-3_1 -WANTLIB += IlmThread-3_1 Imath-3_1 SDL SM X11 X11-xcb -WANTLIB += Xext Xfixes Xi Xmu Xrandr Xrender Xt Xxf86vm -WANTLIB += c drm expat glapi glut iconv jasper jpeg lcms m mng -WANTLIB += png sndio tiff usbhid xcb xcb-dri2 xcb-dri3 xcb-glx -WANTLIB += xcb-present xcb-sync xcb-xfixes xshmfence z +WANTLIB += ${COMPILER_LIBCXX} jasper jpeg lcms2 m png tiff z COMPILER = base-clang ports-gcc base-gcc -LIB_DEPENDS= converters/libiconv \ - devel/sdl \ - graphics/freeglut \ +MODULES = devel/cmake + +LIB_DEPENDS= graphics/lcms2 \ + graphics/jpeg \ graphics/jasper \ - graphics/libmng \ - graphics/lcms \ - graphics/openexr \ graphics/tiff \ graphics/png +WRKDIST= ${WRKDIR}/DevIL/DevIL -AUTOCONF_VERSION= 2.61 -CONFIGURE_STYLE= autoconf -CONFIGURE_ARGS+= --with-squish=no \ - --with-zlib=yes \ - --enable-ILU \ - --enable-ILUT \ - --disable-allegro - -# This would only install three binary examples, we'll install it manually. -CONFIGURE_ARGS+= --with-examples=no -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm -lz" - -WRKDIST= ${WRKDIR}/${DISTNAME:L} - -# Too many Linuxisms in testing tools NO_TEST= Yes -# gcc-8's _mm_malloc() uses the AltiVec keyword __vector, so we need -# to disable it to make it run on macppc G3 machines -.if ${MACHINE_ARCH:Mpowerpc} -CONFIGURE_ENV += ac_cv_header_mm_malloc_h= -.endif - -post-extract: - chmod +x ${WRKSRC}/configure - ${SUBST_CMD} ${WRKSRC}/test/Makefile.in - -post-configure: - chmod +x ${WRKDIST}/build-aux/install-sh - -post-install: - @cd ${WRKSRC}; tar cf - examples | tar xf - -C \ - ${PREFIX}/share/devil/ .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/DevIL/distinfo,v retrieving revision 1.2 diff -u -p -u -p -r1.2 distinfo --- distinfo 3 Feb 2013 12:53:11 -0000 1.2 +++ distinfo 13 Jul 2022 19:36:08 -0000 @@ -1,2 +1,2 @@ -SHA256 (DevIL-1.7.8.zip) = Q2jYOzAWter+iYTw1/hszudriZPPkA06jL1JAbUvZOs= -SIZE (DevIL-1.7.8.zip) = 3452549 +SHA256 (DevIL-1.8.0.zip) = RRM385LGW/uDaYp4E3BTTcY9e6/KIemzcXjfBRj36JU= +SIZE (DevIL-1.8.0.zip) = 3210986 Index: patches/patch-configure_ac =================================================================== RCS file: patches/patch-configure_ac diff -N patches/patch-configure_ac --- patches/patch-configure_ac 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -separate CFLAGS that don't work in C++ - -Index: configure.ac ---- configure.ac.orig -+++ configure.ac -@@ -433,6 +433,7 @@ AM_CONDITIONAL([WINDOWS_BUILD], - - dnl Final substitution - AC_SUBST([GENERAL_CFLAGS]) -+AC_SUBST([ONLY_CFLAGS]) - AC_SUBST([IL_CFLAGS]) - AC_SUBST([IL_LIBS]) - AC_SUBST([ILU_CFLAGS]) Index: patches/patch-docs_DevIL_manual_texi =================================================================== RCS file: patches/patch-docs_DevIL_manual_texi diff -N patches/patch-docs_DevIL_manual_texi --- patches/patch-docs_DevIL_manual_texi 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -Add missing INFO-DIR-SECTION to silence install-info(1) - ---- docs/DevIL_manual.texi.orig Sun Aug 28 19:21:00 2011 -+++ docs/DevIL_manual.texi Sun Aug 28 19:24:02 2011 -@@ -13,6 +13,15 @@ - @c version.texi is generated automatically - @include version.texi - -+@ifinfo -+@format -+INFO-DIR-SECTION Libraries -+START-INFO-DIR-ENTRY -+* DevIL_manual: (devil_manual). IL part of DevIL - handling images -+END-INFO-DIR-ENTRY -+@end format -+@end ifinfo -+ - @copying - This is @code{DevIL @value{VERSION}} manual. - Last update is from @value{UPDATED}. Index: patches/patch-include_IL_il_h =================================================================== RCS file: patches/patch-include_IL_il_h diff -N patches/patch-include_IL_il_h --- patches/patch-include_IL_il_h 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -restrict doesn't exist in C++ - -Index: include/IL/il.h ---- include/IL/il.h.orig -+++ include/IL/il.h -@@ -63,7 +63,7 @@ extern "C" { - #endif - #endif - --#ifdef RESTRICT_KEYWORD -+#if defined(RESTRICT_KEYWORD) && !defined(__cplusplus) - #define RESTRICT restrict - #define CONST_RESTRICT const restrict - #else Index: patches/patch-lib_Makefile_in =================================================================== RCS file: patches/patch-lib_Makefile_in diff -N patches/patch-lib_Makefile_in --- patches/patch-lib_Makefile_in 11 Mar 2022 19:22:04 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -C++ doesn't grok some C flags - -Index: lib/Makefile.in ---- lib/Makefile.in.orig -+++ lib/Makefile.in -@@ -218,6 +218,7 @@ EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FGREP = @FGREP@ - GENERAL_CFLAGS = @GENERAL_CFLAGS@ -+ONLY_CFLAGS = @ONLY_CFLAGS@ - GLUT_CFLAGS = @GLUT_CFLAGS@ - GLUT_LIBS = @GLUT_LIBS@ - GLU_CFLAGS = @GLU_CFLAGS@ -@@ -349,10 +350,11 @@ lib_LTLIBRARIES = $(am__append_2) $(am__append_4) $(am - il_HEADERS = $(all_include)/IL/devil_cpp_wrapper.hpp $(am__append_3) \ - $(am__append_5) $(am__append_7) - AM_LDFLAGS = -version-info @DEVIL_LTVERSION@ $(am__append_1) --AM_CFLAGS = $(GENERAL_CFLAGS) -+AM_CFLAGS = $(ONLY_CFLAGS) $(GENERAL_CFLAGS) -+AM_CXXFLAGS = $(GENERAL_CFLAGS) - 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_CFLAGS = $(AM_CFLAGS:S/-std=c99//) @IL_CFLAGS@ -+libIL_la_CXXFLAGS = $(AM_CXXFLAGS) @IL_CFLAGS@ - libIL_la_SOURCES = $(il_src)/il_alloc.c $(il_src)/il_doom.c \ - $(il_src)/il_stack.c $(il_src)/il_pcx.c $(il_src)/il_rle.c \ - $(il_src)/il_bits.c $(il_src)/il_endian.c $(il_src)/il_exr.cpp \ Index: patches/patch-m4_devil-definitions_m4 =================================================================== RCS file: patches/patch-m4_devil-definitions_m4 diff -N patches/patch-m4_devil-definitions_m4 --- patches/patch-m4_devil-definitions_m4 11 Mar 2022 19:22:04 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,48 +0,0 @@ -move to C99, fix C++ - -Index: m4/devil-definitions.m4 ---- m4/devil-definitions.m4.orig -+++ m4/devil-definitions.m4 -@@ -6,6 +6,8 @@ dnl ILU_CFLAGS="$ILU_CFLAGS $1" - dnl ILUT_CFLAGS="$ILUT_CFLAGS $1"]) - dnl IL_CFLAGS are present everywhere - -+AC_DEFUN([ADD_ONLY_CFLAGS], -+ [ONLY_CFLAGS="$ONLY_CFLAGS $1"]) - - dnl - dnl Check CPU Extensions -@@ -244,12 +246,12 @@ AC_DEFUN([SETTLE_MNG], - - AC_DEFUN([SETTLE_PNG], - [DEVIL_IL_LIB([png.h], -- [png12]) -- AS_IF([test "x$have_png12" = "xno"], -+ [png]) -+ AS_IF([test "x$have_png" = "xno"], - [DEVIL_IL_LIB([png.h], - [png]) - lib_test_result="$have_png"], -- [lib_test_result="$have_png12"]) -+ [lib_test_result="$have_png"]) - AS_IF([test "x$lib_test_result" = "xyes"], - [MAYBE_OPTIONAL_DEPENDENCY([IL], - [libpng]) ]) ]) -@@ -285,14 +287,14 @@ AC_DEFUN([DEVIL_CHECK_RESTRICT], - - AC_DEFUN([DEVIL_CHECK_RESTRICT_GNU99], - [TMP_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline" -- AC_MSG_CHECKING([restrict gnu99 keyword]) -+ CFLAGS="$CFLAGS -std=c99 -fgnu89-inline" -+ AC_MSG_CHECKING([restrict c99 keyword]) - AC_COMPILE_IFELSE([[void foo(void * restrict test){}]], - [AC_DEFINE([RESTRICT_KEYWORD], - [1], - [restric keyword available]) - AC_MSG_RESULT([yes]) - CFLAGS="$TMP_CFLAGS" -- ADD_CFLAGS(-std=gnu99 -fgnu89-inline)], -+ ADD_ONLY_CFLAGS(-std=c99 -fgnu89-inline)], - [AC_MSG_RESULT([no]) - CFLAGS="$TMP_CFLAGS"]) ]) Index: patches/patch-src-ILUT_src_ilut_opengl_c =================================================================== RCS file: patches/patch-src-ILUT_src_ilut_opengl_c diff -N patches/patch-src-ILUT_src_ilut_opengl_c --- patches/patch-src-ILUT_src_ilut_opengl_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,47 +0,0 @@ ---- src-ILUT/src/ilut_opengl.c.orig Mon Sep 14 15:22:33 2009 -+++ src-ILUT/src/ilut_opengl.c Mon Sep 14 15:25:13 2009 -@@ -58,7 +58,7 @@ void *aglGetProcAddress( const GLubyte *name ) { - // #pragma comment(lib, "freeglut.lib") - #endif - --#ifdef linux -+#if defined(linux) || defined (__OpenBSD__) - // fix for glXGetProcAddressARB - #define GLX_GLXEXT_PROTOTYPES - #include <GL/glx.h> -@@ -84,7 +84,7 @@ void *aglGetProcAddress( const GLubyte *name ) { - - 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 (__OpenBSD__) - ILGLTEXIMAGE3DARBPROC ilGLTexImage3D = NULL; - ILGLTEXSUBIMAGE3DARBPROC ilGLTexSubImage3D = NULL; - ILGLCOMPRESSEDTEXIMAGE2DARBPROC ilGLCompressed2D = NULL; -@@ -127,7 +127,7 @@ ILboolean ilutGLInit() - IsExtensionSupported("GL_EXT_texture3D")) { - ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)wglGetProcAddress("glCompressedTexImage3DARB"); - } -- #elif linux -+ #elif defined(linux) || defined (__OpenBSD__) - if (IsExtensionSupported("GL_ARB_texture_compression") && - IsExtensionSupported("GL_EXT_texture_compression_s3tc")) { - ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC) -@@ -246,7 +246,7 @@ ILuint GLGetDXTCNum(ILenum DXTCFormat) - 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 (__OpenBSD__) - ILenum DXTCFormat; - ILuint Size; - ILubyte *Buffer; -@@ -259,7 +259,7 @@ ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLu - - OldImage = ilGetCurImage(); - --#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) -+#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined (__OpenBSD__) - if (ilutGetBoolean(ILUT_GL_USE_S3TC) && ilGLCompressed2D != NULL) { - if (Image->DxtcData != NULL && Image->DxtcSize != 0) { - DXTCFormat = GLGetDXTCNum(Image->DxtcFormat); Index: patches/patch-src-ILU_ilur_ilur_c =================================================================== RCS file: patches/patch-src-ILU_ilur_ilur_c diff -N patches/patch-src-ILU_ilur_ilur_c --- patches/patch-src-ILU_ilur_ilur_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Replace the malloc.h header with stdlib.h. - ---- src-ILU/ilur/ilur.c.orig Wed Nov 19 22:50:22 2014 -+++ src-ILU/ilur/ilur.c Wed Nov 19 22:50:57 2014 -@@ -1,6 +1,6 @@ - #include <string.h> - #include <stdio.h> --#include <malloc.h> -+#include <stdlib.h> - - #include <IL/il.h> - #include <IL/ilu.h> Index: patches/patch-src-IL_include_il_exr_h =================================================================== RCS file: patches/patch-src-IL_include_il_exr_h diff -N patches/patch-src-IL_include_il_exr_h --- patches/patch-src-IL_include_il_exr_h 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -Fix build with OpenEXR>=3 - -Index: src-IL/include/il_exr.h ---- src-IL/include/il_exr.h.orig -+++ src-IL/include/il_exr.h -@@ -63,8 +63,8 @@ class ilIStream : public Imf::IStream - virtual bool read (char c[/*n*/], int n); - // I don't think I need this one, since we are taking care of the file handles ourselves. - //virtual char * readMemoryMapped (int n); -- virtual Imf::Int64 tellg (); -- virtual void seekg (Imf::Int64 Pos); -+ virtual uint64_t tellg (); -+ virtual void seekg (uint64_t Pos); - virtual void clear (); - - protected: -@@ -79,8 +79,8 @@ class ilOStream : public Imf::OStream - virtual void write (const char c[/*n*/], int n); - // I don't think I need this one, since we are taking care of the file handles ourselves. - //virtual char * readMemoryMapped (int n); -- virtual Imf::Int64 tellp (); -- virtual void seekp (Imf::Int64 Pos); -+ virtual uint64_t tellp (); -+ virtual void seekp (uint64_t Pos); - - protected: - Index: patches/patch-src-IL_src_il_dicom_c =================================================================== RCS file: patches/patch-src-IL_src_il_dicom_c diff -N patches/patch-src-IL_src_il_dicom_c --- patches/patch-src-IL_src_il_dicom_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,17 +0,0 @@ -Security fix for CVE-2009-3994: buffer overflow in DICOM reader - ---- src-IL/src/il_dicom.c.orig Tue Mar 29 19:39:24 2011 -+++ src-IL/src/il_dicom.c Tue Mar 29 19:40:05 2011 -@@ -427,9 +427,11 @@ ILboolean GetUID(ILubyte *UID) - return IL_FALSE; - - ValLen = GetLittleUShort(); -+ if (ValLen > 64) -+ return IL_FALSE; - if (iread(UID, ValLen, 1) != 1) - return IL_FALSE; -- UID[64] = 0; // Just to make sure that our string is terminated. -+ UID[ValLen] = 0; // Just to make sure that our string is terminated. - - return IL_TRUE; - } Index: patches/patch-src-IL_src_il_exr_cpp =================================================================== RCS file: patches/patch-src-IL_src_il_exr_cpp diff -N patches/patch-src-IL_src_il_exr_cpp --- patches/patch-src-IL_src_il_exr_cpp 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,47 +0,0 @@ -Fix build with OpenEXR>=3 - -Index: src-IL/src/il_exr.cpp ---- src-IL/src/il_exr.cpp.orig -+++ src-IL/src/il_exr.cpp -@@ -143,9 +143,9 @@ bool ilIStream::read(char c[], int n) - - - //@TODO: Make this work with 64-bit values. --Imf::Int64 ilIStream::tellg() -+uint64_t ilIStream::tellg() - { -- Imf::Int64 Pos; -+ uint64_t Pos; - - // itell only returns a 32-bit value! - Pos = itell(); -@@ -156,7 +156,7 @@ Imf::Int64 ilIStream::tellg() - - // Note that there is no return value here, even though there probably should be. - //@TODO: Make this work with 64-bit values. --void ilIStream::seekg(Imf::Int64 Pos) -+void ilIStream::seekg(uint64_t Pos) - { - // iseek only uses a 32-bit value! - iseek((ILint)Pos, IL_SEEK_SET); // I am assuming this is seeking from the beginning. -@@ -309,9 +309,9 @@ void ilOStream::write(const char c[], int n) - } - - //@TODO: Make this work with 64-bit values. --Imf::Int64 ilOStream::tellp() -+uint64_t ilOStream::tellp() - { -- Imf::Int64 Pos; -+ uint64_t Pos; - - // itellw only returns a 32-bit value! - Pos = itellw(); -@@ -321,7 +321,7 @@ Imf::Int64 ilOStream::tellp() - - // Note that there is no return value here, even though there probably should be. - //@TODO: Make this work with 64-bit values. --void ilOStream::seekp(Imf::Int64 Pos) -+void ilOStream::seekp(uint64_t Pos) - { - // iseekw only uses a 32-bit value! - iseekw((ILint)Pos, IL_SEEK_SET); // I am assuming this is seeking from the beginning. Index: patches/patch-src-IL_src_il_icon_c =================================================================== RCS file: patches/patch-src-IL_src_il_icon_c diff -N patches/patch-src-IL_src_il_icon_c --- patches/patch-src-IL_src_il_icon_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -Fix for png-1.5. - ---- src-IL/src/il_icon.c.orig Wed Jul 6 15:09:04 2011 -+++ src-IL/src/il_icon.c Wed Jul 6 15:10:14 2011 -@@ -525,7 +525,7 @@ ILboolean ico_readpng_get_image(ICOIMAGE *Icon, ILdoub - - // 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 Index: patches/patch-src-IL_src_il_jp2_c =================================================================== RCS file: patches/patch-src-IL_src_il_jp2_c diff -N patches/patch-src-IL_src_il_jp2_c --- patches/patch-src-IL_src_il_jp2_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -Cope with libjasper>=1.900.25 - -Index: src-IL/src/il_jp2.c ---- src-IL/src/il_jp2.c.orig -+++ 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 { Index: patches/patch-src-IL_src_il_jp2_cpp =================================================================== RCS file: patches/patch-src-IL_src_il_jp2_cpp diff -N patches/patch-src-IL_src_il_jp2_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src-IL_src_il_jp2_cpp 13 Jul 2022 19:36:08 -0000 @@ -0,0 +1,37 @@ +Index: src-IL/src/il_jp2.cpp +--- src-IL/src/il_jp2.cpp.orig ++++ src-IL/src/il_jp2.cpp +@@ -313,14 +313,32 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILima + } + + +- ++// Hack to compile against different versions of Jasper which expect ++// slightly different function types for their callbacks. The defined() ++// checks are just looking for sybols that happen to have arrived around ++// the same time as the API change, so no reason they won't break in the ++// future :-( Hopefully by the time it does nobody will care about pre-2.0.20 ++// versions of jasper ++// ++// see: https://github.com/OSGeo/gdal/commit/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 ++// https://github.com/DentonW/DevIL/issues/90 ++#if defined(PRIjas_seqent) ++static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt) ++#else + static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) ++#endif + { + obj; + return iread(buf, 1, cnt); + } + ++#if defined(JAS_INCLUDE_JP2_CODEC) ++static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt) ++#elif defined(PRIjas_seqent) ++static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, unsigned cnt) ++#else + static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) ++#endif + { + obj; + return iwrite(buf, 1, cnt); Index: patches/patch-src-IL_src_il_png_c =================================================================== RCS file: patches/patch-src-IL_src_il_png_c diff -N patches/patch-src-IL_src_il_png_c --- patches/patch-src-IL_src_il_png_c 11 Mar 2022 19:22:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -Fix for png-1.5. - ---- src-IL/src/il_png.c.orig Wed Jul 6 15:09:12 2011 -+++ src-IL/src/il_png.c Wed Jul 6 15:10:26 2011 -@@ -278,7 +278,7 @@ ILboolean readpng_get_image(ILdouble display_exponent) - - // 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 Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/DevIL/pkg/PLIST,v retrieving revision 1.7 diff -u -p -u -p -r1.7 PLIST --- pkg/PLIST 11 Mar 2022 19:22:04 -0000 1.7 +++ pkg/PLIST 13 Jul 2022 19:36:08 -0000 @@ -1,55 +1,10 @@ -@bin bin/ilur include/IL/ -include/IL/devil_cpp_wrapper.hpp include/IL/il.h include/IL/ilu.h -include/IL/ilu_region.h include/IL/ilut.h -@info info/DevIL_manual.info -@static-lib lib/libIL.a -lib/libIL.la @lib lib/libIL.so.${LIBIL_VERSION} -@static-lib lib/libILU.a -lib/libILU.la @lib lib/libILU.so.${LIBILU_VERSION} -@static-lib lib/libILUT.a -lib/libILUT.la @lib lib/libILUT.so.${LIBILUT_VERSION} lib/pkgconfig/IL.pc lib/pkgconfig/ILU.pc lib/pkgconfig/ILUT.pc -share/devil/ -share/devil/examples/ -share/devil/examples/allegro_example/ -share/devil/examples/allegro_example/allegtest.c -share/devil/examples/animation_example/ -share/devil/examples/animation_example/AnimTest.cpp -share/devil/examples/animation_example/AnimTest.rc -share/devil/examples/animation_example/OpenIL.ico -share/devil/examples/animation_example/resource.h -share/devil/examples/cpp_wrapper_example/ -share/devil/examples/cpp_wrapper_example/il_wrap.cpp -share/devil/examples/direct3d_example/ -share/devil/examples/direct3d_example/d3dtest.cpp -share/devil/examples/opengl_example/ -share/devil/examples/opengl_example/gltest.c -share/devil/examples/opengl_example/gltest.h -share/devil/examples/override_example/ -share/devil/examples/override_example/iotest.c -share/devil/examples/register_read_example/ -share/devil/examples/register_read_example/readtest.c -share/devil/examples/sdl_example/ -share/devil/examples/sdl_example/sdl_test.c -share/devil/examples/simple_example/ -share/devil/examples/simple_example/simple.c -share/devil/examples/volume_example/ -share/devil/examples/volume_example/3dtest.c -share/devil/examples/volume_example/3dtest.h -share/devil/examples/windows_example/ -share/devil/examples/windows_example/BatchConv.cpp -share/devil/examples/windows_example/WindowsTest.cpp -share/devil/examples/windows_example/WindowsTest.h -share/devil/examples/windows_example/WindowsTest.rc -share/devil/examples/windows_example/resource.h -share/devil/examples/windows_example/resources/ -share/devil/examples/windows_example/resources/OpenIL.ico
