1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

makefile: curl needs to be actively installed on some platforms

- Make missing curl or tar visible in simulator environment variables:
       SIM_CURL_CMD_AVAILABLE
and SIM_TAR_CMD_AVAILABLE
This commit is contained in:
Mark Pizzolato 2023-07-28 04:15:12 -10:00
parent b1d63da52b
commit f9dedad627
2 changed files with 23 additions and 15 deletions

View File

@ -303,16 +303,16 @@ DPKG_ZLIB = 8
DPKG_SDL_TTF = 9
DPKG_GMAKE = 10
ifneq (3,${SIM_MAJOR})
# Platform Pkg Names COMPILER PCAP VDE PCRE EDITLINE SDL PNG ZLIB SDL_TTF GMAKE
PKGS_SRC_HOMEBREW = - - vde pcre libedit sdl2 libpng zlib sdl2_ttf make
PKGS_SRC_MACPORTS = - - vde2 pcre libedit libsdl2 libpng zlib libsdl2_ttf gmake
PKGS_SRC_APT = gcc libpcap-dev libvdeplug-dev libpcre3-dev libedit-dev libsdl2-dev libpng-dev - libsdl2-ttf-dev -
PKGS_SRC_YUM = gcc libpcap-devel - pcre-devel libedit-devel SDL2-devel libpng-devel zlib-devel SDL2_ttf-devel -
PKGS_SRC_ZYPPER = gcc libpcap-devel - pcre-devel libedit-devel libSDL2-devel libpng16-devel zlib-devel libSDL2_ttf-devel make
PKGS_SRC_PKGSRC = - - - pcre editline SDL2 png zlib SDL2_ttf gmake
PKGS_SRC_PKGBSD = - - - pcre libedit sdl2 png - sdl2_ttf gmake
PKGS_SRC_PKGADD = - - - pcre - sdl2 png - sdl2-ttf gmake
PKGS_SRC_TERMUX = - libpcap - - - sdl2 - - - -
# Platform Pkg Names COMPILER PCAP VDE PCRE EDITLINE SDL PNG ZLIB SDL_TTF GMAKE CURL
PKGS_SRC_HOMEBREW = - - vde pcre libedit sdl2 libpng zlib sdl2_ttf make -
PKGS_SRC_MACPORTS = - - vde2 pcre libedit libsdl2 libpng zlib libsdl2_ttf gmake -
PKGS_SRC_APT = gcc libpcap-dev libvdeplug-dev libpcre3-dev libedit-dev libsdl2-dev libpng-dev - libsdl2-ttf-dev - curl
PKGS_SRC_YUM = gcc libpcap-devel - pcre-devel libedit-devel SDL2-devel libpng-devel zlib-devel SDL2_ttf-devel - -
PKGS_SRC_ZYPPER = gcc libpcap-devel - pcre-devel libedit-devel libSDL2-devel libpng16-devel zlib-devel libSDL2_ttf-devel make -
PKGS_SRC_PKGSRC = - - - pcre editline SDL2 png zlib SDL2_ttf gmake -
PKGS_SRC_PKGBSD = - - - pcre libedit sdl2 png - sdl2_ttf gmake -
PKGS_SRC_PKGADD = - - - pcre - sdl2 png - sdl2-ttf gmake -
PKGS_SRC_TERMUX = - libpcap - - - sdl2 - - - - -
ifneq (0,$(TESTS))
ifneq (,${TEST_ARG})
export TEST_ARG
@ -1395,7 +1395,7 @@ ifneq (,$(and $(findstring APT,$(PKG_MGR)),$(USEFUL_PACKAGES)))
endif
ifneq (,$(and $(findstring TERMUX,$(PKG_MGR)),$(USEFUL_PACKAGES)))
ifeq (,$(shell $(SHELL) -c 'read -p "[Enter Y or N, Default is Y] " answer; echo $$answer' | grep -i n))
$(info Enter: $$ sudo pkg install $(USEFUL_PACKAGES))
$(info Enter: $$ pkg install $(USEFUL_PACKAGES))
$(info when that completes)
$(info re-enter: $$ $(MAKE) $(MAKECMDGOALS) $(EXTRAS))
$(error )

16
scp.c
View File

@ -7126,11 +7126,15 @@ if (flag) {
}
strlcpy (os_type, "Windows", sizeof (os_type));
strlcpy (tarversion, _get_tool_version ("tar"), sizeof (tarversion));
if (tarversion[0])
if (tarversion[0]) {
fprintf (st, "\n tar tool: %s", tarversion);
setenv ("SIM_TAR_CMD_AVAILABLE", "TRUE", 1);
}
strlcpy (curlversion, _get_tool_version ("curl"), sizeof (curlversion));
if (curlversion[0])
if (curlversion[0]) {
fprintf (st, "\n curl tool: %s", curlversion);
setenv ("SIM_CURL_CMD_AVAILABLE", "TRUE", 1);
}
}
#else
if (1) {
@ -7213,11 +7217,15 @@ if (flag) {
}
#endif
strlcpy (tarversion, _get_tool_version ("tar"), sizeof (tarversion));
if (tarversion[0])
if (tarversion[0]) {
fprintf (st, "\n tar tool: %s", tarversion);
setenv ("SIM_TAR_CMD_AVAILABLE", "TRUE", 1);
}
strlcpy (curlversion, _get_tool_version ("curl"), sizeof (curlversion));
if (curlversion[0])
if (curlversion[0]) {
fprintf (st, "\n curl tool: %s", curlversion);
setenv ("SIM_CURL_CMD_AVAILABLE", "TRUE", 1);
}
}
#endif
if ((!strcmp (os_type, "Unknown")) && (getenv ("OSTYPE")))