Merge pull request #6263 from codyopel/libass
libass: refactor & 0.11.1 -> 0.12.1
This commit is contained in:
commit
22718678b6
@ -1,34 +1,53 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, yasm
|
{ stdenv, fetchurl, pkgconfig, yasm
|
||||||
, freetype, fribidi, fontconfig
|
, freetype ? null
|
||||||
, enca ? null
|
, fribidi ? null
|
||||||
, harfbuzz ? null
|
, encaSupport ? true, enca ? null # enca support
|
||||||
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
||||||
|
, harfbuzzSupport ? true, harfbuzz ? null # harfbuzz support
|
||||||
|
, rasterizerSupport ? false # Internal rasterizer
|
||||||
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert ((freetype != null) && (fribidi != null));
|
||||||
|
assert encaSupport -> (enca != null);
|
||||||
|
assert fontconfigSupport -> (fontconfig != null);
|
||||||
|
assert harfbuzzSupport -> (harfbuzz != null);
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.11.1";
|
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
|
||||||
sha256 = "1b0ki1zdkhflszzj5qr45j9qsd0rfbb6ws5pqkny8jhih0l3lxwx";
|
in
|
||||||
baseurl = "https://github.com/libass/libass/releases/download";
|
|
||||||
in stdenv.mkDerivation rec {
|
with stdenv.lib;
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
name = "libass-${version}";
|
name = "libass-${version}";
|
||||||
|
version = "0.12.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${baseurl}/${version}/${name}.tar.xz";
|
url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
|
||||||
inherit sha256;
|
sha256 = "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
(mkFlag encaSupport "enca")
|
||||||
|
(mkFlag fontconfigSupport "fontconfig")
|
||||||
|
(mkFlag harfbuzzSupport "harfbuzz")
|
||||||
|
(mkFlag rasterizerSupport "rasterizer")
|
||||||
|
(mkFlag largeTilesSupport "large-tiles")
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig yasm ];
|
nativeBuildInputs = [ pkgconfig yasm ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ freetype fribidi ]
|
||||||
freetype fribidi fontconfig
|
++ optional encaSupport enca
|
||||||
enca harfbuzz
|
++ optional fontconfigSupport fontconfig
|
||||||
];
|
++ optional harfbuzzSupport harfbuzz;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Portable ASS/SSA subtitle renderer";
|
description = "Portable ASS/SSA subtitle renderer";
|
||||||
homepage = http://code.google.com/p/libass/;
|
homepage = https://github.com/libass/libass;
|
||||||
license = stdenv.lib.licenses.isc;
|
license = licenses.isc;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ stdenv.lib.maintainers.urkud ];
|
maintainers = with maintainers; [ codyopel urkud ];
|
||||||
repositories.git = git://github.com/libass/libass.git;
|
repositories.git = git://github.com/libass/libass.git;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user