Bug 179843 - emacs and texinfo collide
Summary: emacs and texinfo collide
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-22 17:30 UTC by ben
Modified: 2014-01-04 20:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ben 2013-06-22 17:30:00 UTC
Installing texinfo-5.1.20130419_1...pkg-static: texinfo-5.1.20130419_1
conflicts with emacs-24.3,3 (installs files into the same place).
Problematic file: /usr/local/info/info.info.gz
Comment 1 dfilter service freebsd_committer 2014-01-02 15:43:28 UTC
Author: ashish
Date: Thu Jan  2 15:43:18 2014
New Revision: 338450
URL: http://svnweb.freebsd.org/changeset/ports/338450

Log:
  - Add PKGNAMESUFFIX
  - Add STAGE support
  - Use OptionsNG helpers
  - Rename X11TOOLKIT option to X11
  - Add OPTIONS for emacs-nox11 slave
  - Install info manuals to their own directory to avoid conflicts[1][3][4]
  - Add a patch from upstream to fix building on non-X11 platforms[2]
  - Add a patch from upstream to fix building on 9.x and later platforms
    due to C11 support
  - Explicitly depend on GCC for i386 platforms, broken due to clang bug# 18171
  - Mark port as MAKE_JOBS_SAFE
  
  PR:		ports/183064[2], ports/181758[3], ports/179843[4]
  Reported by:	Jay Borkenhagen <jayb at braeburn.org>[1]

Added:
  head/editors/emacs/files/patch-c113322.diff   (contents, props changed)
  head/editors/emacs/files/patch-src_xdisp.c   (contents, props changed)
Modified:
  head/editors/emacs-nox11/Makefile
  head/editors/emacs/Makefile
  head/editors/emacs/files/patch-src_sysdep.c
  head/editors/emacs/pkg-plist

Modified: head/editors/emacs-nox11/Makefile
==============================================================================
--- head/editors/emacs-nox11/Makefile	Thu Jan  2 15:36:47 2014	(r338449)
+++ head/editors/emacs-nox11/Makefile	Thu Jan  2 15:43:18 2014	(r338450)
@@ -1,33 +1,17 @@
 # Created by: phoffman@proper.com
 # $FreeBSD$
 
-PORTREVISION=		8
 PKGNAMESUFFIX=	-nox11
 
-WITHOUT_CANNA=		yes
-WITHOUT_DBUS=		yes
-WITHOUT_GCONF=		yes
-WITHOUT_GTK2=		yes
-WITHOUT_JPEG=		yes
-WITHOUT_M17N=		yes
-WITHOUT_MOTIF=		yes
-WITHOUT_OTF=		yes
-WITHOUT_PNG=		yes
-WITHOUT_SVG=		yes
-WITHOUT_TIFF=		yes
-WITHOUT_XAW=		yes
-WITHOUT_XAW3D=		yes
-WITH_SYNC_INPUT=	yes
-WITHOUT_SCROLLBARS=	yes
-WITHOUT_X11=		yes
-WITHOUT_XFT=		yes
-WITHOUT_XIM=		yes
-WITHOUT_XPM=		yes
+PORTREVISION=	9
+
+OPTIONS_EXCLUDE=GCONF GIF JPEG OTF M17N PNG SVG TIFF SYNC_INPUT GTK2 GTK3 \
+		SCROLLBARS XFT XIM XPM MAGICK GSETTINGS X11 CANNA \
+		XAW XAW3D MOTIF
 
 EMACS_NO_X11_SLAVE=	yes
 
 MASTERDIR=	${.CURDIR}/../emacs
 LATEST_LINK=	emacs-nox11
 
-NO_STAGE=	yes
 .include "${MASTERDIR}/Makefile"

Modified: head/editors/emacs/Makefile
==============================================================================
--- head/editors/emacs/Makefile	Thu Jan  2 15:36:47 2014	(r338449)
+++ head/editors/emacs/Makefile	Thu Jan  2 15:43:18 2014	(r338450)
@@ -3,10 +3,15 @@
 
 PORTNAME=	emacs
 PORTVERSION=	${EMACS_VER}
+PORTREVISION?=	1
 PORTEPOCH=	3
 CATEGORIES=	editors ipv6
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	${PORTNAME}
+PKGNAMESUFFIX?=	24
+
+PATCH_SITE_SUBDIR+=	ashish
+PATCH_DIST_STRIP=	-p1
 
 MAINTAINER=	ashish@FreeBSD.org
 COMMENT=	GNU editing macros
