popa3d: fix build on GCC 14

This commit is contained in:
Petr Zahradnik 2025-04-29 22:27:55 +02:00
parent f7750d7840
commit a0cd45afe4
2 changed files with 35 additions and 10 deletions

View File

@ -4,22 +4,18 @@
fetchurl,
openssl,
libxcrypt,
versionCheckHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "popa3d";
version = "1.0.3";
src = fetchurl {
url = "http://www.openwall.com/popa3d/${pname}-${version}.tar.gz";
sha256 = "1g48cd74sqhl496wmljhq44iyfpghaz363a1ip8nyhpjz7d57f03";
url = "http://www.openwall.com/popa3d/popa3d-${finalAttrs.version}.tar.gz";
hash = "sha256-A7hT2vnyQm/RjUENM76C7zofCcFQ0spNIhRiTU5jiLw=";
};
buildInputs = [
openssl
libxcrypt
];
patches = [
./fix-mail-spool-path.patch
./use-openssl.patch
@ -27,7 +23,23 @@ stdenv.mkDerivation rec {
./enable-standalone-mode.patch
];
configurePhase = ''makeFlags="PREFIX=$out MANDIR=$out/share/man"'';
enableParallelBuilding = true;
makeFlags = [
"PREFIX=$(out)"
"MANDIR=$(out)/share/man"
];
buildInputs = [
openssl
libxcrypt
];
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "-V";
meta = {
homepage = "http://www.openwall.com/popa3d/";
@ -35,4 +47,4 @@ stdenv.mkDerivation rec {
mainProgram = "popa3d";
platforms = lib.platforms.linux;
};
}
})

View File

@ -10,3 +10,16 @@ diff -ubr popa3d-1.0.2-orig/Makefile popa3d-1.0.2/Makefile
# HP-UX trusted system
#LIBS += -lsec
# Solaris (POP_STANDALONE, POP_VIRTUAL)
diff -ubr popa3d-1.0.2-orig/auth_shadow.c popa3d-1.0.2/auth_shadow.c
--- a/auth_shadow.c
+++ b/auth_shadow.c
@@ -14,8 +14,9 @@
#define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED
#define _XOPEN_VERSION 4
#define _XPG4_2
+#define _DEFAULT_SOURCE
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pwd.h>