Merge pull request #184296 from r-ryantm/auto-update/libbluray
This commit is contained in:
commit
a71597f9b0
|
@ -6,51 +6,43 @@
|
||||||
, withFonts ? true, freetype
|
, withFonts ? true, freetype
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
# Info on how to use:
|
# Info on how to use:
|
||||||
# https://wiki.archlinux.org/index.php/BluRay
|
# https://wiki.archlinux.org/index.php/BluRay
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libbluray";
|
pname = "libbluray";
|
||||||
version = "1.3.1";
|
version = "1.3.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
|
url = "https://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
|
||||||
sha256 = "sha256-wksPQcW3N7u2XFRP5jSVY3p3HBClGd/IAudp8RK0O3U=";
|
sha256 = "sha256-RWgU258Hwe7N736ED8uyCXbvgU34dUKL+4Hs9FhR8XA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./BDJ-JARFILE-path.patch
|
./BDJ-JARFILE-path.patch
|
||||||
./libbluray-1.3.1-Fix-build-failure-after-Oracle-Java-CPU-for-April-2022.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
||||||
++ optionals withJava [ ant ];
|
++ lib.optionals withJava [ ant ];
|
||||||
|
|
||||||
buildInputs = [ fontconfig ]
|
buildInputs = [ fontconfig ]
|
||||||
++ optional withJava jdk
|
++ lib.optional withJava jdk
|
||||||
++ optional withMetadata libxml2
|
++ lib.optional withMetadata libxml2
|
||||||
++ optional withFonts freetype
|
++ lib.optional withFonts freetype
|
||||||
++ optional stdenv.isDarwin DiskArbitration
|
++ lib.optional stdenv.isDarwin DiskArbitration;
|
||||||
;
|
|
||||||
|
|
||||||
propagatedBuildInputs = optional withAACS libaacs;
|
propagatedBuildInputs = lib.optional withAACS libaacs;
|
||||||
|
|
||||||
NIX_LDFLAGS = toString [
|
NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
|
||||||
(optionalString withAACS "-L${libaacs}/lib -laacs")
|
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
|
||||||
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
|
|
||||||
];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = lib.optionalString withJava ''
|
||||||
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
|
export JDK_HOME="${jdk.home}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = with lib;
|
configureFlags = lib.optional (!withJava) "--disable-bdjava-jar"
|
||||||
optional (! withJava) "--disable-bdjava-jar"
|
++ lib.optional (!withMetadata) "--without-libxml2"
|
||||||
++ optional (! withMetadata) "--without-libxml2"
|
++ lib.optional (!withFonts) "--without-freetype";
|
||||||
++ optional (! withFonts) "--without-freetype"
|
|
||||||
;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://www.videolan.org/developers/libbluray.html";
|
homepage = "http://www.videolan.org/developers/libbluray.html";
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
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