aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/iconv.mk16
1 files changed, 14 insertions, 2 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