summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXavier Cho2020-06-28 16:18:42 +0900
committerXavier Cho2020-06-28 16:18:42 +0900
commit7a1298238d56d5de72d4f2634c34ba8b02599be5 (patch)
tree620e9b416da6183f3486bf5c99ab48e6ff73278e /PKGBUILD
parent91d11af2e8fe3067cf582126eb76073440f14fdc (diff)
downloadaur-7a1298238d56d5de72d4f2634c34ba8b02599be5.tar.gz
Update PKGBUILD to make it compatible with master branch
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD85
1 files changed, 67 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9cf40cf1af2..f0c6dbd0c55 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,18 @@
+# Maintainer: Xavier Cho <mysticfallband@gmail.com>
+
pkgname=upbge-git
-pkgver=72419.51e8bf4798
+pkgver=100785.b04a71b330c
pkgrel=1
pkgdesc="Uchronia Project Blender Game Engine fork of Blender Game Engine"
arch=('i686' 'x86_64')
url="https://upbge.org/"
-depends=('libgl' 'python' 'desktop-file-utils' 'hicolor-icon-theme'
- 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
- 'openshadinglanguage' 'libtiff' 'libpng')
-optdepends=('cuda: CUDA support in Cycles')
-makedepends=('git' 'cmake' 'boost' 'mesa')
+depends=('alembic' 'libgl' 'python' 'desktop-file-utils' 'hicolor-icon-theme' 'openjpeg'
+ 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
+ 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng' 'python-numpy')
+optdepends=('cuda: CUDA support in Cycles'
+ 'optix: OptiX support in Cycles'
+ 'openimagedenoise: Intel Open Image Denoise support in compositing')
+makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm')
provides=('blender')
conflicts=('blender')
license=('GPL')
@@ -18,13 +22,21 @@ install=upbge.install
# the path in .gitmodules.
# More info:
# http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
-source=('git://github.com/UPBGE/blender.git' \
- 'blender-addons.git::git://git.blender.org/blender-addons.git' \
+source=('git://github.com/UPBGE/upbge.git' \
+ 'blender-addons.git::git://github.com/UPBGE/blender-addons.git' \
'blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git' \
'blender-translations.git::git://git.blender.org/blender-translations.git' \
'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git' \
+ embree.patch \
upbge.desktop)
-md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' '47e5bbe93fc221066882947211ff7812')
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '4ede42a5aa6b7237170548ae00021ceb'
+ '37ce92c740691f858156511e22b40143')
# determine whether we can precompile CUDA kernels
_CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
@@ -33,24 +45,55 @@ if [ "$_CUDA_PKG" != "" ]; then
-DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda"
fi
+# check for optix
+_OPTIX_PKG=`pacman -Qq optix 2>/dev/null` || true
+if [ "$_OPTIX_PKG" != "" ]; then
+ _EXTRAOPTS="$_EXTRAOPTS \
+ -DWITH_CYCLES_DEVICE_OPTIX=ON \
+ -DOPTIX_ROOT_DIR=/opt/optix"
+fi
+
+# check for open image denoise
+_OIDN_PKG=`pacman -Qq openimagedenoise 2>/dev/null` || true
+if [ "$_OIDN_PKG" != "" ]; then
+ _EXTRAOPTS="$_EXTRAOPTS \
+ -DWITH_OPENIMAGEDENOISE=ON"
+fi
+
+# check for embree
+_EMBREE_PKG=`pacman -Qq embree 2>/dev/null` || true
+if [ "$_EMBREE_PKG" != "" ]; then
+ _EXTRAOPTS="$_EXTRAOPTS \
+ -DWITH_CYCLES_EMBREE=ON"
+fi
+
pkgver() {
- cd "$srcdir/blender"
+ cd "$srcdir/upbge"
printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- cd "$srcdir/blender"
- # update the submodules
- git submodule update --init --recursive
+ cd "$srcdir/upbge"
+
+ #update the submodules
+ git submodule sync
+ git submodule update --init --recursive --remote
git submodule foreach git checkout master
- git submodule foreach git pull --rebase origin master
+ git submodule foreach git pull --rebase
+
+ if [ "$_EMBREE_PKG" != "" ]; then
+ git apply -v "${srcdir}"/embree.patch
+ fi
}
build() {
mkdir -p "$srcdir/blender-build"
+ _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
+ echo "python version detected: ${_pyver}"
+
cd "$srcdir/blender-build"
- cmake "$srcdir/blender" \
+ cmake "$srcdir/upbge" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_INSTALL_PORTABLE=OFF \
-DWITH_GAMEENGINE=ON \
@@ -60,7 +103,7 @@ build() {
-DWITH_SYSTEM_GLEW=ON \
-DWITH_CODEC_FFMPEG=ON \
-DWITH_PYTHON_INSTALL=OFF \
- -DPYTHON_VERSION=3.7m \
+ -DPYTHON_VERSION="${_pyver}" \
-DWITH_MOD_OCEANSIM=ON \
$_EXTRAOPTS
make
@@ -68,12 +111,18 @@ build() {
package() {
cd "$srcdir/blender-build"
+
make DESTDIR="$pkgdir" install
+
+ mv "$pkgdir/usr/share/blender" "$pkgdir/usr/share/upbge"
+
install -D -m644 "$srcdir"/upbge.desktop \
"$pkgdir"/usr/share/applications/upbge.desktop
+ install -D -m644 "$srcdir"/upbge/release/freedesktop/icons/scalable/apps/upbge.svg \
+ "$pkgdir"/usr/share/icons/hicolor/scalable/apps/upbge,svg
- if [ -e "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/ ] ; then
+ if [ -e "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/ ] ; then
# make sure the cuda kernels are not stripped
- chmod 444 "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/*
+ chmod 444 "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/*
fi
}