summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaatu <klaatu@member.fsf.org>2016-08-04 19:24:39 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-04 19:28:32 +0700
commit05b681db3a3bc6751dcbcf7c6cbbaaa8ecf4cb6e (patch)
tree617dffb2e7b008f59f8a099ca08dd6d9d24627cd
parent66993e4d0614aa2b1893a0a25c20e165dbd5f35b (diff)
downloadslackbuilds-05b681db3a3bc6751dcbcf7c6cbbaaa8ecf4cb6e.tar.gz
graphics/povray: Update Script + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--graphics/povray/povray.SlackBuild42
-rw-r--r--graphics/povray/povray.info4
-rw-r--r--graphics/povray/prebuild.patch23
3 files changed, 53 insertions, 16 deletions
diff --git a/graphics/povray/povray.SlackBuild b/graphics/povray/povray.SlackBuild
index 8a2a8f3361..b6372da8c2 100644
--- a/graphics/povray/povray.SlackBuild
+++ b/graphics/povray/povray.SlackBuild
@@ -3,9 +3,11 @@
# Slackware build script for povray:
# the Persistence of Vision Raytracer
+# Maintainer: Klaatu
+# Thanks to: Franzen
+
# Copyright 2009,2011,2013 Niels Horn, Rio de Janeiro, RJ, Brazil
# All rights reserved.
-#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@@ -23,12 +25,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# revision date 2013/03/26
-
PRGNAM=povray
VERSION=${VERSION:-3.7.0.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+DOCDIR=${DOCDIR:-/usr/doc}
+MANDIR=${MANDIR:-/usr/man}
# The "short" version number is needed later:
SHORT_VERSION=$( echo $VERSION | cut -f1-2 -d. )
@@ -81,9 +83,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# make sure no bundled static libs can be used
+rm -r libraries
+
(
cd unix
sed 's/automake --w/automake --add-missing --w/g' -i prebuild.sh
+ # Prevent march=nativ for compatibility
+ sed "s/native/$ARCH/g" -i configure.ac
+ # By disabling march=nativ, compatibilitybreaking optimizations like sse4 may arize by prebuild.sh
+ sed "s/ax_x86_cpuflags=.*/unset ax_x86_cpuflags/g" -i config/ax_x86_arch.m4
+ # prevent creating files in $HOME while building
+ patch prebuild.sh $CWD/prebuild.patch
sh ./prebuild.sh
)
@@ -93,7 +104,7 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
+ --mandir=$MANDIR \
--build=$ARCH-slackware-linux \
LIBS="-lboost_system -lboost_thread" \
COMPILED_BY="$POVRAY_BUILDER"
@@ -104,8 +115,8 @@ make install DESTDIR=$PKG
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
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+find $PKG/$MANDIR -type f -exec gzip -9 {} \;
+for i in $( find $PKG/$MANDIR -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Rename configuration files to .new, will be checked by doinst.sh
mv $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.conf \
@@ -113,13 +124,16 @@ mv $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.conf \
mv $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.ini \
$PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.ini.new
-# ./configure does not accept "--docdir=", so we'll move the docdir manually
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/share/doc/$PRGNAM-$SHORT_VERSION/* $PKG/usr/doc/$PRGNAM-$VERSION/
-rm -r $PKG/usr/share/doc
-cp -a COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# ./configure does not accept docdir; move docs manually as needed
+if [ "$DOCDIR" != "/usr/share/doc" ]; then
+ mkdir -p $PKG/$DOCDIR/$PRGNAM-$VERSION
+ mv $PKG/usr/share/doc/$PRGNAM-$SHORT_VERSION/* $PKG/$DOCDIR/$PRGNAM-$VERSION/
+ rm -r $PKG/usr/share/doc
+fi
+
+cp -a COPYING INSTALL $PKG/$DOCDIR/$PRGNAM-$VERSION
+find $PKG/$DOCDIR/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+cat $CWD/$PRGNAM.SlackBuild > $PKG/$DOCDIR/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/graphics/povray/povray.info b/graphics/povray/povray.info
index 6abdc52c30..a1e80f9cb1 100644
--- a/graphics/povray/povray.info
+++ b/graphics/povray/povray.info
@@ -6,5 +6,5 @@ MD5SUM="c9473256677808e9e3246e6eb8f69a75"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Niels Horn"
-EMAIL="niels.horn@gmail.com"
+MAINTAINER="Klaatu"
+EMAIL="klaatu@member.fsf.org"
diff --git a/graphics/povray/prebuild.patch b/graphics/povray/prebuild.patch
new file mode 100644
index 0000000000..7a4a203e29
--- /dev/null
+++ b/graphics/povray/prebuild.patch
@@ -0,0 +1,23 @@
+--- prebuild.sh.orig 2016-07-03 14:54:38.000000000 +0200
++++ prebuild.sh 2016-07-03 14:56:10.000000000 +0200
+@@ -642,19 +642,6 @@
+ for f in \$\$filelist ; do \\
+ \$(INSTALL_DATA) \$(top_srcdir)/doc/\$\$f \$(DESTDIR)\$(povdocdir)/\$\$f && echo "\$(DESTDIR)\$(povdocdir)/\$\$f" >> \$(povinstall); \\
+ done
+- @echo "Creating user directories..."; \\
+- for p in \$(povuser) \$(povconfuser) ; do \\
+- \$(mkdir_p) \$\$p && chown \$(povowner) \$\$p && chgrp \$(povgroup) \$\$p && printf "%s\\n" "\$\$p" "\`cat \$(povinstall)\`" > \$(povinstall); \\
+- done
+- @echo "Copying user configuration and INI files..."; \\
+- for f in povray.conf povray.ini ; do \\
+- if test -f \$(povconfuser)/\$\$f; then \\
+- echo "Creating backup of \$(povconfuser)/\$\$f"; \\
+- mv -f \$(povconfuser)/\$\$f \$(povconfuser)/\$\$f.bak; \\
+- fi; \\
+- done; \\
+- \$(INSTALL_DATA) \$(top_srcdir)/povray.conf \$(povconfuser)/povray.conf && chown \$(povowner) \$(povconfuser)/povray.conf && chgrp \$(povgroup) \$(povconfuser)/povray.conf && echo "\$(povconfuser)/povray.conf" >> \$(povinstall); \\
+- \$(INSTALL_DATA) \$(top_builddir)/povray.ini \$(povconfuser)/povray.ini && chown \$(povowner) \$(povconfuser)/povray.ini && chgrp \$(povgroup) \$(povconfuser)/povray.ini && echo "\$(povconfuser)/povray.ini" >> \$(povinstall)
+
+ # Remove data, config, and empty folders for 'make uninstall'.
+ # Use 'hook' instead of 'local' so as to properly remove *empty* folders (e.g. scripts).
+