4ee65f7
Name:		meshlab
152f72c
Summary:	A system for processing and editing unstructured 3D triangular meshes
99b0fcb
Version:	2021.07
99b0fcb
Release:	1%{?dist}
152f72c
URL:		https://github.com/cnr-isti-vclab/meshlab
152f72c
License:	GPLv2+ and BSD and Public Domain and ASL 2.0
152f72c
Source0:	https://github.com/cnr-isti-vclab/meshlab/archive/Meshlab-%{version}/%{name}-%{version}.tar.gz
99b0fcb
# Matches 2021.07:
99b0fcb
%global vcglibver bda3161
5cb429a
# Probably belongs in its own package, but nothing else seems to depend on it.
152f72c
Source2:	https://github.com/cnr-isti-vclab/vcglib/archive/%{vcglibver}/vcglib-%{vcglibver}.tar.gz
152f72c
# Notes for Fedora users (around issues with Wayland)
152f72c
Source3:	README.Fedora
5cb429a
Provides:	bundled(vcglib) = %{vcglibver}
Eric Smith 663cfda
152f72c
# Properly install u3d IDTFConverter library
99b0fcb
# Patch0:         meshlab-2020.07-u3d-install-fix.patch
152f72c
# Adjust MESHLAB_LIB_INSTALL_DIR to not have a meshlab/ subdir
152f72c
# and adjust MESHLAB_PLUGIN_INSTALL_DIR to have it
99b0fcb
Patch1:         meshlab-2021.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
152f72c
# Enable use of system levmar
99b0fcb
Patch2:         meshlab-2021.07-system-levmar.patch
4ee65f7
152f72c
# Bundled things
152f72c
# This is a fork of a fork. Fun.
152f72c
Provides:	bundled(u3d) = 1.4.5-meshlab
e141005
4ee65f7
BuildRequires:	bzip2-devel
152f72c
BuildRequires:	eigen3-devel
4ee65f7
BuildRequires:	glew-devel
b45041a
BuildRequires:  gmp-devel
4ee65f7
BuildRequires:	levmar-devel
4ee65f7
BuildRequires:	lib3ds-devel
4ee65f7
BuildRequires:	muParser-devel
4ee65f7
BuildRequires:	qhull-devel
b45041a
BuildRequires:	qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtxmlpatterns-devel qt5-qtscript-devel
5cb429a
BuildRequires:	qtsoap5-devel
4ee65f7
BuildRequires:	desktop-file-utils
Eric Smith 302a318
BuildRequires:	ImageMagick
d07ef1a
BuildRequires:	mpir-devel
99b0fcb
BuildRequires:	xerces-c-devel
4ee65f7
0bb7938
# Get Fedora 33++ behavior on anything older
0bb7938
%undefine __cmake_in_source_build
0bb7938
4ee65f7
%description
4ee65f7
MeshLab is an open source, portable, and extensible system for the
4ee65f7
processing and editing of unstructured 3D triangular meshes.  The
4ee65f7
system is aimed to help the processing of the typical not-so-small
4ee65f7
unstructured models arising in 3D scanning, providing a set of tools
4ee65f7
for editing, cleaning, healing, inspecting, rendering and converting
4ee65f7
these kinds of meshes.
4ee65f7
4ee65f7
%prep
152f72c
%setup -q -n meshlab-Meshlab-%{version} -a 2
99b0fcb
# %%patch0 -p1 -b .installfix
152f72c
%patch1 -p1 -b .libdirfix
152f72c
%patch2 -p1 -b .system-levmar
152f72c
cp %{SOURCE3} .
99b0fcb
rmdir src/vcglib && mv vcglib-%{vcglibver}* src/vcglib
152f72c
152f72c
# remove some bundles
99b0fcb
%if 0
152f72c
rm -rf src/external/glew*
152f72c
rm -rf src/external/qhull*
152f72c
rm -rf src/external/levmar*
152f72c
rm -rf src/external/lib3ds*
152f72c
rm -rf src/external/muparser*
99b0fcb
%endif
152f72c
152f72c
# plugin path
99b0fcb
sed -i -e 's|"lib"|"%{_lib}"|g' src/common/globals.cpp
99b0fcb
# sed -i -e 's|"lib"|"%{_lib}"|g' src/meshlab/plugindialog.cpp
5cb429a
37456c2
# icon path, see https://github.com/cnr-isti-vclab/meshlab/pull/752
99b0fcb
# sed -i -e 's|/icons/pixmaps|/pixmaps|g' src/CMakeLists.txt
37456c2
4ee65f7
%build
c262005
export CXXFLAGS=`echo %{optflags} -std=c++14 -fopenmp -DSYSTEM_QHULL -I/usr/include/libqhull`
152f72c
0bb7938
%cmake src \
152f72c
	-DCMAKE_SKIP_RPATH=ON \
