summaryrefslogtreecommitdiff
path: root/graphics/openimageio/openimageio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/openimageio/openimageio.SlackBuild')
-rw-r--r--graphics/openimageio/openimageio.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/graphics/openimageio/openimageio.SlackBuild b/graphics/openimageio/openimageio.SlackBuild
index 85c9198124..b6393d1565 100644
--- a/graphics/openimageio/openimageio.SlackBuild
+++ b/graphics/openimageio/openimageio.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for openimageio
-# Copyright 2015-2020 Christoph Willing Brisbane, Australia
+# Copyright 2015-2021 Christoph Willing Brisbane, Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,10 +25,9 @@
PRGNAM=openimageio
SRCNAM=oiio-Release
VERSION=${VERSION:-2.0.13}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-PYLIB_INSTALL_DIRECTORY=$(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
PYLIB3_INSTALL_DIRECTORY=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
if [ -z "$ARCH" ]; then
@@ -67,6 +66,14 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
patch -p0 < $CWD/oiio-include-cstdio.diff
+
+grep 20191103 /usr/include/tiffvers.h 2>&1 >/dev/null || {
+# libtiff-4.2.0 requires additional patches
+# (thanks to Giancarlo Dessi)
+ patch -p1 < $CWD/rawinput.diff
+ patch -p1 < $CWD/oiio-libopenimageio-exif-cpp.diff
+}
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -81,7 +88,7 @@ mkdir -p build
cd build
cmake ../ \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++11 -fcommon" \
-DOPENJPEG_INCLUDE_DIR="/usr/include/openmj2-2.1" \
-DOPENJPEG_OPENJPEG_LIBRARY_RELEASE="/usr/lib${LIBDIRSUFFIX}/libopenmj2.so" \
-DCMAKE_BUILD_TYPE=Release \
@@ -92,8 +99,9 @@ cd build
-DUSE_OPENJPEG:BOOL=TRUE \
-DOIIO_BUILD_TESTS:BOOL=FALSE \
-DUSE_PYTHON:BOOL=TRUE \
+ -DPYTHON_VERSION=$(python3 --version | cut -d' ' -f2) \
-DUSE_EXTERNAL_PUGIXML:BOOL=FALSE \
- -DPYBIND11_INCLUDE_DIR:STRING=/usr/include/python2.7 \
+
make
make install DESTDIR=$PKG