libbluray: fix build failure on 1.3.1 with java
Backported from an upstream patch
This commit is contained in:
parent
938ea3de88
commit
785ca266b6
|
@ -1,24 +1,27 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 5007bbd..335f3f5 100644
|
||||
index 5007bbd..f46de1a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -253,6 +253,7 @@ AS_IF([test "x${JDK_HOME}" != "x"], [
|
||||
@@ -253,7 +253,7 @@ AS_IF([test "x${JDK_HOME}" != "x"], [
|
||||
])
|
||||
|
||||
AS_IF([test "x$use_bdjava_jar" = "xyes"], [
|
||||
-
|
||||
+ CPPFLAGS="${CPPFLAGS} -DJARDIR='\"\$(datadir)/java\"'"
|
||||
|
||||
dnl check for ant
|
||||
AC_CHECK_PROG(HAVE_ANT, [ant], yes, no)
|
||||
AS_IF([test "x$HAVE_ANT" = "xno"], [
|
||||
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
|
||||
index 1cb1bfe..94a175c 100644
|
||||
index 1cb1bfe..f3711c2 100644
|
||||
--- a/src/libbluray/bdj/bdj.c
|
||||
+++ b/src/libbluray/bdj/bdj.c
|
||||
@@ -533,6 +533,7 @@ static char *_find_libbluray_jar0()
|
||||
@@ -533,6 +533,9 @@ static char *_find_libbluray_jar0()
|
||||
# ifdef __FreeBSD__
|
||||
"/usr/local/share/java/" BDJ_JARFILE,
|
||||
# else
|
||||
+# ifdef JARDIR
|
||||
+ JARDIR "/" BDJ_JARFILE,
|
||||
+# endif
|
||||
"/usr/share/java/" BDJ_JARFILE,
|
||||
"/usr/share/libbluray/lib/" BDJ_JARFILE,
|
||||
# endif
|
||||
|
|
|
@ -20,11 +20,13 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-wksPQcW3N7u2XFRP5jSVY3p3HBClGd/IAudp8RK0O3U=";
|
||||
};
|
||||
|
||||
patches = optional withJava ./BDJ-JARFILE-path.patch;
|
||||
patches = [
|
||||
./BDJ-JARFILE-path.patch
|
||||
./libbluray-1.3.1-Fix-build-failure-after-Oracle-Java-CPU-for-April-2022.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
||||
++ optionals withJava [ ant ]
|
||||
;
|
||||
++ optionals withJava [ ant ];
|
||||
|
||||
buildInputs = [ fontconfig ]
|
||||
++ optional withJava jdk
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
|
||||
--- 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);
|
Loading…
Reference in a new issue