# SliTaz package receipt. PACKAGE="blender" VERSION="2.81a" CATEGORY="graphics" TAGS="3D creator editor" SHORT_DESC="3D content creation suite." MAINTAINER="pankso@slitaz.org" LICENSE="GPL2 GPL3" WEB_SITE="https://www.blender.org/" TARBALL="$PACKAGE-$VERSION.tar.xz" WGET_URL="https://download.blender.org/source/$TARBALL" SUGGESTED="nvidia" DEPENDS="desktop-file-utils ffmpeg freeglut freetype gcc83-lib-base glew jpeg lcms libboost-date-time libboost-dev libboost-filesystem libboost-locale libboost-regex libboost-thread libdrm libglu-mesa libgomp libpng librsvg libsamplerate libsdl mesa openal openexr openjpeg py3k tiff zlib" BUILD_DEPENDS="cmake coreutils-file-format ffmpeg-dev freeglut-dev gcc83 gettext glew-dev ilmbase-dev lcms-dev libboost-dev libboost-filesystem-dev libboost-graph-dev libboost-locale-dev libboost-math-dev libboost-regex-dev libboost-thread-dev libboost-tr1-dev libglu-mesa-dev librsvg-dev libsamplerate-dev libsdl-dev mesa-dev openal-dev openexr-dev openjpeg-dev pkg-config py3k-dev py3k-numpy tiff-dev xorg-libXmu yasm" current_version() { wget -O - $(dirname $WGET_URL) 2>/dev/null | \ sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { sed -i 's|uname -m|echo i486|' GNUmakefile sed -i -e 's|\(PyModule_GetFilename\)(mod|_PyUnicode_AsString(\1Object(mod)|' \ -e 's|(.*_Py_atomic_load_relaxed(.*t)|(PyThreadState_GetDict(|' \ $src/source/blender/python/generic/py_capi_utils.c # sed -i 's|char. chars = _PyUnicode_AsString|const &|' \ # $src/source/gameengine/Ketsji/KX_FontObject.cpp PY3K_VER=$(ls -d /usr/include/python3.?m | sed 's|.*python\(.*\)m|\1|') export CC=gcc-83 export CXX=g++-83 mkdir _build cd _build cmake $src \ -D CMAKE_INSTALL_PREFIX:PATH=/usr \ -D CMAKE_BUILD_TYPE:STRING=Release \ -D WITH_INSTALL_PORTABLE:BOOL=OFF \ -D WITH_PYTHON_INSTALL:BOOL=OFF \ -D WITH_OPENCOLLADA:BOOL=OFF \ -D WITH_GAMEENGINE:BOOL=ON \ -D WITH_CYCLES:BOOL=OFF \ -D WITH_PLAYER:BOOL=ON \ -D WITH_TBB:BOOL=OFF \ -D PYTHON_VERSION:STRING=$PY3K_VER \ -D PYTHON_LIBPATH:STRING=/usr/lib \ -D PYTHON_LIBRARY:STRING=python${PY3K_VER}m \ -D PYTHON_INCLUDE_DIRS:STRING=/usr/include/python${PY3K_VER}m && # build make $MAKEFLAGS && make install DESTDIR=$DESTDIR && python3 -m compileall "$DESTDIR/usr/share/blender" } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { # LOCALE="fr de pt_BR es zh_CN" mkdir -p $fs/usr/bin mkdir -p $fs/usr/share/pixmaps cp -a $install/usr/share/blender $fs/usr/share cp -a $install/usr/bin $fs/usr cp -a $install/usr/share/applications $fs/usr/share cp -a $install/usr/share/icons $fs/usr/share mv -f $fs/usr/bin/blender $fs/usr/bin/blender-bin cp -a $stuff/blender $fs/usr/bin }