meshlab: 2020.07 -> 2020.12

This commit is contained in:
Thiago Franco de Moraes 2021-03-13 18:18:17 -03:00
parent 312390ca50
commit c240077301
No known key found for this signature in database
GPG Key ID: 1B96996EE6559B7A

View File

@ -1,7 +1,6 @@
{ mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, libGLU
, qtbase
, qtscript
@ -19,13 +18,13 @@
mkDerivation rec {
pname = "meshlab";
version = "2020.07";
version = "2020.12";
src = fetchFromGitHub {
owner = "cnr-isti-vclab";
repo = "meshlab";
rev = "Meshlab-${version}";
sha256 = "0vj849b57zk3k6lx35zzcjhr9gdy4hxqnnkb8chwy7hw262cm3ri";
sha256 = "QrnqXEVqI1ADUYWalZ0h/0+xS+gDZTinm0weT39onw0=";
fetchSubmodules = true; # for vcglib
};
@ -46,17 +45,11 @@ mkDerivation rec {
nativeBuildInputs = [ cmake ];
patches = [
# Make cmake use the system qhull. The next meshlab will not need this patch because it is already in master.
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/cnr-isti-vclab/meshlab/pull/747.patch";
sha256 = "0wx9f6zn458xz3lsqcgvsbwh1pgi3g0lah93nlbsb0sagng7n565";
})
];
preConfigure = ''
substituteAll ${./meshlab.desktop} install/linux/resources/meshlab.desktop
cd src
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
cmakeDir=$PWD/src
mkdir ../build
cd ../build
'';
cmakeFlags = [
@ -75,19 +68,12 @@ mkDerivation rec {
postFixup = ''
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlabserver-wrapped
'';
# Meshlab is not format-security clean; without disabling hardening, we get:
# src/common/GLLogStream.h:61:37: error: format not a string literal and no format arguments [-Werror=format-security]
# 61 | int chars_written = snprintf(buf, buf_size, f, std::forward<Ts>(ts)...);
# |
hardeningDisable = [ "format" ];
meta = {
description = "A system for processing and editing 3D triangular meshes";
homepage = "https://www.meshlab.net/";
license = lib.licenses.gpl3;
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux;
};