Sisyphus repository
Last update: 2 february 2023 | SRPMs: 18159 | Visits: 26620518
en ru br
ALT Linux repos

Group :: Graphics
RPM: meshlab

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%global vcglibver 2021.10

Name: meshlab
Version: 2021.10
Release: alt1

Summary: A system for processing and editing unstructured 3D triangular meshes
License: GPLv2+ and BSD and Public Domain
Group: Graphics

Provides: bundled(vcglib) = %vcglibver

ExcludeArch: armh

# Source0-url:

Source0: %name-%version.tar
# Probably belongs in its own package, but nothing else seems to depend on it.
# Source1-url:
Source1: vcglib-%vcglibver.tar

Patch0: meshlab-2021.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
Patch1: meshlab-2021.07-system-levmar.patch

BuildRequires(pre): rpm-macros-cmake
BuildRequires: cmake

BuildRequires: libgomp-devel
BuildRequires: bzlib-devel
BuildRequires: pkgconfig(glew)
BuildRequires: levmar-devel
BuildRequires: lib3ds-devel
BuildRequires: libgmpxx-devel
BuildRequires: libxerces-c-devel
BuildRequires: qhull-devel qhull
BuildRequires: qt5-base-devel
BuildRequires: eigen3
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: qt5-declarative-devel
BuildRequires: qtsoap5-devel
#BuildRequires: libexif-devel
BuildRequires: boost-devel
BuildRequires: cgal-devel
BuildRequires: libmuparser-devel
#BuildRequires: chrpath
#BuildRequires: patchelf
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick-tools
%ifnarch ppc64le
# mpir has ppc64le excluded
BuildRequires: mpir-devel

MeshLab is an open source, portable, and extensible system for the
processing and editing of unstructured 3D triangular meshes.  The
system is aimed to help the processing of the typical not-so-small
unstructured models arising in 3D scanning, providing a set of tools
for editing, cleaning, healing, inspecting, rendering and converting
these kinds of meshes.

%setup -a1
%patch0 -p1 -b .MESHLAB_LIB_INSTALL_DIR-fix
%patch1 -p1 -b .system-levmar
%ifarch %e2k
%define num_threads_fix() \
sed -i "/num_threads( %1 )/{s/ %1 /nthreads/;s/.*/int nthreads=%1; (void)nthreads;\\n&/}" \\\
%num_threads_fix threads Src/MultiGridOctreeData{,.IsoSurface,.System}.inl
%num_threads_fix Threads.value Src/PoissonRecon.cpp
%num_threads_fix pp.ThreadsVal poisson_utils.h
sed -i "/pragma omp/{s/.*/int loop_count=mesh.vert.size();\n&/;:a;n;s/i < (int)mesh.vert.size()/i < loop_count/;ba}" \

rmdir src/vcglib
mv vcglib-%vcglibver src/vcglib

# plugin path

sed -i -e 's|"lib"|"%{_lib}"|g' src/common/globals.cpp

%add_optflags -fopenmp -DSYSTEM_QHULL -I/usr/include/libqhull

%cmake src \
-DEigen3_DIR=usr/include/eigen3 \
-DGlew_DIR=/usr/include/GL \



# create desktop file

cat <<EOF >%buildroot%_desktopdir/meshlab.desktop
[Desktop Entry]
GenericName=MeshLab 3D triangular mesh processing and editing
Exec=env QT_QPA_PLATFORM=xcb meshlab

desktop-file-validate %buildroot%_desktopdir/meshlab.desktop

# convert icon

for x in 16 32 48; do
mkdir -p %buildroot%_iconsdir/hicolor/$x'x'$x/apps/
 convert %buildroot%_iconsdir/hicolor/512x512/apps/%name.png \
 -resize $x'x'$x %buildroot/%_iconsdir/hicolor/$x'x'$x/apps/%name.png

%doc docs/readme.txt
%doc docs/privacy.txt


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin