diff options
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 91 | ||||
-rw-r--r-- | fix_3rdparty_path.patch | 10 | ||||
-rw-r--r-- | fix_tetramesh.patch | 105 | ||||
-rw-r--r-- | open3d.changelog | 8 |
6 files changed, 175 insertions, 74 deletions
@@ -1,20 +1,14 @@ pkgbase = open3d pkgdesc = A Modern Library for 3D Data Processing - pkgver = 0.1.1 + pkgver = 0.8.0 pkgrel = 1 epoch = 3 url = http://www.open3d.org - changelog = open3d.changelog arch = x86_64 license = MIT - checkdepends = gtest makedepends = cmake - makedepends = findutils - makedepends = gawk makedepends = git - makedepends = make - makedepends = pacman - makedepends = sed + makedepends = python-setuptools depends = eigen depends = glew depends = glfw-x11 @@ -23,10 +17,16 @@ pkgbase = open3d depends = libpng depends = mesa depends = xorg-server-devel - optdepends = openmp - optdepends = python - source = open3d::git+https://github.com/IntelVCL/Open3D.git - md5sums = SKIP + optdepends = openmp: Multiprocess support + optdepends = pybind11: System pybind11 support + optdepends = python: Python support + optdepends = jupyter-notebook: Jupyter notebook support + source = open3d::git+https://github.com/IntelVCL/Open3D.git#tag=v0.8.0 + source = fix_tetramesh.patch + source = fix_3rdparty_path.patch + sha256sums = SKIP + sha256sums = 62db4ca21f7da73f6add22dd3697cb820952e67d006cdb618d16c5980ed0659f + sha256sums = 3bf6b79fd075b356a5c2d86a557e0bc6e6df0e84d53c2077d2c6685641838d81 pkgname = open3d depends = eigen @@ -37,7 +37,7 @@ pkgname = open3d depends = libpng depends = mesa depends = xorg-server-devel - optdepends = openmp + optdepends = openmp: Multiprocess support conflicts = open3d-git pkgname = python-open3d @@ -51,7 +51,9 @@ pkgname = python-open3d depends = open3d depends = python depends = xorg-server-devel - optdepends = openmp + optdepends = jupyter-notebook: Jupyter notebook support + optdepends = openmp: Multiprocess support + optdepends = pybind11: System pybind11 support conflicts = python-open3d-git conflicts = python-py3d conflicts = python-py3d-git @@ -67,7 +69,9 @@ pkgname = python-py3d depends = open3d depends = python depends = xorg-server-devel - optdepends = openmp + optdepends = jupyter-notebook: Jupyter notebook support + optdepends = openmp: Multiprocess support + optdepends = pybind11: System pybind11 support conflicts = python-py3d-git conflicts = python-open3d conflicts = python-open3d-git diff --git a/.gitignore b/.gitignore index b568e813bcb4..5de8efb8e332 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ !/.SRCINFO !/.gitignore !/PKGBUILD +!/*.patch @@ -1,9 +1,9 @@ -# -*- mode: shell-script -*- -# Maintainer: Dylon Edwards <deltaecho at archlinux dot us> +# Maintainer: JunYoung Gwak <aur@jgwak.com> +# Contributor: Dylon Edwards <deltaecho at archlinux dot us> pkgbase=open3d pkgname=( {,python-}open3d python-py3d ) -pkgver=0.1.1 +pkgver=0.8.0 pkgrel=1 epoch=3 pkgdesc="A Modern Library for 3D Data Processing" @@ -21,49 +21,38 @@ depends=( xorg-server-devel ) optdepends=( - openmp - python + 'openmp: Multiprocess support' + 'pybind11: System pybind11 support' + 'python: Python support' + 'jupyter-notebook: Jupyter notebook support' ) makedepends=( cmake - findutils - gawk git - make - pacman - sed + python-setuptools ) -checkdepends=( - gtest -) -changelog="${pkgbase}.changelog" -source=("${pkgbase}::git+https://github.com/IntelVCL/Open3D.git") -md5sums=(SKIP) - -function pkgver() { - cd "${pkgbase}" - # grab the latest tag - git describe --tags --abbrev=0 | sed -e 's/^v\?//' -} +source=("${pkgbase}::git+https://github.com/IntelVCL/Open3D.git#tag=v${pkgver}" + fix_tetramesh.patch + fix_3rdparty_path.patch) +sha256sums=('SKIP' + '62db4ca21f7da73f6add22dd3697cb820952e67d006cdb618d16c5980ed0659f' + '3bf6b79fd075b356a5c2d86a557e0bc6e6df0e84d53c2077d2c6685641838d81') function prepare() { - cd "${pkgbase}" - mkdir -p build + cd "${srcdir}/${pkgbase}" + patch --forward --strip=1 --input="${srcdir}/fix_tetramesh.patch" + patch --forward --strip=1 --input="${srcdir}/fix_3rdparty_path.patch" + git submodule update --init --recursive + mkdir build } function build() { - cd "${pkgbase}/build" - cmake ../src \ - -DCMAKE_INSTALL_PREFIX=/usr \ + cd "${srcdir}/${pkgbase}/build" + cmake .. \ + -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr \ -DBUILD_SHARED_LIBS=ON \ - -DOpen3D_BUILD_UNIT_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release - make -} - -function check() { - cd "${pkgbase}/build" - bin/unitTests + make -j$(nproc) } function package_open3d() { @@ -78,19 +67,13 @@ function package_open3d() { xorg-server-devel ) optdepends=( - openmp + 'openmp: Multiprocess support' ) conflicts=( open3d-git ) - cd "${pkgbase}/build" - install -m 644 -D -t "${pkgdir}/usr/lib" lib/lib*.so - find ../src/{Core,Experimental,IO,Python,Tools,Visualization} -name '*.h' \ - | sed -e 's|\.\./src/||' \ - | xargs -I{} -n1 \ - install -m 644 -D -T ../src/{} "${pkgdir}"/usr/include/Open3D/{} - find bin -type f \( -not -name unitTests -not -path 'bin/Test/*' \) \ - | xargs -I{} install -m 755 -D -t "${pkgdir}"/usr/bin {} + cd "${srcdir}/${pkgbase}/build" + make install } function package_python-open3d() { @@ -107,7 +90,9 @@ function package_python-open3d() { xorg-server-devel ) optdepends=( - openmp + 'jupyter-notebook: Jupyter notebook support' + 'openmp: Multiprocess support' + 'pybind11: System pybind11 support' ) privides=( python-py3d @@ -116,9 +101,10 @@ function package_python-open3d() { python-open3d-git python-py3d{,-git} ) - cd "${pkgbase}/build" - local SITE_PACKAGES="$(pacman -Qlq python | grep '/site-packages/$')" - install -m 644 -D -t "${pkgdir}/${SITE_PACKAGES}" lib/py3d.*.so + cd "${srcdir}/${pkgbase}/build" + make python-package + cd "${srcdir}/${pkgbase}/build/lib/python_package" + python setup.py install --root="$pkgdir/" --optimize=1 } function package_python-py3d() { @@ -135,7 +121,9 @@ function package_python-py3d() { xorg-server-devel ) optdepends=( - openmp + 'jupyter-notebook: Jupyter notebook support' + 'openmp: Multiprocess support' + 'pybind11: System pybind11 support' ) privides=( python-open3d @@ -144,7 +132,8 @@ function package_python-py3d() { python-py3d-git python-open3d{,-git} ) - cd "${pkgbase}/build" - local SITE_PACKAGES="$(pacman -Qlq python | grep '/site-packages/$')" - install -m 644 -D -t "${pkgdir}/${SITE_PACKAGES}" lib/py3d.*.so + cd "${srcdir}/${pkgbase}/build" + make python-package + cd "${srcdir}/${pkgbase}/build/lib/python_package" + python setup.py install --root="$pkgdir/" --optimize=1 } diff --git a/fix_3rdparty_path.patch b/fix_3rdparty_path.patch new file mode 100644 index 000000000000..2074c35ceae0 --- /dev/null +++ b/fix_3rdparty_path.patch @@ -0,0 +1,10 @@ +diff --unified --recursive --text open3d/3rdparty/libjpeg-turbo/libjpeg-turbo.cmake open3d_patch/3rdparty/libjpeg-turbo/libjpeg-turbo.cmake +--- open3d/3rdparty/libjpeg-turbo/libjpeg-turbo.cmake 2019-12-09 02:09:55.853560635 -0800 ++++ open3d_patch/3rdparty/libjpeg-turbo/libjpeg-turbo.cmake 2019-12-09 02:09:31.837228165 -0800 +@@ -78,7 +78,7 @@ + set(JPEG_TURBO_LIBRARIES ${lib_name}) + + set(turbojpeg_LIB_FILES +- ${3RDPARTY_INSTALL_PREFIX}/${LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX} ++ ${3RDPARTY_INSTALL_PREFIX}/lib64/${CMAKE_STATIC_LIBRARY_PREFIX}${lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX} + ) diff --git a/fix_tetramesh.patch b/fix_tetramesh.patch new file mode 100644 index 000000000000..02ce0c141285 --- /dev/null +++ b/fix_tetramesh.patch @@ -0,0 +1,105 @@ +From 789f288a2196336dd1b32959451351ebc904b06f Mon Sep 17 00:00:00 2001 +From: Benjamin Ummenhofer <benjaminum@gmail.com> +Date: Mon, 30 Sep 2019 11:41:18 +0200 +Subject: [PATCH] fixed maybe-uninitialized warning in TetraMesh.cpp also print + warning on the console if the tetra is invalid + +--- + src/Open3D/Geometry/TetraMesh.cpp | 65 ++++++++++++++++++------------- + 1 file changed, 37 insertions(+), 28 deletions(-) + +diff --git a/src/Open3D/Geometry/TetraMesh.cpp b/src/Open3D/Geometry/TetraMesh.cpp +index b7bef22b6..b96a2c2d8 100644 +--- a/src/Open3D/Geometry/TetraMesh.cpp ++++ b/src/Open3D/Geometry/TetraMesh.cpp +@@ -254,7 +254,7 @@ std::shared_ptr<TriangleMesh> TetraMesh::ExtractTriangleMesh( + const auto &tetra = tetras_[tetra_i]; + + std::array<Eigen::Vector3d, 4> verts; +- std::array<Index2, 4> keys; ++ std::array<Index2, 4> keys; // keys for the edges + std::array<Index, 4> verts_indices; + std::array<Eigen::Vector3d, 4> edge_dirs; + int num_verts = 0; +@@ -306,7 +306,7 @@ std::shared_ptr<TriangleMesh> TetraMesh::ExtractTriangleMesh( + + triangle_mesh->triangles_.push_back(tri); + } else if (4 == num_verts) { +- std::array<int, 4> order; ++ std::array<int, 4> order = {-1, 0, 0, 0}; + if (HasCommonVertexIndex(keys[0], keys[1]) && + HasCommonVertexIndex(keys[0], keys[2])) { + order = {1, 0, 2, 3}; +@@ -318,37 +318,46 @@ std::shared_ptr<TriangleMesh> TetraMesh::ExtractTriangleMesh( + order = {2, 0, 3, 1}; + } + +- // accumulate to improve robustness of the triangle orientation test +- double dot = 0; +- for (int i = 0; i < 4; ++i) { +- Eigen::Vector3d tri_normal = ComputeTriangleNormal( +- verts[order[(4 + i - 1) % 4]], verts[order[i]], +- verts[order[(i + 1) % 4]]); +- dot += tri_normal.dot(edge_dirs[order[i]]); +- } +- if (dot < 0) std::reverse(order.begin(), order.end()); +- +- std::array<Eigen::Vector3i, 2> tris; +- if ((verts[order[0]] - verts[order[2]]).squaredNorm() < +- (verts[order[1]] - verts[order[3]]).squaredNorm()) { +- tris[0] << verts_indices[order[0]], verts_indices[order[1]], +- verts_indices[order[2]]; +- tris[1] << verts_indices[order[2]], verts_indices[order[3]], +- verts_indices[order[0]]; ++ if (order[0] != -1) { ++ // accumulate to improve robustness of the triangle orientation ++ // test ++ double dot = 0; ++ for (int i = 0; i < 4; ++i) { ++ Eigen::Vector3d tri_normal = ComputeTriangleNormal( ++ verts[order[(4 + i - 1) % 4]], verts[order[i]], ++ verts[order[(i + 1) % 4]]); ++ dot += tri_normal.dot(edge_dirs[order[i]]); ++ } ++ if (dot < 0) std::reverse(order.begin(), order.end()); ++ ++ std::array<Eigen::Vector3i, 2> tris; ++ if ((verts[order[0]] - verts[order[2]]).squaredNorm() < ++ (verts[order[1]] - verts[order[3]]).squaredNorm()) { ++ tris[0] << verts_indices[order[0]], verts_indices[order[1]], ++ verts_indices[order[2]]; ++ tris[1] << verts_indices[order[2]], verts_indices[order[3]], ++ verts_indices[order[0]]; ++ } else { ++ tris[0] << verts_indices[order[0]], verts_indices[order[1]], ++ verts_indices[order[3]]; ++ tris[1] << verts_indices[order[1]], verts_indices[order[2]], ++ verts_indices[order[3]]; ++ } ++ ++ triangle_mesh->triangles_.insert( ++ triangle_mesh->triangles_.end(), {tris[0], tris[1]}); + } else { +- tris[0] << verts_indices[order[0]], verts_indices[order[1]], +- verts_indices[order[3]]; +- tris[1] << verts_indices[order[1]], verts_indices[order[2]], +- verts_indices[order[3]]; ++ utility::LogWarning( ++ "[ExtractTriangleMesh] failed to create triangles for " ++ "tetrahedron {:d}: invalid edge configuration for " ++ "tetrahedron\n", ++ int(tetra_i)); + } +- +- triangle_mesh->triangles_.insert(triangle_mesh->triangles_.end(), +- {tris[0], tris[1]}); + } else if (0 != num_verts) { + utility::LogWarning( + "[ExtractTriangleMesh] failed to create triangles for " +- "tetrahedron {:d}\n", +- int(tetra_i)); ++ "tetrahedron {:d}: unexpected number of vertices {:d}\n", ++ int(tetra_i), num_verts); + } + } + diff --git a/open3d.changelog b/open3d.changelog deleted file mode 100644 index d2947a30e6d6..000000000000 --- a/open3d.changelog +++ /dev/null @@ -1,8 +0,0 @@ -2018-05-01 Dylon Edwards <deltaecho at archlinux dot us> - * open3d 0.1.1 Changed to the official repository at open3d.org - -2018-04-29 Dylon Edwards <deltaecho at archlinux dot us> - * open3d 0.1.2 Fixed source location for future project location (see: https://github.com/Open-3D/Open3D/issues/31) - -2018-04-28 Dylon Edwards <deltaecho at archlinux dot us> - * open3d 0.1.2 |