@@ -14,6 +19,7 @@ COMMENT=	GNU editing macros
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+MAKE_JOBS_SAFE=	yes
 
 CONFLICTS=	emacs-19.* emacs-21.* emacs-22.* emacs-23.* \
 		xemacs-[0-9]* xemacs-devel-[0-9]* \
@@ -25,13 +31,13 @@ USES=		ncurses gmake pkgconfig
 USE_XZ=		yes
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS=	--localstatedir=/var
+INFO_PATH=	${DATADIR_REL}/info
+CONFIGURE_ARGS=	--localstatedir=/var --without-compress-info
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 MAN1=		ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \
 		grep-changelog.1
-MANCOMPRESSED=	yes
-PLIST_SUB=	EMACS_VER=${EMACS_VER}
+PLIST_SUB=	EMACS_VER=${EMACS_VER} INFODIR=${INFO_PATH}
 
 EMACS_DIRS=	${DATADIR}/${EMACS_VER}/leim ${DATADIR}/${EMACS_VER}/lisp ${DATADIR}/${EMACS_VER}/src \
 		${PREFIX}/libexec/${PORTNAME}
@@ -45,12 +51,11 @@ INFO=		ada-mode auth autotype bovine cal
 		org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve \
 		smtpmail speedbar srecode tramp url vip viper widget wisent woman
 
-.if !defined(EMACS_NO_X11_SLAVE)
 CONFLICTS+=	emacs-nox11-[0-9]*
-OPTIONS_DEFINE=	CANNA DBUS GCONF GIF JPEG M17N OTF PNG SOUND SOURCES SVG TIFF SYNC_INPUT SCROLLBARS XFT \
+OPTIONS_DEFINE=	CANNA DBUS GCONF GIF JPEG M17N OTF PNG SOUND SOURCES SVG TIFF SYNC_INPUT SCROLLBARS X11 XFT \
 		XIM XML XPM MAGICK GNUTLS GSETTINGS
 
-OPTIONS_SINGLE=	X11TOOLKIT
+OPTIONS_SINGLE=	X11
 
 CANNA_DESC=		Canna support
 GSETTINGS_DESC=		GSettings support (requires DBUS)
@@ -64,183 +69,143 @@ 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_SINGLE_X11=	GTK2 GTK3 XAW XAW3D MOTIF
 
+.if !defined(EMACS_NO_X11_SLAVE)
 OPTIONS_DEFAULT=DBUS GCONF GIF GTK2 JPEG M17N OTF PNG SOUND SOURCES SVG TIFF SYNC_INPUT \
-		SCROLLBARS XFT XIM XML XPM MAGICK GNUTLS GSETTINGS
+		SCROLLBARS XFT XIM XML XPM MAGICK GNUTLS GSETTINGS X11
+.else
+OPTIONS_DEFAULT=SOURCES GNUTLS XML
 .endif
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
-
-DBUS_PTHREAD_LIBS=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
+OPTIONS_SUB=		SOURCES
 
-.if ${PORT_OPTIONS:MCANNA}
-PATCH_SITES+=	http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL}
-PATCH_SITE_SUBDIR+=	ashish
-PATCHFILES+=	emacs24.3canna-20130321.diff.gz
-PATCH_DIST_STRIP=	-p1
-CONFIGURE_ARGS+=	--with-canna \
+CANNA_CONFIGURE_ON=	--with-canna \
 			--with-canna-includes=${LOCALBASE}/include \
 			--with-canna-libraries=${LOCALBASE}/lib
-LIB_DEPENDS+=		canna:${PORTSDIR}/japanese/canna-lib
-.endif
+CANNA_PATCH_SITES=	http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL}
+CANNA_PATCHFILES=	emacs24.3canna-20130321.diff.gz
+CANNA_LIB_DEPENDS=	canna:${PORTSDIR}/japanese/canna-lib
 
-.if defined(WITHOUT_X11)
-CONFIGURE_ARGS+=	--without-x
-.else
-USE_XORG=	x11
-USE_GNOME=
-INSTALLS_ICONS=	yes
+SOUND_CONFIGURE_WITH=		sound
 
