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 { mkDerivation
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, libGLU , libGLU
, qtbase , qtbase
, qtscript , qtscript
@ -19,13 +18,13 @@
mkDerivation rec { mkDerivation rec {
pname = "meshlab"; pname = "meshlab";
version = "2020.07"; version = "2020.12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cnr-isti-vclab"; owner = "cnr-isti-vclab";
repo = "meshlab"; repo = "meshlab";
rev = "Meshlab-${version}"; rev = "Meshlab-${version}";
sha256 = "0vj849b57zk3k6lx35zzcjhr9gdy4hxqnnkb8chwy7hw262cm3ri"; sha256 = "QrnqXEVqI1ADUYWalZ0h/0+xS+gDZTinm0weT39onw0=";
fetchSubmodules = true; # for vcglib fetchSubmodules = true; # for vcglib
}; };
@ -46,17 +45,11 @@ mkDerivation rec {
nativeBuildInputs = [ cmake ]; 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 = '' preConfigure = ''
substituteAll ${./meshlab.desktop} install/linux/resources/meshlab.desktop substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop
cd src cmakeDir=$PWD/src
mkdir ../build
cd ../build
''; '';
cmakeFlags = [ cmakeFlags = [
@ -75,19 +68,12 @@ mkDerivation rec {
postFixup = '' 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/.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 = { meta = {
description = "A system for processing and editing 3D triangular meshes"; description = "A system for processing and editing 3D triangular meshes";
homepage = "https://www.meshlab.net/"; homepage = "https://www.meshlab.net/";
license = lib.licenses.gpl3; license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ viric ]; maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux; platforms = with lib.platforms; linux;
}; };