aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES18
-rw-r--r--Mk/Uses/iconv.mk16
-rw-r--r--Mk/bsd.gnome.mk2
-rw-r--r--UPDATING29
-rw-r--r--archivers/rpm/Makefile2
-rw-r--r--archivers/unrar-iconv/Makefile2
-rw-r--r--archivers/unrar/Makefile2
-rw-r--r--archivers/unzip/Makefile2
-rw-r--r--audio/julius/Makefile2
-rw-r--r--audio/mp3unicode/Makefile2
-rw-r--r--audio/mpc/Makefile2
-rw-r--r--audio/mpiosh/Makefile3
-rw-r--r--audio/mpiosh/files/patch-mpiosh_Makefile.am2
-rw-r--r--audio/osd-lyrics/Makefile2
-rw-r--r--audio/praat/Makefile4
-rw-r--r--audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic2
-rw-r--r--biology/ncbi-toolkit/Makefile4
-rw-r--r--biology/ncbi-toolkit/files/patch-make-makeall.unx2
-rw-r--r--biology/ncbi-toolkit/files/patch-make-makenet.unx2
-rw-r--r--chinese/docproj/Makefile4
-rw-r--r--chinese/oto/Makefile2
-rw-r--r--chinese/oxim/Makefile2
-rw-r--r--comms/anyremote/Makefile2
-rw-r--r--comms/minicom/Makefile2
-rw-r--r--comms/obexapp/Makefile3
-rw-r--r--converters/libiconv/Makefile9
-rw-r--r--converters/lua-iconv/Makefile4
-rw-r--r--converters/lua-iconv/files/patch-Makefile2
-rw-r--r--converters/p5-Text-Iconv/Makefile2
-rw-r--r--converters/py-iconv/Makefile9
-rw-r--r--databases/freetds-devel/Makefile3
-rw-r--r--databases/freetds-devel/files/patch-src-tds-Makefile2
-rw-r--r--databases/postgis/Makefile2
-rw-r--r--databases/qdbm/Makefile2
-rw-r--r--databases/ruby-sybct/Makefile1
-rw-r--r--databases/ruby-sybct/files/patch-extconf.rb2
-rw-r--r--databases/spatialite_gui/Makefile2
-rw-r--r--deskutils/adesklets/Makefile2
-rw-r--r--deskutils/fbreader/Makefile2
-rw-r--r--devel/cgit/Makefile8
-rw-r--r--devel/doxygen/Makefile2
-rw-r--r--devel/gdb66/Makefile8
-rw-r--r--devel/glib20/Makefile8
-rw-r--r--devel/glib20/files/patch-ae34
-rw-r--r--devel/libhtp/Makefile11
-rw-r--r--devel/libparserutils/Makefile2
-rw-r--r--devel/py-fusefs/Makefile2
-rw-r--r--devel/styx/Makefile2
-rw-r--r--dns/idnkit2/Makefile15
-rw-r--r--editors/joe/Makefile2
-rw-r--r--editors/joe2/Makefile2
-rw-r--r--editors/texmacs/Makefile2
-rw-r--r--emulators/mtools/Makefile2
-rw-r--r--emulators/virtualbox-ose/Makefile3
-rw-r--r--games/neverball/Makefile3
-rw-r--r--games/neverball/files/patch-Makefile2
-rw-r--r--games/pokerth/Makefile2
-rw-r--r--games/stepmania-devel/Makefile2
-rw-r--r--games/tuxmath/Makefile2
-rw-r--r--graphics/graphite2/Makefile2
-rw-r--r--graphics/ida/Makefile2
-rw-r--r--graphics/ipe/Makefile2
-rw-r--r--graphics/libgaiagraphics/Makefile2
-rw-r--r--graphics/netpbm/files/patch-lib-util-pm_c_util.h10
-rw-r--r--graphics/oyranos/Makefile2
-rw-r--r--irc/xchat1/Makefile2
-rw-r--r--japanese/groff/Makefile2
-rw-r--r--java/openjdk6/Makefile7
-rw-r--r--java/openjdk7/Makefile7
-rw-r--r--lang/php5/Makefile.ext5
-rw-r--r--lang/php52/Makefile.ext6
-rw-r--r--lang/php53/Makefile.ext5
-rw-r--r--lang/php55/Makefile.ext5
-rw-r--r--mail/balsa/Makefile2
-rw-r--r--mail/bogofilter/Makefile2
-rw-r--r--mail/claws-mail/Makefile2
-rw-r--r--mail/crm114/Makefile2
-rw-r--r--mail/exim/Makefile2
-rw-r--r--mail/libpst/Makefile2
-rw-r--r--mail/mmr/Makefile2
-rw-r--r--mail/normalizemime/Makefile2
-rw-r--r--mail/sylpheed/Makefile2
-rw-r--r--multimedia/libxine/Makefile2
-rw-r--r--multimedia/mkclean/Makefile2
-rw-r--r--multimedia/mkvalidator/Makefile2
-rw-r--r--multimedia/vdr/Makefile3
-rw-r--r--multimedia/w_scan/Makefile2
-rw-r--r--net-im/imspector/Makefile2
-rw-r--r--net-im/imspector/files/patch-Makefile2
-rw-r--r--net-im/libpurple/Makefile2
-rw-r--r--net-im/licq/Makefile2
-rw-r--r--net-im/ysm/Makefile2
-rw-r--r--net/afpfs-ng/Makefile2
-rw-r--r--net/ldapdiff/Makefile11
-rw-r--r--net/xmlrpc-epi/Makefile2
-rw-r--r--news/pan/Makefile2
-rw-r--r--print/gv/Makefile2
-rw-r--r--print/pdftk/Makefile2
-rw-r--r--print/py-cups/Makefile7
-rw-r--r--security/scanhill/Makefile3
-rw-r--r--security/tpm-tools/Makefile2
-rw-r--r--security/trousers/Makefile4
-rw-r--r--sysutils/fusefs-chironfs/Makefile1
-rw-r--r--sysutils/fusefs-gunzip/Makefile2
-rw-r--r--sysutils/libcdio/Makefile2
-rw-r--r--sysutils/mapchan/Makefile2
-rw-r--r--textproc/exempi/Makefile2
-rw-r--r--textproc/freexl/Makefile2
-rw-r--r--textproc/kmflcomp/Makefile2
-rw-r--r--textproc/odt2txt/Makefile3
-rw-r--r--textproc/p5-XML-Sablotron/Makefile2
-rw-r--r--textproc/sablotron/Makefile2
-rw-r--r--textproc/unrtf/Makefile2
-rw-r--r--textproc/xalan-c/Makefile2
-rw-r--r--textproc/xerces-c2/Makefile1
-rw-r--r--textproc/xmlppm/Makefile2
-rw-r--r--www/sarg/Makefile2
-rw-r--r--www/snownews/Makefile3
-rw-r--r--www/webalizer/Makefile2
-rw-r--r--x11-fm/nautilus/Makefile2
-rw-r--r--x11-toolkits/open-motif/Makefile1
-rw-r--r--x11-toolkits/wxgtk26/Makefile2
-rw-r--r--x11-wm/awesome2/Makefile2
-rw-r--r--x11-wm/fluxbox/Makefile2
-rw-r--r--x11-wm/i3/Makefile1
-rw-r--r--x11-wm/pekwm/Makefile2
-rw-r--r--x11-wm/wmii/Makefile2
-rw-r--r--x11/gdkxft/Makefile2
-rw-r--r--x11/i3lock/Makefile2
129 files changed, 326 insertions, 134 deletions
diff --git a/CHANGES b/CHANGES
index de07a2ee9aa7..9435e360cca9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,24 @@ in the release notes and/or placed into UPDATING.
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
diff --git a/Mk/Uses/iconv.mk b/Mk/Uses/iconv.mk
index 60ee2f7c548d..0401837b200a 100644
--- a/Mk/Uses/iconv.mk
+++ b/Mk/Uses/iconv.mk
@@ -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}/converters/libiconv
PATCH_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
.endif
+.else
+
+ICONV_CMD= /usr/bin/iconv
+ICONV_LIB=
+ICONV_CONFIGURE_ARG=
+
+.endif
+
.endif
diff --git a/Mk/bsd.gnome.mk b/Mk/bsd.gnome.mk
index 3d3532be646d..72c52f8b20f0 100644
--- a/Mk/bsd.gnome.mk
+++ b/Mk/bsd.gnome.mk
@@ -546,7 +546,7 @@ intltool_BUILD_DEPENDS= ${intltool_DETECT}:${PORTSDIR}/textproc/intltool
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
diff --git a/UPDATING b/UPDATING
index 78caeeded9ed..5d48f67ac012 100644
--- a/UPDATING
+++ b/UPDATING
@@ -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
diff --git a/archivers/rpm/Makefile b/archivers/rpm/Makefile
index 55ef92fa0348..c90d5f841490 100644
--- a/archivers/rpm/Makefile
+++ b/archivers/rpm/Makefile
@@ -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 "
diff --git a/archivers/unrar-iconv/Makefile b/archivers/unrar-iconv/Makefile
index 7bcc102df9a5..01f765eb8c0c 100644
--- a/archivers/unrar-iconv/Makefile
+++ b/archivers/unrar-iconv/Makefile
@@ -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]*
diff --git a/archivers/unrar/Makefile b/archivers/unrar/Makefile
index 99af80b9e184..adcfcd2767d5 100644
--- a/archivers/unrar/Makefile
+++ b/archivers/unrar/Makefile
@@ -21,7 +21,7 @@ CONFLICTS?= zh-unrar-[0-9].* unrar-iconv-[0-9].*
MAKE_ARGS= STRIP=${STRIP_CMD}
MAKEFILE= makefile.unix
-USES= gmake
+USES+= gmake
WRKSRC= ${WRKDIR}/${PORTNAME}
PLIST_FILES= bin/unrar
diff --git a/archivers/unzip/Makefile b/archivers/unzip/Makefile
index 633cb9df6dbe..1f2bf539d373 100644
--- a/archivers/unzip/Makefile
+++ b/archivers/unzip/Makefile
@@ -48,7 +48,7 @@ PATCHFILES+= unzip60-alt-iconv-utf8.patch
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}" \
diff --git a/audio/julius/Makefile b/audio/julius/Makefile
index 38652c705502..75047271b566 100644
--- a/audio/julius/Makefile
+++ b/audio/julius/Makefile
@@ -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 \
diff --git a/audio/mp3unicode/Makefile b/audio/mp3unicode/Makefile
index 32526c04c60d..c3c605d33c62 100644
--- a/audio/mp3unicode/Makefile
+++ b/audio/mp3unicode/Makefile
@@ -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
diff --git a/audio/mpc/Makefile b/audio/mpc/Makefile
index f8074f37b36c..d1256de0fbdb 100644
--- a/audio/mpc/Makefile
+++ b/audio/mpc/Makefile
@@ -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
diff --git a/audio/mpiosh/Makefile b/audio/mpiosh/Makefile
index 88c9408e8445..4c81e3df40a2 100644
--- a/audio/mpiosh/Makefile
+++ b/audio/mpiosh/Makefile
@@ -23,7 +23,7 @@ USE_AUTOTOOLS= aclocal automake autoconf libtool
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-configure.in
post-patch:
${RM} -f ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's/%%ICONV_LIB%%/${ICONV_LIB}/' ${WRKSRC}/mpiosh/Makefile.am
.include <bsd.port.post.mk>
diff --git a/audio/mpiosh/files/patch-mpiosh_Makefile.am b/audio/mpiosh/files/patch-mpiosh_Makefile.am
index b994b24b822a..22e6b0fff8a6 100644
--- a/audio/mpiosh/files/patch-mpiosh_Makefile.am
+++ b/audio/mpiosh/files/patch-mpiosh_Makefile.am
@@ -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 \
diff --git a/audio/osd-lyrics/Makefile b/audio/osd-lyrics/Makefile
index fad998fdf494..b5374487e439 100644
--- a/audio/osd-lyrics/Makefile
+++ b/audio/osd-lyrics/Makefile
@@ -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
diff --git a/audio/praat/Makefile b/audio/praat/Makefile
index b0ee0bb26996..c4213090dfb0 100644
--- a/audio/praat/Makefile
+++ b/audio/praat/Makefile
@@ -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
diff --git a/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic b/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic
index eb32db9867d2..0abac883abef 100644
--- a/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic
+++ b/audio/praat/files/patch-makefiles_makefile.defs.freebsd.dynamic
@@ -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 =
diff --git a/biology/ncbi-toolkit/Makefile b/biology/ncbi-toolkit/Makefile
index f829f790b278..1f5b7cf28ae5 100644
--- a/biology/ncbi-toolkit/Makefile
+++ b/biology/ncbi-toolkit/Makefile
@@ -13,7 +13,7 @@ COMMENT= NCBI development toolkit, including BLAST 2 and GenBank/Entrez support
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
diff --git a/biology/ncbi-toolkit/files/patch-make-makeall.unx b/biology/ncbi-toolkit/files/patch-make-makeall.unx
index 2c46de62b96f..8767a69f7dab 100644
--- a/biology/ncbi-toolkit/files/patch-make-makeall.unx
+++ b/biology/ncbi-toolkit/files/patch-make-makeall.unx
@@ -6,7 +6,7 @@
AR=ar
-OTHERLIBS = -lm
-VIBLIBS =
-+OTHERLIBS = -lm -liconv
++OTHERLIBS = -lm %%ICONV_LIB%%
+VIBLIBS = -lXft -lpng -ljpeg
VIBFLAG =
LIBCOPY = cp -p
diff --git a/biology/ncbi-toolkit/files/patch-make-makenet.unx b/biology/ncbi-toolkit/files/patch-make-makenet.unx
index 878c36e2abc9..2e51654e29e1 100644
--- a/biology/ncbi-toolkit/files/patch-make-makenet.unx
+++ b/biology/ncbi-toolkit/files/patch-make-makenet.unx
@@ -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
diff --git a/chinese/docproj/Makefile b/chinese/docproj/Makefile
index dc2fc66811c1..d729cb13c3d0 100644
--- a/chinese/docproj/Makefile
+++ b/chinese/docproj/Makefile
@@ -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>
diff --git a/chinese/oto/Makefile b/chinese/oto/Makefile
index a1a6bed0eb41..4a342fd2aab5 100644
--- a/chinese/oto/Makefile
+++ b/chinese/oto/Makefile
@@ -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 | \
diff --git a/chinese/oxim/Makefile b/chinese/oxim/Makefile
index 89926944fce4..05a09d7abdff 100644
--- a/chinese/oxim/Makefile
+++ b/chinese/oxim/Makefile
@@ -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} \
diff --git a/comms/anyremote/Makefile b/comms/anyremote/Makefile
index c1ac0111d880..970638453d8f 100644
--- a/comms/anyremote/Makefile
+++ b/comms/anyremote/Makefile
@@ -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
diff --git a/comms/minicom/Makefile b/comms/minicom/Makefile
index 033f4b1f02ed..5471464ef947 100644
--- a/comms/minicom/Makefile
+++ b/comms/minicom/Makefile
@@ -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
diff --git a/comms/obexapp/Makefile b/comms/obexapp/Makefile
index 2062912c5b45..a8d7bbf7b60a 100644
--- a/comms/obexapp/Makefile
+++ b/comms/obexapp/Makefile
@@ -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>
diff --git a/converters/libiconv/Makefile b/converters/libiconv/Makefile
index a640159bba61..7c7c31a26208 100644
--- a/converters/libiconv/Makefile
+++ b/converters/libiconv/Makefile
@@ -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>
diff --git a/converters/lua-iconv/Makefile b/converters/lua-iconv/Makefile
index 3988537d9b05..8dacfe99119c 100644
--- a/converters/lua-iconv/Makefile
+++ b/converters/lua-iconv/Makefile
@@ -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}
diff --git a/converters/lua-iconv/files/patch-Makefile b/converters/lua-iconv/files/patch-Makefile
index ae1eeb119222..ed29001d0b7d 100644
--- a/converters/lua-iconv/files/patch-Makefile
+++ b/converters/lua-iconv/files/patch-Makefile
@@ -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`
diff --git a/converters/p5-Text-Iconv/Makefile b/converters/p5-Text-Iconv/Makefile
index a83dec15351d..bac197b30dd4 100644
--- a/converters/p5-Text-Iconv/Makefile
+++ b/converters/p5-Text-Iconv/Makefile
@@ -13,7 +13,7 @@ COMMENT= Perl interface to iconv() codeset conversion function
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
diff --git a/converters/py-iconv/Makefile b/converters/py-iconv/Makefile
index 5193fe4fdfa5..bfa5c990fffb 100644
--- a/converters/py-iconv/Makefile
+++ b/converters/py-iconv/Makefile
@@ -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>
diff --git a/databases/freetds-devel/Makefile b/databases/freetds-devel/Makefile
index 1e1c296f1f30..2ddae76ea491 100644
--- a/databases/freetds-devel/Makefile
+++ b/databases/freetds-devel/Makefile
@@ -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)
diff --git a/databases/freetds-devel/files/patch-src-tds-Makefile b/databases/freetds-devel/files/patch-src-tds-Makefile
index f38068974a2d..f0789382c90c 100644
--- a/databases/freetds-devel/files/patch-src-tds-Makefile
+++ b/databases/freetds-devel/files/patch-src-tds-Makefile
@@ -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@
diff --git a/databases/postgis/Makefile b/databases/postgis/Makefile
index b28343a2e08c..26648a147cc0 100644
--- a/databases/postgis/Makefile
+++ b/databases/postgis/Makefile
@@ -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:
diff --git a/databases/qdbm/Makefile b/databases/qdbm/Makefile
index b30334166730..a92a1c293f94 100644
--- a/databases/qdbm/Makefile
+++ b/databases/qdbm/Makefile
@@ -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
diff --git a/databases/ruby-sybct/Makefile b/databases/ruby-sybct/Makefile
index beb4c3125abe..978cb5a43666 100644
--- a/databases/ruby-sybct/Makefile
+++ b/databases/ruby-sybct/Makefile
@@ -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:
diff --git a/databases/ruby-sybct/files/patch-extconf.rb b/databases/ruby-sybct/files/patch-extconf.rb
index 1d86666b4c24..695628f04451 100644
--- a/databases/ruby-sybct/files/patch-extconf.rb
+++ b/databases/ruby-sybct/files/patch-extconf.rb
@@ -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"
diff --git a/databases/spatialite_gui/Makefile b/databases/spatialite_gui/Makefile
index 4804083971fe..e6ca9ccbbb72 100644
--- a/databases/spatialite_gui/Makefile
+++ b/databases/spatialite_gui/Makefile
@@ -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
diff --git a/deskutils/adesklets/Makefile b/deskutils/adesklets/Makefile
index c9b38319a77f..10680c3f3e93 100644
--- a/deskutils/adesklets/Makefile
+++ b/deskutils/adesklets/Makefile
@@ -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
diff --git a/deskutils/fbreader/Makefile b/deskutils/fbreader/Makefile
index 8bc1729774c6..664f7ef1075e 100644
--- a/deskutils/fbreader/Makefile
+++ b/deskutils/fbreader/Makefile
@@ -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} \
diff --git a/devel/cgit/Makefile b/devel/cgit/Makefile
index 423cd4bc0977..ad8a1755191e 100644
--- a/devel/cgit/Makefile
+++ b/devel/cgit/Makefile
@@ -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>
diff --git a/devel/doxygen/Makefile b/devel/doxygen/Makefile
index 465defb99d87..2c307bff58a7 100644
--- a/devel/doxygen/Makefile
+++ b/devel/doxygen/Makefile
@@ -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:
diff --git a/devel/gdb66/Makefile b/devel/gdb66/Makefile
index c76e578b4692..1d91e5dd5a4d 100644
--- a/devel/gdb66/Makefile
+++ b/devel/gdb66/Makefile
@@ -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
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
index 50598fcb78bc..4030736d8183 100644
--- a/devel/glib20/Makefile
+++ b/devel/glib20/Makefile
@@ -29,7 +29,7 @@ USES= gettext gmake iconv pathfix pkgconfig shebangfix
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
diff --git a/devel/glib20/files/patch-ae b/devel/glib20/files/patch-ae
index e62156bf5c34..9396ef32ab24 100644
--- a/devel/glib20/files/patch-ae
+++ b/devel/glib20/files/patch-ae
@@ -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
diff --git a/devel/libhtp/Makefile b/devel/libhtp/Makefile
index dff6c82ebf33..bf619530164f 100644
--- a/devel/libhtp/Makefile
+++ b/devel/libhtp/Makefile
@@ -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>
diff --git a/devel/libparserutils/Makefile b/devel/libparserutils/Makefile
index 734b07d391e6..f862226d797a 100644
--- a/devel/libparserutils/Makefile
+++ b/devel/libparserutils/Makefile
@@ -25,7 +25,7 @@ OPTIONS_DEFAULT= ICONV STATIC TEST DOXYGEN
.if ${PORT_OPTIONS:MICONV}
CFLAGS+= -DWITH_ICONV_FILTER
-LDFLAGS+= -liconv
+LDFLAGS+= ${ICONV_LIB}
.endif
.if ${PORT_OPTIONS:MSTATIC}
diff --git a/devel/py-fusefs/Makefile b/devel/py-fusefs/Makefile
index 894449307cbd..2f3f32b388fa 100644
--- a/devel/py-fusefs/Makefile
+++ b/devel/py-fusefs/Makefile
@@ -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:
diff --git a/devel/styx/Makefile b/devel/styx/Makefile
index 3e97bf4a9329..baab2e511a99 100644
--- a/devel/styx/Makefile
+++ b/devel/styx/Makefile
@@ -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
diff --git a/dns/idnkit2/Makefile b/dns/idnkit2/Makefile
index d73faffe0dcf..9b27efe4ae79 100644
--- a/dns/idnkit2/Makefile
+++ b/dns/idnkit2/Makefile
@@ -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 idn_comparenames2.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>
diff --git a/editors/joe/Makefile b/editors/joe/Makefile
index e44535aa14a8..6fdd25549986 100644
--- a/editors/joe/Makefile
+++ b/editors/joe/Makefile
@@ -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}
diff --git a/editors/joe2/Makefile b/editors/joe2/Makefile
index 9bcf0014a4d4..756b339c55d4 100644
--- a/editors/joe2/Makefile
+++ b/editors/joe2/Makefile
@@ -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}
diff --git a/editors/texmacs/Makefile b/editors/texmacs/Makefile
index 39ccee3c36eb..7c04bb05c728 100644
--- a/editors/texmacs/Makefile
+++ b/editors/texmacs/Makefile
@@ -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
diff --git a/emulators/mtools/Makefile b/emulators/mtools/Makefile
index 47f97a2d626a..bbb223a9fc20 100644
--- a/emulators/mtools/Makefile
+++ b/emulators/mtools/Makefile
@@ -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
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index c32da908feaa..f31dcec49f1f 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -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|' \
diff --git a/games/neverball/Makefile b/games/neverball/Makefile
index eeac0d987529..b2f66c70f1ae 100644
--- a/games/neverball/Makefile
+++ b/games/neverball/Makefile
@@ -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:
diff --git a/games/neverball/files/patch-Makefile b/games/neverball/files/patch-Makefile
index 81bc814bf6de..b5284cddd4f1 100644
--- a/games/neverball/files/patch-Makefile
+++ b/games/neverball/files/patch-Makefile
@@ -19,7 +19,7 @@
+ BASE_LIBS += -L%%LOCALBASE%%/lib
+
+ ifneq ($(ENABLE_NLS),0)
-+ INTL_LIBS := -lintl -liconv
++ INTL_LIBS := -lintl %%ICONV_LIB%%
+ endif
+endif
+
diff --git a/games/pokerth/Makefile b/games/pokerth/Makefile
index 42892cf4afca..ce5c3883757e 100644
--- a/games/pokerth/Makefile
+++ b/games/pokerth/Makefile
@@ -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' \
diff --git a/games/stepmania-devel/Makefile b/games/stepmania-devel/Makefile
index 95bafeeed97f..5d8ac8017de7 100644
--- a/games/stepmania-devel/Makefile
+++ b/games/stepmania-devel/Makefile
@@ -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
diff --git a/games/tuxmath/Makefile b/games/tuxmath/Makefile
index 44cf1aae92f2..555d69a11a5a 100644
--- a/games/tuxmath/Makefile
+++ b/games/tuxmath/Makefile
@@ -31,7 +31,7 @@ CONFIGURE_ENV= T4K_COMMON_CFLAGS="-I${T4K_WRKSRC}/src" \
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
diff --git a/graphics/graphite2/Makefile b/graphics/graphite2/Makefile
index f73b04085048..b4c703089c38 100644
--- a/graphics/graphite2/Makefile
+++ b/graphics/graphite2/Makefile
@@ -11,7 +11,7 @@ COMMENT= Rendering capabilities for complex non-Roman writing systems
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
diff --git a/graphics/ida/Makefile b/graphics/ida/Makefile
index cb017dcb9a2e..8b90ebe4668d 100644
--- a/graphics/ida/Makefile
+++ b/graphics/ida/Makefile
@@ -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
diff --git a/graphics/ipe/Makefile b/graphics/ipe/Makefile
index 725c25601d54..30b2e4e182a0 100644
--- a/graphics/ipe/Makefile
+++ b/graphics/ipe/Makefile
@@ -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}" \
diff --git a/graphics/libgaiagraphics/Makefile b/graphics/libgaiagraphics/Makefile
index 2b75a31c5d29..ae5d4902845b 100644
--- a/graphics/libgaiagraphics/Makefile
+++ b/graphics/libgaiagraphics/Makefile
@@ -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
diff --git a/graphics/netpbm/files/patch-lib-util-pm_c_util.h b/graphics/netpbm/files/patch-lib-util-pm_c_util.h
new file mode 100644
index 000000000000..c630a8411eef
--- /dev/null
+++ b/graphics/netpbm/files/patch-lib-util-pm_c_util.h
@@ -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
diff --git a/graphics/oyranos/Makefile b/graphics/oyranos/Makefile
index 070e8bdccff3..3fec69119f7e 100644
--- a/graphics/oyranos/Makefile
+++ b/graphics/oyranos/Makefile
@@ -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 \
diff --git a/irc/xchat1/Makefile b/irc/xchat1/Makefile
index db1e2aa18fba..c08f3e2a238f 100644
--- a/irc/xchat1/Makefile
+++ b/irc/xchat1/Makefile
@@ -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 \
diff --git a/japanese/groff/Makefile b/japanese/groff/Makefile
index 993a0843424b..97c63f2fe091 100644
--- a/japanese/groff/Makefile
+++ b/japanese/groff/Makefile
@@ -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}
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index dbf42ededbb6..fca6e7df4e78 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -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}
diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile
index 7b996df7d9b9..a9616ed85c80 100644
--- a/java/openjdk7/Makefile
+++ b/java/openjdk7/Makefile
@@ -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)
+ @${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
.if ${PORT_OPTIONS:MTZUPDATE}
pre-install:
diff --git a/lang/php5/Makefile.ext b/lang/php5/Makefile.ext
index f044b0794128..a054d0229dfe 100644
--- a/lang/php5/Makefile.ext
+++ b/lang/php5/Makefile.ext
@@ -126,7 +126,7 @@ CONFIGURE_ARGS+=--enable-hash \
.endif
.if ${PHP_MODNAME} == "iconv"
-CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
+CONFIGURE_ARGS+=--with-iconv
USES+= iconv
.endif
@@ -424,8 +424,7 @@ USE_PHP_BUILD= yes
.if ${PHP_MODNAME} == "xmlrpc"
CONFIGURE_ARGS+=--with-xmlrpc \
- --with-libxml-dir=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+ --with-libxml-dir=${LOCALBASE}
USES+= iconv
USE_GNOME= libxml2
diff --git a/lang/php52/Makefile.ext b/lang/php52/Makefile.ext
index ae1c4a11e001..af2a744054e9 100644
--- a/lang/php52/Makefile.ext
+++ b/lang/php52/Makefile.ext
@@ -135,8 +135,7 @@ CONFIGURE_ARGS+=--enable-hash
.endif
.if ${PHP_MODNAME} == "iconv"
-CONFIGURE_ARGS+=--with-iconv=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+CONFIGURE_ARGS+=--with-iconv
USES+= iconv
.endif
@@ -482,8 +481,7 @@ USE_PHP_BUILD= yes
.if ${PHP_MODNAME} == "xmlrpc"
CONFIGURE_ARGS+=--with-xmlrpc \
- --with-libxml-dir=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+ --with-libxml-dir=${LOCALBASE}
USES+= iconv
USE_GNOME= libxml2
diff --git a/lang/php53/Makefile.ext b/lang/php53/Makefile.ext
index bffe0ed6a8e7..753324cf47a6 100644
--- a/lang/php53/Makefile.ext
+++ b/lang/php53/Makefile.ext
@@ -125,7 +125,7 @@ CONFIGURE_ARGS+=--enable-hash \
.endif
.if ${PHP_MODNAME} == "iconv"
-CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
+CONFIGURE_ARGS+=--with-iconv
USES+= iconv
.endif
@@ -429,8 +429,7 @@ USE_PHP_BUILD= yes
.if ${PHP_MODNAME} == "xmlrpc"
CONFIGURE_ARGS+=--with-xmlrpc \
- --with-libxml-dir=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+ --with-libxml-dir=${LOCALBASE}
USES+= iconv
USE_GNOME= libxml2
diff --git a/lang/php55/Makefile.ext b/lang/php55/Makefile.ext
index daabaef48fcf..934ba6572d96 100644
--- a/lang/php55/Makefile.ext
+++ b/lang/php55/Makefile.ext
@@ -126,7 +126,7 @@ CONFIGURE_ARGS+=--enable-hash \
.endif
.if ${PHP_MODNAME} == "iconv"
-CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
+CONFIGURE_ARGS+=--with-iconv
USES+= iconv
.endif
@@ -424,8 +424,7 @@ USE_PHP_BUILD= yes
.if ${PHP_MODNAME} == "xmlrpc"
CONFIGURE_ARGS+=--with-xmlrpc \
- --with-libxml-dir=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+ --with-libxml-dir=${LOCALBASE}
USES+= iconv
USE_GNOME= libxml2
diff --git a/mail/balsa/Makefile b/mail/balsa/Makefile
index d608bf1b0c9b..2c427e1ff7b6 100644
--- a/mail/balsa/Makefile
+++ b/mail/balsa/Makefile
@@ -33,7 +33,7 @@ CONFIGURE_ARGS= --enable-threads \
--with-ssl \
--without-nm \
--with-canberra
-CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib -liconv ${PTHREAD_LIBS}"
+CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib ${ICONV_LIB} ${PTHREAD_LIBS}"
CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
MAN1= balsa.1
diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile
index 873c88591290..32c5841a7b4e 100644
--- a/mail/bogofilter/Makefile
+++ b/mail/bogofilter/Makefile
@@ -43,7 +43,7 @@ BF_CPPFLAGS?= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
.if ${PORT_OPTIONS:MUNICODE}
CONFIGURE_ARGS+= --enable-unicode
-BF_LIBS+= -liconv
+BF_LIBS+= ${ICONV_LIB}
.endif
.if ${PORT_OPTIONS:MGSL}
LIB_DEPENDS+= libgsl.so:${PORTSDIR}/math/gsl
diff --git a/mail/claws-mail/Makefile b/mail/claws-mail/Makefile
index 714ef8edaa12..e0bb89b01ccf 100644
--- a/mail/claws-mail/Makefile
+++ b/mail/claws-mail/Makefile
@@ -67,7 +67,7 @@ USE_OPENLDAP= yes
.endif
post-patch:
- @${REINPLACE_CMD} -e 's|-lresolv||g; s|-lpisock\"|-liconv &|g' \
+ @${REINPLACE_CMD} -e 's|-lresolv||g; s|-lpisock\"|${ICONV_LIB} &|g' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc|${LOCALBASE}&|g ; s|/usr/share|${LOCALBASE}/share|g' \
${WRKSRC}/src/procmime.c
diff --git a/mail/crm114/Makefile b/mail/crm114/Makefile
index 0ab6ce721528..a2fcb030b930 100644
--- a/mail/crm114/Makefile
+++ b/mail/crm114/Makefile
@@ -30,7 +30,7 @@ MAKE_ARGS= CC="${CC}" prefix="${PREFIX}" \
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-LIBS+= -L${LOCALBASE}/lib -liconv -lintl
+LIBS+= -L${LOCALBASE}/lib ${ICONV_LIB} -lintl
CFLAGS+= -DVERSION='\"${PORTVERSION}-${CRM114RELEASENAME}\"'
CFLAGS+= -DNO_LOGL
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 8bf40c077f15..2155925adc03 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -235,7 +235,7 @@ SEDLIST+= -e 's,XX_TCP_WRAPPERS_LIBS_XX,,'
.if ${PORT_OPTIONS:MICONV}
USES= iconv
-SEDLIST+= -e 's,XX_ICONV_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib -liconv,' \
+SEDLIST+= -e 's,XX_ICONV_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib ${ICONV_LIB},' \
-e 's,^\# (HAVE_ICONV=),\1,'
.else
SEDLIST+= -e 's,XX_ICONV_LIBS_XX,,'
diff --git a/mail/libpst/Makefile b/mail/libpst/Makefile
index 96e3be9a7578..0f6987a4180b 100644
--- a/mail/libpst/Makefile
+++ b/mail/libpst/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS= gsf-1:${PORTSDIR}/devel/libgsf
GNU_CONFIGURE= yes
USES= iconv pathfix gmake pkgconfig
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
CONFIGURE_ARGS+= --disable-python --enable-libpst-shared
USE_LDCONFIG= yes
diff --git a/mail/mmr/Makefile b/mail/mmr/Makefile
index 5f5277786ee4..a4af9cf101f8 100644
--- a/mail/mmr/Makefile
+++ b/mail/mmr/Makefile
@@ -29,7 +29,7 @@ CXXFLAGS+= -DTHREADMAIL \
-DMAILPATH=\"/var/mail\" \
-DMAILER=\"/usr/sbin/sendmail\ -t\" \
-I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv -lcurses -lmd
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} -lcurses -lmd
post-patch:
@${REINPLACE_CMD} -e 's|md5/libmd5.a||g' ${WRKSRC}/Makefile
diff --git a/mail/normalizemime/Makefile b/mail/normalizemime/Makefile
index 03b8665fcfc7..5e9e3246e997 100644
--- a/mail/normalizemime/Makefile
+++ b/mail/normalizemime/Makefile
@@ -22,7 +22,7 @@ USES= iconv
NO_WRKSUBDIR= yes
CXXFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
PLIST_FILES= bin/${DISTNAME:R}
diff --git a/mail/sylpheed/Makefile b/mail/sylpheed/Makefile
index 35a4b31461f8..b8dcc833e9b6 100644
--- a/mail/sylpheed/Makefile
+++ b/mail/sylpheed/Makefile
@@ -101,7 +101,7 @@ MAKEFILES= Makefile.in ac/Makefile.in faq/Makefile.in faq/de/Makefile.in \
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS:S/"//g}|g; \
- s|-lresolv||g; s|-lpisock\"|-liconv &|g;' \
+ s|-lresolv||g; s|-lpisock\"|${ICONV_LIB} &|g;' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc|${LOCALBASE}&|g' \
${WRKSRC}/libsylph/procmime.c
diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile
index 6c2a100ff18d..db6abcd290e1 100644
--- a/multimedia/libxine/Makefile
+++ b/multimedia/libxine/Makefile
@@ -241,7 +241,7 @@ pre-configure:
s|THREAD_CFLAGS=".*"|THREAD_CFLAGS="\$$THREAD_CFLAGS"|g ; \
s|-L/usr/local/lib||g ; \
s|-I/usr/local/include||g ; \
- s|-lgiconv|-liconv|g ; \
+ s|-lgiconv|${ICONV_LIB}|g ; \
s|-funroll-loops||g ; \
s|LIBFFMPEG_CFLAGS|LIBFFMPEG_CPPFLAGS|g ; \
s|echo aout|echo elf|g' ${WRKSRC}/configure
diff --git a/multimedia/mkclean/Makefile b/multimedia/mkclean/Makefile
index 053c049efbc5..dbb0245d99c1 100644
--- a/multimedia/mkclean/Makefile
+++ b/multimedia/mkclean/Makefile
@@ -16,7 +16,7 @@ HAS_CONFIGURE= yes
USES= iconv gmake
CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
MAKE_ENV+= "LFLAGS=${LDFLAGS}"
MAKEFILE= GNUmakefile
diff --git a/multimedia/mkvalidator/Makefile b/multimedia/mkvalidator/Makefile
index 2b5fec858190..546b4e2c7a48 100644
--- a/multimedia/mkvalidator/Makefile
+++ b/multimedia/mkvalidator/Makefile
@@ -16,7 +16,7 @@ HAS_CONFIGURE= yes
USES= iconv gmake
CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
MAKE_ENV+= "LFLAGS=${LDFLAGS}"
MAKEFILE= GNUmakefile
diff --git a/multimedia/vdr/Makefile b/multimedia/vdr/Makefile
index 8f4ac0afadbc..0793d32e3cf6 100644
--- a/multimedia/vdr/Makefile
+++ b/multimedia/vdr/Makefile
@@ -78,7 +78,8 @@ ALL_TARGET= vdr plugins
post-patch:
# clang doesn't know -MG:
- @${REINPLACE_CMD} '/^MAKEDEP.*-MM/s/-MG[[:space:]]*$$/# -MG/' \
+ @${REINPLACE_CMD} -e '/^MAKEDEP.*-MM/s/-MG[[:space:]]*$$/# -MG/' \
+ -e '/^LIBS/s/-liconv/${ICONVLIB}/' \
${WRKSRC}/Makefile ${WRKSRC}/libsi/Makefile \
${WRKSRC}/PLUGINS/src/*/Makefile
@[ ! -f ${WRKSRC}/s2apiwrapper.c ] || \
diff --git a/multimedia/w_scan/Makefile b/multimedia/w_scan/Makefile
index 5daada3d02ed..bc0e13cb64af 100644
--- a/multimedia/w_scan/Makefile
+++ b/multimedia/w_scan/Makefile
@@ -25,7 +25,7 @@ GNU_CONFIGURE= yes
PATCH_STRIP= -lp1
USES+= gettext
CPPFLAGS+= -I"${LOCALBASE}/include"
-LDFLAGS+= -L"${LOCALBASE}/lib\ -liconv"
+LDFLAGS+= -L"${LOCALBASE}/lib\ ${ICONV_LIB}"
PORTDOCS= COPYING ChangeLog README
PLIST_FILES= bin/${PORTNAME}
MAN1= w_scan.1
diff --git a/net-im/imspector/Makefile b/net-im/imspector/Makefile
index b38fc17dff81..f29ffec506c8 100644
--- a/net-im/imspector/Makefile
+++ b/net-im/imspector/Makefile
@@ -43,6 +43,8 @@ post-patch:
${WRKSRC}/main.cpp
@${REINPLACE_CMD} -e 's,= SSLv23_method(),= (SSL_METHOD *) SSLv23_method(),g' \
${WRKSRC}/sslstate.cpp
+ @${REINPLACE_CMD} -e 's,%%ICONV_LIB%%,${ICONV_LIB},' \
+ ${WRKSRC}/Makefile
post-install:
.for f in ${CONFIG_FILES}
diff --git a/net-im/imspector/files/patch-Makefile b/net-im/imspector/files/patch-Makefile
index 729124b9212d..ebeed6bda015 100644
--- a/net-im/imspector/files/patch-Makefile
+++ b/net-im/imspector/files/patch-Makefile
@@ -42,7 +42,7 @@
$(CXX) msnprotocolplugin.o libimspector.so $(PLUGIN_FLAGS)
icqprotocolplugin.so: icqprotocolplugin.o libimspector.so
- $(CXX) icqprotocolplugin.o libimspector.so $(PLUGIN_FLAGS)
-+ $(CXX) icqprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) -liconv -L${LOCALBASE}/lib
++ $(CXX) icqprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) %%ICONV_LIB%% -L${LOCALBASE}/lib
yahooprotocolplugin.so: yahooprotocolplugin.o libimspector.so
$(CXX) yahooprotocolplugin.o libimspector.so $(PLUGIN_FLAGS)
ircprotocolplugin.so: ircprotocolplugin.o libimspector.so
diff --git a/net-im/libpurple/Makefile b/net-im/libpurple/Makefile
index f489d61dc8e0..d52f08913b69 100644
--- a/net-im/libpurple/Makefile
+++ b/net-im/libpurple/Makefile
@@ -311,7 +311,7 @@ post-patch:
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-e 's|-lpanel |-lpanel -lncurses|g' \
-e 's|-lpthread|${PTHREAD_LIBS:S/"//g}|g' \
- -e 's|-lsilc -lsilcclient ${PTHREAD_LIBS} $$LIBDL|-lsilc -lsilcclient ${PTHREAD_LIBS} -liconv|' \
+ -e 's|-lsilc -lsilcclient ${PTHREAD_LIBS} $$LIBDL|-lsilc -lsilcclient ${PTHREAD_LIBS} ${ICONV_LIB}|' \
-e 's|TCL_VERSION found but 8.3 required|TCL_VERSION found but ${TCLTK_VER} required|g' \
-e 's|TCL_MINOR_VERSION" -ne 3|TCL_MINOR_VERSION" -ne ${TCLTK_VER:E}|' \
${WRKSRC}/configure
diff --git a/net-im/licq/Makefile b/net-im/licq/Makefile
index 91463b191f0b..8cfca054ac55 100644
--- a/net-im/licq/Makefile
+++ b/net-im/licq/Makefile
@@ -19,7 +19,7 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
LICQ_PORT?= net-im/licq
# workaround for installed autoconf/automake
-LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib -liconv -Wl,--export-dynamic
+LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib ${ICONV_LIB} -Wl,--export-dynamic
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -Wl,--export-dynamic
diff --git a/net-im/ysm/Makefile b/net-im/ysm/Makefile
index 838a50832095..65a78d0534b2 100644
--- a/net-im/ysm/Makefile
+++ b/net-im/ysm/Makefile
@@ -17,7 +17,7 @@ USES= iconv gmake
USE_BZIP2= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
MAN1= ysm.1
PLIST_FILES= bin/ysm
diff --git a/net/afpfs-ng/Makefile b/net/afpfs-ng/Makefile
index c4889d2709cf..ecaf5fc57217 100644
--- a/net/afpfs-ng/Makefile
+++ b/net/afpfs-ng/Makefile
@@ -53,7 +53,7 @@ post-patch: .SILENT
${WRKSRC}/Makefile.am
post-configure: .SILENT
- ${REINPLACE_CMD} 's|LIBS = |LIBS = -liconv |' \
+ ${REINPLACE_CMD} 's|LIBS = |LIBS = ${ICONV_LIB} |' \
${WRKSRC}/cmdline/Makefile
.include <bsd.port.post.mk>
diff --git a/net/ldapdiff/Makefile b/net/ldapdiff/Makefile
index f71eac9e517e..b55a54ab2711 100644
--- a/net/ldapdiff/Makefile
+++ b/net/ldapdiff/Makefile
@@ -20,8 +20,7 @@ USES= iconv
USE_OPENLDAP= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${LOCALBASE} \
- --with-ldap-dir=${LOCALBASE} \
- --with-iconv-dir=${LOCALBASE}
+ --with-ldap-dir=${LOCALBASE}
SAMPLES= addentry.sh webtomware_without_jpeg.user.ldif \
webtomware.init.ldif webtomware.user.ldif
MAN1= ldapdiff.1
@@ -30,6 +29,12 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PORTDOCS= CHANGES ChangeLog README TODO
+.include <bsd.port.pre.mk>
+
+.if ! empty(ICONV_LIB)
+CONFIGURE_ARGS+=--with-iconv-dir=${LOCALBASE}
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ldapdiff ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MAN1PREFIX}/man/man1
@@ -46,4 +51,4 @@ do-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/xmlrpc-epi/Makefile b/net/xmlrpc-epi/Makefile
index 065df427b175..ea1e09296cf5 100644
--- a/net/xmlrpc-epi/Makefile
+++ b/net/xmlrpc-epi/Makefile
@@ -19,7 +19,7 @@ USE_BZIP2= yes
USE_GMAKE= yes
USE_LDCONFIG= yes
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
CONFIGURE_ARGS= --program-transform="s|^|xre-|"
PORTDOCS= AUTHORS ChangeLog NEWS README
diff --git a/news/pan/Makefile b/news/pan/Makefile
index a9c94d4d70a3..d7dba0093496 100644
--- a/news/pan/Makefile
+++ b/news/pan/Makefile
@@ -23,7 +23,7 @@ USES= pathfix gettext pkgconfig
USE_GNOME= intlhack
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lgnuregex -liconv
+LDFLAGS+= -L${LOCALBASE}/lib -lgnuregex ${ICONV_LIB}
OPTIONS_DEFINE= GTKSPELL GTK3
OPTIONS_DEFAULT=GTKSPELL
diff --git a/print/gv/Makefile b/print/gv/Makefile
index 7d16e9173392..0984de354e19 100644
--- a/print/gv/Makefile
+++ b/print/gv/Makefile
@@ -20,7 +20,7 @@ USE_PERL5_BUILD= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV += LDFLAGS="${LDFLAGS}" LIBS="-liconv"
+CONFIGURE_ENV += LDFLAGS="${LDFLAGS}" LIBS="${ICONV_LIB}"
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/X11 \
--enable-setenv-code \
--enable-SIGCHLD-fallback
diff --git a/print/pdftk/Makefile b/print/pdftk/Makefile
index 9107868669e8..0c261c7d24e8 100644
--- a/print/pdftk/Makefile
+++ b/print/pdftk/Makefile
@@ -52,7 +52,7 @@ post-patch:
#
@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" ${WRKSRC}/${MAKEFILE}
- @${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -liconv -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
+ @${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} ${ICONV_LIB} -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
${WRKSRC}/${MAKEFILE}
do-install:
diff --git a/print/py-cups/Makefile b/print/py-cups/Makefile
index 9bc34e4975f6..68fa92a89d4b 100644
--- a/print/py-cups/Makefile
+++ b/print/py-cups/Makefile
@@ -23,11 +23,16 @@ USE_PYTHON= -2.7
PLIST_FILES= %%PYTHON_SITELIBDIR%%/cups.so
PYDISTUTILS_EGGINFO= py${PORTNAME}-${PORTVERSION}-py${PYTHON_VER}.egg-info
+.include <bsd.port.pre.mk>
+
post-patch:
@${REINPLACE_CMD} -e 's|^\(VERSION=\).*$$|\1${PORTVERSION}|' ${WRKSRC}/Makefile
+.if empty(ICONV_LIB)
+ @${REINPLACE_CMD} -e 's| or sys.platform.startswith("freebsd"):|:|' ${WRKSRC}/setup.py
+.endif
pre-configure:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cupsconnection.c
@${REINPLACE_CMD} -e 's|#ifdef __SVR4|#ifdef __FreeBSD__|' ${WRKSRC}/cupsppd.c
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/security/scanhill/Makefile b/security/scanhill/Makefile
index 6f7b907c3d8d..a6165ce53073 100644
--- a/security/scanhill/Makefile
+++ b/security/scanhill/Makefile
@@ -26,6 +26,9 @@ CONFIGURE_ARGS+= --enable-mysql
USE_MYSQL= yes
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/configure
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/scanhill ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/scanhill.conf ${PREFIX}/etc/scanhill.conf-dist
diff --git a/security/tpm-tools/Makefile b/security/tpm-tools/Makefile
index ccade06f9a6d..ccca71147c5b 100644
--- a/security/tpm-tools/Makefile
+++ b/security/tpm-tools/Makefile
@@ -24,7 +24,7 @@ USES= gettext gmake iconv
USE_LDCONFIG= YES
USE_AUTOTOOLS= autoconf
GNU_CONFIGURE= YES
-LDFLAGS+= -L${LOCALBASE}/lib -lintl -liconv
+LDFLAGS+= -L${LOCALBASE}/lib -lintl ${ICONV_LIB}
MAN1= tpm_sealdata.1 tpm_version.1 \
tpmtoken_import.1 tpmtoken_init.1 tpmtoken_objects.1 \
diff --git a/security/trousers/Makefile b/security/trousers/Makefile
index 914177082ceb..6d49b4ed8a08 100644
--- a/security/trousers/Makefile
+++ b/security/trousers/Makefile
@@ -55,6 +55,10 @@ PLIST_SUB+= TDDL=""
CONFIGURE_ARGS+=--enable-debug
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's/-liconv$$/${ICONV_LIB}/' \
+ ${WRKSRC}/src/tspi/Makefile.am
+
run-autotools: run-autotools-autoreconf
run-autotools-autoreconf:
diff --git a/sysutils/fusefs-chironfs/Makefile b/sysutils/fusefs-chironfs/Makefile
index d7d0411c71d7..65d168dde891 100644
--- a/sysutils/fusefs-chironfs/Makefile
+++ b/sysutils/fusefs-chironfs/Makefile
@@ -24,5 +24,6 @@ post-patch:
.if defined(NOPORTDOCS)
@${REINPLACE_CMD} -e 's, doc , ,' ${WRKSRC}/Makefile.in
.endif
+ @${REINPLACE_CMD} -e 's,-liconv,${ICONV_LIB},' ${WRKSRC}/src/Makefile.*
.include <bsd.port.mk>
diff --git a/sysutils/fusefs-gunzip/Makefile b/sysutils/fusefs-gunzip/Makefile
index e4c28789e902..6af189ee7401 100644
--- a/sysutils/fusefs-gunzip/Makefile
+++ b/sysutils/fusefs-gunzip/Makefile
@@ -21,7 +21,7 @@ do-build:
${CC} ${CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/fuse \
-D_FILE_OFFSET_BITS=64 \
-o fuse.gunzip fuse.gunzip.c -L${LOCALBASE}/lib \
- -lulockmgr -lz -lfuse -liconv -lm)
+ -lulockmgr -lz -lfuse ${ICONV_LIB} -lm)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/fuse.gunzip ${PREFIX}/bin
diff --git a/sysutils/libcdio/Makefile b/sysutils/libcdio/Makefile
index ff405aa34257..d280eb2b6ae9 100644
--- a/sysutils/libcdio/Makefile
+++ b/sysutils/libcdio/Makefile
@@ -24,7 +24,7 @@ USE_LDCONFIG= yes
CONFIGURE_ARGS+=--with-libiconv-prefix=${LOCALBASE}
USE_PERL5_BUILD=yes
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
MAN1= cd-drive.1 cd-info.1 iso-read.1 iso-info.1 cd-read.1
INFO= libcdio
diff --git a/sysutils/mapchan/Makefile b/sysutils/mapchan/Makefile
index e389b0e4278b..670ce59c1600 100644
--- a/sysutils/mapchan/Makefile
+++ b/sysutils/mapchan/Makefile
@@ -14,7 +14,7 @@ USES= iconv
WRKSRC= ${WRKDIR}/${PORTNAME}
MAKE_ENV= MAPDIR=${PREFIX}/etc/${PORTNAME}
CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
ETCDAT= *.map default.sample
MAN8= mapchan.8
PORTDOCS= README
diff --git a/textproc/exempi/Makefile b/textproc/exempi/Makefile
index bd59fb72e744..f09b40d80c4e 100644
--- a/textproc/exempi/Makefile
+++ b/textproc/exempi/Makefile
@@ -19,7 +19,7 @@ LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
USE_AUTOTOOLS= libtool
USE_GNOME= ltverhack
CONFIGURE_ARGS= --enable-unittest=no
-CONFIGURE_ENV= LIBS="-liconv"
+CONFIGURE_ENV= LIBS="${ICONV_LIB}"
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USES= pathfix iconv
diff --git a/textproc/freexl/Makefile b/textproc/freexl/Makefile
index ce0f9caeb6cc..69a69f427a73 100644
--- a/textproc/freexl/Makefile
+++ b/textproc/freexl/Makefile
@@ -14,7 +14,7 @@ USE_GMAKE= yes
USES= iconv
CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
CONFIGURE_ARGS+=CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
USE_LDCONFIG= yes
diff --git a/textproc/kmflcomp/Makefile b/textproc/kmflcomp/Makefile
index 05a2b066fd5f..1f4333848432 100644
--- a/textproc/kmflcomp/Makefile
+++ b/textproc/kmflcomp/Makefile
@@ -26,7 +26,7 @@ USE_LDCONFIG= yes
USES= iconv
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
DOCSDIR= ${PREFIX}/share/doc/kmfl/${PORTNAME}
DOCS= ${DISTDIR}/${DIST_SUBDIR}/KMFL-Compiler.sxw \
diff --git a/textproc/odt2txt/Makefile b/textproc/odt2txt/Makefile
index f18dac99c4d1..76d4a54bce1c 100644
--- a/textproc/odt2txt/Makefile
+++ b/textproc/odt2txt/Makefile
@@ -27,7 +27,8 @@ PLIST_FILES= bin/odt2txt
MAN1= odt2txt.1
post-patch:
- ${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \
+ -e 's#-liconv#${ICONV_LIB}#' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/odt2txt ${PREFIX}/bin/odt2txt
diff --git a/textproc/p5-XML-Sablotron/Makefile b/textproc/p5-XML-Sablotron/Makefile
index d1bd82194987..12cc3efd4b90 100644
--- a/textproc/p5-XML-Sablotron/Makefile
+++ b/textproc/p5-XML-Sablotron/Makefile
@@ -14,7 +14,7 @@ LIB_DEPENDS= sablot.70:${PORTSDIR}/textproc/sablotron
USES= iconv perl5
USE_PERL5= configure
-CONFIGURE_ARGS= LIBS='-L${LOCALBASE}/lib -lexpat -lsablot -liconv' \
+CONFIGURE_ARGS= LIBS='-L${LOCALBASE}/lib -lexpat -lsablot ${ICONV_LIB}' \
INC='-I${LOCALBASE}/include' \
EXPATLIBPATH='${LOCALBASE}/lib' \
EXPATINCPATH='${LOCALBASE}/include' \
diff --git a/textproc/sablotron/Makefile b/textproc/sablotron/Makefile
index d9f18ff23d11..5b6547506e99 100644
--- a/textproc/sablotron/Makefile
+++ b/textproc/sablotron/Makefile
@@ -36,7 +36,7 @@ PLIST_SUB+= SHLIB_MAJOR="${SHLIB_MAJOR}"
CONFIGURE_ENV= LIBTOOL=${LIBTOOL}
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lexpat -liconv
+LDFLAGS+= -L${LOCALBASE}/lib -lexpat ${ICONV_LIB}
USE_AUTOTOOLS= libtool
USE_GMAKE= yes
USES= iconv perl5
diff --git a/textproc/unrtf/Makefile b/textproc/unrtf/Makefile
index 14ea76f3d00f..09f202b05782 100644
--- a/textproc/unrtf/Makefile
+++ b/textproc/unrtf/Makefile
@@ -27,7 +27,7 @@ PLIST_FILES= bin/unrtf \
PLIST_DIRS= %%DATADIR%%
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
post-patch:
@${FIND} -X ${WRKSRC} -type f -and -name "*.[1h]" | ${XARGS} \
diff --git a/textproc/xalan-c/Makefile b/textproc/xalan-c/Makefile
index b821a6c57d1b..e058846cde89 100644
--- a/textproc/xalan-c/Makefile
+++ b/textproc/xalan-c/Makefile
@@ -89,7 +89,7 @@ MAKE_ENV+= ICUROOT=${ICUROOT}
PLIST_SUB+= ICUDEP=""
.else
USES+= iconv
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
PLIST_SUB+= ICUDEP="@comment "
.endif
diff --git a/textproc/xerces-c2/Makefile b/textproc/xerces-c2/Makefile
index 85080c1b2801..11d9f46468ba 100644
--- a/textproc/xerces-c2/Makefile
+++ b/textproc/xerces-c2/Makefile
@@ -115,6 +115,7 @@ post-patch:
@${REINPLACE_CMD} -e 's#CP = -cp -p#CP = -cp#' \
${WRKSRC}/src/xercesc/Makefile.incl
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
+ -e 's|-liconv|${ICONV_LIB}|' \
${WRKSRC}/src/xercesc/Makefile.incl \
${WRKSRC}/src/xercesc/runConfigure
@${SED} -i '' 's| /\* argV\[\] \*/|* argV|' \
diff --git a/textproc/xmlppm/Makefile b/textproc/xmlppm/Makefile
index 64fa5c3f8115..a27694bbb0cc 100644
--- a/textproc/xmlppm/Makefile
+++ b/textproc/xmlppm/Makefile
@@ -22,7 +22,7 @@ USES= iconv
USE_GMAKE= yes
MAKE_ARGS= CC="${CXX}" CFLAGS="${CXXFLAGS}" \
CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib -lexpat -liconv"
+ LDFLAGS="-L${LOCALBASE}/lib -lexpat ${ICONV_LIB}"
GNU_CONFIGURE= yes
.if !defined(NOPORTDOCS)
diff --git a/www/sarg/Makefile b/www/sarg/Makefile
index 7813ef2e3815..0e0dbc591c8a 100644
--- a/www/sarg/Makefile
+++ b/www/sarg/Makefile
@@ -72,7 +72,7 @@ CONFIGURE_ARGS+=--without-ldap
.if ${PORT_OPTIONS:MICONV}
CONFIGURE_ARGS+=--with-iconv
USES+= iconv
-EXTRA_LDFLAGS+= -liconv
+EXTRA_LDFLAGS+= ${ICONV_LIB}
.else
CONFIGURE_ARGS+=--without-iconv
.endif
diff --git a/www/snownews/Makefile b/www/snownews/Makefile
index 4781ecd632fd..73262f3e16cf 100644
--- a/www/snownews/Makefile
+++ b/www/snownews/Makefile
@@ -11,7 +11,7 @@ MAINTAINER= clsung@FreeBSD.org
COMMENT= A text mode RSS newsreader
USE_PERL5_BUILD=yes
-USE_GMAKE= yes
+USES= gmake iconv
USE_GNOME= libxml2
HAS_CONFIGURE= yes
@@ -44,6 +44,7 @@ MANLANG= "" de nl fr it ru_RU.KOI8-R
post-patch:
@${REINPLACE_CMD} -e 's|#!/usr/local/bin/perl|#!${PERL}|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|ncurses|ncursesw|g' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|-liconv|${ICONV_LIB}|' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|make|${GMAKE}|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/Makefile
diff --git a/www/webalizer/Makefile b/www/webalizer/Makefile
index af4179c89ae5..12be06a1504e 100644
--- a/www/webalizer/Makefile
+++ b/www/webalizer/Makefile
@@ -129,7 +129,7 @@ USES+= iconv
# see http://tyche.pu-toyama.ac.jp/~a-urasim/webalizer/
EXTRA_PATCHES+= ${FILESDIR}/webalizer-a-urasim_2.patch
CONFIGURE_ARGS+= --enable-mininls
-CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -liconv"
+CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
CFLAGS+= -I${LOCALBASE}/include
.endif
diff --git a/x11-fm/nautilus/Makefile b/x11-fm/nautilus/Makefile
index f597632372bd..43de40129ebc 100644
--- a/x11-fm/nautilus/Makefile
+++ b/x11-fm/nautilus/Makefile
@@ -26,7 +26,7 @@ USE_GNOME= gnomeprefix gnomehack intlhack gnomedesktop \
librsvg2 ltverhack gvfs ltasneededhack
USE_LDCONFIG= yes
USE_AUTOTOOLS= libtool
-CONFIGURE_ENV= LIBS="${PTHREAD_LIBS} -L${LOCALBASE}/lib -liconv" \
+CONFIGURE_ENV= LIBS="${PTHREAD_LIBS} -L${LOCALBASE}/lib ${ICONV_LIB}" \
LIBPNG="-L${LOCALBASE}/lib -lpng -lz"
CPPFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= --enable-static --disable-packagekit
diff --git a/x11-toolkits/open-motif/Makefile b/x11-toolkits/open-motif/Makefile
index 7e8cfec373a2..aa5588ae0de8 100644
--- a/x11-toolkits/open-motif/Makefile
+++ b/x11-toolkits/open-motif/Makefile
@@ -30,7 +30,6 @@ GNU_CONFIGURE= yes
USE_LDCONFIG= yes
MAKE_ENV= LANG=C
CPPFLAGS+= -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI -I${PREFIX}/include
-LDFLAGS+= -L${PREFIX}/lib -liconv
USE_CSTD= gnu89
DEMOS_SRC= ${WRKSRC}/demos/programs
diff --git a/x11-toolkits/wxgtk26/Makefile b/x11-toolkits/wxgtk26/Makefile
index 1dc28cc892ef..88a50654e667 100644
--- a/x11-toolkits/wxgtk26/Makefile
+++ b/x11-toolkits/wxgtk26/Makefile
@@ -38,7 +38,7 @@ CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"\
X11BASE="${LOCALBASE}"
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
NO_LATEST_LINK= yes
PLIST= ${.CURDIR}/pkg-plist
diff --git a/x11-wm/awesome2/Makefile b/x11-wm/awesome2/Makefile
index 7977ab49fce5..1a665be8bd15 100644
--- a/x11-wm/awesome2/Makefile
+++ b/x11-wm/awesome2/Makefile
@@ -49,7 +49,7 @@ post-patch:
. endfor
post-configure:
- @${REINPLACE_CMD} -E '/^awesome2_(message_)?LDADD/s/$$/ -liconv/g; \
+ @${REINPLACE_CMD} -E '/^awesome2_(message_)?LDADD/s/$$/ ${ICONV_LIB}/g; \
/^doc_DATA/s/=.*$$/=/g' \
${WRKSRC}/Makefile
diff --git a/x11-wm/fluxbox/Makefile b/x11-wm/fluxbox/Makefile
index be557abdca42..0800957993ca 100644
--- a/x11-wm/fluxbox/Makefile
+++ b/x11-wm/fluxbox/Makefile
@@ -79,7 +79,7 @@ CONFIGURE_ARGS+= --enable-xinerama
.if ${PORT_OPTIONS:MNLS}
USES+= iconv
-CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib -liconv"
+CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"
CPPFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS+= --enable-nls
PLIST_SUB+= NLS=""
diff --git a/x11-wm/i3/Makefile b/x11-wm/i3/Makefile
index 3d55ecaf3a1a..31cc8f0d7520 100644
--- a/x11-wm/i3/Makefile
+++ b/x11-wm/i3/Makefile
@@ -70,6 +70,7 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/man/i3-input.1
@${REINPLACE_CMD} -e 's|.SILENT||g' ${WRKSRC}/common.mk
@${REINPLACE_CMD} -e 's|-Iinclude|-Iinclude -Isrc|g' \
+ -e 's|-liconv|${ICONV_LIB}|' \
-e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/common.mk
do-install:
diff --git a/x11-wm/pekwm/Makefile b/x11-wm/pekwm/Makefile
index cb6ae79a5e19..d70d3012ed2e 100644
--- a/x11-wm/pekwm/Makefile
+++ b/x11-wm/pekwm/Makefile
@@ -23,7 +23,7 @@ CONFIGURE_ARGS+=--enable-shape --enable-xinerama --enable-xrandr \
--enable-image-png --disable-debug \
--disable-pedantic
CFLAGS+= -DICONV_CONST -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
MAN1= pekwm.1
MANCOMPRESSED= no
diff --git a/x11-wm/wmii/Makefile b/x11-wm/wmii/Makefile
index e0936a506139..19200ce7e400 100644
--- a/x11-wm/wmii/Makefile
+++ b/x11-wm/wmii/Makefile
@@ -32,7 +32,7 @@ SLIM_LAYOUT_BOX_DESC= Build with slim layout boxes
.if ${PORT_OPTIONS:MUTF8}
USES+= iconv
-MAKE_ARGS+= LIBICONV="-liconv"
+MAKE_ARGS+= LIBICONV="${ICONV_LIB}"
.else
MAKE_ARGS+= -DNO_UTF8
.endif
diff --git a/x11/gdkxft/Makefile b/x11/gdkxft/Makefile
index 8cb9312c9a23..11cb467178a6 100644
--- a/x11/gdkxft/Makefile
+++ b/x11/gdkxft/Makefile
@@ -16,7 +16,7 @@ USE_AUTOTOOLS= libtool
USE_GNOME= gtk12
USES= iconv
GNU_CONFIGURE= yes
-LDFLAGS+= -L${LOCALBASE}/lib -lgnuregex -liconv
+LDFLAGS+= -L${LOCALBASE}/lib -lgnuregex ${ICONV_LIB}
CFLAGS+= `pkg-config xft --cflags`
CONFIGURE_ARGS= --sbindir=${PREFIX}/bin \
--without-gnome
diff --git a/x11/i3lock/Makefile b/x11/i3lock/Makefile
index ddd52e093fac..98befb00c269 100644
--- a/x11/i3lock/Makefile
+++ b/x11/i3lock/Makefile
@@ -27,7 +27,7 @@ PLIST_FILES= bin/i3lock \
MAN1= i3lock.1
-LDFLAGS+= -liconv
+LDFLAGS+= ${ICONV_LIB}
USE_XORG= x11 xcb xt xproto xext
USE_BZIP2= yes
USE_GMAKE= yes