-.if ${PORT_OPTIONS:MSVG}
-USE_GNOME+=	librsvg2
-.else
-CONFIGURE_ARGS+=	--without-rsvg
-.endif
+DBUS_LIB_DEPENDS=		dbus-1:${PORTSDIR}/devel/dbus
+DBUS_CONFIGURE_WITH=		dbus
 
-.if ${PORT_OPTIONS:MGTK2}
-USE_GNOME+=	gtk20
-CONFIGURE_ARGS+=	--with-x-toolkit=gtk2
-.elif ${PORT_OPTIONS:MGTK3}
-USE_GNOME+=	gtk30
-CONFIGURE_ARGS+=	--with-x-toolkit=gtk3
-.elif ${PORT_OPTIONS:MXAW3D}
-LIB_DEPENDS+=	Xaw3d:${PORTSDIR}/x11-toolkits/Xaw3d
-CONFIGURE_ARGS+=	--with-x-toolkit=athena
-.elif ${PORT_OPTIONS:MXAW}
-USE_XORG=	xaw
-CONFIGURE_ARGS+=	--with-x-toolkit=athena --without-xaw3d
-.elif ${PORT_OPTIONS:MMOTIF}
-USES+=		motif
-CONFIGURE_ARGS+=	--with-x-toolkit=motif
-.endif
+GNUTLS_LIB_DEPENDS=	gnutls:${PORTSDIR}/security/gnutls
+GNUTLS_CONFIGURE_WITH=	gnutls
 
-.if !${PORT_OPTIONS:MSCROLLBARS}
-CONFIGURE_ARGS+=	--without-toolkit-scroll-bars
-.endif
+XML_USE=		GNOME=libxml2
+XML_CONFIGURE_WITH=	xml2
 
-.if !${PORT_OPTIONS:MSYNC_INPUT}
-CONFIGURE_ARGS+=	--without-sync-input
-.endif
+SVG_USE=	GNOME=librsvg2
+SVG_CONFIGURE_WITH=	rsvg
 
-.if ${PORT_OPTIONS:MJPEG}
-LIB_DEPENDS+=	jpeg:${PORTSDIR}/graphics/jpeg
-.else
-CONFIGURE_ARGS+=	--without-jpeg
-.endif
+GTK2_USE=	GNOME=gtk20
+GTK2_CONFIGURE_ON=	--with-x-toolkit=gtk2
 
-.if ${PORT_OPTIONS:MTIFF}
-LIB_DEPENDS+=	tiff:${PORTSDIR}/graphics/tiff
-.else
-CONFIGURE_ARGS+=	--without-tiff
-.endif
+GTK3_USE=	GNOME=gtk30
+GTK3_CONFIGURE_ON=	--with-x-toolkit=gtk3
 
-.if ${PORT_OPTIONS:MGIF}
-LIB_DEPENDS+=   gif:${PORTSDIR}/graphics/giflib
-.else
-CONFIGURE_ARGS+=	--without-gif
-.endif
+XAW3D_LIB_DEPENDS=	Xaw3d:${PORTSDIR}/x11-toolkits/Xaw3d
+XAW3D_CONFIGURE_ON=	--with-x-toolkit=athena
 
-.if ${PORT_OPTIONS:MPNG}
-LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
-.else
-CONFIGURE_ARGS+=	--without-png
-.endif
+XAW_USE=	XORG=xaw
+XAW_CONFIGURE_ON+=	--with-x-toolkit=athena --without-xaw3d
 
-.if ${PORT_OPTIONS:MXPM}
-USE_XORG+=	xpm
-.else
-CONFIGURE_ARGS+=	--without-xpm
-.endif
+MOTIF_USES=	motif
+MOTIF_CONFIGURE_ON+=	--with-x-toolkit=motif
 
