From barner@in.tum.de  Sat Oct 25 05:32:52 2003
Return-Path: <barner@in.tum.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id B26FF16A4B3; Sat, 25 Oct 2003 05:32:52 -0700 (PDT)
Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 72D9843FA3; Sat, 25 Oct 2003 05:32:51 -0700 (PDT)
	(envelope-from barner@in.tum.de)
Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000)
	id 0F727CE0; Sat, 25 Oct 2003 14:29:02 +0200 (CEST)
Message-Id: <20031025122902.0F727CE0@zi025.glhnet.mhn.de>
Date: Sat, 25 Oct 2003 14:29:02 +0200 (CEST)
From: Simon Barner <barner@in.tum.de>
Reply-To: Simon Barner <barner@in.tum.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: knu@FreeBSD.org
Subject: databases/namazu2: fix libintl and libiconv depedencies => avoid conflicts with other ports
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58517
>Category:       ports
>Synopsis:       databases/namazu2: fix libintl and libiconv depedencies => avoid conflicts with other ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    knu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 05:40:17 PDT 2003
>Closed-Date:    Fri Nov 21 04:36:01 JST 2003
>Last-Modified:  Fri Nov 21 04:36:01 JST 2003
>Originator:     Simon Barner
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD zi025.glhnet.mhn.de 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Thu Sep 4 20:49:53 CEST 2003 simon@zi025.glhnet.mhn.de:/usr/src/sys/compile/KISTE i386

>Description:

This port also installs a libtool archive (libnmz.la). Unfortunatelly, I
was not able to fix this within a reasonable amount of time (I tried
USE_LIBTOOL, but that did not work).

This patch fixes the following issues:

This port did not pick up the two libraries mentioned.

One possitive side effect of getting the libintl dependency right, is
that the port does not build its included version of the gettext library and
does not install those two .alias that were conflicting with other ports
(have a look at the pkg-plist diff and you'll see what I mean)

http://freebsd.rambler.ru/bsdmail/freebsd-ports_2003/msg08919.html

I also reordered some things in the Makefile in order to make `portlint
-A' happy.

>How-To-Repeat:
>Fix:
diff -ruN namazu2/Makefile namazu2.patched/Makefile

--- namazu2/Makefile	Wed Aug 27 13:48:00 2003
+++ namazu2.patched/Makefile	Sat Oct 25 14:20:28 2003
@@ -12,16 +12,17 @@
 MASTER_SITES=	http://www.namazu.org/stable/
 PKGNAMESUFFIX=	2
 
-MAINTAINER=	knu@FreeBSD.org
-COMMENT=	Full-text search system intended for easy use
-
 PATCH_SITES=	${MASTER_SITES}
 PATCHFILES=	${DISTNAME}-de.diff
 PATCH_DIST_STRIP=	-p1
 
-LIB_DEPENDS=	intl.5:${PORTSDIR}/devel/gettext
+MAINTAINER=	knu@FreeBSD.org
+COMMENT=	Full-text search system intended for easy use
+
 BUILD_DEPENDS=	${PM_BASE}/File/MMagic.pm:${PORTSDIR}/devel/p5-File-MMagic
 RUN_DEPENDS=	${PM_BASE}/File/MMagic.pm:${PORTSDIR}/devel/p5-File-MMagic
+LIB_DEPENDS=	intl.5:${PORTSDIR}/devel/gettext \
+		iconv.3:${PORTSDIR}/converters/libiconv
 #		xlHtml:${PORTSDIR}/textproc/xlhtml \
 #		wvHtml:${PORTSDIR}/textproc/wv
 
@@ -29,19 +30,13 @@
 
 USE_PERL5=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--with-perl5="${PERL}"
+CONFIGURE_ARGS=	--with-perl5="${PERL}" \
+		--with-libintl-prefix=${LOCALBASE} \
+		--with-libiconv-prefix=${LOCALBASE}
 
 MAN1=		namazu.1 mknmz.1
 INSTALLS_SHLIB=	yes
 
-post-configure:
-	${PERL} -i~ -pe 's,^(LIBS *= *)(.*),$$1 -L${LOCALBASE}/lib -lintl $$2\n,' ${WRKSRC}/nmz/Makefile
-
-pre-install:
-	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
-
-post-install:
-	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
 .if defined(NOPORTDOCS)
 	${RM} -rf ${PREFIX}/share/namazu/doc
 .endif
diff -ruN namazu2/pkg-deinstall namazu2.patched/pkg-deinstall
--- namazu2/pkg-deinstall	Tue Jan 14 12:10:07 2003
+++ namazu2.patched/pkg-deinstall	Thu Jan  1 01:00:00 1970
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/databases/namazu2/pkg-deinstall,v 1.1 2003/01/14 11:10:07 knu Exp $
-
-PATH=/bin:/usr/bin
-
-files="${PKG_PREFIX}/lib/charset.alias ${PKG_PREFIX}/share/locale/locale.alias"
-sfx=.namazu2.backup
-
-case $2 in
-    DEINSTALL)
-	for f in $files; do
-	    [ -f $f$sfx ] || continue
-	    if [ $f -nt $f$sfx ]; then
-		cp -p $f $f$sfx
-	    fi
-	done
-	;;
-
-    POST-DEINSTALL)
-	for f in $files; do
-	    if [ -f $f$sfx ]; then
-		mv -f $f$sfx $f
-	    fi
-	done
-	;;
-esac
-
-exit 0
diff -ruN namazu2/pkg-install namazu2.patched/pkg-install
--- namazu2/pkg-install	Mon Feb  3 10:36:54 2003
+++ namazu2.patched/pkg-install	Thu Jan  1 01:00:00 1970
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/databases/namazu2/pkg-install,v 1.2 2003/02/01 10:36:05 knu Exp $
-
-PATH=/bin:/usr/bin
-
-files="${PKG_PREFIX}/lib/charset.alias ${PKG_PREFIX}/share/locale/locale.alias"
-sfx=.namazu2.backup
-
-case $2 in
-    PRE-INSTALL)
-	for f in $files; do
-	    if [ -f $f ]; then
-		cp $f $f$sfx
-	    fi
-	done
-	;;
-
-    POST-INSTALL)
-	for f in $files; do
-	    if [ -f $f$sfx ]; then
-		touch $f$sfx
-	    else
-		cp $f $f$sfx
-	    fi
-	done
-	;;
-esac
-
-exit 0
diff -ruN namazu2/pkg-plist namazu2.patched/pkg-plist
--- namazu2/pkg-plist	Mon Jan 20 12:57:25 2003
+++ namazu2.patched/pkg-plist	Sat Oct 25 14:17:40 2003
@@ -31,15 +31,11 @@
 include/namazu/var.h
 include/namazu/wakati.h
 @dirrm include/namazu
-@comment see pkg-{install,deinstall} for this file
-lib/charset.alias
 lib/libnmz.a
 lib/libnmz.la
 lib/libnmz.so
 lib/libnmz.so.6
 libexec/namazu.cgi
-@comment see pkg-{install,deinstall} for this file
-share/locale/locale.alias
 share/locale/es/LC_MESSAGES/namazu.mo
 share/locale/fr/LC_MESSAGES/namazu.mo
 share/locale/ja/LC_MESSAGES/namazu.mo
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->knu 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Oct 25 19:13:55 PDT 2003 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58517 
State-Changed-From-To: open->closed 
State-Changed-By: knu 
State-Changed-When: Fri Nov 21 04:35:41 JST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58517 
>Unformatted:
