From nobody Sat Oct 1 00:07:50 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MfS931PPHz4dhgk; Sat, 1 Oct 2022 00:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MfS9314Zrz3rJB; Sat, 1 Oct 2022 00:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664582871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NEyGdF8r/R4Kie2YyQy7Vm4WNf/rTxqpISLLAAs2vQ=; b=G4EEqiXIGfaBxtFRDONYu79CLpCQiulPGNacRYyDIj/L1o/9SaBtLaKMBhCba3H5pDw8y1 pTerdSXEUsILNIsFPjp0cweQ2MJtHaqHDiMgkI2Ffo00sWBMg9u37dewMWzcbvfENXCQMc HQBY427FwMyhT59JuZpItte3LARYT8+t9+drfH/0H+eqp/89zvyUwrpqNCG+z6W3UbTC2E iBYzv8j35KnYtqvRVlRSFZho3GiuGwPKMxuD9eOm9sZt7Pyxk7mmLeB/l54DVzaho3UHcG CZzAsQcUzaFLAS7ye1VBaM5tWryVmV/JHpVxMTtP1oX3G2AuLS9lP1ZeEzDMMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MfS93052szLgl; Sat, 1 Oct 2022 00:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29107od6043970; Sat, 1 Oct 2022 00:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29107ojp043969; Sat, 1 Oct 2022 00:07:50 GMT (envelope-from git) Date: Sat, 1 Oct 2022 00:07:50 GMT Message-Id: <202210010007.29107ojp043969@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rene Ladan Subject: git: b46629e97f41 - main - cleanup: Remove expired ports: List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rene X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b46629e97f411b56d89d5cd44e0a10e433846718 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664582871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NEyGdF8r/R4Kie2YyQy7Vm4WNf/rTxqpISLLAAs2vQ=; b=AG0BiGI6JXdx2VcWEnGJJyG7bYBv2jbwNJio9UOhc8RAcl6AoVz1v4bq+T1vAPxSfDp/Ic D0RjNg7UxIsB8iNW0GupLnf7l2SkpaxJoluyVjxP4hsHTfLg5cDpYi90kySuBHpAb91BzQ wbOGaL/Z6jP6eTMFF3KSi0sU4JYetLRj4oASUxiTaVKQ8HRyTGRCeIhkFIHqWSyA+yCxlw NeJthD0UD14wfQYk8Ooy5NeU/CjGusMHGxM9PxLnuMp1tFPSj2WiInVAiRoQ5SRq1CJiPC 37EfW7Bw6B6T+AfTK3EzYcpTQaELoFuGA31J5/MGedrX1YcmueF1rQaARLtV5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664582871; a=rsa-sha256; cv=none; b=gERY+KxSWs3eETRnndx++FG7TIR6ZKb6ZwtHEyyPnXPna+vS3uiqOLd2+ahSyfr0OhvnA2 A6bNEI072NXPLN/wA24/ijZ+5YhZdpJeP3avVzH77LCLlG77q9tXr5kWtsibidEMiKKJt7 adxfZ/httTncPGwcAnXxBAa7t1/ULpbUZCZ+Pw0i56n9mGMT3O5uAxOZjwRNSl4aJnG+TX cFYJY9p/g5ghaCsvkhfp89UQyuZxQrYsQ2Byzd3QX2x0KoThlkKRa2gVhim/FcGB8LEtKN MHRuHvuph39u2lZ8dkP63EpUpF/9je7ImVDscgPtX9I9QeFCyKueCz4kOMVCng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=b46629e97f411b56d89d5cd44e0a10e433846718 commit b46629e97f411b56d89d5cd44e0a10e433846718 Author: Rene Ladan AuthorDate: 2022-09-30 21:27:31 +0000 Commit: Rene Ladan CommitDate: 2022-10-01 00:07:19 +0000 cleanup: Remove expired ports: 2022-10-01 graphics/megapov: Abandoned upstream. graphics/povray37 is the recommended replacement --- MOVED | 1 + graphics/Makefile | 1 - graphics/megapov/Makefile | 55 --- graphics/megapov/distinfo | 2 - graphics/megapov/files/patch-libpng15 | 753 ---------------------------------- graphics/megapov/pkg-descr | 4 - 6 files changed, 1 insertion(+), 815 deletions(-) diff --git a/MOVED b/MOVED index 2dff8a8335bd..55491c18266e 100644 --- a/MOVED +++ b/MOVED @@ -17578,3 +17578,4 @@ www/py-ws4py||2022-09-30|Has expired: Upstream abandoned net-p2p/awgg||2022-09-30|Has expired: Depends on expired ftp/axel ftp/axel||2022-09-30|Has expired: Last release in 2009 and dead upstream, please consider using www/aria2 databases/py-bsddb3|databases/py-berkeleydb|2022-09-30|Has expired: Requires upstream EOLd db5. Use py-berkeleydb +graphics/megapov|graphics/povray37|2022-10-01|Has expired: Abandoned upstream. graphics/povray37 is the recommended replacement diff --git a/graphics/Makefile b/graphics/Makefile index a9ab2a21d104..2d7a3e086114 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -547,7 +547,6 @@ SUBDIR += mapyrus SUBDIR += matplotlib-cpp SUBDIR += matplotplusplus - SUBDIR += megapov SUBDIR += meh SUBDIR += mesa-demos SUBDIR += mesa-devel diff --git a/graphics/megapov/Makefile b/graphics/megapov/Makefile deleted file mode 100644 index eb2e01177b14..000000000000 --- a/graphics/megapov/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -PORTNAME= megapov -PORTVERSION= 1.2.1 -PORTREVISION= 8 -CATEGORIES= graphics -MASTER_SITES= http://megapov.inetart.net/packages/unix/ - -MAINTAINER= ports@FreeBSD.org -COMMENT= Unofficial extensions of POV-Ray -WWW= http://megapov.inetart.net/ - -DEPRECATED= Abandoned upstream. graphics/povray37 is the recommended replacement. -EXPIRATION_DATE= 2022-10-01 - -LIB_DEPENDS= libpng.so:graphics/png \ - libtiff.so:graphics/tiff -#RUN_DEPENDS= povray:graphics/povray-meta - -INSTALL_WRKSRC= ${WRKSRC}/unix - -USES= compiler:c11 gmake jpeg localbase tar:bzip2 -USE_CXXSTD= c++98 -GNU_CONFIGURE= yes -CONFIGURE_ARGS= COMPILED_BY="ports@FreeBSD.org" - -PORTDOCS= * -PORTEXAMPLES= * -PLIST_FILES= bin/megapov - -OPTIONS_DEFINE= DOCS EXAMPLES OPTIMIZED_CFLAGS X11 -OPTIONS_DEFINE_amd64= SVGALIB -OPTIONS_DEFINE_i386= SVGALIB - -OPTIMIZED_CFLAGS_CFLAGS=\ - -O3 -ffast-math -finline-functions \ - -fomit-frame-pointer -funroll-loops \ - -fexpensive-optimizations -SVGALIB_LIB_DEPENDS= libvga.so:graphics/svgalib -SVGALIB_CONFIGURE_WITH= svga -X11_USES= xorg -X11_USE= xorg=x11,xpm -X11_CONFIGURE_WITH= x - -post-patch: - @${REINPLACE_CMD} -e \ - 's|"-O3"|""|' ${WRKSRC}/configure - -post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} - @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) - -post-install-EXAMPLES-on: - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - @(cd ${WRKSRC} && ${COPYTREE_SHARE} "include scenes" ${STAGEDIR}${EXAMPLESDIR}) - -.include diff --git a/graphics/megapov/distinfo b/graphics/megapov/distinfo deleted file mode 100644 index 9df975365cea..000000000000 --- a/graphics/megapov/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (megapov-1.2.1.tar.bz2) = 31f27b250250503987171034fb6d1b46219ae31f9fb31e799e3c4698edfd2b66 -SIZE (megapov-1.2.1.tar.bz2) = 7674540 diff --git a/graphics/megapov/files/patch-libpng15 b/graphics/megapov/files/patch-libpng15 deleted file mode 100644 index 49a627dc2855..000000000000 --- a/graphics/megapov/files/patch-libpng15 +++ /dev/null @@ -1,753 +0,0 @@ ---- source/png_pov.cpp.orig 2005-08-23 21:20:33.000000000 +0200 -+++ source/png_pov.cpp 2012-11-25 17:42:23.000000000 +0100 -@@ -112,9 +112,6 @@ - void png_pov_write_data(png_structp, png_bytep, png_size_t); - void png_pov_flush_data(png_structp); - -- // This is an internal function for libpng -- void png_write_finish_row(png_structp); -- - - /***************************************************************************** - * -@@ -172,7 +169,7 @@ - if (png_get_error_ptr(png_ptr)) - PossibleError("libpng: %s",msg); - -- longjmp(png_ptr->jmpbuf,1); -+ longjmp(png_jmpbuf(png_ptr),1); - } - - -@@ -392,7 +389,7 @@ - Error("Cannot allocate PNG data structures"); - } - -- if (setjmp(o_png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(o_png_ptr))) - { - // If we get here, we had a problem reading the file - png_destroy_read_struct(&o_png_ptr, &info_ptr, (png_infopp)NULL); -@@ -411,11 +408,8 @@ - // Read in header info from the file - png_read_info(o_png_ptr, info_ptr); - -- #ifdef AVOID_TYPE_CONVERSION_WARNINGS_PATCH -- if (((int)info_ptr->width != w) || ((int)info_ptr->height != h)) -- #else -- if (info_ptr->width != w || info_ptr->height != h) -- #endif -+ if (png_get_image_width(o_png_ptr, info_ptr) != w || -+ png_get_image_height(o_png_ptr, info_ptr) != h) - { - png_destroy_read_struct(&o_png_ptr, &info_ptr, (png_infopp)NULL); - delete tmp_fp; -@@ -428,7 +422,7 @@ - Error("PNG file dimensions do not match render resolution."); - } - -- if (info_ptr->color_type & ~(PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)) -+ if (png_get_color_type(o_png_ptr, info_ptr) & ~(PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)) - { - return; - } -@@ -442,7 +436,7 @@ - Error("Cannot allocate PNG data structures"); - } - -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the file - png_destroy_read_struct(&o_png_ptr, &info_ptr, (png_infopp)NULL); -@@ -463,31 +457,33 @@ - png_set_write_fn(png_ptr, out_file, png_pov_write_data, png_pov_flush_data); - - // Fill in the relevant image information from the resumed file -- width = info_ptr->width; -- height = info_ptr->height; -+ width = png_get_image_width(o_png_ptr, info_ptr); -+ height = png_get_image_height(o_png_ptr, info_ptr); - - // Find out if file is a valid format, and if it had Alpha in it -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (png_get_color_type(o_png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) - { - opts.Options |= OUTPUT_ALPHA; - } - -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((png_get_color_type(o_png_ptr, info_ptr) & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - opts.Options |= HF_GRAY_16; - opts.PaletteOption = GREY; // Force grayscale preview - } - - #if defined(PNG_READ_sBIT_SUPPORTED) -- if (info_ptr->valid & PNG_INFO_sBIT) -+ png_color_8p read_sig_bit; -+ -+ if (png_get_sBIT(o_png_ptr, info_ptr, &read_sig_bit) & PNG_INFO_sBIT) - { -- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) -+ if (png_get_color_type(o_png_ptr, info_ptr) & PNG_COLOR_MASK_COLOR) - { -- opts.OutputQuality = info_ptr->sig_bit.red; -+ opts.OutputQuality = read_sig_bit->red; - } - else - { -- opts.OutputQuality = info_ptr->sig_bit.gray; -+ opts.OutputQuality = read_sig_bit->gray; - } - } - -@@ -501,15 +497,15 @@ - #endif // !PNG_READ_sBIT_SUPPORTED - - #if defined(PNG_READ_oFFs_SUPPORTED) -- opts.First_Column = info_ptr->x_offset; -- opts.First_Line = info_ptr->y_offset; -+ opts.First_Column = png_get_x_offset_pixels(o_png_ptr, info_ptr); -+ opts.First_Line = png_get_y_offset_pixels(o_png_ptr, info_ptr); - #endif // PNG_READ_oFFs_SUPPORTED - - png_write_info(png_ptr, info_ptr); - -- png_stride = info_ptr->color_type & PNG_COLOR_MASK_COLOR ? 3 : 1; -+ png_stride = png_get_color_type(o_png_ptr, info_ptr) & PNG_COLOR_MASK_COLOR ? 3 : 1; - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (png_get_color_type(o_png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) - png_stride++; - - png_stride *= (opts.OutputQuality + 7) / 8; -@@ -538,7 +534,7 @@ - Error("Cannot allocate PNG data structures"); - } - -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the file - png_destroy_write_struct(&png_ptr, &info_ptr); -@@ -556,71 +552,73 @@ - - // Fill in the relevant image information - -- info_ptr->width = width = w; -- info_ptr->height = height = h; -+ png_byte bit_depth, color_type; - -- info_ptr->bit_depth = 8 * ((opts.OutputQuality + 7) / 8); -+ width = w; -+ height = h; -+ bit_depth = 8 * ((opts.OutputQuality + 7) / 8); - - if (opts.Options & HF_GRAY_16) - { -- if ( info_ptr->bit_depth < 16 ) { -- info_ptr->bit_depth = 16; -+ if ( bit_depth < 16 ) { -+ bit_depth = 16; - opts.OutputQuality = 16; - } -- info_ptr->color_type = PNG_COLOR_TYPE_GRAY; -+ color_type = PNG_COLOR_TYPE_GRAY; - } - else - { -- info_ptr->color_type = PNG_COLOR_TYPE_RGB; -+ color_type = PNG_COLOR_TYPE_RGB; - } - - if (opts.Options & OUTPUT_ALPHA) - { -- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; -+ color_type |= PNG_COLOR_MASK_ALPHA; - } - -+ png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, -+ PNG_FILTER_TYPE_BASE); -+ - #if defined(PNG_WRITE_sBIT_SUPPORTED) -- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) -+ png_color_8 sig_bit; -+ -+ if (color_type & PNG_COLOR_MASK_COLOR) - { -- info_ptr->sig_bit.red = -- info_ptr->sig_bit.green = -- info_ptr->sig_bit.blue = opts.OutputQuality; -+ sig_bit.red = -+ sig_bit.green = -+ sig_bit.blue = opts.OutputQuality; - } - else - { -- info_ptr->sig_bit.gray = opts.OutputQuality; -+ sig_bit.gray = opts.OutputQuality; - } - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { -- info_ptr->sig_bit.alpha = opts.OutputQuality; -+ sig_bit.alpha = opts.OutputQuality; - } - -- info_ptr->valid |= PNG_INFO_sBIT; -+ png_set_sBIT(png_ptr, info_ptr, &sig_bit); - #endif // PNG_WRITE_sBIT_SUPPORTED - - #if defined(PNG_WRITE_gAMA_SUPPORTED) - if (!opts.histogram_on) - { -- info_ptr->gamma = 1.0/opts.DisplayGamma; -- info_ptr->valid |= PNG_INFO_gAMA; -+ png_set_gAMA(png_ptr, info_ptr, 1.0/opts.DisplayGamma); - } - else - { -- info_ptr->gamma = 1.0; -- info_ptr->valid |= PNG_INFO_gAMA; -+ png_set_gAMA(png_ptr, info_ptr, 1.0); - } - #endif // PNG_WRITE_gAMA_SUPPORTED - - #if defined(PNG_WRITE_oFFs_SUPPORTED) - if (opts.First_Column != 0 || opts.First_Line != 0) - { -- info_ptr->x_offset = opts.First_Column; -- info_ptr->y_offset = opts.First_Line; -- -- info_ptr->offset_unit_type = PNG_OFFSET_PIXEL; -- -- info_ptr->valid |= PNG_INFO_oFFs; -+ png_set_oFFs(png_ptr, info_ptr, -+ opts.First_Column, opts.First_Line, -+ PNG_OFFSET_PIXEL); - } - #endif // PNG_WRITE_oFFs_SUPPORTED - -@@ -635,9 +633,9 @@ - - png_write_info(png_ptr, info_ptr); - -- png_stride = info_ptr->color_type & PNG_COLOR_MASK_COLOR ? 3 : 1; -+ png_stride = color_type & PNG_COLOR_MASK_COLOR ? 3 : 1; - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - png_stride++; - - png_stride *= (opts.OutputQuality + 7) / 8; -@@ -656,7 +654,7 @@ - case APPEND_MODE: - - #if defined(PNG_WRITE_FLUSH_SUPPORTED) -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the file - -@@ -765,7 +763,7 @@ - - if (png_ptr != NULL) - { -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the file - -@@ -786,6 +784,22 @@ - Error("Cannot write PNG file."); - } - -+ /* -+ * dholland 20110731: there is no longer any way to do this, and -+ * it seems unlikely to me that it would have worked anyhow. If -+ * something like this is needed to prevent libpng from crashing -+ * on row data that hasn't been given to it, maybe the best -+ * thing is to hand it some number of lines of phony row data. -+ * However, given that the endorsed way to deal with a write -+ * error partway through is to longjmp out and destroy -+ * everything, rows that haven't been provided must be -+ * initialized in some fashion. The fact that the logic below -+ * here writes metadata regardless of whether there's been an -+ * error may cause trouble I suppose, but the only right way to -+ * fix that is to stop misusing C++ destructors and move all -+ * that stuff out of this function. -+ */ -+#if 0 /* bad */ - // have to check png_ptr again as it can be set to NULL by png_destroy_write_struct above. - if (png_ptr->row_number < png_ptr->num_rows) - { -@@ -793,6 +807,7 @@ - png_ptr->num_rows = png_ptr->row_number; - png_write_finish_row(png_ptr); - } -+#endif - - #ifdef POV_COMMENTS // temporarily skip comment writing code - if (info_ptr != NULL) -@@ -997,7 +1012,9 @@ - register int col, j; - int himask; - int color; -+ png_byte color_type; - -+ color_type = png_get_color_type(png_ptr, info_ptr); - - /* - * We must copy all the values because PNG expects RGBRGB bytes, but -@@ -1019,7 +1036,7 @@ - - himask = 0xFF ^ ((1 << (8 - opts.OutputQuality)) - 1); - -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - for (col = j = 0; col < width; col++, j += png_stride) - { -@@ -1032,7 +1049,7 @@ - /* Handle Alpha here if needed - must use exact bit replication - * instead of truncation or 100... termination - */ -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 255 - (int)floor(line_data[col][pTRANSM] * 255.0); - -@@ -1061,7 +1078,7 @@ - row_ptr[j + 2] |= color >> opts.OutputQuality; - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 255 - (int)floor(line_data[col][pTRANSM] * 255.0); - -@@ -1073,14 +1090,14 @@ - break; - - case 8: -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - for (col = j = 0; col < width; col++, j += png_stride) - { - row_ptr[j] = (png_byte)floor((GREY_SCALE( line_data[col] )) * 255.0); - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - row_ptr[j+1] = (png_byte)(255-floor(line_data[col][pTRANSM]*255.0)); - } -@@ -1095,7 +1112,7 @@ - row_ptr[j + 2] = (png_byte)floor(line_data[col][pBLUE] * 255.0); - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - row_ptr[j+3] = (png_byte)(255-floor(line_data[col][pTRANSM]*255.0)); - } -@@ -1104,7 +1121,7 @@ - break; - - case 16: -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - for (col = j = 0; col < width; col++, j += png_stride) - { -@@ -1114,7 +1131,7 @@ - row_ptr[j+1] = color & 0xff; - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 65535 - (int)floor(line_data[col][pTRANSM] * 65535.0); - -@@ -1143,7 +1160,7 @@ - row_ptr[j + 5] = color & 0xFF; - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 65535 - (int)floor(line_data[col][pTRANSM] * 65535.0); - -@@ -1158,7 +1175,7 @@ - // Handle shifting for arbitrary output bit depth - himask = 0xFF ^ ((1 << (16 - opts.OutputQuality)) - 1); - -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - for (col = j = 0; col < width; col++, j += png_stride) - { -@@ -1168,7 +1185,7 @@ - row_ptr[j + 1] = color & himask; - row_ptr[j + 1] |= color >> opts.OutputQuality; - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 65535 - (int)floor(line_data[col][pTRANSM] * 65535.0); - -@@ -1201,7 +1218,7 @@ - row_ptr[j + 5] |= color >> opts.OutputQuality; - - // Handle Alpha here if needed -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - color = 65535 - (int)floor(line_data[col][pTRANSM] * 65535.0); - -@@ -1213,7 +1230,7 @@ - } - } - -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the file - delete out_file; -@@ -1260,8 +1277,9 @@ - Error("Cannot access output image file."); - - register int col, j, step; -+ png_byte bit_depth, color_type; - -- if (setjmp(o_png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(o_png_ptr))) - { - /* If we get here, we had a problem reading the file, which probably - * means that we have read all the available data, rather than a real -@@ -1270,7 +1288,7 @@ - return 0; - } - -- if (setjmp(png_ptr->jmpbuf)) -+ if (setjmp(png_jmpbuf(png_ptr))) - { - // If we get here, we had a problem writing the new file - delete in_file; -@@ -1300,10 +1318,13 @@ - * potential screen output. - */ - -+ bit_depth = png_get_bit_depth(o_png_ptr, info_ptr); -+ color_type = png_get_color_type(o_png_ptr, info_ptr); -+ - // How many bytes in a sample -- step = (info_ptr->bit_depth <= 8) ? 1 : 2; -+ step = (bit_depth <= 8) ? 1 : 2; - -- if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if ((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - for (col = j = 0; col < width; col++, j += png_stride) - { -@@ -1311,7 +1332,7 @@ - line_data[col][pGREEN] = (DBL)row_ptr[j] / 255.0; - line_data[col][pBLUE] = (DBL)row_ptr[j] / 255.0; - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - line_data[col][pTRANSM] = (DBL)(255 - row_ptr[j + step]) / 255.0; - } -@@ -1325,7 +1346,7 @@ - line_data[col][pGREEN] = (DBL)row_ptr[j + step] / 255.0; - line_data[col][pBLUE] = (DBL)row_ptr[j + 2*step] / 255.0; - -- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if (color_type & PNG_COLOR_MASK_ALPHA) - { - line_data[col][pTRANSM] = (DBL)(255 - row_ptr[j + 3*step]) / 255.0; - } -@@ -1334,9 +1355,9 @@ - - // Note that line_number is that of the first blank (i.e. missing) row - #if defined(PNG_READ_oFFs_SUPPORTED) -- line_number = info_ptr->y_offset + png_ptr->row_number ; -+ line_number = png_get_y_offset_pixels(png_ptr, info_ptr) + png_get_current_row_number(png_ptr); - #else -- line_number = png_ptr->row_number ; -+ line_number = png_get_current_row_number(png_ptr); - #endif - - return 1; -@@ -1377,6 +1398,8 @@ - png_struct *r_png_ptr; - png_info *r_info_ptr; - png_byte **row_ptrs; -+ png_byte bit_depth; -+ png_byte color_type; - - // Start by trying to open the file - if((filep = Locate_File(name,POV_File_Image_PNG,NULL,true)) == NULL) -@@ -1386,7 +1409,7 @@ - ((r_info_ptr = png_create_info_struct(r_png_ptr)) == NULL)) - Error("Cannot allocate PNG data structures"); - -- if(setjmp(r_png_ptr->jmpbuf)) -+ if(setjmp(png_jmpbuf(r_png_ptr))) - { - // If we get here, we had a problem reading the file - png_destroy_read_struct(&r_png_ptr, &r_info_ptr, (png_infopp)NULL); -@@ -1399,8 +1422,10 @@ - // read the file information - png_read_info(r_png_ptr, r_info_ptr); - -- width = r_info_ptr->width; -- height = r_info_ptr->height; -+ width = png_get_image_width(r_png_ptr, r_info_ptr); -+ height = png_get_image_height(r_png_ptr, r_info_ptr); -+ bit_depth = png_get_bit_depth(r_png_ptr, r_info_ptr); -+ color_type = png_get_color_type(r_png_ptr, r_info_ptr); - - Image->iwidth = width; - Image->iheight = height; -@@ -1411,11 +1436,11 @@ - stride = 1; - - // color palette image -- if(r_info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -+ if(color_type == PNG_COLOR_TYPE_PALETTE) - { - IMAGE_COLOUR *cmap; - png_color *png_cmap; -- int cmap_len = r_info_ptr->num_palette; -+ int cmap_len; - int index; - - Image->Colour_Map_Size = cmap_len; -@@ -1423,7 +1448,7 @@ - cmap = (IMAGE_COLOUR *)POV_MALLOC(cmap_len*sizeof(IMAGE_COLOUR), "PNG image color map"); - - Image->Colour_Map = cmap; -- png_cmap = r_info_ptr->palette; -+ png_get_PLTE(r_png_ptr, r_info_ptr, &png_cmap, &cmap_len); - - for(index = 0; index < cmap_len; index++) - { -@@ -1434,11 +1459,13 @@ - cmap[index].Transmit = 0; - } - -- if(r_info_ptr->valid & PNG_INFO_tRNS) -- { -- for (index = 0; index < r_info_ptr->num_trans; index++) -- cmap[index].Transmit = 255 - r_info_ptr->trans[index]; -- } -+ png_byte *trans_alpha; -+ int num_trans; -+ if (png_get_tRNS(r_png_ptr, r_info_ptr, &trans_alpha, &num_trans, NULL)) -+ { -+ for (index = 0; index < num_trans; index++) -+ cmap[index].Transmit = 255 - trans_alpha[index]; -+ } - - Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image"); - -@@ -1446,13 +1473,13 @@ - png_set_packing(r_png_ptr); - } - // grayscale palette image -- else if((r_info_ptr->color_type == PNG_COLOR_TYPE_GRAY) && (r_info_ptr->bit_depth <= 8)) -+ else if((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth <= 8)) - { - IMAGE_COLOUR *cmap; - int cmap_len; - int index; - -- Image->Colour_Map_Size = cmap_len = 1 << r_info_ptr->bit_depth; -+ Image->Colour_Map_Size = cmap_len = 1 << bit_depth; - - cmap = (IMAGE_COLOUR *)POV_MALLOC(cmap_len*sizeof(IMAGE_COLOUR), "PNG image color map"); - -@@ -1467,11 +1494,13 @@ - cmap[index].Transmit = 0; - } - -- if(r_info_ptr->valid & PNG_INFO_tRNS) -- { -- for (index = 0; index < r_info_ptr->num_trans; index++) -- cmap[index].Transmit = 255 - r_info_ptr->trans[index]; -- } -+ png_byte *trans_alpha; -+ int num_trans; -+ if (png_get_tRNS(r_png_ptr, r_info_ptr, &trans_alpha, &num_trans, NULL)) -+ { -+ for (index = 0; index < num_trans; index++) -+ cmap[index].Transmit = 255 - trans_alpha[index]; -+ } - - Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image"); - -@@ -1479,13 +1508,13 @@ - png_set_packing(r_png_ptr); - } - // grayscale image -- else if((r_info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ else if((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - Image->Colour_Map = NULL; - -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - { -- if(r_info_ptr->bit_depth <= 8) -+ if(bit_depth <= 8) - { - Image->data.rgb8_lines = (IMAGE8_LINE *)POV_MALLOC(height * sizeof(IMAGE8_LINE), "PNG image"); - stride = 2; -@@ -1498,7 +1527,7 @@ - } - else - { -- if(r_info_ptr->bit_depth <= 8) -+ if(bit_depth <= 8) - { - Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image"); - stride = 1; -@@ -1513,16 +1542,16 @@ - } - } - // color image -- else if((r_info_ptr->color_type == PNG_COLOR_TYPE_RGB) || (r_info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) -+ else if((color_type == PNG_COLOR_TYPE_RGB) || (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) - { - Image->Colour_Map = NULL; - -- if(r_info_ptr->bit_depth > 8) -+ if(bit_depth > 8) - { - Image->Image_Type |= IS16BITIMAGE; - Image->data.rgb16_lines = (IMAGE16_LINE *)POV_MALLOC(height * sizeof(IMAGE16_LINE), "PNG image"); - -- if(r_info_ptr->color_type == PNG_COLOR_TYPE_RGB) -+ if(color_type == PNG_COLOR_TYPE_RGB) - stride = 6; - else // PNG_COLOR_TYPE_RGB_ALPHA - stride = 8; -@@ -1531,14 +1560,14 @@ - { - Image->data.rgb8_lines = (IMAGE8_LINE *)POV_MALLOC(height * sizeof(IMAGE8_LINE), "PNG image"); - -- if(r_info_ptr->color_type == PNG_COLOR_TYPE_RGB) -+ if(color_type == PNG_COLOR_TYPE_RGB) - stride = 3; - else // PNG_COLOR_TYPE_RGB_ALPHA - stride = 4; - } - } - else // Unknown PNG type -- Error("Unsupported color type %d in PNG image.", r_info_ptr->color_type); -+ Error("Unsupported color type %d in PNG image.", color_type); - - // tellg pnglib to handle the gamma conversion for you. Note that - // GammaFactor * DisplayFactor = assumed_gamma, so we are converting -@@ -1548,8 +1577,11 @@ - // we will only do input gamma conversion on those files which will be - // used as image maps, and the other types will load the raw pixel values. - #if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_READ_gAMA_SUPPORTED) -- if (r_info_ptr->valid & PNG_INFO_gAMA && (Image->Image_Type & IMAGE_FTYPE)) -- png_set_gamma(r_png_ptr, opts.GammaFactor*opts.DisplayGamma, r_info_ptr->gamma); -+ if (png_get_valid(r_png_ptr, r_info_ptr, PNG_INFO_gAMA) && (Image->Image_Type & IMAGE_FTYPE)) { -+ double gamma; -+ png_get_gAMA(r_png_ptr, r_info_ptr, &gamma); -+ png_set_gamma(r_png_ptr, opts.GammaFactor*opts.DisplayGamma, gamma); -+ } - #endif // PNG_READ_GAMMA_SUPPORTED and PNG_READ_gAMA_SUPPORTED - - png_set_interlace_handling(r_png_ptr); -@@ -1563,7 +1595,7 @@ - (int) - #endif - height; row++) -- row_ptrs[row] = (png_byte *)POV_MALLOC(r_info_ptr->rowbytes, "PNG image line"); -+ row_ptrs[row] = (png_byte *)POV_MALLOC(png_get_rowbytes(r_png_ptr, r_info_ptr), "PNG image line"); - - // Read in the entire image - png_read_image(r_png_ptr, row_ptrs); -@@ -1579,12 +1611,12 @@ - height; row++) - { - // grayscale image -- if((r_info_ptr->color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) -+ if((color_type & PNG_COLOR_MASK_COLOR) == PNG_COLOR_TYPE_GRAY) - { - // with alpha channel -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - { -- if(r_info_ptr->bit_depth <= 8) -+ if(bit_depth <= 8) - { - IMAGE8_LINE *rgb8_lines = &Image->data.rgb8_lines[row]; - -@@ -1634,7 +1666,7 @@ - // without alpha channel - else - { -- if(r_info_ptr->bit_depth <= 8) -+ if(bit_depth <= 8) - { - Image->data.map_lines[row] = row_ptrs[row]; - -@@ -1658,9 +1690,9 @@ - } - } - // color image -- else // r_info_ptr->color_type & PNG_COLOR_MASK_COLOR -+ else // color_type & PNG_COLOR_MASK_COLOR - { -- if(r_info_ptr->bit_depth <= 8) -+ if(bit_depth <= 8) - { - IMAGE8_LINE *rgb8_lines = &Image->data.rgb8_lines[row]; - -@@ -1668,7 +1700,7 @@ - rgb8_lines->green = (unsigned char *)POV_MALLOC(width, "PNG image line"); - rgb8_lines->blue = (unsigned char *)POV_MALLOC(width, "PNG image line"); - -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - rgb8_lines->transm = (unsigned char *)POV_MALLOC(width, "PNG image line"); - else - rgb8_lines->transm = NULL; -@@ -1683,7 +1715,7 @@ - rgb8_lines->green[col] = row_ptrs[row][j + 1]; - rgb8_lines->blue[col] = row_ptrs[row][j + 2]; - -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - rgb8_lines->transm[col] = 255 - row_ptrs[row][j + 3]; - } - -@@ -1697,7 +1729,7 @@ - rgb16_lines->green = (unsigned short *)POV_MALLOC(width * 2, "PNG image line"); - rgb16_lines->blue = (unsigned short *)POV_MALLOC(width * 2, "PNG image line"); - -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - rgb16_lines->transm = (unsigned short *)POV_MALLOC(width * 2, "PNG image line"); - else - rgb16_lines->transm = NULL; -@@ -1712,7 +1744,7 @@ - rgb16_lines->green[col] = ((unsigned short)row_ptrs[row][j + 2] << 8) | row_ptrs[row][j + 3]; - rgb16_lines->blue[col] = ((unsigned short)row_ptrs[row][j + 4] << 8) | row_ptrs[row][j + 5]; - -- if(r_png_ptr->color_type & PNG_COLOR_MASK_ALPHA) -+ if(color_type & PNG_COLOR_MASK_ALPHA) - rgb16_lines->transm[col] = 65535 - (((unsigned short)row_ptrs[row][j + 6] << 8) | row_ptrs[row][j + 7]); - } - diff --git a/graphics/megapov/pkg-descr b/graphics/megapov/pkg-descr deleted file mode 100644 index ddca7ea2987e..000000000000 --- a/graphics/megapov/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -MegaPOV is a collection of unofficial extensions for the freeware -raytracer POV-Ray. It is maintained by a group of POV-Community -members - the MegaPOV Team. Up-to-date versions and information can -be obtained at the MegaPOV website: