Instead of using find(1) in font/devpdf/Makefile.sub just use grep(1) following what upstream does (-maxdepth option can be problematic on some platforms). Should fix pkg/51332 reported by Hiroshi Hakoyama From Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/textproc/groff/Makefile,v retrieving revision 1.83 diff -u -p -r1.83 Makefile --- Makefile 9 Jul 2016 06:39:05 -0000 1.83 +++ Makefile 3 Aug 2016 10:09:02 -0000 @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.83 2016/07/09 06:39:05 wiz Exp $ DISTNAME= groff-1.22.3 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_GNU:=groff/} Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/textproc/groff/distinfo,v retrieving revision 1.24 diff -u -p -r1.24 distinfo --- distinfo 4 Nov 2015 01:59:29 -0000 1.24 +++ distinfo 3 Aug 2016 10:09:02 -0000 @@ -6,4 +6,5 @@ SHA512 (groff-1.22.3.tar.gz) = c526ab203 Size (groff-1.22.3.tar.gz) = 4188772 bytes SHA1 (patch-aa) = 3f5d2c29397377f673a863e0ea953eaac4088898 SHA1 (patch-ab) = 64ba9805a0798bfce543a258cd66347caa1bf860 +SHA1 (patch-font_devpdf_Makefile.sub) = 2d73140fe036cf48fe93eea3ad71a273c181e298 SHA1 (patch-src_libs_libgroff_tmpfile.cpp) = 3794a028dc7c569e5adea6b7b876c3ac085376ba Index: patches/patch-font_devpdf_Makefile.sub =================================================================== RCS file: patches/patch-font_devpdf_Makefile.sub diff -N patches/patch-font_devpdf_Makefile.sub --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-font_devpdf_Makefile.sub 3 Aug 2016 10:09:02 -0000 @@ -0,0 +1,19 @@ +$NetBSD$ + +Solaris find(1) doesn't have -maxdepth. Adapt new logic from upstream that +avoid to use find for that (this will not needed for future groff version). +pkg/51332 + +--- font/devpdf/Makefile.sub.orig 2014-11-04 08:38:35.427521472 +0000 ++++ font/devpdf/Makefile.sub +@@ -21,9 +21,7 @@ + # along with this program. If not, see . + + DEV=pdf +-GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \ +- && find * -maxdepth 0 -type f ! -name 'Makefile.sub*' \ +- -exec grep -l internalname {} \;` ++GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf && grep -l internalname * | grep -v Makefile.sub` + ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*` + MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*` +