git: 2d2f4f4462b7 - main - print/magicfilter: Update version 2.3.h=>2.3.i

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Tue, 16 May 2023 15:47:06 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2d2f4f4462b7ff7ddfa496bbf0bbcace9fb78fc3

commit 2d2f4f4462b7ff7ddfa496bbf0bbcace9fb78fc3
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-05-16 14:29:22 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-05-16 15:46:53 +0000

    print/magicfilter: Update version 2.3.h=>2.3.i
    
    - Switch MASTER_SITES to GH
    - Adopt port
    - Add LICENSE BSD3CLAUSE
    - Unbreak on HEAD
    - Refresh patches
    
    Changelog: https://github.com/Orc/magicfilter/releases/tag/v2.3.i
---
 print/magicfilter/Makefile                 | 23 +++++++++++++++--------
 print/magicfilter/distinfo                 |  5 +++--
 print/magicfilter/files/patch-Makefile.in  |  4 ++--
 print/magicfilter/files/patch-configure.sh | 21 ---------------------
 print/magicfilter/files/patch-fe.c         | 11 -----------
 print/magicfilter/files/patch-file__file.c | 12 ------------
 print/magicfilter/files/patch-getaline.c   | 12 ------------
 print/magicfilter/files/patch-getline.c    | 20 --------------------
 print/magicfilter/files/patch-rule.h       | 11 -----------
 9 files changed, 20 insertions(+), 99 deletions(-)

diff --git a/print/magicfilter/Makefile b/print/magicfilter/Makefile
index cf129129fff6..a48840de882e 100644
--- a/print/magicfilter/Makefile
+++ b/print/magicfilter/Makefile
@@ -1,14 +1,20 @@
 PORTNAME=	magicfilter
-PORTVERSION=	2.3.h
-PORTREVISION=	9
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.3.i
 CATEGORIES=	print
-MASTER_SITES=	http://www.pell.portland.or.us/~orc/Code/magicfilter/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	bofh@FreeBSD.org
 COMMENT=	Customizable, extensible automatic printer filter
 WWW=		https://www.pell.portland.or.us/~orc/Code/magicfilter/
 
+LICENSE=	BSD3CLAUSE
+
+BUILD_DEPENDS=	${LOCALBASE}/lib/libmagic.so:sysutils/file
+RUN_DEPENDS=	${LOCALBASE}/lib/libmagic.so:sysutils/file
+
 USES=		ghostscript
+USE_GITHUB=	yes
+GH_ACCOUNT=	Orc
 
 HAS_CONFIGURE=	yes
 CONFIGURE_SCRIPT=	configure.sh
@@ -18,9 +24,10 @@ CONFIGURE_ARGS+=	--prefix=${PREFIX} \
 			--use-fifo
 CONFIGURE_ENV+=		LOCALBASE=${LOCALBASE}
 
-.if exists(${LOCALBASE}/lib/libmagic.so)
-BUILD_DEPENDS+=	${LOCALBASE}/lib/libmagic.so:sysutils/file
-RUN_DEPENDS+=	${LOCALBASE}/lib/libmagic.so:sysutils/file
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400079
+CFLAGS+=	-Wno-error=int-conversion
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/print/magicfilter/distinfo b/print/magicfilter/distinfo
index 3cc2987f181a..7c9410eb8cc2 100644
--- a/print/magicfilter/distinfo
+++ b/print/magicfilter/distinfo
@@ -1,2 +1,3 @@
-SHA256 (magicfilter-2.3.h.tar.gz) = 8d6a3e3e68a16aa43682cdd77e8a9d28635eef4ea5e8dcf558e9a6fb88f8642c
-SIZE (magicfilter-2.3.h.tar.gz) = 161929
+TIMESTAMP = 1684246289
+SHA256 (Orc-magicfilter-v2.3.i_GH0.tar.gz) = 39b1e0764c6318d2e90c20b58b135d9eb29facd9b8055c8b1c4766a731d20afe
+SIZE (Orc-magicfilter-v2.3.i_GH0.tar.gz) = 120443
diff --git a/print/magicfilter/files/patch-Makefile.in b/print/magicfilter/files/patch-Makefile.in
index df6d48ceea91..07312cf1f56d 100644
--- a/print/magicfilter/files/patch-Makefile.in
+++ b/print/magicfilter/files/patch-Makefile.in
@@ -1,5 +1,5 @@
---- Makefile.in.orig	2014-07-07 11:57:40.878417316 +0800
-+++ Makefile.in	2014-07-07 11:59:03.900407189 +0800
+--- Makefile.in.orig	2009-11-23 03:45:02 UTC
++++ Makefile.in
 @@ -44,46 +44,46 @@ cfmagic: file/magic
  	@MAKE_MAGIC@ magic
  
