freebsd-dev/lib/libiconv_modules/Makefile.inc
Kyle Evans 2300a22c97 libc: iconv: add mb_cur_min for encoder traits
A future commit will actually implement //IGNORE so that applications
using base iconv can, e.g., sanitize UTF-8 strings.  To do this, the
iconv_std module needs to be able to determine the minimum width for any
given encoding so that it can skip that many bytes in the input buffer.
This is mainly an issue for UTF-16 and UTF-32.

This commit bumps shlib versions to 5 for libiconv modules to reflect
the ABI change.  It also fixes OptionalObsoleteFiles to remove the
libiconv modules if WITHOUT_ICONV is in use.

re: _ENCODING_MB_CUR_MIN, note that this file (citrus_stdenc_template.h)
is included at the bottom of an encoding *implementation*, so the
implementation is free to #define it prior.  UTF1632 is a good example,
as it redefines the minimum to be a property on the encodinginfo, and
the minimum is set to 2 or 4 bytes for UTF-16 and UTF-32 respectively.

Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34344
2022-08-11 11:42:17 -05:00

17 lines
247 B
Makefile

# $FreeBSD$
.PATH: ${SRCTOP}/lib/libc/iconv
SHLIB_MAJOR= 5
CFLAGS+= -I${SRCTOP}/lib/libc/iconv
CFLAGS+= -Dbool=_Bool
.if !defined(COMPAT_32BIT)
SHLIBDIR= /usr/lib/i18n
.else
SHLIBDIR= /usr/lib32/i18n
.endif
LIBDIR= ${SHLIBDIR}
MK_PROFILE= no