git: 8589b1fa0368 - main - mail/mail2sms: Fix build with lvm15

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 05 Jun 2023 18:09:12 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8589b1fa036880c84ceebcb9a93f5a3e0006054b

commit 8589b1fa036880c84ceebcb9a93f5a3e0006054b
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-05 15:51:53 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-05 18:09:01 +0000

    mail/mail2sms: Fix build with lvm15
    
    - Refresh patches
    
    Approved by:    portmgr (blanket)
---
 mail/mail2sms/Makefile               | 16 +++++++++++++---
 mail/mail2sms/files/patch-mail2sms.1 |  8 ++++----
 mail/mail2sms/files/patch-mail2sms.4 |  6 +++---
 mail/mail2sms/files/patch-main.c     |  6 +++---
 mail/mail2sms/files/patch-parse.c    | 10 +++++-----
 5 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/mail/mail2sms/Makefile b/mail/mail2sms/Makefile
index dff89291434a..13274b84e52b 100644
--- a/mail/mail2sms/Makefile
+++ b/mail/mail2sms/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mail2sms
 PORTVERSION=	1.3.5
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://daniel.haxx.se/projects/mail2sms/ \
 		http://bitrote.org/distfiles/
@@ -8,13 +9,22 @@ MAINTAINER=	jharris@widomaker.com
 COMMENT=	Mail to SMS converter
 WWW=		https://daniel.haxx.se/projects/mail2sms/
 
-GNU_CONFIGURE=	yes
+LICENSE=	GPLv2+
+LICENSE_FILE=	${WRKSRC}/LEGAL
 
-OPTIONS_DEFINE=	DOCS
+GNU_CONFIGURE=	yes
 
 PLIST_FILES=	bin/mail2sms man/man1/mail2sms.1.gz man/man5/mail2sms.5.gz
 PORTDOCS=	README REGEX example.conf
 
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
+CFLAGS+=	-Wno-error=int-conversion
+.endif
+
 post-patch:
 	${CP} ${WRKSRC}/mail2sms.4 ${WRKSRC}/mail2sms.5
 	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/mail2sms.5
@@ -27,4 +37,4 @@ do-install:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/mail2sms/files/patch-mail2sms.1 b/mail/mail2sms/files/patch-mail2sms.1
index 34d60cfce867..f92e5ac19ead 100644
--- a/mail/mail2sms/files/patch-mail2sms.1
+++ b/mail/mail2sms/files/patch-mail2sms.1
@@ -1,6 +1,6 @@
---- mail2sms.1.orig	Wed Apr 16 05:22:01 2003
-+++ mail2sms.1	Wed Apr 16 05:22:57 2003
-@@ -32,7 +32,7 @@
+--- mail2sms.1.orig	2001-10-19 14:12:56 UTC
++++ mail2sms.1
+@@ -32,7 +32,7 @@ shuts off all logging
  .IP "-v"
  Shows mail2sms' version number then quits.
  .SH AUTHORS
@@ -9,7 +9,7 @@
  help from friendly contributors, such as:
  
   - Linus Nielsen <linus@haxx.se>
-@@ -48,4 +48,4 @@
+@@ -48,4 +48,4 @@ help from friendly contributors, such as:
  .SH WWW
  http://www.contactor.se/~dast/mail2sms/
  .SH "SEE ALSO"
diff --git a/mail/mail2sms/files/patch-mail2sms.4 b/mail/mail2sms/files/patch-mail2sms.4
index 325d30d5548e..82cd197ba41a 100644
--- a/mail/mail2sms/files/patch-mail2sms.4
+++ b/mail/mail2sms/files/patch-mail2sms.4
@@ -1,5 +1,5 @@
---- mail2sms.4.orig	Wed Apr 16 05:11:35 2003
-+++ mail2sms.4	Wed Apr 16 06:03:10 2003
+--- mail2sms.4.orig	2000-01-20 19:16:05 UTC
++++ mail2sms.4
 @@ -1,12 +1,12 @@
  .\" You can view this file with:
 -.\" nroff -man mail2sms.4
@@ -16,7 +16,7 @@
  .br
  .B ~/.mail2sms
  .SH DESCRIPTION
-@@ -67,7 +67,7 @@
+@@ -67,7 +67,7 @@ mail2sms from.
  http://www.contactor.se/~dast/mail2sms/
  .SH "SEE ALSO"
  .BR mail2sms (1),
diff --git a/mail/mail2sms/files/patch-main.c b/mail/mail2sms/files/patch-main.c
index ff54c97870b8..2f3041d1632b 100644
--- a/mail/mail2sms/files/patch-main.c
+++ b/mail/mail2sms/files/patch-main.c
@@ -1,6 +1,6 @@
---- main.c.orig	Wed Apr 16 05:11:21 2003
-+++ main.c	Wed Apr 16 05:12:16 2003
-@@ -18,7 +18,7 @@
+--- main.c.orig	2002-04-26 20:36:46 UTC
++++ main.c
+@@ -18,7 +18,7 @@ extern int maxparts;
  #ifdef AFS
  #define CONFIGDIR "/var/mail2sms/"
  #else
diff --git a/mail/mail2sms/files/patch-parse.c b/mail/mail2sms/files/patch-parse.c
index 0c46925f1574..89d4eb9a0321 100644
--- a/mail/mail2sms/files/patch-parse.c
+++ b/mail/mail2sms/files/patch-parse.c
@@ -1,6 +1,6 @@
---- parse.c.orig	Wed Apr 16 05:06:23 2003
-+++ parse.c	Wed Apr 16 05:45:31 2003
-@@ -48,8 +48,9 @@
+--- parse.c.orig	2002-06-10 12:19:44 UTC
++++ parse.c
+@@ -48,8 +48,9 @@ int preferedcontent(char *type)
  /*
  ** strcasestr() - case insensitive strstr()
  */
@@ -12,12 +12,12 @@
  {
    int nlen = strlen(needle);
    int hlen = strlen(haystack);
-@@ -325,7 +326,7 @@ struct body * process(char *mbox,    /*
+@@ -325,7 +326,7 @@ struct body * process(char *mbox,    /* file name */
    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;