-.if ${PORT_OPTIONS:MXFT}
-USE_XORG+=	xft
-LIB_DEPENDS+=	freetype:${PORTSDIR}/print/freetype2
-CONFIGURE_ARGS+=	--with-xft
-.if ${PORT_OPTIONS:MM17N}
-CONFIGURE_ARGS+=	--with-m17n-flt
-LIB_DEPENDS+=	m17n:${PORTSDIR}/devel/m17n-lib
-.else
-CONFIGURE_ARGS+=	--without-m17n-flt
-.endif
-.if ${PORT_OPTIONS:MOTF}
-CONFIGURE_ARGS+=	--with-otf
-LIB_DEPENDS+=	otf:${PORTSDIR}/print/libotf
-.else
-CONFIGURE_ARGS+=	--without-libotf
+SCROLLBARS_CONFIGURE_WITH=	toolkit-scroll-bars
+
+SYNC_INPUT_CONFIGURE_WITH=	sync-input
+
+JPEG_LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg
+JPEG_CONFIGURE_WITH=	jpeg
+
+TIFF_LIB_DEPENDS=	tiff:${PORTSDIR}/graphics/tiff
+TIFF_CONFIGURE_WITH=	tiff
+
+GIF_LIB_DEPENDS=	gif:${PORTSDIR}/graphics/giflib
+GIF_CONFIGURE_WITH=	gif
+
+PNG_LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
+PNG_CONFIGURE_WITH=	png
+
+XPM_USE=		XORG=xpm
+XPM_CONFIGURE_WITH=	xpm
+
+XFT_USE=		XORG=xft
+XFT_LIB_DEPENDS=	freetype:${PORTSDIR}/print/freetype2
+XFT_CONFIGURE_WITH=	xft
+
+M17N_LIB_DEPENDS=	m17n:${PORTSDIR}/devel/m17n-lib
+M17N_CONFIGURE_WITH=	m17n-flt
+
+OTF_LIB_DEPENDS=	otf:${PORTSDIR}/print/libotf
+OTF_CONFIGURE_WITH=	libotf
+
+MAGICK_LIB_DEPENDS=	MagickCore:${PORTSDIR}/graphics/ImageMagick
+MAGICK_CONFIGURE_WITH=	imagemagick
+
+GSETTINGS_USE=			gnome=glib20
+GSETTINGS_CONFIGURE_WITH=	gsettings
+
+GCONF_USE=			gnome=gconf2
+GCONF_CONFIGURE_WITH=		gconf
+
+XIM_CONFIGURE_WITH=		xim
+
+.include <bsd.port.options.mk>
+
+# clang is broken on i386 platform in -O2, due to use of alloca
+# and %esi as frame pointer register
+.if ${ARCH} == "i386"
+USE_GCC=			any
 .endif
-.else
-CONFIGURE_ARGS+=	--without-xft
+
+DBUS_PTHREAD_LIBS=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
+
+.if ${PORT_OPTIONS:MX11}
+
+CONFIGURE_ARGS+=	--with-x
+USE_XORG=		x11
+
+INSTALLS_ICONS=	yes
+
+.if !${PORT_OPTIONS:MXFT}
 .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 ${PORT_OPTIONS:MMAGICK}
-LIB_DEPENDS+=		MagickCore:${PORTSDIR}/graphics/ImageMagick
-CONFIGURE_ARGS+=	--with-imagemagick
 .else
-CONFIGURE_ARGS+=	--without-imagemagick
-.endif
 
-.if ${PORT_OPTIONS:MGSETTINGS}
-USE_GNOME+=	glib20
-CONFIGURE_ARGS+=	--with-gsettings
-.else
-CONFIGURE_ARGS+=	--without-gsettings
-.endif
-
-.if ${PORT_OPTIONS:MGCONF}
-USE_GNOME+=	gconf2
-CONFIGURE_ARGS+=	--with-gconf
-.else
-CONFIGURE_ARGS+=	--without-gconf
-.endif
-
-.if ${PORT_OPTIONS:MXIM}
-CONFIGURE_ARGS+=	--with-xim
-.else
-CONFIGURE_ARGS+=	--without-xim
-.endif
+CONFIGURE_ARGS+=	--without-x
 
+.for OPT in SVG GTK2 GTK3 XAW3D XAW MOTIF SCROLLBARS JPEG TIFF GIF PNG XPM XFT M17N MAGICK GCONF GSETTINGS XIM
+.if ${PORT_OPTIONS:M${OPT}}
+IGNORE=	${OPT} option depends on X11 option
 .endif
+.endfor
 
-.if ${PORT_OPTIONS:MSOUND}
-CONFIGURE_ARGS+=	--with-sound
-.else
-CONFIGURE_ARGS+=	--without-sound
 .endif
 
-.if ${PORT_OPTIONS:MDBUS}
-LIB_DEPENDS+=	dbus-1:${PORTSDIR}/devel/dbus
-CONFIGURE_ARGS+=	--with-dbus
-.else
-CONFIGURE_ARGS+=	--without-dbus
+.if !${PORT_OPTIONS:MDBUS}
 .if ${PORT_OPTIONS:MGSETTINGS}
 IGNORE=	GSettings support requires DBUS. Please run 'make config'
 .endif
 .endif
 
