  	@${DO_NADA}
  .endif
  .endif
+@@ -6004,10 +6140,6 @@
+ .if !defined(OPTIONS)
+ 	@${ECHO_MSG} "===> No options to configure"
+ .else
+-.if ${OPTIONSFILE} != ${OPTIONSFILE}
+-	@${ECHO_MSG} "===> Using wrong configuration file ${OPTIONSFILE}"
+-	@exit 1
+-.endif
+ .if ${UID} != 0 && !defined(INSTALL_AS_USER)
+ 	@optionsdir=${OPTIONSFILE}; optionsdir=$${optionsdir%/*}; \
+ 	${ECHO_MSG} "===>  Switching to root credentials to create $${optionsdir}"; \
+@@ -6035,7 +6167,7 @@
+ 		elif [ ! -z "$${withoutval}" ]; then \
+ 			val=off; \
+ 		else \
+-			val=$$3; \
++			val=$${defaultval}; \
+ 		fi; \
+ 		DEFOPTIONS="$${DEFOPTIONS} $$1 \"$$2\" $${val}"; \
+ 		shift 3; \
+@@ -6140,7 +6272,7 @@
+ 		elif [ ! -z "$${withoutval}" ]; then \
+ 			val=off; \
+ 		else \
+-			val="$$3 (default)"; \
++			val="$${defaultval} (default)"; \
+ 		fi; \
+ 		${ECHO_MSG} "     $$1=$${val} \"$$2\""; \
+ 		shift 3; \
+@@ -6333,7 +6465,7 @@
+ 		${ECHO_CMD} "@cwd ${DESKTOPDIR}" >> ${TMPPLIST}; \
+ 	fi; \
+ 	while [ $$# -gt 6 ]; do \
+-		filename="$$4.desktop"; \
++		filename="`${ECHO_CMD} "$$4" | ${TR} -cd [:alnum:]`.desktop"; \
+ 		pathname="${DESKTOPDIR}/$$filename"; \
+ 		categories="$$5"; \
+ 		if [ -z "$$categories" ]; then \

--- /usr/ports/Mk/bsd.port.mk.prepkgng	2011-01-14 00:14:59.962893785 +0100
+++ /usr/ports/Mk/bsd.port.mk	2011-01-18 14:56:07.129210350 +0100
@@ -2476,8 +2476,15 @@
 
 DESCR?=			${PKGDIR}/pkg-descr
 PLIST?=			${PKGDIR}/pkg-plist

 	@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
 		${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"; \
 		${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
@@ -5944,6 +6074,7 @@
 		fi; \
 		if [ -f ${PKGMESSAGE} ]; then \
 			${CP} ${PKGMESSAGE} ${PKG_DBDIR}/${PKGNAME}/+DISPLAY; \
+			${ECHO_CMD} "@display +DISPLAY" >> ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
 		fi; \
 		for dep in `${PKG_INFO} -qf ${PKGNAME} | ${AWK} '/^@pkgdep / {print $$2}' | ${SORT} -u`; do \
 			if [ -d ${PKG_DBDIR}/$$dep -a -z `${ECHO_CMD} $$dep | ${GREP} -E ${PKG_IGNORE_DEPENDS}` ]; then \
@@ -5964,6 +6095,11 @@
 		${RM} -f /tmp/${PKGNAME}-required-by; \
 	fi
 .else
