diff options
author | eolianoe | 2016-07-12 14:22:48 +0200 |
---|---|---|
committer | eolianoe | 2016-07-12 14:22:48 +0200 |
commit | 5e75f4f13e126ac9afe4af177d00c179e382e4aa (patch) | |
tree | 34ffc5ee1519c5fd68b31232bc832e7af663ede1 | |
parent | af1022e82d4fcdc56a11225a3b2299f7c71e5314 (diff) | |
download | aur-5e75f4f13e126ac9afe4af177d00c179e382e4aa.tar.gz |
Fix various compilations issues
with ffmpeg>=3 and hdf5>=1.10.0
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | ffmpeg3_compat.patch | 74 | ||||
-rw-r--r-- | hdf5.patch | 11 |
4 files changed, 84 insertions, 21 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Mon Jul 11 19:37:23 UTC 2016 +# Tue Jul 12 12:22:44 UTC 2016 pkgbase = vtk-visit pkgdesc = A software system for 3D computer graphics, image processing, and visualization (legacy version for VisIt). pkgver = 6.1.0 - pkgrel = 4 + pkgrel = 5 url = http://www.vtk.org/ arch = i686 arch = x86_64 @@ -48,16 +48,16 @@ pkgbase = vtk-visit provides = vtk=6.1.0 source = http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz source = mesa.patch - source = hdf5.patch source = vtk-type.patch source = gdal2.patch source = gcc6.patch + source = ffmpeg3_compat.patch sha256sums = bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34 sha256sums = 47fee3346c0d751ef58d1049c2c2160f741b3122058c0f0482ff6153c6c2f3f8 - sha256sums = d081f31463c1cab05e8e628550c89559236813af2b7511198e5768868ad601f0 sha256sums = 32a2a771cc6b0aa8c98399fa0b0294e2a1f98c15a5d7ad9cccf2bc50c68da492 sha256sums = 57ae622a7e281887f7948f4d5a53ff0e0301bbdf70594691dd74f20f14b6e882 sha256sums = 44ed94ca9fcc073f93938f44050a8af883f211b126fafaf860fa1be5af60c769 + sha256sums = fb1c2b404193fce1383c5b7fb18b6fec69fc3126a488c3903a51d8aa5528a9c5 pkgname = vtk-visit @@ -9,7 +9,7 @@ pkgname='vtk-visit' _pkgname=vtk _PKGNAME=VTK pkgver=6.1.0 -pkgrel=4 +pkgrel=5 pkgdesc='A software system for 3D computer graphics, image processing, and visualization (legacy version for VisIt).' arch=('i686' 'x86_64') url='http://www.vtk.org/' @@ -37,23 +37,23 @@ optdepends=('python2: python bindings' 'mariadb') provides=('vtk=6.1.0') source=("http://www.vtk.org/files/release/${pkgver:0:3}/${_PKGNAME}-${pkgver}.tar.gz" - 'mesa.patch' 'hdf5.patch' 'vtk-type.patch' 'gdal2.patch' 'gcc6.patch') + 'mesa.patch' 'vtk-type.patch' 'gdal2.patch' 'gcc6.patch' 'ffmpeg3_compat.patch') sha256sums=('bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34' '47fee3346c0d751ef58d1049c2c2160f741b3122058c0f0482ff6153c6c2f3f8' - 'd081f31463c1cab05e8e628550c89559236813af2b7511198e5768868ad601f0' '32a2a771cc6b0aa8c98399fa0b0294e2a1f98c15a5d7ad9cccf2bc50c68da492' '57ae622a7e281887f7948f4d5a53ff0e0301bbdf70594691dd74f20f14b6e882' - '44ed94ca9fcc073f93938f44050a8af883f211b126fafaf860fa1be5af60c769') + '44ed94ca9fcc073f93938f44050a8af883f211b126fafaf860fa1be5af60c769' + 'fb1c2b404193fce1383c5b7fb18b6fec69fc3126a488c3903a51d8aa5528a9c5') prepare() { cd "${srcdir}/${_PKGNAME}-${pkgver}" # fix compilation errors: patch -Np1 -i "${srcdir}/mesa.patch" - patch -Np1 -i "${srcdir}/hdf5.patch" patch -Np1 -i "${srcdir}/vtk-type.patch" patch -Np1 -i "${srcdir}/gdal2.patch" patch -Np1 -i "${srcdir}/gcc6.patch" + patch -Np1 -i "${srcdir}/ffmpeg3_compat.patch" # Use python2 sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ @@ -75,7 +75,7 @@ build() { # Flags to enable using system libs local vtk_system_flags="" - for lib in AUTHOBAHN EXPAT FREETYPE GLEW GL2PS HDF5 JPEG JSONCPP LIBXML2 MPI4PY OGGTHEORA PNG SIX TIFF TWISTED ZLIB ZOPE; do + for lib in AUTHOBAHN EXPAT FREETYPE GLEW GL2PS JPEG JSONCPP LIBXML2 MPI4PY OGGTHEORA PNG SIX TIFF TWISTED ZLIB ZOPE; do vtk_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON " done diff --git a/ffmpeg3_compat.patch b/ffmpeg3_compat.patch new file mode 100644 index 000000000000..0ba6b5b31cf3 --- /dev/null +++ b/ffmpeg3_compat.patch @@ -0,0 +1,74 @@ +--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx 2014-01-22 16:55:41.000000000 +0100 ++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx.new 2016-07-12 10:49:35.569696418 +0200 +@@ -143,11 +143,11 @@ + if (this->Writer->GetCompression()) + { + //choose a codec that is easily playable on windows +- this->avOutputFormat->video_codec = CODEC_ID_MJPEG; ++ this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; + } + else + { +- this->avOutputFormat->video_codec = CODEC_ID_RAWVIDEO; ++ this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; + } + + //assign the format to the context +@@ -184,11 +184,11 @@ + c->height = this->Dim[1]; + if (this->Writer->GetCompression()) + { +- c->pix_fmt = PIX_FMT_YUVJ422P; ++ c->pix_fmt = AV_PIX_FMT_YUVJ422P; + } + else + { +- c->pix_fmt = PIX_FMT_BGR24; ++ c->pix_fmt = AV_PIX_FMT_BGR24; + } + + //to do playback at actual recorded rate, this will need more work see also below +@@ -267,13 +267,13 @@ + #endif + + //for the output of the writer's input... +- this->rgbInput = avcodec_alloc_frame(); ++ this->rgbInput = av_frame_alloc(); + if (!this->rgbInput) + { + vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); + return 0; + } +- int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height); ++ int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); + unsigned char *rgb = new unsigned char[RGBsize]; + if (!rgb) + { +@@ -281,10 +281,10 @@ + return 0; + } + //The rgb buffer should get deleted when this->rgbInput is. +- avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height); ++ avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); + + //and for the output to the codec's input. +- this->yuvOutput = avcodec_alloc_frame(); ++ this->yuvOutput = av_frame_alloc(); + if (!this->yuvOutput) + { + vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); +@@ -342,12 +342,12 @@ + //convert that to YUV for input to the codec + #ifdef VTK_FFMPEG_HAS_IMG_CONVERT + img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, +- (AVPicture *)this->rgbInput, PIX_FMT_RGB24, ++ (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, + cc->width, cc->height); + #else + //convert that to YUV for input to the codec + SwsContext* convert_ctx = sws_getContext( +- cc->width, cc->height, PIX_FMT_RGB24, ++ cc->width, cc->height, AV_PIX_FMT_RGB24, + cc->width, cc->height, cc->pix_fmt, + SWS_BICUBIC, NULL, NULL, NULL); + diff --git a/hdf5.patch b/hdf5.patch deleted file mode 100644 index e9e1a3f5b9de..000000000000 --- a/hdf5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt.orig 2014-11-24 19:29:00.084619157 +0100 -+++ b/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt 2014-11-24 19:29:22.824443117 +0100 -@@ -233,7 +233,7 @@ - if (NOT VTK_USE_SYSTEM_HDF5) - # using VTK's HDF5, we always build that with HL support. - set (USE_NETCDF4 ON) --elseif(HDF5_HL_LIBRARY OR HDF5_hdf5_hl_LIBRARY) -+elseif(HDF5_HL_LIBRARY OR HDF5_hdf5_hl_LIBRARY OR HDF5_hdf5_hl_LIBRARY_RELEASE) - set (USE_NETCDF4 ON) - else() - message(STATUS "Disabling NETCDF4 support since HDF5_HL or HDF5_hdf5_hl is missing.") |