-.if ${PORT_OPTIONS:MXML}
-USE_GNOME+=		libxml2
-CONFIGURE_ARGS+=	--with-xml2
-.else
-CONFIGURE_ARGS+=	--without-xml2
-.endif
+.include <bsd.port.pre.mk>
 
-.if ${PORT_OPTIONS:MGNUTLS}
-LIB_DEPENDS+=		gnutls:${PORTSDIR}/security/gnutls
-CONFIGURE_ARGS+=	--with-gnutls
-.else
-CONFIGURE_ARGS+=	--without-gnutls
+# Building with GCC 4.6+ requires it
+.if ${ncurses_ARGS} == "port"
+LDFLAGS+=	-ltinfo
 .endif
 
-.include <bsd.port.pre.mk>
-
 .if ${ARCH} == "ia64"
 BROKEN=	Emacs 24.X does not currently build on ia64
 .endif
@@ -248,7 +213,7 @@ BROKEN=	Emacs 24.X does not currently bu
 post-patch:
 	@${RM} -f ${WRKSRC}/info/*
 	@${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el
-.if defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 	@${REINPLACE_CMD} -e 's/^Terminal=.*$$/Terminal=true/' ${WRKSRC}/etc/emacs.desktop
 .endif
 
@@ -257,33 +222,29 @@ post-configure:
 
 add-plist-data:
 .for i in ${EMACS_DIRS}
-	@${FIND} ${i} -type f |${SED} -E -e 's,^${PREFIX}/,,g'  >>${TMPPLIST}
+	@${FIND} ${STAGEDIR}${i} -type f |${SED} -E -e 's,^${STAGEDIR}${PREFIX}/,,g'  >>${TMPPLIST}
 .endfor
 	@${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}
 .for i in ${EMACS_DIRS}
-	@${FIND} ${i} -type d -depth |${SED} -E -e 's,^${PREFIX}/,@dirrm ,g' >>${TMPPLIST}
+	@${FIND} ${STAGEDIR}${i} -type d -depth |${SED} -E -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,g' >>${TMPPLIST}
 .endfor
 	@${ECHO} "@unexec rmdir %D/${DATADIR_REL}/${EMACS_VER} 2>/dev/null || true" >>${TMPPLIST}
 
-.if defined(WITH_SOURCES)
-PLIST_SUB+=	SOURCES=""
-
+.if ${PORT_OPTIONS:MSOURCES}
 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
-.else
-PLIST_SUB+=	SOURCES="@comment "
+	@${MKDIR} ${STAGEDIR}${DATADIR}/${EMACS_VER}/src
+	@${INSTALL_DATA} ${WRKSRC}/src/*.[ch] ${STAGEDIR}${DATADIR}/${EMACS_VER}/src
+	@${INSTALL_DATA} ${WRKSRC}/sources.el ${STAGEDIR}${DATADIR}/${EMACS_VER}/site-lisp/site-start.el
 .endif
 
 pre-everything::
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 	@${ECHO_MSG}
-	@${ECHO_MSG} "====> To disable X11 support, define: WITHOUT_X11."
+	@${ECHO_MSG} "====> To disable X11 support, unset option: X11."
 	@${ECHO_MSG}
 .endif
-.if defined(WITH_CANNA)
+.if ${PORT_OPTIONS:MCANNA}
 	@${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."

Added: head/editors/emacs/files/patch-c113322.diff
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/emacs/files/patch-c113322.diff	Thu Jan  2 15:43:18 2014	(r338450)
@@ -0,0 +1,276 @@
+
+$FreeBSD$
+
+Backport of changeset: 113322
+fixes bug: http://debbugs.gnu.org/14812
+committer: Paul Eggert <eggert@cs.ucla.edu>
+branch nick: trunk
+timestamp: Sun 2013-07-07 23:15:38 -0700
+message:
+  Try to fix FreeBSD 9.1 porting problem.
+  
+  This incorporates the following merge from gnulib:
+  2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
+
+--- lib/verify.h.orig
++++ lib/verify.h
+@@ -18,7 +18,7 @@
+ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
+ 
+ #ifndef _GL_VERIFY_H
+-# define _GL_VERIFY_H
++#define _GL_VERIFY_H
+ 
+ 
+ /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+@@ -31,14 +31,24 @@
+    Use this only with GCC.  If we were willing to slow 'configure'
+    down we could also use it with other compilers, but since this
+    affects only the quality of diagnostics, why bother?  */
+-# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus
+-#  define _GL_HAVE__STATIC_ASSERT 1
+-# endif
++#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
++      && (201112L <= __STDC_VERSION__  || !defined __STRICT_ANSI__) \
++      && !defined __cplusplus)
++# define _GL_HAVE__STATIC_ASSERT 1
++#endif
+ /* The condition (99 < __GNUC__) is temporary, until we know about the
+    first G++ release that supports static_assert.  */
+-# if (99 < __GNUC__) && defined __cplusplus
+-#  define _GL_HAVE_STATIC_ASSERT 1
+-# endif
++#if (99 < __GNUC__) && defined __cplusplus
++# define _GL_HAVE_STATIC_ASSERT 1
++#endif
++
++/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
++   system headers, defines a conflicting _Static_assert that is no
++   better than ours; override it.  */
++#ifndef _GL_HAVE_STATIC_ASSERT
++# include <stddef.h>
++# undef _Static_assert
++#endif
+ 
+ /* Each of these macros verifies that its argument R is nonzero.  To
+    be portable, R should be an integer constant expression.  Unlike
+@@ -141,50 +151,50 @@
+      Use a template type to work around the problem.  */
+ 
+ /* Concatenate two preprocessor tokens.  */
+-# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+-# define _GL_CONCAT0(x, y) x##y
++#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
++#define _GL_CONCAT0(x, y) x##y
+ 
+ /* _GL_COUNTER is an integer, preferably one that changes each time we
+    use it.  Use __COUNTER__ if it works, falling back on __LINE__
+    otherwise.  __LINE__ isn't perfect, but it's better than a
+    constant.  */
+-# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+-#  define _GL_COUNTER __COUNTER__
+-# else
+-#  define _GL_COUNTER __LINE__
+-# endif
++#if defined __COUNTER__ && __COUNTER__ != __COUNTER__
++# define _GL_COUNTER __COUNTER__
++#else
++# define _GL_COUNTER __LINE__
++#endif
+ 
+ /* Generate a symbol with the given prefix, making it unique if
+    possible.  */
+-# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
++#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
+ 
+ /* Verify requirement R at compile-time, as an integer constant expression
+    that returns 1.  If R is false, fail at compile-time, preferably
+    with a diagnostic that includes the string-literal DIAGNOSTIC.  */
+ 
+-# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+-    (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
++#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
++   (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+ 
+-# ifdef __cplusplus
+-#  if !GNULIB_defined_struct__gl_verify_type
++#ifdef __cplusplus
++# if !GNULIB_defined_struct__gl_verify_type
+ template <int w>
+   struct _gl_verify_type {
+     unsigned int _gl_verify_error_if_negative: w;
+   };
+-#   define GNULIB_defined_struct__gl_verify_type 1
+-#  endif
+-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+-    _gl_verify_type<(R) ? 1 : -1>
+-# elif defined _GL_HAVE__STATIC_ASSERT
+-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+-     struct {                                   \
+-       _Static_assert (R, DIAGNOSTIC);          \
+-       int _gl_dummy;                          \
+-     }
+-# else
+-#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+-     struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
++#  define GNULIB_defined_struct__gl_verify_type 1
+ # endif
++# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
++    _gl_verify_type<(R) ? 1 : -1>
++#elif defined _GL_HAVE__STATIC_ASSERT
++# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
++    struct {                                   \
++      _Static_assert (R, DIAGNOSTIC);          \
++      int _gl_dummy;                          \
++    }
++#else
++# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
++    struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
++#endif
+ 
+ /* Verify requirement R at compile-time, as a declaration without a
+    trailing ';'.  If R is false, fail at compile-time, preferably
+@@ -193,23 +203,23 @@
+    Unfortunately, unlike C11, this implementation must appear as an
+    ordinary declaration, and cannot appear inside struct { ... }.  */
+ 
+-# ifdef _GL_HAVE__STATIC_ASSERT
+-#  define _GL_VERIFY _Static_assert
+-# else
+-#  define _GL_VERIFY(R, DIAGNOSTIC)				       \
+-     extern int (*_GL_GENSYM (_gl_verify_function) (void))	       \
+-       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+-# endif
++#ifdef _GL_HAVE__STATIC_ASSERT
++# define _GL_VERIFY _Static_assert
++#else
++# define _GL_VERIFY(R, DIAGNOSTIC)				       \
++    extern int (*_GL_GENSYM (_gl_verify_function) (void))	       \
++      [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
++#endif
+ 
+ /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
+-# ifdef _GL_STATIC_ASSERT_H
+-#  if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+-#   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+-#  endif
+-#  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+-#   define static_assert _Static_assert /* C11 requires this #define.  */
+-#  endif
++#ifdef _GL_STATIC_ASSERT_H
++# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
++#  define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
++# endif
++# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
++#  define static_assert _Static_assert /* C11 requires this #define.  */
+ # endif
++#endif
+ 
+ /* @assert.h omit start@  */
+ 
+@@ -227,18 +237,18 @@
+ 
+    verify_true is obsolescent; please use verify_expr instead.  */
+ 
+-# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
++#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+ 
+ /* Verify requirement R at compile-time.  Return the value of the
+    expression E.  */
+ 
+-# define verify_expr(R, E) \
+-    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
++#define verify_expr(R, E) \
++   (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+ 
+ /* Verify requirement R at compile-time, as a declaration without a
+    trailing ';'.  */
+ 
+-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
++#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+ 
+ /* @assert.h omit end@  */
+ 
+
+--- lib/stdalign.in.h.orig
++++ lib/stdalign.in.h
+@@ -41,13 +41,28 @@
+    are 4 unless the option '-malign-double' is used.
+ 
+    The result cannot be used as a value for an 'enum' constant, if you
+-   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
++   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
++
++   Include <stddef.h> for offsetof.  */
+ #include <stddef.h>
+-#if defined __cplusplus
++
++/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
++   standard headers, defines conflicting implementations of _Alignas
++   and _Alignof that are no better than ours; override them.  */
++#undef _Alignas
++#undef _Alignof
++
++#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
++# ifdef __cplusplus
++#  if 201103 <= __cplusplus
++#   define _Alignof(type) alignof (type)
++#  else
+    template <class __t> struct __alignof_helper { char __a; __t __b; };
+-# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+-#else
+-# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
++#   define _Alignof(type) offsetof (__alignof_helper<type>, __b)
++#  endif
++# else
++#  define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
++# endif
+ #endif
+ #define alignof _Alignof
+ #define __alignof_is_defined 1
+@@ -77,12 +92,16 @@
+ 
+    */
+ 
+-#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C
+-# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+-#elif 1300 <= _MSC_VER
+-# define _Alignas(a) __declspec (align (a))
++#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
++# if defined __cplusplus && 201103 <= __cplusplus
++#  define _Alignas(a) alignas (a)
++# elif __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC || 0x5110 <= __SUNPRO_C
++#  define _Alignas(a) __attribute__ ((__aligned__ (a)))
++# elif 1300 <= _MSC_VER
++#  define _Alignas(a) __declspec (align (a))
++# endif
+ #endif
+-#ifdef _Alignas
++#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__)
+ # define alignas _Alignas
+ # define __alignas_is_defined 1
+ #endif
+--- m4/stdalign.m4.orig
++++ m4/stdalign.m4
+@@ -31,7 +31,8 @@
+ 
+             /* Test _Alignas only on platforms where gnulib can help.  */
+             #if \
+-                (__GNUC__ || __IBMC__ || __IBMCPP__ \
++                ((defined __cplusplus && 201103 <= __cplusplus) \
++                 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
+                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
+               int alignas (8) alignas_int = 1;
+               char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
+--- ChangeLog.orig
++++ ChangeLog
+@@ -1,3 +1,9 @@
++2013-07-08  Paul Eggert  <eggert@cs.ucla.edu>
++
++	Try to fix FreeBSD 9.1 porting problem (Bug#14812).
++	This incorporates the following merge from gnulib:
++	2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
++
+ 2013-03-11  Glenn Morris  <rgm@gnu.org>
+ 
+ 	* Verson 24.3 released.

Modified: head/editors/emacs/files/patch-src_sysdep.c
==============================================================================
--- head/editors/emacs/files/patch-src_sysdep.c	Thu Jan  2 15:36:47 2014	(r338449)
+++ head/editors/emacs/files/patch-src_sysdep.c	Thu Jan  2 15:43:18 2014	(r338450)
@@ -3,24 +3,29 @@ $FreeBSD$
 
 --- src/sysdep.c.orig
 +++ src/sysdep.c
-@@ -46,7 +46,15 @@
- #endif
+@@ -37,6 +37,20 @@
+ #include "sysselect.h"
+ #include "blockinput.h"
  
- #ifdef __FreeBSD__
++#ifdef __FreeBSD__
 +#include <sys/sysctl.h>
 +/* machine/frame.h in Sparc/ARM has 'struct frame' which conflicts with Emacs' 'struct frame', so rename it */
 +#if defined(__sparc__) || defined(__arm__)
 +#define frame freebsd_sparc_frame
 +#endif
- #include <sys/user.h>
++#include <sys/user.h>
 +#if defined(__sparc__) || defined(__arm__)
 +#undef frame
 +#endif
- #include <sys/resource.h>
- #include <math.h>
- #endif
-@@ -2691,6 +2699,40 @@
-   return  proclist;
++#include <sys/resource.h>
++#include <math.h>
++#endif
++
+ #ifdef WINDOWSNT
+ #define read sys_read
+ #define write sys_write
+@@ -2529,6 +2543,40 @@
+   return proclist;
  }
  
 +#elif defined (__FreeBSD__)
@@ -60,7 +65,7 @@ $FreeBSD$
  /* The WINDOWSNT implementation is in w32.c.
     The MSDOS implementation is in dosfns.c.  */
  #elif !defined (WINDOWSNT) && !defined (MSDOS)
-@@ -3402,6 +3444,176 @@
+@@ -3079,6 +3127,176 @@
    return attrs;
  }
  

Added: head/editors/emacs/files/patch-src_xdisp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/emacs/files/patch-src_xdisp.c	Thu Jan  2 15:43:18 2014	(r338450)
@@ -0,0 +1,23 @@
+This patch is taken from upstream repository r114482.
+
+
+$FreeBSD$
+
+--- src/xdisp.c.orig
++++ src/xdisp.c
+@@ -6870,6 +6870,7 @@
+ 	}
+     }
+ 
++#ifdef HAVE_WINDOW_SYSTEM
+   /* Adjust face id for a multibyte character.  There are no multibyte
+      character in unibyte text.  */
+   if ((it->what == IT_CHARACTER || it->what == IT_COMPOSITION)
+@@ -6910,6 +6911,7 @@
+ 	  it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string);
+ 	}
+     }
++#endif	/* HAVE_WINDOW_SYSTEM */
+ 
+  done:
+   /* Is this character the last one of a run of characters with

Modified: head/editors/emacs/pkg-plist
==============================================================================
--- head/editors/emacs/pkg-plist	Thu Jan  2 15:36:47 2014	(r338449)
+++ head/editors/emacs/pkg-plist	Thu Jan  2 15:43:18 2014	(r338450)
@@ -5,10 +5,17 @@ bin/emacs-%%EMACS_VER%%
 bin/emacsclient
 bin/etags
 bin/grep-changelog
+man/man1/grep-changelog.1.gz
+man/man1/etags.1.gz
+man/man1/ctags.1.gz
+man/man1/ebrowse.1.gz
+man/man1/emacsclient.1.gz
+man/man1/emacs.1.gz
 share/applications/emacs.desktop
 %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/site-lisp/site-start.el
 %%DATADIR%%/%%EMACS_VER%%/site-lisp/subdirs.el
 %%DATADIR%%/site-lisp/subdirs.el
+%%INFODIR%%/dir
 share/icons/hicolor/128x128/apps/emacs.png
 share/icons/hicolor/16x16/apps/emacs.png
 share/icons/hicolor/24x24/apps/emacs.png
@@ -16,6 +23,7 @@ share/icons/hicolor/32x32/apps/emacs.png
 share/icons/hicolor/48x48/apps/emacs.png
 share/icons/hicolor/scalable/apps/emacs.svg
 share/icons/hicolor/scalable/mimetypes/emacs-document.svg
+@dirrmtry %%INFODIR%%
 @dirrmtry %%DATADIR%%/%%EMACS_VER%%/site-lisp
 @dirrmtry share/icons/hicolor/scalable/mimetypes
 @dirrmtry share/icons/hicolor/scalable/apps
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 Ashish SHUKLA freebsd_committer 2014-01-04 20:26:22 UTC
State Changed
From-To: open->closed

Fixed!