diff --git a/bootstrap.d/media-video.yml b/bootstrap.d/media-video.yml new file mode 100644 index 000000000..1aa8aa8bc --- /dev/null +++ b/bootstrap.d/media-video.yml @@ -0,0 +1,107 @@ +packages: + - name: ffmpeg + architecture: '@OPTION:arch@' + metadata: + summary: Complete solution to record/convert/stream audio and video. Includes libavcodec + description: FFmpeg is a solution to record, convert and stream audio and video. It is a very fast video and audio converter and it can also acquire from a live audio/video source.FFmpeg is a solution to record, convert and stream audio and video. It is a very fast video and audio converter and it can also acquire from a live audio/video source. + spdx: 'GPL-2.0-only' + website: 'https://ffmpeg.org/' + maintainer: "Dennis Bonke " + categories: ['media-video'] + source: + subdir: ports + git: 'https://git.ffmpeg.org/ffmpeg.git' + tag: 'n4.4.1' + version: '4.4.1' + pkgs_required: + - mlibc + - libiconv + - libxcb + - bzip2 + - xz-utils + - libxml + - openssl + - sdl2 + - mesa + - zlib + - libx11 + - fontconfig + - freetype + - fribidi + - libmodplug + - libvorbis + - libtheora + - libwebp + - libdrm + - libx264 + tools_required: + - system-gcc + - host-pkg-config + - virtual: pkgconfig-for-target + triple: x86_64-managarm + configure: + # Object files are placed where configure is launched + - args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@'] + - args: + - './configure' + - '--prefix=/usr' + - '--enable-gpl' # Enable more plugins + - '--enable-version3' # Enable more plugins + - '--enable-nonfree' # Enable more plugins (may mean unredistributable) + - '--disable-static' + - '--enable-shared' + - '--disable-stripping' + - '--docdir=/usr/share/doc/ffmpeg-4.4.1' + - '--enable-avresample' + - '--enable-ffplay' + - '--disable-alsa' + - '--enable-openssl' + - '--enable-sdl2' + - '--enable-libxml2' + - '--enable-opengl' + - '--disable-securetransport' + - '--disable-frei0r' + - '--disable-libass' + - '--disable-sndio' + - '--disable-securetransport' + - '--disable-amf' + - '--disable-audiotoolbox' + - '--disable-cuda-llvm' + - '--disable-cuvid' + - '--disable-d3d11va' + - '--disable-dxva2' + - '--disable-ffnvcodec' + - '--disable-nvdec' + - '--disable-nvenc' + - '--disable-v4l2-m2m' + - '--disable-vaapi' + - '--disable-vdpau' + - '--disable-videotoolbox' + # Start cross compilation config + - '--enable-cross-compile' + - '--arch=@OPTION:arch@' + - '--cross-prefix=@OPTION:arch-triple@' + - '--host-cc=gcc' + - '--target-os=linux' # Fun times ahead + - '--cc=@OPTION:arch-triple@-gcc' + - '--cxx=@OPTION:arch-triple@-g++' + - '--ar=@OPTION:arch-triple@-ar' + - '--nm=@OPTION:arch-triple@-nm' + - '--strip=@OPTION:arch-triple@-strip' + - '--ranlib=@OPTION:arch-triple@-ranlib' + - '--pkg-config=@OPTION:arch-triple@-pkg-config' + # End cross compilation config + - '--enable-libfontconfig' + - '--enable-libfreetype' + - '--enable-libfribidi' + - '--enable-libmodplug' + - '--enable-libvorbis' + - '--enable-libtheora' + - '--enable-libwebp' + - '--enable-libdrm' + - '--enable-libx264' + build: + - args: ['make', '-j@PARALLELISM@'] + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' diff --git a/bootstrap.yml b/bootstrap.yml index 8ae97146b..ca6d36982 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -18,6 +18,7 @@ imports: - file: bootstrap.d/media-fonts.yml - file: bootstrap.d/media-gfx.yml - file: bootstrap.d/media-libs.yml + - file: bootstrap.d/media-video.yml - file: bootstrap.d/meta-pkgs.yml - file: bootstrap.d/net-dns.yml - file: bootstrap.d/net-libs.yml diff --git a/patches/ffmpeg/0001-Add-initial-Managarm-support.patch b/patches/ffmpeg/0001-Add-initial-Managarm-support.patch new file mode 100644 index 000000000..274edcfe2 --- /dev/null +++ b/patches/ffmpeg/0001-Add-initial-Managarm-support.patch @@ -0,0 +1,26 @@ +From c606b2718f2c419f580f884a97e59b62feda5e39 Mon Sep 17 00:00:00 2001 +From: Dennis Bonke +Date: Wed, 27 Apr 2022 23:14:43 +0200 +Subject: [PATCH] Add initial Managarm support + +Signed-off-by: Dennis Bonke +--- + libavutil/cpu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavutil/cpu.c b/libavutil/cpu.c +index 6bd0f07..4d692e4 100644 +--- a/libavutil/cpu.c ++++ b/libavutil/cpu.c +@@ -280,7 +280,7 @@ int av_cpu_count(void) + #if HAVE_WINRT + SYSTEM_INFO sysinfo; + #endif +-#if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) ++#if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) && !defined(__managarm__) + cpu_set_t cpuset; + + CPU_ZERO(&cpuset); +-- +2.36.0 +