summaryrefslogtreecommitdiff
path: root/graphics/LDView
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/LDView')
-rw-r--r--graphics/LDView/LDView.SlackBuild21
-rw-r--r--graphics/LDView/LDView.info2
-rw-r--r--graphics/LDView/opengl.patch10
3 files changed, 29 insertions, 4 deletions
diff --git a/graphics/LDView/LDView.SlackBuild b/graphics/LDView/LDView.SlackBuild
index 98c2827085..7fa403614a 100644
--- a/graphics/LDView/LDView.SlackBuild
+++ b/graphics/LDView/LDView.SlackBuild
@@ -4,14 +4,22 @@
# a program to visualize LDraw files
# Written by Niels Horn - niels.horn@gmail.com
-# revision date 2009/12/09
+# revision date 2010/06/05
PRGNAM=LDView
VERSION=4.1
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -29,6 +37,10 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
LDVDEV64=YES
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LDVDEV64=""
fi
set -e
@@ -41,6 +53,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# Patch for a bug in QT, solves problems on NVIDIA cards
+patch -p1 < $CWD/opengl.patch
+
# the 'makeall' script is in the QT directory
cd QT
export LDVDEV64
diff --git a/graphics/LDView/LDView.info b/graphics/LDView/LDView.info
index 76419b12f3..1a3ab36d2e 100644
--- a/graphics/LDView/LDView.info
+++ b/graphics/LDView/LDView.info
@@ -1,7 +1,7 @@
PRGNAM="LDView"
VERSION="4.1"
HOMEPAGE="http://ldview.sourceforge.net"
-DOWNLOAD="http://www.nielshorn.net/_download/LDView-4.1.tar.gz"
+DOWNLOAD="http://www.nielshorn.net/_download/slackware/source/LDView-4.1.tar.gz"
MD5SUM="942fc33b061bffc5d3e9cdf06622a878"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/graphics/LDView/opengl.patch b/graphics/LDView/opengl.patch
new file mode 100644
index 0000000000..53f0364a1a
--- /dev/null
+++ b/graphics/LDView/opengl.patch
@@ -0,0 +1,10 @@
+--- LDView-4.1/QT/ModelViewerWidget.cpp 2009-12-01 14:27:54.000000000 -0200
++++ LDView-4.1_patched/QT/ModelViewerWidget.cpp 2010-05-25 20:15:41.000000000 -0300
+@@ -403,6 +403,7 @@
+ if (!painting && (saving || !loading))
+ {
+ painting = true;
++ glEnable(GL_DEPTH_TEST);
+ if (saving)
+ {
+ if (!TREGLExtensions::haveFramebufferObjectExtension())