Skip to content

Commit 4ab1f1f

Browse files
authored
popa3d: fix build on GCC 14 (#402898)
2 parents 0d8f1f8 + a0cd45a commit 4ab1f1f

2 files changed

Lines changed: 35 additions & 10 deletions

File tree

pkgs/by-name/po/popa3d/package.nix

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,47 @@
44
fetchurl,
55
openssl,
66
libxcrypt,
7+
versionCheckHook,
78
}:
89

9-
stdenv.mkDerivation rec {
10+
stdenv.mkDerivation (finalAttrs: {
1011
pname = "popa3d";
1112
version = "1.0.3";
1213

1314
src = fetchurl {
14-
url = "http://www.openwall.com/popa3d/${pname}-${version}.tar.gz";
15-
sha256 = "1g48cd74sqhl496wmljhq44iyfpghaz363a1ip8nyhpjz7d57f03";
15+
url = "http://www.openwall.com/popa3d/popa3d-${finalAttrs.version}.tar.gz";
16+
hash = "sha256-A7hT2vnyQm/RjUENM76C7zofCcFQ0spNIhRiTU5jiLw=";
1617
};
1718

18-
buildInputs = [
19-
openssl
20-
libxcrypt
21-
];
22-
2319
patches = [
2420
./fix-mail-spool-path.patch
2521
./use-openssl.patch
2622
./use-glibc-crypt.patch
2723
./enable-standalone-mode.patch
2824
];
2925

30-
configurePhase = ''makeFlags="PREFIX=$out MANDIR=$out/share/man"'';
26+
enableParallelBuilding = true;
27+
28+
makeFlags = [
29+
"PREFIX=$(out)"
30+
"MANDIR=$(out)/share/man"
31+
];
32+
33+
buildInputs = [
34+
openssl
35+
libxcrypt
36+
];
37+
38+
nativeInstallCheckInputs = [
39+
versionCheckHook
40+
];
41+
doInstallCheck = true;
42+
versionCheckProgramArg = "-V";
3143

3244
meta = {
3345
homepage = "http://www.openwall.com/popa3d/";
3446
description = "Tiny POP3 daemon with security as the primary goal";
3547
mainProgram = "popa3d";
3648
platforms = lib.platforms.linux;
3749
};
38-
}
50+
})

pkgs/by-name/po/popa3d/use-glibc-crypt.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,16 @@ diff -ubr popa3d-1.0.2-orig/Makefile popa3d-1.0.2/Makefile
1010
# HP-UX trusted system
1111
#LIBS += -lsec
1212
# Solaris (POP_STANDALONE, POP_VIRTUAL)
13+
diff -ubr popa3d-1.0.2-orig/auth_shadow.c popa3d-1.0.2/auth_shadow.c
14+
--- a/auth_shadow.c
15+
+++ b/auth_shadow.c
16+
@@ -14,8 +14,9 @@
17+
#define _XOPEN_SOURCE 4
18+
#define _XOPEN_SOURCE_EXTENDED
19+
#define _XOPEN_VERSION 4
20+
#define _XPG4_2
21+
+#define _DEFAULT_SOURCE
22+
#include <unistd.h>
23+
#include <string.h>
24+
#include <stdlib.h>
25+
#include <pwd.h>

0 commit comments

Comments
 (0)