From b4f89aa9444851b1ff59f1ab7a64dedc999fd58a Mon Sep 17 00:00:00 2001 From: herengui Date: Thu, 19 May 2022 18:26:37 +0800 Subject: [PATCH] fix build issue with recent JDK version Signed-off-by: herengui (cherry picked from commit af65f3f74b6e8e65755ed64c9a72ac9c1f05bfa9) --- Fix-build-with-recent-JDK-version.patch | 35 +++++++++++++++++++++++++ libbluray.spec | 7 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Fix-build-with-recent-JDK-version.patch diff --git a/Fix-build-with-recent-JDK-version.patch b/Fix-build-with-recent-JDK-version.patch new file mode 100644 index 0000000..92fdaf4 --- /dev/null +++ b/Fix-build-with-recent-JDK-version.patch @@ -0,0 +1,35 @@ +From 1f291c9c665debc7ddbc52c47c0a43dc72eec7b3 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Thu, 19 May 2022 18:16:53 +0800 +Subject: [PATCH] Fix build with recent JDK version + +Signed-off-by: herengui +--- + 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 0ade43e..65b0f47 100644 +--- a/src/libbluray/bdj/java/java/io/BDFileSystem.java ++++ b/src/libbluray/bdj/java/java/io/BDFileSystem.java +@@ -203,6 +203,17 @@ public abstract class BDFileSystem extends FileSystem { + return fs.fromURIPath(path); + } + ++ 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 boolean isAbsolute(File f) { + return fs.isAbsolute(f); + } +-- +2.20.1 + diff --git a/libbluray.spec b/libbluray.spec index 8d73811..3eddccc 100644 --- a/libbluray.spec +++ b/libbluray.spec @@ -1,11 +1,13 @@ Name: libbluray Version: 1.1.2 -Release: 4 +Release: 5 Summary: Library used to access Blu-ray Disc for video playback License: LGPLv2+ URL: https://www.videolan.org/developers/libbluray.html Source0: https://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.bz2 +Patch0: Fix-build-with-recent-JDK-version.patch + BuildRequires: ant autoconf automake doxygen fontconfig-devel freetype-devel graphviz BuildRequires: java-1.8.0-openjdk javapackages-tools libtool libxml2-devel texlive-latex java-1.8.0-openjdk-devel Provides: %{name}-utils @@ -77,6 +79,9 @@ do install -Dp -m 0755 .libs/$i %{buildroot}%{_bindir}/$i; done; %doc doc/doxygen/html %changelog +* Thu May 19 2022 herengui - 1.1.2-5 +- Fix build issue with recent JDK version + * Mon Jul 26 2021 liuyumeng -1.1.2-4 - fix requires:libbluray-1.1.2-4.oe1