Subject: pkg/19147: emacs.mk doesn't work with emacs21-nox11
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hiramatu@boreas.dti.ne.jp>
List: netbsd-bugs
Date: 11/23/2002 21:48:23
>Number: 19147
>Category: pkg
>Synopsis: emacs.mk doesn't work with emacs21-nox11
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 23 04:42:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Hiramatsu Yoshifumi
>Release: NetBSD 1.6J
>Organization:
>Environment:
System: NetBSD orinoco.my.domain 1.6J NetBSD 1.6J (Orinoco) #5: Sun Oct 27 01:50:46 JST 2002 root@orinoco.my.domain:/usr/src/sys/arch/i386/compile/Orinoco i386
Architecture: i386
Machine: i386
>Description:
After installing editors/emacs21-nox11, make in devel/apel failed
with following message.
===> Accepted versions are: emacs21 emacs20
===> No valid Emacs version installed found
I think emacs.mk should consider emacs21-nox11
>How-To-Repeat:
1. 'make install' in /usr/pkgsrc/editors/emacs21-nox11
2. 'make install' in /usr/pkgsrc/devel/apel
>Fix:
This is a patch for mk/emacs.mk.
--- emacs.mk.orig Fri Nov 22 00:18:41 2002
+++ emacs.mk Fri Nov 22 00:18:28 2002
@@ -28,8 +28,8 @@
#
EMACS_VERSION_DEFAULT?= emacs21
.if !defined(USE_XEMACS)
-EMACS_VERSIONS_ACCEPTED?= emacs21 emacs20
-#EMACS_VERSIONS_ACCEPTED?= emacs21 xemacs211 emacs20 xemacs215
+EMACS_VERSIONS_ACCEPTED?= emacs21 emacs21-nox11 emacs20
+#EMACS_VERSIONS_ACCEPTED?= emacs21 emacs21-nox11 xemacs211 emacs20 xemacs21
5
.else
EMACS_VERSIONS_ACCEPTED?= xemacs211 xemacs215
.endif
@@ -38,6 +38,7 @@
#
BUILDLINK_DEPENDS.emacs20?= emacs>=20.7
BUILDLINK_DEPENDS.emacs21?= emacs>=21.2
+BUILDLINK_DEPENDS.emacs21-nox11?= emacs-nox11>=21.2
BUILDLINK_DEPENDS.xemacs211?= xemacs>=21.1
BUILDLINK_DEPENDS.xemacs215?= xemacs>=21.5
BUILDLINK_DEPENDS.leim20?= leim>=20.7
@@ -61,6 +62,16 @@
.endif
.endif
+# Look for Emacs21 without X11
+#
+_TMP!= ${PKG_INFO} -e emacs-nox11 || ${ECHO}
+.if ${_TMP} != ""
+_EMACS_VERSION_EMACS_FULL:= ${_TMP}
+_EMACS_VERSION_EMACS= ${_EMACS_VERSION_EMACS_FULL:C/^.*-//}
+_EMACS_VERSION_EMACS_MAJOR= ${_EMACS_VERSION_EMACS:C/\..*//}
+_EMACS_VERSION_emacs21-nox11_INSTALLED= yes
+.endif
+
# Look for XEmacs 21.5/XEmacs 21.1
#
_TMP!= ${PKG_INFO} -e xemacs || ${ECHO}
@@ -111,6 +122,7 @@
# Set version specifics.
#
FOR.emacs21= "@comment "
+FOR.emacs21-nox11= "@comment "
FOR.emacs20= "@comment "
FOR.xemacs215= "@comment "
FOR.xemacs211= "@comment "
@@ -120,6 +132,12 @@
.if defined(EMACS_USE_LEIM)
DEPENDS+= ${BUILDLINK_DEPENDS.leim21}:../../editors/leim21
.endif
+.elif ${_EMACS_VERSION} == "emacs21-nox11"
+EMACS_DEPENDENCY= ${BUILDLINK_DEPENDS.emacs21-nox11}:../../editors/emacs21
-nox11
+FOR.emacs21-nox11= ""
+.if defined(EMACS_USE_LEIM)
+DEPENDS+= ${BUILDLINK_DEPENDS.leim21}:../../editors/leim21
+.endif
.elif ${_EMACS_VERSION} == "emacs20"
EMACS_DEPENDENCY= ${BUILDLINK_DEPENDS.emacs20}:../../editors/emacs
FOR.emacs20= ""
@@ -144,13 +162,14 @@
# Provide some macro definitions.
#
-EMACS_FLAVOR= ${_EMACS_VERSION:C|[0-9]*$||}
-.if ${EMACS_FLAVOR} == "emacs"
+.if ${_EMACS_VERSION:Memacs*}
+EMACS_FLAVOR= emacs
EMACS_BIN= ${PREFIX}/bin/emacs
EMACS_PKG_VERSION= ${_EMACS_VERSION_EMACS_FULL:C|^.*-||}
EMACS_LISPPREFIX= ${PREFIX}/share/emacs/site-lisp
PKGNAME_PREFIX=
.else
+EMACS_FLAVOR= xemacs
EMACS_BIN= ${PREFIX}/bin/xemacs
EMACS_PKG_VERSION= ${_EMACS_VERSION_XEMACS_FULL:C|^.*-||}
EMACS_LISPPREFIX= ${PREFIX}/lib/xemacs/site-packages/lisp
@@ -162,6 +181,7 @@
PLIST_SUBST+= EMACS_VERSION=${EMACS_VERSION}
PLIST_SUBST+= EMACS_LISPPREFIX=${EMACS_LISPPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+= FOR_emacs21=${FOR.emacs21}
+PLIST_SUBST+= FOR_emacs21-nox11=${FOR.emacs21-nox11}
PLIST_SUBST+= FOR_emacs20=${FOR.emacs20}
PLIST_SUBST+= FOR_xemacs215=${FOR.xemacs215}
PLIST_SUBST+= FOR_xemacs211=${FOR.xemacs211}
>Release-Note:
>Audit-Trail:
>Unformatted: