From owner-freebsd-multimedia@FreeBSD.ORG Fri Jul 15 19:13:48 2011 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67BAF106564A; Fri, 15 Jul 2011 19:13:48 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 22EBF8FC0A; Fri, 15 Jul 2011 19:13:47 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 18CB71E0022E; Fri, 15 Jul 2011 21:13:47 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id p6FJA3XB060666; Fri, 15 Jul 2011 21:10:03 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id p6FJA3Jj060665; Fri, 15 Jul 2011 21:10:03 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 15 Jul 2011 21:10:03 +0200 To: Alexander Leidinger Message-ID: <20110715191003.GA60074@triton8.kn-bremen.de> References: <20110714205415.GA3304@triton8.kn-bremen.de> <20110715123002.363272dtl9b48dka@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110715123002.363272dtl9b48dka@webmail.leidinger.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-multimedia@FreeBSD.org, itetcu@FreeBSD.org, Juergen Lock Subject: Re: Fixing skype multimedia/linux_v4l2wrapper dependency on 8 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2011 19:13:48 -0000 On Fri, Jul 15, 2011 at 12:30:02PM +0200, Alexander Leidinger wrote: > Quoting Juergen Lock (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