Skip to content

Commit

Permalink
Fix build with GCC 5.1 and revert switch to clang
Browse files Browse the repository at this point in the history
git-svn-id: file:///srv/repos/svn-community/svn@135886 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
foutrelis authored and svntogit committed Jun 26, 2015
1 parent ea26807 commit 06a5e79
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
11 changes: 5 additions & 6 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ arch=(i686 x86_64)
url="http://www.openimageio.org/"
license=('custom')
depends=('openexr' 'boost-libs' 'jasper' 'glew' 'libtiff' 'opencolorio' 'intel-tbb')
makedepends=('cmake' 'qt4' 'python2' 'boost' 'mesa' 'git' 'clang') # Remove clang when this compiles with gcc 5.1
makedepends=('cmake' 'qt4' 'python2' 'boost' 'mesa' 'git')
optdepends=('qt4: iv image viewer'
'python2: bindings support')
source=(git+git://github.com/OpenImageIO/oiio.git#tag=Release-${pkgver}
fix-compiler-warning.patch
stdmath.patch)
md5sums=('SKIP'
'f41243f93ad9370060efdad931750289'
'7b819bf20cf2c13cbde5fc6511e39f35')

prepare() {
cd oiio

patch -Np1 < $srcdir/stdmath.patch
patch -Np1 < "$srcdir/fix-compiler-warning.patch"
patch -Np1 < "$srcdir/stdmath.patch"
}

build() {
Expand All @@ -30,10 +33,6 @@ build() {
[[ -d build ]] && rm -r build
mkdir build && cd build

export CC="clang"
export CXX="clang++"
export CXXFLAGS="-Wno-error -w"

cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYLIB_INSTALL_DIR=lib/python2.7/site-packages \
Expand Down
22 changes: 22 additions & 0 deletions trunk/fix-compiler-warning.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 4e3371d2e37512c5fa8b1f297ad9af52417fec9e Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Wed, 11 Feb 2015 15:27:40 -0800
Subject: [PATCH] Fix compiler warning about unused variable

---
src/ptex.imageio/ptex/PtexHalf.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ptex.imageio/ptex/PtexHalf.cpp b/src/ptex.imageio/ptex/PtexHalf.cpp
index a880971..3c17369 100644
--- a/src/ptex.imageio/ptex/PtexHalf.cpp
+++ b/src/ptex.imageio/ptex/PtexHalf.cpp
@@ -80,7 +80,7 @@ static bool PtexHalfInit()
return 1;
}

-static bool PtexHalfInitialized = PtexHalfInit();
+bool PtexHalfInitialized = PtexHalfInit();


/** Handle exceptional cases for half-to-float conversion */

0 comments on commit 06a5e79

Please sign in to comment.