Sat Jan 10 16:15:30 2015 UTC ()
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.


(gdt)
diff -r1.30 -r1.31 pkgsrc/editors/emacs24/Makefile
diff -r1.14 -r1.15 pkgsrc/editors/emacs24/distinfo
diff -r1.7 -r1.8 pkgsrc/editors/emacs24-nox11/Makefile
diff -r0 -r1.1 pkgsrc/editors/emacs24/patches/patch-gnu_readlinkat.c

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

--- pkgsrc/editors/emacs24/Attic/Makefile 2014/10/28 12:43:21 1.30
+++ pkgsrc/editors/emacs24/Attic/Makefile 2015/01/10 16:15:29 1.31
@@ -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
 3PKGREVISION= 1
2 4
3CONFLICTS+= emacs24-nox11-[0-9]* 5CONFLICTS+= 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"

cvs diff -r1.14 -r1.15 pkgsrc/editors/emacs24/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/emacs24/Attic/distinfo 2014/10/28 12:43:21 1.14
+++ pkgsrc/editors/emacs24/Attic/distinfo 2015/01/10 16:15:30 1.15
@@ -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
3SHA1 (emacs-24.4.tar.gz) = df540d889a685a3ccaae94682b3ff131968e2706 3SHA1 (emacs-24.4.tar.gz) = df540d889a685a3ccaae94682b3ff131968e2706
4RMD160 (emacs-24.4.tar.gz) = 52bec18c5f8e4ee7ea3b765620c0f19d2ee524c9 4RMD160 (emacs-24.4.tar.gz) = 52bec18c5f8e4ee7ea3b765620c0f19d2ee524c9
5Size (emacs-24.4.tar.gz) = 59020082 bytes 5Size (emacs-24.4.tar.gz) = 59020082 bytes
 6SHA1 (patch-gnu_readlinkat.c) = 9252c92290ccf1d4094bbd3972d8309ebf9e57d6

cvs diff -r1.7 -r1.8 pkgsrc/editors/emacs24-nox11/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/editors/emacs24-nox11/Attic/Makefile 2014/10/28 12:44:05 1.7
+++ pkgsrc/editors/emacs24-nox11/Attic/Makefile 2015/01/10 16:15:30 1.8
@@ -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
3PKGNAME= ${DISTNAME:S/emacs/emacs24/:S/-/-nox11-/} 3PKGNAME= ${DISTNAME:S/emacs/emacs24/:S/-/-nox11-/}
 4PKGREVISION= 1
4 5
5CONFLICTS+= emacs24-[0-9]* 6CONFLICTS+= emacs24-[0-9]*
6 7
7FILESDIR= ${.CURDIR}/../../editors/emacs24/files 8FILESDIR= ${.CURDIR}/../../editors/emacs24/files
8PATCHDIR= ${.CURDIR}/../../editors/emacs24/patches 9PATCHDIR= ${.CURDIR}/../../editors/emacs24/patches
9PKGDIR= ${.CURDIR}/../../editors/emacs24 10PKGDIR= ${.CURDIR}/../../editors/emacs24
10 11
11.include "../../editors/emacs24/Makefile.common" 12.include "../../editors/emacs24/Makefile.common"
12 13
13CONFIGURE_ARGS+= --without-dbus --without-m17n-flt --without-otf 14CONFIGURE_ARGS+= --without-dbus --without-m17n-flt --without-otf
14CONFIGURE_ARGS+= --without-rsvg --without-x --without-xft 15CONFIGURE_ARGS+= --without-rsvg --without-x --without-xft
15CONFIGURE_ARGS+= --without-gif --without-jpeg --without-png 16CONFIGURE_ARGS+= --without-gif --without-jpeg --without-png
16CONFIGURE_ARGS+= --without-tiff --without-xpm 17CONFIGURE_ARGS+= --without-tiff --without-xpm

File Added: pkgsrc/editors/emacs24/patches/Attic/patch-gnu_readlinkat.c
$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