meshlab: 1.3.3 -> 2016.12
This commit is contained in:
parent
9d45624007
commit
38e2228a35
4 changed files with 129 additions and 40 deletions
|
@ -1,51 +1,65 @@
|
|||
{ stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip, vcg }:
|
||||
{ stdenv, fetchFromGitHub, mesa_glu, qtbase, qtscript, qtxmlpatterns }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "meshlab-1.3.3";
|
||||
let
|
||||
meshlabRev = "5700f5474c8f90696a8925e2a209a0a8ab506662";
|
||||
vcglibRev = "a8e87662b63ee9f4ded5d4699b28d74183040803";
|
||||
in stdenv.mkDerivation {
|
||||
name = "meshlab-2016.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.3.3/MeshLabSrc_AllInc_v133.tgz";
|
||||
sha256 = "03wqaibfbfag2w1zi1a5z6h546r9d7pg2sjl5pwg24w7yp8rr0n9";
|
||||
};
|
||||
srcs =
|
||||
[
|
||||
(fetchFromGitHub {
|
||||
owner = "cnr-isti-vclab";
|
||||
repo = "meshlab";
|
||||
rev = meshlabRev;
|
||||
sha256 = "0srrp7zhi86dsg4zsx1615gr26barz38zdl8s03zq6vm1dgzl3cc";
|
||||
name = "meshlab-${meshlabRev}";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "cnr-isti-vclab";
|
||||
repo = "vcglib";
|
||||
rev = vcglibRev;
|
||||
sha256 = "0jh8jc8rn7rci8qr3q03q574fk2hsc3rllysck41j8xkr3rmxz2f";
|
||||
name = "vcglib-${vcglibRev}";
|
||||
})
|
||||
];
|
||||
|
||||
# I don't know why I need this; without this, the rpath set at the beginning of the
|
||||
# buildPhase gets removed from the 'meshlab' binary
|
||||
dontPatchELF = true;
|
||||
sourceRoot = "meshlab-${meshlabRev}";
|
||||
|
||||
patches = [ ./include-unistd.diff ];
|
||||
patches = [ ./fix-2016.02.patch ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p "$out/include"
|
||||
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
||||
mv ../vcglib-${vcglibRev} ../vcglib
|
||||
|
||||
cd src
|
||||
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
||||
cd meshlab/src
|
||||
|
||||
pushd external
|
||||
qmake -recursive external.pro
|
||||
make
|
||||
buildPhase
|
||||
popd
|
||||
qmake -recursive meshlab_full.pro
|
||||
make
|
||||
buildPhase
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/opt/meshlab $out/bin $out/lib
|
||||
pushd distrib
|
||||
cp -R * $out/opt/meshlab
|
||||
popd
|
||||
mkdir -p $out/opt/meshlab $out/bin
|
||||
cp -Rv distrib/* $out/opt/meshlab
|
||||
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
||||
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
||||
'';
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
buildInputs = [ qt4 unzip vcg ];
|
||||
buildInputs = [ mesa_glu qtbase qtscript qtxmlpatterns ];
|
||||
|
||||
meta = {
|
||||
description = "System for the processing and editing of unstructured 3D triangular meshes";
|
||||
homepage = http://meshlab.sourceforge.net/;
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
description = "A system for processing and editing 3D triangular meshes.";
|
||||
homepage = http://www.meshlab.net/;
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
88
pkgs/applications/graphics/meshlab/fix-2016.02.patch
Normal file
88
pkgs/applications/graphics/meshlab/fix-2016.02.patch
Normal file
|
@ -0,0 +1,88 @@
|
|||
From 0fd17cd2b6d57e8a2a981a70115c2565ee076d0f Mon Sep 17 00:00:00 2001
|
||||
From: Marco Callieri <callieri@isti.cnr.it>
|
||||
Date: Mon, 9 Jan 2017 16:06:14 +0100
|
||||
Subject: [PATCH 1/3] resolved ambiguity for abs overloads
|
||||
|
||||
|
||||
diff --git a/src/meshlabplugins/edit_quality/eqhandle.cpp b/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
index 364d53bf..ef3d4a2d 100644
|
||||
--- a/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
+++ b/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
@@ -83,7 +83,7 @@ void EqHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
|
||||
QPointF newPos = event->scenePos();
|
||||
- qreal handleOffset = abs(newPos.x()-pos().x());
|
||||
+ qreal handleOffset = std::fabs(newPos.x()-pos().x());
|
||||
|
||||
if (handleOffset >= std::numeric_limits<float>::epsilon())
|
||||
{
|
||||
--
|
||||
2.15.0
|
||||
|
||||
|
||||
From 33cfd5801e59b6c9e34360c75112e6dcb88d807b Mon Sep 17 00:00:00 2001
|
||||
From: Marco Callieri <callieri@isti.cnr.it>
|
||||
Date: Tue, 10 Jan 2017 10:05:05 +0100
|
||||
Subject: [PATCH 2/3] again, fabs ambiguity
|
||||
|
||||
|
||||
diff --git a/src/meshlabplugins/edit_quality/eqhandle.cpp b/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
index ef3d4a2d..d29f8c45 100644
|
||||
--- a/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
+++ b/src/meshlabplugins/edit_quality/eqhandle.cpp
|
||||
@@ -30,6 +30,7 @@ FIRST RELEASE
|
||||
#include "eqhandle.h"
|
||||
#include <QMouseEvent>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
+#include <math.h>
|
||||
|
||||
EqHandle::EqHandle(CHART_INFO *environment_info, QColor color, QPointF position,
|
||||
EQUALIZER_HANDLE_TYPE type, EqHandle** handles, qreal* midHandlePercentilePosition, QDoubleSpinBox* spinbox,
|
||||
@@ -83,7 +84,7 @@ void EqHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
|
||||
QPointF newPos = event->scenePos();
|
||||
- qreal handleOffset = std::fabs(newPos.x()-pos().x());
|
||||
+ qreal handleOffset = fabs(newPos.x()-pos().x());
|
||||
|
||||
if (handleOffset >= std::numeric_limits<float>::epsilon())
|
||||
{
|
||||
--
|
||||
2.15.0
|
||||
|
||||
|
||||
From d717e44f4134ebee03322a6a2a56fce626084a3c Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Chilton <chpatrick@gmail.com>
|
||||
Date: Mon, 4 Dec 2017 21:27:23 +0100
|
||||
Subject: [PATCH 3/3] io_TXT -> io_txt
|
||||
|
||||
|
||||
diff --git a/src/meshlab_full.pro b/src/meshlab_full.pro
|
||||
index 6ea7f1db..2a95c127 100644
|
||||
--- a/src/meshlab_full.pro
|
||||
+++ b/src/meshlab_full.pro
|
||||
@@ -16,7 +16,7 @@ SUBDIRS = common \
|
||||
meshlabplugins/io_x3d \
|
||||
meshlabplugins/io_expe \
|
||||
meshlabplugins/io_pdb \
|
||||
- plugins_experimental/io_TXT \
|
||||
+ plugins_experimental/io_txt \
|
||||
# Filter plugins
|
||||
meshlabplugins/filter_aging \
|
||||
meshlabplugins/filter_ao \
|
||||
diff --git a/src/plugins_experimental/io_TXT/io_txt.cpp b/src/plugins_experimental/io_txt/io_txt.cpp
|
||||
similarity index 100%
|
||||
rename from src/plugins_experimental/io_TXT/io_txt.cpp
|
||||
rename to src/plugins_experimental/io_txt/io_txt.cpp
|
||||
diff --git a/src/plugins_experimental/io_TXT/io_txt.h b/src/plugins_experimental/io_txt/io_txt.h
|
||||
similarity index 100%
|
||||
rename from src/plugins_experimental/io_TXT/io_txt.h
|
||||
rename to src/plugins_experimental/io_txt/io_txt.h
|
||||
diff --git a/src/plugins_experimental/io_TXT/io_txt.pro b/src/plugins_experimental/io_txt/io_txt.pro
|
||||
similarity index 100%
|
||||
rename from src/plugins_experimental/io_TXT/io_txt.pro
|
||||
rename to src/plugins_experimental/io_txt/io_txt.pro
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
*** old/vcglib/wrap/ply/plystuff.h 2013-02-09 00:00:04.110705851 -0500
|
||||
--- new/vcglib/wrap/ply/plystuff.h 2013-02-09 15:20:53.482205183 -0500
|
||||
***************
|
||||
*** 75,80 ****
|
||||
--- 75,81 ----
|
||||
#define pb_close _close
|
||||
#define DIR_SEP "\\"
|
||||
#else
|
||||
+ #include <unistd.h>
|
||||
#define pb_mkdir(n) mkdir(n,0755)
|
||||
#define pb_access access
|
||||
#define pb_stat stat
|
||||
|
|
@ -15724,7 +15724,7 @@ with pkgs;
|
|||
|
||||
merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { };
|
||||
|
||||
meshlab = callPackage ../applications/graphics/meshlab { };
|
||||
meshlab = libsForQt5.callPackage ../applications/graphics/meshlab { };
|
||||
|
||||
metersLv2 = callPackage ../applications/audio/meters_lv2 { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue