aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorGiancarlo Dessi <slack@giand.it>2024-01-08 08:25:36 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-01-08 11:11:09 +0700
commitabfa0e8535396e48cce79f36cd325cee726c793d (patch)
tree8b1c89fb7ff53a345b97b4202cc888913c6b0f0b /graphics
parentbdcf1b99e8a11480d034ecaceefb9fdc2abab22c (diff)
graphics/MaterialX: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/MaterialX/MaterialX.SlackBuild26
-rw-r--r--graphics/MaterialX/MaterialXGraphEditor.desktop2
-rw-r--r--graphics/MaterialX/MaterialXView.desktop2
3 files changed, 24 insertions, 6 deletions
diff --git a/graphics/MaterialX/MaterialX.SlackBuild b/graphics/MaterialX/MaterialX.SlackBuild
index bfd4906bf1ed..1de2bfea0bac 100644
--- a/graphics/MaterialX/MaterialX.SlackBuild
+++ b/graphics/MaterialX/MaterialX.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for MaterialX
-# Copyright 2023 Giancarlo Dessi, Cagliari, IT
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=MaterialX
VERSION=${VERSION:-1.38.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
EXTVERSION=20240101
@@ -72,12 +72,27 @@ else
fi
if pkg-config --exists OpenImageIO; then
- WITHOIIO=""; \
- [ "${OIIO:-yes}" = "yes" ] && WITHOIIO="-DMATERIALX_BUILD_OIIO=ON "
+ WITHOIIO=""; [ "${OIIO:-yes}" = "yes" ] && WITHOIIO="ON"
else
WITHOIIO=""
fi
+if [ "$WITHOIIO" = "ON" ]; then
+ TMPOIIO=/tmp/oiio
+ WITHOIIO="-DMATERIALX_BUILD_OIIO=ON -DOPENIMAGEIO_ROOT_DIR=$TMPOIIO "
+ # to prevent build failures we need to create a temporary
+ # directory with symbolic links to OIIO executables
+ rm -rf $TMPOIIO
+ mkdir -p $TMPOIIO/bin
+ ln -s /usr/bin/iconvert $TMPOIIO/bin/icovert
+ ln -s /usr/bin/idiff $TMPOIIO/bin/idiff
+ ln -s /usr/bin/igrep $TMPOIIO/bin/igrep
+ ln -s /usr/bin/info $TMPOIIO/bin/info
+ ln -s /usr/bin/iv $TMPOIIO/bin/iv
+ ln -s /usr/bin/maketx $TMPOIIO/bin/maketx
+ ln -s /usr/bin/oiiotool $TMPOIIO/bin/oiiotool
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -179,6 +194,9 @@ mkdir -p $PKG/usr/include
cd $PKG/usr/include
ln -s ../share/MaterialX/include MaterialX
+# remove eventual temporary directory with symlinks to OIIO executables
+rm -rf /tmp/oiio
+
if [ $GUI = "yes" ]; then
mkdir -p $PKG/usr/bin
mkdir -p $PKG/usr/share/applications
diff --git a/graphics/MaterialX/MaterialXGraphEditor.desktop b/graphics/MaterialX/MaterialXGraphEditor.desktop
index de8950d8a0e1..d5b2a15755eb 100644
--- a/graphics/MaterialX/MaterialXGraphEditor.desktop
+++ b/graphics/MaterialX/MaterialXGraphEditor.desktop
@@ -18,4 +18,4 @@ Icon=/usr/share/icons/hicolor/256x256/apps/materialx.png
Terminal=false
Categories=Graphics;
StartupNotify=true
-MimeType=application/x-mtlx;model/materialx;application/x-materialx;application/xml;text/mtlx+xml;image/mtlx;
+MimeType=application/x-mtlx;model/materialx;application/x-materialx;application/mtlx+xml;image/mtlx;application/mtlx+json;
diff --git a/graphics/MaterialX/MaterialXView.desktop b/graphics/MaterialX/MaterialXView.desktop
index 32251107444d..35bedc48037e 100644
--- a/graphics/MaterialX/MaterialXView.desktop
+++ b/graphics/MaterialX/MaterialXView.desktop
@@ -18,4 +18,4 @@ Icon=/usr/share/icons/hicolor/256x256/apps/materialx.png
Terminal=false
Categories=Graphics;
StartupNotify=true
-MimeType=application/x-mtlx;model/materialx;application/x-materialx;application/xml;image/mtlx+xml;
+MimeType=application/x-mtlx;model/materialx;application/x-materialx;application/mtlx+xml;image/mtlx+xml;application/mtlx+json;