Index: Mk/Scripts/do-patch.sh =================================================================== --- Mk/Scripts/do-patch.sh +++ Mk/Scripts/do-patch.sh @@ -107,9 +107,14 @@ if [ -n "${dp_EXTRA_PATCHES}" ]; then for i in ${dp_EXTRA_PATCHES}; do - apply_one_patch "${i}" \ - "Applying extra patch" \ - ${dp_PATCH_ARGS} + if [ -d "${i}" ]; then + patch_from_directory "${i}" \ + "extra patch" + else + apply_one_patch "${i}" \ + "Applying extra patch" \ + ${dp_PATCH_ARGS} + fi done fi Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -746,7 +746,9 @@ # ${WRKDIR}, then point EXTRA_PATCHES to them. # The patches specified by this variable will be # applied after the normal distribution patches but -# before those in ${PATCHDIR}. +# before those in ${PATCHDIR}. This can also contain +# directories, all the files named patch-* in those directories +# will be applied. # EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches # Points to a directory hierarchy with the same layout # as the ports tree, where local patches can be found.