mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
added community/blender
This commit is contained in:
parent
a8306091af
commit
2492d25d9a
2 changed files with 226 additions and 0 deletions
113
community/blender/PKGBUILD
Normal file
113
community/blender/PKGBUILD
Normal file
|
@ -0,0 +1,113 @@
|
|||
# $Id$
|
||||
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
|
||||
# Contributor: John Sowiak <john@archlinux.org>
|
||||
# Contributor: tobias <tobias@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove makedepend, optdepend on cuda
|
||||
# - set -DWITH_CYCLES_CUDA_BINARIES=OFF, -DWITH_CYCLES=OFF, -DWITH_RAYOPTIMIZATION=OFF
|
||||
# - cherry-pick upstream commit to fix ARM FTBFS
|
||||
|
||||
buildarch=12
|
||||
|
||||
# Sometimes blender.org takes some time to release patch releases and because Arch users
|
||||
# are impatient, we sometimes need to build from git directly.
|
||||
# Update because I get so many queries on this:
|
||||
# Due to our other rolling deps, it's sometimes not possible to build Blender stable releases.
|
||||
# More often than not, a new openshadinglanguage breaks it and I could either backport fixes
|
||||
# or simply roll with a new version. I usually choose the latter when the former seems
|
||||
# unreasonable.
|
||||
|
||||
# _gittag=v2.79b
|
||||
_gitcommit=0385b33f0b3e389ea2a82c4b6bb181c684f0511a
|
||||
|
||||
pkgname=blender
|
||||
pkgver=2.79.b
|
||||
[[ -n $_gitcommit ]] && pkgver=${pkgver}.git2.${_gitcommit:0:8}
|
||||
pkgrel=13
|
||||
epoch=17
|
||||
pkgdesc="A fully integrated 3D graphics creation suite"
|
||||
arch=('x86_64')
|
||||
license=('GPL')
|
||||
url="http://www.blender.org"
|
||||
depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requests'
|
||||
'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' 'openjpeg' 'python-numpy'
|
||||
'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'alembic'
|
||||
'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openshadinglanguage'
|
||||
'jemalloc' 'libspnav' 'ptex' 'opensubdiv' 'openvdb' 'log4cplus' 'sdl2')
|
||||
makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm')
|
||||
options=(!strip)
|
||||
source=("git://git.blender.org/blender-addons.git"
|
||||
"git://git.blender.org/blender-addons-contrib.git"
|
||||
"git://git.blender.org/blender-translations.git"
|
||||
"git://git.blender.org/blender-dev-tools.git"
|
||||
"git://git.blender.org/scons.git")
|
||||
if [[ -n $_gittag ]]; then
|
||||
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#tag=${_gittag}")
|
||||
elif [[ -n $_gitcommit ]]; then
|
||||
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#commit=${_gitcommit}")
|
||||
fi
|
||||
md5sums=('SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
git submodule init
|
||||
git config submodule."release/scripts/addons".url ${srcdir}/blender-addons
|
||||
git config submodule."release/scripts/addons_contrib".url ${srcdir}/blender-addons-contrib
|
||||
git config submodule."release/datafiles/locale".url ${srcdir}/blender-translations
|
||||
git config submodule."source/tools".url ${srcdir}/blender-dev-tools
|
||||
git config submodule."scons".url ${srcdir}/scons
|
||||
git submodule update
|
||||
|
||||
# Fix installation of modules
|
||||
sed -i "144i\ \ \ \ pass" release/scripts/addons_contrib/np_station/np_point_dimension.py
|
||||
|
||||
# Upstream commit to fix ARM FTBFS
|
||||
git cherry-pick -n 176e18436c45e38a2b7f1e7fccfdc0abedc1c13d
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
[[ -d build ]] && rm -rf build
|
||||
mkdir build && cd build
|
||||
|
||||
export CFLAGS="${CFLAGS} -DOPENVDB_3_ABI_COMPATIBLE"
|
||||
export CXXFLAGS="${CXXFLAGS} -DOPENVDB_3_ABI_COMPATIBLE"
|
||||
cmake -C../build_files/cmake/config/blender_release.cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_INSTALL_PORTABLE=OFF \
|
||||
-DWITH_PYTHON_INSTALL=OFF \
|
||||
-DOPENIMAGEIO_ROOT_DIR=/usr \
|
||||
-DWITH_SYSTEM_OPENJPEG=ON \
|
||||
-DWITH_GL_PROFILE_CORE=OFF \
|
||||
-DWITH_GL_PROFILE_ES20=OFF \
|
||||
-DWITH_LLVM=ON \
|
||||
-DWITH_CYCLES_CUDA_BINARIES=OFF \
|
||||
-DWITH_CYCLES_PTEX=OFF \
|
||||
-DWITH_CYCLES=OFF \
|
||||
-DWITH_RAYOPTIMIZATION=OFF \
|
||||
-DPYTHON_VERSION=3.6 \
|
||||
-DPYTHON_LIBPATH=/usr/lib \
|
||||
-DPYTHON_LIBRARY=python3.6m \
|
||||
-DPYTHON_INCLUDE_DIRS=/usr/include/python3.6m
|
||||
make
|
||||
|
||||
# PTEX is currently broken and experimental in blender anyway
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver/build"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm755 ../release/bin/blender-softwaregl "${pkgdir}/usr/bin/blender-softwaregl"
|
||||
python -m compileall "${pkgdir}/usr/share/blender"
|
||||
python -O -m compileall "${pkgdir}/usr/share/blender"
|
||||
}
|
113
community/blender/ffmpeg4.0.patch
Normal file
113
community/blender/ffmpeg4.0.patch
Normal file
|
@ -0,0 +1,113 @@
|
|||
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
|
||||
index e9eea195208..84aea330313 100644
|
||||
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
|
||||
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
|
||||
@@ -264,9 +264,9 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(boost::shared_ptr<AUD_Buffer> buffer) :
|
||||
m_membuffer(buffer),
|
||||
m_membufferpos(0)
|
||||
{
|
||||
- m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE));
|
||||
+ m_membuf = reinterpret_cast<data_t*>(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE));
|
||||
|
||||
- m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this,
|
||||
+ m_aviocontext = avio_alloc_context(m_membuf, AV_INPUT_BUFFER_MIN_SIZE, 0, this,
|
||||
read_packet, NULL, seek_packet);
|
||||
|
||||
if(!m_aviocontext)
|
||||
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
|
||||
index 3f95ac7a4da..2c2f0916406 100644
|
||||
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
|
||||
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
|
||||
@@ -163,7 +163,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
|
||||
try
|
||||
{
|
||||
if(m_formatCtx->oformat->flags & AVFMT_GLOBALHEADER)
|
||||
- m_codecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ m_codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
|
||||
AVCodec* codec = avcodec_find_encoder(m_codecCtx->codec_id);
|
||||
if(!codec)
|
||||
@@ -185,11 +185,11 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
|
||||
if(avcodec_open2(m_codecCtx, codec, NULL))
|
||||
AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
|
||||
|
||||
- m_output_buffer.resize(FF_MIN_BUFFER_SIZE);
|
||||
+ m_output_buffer.resize(AV_INPUT_BUFFER_MIN_SIZE);
|
||||
int samplesize = AUD_MAX(AUD_SAMPLE_SIZE(m_specs), AUD_DEVICE_SAMPLE_SIZE(m_specs));
|
||||
|
||||
if(m_codecCtx->frame_size <= 1) {
|
||||
- m_input_size = FF_MIN_BUFFER_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
|
||||
+ m_input_size = AV_INPUT_BUFFER_MIN_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
|
||||
m_input_buffer.resize(m_input_size * samplesize);
|
||||
}
|
||||
else
|
||||
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
index d7fcd896e11..9e82df17dce 100644
|
||||
--- a/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
@@ -619,8 +619,6 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
|
||||
c->rc_buffer_aggressivity = 1.0;
|
||||
#endif
|
||||
|
||||
- c->me_method = ME_EPZS;
|
||||
-
|
||||
codec = avcodec_find_encoder(c->codec_id);
|
||||
if (!codec)
|
||||
return NULL;
|
||||
@@ -682,14 +680,14 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
|
||||
)
|
||||
{
|
||||
PRINT("Using global header\n");
|
||||
- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
}
|
||||
|
||||
/* Determine whether we are encoding interlaced material or not */
|
||||
if (rd->mode & R_FIELDS) {
|
||||
PRINT("Encoding interlaced video\n");
|
||||
- c->flags |= CODEC_FLAG_INTERLACED_DCT;
|
||||
- c->flags |= CODEC_FLAG_INTERLACED_ME;
|
||||
+ c->flags |= AV_CODEC_FLAG_INTERLACED_DCT;
|
||||
+ c->flags |= AV_CODEC_FLAG_INTERLACED_ME;
|
||||
}
|
||||
|
||||
/* xasp & yasp got float lately... */
|
||||
@@ -779,7 +777,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int
|
||||
}
|
||||
|
||||
if (of->oformat->flags & AVFMT_GLOBALHEADER) {
|
||||
- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
}
|
||||
|
||||
set_ffmpeg_properties(rd, c, "audio", &opts);
|
||||
@@ -798,14 +796,14 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int
|
||||
st->codec->time_base.den = st->codec->sample_rate;
|
||||
|
||||
#ifndef FFMPEG_HAVE_ENCODE_AUDIO2
|
||||
- context->audio_outbuf_size = FF_MIN_BUFFER_SIZE;
|
||||
+ context->audio_outbuf_size = AV_INPUT_BUFFER_MIN_SIZE;
|
||||
#endif
|
||||
|
||||
if (c->frame_size == 0)
|
||||
// used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
|
||||
// not sure if that is needed anymore, so let's try out if there are any
|
||||
// complaints regarding some ffmpeg versions users might have
|
||||
- context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels;
|
||||
+ context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample / c->channels;
|
||||
else {
|
||||
context->audio_input_samples = c->frame_size;
|
||||
#ifndef FFMPEG_HAVE_ENCODE_AUDIO2
|
||||
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
|
||||
index eaf4dfd84b4..9c2f42feb52 100644
|
||||
--- a/source/blender/imbuf/intern/indexer.c
|
||||
+++ b/source/blender/imbuf/intern/indexer.c
|
||||
@@ -537,7 +537,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
|
||||
av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0);
|
||||
|
||||
if (rv->of->flags & AVFMT_GLOBALHEADER) {
|
||||
- rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
}
|
||||
|
||||
if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) {
|
Loading…
Reference in a new issue