SOURCES: nmh-DESTDIR.patch (NEW), nmh-unquote.patch (NEW) - for 1.1

freetz freetz at pld-linux.org
Mon Jul 25 16:31:55 CEST 2005


Author: freetz                       Date: Mon Jul 25 14:31:55 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- for 1.1

---- Files affected:
SOURCES:
   nmh-DESTDIR.patch (NONE -> 1.1)  (NEW), nmh-unquote.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/nmh-DESTDIR.patch
diff -u /dev/null SOURCES/nmh-DESTDIR.patch:1.1
--- /dev/null	Mon Jul 25 16:31:55 2005
+++ SOURCES/nmh-DESTDIR.patch	Mon Jul 25 16:31:50 2005
@@ -0,0 +1,234 @@
+diff -uNr nmh.orig/etc/Makefile.in nmh/etc/Makefile.in
+--- nmh.orig/etc/Makefile.in	2003-10-24 22:17:19.000000000 +0200
++++ nmh/etc/Makefile.in	2005-03-22 20:21:20.983174360 +0100
+@@ -72,24 +72,24 @@
+ 	rm -f $@
+ 	$(SED) -e 's,%mts%,$(MTS),' \
+ 	       -e 's,%mailspool%,$(mailspool),' \
+-	       -e 's,%etcdir%,$(etcdir),' \
++	       -e 's,%etcdir%,$(DESTDIR)/$(etcdir),' \
+ 	       -e 's,%masquerade%,$(masquerade),' \
+ 	       -e 's,%smtpservers%,$(smtpservers),' < $(srcdir)/mts.conf.in > $@
+ 
+ sendfiles: $(srcdir)/sendfiles.in Makefile
+ 	rm -f $@
+-	$(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
++	$(SED) -e 's,%libdir%,$(DESTDIR)/$(libdir),' < $(srcdir)/sendfiles.in > $@
+ 
+ install: install-bin-files install-etc-files
+ 
+ install-bin-files:
+-	$(top_srcdir)/mkinstalldirs $(bindir)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(bindir)
+ 	for script in $(GENERATED_BIN_FILES); do \
+-	  $(INSTALL_PROGRAM) $$script $(bindir)/$$script; \
++	  $(INSTALL_PROGRAM) $$script $(DESTDIR)/$(bindir)/$$script; \
+ 	done
+ 
+ install-etc-files:
+-	$(top_srcdir)/mkinstalldirs $(etcdir)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(etcdir)
+ 	INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
+ 	for file in $(STATIC_FILES); do \
+ 	  INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
+@@ -97,11 +97,11 @@
+ 	for path in $$INSTALL_FILES; do \
+ 	  file=`basename $$path`; \
+ 	  echo "Installing $$file..."; \
+-	  if [ -f $(etcdir)/$$file ]; then \
+-	    mv $(etcdir)/$$file $(etcdir)/$$file.prev; \
+-	    $(INSTALL_DATA) $$path $(etcdir)/$$file; \
+-	    if diff $(etcdir)/$$file.prev $(etcdir)/$$file; then \
+-	      rm $(etcdir)/$$file.prev; \
++	  if [ -f $(DESTDIR)/$(etcdir)/$$file ]; then \
++	    mv $(DESTDIR)/$(etcdir)/$$file $(DESTDIR)/$(etcdir)/$$file.prev; \
++	    $(INSTALL_DATA) $$path $(DESTDIR)/$(etcdir)/$$file; \
++	    if diff $(DESTDIR)/$(etcdir)/$$file.prev $(DESTDIR)/$(etcdir)/$$file; then \
++	      rm $(DESTDIR)/$(etcdir)/$$file.prev; \
+ 	    else \
+ 	      echo; \
+ 	      echo "  Previous version of $$file saved as $$file.prev due\c";\
+@@ -111,7 +111,7 @@
+ 	      echo; \
+ 	    fi; \
+ 	  else \
+-	    $(INSTALL_DATA) $$path $(etcdir)/$$file; \
++	    $(INSTALL_DATA) $$path $(DESTDIR)/$(etcdir)/$$file; \
+ 	  fi; \
+ 	done
+ 
+@@ -119,12 +119,12 @@
+ 
+ uninstall-bin-files:
+ 	for script in $(GENERATED_BIN_FILES); do \
+-	  rm -f $(bindir)/$$script; \
++	  rm -f $(DESTDIR)/$(bindir)/$$script; \
+ 	done
+ 
+ uninstall-etc-files:
+ 	for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
+-	  rm -f $(etcdir)/$$file; \
++	  rm -f $(DESTDIR)/$(etcdir)/$$file; \
+ 	done
+ 
+ # ========== DEPENDENCIES FOR CLEANUP ==========
+diff -uNr nmh.orig/man/Makefile.in nmh/man/Makefile.in
+--- nmh.orig/man/Makefile.in	2003-10-24 22:17:36.000000000 +0200
++++ nmh/man/Makefile.in	2005-03-22 20:21:48.037061544 +0100
+@@ -50,7 +50,7 @@
+ .man.$(manext8):
+ 	$(SEDMAN)
+ 
+-# man pages to install in $(mandir)/$(manext1)
++# man pages to install in $(DESTDIR)/$(mandir)/$(manext1)
+ MAN1SRC = ali. anno. burst. comp.		\
+        dist. flist. flists. folder. folders.	\
+        forw. inc. install-mh. mark. mh-chart.	\
+@@ -99,10 +99,10 @@
+ 	echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED.  DO NOT EDIT.,g' > $@
+ 	echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
+ 	echo 's,%nmhdate%,$(DATE),g' >> $@
+-	echo 's,%bindir%,$(bindir),g' >> $@
++	echo 's,%bindir%,$(DESTDIR)/$(bindir),g' >> $@
+ 	echo 's,%etcdir%,$(etcdir),g' >> $@
+-	echo 's,%libdir%,$(libdir),g' >> $@
+-	echo 's,%mandir%,$(mandir),g' >> $@
++	echo 's,%libdir%,$(DESTDIR)/$(libdir),g' >> $@
++	echo 's,%mandir%,$(DESTDIR)/$(mandir),g' >> $@
+ 	echo 's,%mailspool%,$(mailspool),g' >> $@
+ 	echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
+ 	echo 's,%default_editor%,$(default_editor),g' >> $@
+@@ -130,27 +130,27 @@
+ 
+ # install the man pages in man1
+ install-man1:
+-	$(top_srcdir)/mkinstalldirs $(mandir)/man$(manext1)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(mandir)/man$(manext1)
+ 	for file in $(MAN1); do \
+-	  $(INSTALL_DATA) $$file $(mandir)/man$(manext1) ; \
++	  $(INSTALL_DATA) $$file $(DESTDIR)/$(mandir)/man$(manext1) ; \
+ 	done
+ 
+ # install the man pages in man5
+ install-man5:
+-	$(top_srcdir)/mkinstalldirs $(mandir)/man$(manext5)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(mandir)/man$(manext5)
+ 	for file in $(MAN5); do \
+-	  $(INSTALL_DATA) $$file $(mandir)/man$(manext5) ; \
++	  $(INSTALL_DATA) $$file $(DESTDIR)/$(mandir)/man$(manext5) ; \
+ 	done
+-	if [ ! -f $(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
+-	  ( cd $(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
++	if [ ! -f $(DESTDIR)/$(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
++	  ( cd $(DESTDIR)/$(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
+             mh_profile.$(manext5) ) \
+ 	fi
+ 
+ # install the man pages in man8
+ install-man8:
+-	$(top_srcdir)/mkinstalldirs $(mandir)/man$(manext8)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(mandir)/man$(manext8)
+ 	for file in $(MAN8); do \
+-	  $(INSTALL_DATA) $$file $(mandir)/man$(manext8) ; \
++	  $(INSTALL_DATA) $$file $(DESTDIR)/$(mandir)/man$(manext8) ; \
+ 	done
+ 
+ # ========= UNINSTALL TARGETS =========
+@@ -160,19 +160,19 @@
+ # uninstall the man pages in man1
+ uninstall-man1:
+ 	for file in $(MAN1); do \
+-	  rm -f $(mandir)/man$(manext1)/$$file; \
++	  rm -f $(DESTDIR)/$(mandir)/man$(manext1)/$$file; \
+ 	done
+ 
+ # uninstall the man pages in man5
+ uninstall-man5:
+ 	for file in $(MAN5); do \
+-	  rm -f $(mandir)/man$(manext5)/$$file; \
++	  rm -f $(DESTDIR)/$(mandir)/man$(manext5)/$$file; \
+ 	done
+ 
+ # uninstall the man pages in man8
+ uninstall-man8:
+ 	for file in $(MAN8); do \
+-	  rm -f $(mandir)/man$(manext8)/$$file; \
++	  rm -f $(DESTDIR)/$(mandir)/man$(manext8)/$$file; \
+ 	done
+ 
+ # ========== DEPENDENCIES FOR CLEANUP ==========
+diff -uNr nmh.orig/uip/Makefile.in nmh/uip/Makefile.in
+--- nmh.orig/uip/Makefile.in	2003-10-24 22:17:38.000000000 +0200
++++ nmh/uip/Makefile.in	2005-03-22 20:21:20.985174056 +0100
+@@ -255,51 +255,51 @@
+ 
+ # install commands
+ install-cmds:
+-	$(top_srcdir)/mkinstalldirs $(bindir)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(bindir)
+ 	for cmd in $(CMDS); do \
+-	  $(INSTALL_PROGRAM) $$cmd $(bindir)/$$cmd; \
++	  $(INSTALL_PROGRAM) $$cmd $(DESTDIR)/$(bindir)/$$cmd; \
+ 	done
+ 
+ # install links
+ install-lcmds:
+-	rm -f $(bindir)/flists
+-	rm -f $(bindir)/folders
+-	rm -f $(bindir)/prev
+-	rm -f $(bindir)/next
+-	rm -f $(libdir)/install-mh
+-	$(LN) $(bindir)/flist  $(bindir)/flists
+-	$(LN) $(bindir)/folder $(bindir)/folders
+-	$(LN) $(bindir)/show   $(bindir)/prev
+-	$(LN) $(bindir)/show   $(bindir)/next
+-	$(LN) $(bindir)/install-mh   $(libdir)/install-mh
++	rm -f $(DESTDIR)/$(bindir)/flists
++	rm -f $(DESTDIR)/$(bindir)/folders
++	rm -f $(DESTDIR)/$(bindir)/prev
++	rm -f $(DESTDIR)/$(bindir)/next
++	rm -f $(DESTDIR)/$(libdir)/install-mh
++	$(LN) $(DESTDIR)/$(bindir)/flist  $(DESTDIR)/$(bindir)/flists
++	$(LN) $(DESTDIR)/$(bindir)/folder $(DESTDIR)/$(bindir)/folders
++	$(LN) $(DESTDIR)/$(bindir)/show   $(DESTDIR)/$(bindir)/prev
++	$(LN) $(DESTDIR)/$(bindir)/show   $(DESTDIR)/$(bindir)/next
++	$(LN) $(DESTDIR)/$(bindir)/install-mh   $(DESTDIR)/$(libdir)/install-mh
+ 
+ # install misc support binaries
+ install-misc:
+-	$(top_srcdir)/mkinstalldirs $(libdir)
++	$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
+ 	for misc in $(MISC); do \
+-	  $(INSTALL_PROGRAM) $$misc $(libdir)/$$misc; \
++	  $(INSTALL_PROGRAM) $$misc $(DESTDIR)/$(libdir)/$$misc; \
+ 	done
+ 
+ # install commands with special installation needs (thus no $(SCMDS) use here)
+ install-scmds:
+ 	if test x$(SETGID_MAIL) != x; then \
+-	  $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(bindir)/$$cmd; \
++	  $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(DESTDIR)/$(bindir)/$$cmd; \
+ 	else \
+-	  $(INSTALL_PROGRAM)                 inc $(bindir)/$$cmd; \
++	  $(INSTALL_PROGRAM)                 inc $(DESTDIR)/$(bindir)/$$cmd; \
+ 	fi
+ 
+ uninstall:
+ 	for cmd in $(CMDS); do \
+-	  rm -f $(bindir)/$$cmd; \
++	  rm -f $(DESTDIR)/$(bindir)/$$cmd; \
+ 	done
+ 	for lcmd in $(LCMDS); do \
+-	  rm -f $(bindir)/$$lcmd; \
++	  rm -f $(DESTDIR)/$(bindir)/$$lcmd; \
+ 	done
+ 	for misc in $(MISC); do \
+-	  rm -f $(libdir)/$$misc; \
++	  rm -f $(DESTDIR)/$(libdir)/$$misc; \
+ 	done
+ 	for cmd in $(SCMDS); do \
+-	  rm -f $(bindir)/$$cmd; \
++	  rm -f $(DESTDIR)/$(bindir)/$$cmd; \
+ 	done
+ 
+ # ========== DEPENDENCIES FOR CLEANUP ==========

================================================================
Index: SOURCES/nmh-unquote.patch
diff -u /dev/null SOURCES/nmh-unquote.patch:1.1
--- /dev/null	Mon Jul 25 16:31:55 2005
+++ SOURCES/nmh-unquote.patch	Mon Jul 25 16:31:50 2005
@@ -0,0 +1,156 @@
+Index: h/fmt_compile.h
+===================================================================
+RCS file: /cvs-latest/nmh/nmh/h/fmt_compile.h,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 fmt_compile.h
+--- h/fmt_compile.h	30 Apr 1999 18:08:34 -0000	1.1.1.1
++++ h/fmt_compile.h	19 Dec 2003 14:58:15 -0000
+@@ -70,40 +70,41 @@
+ #define FT_LS_FRIENDLY	58	/* set "str" to "friendly" format addr */
+ #define FT_LV_HOSTTYPE	59	/* set "value" to addr host type       */
+ #define FT_LV_INGRPF	60	/* set "value" to addr in-group flag   */
+-#define FT_LV_NOHOSTF	61	/* set "value" to addr no-host flag    */
++#define FT_LS_UNQUOTE	61	/* remove RFC 2822 quotes from "str"   */
++#define FT_LV_NOHOSTF	62	/* set "value" to addr no-host flag */
+ 
+ /* Date Coercion */
+-#define FT_LOCALDATE	62	/* Coerce date to local timezone */
+-#define FT_GMTDATE	63	/* Coerce date to gmt            */
++#define FT_LOCALDATE	63	/* Coerce date to local timezone */
++#define FT_GMTDATE	64	/* Coerce date to gmt            */
+ 
+ /* pre-format processing */
+-#define FT_PARSEDATE	64	/* parse comp into a date (tws) struct */
+-#define FT_PARSEADDR	65	/* parse comp into a mailaddr struct   */
+-#define FT_FORMATADDR	66	/* let external routine format addr    */
+-#define FT_MYMBOX	67	/* do "mymbox" test on comp            */
++#define FT_PARSEDATE	65	/* parse comp into a date (tws) struct */
++#define FT_PARSEADDR	66	/* parse comp into a mailaddr struct   */
++#define FT_FORMATADDR	67	/* let external routine format addr    */
++#define FT_MYMBOX	68	/* do "mymbox" test on comp            */
+ 
+ /* misc. */		/* ADDTOSEQ only works if you include "options LBL" */
+-#define FT_ADDTOSEQ	68	/* add current msg to a sequence       */
++#define FT_ADDTOSEQ	69	/* add current msg to a sequence       */
+ 
+ /* conditionals & control flow (must be last) */
+-#define FT_SAVESTR	69	/* save current str reg               */
+-#define FT_DONE		70	/* stop formatting                    */
+-#define FT_PAUSE	71	/* pause                              */
+-#define FT_NOP		72	/* nop                                */
+-#define FT_GOTO		73	/* (relative) goto                    */
+-#define FT_IF_S_NULL	74	/* test if "str" null                 */
+-#define FT_IF_S		75	/* test if "str" non-null             */
+-#define FT_IF_V_EQ	76	/* test if "value" = literal          */
+-#define FT_IF_V_NE	77	/* test if "value" != literal         */
+-#define FT_IF_V_GT	78	/* test if "value" > literal          */
+-#define FT_IF_MATCH	79	/* test if "str" contains literal     */
+-#define FT_IF_AMATCH	80	/* test if "str" starts with literal  */
+-#define FT_S_NULL	81	/* V = 1 if "str" null                */
+-#define FT_S_NONNULL	82	/* V = 1 if "str" non-null            */
+-#define FT_V_EQ		83	/* V = 1 if "value" = literal         */
+-#define FT_V_NE		84	/* V = 1 if "value" != literal        */
+-#define FT_V_GT		85	/* V = 1 if "value" > literal         */
+-#define FT_V_MATCH	86	/* V = 1 if "str" contains literal    */
+-#define FT_V_AMATCH	87	/* V = 1 if "str" starts with literal */
++#define FT_SAVESTR	70	/* save current str reg               */
++#define FT_DONE		71	/* stop formatting                    */
++#define FT_PAUSE	72	/* pause                              */
++#define FT_NOP		73	/* nop                                */
++#define FT_GOTO		74	/* (relative) goto                    */
++#define FT_IF_S_NULL	75	/* test if "str" null                 */
++#define FT_IF_S		76	/* test if "str" non-null             */
++#define FT_IF_V_EQ	77	/* test if "value" = literal          */
++#define FT_IF_V_NE	78	/* test if "value" != literal         */
++#define FT_IF_V_GT	79	/* test if "value" > literal          */
++#define FT_IF_MATCH	80	/* test if "str" contains literal     */
++#define FT_IF_AMATCH	81	/* test if "str" starts with literal  */
++#define FT_S_NULL	82	/* V = 1 if "str" null                */
++#define FT_S_NONNULL	83	/* V = 1 if "str" non-null            */
++#define FT_V_EQ		84	/* V = 1 if "value" = literal         */
++#define FT_V_NE		85	/* V = 1 if "value" != literal        */
++#define FT_V_GT		86	/* V = 1 if "value" > literal         */
++#define FT_V_MATCH	87	/* V = 1 if "str" contains literal    */
++#define FT_V_AMATCH	88	/* V = 1 if "str" starts with literal */
+ 
+ #define IF_FUNCS FT_S_NULL	/* start of "if" functions */
+Index: man/mh-format.man
+===================================================================
+RCS file: /cvs-latest/nmh/nmh/man/mh-format.man,v
+retrieving revision 1.7
+diff -u -r1.7 mh-format.man
+--- man/mh-format.man	21 Sep 2003 17:09:31 -0000	1.7
++++ man/mh-format.man	19 Dec 2003 14:58:18 -0000
+@@ -282,6 +282,7 @@
+ .\" decodecomp	comp	string	Set \fIstr\fR to RFC-2047 decoded component text
+ decode	expr	string	decode \fIstr\fR as RFC-2047 (MIME-encoded) 
+ 			component
++unquote	expr	string	remove RFC-2822 quotes from \fIstr\fR
+ trim	expr		trim trailing white-space from \fIstr\fR
+ putstr	expr		print \fIstr\fR
+ putstrf	expr		print \fIstr\fR in a fixed width
+Index: sbr/fmt_compile.c
+===================================================================
+RCS file: /cvs-latest/nmh/nmh/sbr/fmt_compile.c,v
+retrieving revision 1.6
+diff -u -r1.6 fmt_compile.c
+--- sbr/fmt_compile.c	11 Aug 2003 01:20:52 -0000	1.6
++++ sbr/fmt_compile.c	19 Dec 2003 14:58:18 -0000
+@@ -149,6 +149,8 @@
+      { "mymbox",     TF_COMP,	FT_LV_COMPFLAG,	FT_MYMBOX,	TFL_PUTN },
+      { "addtoseq",   TF_STR,	FT_ADDTOSEQ,	0,		0 },
+ 
++     { "unquote",   TF_EXPR, 	FT_LS_UNQUOTE,	0,		TFL_PUTS},
++
+      { NULL,         0,		0,		0,		0 }
+ };
+ 
+Index: sbr/fmt_scan.c
+===================================================================
+RCS file: /cvs-latest/nmh/nmh/sbr/fmt_scan.c,v
+retrieving revision 1.13
+diff -u -r1.13 fmt_scan.c
+--- sbr/fmt_scan.c	30 Sep 2003 19:55:12 -0000	1.13
++++ sbr/fmt_scan.c	19 Dec 2003 14:58:20 -0000
+@@ -682,6 +682,38 @@
+ 		  }
+ 		}
+ 	    }
++	    break;  
++
++
++		/* UNQUOTEs RFC-2822 quoted-string and quoted-pair */
++	case FT_LS_UNQUOTE:
++	    if (str) {	  	
++		int m;
++		strncpy(buffer, str, sizeof(buffer));
++		str = buffer;
++	
++		/* we will parse from buffer to buffer2 */
++		n = 0; /* n is the input position in str */
++		m = 0; /* m is the ouput position in buffer2 */
++
++		while ( str[n] != '\0') {
++		    switch ( str[n] ) {
++			case '\\':
++			    n++;
++			    if ( str[n] != '\0') 
++				buffer2[m++] = str[n++];
++			    break;
++			case '"':
++			    n++;
++			    break;
++			default:
++			    buffer2[m++] = str[n++];
++			    break;
++			}		 
++		}
++		buffer2[m] = '\0';
++		str = buffer2;
++            }
+ 	    break;
+ 
+ 	case FT_LOCALDATE:
+
+
+
================================================================



More information about the pld-cvs-commit mailing list