ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11"
Anonymous
swell.k at gmail.com
Wed Jun 2 17:50:06 UTC 2010
The following reply was made to PR ports/146979; it has been noted by GNATS.
From: Anonymous <swell.k at gmail.com>
To: wahjava at gmail.com (Ashish SHUKLA)
Cc: keramida at freebsd.org (Giorgos Keramidas), Paul Hoffman <phoffman at proper.com>, bug-followup at freebsd.org
Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11"
Date: Wed, 02 Jun 2010 17:42:58 +0000
wahjava at gmail.com (Ashish SHUKLA) writes:
>> Note: -lpthread is only present when -nostdilb is *not* specified.
>
> So the problem is the exclusion of 'pthread_*' routines from '-lgcc -lgcc_s'
> of GCC 3.4 (or whatever version ships with 6.x) and GCC 4.5 ? or is it
> exclusion of those routines from 'libc' of 9.x and 6.x ?
No. -nostdlib cancels implicit -lpthread from -pthread option. So,
-lpthread should be specified explicitly. It just doesn't link against
threading library otherwise.
--- dbus_pthread.diff begins here ---
Explicitly link against -lpthread only if dbus has -pthread in ldflags.
Command line bit stolen from Mk/bsd.gecko.mk.
Index: editors/emacs/Makefile
===================================================================
RCS file: /a/.cvsup/ports/editors/emacs/Makefile,v
retrieving revision 1.96
diff -u -p -r1.96 Makefile
--- editors/emacs/Makefile 31 May 2010 01:58:29 -0000 1.96
+++ editors/emacs/Makefile 2 Jun 2010 17:20:19 -0000
@@ -68,6 +68,8 @@
.include <bsd.port.options.mk>
+DBUS_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE}
+
.if defined(WITHOUT_X11)
CONFIGURE_ARGS+= --without-x
.else
@@ -213,14 +212,13 @@ PLIST_SUB+= SOURCES=""
BROKEN= Emacs 23.X does not currently build on ia64
.endif
-.if ${OSVERSION} < 700000 && defined(WITHOUT_X11) && defined(WITH_DBUS)
-BROKEN= Does not currently build with dbus support but without X11
-.endif
-
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
+post-configure:
+ @${REINPLACE_CMD} -e '/^DBUS_LIBS/s/-pthread/& ${DBUS_PTHREAD_LIBS}/' ${WRKSRC}/src/Makefile
+
.if defined(WITH_SOURCES)
post-install:
@${MKDIR} ${DATADIR}/${EMACS_VER}/src
--- dbus_pthread.diff ends here ---
More information about the freebsd-ports-bugs
mailing list