meshlab: 2022.02 -> 2023.12

This commit is contained in:
Guilhem Saurel 2024-03-26 01:05:14 +01:00 committed by Sandro Jäckel
parent e71d969ca7
commit 74900367e8
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -15,21 +15,27 @@
, qhull , qhull
, cmake , cmake
, cgal , cgal
, boost179 , boost
, mpfr , mpfr
, xercesc , xercesc
, tbb
, embree
, vcg
, libigl
, corto
, openctm
, structuresynth
}: }:
mkDerivation rec { mkDerivation rec {
pname = "meshlab"; pname = "meshlab";
version = "2022.02"; version = "2023.12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cnr-isti-vclab"; owner = "cnr-isti-vclab";
repo = "meshlab"; repo = "meshlab";
rev = "MeshLab-${version}"; rev = "MeshLab-${version}";
sha256 = "sha256-jcc3PfsiIeYyipteZgzd0NwZgFFgR/mMBiaInzhOcDY="; sha256 = "sha256-AdUAWS741RQclYaSE3Tz1/I0YSinNAnfSaqef+Tib8Y=";
fetchSubmodules = true; # for vcglib
}; };
buildInputs = [ buildInputs = [
@ -46,38 +52,38 @@ mkDerivation rec {
levmar levmar
qhull qhull
cgal cgal
boost179 boost
mpfr mpfr
xercesc xercesc
tbb
embree
vcg
libigl
corto
openctm
structuresynth
]; ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
preConfigure = '' preConfigure = ''
substituteAll ${./meshlab.desktop} scripts/Linux/resources/meshlab.desktop substituteAll ${./meshlab.desktop} resources/linux/meshlab.desktop
cmakeDir=$PWD/src substituteInPlace src/external/libigl.cmake \
mkdir ../build --replace-fail '$'{MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0 ${libigl}
cd ../build substituteInPlace src/external/nexus.cmake \
--replace-fail '$'{NEXUS_DIR}/src/corto ${corto.src}
substituteInPlace src/external/levmar.cmake \
--replace-fail '$'{LEVMAR_LINK} ${levmar.src} \
--replace-warn "MD5 ''${LEVMAR_MD5}" ""
substituteInPlace src/external/ssynth.cmake \
--replace-fail '$'{SSYNTH_LINK} ${structuresynth.src} \
--replace-warn "MD5 ''${SSYNTH_MD5}" ""
substituteInPlace src/common_gui/CMakeLists.txt \
--replace-warn "MESHLAB_LIB_INSTALL_DIR" "CMAKE_INSTALL_LIBDIR"
''; '';
cmakeFlags = [ cmakeFlags = [
"-DALLOW_BUNDLED_EIGEN=OFF" "-DVCGDIR=${vcg.src}"
"-DALLOW_BUNDLED_GLEW=OFF"
"-DALLOW_BUNDLED_LIB3DS=OFF"
"-DALLOW_BUNDLED_MUPARSER=OFF"
"-DALLOW_BUNDLED_QHULL=OFF"
# disable when available in nixpkgs
"-DALLOW_BUNDLED_OPENCTM=ON"
"-DALLOW_BUNDLED_SSYNTH=ON"
"-DALLOW_BUNDLED_BOOST=OFF"
# some plugins are disabled unless these are on
"-DALLOW_BUNDLED_NEWUOA=ON"
"-DALLOW_BUNDLED_LEVMAR=ON"
];
CXXFLAGS = [
# GCC 13: error: 'int16_t' has not been declared in 'std'
"-include cstdint"
]; ];
postFixup = '' postFixup = ''