Index: devel/ncurses/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncurses/Makefile.common,v
retrieving revision 1.34
diff -u -r1.34 Makefile.common
--- devel/ncurses/Makefile.common	19 Jan 2017 18:52:07 -0000	1.34
+++ devel/ncurses/Makefile.common	7 Jul 2017 15:09:51 -0000
@@ -33,7 +33,7 @@
 SUBST_CLASSES+=		rpath
 SUBST_FILES.rpath+=	misc/ncurses-config
 SUBST_STAGE.rpath=	post-configure
-SUBST_SED.rpath+=	-e "s|-L\\(.libdir\\)|${COMPILER_RPATH_FLAG}\\1 -L\\1|"
+SUBST_SED.rpath+=	-e "s|=-L\\(.libdir\\)|=\"${COMPILER_RPATH_FLAG}\\1 -L\\1\"|"
 SUBST_MESSAGE.rpath=	Fixing rpath in ncurses-config.
 
 .include "../../mk/bsd.prefs.mk"
