1 |
commit: b5adf61fc5ab5b1d96143e1ebb5f62d7ea26b5f0 |
2 |
Author: Amy Liffey <amynka <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 27 16:16:45 2017 +0000 |
4 |
Commit: Amy Liffey <amynka <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 27 16:21:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5adf61f |
7 |
|
8 |
media-gfx/meshlab: fix align and plugin path |
9 |
|
10 |
- Align fix -> Submitted-by:luc_pierard_de_maujouy <AT> yahoo.fr |
11 |
Closes: https://bugs.gentoo.org/638796 |
12 |
|
13 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
14 |
|
15 |
.../files/2016.12/meshlab-2016.12-align1.patch | 16 ++++ |
16 |
.../files/2016.12/meshlab-2016.12-align2.patch | 11 +++ |
17 |
.../2016.12/meshlab-2016.12-fix-plugins-path.patch | 17 ++++ |
18 |
media-gfx/meshlab/meshlab-2016.12-r1.ebuild | 104 +++++++++++++++++++++ |
19 |
4 files changed, 148 insertions(+) |
20 |
|
21 |
diff --git a/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align1.patch b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align1.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..cdba89c0ac3 |
24 |
--- /dev/null |
25 |
+++ b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align1.patch |
26 |
@@ -0,0 +1,16 @@ |
27 |
+--- a/meshlabplugins/edit_align/align/AlignGlobal.cpp 2016-12-23 13:24:59.000000000 +0300 |
28 |
++++ b/meshlabplugins/edit_align/align/AlignGlobal.cpp 2017-11-26 03:05:11.010113483 +0300 |
29 |
+@@ -429,11 +429,11 @@ |
30 |
+ |
31 |
+ ******************************/ |
32 |
+ |
33 |
+-bool AlignGlobal::GlobalAlign(const std::map<int,string> &Names, const double epsilon, int maxiter, bool Rigid, FILE *elfp, CallBack* cb ) |
34 |
++bool AlignGlobal::GlobalAlign(const std::map<int,string> &Names, const double epsilon, int maxiter, bool Rigid, FILE *elfp, CallBackPos* cb ) |
35 |
+ { |
36 |
+ double change; |
37 |
+ int step, localmaxiter; |
38 |
+- cb("Global Alignment..."); |
39 |
++ cb(0,"Global Alignment..."); |
40 |
+ LOG(elfp,"----------------\n----------------\nGlobalAlignment (target eps %7.3f)\n",epsilon); |
41 |
+ |
42 |
+ queue<AlignGlobal::Node *> Q; |
43 |
|
44 |
diff --git a/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align2.patch b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align2.patch |
45 |
new file mode 100644 |
46 |
index 00000000000..455eec096c8 |
47 |
--- /dev/null |
48 |
+++ b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-align2.patch |
49 |
@@ -0,0 +1,11 @@ |
50 |
+--- a/meshlabplugins/edit_align/align/AlignGlobal.h 2016-12-23 13:24:59.000000000 +0300 |
51 |
++++ b/meshlabplugins/edit_align/align/AlignGlobal.h 2017-11-26 03:10:09.210116792 +0300 |
52 |
+@@ -115,7 +115,7 @@ |
53 |
+ Node *ChooseDormantWithMostActiveLink (); |
54 |
+ void MakeAllDormant(); |
55 |
+ void Clear(); |
56 |
+- bool GlobalAlign(const std::map<int,std::string> &Names, const double epsilon, int maxiter, bool Rigid, FILE *elfp=0, CallBack * cb=DummyCallBack ); |
57 |
++ bool GlobalAlign(const std::map<int,std::string> &Names, const double epsilon, int maxiter, bool Rigid, FILE *elfp=0, CallBackPos * cb=DummyCallBackPos ); |
58 |
+ |
59 |
+ bool CheckGraph(); |
60 |
+ |
61 |
|
62 |
diff --git a/media-gfx/meshlab/files/2016.12/meshlab-2016.12-fix-plugins-path.patch b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-fix-plugins-path.patch |
63 |
new file mode 100644 |
64 |
index 00000000000..d7b17fe904b |
65 |
--- /dev/null |
66 |
+++ b/media-gfx/meshlab/files/2016.12/meshlab-2016.12-fix-plugins-path.patch |
67 |
@@ -0,0 +1,17 @@ |
68 |
+diff --git a/common/pluginmanager.cpp b/common/pluginmanager.cpp |
69 |
+index 5354055..9a523d4 100644 |
70 |
+--- a/common/pluginmanager.cpp |
71 |
++++ b/common/pluginmanager.cpp |
72 |
+@@ -189,7 +189,11 @@ QString PluginManager::osDependentFileBaseName(const QString &plname) |
73 |
+ |
74 |
+ QString PluginManager::getBaseDirPath() |
75 |
+ { |
76 |
+- QDir baseDir(qApp->applicationDirPath()); |
77 |
++ #if defined(Q_OS_LINUX) |
78 |
++ QDir baseDir("/usr/share/meshlab"); |
79 |
++ #else |
80 |
++ QDir baseDir(qApp->applicationDirPath()); |
81 |
++ #endif |
82 |
+ |
83 |
+ #if defined(Q_OS_WIN) |
84 |
+ // Windows: |
85 |
|
86 |
diff --git a/media-gfx/meshlab/meshlab-2016.12-r1.ebuild b/media-gfx/meshlab/meshlab-2016.12-r1.ebuild |
87 |
new file mode 100644 |
88 |
index 00000000000..824261918cd |
89 |
--- /dev/null |
90 |
+++ b/media-gfx/meshlab/meshlab-2016.12-r1.ebuild |
91 |
@@ -0,0 +1,104 @@ |
92 |
+# Copyright 1999-2017 Gentoo Foundation |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+EAPI=6 |
96 |
+ |
97 |
+inherit qmake-utils |
98 |
+ |
99 |
+DESCRIPTION="the open source system for processing and editing 3D triangular meshes" |
100 |
+HOMEPAGE="http://www.meshlab.net" |
101 |
+VCG_VERSION="1.0.1" |
102 |
+SRC_URI="https://github.com/cnr-isti-vclab/meshlab/archive/v${PV}.tar.gz -> ${P}.tar.gz |
103 |
+ https://github.com/cnr-isti-vclab/vcglib/archive/v${VCG_VERSION}.tar.gz -> vcglib-${VCG_VERSION}.tar.gz |
104 |
+" |
105 |
+ |
106 |
+LICENSE="GPL-2" |
107 |
+SLOT="0" |
108 |
+KEYWORDS="~amd64 ~x86" |
109 |
+IUSE="-minimal" |
110 |
+DEPEND="dev-cpp/eigen:3 |
111 |
+ dev-cpp/muParser |
112 |
+ dev-qt/qtcore:5 |
113 |
+ dev-qt/qtopengl:5 |
114 |
+ dev-qt/qtscript:5 |
115 |
+ dev-qt/qtxmlpatterns:5 |
116 |
+ >=media-gfx/jhead-3.00-r2 |
117 |
+ media-libs/glew:0 |
118 |
+ media-libs/qhull |
119 |
+ =media-libs/lib3ds-1* |
120 |
+ media-libs/openctm |
121 |
+ sci-libs/levmar |
122 |
+ sci-libs/mpir" |
123 |
+ |
124 |
+RDEPEND="${DEPEND}" |
125 |
+ |
126 |
+S="${WORKDIR}/meshlab-${PV}/src" |
127 |
+ |
128 |
+PATCHES=( |
129 |
+ "${FILESDIR}/${PV}/0001-set-shader-and-texture-paths.patch" |
130 |
+ #remove ot working plugins |
131 |
+ "${FILESDIR}/${PV}/remove-edit_mutualcorrs.patch" |
132 |
+ "${FILESDIR}/${PV}/remove-io_TXT.patch" |
133 |
+ #since structure synth doesn't seem to be compiling |
134 |
+ "${FILESDIR}/${PV}/0001-disable-filter-ssynth.patch" |
135 |
+ #this has been fixed in the tree |
136 |
+ "${FILESDIR}/${PV}/0001-disable-edit-quality.patch" |
137 |
+ #this causes segfaults |
138 |
+ "${FILESDIR}/${PV}/0001-disable-filter-layer.patch" |
139 |
+ #for when we use minimal |
140 |
+ "${FILESDIR}/${PV}/0001-compile-server.patch" |
141 |
+ "${FILESDIR}/${PV}/0001-use-external-lib3ds.patch" |
142 |
+ "${FILESDIR}/${PV}/0001-use-external-openctm.patch" |
143 |
+ "${FILESDIR}/${PV}/0001-use-external-muParser.patch" |
144 |
+ "${FILESDIR}/${PV}/0001-use-external-bzip.patch" |
145 |
+ "${FILESDIR}/${PV}/0001-use-external-jhead.patch" |
146 |
+ "${FILESDIR}/${PV}/0001-use-external-glew.patch" |
147 |
+ #cause gnu stack quickstart related qa |
148 |
+ "${FILESDIR}/${PV}/0001-remove-not-sane-plugins.patch" |
149 |
+ "${FILESDIR}/${PV}/${P}-fix-plugins-path.patch" |
150 |
+ "${FILESDIR}/${PV}/${P}-align1.patch" |
151 |
+ "${FILESDIR}/${PV}/${P}-align2.patch" |
152 |
+ ) |
153 |
+ |
154 |
+src_prepare(){ |
155 |
+ mv "${WORKDIR}/vcglib-${VCG_VERSION}" "${WORKDIR}/vcglib" || die "vcglib mv failed" |
156 |
+ default |
157 |
+ #proof of patchset |
158 |
+ #remove libs that are being used from the system |
159 |
+ rm -r "external/lib3ds-1.3.0" || die "rm failed" |
160 |
+ rm -r "external/OpenCTM-1.0.3" || die "rm failed" |
161 |
+ rm -r "external/muparser_v132" || die "rm failed" |
162 |
+ rm -r "external/muparser_v225" || die "rm failed" |
163 |
+ rm -r "external/bzip2-1.0.5" || die "rm failed" |
164 |
+ rm -r "external/jhead-2.95" || die "rm failed" |
165 |
+ rm -r "external/glew-1.5.1" || die "rm failed" |
166 |
+ rm -r "external/glew-1.7.0" || die "rm failed" |
167 |
+ #we still depend on lm.h |
168 |
+ #rm -r "external" |
169 |
+ rm -r "distrib/plugins/U3D_W32" || die |
170 |
+ rm -r "distrib/plugins/U3D_OSX" || die |
171 |
+} |
172 |
+ |
173 |
+src_configure() { |
174 |
+ use minimal || eqmake5 -r meshlab_full.pro |
175 |
+ use minimal && eqmake5 -r meshlab_mini.pro |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ dobin distrib/{meshlab,meshlabserver} |
180 |
+ dolib distrib/libcommon.so.1.0.0 |
181 |
+ dosym libcommon.so.1.0.0 /usr/$(get_libdir)/libcommon.so.1 |
182 |
+ dosym libcommon.so.1 /usr/$(get_libdir)/libcommon.so |
183 |
+ exeinto /usr/$(get_libdir)/meshlab/plugins |
184 |
+ doexe distrib/plugins/*.so |
185 |
+ insinto /usr/share/meshlab/shaders |
186 |
+ doins -r distrib/shaders/* |
187 |
+ insinto /usr/share/meshlab/plugins |
188 |
+ doins -r distrib/plugins/* |
189 |
+ insinto /usr/share/meshlab/textures |
190 |
+ doins -r distrib/textures/* |
191 |
+ insinto /usr/share/meshlab/sample |
192 |
+ doins -r distrib/sample/* |
193 |
+ newicon "${S}"/meshlab/images/eye512.png "${PN}".png |
194 |
+ make_desktop_entry meshlab "Meshlab" "${PN}" Graphics |
195 |
+} |