freebsd-ports/mail/mew3/files/patch-aa
Kiriyama Kazuhiko 4f3b1b89e1 New port for Mew3 which repositry copied from mail/mew2[1].
PR:		ports/46008
Submitted by:	ITO Tsuyoshi <tsuyoshi@is.s.u-tokyo.ac.jp>
Approved by:	portmgr(marcus@marcuscom.com)[1]
2003-11-20 07:24:23 +00:00

172 lines
4.6 KiB
Plaintext

--- Makefile.orig Wed Dec 11 23:48:41 2002
+++ Makefile Fri Aug 22 16:01:05 2003
@@ -19,14 +19,14 @@
## EDIT THE FOLLOWINGS
##
-prefix=/usr/local
+prefix=${PREFIX}
infodir=$(prefix)/info
##
## Compile engines
##
-EMACS = emacs
+EMACS = ${EMACS_CMD}
#EMACS = xemacs
#EMACS = mule
@@ -34,7 +34,7 @@
## A directory where mew*.el[c] will be installed.
##
-elispdir = $(prefix)/share/emacs/site-lisp/mew
+elispdir = $(prefix)/${EMACS_LIBDIR}/site-lisp/mew${MEW_MAJOR_VER}
#elispdir = $(prefix)/lib/$(EMACS)/site-lisp
#elispdir = $(prefix)/lib/emacs
@@ -42,7 +42,10 @@
## A directory where etc file will be installed.
##
-etcdir = $(prefix)/lib/$(EMACS)/etc/Mew
+etcdir = $(prefix)/${EMACS_LIBDIR}/etc/mew${MEW_MAJOR_VER}
+
+# For XEmacs packages
+XPKGDIR= $(prefix)/${EMACS_PACKAGESDIR}
################################################################
##
@@ -70,6 +73,8 @@
mew-vars.elc mew-vars2.elc mew-virtual.elc \
mew-exec.elc mew.elc
+OBJS_PKG= auto-autoloads.elc custom-load.elc
+
SRCS = mew-addrbook.el mew-attach.el mew-auth.el \
mew-blvs.el mew-bq.el mew-cache.el \
mew-complete.el mew-config.el mew-const.el \
@@ -94,6 +99,8 @@
mew-win32.el mew-xemacs.el mew-exec.el \
mew-darwin.el mew.el
+SRCS_PKG= auto-autoloads.el custom-load.el
+
TEMPFILE = temp.el
CP = cp
@@ -110,7 +117,9 @@
################################################################
-el: $(TEMPFILE) mew.el
+el: $(OBJS)
+
+$(OBJS): $(TEMPFILE) mew.el
@echo 'Compiling EL files of Mew ... '
@echo 'PLEASE IGNORE WARNINGS IF DISPLAYED. TAKE IT EASY!'
$(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f mew-compile
@@ -123,11 +132,11 @@
@echo ')))' >> $(TEMPFILE)
install-el: $(OBJS)
- -@if [ ! -d $(elispdir) ]; then \
+ if [ ! -d $(elispdir) ]; then \
$(MKDIR) $(elispdir); \
fi
- $(CP) $(SRCS) $(elispdir)
- $(CP) $(OBJS) $(elispdir)
+ ${BSD_INSTALL_DATA} $(SRCS) $(elispdir)
+ ${BSD_INSTALL_DATA} $(OBJS) $(elispdir)
################################################################
@@ -143,7 +152,9 @@
cd info; $(MAKE) info EMACS=$(EMACS)
install-info:
- cd info; $(MAKE) install-info infodir=$(infodir)
+ ${MKDIR} $(infodir)
+ cd info; $(MAKE) install-info infodir=$(infodir) \
+ XEMACS_VER_OVER20="${XEMACS_VER_OVER20}"
################################################################
@@ -151,15 +162,72 @@
cd info; $(MAKE) jinfo EMACS=$(EMACS)
install-jinfo:
- cd info; $(MAKE) install-jinfo infodir=$(infodir)
+ ${MKDIR} $(infodir)
+ cd info; $(MAKE) install-jinfo infodir=$(infodir) \
+ XEMACS_VER_OVER20="${XEMACS_VER_OVER20}"
+
+install-man:
+ ${MKDIR} ${MANDIR}
+ cd info; $(MAKE) install-man MANDIR=$(MANDIR)
################################################################
install-etc:
- -@if [ ! -d $(etcdir) ]; then \
+ if [ ! -d $(etcdir) ]; then \
$(MKDIR) $(etcdir); \
fi
- cd etc; $(CP) -r * $(etcdir)/
+ cd etc; $(CP) -R * $(etcdir)/
+
+################################################################
+
+package: ${OBJS} ${OBJS_PKG} bin
+
+${OBJS_PKG}: ${SRCS_PKG}
+ ${EMACS} -vanilla -batch -eval "(push \"./\" load-path)" -l bytecomp \
+ -f batch-byte-compile ${.ALLSRC}
+
+auto-autoloads.el : ${OBJS} _pkg.el
+ ${EMACS} -vanilla -batch \
+ -eval "(setq autoload-package-name \"${XEMACS_PKGNAME}\")" \
+ -l autoload -f batch-update-directory .
+ ${RM} -f auto-autoloads.el~
+
+custom-load.el : ${OBJS}
+ ${EMACS} -vanilla -batch -l cus-dep -f Custom-make-dependencies .
+ if [ ! -f ${.TARGET} ]; then \
+ touch ${.TARGET}; \
+ fi
+
+_pkg.el:
+ @echo Creating _pkg.el
+ @echo ";;;###autoload" > _pkg.el
+ @echo "(package-provide '${XEMACS_PKGNAME}" >> _pkg.el
+ @echo " :version $(XEMACS_PKGVER)" >> _pkg.el
+ @echo " :type 'regular)" >> _pkg.el
+
+install-mule-package: install-package
+ ${MAKE} infodir=${XPKGDIR}/info XEMACS_VER_OVER20="yes" install-jinfo
+ ${MAKE} manifest
+
+install-package:
+ ${MKDIR} ${XPKGDIR}/pkginfo
+ ${MAKE} install-bin
+ ${MAKE} elispdir=${XPKGDIR}/lisp/mew${MEW_MAJOR_VER} install-el
+ ${BSD_INSTALL_DATA} _pkg.el ${OBJS_PKG} ${SRCS_PKG} \
+ ${XPKGDIR}/lisp/mew${MEW_MAJOR_VER}
+ ${MAKE} infodir=${XPKGDIR}/info XEMACS_VER_OVER20="yes" \
+ install-info
+ ${MAKE} MANDIR=${XPKGDIR}/man/mew${MEW_MAJOR_VER} install-man
+ ${MAKE} etcdir=${XPKGDIR}/etc/mew${MEW_MAJOR_VER} install-etc
+ ${MAKE} manifest
+
+manifest:
+ (cd ${XPKGDIR}; \
+ ls -d1 lisp/mew${MEW_MAJOR_VER}/* info/mew${MEW_MAJOR_VER}.* \
+ man/mew${MEW_MAJOR_VER}/* etc/mew${MEW_MAJOR_VER}/* \
+ > ${XPKGDIR}/pkginfo/MANIFEST.mew${MEW_MAJOR_VER})
+ ${ECHO} "pkginfo/MANIFEST.mew${MEW_MAJOR_VER}" \
+ >> ${XPKGDIR}/pkginfo/MANIFEST.mew${MEW_MAJOR_VER}
################################################################