Blame meshlab.spec

0994ec
#
0994ec
# spec file for package meshlab
0994ec
#
0994ec
# Copyright (c) 2020 SUSE LLC
0994ec
#
0994ec
# All modifications and additions to the file contributed by third parties
0994ec
# remain the property of their copyright owners, unless otherwise agreed
0994ec
# upon. The license for this file, and modifications and additions to the
0994ec
# file, is the same license as for the pristine package itself (unless the
0994ec
# license for the pristine package is not an Open Source License, in which
0994ec
# case the license is the MIT License). An "Open Source License" is a
0994ec
# license that conforms to the Open Source Definition (Version 1.9)
0994ec
# published by the Open Source Initiative.
0994ec
0994ec
# Please submit bugfixes or comments via https://bugs.opensuse.org/
0994ec
#
0994ec
0994ec
0994ec
%if 0%{?suse_version} >= 1550
0994ec
%bcond_without gmp
0994ec
%else
0994ec
%bcond_with    gmp
0994ec
%endif
0994ec
0994ec
Name:           meshlab
0994ec
Version:        2020.09
0994ec
Release:        0
0994ec
Summary:        System for the processing and editing of unstructured 3D triangular meshes
0994ec
License:        GPL-2.0-or-later AND BSD-3-Clause
0994ec
Group:          Productivity/Graphics/3D Editors
0994ec
URL:            https://www.meshlab.net/
0994ec
Source0:        https://github.com/cnr-isti-vclab/meshlab/archive/Meshlab-%{version}.tar.gz#/meshlab-%{version}.tar.gz
0994ec
# Probably belongs in its own package, but nothing else depends on it
0994ec
Source1:        https://github.com/cnr-isti-vclab/vcglib/archive/%{version}.tar.gz#/vcglib-%{version}.tar.gz
0994ec
0994ec
# PATCH-FIX-OPENSUSE -- put plugins and shaders in appropriate directories
0994ec
Patch1:         meshlab-2016.12-plugin-path.patch
0994ec
Patch2:         meshlab-2016.12-shader-path.patch
0994ec
# consecutive double slashes cause a problem for debugedit,
0994ec
# used by rpmbuild to extract debuginfo
0994ec
Patch3:        meshlab-2016.12-remove-double-slash.patch
0994ec
# PATCH-FIX-UPSTREAM -- fix build with vcglib release
0994ec
Patch4:        Added-easyexif-minimal-lib-for-exif-loading.patch
0994ec
Patch5:        Substituted-the-notorious-jhead-with-a-smaller-minimal-lib.patch
0994ec
Patch6:        libjhead-removed.patch
0994ec
Patch7:        fixed-cmake-removed-any-other-reference-to-jhead.patch
0994ec
0994ec
BuildRequires:  cmake
0994ec
BuildRequires:  gcc-c++
0994ec
BuildRequires:  libbz2-devel
0994ec
BuildRequires:  levmar-devel
0994ec
BuildRequires:  muparser-devel
0994ec
BuildRequires:  chrpath
0994ec
BuildRequires:  desktop-file-utils
0994ec
BuildRequires:  hicolor-icon-theme
0994ec
BuildRequires:  qhull-devel
0994ec
BuildRequires:  cmake(Qt5OpenGL)
0994ec
BuildRequires:  cmake(Qt5Qml)
0994ec
BuildRequires:  cmake(Qt5Xml)
0994ec
BuildRequires:  cmake(Qt5XmlPatterns)
0994ec
BuildRequires:  pkgconfig(eigen3)
0994ec
BuildRequires:  pkgconfig(gl)
0994ec
BuildRequires:  pkgconfig(glew)
0994ec
BuildRequires:  pkgconfig(glu)
0994ec
%if %{with gmp}
0994ec
BuildRequires:  pkgconfig(gmp)
0994ec
%endif
0994ec
BuildRequires:  pkgconfig(lib3ds)
0994ec
# Optional, missing:
0994ec
#BuildRequires:  pkgconfig(OpenCTM)
0994ec
# Incompatibility between GLEW and Qt GLES builds
0994ec
ExcludeArch:    %{arm} aarch64
0994ec
0994ec
# Do not add plugins to provides
0994ec
%global __provides_exclude_from %{_libdir}/meshlab/plugins
0994ec
0994ec
0994ec
%description
0994ec
MeshLab is an open source, portable, and extensible system for the processing
0994ec
and editing of unstructured large 3D triangular meshes. The source is
0994ec
released under the GPL license. The system is aimed to help the processing
0994ec
of the typical not-so-small unstructured models arising in 3D scanning,
0994ec
providing a set of tools for editing, cleaning, healing, inspecting,
0994ec
rendering and converting this kind of meshes.
0994ec
0994ec
%prep
0994ec
%setup -q -a1 -n %{name}-Meshlab-%{version}
0994ec
%patch1 -p1 -b .plugin-path
0994ec
%patch2 -p1 -b .shader-path
0994ec
%patch3 -p1 -b .remove-double-slash
0994ec
%patch4 -p1
0994ec
%patch5 -p1
0994ec
%patch6 -p1
0994ec
%patch7 -p1
0994ec
0994ec
# rename vcglib folder
0994ec
rmdir vcglib
0994ec
mv vcglib-%{version} vcglib
0994ec
0994ec
# Remove bundled library sources, since we use the packaged libraries
0994ec
#rm -rf vcglib/wrap/system/multithreading vcglib/wrap/system/*getopt* vcglib/wrap/system/time
0994ec
rm -r src/external/{glew*,levmar*,lib3ds*,muparser*,qhull*}
0994ec
0994ec
# set plugin path
0994ec
sed -i 's|PLUGIN_DIR|QString("%{_libdir}/meshlab")|g'  src/common/pluginmanager.cpp
0994ec
0994ec
%build
0994ec
pushd src
0994ec
%cmake
0994ec
%cmake_build
0994ec
popd
0994ec
0994ec
0994ec
%install
0994ec
pushd src
0994ec
%cmake_install
0994ec
popd
0994ec
0994ec
rm %{buildroot}%{_datadir}/pixmaps/meshlab.png
0994ec
rmdir %{buildroot}%{_datadir}/pixmaps
0994ec
for i in 16 48 64 128 512 ; do
0994ec
  install -D -m 644 src/meshlab/images/eye${i}.png \
