From lchen@zen.lhaven.homeip.net  Mon Feb  4 05:12:02 2013
Return-Path: <lchen@zen.lhaven.homeip.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 42F9341A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  4 Feb 2013 05:12:02 +0000 (UTC)
	(envelope-from lchen@zen.lhaven.homeip.net)
Received: from mho-02-ewr.mailhop.org (mho-04-ewr.mailhop.org [204.13.248.74])
	by mx1.freebsd.org (Postfix) with ESMTP id E9FB5D7A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  4 Feb 2013 05:12:01 +0000 (UTC)
Received: from ip70-179-135-19.fv.ks.cox.net ([70.179.135.19] helo=zen.lhaven.homeip.net)
	by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.72)
	(envelope-from <lchen@zen.lhaven.homeip.net>)
	id 1U2Dv1-0003FY-EH
	for FreeBSD-gnats-submit@freebsd.org; Mon, 04 Feb 2013 04:44:35 +0000
Received: from zen.lhaven.homeip.net (localhost [127.0.0.1])
	by zen.lhaven.homeip.net (8.14.6/8.14.5) with ESMTP id r144iQF9079805;
	Sun, 3 Feb 2013 22:44:26 -0600 (CST)
	(envelope-from lchen@zen.lhaven.homeip.net)
Received: (from lchen@localhost)
	by zen.lhaven.homeip.net (8.14.6/8.14.5/Submit) id r144iQT0079804;
	Sun, 3 Feb 2013 22:44:26 -0600 (CST)
	(envelope-from lchen)
Message-Id: <201302040444.r144iQT0079804@zen.lhaven.homeip.net>
Date: Sun, 3 Feb 2013 22:44:26 -0600 (CST)
From: Lawrence Chen <lchen@zen.lhaven.homeip.net>
Reply-To: Lawrence Chen <beastie@tardisi.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: beastie_t@zen.lhaven.homeip.net
Subject: [patch] mail/dovecot2 doesn't detect libstemmer or exttextcat
X-Send-Pr-Version: 3.113
X-GNATS-Notify: bra@fsn.hu

>Number:         175813
>Category:       ports
>Synopsis:       [patch] mail/dovecot2 doesn't detect libstemmer or exttextcat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 04 05:20:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Mon Feb  4 05:30:00 UTC 2013
>Originator:     Lawrence Chen
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	Building dovecot2 with Lucene Full Text Search Indexing, doesn't
        find stemming support and doesn't see that libexttextcat may already
        be installed.
>How-To-Repeat:
        make config - select LUCENE
	make configure - check config.h
        if textproc/libexttextcat is already installed, should see
		#define HAVE_LUCENE_EXTTEXTCAT
	Also, since textproc/clucene includes libstemmer, should also see
		#define HAVE_LUCENE_STEMMER
>Fix:

	with each update of textproc/libexttextcat, the library name has
	changed from libexttextcat.so to libexttextcat-1.0.so to (present)
	libexttextcat-2.0.so

	the libstemmer that is included with textproc/clucene is in
        libclucene-contribs-lib.so

        patch configure, src/plugins/fts-lucene/Makefile.in, and
	src/plugins/fts-lucene/SnowballFilter.h to find these.

--- patch-configure begins here ---
--- configure.orig	2012-11-29 19:33:27.000000000 -0600
+++ configure	2013-02-03 11:38:52.827137584 -0600
@@ -24345,13 +24345,13 @@
 have_lucene=no
 if test "$want_lucene" = "yes"; then
   if test $want_stemmer != no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lstemmer" >&5
-$as_echo_n "checking for sb_stemmer_new in -lstemmer... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sb_stemmer_new in -lclucene-contribs-lib" >&5
+$as_echo_n "checking for sb_stemmer_new in -lclucene-contribs-lib... " >&6; }
 if ${ac_cv_lib_stemmer_sb_stemmer_new+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lstemmer  $LIBS"
+LIBS="-lclucene-contribs-lib  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -24432,13 +24432,13 @@
 
 else
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -lexttextcat" >&5
-$as_echo_n "checking for special_textcat_Init in -lexttextcat... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special_textcat_Init in -lexttextcat-2.0" >&5
+$as_echo_n "checking for special_textcat_Init in -lexttextcat-2.0... " >&6; }
 if ${ac_cv_lib_exttextcat_special_textcat_Init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lexttextcat  $LIBS"
+LIBS="-lexttextcat-2.0  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
--- patch-configure ends here ---

--- patch-src__plugins__fts-lucene__Makefile.in begins here ---
--- src/plugins/fts-lucene/Makefile.in.orig	2012-11-29 19:33:30.000000000 -0600
+++ src/plugins/fts-lucene/Makefile.in	2013-02-03 11:49:29.324136436 -0600
@@ -320,9 +320,9 @@
 module_LTLIBRARIES = \
 	lib21_fts_lucene_plugin.la
 
-@BUILD_LUCENE_STEMMER_TRUE@STEMMER_LIBS = -lstemmer
+@BUILD_LUCENE_STEMMER_TRUE@STEMMER_LIBS = -lclucene-contribs-lib
 @BUILD_LUCENE_STEMMER_TRUE@SHOWBALL_SOURCES = Snowball.cc
-@BUILD_LUCENE_EXTTEXTCAT_TRUE@@BUILD_LUCENE_TEXTCAT_FALSE@TEXTCAT_LIBS = -lexttextcat
+@BUILD_LUCENE_EXTTEXTCAT_TRUE@@BUILD_LUCENE_TEXTCAT_FALSE@TEXTCAT_LIBS = -lexttextcat-2.0
 @BUILD_LUCENE_TEXTCAT_TRUE@TEXTCAT_LIBS = -ltextcat
 lib21_fts_lucene_plugin_la_LIBADD = \
 	-lclucene-shared -lclucene-core $(TEXTCAT_LIBS) $(STEMMER_LIBS)
--- patch-src__plugins__fts-lucene__Makefile.in ends here ---

--- patch-src__plugins__fts-lucene__SnowballFilter.h begins here ---
--- src/plugins/fts-lucene/SnowballFilter.h.orig	2012-09-24 15:21:29.000000000 -0500
+++ src/plugins/fts-lucene/SnowballFilter.h	2013-02-03 11:24:06.647137581 -0600
@@ -8,7 +8,7 @@
 #define _lucene_analysis_snowball_filter_
 
 #include "CLucene/analysis/AnalysisHeader.h"
-#include "libstemmer.h"
+#include "CLucene/snowball/libstemmer.h"
 
 CL_NS_DEF2(analysis,snowball)
 
--- patch-src__plugins__fts-lucene__SnowballFilter.h ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Feb 4 05:20:09 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175813 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: bra@fsn.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/175813: [patch] mail/dovecot2 doesn't detect libstemmer or exttextcat
Date: Mon, 4 Feb 2013 05:20:08 UT

 Maintainer of mail/dovecot2,
 
 Please note that PR ports/175813 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/175813
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
>Unformatted:
