From owner-freebsd-gecko@FreeBSD.ORG Mon Apr 4 13:43:47 2011 Return-Path: Delivered-To: gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3F8F1065670; Mon, 4 Apr 2011 13:43:47 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 29D928FC18; Mon, 4 Apr 2011 13:43:46 +0000 (UTC) Received: by fxm11 with SMTP id 11so5143861fxm.13 for ; Mon, 04 Apr 2011 06:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=iTLz2wdRXwmaQmHRLypfVedNpPC6Rnpml0JNq9OdC1A=; b=hQnCB9nObi5l8/P2Tm2W8slAsXAu71I9yx/xlN3Kqa9qiyPvQ9VZVQkZA+7RRCncVk WKaF+VokPnaw0g3UjUjKN4LLwN6JqLNgqU12QBdc0lHqWB1Wv9t7xDOwS3+/5BPTzP3/ 4TyU4glY6RIvQmlcO2MOwJU9M5f0ThSvxg0nA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=WY5TXu8H+CLxLAqslWpeU8AktD+Qx8bh7IyPgzXkOJ1XsqzMrpXO4o++Sc8XKSG1Wc HTQZznVYbIH8uXsh2qdDYLOAB+4jPPJRdnJTlw5mT0wmIB4oXIIENvElYGLdSWDvFzTP eDcV72RJW+JRrS/KERcdWrViRN8Y0JJrP2toY= Received: by 10.223.6.198 with SMTP id a6mr1469902faa.126.1301923032303; Mon, 04 Apr 2011 06:17:12 -0700 (PDT) Received: from localhost ([38.108.126.205]) by mx.google.com with ESMTPS id c21sm1719267fac.46.2011.04.04.06.17.08 (version=SSLv3 cipher=OTHER); Mon, 04 Apr 2011 06:17:11 -0700 (PDT) From: Pan Tsu To: Bernhard Froehlich References: <201103290607.p2T674ob067019@freefall.freebsd.org> Date: Mon, 04 Apr 2011 17:16:53 +0400 In-Reply-To: (Bernhard Froehlich's message of "Mon, 04 Apr 2011 13:29:18 +0200") Message-ID: <86y63q9mwq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: gecko@FreeBSD.org, Beat Gaetzi , Kalten Subject: Re: ports/155949: www/firefox: firefox 4, WITH_PGO, better Text against DISPLAY problem X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 13:43:47 -0000 Bernhard Froehlich writes: > I think the cleanest solution would be a check before starting build to > detect if X is available or not. (ideally configure or otherwise port > Makefile) [...] Does waiting for XOpenDisplay() to time out and abort the build suffice? %% Index: www/firefox/Makefile =================================================================== RCS file: /a/.cvsup/ports/www/firefox/Makefile,v retrieving revision 1.239 diff -u -p -r1.239 Makefile --- www/firefox/Makefile 24 Mar 2011 11:04:17 -0000 1.239 +++ www/firefox/Makefile 4 Apr 2011 13:05:54 -0000 @@ -88,7 +87,7 @@ ALL_TARGET= profiledbuild BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif -pre-extract: +pgo-check: .if defined(WITH_PGO) @${ECHO} "*****************************************************************" @${ECHO} "**************************** attention **************************" @@ -99,7 +98,9 @@ pre-extract: @${ECHO} "During the build a Firefox instance will start and run some test." @${ECHO} " Do not interrupt or close Firefox during this tests! " @${ECHO} "*****************************************************************" - @sleep 10 + @${PYTHON_CMD} -c 'from ctypes import CDLL; CDLL("libX11.so").\ + XOpenDisplay("${DISPLAY}")' & \ + if sleep 3 && kill $$!; then return 1; fi .endif post-extract:: @@ -122,7 +123,7 @@ s|/usr/X11R6|${LOCALBASE}|g' \ ${WRKSRC}/js/src/configure -pre-configure: +pre-configure: pgo-check (cd ${WRKSRC} && ${AUTOCONF}) (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) %%