Skip to content

Commit

Permalink
ffmpeg: Add port
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Bonke <[email protected]>
  • Loading branch information
Dennisbonke committed Apr 28, 2022
1 parent ab115a9 commit c2dc89e
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
107 changes: 107 additions & 0 deletions bootstrap.d/media-video.yml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
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@'
1 change: 1 addition & 0 deletions bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions patches/ffmpeg/0001-Add-initial-Managarm-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From c606b2718f2c419f580f884a97e59b62feda5e39 Mon Sep 17 00:00:00 2001
From: Dennis Bonke <[email protected]>
Date: Wed, 27 Apr 2022 23:14:43 +0200
Subject: [PATCH] Add initial Managarm support

Signed-off-by: Dennis Bonke <[email protected]>
---
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

0 comments on commit c2dc89e

Please sign in to comment.