I was unable to compile (a port that depends on) gtk2mm, after having done a make index & readmes. Below is a patch that fixes the problem.
The build fails with "/usr/sbin/pkg_create: Exactly one single package name is
required". The problem
is an unquoted shell expansion of a dependency spec in bsd.port.mk --- if the
spec, interpreted
as a shell glob (which it isn't), matches some files in the port's directory,
then it gets expanded
into multiple words and pkg_create fails with an unexpected error message.
Looks like this bug has
been reported a few times before, e.g. Igor Zinovik's message of 2-May-2008.
The actual fix is the middle hunk of this patch (line 2728).
Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.951
diff -u -r1.951 bsd.port.mk
--- bsd.port.mk 29 Jul 2008 17:54:52 -0000 1.951
+++ bsd.port.mk 5 Jan 2009 01:12:48 -0000
@@ -2723,11 +2723,11 @@
${_flavor_fragment}; \
libspecs='';comma=''; \
if default=`eval $$toset ${MAKE} _print-packagename`; then \
- case "X$$pkg" in X) pkg=`echo
$$default|${_version2default}`;; \
+ case "X$$pkg" in X) pkg=`echo "$$default"
|${_version2default}`;; \
esac; \
- if ${_PKG_QUERY} $$pkg -q; then \
+ if ${_PKG_QUERY} "$$pkg" -q; then \
listlibs='echo ${DEPDIR}$$shdir/lib*'; \
- case $$dir in ${PKGPATH}) \
+ case "$$dir" in ${PKGPATH}) \
listlibs="$$toset ${MAKE}
print-plist-contents|${_grab_libs_from_plist}; $$listlibs";; \
esac; \
else \
--
Wim Lewis <[email protected]>, Seattle, WA, USA. PGP keyID 27F772C1
"We learn from history that we do not learn from history." -Hegel
pgpLu3NKqBVx6.pgp
Description: PGP signature
