Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2006 23:05:20 -0400 (EDT)
From:      Rong-En Fan <rafan@infor.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        cjh@FreeBSD.org
Subject:   ports/96495: [PATCH] print/magicfilter: update to 2.3.h, fix build on 7.x
Message-ID:  <200604290305.k3T35K3d061220@woodstock.rafan.org>
Resent-Message-ID: <200604290310.k3T3ABO4002633@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         96495
>Category:       ports
>Synopsis:       [PATCH] print/magicfilter: update to 2.3.h, fix build on 7.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 29 03:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD woodstock.rafan.org 7.0-CURRENT FreeBSD 7.0-CURRENT #21: Tue Apr 11 22:22:56 EDT 2006
>Description:
This obsoletes ports/79639, which updates to 2.3.d (I sent it one year ago).

- Update to 2.3.h

Changes from 2.3.d to 2.3.h are not much. And I decided to use ports'
file unconditionally.  It is newer and can correctly recognize Epson's
ESC/Page language:

$ /usr/local/bin/file epson2050p-epl.prn
epson2050p-epl.prn: Epson ESC/Page language printer data

$ /usr/bin/file epson2050p-epl.prn
epson2050p-epl.prn: Curses screen image

(the above system is 6.0-RELEASE, /usr/bin/file is 4.12)

As for 4.x, the base's file is too old. If you try to build magicfilter
on it, it will resuilt in using the ship-in file. That requires some
extra effects on pkg-plist. By the way, we do not add -lz anymore,
the configure script can detect this correctly. (my update to 2.3.d
requires add -lz in patch)

This update also fix build on i386 7.x (tested on 700015, around April 28).
I also tested on i386 RELENG_[456] in tinderbox, all pass.
I would like to thank Ion-Mihai Tetcu (the mail/dspam's maintainer) who
tests this on amd64 RELENG_[456] and HEAD.

The rest changes to Makefile is making portlint happy.



Added file(s):
- files/patch-configure.sh

Port maintainer (cjh@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- magicfilter-2.3.h.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/Makefile /home/rafan/tmp/ports/magicfilter/Makefile
--- /usr/ports/print/magicfilter/Makefile	Thu Feb  9 05:48:49 2006
+++ /home/rafan/tmp/ports/magicfilter/Makefile	Wed Apr 26 23:28:52 2006
@@ -6,27 +6,28 @@
 #
 
 PORTNAME=	magicfilter
-PORTVERSION=	2.3.b
+PORTVERSION=	2.3.h
 CATEGORIES=	print
 MASTER_SITES=	http://www.pell.portland.or.us/~orc/Code/magicfilter/
 
 MAINTAINER=	cjh@FreeBSD.org
 COMMENT=	Customizable, extensible automatic printer filter
 
+LIB_DEPENDS=	magic.1:${PORTSDIR}/sysutils/file
+
 USE_GHOSTSCRIPT=	yes
 
 GNU_CONFIGURE=	yes
-CONFIGURE_SCRIPT= configure.sh
+CONFIGURE_SCRIPT=	configure.sh
 CONFIGURE_TARGET=
-CONFIGURE_ARGS+= --confdir=${PREFIX}/etc --filterdir=${PREFIX}/libexec/magicfilter --use-fifo
+CONFIGURE_ARGS+=	--confdir=${PREFIX}/etc \
+			--filterdir=${PREFIX}/libexec/magicfilter \
+			--use-fifo
+CONFIGURE_ENV+=		LOCALBASE=${LOCALBASE}
 MAN5=		magicfilter.5
 MAN8=		magicfilter.8
 
 .include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700014
-BROKEN=		"Does not build on FreeBSD >= 7.0"
-.endif
 
 pre-everything::
 .if !defined(WITH_GHOSTSCRIPT_AFPL) || ${WITH_GHOSTSCRIPT_AFPL} != yes
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/distinfo /home/rafan/tmp/ports/magicfilter/distinfo
--- /usr/ports/print/magicfilter/distinfo	Thu Feb  9 05:48:49 2006
+++ /home/rafan/tmp/ports/magicfilter/distinfo	Wed Apr 26 23:28:52 2006
@@ -1,3 +1,3 @@
-MD5 (magicfilter-2.3.b.tar.gz) = a0f8ca2f0bb13f36e845eaad02561f65
-SHA256 (magicfilter-2.3.b.tar.gz) = 790149cab6abda1077ebd7f459071527561a5406927d72bd455edaa1f56a9dd9
-SIZE (magicfilter-2.3.b.tar.gz) = 162156
+MD5 (magicfilter-2.3.h.tar.gz) = 9422685a8c246924f956ef119f8ac4e7
+SHA256 (magicfilter-2.3.h.tar.gz) = 8d6a3e3e68a16aa43682cdd77e8a9d28635eef4ea5e8dcf558e9a6fb88f8642c
+SIZE (magicfilter-2.3.h.tar.gz) = 161929
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/files/patch-configure.sh /home/rafan/tmp/ports/magicfilter/files/patch-configure.sh
--- /usr/ports/print/magicfilter/files/patch-configure.sh	Wed Dec 31 19:00:00 1969
+++ /home/rafan/tmp/ports/magicfilter/files/patch-configure.sh	Wed Apr 26 23:28:51 2006
@@ -0,0 +1,21 @@
+--- 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"
+     AC_SUB MAKE_MAGIC ":"
+     AC_SUB CFMAGIC	""
+ fi
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/pkg-plist /home/rafan/tmp/ports/magicfilter/pkg-plist
--- /usr/ports/print/magicfilter/pkg-plist	Sat Dec  4 12:06:28 2004
+++ /home/rafan/tmp/ports/magicfilter/pkg-plist	Wed Apr 26 23:28:53 2006
@@ -1,5 +1,4 @@
 bin/magicfilter
-etc/mf.magic
 libexec/magicfilter/bj10e
 libexec/magicfilter/bj200
 libexec/magicfilter/bj600
--- magicfilter-2.3.h.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604290305.k3T35K3d061220>