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: Autodetect imagemagick on macOS + Homebrew Date: Wed, 10 Jan 2018 21:37:50 +0000 Message-ID: <20180110213750.GA16679@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" X-Trace: blaine.gmane.org 1515620210 14564 195.159.176.226 (10 Jan 2018 21:36:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 21:36:50 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 10 22:36:45 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 1eZO37-0003AG-BM for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 22:36:41 +0100 Original-Received: from localhost ([::1]:42190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZO55-0000QU-9k for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 16:38:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZO4N-0000Pf-Kv for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:38:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZO4L-0002SM-6T for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:37:59 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37919) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZO4K-0002Rx-SU for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:37:57 -0500 Original-Received: by mail-wm0-x22e.google.com with SMTP id 141so1635268wme.3 for ; Wed, 10 Jan 2018 13:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=rbahgiirHDxuKzxTeAxhNWm63/Gb5UdGbKTIh6Qfhmw=; b=LLYk3jfcv8lwRUW+N/rdyKR68jQXh4vub6MlahKqztMdeNP80b3DS6b9z0I3qQgvap KpDT8nFtfxKCR2Uc9qDzaYGP6fYkPseIXogK8KYg6OJyrNscKVqEWHLl9Cf8Pu9VD+/l ZUo4O2shkd+BVAooSWp6TIOXxMPUfPg6rP25oeiNqMSCL+NzIyB9nOX157TgPRXzpYkg GUErWamslLbeo1eFiIrmQcqXZwPROYs+hka3EFC4E3Njz9gKGeXx8vMdHJNBWFYuGqYp U24m9QsC1p+5avC1R3NxBXMcoQPhIgRqBX2PvbkF1blrIf5+zGhiEN2P9OO3rOQbIYBm sWjw== 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:subject:message-id :mime-version:content-disposition:user-agent; bh=rbahgiirHDxuKzxTeAxhNWm63/Gb5UdGbKTIh6Qfhmw=; b=s372OMXkS0hzTB8S87bnGxj6vk/S1xS9QzyOQfUd0rs8TOrIRsX1+TdkfY0fFkUAi+ xl1SQ9Jc7G87WozLuEoKADuCjtTswDvFz+9l7gTgcLMBOX1stCFirWvXvQG/RFByMi1c ePYwYo1C3aO7D4+lp0inJ6pnp8390Nme/rM3GYOw+uT6ZZu8KUjxDG/ks7lSPhw5VoaQ 8UMWoj8drb7WGDNPGxxS9RTHM1mlibVq0+j6AX2iFmmIfPuJQvDyPVWSjxHL1lsdm982 rCKPHj4wo3H6AbqdAbdS6PCE8fXVEvTUCGF3QoiDUQVKwUDOqbUlpgfWfAo5wK5A9Vzj KWFQ== X-Gm-Message-State: AKwxytcG9yC4bVOVwZH6R6Cwa+Xsl4Qo3bGPPd8uR/G/PVsxoa7lt56Z vx2ylyJ8/gyLUpeVciCknRYK2AjP X-Google-Smtp-Source: ACJfBovA5GHJJHjvAu7gRyxUjD0y/KeE5xWqkwzekXUnqa+8iEuMH47y+aY4WHnn0cHkla6sp/x/UQ== X-Received: by 10.28.174.20 with SMTP id x20mr556201wme.87.1515620275437; Wed, 10 Jan 2018 13:37:55 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-0c9f-d078-0073-e913.holly.idiocy.org. [2001:8b0:3f8:8129:c9f:d078:73:e913]) by smtp.gmail.com with ESMTPSA id z71sm7753059wrc.11.2018.01.10.13.37.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 13:37:49 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e 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:221814 Archived-At: --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Allow-configure-to-find-Homebrew-installed-imagemagi.patch" >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 --Qxx1br4bt0+wmkIi--