summaryrefslogtreecommitdiff
path: root/graphics/yafaray/yafaray.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/yafaray/yafaray.SlackBuild')
-rw-r--r--graphics/yafaray/yafaray.SlackBuild44
1 files changed, 27 insertions, 17 deletions
diff --git a/graphics/yafaray/yafaray.SlackBuild b/graphics/yafaray/yafaray.SlackBuild
index ac576ebdc9..113257d84c 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