Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 May 1997 18:45:44 -0700 (PDT)
From:      asami@vader.cs.berkeley.edu (Satoshi Asami)
To:        james@nexis.net, chuckr@mat.net
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Suggested change to apache port
Message-ID:  <199705040145.SAA27203@vader.cs.berkeley.edu>
In-Reply-To: <199705040118.SAA27103@vader.cs.berkeley.edu> (asami@vader.cs.berkeley.edu)

next in thread | previous in thread | raw e-mail | index | archive | help
 *  * I guess what I need is something like this:
 *  * 
 *  * DEPENDS=	${PORTSDIR}/www/apache:patch
 *  * BUILD_DEPENDS=	perl5.003:${PORTSDIR}/lang/perl5:install
 * 
 * Hmm.  That's quite interesting, let me see if I can fix bsd.port.mk to
 * do it.  But (assuming those override DEPENDS_TARGET in the
 * environment), you need to lose the ":install" at the end of
 * BUILD_DEPENDS or the package build will have the same problem as
 * before.

It was simpler than I thought.  This patch only works for
fetch/build/run depends.  If this works ok, I'll duplicate it
elsewhere (lib-depends and depends have pretty much the same
structure) and commit it.

Note, the default target is still "install" (or whatever
DEPENDS_TARGET is), so you don't need to specify ":install".  That way 
we won't have to go change all the ports.

Satoshi
-------
Index: bsd.port.mk
===================================================================
RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v
retrieving revision 1.257
diff -u -r1.257 bsd.port.mk
--- bsd.port.mk	1997/04/30 03:12:05	1.257
+++ bsd.port.mk	1997/05/04 01:38:20
@@ -1415,7 +1415,13 @@
 .else
 	@for i in ${DEPENDS_TMP}; do \
 		prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \
-		dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \
+		dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \
+		if expr "$$dir" : '.*:' > /dev/null; then \
+			target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \
+			dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \
+		else \
+			target=${DEPENDS_TARGET}; \
+		fi; \
 		if expr "$$prog" : \\/ >/dev/null; then \
 			if [ -e "$$prog" ]; then \
 				${ECHO_MSG} "===>  ${PKGNAME} depends on file: $$prog - found"; \
@@ -1434,11 +1440,11 @@
 			fi; \
 		fi; \
 		if [ $$notfound != 0 ]; then \
-			${ECHO_MSG} "===>  Verifying ${DEPENDS_TARGET} for $$prog in $$dir"; \
+			${ECHO_MSG} "===>  Verifying $$target for $$prog in $$dir"; \
 			if [ ! -d "$$dir" ]; then \
 				${ECHO_MSG} ">> No directory for $$prog.  Skipping.."; \
 			else \
-				(cd $$dir; ${MAKE} ${.MAKEFLAGS} ${DEPENDS_TARGET}) ; \
+				(cd $$dir; ${MAKE} ${.MAKEFLAGS} $$target) ; \
 				${ECHO_MSG} "===>  Returning to build of ${PKGNAME}"; \
 			fi; \
 		fi; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705040145.SAA27203>