From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.devel Subject: Re: Autodetect imagemagick on macOS + Homebrew Date: Mon, 15 Jan 2018 20:42:41 +0100 Message-ID: References: <20180110213750.GA16679@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1516045068 22198 195.159.176.226 (15 Jan 2018 19:37:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2018 19:37:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 15 20:37:44 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 1ebAZe-0005BJ-E8 for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2018 20:37:38 +0100 Original-Received: from localhost ([::1]:57712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebAbd-0000H0-SF for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2018 14:39:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebAYo-0006xR-WC for emacs-devel@gnu.org; Mon, 15 Jan 2018 14:36:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebAYk-0002tI-6u for emacs-devel@gnu.org; Mon, 15 Jan 2018 14:36:47 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:54082) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebAYk-0002pz-0K for emacs-devel@gnu.org; Mon, 15 Jan 2018 14:36:42 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id E4FC022645 for ; Mon, 15 Jan 2018 19:28:26 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1516044501; x=1516908502; bh=9KDB8e9pPv28p KfEqr2tYRXRLgup7+wRxP1QykVVemE=; b=fGBP67Flwco2YiF0759Y/K40SBMxF Pj+wOXB5H7V7BcHJ7j9a1CyxoQU7UPGhPr7UirYyv/JpgY07Gzc/2WGTOD4zyXge PvM3dtzh/Hn+48b9a+//cP5XNhPt7Cnvh6axnF6VxhLvOyi8XC+WJ0sDF+QlZG1Z 7d3fol5GEDrM1I= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VLRTFCoOxCVo for ; Mon, 15 Jan 2018 19:28:21 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 1AE3022624; Mon, 15 Jan 2018 19:28:20 +0000 (UTC) In-reply-to: <20180110213750.GA16679@breton.holly.idiocy.org> (message from Alan Third on Wed, 10 Jan 2018 21:37:50 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.35.109.145 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:221984 Archived-At: > Date: Wed, 10 Jan 2018 21:37:50 +0000 > From: Alan Third > > 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. > -- > Alan Third > > >From d5d4fdf1478acb87dc046ec367e4f8ad1e095e76 Mon Sep 17 00:00:00 2001 > From: Alan Third > Date: Tue, 9 Jan 2018 23:47:56 +0000 > Subject: [PATCH] Allow configure to find Homebrew installed imagemagick > > * configure.ac: Add the imagemagick pkgconfig dir to pkg-config's > search path. > --- > configure.ac | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/configure.ac b/configure.ac > index c574d7dd0d..32ade3e95c 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1269,10 +1269,10 @@ AC_DEFUN > > # Makeinfo on macOS is ancient, check whether there is a more recent > # version installed by Homebrew. > -AC_CHECK_PROG(HAVE_BREW, [brew], [yes]) > -if test -n "$HAVE_BREW"; then > +AC_CHECK_PROGS(BREW, [brew]) > +if test -n "$BREW"; then > AC_PATH_PROG([MAKEINFO], [makeinfo], [], > - [`brew --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH]) > + [`$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH]) > fi > > ## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. > @@ -2529,6 +2529,12 @@ AC_DEFUN > HAVE_IMAGEMAGICK=no > if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then > if test "${with_imagemagick}" != "no"; then > + if test -n "$BREW"; then > + # Homebrew doesn't link ImageMagick 6 by default, so make sure > + # pkgconfig can find it. > + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix imagemagick@6 2>/dev/null`/lib/pkgconfig" > + fi > + > ## 6.3.5 is the earliest version known to work; see Bug#17339. > ## 6.8.2 makes Emacs crash; see Bug#13867. > ## 7 and later have not been ported to; See Bug#25967. > -- > 2.14.3 Thanks for looking into this. When I tried "brew" last time, I remember running into a similar problem in this area. That said, isn't this a problem that should be fixed in the package manager? Why does "brew" not place ImageMagick's pkg-config file where they are usually stored?