# Install version 6 of imagemagick to comply with Magick.xs
brew install imagemagick@6 --with-perl
# Create links so make can find C libraries.
# imagemagick@6 is keg-only and must be linked with --force
brew link imagemagick@6 --force
# Install the perl package, required -n (no test) for me
cpanm Image::Magick -n
# Verify installation
perl -MImage::Magick -E 'say Image::Magick->QuantumDepth'
16
brew install openssl
# Either pass install args
cpanm --configure-args="--libpath='/usr/local/opt/openssl/lib' --incpath='/usr/local/opt/openssl/include/'" Crypt::SSLeay
# Or use environment variables
C_INCLUDE_PATH="/usr/local/opt/openssl/include" cpanm Crypt::OpenSSL::VerifyX509
According to documentation requires GitHub version of Compiler::Lexer
since
the one on CPAN is buggy. Sadly the bundled version from Perl::LanguageServer
isn't working properly on macOS either so we need to build from GitHub
repository and remove the bundled verion to avoid re-building.
# Clone respository
git clone git@github.com:goccy/p5-Compiler-Lexer.git && cd p5-Compiler-Lexer
# Install manually
cpanm .
# Pull Perl::LanguageServer
wget https://cpan.metacpan.org/authors/id/G/GR/GRICHTER/Perl-LanguageServer-0.9.tar.gz
# Unpack
tar zxf Perl-LanguageServer-0.9.tar.gz && cd Perl-LanguageServer-0.9
# Remove the bundled Compiler::Lexer and install
rm -fr p5-Compiler-Lexer
cpanm .
Since macOS 10.14 brew won't link packages and libraries bundlede with macOS. This includes libxml2 and it's header files.
# Install libxml2
brew install libxml2
# Set correct config path and install XML::LibXML
PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" cpanm XML::LibXML