meshlab: 1.3.3 -> 2016.12

authored by Patrick Chilton and committed by Bjørn Forsman 38e2228a 9d456240

+129 -40
+40 -26
pkgs/applications/graphics/meshlab/default.nix
··· 1 - { stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip, vcg }: 1 + { stdenv, fetchFromGitHub, mesa_glu, qtbase, qtscript, qtxmlpatterns }: 2 2 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"; 5 8 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 + ]; 10 26 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}"; 14 28 15 - patches = [ ./include-unistd.diff ]; 29 + patches = [ ./fix-2016.02.patch ]; 16 30 17 31 hardeningDisable = [ "format" ]; 32 + enableParallelBuilding = true; 18 33 19 34 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 21 39 export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS" 22 - cd meshlab/src 40 + 23 41 pushd external 24 42 qmake -recursive external.pro 25 - make 43 + buildPhase 26 44 popd 27 45 qmake -recursive meshlab_full.pro 28 - make 46 + buildPhase 29 47 ''; 30 48 31 49 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 36 52 ln -s $out/opt/meshlab/meshlab $out/bin/meshlab 53 + ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver 37 54 ''; 38 55 39 - sourceRoot = "."; 40 - 41 - buildInputs = [ qt4 unzip vcg ]; 56 + buildInputs = [ mesa_glu qtbase qtscript qtxmlpatterns ]; 42 57 43 58 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; 47 62 maintainers = with stdenv.lib.maintainers; [viric]; 48 63 platforms = with stdenv.lib.platforms; linux; 49 - broken = true; 50 64 }; 51 65 }
+88
pkgs/applications/graphics/meshlab/fix-2016.02.patch
··· 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 +
-13
pkgs/applications/graphics/meshlab/include-unistd.diff
··· 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 -
+1 -1
pkgs/top-level/all-packages.nix
··· 15724 15724 15725 15725 merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { }; 15726 15726 15727 - meshlab = callPackage ../applications/graphics/meshlab { }; 15727 + meshlab = libsForQt5.callPackage ../applications/graphics/meshlab { }; 15728 15728 15729 15729 metersLv2 = callPackage ../applications/audio/meters_lv2 { }; 15730 15730