Subject: elm and metamail
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 04/04/2003 12:18:08
--xHFwDpU9dbj6ez1V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
Currently, elm and metamail conflict with each other as they both
install 'mmencode'. This is the only file they share. Unfortunately,
this conflict prevents a user from installing exmh (which depends on
metamail) and elm at the same time.[1]
Attached are patches to solve the conflict: if elm is installed before
metamail, it installs mmencode. An installation of metamail after that
will depend on elm. Similarly, if metamail is installed first, it will
install mmencode and if you install elm afterwards, it will depend on
metamail.
For pkgsrc this seems reasonable to me, with the restriction that one
should run 'make clean' before starting to install either. Now the
problem is with binary packages, I guess. It's possible to create
binary packages of each by itself, and they would then conflict with
each other.
I guess a solution would be to extract mmencode out of both those
packages and create a third package mmencode on which both could depend.
But then, where to get the sources for mmencode from? From the metamail
sources? From the elm sources? What if either makes changes to
mmencode and it becomes incompatible with the other?
Or should we see if we can install mmencode under a different name in
one of the packages? After all, metamail itself symlinks 'mimencode' to
'mmencode', so it might be possible to simply install 'mmencode' _as_
'mimencode' under metamail.
Thoughts?
-Jan
[1] Some of my users use exmh, others elm, others *shudder* emacs' RMAIL
mode... oh why can't they all just use mutt and be happy?
--
I seem to be having this tremendous difficulty with my lifestyle.
--xHFwDpU9dbj6ez1V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
? metamail/README.html
? metamail/files
? elm/README.html
? elm/files/mmencode.diff
Index: metamail/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/metamail/Makefile,v
retrieving revision 1.17
diff -b -u -r1.17 Makefile
--- metamail/Makefile 2003/03/29 12:41:36 1.17
+++ metamail/Makefile 2003/04/04 17:01:26
@@ -2,7 +2,7 @@
DISTNAME= mm2.7
PKGNAME= metamail-2.7
-PKGREVISION= 1
+PKGREVISION= 2
WRKSRC= ${WRKDIR}/${DISTNAME}/src
CATEGORIES= mail
MASTER_SITES= ftp://thumper.bellcore.com/pub/nsb/
@@ -11,26 +11,44 @@
MAINTAINER= packages@netbsd.org
COMMENT= Implementation of MIME, the Multipurpose Internet Mail Extensions
-CONFLICTS+= elm>=2.5.5 mm-2.7
-
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
USE_X11= YES
-CFLAGS+= -DPKG_SYSCONFDIR='\\\"${PKG_SYSCONFDIR}\\\"'
-MAKE_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
-
EGDIR= ${PREFIX}/share/examples/metamail
CONF_FILES= ${EGDIR}/mailcap ${PKG_SYSCONFDIR}/mailcap
.include "../../mk/bsd.prefs.mk"
+CFLAGS+= -DPKG_SYSCONFDIR='\\\"${PKG_SYSCONFDIR}\\\"'
+MAKE_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+
+ELM_INSTALLED!= ${PKG_INFO} -e elm || echo "no"
+
+.if ${ELM_INSTALLED} != "no"
+DEPENDS+= elm>=2.5.5:../../mail/elm
+MMENCODE= "@comment "
+
+post-patch:
+ cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/mmencode.diff >/dev/null 2>&1
+ ${RM} -f ${WRKSRC}/bin/*.orig
+ ${RM} -f ${WRKSRC}/man/mmencode.1
+
+post-install:
+ ${LN} -s ${PREFIX}/bin/mmencode ${PREFIX}/bin/mimencode
+ ${LN} -s ${PREFIX}/man/man1/mmencode.1 ${PREFIX}/man/man1/mimencode.1
+.else
+MMENCODE= ""
+
+post-patch:
+ ${RM} -f ${WRKSRC}/bin/*.orig
+.endif # ELM_INSTALLED
+
+PLIST_SUBST+= MMENCODE=${MMENCODE}
+
.if ${OPSYS} == "SunOS"
CFLAGS= -DSYSV
.endif
-
-post-patch:
- ${RM} -f ${WRKDIR}/mm2.7/src/bin/*.orig
pre-install:
${INSTALL_DATA_DIR} ${EGDIR}
Index: metamail/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/mail/metamail/PLIST,v
retrieving revision 1.2
diff -b -u -r1.2 PLIST
--- metamail/PLIST 2003/03/23 13:39:26 1.2
+++ metamail/PLIST 2003/04/04 17:01:26
@@ -9,7 +9,7 @@
bin/metamail
bin/metasend
bin/mimencode
-bin/mmencode
+${MMENCODE}bin/mmencode
bin/patch-metamail
bin/rcvAppleSingle
bin/richtext
@@ -40,7 +40,7 @@
man/man1/metasend.1.gz
man/man1/mime.1.gz
man/man1/mimencode.1.gz
-man/man1/mmencode.1.gz
+${MMENCODE}man/man1/mmencode.1.gz
man/man1/patch-metamail.1.gz
man/man1/richtext.1.gz
man/man1/showaudio.1.gz
Index: elm/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/elm/Makefile,v
retrieving revision 1.24
diff -b -u -r1.24 Makefile
--- elm/Makefile 2002/10/27 16:55:05 1.24
+++ elm/Makefile 2003/04/04 17:01:26
@@ -2,6 +2,7 @@
DISTNAME= elm2.5.5
PKGNAME= elm-2.5.5
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.virginia.edu/pub/elm/
@@ -9,13 +10,29 @@
HOMEPAGE= http://www.instinct.org/elm/
COMMENT= ELM Mail User Agent (without ME extensions)
-CONFLICTS+= mm-[0-9]* metamail-[0-9]*
+CONFLICTS+= mm-[0-9]*
CONFLICTS+= elm-me-[0-9]*
USE_BUILDLINK2= YES
HAS_CONFIGURE= YES
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS+= -d
+
+.include "../../mk/bsd.prefs.mk"
+
+METAMAIL_INSTALLED!= ${PKG_INFO} -e metamail || echo "no"
+
+.if ${METAMAIL_INSTALLED} != "no"
+DEPENDS+= metamail>=2.7:../../mail/metamail
+MMENCODE= "@comment "
+
+post-patch:
+ cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/mmencode.diff > /dev/null 2>&1
+.else
+MMENCODE= ""
+.endif
+
+PLIST_SUBST+= MMENCODE=${MMENCODE}
pre-configure:
${CP} ${FILESDIR}/config.sh ${WRKSRC}/config.sh.orig
Index: elm/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/mail/elm/PLIST,v
retrieving revision 1.1
diff -b -u -r1.1 PLIST
--- elm/PLIST 2001/11/01 00:59:51 1.1
+++ elm/PLIST 2003/04/04 17:01:26
@@ -7,7 +7,7 @@
bin/frm
bin/listalias
bin/messages
-bin/mmencode
+${MMENCODE}bin/mmencode
bin/newalias
bin/newmail
bin/nfrm
@@ -34,7 +34,7 @@
man/man1/frm.1
man/man1/listalias.1
man/man1/messages.1
-man/man1/mmencode.1
+${MMENCODE}man/man1/mmencode.1
man/man1/newalias.1
man/man1/newmail.1
man/man1/printmail.1
@@ -48,7 +48,7 @@
man/cat1/frm.1
man/cat1/listalias.1
man/cat1/messages.1
-man/cat1/mmencode.1
+${MMENCODE}man/cat1/mmencode.1
man/cat1/newalias.1
man/cat1/newmail.1
man/cat1/printmail.1
--xHFwDpU9dbj6ez1V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="elm.files.mmencode.diff"
$NetBSD: $
--- doc/Makefile.SH.mmencode Fri Apr 4 10:57:27 2003
+++ doc/Makefile.SH Fri Apr 4 10:57:50 2003
@@ -119,7 +119,6 @@
$(MAN)/frm$(MANEXT) \
$(MAN)/listalias$(MANEXT) \
$(MAN)/messages$(MANEXT) \
- $(MAN)/mmencode$(MANEXT) \
$(MAN)/newalias$(MANEXT) \
$(MAN)/newmail$(MANEXT) \
$(MAN)/printmail$(MANEXT) \
@@ -134,7 +133,6 @@
$(CATMAN)/frm$(CATMANEXT)$(SUFFIX) \
$(CATMAN)/listalias$(CATMANEXT)$(SUFFIX) \
$(CATMAN)/messages$(CATMANEXT)$(SUFFIX) \
- $(CATMAN)/mmencode$(CATMANEXT)$(SUFFIX) \
$(CATMAN)/newalias$(CATMANEXT)$(SUFFIX) \
$(CATMAN)/newmail$(CATMANEXT)$(SUFFIX) \
$(CATMAN)/printmail$(CATMANEXT)$(SUFFIX) \
@@ -149,7 +147,6 @@
catman/frm$(CATMANEXT)$(SUFFIX) \
catman/listalias$(CATMANEXT)$(SUFFIX) \
catman/messages$(CATMANEXT)$(SUFFIX) \
- catman/mmencode$(CATMANEXT)$(SUFFIX) \
catman/newalias$(CATMANEXT)$(SUFFIX) \
catman/newmail$(CATMANEXT)$(SUFFIX) \
catman/printmail$(CATMANEXT)$(SUFFIX) \
@@ -165,7 +162,6 @@
$(REMOTE)$(MAN)/frm$(MANEXT) \
$(REMOTE)$(MAN)/listalias$(MANEXT) \
$(REMOTE)$(MAN)/messages$(MANEXT) \
- $(REMOTE)$(MAN)/mmencode$(MANEXT) \
$(REMOTE)$(MAN)/newalias$(MANEXT) \
$(REMOTE)$(MAN)/newmail$(MANEXT) \
$(REMOTE)$(MAN)/printmail$(MANEXT) \
@@ -292,7 +288,6 @@
$(MAN)/frm$(MANEXT): frm.1 ; $(INST_444)
$(MAN)/listalias$(MANEXT): listalias.1 ; $(INST_444)
$(MAN)/messages$(MANEXT): messages.1 ; $(INST_444)
-$(MAN)/mmencode$(MANEXT): mmencode.1 ; $(INST_444)
$(MAN)/newalias$(MANEXT): newalias.1 ; $(INST_444)
$(MAN)/newmail$(MANEXT): newmail.1 ; $(INST_444)
$(MAN)/printmail$(MANEXT): printmail.1 ; $(INST_444)
@@ -327,7 +322,6 @@
$(CATMAN)/frm$(CES): catman/frm$(CES) ; $(INST_644)
$(CATMAN)/listalias$(CES): catman/listalias$(CES) ; $(INST_644)
$(CATMAN)/messages$(CES): catman/messages$(CES) ; $(INST_644)
-$(CATMAN)/mmencode$(CES): catman/mmencode$(CES) ; $(INST_644)
$(CATMAN)/newalias$(CES): catman/newalias$(CES) ; $(INST_644)
$(CATMAN)/newmail$(CES): catman/newmail$(CES) ; $(INST_644)
$(CATMAN)/printmail$(CES): catman/printmail$(CES) ; $(INST_644)
@@ -371,10 +365,6 @@
@ $(DO_PACK)
catman/messages$(CATMANEXT)$(SUFFIX): messages.1
- $(DO_ROFF)
- @ $(DO_PACK)
-
-catman/mmencode$(CATMANEXT)$(SUFFIX): mmencode.1
$(DO_ROFF)
@ $(DO_PACK)
--- utils/Makefile.SH.mmencode Fri Apr 4 11:03:08 2003
+++ utils/Makefile.SH Fri Apr 4 11:03:35 2003
@@ -86,17 +86,12 @@
SUBDIR = utils
-# mmencode installation is optional
-INSTALL_MMENCODE = $(DESTBIN)/mmencode
-REMOTE_MMENCODE = $(REMOTE)/$(DESTBIN)/mmencode
-
ALL = $(BINDIR)/answer \
$(BINDIR)/checkalias \
$(BINDIR)/elmalias \
$(BINDIR)/fastmail \
$(BINDIR)/frm \
$(BINDIR)/listalias \
- $(BINDIR)/mmencode \
$(BINDIR)/messages \
$(BINDIR)/newalias \
$(BINDIR)/newmail \
@@ -124,7 +119,6 @@
elmalias.c \
fastmail.c \
from.c \
- mmencode.c \
newalias.c \
newmail.c \
readmsg.c \
@@ -134,7 +128,6 @@
elmalias.o \
fastmail.o \
from.o \
- mmencode.o \
newalias.o \
newmail.o \
readmsg.o \
@@ -158,7 +151,6 @@
elmalias_lint \
fastmail_lint \
frm_lint \
- mmencode_lint \
newalias_lint \
newmail_lint \
readmsg_lint \
@@ -179,8 +171,6 @@
FASTMAIL_OBJ = fastmail.o
FRM_SRC = from.c
FRM_OBJ = from.o
-MMENCODE_SRC = mmencode.c
-MMENCODE_OBJ = mmencode.o
NEWALIAS_SRC = newalias.c
NEWALIAS_OBJ = newalias.o
NEWMAIL_SRC = newmail.c
@@ -216,9 +206,6 @@
$(BINDIR)/frm: $(FRM_OBJ) ../lib/libutil.a
$(CC) $(LFLAGS) -o $@ $(FRM_OBJ) ../lib/libutil.a $(LIBS)
-$(BINDIR)/mmencode: $(MMENCODE_OBJ) ../lib/libutil.a
- $(CC) $(LFLAGS) -o $@ $(MMENCODE_OBJ) ../lib/libutil.a $(LIBS)
-
$(BINDIR)/newalias: $(NEWALIAS_OBJ) ../lib/libutil.a
$(CC) $(LFLAGS) -o $@ $(NEWALIAS_OBJ) ../lib/libutil.a $(LIBS)
@@ -244,7 +231,6 @@
$(DESTBIN)/nfrm: $(DESTBIN)/frm ; $(INSTALL_LINK)
$(DESTBIN)/listalias: $(BINDIR)/listalias ; $(INSTALL_EXE)
$(DESTBIN)/messages: $(BINDIR)/messages ; $(INSTALL_EXE)
-$(DESTBIN)/mmencode: $(BINDIR)/mmencode ; $(INSTALL_EXE)
$(DESTBIN)/newalias: $(BINDIR)/newalias ; $(INSTALL_EXE)
$(DESTBIN)/newmail: $(BINDIR)/newmail ; $(INSTALL_EXE)
$(DESTBIN)/printmail: $(BINDIR)/printmail ; $(INSTALL_EXE)
--xHFwDpU9dbj6ez1V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="metamail.files.mmencode.diff"
$NetBSD: $
--- Makefile.mmencode Fri Apr 4 11:08:00 2003
+++ Makefile Fri Apr 4 11:08:28 2003
@@ -105,12 +105,6 @@
(cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}")
-${RM} bin/metamail
(cd bin; ${LN} ../metamail/metamail metamail)
- -${RM} bin/mmencode
- (cd bin; ${LN} ../metamail/mmencode mmencode)
- -${RM} bin/mimencode
- (cd bin; ${LN} ../metamail/mmencode mimencode)
- -${RM} man/mimencode.1
- (cd man; ${LN} ../man/mmencode.1 mimencode.1)
-${RM} bin/mailto
(cd bin; ${LN} ../metamail/mailto mailto)
-${RM} bin/splitmail
@@ -187,7 +181,6 @@
cleanbin:
-${RM} bin/metamail
- -${RM} bin/mmencode
-${RM} bin/mimencode
-${RM} bin/mailto
-${RM} bin/splitmail
--- metamail/Makefile.mmencode Fri Apr 4 11:09:21 2003
+++ metamail/Makefile Fri Apr 4 11:09:36 2003
@@ -27,7 +27,7 @@
rm -f $@
$(CC) -c $(LOCALCFLAGS) $*.c
-all: metamail mmencode mailto splitmail
+all: metamail mailto splitmail
codes.o: codes.c ../config.h
@@ -39,10 +39,6 @@
splitmail.o: shared.c ../config.h
-mmencode: mmencode.o codes.o
- rm -f mmencode
- $(CC) $(LOCALCFLAGS) -o mmencode mmencode.o codes.o $(LDLIBS)
-
mailto: mailto.o codes.o shared.o
rm -f mailto
$(CC) $(LOCALCFLAGS) -o mailto mailto.o codes.o shared.o -ltermcap $(LDLIBS)
@@ -56,4 +52,4 @@
$(CC) $(LOCALCFLAGS) -o metamail metamail.o putenv.o codes.o uue.o shared.o $(LDLIBS)
clean:
- -rm -f metamail mmencode mailto splitmail *.o *.BAK
+ -rm -f metamail mailto splitmail *.o *.BAK
--xHFwDpU9dbj6ez1V--