serpentine port forces dependency on muine

Kevin Oberman oberman at es.net
Tue Aug 25 23:15:53 UTC 2009


> Date: Wed, 26 Aug 2009 01:50:01 +0300
> From: Peter Pentchev <roam at ringlet.net>
> 
> On Tue, Aug 25, 2009 at 11:06:18AM -0700, Kevin Oberman wrote:
> > I have been trying to remove all dependencies on the broken muine port
> > and discovered that an error in the serpentine port Makefile causes
> > serpentine to always depend on muine.
> > 
> > The Makefile uses the config option MUINE to indicate whether to build
> > the muine plugin, but the script then checks "WITH_MUINE" and always
> > build the muine plugin and creates a dependency on muine.
> > 
> > I have opened PR ports/138179.
> > 
> > I patched the Makefile with:
> > --- sysutils/serpentine/Makefile.orig	2009-08-25 10:45:24.000000000 -0700
> > +++ sysutils/serpentine/Makefile	2009-08-25 10:07:00.000000000 -0700
> > @@ -29,7 +29,7 @@
> >  
> >  .include <bsd.port.pre.mk>
> >  
> > -.if (defined(WITH_MUINE) || exists(${LOCALBASE}/bin/muine)) && ${ARCH}=="i386"
> > +.if (defined(MUINE) || exists(${LOCALBASE}/bin/muine)) && ${ARCH}=="i386"
> >  BUILD_DEPENDS+=	muine:${PORTSDIR}/audio/muine
> >  RUN_DEPENDS+=	muine:${PORTSDIR}/audio/muine
> >  PLIST_SUB+=	MUINE=""
> 
> Errrr...
> 
> I strongly doubt that this is the reason for your problems.
> 
> Actually, this is exactly how the Ports Collection's "options" framework
> is supposed to work: the OPTIONS variable lists just the names of
> the options, then bsd.port.mk prompts the user through a dialog
> (or just uses the options' default values) and sets either WITH_name
> or WITHOUT_name.  The port then checks for WITH_name or WITHOUT_name,
> just as it does in this case.  The option is named "MUINE", but
> the bsd.port.mk framework will set "WITH_MUINE" if the user wants it,
> or WITHOUT_MUINE if she doesn't (or building in batch mode, since
> the option defaults to Off).
> 
> So the Makefile check is actually correct.
> 
> I find it a little bit hard to believe that it is exactly this change
> to the Makefile that helped you get a serpentine build without muine.
> Could it be that, in the meantime, you had also removed the muine
> port itself?  The Makefile check will be satisfied if the MUINE option
> is enabled *or* if the "muine" executable is present in /usr/local/bin.
> This is most probably because the serpentine configure script looks for
> muine itself and uses it unconditionally if it finds it.
> 
> So... maybe you just had a /usr/local/bin/muine, and that made
> the serpentine port always build with it?  Because the Makefile check
> is actually correct as per the ports options framework :/

Ack. You are correct.

If muine found in /usr/local/bin/, it will be built with the plug-in,
regardless of which way the MUINE configure option is set because:
.if (defined(MUINE) || exists(${LOCALBASE}/bin/muine)) && ${ARCH}=="i386"

As a result, you can't deinstall muine as serpentine depends on it, but
you can't build serpentine without a dependency on muine until you
deinstall muine. I am confused as to the whole point of this structure.
If muine is installed, serpentine will be built with the plugin...end of
story. The configuration option does nothing. The only effect it has is
to force the installation of muine on the initial install muine is not
already installed.

I guess the right way is to change the statement to read:
.if defined(MUINE) && ${ARCH}=="i386"

Or, since muine looks to be dead, just rip out the muine stuff.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634
Key fingerprint:059B 2DDF 031C 9BA3 14A4  EADA 927D EBB3 987B 3751


More information about the freebsd-ports mailing list