Created attachment 228493 [details] Patch to upgrade from 2.4.2 to 2.5.0
Hello, 'portlint -C' gives this warning: --- WARN: Makefile: [15]: possible direct use of command "automake" found. Use ${AUTOMAKE} instead and set USES=autoreconf and GNU_CONFIGURE=yes WARN: Makefile: [12]: possible direct use of command "autoconf" found. Use ${AUTOCONF} instead and set USES=autoreconf and GNU_CONFIGURE=yes WARN: Makefile: [14]: possible direct use of command "autoconf" found. Use ${AUTOCONF} instead and set USES=autoreconf and GNU_CONFIGURE=yes 0 fatal errors and 3 warnings found. --- Porter's Handbook says: --- 17.4. autoreconf Possible arguments: (none), build Runs autoreconf. It encapsulates the aclocal, autoconf, autoheader, automake, autopoint, and libtoolize commands. Each command applies to ${AUTORECONF_WRKSRC}/configure.ac or its old name, ${AUTORECONF_WRKSRC}/configure.in. If configure.ac defines subdirectories with their own configure.ac using AC_CONFIG_SUBDIRS, autoreconf will recursively update those as well. The :build argument only adds build time dependencies on those tools but does not run autoreconf. A port can set AUTORECONF_WRKSRC if WRKSRC does not contain the path to configure.ac. --- I think that this way we can remove build dependencies: --- BUILD_DEPENDS= autoconf-archive>0:devel/autoconf-archive \ autoconf>0:devel/autoconf \ automake>0:devel/automake \ --- since they are implicit in USES:autoreconf?
(In reply to Nuno Teixeira from comment #1) Hi Nuno, let me run the linter against the package and check this out. I guess I'll provide another patch.
Created attachment 228502 [details] Patch to upgrade from 2.4.2 to 2.5.0 rev 2 2nd version, trying to partially address the linter warning issues (see comments for an explanation).
IMO the linter warnings are not relevant in this case: "possible direct use of command" is wrongly raised because it detects the command names in BUILD_DEPENDS variable, which happen to be the package names as well. Unfortunately, adding autoreconf to USES doesn't solve the problem entirely, as autoreconf does not include "autoconf-archive"; that last dependency must remain in order for the project to build (during bootstrap phase of the build, macros from autoconf-archives are deployed into the project). I have nevertheless added autoreconf to uses, this simplifies a bit the BUILD_DEPENDS variable. But one (false positive) warning remains with the linter.
Good so far. Just some minor changes that I think they make sense: 1. use "autoreconf:build" instead of "autoreconf" to tell ports that it is only needed in build phase 2. alphabetical order in USES: --- +USES= autoreconf:build bison compiler:c11 libtool:build pkgconfig ssl -USES= bison compiler:c11 libtool:build pkgconfig ssl autoreconf:build --- 3. move INSTALL_TARGET to Make block: --- # Configure block GNU_CONFIGURE # Make block MAKE_ENV +INSTALL_TARGET # CFLAGS/CXXFLAGS/LDFLAGS block LDFLAGS -INSTALL_TARGET ---
4. remove ".include <bsd.port.options.mk>" from port Makefile. IMO its rare to use in recent ports.
Created attachment 228511 [details] small fixes sample diff I've tested this sample diff and builds are ok, please take a look at test results: https://people.freebsd.org/~eduardo/logs/pkcs11-tools-2.5.0/
Hi Nuno, Results looks good. (I also tried on my own poudriere ;-) It's all clear from my perspective.
Hi, I will need maintainer approval on a patch so I can commit or if you like to change anything more, please submit a new one. Cheers
I suppose I am the maintainer? If so, I approve the patch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c4e05fc73c157dd7ab54126189b92f509da87b34 commit c4e05fc73c157dd7ab54126189b92f509da87b34 Author: Eric Devolder <eric.devolder@gmail.com> AuthorDate: 2021-10-09 03:07:00 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2021-10-09 03:18:36 +0000 security/pkcs11-tools: update to 2.5.0 - Use USES=autoreconf:build instead of BUILD_DEPENDS autoconf and automake. - Remove ".include <bsd.port.options.mk>" from Makefile - Reorder some variables and put it in correct blocks ChangeLog: https://github.com/Mastercard/pkcs11-tools/blob/v2.5.0/CHANGELOG.md PR: 258979 security/pkcs11-tools/Makefile | 16 ++++++---------- security/pkcs11-tools/distinfo | 14 +++++++------- 2 files changed, 13 insertions(+), 17 deletions(-)
Committed thanks!