trouble with poudriere and custom makefile

dear all,
i wanted to learn how to use poudriere in order to compile python with a specific argument, in order to use some plugin in qgis (there is a thread somewhere about it that i started).
i wanted to start slow and was trying my skill, er, luck with nnn, compiling it with the MAKE_ARG 0_NERD=1 to get the nerd font icons showing (yes i know it's puny but well, i had an afternoon to lose as it was 42°C outside (i live in central france)).
i followed a few tutorials, read the handbook, searched the web and finally tried the following thing:
a make.conf with:
Code:
.if ${.CURDIR:M*/misc/nnn}
EXTRA_PATCHES+= /distfiles/local-patches/poudriere151/nnn.patch
.endif
and then in /usr/ports/distfiles/local-patches/poudriere151/nnn.patch the following:
Code:
MAKE_ARGS= O_NERD=1
then i ran a poudriere bulk command and if failed every time telling me it couldn't find my patch...

what would be the proper poudriere bulk command? i do have a pkglist file but i'm unsure about the -z option...
is my patch correct?

eventually i ended up modifying the port makefile and building it like that, then installing with a simple pkg install <link to nnn-xxx.pkg> to see if at least that worked, and it did.
however, i'd like to do it the proper way, obviously.
thanks!
yrs trly,
a-

ps; i ran 15.1-release and the poudriere jail is built with same.
 
A port's patch files live in the files directory within that port directory.
 
A port's patch files live in the files directory within that port directory.
thank you for your answer. sorry for the delay, i was in the field trying to take care of the burning forest in france, shitshow :(

i read this tutorial https://www.freebsdsoftware.org/blog/poudriere-freebsd-setup.html which suggest to put all in the poudriere.d, also i read the man pages.
if i put the patch file or modify directly the makefile, i'll end up in trouble next git pull of the ports, won't i?

i tried to use the same procedure with obsidian and it did not succeed after 6h of compilation :( (node, rust and electron (gahhhh the horror!!) failed)
 
Right, on second look this might work. But the thing that causes it to fail, your nnn.patch isn't a patch file. A patch file is a diff(1) that's applied to a specific file within the extracted source distribution (before the actual build is started). There's also a specific naming convention to use.


(Also, make makepatch is useful)

This might work, save as patch-Makefile
Code:
--- Makefile.orig       2026-07-24 17:26:38 UTC
+++ Makefile
@@ -19,7 +19,7 @@ O_ICONS := 0  # support icons-in-terminal
 O_NOBATCH := 0  # no built-in batch renamer
 O_NOFIFO := 0  # no FIFO previewer support
 O_ICONS := 0  # support icons-in-terminal
-O_NERD := 0  # support icons-nerdfont
+O_NERD := 1  # support icons-nerdfont
 O_EMOJI := 0  # support emoji
 O_QSORT := 0  # use Alexey Tourbin's QSORT implementation
 O_BENCH := 0  # benchmark mode (stops at first user input)

if i put the patch file or modify directly the makefile, i'll end up in trouble next git pull of the ports, won't i?
Yes. But use git(1). Make a development branch and commit your changes in there.
 
Back
Top