PKGNAME=openssh
PKGSEC=net
PKGDES="SSH client and server"
PKGDEP="openssl linux-pam krb5 libedit libfido2"
PKGDEP__RETRO="openssl linux-pam"
PKGSUG="x11-app"

AUTOTOOLS_AFTER=(
	"--sysconfdir=/etc/ssh"
	"--enable-pkcs11"
	"--enable-security-key"
	"--disable-strip"
	"--enable-etc-default-login"
	"--enable-lastlog"
	"--enable-utmp"
	"--enable-utmpx"
	"--enable-wtmp"
	"--enable-wtmpx"
	"--enable-libutil"
	"--enable-pututline"
	"--enable-pututxline"
	"--with-Werror=no"
	"--without-solaris-contracts"
	"--without-solaris-projects"
	"--without-solaris-privs"
	"--without-osfsia"
	"--with-zlib=/usr"
	"--with-zlib-version-check"
	"--without-ldns"
	"--with-libedit"
	"--without-audit"
	"--with-pie"
	"--with-security-key-builtin"
	"--with-pam"
	"--with-pam-service=system-remote-login"
	"--with-privsep-user=nobody"
	"--with-sandbox=seccomp_filter"
	"--without-selinux"
	"--with-kerberos5=/usr"
	"--with-privsep-path=/var/empty"
	"--with-xauth=/usr/bin/xauth"
	"--with-maildir=/var/mail"
	"--with-mantype=man"
	"--with-shadow"
	"--with-shadow"
	"--without-ipaddr-display"
	"--with-4in6"
	"--without-bsd-auth"
	"--with-pid-dir=/run"
	"ac_cv_func_mkdtemp=no"
)

# FIXME: "sorry, unimplemented: argument 'used' is not supported for
# '-fzero-call-used-regs' on this target" is not properly caught by
# configure for some reason.
AUTOTOOLS_AFTER__LOONGSON3=(
	"${AUTOTOOLS_AFTER[@]}"
	'ossh_cv_cflag__fzero_call_used_regs_used=no'
)

AUTOTOOLS_AFTER__RETRO=(
	"${AUTOTOOLS_AFTER[@]}"
	"--without-ldns"
	"--without-libedit"
	"--without-kerberos5"
	"--without-security-key-builtin"
	"--with-sandbox=no"
)

PKGCONFL="openssh-hpn"

# FIXME: ssh_dispatch_run_fatal: Connection to 127.0.0.1 port 22: incorrect signature
NOLTO__LOONGSON3=1

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
