head	1.2;
access;
symbols
	pkgsrc-2013Q2:1.2.0.50
	pkgsrc-2013Q2-base:1.2
	pkgsrc-2012Q4:1.2.0.48
	pkgsrc-2012Q4-base:1.2
	pkgsrc-2011Q4:1.2.0.46
	pkgsrc-2011Q4-base:1.2
	pkgsrc-2011Q2:1.2.0.44
	pkgsrc-2011Q2-base:1.2
	pkgsrc-2009Q4:1.2.0.42
	pkgsrc-2009Q4-base:1.2
	pkgsrc-2008Q4:1.2.0.40
	pkgsrc-2008Q4-base:1.2
	pkgsrc-2008Q3:1.2.0.38
	pkgsrc-2008Q3-base:1.2
	cube-native-xorg:1.2.0.36
	cube-native-xorg-base:1.2
	pkgsrc-2008Q2:1.2.0.34
	pkgsrc-2008Q2-base:1.2
	pkgsrc-2008Q1:1.2.0.32
	pkgsrc-2008Q1-base:1.2
	pkgsrc-2007Q4:1.2.0.30
	pkgsrc-2007Q4-base:1.2
	pkgsrc-2007Q3:1.2.0.28
	pkgsrc-2007Q3-base:1.2
	pkgsrc-2007Q2:1.2.0.26
	pkgsrc-2007Q2-base:1.2
	pkgsrc-2007Q1:1.2.0.24
	pkgsrc-2007Q1-base:1.2
	pkgsrc-2006Q4:1.2.0.22
	pkgsrc-2006Q4-base:1.2
	pkgsrc-2006Q3:1.2.0.20
	pkgsrc-2006Q3-base:1.2
	pkgsrc-2006Q2:1.2.0.18
	pkgsrc-2006Q2-base:1.2
	pkgsrc-2006Q1:1.2.0.16
	pkgsrc-2006Q1-base:1.2
	pkgsrc-2005Q4:1.2.0.14
	pkgsrc-2005Q4-base:1.2
	pkgsrc-2005Q3:1.2.0.12
	pkgsrc-2005Q3-base:1.2
	pkgsrc-2005Q2:1.2.0.10
	pkgsrc-2005Q2-base:1.2
	pkgsrc-2005Q1:1.2.0.8
	pkgsrc-2005Q1-base:1.2
	pkgsrc-2004Q4:1.2.0.6
	pkgsrc-2004Q4-base:1.2
	pkgsrc-2004Q3:1.2.0.4
	pkgsrc-2004Q3-base:1.2
	pkgsrc-2004Q2:1.2.0.2
	pkgsrc-2004Q2-base:1.2
	pkgsrc-2004Q1:1.1.0.4
	pkgsrc-2004Q1-base:1.1
	pkgsrc-2003Q4:1.1.0.2
	pkgsrc-2003Q4-base:1.1;
locks; strict;
comment	@# @;


1.2
date	2004.05.06.13.40.21;	author taca;	state dead;
branches;
next	1.1;

1.1
date	2003.05.25.14.12.13;	author taca;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update namazu package to 2.0.13.

Overview of Changes in Namazu 2.0.13 - April 14, 2004

* Include File::MMagic 1.20.
* Add -X and --check-filesize options for mknmz text-processing.
* Add Polish translations.
  (Contributed by Kryzystof Drewicz.)
* Add German translations.
  (Contributed by Gerald Pfeifer.)
* Add new filters
  (Ichitaro variants, OpenOffice.org, RTF, apachecache, MP3)
* Add new filter (Macbinary)
* Adapt new filter programs (wvWare 0.7.4, xpdf 2.02 - 3.00)
* Add new directives for namazurc (SUICIDE_TIME, REGEX_SEARCH)
  (to prevent possibility of remote DoS, reported by sheepman.)
* Add new directives for mknmzrc (HTML_ATTRIBUTES)
  (This pattern specifies attribute of a HTML tag which should be
  searchable.)
* Change soname (LTVERSION 7:0:0, lib/libnmz.so.6 -> lib/libnmz.so.7)
* Support $WAKATI="module_mecab"; in mknmzrc. (experimental)
* Fix MacOSX compilation problem (getopt.c deviation from gengetopt-2.5)
* Fix some bugs and possibility of security hole.
@
text
@$NetBSD: patch-aq,v 1.1 2003/05/25 14:12:13 taca Exp $

--- filter/pdf.pl.orig	2002-07-30 15:03:08.000000000 +0900
+++ filter/pdf.pl
@@@@ -31,7 +31,9 @@@@ require 'gfilter.pl';
 my $pdfconvpath = undef;
 my $pdfinfopath = undef;
 my $pdfconvver = 0;
+my $pdfinfover = 0;
 my $pdfconvarg = '';
+my $pdfinfoarg = '';
 
 sub mediatype() {
     return ('application/pdf');
@@@@ -52,6 +54,19 @@@@ sub status() {
 		$pdfconvarg = '-eucjp';
 	    }
 	}
+	if (defined $pdfinfopath) {
+	    my $ret = `$pdfinfopath 2>&1`;
+	    if ($ret =~ /^pdfinfo\s+version\s+([0-9]+\.[0-9]+)/) {
+		$pdfinfover = $1;
+	    }
+	    if (util::islang("ja")) {
+		if ($pdfinfover >= 2.02) {
+		    $pdfinfoarg = '-enc EUC-JP';
+		} else {
+		    $pdfinfoarg = '';
+		}
+	    }
+	}
 	return 'yes';
     }
     return 'no';
@@@@ -116,7 +131,7 @@@@ sub filter ($$$$$) {
 #	system("$pdfinfopath $tmpfile > $tmpfile3");
 	open(SAVEOUT, ">&STDOUT");
 	open(STDOUT, ">$tmpfile3");
-	system("$pdfinfopath $tmpfile");
+	system("$pdfinfopath $pdfinfoarg $tmpfile");
 	open(STDOUT, ">&SAVEOUT");
 	my $fh = util::efopen("< $tmpfile3");
 	my $cont2 = util::readfile($fh);
@@@@ -124,9 +139,15 @@@@ sub filter ($$$$$) {
 	unlink($tmpfile3);
 	if ($cont2 =~ /Title: (.*)/) { # or /Subject: (.*)/
 	    $fields->{'title'} = $1;
+	    if ($fields->{'title'} =~ /<unicode>/) {
+   	        $fields->{'title'} = undef;
+	    }
 	}
 	if ($cont2 =~ /Author: (.*)/) {
 	    $fields->{'author'} = $1;
+	    if ($fields->{'author'} =~ /<unicode>/) {
+   	        $fields->{'author'} = undef;
+	    }
 	}
     }
 
@


1.1
log
@Update namazu2 package 2.0.12nb2.

- honor PKGLOCALEDIR in PLIST (thanks pkglint(1))
- incorporate some filter processing from namazu's stable branch.

	filter/pdf.pl:Adapted to xpdf 2.02
	filter/mhonarc.pl: Add codeconv::toeuc() after uncommentize().
@
text
@d1 1
a1 1
$NetBSD$
@

