depot/third_party/nixpkgs/pkgs/development/libraries/libbluray/BDJ-JARFILE-path.patch
Default email 13da32182d Project import generated by Copybara.
GitOrigin-RevId: a7855f2235a1876f97473a76151fec2afa02b287
2022-08-21 15:32:41 +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