meshlab: 2020.03 -> 2020.07

+21 -29
+20 -12
pkgs/applications/graphics/meshlab/default.nix
··· 1 - { mkDerivation, lib, fetchFromGitHub 2 , fetchpatch 3 , libGLU 4 , qtbase ··· 17 18 mkDerivation rec { 19 pname = "meshlab"; 20 - version = "2020.03"; 21 22 src = fetchFromGitHub { 23 owner = "cnr-isti-vclab"; 24 repo = "meshlab"; 25 - rev = "f3568e75c9aed6da8bb105a1c8ac7ebbe00e4536"; 26 - sha256 = "17g9icgy1w67afxiljzxk94dyhj4f336gjxn0bhppd58xfqh8w4g"; 27 fetchSubmodules = true; # for vcglib 28 }; 29 ··· 44 45 nativeBuildInputs = [ cmake ]; 46 47 - patches = [ ./no-build-date.patch ]; 48 - 49 - # MeshLab computes the version based on the build date, remove when https://github.com/cnr-isti-vclab/meshlab/issues/622 is fixed. 50 - postPatch = '' 51 - substituteAll ${./fix-version.patch} /dev/stdout | patch -p1 --binary 52 - ''; 53 54 preConfigure = '' 55 substituteAll ${./meshlab.desktop} install/linux/resources/meshlab.desktop ··· 62 "-DALLOW_BUNDLED_LIB3DS=OFF" 63 "-DALLOW_BUNDLED_MUPARSER=OFF" 64 "-DALLOW_BUNDLED_QHULL=OFF" 65 - # disable when available in nixpkgs 66 "-DALLOW_BUNDLED_OPENCTM=ON" 67 "-DALLOW_BUNDLED_SSYNTH=ON" 68 # some plugins are disabled unless these are on 69 "-DALLOW_BUNDLED_NEWUOA=ON" 70 "-DALLOW_BUNDLED_LEVMAR=ON" 71 ]; 72 73 # Meshlab is not format-security clean; without disabling hardening, we get: 74 # src/common/GLLogStream.h:61:37: error: format not a string literal and no format arguments [-Werror=format-security] ··· 82 description = "A system for processing and editing 3D triangular meshes."; 83 homepage = "http://www.meshlab.net/"; 84 license = lib.licenses.gpl3; 85 - maintainers = with lib.maintainers; [viric]; 86 platforms = with lib.platforms; linux; 87 }; 88 }
··· 1 + { mkDerivation 2 + , lib 3 + , fetchFromGitHub 4 , fetchpatch 5 , libGLU 6 , qtbase ··· 19 20 mkDerivation rec { 21 pname = "meshlab"; 22 + version = "2020.07"; 23 24 src = fetchFromGitHub { 25 owner = "cnr-isti-vclab"; 26 repo = "meshlab"; 27 + rev = "Meshlab-${version}"; 28 + sha256 = "0vj849b57zk3k6lx35zzcjhr9gdy4hxqnnkb8chwy7hw262cm3ri"; 29 fetchSubmodules = true; # for vcglib 30 }; 31 ··· 46 47 nativeBuildInputs = [ cmake ]; 48 49 + patches = [ 50 + # Make cmake use the system qhull. The next meshlab will not need this patch because it is already in master. 51 + (fetchpatch { 52 + url = "https://patch-diff.githubusercontent.com/raw/cnr-isti-vclab/meshlab/pull/747.patch"; 53 + sha256 = "0wx9f6zn458xz3lsqcgvsbwh1pgi3g0lah93nlbsb0sagng7n565"; 54 + }) 55 + ]; 56 57 preConfigure = '' 58 substituteAll ${./meshlab.desktop} install/linux/resources/meshlab.desktop ··· 65 "-DALLOW_BUNDLED_LIB3DS=OFF" 66 "-DALLOW_BUNDLED_MUPARSER=OFF" 67 "-DALLOW_BUNDLED_QHULL=OFF" 68 + # disable when available in nixpkgs 69 "-DALLOW_BUNDLED_OPENCTM=ON" 70 "-DALLOW_BUNDLED_SSYNTH=ON" 71 # some plugins are disabled unless these are on 72 "-DALLOW_BUNDLED_NEWUOA=ON" 73 "-DALLOW_BUNDLED_LEVMAR=ON" 74 ]; 75 + 76 + postFixup = '' 77 + patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped 78 + patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlabserver-wrapped 79 + ''; 80 81 # Meshlab is not format-security clean; without disabling hardening, we get: 82 # src/common/GLLogStream.h:61:37: error: format not a string literal and no format arguments [-Werror=format-security] ··· 90 description = "A system for processing and editing 3D triangular meshes."; 91 homepage = "http://www.meshlab.net/"; 92 license = lib.licenses.gpl3; 93 + maintainers = with lib.maintainers; [ viric ]; 94 platforms = with lib.platforms; linux; 95 }; 96 }
-5
pkgs/applications/graphics/meshlab/fix-version.patch
··· 1 - --- a/src/common/mlapplication.h 2 - +++ b/src/common/mlapplication.h 3 - @@ -23 +23 @@ public: 4 - - return QString::number(compileTimeYear()) + "." + (compileTimeMonth() < 10 ? "0" + QString::number(compileTimeMonth()) : QString::number(compileTimeMonth())); 5 - + return "@version@";
···
+1 -2
pkgs/applications/graphics/meshlab/meshlab.desktop
··· 10 TryExec=@out@/bin/meshlab 11 Icon=@out@/share/icons/hicolor/meshlab.png 12 Terminal=false 13 - MimeType=model/mesh;application/x-3ds;image/x-3ds;application/sla; 14 Categories=Graphics;3DGraphics;Viewer;Qt; 15 - END_DESKTOP
··· 10 TryExec=@out@/bin/meshlab 11 Icon=@out@/share/icons/hicolor/meshlab.png 12 Terminal=false 13 + 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; 14 Categories=Graphics;3DGraphics;Viewer;Qt;
-10
pkgs/applications/graphics/meshlab/no-build-date.patch
··· 1 - --- a/src/meshlab/mainwindow_RunTime.cpp 2 - +++ b/src/meshlab/mainwindow_RunTime.cpp 3 - @@ -3312 +3312 @@ void MainWindow::about() 4 - - temp.labelMLName->setText(MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize))+" (built on "+__DATE__+")"); 5 - + temp.labelMLName->setText(MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize))); 6 - --- a/src/meshlabplugins/filter_plymc/plymc_main.cpp 7 - +++ b/src/meshlabplugins/filter_plymc/plymc_main.cpp 8 - @@ -121 +121 @@ int main(int argc, char *argv[]) 9 - - printf( "\n PlyMC "_PLYMC_VER" ("__DATE__")\n" 10 - + printf( "\n PlyMC "_PLYMC_VER"\n"
···