mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-09 06:51:44 +00:00
fe837ee6c6
- Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine)
49 lines
1.1 KiB
Makefile
49 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# handle dependency on the iconv port
|
|
#
|
|
# Feature: iconv
|
|
# Usage: USES=iconv or USES=iconv:ARGS
|
|
# Valid ARGS: lib (default, implicit), build, patch,
|
|
# wchar_t (port uses "WCHAR_T" extension),
|
|
# translit (port uses "//TRANSLIT" extension)
|
|
#
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
.if !defined(_INCLUDE_USES_ICONV_MK)
|
|
_INCLUDE_USES_ICONV_MK= yes
|
|
|
|
.if !exists(/usr/include/iconv.h) || ${iconv_ARGS:Mwchar_t} || ${iconv_ARGS:Mtranslit}
|
|
|
|
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:Mbuild}
|
|
BUILD_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
|
|
.elif ${iconv_ARGS:Mpatch}
|
|
PATCH_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
|
|
.else
|
|
LIB_DEPENDS+= libiconv.so.3:${PORTSDIR}/converters/libiconv
|
|
.endif
|
|
|
|
.else
|
|
|
|
ICONV_CMD= /usr/bin/iconv
|
|
ICONV_LIB=
|
|
ICONV_PREFIX= /usr
|
|
ICONV_CONFIGURE_ARG=
|
|
ICONV_CONFIGURE_BASE=
|
|
|
|
.if exists(${LOCALBASE}/include/iconv.h)
|
|
CPPFLAGS+= -DLIBICONV_PLUG
|
|
CFLAGS+= -DLIBICONV_PLUG
|
|
CXXFLAGS+= -DLIBICONV_PLUG
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|