Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2013 18:06:08 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r326307 - in head: . Mk Mk/Uses archivers/rpm archivers/unrar archivers/unrar-iconv archivers/unzip audio/julius audio/mp3unicode audio/mpc audio/mpiosh audio/mpiosh/files audio/osd-lyr...
Message-ID:  <201309041806.r84I680e048857@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Wed Sep  4 18:06:07 2013
New Revision: 326307
URL: http://svnweb.freebsd.org/changeset/ports/326307

Log:
  - Make ports use the libc provided iconv implementation on 10-CURRENT
    after r254273
  - Fix a bunch of ports to properly work after this
  - Mark converters/libiconv as IGNORE for systems with iconv in libc
  
  Reviewed by:	bapt
  Approved by:	portmgr (bapt)
  Discussed with:	bapt, bsam (who both contributed ideas and code)

Added:
  head/graphics/netpbm/files/patch-lib-util-pm_c_util.h   (contents, props changed)
Modified:
  head/CHANGES
  head/Mk/Uses/iconv.mk
  head/Mk/bsd.gnome.mk
  head/UPDATING
  head/archivers/rpm/Makefile
  head/archivers/unrar-iconv/Makefile
  head/archivers/unrar/Makefile
  head/archivers/unzip/Makefile
  head/audio/julius/Makefile
  head/audio/mp3unicode/Makefile
  head/audio/mpc/Makefile
  head/audio/mpiosh/Makefile
  head/audio/mpiosh/files/patch-mpiosh_Makefile.am   (contents, props changed)
  head/audio/osd-lyrics/Makefile
  head/audio/praat/Makefile   (contents, props changed)
  head/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic   (contents, props changed)
  head/biology/ncbi-toolkit/Makefile
  head/biology/ncbi-toolkit/files/patch-make-makeall.unx   (contents, props changed)
  head/biology/ncbi-toolkit/files/patch-make-makenet.unx
  head/chinese/docproj/Makefile
  head/chinese/oto/Makefile
  head/chinese/oxim/Makefile
  head/comms/anyremote/Makefile
  head/comms/minicom/Makefile
  head/comms/obexapp/Makefile
  head/converters/libiconv/Makefile
  head/converters/lua-iconv/Makefile
  head/converters/lua-iconv/files/patch-Makefile   (contents, props changed)
  head/converters/p5-Text-Iconv/Makefile
  head/converters/py-iconv/Makefile
  head/databases/freetds-devel/Makefile
  head/databases/freetds-devel/files/patch-src-tds-Makefile
  head/databases/postgis/Makefile
  head/databases/qdbm/Makefile
  head/databases/ruby-sybct/Makefile
  head/databases/ruby-sybct/files/patch-extconf.rb   (contents, props changed)
  head/databases/spatialite_gui/Makefile
  head/deskutils/adesklets/Makefile
  head/deskutils/fbreader/Makefile
  head/devel/cgit/Makefile
  head/devel/doxygen/Makefile
  head/devel/gdb66/Makefile
  head/devel/glib20/Makefile
  head/devel/glib20/files/patch-ae
  head/devel/libhtp/Makefile
  head/devel/libparserutils/Makefile
  head/devel/py-fusefs/Makefile
  head/devel/styx/Makefile
  head/dns/idnkit2/Makefile
  head/editors/joe/Makefile
  head/editors/joe2/Makefile
  head/editors/texmacs/Makefile
  head/emulators/mtools/Makefile
  head/emulators/virtualbox-ose/Makefile
  head/games/neverball/Makefile
  head/games/neverball/files/patch-Makefile   (contents, props changed)
  head/games/pokerth/Makefile
  head/games/stepmania-devel/Makefile
  head/games/tuxmath/Makefile
  head/graphics/graphite2/Makefile
  head/graphics/ida/Makefile
  head/graphics/ipe/Makefile
  head/graphics/libgaiagraphics/Makefile
  head/graphics/oyranos/Makefile
  head/irc/xchat1/Makefile
  head/japanese/groff/Makefile
  head/java/openjdk6/Makefile
  head/java/openjdk7/Makefile
  head/lang/php5/Makefile.ext   (contents, props changed)
  head/lang/php52/Makefile.ext
  head/lang/php53/Makefile.ext
  head/lang/php55/Makefile.ext   (contents, props changed)
  head/mail/balsa/Makefile
  head/mail/bogofilter/Makefile
  head/mail/claws-mail/Makefile
  head/mail/crm114/Makefile
  head/mail/exim/Makefile
  head/mail/libpst/Makefile
  head/mail/mmr/Makefile
  head/mail/normalizemime/Makefile
  head/mail/sylpheed/Makefile
  head/multimedia/libxine/Makefile
  head/multimedia/mkclean/Makefile
  head/multimedia/mkvalidator/Makefile
  head/multimedia/vdr/Makefile
  head/multimedia/w_scan/Makefile
  head/net-im/imspector/Makefile
  head/net-im/imspector/files/patch-Makefile   (contents, props changed)
  head/net-im/libpurple/Makefile
  head/net-im/licq/Makefile
  head/net-im/ysm/Makefile
  head/net/afpfs-ng/Makefile   (contents, props changed)
  head/net/ldapdiff/Makefile
  head/net/xmlrpc-epi/Makefile
  head/news/pan/Makefile
  head/print/gv/Makefile
  head/print/pdftk/Makefile
  head/print/py-cups/Makefile
  head/security/scanhill/Makefile
  head/security/tpm-tools/Makefile
  head/security/trousers/Makefile
  head/sysutils/fusefs-chironfs/Makefile
  head/sysutils/fusefs-gunzip/Makefile
  head/sysutils/libcdio/Makefile
  head/sysutils/mapchan/Makefile   (contents, props changed)
  head/textproc/exempi/Makefile
  head/textproc/freexl/Makefile
  head/textproc/kmflcomp/Makefile
  head/textproc/odt2txt/Makefile
  head/textproc/p5-XML-Sablotron/Makefile
  head/textproc/sablotron/Makefile
  head/textproc/unrtf/Makefile
  head/textproc/xalan-c/Makefile
  head/textproc/xerces-c2/Makefile
  head/textproc/xmlppm/Makefile
  head/www/sarg/Makefile
  head/www/snownews/Makefile
  head/www/webalizer/Makefile
  head/x11-fm/nautilus/Makefile
  head/x11-toolkits/open-motif/Makefile   (contents, props changed)
  head/x11-toolkits/wxgtk26/Makefile
  head/x11-wm/awesome2/Makefile
  head/x11-wm/fluxbox/Makefile
  head/x11-wm/i3/Makefile
  head/x11-wm/pekwm/Makefile
  head/x11-wm/wmii/Makefile
  head/x11/gdkxft/Makefile
  head/x11/i3lock/Makefile

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/CHANGES	Wed Sep  4 18:06:07 2013	(r326307)
@@ -10,6 +10,24 @@ in the release notes and/or placed into 
 
 All ports committers are allowed to commit to this file.
 
