diff -urN /usr/ports/editors/emacs/Makefile emacs/Makefile --- /usr/ports/editors/emacs/Makefile 2012-06-03 12:43:00.000000000 +0530 +++ emacs/Makefile 2012-07-21 17:44:11.310441394 +0530 @@ -7,7 +7,6 @@ PORTNAME= emacs PORTVERSION= ${EMACS_VER} -PORTREVISION?= 1 PORTEPOCH= 2 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} @@ -19,13 +18,13 @@ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -MAKE_JOBS_UNSAFE= yes +MAKE_JOBS_SAFE= yes -CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-24.* \ +CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-23.* \ xemacs-[0-9]* xemacs-devel-[0-9]* \ xemacs-mule-[0-9]* xemacs-devel-mule-[0-9]* -EMACS_VER= 23.4 +EMACS_VER= 24.1 GNU_CONFIGURE= yes USE_GMAKE= yes USE_BZIP2= yes @@ -35,8 +34,9 @@ CONFIGURE_ARGS= --localstatedir=/var WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -MAN1= b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ +MAN1= ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ grep-changelog.1 rcs-checkin.1 +MANCOMPRESSED= yes PLIST_SUB= EMACS_VER=${EMACS_VER} EMACS_DIRS= ${DATADIR}/${EMACS_VER}/leim ${DATADIR}/${EMACS_VER}/lisp ${DATADIR}/${EMACS_VER}/src \ @@ -45,186 +45,205 @@ MAKE_ENV= LC_ALL=C INFO= ada-mode auth autotype calc ccmode cl dbus dired-x \ - ebrowse ede ediff edt efaq eieio eintr elisp emacs-mime emacs epa \ - erc eshell eudc flymake forms gnus idlwave info \ + ebrowse ede ediff edt efaq eieio eintr elisp emacs-mime emacs-gnutls emacs epa \ + erc ert eshell eudc flymake forms gnus idlwave info \ mairix-el message mh-e newsticker nxml-mode \ org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve \ smtpmail speedbar tramp url vip viper widget woman .if !defined(EMACS_NO_X11_SLAVE) CONFLICTS+= emacs-nox11-[0-9]* -OPTIONS= CANNA "Canna support" OFF \ - DBUS "DBus support" ON \ - GCONF "GConf support" ON \ - GIF "GIF images support" ON \ - GTK2 "Use GTK+ widgets" ON \ - JPEG "JPEG images support" ON \ - M17N "M17N support for text-shaping" ON \ - MOTIF "Use Motif widgets" OFF \ - OTF "Opentype fonts support" ON \ - PNG "PNG images support" ON \ - SOUND "Sound support" ON \ - SOURCES "Install source code" ON \ - SVG "SVG images support" ON \ - TIFF "TIFF images support" ON \ - XAW "Use Athena widgets" OFF \ - XAW3D "Use Athena3D widgets" OFF \ - SYNC_INPUT "Synchronously process asynchronous input" ON \ - SCROLLBARS "Without toolkit scroll-bars" ON \ - XFT "Freetype fonts support" ON \ - XIM "X Input Method support" ON \ - XPM "XPM images support" ON +OPTIONS_DEFINE= CANNA DBUS GCONF GIF JPEG M17N OTF PNG SOUND SOURCES SVG TIFF SYNC_INPUT SCROLLBARS XFT \ + XIM XML XPM MAGICK GNUTLS GSETTINGS + +OPTIONS_SINGLE= X11TOOLKIT + +CANNA_DESC= Canna support +GSETTINGS_DESC= GSettings support +SCROLLBARS_DESC= Toolkit scroll-bars +SOUND_DESC= Sound support +SOURCES_DESC= Install sources +SYNC_INPUT_DESC= Synchronously process asynchronous input +XAW_DESC= Athena widgets +XAW3D_DESC= Athena3D widgets +XIM_DESC= X Input Method Support +M17N_DESC= M17N support for text-shaping +OTF_DESC= Opentype fonts suport + +OPTIONS_SINGLE_X11TOOLKIT= GTK2 GTK3 XAW XAW3D MOTIF + +OPTIONS_DEFAULT=DBUS GCONF GIF GTK2 JPEG M17N OTF PNG SOUND SOURCES SVG TIFF SYNC_INPUT \ + SCROLLBARS XFT XIM XML XPM MAGICK GNUTLS GSETTINGS .endif .include DBUS_PTHREAD_LIBS= ${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE} +.if ${PORT_OPTIONS:MCANNA} +PATCH_SITES+= http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL} +PATCH_SITE_SUBDIR+= ashish +PATCHFILES+= emacs24.1canna-20120614.diff.gz +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 + .if defined(WITHOUT_X11) CONFIGURE_ARGS+= --without-x - .else USE_XORG= x11 USE_GNOME= -.if defined(WITHOUT_SVG) -CONFIGURE_ARGS+= --without-rsvg -.else +.if ${PORT_OPTIONS:MSVG} USE_GNOME+= librsvg2 +.else +CONFIGURE_ARGS+= --without-rsvg .endif -.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 +.if ${PORT_OPTIONS:MGTK2} +USE_GNOME+= gtk20 +CONFIGURE_ARGS+= --with-x-toolkit=gtk +.elif ${PORT_OPTIONS:MGTK3} +USE_GNOME+= gtk30 +CONFIGURE_ARGS+= --with-x-toolkit=gtk3 +.elif ${PORT_OPTIONS:MXAW3D} LIB_DEPENDS+= Xaw3d.${XAWVER}:${PORTSDIR}/x11-toolkits/Xaw3d CONFIGURE_ARGS+= --with-x-toolkit=athena -.elif defined(WITH_MOTIF) +.elif ${PORT_OPTIONS:MXAW} +USE_XORG= xaw +CONFIGURE_ARGS+= --with-x-toolkit=athena --without-xaw3d +.elif ${PORT_OPTIONS:MMOTIF} 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 -INSTALLS_ICONS= yes -USE_GNOME+= gtk20 -CONFIGURE_ARGS+= --with-x-toolkit=gtk .endif -.if defined(WITHOUT_SCROLLBARS) +.if !${PORT_OPTIONS:MSCROLLBARS} CONFIGURE_ARGS+= --without-toolkit-scroll-bars .endif -.if defined(WITHOUT_SYNC_INPUT) +.if !${PORT_OPTIONS:MSYNC_INPUT} CONFIGURE_ARGS+= --without-sync-input .endif -.if defined(WITHOUT_JPEG) -CONFIGURE_ARGS+= --without-jpeg -.else +.if ${PORT_OPTIONS:MJPEG} LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg +.else +CONFIGURE_ARGS+= --without-jpeg .endif -.if defined(WITHOUT_TIFF) -CONFIGURE_ARGS+= --without-tiff -.else +.if ${PORT_OPTIONS:MTIFF} LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff +.else +CONFIGURE_ARGS+= --without-tiff .endif -.if defined(WITHOUT_GIF) -CONFIGURE_ARGS+= --without-gif +.if ${PORT_OPTIONS:MGIF} +LIB_DEPENDS+= gif.5:${PORTSDIR}/graphics/giflib .else -LIB_DEPENDS+= gif.5:${PORTSDIR}/graphics/giflib +CONFIGURE_ARGS+= --without-gif .endif -.if defined(WITHOUT_PNG) -CONFIGURE_ARGS+= --without-png -.else +.if ${PORT_OPTIONS:MPNG} LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png +.else +CONFIGURE_ARGS+= --without-png .endif -.if defined(WITHOUT_XPM) -CONFIGURE_ARGS+= --without-xpm -.else +.if ${PORT_OPTIONS:MXPM} USE_XORG+= xpm +.else +CONFIGURE_ARGS+= --without-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' +.if ${PORT_OPTIONS:MXFT} +USE_XORG+= xft +LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 +CONFIGURE_ARGS+= --with-xft +.if ${PORT_OPTIONS:MM17N} +CONFIGURE_ARGS+= --with-m17n-flt +LIB_DEPENDS+= m17n.4:${PORTSDIR}/devel/m17n-lib .else -CONFIGURE_ARGS+= --without-xft +CONFIGURE_ARGS+= --without-m17n-flt .endif +.if ${PORT_OPTIONS:MOTF} +CONFIGURE_ARGS+= --with-otf +LIB_DEPENDS+= otf.0:${PORTSDIR}/print/libotf .else -USE_XORG+= xft -LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 +CONFIGURE_ARGS+= --without-libotf .endif - -.if defined(WITHOUT_M17N) -CONFIGURE_ARGS+= --without-m17n-flt .else -.if !defined(WITHOUT_XFT) -LIB_DEPENDS+= m17n.4:${PORTSDIR}/devel/m17n-lib +CONFIGURE_ARGS+= --without-xft +.if ${PORT_OPTIONS:MM17N} +IGNORE= m17n support for text-shaping requires Xft. Please run 'make config' +.elif ${PORT_OPTIONS:MOTF} +IGNORE= opentype fonts support requires Xft. Please run 'make config' .endif +CONFIGURE_ARGS+= --without-otf --without-m17n-flt .endif -.if defined(WITHOUT_OTF) -CONFIGURE_ARGS+= --without-libotf +.if ${PORT_OPTIONS:MMAGICK} +LIB_DEPENDS+= MagickCore.5:${PORTSDIR}/graphics/ImageMagick +CONFIGURE_ARGS+= --with-imagemagick .else -.if !defined(WITHOUT_XFT) -LIB_DEPENDS+= otf.0:${PORTSDIR}/print/libotf -.endif +CONFIGURE_ARGS+= --without-imagemagick .endif -.if defined(WITHOUT_GCONF) -CONFIGURE_ARGS+= --without-gconf +.if ${PORT_OPTIONS:MGSETTINGS} +USE_GNOME+= glib20 +CONFIGURE_ARGS+= --with-gsettings .else -USE_GNOME+= gconf2 +CONFIGURE_ARGS+= --without-gsettings .endif -.if defined(WITHOUT_XIM) -CONFIGURE_ARGS+= --without-xim +.if ${PORT_OPTIONS:MGCONF} +USE_GNOME+= gconf2 +CONFIGURE_ARGS+= --with-gconf +.else +CONFIGURE_ARGS+= --without-gconf .endif -.if defined(WITH_CANNA) -PATCH_SITES+= http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL} -PATCH_SITE_SUBDIR+= ashish -PATCHFILES+= emacs23.3canna-20110316.diff.gz -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 +.if ${PORT_OPTIONS:MXIM} +CONFIGURE_ARGS+= --with-xim +.else +CONFIGURE_ARGS+= --without-xim .endif .endif -.if defined(WITHOUT_SOUND) +.if ${PORT_OPTIONS:MSOUND} +CONFIGURE_ARGS+= --with-sound +.else CONFIGURE_ARGS+= --without-sound .endif -.if defined(WITHOUT_DBUS) +.if ${PORT_OPTIONS:MDBUS} +LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus +CONFIGURE_ARGS+= --with-dbus +.else CONFIGURE_ARGS+= --without-dbus +.endif + +.if ${PORT_OPTIONS:MXML} +USE_GNOME+= libxml2 +CONFIGURE_ARGS+= --with-xml2 .else -LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus +CONFIGURE_ARGS+= --without-xml2 +.endif + +.if ${PORT_OPTIONS:MGNUTLS} +LIB_DEPENDS+= gnutls.47:${PORTSDIR}/security/gnutls +CONFIGURE_ARGS+= --with-gnutls +.else +CONFIGURE_ARGS+= --without-gnutls .endif .include .if ${ARCH} == "ia64" -BROKEN= Emacs 23.X does not currently build on ia64 +BROKEN= Emacs 24.X does not currently build on ia64 .endif post-patch: @@ -260,9 +279,10 @@ .endif pre-everything:: - @${ECHO_MSG} .if !defined(WITHOUT_X11) + @${ECHO_MSG} @${ECHO_MSG} "====> To disable X11 support, define: WITHOUT_X11." + @${ECHO_MSG} .endif .if defined(WITH_CANNA) @${ECHO_MSG} "====> Canna support is not part of standard distribution" diff -urN /usr/ports/editors/emacs/distinfo emacs/distinfo --- /usr/ports/editors/emacs/distinfo 2012-02-22 18:49:03.000000000 +0530 +++ emacs/distinfo 2012-07-20 13:43:58.726478959 +0530 @@ -1,4 +1,4 @@ -SHA256 (emacs-23.4.tar.bz2) = 26576f9e664397c729f78f5ffcd092969251988461896fe8793062346ee988b9 -SIZE (emacs-23.4.tar.bz2) = 38646508 -SHA256 (emacs23.3canna-20110316.diff.gz) = 26cb4bdb88685641e23d3a27953db56e04712caf154963edcaea41f5a403c7d3 -SIZE (emacs23.3canna-20110316.diff.gz) = 33845 +SHA256 (emacs-24.1.tar.bz2) = eeea272732146e2be9aee2f8d71d6cf07b8654c0282da62a26b921d433f02b7c +SIZE (emacs-24.1.tar.bz2) = 41722508 +SHA256 (emacs24.1canna-20120614.diff.gz) = 276bbaae3b2adca9b1598653ea24986c29564afdea4b6741cbaee71db4f52bbe +SIZE (emacs24.1canna-20120614.diff.gz) = 31907 diff -urN /usr/ports/editors/emacs/files/patch-Makefile.in emacs/files/patch-Makefile.in --- /usr/ports/editors/emacs/files/patch-Makefile.in 2009-12-21 01:49:17.000000000 +0530 +++ emacs/files/patch-Makefile.in 2012-07-20 19:51:49.222477052 +0530 @@ -1,6 +1,9 @@ ---- Makefile.in.orig Tue Jun 23 07:41:36 2009 +0300 -+++ Makefile.in Tue Jun 23 07:39:33 2009 +0300 -@@ -461,14 +461,6 @@ + +$FreeBSD$ + +--- Makefile.in.orig ++++ Makefile.in +@@ -518,14 +518,6 @@ install-arch-indep: mkdir info install-etc -set ${COPYDESTS} ; \ @@ -15,25 +18,26 @@ mkdir ${COPYDESTS} ; \ chmod ugo+rx ${COPYDESTS} ; \ unset CDPATH; \ -@@ -570,9 +562,9 @@ +@@ -625,10 +617,10 @@ cd ${srcdir}/info ; \ for elt in $(INFO_FILES); do \ - test "$(MAKEINFO)" = "off" && ! test -e $$elt && continue; \ + test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \ - for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ -- ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \ ++ for f in `ls $$elt 2>/dev/null`; do \ + (cd $${thisdir}; \ +- ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \ - chmod a+r $(DESTDIR)${infodir}/$$f; \ -+ for f in `ls $$elt 2>/dev/null`; do \ -+ ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f.info; \ -+ chmod a+r $(DESTDIR)${infodir}/$$f.info; \ - done; \ - done); \ - else true; fi -@@ -583,7 +575,7 @@ ++ ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f.info); \ ++ chmod a+r $(DESTDIR)${infodir}/$$f.info; \ + if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \ + rm -f $(DESTDIR)${infodir}/$$f.gz; \ + ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \ +@@ -643,7 +635,7 @@ for elt in $(INFO_FILES); do \ - test "$(MAKEINFO)" = "off" && ! test -e $$elt && continue; \ + test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \ (cd $${thisdir}; \ - ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \ + ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt.info); \ done; \ else true; fi - -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} $(DESTDIR)${datadir}/emacs/site-lisp ${COPYDESTS} $(DESTDIR)${infodir} + -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS} diff -urN /usr/ports/editors/emacs/files/patch-configure emacs/files/patch-configure --- /usr/ports/editors/emacs/files/patch-configure 2011-05-11 16:45:48.000000000 +0530 +++ emacs/files/patch-configure 2012-07-21 15:55:23.595144478 +0530 @@ -3,7 +3,7 @@ --- configure.orig +++ configure -@@ -5806,159 +5806,6 @@ +@@ -8276,177 +8276,13 @@ LIBSOUND= fi @@ -18,7 +18,7 @@ -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +-if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in @@ -107,9 +107,9 @@ - - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" -- SAVE_LDFLAGS="$LDFLAGS" +- SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" -- LDFLAGS="$ALSA_LIBS $LDFLAGS" +- LIBS="$ALSA_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include @@ -152,7 +152,7 @@ - fi - - CFLAGS="$SAVE_CFLAGS" -- LDFLAGS="$SAVE_LDFLAGS" +- LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - @@ -160,6 +160,25 @@ - - fi - +- if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then +- case "$opsys" in +- gnu-linux|freebsd|netbsd) +- +-$as_echo "#define HAVE_SOUND 1" >>confdefs.h +- +- ;; +- esac +- fi +- +- fi - for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ + for ac_header in sys/select.h sys/time.h unistd.h utime.h \ + linux/version.h sys/systeminfo.h \ + stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ + sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ +- sys/utsname.h pwd.h utmp.h dirent.h util.h ++ sys/utsname.h pwd.h utmp.h dirent.h util.h libutil.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff -urN /usr/ports/editors/emacs/files/patch-doc-emacs-Makefile.in emacs/files/patch-doc-emacs-Makefile.in --- /usr/ports/editors/emacs/files/patch-doc-emacs-Makefile.in 2009-12-21 01:49:17.000000000 +0530 +++ emacs/files/patch-doc-emacs-Makefile.in 2012-07-20 19:51:49.257478638 +0530 @@ -1,20 +1,14 @@ ---- doc/emacs/Makefile.in.orig 2008-12-09 19:27:59.000000000 +0200 -+++ doc/emacs/Makefile.in 2008-12-09 19:25:19.000000000 +0200 -@@ -34,7 +34,7 @@ - + +$FreeBSD$ + +--- doc/emacs/Makefile.in.orig ++++ doc/emacs/Makefile.in +@@ -38,7 +38,7 @@ # The makeinfo program is part of the Texinfo distribution. # Use --force so that it generates output even if there are errors. --MAKEINFO = makeinfo --force -+MAKEINFO = makeinfo --force --no-split - - INFO_TARGETS = $(infodir)/emacs - DVI_TARGETS = emacs.dvi -@@ -144,7 +144,7 @@ - # rm -f Makefile - - maintainer-clean: distclean -- for file in $(INFO_TARGETS); do rm -f $${file}*; done -+ for file in $(INFO_TARGETS); do rm -f $${file}; done - + MAKEINFO = @MAKEINFO@ +-MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir) ++MAKEINFO_OPTS = --force --no-split --enable-encoding -I $(srcdir) - # Formerly this directory had texindex.c and getopt.c in it + TEXI2DVI = texi2dvi + TEXI2PDF = texi2pdf diff -urN /usr/ports/editors/emacs/files/patch-doc-lispintro-Makefile.in emacs/files/patch-doc-lispintro-Makefile.in --- /usr/ports/editors/emacs/files/patch-doc-lispintro-Makefile.in 2009-12-21 01:49:17.000000000 +0530 +++ emacs/files/patch-doc-lispintro-Makefile.in 2012-07-20 19:51:49.225478062 +0530 @@ -1,20 +1,14 @@ ---- doc/lispintro/Makefile.in.orig 2008-12-09 19:27:59.000000000 +0200 -+++ doc/lispintro/Makefile.in 2008-12-09 19:25:20.000000000 +0200 -@@ -33,7 +33,7 @@ - INFO_TARGETS = ${infodir}/eintr - DVI_TARGETS = emacs-lisp-intro.dvi + +$FreeBSD$ + +--- doc/lispintro/Makefile.in.orig ++++ doc/lispintro/Makefile.in +@@ -27,7 +27,7 @@ + texinfodir = $(srcdir)/../misc --MAKEINFO = makeinfo -+MAKEINFO = makeinfo --no-split + MAKEINFO = @MAKEINFO@ +-MAKEINFO_OPTS = --force -I $(srcdir) ++MAKEINFO_OPTS = --force --no-split -I $(srcdir) TEXI2DVI = texi2dvi + TEXI2PDF = texi2pdf DVIPS = dvips - -@@ -65,7 +65,7 @@ - - maintainer-clean: distclean - rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc -- cd $(infodir); rm -f eintr eintr-[1-9] -+ cd $(infodir); rm -f eintr - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. diff -urN /usr/ports/editors/emacs/files/patch-doc-lispref-Makefile.in emacs/files/patch-doc-lispref-Makefile.in --- /usr/ports/editors/emacs/files/patch-doc-lispref-Makefile.in 2009-12-21 01:49:17.000000000 +0530 +++ emacs/files/patch-doc-lispref-Makefile.in 2012-07-20 19:51:49.228477396 +0530 @@ -1,11 +1,14 @@ ---- doc/lispref/Makefile.in.orig 2008-12-09 19:27:59.000000000 +0200 -+++ doc/lispref/Makefile.in 2008-12-09 19:25:20.000000000 +0200 -@@ -32,7 +32,7 @@ - TEXI2DVI = texi2dvi - SHELL = /bin/sh - INSTALL_INFO = install-info --MAKEINFO = makeinfo --force -+MAKEINFO = makeinfo --force --no-split - - # List of all the texinfo files in the manual: + +$FreeBSD$ + +--- doc/lispref/Makefile.in.orig ++++ doc/lispref/Makefile.in +@@ -31,7 +31,7 @@ + emacsdir = $(srcdir)/../emacs + MAKEINFO = @MAKEINFO@ +-MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) ++MAKEINFO_OPTS = --force --no-split --enable-encoding -I $(emacsdir) -I $(srcdir) + TEXI2DVI = texi2dvi + TEXI2PDF = texi2pdf + DVIPS = dvips diff -urN /usr/ports/editors/emacs/files/patch-doc-misc-Makefile.in emacs/files/patch-doc-misc-Makefile.in --- /usr/ports/editors/emacs/files/patch-doc-misc-Makefile.in 2009-12-21 01:49:17.000000000 +0530 +++ emacs/files/patch-doc-misc-Makefile.in 2012-07-20 19:51:49.260477692 +0530 @@ -1,11 +1,14 @@ ---- doc/misc/Makefile.in.orig Tue Jun 23 07:39:39 2009 +0300 -+++ doc/misc/Makefile.in Tue Jun 23 07:39:41 2009 +0300 -@@ -34,7 +34,7 @@ - + +$FreeBSD$ + +--- doc/misc/Makefile.in.orig ++++ doc/misc/Makefile.in +@@ -41,7 +41,7 @@ # The makeinfo program is part of the Texinfo distribution. # Use --force so that it generates output even if there are errors. --MAKEINFO = makeinfo --force -+MAKEINFO = makeinfo --force --no-split + MAKEINFO = @MAKEINFO@ +-MAKEINFO_OPTS = --force -I$(emacsdir) ++MAKEINFO_OPTS = --force --no-split -I$(emacsdir) # Also add new entries to INFO_FILES in the top-level Makefile.in. INFO_TARGETS = \ diff -urN /usr/ports/editors/emacs/files/patch-lisp-vc-svn.el emacs/files/patch-lisp-vc-svn.el --- /usr/ports/editors/emacs/files/patch-lisp-vc-svn.el 2012-02-22 18:49:03.000000000 +0530 +++ emacs/files/patch-lisp-vc-svn.el 1970-01-01 05:30:00.000000000 +0530 @@ -1,184 +0,0 @@ - -$FreeBSD: ports/editors/emacs/files/patch-lisp-vc-svn.el,v 1.1 2012/02/22 13:19:03 ashish Exp $ - ---- lisp/vc-svn.el.orig -+++ lisp/vc-svn.el -@@ -71,9 +71,9 @@ - t ;`svn' doesn't support common args like -c or -b. - "String or list of strings specifying extra switches for svn diff under VC. - If nil, use the value of `vc-diff-switches' (or `diff-switches'), --together with \"-x --diff-cmd=diff\" (since svn diff does not --support the default \"-c\" value of `diff-switches'). If you --want to force an empty list of arguments, use t." -+together with \"-x --diff-cmd=\"`diff-command' (since 'svn diff' -+does not support the default \"-c\" value of `diff-switches'). -+If you want to force an empty list of arguments, use t." - :type '(choice (const :tag "Unspecified" nil) - (const :tag "None" t) - (string :tag "Argument String") -@@ -83,9 +83,9 @@ - :version "22.1" - :group 'vc) - --(defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$")) -+(defcustom vc-svn-header '("\$Id\$") - "Header keywords to be inserted by `vc-insert-headers'." -- :version "22.1" -+ :version "24.1" ; no longer consult the obsolete vc-header-alist - :type '(repeat string) - :group 'vc) - -@@ -117,17 +117,13 @@ - ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) - ;;;###autoload "_svn") - ;;;###autoload (t ".svn")))) --;;;###autoload (when (file-readable-p (expand-file-name --;;;###autoload (concat admin-dir "/entries") --;;;###autoload (file-name-directory f))) -+;;;###autoload (when (vc-find-root f admin-dir) - ;;;###autoload (load "vc-svn") - ;;;###autoload (vc-svn-registered f)))) - - (defun vc-svn-registered (file) - "Check if FILE is SVN registered." -- (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory -- "/entries") -- (file-name-directory file))) -+ (when (vc-svn-root file) - (with-temp-buffer - (cd (file-name-directory file)) - (let* (process-file-side-effects -@@ -170,15 +166,21 @@ - (?? . unregistered) - ;; This is what vc-svn-parse-status does. - (?~ . edited))) -- (re (if remote "^\\(.\\)......? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" -- ;; Subexp 2 is a dummy in this case, so the numbers match. -- "^\\(.\\)....\\(.\\) \\(.*\\)$")) -+ (re (if remote "^\\(.\\)\\(.\\).....? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" -+ ;; Subexp 3 is a dummy in this case, so the numbers match. -+ "^\\(.\\)\\(.\\)...\\(.\\) \\(.*\\)$")) - result) - (goto-char (point-min)) - (while (re-search-forward re nil t) - (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) -- (filename (match-string 3))) -- (and remote (string-equal (match-string 2) "*") -+ (propstat (cdr (assq (aref (match-string 2) 0) state-map))) -+ (filename (if (memq system-type '(windows-nt ms-dos)) -+ (replace-regexp-in-string "\\\\" "/" (match-string 4)) -+ (match-string 4)))) -+ (and (memq propstat '(conflict edited)) -+ (not (eq state 'conflict)) ; conflict always wins -+ (setq state propstat)) -+ (and remote (string-equal (match-string 3) "*") - ;; FIXME are there other possible combinations? - (cond ((eq state 'edited) (setq state 'needs-merge)) - ((not state) (setq state 'needs-update)))) -@@ -271,18 +273,16 @@ - to the SVN command." - (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register))) - --(defun vc-svn-responsible-p (file) -- "Return non-nil if SVN thinks it is responsible for FILE." -- (file-directory-p (expand-file-name vc-svn-admin-directory -- (if (file-directory-p file) -- file -- (file-name-directory file))))) -+(defun vc-svn-root (file) -+ (vc-find-root file vc-svn-admin-directory)) - --(defalias 'vc-svn-could-register 'vc-svn-responsible-p -+(defalias 'vc-svn-responsible-p 'vc-svn-root) -+ -+(defalias 'vc-svn-could-register 'vc-svn-root - "Return non-nil if FILE could be registered in SVN. - This is only possible if SVN is responsible for FILE's directory.") - --(defun vc-svn-checkin (files rev comment) -+(defun vc-svn-checkin (files rev comment &optional extra-args-ignored) - "SVN-specific version of `vc-backend-checkin'." - (if rev (error "Committing to a specific revision is unsupported in SVN")) - (let ((status (apply -@@ -518,7 +518,7 @@ - (let* ((switches - (if vc-svn-diff-switches - (vc-switches 'SVN 'diff) -- (list "--diff-cmd=diff" "-x" -+ (list (concat "--diff-cmd=" diff-command) "-x" - (mapconcat 'identity (vc-switches nil 'diff) " ")))) - (async (and (not vc-disable-async-diff) - (vc-stay-local-p files 'SVN) -@@ -590,20 +590,10 @@ - - (defun vc-svn-repository-hostname (dirname) - (with-temp-buffer -- (let ((coding-system-for-read -- (or file-name-coding-system -- default-file-name-coding-system))) -- (vc-insert-file (expand-file-name (concat vc-svn-admin-directory -- "/entries") -- dirname))) -+ (let (process-file-side-effects) -+ (vc-svn-command t t dirname "info" "--xml")) - (goto-char (point-min)) -- (when (re-search-forward -- ;; Old `svn' used name="svn:this_dir", newer use just name="". -- (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" -- "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" -- "url=\"\\(?1:[^\"]+\\)\"" -- ;; Yet newer ones don't use XML any more. -- "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t) -+ (when (re-search-forward "\\(.*\\)" nil t) - ;; This is not a hostname but a URL. This may actually be considered - ;; as a feature since it allows vc-svn-stay-local to specify different - ;; behavior for different modules on the same server. -@@ -642,7 +632,7 @@ - "Parse output of \"svn status\" command in the current buffer. - Set file properties accordingly. Unless FILENAME is non-nil, parse only - information about FILENAME and return its status." -- (let (file status) -+ (let (file status propstat) - (goto-char (point-min)) - (while (re-search-forward - ;; Ignore the files with status X. -@@ -652,7 +642,9 @@ - (setq file (or filename - (expand-file-name - (buffer-substring (point) (line-end-position))))) -- (setq status (char-after (line-beginning-position))) -+ (setq status (char-after (line-beginning-position)) -+ ;; Status of the item's properties ([ MC]). -+ propstat (char-after (1+ (line-beginning-position)))) - (if (eq status ??) - (vc-file-setprop file 'vc-state 'unregistered) - ;; Use the last-modified revision, so that searching in vc-print-log -@@ -663,7 +655,7 @@ - (vc-file-setprop - file 'vc-state - (cond -- ((eq status ?\ ) -+ ((and (eq status ?\ ) (eq propstat ?\ )) - (if (eq (char-after (match-beginning 1)) ?*) - 'needs-update - (vc-file-setprop file 'vc-checkout-time -@@ -674,9 +666,11 @@ - (vc-file-setprop file 'vc-working-revision "0") - (vc-file-setprop file 'vc-checkout-time 0) - 'added) -- ((eq status ?C) -+ ;; Conflict in contents or properties. -+ ((or (eq status ?C) (eq propstat ?C)) - (vc-file-setprop file 'vc-state 'conflict)) -- ((eq status '?M) -+ ;; Modified contents or properties. -+ ((or (eq status ?M) (eq propstat ?M)) - (if (eq (char-after (match-beginning 1)) ?*) - 'needs-merge - 'edited)) -@@ -743,5 +737,4 @@ - - (provide 'vc-svn) - --;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d - ;;; vc-svn.el ends here diff -urN /usr/ports/editors/emacs/files/patch-src_coding.c emacs/files/patch-src_coding.c --- /usr/ports/editors/emacs/files/patch-src_coding.c 2011-09-08 01:50:25.000000000 +0530 +++ emacs/files/patch-src_coding.c 2012-07-21 15:32:12.738446001 +0530 @@ -3,7 +3,7 @@ --- src/coding.c.orig +++ src/coding.c -@@ -3853,8 +3853,20 @@ +@@ -3717,8 +3717,20 @@ else charset = CHARSET_FROM_ID (charset_id_2); ONE_MORE_BYTE (c1); @@ -26,7 +26,7 @@ break; case 'O': /* invocation of single-shift-3 */ -@@ -3867,8 +3879,20 @@ +@@ -3731,8 +3743,20 @@ else charset = CHARSET_FROM_ID (charset_id_3); ONE_MORE_BYTE (c1); diff -urN /usr/ports/editors/emacs/files/patch-src_config.in emacs/files/patch-src_config.in --- /usr/ports/editors/emacs/files/patch-src_config.in 2011-05-16 17:57:12.000000000 +0530 +++ emacs/files/patch-src_config.in 2012-07-24 21:28:37.799062399 +0530 @@ -3,12 +3,13 @@ --- src/config.in.orig +++ src/config.in -@@ -1183,6 +1183,8 @@ - #endif - #ifdef HAVE_ALLOCA_H - # include -+#elif defined __FreeBSD__ -+#include - #elif defined __GNUC__ - # define alloca __builtin_alloca - #elif defined _AIX +@@ -468,6 +468,9 @@ + /* Define to 1 if using SELinux. */ + #undef HAVE_LIBSELINUX + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LIBUTIL_H ++ + /* Define to 1 if you have the `Xext' library (-lXext). */ + #undef HAVE_LIBXEXT + diff -urN /usr/ports/editors/emacs/files/patch-src_process.c emacs/files/patch-src_process.c --- /usr/ports/editors/emacs/files/patch-src_process.c 1970-01-01 05:30:00.000000000 +0530 +++ emacs/files/patch-src_process.c 2012-07-20 19:51:49.226477980 +0530 @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- src/process.c.orig ++++ src/process.c +@@ -83,6 +83,10 @@ + #include + #endif + ++#ifdef HAVE_LIBUTIL_H ++#include ++#endif ++ + #ifdef HAVE_PTY_H + #include + #endif diff -urN /usr/ports/editors/emacs/files/patch-src_s_freebsd.h emacs/files/patch-src_s_freebsd.h --- /usr/ports/editors/emacs/files/patch-src_s_freebsd.h 1970-01-01 05:30:00.000000000 +0530 +++ emacs/files/patch-src_s_freebsd.h 2012-07-20 19:51:49.256919558 +0530 @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- src/s/freebsd.h.orig ++++ src/s/freebsd.h +@@ -58,3 +58,17 @@ + /* Tell that garbage collector that setjmp is known to save all + registers relevant for conservative garbage collection in the jmp_buf. */ + #define GC_SETJMP_WORKS 1 ++ ++#define PTY_ITERATION int i; for (i = 0; i < 1; i++) ++#define PTY_NAME_SPRINTF /* none */ ++#define PTY_TTY_NAME_SPRINTF /* none */ ++#define PTY_OPEN \ ++ do \ ++ { \ ++ int slave; \ ++ if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) \ ++ fd = -1; \ ++ else \ ++ emacs_close (slave); \ ++ } \ ++ while (0) diff -urN /usr/ports/editors/emacs/files/patch-src_sysdep.c emacs/files/patch-src_sysdep.c --- /usr/ports/editors/emacs/files/patch-src_sysdep.c 1970-01-01 05:30:00.000000000 +0530 +++ emacs/files/patch-src_sysdep.c 2012-07-20 19:51:49.261477121 +0530 @@ -0,0 +1,244 @@ + +$FreeBSD$ + +--- src/sysdep.c.orig ++++ src/sysdep.c +@@ -37,6 +37,20 @@ + #include "sysselect.h" + #include "blockinput.h" + ++#ifdef __FreeBSD__ ++#include ++/* machine/frame.h in Sparc has 'struct frame' which conflicts with Emacs' 'struct frame', so rename it */ ++#ifdef __sparc__ ++#define frame freebsd_sparc_frame ++#endif ++#include ++#ifdef __sparc__ ++#undef frame ++#endif ++#include ++#include ++#endif ++ + #ifdef WINDOWSNT + #define read sys_read + #define write sys_write +@@ -2529,6 +2543,40 @@ + return proclist; + } + ++#elif defined (__FreeBSD__) ++ ++Lisp_Object ++list_system_processes () ++{ ++ int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; ++ size_t len; ++ struct kinfo_proc *procs; ++ size_t i; ++ ++ struct gcpro gcpro1; ++ Lisp_Object proclist = Qnil; ++ ++ if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) ++ return proclist; ++ ++ procs = xmalloc (len); ++ if (sysctl (mib, 3, procs, &len, NULL, 0) != 0) ++ { ++ xfree (procs); ++ return proclist; ++ } ++ ++ GCPRO1 (proclist); ++ len /= sizeof (struct kinfo_proc); ++ for (i = 0; i < len; i++) ++ proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); ++ UNGCPRO; ++ ++ xfree (procs); ++ ++ return proclist; ++} ++ + /* The WINDOWSNT implementation is in w32.c. + The MSDOS implementation is in dosfns.c. */ + #elif !defined (WINDOWSNT) && !defined (MSDOS) +@@ -3079,6 +3127,176 @@ + return attrs; + } + ++#elif defined(__FreeBSD__) ++ ++Lisp_Object ++system_process_attributes (Lisp_Object pid) ++{ ++ int proc_id; ++ int pagesize = getpagesize(); ++ int npages; ++ int fscale; ++ struct passwd *pw; ++ struct group *gr; ++ char *ttyname; ++ size_t len; ++ char args[MAXPATHLEN]; ++ EMACS_TIME t, now; ++ ++ int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID}; ++ struct kinfo_proc proc; ++ size_t proclen = sizeof(proc); ++ ++ struct gcpro gcpro1, gcpro2; ++ Lisp_Object attrs = Qnil; ++ Lisp_Object decoded_comm; ++ ++ CHECK_NUMBER_OR_FLOAT (pid); ++ proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid); ++ mib[3] = proc_id; ++ ++ if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) ++ return attrs; ++ ++ GCPRO2 (attrs, decoded_comm); ++ ++ attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float(proc.ki_uid)), attrs); ++ ++ BLOCK_INPUT; ++ pw = getpwuid (proc.ki_uid); ++ UNBLOCK_INPUT; ++ if (pw) ++ attrs = Fcons (Fcons (Quser, build_string (pw->pw_name)), attrs); ++ ++ attrs = Fcons (Fcons (Qegid, make_fixnum_or_float(proc.ki_svgid)), attrs); ++ ++ BLOCK_INPUT; ++ gr = getgrgid (proc.ki_svgid); ++ UNBLOCK_INPUT; ++ if (gr) ++ attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); ++ ++ decoded_comm = code_convert_string_norecord ++ (make_unibyte_string (proc.ki_comm, strlen (proc.ki_comm)), ++ Vlocale_coding_system, 0); ++ ++ attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); ++ { ++ char state[2] = {'\0', '\0'}; ++ switch (proc.ki_stat) ++ { ++ case SRUN: ++ state[0] = 'R'; ++ break; ++ ++ case SSLEEP: ++ state[0] = 'S'; ++ break; ++ ++ case SLOCK: ++ state[0] = 'D'; ++ break; ++ ++ case SZOMB: ++ state[0] = 'Z'; ++ break; ++ ++ case SSTOP: ++ state[0] = 'T'; ++ break; ++ } ++ attrs = Fcons (Fcons (Qstate, build_string (state)), attrs); ++ } ++ ++ attrs = Fcons (Fcons (Qppid, make_fixnum_or_float (proc.ki_ppid)), attrs); ++ attrs = Fcons (Fcons (Qpgrp, make_fixnum_or_float (proc.ki_pgid)), attrs); ++ attrs = Fcons (Fcons (Qsess, make_fixnum_or_float (proc.ki_sid)), attrs); ++ ++ BLOCK_INPUT; ++ ttyname = proc.ki_tdev == NODEV ? NULL : devname (proc.ki_tdev, S_IFCHR); ++ UNBLOCK_INPUT; ++ if (ttyname) ++ attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs); ++ ++ attrs = Fcons (Fcons (Qtpgid, make_fixnum_or_float (proc.ki_tpgid)), attrs); ++ attrs = Fcons (Fcons (Qminflt, make_fixnum_or_float (proc.ki_rusage.ru_minflt)), attrs); ++ attrs = Fcons (Fcons (Qmajflt, make_fixnum_or_float (proc.ki_rusage.ru_majflt)), attrs); ++ attrs = Fcons (Fcons (Qcminflt, make_number (proc.ki_rusage_ch.ru_minflt)), attrs); ++ attrs = Fcons (Fcons (Qcmajflt, make_number (proc.ki_rusage_ch.ru_majflt)), attrs); ++ ++#define TIMELIST(ts) \ ++ list3 (make_number (EMACS_SECS (ts) >> 16 & 0xffff), \ ++ make_number (EMACS_SECS (ts) & 0xffff), \ ++ make_number (EMACS_USECS (ts))) ++ ++ attrs = Fcons (Fcons (Qutime, TIMELIST(proc.ki_rusage.ru_utime)), attrs); ++ attrs = Fcons (Fcons (Qstime, TIMELIST(proc.ki_rusage.ru_stime)), attrs); ++ EMACS_ADD_TIME (t, proc.ki_rusage.ru_utime, proc.ki_rusage.ru_stime); ++ attrs = Fcons (Fcons (Qtime, TIMELIST(t)), attrs); ++ ++ attrs = Fcons (Fcons (Qcutime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs); ++ attrs = Fcons (Fcons (Qcstime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs); ++ EMACS_ADD_TIME (t, proc.ki_rusage_ch.ru_utime, proc.ki_rusage_ch.ru_stime); ++ attrs = Fcons (Fcons (Qctime, TIMELIST(t)), attrs); ++ ++ attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (proc.ki_numthreads)), attrs); ++ attrs = Fcons (Fcons (Qpri, make_number (proc.ki_pri.pri_native)), attrs); ++ attrs = Fcons (Fcons (Qnice, make_number (proc.ki_nice)), attrs); ++ attrs = Fcons (Fcons (Qstart, TIMELIST(proc.ki_start)), attrs); ++ attrs = Fcons (Fcons (Qvsize, make_number (proc.ki_size >> 10)), attrs); ++ attrs = Fcons (Fcons (Qrss, make_number (proc.ki_rssize * pagesize >> 10)), attrs); ++ ++ EMACS_GET_TIME (now); ++ EMACS_SUB_TIME (t, now, proc.ki_start); ++ attrs = Fcons (Fcons (Qetime, TIMELIST(t)), attrs); ++ ++#undef TIMELIST ++ ++ len = sizeof(fscale); ++ if (sysctlbyname ("kern.fscale", &fscale, &len, NULL, 0) == 0) ++ { ++ float pcpu; ++ fixpt_t ccpu; ++ len = sizeof (ccpu); ++ if (sysctlbyname ("kern.ccpu", &ccpu, &len, NULL, 0) == 0) ++ { ++ pcpu = 100.0 * ((double) proc.ki_pctcpu / fscale) ++ / (1.0 - exp(proc.ki_swtime * log((double) ccpu / fscale))); ++ attrs = Fcons (Fcons (Qpcpu, make_fixnum_or_float(pcpu)), attrs); ++ } ++ } ++ ++ len = sizeof(npages); ++ if (sysctlbyname ("hw.availpages", &npages, &len, NULL, 0) == 0) ++ { ++ float pmem = proc.ki_flag & P_INMEM ++ ? 100.0 * ((float) proc.ki_rssize / npages) ++ : 0.0; ++ attrs = Fcons (Fcons (Qpmem, make_fixnum_or_float(pmem)), attrs); ++ } ++ ++ mib[2] = KERN_PROC_ARGS; ++ len = MAXPATHLEN; ++ if (sysctl (mib, 4, args, &len, NULL, 0) == 0) ++ { ++ int i; ++ for (i = 0; i < len; i++) ++ { ++ if (! args[i] && i < len - 1) ++ args[i] = ' '; ++ } ++ ++ decoded_comm = code_convert_string_norecord ++ (make_unibyte_string (args, strlen (args)), ++ Vlocale_coding_system, 0); ++ ++ attrs = Fcons (Fcons (Qargs, decoded_comm), attrs); ++ } ++ ++ UNGCPRO; ++ return attrs; ++} ++ + /* The WINDOWSNT implementation is in w32.c. + The MSDOS implementation is in dosfns.c. */ + #elif !defined (WINDOWSNT) && !defined (MSDOS) diff -urN /usr/ports/editors/emacs/files/patch-src_term.c emacs/files/patch-src_term.c --- /usr/ports/editors/emacs/files/patch-src_term.c 1970-01-01 05:30:00.000000000 +0530 +++ emacs/files/patch-src_term.c 2012-07-24 15:43:55.031034201 +0530 @@ -0,0 +1,22 @@ +$FreeBSD$ + +$NetBSD: patch-ag,v 1.13 2010/05/15 10:00:57 roy Exp $ + +When running terminfo but compiled for termcap, we cannot assume +that we actually have anything useable in termcap_term_buffer so just +use the terminfo fixed size defined ealier. + +--- src/term.c 2010-01-06 10:11:04.000000000 +0000 ++++ src/term.c 2010-01-06 10:11:53.000000000 +0000 +@@ -3590,11 +3590,6 @@ + #endif + } + +-#ifndef TERMINFO +- if (strlen (tty->termcap_term_buffer) >= buffer_size) +- abort (); +- buffer_size = strlen (tty->termcap_term_buffer); +-#endif + tty->termcap_strings_buffer = area = (char *) xmalloc (buffer_size); + tty->TS_ins_line = tgetstr ("al", address); + tty->TS_ins_multi_lines = tgetstr ("AL", address); diff -urN /usr/ports/editors/emacs/pkg-plist emacs/pkg-plist --- /usr/ports/editors/emacs/pkg-plist 2011-05-11 16:45:48.000000000 +0530 +++ emacs/pkg-plist 2010-11-21 07:11:45.000000000 +0530 @@ -1,4 +1,3 @@ -bin/b2m bin/ctags bin/ebrowse bin/emacs