1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/mail/mew2/files/patch-aa
2001-08-25 09:17:58 +00:00

172 lines
4.6 KiB
Plaintext

--- Makefile.orig Wed Jul 18 08:20:40 2001
+++ Makefile Fri Aug 3 22:18:35 2001
@@ -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}
################################################################
##
@@ -67,6 +70,8 @@
mew-key.elc mew-thread.elc mew-smime.elc \
mew-theme.elc mew.elc
+OBJS_PKG= auto-autoloads.elc custom-load.elc
+
SRCS = mew-addrbook.el mew-attach.el mew-blvs.el \
mew-bq.el mew-cache.el mew-complete.el \
mew-config.el mew-const.el mew-decode.el \
@@ -87,6 +92,8 @@
mew-thread.el mew-smime.el mew-theme.el \
mew.el
+SRCS_PKG= auto-autoloads.el custom-load.el
+
TEMPFILE = temp.el
CP = cp
@@ -103,7 +110,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
@@ -116,11 +125,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)
################################################################
@@ -136,7 +145,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}"
################################################################
@@ -144,15 +155,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}
################################################################