blob: 2d0960e3ff52af7f3b10a6ae984466c28ea9c97f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ lib, stdenv, fetchsvn }:
stdenv.mkDerivation rec {
pname = "xavs";
version = "55";
src = fetchsvn {
url = "https://svn.code.sf.net/p/xavs/code/trunk";
rev = version;
sha256 = "0drw16wm95dqszpl7j33y4gckz0w0107lnz6wkzb66f0dlbv48cf";
};
enableParallelBuilding = true;
patchPhase = ''
patchShebangs configure
patchShebangs config.sub
patchShebangs version.sh
patchShebangs tools/countquant_xavs.pl
patchShebangs tools/patcheck
patchShebangs tools/regression-test.pl
patchShebangs tools/xavs-format
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace config.guess --replace 'uname -p' 'uname -m'
substituteInPlace configure \
--replace '-O4' '-O3' \
--replace ' -s ' ' ' \
--replace 'LDFLAGS -s' 'LDFLAGS' \
--replace '-dynamiclib' ' ' \
--replace '-falign-loops=16' ' '
substituteInPlace Makefile --replace '-Wl,-soname,' ' '
'';
configureFlags = [
"--enable-pic"
"--enable-shared"
# Bug preventing compilation with assembly enabled
"--disable-asm"
];
meta = with lib; {
description = "AVS encoder and decoder";
mainProgram = "xavs";
homepage = "https://xavs.sourceforge.net/";
license = licenses.lgpl2;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ codyopel ];
};
}
|