aboutsummaryrefslogtreecommitdiffstats
path: root/editors/wemi-emacs
diff options
context:
space:
mode:
authorshige <shige@FreeBSD.org>1999-09-11 01:30:36 +0800
committershige <shige@FreeBSD.org>1999-09-11 01:30:36 +0800
commit654b523f0d881876d118825d292b6aa3202aff8e (patch)
tree187bf3e0673821bd639aa387080775a6c1834b3a /editors/wemi-emacs
parent50ea3acf7bfda0bc45dc4acf41830d03761dec0e (diff)
downloadfreebsd-ports-gnome-654b523f0d881876d118825d292b6aa3202aff8e.tar.gz
freebsd-ports-gnome-654b523f0d881876d118825d292b6aa3202aff8e.tar.zst
freebsd-ports-gnome-654b523f0d881876d118825d292b6aa3202aff8e.zip
Fix for xemacs-21.1.6.
wemi package should be compatible with xemacs-package on xemacs-21.x.
Diffstat (limited to 'editors/wemi-emacs')
-rw-r--r--editors/wemi-emacs/Makefile104
1 files changed, 77 insertions, 27 deletions
diff --git a/editors/wemi-emacs/Makefile b/editors/wemi-emacs/Makefile
index cb2d148f194d..f246dc2ffe66 100644
--- a/editors/wemi-emacs/Makefile
+++ b/editors/wemi-emacs/Makefile
@@ -17,8 +17,10 @@ PORTCLASS?= master
# distfile version
FLIM_VER= 1.9.2
WEMI_VER= 1.8.6
-WEMIDOCDIR= share/doc/semi
+# setupel filename
WEMI_SETUPEL= wemi-setupel.el
+# document install directory by install-doc target
+WEMIDOCDIR?= share/doc/semi
.if (${PORTCLASS} == "master")
# emacs port setup
@@ -33,15 +35,6 @@ REQUIRE_SETUPEL= YES
# target name for make build
ALL_TARGET?= elc
-# if RUN_DEPENDS-emacs port name has the suffix '-common'.
-.if !defined(HAVE_COMMON_PORT)
-HAVE_COMMON_PORT= NO
-.endif
-# if RUN_DEPENDS-emacs needs setup elisp
-.if !defined(REQUIRE_SETUPEL)
-REQUIRE_SETUPEL= NO
-.endif
-
.if defined(EMACS_PORT)
PKGNAME= wemi-${EMACS_PORT}-${WEMI_VER}
EMACS_CMD= ${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER}
@@ -51,21 +44,29 @@ RUN_DEPENDS= ${EMACS_CMD}:${PORTSDIR}/editors/${EMACS_PORT}-common
.else
RUN_DEPENDS= ${EMACS_CMD}:${PORTSDIR}/editors/${EMACS_PORT}
.endif
-SCRIPTS_ENV= EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} \
+SCRIPTS_ENV+= EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} \
EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \
+ EMACS_PACKAGESDIR=${EMACS_PACKAGESDIR} \
TARGETS="${WEMI_SETUPEL}"
-PLIST_SUB= EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} \
+PLIST_SUB+= EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} \
EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \
+ EMACS_PACKAGESDIR=${EMACS_PACKAGESDIR} \
WEMIDOCDIR=${WEMIDOCDIR} WEMI_SETUPEL=${WEMI_SETUPEL}
-MAKE_FLAGS= EMACS=${EMACS_CMD}
+MAKE_FLAGS+= EMACS=${EMACS_CMD}
.if (${EMACS_VER} == "19.34")
# depends on custom: emacs-19.34 or mule-19.34
BUILD_DEPENDS+= ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp/custom.el:${PORTSDIR}/editors/custom-${EMACS_PORT}
RUN_DEPENDS+= ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp/custom.el:${PORTSDIR}/editors/custom-${EMACS_PORT}
.endif
-# depends on apel
+# depends on apel (case of xemacs-21.x or later)
+.if defined(EMACS_PACKAGESDIR)
+BUILD_DEPENDS+= ${PREFIX}/${EMACS_PACKAGESDIR}/lisp/apel/emu.el:${PORTSDIR}/editors/apel-${EMACS_PORT}
+RUN_DEPENDS+= ${PREFIX}/${EMACS_PACKAGESDIR}/lisp/apel/emu.el:${PORTSDIR}/editors/apel-${EMACS_PORT}
+.else
+# depends on apel (case of other emacsen etc...)
BUILD_DEPENDS+= ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp/emu/emu.el:${PORTSDIR}/editors/apel-${EMACS_PORT}
RUN_DEPENDS+= ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp/emu/emu.el:${PORTSDIR}/editors/apel-${EMACS_PORT}
+.endif
# depends on flim
BUILD_DEPENDS+= ${PKG_DBDIR}/flim-${EMACS_PORT}-${FLIM_VER}:${PORTSDIR}/editors/flim-${EMACS_PORT}
RUN_DEPENDS+= ${PKG_DBDIR}/flim-${EMACS_PORT}-${FLIM_VER}:${PORTSDIR}/editors/flim-${EMACS_PORT}
@@ -79,40 +80,89 @@ RUN_DEPENDS+= ${PKG_DBDIR}/flim-${EMACS_PORT}-${FLIM_VER}:${PORTSDIR}/editors/fl
# info files JIS to EUC
BUILD_DEPENDS+= nkf:${PORTSDIR}/japanese/nkf
-.if (${REQUIRE_SETUPEL} == "YES")
pre-configure:
+.if defined(REQUIRE_SETUPEL) && (${REQUIRE_SETUPEL} == "YES")
@${CP} ${FILESDIR}/${WEMI_SETUPEL}.in ${WRKDIR}
.endif
.include <bsd.port.pre.mk>
-MAKEINFO= makeinfo --no-split --no-validate
+MAKEINFO= makeinfo --no-split --no-validate
+MAKEINFO_EMACS= ${EMACS_CMD} -no-site-file -no-init-file -batch
+MAKEINFO_EMACS_FLAGS= -e texinfo-format-buffer -f save-buffer
post-build:
+ @${MAKE} info-build
+
+post-install:
+.if defined(REQUIRE_SETUPEL) && (${REQUIRE_SETUPEL} == "YES")
+ @${MAKE} setupel-install
+.endif
+.if defined(EMACS_PACKAGESDIR) && defined(MANIFEST)
+ @${MAKE} info-package-install
+ @${MAKE} manifest-install
+.else
+ @${MAKE} info-install
+.endif
+.if !defined(NOPORTDOCS)
+ @${MAKE} doc-install
+.endif
+
+
+
+# functions
+info-build:
@(cd ${WRKSRC} ; \
for i in mime-ui-en.texi mime-ui-ja.texi; do \
${MV} $${i} $${i}.jis ; \
${CAT} $${i}.jis | nkf -e > $${i} ; \
- ${ECHO_MSG} "===> Please ignore the following errors." ; \
${MAKEINFO} $${i} || ${TRUE} ; \
done)
-post-install:
+info-build-by-emacs:
@(cd ${WRKSRC} ; \
- for i in mime-ui-en.info mime-ui-ja.info; do \
- ${INSTALL_DATA} ${WRKSRC}/$${i} ${PREFIX}/info ; \
- install-info ${PREFIX}/info/$${i} ${PREFIX}/info/dir ; \
+ for i in mime-ui-en.texi mime-ui-ja.texi; do \
+ ${MV} $${i} $${i}.jis ; \
+ ${CAT} $${i}.jis | nkf -e > $${i} ; \
+ ${MAKEINFO_EMACS} $${i} ${MAKEINFO_EMACS_FLAGS} || ${TRUE} ; \
done)
-.if (${REQUIRE_SETUPEL} == "YES")
- @${INSTALL_DATA} ${WRKDIR}/${WEMI_SETUPEL} \
- ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp
-.endif
-.if !defined(NOPORTDOCS)
+
+
+doc-install:
@${MKDIR} ${PREFIX}/${WEMIDOCDIR}
@(cd ${WRKSRC} ; \
for i in ChangeLog NEWS README.* TODO VERSION ; do \
${INSTALL_DATA} $${i} ${PREFIX}/${WEMIDOCDIR}/ ; \
done)
-.endif
+
+setupel-install:
+ @${INSTALL_DATA} ${WRKDIR}/${WEMI_SETUPEL} \
+ ${PREFIX}/${EMACS_LIBDIR_WITH_VER}/site-lisp
+
+info-install:
+ @(cd ${WRKSRC} ; \
+ for i in mime-ui-en.info mime-ui-ja.info; do \
+ ${INSTALL_DATA} ${WRKSRC}/$${i} ${PREFIX}/info ; \
+ install-info ${PREFIX}/info/$${i} ${PREFIX}/info/dir ; \
+ done)
+
+info-package-install:
+ @(cd ${WRKSRC} ; \
+ for i in mime-ui-en.info mime-ui-ja.info; do \
+ ${INSTALL_DATA} ${WRKSRC}/$${i} \
+ ${PREFIX}/${EMACS_PACKAGESDIR}/info ; \
+ done ; \
+ ${MKDIR} -p ${PREFIX}/${EMACS_PACKAGESDIR}/man/semi ; \
+ for i in mime-ui-en.texi mime-ui-ja.texi; do \
+ ${INSTALL_DATA} ${WRKSRC}/$${i} \
+ ${PREFIX}/${EMACS_PACKAGESDIR}/man/semi ; \
+ done)
+
+manifest-install:
+ @${RM} -f ${WRKDIR}/${MANIFEST}
+ @${CAT} ${PKGDIR}/PLIST | ${GREP} -e "^%%EMACS_PACKAGESDIR%%" | \
+ ${SED} -e "s;^%%EMACS_PACKAGESDIR%%/;;" > ${WRKDIR}/${MANIFEST}
+ @${INSTALL_DATA} ${WRKDIR}/${MANIFEST} \
+ ${PREFIX}/${EMACS_PACKAGESDIR}/pkginfo/
.include <bsd.port.post.mk>