libbluray: fix withJava
JAVA_HOME was always broken, it should have been JDK_HOME (however a fix for that has been needing review for more than a year). With libbluray 1.4.0, this is now set via the Meson flag `jdk_home`. Additionally, headless JDK is no longer sufficient as it requires `java.awt.Toolkit` at runtime.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
meson,
|
||||
ninja,
|
||||
withJava ? false,
|
||||
jdk21_headless, # Newer JDK's depend on a release with a fix for https://code.videolan.org/videolan/libbluray/-/issues/46
|
||||
jdk21, # Newer JDK's depend on a release with a fix for https://code.videolan.org/videolan/libbluray/-/issues/46
|
||||
ant,
|
||||
stripJavaArchivesHook,
|
||||
withAACS ? false,
|
||||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals withJava [
|
||||
jdk21_headless
|
||||
jdk21
|
||||
ant
|
||||
stripJavaArchivesHook
|
||||
];
|
||||
@@ -53,13 +53,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = lib.optional withAACS libaacs;
|
||||
|
||||
env.JAVA_HOME = lib.optionalString withJava jdk21_headless.home; # Fails at runtime without this
|
||||
env.NIX_LDFLAGS =
|
||||
lib.optionalString withAACS "-L${libaacs}/lib -laacs"
|
||||
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
|
||||
|
||||
mesonFlags =
|
||||
lib.optional (!withJava) "-Dbdj_jar=disabled"
|
||||
++ lib.optional withJava "-Djdk_home=${jdk21.home}"
|
||||
++ lib.optional (!withMetadata) "-dlibxml2=disabled"
|
||||
++ lib.optional (!withFonts) "-Dfreetype=disabled";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user