Skip to content

Commit

Permalink
add ffmpeg to bcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ziad-fernride committed Jul 9, 2024
1 parent d459249 commit 492ffcb
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/ffmpeg/4.3.5/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "ffmpeg",
version = "4.3.5",
compatibility_level = 4,
)

bazel_dep(name = "rules_cc", version = "0.0.9")
31 changes: 31 additions & 0 deletions modules/ffmpeg/4.3.5/patches/build_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,28 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "avcodec",
+ srcs = glob([
+ "usr/local/lib/libavcodec.so*",
+ "usr/local/lib/libavformat.so*",
+ "usr/local/lib/libswresample.so*",
+ ]),
+ hdrs = glob(["usr/local/include/**/*.h"]),
+ includes = ["usr/local/include"],
+)
+
+cc_library(
+ name = "avutil",
+ srcs = glob(["usr/local/lib/libavutil.so*"]),
+ hdrs = glob(["usr/local/include/**/*.h"]),
+ includes = ["usr/local/include"],
+)
+
+cc_library(
+ name = "swscale",
+ srcs = glob(["usr/local/lib/libswscale.so*"]),
+ hdrs = glob(["usr/local/include/**/*.h"]),
+ includes = ["usr/local/include"],
+)
8 changes: 8 additions & 0 deletions modules/ffmpeg/4.3.5/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- /dev/null
+++ MODULE.bazel
@@ -0,0 +1,5 @@
+module(
+ name = "ffmpeg",
+ version = "4.3.5",
+ compatibility_level = 4,
+)
13 changes: 13 additions & 0 deletions modules/ffmpeg/4.3.5/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
matrix:
bazel: ["6.x", "7.x"]
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]

tasks:
verify_targets:
name: Verify build targets
bazel: ${{ bazel }}
platform: ${{ platform }}
build_targets:
- '@ffmpeg//:avcodec'
- '@ffmpeg//:avutil'
- '@ffmpeg//:swscale'
9 changes: 9 additions & 0 deletions modules/ffmpeg/4.3.5/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-D2TXTkva3EgsTuqUQNdItaomRIYf3nh2RPGRV382jFU=",
"patches": {
"build_dot_bazel.patch": "sha256-uVDFBnmOQc2Tw4p3UkR0xLQCKj1q2qrEUcAqp3cotvI=",
"module_dot_bazel.patch": "sha256-ukRbJECAMtsYUpFpp9IsHWztwCHFhZtGdLUYC1X0xIU="
},
"strip_prefix": "ffmpeg-4.3.5+gitn4.3.5-5-g94ca1908e2",
"url": "https://artifacts.fernride.tech/repository/talos_deps/video/ffmpeg-4.3.5%2Bgitn4.3.5-5-g94ca1908e2.tar"
}
5 changes: 5 additions & 0 deletions modules/ffmpeg/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"versions": [
"4.3.5"
]
}

0 comments on commit 492ffcb

Please sign in to comment.