Fixing skype multimedia/linux_v4l2wrapper dependency on 8

Juergen Lock nox at jelal.kn-bremen.de
Fri Jul 15 19:13:48 UTC 2011


On Fri, Jul 15, 2011 at 12:30:02PM +0200, Alexander Leidinger wrote:
> Quoting Juergen Lock <nox at jelal.kn-bremen.de> (from Thu, 14 Jul 2011  
> 22:54:15 +0200):
> 
> >  Installing the skype ports with VIDEO knob on currently fails on
> > up-to-date stable/8 because the multimedia/linux_v4l2wrapper port
> > now detects it is not needed anymore (my patch has been committed
> > to stable a while ago.)  So I now made a patch that extracts the
> > check whether the code is in the kernel into a seperate Makefile.sub
> > that Linux ports that need V4L2 can include, and changed the skype
> > ports to do just that.  Does this look good and ok to commit?
> 
> 
> > Index: multimedia/linux_v4l2wrapper-kmod/Makefile.sub
> > @@ -0,0 +1,12 @@
> > +# $FreeBSD$
> > +
> > +# try to avoid child processes when finding out if already in the kernel
> > +.if ${OSVERSION} > 900036 || (${OSVERSION} < 900000 && ${OSVERSION}  
> > > 802508)
> > +LINUX_V4L2_INBASE=	1
> 
> Here you say that it can be used, even if it is not compiled in and  
> not loaded.
> 
Yeah in these cases it would be part of the Linuxolator without
which Linux apps that this is for won't run anyway...

> > +.else
> > +.if ${OSVERSION} == 900036 || ${OSVERSION} == 802508
> > +LINUX_V4L2_INBASE!=	($(SYSCTL) -n kern.features.linuxulator_v4l2  
> > 2>/dev/null || true)
> 
> Here you say it can only be used *if it is loaded or compiled in*.
> 
 Yeah it is a crude check which will fail if linux.ko isn't loaded
(or statically compiled in.)  I only added this because you didn't
bump __FreeBSD_version so these OSVERSIONs can either have it or
not.  But since it's the best I could come up in with this situation
and the only harm done would be the linux_v4l2wrapper.ko would get
installed when it is not needed I think it's justified.  (The kld
probably could even be loaded when the code is in the kernel already
and skype would still work...  Hmm or should we just depend on that
and on these OSVERSIONs install the kld unconditionally?)

> The correct name for the variable here would be LINUX_V4L2_INMEMORY.
> 
> If it is intended to have a variable which denotes both cases, I would  
> use a different name, maybe ..._OK or ..._AVAILABLE or something  
> similar.
> 
 Alright I'll change it to LINUX_V4L2_AVAILABLE.

> > +.else
> > +LINUX_V4L2_INBASE=	0
> > +.endif
> > +.endif
> 
 Any other comments?

 Thanx, :)
	Juergen


More information about the freebsd-multimedia mailing list