summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>2017-11-25 12:02:10 +0330
committerAmy Liffey <amynka@gentoo.org>2017-11-25 11:25:53 +0100
commit50087cd3c5c379d2948644e13c9bd48554270f69 (patch)
tree7ed14311d06e54a182ee58be0e819bbbea7f68e3 /media-gfx
parentsys-apps/pkgcore: update snakeoil dep and add pyblake2 for live ebuild (diff)
downloadgentoo-50087cd3c5c379d2948644e13c9bd48554270f69.tar.gz
gentoo-50087cd3c5c379d2948644e13c9bd48554270f69.tar.bz2
gentoo-50087cd3c5c379d2948644e13c9bd48554270f69.zip
media-gfx/meshlab: version bump to 2016.12
- Bump to 2016.12 - Patches readded external: muParser, bzip ( Amynka ) - Add ~x86 keyword ( Amynka ) Closes: #6291 Closes: https://bugs.gentoo.org/607228
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/meshlab/Manifest2
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-compile-server.patch22
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-depend-on-system-glew.patch72
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-disable-edit-quality.patch25
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-disable-filter-layer.patch25
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-disable-filter-ssynth.patch25
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-remove-not-sane-plugins.patch25
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-set-shader-and-texture-paths.patch164
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-update-1.3.3-pluginmanager.patch.patch29
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-bzip.patch51
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-glew.patch95
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-jhead.patch56
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-lib3ds.patch48
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-muParser.patch37
-rw-r--r--media-gfx/meshlab/files/2016.12/0001-use-external-openctm.patch43
-rw-r--r--media-gfx/meshlab/files/2016.12/remove-edit_mutualcorrs.patch10
-rw-r--r--media-gfx/meshlab/files/2016.12/remove-io_TXT.patch10
-rw-r--r--media-gfx/meshlab/meshlab-2016.12.ebuild101
18 files changed, 840 insertions, 0 deletions
diff --git a/media-gfx/meshlab/Manifest b/media-gfx/meshlab/Manifest
index 8bed7d39099..621bcabd578 100644
--- a/media-gfx/meshlab/Manifest
+++ b/media-gfx/meshlab/Manifest
@@ -1,2 +1,4 @@
DIST MeshLabSrc_AllInc_v132.tgz 12874196 SHA256 d57f0a99a55421aac54a66e2475d48f00f7b1752f9587cd69cf9b5b9c1a519b1 SHA512 40ef1f887d18e2146d6001d9c290bb76f6fc27caf13a1256a4061d5e2c43fd8dfdc843ace2cb83c6370648c2c5be3a22e2d5b31698df46e0695890d6a20651ac WHIRLPOOL aa6da94a8d5b9d28c9b787fe307774b7223e57278ed45c3bf1a823da9f5a9b59fd058a466f3f4dea3c4c57e3934b0aed88b1446f20e746349881c1bc965fec36
DIST MeshLabSrc_AllInc_v133.tgz 13390531 SHA256 c9829cd1f58713f1f82d546af1ee69291b52a0f94585f803174fb9e55654980f SHA512 ec155292be10ebe17a7d41b26d51cce88e1f00b692b8adb29462a2c3cb15444c6f27067a3396e4427cd694c82424910ba80f32f536b5f5d46d6765b2461cef43 WHIRLPOOL f1f938e7eb8d648f2a8ac4399420d947efe403f19cc163b4a4e28f8cf620ae5aa22d17503e3b5ca7920996e78dfbb41dbd89447d61bd95e4a2f69420f2196d5d
+DIST meshlab-2016.12.tar.gz 94194402 BLAKE2B 53dda75b51198d529d35ae64e1b9d8ec240ec6031835e6cde2ff1ad21403086112a6f4b9acf5c6f53328787078b3e1a90cc177f5e009834b310cdf6b168c59b0 SHA512 68bf863fc390725a949578b545bc749bbe2c07ca75d1461772c7777fd6a4b095f11b64b5b0e8b729f83fea1bb9e3ca4b41123cdea3799a8eee0de587eb7bf1d8
+DIST vcglib-1.0.1.tar.gz 9063634 BLAKE2B 91fba7ebf1ac18d0dfb33d3e26656e546b7c35ae753777730c44ebdf327413dfe94dd5e84907eb7e1644d70bfdf7d00ae8ecd0a81587d790a31354f7db09d626 SHA512 55d1854054744abae2d41e7b5041df89253bae108df5fc1cfe777013de7192dce04bc474475cb11a1d0343ebcab1ea61b381d9d9c36c452528043e85e75bc211
diff --git a/media-gfx/meshlab/files/2016.12/0001-compile-server.patch b/media-gfx/meshlab/files/2016.12/0001-compile-server.patch
new file mode 100644
index 00000000000..6e2e31af9bd
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-compile-server.patch
@@ -0,0 +1,22 @@
+From 188c3465b9cc5be7c72b21e012a89b9d07e6e2c4 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <mohammadpour.sobhan@gmail.com>
+Date: Mon, 20 Nov 2017 14:40:02 +0330
+Subject: [PATCH] compile server
+
+---
+ meshlab_mini.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab_mini.pro b/meshlab_mini.pro
+index abe0259..b18771e 100644
+--- a/meshlab_mini.pro
++++ b/meshlab_mini.pro
+@@ -34,4 +34,4 @@ SUBDIRS = common \
+ # meshlabplugins/filter_unsharp \
+ # meshlabplugins/io_collada \
+ # meshlabplugins/io_x3d \
+-# meshlabserver
++ meshlabserver
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-depend-on-system-glew.patch b/media-gfx/meshlab/files/2016.12/0001-depend-on-system-glew.patch
new file mode 100644
index 00000000000..d8c5bb1f5aa
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-depend-on-system-glew.patch
@@ -0,0 +1,72 @@
+From 58a86b4c48ef89faa5d4d16c502d5350fb1c5df3 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 00:57:42 +0330
+Subject: [PATCH] depend-on-system-glew
+
+---
+ common/common.pro | 7 +------
+ meshlab/meshlab.pro | 2 --
+ 2 files changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/common/common.pro b/common/common.pro
+index 51cdcb5..85849dc 100644
+--- a/common/common.pro
++++ b/common/common.pro
+@@ -1,7 +1,6 @@
+ include (../general.pri)
+ EXIF_DIR = ../external/jhead-2.95
+
+-GLEWCODE = $$GLEWDIR/src/glew.c
+
+ win32-msvc2005:DESTDIR = ../distrib
+ win32-msvc2008:DESTDIR = ../distrib
+@@ -53,9 +52,7 @@ ln -s ../../../meshlab/src/distrib/shaders ../distrib/shaders ;\
+ echo "linked shader dir"; \
+ fi;\
+ "
+-INCLUDEPATH *= ../.. \
+- $$VCGDIR \
+- $$GLEWDIR/include
++
+ TEMPLATE = lib
+ linux-g++:CONFIG += dll
+ linux-g++:DESTDIR = ../distrib
+@@ -80,7 +77,6 @@ QT += script
+ TARGET = common
+ DEPENDPATH += .
+ INCLUDEPATH += . $$EXIF_DIR
+-DEFINES += GLEW_STATIC
+ win32-msvc2005:DEFINES += _CRT_SECURE_NO_WARNINGS
+ win32-msvc2008:DEFINES += _CRT_SECURE_NO_WARNINGS
+ win32-msvc2010:DEFINES += _CRT_SECURE_NO_WARNINGS
+@@ -117,7 +113,6 @@ SOURCES += filterparameter.cpp \
+ mlapplication.cpp \
+ scriptsyntax.cpp \
+ searcher.cpp \
+- $$GLEWCODE \
+ meshlabdocumentxml.cpp \
+ meshlabdocumentbundler.cpp \
+ ml_shared_data_context.cpp
+diff --git a/meshlab/meshlab.pro b/meshlab/meshlab.pro
+index 0e50581..37d44ba 100644
+--- a/meshlab/meshlab.pro
++++ b/meshlab/meshlab.pro
+@@ -9,7 +9,6 @@ INCLUDEPATH *= . \
+ .. \
+ ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include \
+ $$EXIF_DIR
+ DEPENDPATH += $$VCGDIR \
+ $$VCGDIR/vcg \
+@@ -64,7 +63,6 @@ SOURCES = main.cpp \
+ $$VCGDIR/wrap/gui/trackball.cpp \
+ $$VCGDIR/wrap/gui/trackmode.cpp \
+ $$VCGDIR/wrap/gui/coordinateframe.cpp \
+- #$$GLEWDIR/src/glew.c \
+ glarea_setting.cpp \
+ filterthread.cpp
+
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-disable-edit-quality.patch b/media-gfx/meshlab/files/2016.12/0001-disable-edit-quality.patch
new file mode 100644
index 00000000000..ed58bc0cb97
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-disable-edit-quality.patch
@@ -0,0 +1,25 @@
+From 59588b3198e0ca6cd97265a65ea87b40897d3bd9 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 00:41:15 +0330
+Subject: [PATCH] disable-edit-quality
+
+---
+ meshlab_full.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab_full.pro b/meshlab_full.pro
+index 143e226..9939225 100644
+--- a/meshlab_full.pro
++++ b/meshlab_full.pro
+@@ -69,7 +69,7 @@ SUBDIRS = common \
+ meshlabplugins/edit_pickpoints \
+ meshlabplugins/edit_point\
+ plugins_experimental/edit_referencing \
+- meshlabplugins/edit_quality \
++# meshlabplugins/edit_quality \
+ meshlabplugins/edit_select \
+ # Sample Plugins
+ sampleplugins/sampleedit \
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-disable-filter-layer.patch b/media-gfx/meshlab/files/2016.12/0001-disable-filter-layer.patch
new file mode 100644
index 00000000000..407d7775f9f
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-disable-filter-layer.patch
@@ -0,0 +1,25 @@
+From 90862a887b923984e17343447c30251f2d6fc541 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 12:37:14 +0330
+Subject: [PATCH] disable filter layer
+
+---
+ meshlab_full.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab_full.pro b/meshlab_full.pro
+index 9939225..1691d31 100644
+--- a/meshlab_full.pro
++++ b/meshlab_full.pro
+@@ -34,7 +34,7 @@ SUBDIRS = common \
+ sampleplugins/filter_geodesic \
+ meshlabplugins/filter_img_patch_param \
+ meshlabplugins/filter_isoparametrization \
+- meshlabplugins/filter_layer \
++# meshlabplugins/filter_layer \
+ meshlabplugins/filter_measure \
+ meshlabplugins/filter_meshing \
+ plugins_experimental/filter_mutualglobal \
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-disable-filter-ssynth.patch b/media-gfx/meshlab/files/2016.12/0001-disable-filter-ssynth.patch
new file mode 100644
index 00000000000..c5f84998a62
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-disable-filter-ssynth.patch
@@ -0,0 +1,25 @@
+From 22f946dece8e56683a197204ac05292045a3dda1 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Wed, 22 Nov 2017 23:20:57 +0330
+Subject: [PATCH] disable-filter-ssynth
+
+---
+ meshlab_full.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab_full.pro b/meshlab_full.pro
+index 4a256a1..143e226 100644
+--- a/meshlab_full.pro
++++ b/meshlab_full.pro
+@@ -49,7 +49,7 @@ SUBDIRS = common \
+ meshlabplugins/filter_sdfgpu \
+ meshlabplugins/filter_select \
+ plugins_experimental/filter_sketchfab \
+- meshlabplugins/filter_ssynth \
++# meshlabplugins/filter_ssynth \
+ meshlabplugins/filter_texture \
+ meshlabplugins/filter_trioptimize \
+ meshlabplugins/filter_unsharp \
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-remove-not-sane-plugins.patch b/media-gfx/meshlab/files/2016.12/0001-remove-not-sane-plugins.patch
new file mode 100644
index 00000000000..320912c40ed
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-remove-not-sane-plugins.patch
@@ -0,0 +1,25 @@
+From 0358aad037efc55701622884bf0ed1249a08387f Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 02:23:03 +0330
+Subject: [PATCH] remove not sane plugins
+
+---
+ meshlab_full.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab_full.pro b/meshlab_full.pro
+index 9939225..b8a6bce 100644
+--- a/meshlab_full.pro
++++ b/meshlab_full.pro
+@@ -27,7 +27,7 @@ SUBDIRS = common \
+ meshlabplugins/filter_color_projection \
+ meshlabplugins/filter_create \
+ sampleplugins/filter_createiso \
+- meshlabplugins/filter_csg \
++# meshlabplugins/filter_csg \
+ meshlabplugins/filter_dirt \
+ meshlabplugins/filter_fractal \
+ meshlabplugins/filter_func \
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-set-shader-and-texture-paths.patch b/media-gfx/meshlab/files/2016.12/0001-set-shader-and-texture-paths.patch
new file mode 100644
index 00000000000..a1a4f3f860a
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-set-shader-and-texture-paths.patch
@@ -0,0 +1,164 @@
+From 4780d519177021364427b44567fd9a67879435aa Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Fri, 24 Nov 2017 18:20:11 +0330
+Subject: [PATCH] set shader and texture paths
+
+---
+ meshlabplugins/render_gdp/meshrender.cpp | 6 +++++-
+ meshlabplugins/render_gdp/shaderDialog.cpp | 6 +++++-
+ plugins_experimental/render_splatpyramid/dialog.cpp | 7 +++++--
+ plugins_experimental/render_splatpyramid/splat_pyramid.cc | 6 +++++-
+ plugins_unsupported/render_rm/glstateholder.cpp | 12 ++++++++++--
+ plugins_unsupported/render_rm/rmmeshrender.cpp | 6 +++++-
+ plugins_unsupported/render_rm/rmshaderdialog.cpp | 10 +++++++++-
+ 7 files changed, 44 insertions(+), 9 deletions(-)
+
+diff --git a/meshlabplugins/render_gdp/meshrender.cpp b/meshlabplugins/render_gdp/meshrender.cpp
+index 5841ce6..28e66b3 100644
+--- a/meshlabplugins/render_gdp/meshrender.cpp
++++ b/meshlabplugins/render_gdp/meshrender.cpp
+@@ -38,7 +38,11 @@ void MeshShaderRenderPlugin::initActionList() {
+ qaNone->setCheckable(false);
+ actionList << qaNone;*/
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir shadersDir("/usr/share/meshlab");
++#else
++ QDir shadersDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins")
+ shadersDir.cdUp();
+diff --git a/meshlabplugins/render_gdp/shaderDialog.cpp b/meshlabplugins/render_gdp/shaderDialog.cpp
+index 1315757..168c0f8 100644
+--- a/meshlabplugins/render_gdp/shaderDialog.cpp
++++ b/meshlabplugins/render_gdp/shaderDialog.cpp
+@@ -317,7 +317,11 @@ void ShaderDialog::changeTexturePath(int i) {
+ void ShaderDialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir shadersDir("/usr/share/meshlab");
++#else
++ QDir shadersDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/plugins_experimental/render_splatpyramid/dialog.cpp b/plugins_experimental/render_splatpyramid/dialog.cpp
+index 589ba48..11cf3fe 100644
+--- a/plugins_experimental/render_splatpyramid/dialog.cpp
++++ b/plugins_experimental/render_splatpyramid/dialog.cpp
+@@ -122,8 +122,11 @@ void Dialog::changeTexturePath(int i) {
+
+ void Dialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+-
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir shadersDir("/usr/share/meshlab");
++#else
++ QDir shadersDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/plugins_experimental/render_splatpyramid/splat_pyramid.cc b/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+index a4915d1..75074a6 100644
+--- a/plugins_experimental/render_splatpyramid/splat_pyramid.cc
++++ b/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+@@ -85,7 +85,11 @@ void PyramidPointRendererPlugin::Init(QAction *, MeshDocument &md, RenderMode &,
+ objects[i].setRendererType( render_mode );
+
+ /// Sets the path to the meshlab's shaders directory
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir shadersDir("/usr/share/meshlab");
++#else
++ QDir shadersDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins" )
+ shadersDir.cdUp();
+diff --git a/plugins_unsupported/render_rm/glstateholder.cpp b/plugins_unsupported/render_rm/glstateholder.cpp
+index fa7cdd9..544c6b3 100644
+--- a/plugins_unsupported/render_rm/glstateholder.cpp
++++ b/plugins_unsupported/render_rm/glstateholder.cpp
+@@ -75,8 +75,12 @@ UniformValue::UniformValue(UniformVar &v)
+
+ // if it's a texture, try to load it from the standard path
+ if (!textureFilename.isEmpty()) {
++#if defined(Q_OS_LINUX)
++ QDir textureDir("/usr/share/meshlab");
++#else
+ QDir textureDir = QDir(qApp->applicationDirPath());
+-
++#endif
++
+ #if defined(Q_OS_WIN)
+ if (textureDir.dirName() == "debug" ||
+ textureDir.dirName() == "release" ||
+@@ -158,7 +162,11 @@ void UniformValue::updateUniformVariableValuesFromDialog(int rowIdx, int colIdx,
+ // * choose the filename with a dialog (55 by convention)
+ if (rowIdx == 5 && colIdx == 5) {
+ QFileDialog fd(0, "Choose new texture");
+- QDir texturesDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir textureDir("/usr/share/meshlab");
++#else
++ QDir textureDir = QDir(qApp->applicationDirPath());
++#endif
+
+ #if defined(Q_OS_WIN)
+ if (texturesDir.dirName() == "debug" ||
+diff --git a/plugins_unsupported/render_rm/rmmeshrender.cpp b/plugins_unsupported/render_rm/rmmeshrender.cpp
+index 9e516d2..f367842 100644
+--- a/plugins_unsupported/render_rm/rmmeshrender.cpp
++++ b/plugins_unsupported/render_rm/rmmeshrender.cpp
+@@ -63,7 +63,11 @@ QList<QAction*> RmMeshShaderRenderPlugin::actions()
+
+ void RmMeshShaderRenderPlugin::initActionList() {
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir shadersDir("/usr/share/meshlab/shaders");
++#else
++ QDir shadersDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" ||
+ shadersDir.dirName() == "release" ||
+diff --git a/plugins_unsupported/render_rm/rmshaderdialog.cpp b/plugins_unsupported/render_rm/rmshaderdialog.cpp
+index 1f6c02b..6c8af80 100644
+--- a/plugins_unsupported/render_rm/rmshaderdialog.cpp
++++ b/plugins_unsupported/render_rm/rmshaderdialog.cpp
+@@ -332,7 +332,11 @@ void RmShaderDialog::fillTabsWithPass(int index)
+
+ QFileInfo finfo(v.textureFilename);
+
++ #if defined(Q_OS_LINUX)
++ QDir textureDir("/usr/share/meshlab");
++ #else
+ QDir textureDir = QDir(qApp->applicationDirPath());
++ #endif
+ #if defined(Q_OS_WIN)
+ if (textureDir.dirName() == "debug" || textureDir.dirName() == "release" || textureDir.dirName() == "plugins" ) textureDir.cdUp();
+ #elif defined(Q_OS_MAC)
+@@ -444,7 +448,11 @@ void RmShaderDialog::valuesChanged(const QString & varNameAndIndex )
+ // choose the filename with a dialog
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir texturesDir = QDir(qApp->applicationDirPath());
++#if defined(Q_OS_LINUX)
++ QDir textureDir("/usr/share/meshlab");
++#else
++ QDir textureDir = QDir(qApp->applicationDirPath());
++#endif
+ #if defined(Q_OS_WIN)
+ if (texturesDir.dirName() == "debug" || texturesDir.dirName() == "release") texturesDir.cdUp();
+ #elif defined(Q_OS_MAC)
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-update-1.3.3-pluginmanager.patch.patch b/media-gfx/meshlab/files/2016.12/0001-update-1.3.3-pluginmanager.patch.patch
new file mode 100644
index 00000000000..9f6d7487817
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-update-1.3.3-pluginmanager.patch.patch
@@ -0,0 +1,29 @@
+From 6310a419f2a0e0f11f59a60fee850a1b64c2f41e Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Fri, 24 Nov 2017 17:47:43 +0330
+Subject: [PATCH] update 1.3.3/pluginmanager.patch
+
+---
+ common/pluginmanager.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/common/pluginmanager.cpp b/common/pluginmanager.cpp
+index 5354055..551e73f 100644
+--- a/common/pluginmanager.cpp
++++ b/common/pluginmanager.cpp
+@@ -189,8 +189,11 @@ QString PluginManager::osDependentFileBaseName(const QString &plname)
+
+ QString PluginManager::getBaseDirPath()
+ {
++ #if defined(Q_OS_LINUX)
++ QDir baseDir("/usr/lib/meshlab");
++ #else
+ QDir baseDir(qApp->applicationDirPath());
+-
++ #endif
+ #if defined(Q_OS_WIN)
+ // Windows:
+ // during development with visual studio binary could be in the debug/release subdir.
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-bzip.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-bzip.patch
new file mode 100644
index 00000000000..e01d5ebae85
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-bzip.patch
@@ -0,0 +1,51 @@
+From 731519b5573ab503b78f2c892e2d5c4bcabef1ea Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Wed, 22 Nov 2017 23:33:11 +0330
+Subject: [PATCH] use-external-bzip
+
+---
+ meshlabplugins/edit_arc3D/edit_arc3D.pro | 31 -------------------------------
+ 1 file changed, 31 deletions(-)
+
+diff --git a/meshlabplugins/edit_arc3D/edit_arc3D.pro b/meshlabplugins/edit_arc3D/edit_arc3D.pro
+index 08b5860..75db42c 100644
+--- a/meshlabplugins/edit_arc3D/edit_arc3D.pro
++++ b/meshlabplugins/edit_arc3D/edit_arc3D.pro
+@@ -28,34 +28,3 @@ SOURCES += edit_arc3D.cpp \
+ TARGET = edit_arc3D
+ RESOURCES = edit_arc3D.qrc
+
+-win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/bz2.lib
+-win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/bz2.lib
+-win32-msvc2010:LIBS += ../../external/lib/win32-msvc2010/bz2.lib
+-win32-msvc2012:LIBS += ../../external/lib/win32-msvc2012/bz2.lib
+-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
+-mac:LIBS += -lbz2
+-
+-win32-msvc2005:INCLUDEPATH += ../../external/bzip2-1.0.5
+-win32-msvc2008:INCLUDEPATH += ../../external/bzip2-1.0.5
+-win32-msvc2010:INCLUDEPATH += ../../external/bzip2-1.0.5
+-win32-msvc2012:INCLUDEPATH += ../../external/bzip2-1.0.5
+-win32-msvc2013:INCLUDEPATH += ../../external/bzip2-1.0.5
+-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) {
+- win32-g++:release:QMAKE_CXXFLAGS -= -O2
+- win32-g++:release:QMAKE_CFLAGS -= -O2
+- win32-g++:release:QMAKE_CXXFLAGS += -O3 -mtune=pentium3 -ffast-math
+-}
+-
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-glew.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-glew.patch
new file mode 100644
index 00000000000..58d76049992
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-glew.patch
@@ -0,0 +1,95 @@
+From 3b698bccccaeeee03c4bf454971b9c4bc00f2450 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 01:22:19 +0330
+Subject: [PATCH] use-external-glew
+
+---
+ common/common.pro | 7 ++++---
+ meshlab/meshlab.pro | 8 ++++----
+ meshlabserver/meshlabserver.pro | 8 ++++----
+ 3 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/common/common.pro b/common/common.pro
+index 8bdf6a5..0edc245 100644
+--- a/common/common.pro
++++ b/common/common.pro
+@@ -1,7 +1,7 @@
+ include (../general.pri)
+ #EXIF_DIR = ../external/jhead-2.95
+
+-GLEWCODE = $$GLEWDIR/src/glew.c
++#GLEWCODE = $$GLEWDIR/src/glew.c
+
+ win32-msvc2005:DESTDIR = ../distrib
+ win32-msvc2008:DESTDIR = ../distrib
+@@ -55,7 +55,8 @@ fi;\
+ "
+ INCLUDEPATH *= ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include
++# $$GLEWDIR/include
++
+ TEMPLATE = lib
+ linux-g++:CONFIG += dll
+ linux-g++:DESTDIR = ../distrib
+@@ -80,7 +81,7 @@ QT += script
+ TARGET = common
+ DEPENDPATH += .
+ #INCLUDEPATH += . $$EXIF_DIR
+-DEFINES += GLEW_STATIC
++#DEFINES += GLEW_STATIC
+ win32-msvc2005:DEFINES += _CRT_SECURE_NO_WARNINGS
+ win32-msvc2008:DEFINES += _CRT_SECURE_NO_WARNINGS
+ win32-msvc2010:DEFINES += _CRT_SECURE_NO_WARNINGS
+diff --git a/meshlab/meshlab.pro b/meshlab/meshlab.pro
+index 5456342..9d45834 100644
+--- a/meshlab/meshlab.pro
++++ b/meshlab/meshlab.pro
+@@ -9,7 +9,7 @@ INCLUDEPATH *= . \
+ .. \
+ ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include \
++# $$GLEWDIR/include \
+ # $$EXIF_DIR
+
+ DEPENDPATH += $$VCGDIR \
+@@ -151,11 +151,11 @@ win32-g++:LIBS += -L../external/lib/win32-gcc -ljhead -L../distrib -lcom
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
+-linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
++linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU -lGLEW
+ linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -ljhead -L../distrib -lcommon -lGLU
++linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -ljhead -L../distrib -lcommon -lGLU -lGLEW
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -ljhead -L../distrib -lcommon -lGLU
++linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -ljhead -L../distrib -lcommon -lGLU -lGLEW
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+
+ # uncomment in your local copy only in emergency cases.
+diff --git a/meshlabserver/meshlabserver.pro b/meshlabserver/meshlabserver.pro
+index c9f5d0e..2b96033 100644
+--- a/meshlabserver/meshlabserver.pro
++++ b/meshlabserver/meshlabserver.pro
+@@ -28,12 +28,12 @@ win32-msvc2008: LIBS += -L../distrib -lcommon -lopengl32 -lGLU32
+ win32-msvc2010: LIBS += -L../distrib -lcommon -lopengl32 -lGLU32
+ 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
++win32-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32: LIBS += -L../distrib -lcommon
++linux-g++-32: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64: LIBS += -L../distrib -lcommon
++linux-g++-64: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-jhead.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-jhead.patch
new file mode 100644
index 00000000000..002c2dc3bdf
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-jhead.patch
@@ -0,0 +1,56 @@
+From 68d92b2de5d598d4d85e2cdbddec5219ba317796 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Thu, 23 Nov 2017 01:21:10 +0330
+Subject: [PATCH] use-external-jhead
+
+---
+ common/common.pro | 4 ++--
+ meshlab/meshlab.pro | 5 +++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/common/common.pro b/common/common.pro
+index 51cdcb5..8bdf6a5 100644
+--- a/common/common.pro
++++ b/common/common.pro
+@@ -1,5 +1,5 @@
+ include (../general.pri)
+-EXIF_DIR = ../external/jhead-2.95
++#EXIF_DIR = ../external/jhead-2.95
+
+ GLEWCODE = $$GLEWDIR/src/glew.c
+
+@@ -79,7 +79,7 @@ QT += script
+
+ TARGET = common
+ DEPENDPATH += .
+-INCLUDEPATH += . $$EXIF_DIR
++#INCLUDEPATH += . $$EXIF_DIR
+ DEFINES += GLEW_STATIC
+ win32-msvc2005:DEFINES += _CRT_SECURE_NO_WARNINGS
+ win32-msvc2008:DEFINES += _CRT_SECURE_NO_WARNINGS
+diff --git a/meshlab/meshlab.pro b/meshlab/meshlab.pro
+index 0e50581..5456342 100644
+--- a/meshlab/meshlab.pro
++++ b/meshlab/meshlab.pro
+@@ -1,7 +1,7 @@
+ include (../general.pri)
+ #CONFIG += debug_and_release
+ DESTDIR = ../distrib
+-EXIF_DIR = ../external/jhead-2.95
++#EXIF_DIR = ../external/jhead-2.95
+
+ DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
+
+@@ -10,7 +10,8 @@ INCLUDEPATH *= . \
+ ../.. \
+ $$VCGDIR \
+ $$GLEWDIR/include \
+- $$EXIF_DIR
++# $$EXIF_DIR
++
+ DEPENDPATH += $$VCGDIR \
+ $$VCGDIR/vcg \
+ $$VCGDIR/wrap
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-lib3ds.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-lib3ds.patch
new file mode 100644
index 00000000000..acbd8f4b5fe
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-lib3ds.patch
@@ -0,0 +1,48 @@
+From 911bc805f89c464540fdce4c16e15f64476cf161 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Wed, 22 Nov 2017 19:25:35 +0330
+Subject: [PATCH] use-external-lib3ds
+
+---
+ meshlabplugins/io_3ds/io_3ds.pro | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/meshlabplugins/io_3ds/io_3ds.pro b/meshlabplugins/io_3ds/io_3ds.pro
+index 601f5da..5a19589 100644
+--- a/meshlabplugins/io_3ds/io_3ds.pro
++++ b/meshlabplugins/io_3ds/io_3ds.pro
+@@ -9,31 +9,7 @@ HEADERS = meshio.h \
+ io_3ds.h
+
+ SOURCES += meshio.cpp \
+-
+-DEFINES += LIB3DS_STATIC
+
+ TARGET = io_3ds
+
+-INCLUDEPATH += ../../external/lib3ds-1.3.0/
+-
+-# Notes on the paths of lib3ds files.
+-# Once you have compiled the library put the lib files in a dir named lib/XXX/
+-# where XXX is the name of your system according to the QT naming style.
+-# Linux users can rely on their own package managers and hope that it is installing the last version of lib3ds
+-
+-win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/3ds.lib
+-win32-msvc.net:LIBS += ../../external/lib/win32-msvc.net/3ds.lib
+-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
+-
+-# unix:LIBS += -L../../../../code/lib/lib3ds-1.3.0/lib3ds/lib/unix -l3ds
+-
+-# mac:LIBS -= -l3ds
+-# mac:LIBS += ../../../../code/lib/lib3ds-1.3.0/lib/mac/lib3ds.a
+-
+-macx:LIBS += $$MACLIBDIR/lib3ds.a
+
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-muParser.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-muParser.patch
new file mode 100644
index 00000000000..f107d5bc69e
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-muParser.patch
@@ -0,0 +1,37 @@
+From 0928f85bc8fb8215a98c5a115d85269f51f65b5e Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Wed, 22 Nov 2017 22:49:16 +0330
+Subject: [PATCH] use-external-muParser
+
+---
+ meshlabplugins/filter_func/filter_func.pro | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/meshlabplugins/filter_func/filter_func.pro b/meshlabplugins/filter_func/filter_func.pro
+index a7cc17a..23d5578 100644
+--- a/meshlabplugins/filter_func/filter_func.pro
++++ b/meshlabplugins/filter_func/filter_func.pro
+@@ -6,20 +6,3 @@ SOURCES += filter_func.cpp
+
+ TARGET = filter_func
+
+-INCLUDEPATH += ../../external/muparser_v225/include
+-
+-# Note: we need static libs so when building muparser lib use
+-# ./configure --enable-shared=no
+-
+-win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/muparser.lib
+-win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/muparser.lib
+-win32-msvc2010:LIBS += ../../external/lib/win32-msvc2010/muparser.lib
+-win32-msvc2012:LIBS += ../../external/lib/win32-msvc2012/muparser.lib
+-win32-msvc2013:LIBS += ../../external/lib/win32-msvc2013/muparser.lib
+-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
+-win32-g++:LIBS += ../../external/lib/win32-gcc/libmuparser.a
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/0001-use-external-openctm.patch b/media-gfx/meshlab/files/2016.12/0001-use-external-openctm.patch
new file mode 100644
index 00000000000..7c48aa14a74
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/0001-use-external-openctm.patch
@@ -0,0 +1,43 @@
+From 7af5fa63c7577d4da060a2a8442b2f453023be86 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <www.sobhan.mohammadpour@gmail.com>
+Date: Wed, 22 Nov 2017 22:41:39 +0330
+Subject: [PATCH] use-external-openctm
+
+---
+ meshlabplugins/io_ctm/io_ctm.pro | 20 --------------------
+ 1 file changed, 20 deletions(-)
+
+diff --git a/meshlabplugins/io_ctm/io_ctm.pro b/meshlabplugins/io_ctm/io_ctm.pro
+index 479b64e..434e6ad 100644
+--- a/meshlabplugins/io_ctm/io_ctm.pro
++++ b/meshlabplugins/io_ctm/io_ctm.pro
+@@ -3,26 +3,6 @@ HEADERS += io_ctm.h \
+ $$VCGDIR/wrap/io_trimesh/import_ctm.h \
+ $$VCGDIR/wrap/io_trimesh/export_ctm.h
+ SOURCES += io_ctm.cpp
+-INCLUDEPATH += ../../external/OpenCTM-1.0.3/lib
+ TARGET = io_ctm
+
+-win32-msvc.net:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-msvc2005:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-msvc2008:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-msvc2010:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-msvc2012:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-msvc2015:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+-win32-g++:DEFINES += OPENCTM_STATIC
+
+-win32-msvc.net:LIBS += ../../external/lib/win32-msvc.net/openctm.lib
+-win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/openctm.lib
+-win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/openctm.lib
+-win32-msvc2010:LIBS += ../../external/lib/win32-msvc2010/openctm.lib
+-win32-msvc2012:LIBS += ../../external/lib/win32-msvc2012/openctm.lib
+-win32-msvc2015:LIBS += ../../external/lib/win32-msvc2015/openctm.lib
+-win32-g++:LIBS += ../../external/lib/win32-gcc/libopenctm.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libopenctm.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libopenctm.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libopenctm.a
+-#macx:LIBS += ../../external/lib/macx/libopenctm.a
+-macx:LIBS += $$MACLIBDIR/libopenctm.a
+--
+2.15.0
+
diff --git a/media-gfx/meshlab/files/2016.12/remove-edit_mutualcorrs.patch b/media-gfx/meshlab/files/2016.12/remove-edit_mutualcorrs.patch
new file mode 100644
index 00000000000..b372c7baf5e
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/remove-edit_mutualcorrs.patch
@@ -0,0 +1,10 @@
+--- a/meshlab_full.pro 2017-10-25 21:39:01.438252054 +0200
++++ b/meshlab_full.pro 2017-10-25 21:39:25.417251424 +0200
+@@ -66,7 +66,6 @@
+ meshlabplugins/edit_arc3D \
+ meshlabplugins/edit_manipulators \
+ meshlabplugins/edit_measure \
+- plugins_experimental/edit_mutualcorrs \
+ meshlabplugins/edit_paint\
+ meshlabplugins/edit_pickpoints \
+ meshlabplugins/edit_point\
diff --git a/media-gfx/meshlab/files/2016.12/remove-io_TXT.patch b/media-gfx/meshlab/files/2016.12/remove-io_TXT.patch
new file mode 100644
index 00000000000..3d0eb74429b
--- /dev/null
+++ b/media-gfx/meshlab/files/2016.12/remove-io_TXT.patch
@@ -0,0 +1,10 @@
+--- a/meshlab_full.pro 2017-10-25 21:41:57.178247439 +0200
++++ b/meshlab_full.pro 2017-10-25 21:42:11.629247060 +0200
+@@ -16,7 +16,6 @@
+ meshlabplugins/io_x3d \
+ meshlabplugins/io_expe \
+ meshlabplugins/io_pdb \
+- plugins_experimental/io_TXT \
+ # Filter plugins
+ meshlabplugins/filter_aging \
+ meshlabplugins/filter_ao \
diff --git a/media-gfx/meshlab/meshlab-2016.12.ebuild b/media-gfx/meshlab/meshlab-2016.12.ebuild
new file mode 100644
index 00000000000..dcef47388f3
--- /dev/null
+++ b/media-gfx/meshlab/meshlab-2016.12.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit qmake-utils
+
+DESCRIPTION="the open source system for processing and editing 3D triangular meshes"
+HOMEPAGE="http://www.meshlab.net"
+VCG_VERSION="1.0.1"
+SRC_URI="https://github.com/cnr-isti-vclab/meshlab/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/cnr-isti-vclab/vcglib/archive/v${VCG_VERSION}.tar.gz -> vcglib-${VCG_VERSION}.tar.gz
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="-minimal"
+DEPEND="dev-cpp/eigen:3
+ dev-cpp/muParser
+ dev-qt/qtcore:5
+ dev-qt/qtopengl:5
+ dev-qt/qtxmlpatterns:5
+ >=media-gfx/jhead-3.00-r2
+ media-libs/glew:0
+ media-libs/qhull
+ =media-libs/lib3ds-1*
+ media-libs/openctm
+ sci-libs/levmar
+ sci-libs/mpir"
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/meshlab-${PV}/src"
+
+PATCHES=(
+ "${FILESDIR}/${PV}/0001-set-shader-and-texture-paths.patch"
+ "${FILESDIR}/${PV}/0001-update-1.3.3-pluginmanager.patch.patch"
+ #remove ot working plugins
+ "${FILESDIR}/${PV}/remove-edit_mutualcorrs.patch"
+ "${FILESDIR}/${PV}/remove-io_TXT.patch"
+ #since structure synth doesn't seem to be compiling
+ "${FILESDIR}/${PV}/0001-disable-filter-ssynth.patch"
+ #this has been fixed in the tree
+ "${FILESDIR}/${PV}/0001-disable-edit-quality.patch"
+ #this causes segfaults
+ "${FILESDIR}/${PV}/0001-disable-filter-layer.patch"
+ #for when we use minimal
+ "${FILESDIR}/${PV}/0001-compile-server.patch"
+ "${FILESDIR}/${PV}/0001-use-external-lib3ds.patch"
+ "${FILESDIR}/${PV}/0001-use-external-openctm.patch"
+ "${FILESDIR}/${PV}/0001-use-external-muParser.patch"
+ "${FILESDIR}/${PV}/0001-use-external-bzip.patch"
+ "${FILESDIR}/${PV}/0001-use-external-jhead.patch"
+ "${FILESDIR}/${PV}/0001-use-external-glew.patch"
+ #cause gnu stack quickstart related qa
+ "${FILESDIR}/${PV}/0001-remove-not-sane-plugins.patch"
+ )
+
+src_prepare(){
+ mv "${WORKDIR}/vcglib-${VCG_VERSION}" "${WORKDIR}/vcglib" || die "vcglib mv failed"
+ default
+ #proof of patchset
+ #remove libs that are being used from the system
+ rm -r "external/lib3ds-1.3.0" || die "rm failed"
+ rm -r "external/OpenCTM-1.0.3" || die "rm failed"
+ rm -r "external/muparser_v132" || die "rm failed"
+ rm -r "external/muparser_v225" || die "rm failed"
+ rm -r "external/bzip2-1.0.5" || die "rm failed"
+ rm -r "external/jhead-2.95" || die "rm failed"
+ rm -r "external/glew-1.5.1" || die "rm failed"
+ rm -r "external/glew-1.7.0" || die "rm failed"
+ #we still depend on lm.h
+ #rm -r "external"
+ rm -r "distrib/plugins/U3D_W32" || die
+ rm -r "distrib/plugins/U3D_OSX" || die
+}
+
+src_configure() {
+ use minimal || eqmake5 -r meshlab_full.pro
+ use minimal && eqmake5 -r meshlab_mini.pro
+}
+
+src_install() {
+ dobin distrib/{meshlab,meshlabserver}
+ dolib distrib/libcommon.so.1.0.0
+ dosym libcommon.so.1.0.0 /usr/$(get_libdir)/libcommon.so.1
+ dosym libcommon.so.1 /usr/$(get_libdir)/libcommon.so
+ exeinto /usr/$(get_libdir)/meshlab/plugins
+ doexe distrib/plugins/*.so
+ insinto /usr/share/meshlab/shaders
+ doins -r distrib/shaders/*
+ insinto /usr/share/meshlab/plugins
+ doins -r distrib/plugins/*
+ insinto /usr/share/meshlab/textures
+ doins -r distrib/textures/*
+ insinto /usr/share/meshlab/sample
+ doins -r distrib/sample/*
+ newicon "${S}"/meshlab/images/eye512.png "${PN}".png
+ make_desktop_entry meshlab "Meshlab" "${PN}" Graphics
+}