Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.699 diff -u -r1.699 bsd.port.mk --- bsd.port.mk 9 Nov 2011 08:53:12 -0000 1.699 +++ bsd.port.mk 9 Jan 2012 18:04:43 -0000 @@ -1202,7 +1202,7 @@ .if ${MASTERDIR} != ${.CURDIR} SLAVE_PORT?= yes -MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} +MASTER_PORT?=${MASTERDIR:C,[^/]+/\.\./,,:C,[^/]+/\.\./,,:C,^.*/([^/]+/[^/]+)/?$,\\1,} .else SLAVE_PORT?= no MASTER_PORT?=