+20130904:
+AUTHOR: madpilot@FreeBSD.org
+
+  To allow ports to work with the iconv implementation in 10-CURRENT after commit r254273 the USES=iconv options now conditionally adds a dependency depending on the FreeBSD version. It also defines a few utility variables which can be used in the ports:
+
+  ICONV_CMD:	location of the iconv binary.
+		after r254273: /usr/bin/iconv
+		before: ${LOCALBASE}/bin/iconv
+
+  ICONV_LIB:	ld(1) flags to get the iconv DSO.
+		after r254273: empty
+		before: -liconv
+
+  ICONV_CONFIGURE_ARG:  String that can be passed to configure
+  			scripts to hint the location of the libiconv library.
+			after r254273: empty
+			before: --with-libiconv-prefix=${LOCALBASE}
+
 20130902:
 AUTHOR: bapt@FreeBSD.org
 

Modified: head/Mk/Uses/iconv.mk
==============================================================================
--- head/Mk/Uses/iconv.mk	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/Mk/Uses/iconv.mk	Wed Sep  4 18:06:07 2013	(r326307)
@@ -12,12 +12,16 @@
 .if !defined(_INCLUDE_USES_ICONV_MK)
 _INCLUDE_USES_ICONV_MK=	yes
 
-ICONV_CMD=	${LOCALBASE}/bin/iconv
-
 .if !defined(iconv_ARGS)
 iconv_ARGS=     lib
 .endif
 
+.if !exists(/usr/include/iconv.h) && ${OSVERSION} < 1000043
+
+ICONV_CMD=	${LOCALBASE}/bin/iconv
+ICONV_LIB=	-liconv
+ICONV_CONFIGURE_ARG=	--with-libiconv-prefix=${LOCALBASE}
+
 .if ${iconv_ARGS} == "lib"
 LIB_DEPENDS+=	libiconv.so.3:${PORTSDIR}/converters/libiconv
 .elif ${iconv_ARGS} == "build"
@@ -26,4 +30,12 @@ BUILD_DEPENDS+=	${ICONV_CMD}:${PORTSDIR}
 PATCH_DEPENDS+=	${ICONV_CMD}:${PORTSDIR}/converters/libiconv
 .endif
 
+.else
+
+ICONV_CMD=	/usr/bin/iconv
+ICONV_LIB=
+ICONV_CONFIGURE_ARG=
+
+.endif
+
 .endif

