commit:     24675bd3c2c26e2a612932e0471af99c34a4f1b0
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sat Sep 23 13:01:19 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Sep 28 12:45:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24675bd3

media-libs/ilmbase: Revision bump to 2.2.0-r1

* Changed ebuild to EAPI 6
* Changed ebuild to use multilib-minimal
* Added patch to remove register keyword for GCC7 Compat
* Added tabs in the metadata.xml file

 .../ilmbase-2.2.0-Remove-register-keyword.patch    | 79 ++++++++++++++++++++++
 media-libs/ilmbase/ilmbase-2.2.0-r1.ebuild         | 30 ++++++++
 media-libs/ilmbase/metadata.xml                    |  9 ++-
 3 files changed, 115 insertions(+), 3 deletions(-)

diff --git 
a/media-libs/ilmbase/files/ilmbase-2.2.0-Remove-register-keyword.patch 
b/media-libs/ilmbase/files/ilmbase-2.2.0-Remove-register-keyword.patch
new file mode 100644
index 00000000000..3fd95aceda9
--- /dev/null
+++ b/media-libs/ilmbase/files/ilmbase-2.2.0-Remove-register-keyword.patch
@@ -0,0 +1,79 @@
+From 6d297f35c5dbfacc8a5e94f33b986db7ab468db9 Mon Sep 17 00:00:00 2001
+From: Larry Gritz <[email protected]>
+Date: Fri, 30 Sep 2016 15:58:27 -0700
+Subject: [PATCH] Remove 'register' keyword.
+
+'register' is a relic of K&R-era C, it's utterly useless in modern
+compilers.  It's been deprecated in C++11, and therefore will generate
+warnings when encountered -- and many packages that use OpenEXR's public
+headers use -Werr to turn warnings into errors. Starting in C++17, the
+keyword is removed entirely, and thus will certainly be a build break
+for that version of the standard. So it's time for it to go.
+---
+ IlmBase/Half/half.cpp       | 6 +++---
+ IlmBase/Half/half.h         | 4 ++--
+ IlmBase/Imath/ImathMatrix.h | 8 ++++----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/Half/half.cpp b/Half/half.cpp
+index 609aaa1..09a50aa 100644
+--- a/Half/half.cpp
++++ b/Half/half.cpp
+@@ -94,9 +94,9 @@ half::convert (int i)
+     // of float and half (127 versus 15).
+     //
+ 
+-    register int s =  (i >> 16) & 0x00008000;
+-    register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
+-    register int m =   i        & 0x007fffff;
++    int s =  (i >> 16) & 0x00008000;
++    int e = ((i >> 23) & 0x000000ff) - (127 - 15);
++    int m =   i        & 0x007fffff;
+ 
+     //
+     // Now reassemble s, e and m into a half:
+diff --git a/Half/half.h b/Half/half.h
+index f78e4f6..da418d6 100644
+--- a/Half/half.h
++++ b/Half/half.h
+@@ -459,7 +459,7 @@ half::half (float f)
+       // to do the float-to-half conversion.
+       //
+ 
+-      register int e = (x.i >> 23) & 0x000001ff;
++      int e = (x.i >> 23) & 0x000001ff;
+ 
+       e = _eLut[e];
+ 
+@@ -470,7 +470,7 @@ half::half (float f)
+           // bits and combine it with the sign and exponent.
+           //
+ 
+-          register int m = x.i & 0x007fffff;
++          int m = x.i & 0x007fffff;
+           _h = e + ((m + 0x00000fff + ((m >> 13) & 1)) >> 13);
+       }
+       else
+diff --git a/Imath/ImathMatrix.h b/Imath/ImathMatrix.h
+index 3e96c2f..1d7f8dc 100644
+--- a/Imath/ImathMatrix.h
++++ b/Imath/ImathMatrix.h
+@@ -2527,11 +2527,11 @@ Matrix44<T>::multiply (const Matrix44<T> &a,
+                        const Matrix44<T> &b,
+                        Matrix44<T> &c)
+ {
+-    register const T * IMATH_RESTRICT ap = &a.x[0][0];
+-    register const T * IMATH_RESTRICT bp = &b.x[0][0];
+-    register       T * IMATH_RESTRICT cp = &c.x[0][0];
++    const T * IMATH_RESTRICT ap = &a.x[0][0];
++    const T * IMATH_RESTRICT bp = &b.x[0][0];
++          T * IMATH_RESTRICT cp = &c.x[0][0];
+ 
+-    register T a0, a1, a2, a3;
++    T a0, a1, a2, a3;
+ 
+     a0 = ap[0];
+     a1 = ap[1];
+-- 
+2.14.1
+

diff --git a/media-libs/ilmbase/ilmbase-2.2.0-r1.ebuild 
b/media-libs/ilmbase/ilmbase-2.2.0-r1.ebuild
new file mode 100644
index 00000000000..0fbeb31e701
--- /dev/null
+++ b/media-libs/ilmbase/ilmbase-2.2.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib-minimal
+
+DESCRIPTION="OpenEXR ILM Base libraries"
+HOMEPAGE="http://openexr.com/";
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0/12" # based on SONAME
+KEYWORDS="~amd64 -arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd 
~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND="virtual/pkgconfig[${MULTILIB_USEDEP}]"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/IlmBaseConfig.h )
+
+PATCHES=( "${FILESDIR}/${P}-Remove-register-keyword.patch" )
+
+multilib_src_configure() {
+       # Disable use of ucontext.h wrt #482890
+       if use hppa || use ppc || use ppc64; then
+               export ac_cv_header_ucontext_h=no
+       fi
+
+       ECONF_SOURCE=${S} econf "$(use_enable static-libs static)"
+}

diff --git a/media-libs/ilmbase/metadata.xml b/media-libs/ilmbase/metadata.xml
index 0427ec20bfd..fc9e500d69e 100644
--- a/media-libs/ilmbase/metadata.xml
+++ b/media-libs/ilmbase/metadata.xml
@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-<maintainer type="project">
-<email>[email protected]</email>
-</maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">openexr/openexr</remote-id>
+       </upstream>
 </pkgmetadata>

Reply via email to