Subject: pkg/26943: pkgsrc emacs PLIST wrong on Darwin (w/suggested patch)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <tlyu@mit.edu>
List: pkgsrc-bugs
Date: 09/14/2004 00:10:45
>Number:         26943
>Category:       pkg
>Synopsis:       pkgsrc emacs PLIST wrong on Darwin (w/suggested patch)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 14 00:11:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tom Yu
>Release:        
>Organization:
>Environment:
Darwin CHAOS-IN-MOTION.MIT.EDU 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug  5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC  Power Macintosh powerpc

>Description:
The PLIST for editors/emacs is incorrect on Darwin.  When building editors/emacs from pkgsrc on Darwin, the files fns-VERSION.el and DOC-VERSION.el don't get created, since loadup.el never runs in a mode that would create a dumped emacs.  (powermac.h defines CANNOT_DUMP)  The PLIST lists fns-VERSION.el and DOC-VERSION.el, while Darwin only has DOC.  As a result, the attempt to register the package fails.
>How-To-Repeat:
Attempt to "bmake install" in editors/emacs from pkgsrc on Darwin.

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/editors/emacs/Makefile,v
retrieving revision 1.73
diff -u -r1.73 Makefile
--- Makefile    31 Jul 2004 21:01:54 -0000      1.73
+++ Makefile    14 Sep 2004 00:02:25 -0000
@@ -56,6 +56,14 @@
 LDFLAGS+=      -Wl,-z,nocombreloc
 .endif
 
+.if ${OPSYS} == "Darwin"
+PLIST_SUBST += NO_FNS_EL="@comment "
+PLIST_SUBST += DOCTAIL=""
+.else
+PLIST_SUBST += NO_FNS_EL=""
+PLIST_SUBST += DOCTAIL="-${PKGVERSION:C/nb[0-9]*$//}.1"
+.endif
+
 .include "../../mk/compiler.mk"
 .if !empty(CC_VERSION:Mgcc-3.*)
 CFLAGS+=       -fno-zero-initialized-in-bss
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/editors/emacs/PLIST,v
retrieving revision 1.9
diff -u -r1.9 PLIST
--- PLIST       16 Feb 2004 20:59:26 -0000      1.9
+++ PLIST       14 Sep 2004 00:02:26 -0000
@@ -12,7 +12,7 @@
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/digest-doc
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/emacsserver
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/fakemail
-libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/fns-${PKGVERSION}.1.el
+${NO_FNS_EL}libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/fns-${PKGVERSION}.1.el
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/hexl
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/movemail
 libexec/emacs/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/profile
@@ -31,7 +31,7 @@
 share/emacs/${PKGVERSION}/etc/COPYING
 share/emacs/${PKGVERSION}/etc/DEBUG
 share/emacs/${PKGVERSION}/etc/DISTRIB
-share/emacs/${PKGVERSION}/etc/DOC-${PKGVERSION}.1
+share/emacs/${PKGVERSION}/etc/DOC${DOCTAIL}
 share/emacs/${PKGVERSION}/etc/FTP
 share/emacs/${PKGVERSION}/etc/GNU
 share/emacs/${PKGVERSION}/etc/HELLO

>Release-Note:
>Audit-Trail:
>Unformatted: