Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

ttaenc: init at 3.4.1

+69
+15
pkgs/by-name/tt/ttaenc/makefile.patch
··· 1 + --- a/Makefile 2 + +++ b/Makefile 3 + @@ -8,10 +8,10 @@ 4 + INSDIR = /usr/bin 5 + 6 + ttaenc: $(patsubst %.c, %.o, $(wildcard *.c)) 7 + - gcc $^ -o $@ $(CFLAGS) 8 + + $(CC) $^ -o $@ $(CFLAGS) 9 + 10 + %.o: %.c 11 + - gcc -c $(CFLAGS) $< 12 + + $(CC) -c $(CFLAGS) $< 13 + 14 + install: 15 + [ -d "$(INSDIR)" ] || mkdir $(INSDIR)
+44
pkgs/by-name/tt/ttaenc/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchurl, 5 + }: 6 + stdenv.mkDerivation (finalAttrs: { 7 + pname = "ttaenc"; 8 + version = "3.4.1"; 9 + 10 + src = fetchurl { 11 + url = "mirror://sourceforge/tta/ttaenc-${finalAttrs.version}-src.tgz"; 12 + sha256 = "sha256-ssnIsBWsxYZPCCoBV/LgnFEX0URTIctheOkltEi+PcY="; 13 + }; 14 + 15 + patches = [ 16 + ./makefile.patch # Use stdenv's CC 17 + ./ttaenc-inline.patch # Patch __inline used into always_inline for both GCC and clang 18 + ]; 19 + 20 + makeFlags = [ "INSDIR=$(out)/bin" ]; 21 + 22 + preBuild = '' 23 + # From the Makefile, with `-msse` removed, since we have those on by x86_64 by default. 24 + makeFlagsArray+=(CFLAGS="-Wall -O2 -fomit-frame-pointer -funroll-loops -fforce-addr -falign-functions=4") 25 + ''; 26 + 27 + postInstall = '' 28 + # Copy docs 29 + install -dm755 "$out/share/doc/${finalAttrs.pname}" 30 + install -m644 "ChangeLog-${finalAttrs.version}" README "$out/share/doc/${finalAttrs.pname}" 31 + ''; 32 + 33 + meta = { 34 + description = "Lossless compressor for multichannel 8, 16 and 24 bits audio data, with the ability of password data protection"; 35 + homepage = "https://sourceforge.net/projects/tta/"; 36 + license = with lib.licenses; [ 37 + gpl3Only 38 + lgpl3Only 39 + ]; 40 + platforms = lib.platforms.unix; 41 + mainProgram = "ttaenc"; 42 + maintainers = with lib.maintainers; [ natsukagami ]; 43 + }; 44 + })
+10
pkgs/by-name/tt/ttaenc/ttaenc-inline.patch
··· 1 + --- a/ttaenc.c 2 + +++ b/ttaenc.c 3 + @@ -10,6 +10,7 @@ 4 + */ 5 + 6 + #include "ttaenc.h" 7 + +#define __inline static inline __attribute__((always_inline)) 8 + 9 + /******************* static variables and structures *******************/ 10 +