summaryrefslogtreecommitdiffstats
path: root/graphics/opencolorio/opencolorio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/opencolorio/opencolorio.SlackBuild')
-rw-r--r--graphics/opencolorio/opencolorio.SlackBuild35
1 files changed, 24 insertions, 11 deletions
diff --git a/graphics/opencolorio/opencolorio.SlackBuild b/graphics/opencolorio/opencolorio.SlackBuild
index 23c3f06b07..7762f39c44 100644
--- a/graphics/opencolorio/opencolorio.SlackBuild
+++ b/graphics/opencolorio/opencolorio.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for opencolorio
-# Copyright 2015-2021 Christoph Willing Brisbane, Australia
+# Copyright 2015-2022 Christoph Willing Brisbane, Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220320 bkw: Modified by SlackBuilds.org: fix 32-bit build.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=opencolorio
SRCNAM=OpenColorIO
-VERSION=${VERSION:-2.1.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.1.2}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +41,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -75,23 +74,28 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
sed -i -e 's/-Wall -Wextra/-Wextra/' CMakeLists.txt
+sed -i -e 's/lib$/${CMAKE_INSTALL_LIBDIR}/g' src/OpenColorIO/CMakeLists.txt
+sed -i -e 's/lib$/${CMAKE_INSTALL_LIBDIR}/g' src/libutils/oglapphelpers/CMakeLists.txt
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+SLKCFLAGS+=" -msse2"
+
+sed -i '/StringUtils.h/a #include <cstring>' src/OpenColorIO/FileRules.cpp
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=deprecated-declarations -Wno-error=cast-function-type" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DPYTHON=python3 \
-DOCIO_BUILD_STATIC:BOOL=OFF \
- -DOCIO_BUILD_JNIGLUE:BOOL=OFF \
-DCMAKE_BUILD_TYPE=Release ..
make
@@ -99,6 +103,15 @@ cd build
cd ..
+BASE=$(dirname $PKG/$TMP)
+while [ "$BASE" != "$PKG" ]; do
+ if [ "$BASE" = "/" ]; then
+ break
+ fi
+ rm -rf "$BASE"
+ BASE=$(dirname "$BASE")
+done
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true