meshlab: 20180627-beta -> 20190129-beta.
Patches Based on Arch Linux versions: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f Also added more comments.
This commit is contained in:
parent
dbe6e52150
commit
f50fca7dc7
@ -1,13 +1,53 @@
|
|||||||
{ fetchFromGitHub, libGLU, llvmPackages, qtbase, qtscript, qtxmlpatterns }:
|
{ mkDerivation, lib, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, libGLU
|
||||||
|
, qtbase
|
||||||
|
, qtscript
|
||||||
|
, qtxmlpatterns
|
||||||
|
, lib3ds
|
||||||
|
, bzip2
|
||||||
|
, muparser
|
||||||
|
, levmar
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
meshlabRev = "d596d7c086c51fbdfb56050f9c30b55dd0286d4c";
|
meshlabRev = "25f3d17b1d1d47ddc51179cb955f3027b7638745";
|
||||||
vcglibRev = "6c3c940e34327322507c703889f9f1cfa73ab183";
|
vcglibRev = "910da4c3e310f2e6557bd7a39c4f1529e61573e5";
|
||||||
# ^ this should be the latest commit in the vcglib devel branch at the time of the meshlab revision
|
# ^ this should be the latest commit in the vcglib devel branch at the time of the meshlab revision
|
||||||
|
# We keep it separate here instead of using the `vcg` nix package because
|
||||||
|
# as of writing, meshlab upstream does not seem to follow a proper
|
||||||
|
# release process, and the other dependencies of `vcg` may no longer
|
||||||
|
# work when we upgrade it for the purpose of meshlab.
|
||||||
|
|
||||||
stdenv = llvmPackages.stdenv; # only building with clang seems to be tested upstream
|
# Unfixed upstream compile error; see
|
||||||
in stdenv.mkDerivation {
|
# https://github.com/cnr-isti-vclab/meshlab/issues/188#issuecomment-364785362
|
||||||
name = "meshlab-20180627-beta";
|
# that has with fixed line endings.
|
||||||
|
import_bundle_out_patch = fetchpatch {
|
||||||
|
name = "import_bundle_out.patch";
|
||||||
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/import_bundle_out.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||||
|
sha256 = "1g6nli15i3fjd6jsgkxvb33kzbcv67xjkc3jv9r51lrwlm1ifzxi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Reduces amount of vendored libraries, fixes `/linux` vs `linux-g++`
|
||||||
|
# directory name linker errors.
|
||||||
|
external_patch = fetchpatch {
|
||||||
|
name = "external.patch";
|
||||||
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/external.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||||
|
sha256 = "1rxwkxhmxis1420rc1w7dg89gkmym68lpszsq6snl6dzpl3ingsb";
|
||||||
|
};
|
||||||
|
_3ds_patch = fetchpatch {
|
||||||
|
name = "3ds.patch";
|
||||||
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/3ds.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||||
|
sha256 = "1w435b7p1ggi2bzib4yyszmk54drjgpbn8n9mnsk1slsxnp2vmg8";
|
||||||
|
};
|
||||||
|
muparser_patch = fetchpatch {
|
||||||
|
name = "muparser.patch";
|
||||||
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/muparser.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||||
|
sha256 = "1sf7xqwc2j8xxdx2yklwifii9qqgknvx6ahk2hq76mg78ry1nzhq";
|
||||||
|
};
|
||||||
|
|
||||||
|
in mkDerivation {
|
||||||
|
name = "meshlab-20190129-beta";
|
||||||
|
|
||||||
srcs =
|
srcs =
|
||||||
[
|
[
|
||||||
@ -15,38 +55,54 @@ in stdenv.mkDerivation {
|
|||||||
owner = "cnr-isti-vclab";
|
owner = "cnr-isti-vclab";
|
||||||
repo = "meshlab";
|
repo = "meshlab";
|
||||||
rev = meshlabRev;
|
rev = meshlabRev;
|
||||||
sha256 = "0xi7wiyy0yi545l5qvccbqahlcsf70mhx829gf7bq29640si4rax";
|
sha256 = "16d2i91hrxvrr5p0k33g3fzis9zp4gsy3n5y2nhafvsgdmaidiij";
|
||||||
name = "meshlab-${meshlabRev}";
|
name = "meshlab-${meshlabRev}";
|
||||||
})
|
})
|
||||||
(fetchFromGitHub {
|
(fetchFromGitHub {
|
||||||
owner = "cnr-isti-vclab";
|
owner = "cnr-isti-vclab";
|
||||||
repo = "vcglib";
|
repo = "vcglib";
|
||||||
rev = vcglibRev;
|
rev = vcglibRev;
|
||||||
sha256 = "0jfgjvf21y9ncmyr7caipy3ardhig7hh9z8miy885c99b925hhwd";
|
sha256 = "0xpnjpwpj57hgai184rzyk9lbq6d9vbjzr477dvl5nplpwa420m1";
|
||||||
name = "vcglib-${vcglibRev}";
|
name = "vcglib-${vcglibRev}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
sourceRoot = "meshlab-${meshlabRev}";
|
sourceRoot = "meshlab-${meshlabRev}";
|
||||||
|
|
||||||
|
# Meshlab is not format-security clean; without disabling hardening, we get:
|
||||||
|
# ../../external/qhull-2003.1/src/io.c:2169:3: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||||
|
# fprintf(fp, endfmt);
|
||||||
|
# ^~~~~~~
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
patches = [ ./fix-20180627-beta.patch ];
|
prePatch =
|
||||||
|
''
|
||||||
|
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
||||||
|
mv ../vcglib-${vcglibRev} ../vcglib
|
||||||
|
|
||||||
|
# Make all source files writable so that patches can be applied.
|
||||||
|
chmod -R u+w ..
|
||||||
|
|
||||||
|
patch -Np1 --directory=../vcglib -i ${import_bundle_out_patch}
|
||||||
|
|
||||||
|
patch -Np1 -i ${external_patch}
|
||||||
|
# Individual libraries
|
||||||
|
patch -Np1 -i ${_3ds_patch}
|
||||||
|
patch -Np1 -i ${muparser_patch}
|
||||||
|
''
|
||||||
|
;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
|
||||||
mv ../vcglib-${vcglibRev} ../vcglib
|
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
||||||
export QMAKESPEC="linux-clang"
|
|
||||||
|
|
||||||
pushd external
|
pushd external
|
||||||
qmake -recursive external.pro
|
qmake -recursive $QMAKE_FLAGS external.pro
|
||||||
buildPhase
|
buildPhase
|
||||||
popd
|
popd
|
||||||
qmake -recursive meshlab_full.pro
|
qmake -recursive $QMAKE_FLAGS meshlab_full.pro
|
||||||
buildPhase
|
buildPhase
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -57,13 +113,22 @@ in stdenv.mkDerivation {
|
|||||||
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ libGLU llvmPackages.openmp qtbase qtscript qtxmlpatterns ];
|
buildInputs = [
|
||||||
|
libGLU
|
||||||
|
qtbase
|
||||||
|
qtscript
|
||||||
|
qtxmlpatterns
|
||||||
|
lib3ds
|
||||||
|
bzip2
|
||||||
|
muparser
|
||||||
|
levmar
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A system for processing and editing 3D triangular meshes.";
|
description = "A system for processing and editing 3D triangular meshes.";
|
||||||
homepage = http://www.meshlab.net/;
|
homepage = http://www.meshlab.net/;
|
||||||
license = stdenv.lib.licenses.gpl3;
|
license = lib.licenses.gpl3;
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
maintainers = with lib.maintainers; [viric];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = with lib.platforms; linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
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 <QFileDialog>
|
|
||||||
+#include <QAction>
|
|
||||||
|
|
||||||
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 <QMap>
|
|
||||||
+#include <QSlider>
|
|
||||||
+#include <QLineEdit>
|
|
||||||
|
|
||||||
class QGLWidget;
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user