2015-05-18 16:04:50 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, fontconfig, autoreconfHook
|
2015-07-26 11:58:51 +02:00
|
|
|
, withJava ? false, jdk ? null, ant ? null
|
2015-05-18 16:04:50 +02:00
|
|
|
, withAACS ? false, libaacs ? null
|
|
|
|
, withBDplus ? false, libbdplus ? null
|
2014-09-18 03:42:08 +02:00
|
|
|
, withMetadata ? true, libxml2 ? null
|
|
|
|
, withFonts ? true, freetype ? null
|
|
|
|
}:
|
2012-02-22 21:29:29 +01:00
|
|
|
|
2015-05-18 16:04:50 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
assert withJava -> jdk != null && ant != null;
|
|
|
|
assert withAACS -> libaacs != null;
|
|
|
|
assert withBDplus -> libbdplus != null;
|
2014-09-18 03:42:08 +02:00
|
|
|
assert withMetadata -> libxml2 != null;
|
|
|
|
assert withFonts -> freetype != null;
|
2012-02-22 21:29:29 +01:00
|
|
|
|
|
|
|
# Info on how to use:
|
|
|
|
# https://wiki.archlinux.org/index.php/BluRay
|
|
|
|
|
2014-09-18 03:42:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libbluray";
|
2019-06-17 07:32:41 +02:00
|
|
|
version = "1.1.2";
|
2012-02-22 21:29:29 +01:00
|
|
|
|
2014-09-18 03:42:08 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "http://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
|
2019-06-17 07:32:41 +02:00
|
|
|
sha256 = "0hhbgkm11fw4pwbrklm76aiy54r6d7hk06yhl2fxq05i74i4bpd3";
|
2012-02-22 21:29:29 +01:00
|
|
|
};
|
|
|
|
|
2017-03-18 09:44:25 +01:00
|
|
|
patches = optional withJava ./BDJ-JARFILE-path.patch;
|
|
|
|
|
2015-05-18 16:04:50 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ]
|
|
|
|
++ optionals withJava [ ant ]
|
2014-09-18 03:42:08 +02:00
|
|
|
;
|
2012-02-22 21:29:29 +01:00
|
|
|
|
2015-05-18 16:04:50 +02:00
|
|
|
buildInputs = [ fontconfig ]
|
|
|
|
++ optional withJava jdk
|
|
|
|
++ optional withMetadata libxml2
|
|
|
|
++ optional withFonts freetype
|
|
|
|
;
|
2012-02-22 21:29:29 +01:00
|
|
|
|
2017-03-18 09:44:25 +01:00
|
|
|
propagatedBuildInputs = optional withAACS libaacs;
|
|
|
|
|
|
|
|
NIX_LDFLAGS = [
|
|
|
|
(optionalString withAACS "-L${libaacs}/lib -laacs")
|
|
|
|
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
|
|
|
|
];
|
2015-02-22 04:39:37 +01:00
|
|
|
|
2015-05-18 16:04:50 +02:00
|
|
|
preConfigure = ''
|
|
|
|
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
|
2015-02-22 04:39:37 +01:00
|
|
|
'';
|
|
|
|
|
2014-09-18 03:42:08 +02:00
|
|
|
configureFlags = with stdenv.lib;
|
2018-01-28 16:00:48 +01:00
|
|
|
optional (! withJava) "--disable-bdjava-jar"
|
2014-09-18 03:42:08 +02:00
|
|
|
++ optional (! withMetadata) "--without-libxml2"
|
|
|
|
++ optional (! withFonts) "--without-freetype"
|
|
|
|
;
|
2014-05-04 01:17:40 +02:00
|
|
|
|
2014-09-18 03:42:08 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-03-18 09:44:25 +01:00
|
|
|
homepage = http://www.videolan.org/developers/libbluray.html;
|
2012-02-22 21:29:29 +01:00
|
|
|
description = "Library to access Blu-Ray disks for video playback";
|
2014-09-18 03:42:08 +02:00
|
|
|
license = licenses.lgpl21;
|
2017-03-18 09:44:25 +01:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = platforms.unix;
|
2012-02-22 21:29:29 +01:00
|
|
|
};
|
|
|
|
}
|