summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO53
-rw-r--r--3ds.patch27
-rw-r--r--PKGBUILD119
-rw-r--r--bzip2.patch26
-rw-r--r--cpp11_abs.patch21
-rw-r--r--external.patch16
-rw-r--r--fix_locale.patch19
-rw-r--r--lapack.patch11
-rw-r--r--levmar.patch113
-rw-r--r--meshlab-git.install11
-rw-r--r--meshlab.desktop14
-rw-r--r--meshlabserver_GLU.patch17
-rw-r--r--mpir.patch13
-rw-r--r--muparser.patch14
-rw-r--r--rpath.patch36
15 files changed, 510 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8cfc5506497e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,53 @@
+pkgbase = meshlab-git
+ pkgdesc = System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)
+ pkgver = 1.3.4_r8497062
+ pkgrel = 1
+ url = http://meshlab.sourceforge.net/
+ install = meshlab-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ makedepends = subversion
+ depends = bzip2
+ depends = muparser
+ depends = levmar
+ depends = lib3ds
+ depends = desktop-file-utils
+ depends = glu
+ depends = mpir
+ depends = openssl
+ depends = qt5-base
+ depends = qt5-declarative
+ depends = qt5-script
+ provides = meshlab
+ conflicts = meshlab
+ source = git+https://github.com/bartoszek/meshlab.git
+ source = git+https://github.com/cnr-isti-vclab/vcglib.git#branch=devel
+ source = external.patch
+ source = 3ds.patch
+ source = levmar.patch
+ source = muparser.patch
+ source = bzip2.patch
+ source = meshlabserver_GLU.patch
+ source = cpp11_abs.patch
+ source = fix_locale.patch
+ source = mpir.patch
+ source = rpath.patch
+ source = meshlab.desktop
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = e7c45c73829afe804e1c7f6cd19856c9
+ md5sums = e51b027eb9d78b82de73c4724b3928cf
+ md5sums = f1c1d99c92ff296edf9a8f346dd07b3a
+ md5sums = 64caafa96bef4208d641e889099eba26
+ md5sums = 616b0dcf018f46a490867028d6ddc533
+ md5sums = 5d87f00356539f84f37f873f304eb11e
+ md5sums = c1cfb910d20db49ec195d9918036e3c3
+ md5sums = 5b59b23cf66e42f8b3d3eabe466b3eaa
+ md5sums = bee3a1ea8bf98200314029330b537e58
+ md5sums = 2cc1246fc1b01029ae762c82a7dbf364
+ md5sums = 18aed0a21276a22325bf8c32166fb110
+
+pkgname = meshlab-git
+
diff --git a/3ds.patch b/3ds.patch
new file mode 100644
index 000000000000..287f2bd5cb4b
--- /dev/null
+++ b/3ds.patch
@@ -0,0 +1,27 @@
+--- ../meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2016-10-31 00:00:28.662690502 +0100
++++ meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2016-11-01 00:28:59.485188734 +0100
+@@ -14,7 +14,7 @@
+
+ TARGET = io_3ds
+
+-INCLUDEPATH += ../../external/lib3ds-1.3.0/
++INCLUDEPATH += /usr/include/lib3ds/
+
+ # Notes on the paths of lib3ds files.
+ # Once you have compiled the library put the lib files in a dir named lib/XXX/
+@@ -25,11 +25,11 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/3ds.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/3ds.lib
+ win32-g++:LIBS += ../../external/lib/win32-gcc/lib3ds.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/lib3ds.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/lib3ds.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/lib3ds.a
++linux-g++:LIBS += -l3ds
++linux-g++-32:LIBS += -l3ds
++linux-g++-64:LIBS += -l3ds
+
+-# unix:LIBS += -L../../../../code/lib/lib3ds-1.3.0/lib3ds/lib/unix -l3ds
++unix:LIBS += -l3ds
+
+ # mac:LIBS -= -l3ds
+ # mac:LIBS += ../../../../code/lib/lib3ds-1.3.0/lib/mac/lib3ds.a
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..530a1f0c3175
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,119 @@
+# Maintainer: bartus <aur@bartus.33mail.com>
+pkgname=meshlab-git
+pkgver=1.3.4_r8497062
+pkgrel=1
+pkgdesc="System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)"
+arch=('i686' 'x86_64')
+url="http://meshlab.sourceforge.net/"
+conflicts=('meshlab')
+provides=('meshlab')
+license=('GPL2')
+depends=('bzip2' 'muparser' 'levmar' 'lib3ds' 'desktop-file-utils' 'glu' 'mpir' 'openssl' 'qt5-base' 'qt5-declarative' 'qt5-script')
+#also create openctm(aur) jhead-lib structuresynth-lib to handle last dep
+makedepends=('git' 'subversion')
+install="${pkgname}.install"
+source=("git+https://github.com/bartoszek/meshlab.git"
+ "git+https://github.com/cnr-isti-vclab/vcglib.git#branch=devel"
+ "external.patch"
+ "3ds.patch"
+ "levmar.patch"
+ "muparser.patch"
+ "bzip2.patch"
+ "meshlabserver_GLU.patch"
+ "cpp11_abs.patch"
+ "fix_locale.patch"
+ "mpir.patch"
+ "rpath.patch"
+ "meshlab.desktop")
+md5sums=('SKIP'
+ 'SKIP'
+ 'e7c45c73829afe804e1c7f6cd19856c9'
+ 'e51b027eb9d78b82de73c4724b3928cf'
+ 'f1c1d99c92ff296edf9a8f346dd07b3a'
+ '64caafa96bef4208d641e889099eba26'
+ '616b0dcf018f46a490867028d6ddc533'
+ '5d87f00356539f84f37f873f304eb11e'
+ 'c1cfb910d20db49ec195d9918036e3c3'
+ '5b59b23cf66e42f8b3d3eabe466b3eaa'
+ 'bee3a1ea8bf98200314029330b537e58'
+ '2cc1246fc1b01029ae762c82a7dbf364'
+ '18aed0a21276a22325bf8c32166fb110')
+
+pkgver() {
+ cd meshlab
+ local ver="$(git describe --always)"
+ printf "1.3.4_r%s" "${ver//[[:alpha:]]}"
+}
+
+prepare() {
+ cd "${srcdir}"
+
+ # remove bundled headers and libraries
+ rm -fr meshlab/src/external/{inc,lib}
+
+ msg "truncate external lib"
+ patch -Np0 -i external.patch
+ msg "fix rpath"
+ patch -Np0 -i rpath.patch
+ msg "fix meshlab/src/plugins_experimental/io_TXT/ case sensitive path"
+ mv meshlab/src/plugins_experimental/io_TXT/io_txt.pro meshlab/src/plugins_experimental/io_TXT/io_TXT.pro
+ msg "fix meshalbserver missing -lGLU"
+ patch -Np0 -i meshlabserver_GLU.patch
+ msg "fix cpp11 abs()"
+ patch -Np0 -i cpp11_abs.patch
+ msg "fix decimal separator problem"
+ patch -Np0 -i fix_locale.patch
+ msg "using system mpir lib"
+ patch -Np0 -i mpir.patch
+ msg "using system bzip2 lib"
+ patch -Np0 -i bzip2.patch
+ msg "using system muparser lib"
+ patch -Np0 -i muparser.patch
+ msg "using system levmar lib"
+ patch -Np0 -i levmar.patch
+ msg "using system 3ds lib"
+ patch -Np0 -i 3ds.patch
+}
+
+build() {
+ cd "${srcdir}/meshlab/src"
+
+ msg "build external libraries"
+ cd external
+ qmake external.pro -r
+ make
+
+ msg "build meshlab"
+ cd ..
+ qmake meshlab_full.pro -r
+ make
+}
+
+package() {
+ cd "${srcdir}/meshlab/src"
+
+ # install meshlab
+ install -d -m755 "${pkgdir}/opt"
+ cp -a distrib "${pkgdir}/opt/meshlab"
+
+ # add symbolic links for executables
+ install -d -m755 "${pkgdir}/usr/bin"
+ ln -s ../../opt/meshlab/meshlab "${pkgdir}/usr/bin/meshlab"
+ ln -s ../../opt/meshlab/meshlabserver "${pkgdir}/usr/bin/meshlabserver"
+
+ # install man pages
+ install -d -m755 "${pkgdir}/usr/share/man/man1"
+ install -m644 "${srcdir}/meshlab/docs/meshlab.1" "${pkgdir}"/usr/share/man/man1
+ install -m644 "${srcdir}/meshlab/docs/meshlabserver.1" "${pkgdir}"/usr/share/man/man1
+
+ # install icons
+ install -d -m755 "${pkgdir}/usr/share/pixmaps"
+ install -m644 "${srcdir}/meshlab/src/meshlab/images/eye_cropped.png" "${pkgdir}/usr/share/pixmaps/meshlab.png"
+
+ # install desktop entry
+ install -d -m755 "${pkgdir}/usr/share/applications"
+ install -m644 "${srcdir}/meshlab.desktop" "${pkgdir}/usr/share/applications"
+ sed -i "s#Version=.*#Version=$pkgver#" "${pkgdir}/usr/share/applications/meshlab.desktop"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/bzip2.patch b/bzip2.patch
new file mode 100644
index 000000000000..49a822aa746e
--- /dev/null
+++ b/bzip2.patch
@@ -0,0 +1,26 @@
+diff -Naur -r meshlab.orig/src/meshlabplugins/edit_arc3D/edit_arc3D.pro meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro
+--- meshlab.orig/src/meshlabplugins/edit_arc3D/edit_arc3D.pro 2016-10-31 21:31:43.301625217 +0100
++++ meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro 2016-10-31 21:36:46.694965117 +0100
+@@ -35,9 +35,9 @@
+ win32-msvc2013:LIBS += ../../external/lib/win32-msvc2013/bz2.lib
+ win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/bz2.lib
+ win32-g++:LIBS += ../../external/lib/win32-gcc/libbz2.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libbz2.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libbz2.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libbz2.a
++linux-g++:LIBS += -lbz2
++linux-g++-32:LIBS += -lbz2
++linux-g++-64:LIBS += -lbz2
+ mac:LIBS += -lbz2
+
+ win32-msvc2005:INCLUDEPATH += ../../external/bzip2-1.0.5
+@@ -48,9 +48,6 @@
+ win32-msvc2015:INCLUDEPATH += ../../external/bzip2-1.0.5
+
+ win32-g++:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++-32:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++-64:INCLUDEPATH += ../../external/bzip2-1.0.5
+
+
+ CONFIG(release, debug|release) {
diff --git a/cpp11_abs.patch b/cpp11_abs.patch
new file mode 100644
index 000000000000..6078b92c4c9c
--- /dev/null
+++ b/cpp11_abs.patch
@@ -0,0 +1,21 @@
+diff -Naur meshlab.orig/src/meshlabplugins/edit_quality/eqhandle.cpp meshlab/src/meshlabplugins/edit_quality/eqhandle.cpp
+--- meshlab.orig/src/meshlabplugins/edit_quality/eqhandle.cpp 2016-10-30 14:07:42.211338698 +0100
++++ meshlab/src/meshlabplugins/edit_quality/eqhandle.cpp 2016-10-30 14:08:26.774164177 +0100
+
+@@ -30,6 +30,7 @@
+ #include "eqhandle.h"
+ #include <QMouseEvent>
+ #include <QGraphicsSceneMouseEvent>
++#include "math.h" /* fabs() */
+
+ EqHandle::EqHandle(CHART_INFO *environment_info, QColor color, QPointF position,
+ EQUALIZER_HANDLE_TYPE type, EqHandle** handles, qreal* midHandlePercentilePosition, QDoubleSpinBox* spinbox,
+@@ -83,7 +83,7 @@
+ setCursor(Qt::OpenHandCursor);
+
+ QPointF newPos = event->scenePos();
+- qreal handleOffset = abs(newPos.x()-pos().x());
++ qreal handleOffset = fabs(newPos.x()-pos().x());
+
+ if (handleOffset >= std::numeric_limits<float>::epsilon())
+ {
diff --git a/external.patch b/external.patch
new file mode 100644
index 000000000000..333a0f5b71d2
--- /dev/null
+++ b/external.patch
@@ -0,0 +1,16 @@
+--- ../meshlab/src/external/external.pro 2016-10-30 23:59:56.109729632 +0100
++++ meshlab/src/external/external.pro 2016-11-01 00:35:20.501863647 +0100
+@@ -2,11 +2,6 @@
+
+ TEMPLATE = subdirs
+
+-SUBDIRS = bzip2-1.0.5/bzip2-1.0.5.pro \
+- muparser_v225/src \
+- levmar-2.3/levmar-2.3.pro \
+- structuresynth-1.5/structuresynth.pro \
++SUBDIRS = structuresynth-1.5/structuresynth.pro \
+ OpenCTM-1.0.3/openctm.pro \
+- jhead-2.95/jhead-2.95.pro
+- lib3ds-1.3.0/lib3ds
+-# openkinect/openkinect.pro
++ jhead-2.95/jhead-2.95.pro
diff --git a/fix_locale.patch b/fix_locale.patch
new file mode 100644
index 000000000000..343507d497b8
--- /dev/null
+++ b/fix_locale.patch
@@ -0,0 +1,19 @@
+diff -Naur meshlab.orig/src/meshlab/main.cpp meshlab/src/meshlab/main.cpp
+--- meshlab.orig/src/meshlab/main.cpp 2016-10-30 19:47:18.130692500 +0100
++++ meshlab/src/meshlab/main.cpp 2016-10-30 19:49:14.529497595 +0100
+@@ -20,6 +20,7 @@
+ * for more details. *
+ * *
+ ****************************************************************************/
++#include <locale.h>
+ #include <common/mlapplication.h>
+ #include <QMessageBox>
+ #include "mainwindow.h"
+@@ -29,6 +30,7 @@
+ {
+
+ MeshLabApplication app(argc, argv);
++ setlocale(LC_ALL, "C");
+ QLocale::setDefault(QLocale::C);
+ QCoreApplication::setOrganizationName(MeshLabApplication::organization());
+ #if QT_VERSION >= 0x050100
diff --git a/lapack.patch b/lapack.patch
new file mode 100644
index 000000000000..81c094634050
--- /dev/null
+++ b/lapack.patch
@@ -0,0 +1,11 @@
+diff -Nur meshlab.orig/src/external/levmar-2.3/lm.h meshlab/src/external/levmar-2.3/lm.h
+--- meshlab.orig/src/external/levmar-2.3/lm.h 2010-04-28 17:30:47.000000000 +1000
++++ meshlab/src/external/levmar-2.3/lm.h 2010-05-13 20:17:35.488505907 +1000
+@@ -27,7 +27,6 @@
+
+ /* specify whether to use LAPACK or not. The first option is strongly recommended */
+ #define HAVE_LAPACK /* use LAPACK */
+- #undef HAVE_LAPACK /* uncomment this to force not using LAPACK */
+
+ /* to avoid the overhead of repeated mallocs(), routines in Axb.c can be instructed to
+ * retain working memory between calls. Such a choice, however, renders these routines
diff --git a/levmar.patch b/levmar.patch
new file mode 100644
index 000000000000..34c28aad6da9
--- /dev/null
+++ b/levmar.patch
@@ -0,0 +1,113 @@
+--- ../meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2016-10-31 00:00:30.266005497 +0100
++++ meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2016-10-31 21:55:34.158322851 +0100
+@@ -51,9 +51,9 @@
+ win32-msvc2012:LIBS += ../../external/lib/win32-msvc2012/levmar.lib
+ win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/levmar.lib
+ win32-g++:LIBS += -L../../external/lib/win32-gcc -llevmar
+-linux-g++:LIBS += -L../../external/lib/linux-g++ -llevmar
+-linux-g++-32:LIBS += -L../../external/lib/linux-g++-32 -llevmar
+-linux-g++-64:LIBS += -L../../external/lib/linux-g++-64 -llevmar
++linux-g++:LIBS += -llevmar
++linux-g++-32:LIBS += -llevmar
++linux-g++-64:LIBS += -llevmar
+ macx:LIBS += $$MACLIBDIR/liblevmar.a
+
+ # Please never ever uncomment this...
+diff -Naur -r ../meshlab/src/meshlabplugins/filter_mutualinfoxml/levmarmethods.h meshlab/src/meshlabplugins/filter_mutualinfoxml/levmarmethods.h
+--- ../meshlab/src/meshlabplugins/filter_mutualinfoxml/levmarmethods.h 2016-10-31 00:00:30.692667284 +0100
++++ meshlab/src/meshlabplugins/filter_mutualinfoxml/levmarmethods.h 2016-10-31 22:10:49.158342653 +0100
+@@ -12,7 +12,7 @@
+
+ #include <list>
+
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+
+ struct LevmarCorrelation {
+diff -Naur -r ../meshlab/src/meshlabplugins/filter_mutualinfoxml/solver.h meshlab/src/meshlabplugins/filter_mutualinfoxml/solver.h
+--- ../meshlab/src/meshlabplugins/filter_mutualinfoxml/solver.h 2016-10-31 00:00:30.692667284 +0100
++++ meshlab/src/meshlabplugins/filter_mutualinfoxml/solver.h 2016-10-31 22:11:16.808343251 +0100
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+ #include <iostream>
+ #include <fstream>
+diff -Naur -r ../meshlab/src/plugins_experimental/edit_mutualcorrs/edit_mutualcorrs.pro meshlab/src/plugins_experimental/edit_mutualcorrs/edit_mutualcorrs.pro
+--- ../meshlab/src/plugins_experimental/edit_mutualcorrs/edit_mutualcorrs.pro 2016-10-31 00:00:08.816250885 +0100
++++ meshlab/src/plugins_experimental/edit_mutualcorrs/edit_mutualcorrs.pro 2016-10-31 22:22:39.511691359 +0100
+@@ -1,7 +1,7 @@
+ include (../../shared.pri)
+
+
+-HEADERS = += ./alignset.h \
++HEADERS += ./alignset.h \
+ ./levmarmethods.h \
+ ./mutual.h \
+ ./parameters.h \
+@@ -28,9 +28,9 @@
+
+ win32-msvc2013: LIBS += ../../external/lib/win32-msvc2013/levmar.lib
+ win32-msvc2015: LIBS += ../../external/lib/win32-msvc2015/levmar.lib
+-win32-g++:LIBS += -L../../external -llevmar
+-linux-g++:LIBS += -L../../external -llevmar
+-linux-g++-32:LIBS += -L../../external -llevmar
+-linux-g++-64:LIBS += -L../../external -llevmar
++win32-g++:LIBS += -L../../external/lib/win32-g++ -llevmar
++linux-g++:LIBS += -llevmar
++linux-g++-32:LIBS += -llevmar
++linux-g++-64:LIBS += -llevmar
+ macx:LIBS += $$MACLIBDIR/liblevmar.a
+
+diff -Naur -r ../meshlab/src/plugins_experimental/edit_mutualcorrs/levmarmethods.h meshlab/src/plugins_experimental/edit_mutualcorrs/levmarmethods.h
+--- ../meshlab/src/plugins_experimental/edit_mutualcorrs/levmarmethods.h 2016-10-31 00:00:08.816250885 +0100
++++ meshlab/src/plugins_experimental/edit_mutualcorrs/levmarmethods.h 2016-10-31 22:23:35.671692575 +0100
+@@ -12,7 +12,7 @@
+
+ #include <list>
+
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+
+ struct LevmarCorrelation {
+diff -Naur -r ../meshlab/src/plugins_experimental/edit_mutualcorrs/solver.h meshlab/src/plugins_experimental/edit_mutualcorrs/solver.h
+--- ../meshlab/src/plugins_experimental/edit_mutualcorrs/solver.h 2016-10-31 00:00:08.816250885 +0100
++++ meshlab/src/plugins_experimental/edit_mutualcorrs/solver.h 2016-10-31 22:24:05.935026562 +0100
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+ #include <iostream>
+ #include <fstream>
+diff -Naur -r ../meshlab/src/plugins_experimental/filter_mutualglobal/levmarmethods.h meshlab/src/plugins_experimental/filter_mutualglobal/levmarmethods.h
+--- ../meshlab/src/plugins_experimental/filter_mutualglobal/levmarmethods.h 2016-10-31 00:00:09.476243333 +0100
++++ meshlab/src/plugins_experimental/filter_mutualglobal/levmarmethods.h 2016-10-31 22:30:06.391701030 +0100
+@@ -12,7 +12,7 @@
+
+ #include <list>
+
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+
+ struct LevmarCorrelation {
+diff -Naur -r ../meshlab/src/plugins_experimental/filter_mutualglobal/solver.h meshlab/src/plugins_experimental/filter_mutualglobal/solver.h
+--- ../meshlab/src/plugins_experimental/filter_mutualglobal/solver.h 2016-10-31 00:00:09.476243333 +0100
++++ meshlab/src/plugins_experimental/filter_mutualglobal/solver.h 2016-10-31 22:29:02.815032988 +0100
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "../../external/levmar-2.3/lm.h"
++#include <levmar/levmar.h>
+
+ #include <iostream>
+ #include <fstream>
diff --git a/meshlab-git.install b/meshlab-git.install
new file mode 100644
index 000000000000..24f85f2328bd
--- /dev/null
+++ b/meshlab-git.install
@@ -0,0 +1,11 @@
+## arg 1: the new package version
+post_install() {
+ update-desktop-database -q
+}
+
+## arg 1: the old package version
+post_remove() {
+ update-desktop-database -q
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/meshlab.desktop b/meshlab.desktop
new file mode 100644
index 000000000000..b232e3eb81f2
--- /dev/null
+++ b/meshlab.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=$pkgver
+Name=MeshLab
+Name[en_GB]=MeshLab
+GenericName=Mesh processing
+GenericName[en_GB]=Mesh processing
+Comment=View and process meshes
+Type=Application
+Exec=meshlab %U
+TryExec=meshlab
+Icon=/usr/share/pixmaps/meshlab.png
+Terminal=false
+MimeType=model/mesh;application/x-3ds;image/x-3ds;application/sla;
+Categories=Graphics;3DGraphics;Viewer;Qt;
diff --git a/meshlabserver_GLU.patch b/meshlabserver_GLU.patch
new file mode 100644
index 000000000000..f8dd4e63e8b7
--- /dev/null
+++ b/meshlabserver_GLU.patch
@@ -0,0 +1,17 @@
+--- meshlab.orig/src/meshlabserver/meshlabserver.pro 2016-10-30 12:35:34.339895028 +0100
++++ meshlab/src/meshlabserver/meshlabserver.pro 2016-10-30 12:34:55.426965662 +0100
+@@ -29,11 +29,11 @@
+ win32-msvc2012: LIBS += -L../distrib -lcommon -lopengl32 -lGLU32
+ win32-msvc2015: LIBS += -L../distrib -lcommon -lopengl32 -lGLU32
+ win32-g++: LIBS += -L../distrib -lcommon
+-linux-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon -lGLU
+ linux-g++:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+-linux-g++-32: LIBS += -L../distrib -lcommon
++linux-g++-32: LIBS += -L../distrib -lcommon -lGLU
+ linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+-linux-g++-64: LIBS += -L../distrib -lcommon
++linux-g++-64: LIBS += -L../distrib -lcommon -lGLU
+ linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
diff --git a/mpir.patch b/mpir.patch
new file mode 100644
index 000000000000..dab2c375bc22
--- /dev/null
+++ b/mpir.patch
@@ -0,0 +1,13 @@
+diff -Naur meshlab.orig/src/meshlabplugins/filter_csg/filter_csg.pro meshlab/src/meshlabplugins/filter_csg/filter_csg.pro
+--- meshlab.orig/src/meshlabplugins/filter_csg/filter_csg.pro 2016-10-31 01:44:11.031564544 +0100
++++ meshlab/src/meshlabplugins/filter_csg/filter_csg.pro 2016-10-31 01:45:21.254082268 +0100
+@@ -20,5 +20,7 @@
+ win32-msvc2010:LIBS += ../../external/lib/win32-msvc2008/mpirxx.lib ../../external/lib/win32-msvc2008/mpir.lib
+ win32-msvc2012:LIBS += ../../external/lib/win32-msvc2008/mpirxx.lib ../../external/lib/win32-msvc2008/mpir.lib
+ win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/mpirxx.lib ../../external/lib/win32-msvc2015/mpir.lib
+-linux-g++-64:INCLUDEPATH += ../../external/inc/linux-g++-64/mpir-2.4.0
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libmpirxx.a ../../external/lib/linux-g++-64/libmpir.a
++unix:LIBS += -lmpirxx -lmpir
++linux-g++-:LIBS += -lmpirxx -lmpir
++linux-g++-32:LIBS += -lmpirxx -lmpir
++linux-g++-64:LIBS += -lmpirxx -lmpir
diff --git a/muparser.patch b/muparser.patch
new file mode 100644
index 000000000000..d500a17d767f
--- /dev/null
+++ b/muparser.patch
@@ -0,0 +1,14 @@
+diff -Naur ../meshlab/src/meshlabplugins/filter_func/filter_func.pro meshlab/src/meshlabplugins/filter_func/filter_func.pro
+--- ../meshlab/src/meshlabplugins/filter_func/filter_func.pro 2016-10-31 00:00:30.459336619 +0100
++++ meshlab/src/meshlabplugins/filter_func/filter_func.pro 2016-10-31 21:42:47.134972919 +0100
+@@ -19,7 +19,7 @@
+ win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/muparser.lib
+
+ macx:LIBS += $$MACLIBDIR/libmuparser.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libmuparser.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libmuparser.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libmuparser.a
++linux-g++:LIBS += -lmuparser
++linux-g++-32:LIBS += -lmuparser
++linux-g++-64:LIBS += -lmuparser
+ win32-g++:LIBS += ../../external/lib/win32-gcc/libmuparser.a
diff --git a/rpath.patch b/rpath.patch
new file mode 100644
index 000000000000..30ce31dc1482
--- /dev/null
+++ b/rpath.patch
@@ -0,0 +1,36 @@
+diff -Nur meshlab.orig/src/meshlab/meshlab.pro meshlab/src/meshlab/meshlab.pro
+--- meshlab.orig/src/meshlab/meshlab.pro 2012-05-31 00:32:44.000000000 +1000
++++ meshlab/src/meshlab/meshlab.pro 2012-08-06 21:26:01.405784190 +1000
+@@ -130,11 +130,11 @@
+ #}
+
+ linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -ljhead -L../distrib -lcommon -lGLU
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -ljhead -L../distrib -lcommon -lGLU
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+
+ # uncomment in your local copy only in emergency cases.
+ # We should never be too permissive
+diff -Nur meshlab.orig/src/meshlabserver/meshlabserver.pro meshlab/src/meshlabserver/meshlabserver.pro
+--- meshlab.orig/src/meshlabserver/meshlabserver.pro 2011-10-15 03:34:48.000000000 +1100
++++ meshlab/src/meshlabserver/meshlabserver.pro 2012-08-06 21:26:34.609557938 +1000
+@@ -26,11 +26,11 @@
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
+ linux-g++: LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-32: LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-64: LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon