diff options
author | Thiago Franco de Moraes <totonixsame@gmail.com> | 2020-08-02 20:27:15 -0300 |
---|---|---|
committer | Thiago Franco de Moraes <totonixsame@gmail.com> | 2020-09-03 23:17:11 -0300 |
commit | 48b902dcd78830dace0efacc1fd6d6711876a742 (patch) | |
tree | 659fcf590c13990ec5e09e9b8494db94faf70078 /pkgs | |
parent | 5af6febf48b6ad26fff848bb421f6b4652dd3c7b (diff) |
meshlab: 2020.03 -> 2020.07
Diffstat (limited to 'pkgs')
4 files changed, 21 insertions, 29 deletions
diff --git a/pkgs/applications/graphics/meshlab/default.nix b/pkgs/applications/graphics/meshlab/default.nix index 8e8032a1f31bf..bde8999eb41cc 100644 --- a/pkgs/applications/graphics/meshlab/default.nix +++ b/pkgs/applications/graphics/meshlab/default.nix @@ -1,4 +1,6 @@ -{ mkDerivation, lib, fetchFromGitHub +{ mkDerivation +, lib +, fetchFromGitHub , fetchpatch , libGLU , qtbase @@ -17,13 +19,13 @@ mkDerivation rec { pname = "meshlab"; - version = "2020.03"; + version = "2020.07"; src = fetchFromGitHub { owner = "cnr-isti-vclab"; repo = "meshlab"; - rev = "f3568e75c9aed6da8bb105a1c8ac7ebbe00e4536"; - sha256 = "17g9icgy1w67afxiljzxk94dyhj4f336gjxn0bhppd58xfqh8w4g"; + rev = "Meshlab-${version}"; + sha256 = "0vj849b57zk3k6lx35zzcjhr9gdy4hxqnnkb8chwy7hw262cm3ri"; fetchSubmodules = true; # for vcglib }; @@ -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 @@ -62,7 +65,7 @@ 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 @@ -70,6 +73,11 @@ mkDerivation rec { "-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)...); @@ -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; }; } diff --git a/pkgs/applications/graphics/meshlab/fix-version.patch b/pkgs/applications/graphics/meshlab/fix-version.patch deleted file mode 100644 index 5184dfcba25d0..0000000000000 --- a/pkgs/applications/graphics/meshlab/fix-version.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- a/src/common/mlapplication.h -+++ b/src/common/mlapplication.h -@@ -23 +23 @@ public: -- return QString::number(compileTimeYear()) + "." + (compileTimeMonth() < 10 ? "0" + QString::number(compileTimeMonth()) : QString::number(compileTimeMonth())); -+ return "@version@"; diff --git a/pkgs/applications/graphics/meshlab/meshlab.desktop b/pkgs/applications/graphics/meshlab/meshlab.desktop index a9c7ef7978426..aa8de186440d5 100644 --- a/pkgs/applications/graphics/meshlab/meshlab.desktop +++ b/pkgs/applications/graphics/meshlab/meshlab.desktop @@ -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 \ No newline at end of file diff --git a/pkgs/applications/graphics/meshlab/no-build-date.patch b/pkgs/applications/graphics/meshlab/no-build-date.patch deleted file mode 100644 index 9588596e5b2c2..0000000000000 --- a/pkgs/applications/graphics/meshlab/no-build-date.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/meshlab/mainwindow_RunTime.cpp -+++ b/src/meshlab/mainwindow_RunTime.cpp -@@ -3312 +3312 @@ void MainWindow::about() -- temp.labelMLName->setText(MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize))+" (built on "+__DATE__+")"); -+ temp.labelMLName->setText(MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize))); ---- a/src/meshlabplugins/filter_plymc/plymc_main.cpp -+++ b/src/meshlabplugins/filter_plymc/plymc_main.cpp -@@ -121 +121 @@ int main(int argc, char *argv[]) -- printf( "\n PlyMC "_PLYMC_VER" ("__DATE__")\n" -+ printf( "\n PlyMC "_PLYMC_VER"\n" |