Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshlab: 2020.03 -> 2020.07 #94579

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions pkgs/applications/graphics/meshlab/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ mkDerivation, lib, fetchFromGitHub
{ mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, libGLU
, qtbase
Expand All @@ -17,13 +19,13 @@

mkDerivation rec {
pname = "meshlab";
version = "2020.03";
version = "2020.07";
tfmoraes marked this conversation as resolved.
Show resolved Hide resolved

src = fetchFromGitHub {
owner = "cnr-isti-vclab";
repo = "meshlab";
rev = "f3568e75c9aed6da8bb105a1c8ac7ebbe00e4536";
sha256 = "17g9icgy1w67afxiljzxk94dyhj4f336gjxn0bhppd58xfqh8w4g";
rev = "Meshlab-${version}";
sha256 = "0vj849b57zk3k6lx35zzcjhr9gdy4hxqnnkb8chwy7hw262cm3ri";
fetchSubmodules = true; # for vcglib
};

Expand All @@ -44,12 +46,13 @@ mkDerivation rec {

nativeBuildInputs = [ cmake ];

patches = [ ./no-build-date.patch ];

# MeshLab computes the version based on the build date, remove when https://github.com/cnr-isti-vclab/meshlab/issues/622 is fixed.
postPatch = ''
substituteAll ${./fix-version.patch} /dev/stdout | patch -p1 --binary
'';
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
Expand All @@ -62,14 +65,19 @@ mkDerivation rec {
"-DALLOW_BUNDLED_LIB3DS=OFF"
"-DALLOW_BUNDLED_MUPARSER=OFF"
"-DALLOW_BUNDLED_QHULL=OFF"
# disable when available in nixpkgs
# disable when available in nixpkgs
"-DALLOW_BUNDLED_OPENCTM=ON"
"-DALLOW_BUNDLED_SSYNTH=ON"
# some plugins are disabled unless these are on
"-DALLOW_BUNDLED_NEWUOA=ON"
"-DALLOW_BUNDLED_LEVMAR=ON"
];

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)...);
Expand All @@ -82,7 +90,7 @@ mkDerivation rec {
description = "A system for processing and editing 3D triangular meshes.";
homepage = "http://www.meshlab.net/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [viric];
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; linux;
};
}
5 changes: 0 additions & 5 deletions pkgs/applications/graphics/meshlab/fix-version.patch

This file was deleted.

3 changes: 1 addition & 2 deletions pkgs/applications/graphics/meshlab/meshlab.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ Exec=@out@/bin/meshlab %U
TryExec=@out@/bin/meshlab
Icon=@out@/share/icons/hicolor/meshlab.png
Terminal=false
MimeType=model/mesh;application/x-3ds;image/x-3ds;application/sla;
MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf;
Categories=Graphics;3DGraphics;Viewer;Qt;
END_DESKTOP
10 changes: 0 additions & 10 deletions pkgs/applications/graphics/meshlab/no-build-date.patch

This file was deleted.