Blame meshlab.spec

d9fe21
#
d9fe21
# spec file for package meshlab
d9fe21
#
d9fe21
# Copyright (c) 2023 SUSE LLC
d9fe21
#
d9fe21
# All modifications and additions to the file contributed by third parties
d9fe21
# remain the property of their copyright owners, unless otherwise agreed
d9fe21
# upon. The license for this file, and modifications and additions to the
d9fe21
# file, is the same license as for the pristine package itself (unless the
d9fe21
# license for the pristine package is not an Open Source License, in which
d9fe21
# case the license is the MIT License). An "Open Source License" is a
d9fe21
# license that conforms to the Open Source Definition (Version 1.9)
d9fe21
# published by the Open Source Initiative.
d9fe21
d9fe21
# Please submit bugfixes or comments via https://bugs.opensuse.org/
d9fe21
#
d9fe21
d9fe21
d9fe21
%if 0%{?suse_version} >= 1550
d9fe21
%bcond_without gmp
d9fe21
%else
d9fe21
%bcond_with    gmp
d9fe21
%endif
d9fe21
d9fe21
Name:           meshlab
d9fe21
Version:        2022.02
d9fe21
Release:        0
d9fe21
Summary:        System for the processing and editing of unstructured 3D triangular meshes
d9fe21
License:        GPL-2.0-or-later AND BSD-3-Clause
d9fe21
Group:          Productivity/Graphics/3D Editors
d9fe21
URL:            https://www.meshlab.net/
d9fe21
Source0:        https://github.com/cnr-isti-vclab/meshlab/archive/refs/tags/MeshLab-%{version}.tar.gz#/meshlab-%{version}.tar.gz
d9fe21
# Probably belongs in its own package, but nothing else depends on it
d9fe21
Source1:        https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/%{version}.tar.gz#/vcglib-%{version}.tar.gz
d9fe21
# PATCH-FIX-OPENSUSE -- adjust plugin and shader search path
d9fe21
Patch1:         0001-Use-same-paths-for-shader-plugin-lookup-as-used-for-.patch
d9fe21
# PATCH-FIX-OPENSUSE -- https://github.com/cnr-isti-vclab/vcglib/issues/210
d9fe21
Patch2:         0001-Remove-unused-return-value-in-unused-function.patch
d9fe21
# PATCH-FIX-OPENSUSE
d9fe21
Patch3:         0001-Set-correct-RPATH-for-libraries-and-executable.patch
d9fe21
# PATCH-FIX-OPENSUSE
d9fe21
Patch4:         0001-Allow-usage-of-system-provided-levmar.patch
d9fe21
Patch5:         gcc13-fix.patch
d9fe21
d9fe21
BuildRequires:  libboost_headers-devel
d9fe21
BuildRequires:  libboost_thread-devel
d9fe21
BuildRequires:  cmake
d9fe21
BuildRequires:  desktop-file-utils
d9fe21
BuildRequires:  fdupes
d9fe21
BuildRequires:  gcc-c++
d9fe21
BuildRequires:  hicolor-icon-theme
d9fe21
BuildRequires:  levmar-devel
d9fe21
BuildRequires:  libbz2-devel
d9fe21
BuildRequires:  muparser-devel
d9fe21
BuildRequires:  qhull-devel
d9fe21
BuildRequires:  cmake(CGAL)
d9fe21
BuildRequires:  cmake(Qt5OpenGL)
d9fe21
BuildRequires:  cmake(Qt5Qml)
d9fe21
BuildRequires:  cmake(Qt5Xml)
d9fe21
BuildRequires:  cmake(Qt5XmlPatterns)
d9fe21
BuildRequires:  pkgconfig(eigen3)
d9fe21
BuildRequires:  pkgconfig(gl)
d9fe21
BuildRequires:  pkgconfig(glew)
d9fe21
BuildRequires:  pkgconfig(glu)
d9fe21
BuildRequires:  pkgconfig(xerces-c)
d9fe21
%if %{with gmp}
d9fe21
BuildRequires:  pkgconfig(gmp)
d9fe21
%endif
d9fe21
BuildRequires:  pkgconfig(lib3ds)
d9fe21
# Optional, missing:
d9fe21
#BuildRequires:  pkgconfig(OpenCTM)
d9fe21
# Incompatibility between GLEW and Qt GLES builds
d9fe21
ExcludeArch:    %{arm} aarch64
d9fe21
d9fe21
# Do not add plugins to provides
d9fe21
%global __provides_exclude_from ^%{_libdir}/meshlab/plugins/.*\\.so
d9fe21
d9fe21
%description
d9fe21
MeshLab is an open source, portable, and extensible system for the processing
d9fe21
and editing of unstructured large 3D triangular meshes. The source is
d9fe21
released under the GPL license. The system is aimed to help the processing
d9fe21
of the typical not-so-small unstructured models arising in 3D scanning,
d9fe21
providing a set of tools for editing, cleaning, healing, inspecting,
d9fe21
rendering and converting this kind of meshes.
d9fe21
d9fe21
%prep
d9fe21
%setup -a1 -n %{name}-MeshLab-%{version}
d9fe21
d9fe21
# rename vcglib folder
d9fe21
rmdir src/vcglib
d9fe21
mv vcglib-%{version} src/vcglib
d9fe21
d9fe21
%autopatch -p1
d9fe21
d9fe21
# Remove bundled library sources, since we use the packaged libraries
d9fe21
rm -r src/external/{glew*,levmar*,lib3ds*,muparser*,qhull*,xerces*}/*
d9fe21
d9fe21
# set plugin and shader search path
d9fe21
sed -i 's|PLUGIN_DIR|QString("%{_libdir}/meshlab/plugins")|g'  src/common/globals.cpp
d9fe21
sed -i 's|SHADER_DIR|QString("%{_datadir}/meshlab/shaders")|g' src/common/globals.cpp
d9fe21
d9fe21
%build
d9fe21
pushd src
d9fe21
%cmake
d9fe21
%cmake_build
d9fe21
popd
d9fe21
d9fe21
d9fe21
%install
d9fe21
pushd src
d9fe21
%cmake_install
d9fe21
popd
d9fe21
d9fe21
for i in 16 48 64 128 512 ; do
d9fe21
  install -D -m 644 src/meshlab/images/eye${i}.png \
d9fe21
                    %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/meshlab.png
d9fe21
done
d9fe21
d9fe21
# Make sure Xorg or XWayland is used, native Wayland is not working
d9fe21
sed -i -e 's/Exec=.*/Exec=env QT_QPA_PLATFORM=xcb meshlab/' %{buildroot}%{_datadir}/applications/meshlab.desktop
d9fe21
desktop-file-validate %{buildroot}%{_datadir}/applications/meshlab.desktop
d9fe21
d9fe21
# Remove leftover libIFX*.so -- https://github.com/cnr-isti-vclab/meshlab/issues/1353
d9fe21
rm %{buildroot}%{_libdir}/meshlab/libIFX*.so
d9fe21
d9fe21
install -D -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/man/*.1
d9fe21
d9fe21
%fdupes %{buildroot}%{_datadir}
d9fe21
d9fe21
%post -p /sbin/ldconfig
d9fe21
d9fe21
%postun -p /sbin/ldconfig
d9fe21
d9fe21
%files
d9fe21
%{_bindir}/meshlab
d9fe21
%{_libdir}/meshlab/
d9fe21
%{_datadir}/meshlab/
d9fe21
%{_mandir}/man1/*.1%{?ext_man}
d9fe21
%doc README.md
d9fe21
%doc docs/privacy.txt
d9fe21
%license LICENSE.txt
d9fe21
%license distrib/shaders/3Dlabs-license.txt
d9fe21
%license distrib/shaders/LightworkDesign-license.txt
d9fe21
%{_datadir}/icons/hicolor/*/apps/meshlab.*
d9fe21
%{_datadir}/applications/meshlab.desktop
d9fe21
d9fe21
%changelog