Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 18:11:58 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306756 - in head/mail/mail2sms: . files
Message-ID:  <201210311811.q9VIBwlc002085@svn.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help
Author: pawel
Date: Wed Oct 31 18:11:58 2012
New Revision: 306756
URL: http://svn.freebsd.org/changeset/ports/306756

Log:
  - Fix build with clang [1]
  - Switch to PLIST_FILES, PORTDOCS
  - Convert to OptionsNG
  
  PR:		ports/172574 [1]
  Submitted by:	Boris Samorodov <bsam@FreeBSD.org> [1]
  Approved by:	maintainer timeout (21 days)
  Feature safe:	yes

Deleted:
  head/mail/mail2sms/pkg-plist
Modified:
  head/mail/mail2sms/Makefile
  head/mail/mail2sms/files/patch-aa

Modified: head/mail/mail2sms/Makefile
==============================================================================
--- head/mail/mail2sms/Makefile	Wed Oct 31 18:11:33 2012	(r306755)
+++ head/mail/mail2sms/Makefile	Wed Oct 31 18:11:58 2012	(r306756)
@@ -1,23 +1,28 @@
-# New ports collection makefile for:   mail2sms
-# Date created:		2003-04-16
-# Whom:			Gerhard Gonter <g.gonter@ieee.org>
-#
+# Created by: Gerhard Gonter <g.gonter@ieee.org>
 # $FreeBSD$
 
 PORTNAME=	mail2sms
 PORTVERSION=	1.3.5
 CATEGORIES=	mail
 MASTER_SITES=	http://www.contactor.se/~dast/stuff/
-DISTNAME=	mail2sms-${PORTVERSION}
 
 MAINTAINER=	g.gonter@ieee.org
 COMMENT=	Mail to SMS converter
 
 GNU_CONFIGURE=	yes
 
+PLIST_FILES=	bin/${PORTNAME}
 MAN1=		mail2sms.1
 MAN5=		mail2sms.5
 
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+PORTDOCS=	README REGEX example.conf
+.endif
+
 post-patch:
 	${CP} ${WRKSRC}/mail2sms.4 ${WRKSRC}/mail2sms.5
 	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/mail2sms.5
@@ -27,10 +32,11 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/mail2sms ${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1/
 	${INSTALL_MAN} ${WRKSRC}/${MAN5} ${PREFIX}/man/man5/
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${PREFIX}/share/doc/mail2sms
-	${INSTALL_MAN} ${WRKSRC}/README ${WRKSRC}/REGEX ${WRKSRC}/example.conf \
-	${PREFIX}/share/doc/mail2sms
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+	${INSTALL_MAN} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
 .endif
 
 .include <bsd.port.mk>

Modified: head/mail/mail2sms/files/patch-aa
==============================================================================
--- head/mail/mail2sms/files/patch-aa	Wed Oct 31 18:11:33 2012	(r306755)
+++ head/mail/mail2sms/files/patch-aa	Wed Oct 31 18:11:58 2012	(r306756)
@@ -23,6 +23,15 @@
  {
    int nlen = strlen(needle);
    int hlen = strlen(haystack);
+@@ -325,7 +326,7 @@ struct body * process(char *mbox,    /*
+   if (use_stdin || !mbox || !strcasecmp(mbox, "NONE"))
+     fp = stdin;
+   else if ((fp = fopen(mbox, "r")) == NULL) {
+-    return; /* add error code */
++    return -1; /* add error code */
+   }
+
+   isinheader = 1;
 --- mail2sms.1.orig	Wed Apr 16 05:22:01 2003
 +++ mail2sms.1	Wed Apr 16 05:22:57 2003
 @@ -32,7 +32,7 @@



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?201210311811.q9VIBwlc002085>