diff options
author | bartus | 2021-08-10 21:03:18 +0200 |
---|---|---|
committer | bartus | 2021-08-10 22:51:21 +0200 |
commit | 9de6542b6438a8f6cb1d9e3f89cd9de60e1ba257 (patch) | |
tree | be3e6a40e22eb967aadfd7fbbd5b0dec77475455 | |
parent | 81d59331a4d081e9a8bb275f67ea5a48d8fd53b4 (diff) | |
download | aur-9de6542b6438a8f6cb1d9e3f89cd9de60e1ba257.tar.gz |
Refactor, port non-vcs PKGBUILD changes
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 112 |
2 files changed, 74 insertions, 48 deletions
@@ -12,30 +12,28 @@ pkgbase = alice-vision-git makedepends = eigen makedepends = freetype2 makedepends = gflags - makedepends = doxygen - makedepends = python-sphinx makedepends = coin-or-coinutils makedepends = coin-or-lemon makedepends = git makedepends = cmake - depends = alembic depends = boost-libs - depends = cctag depends = ceres-solver depends = coin-or-clp depends = flann depends = google-glog - depends = opencv depends = openimageio - depends = opengv depends = glu depends = glfw-x11 + depends = alembic + depends = opengv + depends = opencv provides = alice-vision provides = geogram conflicts = alice-vision conflicts = geogram source = alice-vision-git::git+https://github.com/alicevision/AliceVision.git#branch=develop source = geogram::git+https://github.com/alicevision/geogram.git + source = ute_lib::git+https://github.com/alicevision/uncertaintyTE.git source = cmake_cxx_std_14.patch source = openexr3.patch source = osi_clp::git+https://github.com/alicevision/osi_clp @@ -1,37 +1,44 @@ #!/hint/bash # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> -#Configuration: -#Use: makepkg VAR1=0 VAR2=1 to enable(1) disable(0) a feature -#Use: {yay,paru} --mflags=VAR1=0,VAR2=1 -#Use: aurutils --margs=VAR1=0,VAR2=1 -#Use: VAR1=0 VAR2=1 pamac +# Configuration: +# Use: makepkg VAR1=0 VAR2=1 to enable(1) disable(0) a feature +# Use: {yay,paru} --mflags=VAR1=0,VAR2=1 +# Use: aurutils --margs=VAR1=0,VAR2=1 +# Use: VAR1=0 VAR2=1 pamac # Use FRAGMENT=#{commit,tag,brach}=xxx for bisect build _fragment="${FRAGMENT:-#branch=develop}" # Use CUDA_ARCH to build for specific GPU architecture # Supports: single arch (52) and list of archs (52;60) -[[ -v CUDA_ARCH ]] && _cuda_arch="-DALICEVISION_CUDA_CC_LIST=${CUDA_ARCH}" -# Alow user to build without cuda -if ((DISABLE_CUDA)); then - _CMAKE_FLAGS+=('-DALICEVISION_USE_CUDA=OFF') - # Disable component that could yield cuda. -else - makedepends+=('cuda') - depends+=('popsift') - depends+=('magma') # uncertaintyTE deps. - source+=("ute_lib::git+https://github.com/alicevision/uncertaintyTE.git") - provides+=(uncertainty-framework) - conflicts+=(uncertainty-framework) - _CMAKE_FLAGS+=( - -DCUDA_HOST_COMPILER=/opt/cuda/bin/gcc - -D{MAGMA_ROOT,{UNCERTAINTYTE,PopSift}_DIR}=/usr - "$_cuda_arch" - ) -fi +[[ -v CUDA_ARCH ]] && _cuda_arch="-DALICEVISION_CUDA_CC_LIST=${CUDA_ARCH}" +((DISABLE_CUDA)) && eval DISABLE_{CCTAG,POPSIFT,UTE}=1 # Disable other components that requires cuda +((DISABLE_OPENCV)) && DISABLE_CCTAG=1 # CCTag requires OpenCV +((DISABLE_CUDA)) && _use_cuda=OFF || _use_cuda=ON # Alow user to build without cuda +((DISABLE_CCTAG)) && _use_cctag=OFF || _use_cctag=ON # Disable CCTag (require: cuda) +((DISABLE_POPSIFT)) && _use_popsift=OFF || _use_popsift=ON # Disable Popsift (requires: cuda) +((DISABLE_UTE)) && _use_ute=OFF || _use_ute=ON # Disable Uncertainty computation (require: cuda) +((DISABLE_ALEMBIC)) && _use_alembic=OFF || _use_alembic=ON # Disable Alembic (mesh export format) +((DISABLE_OPENGV)) && _use_opengv=OFF || _use_opengv=ON # Disable OpenGV (camera calibration) +((DISABLE_OPENCV)) && _use_opencv=OFF || _use_opencv=ON # Disable OpenCV (examples & CCTag dependency) +((!BUILD_DOC)) && _build_doc=OFF || _build_doc=ON # Disable Docs + +# Other CMake Options: + +# ALICEVISION_BUILD_SFM "Build AliceVision SfM part" ON +# ALICEVISION_BUILD_MVS "Build AliceVision MVS part" ON +# ALICEVISION_BUILD_HDR "Build AliceVision HDR part" ON +# ALICEVISION_BUILD_SOFTWARE "Build AliceVision command line tools." ON +# ALICEVISION_BUILD_EXAMPLES "Build AliceVision samples applications." OFF +# ALICEVISION_BUILD_COVERAGE "Enable code coverage generation (gcc only)" OFF +# ALICEVISION_BUILD_TESTS "Build AliceVision tests" OFF +# ALICEVISION_USE_OCVSIFT "Add or not OpenCV SIFT in available features" OFF +# ALICEVISION_USE_MESHSDFILTER "Use MeshSDFilter library (enable MeshDenoising and MeshDecimate)" ON +# ALICEVISION_USE_NVTX_PROFILING "Use CUDA NVTX for profiling." OFF +# ALICEVISION_NVCC_WARNINGS "Switch on several additional warnings for CUDA nvcc." OFF _CMAKE_FLAGS+=( -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib @@ -40,9 +47,20 @@ _CMAKE_FLAGS+=( -D{COINUTILS,CLP,OSI}_INCLUDE_DIR_HINTS=/usr/include/coin -DLEMON_INCLUDE_DIR_HINTS=/usr/include/lemon -DCERES_DIR=/usr/include/ceres - -DALICEVISION_BUILD_DOC=OFF - -DALICEVISION_USE_CCTAG=ON - -DALICEVISION_USE_OPENCV=ON + -DPopSift_DIR=/usr + -DCCTag_DIR=/usr/lib/cmake/CCTag + -DUNCERTAINTYTE_DIR="${srcdir}/ute_bin" + -DGEOGRAM_INSTALL_PREFIX="${srcdir}/geogram_bin" + -DMAGMA_ROOT=/usr + -DALICEVISION_USE_CUDA="$_use_cuda" + -DALICEVISION_USE_CCTAG="$_use_cctag" + -DALICEVISION_USE_POPSIFT="$_use_popsift" + -DALICEVISION_USE_UNCERTAINTYTE="$_use_ute" + -DALICEVISION_USE_ALEMBIC="$_use_alembic" + -DALICEVISION_USE_OPENGV="$_use_opengv" + -DALICEVISION_USE_OPENCV="$_use_opencv" + -DALICEVISION_BUILD_DOC="$_build_doc" + "$_cuda_arch" ) _name=alice-vision @@ -54,14 +72,25 @@ pkgdesc="Photogrammetric Computer Vision Framework which provides a 3D Reconstru arch=('i686' 'x86_64') url="https://alicevision.github.io/" license=('MPL2' 'MIT') -groups=() conflicts+=("${_name}" geogram) provides+=("${_name}" geogram) -depends+=('alembic' 'boost-libs' 'cctag' 'ceres-solver' 'coin-or-clp' 'flann' 'google-glog' 'opencv' 'openimageio' 'opengv' ) +((!DISABLE_UTE)) && { + provides+=(uncertainty-framework) + conflicts+=(uncertainty-framework) +} +depends+=('boost-libs' 'ceres-solver' 'coin-or-clp' 'flann' 'google-glog' 'openimageio') depends+=('glu' 'glfw-x11') # geogram deps. -makedepends+=('ninja' 'boost' 'eigen' 'freetype2' 'gflags' 'doxygen' 'python-sphinx' 'coin-or-coinutils' 'coin-or-lemon' 'git' 'cmake') +makedepends+=('ninja' 'boost' 'eigen' 'freetype2' 'gflags' 'coin-or-coinutils' 'coin-or-lemon' 'git' 'cmake') +((!DISABLE_CCTAG)) && depends+=('cctag') +((!DISABLE_ALEMBIC)) && depends+=('alembic') +((!DISABLE_OPENGV)) && depends+=('opengv') +((!DISABLE_OPENCV)) && depends+=('opencv') +((BUILD_DOC)) && makedepends+=('python-sphinx' 'doxygen') +((!DISABLE_POPSIFT)) && { makedepends+=('popsift'); optdepends+=('popsift-libs: for GPU accelerated feature matching'); } +((!DISABLE_UTE)) && makedepends+=('magma') source+=("${pkgname}::git+https://github.com/alicevision/AliceVision.git${_fragment}" "geogram::git+https://github.com/alicevision/geogram.git" + "ute_lib::git+https://github.com/alicevision/uncertaintyTE.git" "cmake_cxx_std_14.patch" "openexr3.patch" ) @@ -94,31 +123,31 @@ prepare() { build() { export CCACHE_BASEDIR="$srcdir" - ((!DISABLE_CUDA)) && { - msg2 "Build uncertaintyTE library" - cmake -DCMAKE_INSTALL_PREFIX=/ -DMAGMA_ROOT=/usr -G Ninja -S ute_lib -B ute_build -# shellcheck disable=SC2030,SC2031,SC2046 # ninja call won't work with shell substitution in quotes. - ninja $([ -v MAKEFLAGS ] || echo -j1) -C ute_build - DESTDIR="${srcdir}/ute_bin" ninja install -C ute_build install + ((DISABLE_CUDA|DISABLE_UTE)) || { + msg2 "Build uncertaintyTE library" + cmake -DCMAKE_INSTALL_PREFIX=/ -DMAGMA_ROOT=/usr -G Ninja -S ute_lib -B ute_build +# shellcheck disable=SC2086 # ninja call won't work with shell substitution in quotes. + ninja ${MAKEFLAGS:--j1} -C ute_build + DESTDIR="${srcdir}/ute_bin" ninja -C ute_build install } msg2 "Build geogram library" CFLAGS+=" -fcommon" cmake -DCMAKE_INSTALL_PREFIX=/ -DGEOGRAM_LIB_ONLY=ON -DGEOGRAM_USE_SYSTEM_GLFW3=ON -DCMAKE_BUILD_TYPE:STRING=Release -DVORPALINE_PLATFORM:STRING=Linux64-gcc-dynamic -G Ninja -S geogram -B geogram_build -# shellcheck disable=SC2030,SC2031,SC2046 # ninja call won't work with shell substitution in quotes. - ninja $([ -v MAKEFLAGS ] || echo -j1) -C geogram_build +# shellcheck disable=SC2086 # expand MAKEFLAGS. + ninja ${MAKEFLAGS:--j1} -C geogram_build DESTDIR="${srcdir}/geogram_bin" ninja -C geogram_build install msg2 "Build AliceVision library" cmake "${_CMAKE_FLAGS[@]}" -DGEOGRAM_INSTALL_PREFIX="${srcdir}/geogram_bin" -DUNCERTAINTYTE_DIR="${srcdir}/ute_bin" -G Ninja -S ${pkgname} -B build -# shellcheck disable=SC2030,SC2031,SC2046 # ninja call won't work with shell substitution in quotes. - ninja $([ -v MAKEFLAGS ] || echo -j1) -C build +# shellcheck disable=SC2086 # expand MAKEFLAGS. + ninja ${MAKEFLAGS:--j1} -C build } package() { ((!DISABLE_CUDA)) && { - msg2 "Install uncertaintyTE" - DESTDIR="${pkgdir}/usr" ninja -C ute_build install + msg2 "Install uncertaintyTE" + DESTDIR="${pkgdir}/usr" ninja -C ute_build install } msg2 "Install geogram" @@ -139,7 +168,6 @@ package() { # Generated with git_submodule_PKGBUILD_conf.sh ( https://gist.github.com/bartoszek/41a3bfb707f1b258de061f75b109042b ) # Call prepare_submodule in prepare() function - prepare_submodule() { git -C "$srcdir/alice-vision-git" config submodule.src/dependencies/osi_clp.url "$srcdir/osi_clp" git -C "$srcdir/alice-vision-git" config submodule.src/dependencies/MeshSDFilter.url "$srcdir/MeshSDFilter" |