summaryrefslogtreecommitdiff
path: root/graphics/LDView
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2012-09-13 16:22:49 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2012-09-13 16:22:49 -0300
commitf11d88063783615fb8d4097f6bffb1afa84ee800 (patch)
treeeeb4a1d7887a6b65c8ed44fe5039005e25f588a8 /graphics/LDView
parent4032bd1ac5720ffb7f4cad4ca779ce334481f895 (diff)
downloadslackbuilds-f11d88063783615fb8d4097f6bffb1afa84ee800.tar.gz
graphics/LDView: Fixed to build against gcc-4.7
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'graphics/LDView')
-rw-r--r--graphics/LDView/LDView.SlackBuild35
-rw-r--r--graphics/LDView/LDView_gcc47.patch23
2 files changed, 53 insertions, 5 deletions
diff --git a/graphics/LDView/LDView.SlackBuild b/graphics/LDView/LDView.SlackBuild
index 7fa403614a..4225153c14 100644
--- a/graphics/LDView/LDView.SlackBuild
+++ b/graphics/LDView/LDView.SlackBuild
@@ -3,19 +3,37 @@
# Slackware build script for LDView:
# a program to visualize LDraw files
-# Written by Niels Horn - niels.horn@gmail.com
-# revision date 2010/06/05
+# Copyright 2009-2010, 2012 Niels Horn, Rio de Janeiro, Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# revision date 2012/09/13
PRGNAM=LDView
VERSION=4.1
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
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
@@ -56,10 +74,17 @@ 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
+# Patch for gcc-4.7
+patch -p1 < $CWD/LDView_gcc47.patch
+
# the 'makeall' script is in the QT directory
cd QT
+
+# Fix LDView.pro for gcc-4.7
+sed -e 's/-ljpeg/-ljpeg -lpng14 -lz -lGLU/' -i LDView.pro
+
export LDVDEV64
-QTDIR=$QT4DIR TESTING=$SLKCFLAGS ./makeall
+QTDIR=$QT4DIR TESTING="$SLKCFLAGS" ./makeall
# Install manually
mkdir -p $PKG/usr/bin
diff --git a/graphics/LDView/LDView_gcc47.patch b/graphics/LDView/LDView_gcc47.patch
new file mode 100644
index 0000000000..ae1c7c2810
--- /dev/null
+++ b/graphics/LDView/LDView_gcc47.patch
@@ -0,0 +1,23 @@
+--- LDView-4.1/TCFoundation/TCArray.h 2008-05-18 18:16:21.000000000 -0300
++++ LDView-4.1_patched/TCFoundation/TCArray.h 2012-09-13 14:32:40.000000000 -0300
+@@ -2,6 +2,7 @@
+ #define __TCARRAY_H__
+
+ #include <TCFoundation/TCObject.h>
++#include <TCFoundation/mystring.h>
+
+ typedef int (*TCArraySortFunction)(const void*, const void*);
+
+--- LDView-4.1/TCFoundation/mystring.h 2009-11-17 00:45:34.000000000 -0200
++++ LDView-4.1_patched/TCFoundation/mystring.h 2012-09-13 14:33:51.000000000 -0300
+@@ -13,6 +13,10 @@
+ #include <Qt/qstring.h>
+ #endif // _QT
+
++#ifndef WIN32
++#include <unistd.h>
++#endif
++
+ #ifdef _OSMESA
+ #include <stdarg.h>
+ #endif // _OSMESA