Modified: head/Mk/bsd.gnome.mk
==============================================================================
--- head/Mk/bsd.gnome.mk	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/Mk/bsd.gnome.mk	Wed Sep  4 18:06:07 2013	(r326307)
@@ -546,7 +546,7 @@ intltool_BUILD_DEPENDS=	${intltool_DETEC
 intlhack_PRE_PATCH=		${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \
 				's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \
 				 s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \
-				 s|/usr/bin/iconv|${LOCALBASE}/bin/iconv|g ; \
+				 s|/usr/bin/iconv|${ICONV_CMD}|g ; \
 				 s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|'
 intlhack_USE_GNOME_IMPL=intltool
 

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/UPDATING	Wed Sep  4 18:06:07 2013	(r326307)
@@ -5,6 +5,35 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20130904:
+  AFFECTS: 10-CURRENT users with any port depending on converters/iconv
+  AUTHOR: madpilot@FreeBSD.org
+
+  10-CURRENT after r254273 (committed on August 13, 2013) has an
+  implementation of iconv enabled by default in libc.
+
+  Due to this change some major overhauling of the ports tree has
+  been necessary to move the ports to using that implementation.
+
+  People using pkgng should have little problems, "pkg upgrade"
+  will update all sofware to not depend on libivconv anymore, once
+  updated packages are available. Please make sure to perform a
+  "pkg autoremove" after that and check that libiconv is correctly
+  removed by it.
+
+  If you are using ports the update requires some manual intervention.
+  The following procedure should be followed:
+
+  # pkg query %ro libiconv >ports_to_update
+  # pkg delete -f libiconv
+  # cat ports_to_update | xargs portmaster
+
+  or:
+
+  # pkg query %ro libiconv >ports_to_update
+  # pkg delete -f libiconv
+  # cat ports_to_update | xargs portupgrade -f
+
 20130831:
   AFFECTS: users of graphics/gdal
   AUTHOR: sunpoet@FreeBSD.org

Modified: head/archivers/rpm/Makefile
==============================================================================
--- head/archivers/rpm/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/archivers/rpm/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -28,7 +28,7 @@ MAKE_ENV=	OLD_PO_FILE_INPUT=1
 USES+=		gettext
 PLIST_SUB+=	NLS=""
 CPPFLAGS+=	-I${LOCALBASE}/include
-CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib -lintl -liconv"
+CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib -lintl ${ICONV_LIB}"
 .else
 CONFIGURE_ARGS+=	--disable-nls
 PLIST_SUB+=	NLS="@comment "

Modified: head/archivers/unrar-iconv/Makefile
==============================================================================
--- head/archivers/unrar-iconv/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/archivers/unrar-iconv/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -14,7 +14,7 @@ MASTERDIR=	${.CURDIR}/../unrar
 EXTRA_PATCHES=	${.CURDIR}/files/patch-iconv
 
 CPPFLAGS+=	-DWITH_ICONV -I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 USES+=		iconv
 
 CONFLICTS=	unrar-[0-9]* zh-unrar-[0-9]*

Modified: head/archivers/unrar/Makefile
==============================================================================
--- head/archivers/unrar/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/archivers/unrar/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -21,7 +21,7 @@ CONFLICTS?=	zh-unrar-[0-9].* unrar-iconv
 
 MAKE_ARGS=	STRIP=${STRIP_CMD}
 MAKEFILE=	makefile.unix
-USES=		gmake
+USES+=		gmake
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
 PLIST_FILES=	bin/unrar

Modified: head/archivers/unzip/Makefile
==============================================================================
--- head/archivers/unzip/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/archivers/unzip/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -48,7 +48,7 @@ PATCHFILES+=		unzip60-alt-iconv-utf8.pat
 PATCH_DIST_STRIP+=	-p1
 USES=			iconv
 CFLAGS+=		-I${LOCALBASE}/include -DNATIVE
-MAKE_ARGS+=		LFLAGS1="-L${LOCALBASE}/lib -liconv"
+MAKE_ARGS+=		LFLAGS1="-L${LOCALBASE}/lib ${ICONV_LIB}"
 .endif
 
 MAKE_ENV=	LOCAL_UNZIP="${LOCAL_UNZIP}" \

Modified: head/audio/julius/Makefile
==============================================================================
--- head/audio/julius/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/julius/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -22,7 +22,7 @@ GNU_CONFIGURE=	yes
 USES=		iconv
 
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 MANLANG=	"" ja
 MAN1=	accept_check.1 \
 	adinrec.1 \

Modified: head/audio/mp3unicode/Makefile
==============================================================================
--- head/audio/mp3unicode/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/mp3unicode/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -15,7 +15,7 @@ USE_BZIP2=	yes
 USES=		iconv pkgconfig
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ICONV_CFLAGS="-I${LOCALBASE}/include" \
-		ICONV_LIBS="-L${LOCALBASE}/lib -liconv"
+		ICONV_LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 
 MAN1=		mp3unicode.1
 PLIST_FILES=	bin/mp3unicode

Modified: head/audio/mpc/Makefile
==============================================================================
--- head/audio/mpc/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/mpc/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -38,7 +38,7 @@ CONFIGURE_ARGS+=--disable-iconv
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|-lintl|-liconv|g' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|-lintl|-l${ICONV_LIB}|g' ${WRKSRC}/configure
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin

Modified: head/audio/mpiosh/Makefile
==============================================================================
--- head/audio/mpiosh/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/mpiosh/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -23,7 +23,7 @@ USE_AUTOTOOLS=	aclocal automake autoconf
 ACLOCAL_ARGS=	-I . -I ${LOCALBASE}/share/aclocal
 AUTOMAKE_ARGS=	--add-missing
 CFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 
 .include <bsd.port.pre.mk>
 
@@ -31,5 +31,6 @@ EXTRA_PATCHES=	${FILESDIR}/extra-patch-c
 
 post-patch:
 	${RM} -f ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's/%%ICONV_LIB%%/${ICONV_LIB}/' ${WRKSRC}/mpiosh/Makefile.am
 
 .include <bsd.port.post.mk>

Modified: head/audio/mpiosh/files/patch-mpiosh_Makefile.am
==============================================================================
--- head/audio/mpiosh/files/patch-mpiosh_Makefile.am	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/mpiosh/files/patch-mpiosh_Makefile.am	Wed Sep  4 18:06:07 2013	(r326307)
@@ -5,7 +5,7 @@
  AM_CFLAGS=-DSYSCONFDIR=\"@sysconfdir@\"
  
 -mpiosh_LDADD=../libmpio/libmpio.la -lreadline -lncurses
-+mpiosh_LDADD=../libmpio/libmpio.la -lreadline -lncurses -liconv
++mpiosh_LDADD=../libmpio/libmpio.la -lreadline -lncurses %%ICONV_LIB%%
  
  noinst_HEADERS = mpiosh.h \
  		callback.h \

Modified: head/audio/osd-lyrics/Makefile
==============================================================================
--- head/audio/osd-lyrics/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/osd-lyrics/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -27,7 +27,7 @@ USE_GNOME=	gtk20
 USE_SQLITE=	yes
 INSTALLS_ICONS=	yes
 PORTDOCS=	AUTHORS ChangeLog NEWS README
-LDFLAGS=	-liconv
+LDFLAGS=	${ICONV_LIB}
 
 OPTIONS_DEFINE=	DOCS MPD XMMS2 AMAROK
 MPD_DESC=	Enable MPD support

Modified: head/audio/praat/Makefile
==============================================================================
--- head/audio/praat/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/praat/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -13,7 +13,7 @@ COMMENT=	Phonetics by Computer
 
 USE_DOS2UNIX=	yes
 DOS2UNIX_REGEX=	.*Makefile
-USES=		motif
+USES=		iconv motif
 WRKSRC=		${WRKDIR}/sources_4639
 MAKEFILE=	makefile
 PLIST_FILES=	bin/praat
@@ -25,6 +25,8 @@ post-patch:
 	@${REINPLACE_CMD} -e 's/ log2/ NUMlog2/' ${WRKSRC}/dwtools/Sound_extensions.c
 	@${FIND} ${WRKSRC} -name Makefile -exec \
 		${REINPLACE_CMD} -e 's|^CFLAGS =|CFLAGS +=|' "{}" \;
+	@${REINPLACE_CMD} -e 's/%%ICONV_LIB%%/${ICONV_LIB}/' \
+		${WRKSRC}/makefiles/makefile.defs.freebsd.dynamic
 	@${CP} ${WRKSRC}/makefiles/makefile.defs.freebsd.dynamic \
 		${WRKSRC}/makefile.defs
 

Modified: head/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic
==============================================================================
--- head/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic	Wed Sep  4 18:06:07 2013	(r326307)
@@ -8,7 +8,7 @@
 +CC += -std=gnu99 -DUNIX -Dlinux -I${LOCALBASE}/include -Wimplicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized
  
 -LIBS = /usr/X11R6/lib/libXm.a -L /usr/X11R6/lib -lXmu -lXp -lXt -lSM -lICE -lXext -lX11 -lm 
-+LIBS = ${LOCALBASE}/lib/libXm.a -L${LOCALBASE}/lib -lXmu -lXp -lXt -lSM -lICE -lXext -lX11 -lm -lpng -ljpeg -liconv -lXft
++LIBS = ${LOCALBASE}/lib/libXm.a -L${LOCALBASE}/lib -lXmu -lXp -lXt -lSM -lICE -lXext -lX11 -lm -lpng -ljpeg %%ICONV_LIB%% -lXft
  
  RANLIB = ls
  ICON =

Modified: head/biology/ncbi-toolkit/Makefile
==============================================================================
--- head/biology/ncbi-toolkit/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/biology/ncbi-toolkit/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -13,7 +13,7 @@ COMMENT=	NCBI development toolkit, inclu
 
 OPTIONS_DEFINE=	DOCS
 
-USES=		motif
+USES=		iconv motif
 MAKE_JOBS_UNSAFE=	yes
 
 SUB_FILES=	pkg-message
@@ -66,6 +66,8 @@ post-patch:
 		 s|/usr/local|${LOCALBASE}|g ; \
 		 s|-Wl,-Bstatic|| ; \
 		 s|-Wl,-Bdynamic||' ${WRKSRC}/platform/freebsd.ncbi.mk
+	@${REINPLACE_CMD} -e 's/%%ICONV_LIB%%/${ICONV_LIB}/' \
+		${WRKSRC}/make/makeall.unx ${WRKSRC}/make/makenet.unx
 
 # the ncbi-toolkit provides a shell script to drive the build
 # and we use it

Modified: head/biology/ncbi-toolkit/files/patch-make-makeall.unx
==============================================================================
--- head/biology/ncbi-toolkit/files/patch-make-makeall.unx	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/biology/ncbi-toolkit/files/patch-make-makeall.unx	Wed Sep  4 18:06:07 2013	(r326307)
@@ -6,7 +6,7 @@
  AR=ar
 -OTHERLIBS = -lm
 -VIBLIBS = 
-+OTHERLIBS = -lm -liconv
++OTHERLIBS = -lm %%ICONV_LIB%%
 +VIBLIBS = -lXft -lpng -ljpeg
  VIBFLAG =
  LIBCOPY = cp -p

Modified: head/biology/ncbi-toolkit/files/patch-make-makenet.unx
==============================================================================
--- head/biology/ncbi-toolkit/files/patch-make-makenet.unx	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/biology/ncbi-toolkit/files/patch-make-makenet.unx	Wed Sep  4 18:06:07 2013	(r326307)
@@ -4,7 +4,7 @@
  VIB =
  VIBLIBS= -lXm -lXmu -lXt -lX11
  VIBLIBS=
-+USERLIBS = -lXft -lpng -ljpeg -liconv
++USERLIBS = -lXft -lpng -ljpeg %%ICONV_LIB%%
  SEQUIN_OPTS =
  LIBCOPY = cp -p
  SRCCOPY = ./ln-if-absent

Modified: head/chinese/docproj/Makefile
==============================================================================
--- head/chinese/docproj/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/chinese/docproj/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -34,4 +34,8 @@ do-fetch:
 pre-patch:
 	@${CP} -R ${SRC} ${WRKDIR}
 
+post-patch:
+	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' \
+		${WRKSRC}/cjktexsty/Makefile
+
 .include <bsd.port.mk>

Modified: head/chinese/oto/Makefile
==============================================================================
--- head/chinese/oto/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/chinese/oto/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -17,7 +17,7 @@ USES=		iconv
 GNU_CONFIGURE=	YES
 USE_GMAKE=	YES
 CPPFLAGS+=	-I${LOCALBASE}/include
-CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib -liconv"
+CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 
 post-patch:
 	@${FIND} ${WRKSRC}/src/ -type f -print0 | \

Modified: head/chinese/oxim/Makefile
==============================================================================
--- head/chinese/oxim/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/chinese/oxim/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -26,7 +26,7 @@ WANT_GNOME=	yes
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 CONFIGURE_ARGS+=--disable-bimsphone-module \
 		--disable-static \
 		--with-conf-dir=${PREFIX}/etc/${PORTNAME} \

Modified: head/comms/anyremote/Makefile
==============================================================================
--- head/comms/anyremote/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/comms/anyremote/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -15,7 +15,7 @@ USES=		pkgconfig
 USE_GNOME=	glib20
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 
 OPTIONS_DEFINE=	DOCS DBUS X11
 OPTIONS_DEFAULT=	DBUS X11

Modified: head/comms/minicom/Makefile
==============================================================================
--- head/comms/minicom/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/comms/minicom/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -24,7 +24,7 @@ CONFIGURE_ARGS+=	--enable-dfl-baud=57600
 			--sysconfdir=${PREFIX}/etc/minicom \
 			--enable-lock-dir=/var/spool/lock \
 			--enable-dfl-port=/dev/cuau0
-MAKE_ARGS+=	LIBS+="-liconv -lcurses"
+MAKE_ARGS+=	LIBS+="${ICONV_LIB} -lcurses"
 
 MAN1=		minicom.1 runscript.1 ascii-xfr.1 xminicom.1
 

Modified: head/comms/obexapp/Makefile
==============================================================================
--- head/comms/obexapp/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/comms/obexapp/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -26,4 +26,7 @@ MAKE_ENV+=	NO_MAN=yes
 
 MAKE_ENV+=	NO_WERROR=yes
 
+post-patch:
+	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/Makefile
+
 .include <bsd.port.mk>

Modified: head/converters/libiconv/Makefile
==============================================================================
--- head/converters/libiconv/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/converters/libiconv/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -49,4 +49,11 @@ post-patch:
 		${WRKSRC}/libcharset/configure \
 		${WRKSRC}/preload/configure
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 1000043
+IGNORE=		converters/libiconv should not be used with OSVERSION > 1000050. \
+Please fix the port which tries to use it
+.endif
+
+.include <bsd.port.post.mk>

Modified: head/converters/lua-iconv/Makefile
==============================================================================
--- head/converters/lua-iconv/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/converters/lua-iconv/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -21,7 +21,9 @@ USES=		pkgconfig iconv
 PLIST_FILES=	%%LUA_MODLIBDIR%%/iconv.so
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|%%INCDIR%%|-I${PREFIX}/include|;s|%%LIBDIR%%|-L${PREFIX}/lib|' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's|%%INCDIR%%|-I${PREFIX}/include| ; \
+		s|%%LIBDIR%%|-L${PREFIX}/lib|; \
+		s|%%ICONV_LIB%%|${ICONV_LIB}|' ${WRKSRC}/Makefile
 
 do-install:
 	@${INSTALL_PROGRAM} ${WRKSRC}/iconv.so ${LUA_MODLIBDIR}

Modified: head/converters/lua-iconv/files/patch-Makefile
==============================================================================
--- head/converters/lua-iconv/files/patch-Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/converters/lua-iconv/files/patch-Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -8,7 +8,7 @@
 -CFLAGS = `pkg-config $(LUAPKG) --cflags` -fPIC -O3 -Wall
 +LUAPKG = lua-5.1
 +CFLAGS += `pkg-config $(LUAPKG) --cflags` -fPIC %%INCDIR%%
-+LIBS = `pkg-config $(LUAPKG) --libs` -liconv %%LIBDIR%%
++LIBS = `pkg-config $(LUAPKG) --libs` %%ICONV_LIB%% %%LIBDIR%%
  LFLAGS = -shared $(OMIT_FRAME_POINTER)
  INSTALL_PATH = `pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
  

Modified: head/converters/p5-Text-Iconv/Makefile
==============================================================================
--- head/converters/p5-Text-Iconv/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/converters/p5-Text-Iconv/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -13,7 +13,7 @@ COMMENT=	Perl interface to iconv() codes
 USES=		perl5 iconv
 USE_PERL5=	configure
 CONFIGURE_ARGS+=	INC="-I${LOCALBASE}/include" \
-		LIBS="-L${LOCALBASE}/lib -liconv"
+		LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 
 MAN3=		Text::Iconv.3
 

Modified: head/converters/py-iconv/Makefile
==============================================================================
--- head/converters/py-iconv/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/converters/py-iconv/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -21,11 +21,18 @@ USE_PYTHON=	yes
 USE_PYDISTUTILS=	yes
 PLIST_SUB=	PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S|^${LOCALBASE}/||g}
 
+.include <bsd.port.pre.mk>
+
+.if empty(ICONV_LIB)
+SETUPINFO=	,library_dirs=["${LOCALBASE}/lib"],\
+		include_dirs=["${LOCALBASE}/include"]
+.else
 SETUPINFO=	,libraries=["iconv"],library_dirs=["${LOCALBASE}/lib"],\
 		include_dirs=["${LOCALBASE}/include"]
+.endif
 
 post-patch:
 	cd ${WRKSRC} && ${SED} 's!^\(.*ext_mod.*\)\()]\)$$!\1${SETUPINFO}\2!g'\
 		setup.py > setup.py.tmp && ${CAT} setup.py.tmp > setup.py
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/databases/freetds-devel/Makefile
==============================================================================
--- head/databases/freetds-devel/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/freetds-devel/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -93,7 +93,8 @@ post-patch:
 		 s|/freetds.conf|/freetds.conf.dist|g ; \
 		 s|/locales.conf|/locales.conf.dist|g ; \
 		 s|/pool.conf|/pool.conf.dist|g ; \
-		 s| common.h||g'
+		 s| common.h||g ; \
+		 s|%%ICONV_LIB%%|${ICONV_LIB}|'
 
 post-install:
 .if !defined(NOPORTDOCS)

Modified: head/databases/freetds-devel/files/patch-src-tds-Makefile
==============================================================================
--- head/databases/freetds-devel/files/patch-src-tds-Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/freetds-devel/files/patch-src-tds-Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -5,7 +5,7 @@
  LIBICONV = @LIBICONV@
  LIBOBJS = @LIBOBJS@
 -LIBS = @LIBS@
-+LIBS = @LIBS@ -liconv
++LIBS = @LIBS@ %%ICONV_LIB%%
  LIBTOOL = @LIBTOOL@
  LIPO = @LIPO@
  LN_S = @LN_S@

Modified: head/databases/postgis/Makefile
==============================================================================
--- head/databases/postgis/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/postgis/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -58,7 +58,7 @@ MAKE_ARGS+=	NOPORTDOCS=yes
 .endif
 
 post-extract:
-	@${REINPLACE_CMD} -e 's#@ICONV_LDFLAGS@#-liconv -L${LOCALBASE}/lib#g' \
+	@${REINPLACE_CMD} -e 's#@ICONV_LDFLAGS@#${ICONV_LIB} -L${LOCALBASE}/lib#g' \
 		${WRKSRC}/loader/Makefile.in
 
 post-patch:

Modified: head/databases/qdbm/Makefile
==============================================================================
--- head/databases/qdbm/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/qdbm/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -45,7 +45,7 @@ post-patch:
 
 post-build:
 	cd ${WRKSRC}/lab; \
-	${MAKE} CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -liconv" fmtcnv031127
+	${MAKE} CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${ICONV_LIB}" fmtcnv031127
 
 post-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/lab/fmtcnv031127 ${PREFIX}/bin

Modified: head/databases/ruby-sybct/Makefile
==============================================================================
--- head/databases/ruby-sybct/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/ruby-sybct/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -24,6 +24,7 @@ USES=		iconv
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+		-e 's|%%ICONV_LIB%%|${ICONV_LIB}|' \
 		${WRKSRC}/extconf.rb
 
 post-install:

Modified: head/databases/ruby-sybct/files/patch-extconf.rb
==============================================================================
--- head/databases/ruby-sybct/files/patch-extconf.rb	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/ruby-sybct/files/patch-extconf.rb	Wed Sep  4 18:06:07 2013	(r326307)
@@ -11,7 +11,7 @@
 + sybase = "%%LOCALBASE%%"
 + $CFLAGS = "-g -Wall -DFREETDS -I#{sybase}/include"
 + $LDFLAGS = " -L#{sybase}/lib " 
-+ $LOCAL_LIBS = "-lct  -lsybdb -ltds -rdynamic -lm -liconv"
++ $LOCAL_LIBS = "-lct  -lsybdb -ltds -rdynamic -lm %%ICONV_LIB%%"
  
  ### mac-osx-tiger + Free TDS (freetds-0.64 ) ################
  # sybase = "/usr/local/freetds"

Modified: head/databases/spatialite_gui/Makefile
==============================================================================
--- head/databases/spatialite_gui/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/databases/spatialite_gui/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -24,7 +24,7 @@ GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USES=		pkgconfig iconv
 CPPFLAGS+=	-I${LOCALBASE}/include `${WX_CONFIG} --cppflags`
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv `${WX_CONFIG} --libs`
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB} `${WX_CONFIG} --libs`
 CONFIGURE_ARGS+=CFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 USE_LDCONFIG=	yes
 

Modified: head/deskutils/adesklets/Makefile
==============================================================================
--- head/deskutils/adesklets/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/deskutils/adesklets/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -33,7 +33,7 @@ INFO=		adesklets \
 
 SUB_FILES=	pkg-message
 INSTALLS_EGGINFO=	yes
-LDFLAGS+=	-liconv
+LDFLAGS+=	${ICONV_LIB}
 
 .if !defined(WITHOUT_PERL)
 USE_PERL5=	yes

Modified: head/deskutils/fbreader/Makefile
==============================================================================
--- head/deskutils/fbreader/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/deskutils/fbreader/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -56,7 +56,7 @@ post-patch:
 	@${REINPLACE_CMD} -e '/^CFLAGS/s,-pipe.*$$,${CFLAGS} -DDO_ICONV_CAST -DLIBICONV_PLUG,' \
 		-e '/^CC/d;/^LD/d;/QTINCLUDE/s,-I.*$$,-I${QT_INCDIR},;s,libpng ,libpng15 ,' \
 		${WRKSRC}/makefiles/arch/desktop.mk
-	@${REINPLACE_CMD} -e 's,-O3,,;s,-ldl,-liconv,' \
+	@${REINPLACE_CMD} -e 's,-O3,,;s,-ldl,${ICONV_LIB},' \
 		${WRKSRC}/makefiles/config.mk ${WRKSRC}/zlibrary/core/Makefile
 	@${REINPLACE_CMD} -e 's,/usr,${PREFIX},' ${WRKSRC}/fbreader/desktop/Makefile
 	@${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \

Modified: head/devel/cgit/Makefile
==============================================================================
--- head/devel/cgit/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/cgit/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -33,6 +33,7 @@ SUB_LIST+=	PORTNAME=${PORTNAME}
 PLIST_SUB+=	PORTNAME=${PORTNAME} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
 .include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
 
 post-extract:
 	@${RMDIR} ${WRKSRC}/git
@@ -44,6 +45,11 @@ post-patch:
 		${WRKSRC}/git/Makefile
 	@${REINPLACE_CMD} -e 's,/usr,${PREFIX},g' \
 		-e 's,-Igit,-I.,g' ${WRKSRC}/Makefile
+.if empty(ICONV_LIB)
+	@${REINPLACE_CMD} -e '/NEEDS_LIBICONV = YesPlease/d' \
+		-e '/OLD_ICONV = YesPlease/d' \
+		${WRKSRC}/git/config.mak.uname
+.endif
 
 post-install:
 	@${MKDIR} /var/cache/${PORTNAME}
@@ -54,4 +60,4 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${DOCSDIR}/
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/devel/doxygen/Makefile
==============================================================================
--- head/devel/doxygen/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/doxygen/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -77,7 +77,7 @@ PLIST_FILES+=	bin/doxywizard
 
 pre-configure:
 	@cd ${WRKSRC};for pro in src/*.pro.in addon/doxywizard/doxywizard.pro.in;do \
-		${ECHO} "unix:LIBS += -liconv" >> $$pro; done
+		${ECHO} "unix:LIBS += ${ICONV_LIB}" >> $$pro; done
 	@${CHMOD} +x ${WRKSRC}/configure
 
 post-configure:

Modified: head/devel/gdb66/Makefile
==============================================================================
--- head/devel/gdb66/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/gdb66/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -27,7 +27,7 @@ GNU_CONFIGURE=	yes
 CONFIGURE_ENV+=	CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
 CONFIGURE_ARGS=	--program-suffix=${PORTVERSION:S/.//g} \
 		--enable-target=all \
-		--enable-tui --with-libiconv-prefix=${LOCALBASE}
+		--enable-tui
 CFLAGS:=	${CFLAGS:C/ +$//}	# blanks at EOL creep in sometimes
 CFLAGS+=	-DRL_NO_COMPAT
 EXCLUDE=	dejagnu expect readline sim texinfo intl
@@ -38,6 +38,10 @@ MAN1=	gdb${VER}.1
 
 .include <bsd.port.options.mk>
 
+.if empty(ICONV_LIB)
+CONFIGURE_ARGS+=	--with-libiconv-prefix=${LOCALBASE}
+.endif
+
 .if ${PORT_OPTIONS:MINSIGHT}
 PKGNAMESUFFIX=	-insight
 USE_TK=	84+
@@ -87,7 +91,7 @@ post-patch:
 		${WRKSRC}/gdb/version.in
 	@${REINPLACE_CMD} -e 's/^READLINE/#READLINE/' \
 		-e 's/^readline/#readline/' \
-		-e 's,^LIBICONV =.*,LIBICONV=-L${LOCALBASE}/lib -liconv,' \
+		-e 's,^LIBICONV =.*,LIBICONV=-L${LOCALBASE}/lib ${ICONV_LIB},' \
 		${WRKSRC}/gdb/Makefile.in
 	${ECHO} 'READLINE = -lreadline' >> ${WRKSRC}/gdb/Makefile.in
 

Modified: head/devel/glib20/Makefile
==============================================================================
--- head/devel/glib20/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/glib20/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -29,7 +29,7 @@ USES=		gettext gmake iconv pathfix pkgco
 USE_GNOME=	ltverhack
 USE_PYTHON=	2.5+
 USE_PERL5=	yes
-CONFIGURE_ARGS=	--enable-static --with-libiconv=gnu \
+CONFIGURE_ARGS=	--enable-static \
 		--disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \
 		--disable-man --without-xml-catalog \
 		--with-pcre=system \
@@ -54,6 +54,12 @@ CONFIGURE_ARGS+=--disable-dtrace
 #CONFIGURE_ARGS+=--enable-dtrace
 #.endif
 
+.if exists(/usr/include/iconv.h) && ${OSVERSION} >= 1000043 
+CONFIGURE_ARGS+=	--with-libiconv=native
+.else
+CONFIGURE_ARGS+=	--with-libiconv=gnu
+.endif
+
 .if ${ARCH} == powerpc64
 EXTRA_PATCHES=	${FILESDIR}/extra-arch-powerpc64
 .endif

Modified: head/devel/glib20/files/patch-ae
==============================================================================
--- head/devel/glib20/files/patch-ae	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/glib20/files/patch-ae	Wed Sep  4 18:06:07 2013	(r326307)
@@ -1,5 +1,5 @@
---- configure.orig	2013-03-28 02:59:16.000000000 +0000
-+++ configure	2013-03-28 03:00:20.000000000 +0000
+--- configure.orig	2013-08-29 23:29:13.255661322 +0200
++++ configure	2013-08-29 23:48:08.845647995 +0200
 @@ -603,6 +603,9 @@
  #ifdef HAVE_SYS_TYPES_H
  # include <sys/types.h>
@@ -10,7 +10,7 @@
  #ifdef HAVE_SYS_STAT_H
  # include <sys/stat.h>
  #endif
-@@ -5699,7 +5702,7 @@
+@@ -5778,7 +5781,7 @@
  fi
  
  GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
@@ -19,7 +19,31 @@
  
  
   if test "x$with_runtime_libdir" != "x"; then
-@@ -23089,7 +23092,7 @@
+@@ -7444,13 +7447,12 @@
+ 
+       ;;
+     native)
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
+-$as_echo_n "checking for iconv_open in -liconv... " >&6; }
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open" >&5
++$as_echo_n "checking for iconv_open... " >&6; }
+ if ${ac_cv_lib_iconv_iconv_open+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-liconv  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -8648,6 +8650,7 @@
+     ;;
+   native)
+ 
++ICONV_LIBS=""
+ $as_echo "#define USE_LIBICONV_NATIVE 1" >>confdefs.h
+ 
+     ;;
+@@ -23201,7 +23204,7 @@
  fi
  done
  
@@ -28,7 +52,7 @@
  do :
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-@@ -26629,10 +26632,10 @@
+@@ -26741,10 +26744,10 @@
  #  b) FreeBSD doesn't do this either.
  #
  case $host in

Modified: head/devel/libhtp/Makefile
==============================================================================
--- head/devel/libhtp/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/libhtp/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -18,12 +18,17 @@ ACLOCAL_ARGS=	-Im4
 USE_LDCONFIG=	yes
 USES=		pkgconfig pathfix iconv
 
-CONFIGURE_ARGS=	--with-libiconv-prefix=${LOCALBASE}
 CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib \
-		-liconv
+		${ICONV_LIB}
+
+.include <bsd.port.pre.mk>
+
+.if empty(ICONV_LIB)
+CONFIGURE_ARGS=	--with-libiconv-prefix=${LOCALBASE}
+.endif
 
 pre-configure:
 	@${REINPLACE_CMD} -Ee 's,^(pkgconfigdir = ).*,\1$$(exec_prefix)/libdata/pkgconfig,' ${WRKSRC}/Makefile.am
 	@cd ${WRKSRC} && ${SH} ./autogen.sh
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/devel/libparserutils/Makefile
==============================================================================
--- head/devel/libparserutils/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/libparserutils/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -25,7 +25,7 @@ OPTIONS_DEFAULT=	ICONV STATIC TEST DOXYG
 
 .if ${PORT_OPTIONS:MICONV}
 CFLAGS+=	-DWITH_ICONV_FILTER
-LDFLAGS+=	-liconv
+LDFLAGS+=	${ICONV_LIB}
 .endif
 
 .if ${PORT_OPTIONS:MSTATIC}

Modified: head/devel/py-fusefs/Makefile
==============================================================================
--- head/devel/py-fusefs/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/py-fusefs/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -24,7 +24,7 @@ DOCSDIR?=	${PREFIX}/share/doc/py-fusefs
 EXAMPLESDIR?=	${PREFIX}/share/examples/py-fusefs
 
 post-patch:
-	@${REINPLACE_CMD} -e '/libs =/s|$$| + " -liconv"|'\
+	@${REINPLACE_CMD} -e '/libs =/s|$$| + " ${ICONV_LIB}"|'\
 		${WRKSRC}/setup.py
 
 post-install:

Modified: head/devel/styx/Makefile
==============================================================================
--- head/devel/styx/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/devel/styx/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -20,7 +20,7 @@ USES=		iconv
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 CONFIGURE_ARGS=	--includedir=${PREFIX}/include/${PORTNAME}
 USE_LDCONFIG=	yes
 

Modified: head/dns/idnkit2/Makefile
==============================================================================
--- head/dns/idnkit2/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/dns/idnkit2/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -20,7 +20,6 @@ USE_AUTOTOOLS=	libtool
 USES=		iconv
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--with-libiconv=${LOCALBASE}
 
 USE_LDCONFIG=	yes
 
@@ -33,4 +32,16 @@ MAN3=	idn_checkname.3 idn_comparenames.3
 MAN5=	idn2.conf.5 idn2rc.5 idnalias.conf.5 idnlang.conf.5
 MANCOMPRESSED=	no
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if empty(ICONV_LIB)
+CONFIGURE_ARGS=	--with-libiconv=/usr
+.else
+CONFIGURE_ARGS= --with-libiconv=${LOCALBASE}
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|-liconv|${ICONV_LIB}|' \
+		${WRKSRC}/configure
+
+.include <bsd.port.post.mk>

Modified: head/editors/joe/Makefile
==============================================================================
--- head/editors/joe/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/editors/joe/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -20,7 +20,7 @@ LICENSE=	GPLv1
 USE_GMAKE=	yes
 USES=		iconv ncurses
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib -liconv"
+CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 CPPFLAGS+=	-I${LOCALBASE}/include
 
 ALL_TARGET=	${PORTNAME}

Modified: head/editors/joe2/Makefile
==============================================================================
--- head/editors/joe2/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/editors/joe2/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -21,7 +21,7 @@ CONFLICTS=	joe-3*
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USES=		iconv
-CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib -liconv"
+CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 CPPFLAGS+=	-I${LOCALBASE}/include
 
 ALL_TARGET=	${PORTNAME}

Modified: head/editors/texmacs/Makefile
==============================================================================
--- head/editors/texmacs/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/editors/texmacs/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -56,7 +56,7 @@ CONFIGURE_ARGS+=	--without-gs
 
 .if ${PORT_OPTIONS:MICONV}
 USES+=			iconv
-CONFIGURE_ARGS+=	--with-iconv="${LOCALBASE}"
+CONFIGURE_ARGS+=	--with-iconv
 .else
 CONFIGURE_ARGS+=	--without-iconv
 .endif

Modified: head/emulators/mtools/Makefile
==============================================================================
--- head/emulators/mtools/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/emulators/mtools/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -37,7 +37,7 @@ OPTIONS_DEFAULT=ICONV X11
 .if ${PORT_OPTIONS:MICONV}
 USES+=		iconv
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 .else
 CONFIGURE_ENV+=	ac_cv_header_iconv_h=no
 .endif

Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/emulators/virtualbox-ose/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -245,6 +245,9 @@ post-patch:
 		${WRKSRC}/kBuild/sdks/LIBSDL.kmk \
 		${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py
 	@${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure
+.if empty(ICONV_LIB)
+	@${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk ${WRKSRC}/src/VBox/Runtime/Makefile.kmk
+.endif
 
 pre-build:
 	@${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \

Modified: head/games/neverball/Makefile
==============================================================================
--- head/games/neverball/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/games/neverball/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -41,7 +41,8 @@ post-patch:
 		s|./locale|${PREFIX}/share/locale|g; \
 		s|sdl-config|${SDL_CONFIG}|g; \
 		s| -O2| ${CFLAGS}|g; \
-		s|%%LOCALBASE%%|${LOCALBASE}|g' \
+		s|%%LOCALBASE%%|${LOCALBASE}|g; \
+		s|%%ICONV_LIB%%|${ICONV_LIB}|' \
 			${WRKSRC}/Makefile
 
 do-install:

Modified: head/games/neverball/files/patch-Makefile
==============================================================================
--- head/games/neverball/files/patch-Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/games/neverball/files/patch-Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -19,7 +19,7 @@
 +    BASE_LIBS += -L%%LOCALBASE%%/lib
 +
 +    ifneq ($(ENABLE_NLS),0)
-+        INTL_LIBS := -lintl -liconv
++        INTL_LIBS := -lintl %%ICONV_LIB%%
 +    endif
 +endif
 +

Modified: head/games/pokerth/Makefile
==============================================================================
--- head/games/pokerth/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/games/pokerth/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -39,7 +39,7 @@ MAN1=		pokerth.1
 post-patch:
 	@${REINPLACE_CMD} -E \
 		-e 's|/usr([a-z|/]*)|${LOCALBASE}/\1|g' \
-		-e 's|(-lcurl)|\1 -liconv|g' \
+		-e 's|(-lcurl)|\1 ${ICONV_LIB}|g' \
 		-e 's:boost_([a-z]+)-[-|a-z|0-9|_]*:boost_\1:g' \
 		-e 's|LIB_DIRS =.*|LIB_DIRS = ${LOCALBASE}/lib|g' \
 		-e '/.*QMAKE_CXXFLAGS.*/d' \

Modified: head/games/stepmania-devel/Makefile
==============================================================================
--- head/games/stepmania-devel/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/games/stepmania-devel/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -56,7 +56,7 @@ CONFIGURE_ARGS+=--without-vorbis
 
 post-patch:
 	@${REINPLACE_CMD} -e \
-		'/^LIBS/s|-lpthread|-liconv|' ${WRKSRC}/src/Makefile.in
+		'/^LIBS/s|-lpthread|${ICONV_LIB}|' ${WRKSRC}/src/Makefile.in
 
 pre-build:
 	@${ECHO_CMD} -n > ${WRKDIR}/stepmania.sh

Modified: head/games/tuxmath/Makefile
==============================================================================
--- head/games/tuxmath/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/games/tuxmath/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -31,7 +31,7 @@ CONFIGURE_ENV=	T4K_COMMON_CFLAGS="-I${T4
 
 CPPFLAGS+=	$$(pkg-config --cflags SDL_Pango) -I${LOCALBASE}/include \
 		-DHAVE_ALPHASORT -DHAVE_SCANDIR -DHAVE_FSYNC -DICONV_CONST=""
-LDFLAGS+=	$$(pkg-config --libs SDL_Pango) -L${LOCALBASE}/lib -liconv -lpng15
+LDFLAGS+=	$$(pkg-config --libs SDL_Pango) -L${LOCALBASE}/lib ${ICONV_LIB} -lpng15
 
 T4K_NAME=	t4k_common
 T4K_VERSION=	0.1.1

Modified: head/graphics/graphite2/Makefile
==============================================================================
--- head/graphics/graphite2/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/graphics/graphite2/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -11,7 +11,7 @@ COMMENT=	Rendering capabilities for comp
 
 USES=		cmake iconv
 USE_LDCONFIG=	yes
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 
 post-patch:
 	@${REINPLACE_CMD} -e 's,/pkgconfig,data/pkgconfig,g' ${WRKSRC}/CMakeLists.txt

Modified: head/graphics/ida/Makefile
==============================================================================
--- head/graphics/ida/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/graphics/ida/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -26,7 +26,7 @@ USES=		iconv gmake motif perl5
 MAKEFILE=	GNUmakefile
 MAKE_ARGS=	JPEG_VER=80 verbose=yes
 
-LDFLAGS+=	-liconv
+LDFLAGS+=	${ICONV_LIB}
 
 MAN1=		exiftran.1 ida.1
 PORTDOCS=	README TODO INSTALL

Modified: head/graphics/ipe/Makefile
==============================================================================
--- head/graphics/ipe/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/graphics/ipe/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -26,7 +26,7 @@ USE_TEX=	latex
 USE_GMAKE=	yes
 MAKE_ENV=	DLL_CFLAGS="-fPIC" \
 		ICONV_CFLAGS="-I${LOCALBASE}/include" \
-		ICONV_LIBS="-L${LOCALBASE}/lib -liconv" \
+		ICONV_LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}" \
 		INSTALL_DIR="${MKDIR}" \
 		INSTALL_FILES="${INSTALL_DATA}" \
 		INSTALL_SCRIPTS="${INSTALL_SCRIPT}" \

Modified: head/graphics/libgaiagraphics/Makefile
==============================================================================
--- head/graphics/libgaiagraphics/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/graphics/libgaiagraphics/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -19,7 +19,7 @@ GNU_CONFIGURE=	yes
 USES=		iconv gmake pkgconfig
 
 CFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 CONFIGURE_ARGS+=CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 USE_LDCONFIG=	yes
 

Added: head/graphics/netpbm/files/patch-lib-util-pm_c_util.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/netpbm/files/patch-lib-util-pm_c_util.h	Wed Sep  4 18:06:07 2013	(r326307)
@@ -0,0 +1,10 @@
+--- lib/util/pm_c_util.h.orig	2006-08-19 05:12:28.000000000 +0200
++++ lib/util/pm_c_util.h	2013-08-30 13:58:20.918173431 +0200
+@@ -50,6 +50,7 @@
+ #ifndef __cplusplus
+   #ifndef HAVE_BOOL
+     #define HAVE_BOOL 1
++    #undef bool
+     typedef int bool;
+     #endif
+   #ifndef true

Modified: head/graphics/oyranos/Makefile
==============================================================================
--- head/graphics/oyranos/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/graphics/oyranos/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -32,7 +32,7 @@ USE_GNOME=	libxml2
 USE_QT4=	gui moc_build qmake_build rcc_build uic_build
 USE_XORG=	xfixes xinerama xrandr xxf86vm
 CMAKE_ARGS+=	-DXDG_CONFIG_DIR=${PREFIX}/etc/xdg
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 
 MAN1=		oyranos-config-fltk.1 oyranos-monitor-daemon.1 oyranos-monitor.1 \
 		oyranos-policy.1 oyranos-profile-graph.1 oyranos-profile-install.1 \

Modified: head/irc/xchat1/Makefile
==============================================================================
--- head/irc/xchat1/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/irc/xchat1/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -22,7 +22,7 @@ USE_GNOME=		gtk12
 WANT_GNOME=		yes
 GNU_CONFIGURE=		yes
 # Assign with `+=' for slave ports
-CONFIGURE_ENV+=		LIBS="-L${LOCALBASE}/lib -lintl -liconv"
+CONFIGURE_ENV+=		LIBS="-L${LOCALBASE}/lib -lintl ${ICONV_LIB}"
 CPPFLAGS+=		-I${LOCALBASE}/include
 CONFIGURE_ARGS+=	--without-included-gettext \
 			--enable-nls \

Modified: head/japanese/groff/Makefile
==============================================================================
--- head/japanese/groff/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/japanese/groff/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -41,7 +41,7 @@ MAKE_JOBS_UNSAFE=	yes
 
 CONFIGURE_ARGS=	--enable-multibyte
 CONFIGURE_ENV=	INSTALL_MAN="${INSTALL_MAN}" \
-		LIBS="-L${LOCALBASE}/lib -liconv"
+		LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
 CFLAGS+=	-I${LOCALBASE}/include
 
 TMACBASE=	${WRKDIR}/${TMAC_DISTNAME}

Modified: head/java/openjdk6/Makefile
==============================================================================
--- head/java/openjdk6/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/java/openjdk6/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -240,6 +240,13 @@ post-patch:
 	@${REINPLACE_CMD} 's|build-policy install-limited|build-policy install-unlimited|' \
 		${WRKSRC}/jdk/make/javax/crypto/Makefile
 .endif
+.if empty(ICONV_LIB)
+	@${REINPLACE_CMD} 's| -liconv||' \
+		${WRKSRC}/Makefile \
+		${WRKSRC}/jdk/make/sun/splashscreen/Makefile \
+		${WRKSRC}/jdk/make/java/npt/Makefile \
+		${WRKSRC}/jdk/make/java/instrument/Makefile
+.endif
 
 post-build:
 .if ${PORT_OPTIONS:MTZUPDATE}

Modified: head/java/openjdk7/Makefile
==============================================================================
--- head/java/openjdk7/Makefile	Wed Sep  4 18:04:48 2013	(r326306)
+++ head/java/openjdk7/Makefile	Wed Sep  4 18:06:07 2013	(r326307)
@@ -159,6 +159,13 @@ post-patch:
 	@${REINPLACE_CMD} 's|build-policy install-limited|build-policy install-unlimited|' \
 		${WRKSRC}/jdk/make/javax/crypto/Makefile
 .endif
+.if empty(ICONV_LIB)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309041806.r84I680e048857>