libbluray: 1.3.1 -> 1.3.2

This commit is contained in:
R. Ryantm 2022-07-31 17:46:26 +00:00 committed by Sandro Jäckel
parent e85a87766a
commit 065ea88fe6
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 16 additions and 49 deletions

View file

@ -6,51 +6,43 @@
, withFonts ? true, freetype
}:
with lib;
# Info on how to use:
# https://wiki.archlinux.org/index.php/BluRay
stdenv.mkDerivation rec {
pname = "libbluray";
version = "1.3.1";
version = "1.3.2";
src = fetchurl {
url = "http://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-wksPQcW3N7u2XFRP5jSVY3p3HBClGd/IAudp8RK0O3U=";
url = "https://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-RWgU258Hwe7N736ED8uyCXbvgU34dUKL+4Hs9FhR8XA=";
};
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 ];
++ lib.optionals withJava [ ant ];
buildInputs = [ fontconfig ]
++ optional withJava jdk
++ optional withMetadata libxml2
++ optional withFonts freetype
++ optional stdenv.isDarwin DiskArbitration
;
++ lib.optional withJava jdk
++ lib.optional withMetadata libxml2
++ lib.optional withFonts freetype
++ lib.optional stdenv.isDarwin DiskArbitration;
propagatedBuildInputs = optional withAACS libaacs;
propagatedBuildInputs = lib.optional withAACS libaacs;
NIX_LDFLAGS = toString [
(optionalString withAACS "-L${libaacs}/lib -laacs")
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
];
NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
preConfigure = ''
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
preConfigure = lib.optionalString withJava ''
export JDK_HOME="${jdk.home}"
'';
configureFlags = with lib;
optional (! withJava) "--disable-bdjava-jar"
++ optional (! withMetadata) "--without-libxml2"
++ optional (! withFonts) "--without-freetype"
;
configureFlags = lib.optional (!withJava) "--disable-bdjava-jar"
++ lib.optional (!withMetadata) "--without-libxml2"
++ lib.optional (!withFonts) "--without-freetype";
meta = with lib; {
homepage = "http://www.videolan.org/developers/libbluray.html";

View file

@ -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);