From owner-freebsd-gnome@FreeBSD.ORG Tue Jun 29 17:36:54 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE57716A4CE; Tue, 29 Jun 2004 17:36:53 +0000 (GMT) Received: from miffy.openlook.org (openlook.org [211.236.182.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7563943D45; Tue, 29 Jun 2004 17:36:53 +0000 (GMT) (envelope-from perky@miffy.openlook.org) Received: by miffy.openlook.org (Postfix, from userid 1000) id B4152A9C8; Wed, 30 Jun 2004 02:36:52 +0900 (KST) Date: Wed, 30 Jun 2004 02:36:52 +0900 From: Hye-Shik Chang To: Oliver Eikemeier Message-ID: <20040629173652.GA87968@i18n.org> References: <20040629170416.GA87430@i18n.org> <4391E0B7-C9F0-11D8-9FE1-00039312D914@fillmore-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4391E0B7-C9F0-11D8-9FE1-00039312D914@fillmore-labs.com> X-Accept-Language: ko, en User-Agent: Mutt/1.5.6i cc: Bob Melson cc: gnome@freebsd.org cc: freebsd-ports@freebsd.org cc: Michael Nottebrock Subject: Re: A question about dependencies X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2004 17:36:54 -0000 On Tue, Jun 29, 2004 at 07:17:57PM +0200, Oliver Eikemeier wrote: > Hye-Shik Chang wrote: > > >On Tue, Jun 29, 2004 at 06:54:44PM +0200, Michael Nottebrock wrote: > >> > >>Perhaps. However, it would still be nice to be able to USE_PYTHON in > >>such a > >>slave port. Is there no way to add some shimmies to bsd.python.mk so a > >>buildtime only dependency becomes feasible? > >> > > > >Okay. Please review this patch whether it's enough to resolve the > >problem. > > > >Index: Mk/bsd.python.mk > >=================================================================== > >RCS file: /home/pcvs/ports/Mk/bsd.python.mk,v > >retrieving revision 1.50 > >diff -u -r1.50 bsd.python.mk > >--- Mk/bsd.python.mk 21 Jun 2004 01:33:52 -0000 1.50 > >+++ Mk/bsd.python.mk 29 Jun 2004 17:01:35 -0000 > >@@ -275,11 +275,17 @@ > > .endif > > > > # dependencies > >-PYTHON_NO_DEPENDS?= NO > >+PYTHON_NO_DEPENDS?= NO > >+PYTHON_NO_BUILD_DEPENDS?= NO > >+PYTHON_NO_RUN_DEPENDS?= NO > > > > .if ${PYTHON_NO_DEPENDS} == "NO" > >+.if ${PYTHON_NO_BUILD_DEPENDS} == "NO" > > BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} > >+.endif > >+.if ${PYTHON_NO_RUN_DEPENDS} == "NO" > > RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} > >+.endif > > .endif # ${PYTHON_NO_DEPENDS} == "NO" > > > > .if defined(USE_ZOPE) > > I would like something more uniform, like USE_PYTHON_BUILD, > USE_PYTHON_RUN checked with defined(). The above seems to be too > sensitive to bugs like PYTHON_NO_DEPENDS=no, and it is not obvious what > ..._NO_... = "NO" means, contrary to ..._NO_... = "yes". > Aah, Right. How about this, then?: Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.491 diff -u -r1.491 bsd.port.mk --- bsd.port.mk 10 Jun 2004 07:30:19 -0000 1.491 +++ bsd.port.mk 29 Jun 2004 17:34:53 -0000 @@ -297,6 +297,9 @@ # that file for more information on USE_PYTHON_* # and USE_PYDISTUTILS). # Default: not set. +# USE_PYTHON_BUILD - Says that the port uses Python in one or more of the +# extract, patch, build or install phases. +# USE_PYTHON_RUN - Says that the port uses Python for running. # USE_RUBY - Says that the port relies on the Ruby language. # Implies inclusion of bsd.ruby.mk. (Also see # that file for more information on USE_RUBY_*). @@ -1143,7 +1146,7 @@ .include "${PORTSDIR}/Mk/bsd.php.mk" .endif -.if defined(USE_PYTHON) +.if defined(USE_PYTHON) || defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN) .include "${PORTSDIR}/Mk/bsd.python.mk" .endif @@ -1531,7 +1534,7 @@ .include "${PORTSDIR}/Mk/bsd.sdl.mk" .endif -.if defined(USE_PYTHON) +.if defined(USE_PYTHON) || defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN) .include "${PORTSDIR}/Mk/bsd.python.mk" .endif Index: bsd.python.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.python.mk,v retrieving revision 1.50 diff -u -r1.50 bsd.python.mk --- bsd.python.mk 21 Jun 2004 01:33:52 -0000 1.50 +++ bsd.python.mk 29 Jun 2004 17:34:53 -0000 @@ -132,6 +132,19 @@ || ${ECHO_CMD} ${_PYTHON_PORTBRANCH} .endif # defined(PYTHON_VERSION) +.if !defined(USE_PYTHON) +.if defined(USE_PYTHON_BUILD) +USE_PYTHON= ${USE_PYTHON_BUILD} +.elif defined(USE_PYTHON_RUN) +USE_PYTHON= ${USE_PYTHON_RUN} +.else +USE_PYTHON= any +.endif # defined(USE_PYTHON_BUILD) +.else +USE_PYTHON_BUILD= yes +USE_PYTHON_RUN= yes +.endif # !defined(USE_PYTHON) + # Validate Python version whether it meets USE_PYTHON version restriction. _PYTHON_VERSION_CHECK!= ${ECHO_CMD} "${USE_PYTHON}" | \ ${SED} 's/^\([1-9]\.[0-9]\)$$/\1-\1/' @@ -278,8 +291,12 @@ PYTHON_NO_DEPENDS?= NO .if ${PYTHON_NO_DEPENDS} == "NO" +.if defined(USE_PYTHON_BUILD) BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} +.endif +.if defined(USE_PYTHON_RUN) RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} +.endif .endif # ${PYTHON_NO_DEPENDS} == "NO" .if defined(USE_ZOPE) Hye-Shik