summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD33
-rw-r--r--meshlabserver_GLU.patch6
-rw-r--r--plugin_dir.patch22
-rw-r--r--rpath.patch12
-rw-r--r--shaders_dir.patch89
6 files changed, 150 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4e0c37a563cf..db9532909e60 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = meshlab
pkgdesc = System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)
pkgver = 2016.12
- pkgrel = 1
+ pkgrel = 2
url = http://www.meshlab.net
install = meshlab.install
arch = i686
@@ -21,6 +21,8 @@ pkgbase = meshlab
provides = meshlab
source = git+https://github.com/cnr-isti-vclab/meshlab.git#tag=v2016.12
source = git+https://github.com/cnr-isti-vclab/vcglib.git#tag=v1.0.1
+ source = plugin_dir.patch
+ source = shaders_dir.patch
source = external.patch
source = 3ds.patch
source = levmar.patch
@@ -34,16 +36,18 @@ pkgbase = meshlab
source = meshlab.desktop
md5sums = SKIP
md5sums = SKIP
+ md5sums = f13d58ca07fa74b3d7c8f7f9d4ee6a93
+ md5sums = 753dd4753081ddb428f4db8eaefe9009
md5sums = 038494125d7bd422074fc5635c5579ca
md5sums = e51b027eb9d78b82de73c4724b3928cf
md5sums = 1a53a92e12f74520b36e38d9a2311834
md5sums = 64caafa96bef4208d641e889099eba26
md5sums = 616b0dcf018f46a490867028d6ddc533
- md5sums = 5d87f00356539f84f37f873f304eb11e
+ md5sums = ca962601b06fac1fb2b6bf0b408777ad
md5sums = c1cfb910d20db49ec195d9918036e3c3
md5sums = 5b59b23cf66e42f8b3d3eabe466b3eaa
md5sums = 5df295c21de5bac8d6073528823d975a
- md5sums = 2cc1246fc1b01029ae762c82a7dbf364
+ md5sums = 78bf780b3353fe212a77eb91db6f6b6c
md5sums = 18aed0a21276a22325bf8c32166fb110
pkgname = meshlab
diff --git a/PKGBUILD b/PKGBUILD
index 61364ce70eab..3080c4f665da 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: bartus <aur@bartus.33mail.com>
pkgname=meshlab
pkgver=2016.12
-pkgrel=1
+pkgrel=2
pkgdesc="System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)"
arch=('i686' 'x86_64')
url="http://www.meshlab.net"
@@ -12,6 +12,8 @@ depends=('bzip2' 'muparser' 'levmar' 'lib3ds' 'desktop-file-utils' 'glu' 'mpir'
install="${pkgname}.install"
source=("git+https://github.com/cnr-isti-vclab/meshlab.git#tag=v2016.12"
"git+https://github.com/cnr-isti-vclab/vcglib.git#tag=v1.0.1"
+ "plugin_dir.patch"
+ "shaders_dir.patch"
"external.patch"
"3ds.patch"
"levmar.patch"
@@ -25,16 +27,18 @@ source=("git+https://github.com/cnr-isti-vclab/meshlab.git#tag=v2016.12"
"meshlab.desktop")
md5sums=('SKIP'
'SKIP'
+ 'f13d58ca07fa74b3d7c8f7f9d4ee6a93'
+ '753dd4753081ddb428f4db8eaefe9009'
'038494125d7bd422074fc5635c5579ca'
'e51b027eb9d78b82de73c4724b3928cf'
'1a53a92e12f74520b36e38d9a2311834'
'64caafa96bef4208d641e889099eba26'
'616b0dcf018f46a490867028d6ddc533'
- '5d87f00356539f84f37f873f304eb11e'
+ 'ca962601b06fac1fb2b6bf0b408777ad'
'c1cfb910d20db49ec195d9918036e3c3'
'5b59b23cf66e42f8b3d3eabe466b3eaa'
'5df295c21de5bac8d6073528823d975a'
- '2cc1246fc1b01029ae762c82a7dbf364'
+ '78bf780b3353fe212a77eb91db6f6b6c'
'18aed0a21276a22325bf8c32166fb110')
prepare() {
@@ -65,6 +69,10 @@ prepare() {
patch -Np0 -i levmar.patch
msg "using system 3ds lib"
patch -Np0 -i 3ds.patch
+ msg "move plugins to /usr/lib/plugins"
+ patch -Np0 -i plugin_dir.patch
+ msg "move shaders to /usr/share/meshlab/shaders"
+ patch -Np0 -i shaders_dir.patch
}
build() {
@@ -82,16 +90,21 @@ build() {
}
package() {
- cd "${srcdir}/meshlab/src"
+ cd "${srcdir}/meshlab/src/distrib"
# install meshlab
- install -d -m755 "${pkgdir}/opt"
- cp -a distrib "${pkgdir}/opt/meshlab"
+ install -d -m755 ${pkgdir}/usr/bin
+ install -d -m755 ${pkgdir}/usr/lib/meshlab
+ install -d -m755 ${pkgdir}/usr/share/meshlab
+ install -t ${pkgdir}/usr/bin meshlab*
+ install -t ${pkgdir}/usr/lib/meshlab libcommon*
+
+ cp -a plugins ${pkgdir}/usr/lib/meshlab
+ cp -a shaders ${pkgdir}/usr/share/meshlab
+ cp -a textures ${pkgdir}/usr/share/meshlab
+ cp -a sample ${pkgdir}/usr/share/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"
diff --git a/meshlabserver_GLU.patch b/meshlabserver_GLU.patch
index f8dd4e63e8b7..4b2ac58b6a39 100644
--- a/meshlabserver_GLU.patch
+++ b/meshlabserver_GLU.patch
@@ -6,12 +6,12 @@
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++:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
-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++-32:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
-linux-g++-64: LIBS += -L../distrib -lcommon
+linux-g++-64: LIBS += -L../distrib -lcommon -lGLU
- linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
#CONFIG (release,debug | release) {
# win32-msvc2005:release: LIBS += -L../common/release -lcommon
diff --git a/plugin_dir.patch b/plugin_dir.patch
new file mode 100644
index 000000000000..7e373e512fe3
--- /dev/null
+++ b/plugin_dir.patch
@@ -0,0 +1,22 @@
+diff --git a/src/common/pluginmanager.cpp b/src/common/pluginmanager.cpp
+index 5354055c..12386a90 100644
+--- a/src/common/pluginmanager.cpp
++++ meshlab/src/common/pluginmanager.cpp
+@@ -189,7 +189,7 @@ QString PluginManager::osDependentFileBaseName(const QString &plname)
+
+ QString PluginManager::getBaseDirPath()
+ {
+- QDir baseDir(qApp->applicationDirPath());
++ QDir baseDir("/usr/share/meshlab");
+
+ #if defined(Q_OS_WIN)
+ // Windows:
+@@ -211,7 +211,7 @@ QString PluginManager::getBaseDirPath()
+
+ QString PluginManager::getDefaultPluginDirPath()
+ {
+- QDir pluginsDir(getBaseDirPath());
++ QDir pluginsDir("/usr/lib/meshlab");
+ if(!pluginsDir.exists("plugins"))
+ //QMessageBox::warning(0,"Meshlab Initialization","Serious error. Unable to find the plugins directory.");
+ qDebug("Meshlab Initialization: Serious error. Unable to find the plugins directory.");
diff --git a/rpath.patch b/rpath.patch
index 30ce31dc1482..393c609b9988 100644
--- a/rpath.patch
+++ b/rpath.patch
@@ -6,13 +6,13 @@ diff -Nur meshlab.orig/src/meshlab/meshlab.pro meshlab/src/meshlab/meshlab.pro
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++:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
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++-32:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
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\'
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
# uncomment in your local copy only in emergency cases.
# We should never be too permissive
@@ -24,13 +24,13 @@ diff -Nur meshlab.orig/src/meshlabserver/meshlabserver.pro meshlab/src/meshlabse
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++:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
linux-g++-32: LIBS += -L../distrib -lcommon
-linux-g++-32:QMAKE_RPATHDIR += ../distrib
-+linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
++linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
linux-g++-64: LIBS += -L../distrib -lcommon
-linux-g++-64:QMAKE_RPATHDIR += ../distrib
-+linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,/usr/lib/meshlab
#CONFIG (release,debug | release) {
# win32-msvc2005:release: LIBS += -L../common/release -lcommon
# win32-msvc2008:release: LIBS += -L../common/release -lcommon
diff --git a/shaders_dir.patch b/shaders_dir.patch
new file mode 100644
index 000000000000..432b15078c57
--- /dev/null
+++ b/shaders_dir.patch
@@ -0,0 +1,89 @@
+diff --git a/src/meshlabplugins/render_gdp/meshrender.cpp b/src/meshlabplugins/render_gdp/meshrender.cpp
+index 5841ce66..3e0cbe5e 100644
+--- a/src/meshlabplugins/render_gdp/meshrender.cpp
++++ meshlab/src/meshlabplugins/render_gdp/meshrender.cpp
+@@ -29,6 +29,9 @@
+ #include <QTextStream>
+ #include "../../meshlab/glarea.h"
+
++#include <common/pluginmanager.h>
++
++
+ using namespace std;
+ using namespace vcg;
+
+@@ -38,7 +41,7 @@ void MeshShaderRenderPlugin::initActionList() {
+ qaNone->setCheckable(false);
+ actionList << qaNone;*/
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins")
+ shadersDir.cdUp();
+diff --git a/src/meshlabplugins/render_gdp/shaderDialog.cpp b/src/meshlabplugins/render_gdp/shaderDialog.cpp
+index 13157579..1f14b7bf 100644
+--- a/src/meshlabplugins/render_gdp/shaderDialog.cpp
++++ meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp
+@@ -32,6 +32,8 @@
+ #include <QCheckBox>
+ #include <QPushButton>
+
++#include <common/pluginmanager.h>
++
+ #define DECFACTOR 100000.0f
+
+ using namespace vcg;
+@@ -317,7 +319,7 @@ void ShaderDialog::changeTexturePath(int i) {
+ void ShaderDialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/src/plugins_experimental/render_splatpyramid/dialog.cpp b/src/plugins_experimental/render_splatpyramid/dialog.cpp
+index 589ba482..f0225c40 100644
+--- a/src/plugins_experimental/render_splatpyramid/dialog.cpp
++++ meshlab/src/plugins_experimental/render_splatpyramid/dialog.cpp
+@@ -3,6 +3,8 @@
+ #include <QFileDialog>
+ #include <QMessageBox>
+
++#include <common/pluginmanager.h>
++
+
+ #define DECFACTOR 100000.0f
+
+@@ -123,7 +125,7 @@ void Dialog::changeTexturePath(int i) {
+ void Dialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc b/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+index a4915d10..d6325aa4 100644
+--- a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
++++ meshlab/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+@@ -18,6 +18,8 @@
+ #include <QTextStream>
+ #include <wrap/gl/trimesh.h>
+
++#include <common/pluginmanager.h>
++
+ //#include <QGLFramebufferObject>
+
+ //#include "GL/glut.h"
+@@ -85,7 +87,7 @@ 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());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins" )
+ shadersDir.cdUp();