Date: Friday, November 25, 2022 @ 12:38:16 Author: svenstaro Revision: 1353880
Move meshroom from AUR Added: meshroom/ meshroom/repos/ meshroom/trunk/ meshroom/trunk/PKGBUILD meshroom/trunk/pyside_property_error.patch meshroom/trunk/python-compat.patch -----------------------------+ PKGBUILD | 97 ++++++++++++++++++++++++++++++++++++++++++ pyside_property_error.patch | 42 ++++++++++++++++++ python-compat.patch | 23 +++++++++ 3 files changed, 162 insertions(+) Added: meshroom/trunk/PKGBUILD =================================================================== --- meshroom/trunk/PKGBUILD (rev 0) +++ meshroom/trunk/PKGBUILD 2022-11-25 12:38:16 UTC (rev 1353880) @@ -0,0 +1,97 @@ +# Maintainer: Sven-Hendrik Haase <[email protected]> +# Contributor: bartus <arch-user-repoᘓbartus.33mail.com> + +pkgname=meshroom +pkgver=2021.1.0 +pkgrel=7 +pkgdesc="A free, open-source 3D Reconstruction Software based on the AliceVision framework" +arch=('x86_64') +url="https://alicevision.github.io/" +license=('MPL2') +depends=('alice-vision' 'alembic' 'openimageio' 'python-psutil' 'popsift' + 'pyside2' 'qt5-quickcontrols' 'qt5-quickcontrols2' 'qt5-3d' 'qt5-graphicaleffects' + 'qt5-imageformats' 'qt5-location' 'qt5-svg' 'qt5-charts') +makedepends=('git' 'cmake' 'python-idna' 'python-setuptools' 'ninja' 'boost' 'coin-or-lemon') +source=("${pkgname}::git+https://github.com/alicevision/meshroom.git#tag=v${pkgver}" + "git+https://github.com/alicevision/QtOIIO.git#tag=v${pkgver}" + "git+https://github.com/alicevision/qmlAlembic.git#tag=v${pkgver}" + "voctree::git+https://gitlab.com/alicevision/trainedVocabularyTreeData.git" + "git+https://github.com/alicevision/qtAliceVision.git#commit=517fc5ffb43471b12f71aa8b9881cf0634647a93^" + "python-compat.patch" + "pyside_property_error.patch") +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '8f326257d7b76136a600ce7ae5785337f98725d5b54f7f44320d60f6a59244a8' + 'e211783ead22d388c72f60bac7ab95d670a4d6ae196225c15038b5c9e7c80fdc') + +prepare() { + cd meshroom + + # Hardcode camera_database and voctree default value + sed -i "s:'ALICEVISION_VOCTREE', '':'ALICEVISION_VOCTREE', '/usr/share/${pkgname}/vlfeat_K80L3.SIFT.tree':g" meshroom/nodes/aliceVision/*.py + sed -i "s:'ALICEVISION_SENSOR_DB', '':'ALICEVISION_SENSOR_DB', '/usr/share/aliceVision/cameraSensors.db':g" meshroom/nodes/aliceVision/*.py + + # Fix for QtOIIO plugin to build against openexr:3 + sed -i '1 i\#include <cmath>' "${srcdir}"/QtOIIO/src/jetColorMap.hpp + sed -i 's|imageformats|plugins/imageformats|' "${srcdir}"/QtOIIO/src/imageIOHandler/CMakeLists.txt + + sed -i 's|${OPENIMAGEIO_LIBRARIES}|OpenImageIO::OpenImageIO|g' "${srcdir}"/QtOIIO/src/{imageIOHandler,depthMapEntity}/CMakeLists.txt + sed -i 's|${OPENIMAGEIO_INCLUDE_DIRS}|${OpenImageIO_INCLUDE_DIRS}|g' "${srcdir}"/QtOIIO/src/{imageIOHandler,depthMapEntity}/CMakeLists.txt + sed -i 's|OPENIMAGEIO_FOUND|OpenImageIO_FOUND|' "${srcdir}"/QtOIIO/CMakeLists.txt + rm -rf "${srcdir}"/QtOIIO/cmake/ + + # Fix for qmlAlembic plugin to build against openexr:3 + sed -i '/find_package(IlmBase REQUIRED)/d' "${srcdir}"/qmlAlembic/CMakeLists.txt + sed -i 's|${ILMBASE_INCLUDE_DIR}||' "${srcdir}"/qmlAlembic/src/CMakeLists.txt + rm -rf "${srcdir}"/qmlAlembic/cmake/ + + # avoid bug in pyside 5.15.2 (https://bugreports.qt.io/browse/PYSIDE-1426) + patch -Np1 -i "$srcdir"/pyside_property_error.patch + + patch -Np1 -i "$srcdir"/python-compat.patch +} + +build() { + cd "${srcdir}"/QtOIIO + cmake \ + -Bbuild \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="/usr/lib/qt" \ + -DCMAKE_BUILD_TYPE=None + ninja -C build + + cd "${srcdir}"/qmlAlembic + cmake \ + -Bbuild \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="/usr/lib/qt" \ + -DCMAKE_BUILD_TYPE=None + ninja -C build + + cd "${srcdir}"/qtAliceVision + cmake \ + -Bbuild \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="/usr/lib/qt" \ + -DCMAKE_BUILD_TYPE=None + ninja -C build +} + +package() { + DESTDIR="${pkgdir}" ninja -C QtOIIO/build install + DESTDIR="${pkgdir}" ninja -C qmlAlembic/build install + DESTDIR="${pkgdir}" ninja -C qtAliceVision/build install + + cd meshroom + install -Dm755 meshroom/ui/__main__.py "${pkgdir}"/usr/bin/meshroom + install -m755 -t "${pkgdir}"/usr/bin bin/meshroom_* + + mkdir -p "${pkgdir}"/usr/lib/python3.10 + cp -r meshroom "${pkgdir}"/usr/lib/python3.10 + + install -Dm644 -t "${pkgdir}"/usr/share/meshroom "${srcdir}"/voctree/vlfeat_K80L3.SIFT.tree +} +# vim:set ts=2 sw=2 et: Added: meshroom/trunk/pyside_property_error.patch =================================================================== --- meshroom/trunk/pyside_property_error.patch (rev 0) +++ meshroom/trunk/pyside_property_error.patch 2022-11-25 12:38:16 UTC (rev 1353880) @@ -0,0 +1,42 @@ +--- meshroom.orig/meshroom/ui/app.py 2021-03-01 16:44:31.268547600 +0000 ++++ meshroom/meshroom/ui/app.py 2021-03-01 16:49:33.466725600 +0000 +@@ -284,7 +284,6 @@ + return md + return markdown(md) + +- @Property(QJsonValue, constant=True) + def systemInfo(self): + import platform + import sys +@@ -292,8 +291,8 @@ + 'platform': '{} {}'.format(platform.system(), platform.release()), + 'python': 'Python {}'.format(sys.version.split(" ")[0]) + } ++ systemInfo = Property(QJsonValue, fget=systemInfo, constant=True) + +- @Property("QVariantList", constant=True) + def licensesModel(self): + """ + Get info about open-source licenses for the application. +@@ -315,6 +314,7 @@ + "onlineUrl": "https://raw.githubusercontent.com/alicevision/AliceVision/develop/COPYING.md" + } + ] ++ licensesModel = Property("QVariantList", fget=licensesModel, constant=True) + + recentProjectFilesChanged = Signal() + recentProjectFiles = Property("QVariantList", _recentProjectFiles, notify=recentProjectFilesChanged) +--- meshroom.orig/meshroom/ui/reconstruction.py 2021-03-01 16:44:31.313764800 +0000 ++++ meshroom/meshroom/ui/reconstruction.py 2021-03-01 16:50:33.238323700 +0000 +@@ -249,10 +249,10 @@ + self._undistortedImagePath = os.path.join(self._activeNode_PrepareDenseScene.node.output.value, filename) + self.denseSceneParamsChanged.emit() + +- @Property(type=QObject, constant=True) + def attribute(self): + """ Get the underlying Viewpoint attribute wrapped by this Viewpoint. """ + return self._viewpoint ++ attribute = Property(QObject, fget=attribute, constant=True) + + @Property(type="QVariant", notify=initialParamsChanged) + def initialIntrinsics(self): Added: meshroom/trunk/python-compat.patch =================================================================== --- meshroom/trunk/python-compat.patch (rev 0) +++ meshroom/trunk/python-compat.patch 2022-11-25 12:38:16 UTC (rev 1353880) @@ -0,0 +1,23 @@ +diff --git a/meshroom/ui/__main__.py b/meshroom/ui/__main__.py +index 5914f1ad..aaff2737 100644 +--- a/meshroom/ui/__main__.py ++++ b/meshroom/ui/__main__.py +@@ -1,3 +1,5 @@ ++#!/usr/bin/env python ++ + import signal + import sys + import meshroom +diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py +index c37ffafc..9d5373a2 100755 +--- a/meshroom/ui/reconstruction.py ++++ b/meshroom/ui/reconstruction.py +@@ -3,7 +3,7 @@ import logging + import math + import os + from threading import Thread +-from collections import Iterable ++from collections.abc import Iterable + + from PySide2.QtCore import QObject, Slot, Property, Signal, QUrl, QSizeF + from PySide2.QtGui import QMatrix4x4, QMatrix3x3, QQuaternion, QVector3D, QVector2D
