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