1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

graphics/cloudcompare: resurrect CloudCompare

It was removed in r548980, due to a deprecated version of python.
This commit is contained in:
Thierry Thomas 2022-02-11 15:37:35 +01:00
parent 779874ba0c
commit 7fac35a3db
16 changed files with 276 additions and 1 deletions

1
MOVED
View File

@ -15437,7 +15437,6 @@ games/lightyears||2020-09-19|Has expired: Uses deprecated version of python
games/outerspace||2020-09-19|Has expired: Uses deprecated version of python
games/pachi-game-engine||2020-09-19|Has expired: Uses deprecated version of python
graphics/caffe||2020-09-19|Has expired: Uses deprecated version of python
graphics/cloudcompare||2020-09-19|Has expired: Uses deprecated version of python
graphics/kudu||2020-09-19|Has expired: Uses deprecated version of python
graphics/pecomato||2020-09-19|Has expired: Uses deprecated version of python
graphics/py-editobj||2020-09-19|Has expired: Uses deprecated version of python

View File

@ -100,6 +100,7 @@
SUBDIR += chafa
SUBDIR += charls
SUBDIR += cimg
SUBDIR += cloudcompare
SUBDIR += clutter
SUBDIR += clutter-gtk3
SUBDIR += cluttermm

View File

@ -0,0 +1,85 @@
# $FreeBSD$
PORTNAME= cloudcompare
DISTVERSIONPREFIX= v
DISTVERSION= 2.10.3
PORTREVISION= 4
CATEGORIES= graphics
MAINTAINER= ports@FreeBSD.org
COMMENT= 3D point cloud processing software
LICENSE= GPLv2+ LGPL20+
LICENSE_COMB= multi
DEPRECATED= Uses deprecated version of python
EXPIRATION_DATE= 2020-09-15
BROKEN= fails to build: fails in lib_depends since r546770
BROKEN_aarch64= fails to compile: mmintrin.h:47:5: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
USES= cmake compiler:c++11-lang localbase:ldflags qt:5
USE_GITHUB= yes
GH_ACCOUNT= CloudCompare
GH_PROJECT= ${GH_ACCOUNT}
USE_QT= concurrent core gui opengl printsupport widgets buildtools_build qmake_build svg linguisttools_build
USE_LDCONFIG= yes
OPTIONS_DEFINE= DXFLIB GAMEPAD GDAL PDAL SHAPELIB PLUGINS
OPTIONS_DEFAULT= DXFLIB GAMEPAD GDAL PDAL SHAPELIB PLUGINS
OPTIONS_SUB= yes
DXFLIB_DESC= Enable AutoCAD DXF file support
GAMEPAD_DESC= Enable Qt gamepad support
GDAL_DESC= Enable raster file support
PDAL_DESC= Enable point cloud data support
SHAPELIB_DESC= Enable shape file support
DXFLIB_CMAKE_BOOL= OPTION_USE_DXF_LIB
GAMEPAD_USE= QT=gamepad
GAMEPAD_CMAKE_BOOL= OPTION_SUPPORT_GAMEPADS
GDAL_CMAKE_BOOL= OPTION_USE_GDAL
GDAL_CMAKE_ON= -DGDAL_INCLUDE_DIR=${PREFIX}/include \
-DGDAL_LIBRARY=${PREFIX}/lib/libgdal.so
GDAL_LIB_DEPENDS= libgdal.so:graphics/gdal
PDAL_CMAKE_BOOL= OPTION_PDAL_LAS
PDAL_CMAKE_ON= -DJSON_ROOT_DIR=${PREFIX}/include/jsoncpp
PDAL_LIB_DEPENDS= libpdal_base.so:math/pdal
SHAPELIB_CMAKE_BOOL= OPTION_USE_SHAPE_LIB
SHAPELIB_LIB_DEPENDS= libshp.so:devel/shapelib
PLUGINS_USES= eigen:3 gl jpeg python:2.7 xorg
PLUGINS_CMAKE_BOOL= INSTALL_QANIMATION_PLUGIN INSTALL_QBLUR_PLUGIN INSTALL_QBROOM_PLUGIN INSTALL_QCOMPASS_PLUGIN \
INSTALL_QCSF_PLUGIN INSTALL_QCSV_MATRIX_IO_PLUGIN INSTALL_QDUMMY_PLUGIN INSTALL_QEDL_PLUGIN INSTALL_QFACETS_PLUGIN \
INSTALL_QHPR_PLUGIN INSTALL_QM3C2_PLUGIN \
INSTALL_QPCV_PLUGIN INSTALL_QPHOTOSCAN_IO_PLUGIN INSTALL_QRANSAC_SD_PLUGIN \
INSTALL_QSRA_PLUGIN INSTALL_QSSAO_PLUGIN # plugins requiring rare external libs are left out, TODO maybe add some of them?
PLUGINS_CMAKE_ON= -DEIGEN_ROOT_DIR:BOOL=${LOCALBASE}/include/eigen3
PLUGINS_CXXFLAGS= ${PLUGINS_CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
PLUGINS_CXXFLAGS_clang= -Wno-narrowing
PLUGINS_CXXFLAGS+= -DEIGEN_DONT_PARALLELIZE # OpenMP is broken in cmake: see bug#223678
PLUGINS_USE= XORG=ice,sm,x11,xext,xt GL=gl,glu
PLUGINS_LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libexpat.so:textproc/expat2 \
libflann_cpp_s.so:math/flann \
libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
libtiff.so:graphics/tiff \
libvtkDomainsChemistry-6.2.so:math/vtk6
PLUGINS_IMPLIES= SHAPELIB
post-patch:
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},1' ${WRKSRC}/snap/gui/ccViewer.desktop ${WRKSRC}/snap/gui/cloudcompare.desktop
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/snap/gui/ccViewer.desktop ${STAGEDIR}${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/snap/gui/ccViewer.png ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/snap/gui/cloudcompare.desktop ${STAGEDIR}${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/snap/gui/cloudcompare.png ${STAGEDIR}${PREFIX}/share/pixmaps
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1561072132
SHA256 (CloudCompare-CloudCompare-v2.10.3_GH0.tar.gz) = 6c38f9c1c8f705ac7c2c4d63afff78a7d499ac9bfbf24ca7516f0664bb2bf642
SIZE (CloudCompare-CloudCompare-v2.10.3_GH0.tar.gz) = 35500995

View File

@ -0,0 +1,11 @@
--- cmake/CMakeExternalLibs.cmake.orig 2019-01-07 13:42:34.210570000 -0500
+++ cmake/CMakeExternalLibs.cmake 2019-01-07 13:45:18.201885000 -0500
@@ -67,7 +67,7 @@
# ------------------------------------------------------------------------------
# OpenMP
# ------------------------------------------------------------------------------
-find_package(OpenMP QUIET)
+find_package(OpenMP QUIET) # Broken on FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
if (OPENMP_FOUND)
message("OpenMP found")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")

View File

@ -0,0 +1,11 @@
--- common/ccPluginManager.cpp.orig 2019-01-06 17:02:13.000000000 -0500
+++ common/ccPluginManager.cpp 2019-01-07 14:12:33.433157000 -0500
@@ -177,7 +177,7 @@
"*.dylib"
#elif defined(Q_OS_WIN)
"*.dll"
-#elif defined(Q_OS_LINUX)
+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
"*.so"
#else
#error Need to specify the dynamic library extension for this OS.

View File

@ -0,0 +1,20 @@
--- contrib/ShapeLibSupport.cmake.orig 2018-03-16 21:26:02 UTC
+++ contrib/ShapeLibSupport.cmake
@@ -4,14 +4,14 @@
OPTION( OPTION_USE_SHAPE_LIB "Build with ShapeLib (SHP files support)" OFF )
if( ${OPTION_USE_SHAPE_LIB} )
- add_subdirectory(contrib/shapelib-1.3.0)
- include_directories( ${SHAPELIB_SOURCE_DIR} )
+ #add_subdirectory(contrib/shapelib-1.3.0)
+ #include_directories( ${SHAPELIB_SOURCE_DIR} )
endif()
# Link project with shapelib library
function( target_link_SHAPE_LIB ) # 2 arguments: ARGV0 = project name
if( ${OPTION_USE_SHAPE_LIB} )
- target_link_libraries( ${PROJECT_NAME} SHAPELIB )
+ target_link_libraries( ${PROJECT_NAME} shp )
set_property( TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS CC_SHP_SUPPORT )
endif()
endfunction()

View File

@ -0,0 +1,21 @@
--- ./plugins/core/qFacets/CMakeLists.txt.orig 2019-01-07 13:50:00.290346000 -0500
+++ ./plugins/core/qFacets/CMakeLists.txt 2019-01-07 13:50:27.770300000 -0500
@@ -4,7 +4,7 @@
# CloudCompare 'FACETS' plugin
if (INSTALL_QFACETS_PLUGIN)
- if (NOT SHAPELIB_SOURCE_DIR)
+ if (NOT OPTION_USE_SHAPE_LIB)
message( SEND_ERROR "ShapeLib is required to compile this plugin (enable OPTION_USE_SHAPE_LIB)" )
endif()
@@ -31,7 +31,7 @@
target_link_libraries( ${PROJECT_NAME} QCC_IO_LIB )
#add shapelib support
- target_link_libraries( ${PROJECT_NAME} SHAPELIB )
- include_directories( ${SHAPELIB_SOURCE_DIR} )
+ target_link_libraries( ${PROJECT_NAME} shp )
+ #include_directories( ${SHAPELIB_SOURCE_DIR} )
set_property( TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS CC_SHP_SUPPORT )
endif()

View File

@ -0,0 +1,11 @@
--- ./plugins/core/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp.orig 2019-01-06 17:02:13.000000000 -0500
+++ ./plugins/core/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp 2019-01-07 13:52:41.029660000 -0500
@@ -51,7 +51,7 @@
{
typename pcl::search::KdTree<PointInT>::Ptr tree (new pcl::search::KdTree<PointInT>);
-#ifdef _OPENMP
+#if 0 && defined(_OPENMP) // disabled: the only place where omp_xx is used directly
//create the smoothing object
pcl::MovingLeastSquaresOMP< PointInT, PointOutT > smoother;
int n_threads = omp_get_max_threads();

View File

@ -0,0 +1,10 @@
--- ./plugins/core/qRANSAC_SD/RANSAC_SD_orig/GfxTL/FlatCopyVector.h.orig 2019-01-07 13:54:30.016129000 -0500
+++ ./plugins/core/qRANSAC_SD/RANSAC_SD_orig/GfxTL/FlatCopyVector.h 2019-01-07 13:55:05.855728000 -0500
@@ -1,6 +1,6 @@
#ifndef GfxTL__FLATCOPYVECTOR_HEADER__
#define GfxTL__FLATCOPYVECTOR_HEADER__
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <malloc.h>
#else
#include <stdlib.h>

View File

@ -0,0 +1,11 @@
--- ./plugins/core/qRANSAC_SD/RANSAC_SD_orig/GfxTL/KdTree.h.orig 2019-01-07 13:56:42.017699000 -0500
+++ ./plugins/core/qRANSAC_SD/RANSAC_SD_orig/GfxTL/KdTree.h 2019-01-07 13:57:21.280897000 -0500
@@ -14,7 +14,7 @@
#include <algorithm>
#include <memory>
#include <deque>
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <malloc.h>
#else
#include <stdlib.h>

View File

@ -0,0 +1,17 @@
--- plugins/core/qRANSAC_SD/RANSAC_SD_orig/MiscLib/AlignedAllocator.h.orig 2019-06-13 21:16:40 UTC
+++ plugins/core/qRANSAC_SD/RANSAC_SD_orig/MiscLib/AlignedAllocator.h
@@ -1,12 +1,12 @@
#ifndef MiscLib__ALIGNEDALLOCATOR_HEADER__
#define MiscLib__ALIGNEDALLOCATOR_HEADER__
#include <memory>
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <malloc.h>
#else
#include <stdlib.h>
#endif
-#include <xmmintrin.h>
+#include <mm_malloc.h>
#include <limits>
#ifdef max
#undef max

View File

@ -0,0 +1,13 @@
--- snap/gui/ccViewer.desktop.orig 2018-03-16 21:26:02 UTC
+++ snap/gui/ccViewer.desktop
@@ -2,8 +2,8 @@
Type=Application
Name=CloudCompare Viewer
Comment=3D point cloud and mesh processing software
-Exec=cloudcompare.ccViewer
+Exec=ccViewer
Terminal=false
Categories=Graphics;
-Icon=${SNAP}/meta/gui/ccViewer.png
+Icon=/usr/local/share/pixmaps/ccViewer.png

View File

@ -0,0 +1,13 @@
--- snap/gui/cloudcompare.desktop.orig 2018-03-16 21:26:02 UTC
+++ snap/gui/cloudcompare.desktop
@@ -2,8 +2,8 @@
Type=Application
Name=CloudCompare
Comment=3D point cloud and mesh processing software
-Exec=cloudcompare.CloudCompare
+Exec=CloudCompare
Terminal=false
Categories=Graphics;
-Icon=${SNAP}/meta/gui/cloudcompare.png
+Icon=/usr/local/share/pixmaps/cloudcompare.png

View File

@ -0,0 +1,9 @@
CloudCompare is a 3D point cloud (and triangular mesh) processing software. It
was originally designed to perform comparison between two 3D points clouds
(such as the ones obtained with a laser scanner) or between a point cloud and a
triangular mesh. It relies on an octree structure that is highly optimized for
this particular use-case. It was also meant to deal with huge point clouds
(typically more than 10 millions points, and up to 120 millions with 2 Gb of
memory).
WWW: http://www.cloudcompare.org/

View File

@ -0,0 +1,40 @@
bin/CloudCompare
bin/ccViewer
lib/cloudcompare/libCC_CORE_LIB.so
lib/cloudcompare/libQCC_DB_LIB.so
lib/cloudcompare/libQCC_IO_LIB.so
%%PLUGINS%%lib/cloudcompare/plugins/libQANIMATION_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQBROOM_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQCOMPASS_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQCSF_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQCSV_MATRIX_IO_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQEDL_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQFACETS_PLUGIN_DLL.so
%%PLUGINS%%lib/cloudcompare/plugins/libQHPR_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQM3C2_PLUGIN_DLL.so
%%PLUGINS%%lib/cloudcompare/plugins/libQPCV_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQPHOTOSCAN_IO_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQRANSAC_SD_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQSRA_PLUGIN.so
%%PLUGINS%%lib/cloudcompare/plugins/libQSSAO_PLUGIN.so
share/applications/ccViewer.desktop
share/applications/cloudcompare.desktop
%%DATADIR%%/CHANGELOG.md
%%DATADIR%%/global_shift_list_template.txt
%%DATADIR%%/license.txt
%%DATADIR%%/shaders/Bilateral/bilateral.frag
%%DATADIR%%/shaders/Bilateral/bilateral.vert
%%DATADIR%%/shaders/ColorRamp/color_ramp.frag
%%PLUGINS%%%%DATADIR%%/shaders/EDL/edl_mix.frag
%%PLUGINS%%%%DATADIR%%/shaders/EDL/edl_mix.vert
%%PLUGINS%%%%DATADIR%%/shaders/EDL/edl_shade.frag
%%PLUGINS%%%%DATADIR%%/shaders/EDL/edl_shade.vert
%%PLUGINS%%%%DATADIR%%/shaders/SSAO/ssao.frag
%%PLUGINS%%%%DATADIR%%/shaders/SSAO/ssao.vert
%%DATADIR%%/translations/CloudCompare_es_AR.qm
%%DATADIR%%/translations/CloudCompare_fr.qm
%%DATADIR%%/translations/CloudCompare_ja.qm
%%DATADIR%%/translations/CloudCompare_pt.qm
%%DATADIR%%/translations/CloudCompare_ru.qm
share/pixmaps/ccViewer.png
share/pixmaps/cloudcompare.png