mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
7046a55fd8
pre 100043 is ${LOCALBASE} and /usr otherwise. Convert all ports to new variable usage. Approved by: portmgr (bapt, implicit)
46 lines
972 B
Makefile
46 lines
972 B
Makefile
# $FreeBSD$
|
|
#
|
|
# handle dependency on the iconv port
|
|
#
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
#
|
|
# Feature: iconv
|
|
# Usage: USES=iconv or USES=iconv:ARGS
|
|
# Valid ARGS: lib (default, implicit), build, patch
|
|
#
|
|
#
|
|
.if !defined(_INCLUDE_USES_ICONV_MK)
|
|
_INCLUDE_USES_ICONV_MK= yes
|
|
|
|
.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_PREFIX= ${LOCALBASE}
|
|
ICONV_CONFIGURE_ARG= --with-libiconv-prefix=${LOCALBASE}
|
|
ICONV_CONFIGURE_BASE= --with-libiconv=${LOCALBASE}
|
|
|
|
.if ${iconv_ARGS} == "lib"
|
|
LIB_DEPENDS+= libiconv.so.3:${PORTSDIR}/converters/libiconv
|
|
.elif ${iconv_ARGS} == "build"
|
|
BUILD_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
|
|
.elif ${iconv_ARGS} == "patch"
|
|
PATCH_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
|
|
.endif
|
|
|
|
.else
|
|
|
|
ICONV_CMD= /usr/bin/iconv
|
|
ICONV_LIB=
|
|
ICONV_PREFIX= /usr
|
|
ICONV_CONFIGURE_ARG=
|
|
ICONV_CONFIGURE_BASE=
|
|
|
|
.endif
|
|
|
|
.endif
|