diff options
author | bartus | 2020-12-02 19:17:37 +0100 |
---|---|---|
committer | bartus | 2020-12-02 19:23:25 +0100 |
commit | 762e1e62998b88d974dcbb5e9e3b0b9fffa0df79 (patch) | |
tree | e5437f74c22a7f777144b9b2baa77ec35f9af549 | |
parent | b3393f4dd219dc6c70fe39626725129dc7859c59 (diff) | |
download | aur-762e1e62998b88d974dcbb5e9e3b0b9fffa0df79.tar.gz |
Refactor, enable cork/shp/dlib plugins.
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 114 | ||||
-rw-r--r-- | cork.patch | 79 |
3 files changed, 156 insertions, 57 deletions
@@ -1,11 +1,12 @@ pkgbase = cloudcompare pkgdesc = A 3D point cloud (and triangular mesh) processing software pkgver = 2.11.0 - pkgrel = 2 + pkgrel = 3 url = http://www.danielgm.net/cc/ arch = i686 arch = x86_64 license = GPL2 + makedepends = clang makedepends = cmake makedepends = doxygen makedepends = git @@ -16,27 +17,34 @@ pkgbase = cloudcompare makedepends = proj makedepends = python depends = cgal + depends = dlib depends = ffmpeg depends = glew depends = glu depends = mesa + depends = mpir depends = pdal depends = qt5-base depends = qt5-tools depends = qt5-svg + depends = shapelib depends = tbb depends = vxl optdepends = pcl source = cloudcompare::git+https://github.com/CloudCompare/CloudCompare.git#tag=v2.11.0 + source = cloudcompare-cork::git+https://github.com/CloudCompare/cork.git source = constexpr.patch + source = cork.patch source = pcl.patch source = CloudCompare.desktop source = ccViewer.desktop - md5sums = SKIP - md5sums = 7b254561200ba7d51817e4860f589426 - md5sums = b93f216458129507f154ea6d19a5fed0 - md5sums = 379e09f6996b2b397429c0661c409bd0 - md5sums = b6dcb0dee15cc67011166a2fc774c5ef + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 984e6186f6483534a52cb153b65dee016904eb9efdb89211c2c0042eea2417ff + sha256sums = 3f8692fbff2b92ebf422f2c4de46f2f9164cd37879092c66f171b32fea464227 + sha256sums = 183f05dee316bdf7c6e9935e2a21b79b2172f61df5b0b6954bcd0d74751afc64 + sha256sums = 14096df9cf7aca3099d5df1585d1cf669544e9b10754dce3d2507100dd7034fe + sha256sums = 821ac2540e1196774e26f8033946ce7b36223dae7a2a7c78f4a901b4177f68cc pkgname = cloudcompare @@ -2,34 +2,40 @@ # Maintainer : bartus <arch-user-repo(at)bartus.33mail.com> # Contributor : Johannes Sauer <joh.sauer(at)gmail(dot)com> # Contributor : Danilo Bargen <aur at dbrgn dot ch> +# Contributor : Olaf Leidinger <oleid@mescharet.de> # shellcheck disable=SC2034,SC2154 # allow unused/uninitialized variables. name=cloudcompare pkgname=${name} _fragment="#tag=v2.11.0" pkgver="${_fragment###tag=v}" -pkgrel=2 +pkgrel=3 pkgdesc="A 3D point cloud (and triangular mesh) processing software" arch=('i686' 'x86_64') url="http://www.danielgm.net/cc/" license=('GPL2') -depends=('cgal' 'ffmpeg' 'glew' 'glu' 'mesa' 'pdal' 'qt5-base' 'qt5-tools' 'qt5-svg' 'tbb' 'vxl') -makedepends=('cmake' 'doxygen' 'git' 'laz-perf' 'libharu' 'ninja' 'pcl' 'proj' 'python') +depends=('cgal' 'dlib' 'ffmpeg' 'glew' 'glu' 'mesa' 'mpir' 'pdal' 'qt5-base' 'qt5-tools' 'qt5-svg' 'shapelib' 'tbb' 'vxl') +makedepends=('clang' 'cmake' 'doxygen' 'git' 'laz-perf' 'libharu' 'ninja' 'pcl' 'proj' 'python') optdepends=('pcl') source=("${name}::git+https://github.com/CloudCompare/CloudCompare.git${_fragment}" + "${name}-cork::git+https://github.com/CloudCompare/cork.git" constexpr.patch + cork.patch pcl.patch CloudCompare.desktop ccViewer.desktop) -md5sums=('SKIP' - '7b254561200ba7d51817e4860f589426' - 'b93f216458129507f154ea6d19a5fed0' - '379e09f6996b2b397429c0661c409bd0' - 'b6dcb0dee15cc67011166a2fc774c5ef') +sha256sums=('SKIP' + 'SKIP' + '984e6186f6483534a52cb153b65dee016904eb9efdb89211c2c0042eea2417ff' + '3f8692fbff2b92ebf422f2c4de46f2f9164cd37879092c66f171b32fea464227' + '183f05dee316bdf7c6e9935e2a21b79b2172f61df5b0b6954bcd0d74751afc64' + '14096df9cf7aca3099d5df1585d1cf669544e9b10754dce3d2507100dd7034fe' + '821ac2540e1196774e26f8033946ce7b36223dae7a2a7c78f4a901b4177f68cc') prepare() { git -C "${srcdir}/${name}" submodule update --init --recursive - git -C "${srcdir}/${name}" apply -v "${srcdir}"/*patch + git -C "${srcdir}/${name}" apply -v "${srcdir}"/{constexpr,pcl}.patch + git -C "${srcdir}/${name}-cork" apply -v "${srcdir}"/cork.patch } pkgver() { @@ -39,49 +45,55 @@ pkgver() { build() { # shellcheck disable=SC2191 CMAKE_FLAGS=( - -Wno-dev \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_CXX_FLAGS=-fpermissive \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=Release \ - -DCOMPILE_CC_CORE_LIB_WITH_CGAL=ON \ - -DCOMPILE_CC_CORE_LIB_WITH_TBB=ON \ - -DFFMPEG_INCLUDE_DIR=/usr/include \ - -DFFMPEG_LIBRARY_DIR=/usr/lib/ \ - -DOPTION_USE_DXF_LIB=ON \ - -DOPTION_USE_GDAL=ON \ - -DOPTION_USE_SHAPE_LIB=ON \ - -DPLUGIN_GL_QEDL=ON \ - -DPLUGIN_GL_QSSAO=ON \ - -DPLUGIN_IO_QADDITIONAL=ON \ - -DPLUGIN_IO_QCORE=ON \ - -DPLUGIN_IO_QCSV_MATRIX=ON \ - -DPLUGIN_IO_QE57=ON \ - -DPLUGIN_IO_QFBX=OFF \ - -DPLUGIN_IO_QPDAL=ON \ - -DPLUGIN_IO_QPHOTOSCAN=ON \ - -DPLUGIN_IO_QRDB=OFF \ - -DPLUGIN_STANDARD_QANIMATION=ON \ - -DPLUGIN_STANDARD_QBROOM=ON \ - -DPLUGIN_STANDARD_QCANUPO=OFF \ - -DPLUGIN_STANDARD_QCOMPASS=ON \ - -DPLUGIN_STANDARD_QCORK=OFF \ - -DPLUGIN_STANDARD_QCSF=ON \ - -DPLUGIN_STANDARD_QCSF=ON \ - -DPLUGIN_STANDARD_QFACETS=ON \ - -DPLUGIN_STANDARD_QHOUGH_NORMALS=ON \ - -DPLUGIN_STANDARD_QHPR=ON \ - -DPLUGIN_STANDARD_QM3C2=ON \ - -DPLUGIN_STANDARD_QPCL=ON \ - -DPLUGIN_STANDARD_QPCV=ON \ - -DPLUGIN_STANDARD_QPOISSON_RECON=ON \ - -DPLUGIN_STANDARD_QRANSAC_SD=ON \ - -DPLUGIN_STANDARD_QSRA=ON \ - -DPOISSON_RECON_WITH_OPEN_MP=ON \ - -DWITH_FFMPEG_SUPPORT=ON \ - -DEIGEN_ROOT_DIR=/usr/include/eigen3 + -Wno-dev + -DCMAKE_CXX_STANDARD=14 + -DCMAKE_CXX_FLAGS=-fpermissive + -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_BUILD_TYPE=Release + -DCOMPILE_CC_CORE_LIB_WITH_CGAL=ON + -DCOMPILE_CC_CORE_LIB_WITH_TBB=ON + -DPLUGIN_EXAMPLE_GL:BOOL=ON + -DPLUGIN_EXAMPLE_IO:BOOL=ON + -DPLUGIN_EXAMPLE_STANDARD:BOOL=ON + -DPLUGIN_GL_QEDL:BOOL=ON + -DPLUGIN_GL_QSSAO:BOOL=ON + -DPLUGIN_IO_QADDITIONAL:BOOL=ON + -DPLUGIN_IO_QCORE:BOOL=ON + -DPLUGIN_IO_QCSV_MATRIX:BOOL=ON + -DPLUGIN_IO_QE57:BOOL=ON + -DPLUGIN_IO_QFBX:BOOL=OFF # requires update of AUR/fbx-sdk (https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-1-1/fbx202011_fbxsdk_linux.tar.gz) + -DPLUGIN_IO_QPDAL:BOOL=ON + -DPLUGIN_IO_QPHOTOSCAN:BOOL=ON + -DPLUGIN_IO_QRDB:BOOL=OFF # requires rdblib (package for AUR from http://www.riegl.com/products/software-packages/rdblib/) + -DPLUGIN_STANDARD_QANIMATION:BOOL=ON + -DPLUGIN_STANDARD_QBROOM:BOOL=ON + -DPLUGIN_STANDARD_QCANUPO:BOOL=ON # requires dlib + -DDLIB_ROOT:PATH="/usr" # required by qcanupo plugin + -DPLUGIN_STANDARD_QCOMPASS:BOOL=ON + -DPLUGIN_STANDARD_QCORK:BOOL=ON # require mpir, cork (cork-git is not enough) + -DMPIR_INCLUDE_DIR:PATH=/usr/include # required by qcork plugin + -DCORK_INCLUDE_DIR:PATH="${srcdir}/${name}-cork/src" # required by qcork plugin + -DCORK_RELEASE_LIBRARY_FILE:PATH="${srcdir}/${name}-cork/lib/libcork.a" # required by qcork plugin + -DMPIR_RELEASE_LIBRARY_FILE:PATH=/usr/lib/libmpir.so # require by qcork plugin + -DPLUGIN_STANDARD_QCSF:BOOL=ON + -DPLUGIN_STANDARD_QFACETS:BOOL=ON # requires shapelib + -DOPTION_USE_SHAPE_LIB:BOOL=ON + -DPLUGIN_STANDARD_QHOUGH_NORMALS:BOOL=ON + -DPLUGIN_STANDARD_QHPR:BOOL=ON + -DPLUGIN_STANDARD_QM3C2:BOOL=ON + -DPLUGIN_STANDARD_QPCL:BOOL=ON + -DPLUGIN_STANDARD_QPCV:BOOL=ON + -DPLUGIN_STANDARD_QPOISSON_RECON:BOOL=ON + -DPLUGIN_STANDARD_QRANSAC_SD:BOOL=ON + -DPLUGIN_STANDARD_QSRA:BOOL=ON + -DOPTION_USE_DXF_LIB:BOOL=ON # required by qsra plugin + -DEIGEN_ROOT_DIR=/usr/include/eigen3 ) + msg2 "Build Cork lib" + (cd "${srcdir}/${name}-cork"; CFLAGS+=" -fPIC" CXXFLAGS+=" -fPIC" make) + msg2 "Build CloudCompare" + (cd "${srcdir}/${name}-cork"; make) cmake -B build -S "${srcdir}/${name}" -G Ninja "${CMAKE_FLAGS[@]}" -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-deprecated-declarations" # shellcheck disable=SC2086 # allow slitting for MAKEFLAGS carrying multiple flags. ninja -C build ${MAKEFLAGS:--j1} diff --git a/cork.patch b/cork.patch new file mode 100644 index 000000000000..370b0260eb10 --- /dev/null +++ b/cork.patch @@ -0,0 +1,79 @@ +diff --git a/Makefile b/Makefile +index a9fbb62..8ca986c 100644 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ INC := $(INC) $(GMPINC) + # use the second line to disable profiling instrumentation + # PROFILING := -pg + PROFILING := +-CCFLAGS := -Wall $(INC) $(CONFIG) -O2 -DNDEBUG $(PROFILING) ++CCFLAGS := -fPIC -Wall $(INC) $(CONFIG) -O2 -DNDEBUG $(PROFILING) + CXXFLAGS := $(CCFLAGS) $(CPP11_FLAGS) + CCDFLAGS := -Wall $(INC) $(CONFIG) -ggdb + CXXDFLAGS := $(CCDFLAGS) +@@ -193,7 +193,7 @@ bin/off2obj: obj/off2obj.o + + obj/isct/triangle.o: src/isct/triangle.c + @echo "Compiling the Triangle library" +- @$(CC) -O2 -DNO_TIMER \ ++ @$(CC) $(CCFLAGS) -O2 -DNO_TIMER \ + -DREDUCED \ + -DCDT_ONLY -DTRILIBRARY \ + -Wall -DANSI_DECLARATORS \ +diff --git a/src/mesh/mesh.isct.tpp b/src/mesh/mesh.isct.tpp +index a0acc15..69d33a8 100644 +--- a/src/mesh/mesh.isct.tpp ++++ b/src/mesh/mesh.isct.tpp +@@ -650,14 +650,14 @@ public: + // DGM: to replace lambda in IsctProblem constructor! + void quantizeVerts(const Quantization& quantizer) + { +- if (!mesh) ++ if (!TopoCache::mesh) + return; + +- size_t N = mesh->verts.size(); ++ size_t N = TopoCache::mesh->verts.size(); + quantized_coords.resize(N); + + uint write = 0; +- for (Vptr v = verts.getFirst(); v != NULL; v = verts.getNext(v)) ++ for (Vptr v = TopoCache::verts.getFirst(); v != NULL; v = TopoCache::verts.getNext(v)) + { + #ifdef _WIN32 + Vec3d raw = mesh->verts[v->ref].pos; +@@ -1106,7 +1106,7 @@ void Mesh<VertData,TriData>::IsctProblem::findIntersections() + if(nTrys <= 0) { + CORK_ERROR("Ran out of tries to perturb the mesh"); + //std::logic_error +- throw std::exception("Ran out of tries to perturb the mesh"); ++ throw std::runtime_error("Ran out of tries to perturb the mesh"); + //exit(1); + } + +diff --git a/src/mesh/mesh.topoCache.tpp b/src/mesh/mesh.topoCache.tpp +index cf225d6..b648d5f 100644 +--- a/src/mesh/mesh.topoCache.tpp ++++ b/src/mesh/mesh.topoCache.tpp +@@ -504,7 +504,7 @@ void Mesh<VertData, TriData>::TopoCache::print() + cout << "TRIS" << endl; + int tri_count = 0; + tris.for_each([&](Tptr t) { +- cout << " " << t << ": " << *t << endl; ++ cout << " " << t << ": " << endl; + tri_count++; + }); + cout << "There were " << tri_count << " TRIS" << endl; +diff --git a/src/util/prelude.h b/src/util/prelude.h +index 6836ace..6981d20 100644 +--- a/src/util/prelude.h ++++ b/src/util/prelude.h +@@ -60,7 +60,7 @@ std::ostream &err(); + err() << "ENSURE FAILED at " \ + << __FILE__ << ", line #" << __LINE__ << ":\n" \ + << " " << #STATEMENT << std::endl; \ +- throw std::exception("ENSURE FAILED"); \ ++ throw std::runtime_error("ENSURE FAILED"); \ + } \ + } + #endif // ENSURE |