From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47275138330 for ; Thu, 29 Sep 2016 15:13:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3067AE076D; Thu, 29 Sep 2016 15:12:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F23A8E076D for ; Thu, 29 Sep 2016 15:12:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3568534067D for ; Thu, 29 Sep 2016 15:12:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2FAF2248B for ; Thu, 29 Sep 2016 15:12:55 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1475161959.3259951943dda77ac2072c4079668c948537f82a.kensington@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/blender/blender-2.72b-r4.ebuild media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch X-VCS-Directories: media-gfx/blender/ media-gfx/blender/files/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 3259951943dda77ac2072c4079668c948537f82a X-VCS-Branch: master Date: Thu, 29 Sep 2016 15:12:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 513ae823-577a-4db1-9ea2-f6f162cce160 X-Archives-Hash: e947d4a7197c1b45d274894a8424d5ca commit: 3259951943dda77ac2072c4079668c948537f82a Author: Jonathan Scruggs gmail com> AuthorDate: Thu Sep 22 17:26:26 2016 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Thu Sep 29 15:12:39 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32599519 media-gfx/blender: add gcc-6 compile fix Not doing a revision bump as this patch only affects compiling with GCC 6. - Remove one dependency as it's not even used at all - Add patch that fixes compiling with GCC 6 Closes Gentoo-Bug: 594694 Signed off by Jonathan Scruggs (j.scruggs gmail.com, irc: Dracwyrm) media-gfx/blender/blender-2.72b-r4.ebuild | 2 +- .../blender/files/blender-2.72b-gcc6-fixes.patch | 126 +++++++++++++++++++++ 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/media-gfx/blender/blender-2.72b-r4.ebuild b/media-gfx/blender/blender-2.72b-r4.ebuild index c0a7e4d..970b009 100644 --- a/media-gfx/blender/blender-2.72b-r4.ebuild +++ b/media-gfx/blender/blender-2.72b-r4.ebuild @@ -68,7 +68,6 @@ RDEPEND=" media-libs/glew media-libs/libpng:0 media-libs/libsamplerate - sci-libs/ldl sys-libs/zlib virtual/glu virtual/jpeg:0 @@ -112,6 +111,7 @@ PATCHES=( "${FILESDIR}"/${PN}-2.70-sse2.patch "${FILESDIR}"/${PN}-2.72-T42797.diff "${FILESDIR}"/${P}-fix-util_simd.patch + "${FILESDIR}"/${P}-gcc6-fixes.patch ) pkg_pretend() { diff --git a/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch b/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch new file mode 100644 index 00000000..1c4ab09 --- /dev/null +++ b/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch @@ -0,0 +1,126 @@ +diff -purN a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp +--- a/source/blender/imbuf/intern/dds/ColorBlock.cpp 2014-10-20 08:58:23.000000000 +0100 ++++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp 2016-09-22 15:50:25.359318967 +0100 +@@ -86,8 +86,8 @@ void ColorBlock::init(const Image *img, + + void ColorBlock::init(uint w, uint h, const uint *data, uint x, uint y) + { +- const uint bw = min(w - x, 4U); +- const uint bh = min(h - y, 4U); ++ const uint bw = MIN(w - x, 4U); ++ const uint bh = MIN(h - y, 4U); + + // Blocks that are smaller than 4x4 are handled by repeating the pixels. + // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :( +@@ -107,8 +107,8 @@ void ColorBlock::init(uint w, uint h, co + + void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y) + { +- const uint bw = min(w - x, 4U); +- const uint bh = min(h - y, 4U); ++ const uint bw = MIN(w - x, 4U); ++ const uint bh = MIN(h - y, 4U); + + // Blocks that are smaller than 4x4 are handled by repeating the pixels. + // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :( +@@ -124,10 +124,10 @@ void ColorBlock::init(uint w, uint h, co + const uint idx = ((y + by) * w + x + bx); + + Color32 & c = color(e, i); +- c.r = uint8(255 * clamp(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes? +- c.g = uint8(255 * clamp(data[idx + 1 * srcPlane], 0.0f, 1.0f)); +- c.b = uint8(255 * clamp(data[idx + 2 * srcPlane], 0.0f, 1.0f)); +- c.a = uint8(255 * clamp(data[idx + 3 * srcPlane], 0.0f, 1.0f)); ++ c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes? ++ c.g = uint8(255 * CLAMP(data[idx + 1 * srcPlane], 0.0f, 1.0f)); ++ c.b = uint8(255 * CLAMP(data[idx + 2 * srcPlane], 0.0f, 1.0f)); ++ c.a = uint8(255 * CLAMP(data[idx + 3 * srcPlane], 0.0f, 1.0f)); + } + } + } +diff -purN a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h +--- a/source/blender/imbuf/intern/dds/Common.h 2014-10-20 08:58:23.000000000 +0100 ++++ b/source/blender/imbuf/intern/dds/Common.h 2016-09-22 15:47:31.327081239 +0100 +@@ -28,14 +28,14 @@ + #ifndef __COMMON_H__ + #define __COMMON_H__ + +-#ifndef min +-#define min(a,b) ((a) <= (b) ? (a) : (b)) ++#ifndef MIN ++#define MIN(a,b) ((a) <= (b) ? (a) : (b)) + #endif +-#ifndef max +-#define max(a,b) ((a) >= (b) ? (a) : (b)) ++#ifndef MAX ++#define MAX(a,b) ((a) >= (b) ? (a) : (b)) + #endif +-#ifndef clamp +-#define clamp(x,a,b) min(max((x), (a)), (b)) ++#ifndef CLAMP ++#define CLAMP(x,a,b) MIN(MAX((x), (a)), (b)) + #endif + + template +diff -purN a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2014-10-20 08:58:23.000000000 +0100 ++++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2016-09-22 16:10:53.985775837 +0100 +@@ -1102,8 +1102,8 @@ void DirectDrawSurface::mipmap(Image *im + // Compute width and height. + for (uint m = 0; m < mipmap; m++) + { +- w = max(1U, w / 2); +- h = max(1U, h / 2); ++ w = MAX(1U, w / 2); ++ h = MAX(1U, h / 2); + } + + img->allocate(w, h); +@@ -1223,9 +1223,9 @@ void DirectDrawSurface::readBlockImage(I + readBlock(&block); + + // Write color block. +- for (uint y = 0; y < min(4U, h-4*by); y++) ++ for (uint y = 0; y < MIN(4U, h-4*by); y++) + { +- for (uint x = 0; x < min(4U, w-4*bx); x++) ++ for (uint x = 0; x < MIN(4U, w-4*bx); x++) + { + img->pixel(4*bx+x, 4*by+y) = block.color(x, y); + } +@@ -1240,7 +1240,7 @@ static Color32 buildNormal(uint8 x, uint + float ny = 2 * (y / 255.0f) - 1; + float nz = 0.0f; + if (1 - nx*nx - ny*ny > 0) nz = sqrt(1 - nx*nx - ny*ny); +- uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255); ++ uint8 z = CLAMP(int(255.0f * (nz + 1) / 2.0f), 0, 255); + + return Color32(x, y, z); + } +@@ -1379,9 +1379,9 @@ uint DirectDrawSurface::mipmapSize(uint + + for (uint m = 0; m < mipmap; m++) + { +- w = max(1U, w / 2); +- h = max(1U, h / 2); +- d = max(1U, d / 2); ++ w = MAX(1U, w / 2); ++ h = MAX(1U, h / 2); ++ d = MAX(1U, d / 2); + } + + if (header.pf.flags & DDPF_FOURCC) +diff -purN a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp +--- a/source/blender/imbuf/intern/dds/FlipDXT.cpp 2014-10-20 08:58:23.000000000 +0100 ++++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp 2016-09-22 16:11:35.626829002 +0100 +@@ -246,8 +246,8 @@ int FlipDXTCImage(unsigned int width, un + + // mip levels are contiguous. + data += block_bytes * blocks; +- mip_width = max(1U, mip_width >> 1); +- mip_height = max(1U, mip_height >> 1); ++ mip_width = MAX(1U, mip_width >> 1); ++ mip_height = MAX(1U, mip_height >> 1); + } + + return 1;