Last active
October 27, 2018 09:16
-
-
Save nilspin/63162c992e1d855468d4154d5be59088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: shell-script -*- | |
# Maintainer: Dylon Edwards <deltaecho at archlinux dot us> | |
pkgbase=open3d-git | |
pkgname=( {,python-}open3d-git ) | |
pkgver=r2163.db3880ab | |
pkgrel=1 | |
pkgdesc="A Modern Library for 3D Data Processing" | |
arch=('x86_64') | |
url="http://www.open3d.org" | |
license=('MIT') | |
depends=( | |
eigen | |
glew | |
glfw-x11 | |
jsoncpp | |
libjpeg-turbo | |
libpng | |
mesa | |
xorg-server-devel | |
) | |
optdepends=( | |
openmp | |
python | |
) | |
makedepends=( | |
cmake | |
findutils | |
gawk | |
git | |
make | |
pacman | |
sed | |
) | |
checkdepends=( | |
gtest | |
) | |
changelog="${pkgbase}.changelog" | |
source=("${pkgbase}::git+https://github.com/IntelVCL/Open3D.git") | |
md5sums=(SKIP) | |
function pkgver() { | |
cd "${pkgbase}" | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
function prepare() { | |
echo $PWD | |
cd "${pkgbase}" | |
echo $PWD | |
echo "PKGBASE ${pkgbase}" | |
mkdir -p build | |
} | |
function build() { | |
cd "${pkgbase}/build" | |
echo $PWD | |
cmake ../ \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DOpen3D_BUILD_UNIT_TESTS=OFF \ | |
-DCMAKE_BUILD_TYPE=Release | |
make -j6 #builds the core package | |
make install-pip-package -j6 #builds the python package | |
} | |
function check() { | |
cd "${pkgbase}/build" | |
} | |
function package_open3d-git() { | |
depends=( | |
eigen | |
glew | |
glfw-x11 | |
jsoncpp | |
libjpeg-turbo | |
libpng | |
mesa | |
xorg-server-devel | |
) | |
optdepends=( | |
openmp | |
) | |
provides=( | |
open3d | |
) | |
conflicts=( | |
open3d | |
) | |
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 {} | |
} | |
function package_python-open3d-git() { | |
depends=( | |
python-ipywidgets | |
eigen | |
glew | |
glfw-x11 | |
jsoncpp | |
libjpeg-turbo | |
libpng | |
mesa | |
open3d-git | |
python | |
xorg-server-devel | |
) | |
optdepends=( | |
openmp | |
) | |
provides=( | |
python-open3d | |
) | |
conflicts=( | |
python-open3d | |
) | |
cd "${pkgbase}/build/lib/python_package" | |
local SITE_PACKAGES="$(pacman -Qlq python | grep '/site-packages/$')" | |
echo "SITE PACKAGES : ${SITE_PACKAGES}" | |
echo $PWD | |
echo "PKGDIR ${pkgdir}" | |
python setup.py build | |
python setup.py install --root="${pkgdir}" | |
} | |
package() { | |
cd "${pkgbase}" | |
make DESTDIR="$pkgdir/" install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment