summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip van der Hoeven <philip@vd-hoeven.nl>2016-08-07 01:02:44 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-07 18:55:32 +0700
commit5517cfcda7c936b371b5a571abcdf94dc1e5175f (patch)
treefbd0af7c10e397c8c22e416b8abc121a6e1a19ef
parentb1d591b130c30c570d15c7e9d156b7f226402958 (diff)
downloadslackbuilds-5517cfcda7c936b371b5a571abcdf94dc1e5175f.tar.gz
graphics/LDView: Updated for version 4.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--graphics/LDView/LDView.SlackBuild92
-rw-r--r--graphics/LDView/LDView.info6
-rw-r--r--graphics/LDView/LDView_GL.patch11
-rw-r--r--graphics/LDView/LDView_boost15.patch36
-rw-r--r--graphics/LDView/LDView_gcc47.patch24
5 files changed, 51 insertions, 118 deletions
diff --git a/graphics/LDView/LDView.SlackBuild b/graphics/LDView/LDView.SlackBuild
index a8cb4ea400..9f5739c85d 100644
--- a/graphics/LDView/LDView.SlackBuild
+++ b/graphics/LDView/LDView.SlackBuild
@@ -4,7 +4,7 @@
# a program to visualize LDraw files
# Copyright 2009-2010, 2012-2013 Niels Horn, Rio de Janeiro, Brazil
-# Copyright 2015 Philip van der Hoeven, Almere, The Netherlands
+# Copyright 2015-2016 Philip van der Hoeven, Almere, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +25,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=LDView
-VERSION=${VERSION:-4.2beta1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRCVER=$(echo $VERSION|tr . _)
+SRCNAM=$(echo $PRGNAM|tr '[A-Z]' '[a-z]')
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,31 +44,28 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
- LDVDEV64=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
- LDVDEV64=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
- LDVDEV64=YES
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
- LDVDEV64=""
fi
set -e
-rm -rf $TMP/$PRGNAM $PKG
+rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz || tar xvf $CWD/v$SRCVER.tar.gz
+cd $SRCNAM-$SRCVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -74,55 +73,60 @@ 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 {} \;
-# Patch for gcc-4.7
-patch -p1 < $CWD/LDView_gcc47.patch
-
-# Patch for boost-1.50
-# see https://svn.boost.org/trac/boost/ticket/6940
-patch -p1 < $CWD/LDView_boost15.patch
-
-# Patch for GL problems
-patch -p1 < $CWD/LDView_GL.patch
-
-# the 'makeall' script is in the QT directory
cd QT
-# Fix LDView.pro for gcc-4.7
-sed -e 's/-ljpeg/-ljpeg -lpng -lz -lboost_system -lGLU/' -i LDView.pro
+# Fix path to LDraw library
+sed -i 's@/usr/share/ldraw@/usr/share/LDRAW@' ModelViewerWidget.cpp
+
+if [ "$ARCH" = "x86_64" ]; then
+ PLATFORM=linux-g++-64
+else
+ PLATFORM=linux-g++-32
+fi
+qmake LIBS+=-lboost_system -spec $PLATFORM
+lrelease LDView.pro
+make "TESTING=-I ../gl2ps -I ../3rdParty/tinyxml"
-export LDVDEV64
-QTDIR=$QT4DIR TESTING="$SLKCFLAGS" ./makeall
# Install manually
mkdir -p $PKG/usr/bin
-cp -a $PRGNAM $PKG/usr/bin/${PRGNAM}_bin
-strip --strip-unneeded $PKG/usr/bin/${PRGNAM}_bin
-cat $CWD/$PRGNAM.sh > $PKG/usr/bin/$PRGNAM
+cp -a $PRGNAM $PKG/usr/bin/${PRGNAM}
+strip --strip-unneeded $PKG/usr/bin/${PRGNAM}
chmod 0755 $PKG/usr/bin/$PRGNAM
cd ..
# Sample files, font, translations
-mkdir -p $PKG/usr/share/$PRGNAM
+mkdir -p $PKG/usr/share/$SRCNAM
cp 8464.mpd m6459.ldr Textures/SansSerif.fnt \
- $PKG/usr/share/$PRGNAM/
+ $PKG/usr/share/$SRCNAM/
cp Translations/Czech/LDViewMessages.ini \
- $PKG/usr/share/$PRGNAM/LDViewMessages_cz.ini
+ $PKG/usr/share/$SRCNAM/LDViewMessages_cz.ini
cp Translations/EnglishUS/LDViewMessages.ini \
- $PKG/usr/share/$PRGNAM/LDViewMessages_en_US.ini
+ $PKG/usr/share/$SRCNAM/LDViewMessages_en_US.ini
cp Translations/German/LDViewMessages.ini \
- $PKG/usr/share/$PRGNAM/LDViewMessages_de.ini
+ $PKG/usr/share/$SRCNAM/LDViewMessages_de.ini
cp Translations/Hungarian/LDViewMessages.ini \
- $PKG/usr/share/$PRGNAM/LDViewMessages_hu.ini
+ $PKG/usr/share/$SRCNAM/LDViewMessages_hu.ini
cp Translations/Italian/LDViewMessages.ini \
- $PKG/usr/share/$PRGNAM/LDViewMessages_it.ini
+ $PKG/usr/share/$SRCNAM/LDViewMessages_it.ini
cat LDViewMessages.ini LDExporter/LDExportMessages.ini \
- > $PKG/usr/share/$PRGNAM/LDViewMessages.ini
-
-# Copy icon & desktop file to package
-mkdir -p $PKG/usr/share/{applications,mime/packages,pixmaps}
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-convert Icons/LDViewIcon.gif $PKG/usr/share/pixmaps/$PRGNAM.png
+ > $PKG/usr/share/$SRCNAM/LDViewMessages.ini
+cp QT/ldview_en.qm $PKG/usr/share/$SRCNAM/ldview_en.qm
+cp QT/ldview_de.qm $PKG/usr/share/$SRCNAM/ldview_de.qm
+cp QT/ldview_it.qm $PKG/usr/share/$SRCNAM/ldview_it.qm
+cp QT/ldview_cz.qm $PKG/usr/share/$SRCNAM/ldview_cz.qm
+cp LDExporter/LGEO.xml $PKG/usr/share/$SRCNAM/LGEO.xml
+
+# Icon, desktop and mime stuff
+mkdir -p $PKG/usr/share/{applications,application-registry,mime/packages,mime-info}
+mkdir -p $PKG/usr/share/icons/gnome/32x32/mimetypes
+cat QT/desktop/ldview.desktop > $PKG/usr/share/applications/ldview.desktop
cat QT/desktop/ldraw.xml > $PKG/usr/share/mime/packages/ldraw.xml
+cp QT/desktop/ldraw.keys $PKG/usr/share/mime-info/ldraw.keys
+cp QT/desktop/ldraw.mime $PKG/usr/share/mime-info/ldraw.mime
+cp QT/desktop/ldview.applications $PKG/usr/share/application-registry/ldview.applications
+cp QT/images/LDViewIcon.png $PKG/usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-ldraw.png
+cp QT/images/LDViewIcon.png $PKG/usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-multipart-ldraw.png
# Documentation
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
diff --git a/graphics/LDView/LDView.info b/graphics/LDView/LDView.info
index 9138eebe56..b479ab4f44 100644
--- a/graphics/LDView/LDView.info
+++ b/graphics/LDView/LDView.info
@@ -1,8 +1,8 @@
PRGNAM="LDView"
-VERSION="4.2beta1"
+VERSION="4.2"
HOMEPAGE="http://ldview.sourceforge.net"
-DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/LDView/LDView-4.2beta1.tar.gz"
-MD5SUM="05e90fcde68ca0052f45e3971d0906b1"
+DOWNLOAD="https://github.com/tcobbs/ldview/archive/v4_2.tar.gz"
+MD5SUM="bb8bf257bf53ab4fc681d2430603e7b5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="LDraw_data tinyxml"
diff --git a/graphics/LDView/LDView_GL.patch b/graphics/LDView/LDView_GL.patch
deleted file mode 100644
index f603552cc1..0000000000
--- a/graphics/LDView/LDView_GL.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- LDView.org/TRE/TREGLExtensions.cpp 2010-01-08 22:01:46.000000000 +0100
-+++ LDView/TRE/TREGLExtensions.cpp 2015-02-04 11:49:42.774280878 +0100
-@@ -204,7 +204,7 @@
- // the function pointers won't be loaded.
- if (haveVARExtension(true))
- {
--#ifndef __APPLE__
-+#ifdef WIN32
- // NOTE: I should really change the __APPLE__ path to do their
- // equivalent of wglGetProcAddress. However, since this extension won't
- // work anyway without a bunch of glX stuff that I'm not going to do,
diff --git a/graphics/LDView/LDView_boost15.patch b/graphics/LDView/LDView_boost15.patch
deleted file mode 100644
index df34562675..0000000000
--- a/graphics/LDView/LDView_boost15.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -ru LDView.org/LDLib/LDLibraryUpdater.cpp LDView/LDLib/LDLibraryUpdater.cpp
---- LDView.org/LDLib/LDLibraryUpdater.cpp 2010-08-04 08:19:09.000000000 +0200
-+++ LDView/LDLib/LDLibraryUpdater.cpp 2015-02-04 11:45:23.930291764 +0100
-@@ -1205,7 +1205,7 @@
- // it to signal.
- boost::xtime xt;
-
-- boost::xtime_get(&xt, boost::TIME_UTC);
-+ boost::xtime_get(&xt, boost::TIME_UTC_);
- xt.nsec += 250 * 1000 * 1000;
- m_threadFinish->timed_wait(lock, xt);
- }
-diff -ru LDView.org/TCFoundation/TCWebClient.cpp LDView/TCFoundation/TCWebClient.cpp
---- LDView.org/TCFoundation/TCWebClient.cpp 2011-02-12 05:24:14.000000000 +0100
-+++ LDView/TCFoundation/TCWebClient.cpp 2015-02-04 11:45:39.781291097 +0100
-@@ -118,7 +118,7 @@
- #else // _OSMESA
- boost::xtime xt;
-
-- boost::xtime_get(&xt, boost::TIME_UTC);
-+ boost::xtime_get(&xt, boost::TIME_UTC_);
- xt.sec += sec;
- boost::thread::sleep(xt);
- #endif // _OSMESA
-diff -ru LDView.org/TRE/TREMainModel.cpp LDView/TRE/TREMainModel.cpp
---- LDView.org/TRE/TREMainModel.cpp 2011-02-12 05:24:14.000000000 +0100
-+++ LDView/TRE/TREMainModel.cpp 2015-02-04 11:45:51.249290615 +0100
-@@ -814,7 +814,7 @@
- #ifdef ANTI_DEADLOCK_HACK
- boost::xtime xt;
-
-- boost::xtime_get(&xt, boost::TIME_UTC);
-+ boost::xtime_get(&xt, boost::TIME_UTC_);
- // 100,000,000 nsec == 100 msec
- xt.nsec += 100 * 1000000;
- // HACK: If any deadlocks are encountered during testing,
diff --git a/graphics/LDView/LDView_gcc47.patch b/graphics/LDView/LDView_gcc47.patch
deleted file mode 100644
index 044d824c7a..0000000000
--- a/graphics/LDView/LDView_gcc47.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- LDView.org/TCFoundation/TCArray.h 2008-05-18 23:16:21.000000000 +0200
-+++ LDView/TCFoundation/TCArray.h 2015-02-04 11:38:48.394308398 +0100
-@@ -2,6 +2,7 @@
- #define __TCARRAY_H__
-
- #include <TCFoundation/TCObject.h>
-+#include <TCFoundation/mystring.h>
-
- typedef int (*TCArraySortFunction)(const void*, const void*);
-
-diff -ru LDView.org/TCFoundation/mystring.h TCFoundation/mystring.h
---- LDView/TCFoundation/mystring.h 2011-05-26 06:51:55.000000000 +0200
-+++ TCFoundation/mystring.h 2015-02-04 11:39:16.529307215 +0100
-@@ -13,6 +13,10 @@
- #include <Qt/qstring.h>
- #endif // _QT
-
-+#ifndef WIN32
-+#include <unistd.h>
-+#endif
-+
- #ifdef _OSMESA
- #include <stdarg.h>
- #endif // _OSMESA