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