The package rpms/meshlab.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/meshlab.git/commit/?id=152f72cb72....
Change:
+%ifnarch ppc64le
Thanks.
Full change:
============
commit 152f72cb7241506ae55601a8ef90f7877286237b
Author: Tom Callaway <spot(a)fedoraproject.org>
Date: Thu Jul 2 15:52:16 2020 -0400
Cristians PR + 2020.07 and wayland hacks
diff --git a/.gitignore b/.gitignore
index 584ab37..bd2962f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
-MeshLabSrc_v122.tar.gz
-/MeshLabSrc_AllInc_v130a.tgz
-/MeshLabSrc_AllInc_v131.tgz
-/MeshLabSrc_AllInc_v132.tgz
-/v2016.12.tar.gz
-/v1.0.1.tar.gz
+/meshlab-*.tar.gz
+/vcglib-*.tar.gz
+/meshlab-Meshlab-*/
+/results_meshlab/
+*.rpm
diff --git a/README.Fedora b/README.Fedora
new file mode 100644
index 0000000..aeda2c5
--- /dev/null
+++ b/README.Fedora
@@ -0,0 +1,6 @@
+Note for Fedora users:
+
+Fedora defaults to Wayland (instead of xorg), but glew has poor Wayland support, and
cannot load GL function pointers properly. This causes meshlab to fail to start.
+As a workaround, run meshlab like this:
+
+ QT_QPA_PLATFORM=xcb meshlab
diff --git a/meshlab-2020.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
b/meshlab-2020.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
new file mode 100644
index 0000000..edc9b67
--- /dev/null
+++ b/meshlab-2020.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
@@ -0,0 +1,14 @@
+diff -up meshlab-Meshlab-2020.07/src/CMakeLists.txt.libdirfix
meshlab-Meshlab-2020.07/src/CMakeLists.txt
+--- meshlab-Meshlab-2020.07/src/CMakeLists.txt.libdirfix 2020-06-30 21:03:38.000000000
-0400
++++ meshlab-Meshlab-2020.07/src/CMakeLists.txt 2020-07-02 12:10:35.012668622 -0400
+@@ -124,8 +124,8 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/ext
+ include(GNUInstallDirs)
+ if(INSTALL_TO_UNIX_LAYOUT)
+ set(MESHLAB_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
+- set(MESHLAB_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/meshlab)
+- set(MESHLAB_PLUGIN_INSTALL_DIR ${MESHLAB_LIB_INSTALL_DIR}/plugins)
++ set(MESHLAB_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
++ set(MESHLAB_PLUGIN_INSTALL_DIR ${MESHLAB_LIB_INSTALL_DIR}/meshlab/plugins)
+ set(MESHLAB_SHADER_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/meshlab/shaders)
+ set(MESHLAB_SAMPLE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/meshlab)
+ else()
diff --git a/meshlab-2020.07-system-levmar.patch b/meshlab-2020.07-system-levmar.patch
new file mode 100644
index 0000000..529d299
--- /dev/null
+++ b/meshlab-2020.07-system-levmar.patch
@@ -0,0 +1,225 @@
+diff -up meshlab-Meshlab-2020.07/src/cmake/FindLevmar.cmake.system-levmar
meshlab-Meshlab-2020.07/src/cmake/FindLevmar.cmake
+--- meshlab-Meshlab-2020.07/src/cmake/FindLevmar.cmake.system-levmar 2020-07-02
14:43:11.041499628 -0400
++++ meshlab-Meshlab-2020.07/src/cmake/FindLevmar.cmake 2020-07-02 14:40:30.129203739
-0400
+@@ -0,0 +1,54 @@
++# - Find levmar
++# Find the levmar library
++#
++# Levmar::Levmar - Imported target to use
++# LEVMAR_FOUND - True if levmar was found.
++#
++# Original Author:
++# 2020 Tom Callaway <spot(a)fedoraproject.org>
++#
++# Based on code by:
++# Collabora, Ltd. 2019
++# 2019 Ryan Pavlik <ryan.pavlik(a)collabora.com> <ryan.pavlik(a)gmail.com>
++#
++# Distributed under the Boost Software License, Version 1.0.
++# (See accompanying file LICENSE_1_0.txt or copy at
++#
http://www.boost.org/LICENSE_1_0.txt)
++#
++# SPDX-License-Identifier: BSL-1.0
++
++set(LEVMAR_ROOT_DIR
++ "${LEVMAR_ROOT_DIR}"
++ CACHE
++ PATH
++ "Directory to search for liblevmar")
++find_path(LEVMAR_INCLUDE_DIR
++ NAMES
++ levmar.h
++ PATHS
++ "${LEVMAR_ROOT_DIR}")
++find_library(LEVMAR_LIBRARY
++ NAMES levmar
++ PATHS
++ "${LEVMAR_ROOT_DIR}")
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(Levmar
++ DEFAULT_MSG
++ LEVMAR_INCLUDE_DIR
++ LEVMAR_LIBRARY)
++
++if(LEVMAR_FOUND)
++ if(NOT TARGET Levmar::Levmar)
++ add_library(Levmar::Levmar UNKNOWN IMPORTED)
++ set_target_properties(Levmar::Levmar
++ PROPERTIES
++ IMPORTED_LOCATION "${LEVMAR_LIBRARY}"
++ INTERFACE_INCLUDE_DIRECTORIES "${LEVMAR_INCLUDE_DIR}")
++ endif()
++ set(LEVMAR_INCLUDE_DIRS ${LEVMAR_INCLUDE_DIR})
++ set(LEVMAR_LIBRARIES ${LEVMAR_LIBRARY})
++ mark_as_advanced(LEVMAR_ROOT_DIR)
++endif()
++
++mark_as_advanced(LEVMAR_INCLUDE_DIR LEVMAR_LIBRARY)
+diff -up meshlab-Meshlab-2020.07/src/CMakeLists.txt.system-levmar
meshlab-Meshlab-2020.07/src/CMakeLists.txt
+--- meshlab-Meshlab-2020.07/src/CMakeLists.txt.system-levmar 2020-07-02
14:44:50.341830920 -0400
++++ meshlab-Meshlab-2020.07/src/CMakeLists.txt 2020-07-02 14:45:44.443921741 -0400
+@@ -53,6 +53,7 @@ option(ALLOW_BUNDLED_OPENGR "Allow use o
+
+ option(ALLOW_SYSTEM_EIGEN "Allow use of system-provided Eigen" ON)
+ option(ALLOW_SYSTEM_GLEW "Allow use of system-provided GLEW" ON)
++option(ALLOW_SYSTEM_LEVMAR "Allow use of system-profived levmar" ON)
+ option(ALLOW_SYSTEM_LIB3DS "Allow use of system-provided lib3ds" ON)
+ option(ALLOW_SYSTEM_GMP "Allow use of system-provided GMP" ON)
+ option(ALLOW_SYSTEM_MUPARSER "Allow use of system-provided muparser" ON)
+@@ -77,6 +78,7 @@ find_package(GLEW)
+ find_package(Eigen3)
+
+ message(STATUS "Searching for optional components")
++find_package(Levmar)
+ find_package(Lib3ds)
+ find_package(GMP)
+ find_package(muparser)
+diff -up meshlab-Meshlab-2020.07/src/external.cmake.system-levmar
meshlab-Meshlab-2020.07/src/external.cmake
+--- meshlab-Meshlab-2020.07/src/external.cmake.system-levmar 2020-07-02
14:30:57.836465119 -0400
++++ meshlab-Meshlab-2020.07/src/external.cmake 2020-07-02 14:42:37.799058264 -0400
+@@ -80,7 +80,11 @@ endif()
+
+ # levmar - optional, for several plugins
+ set(LEVMAR_DIR ${EXTERNAL_DIR}/levmar-2.3)
+-if(ALLOW_BUNDLED_LEVMAR AND EXISTS "${LEVMAR_DIR}/lm.h")
++if(ALLOW_SYSTEM_LEVMAR AND TARGET Levmar::Levmar)
++ message(STATUS "- levmar - using system-provided library")
++ add_library(external-levmar INTERFACE)
++ target_link_libraries(external-levmar INTERFACE Levmar::Levmar)
++elseif(ALLOW_BUNDLED_LEVMAR AND EXISTS "${LEVMAR_DIR}/lm.h")
+ message(STATUS "- levmar - using bundled source")
+ add_library(
+ external-levmar STATIC
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h.system-levmar 2020-07-02
14:27:44.714553015 -0400
++++
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h 2020-07-02
14:27:52.527428089 -0400
+@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
+
+ #include <list>
+
+-#include "lm.h"
++#include "levmar.h"
+
+
+ struct LevmarCorrelation {
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/solver.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/solver.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/solver.h.system-levmar 2020-07-02
14:27:24.591874781 -0400
++++ meshlab-Meshlab-2020.07/src/meshlabplugins/edit_mutualcorrs/solver.h 2020-07-02
14:27:33.999724348 -0400
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "lm.h"
++#include "levmar.h"
+
+ #include <iostream>
+ #include <fstream>
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h.system-levmar 2020-07-02
14:26:29.617753786 -0400
++++
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h 2020-07-02
14:26:39.993587876 -0400
+@@ -14,7 +14,7 @@
+
+ #include <local_parametrization.h>
+ #include <mesh_operators.h>
+-#include <lm.h>
++#include <levmar.h>
+ #include <uv_grid.h>
+
+ #include "opt_patch.h"
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h.system-levmar 2020-07-02
14:26:50.282423360 -0400
++++
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h 2020-07-02
14:27:09.361118323 -0400
+@@ -32,7 +32,7 @@
+ #include <vcg/space/color4.h>
+ #include <dual_coord_optimization.h>
+ #include <float.h>
+-#include <lm.h>
++#include <levmar.h>
+ #ifndef _MESHLAB
+ #include <wrap/io_trimesh/export_ply.h>
+ #endif
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h.system-levmar 2020-07-02
14:28:38.662690417 -0400
++++
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h 2020-07-02
14:28:50.126507109 -0400
+@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
+
+ #include <list>
+
+-#include "lm.h"
++#include "levmar.h"
+
+
+ struct LevmarCorrelation {
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/solver.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/solver.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/solver.h.system-levmar 2020-07-02
14:28:05.231224989 -0400
++++ meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualglobal/solver.h 2020-07-02
14:28:14.210081420 -0400
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "lm.h"
++#include "levmar.h"
+
+ #include <iostream>
+ #include <fstream>
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h.system-levmar 2020-07-02
14:26:01.101209766 -0400
++++
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h 2020-07-02
14:26:13.065018466 -0400
+@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
+
+ #include <list>
+
+-#include "lm.h"
++#include "levmar.h"
+
+
+ struct LevmarCorrelation {
+diff -up
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/solver.h.system-levmar
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/solver.h
+---
meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/solver.h.system-levmar 2020-07-02
14:25:37.258590970 -0400
++++ meshlab-Meshlab-2020.07/src/meshlabplugins/filter_mutualinfo/solver.h 2020-07-02
14:25:52.441348214 -0400
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "lm.h"
++#include "levmar.h"
+
+ #include <iostream>
+ #include <fstream>
+diff -up
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h.system-levmar
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h
+---
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h.system-levmar 2020-07-02
14:29:11.934158462 -0400
++++
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h 2020-07-02
14:29:22.982981790 -0400
+@@ -30,7 +30,7 @@
+ #include <vcg/complex/allocate.h>
+ #include <vcg/complex/algorithms/subset.h>
+ #include <vcg/space/index/grid_static_ptr.h>
+-#include <lib/levmar/lm.h>
++#include <levmar.h>
+
+ #include "frame.h"
+
+diff -up
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h.system-levmar
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h
+---
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h.system-levmar 2020-07-02
14:29:55.148467459 -0400
++++
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h 2020-07-02
14:30:04.820312834 -0400
+@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
+
+ #include <list>
+
+-#include "lm.h"
++#include "levmar.h"
+
+
+ struct LevmarCorrelation {
+diff -up
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/solver.h.system-levmar
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/solver.h
+---
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/solver.h.system-levmar 2020-07-02
14:29:35.957774321 -0400
++++
meshlab-Meshlab-2020.07/src/plugins_unsupported/filter_mutualinfo_xml/solver.h 2020-07-02
14:29:44.926630907 -0400
+@@ -5,7 +5,7 @@
+ #include "alignset.h"
+
+ #include "parameters.h"
+-#include "lm.h"
++#include "levmar.h"
+
+ #include <iostream>
+ #include <fstream>
diff --git a/meshlab-2020.07-u3d-install-fix.patch
b/meshlab-2020.07-u3d-install-fix.patch
new file mode 100644
index 0000000..5c4e724
--- /dev/null
+++ b/meshlab-2020.07-u3d-install-fix.patch
@@ -0,0 +1,11 @@
+diff -up meshlab-Meshlab-2020.07/src/external/u3d/src/u3d.cmake.installfix
meshlab-Meshlab-2020.07/src/external/u3d/src/u3d.cmake
+--- meshlab-Meshlab-2020.07/src/external/u3d/src/u3d.cmake.installfix 2020-06-30
21:03:38.000000000 -0400
++++ meshlab-Meshlab-2020.07/src/external/u3d/src/u3d.cmake 2020-07-02 11:48:13.014470122
-0400
+@@ -1483,3 +1483,7 @@ IF(UNIX AND NOT APPLE)
+ ADD_LIBRARY( external-IDTFConverter ${IDTFConverter_SRCS} ${IDTFConverter_HDRS} )
+ ENDIF(UNIX AND NOT APPLE)
+ TARGET_LINK_LIBRARIES( external-IDTFConverter IFXCoreStatic ${ADDITIONAL_LIBRARIES}
${CMAKE_DL_LIBS} )
++IF(NOT WIN32)
++ include(GNUInstallDirs)
++ install(TARGETS external-IDTFConverter DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ENDIF()
diff --git a/meshlab.spec b/meshlab.spec
index 4858eac..85402ac 100644
--- a/meshlab.spec
+++ b/meshlab.spec
@@ -1,77 +1,35 @@
-%global vcglibver 1.0.1
-
-Summary: A system for processing and editing unstructured 3D triangular meshes
Name: meshlab
-Version: 2016.12
-Release: 12%{?dist}
-URL:
http://meshlab.sourceforge.net/
-License: GPLv2+ and BSD and Public Domain
-
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1472375
-ExcludeArch: ppc64 ppc64le s390x
+Summary: A system for processing and editing unstructured 3D triangular meshes
+Version: 2020.07
+Release: 1%{?dist}
+URL:
https://github.com/cnr-isti-vclab/meshlab
+License: GPLv2+ and BSD and Public Domain and ASL 2.0
-Source0:
https://github.com/cnr-isti-vclab/meshlab/archive/v%{version}.tar.gz
+Source0:
https://github.com/cnr-isti-vclab/meshlab/archive/Meshlab-%{version}/%{na...
Source1: meshlab-48x48.xpm
-# Matches 2016.12.
+
+# Matches 2020.07:
+%global vcglibver 7e6bdb7
# Probably belongs in its own package, but nothing else seems to depend on it.
-Source2:
https://github.com/cnr-isti-vclab/vcglib/archive/v%{vcglibver}.tar.gz
+Source2:
https://github.com/cnr-isti-vclab/vcglib/archive/%{vcglibver}/vcglib-%{vc...
+# Notes for Fedora users (around issues with Wayland)
+Source3: README.Fedora
Provides: bundled(vcglib) = %{vcglibver}
-# Fedora-specific patches to use shared libraries, and to put plugins and
-# shaders in appropriate directories
-Patch0: meshlab-2016.12-sharedlib.patch
-Patch1: meshlab-2016.12-plugin-path.patch
-Patch2: meshlab-2016.12-shader-path.patch
-
-# Patch to fix FTBFS due to missing include of <cstddef>
-# from Teemu Ikonen <tpikonen(a)gmail.com>
-# Also added a missing include of <unistd.h>
-Patch3: meshlab-2016.12-cstddef.patch
-
-# Patch to fix reading of .ply files in comma separator locales
-# from Teemu Ikonen <tpikonen(a)gmail.com>
-Patch4: meshlab-2016.12-ply-numeric.patch
-
-# Add #include <GL/glu.h> to various files
-Patch5: meshlab-2016.12-glu.patch
-
-# Disable io_ctm until openctm is packaged
-Patch6: meshlab-2016.12-noctm.patch
-
-# Include paths shouldn't have consecutive double slashes. Causes
-# a problem for debugedit, used by rpmbuild to extract debuginfo.
-Patch11: meshlab-2016.12-include-path-double-slash.patch
-
-# FTBFS fixes
-Patch12: meshlab-2016.12-readheader.patch
-Patch13: meshlab-2016.12-stdmin.patch
-Patch14: meshlab-2016.12-format-security.patch
-
-# Fix broken .pro file
-Patch15: meshlab-2016.12-fix-broken-pro-file.patch
-
-# If you assign negative numbers to a char, it needs to be a signed char
-# Otherwise, stuff breaks on arm architectures.
-Patch16: meshlab-2016.12-arm-signed-char-fix.patch
+# Properly install u3d IDTFConverter library
+Patch0: meshlab-2020.07-u3d-install-fix.patch
+# Adjust MESHLAB_LIB_INSTALL_DIR to not have a meshlab/ subdir
+# and adjust MESHLAB_PLUGIN_INSTALL_DIR to have it
+Patch1: meshlab-2020.07-MESHLAB_LIB_INSTALL_DIR-fix.patch
+# Enable use of system levmar
+Patch2: meshlab-2020.07-system-levmar.patch
-# Fix Screened Poisson Surface Reconstruction filter by copying around XML files
-#
https://github.com/cnr-isti-vclab/meshlab/issues/97
-#
https://github.com/cnr-isti-vclab/meshlab/commit/19148325122ac70a2cc3f6e2...
-#
https://github.com/cnr-isti-vclab/meshlab/commit/612388c42d00ab8eba1d9626...
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1559137
-Patch17: meshlab-2016.12-xml-filter.patch
-
-# qPrintable doesn't take ints, just print regular ints
-# already fixed (teh file has changed a lot) in upstream master
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1604819
-Patch18: meshlab-2016.12-qprintable.patch
-
-# Add missing includes for QLineEdit and QSlider
-#
https://github.com/cnr-isti-vclab/meshlab/pull/353
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1604819
-Patch19: meshlab-2016.12-qt-includes.patch
+# Bundled things
+# This is a fork of a fork. Fun.
+Provides: bundled(u3d) = 1.4.5-meshlab
BuildRequires: bzip2-devel
+BuildRequires: eigen3-devel
BuildRequires: glew-devel
BuildRequires: levmar-devel
BuildRequires: lib3ds-devel
@@ -79,10 +37,12 @@ BuildRequires: muParser-devel
BuildRequires: qhull-devel
BuildRequires: qt5-qtbase-devel qt5-qtxmlpatterns-devel qt5-qtscript-devel
BuildRequires: qtsoap5-devel
-BuildRequires: chrpath
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
+%ifnarch ppc64le
+# mpir has ppc64le excluded
BuildRequires: mpir-devel
+%endif
%description
MeshLab is an open source, portable, and extensible system for the
@@ -93,66 +53,61 @@ for editing, cleaning, healing, inspecting, rendering and converting
these kinds of meshes.
%prep
-%setup -q -c -n %{name} -a 2
-%patch0 -p0 -b .sharedlib
-%patch1 -p0 -b .plugin-path
-%patch2 -p0 -b .shader-path
-%patch3 -p0 -b .cstddef
-%patch4 -p0 -b .ply-numeric
-%patch5 -p0 -b .glu
-%patch6 -p0 -b .noctm
-%patch11 -p0 -b .include-path-double-slash
-%patch12 -p0 -b .readheader
-%patch13 -p0 -b .stdmin
-%patch14 -p0 -b .format-security
-%patch15 -p0 -b .fix-broken-pro-file
-%patch16 -p0 -b .armfix
-%patch17 -p0 -b .xml-filter
-%patch18 -p0 -b .qprintable
-%patch19 -p0 -b .qt-includes
-
-# Turn of execute permissions on source files to avoid rpmlint
-# errors and warnings for the debuginfo package
-find . \( -name *.h -o -name *.cpp -o -name *.inl \) -a -executable \
- -exec chmod -x {} \;
-
-mv vcglib-%{vcglibver} vcglib
-mv meshlab-%{version}/src/plugins_experimental/io_TXT/io_txt.pro
meshlab-%{version}/src/plugins_experimental/io_TXT/io_TXT.pro
-
-# Remove bundled library sources, since we use the Fedora packaged
-# libraries
-rm -rf vcglib/wrap/system/multithreading vcglib/wrap/system/*getopt*
vcglib/wrap/system/time
-rm -rf
meshlab-%{version}/src/external/{ann*,bzip2*,glew*,levmar*,lib3ds*,muparser*,ode*,qhull*,qtsoap*}
-rm -rf meshlab-%{version}/src/external/lib/linux-g++/*
-
-%if 0%{?fedora} > 24
-# Reflect qhull-2015.2 changes
-sed -i \
- -e 's,#include <qhull/,#include <libqhull/,' \
- -e 's,/qhull.h>,/libqhull.h>,' \
- meshlab-%{version}/src/meshlabplugins/filter_qhull/qhull_tools.h
-%endif
-
-echo 'linux-g++:QMAKE_CXXFLAGS += -fpermissive' >>
meshlab-%{version}/src/general.pri
-echo "linux-g++:DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000" >>
meshlab-%{version}/src/general.pri
-echo "linux-g++:DEFINES += __DISABLE_AUTO_STATS__" >>
meshlab-%{version}/src/general.pri
-
-sed -i 's|PLUGIN_DIR|QString("%{_libdir}/%{name}")|g'
meshlab-%{version}/src/common/pluginmanager.cpp
+%setup -q -n meshlab-Meshlab-%{version} -a 2
+%patch0 -p1 -b .installfix
+%patch1 -p1 -b .libdirfix
+%patch2 -p1 -b .system-levmar
+cp %{SOURCE3} .
+rmdir vcglib && mv vcglib-%{vcglibver}* vcglib
+
+# remove some bundles
+rm -rf src/external/glew*
+rm -rf src/external/qhull*
+rm -rf src/external/levmar*
+rm -rf src/external/lib3ds*
+rm -rf src/external/muparser*
+
+# plugin path
+sed -i -e 's|"lib"|"%{_lib}"|g' src/common/pluginmanager.cpp
+sed -i -e 's|"lib"|"%{_lib}"|g' src/meshlab/plugindialog.cpp
%build
-# Build instructions from the wiki:
-#
http://meshlab.sourceforge.net/wiki/index.php/Compiling_V122
-# Note that the build instructions in README.linux are out of date.
-
-cd meshlab-%{version}/src/external
-%{qmake_qt5} -recursive external.pro
-# Note: -fPIC added to make jhead link properly; don't know why this wasn't
-# also an issue with structuresynth
-make %{?_smp_mflags} CFLAGS="%{optflags} -fPIC"
-cd ..
-%{qmake_qt5} -recursive meshlab_full.pro || :
-make %{?_smp_mflags} CFLAGS="%{optflags} -fpermissive"
-# DEFINES="-DMESHLAB_SCALAR=float -DQT_DISABLE_DEPRECATED_BEFORE=0x000000
-D__DISABLE_AUTO_STATS__ -DPLUGIN_DIR=\\\"%{_libdir}/%{name}\\\""
+mkdir -p build
+pushd build
+
+export CXXFLAGS=`echo %{optflags} -fopenmp -DSYSTEM_QHULL -I/usr/include/libqhull`
+
+%cmake ../src \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_VERBOSE_MAKEFILE=OFF \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DALLOW_BUNDLED_EIGEN=OFF \
+ -DALLOW_BUNDLED_GLEW=OFF \
+ -DALLOW_BUNDLED_LEVMAR=ON \
+ -DALLOW_BUNDLED_LIB3DS=OFF \
+ -DALLOW_BUNDLED_MUPARSER=OFF \
+ -DALLOW_BUNDLED_NEWUOA=ON \
+ -DALLOW_BUNDLED_OPENCTM=ON \
+ -DALLOW_BUNDLED_QHULL=OFF \
+ -DALLOW_BUNDLED_SSYNTH=ON \
+ -DALLOW_SYSTEM_EIGEN=ON \
+ -DALLOW_SYSTEM_GLEW=ON \
+ -DALLOW_SYSTEM_GMP=ON \
+ -DALLOW_SYSTEM_LIB3DS=ON \
+ -DALLOW_SYSTEM_MUPARSER=ON \
+ -DALLOW_SYSTEM_OPENCTM=ON \
+ -DALLOW_SYSTEM_QHULL=ON \
+ -DEigen3_DIR=usr/include/eigen3 \
+ -DGlew_DIR=/usr/include/GL \
+ -DQhull_DIR=/usr/include/libqhull
+
+%if 0%{?fedora} >= 33
+%cmake_build
+%else
+%make_build
+%endif
+
+popd
# process icon
convert %{SOURCE1} meshlab.png
@@ -162,7 +117,7 @@ cat <<EOF >meshlab.desktop
[Desktop Entry]
Name=meshlab
GenericName=MeshLab 3D triangular mesh processing and editing
-Exec=meshlab
+Exec=env QT_QPA_PLATFORM=xcb meshlab
Icon=meshlab
Terminal=false
Type=Application
@@ -170,80 +125,45 @@ Categories=Graphics;
EOF
%install
-# The QMAKE_RPATHDIR stuff puts in the path to the compile-time location
-# of libcommon, which won't work at runtime, so we change the rpath here.
-# The use of rpath will cause an rpmlint error, but the Fedora Packaging
-# Guidelines specifically allow use of an rpath for internal libraries:
-#
http://fedoraproject.org/wiki/Packaging:Guidelines#Rpath_for_Internal_Lib...
-# Ideally upstream would rename the library to libmeshlab, libmeshlabcommon,
-# or the like, so that we could put it in the system library directory
-# and avoid rpath entirely.
-chrpath -r %{_libdir}/meshlab meshlab-%{version}/src/distrib/{meshlab,meshlabserver}
-
-install -d -m 755 %{buildroot}%{_bindir}
-install -p -m 755 meshlab-%{version}/src/distrib/meshlab \
- meshlab-%{version}/src/distrib/meshlabserver \
- %{buildroot}%{_bindir}
-
-install -d -m 755 %{buildroot}%{_mandir}/man1
-install -p -m 644 meshlab-%{version}/docs/meshlab.1 \
- meshlab-%{version}/docs/meshlabserver.1 \
- %{buildroot}%{_mandir}/man1
-
-install -d -m 755 %{buildroot}%{_libdir}/meshlab
-install -p -m 755 meshlab-%{version}/src/distrib/libcommon.so.1.0.0 \
- %{buildroot}%{_libdir}/meshlab
-ln -s libcommon.so.1.0.0 %{buildroot}%{_libdir}/meshlab/libcommon.so.1.0
-ln -s libcommon.so.1.0.0 %{buildroot}%{_libdir}/meshlab/libcommon.so.1
-ln -s libcommon.so.1.0.0 %{buildroot}%{_libdir}/meshlab/libcommon.so
-
-install -d -m 755 %{buildroot}%{_libdir}/meshlab/plugins
-install -p -m 755 meshlab-%{version}/src/distrib/plugins/*.{so,xml} \
- %{buildroot}%{_libdir}/meshlab/plugins
-
-install -d -m 755 %{buildroot}%{_datadir}/meshlab/shaders
-install -p -m 644 meshlab-%{version}/src/distrib/shaders/*.{frag,gdp,vert} \
- %{buildroot}%{_datadir}/meshlab/shaders
-
-install -d -m 755 %{buildroot}%{_datadir}/meshlab/shaders/shadersrm
-install -p -m 644 meshlab-%{version}/src/distrib/shaders/shadersrm/*.rfx \
- %{buildroot}%{_datadir}/meshlab/shaders/shadersrm
-
-install -d -m 755 %{buildroot}%{_datadir}/meshlab/textures
-
-install -d -m 755 %{buildroot}%{_datadir}/pixmaps
-install -p -m 644 meshlab-%{version}/src/meshlab.png \
- %{buildroot}%{_datadir}/pixmaps
+pushd build
+%if 0%{?fedora} >= 33
+%cmake_install
+%else
+%make_install
+%endif
+popd
+# add desktop link
install -d -m 755 %{buildroot}%{_datadir}/applications
-install -p -m 644 meshlab-%{version}/src/meshlab.desktop \
- %{buildroot}%{_datadir}/applications
-
+install -p -m 644 meshlab.desktop %{buildroot}%{_datadir}/applications
desktop-file-validate %{buildroot}%{_datadir}/applications/meshlab.desktop
-%ldconfig_scriptlets
-
%files
+%doc README.md README.Fedora
+%doc docs/readme.txt
+%doc docs/privacy.txt
+%license LICENSE.txt
+%license src/external/u3d/COPYING
%{_bindir}/meshlab
%{_bindir}/meshlabserver
+%{_libdir}/*.so*
%{_libdir}/meshlab/
%{_datadir}/meshlab/
-%{_mandir}/man1/*.1.*
-%license meshlab-%{version}/LICENSE.txt
-%doc meshlab-%{version}/README.md
-%doc meshlab-%{version}/docs/meshlabserver.1.txt
-%doc meshlab-%{version}/docs/meshlab.1.txt
-%doc meshlab-%{version}/docs/privacy.txt
-%doc meshlab-%{version}/docs/README.linux
-%doc meshlab-%{version}/docs/readme.txt
-%license meshlab-%{version}/src/distrib/shaders/3Dlabs-license.txt
-%license meshlab-%{version}/src/distrib/shaders/LightworkDesign-license.txt
-%license meshlab-%{version}/src/meshlabplugins/filter_poisson/license.txt
-%license meshlab-%{version}/src/plugins_experimental/filter_segmentation/license.txt
%{_datadir}/applications/meshlab.desktop
-%{_datadir}/pixmaps/meshlab.png
+%{_datadir}/icons/pixmaps/meshlab.png
+%license distrib/shaders/3Dlabs-license.txt
+%license distrib/shaders/LightworkDesign-license.txt
+%license src/plugins_experimental/filter_segmentation/license.txt
+%license src/plugins_unsupported/filter_poisson/license.txt
%changelog
+* Thu Jul 2 2020 Tom Callaway <spot(a)fedoraproject.org> - 2020.07-1
+- update to 2020.07
+- add README.Fedora for workaround instructions on Wayland
+
+* Tue Jun 16 2020 Cristian Balint <cristian.balint(a)gmail.com> - 2020.06-1
+- New upstream release 2020.06 (#1844772)
+
* Tue Feb 18 2020 Tom Callaway <spot(a)fedoraproject.org> - 2016.12-12
- rebuild
diff --git a/sources b/sources
index fb7dadb..278861a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (v2016.12.tar.gz) =
99c5cc785c14704cb163f886868514634016b261cb33a172e9ddfe73240213938c6614f2a6fb80c180d7c728f959a211b5d591b59bb198ffc412dd00d9947156
-SHA512 (v1.0.1.tar.gz) =
55d1854054744abae2d41e7b5041df89253bae108df5fc1cfe777013de7192dce04bc474475cb11a1d0343ebcab1ea61b381d9d9c36c452528043e85e75bc211
+SHA512 (meshlab-2020.07.tar.gz) =
5d837edc8f36d5a36479f1ea3d8c02b789e1db6d12ed5245d3e3c2714f29a28aade8bb0378968a899a6e91fea49cef560a1de41ea1c57e73ab87d000b6fbb676
+SHA512 (vcglib-7e6bdb7.tar.gz) =
30fa944f33b326f212e41a0940b7d3b1b2f06338c7f2f8e740bdb5b0409a92cd488075491ccc2c772adc3891077ec7a0eed1aa238d54523378036b9b751b5a58