From owner-freebsd-ports@FreeBSD.ORG Sat Sep 30 17:49:44 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6114516A494 for ; Sat, 30 Sep 2006 17:49:44 +0000 (UTC) (envelope-from thierry@pompo.net) Received: from graf.pompo.net (graf.pompo.net [81.56.186.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C94C43D90 for ; Sat, 30 Sep 2006 17:49:32 +0000 (GMT) (envelope-from thierry@pompo.net) Received: by graf.pompo.net (Postfix, from userid 1001) id 27F1D1144F; Sat, 30 Sep 2006 19:47:48 +0200 (CEST) Date: Sat, 30 Sep 2006 19:47:48 +0200 From: Thierry Thomas To: freebsd-ports@FreeBSD.org Message-ID: <20060930174748.GD19733@graf.pompo.net> Mail-Followup-To: freebsd-ports@FreeBSD.org References: <200609301709.k8UH9gWG034468@Laptop.mine.box> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200609301709.k8UH9gWG034468@Laptop.mine.box> User-Agent: Mutt/1.4.2.2i X-Operating-System: FreeBSD 6.1-STABLE i386 Organization: Kabbale Eros X-Face: (hRbQnK~Pt7$ct`!fupO(`y_WL4^-Iwn4@ly-.,[4xC4xc; y=\ipKMNm<1J>lv@PP~7Z<.t KjAnXLs: X-PGP: 0xC71405A2 Cc: Subject: Re: detect presence of threads support in sqlite3 port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2006 17:49:44 -0000 Le Sam 30 sep 06 à 19:09:42 +0200, Alexander Botero-Lowry écrivait : > This is the exact issue that sparked my interest in some kind of OPTIONS > dependency/checking mechanism in ports. One of my ports (audio/xmms2) requires > that sqlite3 be built threadsafe, and there is no way to detect this at runtime > so it would be possible to end up with a nastly corrupted medialib because of > this. > > So the idea would be to store the OPTIONS choices file in the pkgdb as +OPTIONS > or something, and then to be able to say NEED_OPTIONS=sqlite3:THREADS or > something like that. I don't know if someone has planned to add such a mechanism in options, but it's always possible to create a config file, where you can store what you need. E.g. see how PHP ports create the file etc/php.conf. > > sqlite supports pkg-config, so you could try something based upon > > > > pkg-config --libs sqlite3 | grep '\${PTHREAD_LIBS}' > This might not always work since sqlite3's thread safety is if I remember > correctly a test to see if threads are using their own contexts or using a > global one, and asserting if they try to use a global one. It doesn't > really requite pthreads and that is probably just there as a convenience. I did'nt know that, but that's how a configure script would solve the problem... -- Th. Thomas.