From owner-freebsd-multimedia@FreeBSD.ORG Mon Jul 18 20:37:51 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 5EE321065674; Mon, 18 Jul 2011 20:37:51 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id E428A8FC22; Mon, 18 Jul 2011 20:37:50 +0000 (UTC) Received: from outgoing.leidinger.net (p4FC41971.dip.t-dialin.net [79.196.25.113]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id E36AE84401B; Mon, 18 Jul 2011 22:37:35 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.1.12]) by outgoing.leidinger.net (Postfix) with ESMTP id 3F4542771; Mon, 18 Jul 2011 22:37:33 +0200 (CEST) Date: Mon, 18 Jul 2011 22:37:34 +0200 From: Alexander Leidinger To: Juergen Lock Message-ID: <20110718223734.00003b64@unknown> In-Reply-To: <20110715191003.GA60074@triton8.kn-bremen.de> References: <20110714205415.GA3304@triton8.kn-bremen.de> <20110715123002.363272dtl9b48dka@webmail.leidinger.net> <20110715191003.GA60074@triton8.kn-bremen.de> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: E36AE84401B.AFCE5 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.4, required 6, autolearn=disabled, ALL_TRUSTED -1.00, J_CHICKENPOX_52 0.60) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1311626257.80209@zMSvfbn26RfGV5P2d2Dc8A X-EBL-Spam-Status: No Cc: freebsd-multimedia@FreeBSD.org, itetcu@FreeBSD.org 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: Mon, 18 Jul 2011 20:37:51 -0000 On Fri, 15 Jul 2011 21:10:03 +0200 Juergen Lock wrote: > 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... This was just a preparation for the next two observations, not something which needs to be corrected. > > > +.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?) It depends on what you want to achieve. IMO just wait for complains that it does not work. If nobody complains, it may be that it is not necessary to invest the time and energy to change this. As there are more places which depend upon linux-stuff being in memory, I would assume that most people which want to install skype already have it in memory at the time when the check is run. > > 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? Not really. :) Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137