Sun Dec 11 21:00:43 2011 UTC ()
editors/emacs: Fix DragonFly

1) Stop overwriting of alloca on DragonFly
2) Don't overwrite dragonfly.h START_FILES and LIB_STANDARD
3) Remove callouts for gcc41 and gcc44 (specs file handles this)
4) Remove now-unnecessary DFLY_CRT_USRLIB constant
5) New definitions for START_FILES, LIB_STANDARD
6) Specify ORDINARY_LINK


(marino)
diff -r1.30 -r1.31 pkgsrc/editors/emacs/Makefile.common
diff -r1.53 -r1.54 pkgsrc/editors/emacs/distinfo
diff -r1.4 -r1.5 pkgsrc/editors/emacs/files/dragonfly.h
diff -r0 -r1.1 pkgsrc/editors/emacs/patches/patch-src_config.in
diff -r0 -r1.1 pkgsrc/editors/emacs/patches/patch-src_m_amdx86-64.h

cvs diff -r1.30 -r1.31 pkgsrc/editors/emacs/Makefile.common (expand / switch to unified diff)

--- pkgsrc/editors/emacs/Makefile.common 2011/12/03 22:46:30 1.30
+++ pkgsrc/editors/emacs/Makefile.common 2011/12/11 21:00:40 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.30 2011/12/03 22:46:30 jmmv Exp $ 1# $NetBSD: Makefile.common,v 1.31 2011/12/11 21:00:40 marino Exp $
2# 2#
3# used by editors/emacs/Makefile 3# used by editors/emacs/Makefile
4# used by editors/emacs-nox11/Makefile 4# used by editors/emacs-nox11/Makefile
5 5
6DISTNAME= emacs-${EMACS_VERSION}b 6DISTNAME= emacs-${EMACS_VERSION}b
7CATEGORIES= editors 7CATEGORIES= editors
8MASTER_SITES= ${MASTER_SITE_GNU:=emacs/} 8MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
9 9
10MAINTAINER= minskim@NetBSD.org 10MAINTAINER= minskim@NetBSD.org
11HOMEPAGE= http://www.gnu.org/software/emacs/emacs.html 11HOMEPAGE= http://www.gnu.org/software/emacs/emacs.html
12COMMENT= GNU editing macros (editor) 12COMMENT= GNU editing macros (editor)
13LICENSE= gnu-gpl-v3 13LICENSE= gnu-gpl-v3
14 14
@@ -53,30 +53,26 @@ SPECIAL_PERMS+= libexec/emacs/${EMACS_V @@ -53,30 +53,26 @@ SPECIAL_PERMS+= libexec/emacs/${EMACS_V
53# build PATH in the dumped emacs is not a problem 53# build PATH in the dumped emacs is not a problem
54CHECK_WRKREF_SKIP+= bin/emacs 54CHECK_WRKREF_SKIP+= bin/emacs
55CHECK_WRKREF_SKIP+= bin/emacs-${EMACS_VERSION} 55CHECK_WRKREF_SKIP+= bin/emacs-${EMACS_VERSION}
56 56
57.include "../../mk/bsd.prefs.mk" 57.include "../../mk/bsd.prefs.mk"
58 58
59.if (${OPSYS} == "Darwin") 59.if (${OPSYS} == "Darwin")
60# Disable address randomization to fix build with Xcode 4.1. This is from 60# Disable address randomization to fix build with Xcode 4.1. This is from
61# upstream bug #8395. Details in: 61# upstream bug #8395. Details in:
62# http://lists.gnu.org/archive/html/emacs-bug-tracker/2011-07/msg00445.html 62# http://lists.gnu.org/archive/html/emacs-bug-tracker/2011-07/msg00445.html
63CFLAGS+= -fno-pie 63CFLAGS+= -fno-pie
64.endif 64.endif
65 65
66.if (${OPSYS} == "DragonFly") && exists(/usr/lib/crtn.o) 
67CPPFLAGS+= -DDFLY_CRT_USRLIB 
68.endif 
69 
70.if (${OPSYS} == "NetBSD") && exists(/usr/include/term.h) 66.if (${OPSYS} == "NetBSD") && exists(/usr/include/term.h)
71CPPFLAGS+= -DTERMINFO 67CPPFLAGS+= -DTERMINFO
72.elif ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "OpenBSD" 68.elif ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "OpenBSD"
73.include "../../mk/curses.buildlink3.mk" 69.include "../../mk/curses.buildlink3.mk"
74.else 70.else
75.include "../../mk/termcap.buildlink3.mk" 71.include "../../mk/termcap.buildlink3.mk"
76.endif 72.endif
77 73
78.include "../../mk/oss.buildlink3.mk" 74.include "../../mk/oss.buildlink3.mk"
79 75
80post-extract: 76post-extract:
81 cp ${.CURDIR}/../../editors/emacs/files/site-init.el ${WRKSRC}/lisp 77 cp ${.CURDIR}/../../editors/emacs/files/site-init.el ${WRKSRC}/lisp
82 cp ${FILESDIR}/dragonfly.h ${WRKSRC}/src/s 78 cp ${FILESDIR}/dragonfly.h ${WRKSRC}/src/s

cvs diff -r1.53 -r1.54 pkgsrc/editors/emacs/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/emacs/Attic/distinfo 2011/12/03 22:46:30 1.53
+++ pkgsrc/editors/emacs/Attic/distinfo 2011/12/11 21:00:41 1.54
@@ -1,13 +1,15 @@ @@ -1,13 +1,15 @@
1$NetBSD: distinfo,v 1.53 2011/12/03 22:46:30 jmmv Exp $ 1$NetBSD: distinfo,v 1.54 2011/12/11 21:00:41 marino Exp $
2 2
3SHA1 (emacs-23.3b.tar.gz) = 56503472e99bc7c875ec370dec7b40774cfa82da 3SHA1 (emacs-23.3b.tar.gz) = 56503472e99bc7c875ec370dec7b40774cfa82da
4RMD160 (emacs-23.3b.tar.gz) = d253874ecef5c09d35576cf508727f5863c80834 4RMD160 (emacs-23.3b.tar.gz) = d253874ecef5c09d35576cf508727f5863c80834
5Size (emacs-23.3b.tar.gz) = 47930061 bytes 5Size (emacs-23.3b.tar.gz) = 47930061 bytes
6SHA1 (patch-aa) = 951c1d9fe90fbe2c2366ba230106f8d165068d50 6SHA1 (patch-aa) = 951c1d9fe90fbe2c2366ba230106f8d165068d50
7SHA1 (patch-ab) = 053243431964def524b7ba2f82ee78680ff7011e 7SHA1 (patch-ab) = 053243431964def524b7ba2f82ee78680ff7011e
8SHA1 (patch-ac) = bcaff0bd9039c6326df900044a391e15f744af4a 8SHA1 (patch-ac) = bcaff0bd9039c6326df900044a391e15f744af4a
9SHA1 (patch-ad) = e37f73048273801b8fd330d6897346b1f6e55fe9 9SHA1 (patch-ad) = e37f73048273801b8fd330d6897346b1f6e55fe9
10SHA1 (patch-ae) = 116394051b3e2f4220ff5a3de3402923857940b9 10SHA1 (patch-ae) = 116394051b3e2f4220ff5a3de3402923857940b9
11SHA1 (patch-ag) = f462ad22762469360d90060afbc73e660e9f7db5 11SHA1 (patch-ag) = f462ad22762469360d90060afbc73e660e9f7db5
12SHA1 (patch-bf) = 9ff58581e7b9c865397729169fadd3baecc4a1e3 12SHA1 (patch-bf) = 9ff58581e7b9c865397729169fadd3baecc4a1e3
 13SHA1 (patch-src_config.in) = c1f7b608dc49da704571a71f96067a0ffac01df9
 14SHA1 (patch-src_m_amdx86-64.h) = 0928f4e80c456e5b94a74cfeb3589e411a134507
13SHA1 (patch-src_unexmacosx.c) = 5821eb65c1e10192a7b2679691e4651b8d9fb263 15SHA1 (patch-src_unexmacosx.c) = 5821eb65c1e10192a7b2679691e4651b8d9fb263

cvs diff -r1.4 -r1.5 pkgsrc/editors/emacs/files/Attic/dragonfly.h (expand / switch to unified diff)

--- pkgsrc/editors/emacs/files/Attic/dragonfly.h 2009/08/05 22:04:51 1.4
+++ pkgsrc/editors/emacs/files/Attic/dragonfly.h 2011/12/11 21:00:42 1.5
@@ -33,33 +33,29 @@ Boston, MA 02111-1307, USA. */ @@ -33,33 +33,29 @@ Boston, MA 02111-1307, USA. */
33 33
34#define PENDING_OUTPUT_COUNT(FILE) __fpending(FILE) 34#define PENDING_OUTPUT_COUNT(FILE) __fpending(FILE)
35 35
36#define LIBS_DEBUG 36#define LIBS_DEBUG
37#define LIBS_SYSTEM -lutil 37#define LIBS_SYSTEM -lutil
38#define TERMINFO 38#define TERMINFO
39#define LIBS_TERMCAP -lncurses 39#define LIBS_TERMCAP -lncurses
40#define SYSV_SYSTEM_DIR 40#define SYSV_SYSTEM_DIR
41 41
42/* freebsd has POSIX-style pgrp behavior. */ 42/* freebsd has POSIX-style pgrp behavior. */
43#undef BSD_PGRPS 43#undef BSD_PGRPS
44#define GETPGRP_NO_ARG 44#define GETPGRP_NO_ARG
45 45
46#ifdef DFLY_CRT_USRLIB 46#define ORDINARY_LINK
47#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc41/crtbegin.o 47#define START_FILES
48#define LIB_STANDARD -L/usr/lib/gcc41 -lgcc -lc -lgcc /usr/lib/gcc41/crtend.o /usr/lib/crtn.o 48#define LIB_STANDARD -lc
49#else 
50#define START_FILES pre-crt0.o /usr/lib/gcc41/crt1.o /usr/lib/gcc41/crti.o /usr/lib/gcc41/crtbegin.o 
51#define LIB_STANDARD -L/usr/lib/gcc41 -lgcc -lc -lgcc /usr/lib/gcc41/crtend.o /usr/lib/gcc41/crtn.o 
52#endif 
53 49
54#define LD_SWITCH_SYSTEM_1 50#define LD_SWITCH_SYSTEM_1
55#define UNEXEC unexelf.o 51#define UNEXEC unexelf.o
56#undef LIB_GCC 52#undef LIB_GCC
57#define LIB_GCC 53#define LIB_GCC
58 54
59#define HAVE_WAIT_HEADER 55#define HAVE_WAIT_HEADER
60#define HAVE_GETLOADAVG 1 56#define HAVE_GETLOADAVG 1
61#define HAVE_TERMIOS 57#define HAVE_TERMIOS
62#define NO_TERMIO 58#define NO_TERMIO
63#define DECLARE_GETPWUID_WITH_UID_T 59#define DECLARE_GETPWUID_WITH_UID_T
64 60
65/* freebsd uses OXTABS instead of the expected TAB3. */ 61/* freebsd uses OXTABS instead of the expected TAB3. */

File Added: pkgsrc/editors/emacs/patches/Attic/patch-src_config.in
$NetBSD: patch-src_config.in,v 1.1 2011/12/11 21:00:43 marino Exp $

--- src/config.in.orig	2011-11-26 03:20:20.000000000 +0000
+++ src/config.in
@@ -1181,6 +1181,7 @@ extern char *getenv ();
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
+#if !defined(__DragonFly__)
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
 #elif defined __GNUC__
@@ -1194,6 +1195,7 @@ extern "C"
 # endif
 void *alloca (size_t);
 #endif
+#endif /* __DragonFly__ */
 #ifndef HAVE_SIZE_T
 typedef unsigned size_t;
 #endif

File Added: pkgsrc/editors/emacs/patches/Attic/patch-src_m_amdx86-64.h
$NetBSD: patch-src_m_amdx86-64.h,v 1.1 2011/12/11 21:00:43 marino Exp $

--- src/m/amdx86-64.h.orig	2011-11-26 03:20:20.000000000 +0000
+++ src/m/amdx86-64.h
@@ -101,6 +101,10 @@ along with GNU Emacs.  If not, see <http
 
 /* LIB_STANDARD and START_FILES set correctly in s/netbsd.h */
 
+#elif defined(__DragonFly__)
+
+/* LIB_STANDARD and START_FILES set correctly in s/dragonfly.h */
+
 #elif defined(SOLARIS2)
 
 #undef START_FILES