The lines
# Needed for programs like python-matlabengine which expect MATLAB to be in /usr/local
install -dm755 "$pkgdir/usr/local"
ln -s /$_matlabdir "$pkgdir/usr/local/MATLAB"
violate the Arch packaging guidelines (https://wiki.archlinux.org/title/Arch_package_guidelines#Package_etiquette) which says "Packages should never be installed to /usr/local/" and is in fact not needed (at least for python-matlabengine). That page https://github.com/mathworks/matlab-engine-for-python) says "When MATLAB is not installed in the default location, the bin/architecture directory within the MATLAB root directory must be added to the environment variable LD_LIBRARY_PATH"
Pinned Comments