3 # Install dependencies required to build and test Git on Linux and macOS
8 P4WHENCE
=https
://cdist2.perforce.com
/perforce
/r21.2
9 LFSWHENCE
=https
://github.com
/github
/git-lfs
/releases
/download
/v
$LINUX_GIT_LFS_VERSION
10 UBUNTU_COMMON_PKGS
="make libssl-dev libcurl4-openssl-dev libexpat-dev
11 tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
12 libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl"
15 linux-clang|linux-gcc
)
16 sudo apt-add-repository
-y "ppa:ubuntu-toolchain-r/test"
17 sudo apt-get
-q update
18 sudo apt-get
-q -y install language-pack-is libsvn-perl apache2 \
19 $UBUNTU_COMMON_PKGS $PYTHON_PACKAGE
22 sudo apt-get
-q -y install gcc-8
26 mkdir
--parents "$P4_PATH"
28 wget
--quiet "$P4WHENCE/bin.linux26x86_64/p4d"
29 wget
--quiet "$P4WHENCE/bin.linux26x86_64/p4"
33 mkdir
--parents "$GIT_LFS_PATH"
35 wget
--quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
36 tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
37 cp git-lfs-
$LINUX_GIT_LFS_VERSION/git-lfs .
41 export HOMEBREW_NO_AUTO_UPDATE
=1 HOMEBREW_NO_INSTALL_CLEANUP
=1
42 # Uncomment this if you want to run perf tests:
43 # brew install gnu-time
44 test -z "$BREW_INSTALL_PACKAGES" ||
45 brew
install $BREW_INSTALL_PACKAGES
46 brew link
--force gettext
50 wget
-q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
51 tar -xf helix-core-server.tgz
&&
52 sudo xattr
-d com.apple.quarantine p4 p4d
2>/dev
/null || true
54 PATH
="$PATH:${HOME}/bin"
59 # Just in case the image is updated to contain gcc@9
60 # pre-installed but not linked.
66 sudo apt-get
-q update
67 sudo apt-get
-q -y install coccinelle libcurl4-openssl-dev libssl-dev \
68 libexpat-dev
gettext make
71 sudo apt-get
-q update
72 sudo apt-get
-q -y install asciidoc xmlto docbook-xsl-ns
make
74 test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
75 sudo gem
install --version 1.5.8 asciidoctor
77 linux-gcc-default|linux-gcc-4.8
)
78 sudo apt-get
-q update
79 sudo apt-get
-q -y install $UBUNTU_COMMON_PKGS
83 if type p4d
>/dev
/null
&& type p4
>/dev
/null
85 echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
87 echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
90 if type git-lfs
>/dev
/null
92 echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"