From: "Michael Palimaka" <kensington@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
Date: Thu, 29 Sep 2016 15:12:55 +0000 (UTC) [thread overview]
Message-ID: <1475161959.3259951943dda77ac2072c4079668c948537f82a.kensington@gentoo> (raw)
commit: 3259951943dda77ac2072c4079668c948537f82a
Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Thu Sep 22 17:26:26 2016 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> 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 <AT> 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<typename T>
+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;
next reply other threads:[~2016-09-29 15:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 15:12 Michael Palimaka [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-22 23:26 [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/ David Seifert
2018-08-16 14:15 Jonathan Scruggs
2019-03-21 18:12 Michał Górny
2019-06-06 21:22 Andreas Sturmlechner
2020-08-24 13:42 Sam James
2020-08-24 13:42 Sam James
2020-11-08 10:42 Sam James
2021-06-10 0:51 Sam James
2022-02-12 3:55 Sam James
2022-09-01 2:06 Sam James
2022-12-20 10:53 Sam James
2023-02-17 5:29 Sam James
2023-05-01 15:15 Sam James
2023-10-27 2:59 Sam James
2024-12-01 8:34 Sam James
2025-04-22 0:41 Sam James
2025-04-22 0:41 Sam James
2025-05-08 6:29 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475161959.3259951943dda77ac2072c4079668c948537f82a.kensington@gentoo \
--to=kensington@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox