darwin.remote_cmds: init at 303.0.2

This commit is contained in:
Randy Eckenrode 2024-09-22 16:08:34 -04:00
parent 6d0bc8c104
commit f493fb8770
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9
3 changed files with 222 additions and 0 deletions

View File

@ -0,0 +1,180 @@
# Build settings based on the upstream Xcode project.
# See: https://github.com/apple-oss-distributions/remote_cmds/blob/main/remote_cmds.xcodeproj/project.pbxproj
# Project settings
project('text_cmds', 'c', version : '@version@')
add_global_arguments(
# Many programs use old prototypes
'-Wno-deprecated-non-prototype',
language : 'c',
)
# Dependencies
cc = meson.get_compiler('c')
libedit = dependency('libedit')
ncurses = dependency('ncurses')
# Binaries
executable(
'logger',
install : true,
sources : [ 'logger/logger.c' ],
)
install_man('logger/logger.1')
executable(
'talk',
dependencies : [ ncurses ],
install : true,
sources : [
'talk/ctl.c',
'talk/ctl_transact.c',
'talk/display.c',
'talk/get_addrs.c',
'talk/get_iface.c',
'talk/get_names.c',
'talk/init_disp.c',
'talk/invite.c',
'talk/io.c',
'talk/look_up.c',
'talk/msgs.c',
'talk/talk.c',
],
)
install_man('talk/talk.1')
executable(
'talkd',
c_args : [
'-D__FBSDID=__RCSID',
'-DCOLLATE_DEBUG',
'-DYY_NO_UNPUT',
],
install : true,
sources : [
'talkd/announce.c',
'talkd/print.c',
'talkd/process.c',
'talkd/table.c',
'talkd/talkd.c',
'wall/ttymsg.c',
],
)
install_man('talkd/talkd.8')
install_symlink(
'ntalkd',
install_dir : get_option('bindir'),
pointing_to : 'talkd',
)
install_symlink(
'ntalkd.8',
install_dir : get_option('mandir') + '/man8',
pointing_to : 'talkd.8',
)
# Telnet is insecure and obsolete. Apple also no longer ships it.
# executable(
# 'telnet',
# dependencies : [ ncurses ],
# c_args : [
# '-D__FBSDID=__RCSID',
# '-DAUTHENTICATION',
# '-DENV_HACK',
# '-DINET6',
# '-DIPSEC',
# '-DKLUDGELINEMODE',
# '-DKRB5',
# '-DSKEY',
# '-DTERMCAP',
# '-DUSE_TERMIO',
# ],
# install : true,
# sources : [
# 'telnet/authenc.c',
# 'telnet/commands.c',
# 'telnet/main.c',
# 'telnet/network.c',
# 'telnet/ring.c',
# 'telnet/sys_bsd.c',
# 'telnet/telnet.c',
# 'telnet/terminal.c',
# 'telnet/tn3270.c',
# 'telnet/utilities.c',
# ],
# )
# install_man('telnet/telnet.1')
# executable(
# 'telnetd',
# c_args : [
# '-D__FBSDID=__RCSID',
# '-DDIAGNOSTICS',
# '-DENV_HACK',
# '-DINET6',
# '-DKLUDGELINEMODE',
# '-DLINEMODE',
# '-DNO_UTMP',
# '-DOLD_ENVIRON',
# '-DUSE_TERMIO',
# ],
# install : true,
# sources : [
# 'telnetd/authenc.c',
# 'telnetd/global.c',
# 'telnetd/slc.c',
# 'telnetd/state.c',
# # 'telnetd/strlcpy.c', # Not used
# 'telnetd/sys_term.c',
# 'telnetd/telnetd.c',
# 'telnetd/termstat.c',
# 'telnetd/utility.c',
# ],
# )
# install_man('telnetd/telnetd.8')
executable(
'tftp',
dependencies : [ libedit ],
include_directories : [ 'tftp', 'tftpd' ],
install : true,
sources : [
'tftp/main.c',
'tftp/tftp.c',
'tftpd/tftp-file.c',
'tftpd/tftp-io.c',
'tftpd/tftp-options.c',
'tftpd/tftp-transfer.c',
'tftpd/tftp-utils.c',
],
)
install_man('tftp/tftp.1')
executable(
'tftpd',
include_directories : [ 'tftp', 'tftpd' ],
install : true,
sources : [
'tftpd/tftp-file.c',
'tftpd/tftp-io.c',
'tftpd/tftp-options.c',
'tftpd/tftp-transfer.c',
'tftpd/tftp-utils.c',
'tftpd/tftpd.c',
],
)
install_man('tftpd/tftpd.8')
executable(
'wall',
c_args : [ '-D__FBSDID=__RCSID' ],
install : true,
sources : [
'wall/ttymsg.c',
'wall/wall.c',
],
)
install_man('wall/wall.1')

View File

@ -0,0 +1,38 @@
{
lib,
libedit,
mkAppleDerivation,
ncurses,
pkg-config,
}:
mkAppleDerivation {
releaseName = "remote_cmds";
outputs = [
"out"
"man"
];
xcodeHash = "sha256-+hC3yJwwwXr01Aa47K5dv4gL0+IlTQZU9YYgygXkTSI=";
postPatch = ''
# Avoid a conflict with the definition in SDKs headers.
sed -e '/MAXPKTSIZE/d' -i tftpd/tftp-utils.h
# Avoid a conflict with libedit when building statically
for file in tftpd/tftp-file.c tftpd/tftp-file.h tftp/tftp.c tftpd/tftpd.c; do
substituteInPlace $file \
--replace-fail read_init read_init_tftpd
done
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libedit
ncurses
];
meta.description = "Remote commands for Darwin";
}

View File

@ -83,6 +83,10 @@
"hash": "sha256-foIoIMe+zgPISFmE10q4cwEUBhiah4nbD7UtjBumZYU=",
"version": "66"
},
"remote_cmds": {
"hash": "sha256-a5ELSGJSTlyCb3bPdJqYSX320UzIkS2FiHxSpELIgls=",
"version": "303.0.2"
},
"removefile": {
"hash": "sha256-UpNk27kGXnZss1ZXWVJU9jLz/NW63ZAZEDLhyCYoi9M=",
"version": "45"