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>
This commit is contained in:
B. Watson 2022-02-25 14:57:15 -05:00 committed by Willy Sudiarto Raharjo
parent 1bb2a805bd
commit b2337302db
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 35 additions and 22 deletions

View File

@ -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.

View File

@ -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

View File

@ -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=""