summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2011-11-27 01:29:51 +0400
committerAlexey Shvetsov <alexxy@gentoo.org>2011-11-27 01:29:51 +0400
commitd8f9a1fb60f7507dcac4cdb07721da84ef365be4 (patch)
treecd2d8d8c0d8aff9719cbe87582b1142e1e99d95c /media-gfx
parent[media-gfx/u3d] Import from alexxy overlay (diff)
downloadbetagarden-d8f9a1fb60f7507dcac4cdb07721da84ef365be4.tar.gz
betagarden-d8f9a1fb60f7507dcac4cdb07721da84ef365be4.tar.bz2
betagarden-d8f9a1fb60f7507dcac4cdb07721da84ef365be4.zip
[media-gfx/meshlab] Import from alexxy overlay
(Portage version: 2.2.0_alpha78/git/Linux x86_64, signed Manifest commit with key F82F92E6)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/meshlab/Manifest27
-rw-r--r--media-gfx/meshlab/files/meshlab-1.2.3a-r5-use-system-libs-rpath.patch322
-rw-r--r--media-gfx/meshlab/files/meshlab-1.3.0a-unbundle-libs-and-fix-rpath.patch316
-rw-r--r--media-gfx/meshlab/meshlab-1.2.3a-r5.ebuild55
-rw-r--r--media-gfx/meshlab/meshlab-1.3.0a.ebuild61
-rw-r--r--media-gfx/meshlab/metadata.xml9
6 files changed, 790 insertions, 0 deletions
diff --git a/media-gfx/meshlab/Manifest b/media-gfx/meshlab/Manifest
new file mode 100644
index 0000000..f4c41d2
--- /dev/null
+++ b/media-gfx/meshlab/Manifest
@@ -0,0 +1,27 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX meshlab-1.2.3a-r5-use-system-libs-rpath.patch 14603 RMD160 68c32a0ef39af483d6d4a51617a883655a5ce9b7 SHA1 a95029a530ac1880c41862b36f81dc0d5a9fa1b5 SHA256 99ae7c3d91f45cca5dbfdb81045316efa397b3f3864b9d2b97866a3abaeef5a6
+AUX meshlab-1.3.0a-unbundle-libs-and-fix-rpath.patch 14382 RMD160 805216bf950b6cb29719357bb9e75a815366dac3 SHA1 7a5ee33b5b5559ea91682e9e790012cd6fa72259 SHA256 e2d5915ff511dab717dfec9bf0113d7a75ce3649b878dcf9f994133bb8dbc61a
+DIST MeshLabSrc_AllInc_v123a.tgz 11126723 RMD160 6443582eaefb2c98496914fbf1836bbebbb599da SHA1 17c5af3cd07b7c131d9e387e85337d50b7180a20 SHA256 3b515ddde7ff24a14ba32e3cbc755661cd7d58a4a2a467133d59fad001168427
+DIST MeshLabSrc_AllInc_v130a.tgz 12119277 SHA256 42404620bcb4fa8d3dc9576494343369feef4c2cc3d191f0007dbd530395ba5c SHA512 09820a83c2b2ec901aada9de601d355c7333e9da4cd3ceed6d11d45451970b77e1e69435d859316ba8bd86c54d57a3ed655e440f0e4db38dac570c6bb7d8c9a7 WHIRLPOOL 8837fcdd35f914c417eeebab62d30e464e5db8aa261a5aa84a9868dfcc3ce31082c6fbdee7da4f32ff1a1fb51a51672daf6cc3bba1c1a33feae926c50249d936
+EBUILD meshlab-1.2.3a-r5.ebuild 1454 RMD160 0400f5031fb1df20463748e26165ba4019292f4b SHA1 49a3bc8bc1f7393804bac65c29cb0eeb87948a48 SHA256 d9472a0701a1860962421f61324791daae6e6b7da51c31f9487d0b98c787a170
+EBUILD meshlab-1.3.0a.ebuild 1511 RMD160 3f04a6aa33894a2ef6b97c131d2965d6a85a2086 SHA1 90eeb8293eecd2037cd79aa4de55c7d004cdafce SHA256 af1d37786cede496bc32eee72fa9fdb14d1f51a8e98fdc634245f22dc671ffbc
+MISC metadata.xml 258 RMD160 b71551be5a0fccb34365d036b66682d5d257c534 SHA1 a03bca80b1f6debc4dac9d8dc5711add940ab89d SHA256 8ad577a344ee69d37ee89f873a8d202d02cdf2effa1b5d5a54954bc21a76cb66
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iQIcBAEBCAAGBQJO0VpPAAoJEOf+E+/4L5LmXkEP/RuznJJQMhanAKn2So4dEV+e
+4U9kDKH7L8vNEtvwiCicSo8RvgbU925pct3UPwY0NlhkO0kfSFTLl8gWadn+BT9l
+Ld6IIZbOCv/meavGOkpAp99N5Din3HJwLsXiP1x2raHnYK8OuJg+gz4AzPQCaOhJ
+OGFrYCvwYqkgUIZvQ2HC4rON3PAlByW1LrMWeCke5H6soRbW/ijO9xPxUO6OBi9w
+e7nVRAp1o28P7mRWpP4uv3YeViA2DCbFO4T63GarYPpq3zUWVtJjtbJTlma5Q8od
+XSuBIqV/kuS54QbVw1N//B8GMrs6z9BCx/x0lsEjPpuYqgHYfduCsBPRe6bJK0fk
+9kCG4N2L5dbaDm4h6h14bcjnOcSFDzVZNMGAr8p9tj1K5blA3hzEDKq1yNWN43Xs
+OuStKeMW+/ZXyPnUTITw7Zcl3j4FPF3tuyPgd8JZUB01hpwBTFllC//R/DCPCery
+MkH205M6QMGcDXj6F158vgD7hc0/1ZxUoYBolUcMIXp8dt2VG24hAjEG2dXh94Hj
+ucpfopenXtGWi/C71eO5fFFfMFcGTlnbyPppMPdW4z4jQcbE6L+x5BRtXf5tamRA
+fQnPBxFoZm1DMehldD3kG+fUE5k9Pbc+juHy2jqg733nIlBhyBGgKingCGayfB6z
+gOOKCHpnSHwv+DKcrmcF
+=ppjV
+-----END PGP SIGNATURE-----
diff --git a/media-gfx/meshlab/files/meshlab-1.2.3a-r5-use-system-libs-rpath.patch b/media-gfx/meshlab/files/meshlab-1.2.3a-r5-use-system-libs-rpath.patch
new file mode 100644
index 0000000..f96fe4b
--- /dev/null
+++ b/media-gfx/meshlab/files/meshlab-1.2.3a-r5-use-system-libs-rpath.patch
@@ -0,0 +1,322 @@
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/common/common.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/common/common.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/common/common.pro 2010-05-05 14:54:06.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/common/common.pro 2010-05-16 14:39:04.000000000 +0200
+@@ -1,6 +1,5 @@
+ VCGDIR = ../../../vcglib
+-GLEWDIR = ../external/glew-1.5.1
+-GLEWCODE = $$GLEWDIR/src/glew.c
++GLEWDIR = /usr/include/GL
+
+
+ win32-msvc2005:DESTDIR = ../distrib
+@@ -19,14 +18,14 @@
+ macx:QMAKE_POST_LINK = "cp libcommon.* ../distrib/meshlab.app/Contents/MacOs/"
+ INCLUDEPATH *= ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ TEMPLATE = lib
+ linux-g++:CONFIG += dll
+ linux-g++:DESTDIR = ../distrib
+ linux-g++-32:CONFIG += dll
+ linux-g++-32:DESTDIR = ../distrib
+ linux-g++-64:CONFIG += dll
+-linux-g++-64:DESTDIR = ../distrib
++linux-g++-64:DESTDIR = ../distrib
+
+ win32-msvc2005:CONFIG += staticlib
+ win32-msvc2008:CONFIG += staticlib
+@@ -54,5 +53,4 @@
+ filterscript.cpp \
+ GLLogStream.cpp \
+ meshmodel.cpp \
+- pluginmanager.cpp \
+- $$GLEWCODE
++ pluginmanager.cpp
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_func/filter_func.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_func/filter_func.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_func/filter_func.pro 2010-05-05 14:54:06.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_func/filter_func.pro 2010-05-16 13:29:44.000000000 +0200
+@@ -14,7 +14,7 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/muparser.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/muparser.lib
+ macx:LIBS += ../../external/lib/macx/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
++linux-g++:LIBS += -lmuparser
++linux-g++-32:LIBS += -lmuparser
++linux-g++-64:LIBS += -lmuparser
++win32-g++:LIBS += -lmuparser
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_qhull/filter_qhull.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_qhull/filter_qhull.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_qhull/filter_qhull.pro 2010-04-28 09:30:45.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_qhull/filter_qhull.pro 2010-06-13 23:21:55.000000000 +0200
+@@ -8,28 +8,14 @@
+ SOURCES += filter_qhull.cpp \
+ qhull_tools.cpp
+
+-HEADERS += ../../external/qhull-2003.1/src/geom.h \
+- ../../external/qhull-2003.1/src/io.h \
+- ../../external/qhull-2003.1/src/mem.h \
+- ../../external/qhull-2003.1/src/merge.h \
+- ../../external/qhull-2003.1/src/poly.h \
+- ../../external/qhull-2003.1/src/qhull.h \
+- ../../external/qhull-2003.1/src/qset.h \
+- ../../external/qhull-2003.1/src/stat.h \
+- ../../external/qhull-2003.1/src/user.h
+-
+-SOURCES += ../../external/qhull-2003.1/src/geom.c \
+- ../../external/qhull-2003.1/src/geom2.c \
+- ../../external/qhull-2003.1/src/global.c \
+- ../../external/qhull-2003.1/src/io.c \
+- ../../external/qhull-2003.1/src/mem.c \
+- ../../external/qhull-2003.1/src/merge.c \
+- ../../external/qhull-2003.1/src/poly.c \
+- ../../external/qhull-2003.1/src/poly2.c \
+- ../../external/qhull-2003.1/src/qconvex.c \
+- ../../external/qhull-2003.1/src/qhull.c \
+- ../../external/qhull-2003.1/src/qset.c \
+- ../../external/qhull-2003.1/src/stat.c \
+- ../../external/qhull-2003.1/src/user.c
++HEADERS += /usr/include/qhull/geom.h \
++ /usr/include/qhull/io.h \
++ /usr/include/qhull/mem.h \
++ /usr/include/qhull/merge.h \
++ /usr/include/qhull/poly.h \
++ /usr/include/qhull/qhull.h \
++ /usr/include/qhull/qset.h \
++ /usr/include/qhull/stat.h \
++ /usr/include/qhull/user.h
+
+ TARGET = filter_qhull
+\ No newline at end of file
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_qhull/qhull_tools.h MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_qhull/qhull_tools.h
+--- MeshLabSrc_AllInc_v123a/meshlab/src/fgt/filter_qhull/qhull_tools.h 2010-04-28 09:30:45.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/fgt/filter_qhull/qhull_tools.h 2010-06-13 23:24:24.000000000 +0200
+@@ -55,14 +55,14 @@
+ #endif
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include "../../external/qhull-2003.1/src/qhull.h"
+-#include "../../external/qhull-2003.1/src/mem.h"
+-#include "../../external/qhull-2003.1/src/qset.h"
+-#include "../../external/qhull-2003.1/src/geom.h"
+-#include "../../external/qhull-2003.1/src/merge.h"
+-#include "../../external/qhull-2003.1/src/poly.h"
+-#include "../../external/qhull-2003.1/src/io.h"
+-#include "../../external/qhull-2003.1/src/stat.h"
++#include "qhull/qhull.h"
++#include "qhull/mem.h"
++#include "qhull/qset.h"
++#include "qhull/geom.h"
++#include "qhull/merge.h"
++#include "qhull/poly.h"
++#include "qhull/io.h"
++#include "qhull/stat.h"
+ #if defined(__cplusplus)
+ }
+ #endif
+@@ -71,4 +71,4 @@
+ facetT *compute_delaunay(int dim, int numpoints, MeshModel &m);
+ bool compute_voronoi(int dim, int numpoints, MeshModel &m, MeshModel &pm,float threshold);
+ bool compute_alpha_shapes(int dim, int numpoints, MeshModel &m, MeshModel &pm,double alpha, bool alphashape);
+-int visible_points(int dim, int numpoints, MeshModel &m, MeshModel &pm,MeshModel &pm2, vcg::Point3f viewpointP,float threshold,bool convex_hullFP,bool triangVP);
+\ No newline at end of file
++int visible_points(int dim, int numpoints, MeshModel &m, MeshModel &pm,MeshModel &pm2, vcg::Point3f viewpointP,float threshold,bool convex_hullFP,bool triangVP);
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlab/meshlab.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlab/meshlab.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlab/meshlab.pro 2010-05-05 14:54:06.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlab/meshlab.pro 2010-06-19 18:06:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ VCGDIR = ../../../vcglib
+-GLEWDIR = ../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+ #CONFIG += debug_and_release
+ DESTDIR = ../distrib
+ # uncomment to try Eigen
+@@ -7,7 +7,7 @@
+ # CONFIG += warn_off
+ INCLUDEPATH *= ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ DEPENDPATH += $$VCGDIR \
+ $$VCGDIR/vcg \
+ $$VCGDIR/wrap
+@@ -88,7 +88,7 @@
+ INCLUDEPATH += . \
+ .. \
+ ../../../vcglib \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ CONFIG += stl
+
+ macx:LIBS += ../common/libcommon.dylib
+@@ -107,12 +107,12 @@
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
+-linux-g++:LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32:LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64:LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-32:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:QMAKE_RPATHDIR += ../usr/lib/meshlab
++linux-g++-64:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:QMAKE_RPATHDIR += /usr/lib/meshlab
+
+
+ # uncomment in your local copy only in emergency cases.
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlab/meshlab.qrc MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlab/meshlab.qrc
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlab/meshlab.qrc 2010-04-30 15:10:45.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlab/meshlab.qrc 2010-05-16 12:58:12.000000000 +0200
+@@ -34,6 +34,5 @@
+ <file>images/100mesh.html</file>
+ <file>images/selected_face.png</file>
+ <file>images/selected_vert.png</file>
+- <file>images/facebook.gif</file>
+ </qresource>
+ </RCC>
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2010-05-05 14:54:07.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2010-06-13 23:10:13.000000000 +0200
+@@ -24,7 +24,7 @@
+
+ TARGET = filter_isoparametrization
+ INCLUDEPATH += ./ \
+- ../../external/levmar-2.3/
++ /usr/include/levmar/
+
+ win32-msvc2005:QMAKE_CXXFLAGS += /openmp -D_USE_OMP
+ win32-msvc2008:QMAKE_CXXFLAGS += /openmp -D_USE_OMP
+@@ -40,9 +40,9 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/levmar.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/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 += ../../external/lib/macx/liblevmar.a
+
+ # Please never ever uncomment this...
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2010-05-05 14:54:07.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2010-05-16 13:02:34.000000000 +0200
+@@ -14,7 +14,7 @@
+
+ TARGET = io_3ds
+
+-INCLUDEPATH += ../../external/lib3ds-1.3.0/
++INCLUDEPATH += /usr/include/lib3ds #../../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/
+@@ -25,9 +25,9 @@
+ 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
+
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro 2010-05-05 14:54:07.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro 2010-05-16 13:09:22.000000000 +0200
+@@ -30,16 +30,16 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/bz2.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/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
+
+ win32-msvc2005:INCLUDEPATH += ../../external/bzip2-1.0.5
+ win32-msvc2008: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
++#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
+
+ mac:LIBS += -lbz2
+
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/meshlabserver/meshlabserver.pro MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabserver/meshlabserver.pro
+--- MeshLabSrc_AllInc_v123a/meshlab/src/meshlabserver/meshlabserver.pro 2010-05-05 14:54:06.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/meshlabserver/meshlabserver.pro 2010-06-19 18:08:02.000000000 +0200
+@@ -1,4 +1,4 @@
+-GLEWDIR = ../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+
+ HEADERS =
+
+@@ -20,13 +20,13 @@
+
+ win32-msvc2005: LIBS += -L../distrib -lcommon
+ win32-msvc2008: LIBS += -L../distrib -lcommon
+-win32-g++: LIBS += -L../distrib -lcommon
+-linux-g++: LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32: LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64: LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++win32-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-32: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-64: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:QMAKE_RPATHDIR += /usr/lib/meshlab
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon
+@@ -38,7 +38,7 @@
+
+ #DEFINES += GLEW_STATIC
+
+-INCLUDEPATH += . .. ../../../vcglib $$GLEWDIR/include
++INCLUDEPATH += . .. ../../../vcglib $$GLEWDIR
+ CONFIG += stl
+ CONFIG += console
+
+diff -urN MeshLabSrc_AllInc_v123a/meshlab/src/shared.pri MeshLabSrc_AllInc_v123a-patched/meshlab/src/shared.pri
+--- MeshLabSrc_AllInc_v123a/meshlab/src/shared.pri 2010-05-05 14:54:07.000000000 +0200
++++ MeshLabSrc_AllInc_v123a-patched/meshlab/src/shared.pri 2010-05-16 14:39:36.000000000 +0200
+@@ -6,7 +6,7 @@
+ QT += xml
+
+ VCGDIR = ../../../../vcglib
+-GLEWDIR = ../../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+
+ mac:LIBS += ../../common/libcommon.dylib
+
+@@ -15,9 +15,9 @@
+ win32-msvc2005: LIBS += ../../distrib/common.lib
+ win32-msvc2008: LIBS += ../../distrib/common.lib
+ win32-g++:LIBS += -L../../distrib -lcommon
+-linux-g++:LIBS += -L../../distrib -lcommon
+-linux-g++-32:LIBS += -L../../distrib -lcommon
+-linux-g++-64:LIBS += -L../../distrib -lcommon
++linux-g++:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
+
+ #CONFIG(debug, debug|release) {
+ # win32-msvc2005: LIBS += ../../common/debug/common.lib
diff --git a/media-gfx/meshlab/files/meshlab-1.3.0a-unbundle-libs-and-fix-rpath.patch b/media-gfx/meshlab/files/meshlab-1.3.0a-unbundle-libs-and-fix-rpath.patch
new file mode 100644
index 0000000..ee04cb7
--- /dev/null
+++ b/media-gfx/meshlab/files/meshlab-1.3.0a-unbundle-libs-and-fix-rpath.patch
@@ -0,0 +1,316 @@
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/common/common.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/common/common.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/common/common.pro 2011-01-25 08:49:48.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/common/common.pro 2011-07-10 19:12:37.000000000 +0200
+@@ -1,6 +1,5 @@
+ VCGDIR = ../../../vcglib
+-GLEWDIR = ../external/glew-1.5.1
+-GLEWCODE = $$GLEWDIR/src/glew.c
++GLEWDIR = /usr/include/GL
+
+
+ win32-msvc2005:DESTDIR = ../distrib
+@@ -35,7 +34,7 @@
+ cp libcommon.* ../distrib/meshlab.app/Contents/MacOS/"
+ INCLUDEPATH *= ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ TEMPLATE = lib
+ linux-g++:CONFIG += dll
+ linux-g++:DESTDIR = ../distrib
+@@ -83,5 +82,4 @@
+ scriptinterface.cpp \
+ mlparameter.cpp \
+ xmlfilterinfo.cpp \
+- $$GLEWCODE \
+ meshlabdocumentxml.cpp
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/external/external.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/external/external.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/external/external.pro 2011-01-25 08:49:46.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/external/external.pro 2011-07-10 19:58:22.000000000 +0200
+@@ -2,9 +2,4 @@
+
+ TEMPLATE = subdirs
+
+-SUBDIRS = lib3ds-1.3.0/lib3ds \
+- bzip2-1.0.5/bzip2-1.0.5.pro \
+- muparser_v132/src \
+- levmar-2.3/levmar-2.3.pro \
+- structuresynth/structuresynth.pro
+-# openkinect/openkinect.pro
++SUBDIRS = structuresynth/structuresynth.pro
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_func/filter_func.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_func/filter_func.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_func/filter_func.pro 2011-01-25 08:49:30.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_func/filter_func.pro 2011-07-10 19:50:52.000000000 +0200
+@@ -14,7 +14,7 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/muparser.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/muparser.lib
+ macx:LIBS += ../../external/lib/macx/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 -urN MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_qhull/filter_qhull.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_qhull/filter_qhull.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_qhull/filter_qhull.pro 2011-01-25 08:49:27.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_qhull/filter_qhull.pro 2011-07-10 19:34:15.000000000 +0200
+@@ -8,28 +8,14 @@
+ SOURCES += filter_qhull.cpp \
+ qhull_tools.cpp
+
+-HEADERS += ../../external/qhull-2003.1/src/geom.h \
+- ../../external/qhull-2003.1/src/io.h \
+- ../../external/qhull-2003.1/src/mem.h \
+- ../../external/qhull-2003.1/src/merge.h \
+- ../../external/qhull-2003.1/src/poly.h \
+- ../../external/qhull-2003.1/src/qhull.h \
+- ../../external/qhull-2003.1/src/qset.h \
+- ../../external/qhull-2003.1/src/stat.h \
+- ../../external/qhull-2003.1/src/user.h
++HEADERS += /usr/include/qhull/geom.h \
++ /usr/include/qhull/io.h \
++ /usr/include/qhull/mem.h \
++ /usr/include/qhull/merge.h \
++ /usr/include/qhull/poly.h \
++ /usr/include/qhull/qhull.h \
++ /usr/include/qhull/qset.h \
++ /usr/include/qhull/stat.h \
++ /usr/include/qhull/user.h
+
+-SOURCES += ../../external/qhull-2003.1/src/geom.c \
+- ../../external/qhull-2003.1/src/geom2.c \
+- ../../external/qhull-2003.1/src/global.c \
+- ../../external/qhull-2003.1/src/io.c \
+- ../../external/qhull-2003.1/src/mem.c \
+- ../../external/qhull-2003.1/src/merge.c \
+- ../../external/qhull-2003.1/src/poly.c \
+- ../../external/qhull-2003.1/src/poly2.c \
+- ../../external/qhull-2003.1/src/qconvex.c \
+- ../../external/qhull-2003.1/src/qhull.c \
+- ../../external/qhull-2003.1/src/qset.c \
+- ../../external/qhull-2003.1/src/stat.c \
+- ../../external/qhull-2003.1/src/user.c
+-
+-TARGET = filter_qhull
+\ No newline at end of file
++TARGET = filter_qhull
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_qhull/qhull_tools.h MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_qhull/qhull_tools.h
+--- MeshLabSrc_AllInc_v130a/meshlab/src/fgt/filter_qhull/qhull_tools.h 2011-01-25 08:49:27.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/fgt/filter_qhull/qhull_tools.h 2011-07-10 19:35:37.000000000 +0200
+@@ -55,14 +55,14 @@
+ #endif
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include "../../external/qhull-2003.1/src/qhull.h"
+-#include "../../external/qhull-2003.1/src/mem.h"
+-#include "../../external/qhull-2003.1/src/qset.h"
+-#include "../../external/qhull-2003.1/src/geom.h"
+-#include "../../external/qhull-2003.1/src/merge.h"
+-#include "../../external/qhull-2003.1/src/poly.h"
+-#include "../../external/qhull-2003.1/src/io.h"
+-#include "../../external/qhull-2003.1/src/stat.h"
++#include "qhull/qhull.h"
++#include "qhull/mem.h"
++#include "qhull/qset.h"
++#include "qhull/geom.h"
++#include "qhull/merge.h"
++#include "qhull/poly.h"
++#include "qhull/io.h"
++#include "qhull/stat.h"
+ #if defined(__cplusplus)
+ }
+ #endif
+@@ -71,4 +71,4 @@
+ facetT *compute_delaunay(int dim, int numpoints, MeshModel &m);
+ bool compute_voronoi(int dim, int numpoints, MeshModel &m, MeshModel &pm,float threshold);
+ bool compute_alpha_shapes(int dim, int numpoints, MeshModel &m, MeshModel &pm,double alpha, bool alphashape);
+-int visible_points(int dim, int numpoints, MeshModel &m, MeshModel &pm,MeshModel &pm2, vcg::Point3f viewpointP,float threshold,bool convex_hullFP,bool triangVP);
+\ No newline at end of file
++int visible_points(int dim, int numpoints, MeshModel &m, MeshModel &pm,MeshModel &pm2, vcg::Point3f viewpointP,float threshold,bool convex_hullFP,bool triangVP);
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/meshlab/meshlab.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlab/meshlab.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/meshlab/meshlab.pro 2011-02-15 10:39:47.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlab/meshlab.pro 2011-07-10 19:21:33.000000000 +0200
+@@ -1,5 +1,5 @@
+ VCGDIR = ../../../vcglib
+-GLEWDIR = ../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+ #CONFIG += debug_and_release
+ DESTDIR = ../distrib
+
+@@ -8,7 +8,7 @@
+ # CONFIG += warn_off
+ INCLUDEPATH *= ../.. \
+ $$VCGDIR \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ DEPENDPATH += $$VCGDIR \
+ $$VCGDIR/vcg \
+ $$VCGDIR/wrap
+@@ -108,7 +108,7 @@
+ INCLUDEPATH += . \
+ .. \
+ ../../../vcglib \
+- $$GLEWDIR/include
++ $$GLEWDIR
+ CONFIG += stl
+
+ macx:LIBS += ../common/libcommon.dylib
+@@ -128,12 +128,12 @@
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
+-linux-g++:LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32:LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64:LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-32:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:QMAKE_RPATHDIR += ../usr/lib/meshlab
++linux-g++-64:LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:QMAKE_RPATHDIR += /usr/lib/meshlab
+
+
+ # uncomment in your local copy only in emergency cases.
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2011-01-25 08:50:05.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro 2011-07-10 19:50:20.000000000 +0200
+@@ -24,7 +24,7 @@
+
+ TARGET = filter_isoparametrization
+ INCLUDEPATH += ./ \
+- ../../external/levmar-2.3/
++ /usr/include/levmar/
+
+ win32-msvc2005:QMAKE_CXXFLAGS += /openmp -D_USE_OMP
+ win32-msvc2008:QMAKE_CXXFLAGS += /openmp -D_USE_OMP
+@@ -41,9 +41,10 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/levmar.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/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 += ../../../src/external/lib/macx/liblevmar.a
+
+ # Please never ever uncomment this...
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2011-01-25 08:49:55.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro 2011-07-10 19:28:11.000000000 +0200
+@@ -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,9 +25,9 @@
+ 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
+
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro 2011-01-25 08:50:02.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabplugins/io_epoch/io_epoch.pro 2011-07-10 19:29:27.000000000 +0200
+@@ -30,16 +30,16 @@
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/bz2.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/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
+
+ win32-msvc2005:INCLUDEPATH += ../../external/bzip2-1.0.5
+ win32-msvc2008: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
++#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
+
+ mac:LIBS += -lbz2
+
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/meshlabserver/meshlabserver.pro MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabserver/meshlabserver.pro
+--- MeshLabSrc_AllInc_v130a/meshlab/src/meshlabserver/meshlabserver.pro 2011-01-25 08:49:46.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/meshlabserver/meshlabserver.pro 2011-07-10 19:23:02.000000000 +0200
+@@ -1,4 +1,4 @@
+-GLEWDIR = ../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+
+ HEADERS =
+
+@@ -25,12 +25,12 @@
+ win32-msvc2008: LIBS += -L../distrib -lcommon
+ 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++-32: LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64: LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-32: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:QMAKE_RPATHDIR += /usr/lib/meshlab
++linux-g++-64: LIBS += -L../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:QMAKE_RPATHDIR += /usr/lib/meshlab
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon
+@@ -43,7 +43,7 @@
+
+ #DEFINES += GLEW_STATIC
+
+-INCLUDEPATH += . .. ../../../vcglib $$GLEWDIR/include
++INCLUDEPATH += . .. ../../../vcglib $$GLEWDIR
+ CONFIG += stl
+ CONFIG += console
+
+diff -urN MeshLabSrc_AllInc_v130a/meshlab/src/shared.pri MeshLabSrc_AllInc_v130a_patched/meshlab/src/shared.pri
+--- MeshLabSrc_AllInc_v130a/meshlab/src/shared.pri 2011-01-25 08:50:20.000000000 +0100
++++ MeshLabSrc_AllInc_v130a_patched/meshlab/src/shared.pri 2011-07-10 19:04:25.000000000 +0200
+@@ -8,7 +8,7 @@
+ QT += script
+
+ VCGDIR = ../../../../vcglib
+-GLEWDIR = ../../external/glew-1.5.1
++GLEWDIR = /usr/include/GL
+
+ mac:LIBS += ../../common/libcommon.dylib
+
+@@ -17,9 +17,9 @@
+ win32-msvc2005: LIBS += ../../distrib/common.lib
+ win32-msvc2008: LIBS += ../../distrib/common.lib
+ win32-g++:LIBS += -L../../distrib -lcommon
+-linux-g++:LIBS += -L../../distrib -lcommon
+-linux-g++-32:LIBS += -L../../distrib -lcommon
+-linux-g++-64:LIBS += -L../../distrib -lcommon
++linux-g++:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-32:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
++linux-g++-64:LIBS += -L../../distrib -lcommon -L/usr/lib -lGLEW
+
+ #CONFIG(debug, debug|release) {
+ # win32-msvc2005: LIBS += ../../common/debug/common.lib
diff --git a/media-gfx/meshlab/meshlab-1.2.3a-r5.ebuild b/media-gfx/meshlab/meshlab-1.2.3a-r5.ebuild
new file mode 100644
index 0000000..318c461
--- /dev/null
+++ b/media-gfx/meshlab/meshlab-1.2.3a-r5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# TODO: use versionator; first talk to upstream to cleanup their naming
+# TODO: add slot for version 2, append -${SLOT}
+
+EAPI="3"
+
+inherit eutils multilib qt4-r2 versionator
+
+DESCRIPTION="A mesh processing system for the editing of large unstructured 3D triangular meshes."
+HOMEPAGE="http://meshlab.sourceforge.net/"
+SRC_URI="mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.2.3/MeshLabSrc_AllInc_v123a.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND=">=sys-devel/gcc-4.4
+ media-libs/glew
+ sci-libs/levmar
+ media-libs/lib3ds
+ >=dev-cpp/muParser-1.30
+ <media-libs/qhull-2010.1
+ x11-libs/qt-core:4
+ x11-libs/qt-opengl:4"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/MeshLabSrc_AllInc_v${PV//./}/meshlab/src
+
+PATCHES=(
+ "${FILESDIR}/${PF}-use-system-libs-rpath.patch"
+)
+
+src_configure() {
+ eqmake4 meshlabv12.pro
+}
+
+src_install() {
+ local my_libdir=/usr/$(get_libdir)/meshlab
+
+ exeinto ${my_libdir}
+ doexe distrib/{libcommon.so.1.0.0,meshlab{,server}} || die
+ dosym libcommon.so.1.0.0 ${my_libdir}/libcommon.so.1 || die
+ dosym libcommon.so.1 ${my_libdir}/libcommon.so || die
+ dosym ${my_libdir}/meshlab /usr/bin/meshlab || die
+ dosym ${my_libdir}/meshlabserver /usr/bin/meshlabserver || die
+
+ exeinto ${my_libdir}/plugins
+ doexe distrib/plugins/*.so || die
+
+ insinto ${my_libdir}/shaders
+ doins -r distrib/shaders/* || die
+}
diff --git a/media-gfx/meshlab/meshlab-1.3.0a.ebuild b/media-gfx/meshlab/meshlab-1.3.0a.ebuild
new file mode 100644
index 0000000..23c248b
--- /dev/null
+++ b/media-gfx/meshlab/meshlab-1.3.0a.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# TODO: use versionator; first talk to upstream to cleanup their naming
+# TODO: add slot for version 2, append -${SLOT}
+
+EAPI=2
+
+inherit eutils multilib qt4-r2 versionator
+
+DESCRIPTION="A mesh processing system for the editing of large unstructured 3D triangular meshes."
+HOMEPAGE="http://meshlab.sourceforge.net/"
+SRC_URI="mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.3.0/MeshLabSrc_AllInc_v130a.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND=">=sys-devel/gcc-4.3
+ media-libs/glew
+ sci-libs/levmar
+ media-libs/lib3ds
+ >=dev-cpp/muParser-1.30
+ media-libs/qhull
+ x11-libs/qt-core:4
+ x11-libs/qt-opengl:4"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/meshlab/src
+
+PATCHES=(
+ "${FILESDIR}/${PF}-unbundle-libs-and-fix-rpath.patch"
+)
+
+src_configure() {
+ eqmake4 external/external.pro
+ eqmake4 meshlab_full.pro
+}
+
+src_compile() {
+ cd external && emake
+ cd .. && emake
+}
+
+src_install() {
+ local my_libdir=/usr/$(get_libdir)/meshlab
+
+ exeinto ${my_libdir}
+ doexe distrib/{libcommon.so.1.0.0,meshlab{,server}} || die
+ dosym libcommon.so.1.0.0 ${my_libdir}/libcommon.so.1 || die
+ dosym libcommon.so.1 ${my_libdir}/libcommon.so || die
+ dosym ${my_libdir}/meshlab /usr/bin/meshlab || die
+ dosym ${my_libdir}/meshlabserver /usr/bin/meshlabserver || die
+
+ exeinto ${my_libdir}/plugins
+ doexe distrib/plugins/*.so || die
+
+ insinto ${my_libdir}/shaders
+ doins -r distrib/shaders/* || die
+}
diff --git a/media-gfx/meshlab/metadata.xml b/media-gfx/meshlab/metadata.xml
new file mode 100644
index 0000000..905334b
--- /dev/null
+++ b/media-gfx/meshlab/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>gw.fossdev@gmail.com</email>
+ <name>Gert Wollny</name>
+ </maintainer>
+</pkgmetadata>