2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchsvn }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "AVS encoder and decoder";
|
|
|
|
homepage = "http://xavs.sourceforge.net/";
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|