nixpkgs/pkgs/development/libraries/libbluray/BDJ-JARFILE-path.patch
Gauvain 'GovanifY' Roussel-Tarbouriech 785ca266b6
libbluray: fix build failure on 1.3.1 with java
Backported from an upstream patch
2022-08-15 19:53:55 +02:00

27 lines
842 B
Diff

diff --git a/configure.ac b/configure.ac
index 5007bbd..f46de1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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..f3711c2 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -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