aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/libass
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-02-09 10:27:10 -0500
committercodyopel <codyopel@gmail.com>2015-02-09 10:27:10 -0500
commitac726eb2dd8f9f5fabdd9802fee040f116be0fc8 (patch)
tree6e99f781f5c4887101a8e0a8cb7b0fb1eba64824 /pkgs/development/libraries/libass
parent6e479db7308eea1fcf788e25f952d9b50acca999 (diff)
libass: refactor & 0.11.1 -> 0.12.1
Diffstat (limited to 'pkgs/development/libraries/libass')
-rw-r--r--pkgs/development/libraries/libass/default.nix53
1 files changed, 36 insertions, 17 deletions
diff --git a/pkgs/development/libraries/libass/default.nix b/pkgs/development/libraries/libass/default.nix
index 15b80053218d..7dda6912a986 100644
--- a/pkgs/development/libraries/libass/default.nix
+++ b/pkgs/development/libraries/libass/default.nix
@@ -1,34 +1,53 @@
{ stdenv, fetchurl, pkgconfig, yasm
-, freetype, fribidi, fontconfig
-, enca ? null
-, harfbuzz ? null
+, freetype ? null
+, fribidi ? 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
- version = "0.11.1";
- sha256 = "1b0ki1zdkhflszzj5qr45j9qsd0rfbb6ws5pqkny8jhih0l3lxwx";
- baseurl = "https://github.com/libass/libass/releases/download";
-in stdenv.mkDerivation rec {
+ mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
+in
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
name = "libass-${version}";
+ version = "0.12.1";
src = fetchurl {
- url = "${baseurl}/${version}/${name}.tar.xz";
- inherit sha256;
+ url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
+ sha256 = "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7";
};
+ configureFlags = [
+ (mkFlag encaSupport "enca")
+ (mkFlag fontconfigSupport "fontconfig")
+ (mkFlag harfbuzzSupport "harfbuzz")
+ (mkFlag rasterizerSupport "rasterizer")
+ (mkFlag largeTilesSupport "large-tiles")
+ ];
+
nativeBuildInputs = [ pkgconfig yasm ];
- buildInputs = [
- freetype fribidi fontconfig
- enca harfbuzz
- ];
+ buildInputs = [ freetype fribidi ]
+ ++ optional encaSupport enca
+ ++ optional fontconfigSupport fontconfig
+ ++ optional harfbuzzSupport harfbuzz;
meta = {
description = "Portable ASS/SSA subtitle renderer";
- homepage = http://code.google.com/p/libass/;
- license = stdenv.lib.licenses.isc;
- platforms = stdenv.lib.platforms.linux;
- maintainers = [ stdenv.lib.maintainers.urkud ];
+ homepage = https://github.com/libass/libass;
+ license = licenses.isc;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ codyopel urkud ];
repositories.git = git://github.com/libass/libass.git;
};
}