aboutsummaryrefslogtreecommitdiff
path: root/graphics/yafaray
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-25 14:57:15 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-27 01:09:46 +0700
commitb2337302dbb39eb96f8d4f4b11b81cfe391fc391 (patch)
tree402eac36a0acbbf9d8de8fd5a1d7ab22f37ce63b /graphics/yafaray
parent1bb2a805bdc8361f34a79875e97bb4205a1d82a1 (diff)
graphics/yafaray: Fix github URL, support optional qt4.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/yafaray')
-rw-r--r--graphics/yafaray/README11
-rw-r--r--graphics/yafaray/yafaray.SlackBuild44
-rw-r--r--graphics/yafaray/yafaray.info2
3 files changed, 35 insertions, 22 deletions
diff --git a/graphics/yafaray/README b/graphics/yafaray/README
index 6dcf20e28d12a..3c8c3af41175e 100644
--- a/graphics/yafaray/README
+++ b/graphics/yafaray/README
@@ -1,5 +1,8 @@
-YafaRay is a free open-source raytracing engine. Raytracing is a rendering
-technique for generating realistic images by tracing the path of light
-through a 3D scene.
+YafaRay is a free open-source raytracing engine. Raytracing is a
+rendering technique for generating realistic images by tracing the
+path of light through a 3D scene.
-To disable building the Qt gui pass the script the variable QTGUI=OFF
+Optional dependency: qt4. If this is installed, the Qt4 support
+library for YafaRay (libyafarayqt.so) will be included in the
+package. To disable Qt4 support, export QT=no in the script's
+environment.
diff --git a/graphics/yafaray/yafaray.SlackBuild b/graphics/yafaray/yafaray.SlackBuild
index ac576ebdc9e76..113257d84c3b8 100644
--- a/graphics/yafaray/yafaray.SlackBuild
+++ b/graphics/yafaray/yafaray.SlackBuild
@@ -29,7 +29,18 @@
# 1.0 - Initial release.
# 1.1 - Removed a bashism (==) to become ash-compatible.
-# Modified by the SlackBuilds.org project
+# 20220225 bkw: I just have to ask. Why care about being ash compatible?
+# When are you ever going to run this script with ash?
+
+# 20220222 bkw: Modified by SlackBuilds.org:
+# - fix bad github filename.
+# - do not install the docs with execute permission.
+# - reword README stuff about qt (it's not a "Qt GUI", it's a library)
+# and mention qt4 as an optional dep.
+
+# Note: python bindings are not built, partly because it's hardcoded
+# for python 3.5, and (if overridden with YAF_PY_VERSION=3.9) because
+# it fails to build. Maybe someone will have time to fix this someday?
cd $(dirname $0) ; CWD=$(pwd)
@@ -47,9 +58,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,18 +83,23 @@ fi
set -e
+SRCNAM=Core
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf Core-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd Core-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find . -type f -exec chmod 644 {} \+
+find . -type d -exec chmod 755 {} \+
+
+# 20220225 bkw: autodetect qt4, and allow override with QT=no.
+QTARG="-DWITH_QT=OFF"
+if [ -x /usr/lib$LIBDIRSUFFIX/qt4/bin/qmake ]; then
+ [ "${QT:-yes}" = "yes" ] && QTARG="-DWITH_QT=ON"
+fi
mkdir -p build
cd build
@@ -95,18 +108,15 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DYAF_LIB_DIR=lib$LIBDIRSUFFIX \
- -DWITH_QT=${QTGUI:-ON} \
+ $QTARG \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
# We install these manually
rm -fR $PKG/usr/share/doc
-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
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS CHANGELOG CODING LICENSES README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/graphics/yafaray/yafaray.info b/graphics/yafaray/yafaray.info
index d2df6e11ffced..eed4d18107c11 100644
--- a/graphics/yafaray/yafaray.info
+++ b/graphics/yafaray/yafaray.info
@@ -1,7 +1,7 @@
PRGNAM="yafaray"
VERSION="3.2.0"
HOMEPAGE="http://www.yafaray.org"
-DOWNLOAD="https://github.com/YafaRay/Core/archive/v3.2.0/yafaray-3.2.0.tar.gz"
+DOWNLOAD="https://github.com/YafaRay/Core/archive/v3.2.0/Core-3.2.0.tar.gz"
MD5SUM="191e81b3d8c942302b97c142049365df"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""