1994-08-21 13:19:28 +00:00
|
|
|
# New ports collection makefile for: GNU emacs
|
2004-03-21 07:39:49 +00:00
|
|
|
# Date created: 11 October 2001
|
|
|
|
# Whom: MANTANI Nobutaka <nobutaka@nobutaka.com>
|
1994-08-21 13:19:28 +00:00
|
|
|
#
|
1999-08-25 05:57:29 +00:00
|
|
|
# $FreeBSD$
|
1994-08-21 13:19:28 +00:00
|
|
|
#
|
|
|
|
|
2000-04-14 00:25:54 +00:00
|
|
|
PORTNAME= emacs
|
2007-07-16 17:06:44 +00:00
|
|
|
PORTVERSION= ${EMACS_VER}
|
2011-09-08 06:20:32 +00:00
|
|
|
PORTREVISION= 5
|
2010-05-21 19:51:04 +00:00
|
|
|
PORTEPOCH= 2
|
2004-03-21 07:39:49 +00:00
|
|
|
CATEGORIES= editors ipv6
|
2007-07-16 17:06:44 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU}
|
2004-03-21 07:39:49 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2011-08-27 22:19:55 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}a
|
1995-04-09 06:11:17 +00:00
|
|
|
|
2010-06-11 13:37:41 +00:00
|
|
|
MAINTAINER= ashish@FreeBSD.org
|
2003-02-20 17:12:51 +00:00
|
|
|
COMMENT= GNU editing macros
|
1997-07-17 10:38:15 +00:00
|
|
|
|
2011-09-07 20:20:25 +00:00
|
|
|
LICENSE= GPLv3
|
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
|
2009-12-20 20:19:24 +00:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-24.* \
|
2007-07-16 17:06:44 +00:00
|
|
|
xemacs-[0-9]* xemacs-devel-[0-9]* \
|
2010-09-27 01:14:52 +00:00
|
|
|
xemacs-mule-[0-9]* xemacs-devel-mule-[0-9]* \
|
|
|
|
emacs-nox11-[0-9]*
|
1994-08-21 13:19:28 +00:00
|
|
|
|
2011-05-11 11:15:48 +00:00
|
|
|
EMACS_VER= 23.3
|
2007-07-16 17:06:44 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2004-03-21 07:39:49 +00:00
|
|
|
USE_GMAKE= yes
|
2009-12-20 20:19:24 +00:00
|
|
|
USE_BZIP2= yes
|
2011-09-23 22:26:39 +00:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2010-09-27 01:14:52 +00:00
|
|
|
CONFIGURE_ARGS= --localstatedir=/var
|
2011-08-27 22:19:55 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2007-07-16 17:06:44 +00:00
|
|
|
|
2009-12-20 20:19:24 +00:00
|
|
|
MAN1= b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \
|
|
|
|
grep-changelog.1 rcs-checkin.1
|
2010-09-27 01:14:52 +00:00
|
|
|
PLIST_SUB= EMACS_VER=${EMACS_VER}
|
|
|
|
|
2011-05-11 11:15:48 +00:00
|
|
|
EMACS_DIRS= ${DATADIR}/${EMACS_VER}/leim ${DATADIR}/${EMACS_VER}/lisp ${DATADIR}/${EMACS_VER}/src \
|
|
|
|
${PREFIX}/libexec/${PORTNAME}
|
2007-07-16 17:06:44 +00:00
|
|
|
|
|
|
|
MAKE_ENV= LC_ALL=C
|
|
|
|
|
2009-12-20 20:19:24 +00:00
|
|
|
INFO= ada-mode auth autotype calc ccmode cl dbus dired-x \
|
2010-05-14 08:04:39 +00:00
|
|
|
ebrowse ede ediff edt efaq eieio eintr elisp emacs-mime emacs epa \
|
2009-12-20 20:19:24 +00:00
|
|
|
erc eshell eudc flymake forms gnus idlwave info \
|
|
|
|
mairix-el message mh-e newsticker nxml-mode \
|
2010-05-14 08:04:39 +00:00
|
|
|
org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve \
|
2009-12-20 20:19:24 +00:00
|
|
|
smtpmail speedbar tramp url vip viper widget woman
|
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
OPTIONS= CANNA "Canna support" OFF \
|
|
|
|
DBUS "DBus support" ON \
|
2010-05-14 08:04:39 +00:00
|
|
|
GCONF "GConf support" ON \
|
2010-09-27 01:14:52 +00:00
|
|
|
GIF "GIF images support" ON \
|
2010-09-30 04:38:00 +00:00
|
|
|
GTK2 "Use GTK+ widgets" ON \
|
2010-09-27 01:14:52 +00:00
|
|
|
JPEG "JPEG images support" ON \
|
2010-05-14 08:04:39 +00:00
|
|
|
M17N "M17N support for text-shaping" ON \
|
2010-09-27 01:14:52 +00:00
|
|
|
MOTIF "Use Motif widgets" OFF \
|
|
|
|
OTF "Opentype fonts support" ON \
|
|
|
|
PNG "PNG images support" ON \
|
2010-05-14 08:04:39 +00:00
|
|
|
SOUND "Sound support" ON \
|
|
|
|
SOURCES "Install source code" ON \
|
2010-09-27 01:14:52 +00:00
|
|
|
SVG "SVG images support" ON \
|
|
|
|
TIFF "TIFF images support" ON \
|
|
|
|
XAW "Use Athena widgets" OFF \
|
|
|
|
XAW3D "Use Athena3D widgets" OFF \
|
2010-05-14 08:04:39 +00:00
|
|
|
SYNC_INPUT "Synchronously process asynchronous input" ON \
|
|
|
|
SCROLLBARS "Without toolkit scroll-bars" ON \
|
2010-09-27 01:14:52 +00:00
|
|
|
XFT "Freetype fonts support" ON \
|
|
|
|
XIM "X Input Method support" ON \
|
|
|
|
XPM "XPM images support" ON
|
2010-05-14 08:04:39 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2004-03-21 07:39:49 +00:00
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
DBUS_PTHREAD_LIBS= ${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
|
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
CONFIGURE_ARGS+= --without-x
|
2010-09-27 01:14:52 +00:00
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.else
|
|
|
|
USE_XORG= x11
|
|
|
|
USE_GNOME=
|
2005-05-05 17:22:06 +00:00
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.if defined(WITHOUT_SVG)
|
|
|
|
CONFIGURE_ARGS+= --without-rsvg
|
2009-12-20 20:19:24 +00:00
|
|
|
.else
|
2010-05-14 08:04:39 +00:00
|
|
|
USE_GNOME+= librsvg2
|
2009-12-20 20:19:24 +00:00
|
|
|
.endif
|
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.if defined(WITHOUT_GTK2)
|
|
|
|
.if defined(WITH_XAW)
|
|
|
|
.if defined(WITH_XAW3D) || defined(WITH_MOTIF)
|
|
|
|
IGNORE= please choose only one toolkit: GTK+/Motif/Xaw/Xaw3d
|
|
|
|
.endif
|
|
|
|
USE_XORG= xaw
|
|
|
|
CONFIGURE_ARGS+= --with-x-toolkit=athena --without-xaw3d
|
|
|
|
.elif defined(WITH_XAW3D)
|
|
|
|
.if defined(WITH_MOTIF)
|
|
|
|
IGNORE= please choose only one toolkit: GTK+/Motif/Xaw/Xaw3d
|
|
|
|
.endif
|
|
|
|
LIB_DEPENDS+= Xaw3d.${XAWVER}:${PORTSDIR}/x11-toolkits/Xaw3d
|
|
|
|
CONFIGURE_ARGS+= --with-x-toolkit=athena
|
|
|
|
.elif defined(WITH_MOTIF)
|
|
|
|
USE_MOTIF= yes
|
|
|
|
CONFIGURE_ARGS+= --with-x-toolkit=motif
|
|
|
|
.else
|
|
|
|
IGNORE= please choose a toolkit: GTK+/Motif/Xaw/Xaw3d, or build without X11 support
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
.if defined(WITH_XAW) || defined(WITH_XAW3D) || defined(WITH_MOTIF)
|
|
|
|
IGNORE= please choose only one toolkit: GTK+/Motif/Xaw/Xaw3d
|
|
|
|
.endif
|
2011-09-08 06:20:32 +00:00
|
|
|
INSTALLS_ICONS= yes
|
2010-05-14 08:04:39 +00:00
|
|
|
USE_GNOME+= gtk20
|
|
|
|
CONFIGURE_ARGS+= --with-x-toolkit=gtk
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_SCROLLBARS)
|
|
|
|
CONFIGURE_ARGS+= --without-toolkit-scroll-bars
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_SYNC_INPUT)
|
|
|
|
CONFIGURE_ARGS+= --without-sync-input
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_JPEG)
|
|
|
|
CONFIGURE_ARGS+= --without-jpeg
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
|
2007-07-16 17:06:44 +00:00
|
|
|
.endif
|
2010-05-14 08:04:39 +00:00
|
|
|
|
|
|
|
.if defined(WITHOUT_TIFF)
|
|
|
|
CONFIGURE_ARGS+= --without-tiff
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_GIF)
|
|
|
|
CONFIGURE_ARGS+= --without-gif
|
|
|
|
.else
|
2011-05-16 12:27:12 +00:00
|
|
|
. if exists(${LOCALBASE}/lib/libgif.so)
|
|
|
|
LIB_DEPENDS+= gif.5:${PORTSDIR}/graphics/giflib
|
|
|
|
. else
|
2010-05-14 08:04:39 +00:00
|
|
|
LIB_DEPENDS+= ungif.5:${PORTSDIR}/graphics/libungif
|
2011-05-16 12:27:12 +00:00
|
|
|
. endif
|
2010-05-14 08:04:39 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_PNG)
|
|
|
|
CONFIGURE_ARGS+= --without-png
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_XPM)
|
|
|
|
CONFIGURE_ARGS+= --without-xpm
|
|
|
|
.else
|
|
|
|
USE_XORG+= xpm
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_XFT)
|
|
|
|
.if defined(WITH_M17N)
|
|
|
|
IGNORE= m17n support requires Xft. Please run 'make config'
|
|
|
|
.elif defined(WITH_OTF)
|
|
|
|
IGNORE= otf support requires Xft. Please run 'make config'
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-xft
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
USE_XORG+= xft
|
|
|
|
LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_M17N)
|
|
|
|
CONFIGURE_ARGS+= --without-m17n-flt
|
|
|
|
.else
|
|
|
|
.if !defined(WITHOUT_XFT)
|
|
|
|
LIB_DEPENDS+= m17n.4:${PORTSDIR}/devel/m17n-lib
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_OTF)
|
|
|
|
CONFIGURE_ARGS+= --without-libotf
|
|
|
|
.else
|
|
|
|
.if !defined(WITHOUT_XFT)
|
|
|
|
LIB_DEPENDS+= otf.0:${PORTSDIR}/print/libotf
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_GCONF)
|
|
|
|
CONFIGURE_ARGS+= --without-gconf
|
|
|
|
.else
|
|
|
|
USE_GNOME+= gconf2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_XIM)
|
|
|
|
CONFIGURE_ARGS+= --without-xim
|
|
|
|
.endif
|
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
.if defined(WITH_CANNA)
|
2011-09-07 20:20:25 +00:00
|
|
|
PATCH_SITES+= http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL}
|
2011-05-11 11:15:48 +00:00
|
|
|
PATCH_SITE_SUBDIR+= ashish
|
|
|
|
PATCHFILES+= emacs23.3canna-20110316.diff.gz
|
2010-09-27 01:14:52 +00:00
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
CONFIGURE_ARGS+= --with-canna \
|
|
|
|
--with-canna-includes=${LOCALBASE}/include \
|
|
|
|
--with-canna-libraries=${LOCALBASE}/lib
|
|
|
|
LIB_DEPENDS+= canna.1:${PORTSDIR}/japanese/canna-lib
|
|
|
|
.endif
|
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.endif
|
|
|
|
|
2010-06-05 20:05:46 +00:00
|
|
|
.if defined(WITHOUT_SOUND)
|
|
|
|
CONFIGURE_ARGS+= --without-sound
|
|
|
|
.endif
|
|
|
|
|
2010-05-14 08:04:39 +00:00
|
|
|
.if defined(WITHOUT_DBUS)
|
|
|
|
CONFIGURE_ARGS+= --without-dbus
|
|
|
|
.else
|
2010-09-27 01:14:52 +00:00
|
|
|
LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus
|
2010-05-14 08:04:39 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == "ia64"
|
2010-05-21 19:51:04 +00:00
|
|
|
BROKEN= Emacs 23.X does not currently build on ia64
|
|
|
|
.endif
|
|
|
|
|
2007-09-27 06:16:36 +00:00
|
|
|
post-patch:
|
|
|
|
@${RM} -f ${WRKSRC}/info/*
|
2009-12-20 20:19:24 +00:00
|
|
|
@${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el
|
2011-05-16 12:27:12 +00:00
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
@${REINPLACE_CMD} -e 's/^Terminal=.*$$/Terminal=true/' ${WRKSRC}/etc/emacs.desktop
|
|
|
|
.endif
|
2009-12-20 20:19:24 +00:00
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
post-configure:
|
|
|
|
@${REINPLACE_CMD} -e "s/^\(DBUS_LIBS.*\)-pthread\(.*\)$$/\1$$(${DBUS_PTHREAD_LIBS})\2/" ${WRKSRC}/src/Makefile
|
|
|
|
|
|
|
|
add-plist-data:
|
|
|
|
.for i in ${EMACS_DIRS}
|
2011-05-11 11:15:48 +00:00
|
|
|
@${FIND} ${i} -type f |${SED} -E -e 's,^${PREFIX}/,,g' >>${TMPPLIST}
|
2010-09-27 01:14:52 +00:00
|
|
|
.endfor
|
2011-05-11 11:15:48 +00:00
|
|
|
@${FIND} ${WRKSRC}/etc -type f |${SED} -E -e 's,^${WRKSRC},${DATADIR_REL}/${EMACS_VER},g' -e '/etc\/(\..*|ChangeLog|DOC)$$/d' >>${TMPPLIST}
|
|
|
|
@${FIND} ${WRKSRC}/etc -type d -depth |${SED} -E -e 's,^${WRKSRC},@dirrm ${DATADIR_REL}/${EMACS_VER},g' >>${TMPPLIST}
|
2010-09-27 01:14:52 +00:00
|
|
|
.for i in ${EMACS_DIRS}
|
2011-05-11 11:15:48 +00:00
|
|
|
@${FIND} ${i} -type d -depth |${SED} -E -e 's,^${PREFIX}/,@dirrm ,g' >>${TMPPLIST}
|
2010-09-27 01:14:52 +00:00
|
|
|
.endfor
|
2011-05-11 11:15:48 +00:00
|
|
|
@${ECHO} "@unexec rmdir %D/${DATADIR_REL}/${EMACS_VER} 2>/dev/null || true" >>${TMPPLIST}
|
2010-09-27 01:14:52 +00:00
|
|
|
|
2009-12-20 20:19:24 +00:00
|
|
|
.if defined(WITH_SOURCES)
|
2011-05-11 11:15:48 +00:00
|
|
|
PLIST_SUB+= SOURCES=""
|
|
|
|
|
2009-12-20 20:19:24 +00:00
|
|
|
post-install:
|
|
|
|
@${MKDIR} ${DATADIR}/${EMACS_VER}/src
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/src/*.[ch] ${DATADIR}/${EMACS_VER}/src
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/sources.el ${DATADIR}/${EMACS_VER}/site-lisp/site-start.el
|
2011-05-11 11:15:48 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= SOURCES="@comment "
|
2009-12-20 20:19:24 +00:00
|
|
|
.endif
|
2007-09-27 06:16:36 +00:00
|
|
|
|
2010-09-27 01:14:52 +00:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG}
|
|
|
|
.if !defined(WITHOUT_X11)
|
|
|
|
@${ECHO_MSG} "====> To disable X11 support, define: WITHOUT_X11."
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_CANNA)
|
|
|
|
@${ECHO_MSG} "====> Canna support is not part of standard distribution"
|
|
|
|
@${ECHO_MSG} "====> of GNU Emacs and is therefore not supported by GNU"
|
|
|
|
@${ECHO_MSG} "====> Emacs development team."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
2005-05-05 17:22:06 +00:00
|
|
|
.include <bsd.port.post.mk>
|