Annotation of pkgsrc/editors/emacs/Makefile.common, Revision 1.40.32.1
1.40.32.1! bsiegert 1: # $NetBSD$
1.25 wiz 2: #
3: # used by editors/emacs/Makefile
4: # used by editors/emacs-nox11/Makefile
1.1 markd 5:
1.22 minskim 6: CATEGORIES= editors
1.38 dholland 7: MASTER_SITES= # empty
8: DISTFILES= # empty
1.22 minskim 9:
1.38 dholland 10: MAINTAINER= dholland@NetBSD.org
11: COMMENT= Meta-package for installing the preferred Emacs version
1.22 minskim 12:
1.38 dholland 13: META_PACKAGE= yes
1.22 minskim 14:
1.38 dholland 15: .include "../../mk/bsd.prefs.mk"
1.1 markd 16:
1.38 dholland 17: #
18: # 1. Depend on the right emacs using ${EMACS_TYPE}. We don't have to
19: # (and in fact shouldn't) depend on the exact version, just *a*
20: # version. Do *not* include modules.mk as that will get us a tighter
21: # pattern than we want, as well as other problematic effects.
22: #
23: # XXX: it would be better to split modules.mk and share the logic
24: # that can be shared.
25: #
1.1 markd 26:
1.38 dholland 27: MY_EMACS_TYPE?=${EMACS_TYPE}
28: EMACS_BASE_TYPE=${MY_EMACS_TYPE:S/nox//}
29: EMACS_MAJOR=${EMACS_BASE_TYPE:S/emacs//}
30:
31: # Sigh.
32: .if ${MY_EMACS_TYPE} == "emacs20nox"
33: MY_EMACS_TYPE:= emacs20
34: .endif
1.24 joerg 35:
1.38 dholland 36: .if !empty(MY_EMACS_TYPE:Mxemacs*)
37: PKG_FAIL_REASON+= "EMACS_TYPE is xemacs."
1.40 dholland 38: # (Set these to avoid crashing out below.)
1.38 dholland 39: EMACS_PKGDIR= ../../editors/xemacs
1.40 dholland 40: EMACS_PACKAGE= xemacs
1.40.32.1! bsiegert 41: .elif ${MY_EMACS_TYPE} == "emacs26"
1.38 dholland 42: EMACS_PKGDIR= ../../editors/emacs-snapshot
1.40 dholland 43: EMACS_PACKAGE= ${EMACS_BASE_TYPE}
1.38 dholland 44: .elif !empty(MY_EMACS_TYPE:M*nox)
45: EMACS_PKGDIR= ../../editors/${EMACS_BASE_TYPE}-nox11
1.40 dholland 46: EMACS_PACKAGE= ${EMACS_BASE_TYPE}-nox11
1.38 dholland 47: .else
48: EMACS_PKGDIR= ../../editors/${EMACS_BASE_TYPE}
1.40 dholland 49: EMACS_PACKAGE= ${EMACS_BASE_TYPE}
1.38 dholland 50: .endif
1.1 markd 51:
1.40 dholland 52: DEPENDS+= ${EMACS_PACKAGE}>=${EMACS_MAJOR}:${EMACS_PKGDIR}
1.1 markd 53:
1.38 dholland 54: #
55: # 2. Now it gets gross. Before this meta-package was introduced, the
56: # emacs packages all had PKGNAME set to "emacs". Now the meta-package
57: # is called "emacs" and the emacs packages themselves have the emacs
58: # major version in them. But in order to make updates work properly,
59: # the version of the package called "emacs" cannot go down. We need to
60: # set MY_EMACS_VERSION accordingly. The following were the versions at
61: # the time the renaming was done:
62: # emacs20 20.7nb16
63: # emacs21 21.4anb26
64: # emacs21-nox11 21.4anb13
65: # emacs22 22.3nb26
66: # emacs22-nox11 22.3nb3
67: # emacs23 23.4nb12
68: # emacs23-nox11 23.4nb1
69: # emacs24 24.2nb6
70: # emacs24-nox11 24.2
71: # emacs25+ n/a
72: #
73: # Set VER to the version from the above table, and REV to the
74: # PKGREVISION value.
75: #
1.1 markd 76:
1.38 dholland 77: .if ${MY_EMACS_TYPE} == "emacs20"
78: VER= 20.7
79: REV= 16
80: .elif ${MY_EMACS_TYPE} == "emacs21"
81: VER= 21.4
82: REV= 26
83: .elif ${MY_EMACS_TYPE} == "emacs21nox"
84: VER= 21.4
85: REV= 13
86: .elif ${MY_EMACS_TYPE} == "emacs22"
87: VER= 22.3
88: REV= 26
89: .elif ${MY_EMACS_TYPE} == "emacs22nox"
90: VER= 22.3
91: REV= 3
92: .elif ${MY_EMACS_TYPE} == "emacs23"
93: VER= 23.4
94: REV= 12
95: .elif ${MY_EMACS_TYPE} == "emacs23nox"
96: VER= 23.4
97: REV= 1
98: .elif ${MY_EMACS_TYPE} == "emacs24"
99: VER= 24.2
100: REV= 6
101: .elif ${MY_EMACS_TYPE} == "emacs24nox"
102: VER= 24.2
103: REV= 0
104: .else
105: VER= ${_EMACS_VERSION_MAJOR}
106: REV= 0
107: .endif
1.1 markd 108:
1.38 dholland 109: #
110: # Get the actual version from version.mk.
111: #
1.14 markd 112:
1.38 dholland 113: .include "${EMACS_PKGDIR}/version.mk"
1.24 joerg 114:
1.38 dholland 115: MY_EMACS_VERSION= ${_EMACS_VERSION_MAJOR}.${_EMACS_VERSION_MINOR}
116: .if defined(_EMACS_VERSION_MICRO)
117: MY_EMACS_VERSION:= ${MY_EMACS_VERSION}.${_EMACS_VERSION_MICRO}
118: .endif
1.14 markd 119:
1.38 dholland 120: #
121: # Compute PKGREVISION.
122: #
123: # If we are on the same version as VER, we need PKGREVISION to be at
124: # least REV + 1. Otherwise, it can start at 0.
125: #
126: # Use MYPKGREVISION (defined at the top of this file) to bump the
127: # version if that should become necessary.
128: #
1.1 markd 129:
1.38 dholland 130: .if ${MY_EMACS_VERSION} != ${VER}
131: PKGREVISION= ${MYPKGREVISION}
1.23 hasso 132: .else
1.38 dholland 133: PKGREVISION!=expr 1 + ${REV} + ${MYPKGREVISION}
1.23 hasso 134: .endif
135:
1.38 dholland 136: # This doesn't work; fortunately it appears to be unnecessary.
137: #
138: #.if ${PKGREVISION} == "0"
139: #.unset PKGREVISION
140: #.endif
1.1 markd 141:
1.38 dholland 142: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>