openjfx{11,17,21,22}: pin to FFmpeg 6

This commit is contained in:
Emily 2024-07-14 21:32:39 +01:00
parent 4f93a66908
commit 164f9eaf8c
5 changed files with 86 additions and 8 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, lib, pkgs, fetchFromGitHub, writeText, gradle_7, pkg-config, perl, cmake
, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_4-headless, python3, ruby
, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_6-headless, python3, ruby
, openjdk11-bootstrap
, withMedia ? true
, withWebKit ? false
@ -25,7 +25,11 @@ in stdenv.mkDerivation {
sha256 = "sha256-BbBP2DiPZTSn1SBYMCgyiNdF9GD+NqR6YjeVNOQHHn4=";
};
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ];
patches = [
../backport-ffmpeg-6-support-jfx11.patch
];
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_6-headless ];
nativeBuildInputs = [ gradle perl pkg-config cmake gperf python3 ruby ];
dontUseCmakeConfigure = true;

View file

@ -1,6 +1,6 @@
{ stdenv, lib, pkgs, fetchFromGitHub, writeText, openjdk17_headless, gradle_7
, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib
, ffmpeg_4-headless, python3, ruby
, ffmpeg_6-headless, python3, ruby
, withMedia ? true
, withWebKit ? false
}:
@ -25,7 +25,11 @@ in stdenv.mkDerivation {
sha256 = "sha256-9VfXk2EfMebMyVKPohPRP2QXRFf8XemUtfY0JtBCHyw=";
};
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ];
patches = [
../backport-ffmpeg-6-support-jfx11.patch
];
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_6-headless ];
nativeBuildInputs = [ gradle perl pkg-config cmake gperf python3 ruby ];
dontUseCmakeConfigure = true;

View file

@ -1,6 +1,6 @@
{ stdenv, lib, pkgs, fetchFromGitHub, writeText
, openjdk21_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst
, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby
, libXxf86vm, glib, alsa-lib, ffmpeg_6, python3, ruby
, withMedia ? true
, withWebKit ? false
}:
@ -25,7 +25,7 @@ in stdenv.mkDerivation {
hash = "sha256-7z0GIbkQwG9mXY9dssaicqaKpMo3FkNEpyAvkswoQQ4=";
};
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ];
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_6 ];
nativeBuildInputs = [ gradle perl pkg-config cmake gperf python3 ruby ];
dontUseCmakeConfigure = true;

View file

@ -15,7 +15,7 @@
, libXxf86vm
, glib
, alsa-lib
, ffmpeg_4
, ffmpeg_6
, python3
, ruby
, withMedia ? true
@ -41,7 +41,7 @@ in stdenv.mkDerivation {
hash = "sha256-VoEufSO+LciUCvoAM86MG1iMjCA3FSb60Ik4OP2Rk/Q=";
};
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ];
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_6 ];
nativeBuildInputs = [ gradle perl pkg-config cmake gperf python3 ruby ];
dontUseCmakeConfigure = true;

View file

@ -0,0 +1,70 @@
Backported from <https://github.com/openjdk/jfx/pull/1259>.
Original author: Alexander Matveev <alexander.matveev@oracle.com>
diff --git a/build.gradle b/build.gradle
index 82dc7a7fa9..d1ae3b401f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3342,6 +3342,7 @@
media name: "ffmpeg-3.3.3", ext: "tar.gz"
media name: "ffmpeg-4.0.2", ext: "tar.gz"
media name: "ffmpeg-5.1.2", ext: "tar.gz"
+ media name: "ffmpeg-6.0", ext: "tar.gz"
}
implementation project(":base")
implementation project(":graphics")
@@ -3484,7 +3485,7 @@
if (t.name == "linux") {
// Pre-defined command line arguments
def cfgCMDArgs = ["sh", "configure"]
- def commonCfgArgs = ["--enable-shared", "--disable-debug", "--disable-static", "--disable-yasm", "--disable-doc", "--disable-programs", "--disable-everything"]
+ def commonCfgArgs = ["--enable-shared", "--disable-debug", "--disable-static", "--disable-asm", "--disable-doc", "--disable-programs", "--disable-everything"]
def codecsCfgArgs = ["--enable-decoder=aac,mp3,mp3float,h264", "--enable-parser=aac,h264", "--enable-demuxer=aac,h264,mpegts,mpegtsraw"]
def copyLibAVStubs = {String fromDir, String toDir ->
@@ -3688,8 +3689,8 @@
doLast {
project.ext.libav = [:]
project.ext.libav.basedir = "${buildDir}/native/linux/ffmpeg"
- project.ext.libav.versions = [ "3.3.3", "4.0.2", "5.1.2" ]
- project.ext.libav.versionmap = [ "3.3.3" : "57", "4.0.2" : "58", "5.1.2" : "59" ]
+ project.ext.libav.versions = [ "3.3.3", "4.0.2", "5.1.2", "6.0" ]
+ project.ext.libav.versionmap = [ "3.3.3" : "57", "4.0.2" : "58", "5.1.2" : "59", "6.0" : "60" ]
libav.versions.each { version ->
def libavDir = "${libav.basedir}/ffmpeg-${version}"
@@ -3769,7 +3770,7 @@
project.ext.libav.libavffmpeg.versions = [ "56" ]
project.ext.libav.ffmpeg = [:]
project.ext.libav.ffmpeg.basedir = "${buildDir}/native/linux/ffmpeg/ffmpeg"
- project.ext.libav.ffmpeg.versions = [ "57", "58", "59" ]
+ project.ext.libav.ffmpeg.versions = [ "57", "58", "59", "60" ]
project.ext.libav.versions.each { version ->
def libavDir = "${project.ext.libav.basedir}-${version}"
diff --git a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java
index 05f98ad3d1..b05bb68341 100644
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java
@@ -125,6 +125,7 @@
dependencies.add("avplugin-ffmpeg-57");
dependencies.add("avplugin-ffmpeg-58");
dependencies.add("avplugin-ffmpeg-59");
+ dependencies.add("avplugin-ffmpeg-60");
}
if (HostUtils.isMacOSX()) {
dependencies.add("fxplugins");
diff --git a/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c b/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c
index 9f67de9062..ee64e4bafd 100644
--- a/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c
+++ b/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c
@@ -146,7 +146,7 @@
// For ffmpeg (libavcodec-ffmpeg.so)
static const int AVCODEC_FFMPEG_EXPLICIT_VERSIONS[] = { 56 };
// For libav or ffmpeg (libavcodec.so)
-static const int AVCODEC_EXPLICIT_VERSIONS[] = { 57, 58, 59 };
+static const int AVCODEC_EXPLICIT_VERSIONS[] = { 57, 58, 59, 60 };
/*
* Callback passed to dl_iterate_phdr(): finds the path of