diff options
author | uebayasi <uebayasi> | 2007-10-29 12:52:36 +0000 |
---|---|---|
committer | uebayasi <uebayasi> | 2007-10-29 12:52:36 +0000 |
commit | e5796740b5648e6143134cea04e7b1d25b31dab8 (patch) | |
tree | ad76dc2a80cf3d9f4a27198a27298033e0328d8d /mk | |
parent | afbd43f5083427a1bce96297283c64f7ccf18a0c (diff) | |
download | pkgsrc-e5796740b5648e6143134cea04e7b1d25b31dab8.tar.gz |
Enable buildlink3.mk for EmacsLisp package build.
This works very straightfoward; create set of symbolic links of *.el / *.elc
files under ${BUILDLINK_DIR}/share/emacs. At configure and build stage,
emacs / xemacs binaries run with the EMACSLOADPATH pointed to there. This
should work because those EmacsLisp packages assume the Emacs / XEmacs program
running at build time and that running after installation are identical and
the task looking for other *.el / *.elc files is Emacs / XEmacs's business.
I have tested only Emacs 21 and Emacs 22. XEmacs should work ... at least
XEmacs supports EMACSLOADPATH too if grep worked correctly.
While here change the following:
* Provide {FOR,NOTFOR}_emacs_{x,nox} switches to be used in PLIST.
* Add the xemacs214nox entry.
* Clean up "leim" handling code; avoid .if ... .endif as far as possible.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/emacs.mk | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/mk/emacs.mk b/mk/emacs.mk index 58e031944fc..b2af34f8edc 100644 --- a/mk/emacs.mk +++ b/mk/emacs.mk @@ -1,4 +1,4 @@ -# $NetBSD: emacs.mk,v 1.42 2007/08/08 08:12:12 dsainty Exp $ +# $NetBSD: emacs.mk,v 1.43 2007/10/29 12:52:36 uebayasi Exp $ # # This Makefile fragment handles Emacs Lisp Packages (== ELPs). # @@ -173,6 +173,12 @@ # Possible values: # "", "@comment" # +# FOR_emacs_{x,nox},NOTFOR_emacs_{x,nox} +# Description: +# PLIST switches for X11 / non-X11. +# Possible values: +# "", "@comment" +# .if !defined(EMACS_MK) EMACS_MK= # defined @@ -194,7 +200,7 @@ BUILD_DEFS_EFFECTS+= ${_SYS_VARS.emacs} # _EMACS_VERSIONS_ALL= \ - emacs20 emacs21 emacs21nox emacs22 emacs22nox xemacs214 xemacs215 + emacs20 emacs21 emacs21nox emacs22 emacs22nox xemacs214 xemacs214nox xemacs215 _EMACS_VERSIONS_ACCEPTED_DEFAULT= ${_EMACS_VERSIONS_ALL} _EMACS_VERSION_DEFAULT.emacs= emacs21 _EMACS_VERSION_DEFAULT.xemacs= xemacs214 @@ -203,15 +209,38 @@ _EMACS_REQD.emacs21= emacs>=21.2<22 _EMACS_REQD.emacs21nox= emacs-nox11>=21.2<22 _EMACS_REQD.emacs22= emacs>=22 _EMACS_REQD.emacs22nox= emacs-nox11>=22 -_EMACS_REQD.xemacs214= xemacs>=21.4<22 -_EMACS_REQD.xemacs215= xemacs>=21.5<22 +_EMACS_REQD.xemacs214= xemacs>=21.4<21.5 +_EMACS_REQD.xemacs214nox= xemacs-nox>=21.4<21.5 +_EMACS_REQD.xemacs215= xemacs>=21.5<21.6 +_LEIM_REQD.emacs20= leim>=20.${EMACS_VERSION_MINOR}<21 +_LEIM_REQD.emacs20nox= ${_LEIM_REQD.emacs20} +_LEIM_REQD.emacs21= leim>=21.${EMACS_VERSION_MINOR}<22 +_LEIM_REQD.emacs21nox= ${_LEIM_REQD.emacs21} +_LEIM_REQD.emacs22= # nothing +_LEIM_REQD.emacs22nox= ${_LEIM_REQD.emacs22} _EMACS_DEP.emacs20= ../../editors/emacs20 _EMACS_DEP.emacs21= ../../editors/emacs21 _EMACS_DEP.emacs21nox= ../../editors/emacs21-nox11 _EMACS_DEP.emacs22= ../../editors/emacs _EMACS_DEP.emacs22nox= ../../editors/emacs-nox11 _EMACS_DEP.xemacs214= ../../editors/xemacs +_EMACS_DEP.xemacs214nox=../../editors/xemacs-nox11 _EMACS_DEP.xemacs215= ../../editors/xemacs-current +_LEIM_DEP.emacs20= ../../editors/leim20 +_LEIM_DEP.emacs20nox= ${_LEIM_DEP.emacs20} +_LEIM_DEP.emacs21= ../../editors/leim21 +_LEIM_DEP.emacs21nox= ${_LEIM_DEP.emacs21} +_LEIM_DEP.emacs22= +_LEIM_DEP.emacs20nox= ${_LEIM_DEP.emacs22} + +_EMACS_BLNK.emacs20= ../../editors/emacs20/buildlink3.mk +_EMACS_BLNK.emacs21= ../../editors/emacs21/buildlink3.mk +_EMACS_BLNK.emacs21nox= ../../editors/emacs21-nox11/buildlink3.mk +_EMACS_BLNK.emacs22= ../../editors/emacs/buildlink3.mk +_EMACS_BLNK.emacs22nox= ../../editors/emacs-nox11/buildlink3.mk +_EMACS_BLNK.xemacs214= ../../editors/xemacs/buildlink3.mk +_EMACS_BLNK.xemacs214nox= ../../editors/xemacs-nox11/buildlink3.mk +_EMACS_BLNK.xemacs215= ../../editors/xemacs-current/buildlink3.mk # # Version decision @@ -315,6 +344,11 @@ PLIST_SUBST+= FOR_${e}="" NOTFOR_${e}="@comment " PLIST_SUBST+= FOR_${e}="@comment " NOTFOR_${e}="" . endif .endfor +.if empty(EMACS_TYPE:*nox) +PLIST_SUBST+= FOR_emacs_x="" NOTFOR_emacs_nox="@comment " FOR_emacs_nox="@comment " NOTFOR_emacs_nox="" +.else +PLIST_SUBST+= FOR_emacs_x="@comment " NOTFOR_emacs_nox="" FOR_emacs_nox="" NOTFOR_emacs_nox="@comment " +.endif PLIST_SUBST+= EMACS_FLAVOR=${EMACS_FLAVOR:Q} PLIST_SUBST+= EMACS_VERSION=${_EMACS_VERSION_NOREV:Q} @@ -337,16 +371,22 @@ _EMACS_PKGDEP.${_EMACS_TYPE},base?= \ .endif # "leim" - input methods for international character sets -.if !empty(_EMACS_TYPE:Mxemacs*) || !empty(_EMACS_TYPE:Memacs20*) -_EMACS_PKGDEP.${_EMACS_TYPE},leim?= leim>=20.7:../../editors/leim20 -.elif !empty(_EMACS_TYPE:Mxemacs*) || !empty(_EMACS_TYPE:Memacs21*) -_EMACS_PKGDEP.${_EMACS_TYPE},leim?= leim>=21.2:../../editors/leim -.elif !empty(_EMACS_TYPE:Mxemacs*) || !empty(_EMACS_TYPE:Memacs22*) -_EMACS_PKGDEP.${_EMACS_TYPE},leim?= # nothing -.endif +_EMACS_PKGDEP.${_EMACS_TYPE},leim= \ + ${_LEIM_REQD.${_EMACS_TYPE}}:${_LEIM_DEP.${_EMACS_TYPE}} .for _mod_ in ${EMACS_MODULES} +.if ${_EMACS_PKGDEP.${_EMACS_TYPE},${_mod_}} != ":" DEPENDS+= ${_EMACS_PKGDEP.${_EMACS_TYPE},${_mod_}} +.endif .endfor +# +# Build environment (buildlink3) +# + +_EMACS_DIR= ${BUILDLINK_DIR}/share/emacs +ALL_ENV+= EMACSLOADPATH=${_EMACS_DIR}/${_EMACS_VERSION_NOREV}/lisp:${_EMACS_DIR}/site-lisp + +.include "${_EMACS_BLNK.${_EMACS_TYPE}}" + .endif # EMACS_MK |