diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-10-03 05:53:06 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-10-03 06:48:23 -0300 |
commit | 7106ef6047c41372406a1da895689b670722a758 (patch) | |
tree | 56b105bc09297170745f7659b6fb7b3d70611f95 /libre/blender | |
parent | ef573c88e887dbe3b29aa7b77d0211d67af21726 (diff) |
blender: fix variables
Diffstat (limited to 'libre/blender')
-rw-r--r-- | libre/blender/PKGBUILD | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/libre/blender/PKGBUILD b/libre/blender/PKGBUILD index 685b6781b..e31efe428 100644 --- a/libre/blender/PKGBUILD +++ b/libre/blender/PKGBUILD @@ -26,15 +26,10 @@ _gittranslationscommit='4e1460519fb76d8fe4b838334d139a3e8d446827' pkgbase='blender' pkgname=("${pkgbase}" "${pkgbase}-addon-gimp" "${pkgbase}-addon-povray") -if [ "${_git}" = 'yes' ]; then - pkgver="${_gittagver}.${_gitrev}.${_gitcommit}" # git commit -elif [ "${_git}" = 'no' ] && [ -z "${_gittagrev}" ]; then - pkgver="${_gittagver}" # official release -elif [ "${_git}" = 'no' ] && [ "${#_gittagrev}" > 1 ]; then - pkgver="${_gittagver}${_gittagrev/-/}" # release candidate -elif [ "${_git}" = 'no' ] && [ "${#_gittagrev}" = 1 ]; then - pkgver="${_gittagver}.${_gittagrev}" # revision -fi +[[ "${_git}" = 'yes' ]] && pkgver="${_gittagver}.${_gitrev}.${_gitcommit}" # git commit +[[ "${_git}" = 'no' ]] && [[ -z "${_gittagrev}" ]] && pkgver="${_gittagver}" # official release +[[ "${_git}" = 'no' ]] && [[ "${#_gittagrev}" > 1 ]] && pkgver="${_gittagver}${_gittagrev/-/}" # release candidate +[[ "${_git}" = 'no' ]] && [[ "${#_gittagrev}" = 1 ]] && pkgver="${_gittagver}.${_gittagrev}" # revision pkgrel='1.parabola1' epoch='17' _jpgver='1.5' @@ -50,16 +45,16 @@ depends=('boost-libs' 'desktop-file-utils' 'ffmpeg' 'fftw' 'freeglut' 'freetype2 'libtiff' 'openal' 'opencolorio' 'opencollada' 'openexr' 'openimageio' 'openjpeg' 'openshadinglanguage' 'opensubdiv' 'ptex' 'python' 'python-requests' 'shared-mime-info' 'xdg-utils') -makedepends=('boost' 'cmake' 'git' 'llvm35' 'mesa') # 'bullet' (boost: for cycles, booleans, audaspace and/or i18n) +makedepends=('boost' 'cmake' 'git' 'llvm' 'mesa') # 'bullet' (boost: for cycles, booleans, audaspace and/or i18n) options=('!strip') -[ "${_git}" = 'no' ] && source=("${pkgbase}-${pkgver}::git://git.${pkgbase}.org/${pkgbase}.git#tag=v${_gittagver}${_gittagrev}" - "${pkgbase}-addons-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-addons.git#tag=v${_gittagver}${_gittagrev}" - "${pkgbase}-translations-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-translations.git#tag=v${_gittagver}${_gittagrev}") -[ "${_git}" = 'yes' ] && source=("${pkgbase}-${pkgver}::git://git.${pkgbase}.org/${pkgbase}.git#commit=${_gitcommit}" - "${pkgbase}-addons-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-addons.git#commit=${_gitaddonscommit}" - "${pkgbase}-translations-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-translations.git#commit=${_gittranslationscommit}") -source+=("git://git.${pkgbase}.org/${pkgbase}-addons-contrib.git#commit=${_gitaddonscontribcommit}" - "git://git.${pkgbase}.org/scons.git") +[[ "${_git}" = 'no' ]] && source=("${pkgbase}-${pkgver}::git://git.${pkgbase}.org/${pkgbase}.git#tag=v${_gittagver}${_gittagrev}" # blender + "${pkgbase}-addons-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-addons.git#tag=v${_gittagver}${_gittagrev}" # addons for blender + "${pkgbase}-translations-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-translations.git#tag=v${_gittagver}${_gittagrev}") # translations for blender +[[ "${_git}" = 'yes' ]] && source=("${pkgbase}-${pkgver}::git://git.${pkgbase}.org/${pkgbase}.git#commit=${_gitcommit}" # blender + "${pkgbase}-addons-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-addons.git#commit=${_gitaddonscommit}" # addons for blender + "${pkgbase}-translations-${pkgver}::git://git.${pkgbase}.org/${pkgbase}-translations.git#commit=${_gittranslationscommit}") # translations for blender +source+=("git://git.${pkgbase}.org/${pkgbase}-addons-contrib.git#commit=${_gitaddonscontribcommit}" # addons contrib for blender + "git://git.${pkgbase}.org/scons.git") # scons md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') prepare() { @@ -72,10 +67,14 @@ prepare() { git config submodule.'scons'.url "${srcdir}/scons" git submodule update + # We need this to build with Python 3.5/3.6, remove in a release after 2.76rc1 + git cherry-pick --no-commit 6844b02a71bd9d84af5bdbcb32eb49ea6ac552e7 + git submodule update + msg 'renaming wrong OS name' - [ "$(uname -o)" = 'GNU' ] && sed -i 's|BUILD_PLATFORM;|"GNU";|' 'source/creator/buildinfo.c' - [ "$(uname -o)" = 'GNU/Linux' ] && sed -i 's|BUILD_PLATFORM;|"GNU/Linux";|' 'source/creator/buildinfo.c' - [ "$(uname -o)" = 'GNU/kFreeBSD' ] && sed -i 's|BUILD_PLATFORM;|"GNU/kFreeBSD";|' 'source/creator/buildinfo.c' + [[ "$(uname -o)" = 'GNU' ]] && sed -i 's|BUILD_PLATFORM;|"GNU";|' 'source/creator/buildinfo.c' + [[ "$(uname -o)" = 'GNU/Linux' ]] && sed -i 's|BUILD_PLATFORM;|"GNU/Linux";|' 'source/creator/buildinfo.c' + [[ "$(uname -o)" = 'GNU/kFreeBSD' ]] && sed -i 's|BUILD_PLATFORM;|"GNU/kFreeBSD";|' 'source/creator/buildinfo.c' sed -i 's|Linux, Mac OS X, Windows and FreeBSD|GNU and BSD| s|Linux, FreeBSD|GNU and BSD| s|Unpack the archive, Then run the Blender executable.|Install from Parabola repo (pacman -S '"$pkgname"'), Then run blender.| @@ -104,7 +103,7 @@ prepare() { build() { cd "${srcdir}/${pkgbase}-${pkgver}/build" - [ "${CARCH}" = 'x86_64' || "${CARCH}" = 'i686' ] && _SSE='ON' _SSE2='ON' || _SSE='OFF' _SSE2='OFF' + [[ "${CARCH}" = 'x86_64' || "${CARCH}" = 'i686' ]] && _SSE='ON' _SSE2='ON' || _SSE='OFF' _SSE2='OFF' cmake .. \ -DCMAKE_BUILD_TYPE='Release' \ -DCMAKE_INSTALL_PREFIX='/usr' \ @@ -226,31 +225,31 @@ package_blender() { python -O -m compileall "${pkgdir}/usr/share/${pkgbase}" msg "move io_import_gimp_image_to_scene.py and render_povray to ${pkgbase}-addon-gimp and ${pkgbase}-addon-povray" - [ -d "${srcdir}/${pkgbase}-addon-gimp" ] && rm -vr "${srcdir}/${pkgbase}-addon-gimp" - [ -d "${srcdir}/${pkgbase}-addon-povray" ] && rm -vr "${srcdir}/${pkgbase}-addon-povray" - install -vm755 -d "${srcdir}/${pkgbase}-addon-"{gimp,povray}"/usr/share/${pkgbase}/${pkgver%%.[a-z]*}/scripts/addons" - mv -v "${pkgdir}/usr/share/${pkgbase}/${pkgver%%.[a-z]*}/scripts/addons/io_import_gimp_image_to_scene.py" \ - "${srcdir}/${pkgbase}-addon-gimp/usr/share/${pkgbase}/${pkgver%%.[a-z]*}/scripts/addons" - mv -v "${pkgdir}/usr/share/${pkgbase}/${pkgver%%.[a-z]*}/scripts/addons/render_povray" \ - "${srcdir}/${pkgbase}-addon-povray/usr/share/${pkgbase}/${pkgver%%.[a-z]*}/scripts/addons" + [[ -d "${srcdir}/${pkgbase}-addon-gimp" ]] && rm -vr "${srcdir}/${pkgbase}-addon-gimp" + [[ -d "${srcdir}/${pkgbase}-addon-povray" ]] && rm -vr "${srcdir}/${pkgbase}-addon-povray" + install -vm755 -d "${srcdir}/${pkgbase}-addon-"{gimp,povray}"/usr/share/${pkgbase}/${pkgver%%[.r][a-z]*}/scripts/addons" + mv -v "${pkgdir}/usr/share/${pkgbase}/${pkgver%%[.r][a-z]*}/scripts/addons/io_import_gimp_image_to_scene.py" \ + "${srcdir}/${pkgbase}-addon-gimp/usr/share/${pkgbase}/${pkgver%%[.r][a-z]*}/scripts/addons" + mv -v "${pkgdir}/usr/share/${pkgbase}/${pkgver%%[.r][a-z]*}/scripts/addons/render_povray" \ + "${srcdir}/${pkgbase}-addon-povray/usr/share/${pkgbase}/${pkgver%%[.r][a-z]*}/scripts/addons" } package_blender-addon-gimp() { - _relver="${pkgver%%.[a-z]*}" + _relver="${pkgver%%[.r][a-z]*}" _minver="${_relver#*.}" pkgdesc='A addon for the Blender which allows import GIMP 2.6 images (xcf files) to scene (as polygon plane images)' arch=('any') - depends=("${pkgbase}>=${epoch}:${pkgver%%.[a-z]*}" "${pkgbase}<${epoch}:${pkgver%%.*}.$(($_minver+1))" 'xcftools') + depends=("${pkgbase}>=${epoch}:${pkgver%%[.r][a-z]*}" "${pkgbase}<${epoch}:${pkgver%%[.r]*}.$(($_minver+1))" 'xcftools') optdepends=('gimp: for edit xcf files') mv -v "${srcdir}/${pkgbase}-addon-gimp/usr" "${pkgdir}" } package_blender-addon-povray() { - _relver="${pkgver%%.[a-z]*}" + _relver="${pkgver%%[.r][a-z]*}" _minver="${_relver#*.}" pkgdesc='A addon for the Blender which allows render with POV-Ray' - depends=("${pkgbase}>=${epoch}:${pkgver%%.[a-z]*}" "${pkgbase}<${epoch}:${pkgver%%.*}.$(($_minver+1))" "povray>=${_povver}") + depends=("${pkgbase}>=${epoch}:${pkgver%%[.r][a-z]*}" "${pkgbase}<${epoch}:${pkgver%%[.r]*}.$(($_minver+1))" "povray>=${_povver}") mv -v "${srcdir}/${pkgbase}-addon-povray/usr" "${pkgdir}" } |