Fix patchg

This commit is contained in:
eabdullin 2022-08-09 16:10:07 +03:00
parent 94558ea8d3
commit 589b6b8c52

View File

@ -1,69 +1,33 @@
From 88b8e88a967f8830d8c99afbe9abbc4f8e7bfa24 Mon Sep 17 00:00:00 2001 From 8f26777b1ce124ff761f80ef52d6be10bcea323e Mon Sep 17 00:00:00 2001
Message-Id: <88b8e88a967f8830d8c99afbe9abbc4f8e7bfa24.1652191130.git.dcn.mcnamara@gmail.com> From: Fridrich Strba <fstrba@suse.com>
In-Reply-To: <03846a39036b6c96514d9ed61c6dd94f8731e057.1652191130.git.dcn.mcnamara@gmail.com> Date: Mon, 25 Apr 2022 14:28:58 +0300
References: <03846a39036b6c96514d9ed61c6dd94f8731e057.1652191130.git.dcn.mcnamara@gmail.com> Subject: [PATCH] Fix build failure after Oracle Java CPU for April 2022
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 5 May 2022 14:59:13 +0200
Subject: [PATCH 25/25] contrib: libbluray: Fix build with recent JDK version
--- ---
...e-after-Oracle-Java-CPU-for-April-20.patch | 34 +++++++++++++++++++ src/libbluray/bdj/java/java/io/BDFileSystem.java | 11 +++++++++++
contrib/src/bluray/rules.mak | 1 + 1 file changed, 11 insertions(+)
2 files changed, 35 insertions(+)
create mode 100644 contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch
diff --git a/contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch b/contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch diff --git a/src/libbluray/bdj/java/java/io/BDFileSystem.java b/src/libbluray/bdj/java/java/io/BDFileSystem.java
new file mode 100644 index 03add5d1..fabe57bc 100644
index 0000000000..71484f0c53 --- a/src/libbluray/bdj/java/java/io/BDFileSystem.java
--- /dev/null +++ b/src/libbluray/bdj/java/java/io/BDFileSystem.java
+++ b/contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch @@ -227,6 +227,17 @@ public abstract class BDFileSystem extends FileSystem {
@@ -0,0 +1,34 @@ return fs.isAbsolute(f);
+From 8f26777b1ce124ff761f80ef52d6be10bcea323e Mon Sep 17 00:00:00 2001 }
+From: Fridrich Strba <fstrba@suse.com>
+Date: Mon, 25 Apr 2022 14:28:58 +0300 + public boolean isInvalid(File f) {
+Subject: [PATCH] Fix build failure after Oracle Java CPU for April 2022 + try {
+ + Method m = fs.getClass().getDeclaredMethod("isInvalid", new Class[] { File.class });
+--- + Object[] args = new Object[] {(Object)f};
+ src/libbluray/bdj/java/java/io/BDFileSystem.java | 11 +++++++++++ + Boolean result = (Boolean)m.invoke(fs, args);
+ 1 file changed, 11 insertions(+) + return result.booleanValue();
+ + } finally {
+diff --git a/src/libbluray/bdj/java/java/io/BDFileSystem.java b/src/libbluray/bdj/java/java/io/BDFileSystem.java + return false;
+index 03add5d1..fabe57bc 100644 + }
+--- a/src/libbluray/bdj/java/java/io/BDFileSystem.java
++++ b/src/libbluray/bdj/java/java/io/BDFileSystem.java
+@@ -227,6 +227,17 @@ public abstract class BDFileSystem extends FileSystem {
+ return fs.isAbsolute(f);
+ } + }
+ +
++ public boolean isInvalid(File f) { public String resolve(File f) {
++ try { if (!booted)
++ Method m = fs.getClass().getDeclaredMethod("isInvalid", new Class[] { File.class }); return fs.resolve(f);
++ Object[] args = new Object[] {(Object)f};
++ Boolean result = (Boolean)m.invoke(fs, args);
++ return result.booleanValue();
++ } finally {
++ return false;
++ }
++ }
++
+ public String resolve(File f) {
+ if (!booted)
+ return fs.resolve(f);
+--
+2.35.1
+
diff --git a/contrib/src/bluray/rules.mak b/contrib/src/bluray/rules.mak
index c61bf89a0a..62ea129acf 100644
--- a/contrib/src/bluray/rules.mak
+++ b/contrib/src/bluray/rules.mak
@@ -49,6 +49,7 @@ $(TARBALLS)/libbluray-$(BLURAY_VERSION).tar.bz2:
bluray: libbluray-$(BLURAY_VERSION).tar.bz2 .sum-bluray
$(UNPACK)
$(APPLY) $(SRC)/bluray/0001-install-bdjo_data-header.patch
+ $(APPLY) $(SRC)/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch
$(call pkg_static,"src/libbluray.pc.in")
$(MOVE)
-- --
2.25.1 2.35.1