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
Message-Id: <88b8e88a967f8830d8c99afbe9abbc4f8e7bfa24.1652191130.git.dcn.mcnamara@gmail.com>
In-Reply-To: <03846a39036b6c96514d9ed61c6dd94f8731e057.1652191130.git.dcn.mcnamara@gmail.com>
References: <03846a39036b6c96514d9ed61c6dd94f8731e057.1652191130.git.dcn.mcnamara@gmail.com>
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
From 8f26777b1ce124ff761f80ef52d6be10bcea323e Mon Sep 17 00:00:00 2001
From: Fridrich Strba <fstrba@suse.com>
Date: Mon, 25 Apr 2022 14:28:58 +0300
Subject: [PATCH] Fix build failure after Oracle Java CPU for April 2022
---
...e-after-Oracle-Java-CPU-for-April-20.patch | 34 +++++++++++++++++++
contrib/src/bluray/rules.mak | 1 +
2 files changed, 35 insertions(+)
create mode 100644 contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch
src/libbluray/bdj/java/java/io/BDFileSystem.java | 11 +++++++++++
1 file changed, 11 insertions(+)
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
new file mode 100644
index 0000000000..71484f0c53
--- /dev/null
+++ b/contrib/src/bluray/0001-Fix-build-failure-after-Oracle-Java-CPU-for-April-20.patch
@@ -0,0 +1,34 @@
+From 8f26777b1ce124ff761f80ef52d6be10bcea323e Mon Sep 17 00:00:00 2001
+From: Fridrich Strba <fstrba@suse.com>
+Date: Mon, 25 Apr 2022 14:28:58 +0300
+Subject: [PATCH] Fix build failure after Oracle Java CPU for April 2022
+
+---
+ src/libbluray/bdj/java/java/io/BDFileSystem.java | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/libbluray/bdj/java/java/io/BDFileSystem.java b/src/libbluray/bdj/java/java/io/BDFileSystem.java
+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) {
++ try {
++ Method m = fs.getClass().getDeclaredMethod("isInvalid", new Class[] { File.class });
++ 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)
diff --git a/src/libbluray/bdj/java/java/io/BDFileSystem.java b/src/libbluray/bdj/java/java/io/BDFileSystem.java
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) {
+ try {
+ Method m = fs.getClass().getDeclaredMethod("isInvalid", new Class[] { File.class });
+ 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.25.1
2.35.1