SHARE
TWEET

visual-sfm PKGBUILD

bartus234 Oct 19th, 2016 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Dylan Ferris <dylan@psilly.com>
  2. # Submaintainer: bartus <aur@bartus.33mail.com>
  3.  
  4. pkgname=('visual-sfm')
  5. pkgver=0.5.26
  6. pkgrel=1
  7. pkgdesc='A Visual Structure from Motion System; create 3d models from photos.'
  8. arch=('x86_64')
  9. url='http://ccwu.me/vsfm/'
  10. depends=('lapack' 'blas' 'f2c' 'gtk2' 'glu' 'cmvs-pmvs-git' 'siftgpu' 'cuda')
  11. optdepends=(
  12.   'opencl-nvidia: nvidia gpu support'
  13.   'opencl-mesa: amd gpu support (mesa)'
  14.   'opencl-catalyst: amd gpu support (catalyst)'
  15. )
  16. license=('custom:visual-sfm')
  17. source=(
  18.   'http://ccwu.me/vsfm/download/VisualSFM_linux_64bit.zip'
  19.   'visual-sfm.desktop'
  20.   'http://grail.cs.washington.edu/projects/mcba/pba_v1.0.5.zip'
  21. )
  22. md5sums=('25fcca5e320a9e97131e87abdf3b7f61'
  23.          '52e8eabb314aa7661fd6eb1bee32eaae'
  24.          '672f5cd6c1b4c08517409809b819c547'
  25. )
  26. build() {
  27.  
  28.   msg "building Multicore Bundle Adjustment"
  29.   cd ${srcdir}/pba
  30.   # adjust cuda path
  31.   sed -i 's:CUDA_INSTALL_PATH = /usr/local/cuda:CUDA_INSTALL_PATH = /opt/cuda:' makefile
  32.   make pba
  33.   cp bin/libpba.so ../vsfm/bin
  34.  
  35.   msg "building VisualSFM"
  36.   cd ${srcdir}/vsfm
  37.   # use system lapack blas f2c
  38.   sed -i 's:$(LIB_DIR)/lapack.a:-llapack:' makefile
  39.   sed -i 's:$(LIB_DIR)/blas.a:-lblas:' makefile
  40.   sed -i 's:$(LIB_DIR)/libf2c.a:-lf2c:' makefile
  41.   make
  42. }
  43.  
  44. package() {
  45.   install -Dm644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
  46.   cd ${srcdir}/vsfm
  47.   install -Dm644 README ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.pdf
  48.   install -Dm755 bin/VisualSFM ${pkgdir}/usr/bin/visual-sfm
  49.   install -Dm755 bin/libpba.so ${pkgdir}/usr/lib/libpba.so
  50. }
  51.  
  52. # vim:set ts=2 sw=2 et:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top