tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

emacs25 + imagemagick



Hi,

Attached is a patch adding ImageMagick support to emacs25.

This allows emacs to be able to resize images (which it can't do
natively). This is especially useful for me in VM (view mail) with
HTML e-mails with "cid:" attachments, so that the images are displayed
with the current linewidth instead of their (possibly big) native
size.

I have been using this patch locally for a couple of weeks now, with
no apparent issue. The only sad thing is that this adds a dependency
on ImageMagick6 and not 7. Support for 7 is apparently ongoing for emacs26.

I'm not sure if the option should be "PKG_SUGGESTED" by default. Maybe
not :)

Cheers,
Anthony

Index: editors/emacs25/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/editors/emacs25/options.mk,v
retrieving revision 1.4
diff -u -r1.4 options.mk
--- editors/emacs25/options.mk	30 Mar 2018 18:28:32 -0000	1.4
+++ editors/emacs25/options.mk	8 Apr 2018 12:51:36 -0000
@@ -1,14 +1,14 @@
 # $NetBSD: options.mk,v 1.4 2018/03/30 18:28:32 chuck Exp $
 
 PKG_OPTIONS_VAR=			PKG_OPTIONS.emacs
-PKG_SUPPORTED_OPTIONS=			dbus xft2 svg xml gnutls
+PKG_SUPPORTED_OPTIONS=			dbus xft2 svg xml gnutls imagemagick
 PKG_OPTIONS_OPTIONAL_GROUPS+=		window-system
 PKG_OPTIONS_GROUP.window-system=	x11 nextstep
 PKG_OPTIONS_OPTIONAL_GROUPS+=		toolkit
 PKG_OPTIONS_GROUP.toolkit=		gtk2 gtk3 motif xaw
 PKG_SUGGESTED_OPTIONS.Darwin=		nextstep
 PKG_SUGGESTED_OPTIONS.*=		x11
-PKG_SUGGESTED_OPTIONS+=			dbus svg xft2 xml
+PKG_SUGGESTED_OPTIONS+=			dbus svg xft2 xml imagemagick
 
 .include "../../mk/bsd.options.mk"
 
@@ -90,6 +90,16 @@
 .include "../../x11/libXpm/buildlink3.mk"
 
 ###
+### Enable ImageMagick
+###
+.  if !empty(PKG_OPTIONS:Mimagemagick)
+USE_TOOLS+=		pkg-config
+.include "../../graphics/ImageMagick6/buildlink3.mk"
+.  else
+CONFIGURE_ARGS+=	--without-imagemagick
+.  endif
+
+###
 ### Enable font backend
 ###
 .  if !empty(PKG_OPTIONS:Mxft2)


Home | Main Index | Thread Index | Old Index