summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2017-01-09 23:17:06 +0100
committerbartus2017-01-09 23:17:06 +0100
commitd5ea275d4956e2c714898be08071c930370d7b26 (patch)
tree27a91315943c253e24fb994ae0856a88e458f1e4
parenta59bd032f2404b684202d905ee0344b72996949f (diff)
downloadaur-d5ea275d4956e2c714898be08071c930370d7b26.tar.gz
install meshlab to /usr instead of /opt
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD43
-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, 159 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21239736e605..6ec7d32f46c5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,14 @@
pkgbase = meshlab-git
pkgdesc = System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)
pkgver = 2016.12.r10.g781a39a5
- pkgrel = 1
+ pkgrel = 2
url = http://www.meshlab.net
install = meshlab-git.install
arch = i686
arch = x86_64
license = GPL2
makedepends = git
+ makedepends = chrpath
depends = bzip2
depends = muparser
depends = levmar
@@ -23,6 +24,8 @@ pkgbase = meshlab-git
conflicts = meshlab
source = git+https://github.com/cnr-isti-vclab/meshlab.git
source = git+https://github.com/cnr-isti-vclab/vcglib.git#branch=devel
+ source = plugin_dir.patch
+ source = shaders_dir.patch
source = external.patch
source = 3ds.patch
source = levmar.patch
@@ -35,15 +38,17 @@ pkgbase = meshlab-git
source = meshlab.desktop
md5sums = SKIP
md5sums = SKIP
+ md5sums = f13d58ca07fa74b3d7c8f7f9d4ee6a93
+ md5sums = 753dd4753081ddb428f4db8eaefe9009
md5sums = 038494125d7bd422074fc5635c5579ca
md5sums = e51b027eb9d78b82de73c4724b3928cf
md5sums = 9eb027efe2d8584c693a4314db9e5bb5
md5sums = 64caafa96bef4208d641e889099eba26
md5sums = 616b0dcf018f46a490867028d6ddc533
- md5sums = 5d87f00356539f84f37f873f304eb11e
- md5sums = 3f49b66001a0e4d31f43c1429d73d7b6
+ md5sums = ca962601b06fac1fb2b6bf0b408777ad
+ md5sums = 76e48d239b21c23dcea9198c69864f69
md5sums = 5df295c21de5bac8d6073528823d975a
- md5sums = 2cc1246fc1b01029ae762c82a7dbf364
+ md5sums = 78bf780b3353fe212a77eb91db6f6b6c
md5sums = 18aed0a21276a22325bf8c32166fb110
pkgname = meshlab-git
diff --git a/PKGBUILD b/PKGBUILD
index 3ec03e4fa53e..7031946e6001 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,20 @@
# Maintainer: bartus <aur@bartus.33mail.com>
pkgname=meshlab-git
pkgver=2016.12.r10.g781a39a5
-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"
conflicts=('meshlab')
provides=('meshlab')
-license=('GPL2')
-depends=('bzip2' 'muparser' 'levmar' 'lib3ds' 'desktop-file-utils' 'glu' 'mpir' 'openssl' 'qt5-base' 'qt5-declarative' 'qt5-script')
+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')
+makedepends=('git' 'chrpath')
install="${pkgname}.install"
source=("git+https://github.com/cnr-isti-vclab/meshlab.git"
"git+https://github.com/cnr-isti-vclab/vcglib.git#branch=devel"
+ "plugin_dir.patch"
+ "shaders_dir.patch"
"external.patch"
"3ds.patch"
"levmar.patch"
@@ -26,15 +27,17 @@ source=("git+https://github.com/cnr-isti-vclab/meshlab.git"
"meshlab.desktop")
md5sums=('SKIP'
'SKIP'
+ 'f13d58ca07fa74b3d7c8f7f9d4ee6a93'
+ '753dd4753081ddb428f4db8eaefe9009'
'038494125d7bd422074fc5635c5579ca'
'e51b027eb9d78b82de73c4724b3928cf'
'9eb027efe2d8584c693a4314db9e5bb5'
'64caafa96bef4208d641e889099eba26'
'616b0dcf018f46a490867028d6ddc533'
- '5d87f00356539f84f37f873f304eb11e'
+ 'ca962601b06fac1fb2b6bf0b408777ad'
'76e48d239b21c23dcea9198c69864f69'
'5df295c21de5bac8d6073528823d975a'
- '2cc1246fc1b01029ae762c82a7dbf364'
+ '78bf780b3353fe212a77eb91db6f6b6c'
'18aed0a21276a22325bf8c32166fb110')
pkgver() {
@@ -66,6 +69,10 @@ prepare() {
patch -Np0 -i levmar.patch
msg "using system 3ds lib"
patch -Np0 -i 3ds.patch
+ msg "put plugins in /usr/lib/mashlab"
+ patch -Np0 -i plugin_dir.patch
+ msg "put shaders in /usr/shade/meshlab"
+ patch -Np0 -i shaders_dir.patch
}
build() {
@@ -80,19 +87,29 @@ build() {
cd ..
qmake meshlab_full.pro -r
make
+# The QMAKE_RPATHDIR stuff puts in the path to the compile-time location
+# of libcommon, which won't work at runtime, so we change the rpath here.
+# Ideally upstream would rename the library to libmeshlab, libmeshlabcommon,
+# or the like, so that we could put it in the system library directory
+# and avoid rpath entirely.
+## <from fedora build script>
+ chrpath -r /usr/lib/meshlab distrib/{meshlab,meshlabserver}
}
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*
- # 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"
+ 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
# 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();