From 3c089c162beedafe4420ef2bc22740bcd8051e70 Mon Sep 17 00:00:00 2001
From: Rong-En Fan <rafan@FreeBSD.org>
Date: Fri, 12 Jan 2007 09:12:57 +0000
Subject: [PATCH] - Use USE_ICONV instead of LIB_DEPENDS

Approved by:	portmgr (erwin, few weeks ago)
---
 chinese/docproj/Makefile          | 3 ++-
 databases/postgis/Makefile        | 2 +-
 misc/linm/Makefile                | 2 +-
 misc/wmweather+/Makefile          | 4 ++--
 net/boinc-client/Makefile         | 4 ++--
 print/pips800/Makefile.pips       | 8 ++++----
 textproc/wv2/Makefile             | 3 +--
 textproc/xalan-c/Makefile         | 2 +-
 x11-toolkits/gtkmathview/Makefile | 4 ++--
 x11-wm/fvwm2-devel/Makefile       | 2 +-
 x11/xfree86_xkb_xml/Makefile      | 3 +--
 11 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/chinese/docproj/Makefile b/chinese/docproj/Makefile
index f6a445a51b61..b6990aef411c 100644
--- a/chinese/docproj/Makefile
+++ b/chinese/docproj/Makefile
@@ -21,9 +21,10 @@ DISTFILES=	# none
 MAINTAINER=	delphij@FreeBSD.org
 COMMENT=	Supportive tools for Chinese docproj build
 
-LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv
 RUN_DEPENDS=	gbklatex:${PORTSDIR}/chinese/CJK
 
+USE_ICONV=	yes
+
 WRKSRC=		${WRKDIR}/src
 
 SRC=		${.CURDIR}/src
diff --git a/databases/postgis/Makefile b/databases/postgis/Makefile
index c864bc25267e..f7892a721803 100644
--- a/databases/postgis/Makefile
+++ b/databases/postgis/Makefile
@@ -49,7 +49,7 @@ PORTDOCS=	*
 .endif
 
 .if defined(WITH_UTF8)
-LIB_DEPENDS+=	iconv:${PORTSDIR}/converters/libiconv
+USE_ICONV=	yes
 MAKE_ENV+=	"LDFLAGS=-L${LOCALBASE}/lib"
 .else
 CONFIGURE_ARGS+=	--without-iconv
diff --git a/misc/linm/Makefile b/misc/linm/Makefile
index 054fd6975ff1..239bc1bea27f 100644
--- a/misc/linm/Makefile
+++ b/misc/linm/Makefile
@@ -15,9 +15,9 @@ DISTNAME=	linm_${LINM_VER}-1
 MAINTAINER=	cjh@FreeBSD.org
 COMMENT=	Clone of Mdir, mc-style terminal file manager
 
-LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv
 BUILD_DEPENDS=	pkg-config:${PORTSDIR}/devel/pkg-config
 
+USE_ICONV=	yes
 USE_OPENSSL=	yes
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
diff --git a/misc/wmweather+/Makefile b/misc/wmweather+/Makefile
index ba1f0c93c461..96d4efe63a82 100644
--- a/misc/wmweather+/Makefile
+++ b/misc/wmweather+/Makefile
@@ -21,10 +21,10 @@ LIB_DEPENDS=	xmlparse:${PORTSDIR}/www/libwww \
 		Hermes:${PORTSDIR}/graphics/Hermes \
 		png:${PORTSDIR}/graphics/png \
 		jpeg:${PORTSDIR}/graphics/jpeg \
-		ungif:${PORTSDIR}/graphics/libungif \
-		iconv:${PORTSDIR}/converters/libiconv
+		ungif:${PORTSDIR}/graphics/libungif
 
 GNU_CONFIGURE=	yes
+USE_ICONV=	yes
 USE_X_PREFIX=	yes
 USE_XPM=	yes
 
diff --git a/net/boinc-client/Makefile b/net/boinc-client/Makefile
index 7ec87f81b8f2..f505c2cfb075 100644
--- a/net/boinc-client/Makefile
+++ b/net/boinc-client/Makefile
@@ -52,8 +52,8 @@ CONFIGURE_ARGS+=	--with-wx-config=false --without-x
 .endif
 
 .if !defined(WITHOUT_X11)
-LIB_DEPENDS+=	iconv:${PORTSDIR}/converters/libiconv \
-		jpeg:${PORTSDIR}/graphics/jpeg \
+USE_ICONV=	yes
+LIB_DEPENDS+=	jpeg:${PORTSDIR}/graphics/jpeg \
 		glut:${PORTSDIR}/graphics/libglut
 .endif
 
diff --git a/print/pips800/Makefile.pips b/print/pips800/Makefile.pips
index 7ce96043cc2b..6e4f931562cd 100644
--- a/print/pips800/Makefile.pips
+++ b/print/pips800/Makefile.pips
@@ -111,8 +111,8 @@ EXTRA_PATCHES+=	${FILESDIR}/extra-patch-2.6.2-ekpstm \
 .elif ${DIST_TYPE} == cups
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-2.6.2-ekpstm \
 		${FILESDIR}/extra-patch-2.6.2-src-cups
-LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-base \
-		iconv.3:${PORTSDIR}/converters/libiconv
+LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-base
+USE_ICONV=	yes
 .else
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-2.6.2-common \
 		${FILESDIR}/extra-patch-2.6.2-src \
@@ -122,8 +122,8 @@ EXTRA_PATCHES+=	${FILESDIR}/extra-patch-2.6.2-common \
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-2.6.2-ekpstm::main.c
 .endif
 BUILD_DEPENDS+=	${LOCALBASE}/bin/autoconf253:${PORTSDIR}/devel/autoconf253
-LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-base \
-		iconv.3:${PORTSDIR}/converters/libiconv
+LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-base
+USE_ICONV=	yes
 .endif
 .if ${OSVERSION} < 500000
 LIB_DEPENDS+=	gnugetopt.1:${PORTSDIR}/devel/libgnugetopt \
diff --git a/textproc/wv2/Makefile b/textproc/wv2/Makefile
index f14ee8c7e6cd..a708530bbb54 100644
--- a/textproc/wv2/Makefile
+++ b/textproc/wv2/Makefile
@@ -14,11 +14,10 @@ MASTER_SITE_SUBDIR=	wvware
 MAINTAINER=	lofi@freebsd.org
 COMMENT=	A library providing routines to access Microsoft Word files
 
-LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv
-
 CONFIGURE_ARGS=	--with-libiconv=${LOCALBASE} --disable-debug
 
 USE_GNOME=	gnometarget libgsf
+USE_ICONV=	yes
 GNU_CONFIGURE=	yes
 USE_BZIP2=	yes
 USE_GMAKE=	yes
diff --git a/textproc/xalan-c/Makefile b/textproc/xalan-c/Makefile
index 01fa4b4da133..2076196298a9 100644
--- a/textproc/xalan-c/Makefile
+++ b/textproc/xalan-c/Makefile
@@ -112,7 +112,7 @@ MAKE_ENV+=		XALAN_USE_ICU=1
 MAKE_ENV+=		ICUROOT=${ICUROOT}
 PLIST_SUB+=		ICUDEP=""
 .else
-LIB_DEPENDS+=		iconv:${PORTSDIR}/converters/libiconv
+USE_ICONV=		yes
 CONFIGURE_ENV+=		LDFLAGS='-L${LOCALBASE}/lib -liconv'
 MAKE_ENV+=		LDFLAGS='-L${LOCALBASE}/lib -liconv'
 PLIST_SUB+=		ICUDEP="@comment "
diff --git a/x11-toolkits/gtkmathview/Makefile b/x11-toolkits/gtkmathview/Makefile
index d7d04129fa2f..4bfa08266c79 100644
--- a/x11-toolkits/gtkmathview/Makefile
+++ b/x11-toolkits/gtkmathview/Makefile
@@ -14,14 +14,14 @@ MASTER_SITES=	http://helm.cs.unibo.it/mml-widget/sources/
 MAINTAINER=	yinjieh@csie.nctu.edu.tw
 COMMENT=	A GTK Widget to Render MathML Documents
 
-LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv \
-		t1:${PORTSDIR}/devel/t1lib \
+LIB_DEPENDS=	t1:${PORTSDIR}/devel/t1lib \
 		xml2.5:${PORTSDIR}/textproc/libxml2 \
 		gmetadom_gdome_cpp_smart:${PORTSDIR}/textproc/gmetadom \
 		popt.0:${PORTSDIR}/devel/popt \
 		xslt.2:${PORTSDIR}/textproc/libxslt
 
 USE_GETOPT_LONG=	yes
+USE_ICONV=	yes
 USE_X_PREFIX=	yes
 USE_GNOME=	glib20 gtk20 gnomehack
 USE_AUTOTOOLS=	libtool:15
diff --git a/x11-wm/fvwm2-devel/Makefile b/x11-wm/fvwm2-devel/Makefile
index cbac937512a9..21ba08599a5c 100644
--- a/x11-wm/fvwm2-devel/Makefile
+++ b/x11-wm/fvwm2-devel/Makefile
@@ -50,7 +50,7 @@ DISTFILES+=	fvwm_icons.tgz
 .if defined(WITHOUT_ICONV)
 CONFIGURE_ARGS+=	--disable-iconv
 .else
-LIB_DEPENDS+=	iconv.3:${PORTSDIR}/converters/libiconv
+USE_ICONV=		yes
 CONFIGURE_ARGS+=	--with-iconv-library=${LOCALBASE}/lib \
 			--with-iconv-includes=${LOCALBASE}/include
 .endif
diff --git a/x11/xfree86_xkb_xml/Makefile b/x11/xfree86_xkb_xml/Makefile
index 0f2bc1825c90..f6d647c02bf4 100644
--- a/x11/xfree86_xkb_xml/Makefile
+++ b/x11/xfree86_xkb_xml/Makefile
@@ -15,8 +15,7 @@ MASTER_SITE_SUBDIR=	gswitchit
 MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	A little set of XML files useful for dealing with XKB rules
 
-LIB_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv
-
+USE_ICONV=	yes
 USE_GETTEXT=	yes
 USE_X_PREFIX=	yes
 USE_GMAKE=	yes