[arch-commits] Commit in python-pytorch/trunk (PKGBUILD ffmpeg4.4.patch)
Sven-Hendrik Haase
svenstaro at gemini.archlinux.org
Thu Feb 3 05:12:33 UTC 2022
Date: Thursday, February 3, 2022 @ 05:12:32
Author: svenstaro
Revision: 1124061
Prepare building for ffmpeg4.4
Added:
python-pytorch/trunk/ffmpeg4.4.patch
Modified:
python-pytorch/trunk/PKGBUILD
-----------------+
PKGBUILD | 9 +++++++--
ffmpeg4.4.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-03 05:06:58 UTC (rev 1124060)
+++ PKGBUILD 2022-02-03 05:12:32 UTC (rev 1124061)
@@ -6,7 +6,7 @@
_pkgname="pytorch"
pkgver=1.10.2
_pkgver=1.10.2
-pkgrel=1
+pkgrel=2
_pkgdesc='Tensors and Dynamic neural networks in Python with strong GPU acceleration'
pkgdesc="${_pkgdesc}"
arch=('x86_64')
@@ -13,7 +13,7 @@
url="https://pytorch.org"
license=('BSD')
depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 'python-yaml' 'libuv'
- 'python-numpy' 'protobuf' 'ffmpeg' 'python-future' 'qt5-base' 'onednn' 'intel-mkl'
+ 'python-numpy' 'protobuf' 'ffmpeg4.4' 'python-future' 'qt5-base' 'onednn' 'intel-mkl'
'python-typing_extensions')
makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda'
'cudnn' 'git' 'magma' 'ninja' 'pkgconfig' 'doxygen')
@@ -63,6 +63,7 @@
use-system-libuv.patch
fix-building-for-torchvision.patch
fix_c10.patch
+ ffmpeg4.4.patch
66219.patch)
sha256sums=('SKIP'
'SKIP'
@@ -109,6 +110,7 @@
'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669'
'600bd6a4bbcec9f99ab815d82cee1c2875530b2b75f4010da5ba72ce9bf31aff'
'4d0d7da4a3fb099ed75f3007559fad04ac96eed87c523b274fb3bb6020e6b9b8'
+ '75001b59e76831b0c93a547f851cb980e00b0d8cc7b66fb507eaeac217dc6ff9'
'd86efbe915386989d75d313fc76785e6d9c5638b983f17e98cca32174ac1fcee')
options=(!lto)
@@ -197,6 +199,9 @@
# fix build with google-glog 0.5 https://github.com/pytorch/pytorch/issues/58054
sed -e '/namespace glog_internal_namespace_/d' -e 's|::glog_internal_namespace_||' -i c10/util/Logging.cpp
+ # build against ffmpeg4.4
+ patch -Np1 -i "${srcdir}/ffmpeg4.4.patch"
+
cd "${srcdir}"
cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
Added: ffmpeg4.4.patch
===================================================================
--- ffmpeg4.4.patch (rev 0)
+++ ffmpeg4.4.patch 2022-02-03 05:12:32 UTC (rev 1124061)
@@ -0,0 +1,51 @@
+diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake
+index 04437562ee..dc8fe4aa5c 100644
+--- a/cmake/Modules/FindFFmpeg.cmake
++++ b/cmake/Modules/FindFFmpeg.cmake
+@@ -14,34 +14,40 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
+
+ find_path(FFMPEG_AVCODEC_INCLUDE_DIR
+ NAMES libavcodec/avcodec.h
+- PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include
++ PATHS /usr/include/ffmpeg4.4 /usr/local/include /opt/local/include /sw/include
+ PATH_SUFFIXES ffmpeg libav
++ NO_DEFAULT_PATH
+ )
+
+ find_library(FFMPEG_LIBAVCODEC
+ NAMES avcodec
+- PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++ PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++ NO_DEFAULT_PATH
+ )
+
+ find_library(FFMPEG_LIBAVFORMAT
+ NAMES avformat
+- PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++ PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++ NO_DEFAULT_PATH
+ )
+
+ find_library(FFMPEG_LIBAVUTIL
+ NAMES avutil
+- PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++ PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++ NO_DEFAULT_PATH
+ )
+
+
+ find_library(FFMPEG_LIBSWSCALE
+ NAMES swscale
+- PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++ PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++ NO_DEFAULT_PATH
+ )
+
+ find_library(FFMPEG_LIBSWRESAMPLE
+ NAMES swresample
+- PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++ PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++ NO_DEFAULT_PATH
+ )
+
+ if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)
More information about the arch-commits
mailing list