diff options
author | root <root@rshg047.dnsready.net> | 2011-05-05 19:02:44 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-05-05 19:02:44 +0000 |
commit | ef61aa5a9cead170fa18dba44609c32bbf18306a (patch) | |
tree | 82af53ec1018f58868b80cdf680a9c4ec5df1538 /extra/blender | |
parent | ab1410d33401cf1fc4a384bb0b2d9901c8fe8d14 (diff) |
Thu May 5 19:02:44 UTC 2011
Diffstat (limited to 'extra/blender')
-rw-r--r-- | extra/blender/PKGBUILD | 190 | ||||
-rw-r--r-- | extra/blender/blender.install | 19 |
2 files changed, 77 insertions, 132 deletions
diff --git a/extra/blender/PKGBUILD b/extra/blender/PKGBUILD index 9def1bfa1..68688bc51 100644 --- a/extra/blender/PKGBUILD +++ b/extra/blender/PKGBUILD @@ -1,143 +1,89 @@ -# $Id: PKGBUILD 101917 2010-12-02 16:14:10Z ibiru $ +# $Id: PKGBUILD 121081 2011-04-29 00:16:23Z eric $ # Contributor: John Sowiak <john@archlinux.org> # Maintainer: tobias <tobias@archlinux.org> -# TODO: -# - consider switching to scons when it is better supported - # Apparently, the blender guys refuse to release source tarballs for # intermediate releases that deal mainly with binaries but incorporate tiny -# minor changes from cvs. Since I'm sick and tired of the urges of users that -# look for release numbers only we make a messy PKGBUILD that can checkout cvs -# tags if necessary. -#cvs=true -cvs=false +# minor changes from svn. Since I'm sick and tired of the urges of users that +# look for release numbers only we make a messy PKGBUILD that can checkout svn +# release if necessary. + +_svn=true +#_svn=false pkgname=blender -pkgver=2.49b +pkgver=2.57b pkgrel=2 +epoch=1 pkgdesc="A fully integrated 3D graphics creation suite" arch=('i686' 'x86_64') license=('GPL') url="http://www.blender.org" -depends=('libjpeg' 'libpng' 'openexr' 'sdl' 'python2' 'desktop-file-utils' \ - 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal') -makedepends=('freeglut' 'libtiff' 'librsvg' 'yasm' 'csv') -options=('!makeflags') +depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'sdl' 'python' 'desktop-file-utils' \ + 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'gettext' 'libxi' 'libxmu' 'mesa' \ + 'freetype2' 'openal' 'libsndfile' 'libsamplerate' 'ffmpeg') +makedepends=('cmake') # 'subversion' install=blender.install -source=($pkgname.desktop $pkgname.svg) -if [ ! $cvs -o $cvs = false ]; then - makedepends=('freeglut' 'libtiff' 'librsvg' 'yasm') - source=(${source[@]} http://download.blender.org/source/$pkgname-$pkgver.tar.gz) - md5sums=('b5b9720b9430b1f5e2aa0b2df533fed8' - '0e53299444ff5570639c8f59372bc98c' - '718eef6a4ff377989e829b92a886cc5b') - sha1sums=('9ae82b5df21b4803f981e3df4a256b4be7137273' - '1e5452f56f590d5ce1af8c174113f0e639714c0c' - '43f71e7de4efe79c518d45f4b5a04e03c28d5fc5') +if [ $_svn = false ]; then + source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz) + md5sums=('e6cb5523323a71c070051e6fe6efe497') +else + source=(ftp://ftp.archlinux.org/other/${pkgname}/$pkgname-$pkgver.tar.xz) + md5sums=('59e344d4ec48750a86e4ef079c3acbfc') fi -build() { - if [ $cvs = true ]; then - cd "$srcdir/" - #cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login - cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender checkout $pkgname - _cvsrel=$pkgname-$(echo $pkgver | sed 's/\./-/')-release - cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender update -r $_cvsrel - find $pkgname/{bin,release/scripts} -name 'CVS' -exec rm -rf {} \; 2> /dev/null - cd $pkgname - else - cd "$srcdir/$pkgname-$pkgver" - fi - - rm -f user-def.mk - - ########################################################################## - # tweak the makefiles to prepare build for ArchLinux - # disable static binaries and enable blenderplayer binary - sed -i "s|^.*\(BINTARGETS += blenderstatic\)| #\1|g" source/Makefile - sed -i "s|^#\(.*BINTARGETS += blenderplayer\)|\1|g" source/Makefile - # link freetype and openal dynamically - sed -i 's|LOPTS)|LOPTS) -lfreetype -lopenal|g' source/Makefile - sed -i 's|COMLIB.*libfreetype\.a|#\0|g' source/Makefile - sed -i 's|NAN_SND_LIBS.*libopenal\.a|#\0|g' source/Makefile - # make ode (alternative physics engine) - # does not work for Arch64 - #[ "$CARCH" = "i686" ] && sed -i 's|^\(DIRS.*\)$|\1 ode|' extern/Makefile - # make the nan_makefiles happy - export NAN_PYTHON_VERSION=2.7 - export INTERNATIONAL=true - export WITH_FREETYPE2=true - export NAN_FREETYPE=/usr - export WITH_ICONV=true - - export NAN_NO_PLUGIN=true - - export NAN_OPENAL=/usr - export NAN_FMOD=/usr - export NAN_JPEG=/usr - export NAN_PNG=/usr - export WITH_OPENEXR=true - export NAN_OPENEXR=/usr - export NAN_ODE=/usr - export NAN_OPENEXR_LIBS=$(pkg-config --libs-only-l OpenEXR) - - export NAN_SDL=/usr - export NAN_ZLIB=/usr - export NAN_MESA=/usr +# source PKGBUILD && mksource +mksource() { + _svnver=36339 + _svntrunk="https://svn.blender.org/svnroot/bf-blender/trunk/blender" + _svnmod="$pkgname-$pkgver" + mkdir ${pkgname}-$pkgver + pushd ${pkgname}-$pkgver + svn co $_svntrunk --config-dir ./ -r $_svnver $_svnmod + find . -depth -type d -name .svn -exec rm -rf {} \; + tar -cJf ../${pkgname}-$pkgver.tar.xz ${pkgname}-$pkgver/* + popd +} - export NAN_USE_BULLET=true - export NAN_USE_FFMPEG_CONFIG=true - export WITH_BF_VERSE=true - export WITH_VERSE=true - export WITH_BF_OPENMP=true - # there is an issue with a file - export NAN_DEBUG=-O - ########################################################################### - # build - LDFLAGS="-Wl,--hash-style=gnu" +build() { + cd "$srcdir/$pkgname-$pkgver" + mkdir build + cd build + + [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD:BOOL=OFF" + + cmake .. \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DWITH_INSTALL_PORTABLE:BOOL=OFF \ + -DWITH_PYTHON_INSTALL:BOOL=OFF \ + -DWITH_OPENCOLLADA:BOOL=OFF \ + -DWITH_GAMEENGINE:BOOL=ON \ + -DWITH_PLAYER:BOOL=ON \ + -DPYTHON_VERSION:STRING=3.2 \ + -DPYTHON_LIBPATH:STRING=/usr/lib \ + -DPYTHON_LIBRARY:STRING=python3.2mu \ + -DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu \ + $ENABLESSE2 + + make $MAKEFLAGS + + cp -rf "$srcdir"/${pkgname}-$pkgver/release/plugins/* \ + "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/ + cd "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi + chmod 755 bmake make - ########################################################################### } package() { - if [ $cvs = true ]; then - cd "$srcdir/$pkgname" - else - cd "$srcdir/$pkgname-$pkgver" - fi - - cd obj/linux-glibc2*/bin - -# common part - - mkdir -p "$pkgdir/usr/share/" - - # install binaries - install -Dm755 blender "$pkgdir/usr/bin/blender" - install -Dm755 blenderplayer "$pkgdir/usr/bin/blenderplayer" - - # install internationalization support - cd ../../../bin/.blender - install -D -m644 .Blanguages \ - "$pkgdir/usr/share/$pkgname/.Blanguages" - install -D -m644 .bfont.ttf \ - "$pkgdir/usr/share/$pkgname/.bfont.ttf" - - cp -R locale "$pkgdir/usr/share/" - - # install scripts - cd ../../release/ - cp -R scripts "$pkgdir/usr/share/$pkgname/" -sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' "$pkgdir/usr/share/blender/scripts/bpymodules/blend2renderinfo.py" - - # install all additional stuff - # install a freedesktop.org compliant menu entry - install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" - # install some freedesktop.org compatibility - install -D -m644 "$srcdir/$pkgname.svg" "$pkgdir/usr/share/pixmaps/$pkgname.svg" - # finally we render a png as fallback for not svg aware menu applications - # Attention: always make sure you check the dimensions of the source-svg, - # you can read the dimensions via inkscape's export function - rsvg -w 64 -h 64 -f png "$pkgdir/usr/share/pixmaps/$pkgname.svg" "$pkgdir/usr/share/pixmaps/$pkgname.png" + cd "$srcdir/$pkgname-$pkgver/build" + make DESTDIR="${pkgdir}" install + python -m compileall "${pkgdir}/usr/share/blender" + +# install plugins + install -d -m755 "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/{sequence,texture} + cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/sequence/*.so \ + "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/sequence/ + cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/texture/*.so \ + "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/texture/ } diff --git a/extra/blender/blender.install b/extra/blender/blender.install index 0cc7aef46..2fcf98022 100644 --- a/extra/blender/blender.install +++ b/extra/blender/blender.install @@ -3,26 +3,25 @@ post_install() { NOTE ---- -blender is using the NAN makefiles to build, so we can access some better -features: - - i18n support - - anti-aliased interface fonts - - gameplayer + We also ship the plugins, but most of these features can be accessed only -from the users home directory. Therefore, you wanna copy everything from -/usr/share/blender to ~/.blender (some are hidden files!). The browser- -plugin builds but is using an old mozilla API, this is why it doesn't work -and we don't ship it. -Happy blending! +from the users home directory. Therefore, you want to copy everything from +/usr/share/blender/2.57 to ~/.blender (some are hidden files!). EOF update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null } post_upgrade() { update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null } post_remove() { update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null } |