aboutsummaryrefslogtreecommitdiff
path: root/mail/p5-FuzzyOcr-devel
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-11-27 22:49:55 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-11-27 22:49:55 +0000
commit933b93e42da5506ecee419e3f147da1a7bc06295 (patch)
treeb2addbfca8fbd63cebf3109b08ef8f5afbc7fb9a /mail/p5-FuzzyOcr-devel
parent5309b41ffccea43332daf8ac424587b5cd4a6dc3 (diff)
downloadports-933b93e42da5506ecee419e3f147da1a7bc06295.tar.gz
ports-933b93e42da5506ecee419e3f147da1a7bc06295.zip
Notes
Diffstat (limited to 'mail/p5-FuzzyOcr-devel')
-rw-r--r--mail/p5-FuzzyOcr-devel/Makefile51
-rw-r--r--mail/p5-FuzzyOcr-devel/distinfo6
2 files changed, 35 insertions, 22 deletions
diff --git a/mail/p5-FuzzyOcr-devel/Makefile b/mail/p5-FuzzyOcr-devel/Makefile
index 73ceb3f9aca7..4d9baa5419eb 100644
--- a/mail/p5-FuzzyOcr-devel/Makefile
+++ b/mail/p5-FuzzyOcr-devel/Makefile
@@ -6,60 +6,73 @@
#
PORTNAME= FuzzyOcr
-DISTVERSION= 2.3rc1
+DISTVERSION= 3.4.2
CATEGORIES= mail perl5
MASTER_SITES= http://users.own-hero.net/~decoder/${PORTNAME:L}/ \
http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/
PKGNAMEPREFIX= p5-
-DISTNAME= ${PORTNAME:L}-${DISTVERSION}
+PKGNAMESUFFIX= -devel
+DISTNAME= ${PORTNAME:L}-${DISTVERSION}${PKGNAMESUFFIX}
MAINTAINER= shaun@FreeBSD.org
COMMENT= Plugin for SpamAssassin which scans image attachments for spam
RUN_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm \
- import:${PORTSDIR}/graphics/ImageMagick \
+ gifsicle:${PORTSDIR}/graphics/gifsicle \
gocr:${PORTSDIR}/graphics/gocr \
gif2ps:${PORTSDIR}/graphics/libungif \
spamassassin:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
- ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
+ ${SITE_PERL}/MLDBM.pm:${PORTSDIR}/databases/p5-MLDBM \
${SITE_PERL}/${PERL_ARCH}/String/Approx.pm:${PORTSDIR}/devel/p5-String-Approx
+CONFLICTS= p5-FuzzyOcr-[0-9]*
+
+OPTIONS= OCRAD "Include optional ocrad scanning engine" off
+
USE_PERL5= yes
NO_BUILD= yes
-WRKSRC= ${WRKDIR}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PORTDOCS= FAQ samples
-PORTDOCS_F= FAQ samples/README samples/animated-gif.eml \
- samples/corrupted-gif.eml samples/jpeg.eml samples/png.eml
+PORTDOCS_F= FAQ samples/README samples/animated-gif.eml \
+ samples/corrupted-gif.eml samples/jpeg.eml samples/png.eml \
+ samples/ocr-animated.eml
SUB_FILES= pkg-message
-#-----------------------------------------------------------------------
-# The plugin is installed twice: once where it should go, and once where
-# it actually works from. This will hopefully be fixed at some point.
-#-----------------------------------------------------------------------
-
SA_PLUGINDIR?= Mail/SpamAssassin/Plugin
SA_CONFIGDIR?= etc/mail/spamassassin
-PLIST_FILES= ${SA_CONFIGDIR}/FuzzyOcr.pm \
- %%SITE_PERL%%/${SA_PLUGINDIR}/FuzzyOcr.pm \
+PLIST_FILES= %%SITE_PERL%%/${SA_PLUGINDIR}/FuzzyOcr.pm \
%%EXAMPLESDIR%%/FuzzyOcr.cf %%EXAMPLESDIR%%/FuzzyOcr.words
PLIST_DIRS= %%EXAMPLESDIR%%
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OCRAD)
+RUN_DEPENDS+= ocrad:${PORTSDIR}/graphics/ocrad
+.endif
+
+pre-everything::
+ @${ECHO_MSG} "+------------------------------------------------------------+"
+ @${ECHO_MSG} "| |"
+ @${ECHO_MSG} "| Warning: FuzzyOcr now requires SpamAssassin 3.1.4 or above |"
+ @${ECHO_MSG} "| |"
+ @${ECHO_MSG} "+------------------------------------------------------------+"
+
post-patch:
@${REINPLACE_CMD} -e 's,/usr/bin,${LOCALBASE}/bin,g' \
- -e 's,/bin/grep,/usr/bin/grep,g' \
-e 's,/etc/mail,${LOCALBASE}/etc/mail,g' \
${WRKSRC}/FuzzyOcr.??
- @${REINPLACE_CMD} -e 's,$$ENV{HOME},($$ENV{HOME} ? $$ENV{HOME} : "/nonexistent"),g' \
- ${WRKSRC}/FuzzyOcr.pm
+ @${REINPLACE_CMD} -e 's,package FuzzyOcr;,package Mail::SpamAssassin::Plugin::FuzzyOcr;,' \
+ ${WRKSRC}/FuzzyOcr.pm
+ @${REINPLACE_CMD} -e 's,loadplugin FuzzyOcr FuzzyOcr\.pm,loadplugin Mail::SpamAssassin::Plugin::FuzzyOcr,' \
+ ${WRKSRC}/FuzzyOcr.cf
do-install:
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.pm ${SITE_PERL}/${SA_PLUGINDIR}
- ${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.pm ${PREFIX}/${SA_CONFIGDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.cf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.words.sample ${EXAMPLESDIR}/FuzzyOcr.words
@@ -72,4 +85,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/p5-FuzzyOcr-devel/distinfo b/mail/p5-FuzzyOcr-devel/distinfo
index a0ae182da04f..2623a2a4160c 100644
--- a/mail/p5-FuzzyOcr-devel/distinfo
+++ b/mail/p5-FuzzyOcr-devel/distinfo
@@ -1,3 +1,3 @@
-MD5 (fuzzyocr-2.3rc1.tar.gz) = 43879c3f30045b0067d21f9e44b90697
-SHA256 (fuzzyocr-2.3rc1.tar.gz) = bdd8c3524e6445ea79968497c84a9d5e58491ccab9e05aa0784179bec8c24131
-SIZE (fuzzyocr-2.3rc1.tar.gz) = 75295
+MD5 (fuzzyocr-3.4.2-devel.tar.gz) = 2ad9c42ef44ba621190402f5060dde4f
+SHA256 (fuzzyocr-3.4.2-devel.tar.gz) = 0f50fabf5b149a08d6c4bc98aaa4682fdfdb7fc223e0eb4c45f784a2635a9a4b
+SIZE (fuzzyocr-3.4.2-devel.tar.gz) = 89505