wok-current view blender/receipt @ rev 24396

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 08 12:15:27 2022 +0000 (2022-02-08)
parents cdd3dc310de6
children 82d54eca72be
line source
1 # SliTaz package receipt.
3 PACKAGE="blender"
4 VERSION="2.81a"
5 CATEGORY="graphics"
6 TAGS="3D creator editor"
7 SHORT_DESC="3D content creation suite."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL"
10 WEB_SITE="https://www.blender.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="http://download.blender.org/source/$TARBALL"
15 SUGGESTED="nvidia"
16 DEPENDS="desktop-file-utils ffmpeg freeglut freetype gcc83-lib-base glew
17 jpeg lcms libboost-date-time libboost-dev libboost-filesystem
18 libboost-locale libboost-regex libboost-thread libdrm libglu-mesa
19 libgomp libpng librsvg libsamplerate libsdl mesa openal openexr
20 openjpeg py3k tiff zlib"
21 BUILD_DEPENDS="cmake coreutils-file-format ffmpeg-dev freeglut-dev gcc83 gettext
22 glew-dev ilmbase-dev lcms-dev libboost-dev libboost-filesystem-dev
23 libboost-graph-dev libboost-locale-dev libboost-math-dev libboost-regex-dev
24 libboost-thread-dev libboost-tr1-dev libglu-mesa-dev librsvg-dev
25 libsamplerate-dev libsdl-dev mesa-dev openal-dev openexr-dev openjpeg-dev
26 pkg-config py3k-dev py3k-numpy tiff-dev xorg-libXmu yasm"
28 current_version()
29 {
30 wget -O - $(dirname $WGET_URL) 2>/dev/null | \
31 sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
32 }
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 sed -i 's|uname -m|echo i486|' GNUmakefile
38 sed -i -e 's|\(PyModule_GetFilename\)(mod|_PyUnicode_AsString(\1Object(mod)|' \
39 -e 's|(.*_Py_atomic_load_relaxed(.*t)|(PyThreadState_GetDict(|' \
40 $src/source/blender/python/generic/py_capi_utils.c
41 # sed -i 's|char. chars = _PyUnicode_AsString|const &|' \
42 # $src/source/gameengine/Ketsji/KX_FontObject.cpp
44 PY3K_VER=$(ls -d /usr/include/python3.?m | sed 's|.*python\(.*\)m|\1|')
46 export CC=gcc-83
47 export CXX=g++-83
49 mkdir _build
50 cd _build
51 cmake $src \
52 -D CMAKE_INSTALL_PREFIX:PATH=/usr \
53 -D CMAKE_BUILD_TYPE:STRING=Release \
54 -D WITH_INSTALL_PORTABLE:BOOL=OFF \
55 -D WITH_PYTHON_INSTALL:BOOL=OFF \
56 -D WITH_OPENCOLLADA:BOOL=OFF \
57 -D WITH_GAMEENGINE:BOOL=ON \
58 -D WITH_CYCLES:BOOL=OFF \
59 -D WITH_PLAYER:BOOL=ON \
60 -D WITH_TBB:BOOL=OFF \
61 -D PYTHON_VERSION:STRING=$PY3K_VER \
62 -D PYTHON_LIBPATH:STRING=/usr/lib \
63 -D PYTHON_LIBRARY:STRING=python${PY3K_VER}m \
64 -D PYTHON_INCLUDE_DIRS:STRING=/usr/include/python${PY3K_VER}m &&
66 # build
67 make $MAKEFLAGS &&
68 make install DESTDIR=$DESTDIR &&
69 python3 -m compileall "$DESTDIR/usr/share/blender"
70 }
72 # Rules to gen a SliTaz package suitable for Tazpkg.
73 genpkg_rules()
74 {
75 # LOCALE="fr de pt_BR es zh_CN"
77 mkdir -p $fs/usr/bin
78 mkdir -p $fs/usr/share/pixmaps
80 cp -a $install/usr/share/blender $fs/usr/share
81 cp -a $install/usr/bin $fs/usr
82 cp -a $install/usr/share/applications $fs/usr/share
83 cp -a $install/usr/share/icons $fs/usr/share
84 mv -f $fs/usr/bin/blender $fs/usr/bin/blender-bin
85 cp -a $stuff/blender $fs/usr/bin
86 }