git.iko.soy/typeable/nixpkgs
on master help sign in
meshlab: 1.3.3 -> 2016.12
commit38e2228a3540af86e88858ca465cb07c40f102f6 authorPatrick Chilton <chpatrick@gmail.com> dateMon 4 Dec 2017, 14:59 (9 years ago) parent9d45624
4 files changed+129−40
pkgs/applications/graphics/meshlab/default.nix+40−26 pkgs/applications/graphics/meshlab/fix-2016.02.patch+88 pkgs/applications/graphics/meshlab/include-unistd.diff−13 pkgs/top-level/all-packages.nix+1−1
pkgs/applications/graphics/meshlab/default.nix+40−26
@@ -1,51 +1,65 @@
1−{ stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip, vcg }:
1+{ stdenv, fetchFromGitHub, mesa_glu, qtbase, qtscript, qtxmlpatterns }:
22
3−stdenv.mkDerivation rec {
4− name = "meshlab-1.3.3";
3+let
4+ meshlabRev = "5700f5474c8f90696a8925e2a209a0a8ab506662";
5+ vcglibRev = "a8e87662b63ee9f4ded5d4699b28d74183040803";
6+in stdenv.mkDerivation {
7+ name = "meshlab-2016.12";
58
6− src = fetchurl {
7− url = "mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.3.3/MeshLabSrc_AllInc_v133.tgz";
8− sha256 = "03wqaibfbfag2w1zi1a5z6h546r9d7pg2sjl5pwg24w7yp8rr0n9";
9− };
9+ srcs =
10+ [
11+ (fetchFromGitHub {
12+ owner = "cnr-isti-vclab";
13+ repo = "meshlab";
14+ rev = meshlabRev;
15+ sha256 = "0srrp7zhi86dsg4zsx1615gr26barz38zdl8s03zq6vm1dgzl3cc";
16+ name = "meshlab-${meshlabRev}";
17+ })
18+ (fetchFromGitHub {
19+ owner = "cnr-isti-vclab";
20+ repo = "vcglib";
21+ rev = vcglibRev;
22+ sha256 = "0jh8jc8rn7rci8qr3q03q574fk2hsc3rllysck41j8xkr3rmxz2f";
23+ name = "vcglib-${vcglibRev}";
24+ })
25+ ];
1026
11− # I don't know why I need this; without this, the rpath set at the beginning of the
12− # buildPhase gets removed from the 'meshlab' binary
13− dontPatchELF = true;
27+ sourceRoot = "meshlab-${meshlabRev}";
1428
15− patches = [ ./include-unistd.diff ];
29+ patches = [ ./fix-2016.02.patch ];
1630
1731 hardeningDisable = [ "format" ];
32+ enableParallelBuilding = true;
1833
1934 buildPhase = ''
20− mkdir -p "$out/include"
35+ # MeshLab has ../vcglib hardcoded everywhere, so move the source dir
36+ mv ../vcglib-${vcglibRev} ../vcglib
37+
38+ cd src
2139 export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
22− cd meshlab/src
40+
2341 pushd external
2442 qmake -recursive external.pro
25− make
43+ buildPhase
2644 popd
2745 qmake -recursive meshlab_full.pro
28− make
46+ buildPhase
2947 '';
3048
3149 installPhase = ''
32− mkdir -p $out/opt/meshlab $out/bin $out/lib
33− pushd distrib
34− cp -R * $out/opt/meshlab
35− popd
50+ mkdir -p $out/opt/meshlab $out/bin
51+ cp -Rv distrib/* $out/opt/meshlab
3652 ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
53+ ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
3754 '';
3855
39− sourceRoot = ".";
40−
41− buildInputs = [ qt4 unzip vcg ];
56+ buildInputs = [ mesa_glu qtbase qtscript qtxmlpatterns ];
4257
4358 meta = {
44− description = "System for the processing and editing of unstructured 3D triangular meshes";
45− homepage = http://meshlab.sourceforge.net/;
46− license = stdenv.lib.licenses.gpl2Plus;
59+ description = "A system for processing and editing 3D triangular meshes.";
60+ homepage = http://www.meshlab.net/;
61+ license = stdenv.lib.licenses.gpl3;
4762 maintainers = with stdenv.lib.maintainers; [viric];
4863 platforms = with stdenv.lib.platforms; linux;
49− broken = true;
5064 };
5165}
pkgs/applications/graphics/meshlab/fix-2016.02.patchnew file+88
@@ -0,0 +1,88 @@
1+From 0fd17cd2b6d57e8a2a981a70115c2565ee076d0f Mon Sep 17 00:00:00 2001
2+From: Marco Callieri <callieri@isti.cnr.it>
3+Date: Mon, 9 Jan 2017 16:06:14 +0100
4+Subject: [PATCH 1/3] resolved ambiguity for abs overloads
5+
6+
7+diff --git a/src/meshlabplugins/edit_quality/eqhandle.cpp b/src/meshlabplugins/edit_quality/eqhandle.cpp
8+index 364d53bf..ef3d4a2d 100644
9+--- a/src/meshlabplugins/edit_quality/eqhandle.cpp
10++++ b/src/meshlabplugins/edit_quality/eqhandle.cpp
11+@@ -83,7 +83,7 @@ void EqHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
12+ setCursor(Qt::OpenHandCursor);
13+
14+ QPointF newPos = event->scenePos();
15+- qreal handleOffset = abs(newPos.x()-pos().x());
16++ qreal handleOffset = std::fabs(newPos.x()-pos().x());
17+
18+ if (handleOffset >= std::numeric_limits<float>::epsilon())
19+ {
20+--
21+2.15.0
22+
23+
24+From 33cfd5801e59b6c9e34360c75112e6dcb88d807b Mon Sep 17 00:00:00 2001
25+From: Marco Callieri <callieri@isti.cnr.it>
26+Date: Tue, 10 Jan 2017 10:05:05 +0100
27+Subject: [PATCH 2/3] again, fabs ambiguity
28+
29+
30+diff --git a/src/meshlabplugins/edit_quality/eqhandle.cpp b/src/meshlabplugins/edit_quality/eqhandle.cpp
31+index ef3d4a2d..d29f8c45 100644
32+--- a/src/meshlabplugins/edit_quality/eqhandle.cpp
33++++ b/src/meshlabplugins/edit_quality/eqhandle.cpp
34+@@ -30,6 +30,7 @@ FIRST RELEASE
35+ #include "eqhandle.h"
36+ #include <QMouseEvent>
37+ #include <QGraphicsSceneMouseEvent>
38++#include <math.h>
39+
40+ EqHandle::EqHandle(CHART_INFO *environment_info, QColor color, QPointF position,
41+ EQUALIZER_HANDLE_TYPE type, EqHandle** handles, qreal* midHandlePercentilePosition, QDoubleSpinBox* spinbox,
42+@@ -83,7 +84,7 @@ void EqHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
43+ setCursor(Qt::OpenHandCursor);
44+
45+ QPointF newPos = event->scenePos();
46+- qreal handleOffset = std::fabs(newPos.x()-pos().x());
47++ qreal handleOffset = fabs(newPos.x()-pos().x());
48+
49+ if (handleOffset >= std::numeric_limits<float>::epsilon())
50+ {
51+--
52+2.15.0
53+
54+
55+From d717e44f4134ebee03322a6a2a56fce626084a3c Mon Sep 17 00:00:00 2001
56+From: Patrick Chilton <chpatrick@gmail.com>
57+Date: Mon, 4 Dec 2017 21:27:23 +0100
58+Subject: [PATCH 3/3] io_TXT -> io_txt
59+
60+
61+diff --git a/src/meshlab_full.pro b/src/meshlab_full.pro
62+index 6ea7f1db..2a95c127 100644
63+--- a/src/meshlab_full.pro
64++++ b/src/meshlab_full.pro
65+@@ -16,7 +16,7 @@ SUBDIRS = common \
66+ meshlabplugins/io_x3d \
67+ meshlabplugins/io_expe \
68+ meshlabplugins/io_pdb \
69+- plugins_experimental/io_TXT \
70++ plugins_experimental/io_txt \
71+ # Filter plugins
72+ meshlabplugins/filter_aging \
73+ meshlabplugins/filter_ao \
74+diff --git a/src/plugins_experimental/io_TXT/io_txt.cpp b/src/plugins_experimental/io_txt/io_txt.cpp
75+similarity index 100%
76+rename from src/plugins_experimental/io_TXT/io_txt.cpp
77+rename to src/plugins_experimental/io_txt/io_txt.cpp
78+diff --git a/src/plugins_experimental/io_TXT/io_txt.h b/src/plugins_experimental/io_txt/io_txt.h
79+similarity index 100%
80+rename from src/plugins_experimental/io_TXT/io_txt.h
81+rename to src/plugins_experimental/io_txt/io_txt.h
82+diff --git a/src/plugins_experimental/io_TXT/io_txt.pro b/src/plugins_experimental/io_txt/io_txt.pro
83+similarity index 100%
84+rename from src/plugins_experimental/io_TXT/io_txt.pro
85+rename to src/plugins_experimental/io_txt/io_txt.pro
86+--
87+2.15.0
88+
pkgs/applications/graphics/meshlab/include-unistd.diffdeleted−13
@@ -1,13 +0,0 @@
1−*** old/vcglib/wrap/ply/plystuff.h 2013-02-09 00:00:04.110705851 -0500
2−--- new/vcglib/wrap/ply/plystuff.h 2013-02-09 15:20:53.482205183 -0500
3−***************
4−*** 75,80 ****
5−--- 75,81 ----
6− #define pb_close _close
7− #define DIR_SEP "\\"
8− #else
9−+ #include <unistd.h>
10− #define pb_mkdir(n) mkdir(n,0755)
11− #define pb_access access
12− #define pb_stat stat
13−
pkgs/top-level/all-packages.nix+1−1
@@ -15724,7 +15724,7 @@ with pkgs;
1572415724
1572515725 merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { };
1572615726
15727− meshlab = callPackage ../applications/graphics/meshlab { };
15727+ meshlab = libsForQt5.callPackage ../applications/graphics/meshlab { };
1572815728
1572915729 metersLv2 = callPackage ../applications/audio/meters_lv2 { };
1573015730