Created attachment 249487 [details] fix build On recent CURRENT, building port x11-wm/libwraster fails with error [...] gmake : invalid option -- D The attached patch fixes build.
The reported problem occurs while using ports-mgmt/portmaster
i think you ought to throw a ${WRK_ENV} in there between ${SETENVI} and ${MAKE_ENV}, for good measure, even though it doesn't seem strictly necessary in this case. am i wrong? i'm just going by CHANGES:20240229 https://cgit.freebsd.org/ports/tree/CHANGES?id=f4ec56fe7b087557686a786e13d07eaf0ee882df#n30
it looks like the portmaster port punted this problem *for now* in this commit: https://cgit.freebsd.org/ports/commit/?id=755d190db121778a25b45950c397163325d8e797 but please dont just close this PR as "overcome by events" i still think we ought to root out as many as we can from the ports tree of these unmitigated calls with a potentially filthy environment. please spare me the 'just use poodreeay' because while that is a valid stance for many there's nothing wrong with working toward a more perfect ports tree ALSO. dont shy away from the -D i like the SETENVI work done in Mk/Uses and it'd be nice if we continue to improve as many ports as we can using this improved practice. i will be filling about a dozen PRs with patches today, unless someone would please quick point me to an ongoing encompassing PR# or DR#. what can i say? i like lots of -D in my life. i cant get enough -D. -DTHIS, -DTHAT...and please don't tell me just to THIS=1 THAT=1; it only masks the problem of liabilities which we ought to be ever vigilant to address and correct in the most robust ways practical
(In reply to Chad Jacob Milios from comment #3) This port is one of the rare left-overs not working properly with a traditional "make". So, I followed your advice and changes the patch accoridngly, adding ${SETENVI} ${WRK_ENV} ... A simple ${SETENVI} ... does alos do the job. I will replace the patch immediately.
Created attachment 262662 [details] Fix traditional make in portstree This patch fixes a misbehaviour while performing a traditional "make -C /usr/ports/x11-em/libwraster which results in the error shown in the initial PR. The patch also contains a consideration of the former poster's comment.
Can someone check and commit, please?