Make Perl optional.

Update our documentation, build configuration, and setup scripts to make
Perl optional.
Closes #18152.
This commit is contained in:
Gerald Combs 2022-07-22 13:47:59 -07:00
parent a1c83a901b
commit 49dda8c71e
9 changed files with 124 additions and 120 deletions

View File

@ -1148,7 +1148,7 @@ find_package(GCRYPT "1.8.0" REQUIRED)
reset_find_package(CARES) reset_find_package(CARES)
find_package(CARES "1.14.0" REQUIRED) find_package(CARES "1.14.0" REQUIRED)
find_package(LEX REQUIRED) find_package(LEX REQUIRED)
find_package(Perl REQUIRED) find_package(Perl)
find_package(PCRE2 REQUIRED) find_package(PCRE2 REQUIRED)
if(CMAKE_VERSION VERSION_LESS "3.12") if(CMAKE_VERSION VERSION_LESS "3.12")

View File

@ -46,11 +46,13 @@ operating system. This is the case for Windows XP, which is supported by
Wireshark 1.10 and earlier. In other cases the standard package for Wireshark 1.10 and earlier. In other cases the standard package for
Wireshark might simply be old. This is the case for Solaris and HP-UX. Wireshark might simply be old. This is the case for Solaris and HP-UX.
Both Perl and Python 3 are needed, the former for building the man Python 3 is needed to build Wireshark. AsciiDoctor is required to build
pages. the documentation, including the man pages. Perl and flex are required
to generate some of the source code.
You must therefore install Perl, Python, GNU "make", and "flex" (vanilla You must therefore install Python 3, AsciiDoctor, and GNU "flex" (vanilla
"lex" won't work) on systems that lack them. "lex" won't work) on systems that lack them. You might need to install
Perl as well.
Full installation instructions can be found in the INSTALL file and in the Full installation instructions can be found in the INSTALL file and in the
Developer's Guide at https://www.wireshark.org/docs/wsdg_html_chunked/ Developer's Guide at https://www.wireshark.org/docs/wsdg_html_chunked/

View File

@ -16,7 +16,6 @@ The following must be installed in order to build Wireshark:
* a C compiler and a C++ compiler; * a C compiler and a C++ compiler;
* the Flex lexical analyzer; * the Flex lexical analyzer;
* Perl;
* Python 3; * Python 3;
* CMake; * CMake;
* several required libraries. * several required libraries.
@ -26,6 +25,8 @@ those must be installed.
To build the manual pages, Developer's Guide and User's Guide, Asciidoctor, Xsltproc, and DocBook must be installed. To build the manual pages, Developer's Guide and User's Guide, Asciidoctor, Xsltproc, and DocBook must be installed.
Perl is required to generate some code and run some code analysis checks.
Some features of Wireshark require additional libraries to be installed. Some features of Wireshark require additional libraries to be installed.
For Debian, and for Linux distributions based on Debian, such as Ubuntu, For Debian, and for Linux distributions based on Debian, such as Ubuntu,
@ -234,9 +235,9 @@ You can install Chocolatey packages using the command `choco install` (or its sh
---- ----
> rem Flex is required. > rem Flex is required.
> choco install -y winflexbison3 > choco install -y winflexbison3
> rem Git, CMake, Perl, Python, etc are also required, but can be installed > rem Git, CMake, Python, etc are also required, but can be installed
> rem via their respective installation packages. > rem via their respective installation packages.
> choco install -y git cmake strawberryperl python3 > choco install -y git cmake python3
---- ----
@ -333,22 +334,6 @@ Chocolatey will likely install Python in one of the locations above, or possibly
// winget has Python 3 packages. // winget has Python 3 packages.
// https://github.com/microsoft/winget-pkgs/tree/master/manifests/p/Python/Python/3 // https://github.com/microsoft/winget-pkgs/tree/master/manifests/p/Python/Python/3
==== Install Perl
Get a Perl installer from http://strawberryperl.com/ or
https://www.activestate.com/ and install Perl into the default location.
Alternatively you can install Perl using Chocolatey:
----
PS$> choco install -y strawberryperl
# ...or...
PS$> choco install -y activeperl
----
// winget has StrawberryPerl.
// https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/StrawberryPerl/StrawberryPerl
[#ChSetupGit] [#ChSetupGit]
==== Install Git ==== Install Git
@ -464,6 +449,25 @@ Chocolatey ensures win_flex.exe is on your path.
// winget has no bison package. // winget has no bison package.
==== Optional: Install Perl
If needed you can get a Perl installer from
http://strawberryperl.com/
or
https://www.activestate.com/
and install Perl into the default location.
Alternatively you can install Perl using Chocolatey:
----
PS$> choco install -y strawberryperl
# ...or...
PS$> choco install -y activeperl
----
// winget has StrawberryPerl.
// https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/StrawberryPerl/StrawberryPerl
==== Install and Prepare Sources ==== Install and Prepare Sources
[TIP] [TIP]

View File

@ -519,7 +519,7 @@ The Ruby and Java flavors can be used to build Wiresharks documentation, but
The guides and release notes were originally written in DocBook (hence the directory name). The guides and release notes were originally written in DocBook (hence the directory name).
They were later converted to AsciiDoc and then migrated to Asciidoctor. They were later converted to AsciiDoc and then migrated to Asciidoctor.
The man pages were originally in Perls POD (Plain Old Documentation) format and were later converted to Asciidoctor. The man pages were originally in Perls POD (Plain Old Documentation) format and were later converted to Asciidoctor.
We currently use Asciidoctors modern (>= 1.5.0) syntax. We use Asciidoctors modern (>= 1.5.0) syntax.
PDF output requires Asciidoctors PDF backend. PDF output requires Asciidoctors PDF backend.
It is included with AsciidoctorJ but _not_ with Asciidoctor. It is included with AsciidoctorJ but _not_ with Asciidoctor.
@ -698,95 +698,6 @@ Python 3.5.1
Your version string may vary of course. Your version string may vary of course.
[#ChToolsPerl]
=== Perl
Perl is an interpreted programming language. The
homepage of the Perl project is
https://www.perl.org[]. Perl is used to convert
various text files into usable source code. Perl version 5.6
and above should work fine.
[#ChToolsUnixPerl]
[discrete]
==== Unix
Perl is available for most UNIX and UNIX-like platforms. If perl isn't
already installed or available as a package for your platform, you can
get it at https://www.perl.org/[].
After correct installation, typing at the
bash command line prompt:
[source,sh]
----
$ perl --version
----
should result in something like:
----
This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi
(with 62 registered patches, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
----
However, the version string may vary.
[#ChToolsWindowsPerl]
[discrete]
==== Windows
A native Windows Perl package can be obtained from
http://strawberryperl.com/[Strawberry Perl] or
https://www.activestate.com[Active State]. The installation should be
straightforward.
You may also use Chocolatey to install either package:
----
PS:\> choco install strawberryperl
----
or
----
PS:\> choco install activeperl
----
After correct installation, typing at the command
line prompt (cmd.exe):
----
> perl -v
----
should result in something like:
----
This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2002, Larry Wall
Binary build 805 provided by ActiveState Corp. http://www.ActiveState.com
Built 18:08:02 Feb 4 2003
...
----
However, the version string may vary.
[#ChToolsFlex] [#ChToolsFlex]
=== Flex === Flex
@ -931,6 +842,93 @@ https://git-scm.com/downloads/guis[] for details.
// [[ChToolsUnixGitGUI]] // [[ChToolsUnixGitGUI]]
// XXX Add Gui client section // XXX Add Gui client section
[#ChToolsPerl]
=== Perl (Optional)
https://www.perl.org[Perl] is an interpreted programming language.
Perl is used to convert various text files into usable source code and for various source code checks.
Perl version 5.6 and above should work fine.
[#ChToolsUnixPerl]
[discrete]
==== Unix
Perl is available for most UNIX and UNIX-like platforms. If it isn't
already installed or available as a package for your platform, you can
get it at https://www.perl.org/[].
After correct installation, typing at the
bash command line prompt:
[source,sh]
----
$ perl --version
----
should result in something like:
----
This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi
(with 62 registered patches, see perl -V for more detail)
Copyright 1987-2017, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
----
However, the version string may vary.
[#ChToolsWindowsPerl]
[discrete]
==== Windows
A native Windows Perl package can be obtained from
http://strawberryperl.com/[Strawberry Perl] or
https://www.activestate.com[Active State]. The installation should be
straightforward.
You may also use Chocolatey to install either package:
----
PS:\> choco install strawberryperl
----
or
----
PS:\> choco install activeperl
----
After correct installation, typing at the command
line prompt (cmd.exe):
----
> perl -v
----
should result in something like:
----
This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2002, Larry Wall
Binary build 805 provided by ActiveState Corp. http://www.ActiveState.com
Built 18:08:02 Feb 4 2003
...
----
However, the version string may vary.
[#ChToolsPatch] [#ChToolsPatch]
=== patch (Optional) === patch (Optional)

View File

@ -52,7 +52,6 @@ BASIC_LIST="cmake \
glib-dev \ glib-dev \
libgcrypt-dev \ libgcrypt-dev \
flex \ flex \
perl \
tiff-dev \ tiff-dev \
c-ares-dev \ c-ares-dev \
pcre2-dev \ pcre2-dev \
@ -81,6 +80,7 @@ ADDITIONAL_LIST="
minizip-dev \ minizip-dev \
speexdsp-dev \ speexdsp-dev \
brotli-dev \ brotli-dev \
perl \
" "
# Uncomment to add PNG compression utilities used by compress-pngs: # Uncomment to add PNG compression utilities used by compress-pngs:

View File

@ -81,7 +81,6 @@ BASIC_LIST="base-devel \
minizip \ minizip \
ninja \ ninja \
pcre2 \ pcre2 \
perl \
python \ python \
qt5-base \ qt5-base \
qt5-multimedia \ qt5-multimedia \
@ -98,7 +97,8 @@ ADDITIONAL_LIST="asciidoctor \
docbook-xml \ docbook-xml \
docbook-xsl \ docbook-xsl \
doxygen \ doxygen \
libxslt" libxslt \
perl"
TESTDEPS_LIST="python-pytest \ TESTDEPS_LIST="python-pytest \
python-pytest-xdist" python-pytest-xdist"

View File

@ -72,7 +72,6 @@ BASIC_LIST="gcc \
flex \ flex \
make \ make \
python3 \ python3 \
perl \
libgcrypt-dev" libgcrypt-dev"
ADDITIONAL_LIST="libnl-3-dev \ ADDITIONAL_LIST="libnl-3-dev \
@ -91,6 +90,7 @@ ADDITIONAL_LIST="libnl-3-dev \
libminizip-dev \ libminizip-dev \
git \ git \
ninja-build \ ninja-build \
perl \
xsltproc \ xsltproc \
ccache \ ccache \
libspeexdsp-dev" libspeexdsp-dev"

View File

@ -72,7 +72,6 @@ BASIC_LIST="base-devel \
mingw-w64-x86_64-ninja \ mingw-w64-x86_64-ninja \
mingw-w64-x86_64-opus \ mingw-w64-x86_64-opus \
mingw-w64-x86_64-pcre2 \ mingw-w64-x86_64-pcre2 \
mingw-w64-x86_64-perl \
mingw-w64-x86_64-python \ mingw-w64-x86_64-python \
mingw-w64-x86_64-qt5-base \ mingw-w64-x86_64-qt5-base \
mingw-w64-x86_64-qt5-multimedia \ mingw-w64-x86_64-qt5-multimedia \
@ -88,6 +87,7 @@ BASIC_LIST="base-devel \
ADDITIONAL_LIST="mingw-w64-x86_64-asciidoctor \ ADDITIONAL_LIST="mingw-w64-x86_64-asciidoctor \
mingw-w64-x86_64-ccache \ mingw-w64-x86_64-ccache \
mingw-w64-x86_64-doxygen \ mingw-w64-x86_64-doxygen \
mingw-w64-x86_64-perl \
mingw-w64-x86_64-libxslt" mingw-w64-x86_64-libxslt"
TESTDEPS_LIST="mingw-w64-x86_64-python-pytest \ TESTDEPS_LIST="mingw-w64-x86_64-python-pytest \

View File

@ -55,7 +55,6 @@ BASIC_LIST="cmake \
gcc-c++ \ gcc-c++ \
flex \ flex \
python3 \ python3 \
perl \
desktop-file-utils \ desktop-file-utils \
git \ git \
glib2-devel \ glib2-devel \
@ -72,6 +71,7 @@ ADDITIONAL_LIST="libcap-devel \
minizip-devel \ minizip-devel \
lz4 \ lz4 \
libxml2-devel \ libxml2-devel \
perl \
spandsp-devel \ spandsp-devel \
systemd-devel" systemd-devel"