forked from mirrors/nixpkgs
libbluray: update, fix building, AACS and Java
This commit is contained in:
parent
4936324273
commit
a5fc6f702e
|
@ -1,8 +1,7 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 3609d88..48c6bc6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -227,6 +227,7 @@ if [[ $use_bdjava = "yes" ]]; then
|
||||
diff -ru3 libbluray-0.8.0/configure.ac libbluray-0.8.0-new/configure.ac
|
||||
--- libbluray-0.8.0/configure.ac 2015-04-10 09:48:23.000000000 +0300
|
||||
+++ libbluray-0.8.0-new/configure.ac 2015-05-18 14:22:01.002075482 +0300
|
||||
@@ -231,6 +231,7 @@
|
||||
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([JDK_HOME], ["$JDK_HOME"], [""])
|
||||
|
@ -10,16 +9,14 @@ index 3609d88..48c6bc6 100644
|
|||
fi
|
||||
AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
|
||||
|
||||
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
|
||||
index c622801..f4aab9b 100644
|
||||
--- a/src/libbluray/bdj/bdj.c
|
||||
+++ b/src/libbluray/bdj/bdj.c
|
||||
@@ -210,7 +210,7 @@ static const char *_find_libbluray_jar(void)
|
||||
diff -ru3 libbluray-0.8.0/src/libbluray/bdj/bdj.c libbluray-0.8.0-new/src/libbluray/bdj/bdj.c
|
||||
--- libbluray-0.8.0/src/libbluray/bdj/bdj.c 2015-04-06 19:25:09.000000000 +0300
|
||||
+++ libbluray-0.8.0-new/src/libbluray/bdj/bdj.c 2015-05-18 14:22:59.241312808 +0300
|
||||
@@ -228,6 +228,7 @@
|
||||
#ifdef _WIN32
|
||||
"" BDJ_JARFILE,
|
||||
#else
|
||||
- "/usr/share/java/" BDJ_JARFILE,
|
||||
+ JARDIR "/" BDJ_JARFILE,
|
||||
"/usr/share/java/" BDJ_JARFILE,
|
||||
"/usr/share/libbluray/lib/" BDJ_JARFILE,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
{ stdenv, fetchurl, pkgconfig, fontconfig
|
||||
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null
|
||||
{ stdenv, fetchurl, pkgconfig, fontconfig, autoreconfHook
|
||||
, withJava ? true, jdk ? null, ant ? null
|
||||
, withAACS ? false, libaacs ? null
|
||||
, withBDplus ? false, libbdplus ? null
|
||||
, withMetadata ? true, libxml2 ? 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 withFonts -> freetype != null;
|
||||
|
||||
|
@ -15,41 +19,40 @@ assert withFonts -> freetype != null;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
baseName = "libbluray";
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
name = "${baseName}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
|
||||
sha256 = "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp";
|
||||
sha256 = "027xbdbsjyp1spfiva2331pzixrzw6vm97xlvgz16hzm5a5j103v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with stdenv.lib;
|
||||
[pkgconfig]
|
||||
++ optional withAACS ant
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ]
|
||||
++ optionals withJava [ ant ]
|
||||
;
|
||||
|
||||
buildInputs = with stdenv.lib;
|
||||
[fontconfig]
|
||||
++ optionals withAACS [ jdk autoreconfHook ]
|
||||
++ optional withMetadata libxml2
|
||||
++ optional withFonts freetype
|
||||
;
|
||||
buildInputs = [ fontconfig ]
|
||||
++ optional withJava jdk
|
||||
++ optional withMetadata libxml2
|
||||
++ optional withFonts freetype
|
||||
;
|
||||
|
||||
propagatedBuildInputs = stdenv.lib.optional withAACS libaacs;
|
||||
|
||||
preConfigure = stdenv.lib.optionalString withAACS ''
|
||||
export JDK_HOME=${jdk.home}
|
||||
export LIBS="$LIBS -L${libaacs} -laacs"
|
||||
preConfigure = ''
|
||||
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
|
||||
${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;
|
||||
optional withAACS "--enable-bdjava"
|
||||
optional (! withJava) "--disable-bdjava"
|
||||
++ optional (! withMetadata) "--without-libxml2"
|
||||
++ optional (! withFonts) "--without-freetype"
|
||||
;
|
||||
|
||||
# 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; {
|
||||
homepage = http://www.videolan.org/developers/libbluray.html;
|
||||
|
|
Loading…
Reference in a new issue