diff --git a/print/magicfilter/files/patch-configure.sh b/print/magicfilter/files/patch-configure.sh
deleted file mode 100644
index e286659fe156..000000000000
--- a/print/magicfilter/files/patch-configure.sh
+++ /dev/null
@@ -1,21 +0,0 @@
---- configure.sh.orig	Thu Apr 27 10:32:23 2006
-+++ configure.sh	Thu Apr 27 10:33:46 2006
-@@ -1061,6 +1061,7 @@
- 	AC_LIBS="$AC_LIBS -lz"
- 	unset BUILD_MAGIC
-     fi
-+    unset BUILD_MAGIC
- 
-     if [ "$BUILD_MAGIC" ]; then
- 	case $ac_os in
-@@ -1106,8 +1107,8 @@
-     AC_SUB CFMAGIC	"cfmagic"
- else
-     AC_SUB LIBMAGIC ""
--    AC_SUB MAGIC_HEADER ""
--    AC_SUB MAGIC_LIB ""
-+    AC_SUB MAGIC_HEADER "-I${LOCALBASE}/include"
-+    AC_SUB MAGIC_LIB "-L${LOCALBASE}/lib -Wl,-rpath -Wl,${LOCALBASE}/lib"
-     AC_SUB MAKE_MAGIC ":"
-     AC_SUB CFMAGIC	""
- fi
diff --git a/print/magicfilter/files/patch-fe.c b/print/magicfilter/files/patch-fe.c
deleted file mode 100644
index 5df9f96ae79c..000000000000
--- a/print/magicfilter/files/patch-fe.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- fe.c.orig	2003-05-09 18:27:15 UTC
-+++ fe.c
-@@ -128,7 +128,7 @@ be(int input, int output)
- 
-     /* read rules
-      */
--    while ( (r = getline(f)) != 0) {
-+    while ( (r = get_line(f)) != 0) {
- 	rulecount++;
- 	if (tail) {
- 	    tail->next = r;
diff --git a/print/magicfilter/files/patch-file__file.c b/print/magicfilter/files/patch-file__file.c
deleted file mode 100644
index 4a377f9ed4c8..000000000000
--- a/print/magicfilter/files/patch-file__file.c
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur file/file.c file/file.c
---- file/file.c	Sun Dec  5 01:32:50 2004
-+++ file/file.c	Sun Dec  5 01:34:31 2004
-@@ -33,7 +33,7 @@
- #include <string.h>
- #include <errno.h>
- #include <sys/param.h>	/* for MAXPATHLEN */
--#include <malloc.h>
-+#include <stdlib.h>
- 
- extern int getopt();
- extern int optind;
diff --git a/print/magicfilter/files/patch-getaline.c b/print/magicfilter/files/patch-getaline.c
deleted file mode 100644
index 175cf13fc37c..000000000000
--- a/print/magicfilter/files/patch-getaline.c
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur getaline.c getaline.c
---- getaline.c	Sun Dec  5 01:32:50 2004
-+++ getaline.c	Sun Dec  5 01:33:24 2004
-@@ -27,7 +27,7 @@
-  *  THE POSSIBILITY OF SUCH DAMAGE.
-  */
- #include <stdio.h>
--#include <malloc.h>
-+#include <stdlib.h>
- 
- #include "magicfilter.h"
- 
diff --git a/print/magicfilter/files/patch-getline.c b/print/magicfilter/files/patch-getline.c
deleted file mode 100644
index 02fdb0dd9b0e..000000000000
--- a/print/magicfilter/files/patch-getline.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- getline.c.orig	2002-12-14 09:02:26 UTC
-+++ getline.c
-@@ -34,7 +34,7 @@
-  *	/pattern/	action[/hint/]	[arg {arg ...}]
-  */
- 
--#include <malloc.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #include "rule.h"
-@@ -175,7 +175,7 @@ vis(FILE *output, unsigned char *s)
-  * getline() gets a rule off the input stream
-  */
- struct rule *
--getline(FILE *input)
-+get_line(FILE *input)
- {
-     static char *bfr = 0;	/* a buffer for reading lines into */
-     static int buflen = 0;	/* size of that buffer */
diff --git a/print/magicfilter/files/patch-rule.h b/print/magicfilter/files/patch-rule.h
deleted file mode 100644
index f3b6b2057289..000000000000
--- a/print/magicfilter/files/patch-rule.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- rule.h.orig	2002-07-11 23:23:43 UTC
-+++ rule.h
-@@ -55,7 +55,7 @@ struct rule {
-     struct rule *next;		/* next rule in the chain */
- } ;
- 
--extern struct rule *getline(FILE *);
-+extern struct rule *get_line(FILE *);
- extern struct rule *rules;
- char * action_p(enum rule_action);
-