summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2013-09-04 18:06:07 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2013-09-04 18:06:07 +0000
commit642be1b81d8342d3a3323f43bcf5a0bd87a5d363 (patch)
treef71b3671c7729b9cbc9368cea2f2fede7b20d5c8 /Mk
parentDancer plugin which provides an easy way implement ExtDirect APIs. (diff)
- 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)
Notes
Notes: svn path=/head/; revision=326307
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/iconv.mk16
-rw-r--r--Mk/bsd.gnome.mk2
2 files changed, 15 insertions, 3 deletions
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