From 6bdb20dec0bf853f2c8a18951b527144a37ba98c Mon Sep 17 00:00:00 2001 From: Patrick Chilton Date: Tue, 14 Aug 2018 16:50:28 +0800 Subject: [PATCH] meshlab: 2016.02 -> 20180627-beta --- .../applications/graphics/meshlab/default.nix | 23 ++--- .../graphics/meshlab/fix-2016.02.patch | 88 ------------------- .../graphics/meshlab/fix-20180627-beta.patch | 25 ++++++ 3 files changed, 38 insertions(+), 98 deletions(-) delete mode 100644 pkgs/applications/graphics/meshlab/fix-2016.02.patch create mode 100644 pkgs/applications/graphics/meshlab/fix-20180627-beta.patch diff --git a/pkgs/applications/graphics/meshlab/default.nix b/pkgs/applications/graphics/meshlab/default.nix index eaaabe8fd395..bd5dea8014d6 100644 --- a/pkgs/applications/graphics/meshlab/default.nix +++ b/pkgs/applications/graphics/meshlab/default.nix @@ -1,10 +1,13 @@ -{ stdenv, fetchFromGitHub, libGLU, qtbase, qtscript, qtxmlpatterns }: +{ fetchFromGitHub, libGLU, llvmPackages, qtbase, qtscript, qtxmlpatterns }: let - meshlabRev = "5700f5474c8f90696a8925e2a209a0a8ab506662"; - vcglibRev = "a8e87662b63ee9f4ded5d4699b28d74183040803"; + meshlabRev = "d596d7c086c51fbdfb56050f9c30b55dd0286d4c"; + vcglibRev = "6c3c940e34327322507c703889f9f1cfa73ab183"; + # ^ this should be the latest commit in the vcglib devel branch at the time of the meshlab revision + + stdenv = llvmPackages.stdenv; # only building with clang seems to be tested upstream in stdenv.mkDerivation { - name = "meshlab-2016.12"; + name = "meshlab-20180627-beta"; srcs = [ @@ -12,31 +15,32 @@ in stdenv.mkDerivation { owner = "cnr-isti-vclab"; repo = "meshlab"; rev = meshlabRev; - sha256 = "0srrp7zhi86dsg4zsx1615gr26barz38zdl8s03zq6vm1dgzl3cc"; + sha256 = "0xi7wiyy0yi545l5qvccbqahlcsf70mhx829gf7bq29640si4rax"; name = "meshlab-${meshlabRev}"; }) (fetchFromGitHub { owner = "cnr-isti-vclab"; repo = "vcglib"; rev = vcglibRev; - sha256 = "0jh8jc8rn7rci8qr3q03q574fk2hsc3rllysck41j8xkr3rmxz2f"; + sha256 = "0jfgjvf21y9ncmyr7caipy3ardhig7hh9z8miy885c99b925hhwd"; name = "vcglib-${vcglibRev}"; }) ]; sourceRoot = "meshlab-${meshlabRev}"; - patches = [ ./fix-2016.02.patch ]; - hardeningDisable = [ "format" ]; enableParallelBuilding = true; + patches = [ ./fix-20180627-beta.patch ]; + buildPhase = '' # 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" + export QMAKESPEC="linux-clang" pushd external qmake -recursive external.pro @@ -53,7 +57,7 @@ in stdenv.mkDerivation { ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver ''; - buildInputs = [ libGLU qtbase qtscript qtxmlpatterns ]; + buildInputs = [ libGLU llvmPackages.openmp qtbase qtscript qtxmlpatterns ]; meta = { description = "A system for processing and editing 3D triangular meshes."; @@ -61,6 +65,5 @@ in stdenv.mkDerivation { license = stdenv.lib.licenses.gpl3; maintainers = with stdenv.lib.maintainers; [viric]; platforms = with stdenv.lib.platforms; linux; - broken = true; # 2018-04-11 }; } diff --git a/pkgs/applications/graphics/meshlab/fix-2016.02.patch b/pkgs/applications/graphics/meshlab/fix-2016.02.patch deleted file mode 100644 index ebccccc00a29..000000000000 --- a/pkgs/applications/graphics/meshlab/fix-2016.02.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 0fd17cd2b6d57e8a2a981a70115c2565ee076d0f Mon Sep 17 00:00:00 2001 -From: Marco Callieri -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::epsilon()) - { --- -2.15.0 - - -From 33cfd5801e59b6c9e34360c75112e6dcb88d807b Mon Sep 17 00:00:00 2001 -From: Marco Callieri -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 - #include -+#include - - 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::epsilon()) - { --- -2.15.0 - - -From d717e44f4134ebee03322a6a2a56fce626084a3c Mon Sep 17 00:00:00 2001 -From: Patrick Chilton -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 - diff --git a/pkgs/applications/graphics/meshlab/fix-20180627-beta.patch b/pkgs/applications/graphics/meshlab/fix-20180627-beta.patch new file mode 100644 index 000000000000..177b8e90c574 --- /dev/null +++ b/pkgs/applications/graphics/meshlab/fix-20180627-beta.patch @@ -0,0 +1,25 @@ +diff --git a/src/meshlabplugins/edit_paint/paintbox.cpp b/src/meshlabplugins/edit_paint/paintbox.cpp +index 2097a5b..6bcd1a4 100644 +--- a/src/meshlabplugins/edit_paint/paintbox.cpp ++++ b/src/meshlabplugins/edit_paint/paintbox.cpp +@@ -23,6 +23,7 @@ + + #include "paintbox.h" + #include ++#include + + Paintbox::Paintbox(QWidget * parent, Qt::WindowFlags flags) : QWidget(parent, flags) + { +diff --git a/src/meshlabplugins/render_gdp/shaderDialog.h b/src/meshlabplugins/render_gdp/shaderDialog.h +index a62d3b5..7eb1594 100644 +--- a/src/meshlabplugins/render_gdp/shaderDialog.h ++++ b/src/meshlabplugins/render_gdp/shaderDialog.h +@@ -32,6 +32,8 @@ + #include "shaderStructs.h" + #include "ui_shaderDialog.h" + #include ++#include ++#include + + class QGLWidget; +