From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Autodetect imagemagick on macOS + Homebrew Date: Sun, 28 Jan 2018 23:50:09 +0000 Message-ID: <20180128235009.GA95698@breton.holly.idiocy.org> References: <20180110213750.GA16679@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1517184072 8830 195.159.176.226 (29 Jan 2018 00:01:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Jan 2018 00:01:12 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) Cc: Emacs-Devel devel To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 29 01:01:07 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwsS-0000ov-5P for ged-emacs-devel@m.gmane.org; Mon, 29 Jan 2018 01:00:48 +0100 Original-Received: from localhost ([::1]:47847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwuT-0006BX-1z for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2018 19:02:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwiE-0004gH-LS for emacs-devel@gnu.org; Sun, 28 Jan 2018 18:50:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efwiD-0003rK-Nw for emacs-devel@gnu.org; Sun, 28 Jan 2018 18:50:14 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:55672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efwiD-0003qC-Fj for emacs-devel@gnu.org; Sun, 28 Jan 2018 18:50:13 -0500 Original-Received: by mail-wm0-x22c.google.com with SMTP id 143so10862404wma.5 for ; Sun, 28 Jan 2018 15:50:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=TsWwGIsFUaHZj22AG0dscNGaKzngHuK9BOqpe4/dipk=; b=CVRFXMIQrE4pUkw5p07jgrRqG5GJllMoYoAr9VrzYoQZE/INdSYvdNAiAU+eAC21vU d+AN7MLQ2u5z90ha59b2ohrZMbqv4K5ZTXkCZc7jZqV/SVll/Z7ryOnWUwLKTUVDrkER C76dyXS3uO6tu+To5ZZVCEQ0tSfn0YTmPhrv8SsLzZURwgn3japUcfjccXJvYBu7D9XY 2V1O5ueQ2VziieE4D3nbUnXLhnjpoUg81em3LWzHP6/RS2X+Ja8GNbGqmcZNsY5L88WL OWxcYpl/vj3JkSI7C1Vi+roPvUAe3Cae74wcQ2rdcGXSZjyhgObndsVgKK9dXiVJj7kw Pt+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=TsWwGIsFUaHZj22AG0dscNGaKzngHuK9BOqpe4/dipk=; b=BAVVCxri05HxhjEOKLa2Kys8IbHGh2gr+QoXDRYP8szN69qKSdPy8Rx947MQN0WZN5 QHPSrnUY/W/QHYrtUsMZdpJP9+ZDjWwE362Xl8q2giQmG2Nm8Q8ROHrM4Hdg1nLDVsI1 ZLRsdzfEO0ZBvlVT+mcWUOdw1VZP8rv4JFda+ERcFT5QfyqVT0WY2l6bVUdAOe8eNxyZ C4coYppSIn1AzmVitLKdpQh2mbH8MFdKJUtfg4xSlWOzYN9W7JrjDdbKcBxfswsWv77O b9VJTdpQkT2l7vghSqhNkUca64aCJsrZmAIpOGMmhzikasCdED2axTBu1RNnl4sL+0dx A2vA== X-Gm-Message-State: AKwxytdX7fXE3eEl8D7YDxClksDpXr9bmM8ceCF1OIZc+31IyW48e+Jg eHWcT9FRCgEYcrh0ThrBUhw= X-Google-Smtp-Source: AH8x227lHaenuxy/CC33gp3X8jay6l9Cso2UerzrpQxR7HNBx6XEHZ38ocDu4jGSGsusGngS1BjaSQ== X-Received: by 10.28.30.130 with SMTP id e124mr17133943wme.153.1517183412071; Sun, 28 Jan 2018 15:50:12 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c11a-0dde-7e09-1b0e.holly.idiocy.org. [2001:8b0:3f8:8129:c11a:dde:7e09:1b0e]) by smtp.gmail.com with ESMTPSA id j126sm12394836wmj.1.2018.01.28.15.50.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 15:50:11 -0800 (PST) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222282 Archived-At: On Sun, Jan 28, 2018 at 06:35:41PM +0000, Philipp Stephani wrote: > Alan Third schrieb am Mi., 10. Jan. 2018 um 22:38 Uhr: > > > When imagemagick 6 is installed on macOS using Homebrew it can be a > > bit of a faff to get Emacs built with it. The attached patch > > automatically adds it to PKG_CONFIG_PATH if Homebrew is detected. > > > > > I'm wondering whether these concatenations work if the packages aren't > installed. `brew --prefix texinfo 2>/dev/null`/bin results in /bin if > texinfo isn't installed, It doesn’t, actually. I’ve never installed tomcat on this laptop: breton:/Users/alan>brew --prefix tomcat /usr/local/Cellar/tomcat/8.5.27 Although it does return blank if the package doesn’t exist at all. (It sends an error message to stderr.) > Maybe it would be better to check the return value of brew and > append the path segments only if it has suceeded. Yes, it might be a good idea. -- Alan Third