Copy gnulib readlinkat patch from archivers/gtar-base. This undefines readlink so that the twisty maze of symlinks builds, and fixes the build on netbsd-5. Confirmed to work on netbsd-5/amd64 and netbsd-6/i386. Thanks to obache@ for pointing out the problem. I will request a pullup to 2014Q4 soon if there are no objections.diff -r1.30 -r1.31 pkgsrc/editors/emacs24/Makefile
(gdt)
@@ -1,11 +1,13 @@ | @@ -1,11 +1,13 @@ | |||
1 | # $NetBSD: Makefile,v 1.30 2014/10/28 12:43:21 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.31 2015/01/10 16:15:29 gdt Exp $ | |
2 | ||||
3 | PKGREVISION= 1 | |||
2 | 4 | |||
3 | CONFLICTS+= emacs24-nox11-[0-9]* | 5 | CONFLICTS+= emacs24-nox11-[0-9]* | |
4 | 6 | |||
5 | .include "../../editors/emacs24/Makefile.common" | 7 | .include "../../editors/emacs24/Makefile.common" | |
6 | 8 | |||
7 | .include "options.mk" | 9 | .include "options.mk" | |
8 | 10 | |||
9 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | 11 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | |
10 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | 12 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | |
11 | .include "../../mk/bsd.pkg.mk" | 13 | .include "../../mk/bsd.pkg.mk" |
@@ -1,5 +1,6 @@ | @@ -1,5 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.14 2014/10/28 12:43:21 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.15 2015/01/10 16:15:30 gdt Exp $ | |
2 | 2 | |||
3 | SHA1 (emacs-24.4.tar.gz) = df540d889a685a3ccaae94682b3ff131968e2706 | 3 | SHA1 (emacs-24.4.tar.gz) = df540d889a685a3ccaae94682b3ff131968e2706 | |
4 | RMD160 (emacs-24.4.tar.gz) = 52bec18c5f8e4ee7ea3b765620c0f19d2ee524c9 | 4 | RMD160 (emacs-24.4.tar.gz) = 52bec18c5f8e4ee7ea3b765620c0f19d2ee524c9 | |
5 | Size (emacs-24.4.tar.gz) = 59020082 bytes | 5 | Size (emacs-24.4.tar.gz) = 59020082 bytes | |
6 | SHA1 (patch-gnu_readlinkat.c) = 9252c92290ccf1d4094bbd3972d8309ebf9e57d6 |
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.7 2014/10/28 12:44:05 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.8 2015/01/10 16:15:30 gdt Exp $ | |
2 | 2 | |||
3 | PKGNAME= ${DISTNAME:S/emacs/emacs24/:S/-/-nox11-/} | 3 | PKGNAME= ${DISTNAME:S/emacs/emacs24/:S/-/-nox11-/} | |
4 | PKGREVISION= 1 | |||
4 | 5 | |||
5 | CONFLICTS+= emacs24-[0-9]* | 6 | CONFLICTS+= emacs24-[0-9]* | |
6 | 7 | |||
7 | FILESDIR= ${.CURDIR}/../../editors/emacs24/files | 8 | FILESDIR= ${.CURDIR}/../../editors/emacs24/files | |
8 | PATCHDIR= ${.CURDIR}/../../editors/emacs24/patches | 9 | PATCHDIR= ${.CURDIR}/../../editors/emacs24/patches | |
9 | PKGDIR= ${.CURDIR}/../../editors/emacs24 | 10 | PKGDIR= ${.CURDIR}/../../editors/emacs24 | |
10 | 11 | |||
11 | .include "../../editors/emacs24/Makefile.common" | 12 | .include "../../editors/emacs24/Makefile.common" | |
12 | 13 | |||
13 | CONFIGURE_ARGS+= --without-dbus --without-m17n-flt --without-otf | 14 | CONFIGURE_ARGS+= --without-dbus --without-m17n-flt --without-otf | |
14 | CONFIGURE_ARGS+= --without-rsvg --without-x --without-xft | 15 | CONFIGURE_ARGS+= --without-rsvg --without-x --without-xft | |
15 | CONFIGURE_ARGS+= --without-gif --without-jpeg --without-png | 16 | CONFIGURE_ARGS+= --without-gif --without-jpeg --without-png | |
16 | CONFIGURE_ARGS+= --without-tiff --without-xpm | 17 | CONFIGURE_ARGS+= --without-tiff --without-xpm |
$NetBSD: patch-gnu_readlinkat.c,v 1.1 2015/01/10 16:15:30 gdt Exp $
* workaround for NetBSD-5.x, readlink is defined as a macro.
--- lib/readlinkat.c.orig 2013-06-29 05:54:25.000000000 +0000
+++ lib/readlinkat.c
@@ -41,6 +41,7 @@
#define AT_FUNC_POST_FILE_PARAM_DECLS , char *buf, size_t len
#define AT_FUNC_POST_FILE_ARGS , buf, len
#define AT_FUNC_RESULT ssize_t
+#undef readlink
#include "at-func.c"
#undef AT_FUNC_NAME
#undef AT_FUNC_F1