0994ec
                    %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/meshlab.png
0994ec
done
0994ec
0994ec
sed -i -e 's/Icon=.*/Icon=meshlab/' %{buildroot}%{_datadir}/applications/meshlab.desktop
0994ec
desktop-file-validate %{buildroot}%{_datadir}/applications/meshlab.desktop
0994ec
0994ec
install -D -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/man/*.1
0994ec
0994ec
0994ec
%post -p /sbin/ldconfig
0994ec
0994ec
%postun -p /sbin/ldconfig
0994ec
0994ec
%files
0994ec
%{_bindir}/meshlab
0994ec
%{_bindir}/meshlabserver
0994ec
%{_libdir}/meshlab/
0994ec
%{_datadir}/meshlab/
0994ec
%{_mandir}/man1/*.1%{?ext_man}
0994ec
%doc README.md
0994ec
%doc docs/privacy.txt
0994ec
%license LICENSE.txt
0994ec
%license distrib/shaders/3Dlabs-license.txt
0994ec
%license distrib/shaders/LightworkDesign-license.txt
0994ec
%license src/plugins_unsupported/filter_poisson/license.txt
0994ec
%license src/plugins_experimental/filter_segmentation/license.txt
0994ec
%{_datadir}/icons/hicolor/*/apps/meshlab.*
0994ec
%{_datadir}/applications/meshlab.desktop
0994ec
0994ec
%changelog