mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +00:00
ttaenc: init at 3.4.1
This commit is contained in:
parent
11b62e658f
commit
c609f1e371
15
pkgs/by-name/tt/ttaenc/makefile.patch
Normal file
15
pkgs/by-name/tt/ttaenc/makefile.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -8,10 +8,10 @@
|
||||
INSDIR = /usr/bin
|
||||
|
||||
ttaenc: $(patsubst %.c, %.o, $(wildcard *.c))
|
||||
- gcc $^ -o $@ $(CFLAGS)
|
||||
+ $(CC) $^ -o $@ $(CFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
- gcc -c $(CFLAGS) $<
|
||||
+ $(CC) -c $(CFLAGS) $<
|
||||
|
||||
install:
|
||||
[ -d "$(INSDIR)" ] || mkdir $(INSDIR)
|
44
pkgs/by-name/tt/ttaenc/package.nix
Normal file
44
pkgs/by-name/tt/ttaenc/package.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ttaenc";
|
||||
version = "3.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tta/ttaenc-${finalAttrs.version}-src.tgz";
|
||||
sha256 = "sha256-ssnIsBWsxYZPCCoBV/LgnFEX0URTIctheOkltEi+PcY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./makefile.patch # Use stdenv's CC
|
||||
./ttaenc-inline.patch # Patch __inline used into always_inline for both GCC and clang
|
||||
];
|
||||
|
||||
makeFlags = [ "INSDIR=$(out)/bin" ];
|
||||
|
||||
preBuild = ''
|
||||
# From the Makefile, with `-msse` removed, since we have those on by x86_64 by default.
|
||||
makeFlagsArray+=(CFLAGS="-Wall -O2 -fomit-frame-pointer -funroll-loops -fforce-addr -falign-functions=4")
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Copy docs
|
||||
install -dm755 "$out/share/doc/${finalAttrs.pname}"
|
||||
install -m644 "ChangeLog-${finalAttrs.version}" README "$out/share/doc/${finalAttrs.pname}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Lossless compressor for multichannel 8, 16 and 24 bits audio data, with the ability of password data protection";
|
||||
homepage = "https://sourceforge.net/projects/tta/";
|
||||
license = with lib.licenses; [
|
||||
gpl3Only
|
||||
lgpl3Only
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "ttaenc";
|
||||
maintainers = with lib.maintainers; [ natsukagami ];
|
||||
};
|
||||
})
|
10
pkgs/by-name/tt/ttaenc/ttaenc-inline.patch
Normal file
10
pkgs/by-name/tt/ttaenc/ttaenc-inline.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/ttaenc.c
|
||||
+++ b/ttaenc.c
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "ttaenc.h"
|
||||
+#define __inline static inline __attribute__((always_inline))
|
||||
|
||||
/******************* static variables and structures *******************/
|
||||
|
Loading…
Reference in New Issue
Block a user