libbluray: update, fix building, AACS and Java

This commit is contained in:
Nikolay Amiantov 2015-05-18 17:04:50 +03:00
parent 4936324273
commit a5fc6f702e
2 changed files with 34 additions and 34 deletions

View File

@ -1,8 +1,7 @@
diff --git a/configure.ac b/configure.ac diff -ru3 libbluray-0.8.0/configure.ac libbluray-0.8.0-new/configure.ac
index 3609d88..48c6bc6 100644 --- libbluray-0.8.0/configure.ac 2015-04-10 09:48:23.000000000 +0300
--- a/configure.ac +++ libbluray-0.8.0-new/configure.ac 2015-05-18 14:22:01.002075482 +0300
+++ b/configure.ac @@ -231,6 +231,7 @@
@@ -227,6 +227,7 @@ if [[ $use_bdjava = "yes" ]]; then
AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"]) AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"])
AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."]) AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."])
AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""]) AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
@ -10,16 +9,14 @@ index 3609d88..48c6bc6 100644
fi fi
AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ]) AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c diff -ru3 libbluray-0.8.0/src/libbluray/bdj/bdj.c libbluray-0.8.0-new/src/libbluray/bdj/bdj.c
index c622801..f4aab9b 100644 --- libbluray-0.8.0/src/libbluray/bdj/bdj.c 2015-04-06 19:25:09.000000000 +0300
--- a/src/libbluray/bdj/bdj.c +++ libbluray-0.8.0-new/src/libbluray/bdj/bdj.c 2015-05-18 14:22:59.241312808 +0300
+++ b/src/libbluray/bdj/bdj.c @@ -228,6 +228,7 @@
@@ -210,7 +210,7 @@ static const char *_find_libbluray_jar(void)
#ifdef _WIN32 #ifdef _WIN32
"" BDJ_JARFILE, "" BDJ_JARFILE,
#else #else
- "/usr/share/java/" BDJ_JARFILE,
+ JARDIR "/" BDJ_JARFILE, + JARDIR "/" BDJ_JARFILE,
"/usr/share/java/" BDJ_JARFILE,
"/usr/share/libbluray/lib/" BDJ_JARFILE,
#endif #endif
};

View File

@ -1,12 +1,16 @@
{ stdenv, fetchurl, pkgconfig, fontconfig { stdenv, fetchurl, pkgconfig, fontconfig, autoreconfHook
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null , withJava ? true, jdk ? null, ant ? null
, withAACS ? false, libaacs ? null
, withBDplus ? false, libbdplus ? null
, withMetadata ? true, libxml2 ? null , withMetadata ? true, libxml2 ? null
, withFonts ? true, freetype ? null , withFonts ? true, freetype ? null
# Need to run autoreconf hook after BDJ jarfile patch
, autoreconfHook ? null
}: }:
assert withAACS -> jdk != null && ant != null && libaacs != null && autoreconfHook != null; with stdenv.lib;
assert withJava -> jdk != null && ant != null;
assert withAACS -> libaacs != null;
assert withBDplus -> libbdplus != null;
assert withMetadata -> libxml2 != null; assert withMetadata -> libxml2 != null;
assert withFonts -> freetype != null; assert withFonts -> freetype != null;
@ -15,41 +19,40 @@ assert withFonts -> freetype != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
baseName = "libbluray"; baseName = "libbluray";
version = "0.7.0"; version = "0.8.0";
name = "${baseName}-${version}"; name = "${baseName}-${version}";
src = fetchurl { src = fetchurl {
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2"; url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
sha256 = "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp"; sha256 = "027xbdbsjyp1spfiva2331pzixrzw6vm97xlvgz16hzm5a5j103v";
}; };
nativeBuildInputs = with stdenv.lib; nativeBuildInputs = [ pkgconfig autoreconfHook ]
[pkgconfig] ++ optionals withJava [ ant ]
++ optional withAACS ant
; ;
buildInputs = with stdenv.lib; buildInputs = [ fontconfig ]
[fontconfig] ++ optional withJava jdk
++ optionals withAACS [ jdk autoreconfHook ] ++ optional withMetadata libxml2
++ optional withMetadata libxml2 ++ optional withFonts freetype
++ optional withFonts freetype ;
;
propagatedBuildInputs = stdenv.lib.optional withAACS libaacs; propagatedBuildInputs = stdenv.lib.optional withAACS libaacs;
preConfigure = stdenv.lib.optionalString withAACS '' preConfigure = ''
export JDK_HOME=${jdk.home} ${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
export LIBS="$LIBS -L${libaacs} -laacs" ${optionalString withAACS ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${libaacs}/lib -laacs"''}
${optionalString withBDplus ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${libbdplus}/lib -lbdplus"''}
''; '';
configureFlags = with stdenv.lib; configureFlags = with stdenv.lib;
optional withAACS "--enable-bdjava" optional (! withJava) "--disable-bdjava"
++ optional (! withMetadata) "--without-libxml2" ++ optional (! withMetadata) "--without-libxml2"
++ optional (! withFonts) "--without-freetype" ++ optional (! withFonts) "--without-freetype"
; ;
# Fix search path for BDJ jarfile # Fix search path for BDJ jarfile
patches = stdenv.lib.optional withAACS ./BDJ-JARFILE-path.patch; patches = stdenv.lib.optional withJava ./BDJ-JARFILE-path.patch;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.videolan.org/developers/libbluray.html; homepage = http://www.videolan.org/developers/libbluray.html;