From 0fe6dede1786553182be4f8d11978ced3b7a5d10 Mon Sep 17 00:00:00 2001 From: Jon Portnoy Date: Sun, 2 Mar 2003 18:16:18 +0000 Subject: Erm, forgot to cvs add the first time around... --- media-gfx/povray/files/prob-opt.sh | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 media-gfx/povray/files/prob-opt.sh (limited to 'media-gfx/povray') diff --git a/media-gfx/povray/files/prob-opt.sh b/media-gfx/povray/files/prob-opt.sh new file mode 100644 index 000000000000..0380da3a8643 --- /dev/null +++ b/media-gfx/povray/files/prob-opt.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# Script from Klaus-J. Wolf + +# Please read through this script and understand it before using it. +# IF YOU DON'T UNDERSTAND IT, DON'T USE IT. +# There are a few things you'll probably want to change - pay attention. +# IMPORTANT: This will overwrite your Portage installation of POV-Ray. + +# Notes from Klaus-J. Wolf in bug report #13400: +# "I have written a small script that does the lengthy work of +# probabilistical optimization of Povray (3.50c tested, with gcc-3.2.1). +# In case of an Athlon/600 I got a performance improvement of about 272% +# to the original settings (ICC gave slightly worse results), in case of +# an P4/2000, I got less improvement, but still better than ICC. +# The script uses all scene files of the original distribution (expected to be +# unpacked in the current directory) to create probabilistic profiles. Then it +# uses the profiles to recompile the source." + +# Change this: +NAME="Me" + +PREFIX=/usr + +cat <$a +done + +AUTHFILE="src/optout.h" +[ -f ${AUTHFILE}~ ] || mv $AUTHFILE ${AUTHFILE}~ +cat ${AUTHFILE}~ |grep -v '^#error' | \ + sed "s/FILL IN NAME HERE\\.*/${NAME}/1" \ + >$AUTHFILE + +make + +for a in `find scenes -name "*.pov"` +do + src/povray +H200 +W320 +O`basename $a .pov`.png +I$a +QR -D -V +done + +rm -f `find . -name "*.o" -type f` + +for a in `find . -name Makefile` +do + [ -f $a~ ] || mv $a $a~ + sed "s&^CFLAGS = .*&CFLAGS = $MYCFLAGS $PHASE2&1" <$a~ | \ + sed "s&^CXXFLAGS = .*&CXXFLAGS = $MYCXXFLAGS $PHASE2&1" | + sed "s/^LIBS = \\(.*\\)/LIBS = \\1 -ljpeg -ltiff -lpng/1" >$a +done + +make + -- cgit v1.2.3-65-gdbad