tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
libbluray: update, fix building, AACS and Java
Nikolay Amiantov
10 years ago
a5fc6f70
49363242
+34
-34
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libbluray
BDJ-JARFILE-path.patch
default.nix
+10
-13
pkgs/development/libraries/libbluray/BDJ-JARFILE-path.patch
···
1
-
diff --git a/configure.ac b/configure.ac
2
-
index 3609d88..48c6bc6 100644
3
-
--- a/configure.ac
4
-
+++ b/configure.ac
5
-
@@ -227,6 +227,7 @@ if [[ $use_bdjava = "yes" ]]; then
6
AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"])
7
AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."])
8
AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
···
10
fi
11
AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
12
13
-
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
14
-
index c622801..f4aab9b 100644
15
-
--- a/src/libbluray/bdj/bdj.c
16
-
+++ b/src/libbluray/bdj/bdj.c
17
-
@@ -210,7 +210,7 @@ static const char *_find_libbluray_jar(void)
18
#ifdef _WIN32
19
"" BDJ_JARFILE,
20
#else
21
-
- "/usr/share/java/" BDJ_JARFILE,
22
+ JARDIR "/" BDJ_JARFILE,
0
0
23
#endif
24
-
};
25
-
···
1
+
diff -ru3 libbluray-0.8.0/configure.ac libbluray-0.8.0-new/configure.ac
2
+
--- libbluray-0.8.0/configure.ac 2015-04-10 09:48:23.000000000 +0300
3
+
+++ libbluray-0.8.0-new/configure.ac 2015-05-18 14:22:01.002075482 +0300
4
+
@@ -231,6 +231,7 @@
0
5
AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"])
6
AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."])
7
AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
···
9
fi
10
AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
11
12
+
diff -ru3 libbluray-0.8.0/src/libbluray/bdj/bdj.c libbluray-0.8.0-new/src/libbluray/bdj/bdj.c
13
+
--- libbluray-0.8.0/src/libbluray/bdj/bdj.c 2015-04-06 19:25:09.000000000 +0300
14
+
+++ libbluray-0.8.0-new/src/libbluray/bdj/bdj.c 2015-05-18 14:22:59.241312808 +0300
15
+
@@ -228,6 +228,7 @@
0
16
#ifdef _WIN32
17
"" BDJ_JARFILE,
18
#else
0
19
+ JARDIR "/" BDJ_JARFILE,
20
+
"/usr/share/java/" BDJ_JARFILE,
21
+
"/usr/share/libbluray/lib/" BDJ_JARFILE,
22
#endif
0
0
+24
-21
pkgs/development/libraries/libbluray/default.nix
···
1
-
{ stdenv, fetchurl, pkgconfig, fontconfig
2
-
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null
0
0
3
, withMetadata ? true, libxml2 ? null
4
, withFonts ? true, freetype ? null
5
-
# Need to run autoreconf hook after BDJ jarfile patch
6
-
, autoreconfHook ? null
7
}:
8
9
-
assert withAACS -> jdk != null && ant != null && libaacs != null && autoreconfHook != null;
0
0
0
0
10
assert withMetadata -> libxml2 != null;
11
assert withFonts -> freetype != null;
12
···
15
16
stdenv.mkDerivation rec {
17
baseName = "libbluray";
18
-
version = "0.7.0";
19
name = "${baseName}-${version}";
20
21
src = fetchurl {
22
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
23
-
sha256 = "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp";
24
};
25
26
-
nativeBuildInputs = with stdenv.lib;
27
-
[pkgconfig]
28
-
++ optional withAACS ant
29
;
30
31
-
buildInputs = with stdenv.lib;
32
-
[fontconfig]
33
-
++ optionals withAACS [ jdk autoreconfHook ]
34
-
++ optional withMetadata libxml2
35
-
++ optional withFonts freetype
36
-
;
37
38
propagatedBuildInputs = stdenv.lib.optional withAACS libaacs;
39
40
-
preConfigure = stdenv.lib.optionalString withAACS ''
41
-
export JDK_HOME=${jdk.home}
42
-
export LIBS="$LIBS -L${libaacs} -laacs"
0
43
'';
44
45
configureFlags = with stdenv.lib;
46
-
optional withAACS "--enable-bdjava"
47
++ optional (! withMetadata) "--without-libxml2"
48
++ optional (! withFonts) "--without-freetype"
49
;
50
51
# Fix search path for BDJ jarfile
52
-
patches = stdenv.lib.optional withAACS ./BDJ-JARFILE-path.patch;
53
54
meta = with stdenv.lib; {
55
homepage = http://www.videolan.org/developers/libbluray.html;
···
1
+
{ stdenv, fetchurl, pkgconfig, fontconfig, autoreconfHook
2
+
, withJava ? true, jdk ? null, ant ? null
3
+
, withAACS ? false, libaacs ? null
4
+
, withBDplus ? false, libbdplus ? null
5
, withMetadata ? true, libxml2 ? null
6
, withFonts ? true, freetype ? null
0
0
7
}:
8
9
+
with stdenv.lib;
10
+
11
+
assert withJava -> jdk != null && ant != null;
12
+
assert withAACS -> libaacs != null;
13
+
assert withBDplus -> libbdplus != null;
14
assert withMetadata -> libxml2 != null;
15
assert withFonts -> freetype != null;
16
···
19
20
stdenv.mkDerivation rec {
21
baseName = "libbluray";
22
+
version = "0.8.0";
23
name = "${baseName}-${version}";
24
25
src = fetchurl {
26
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
27
+
sha256 = "027xbdbsjyp1spfiva2331pzixrzw6vm97xlvgz16hzm5a5j103v";
28
};
29
30
+
nativeBuildInputs = [ pkgconfig autoreconfHook ]
31
+
++ optionals withJava [ ant ]
0
32
;
33
34
+
buildInputs = [ fontconfig ]
35
+
++ optional withJava jdk
36
+
++ optional withMetadata libxml2
37
+
++ optional withFonts freetype
38
+
;
0
39
40
propagatedBuildInputs = stdenv.lib.optional withAACS libaacs;
41
42
+
preConfigure = ''
43
+
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
44
+
${optionalString withAACS ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${libaacs}/lib -laacs"''}
45
+
${optionalString withBDplus ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${libbdplus}/lib -lbdplus"''}
46
'';
47
48
configureFlags = with stdenv.lib;
49
+
optional (! withJava) "--disable-bdjava"
50
++ optional (! withMetadata) "--without-libxml2"
51
++ optional (! withFonts) "--without-freetype"
52
;
53
54
# Fix search path for BDJ jarfile
55
+
patches = stdenv.lib.optional withJava ./BDJ-JARFILE-path.patch;
56
57
meta = with stdenv.lib; {
58
homepage = http://www.videolan.org/developers/libbluray.html;