152f72c
	-DCMAKE_VERBOSE_MAKEFILE=OFF \
152f72c
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
152f72c
	-DALLOW_BUNDLED_EIGEN=OFF \
152f72c
	-DALLOW_BUNDLED_GLEW=OFF \
152f72c
	-DALLOW_BUNDLED_LEVMAR=ON \
152f72c
	-DALLOW_BUNDLED_LIB3DS=OFF \
152f72c
	-DALLOW_BUNDLED_MUPARSER=OFF \
152f72c
	-DALLOW_BUNDLED_NEWUOA=ON \
152f72c
	-DALLOW_BUNDLED_OPENCTM=ON \
152f72c
	-DALLOW_BUNDLED_QHULL=OFF \
152f72c
	-DALLOW_BUNDLED_SSYNTH=ON \
99b0fcb
	-DALLOW_BUNDLED_XERCES=OFF \
152f72c
	-DALLOW_SYSTEM_EIGEN=ON \
152f72c
	-DALLOW_SYSTEM_GLEW=ON \
152f72c
	-DALLOW_SYSTEM_GMP=ON \
152f72c
	-DALLOW_SYSTEM_LIB3DS=ON \
152f72c
	-DALLOW_SYSTEM_MUPARSER=ON \
152f72c
	-DALLOW_SYSTEM_OPENCTM=ON \
152f72c
	-DALLOW_SYSTEM_QHULL=ON \
99b0fcb
	-DALLOW_SYSTEM_XERCES=ON \
152f72c
	-DEigen3_DIR=usr/include/eigen3 \
152f72c
	-DGlew_DIR=/usr/include/GL \
152f72c
	-DQhull_DIR=/usr/include/libqhull
