Created attachment 216852 [details] svn diff If the NLS option is unset, the pkg install throws errors like: pkg-static: Unable to access file /usr/ports/mail/phpmailer6/work/stage/usr/local/share/phpmailer/language/phpmailer.lang-af.php:No such file or directory for all the language files. The attached patch fixes the pkg-plist, making the install of language files conditional on the NLS option.
%%NLS%% cannot work because it is not defined in the Makefile. I can install it without problems with "pkg install". if you think it is an mistake, open the pr again.
Reopening this, as it's bitten us again in our poudriere bulk builds. As per https://docs.freebsd.org/en/books/porters-handbook/plist/#plist-sub: For instance, if there are files that are only installed when the X11 option is enabled, and Makefile has: OPTIONS_DEFINE= X11 OPTIONS_SUB= yes In pkg-plist, put %%X11%% in front of the lines only being installed when the option is enabled, like this : %%X11%%bin/foo-gui So my patch with %%NLS%% (as it's defined as option in the Makefile) in front of the language files in the pkg-plist is valid. I'll attach a new patch...
Created attachment 253903 [details] git diff With this patch phpmailer6 packages and installs right with "NLS=off"
^Triage: to maintainer: is there anything blocking this patch from being committed?
This issue is still present today after latest version update. Actually I think the patch should be a bit different, adding %%NLS%% before %%DATADIR%%.
Created attachment 265322 [details] Fix handling NLS option in pkg-plist
(In reply to Jochen Neumeister from comment #1) Please try to build the port in clean environment and select option NLS off. Packages are created with all options default values, thus 'pkg install' is not sufficient test in my eyes... Also, exactly the same patch should be used for mail/phpmailer7 port as it is bitten by the exactly same issue.
I recommend using Composer to install any PHP libraries. Unlike with the ports tree, it is designed for that, you'll always get the latest version and bugs in ports won't bug you.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f7916b861b54af7425b1159104cadc36bf7592eb commit f7916b861b54af7425b1159104cadc36bf7592eb Author: Jochen Neumeister <joneum@FreeBSD.org> AuthorDate: 2026-01-06 18:52:09 +0000 Commit: Jochen Neumeister <joneum@FreeBSD.org> CommitDate: 2026-01-06 18:52:09 +0000 mail/phpmailer[6|7]: fix pkg-plist for NLS option All %%DATADIR%% entries were changed to %%NLS%%%%DATADIR%%. Previously, disabling NLS caused missing language files listed in pkg-plist and resulted in check-plist failures. The port now works correctly with both enabled and disabled NLS. PR: 248341 Sponsored by: Netzkommune GmbH mail/phpmailer6/pkg-plist | 114 +++++++++++++++++++++---------------------- mail/phpmailer7/pkg-plist | 122 +++++++++++++++++++++++----------------------- 2 files changed, 118 insertions(+), 118 deletions(-)