152f72c
0bb7938
%cmake_build
4ee65f7
4ee65f7
# create desktop file
4ee65f7
cat <<EOF >meshlab.desktop
4ee65f7
[Desktop Entry]
4ee65f7
Name=meshlab
4ee65f7
GenericName=MeshLab 3D triangular mesh processing and editing
152f72c
Exec=env QT_QPA_PLATFORM=xcb meshlab
4ee65f7
Icon=meshlab
4ee65f7
Terminal=false
4ee65f7
Type=Application
4ee65f7
Categories=Graphics;
4ee65f7
EOF
4ee65f7
4ee65f7
%install
0bb7938
%cmake_install
Eric Smith 663cfda
99b0fcb
mkdir -p %{buildroot}%{_datadir}/pixmaps/
99b0fcb
cp -a meshlab.png %{buildroot}%{_datadir}/pixmaps/
99b0fcb
152f72c
# add desktop link
4ee65f7
install -d -m 755 %{buildroot}%{_datadir}/applications
152f72c
install -p -m 644 meshlab.desktop %{buildroot}%{_datadir}/applications
4ee65f7
desktop-file-validate %{buildroot}%{_datadir}/applications/meshlab.desktop
4ee65f7
4ee65f7
%files
152f72c
%doc README.md README.Fedora
152f72c
%doc docs/readme.txt
152f72c
%doc docs/privacy.txt
152f72c
%license LICENSE.txt
152f72c
%license src/external/u3d/COPYING
4ee65f7
%{_bindir}/meshlab
99b0fcb
# unsupported in 2021
99b0fcb
# %%{_bindir}/meshlabserver
152f72c
%{_libdir}/*.so*
4ee65f7
%{_libdir}/meshlab/
4ee65f7
%{_datadir}/meshlab/
4ee65f7
%{_datadir}/applications/meshlab.desktop
99b0fcb
%{_datadir}/icons/hicolor/512x512/apps/meshlab.png
37456c2
%{_datadir}/pixmaps/meshlab.png
152f72c
%license distrib/shaders/3Dlabs-license.txt
152f72c
%license distrib/shaders/LightworkDesign-license.txt
99b0fcb
# %%license unsupported/plugins_experimental/filter_segmentation/license.txt
99b0fcb
# %%license unsupported/plugins_unsupported/filter_poisson/license.txt
4ee65f7
4ee65f7
%changelog
99b0fcb
* Mon Sep 20 2021 Tom Callaway <spot@fedoraproject.org> - 2021.07-1
99b0fcb
- update to 2021.07
99b0fcb
06b220e
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.07-7
06b220e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
06b220e
27fd714
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.07-6
27fd714
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
27fd714
1822407
* Sun Dec 20 2020 Benjamin A. Beasley <code@musicinmybrain.net> - 2020.07-5
1822407
- BR MPIR even on ppc64le, as a generic build without optimized assembly
1822407
  routines is now available on that platform
1822407
c262005
* Thu Jul 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.07-4
c262005
- Force C++14 as this code is not C++17 ready
c262005
286404e
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.07-3
286404e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
286404e
37456c2
* Fri Jul 17 2020 Miro Hrončok <mhroncok@redhat.com> - 2020.07-2
37456c2
- Install the icon to /usr/share/pixmaps
37456c2
152f72c
* Thu Jul  2 2020 Tom Callaway <spot@fedoraproject.org> - 2020.07-1
152f72c
- update to 2020.07
152f72c
- add README.Fedora for workaround instructions on Wayland
152f72c
152f72c
* Tue Jun 16 2020 Cristian Balint <cristian.balint@gmail.com> - 2020.06-1
152f72c
- New upstream release 2020.06 (#1844772)
152f72c
363226f
* Tue Feb 18 2020 Tom Callaway <spot@fedoraproject.org> - 2016.12-12
363226f
- rebuild
363226f
8a4be2a
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-11
8a4be2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
8a4be2a
d031ec1
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-10
d031ec1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d031ec1
f612542
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-9
f612542
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f612542
2d68464
* Thu Aug 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 2016.12-8
2d68464
- Rebuilt for glew 2.1.0
2d68464
93c01a0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-7
93c01a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
93c01a0
8b0dde8
* Tue May 01 2018 Miro Hrončok <mhroncok@redhat.com> - 2016.12-6
8b0dde8
- Fix Screened Poisson Surface Reconstruction filter (RHBZ#1559137) (again)
8b0dde8
b154ab7
* Thu Mar 22 2018 Miro Hrončok <mhroncok@redhat.com> - 2016.12-5
b154ab7
- Fix Screened Poisson Surface Reconstruction filter (RHBZ#1559137)
b154ab7
d6857e4
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-4
d6857e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d6857e4
809d344
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-3
809d344
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
809d344
ab3b95e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.12-2
ab3b95e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ab3b95e
5cb429a
* Thu Jul 20 2017 Tom Callaway <spot@fedoraproject.org> 2016.12-1
5cb429a
- update to 2016.12
5cb429a
e7f9edc
* Tue Jul 18 2017 Miro Hrončok <mhroncok@redhat.com> - 1.3.2-13
e7f9edc
- Fix FTBFS (RHBZ#1423936, RHBZ#1439673), exclude ppc64 arches
e7f9edc
2f7ea6e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-12
2f7ea6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2f7ea6e
Orion Poplawski 61b34dc
* Tue Jan 10 2017 Orion Poplawski <orion@cora.nwra.com> - 1.3.2-11
Orion Poplawski 61b34dc
- Rebuild for glew 2.0.0
Orion Poplawski 61b34dc
909120b
* Fri Apr 29 2016 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.3.2-10
909120b
- Compile with -std=gnu++98 to work around c++14 incompatibilities
909120b
  (F24FTBFS, RHBZ#1305224).
909120b
- Rebuild for qhull-2015.2-1.
909120b
Rex Dieter 76eaf7a
* Wed Feb 03 2016 Rex Dieter <rdieter@fedoraproject.org> - 1.3.2-9
Rex Dieter 76eaf7a
- use %%qmake_qt4 macro to ensure proper build flags
Rex Dieter 76eaf7a
7c945a9
* Thu Jan 14 2016 Adam Jackson <ajax@redhat.com> - 1.3.2-8
7c945a9
- Rebuild for glew 1.13
7c945a9
ba9a143
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-7
ba9a143
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ba9a143
70ea949
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.3.2-6
70ea949
- Rebuilt for GCC 5 C++11 ABI change
70ea949
8a4007a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-5
8a4007a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
8a4007a
bcaf1d5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-4
bcaf1d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bcaf1d5
c94ad54
* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 1.3.2-3
c94ad54
- rebuilt for GLEW 1.10
c94ad54
7a86564
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
7a86564
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7a86564
Eric Smith ae955ef
* Thu Feb 28 2013 Eric Smith <eric@brouhaha.com> - 1.3.2-1
Eric Smith ae955ef
- Update to upstream 1.3.2.
Eric Smith ae955ef
- Updated Patch0.
Eric Smith ae955ef
- Patch7 (argcref) no longer needed, fixed upstream.
Eric Smith ae955ef
- Patch8 (gcc47) no longer needed, mostly fixed upstream.
Eric Smith ae955ef
- Patch9 added, see Debian bug 667276, previously handled in patch8, but
Eric Smith ae955ef
  unclear whether it was correct.
Eric Smith ae955ef
- Patch10 by Miro Hrončok added to fix another incompatibility with GCC 4.7.
Eric Smith ae955ef
- Patch11 by Jon Ciesla to fix include paths to prevent debugedit complaints.
Eric Smith ae955ef
51e2460
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-9
51e2460
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
51e2460
02d2ab6
* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 1.3.1-8
02d2ab6
- Rebuild for glew 1.9.0
02d2ab6
4d71c67
* Wed Aug 01 2012 Adam Jackson <ajax@redhat.com> - 1.3.1-7
4d71c67
- -Rebuild for new glew
4d71c67
e24040f
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-6
e24040f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e24040f
Eric Smith 3e6dfbb
* Tue Apr 24 2012 Eric Smith <eric@brouhaha.com> - 1.3.1-5
Eric Smith 3e6dfbb
- Add new patch to resolve incompatibility with GCC 4.7
Eric Smith 3e6dfbb
6deaa55
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
6deaa55
- Rebuilt for c++ ABI breakage
6deaa55
f1a2687
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-3
f1a2687
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f1a2687
Eric Smith 25d4b7b
* Mon Oct 31 2011 Eric Smith <eric@brouhaha.com> - 1.3.1-2
Eric Smith 25d4b7b
- Add new patch to avoid crash due to mishandling of argc
Eric Smith 25d4b7b
Orion Poplawski 996b77a
* Fri Oct 21 2011 Orion Poplawski <orion@cora.nwra.com> - 1.3.1-1
Orion Poplawski 996b77a
- Update to 1.3.1
Orion Poplawski 996b77a
- Rebase patches
Orion Poplawski 996b77a
- Add new patches to add needed includes and disable openctm support until
Orion Poplawski 996b77a
  openctm is packaged
Orion Poplawski 996b77a
Eric Smith 4a8182d
* Wed Oct 05 2011 Eric Smith <eric@brouhaha.com> - 1.3.0a-2
Eric Smith 302a318
- removed bundled qtsoap, use shared library from Fedora package
Eric Smith 302a318
- fix rpath handling for internal-only library
Eric Smith 7952cb4
Eric Smith 47ff6fc
* Wed Aug 03 2011 Eric Smith <eric@brouhaha.com> - 1.3.0a-1
Eric Smith 663cfda
- update to latest upstream release
Eric Smith 47ff6fc
- added patch from Teemu Ikonen to fix FTBFS
Eric Smith 47ff6fc
- added patch from Teemu Ikonen to fix reading of .ply files in comma
Eric Smith 47ff6fc
  separator locales
d4e0a9f
Eric Smith 663cfda
* Tue Oct 05 2010 jkeating - 1.2.2-5.1
Eric Smith 663cfda
- Rebuilt for gcc bug 634757
0ab9dd1
Eric Smith 203c6df
* Fri Sep 10 2010 Eric Smith <eric@brouhaha.com> - 1.2.2-5
Eric Smith 203c6df
- Remove direct invocation of constructor to make GCC 4.5 happy
Eric Smith 203c6df
4ee65f7
* Mon May  3 2010 Eric Smith <eric@brouhaha.com> - 1.2.2-4
4ee65f7
- in prep, remove bundled getopt library sources, to ensure
4ee65f7
  that we're using the system library instead
4ee65f7
- include doc tag for poisson filter license.txt
4ee65f7
- add BSD to license tag
4ee65f7
- correct typo in comment in spec
4ee65f7
4ee65f7
* Wed Apr  7 2010 Eric Smith <eric@brouhaha.com> - 1.2.2-3
4ee65f7
- updates based on pre-review comments by Jussi Lehtola
4ee65f7
4ee65f7
* Tue Apr  6 2010 Eric Smith <eric@brouhaha.com> - 1.2.2-2
4ee65f7
- updates based on pre-review comments by Martin Gieseking
4ee65f7
4ee65f7
* Tue Feb  2 2010 Eric Smith <eric@brouhaha.com> - 1.2.2-1
4ee65f7
- initial version