Index: head/Mk/Uses/iconv.mk =================================================================== --- head/Mk/Uses/iconv.mk (revision 450633) +++ head/Mk/Uses/iconv.mk (revision 450634) @@ -1,69 +1,69 @@ # $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} ICONV_INCLUDE_PATH= ${LOCALBASE}/include ICONV_LIB_PATH= ${LOCALBASE}/lib/libiconv.so .if ${iconv_ARGS:Mbuild} BUILD_DEPENDS+= ${ICONV_CMD}:converters/libiconv .elif ${iconv_ARGS:Mpatch} PATCH_DEPENDS+= ${ICONV_CMD}:converters/libiconv .else LIB_DEPENDS+= libiconv.so:converters/libiconv .endif .else ICONV_CMD= /usr/bin/iconv ICONV_LIB= ICONV_PREFIX= /usr ICONV_CONFIGURE_ARG= ICONV_CONFIGURE_BASE= ICONV_INCLUDE_PATH= /usr/include ICONV_LIB_PATH= /usr/lib/libc.so .if exists(${LOCALBASE}/include/iconv.h) # Check that libiconv iconv.h is recent enough for LIBICONV_PLUG to work. -BUILD_DEPENDS+= libiconv>=1.14_9:converters/libiconv +BUILD_DEPENDS+= libiconv>=1.14_11:converters/libiconv .endif # LIBICONV_PLUG makes libiconv iconv.h act like libc iconv.h. CPPFLAGS+= -DLIBICONV_PLUG CFLAGS+= -DLIBICONV_PLUG CXXFLAGS+= -DLIBICONV_PLUG OBJCFLAGS+= -DLIBICONV_PLUG .endif # These are the most common names for the iconv-related variables found in # CMake-based ports. We set them here via CMAKE_ARGS to make sure that the best # combination is always used (ie. we prefer the version in libc whenever it is # available, and sometimes have to fall back to the iconv.h header from ports # while still using the library from base). CMAKE_ARGS+= -DICONV_INCLUDE_DIR=${ICONV_INCLUDE_PATH} \ -DICONV_LIBRARIES=${ICONV_LIB_PATH} \ -DICONV_LIBRARY=${ICONV_LIB_PATH} \ -DLIBICONV_INCLUDE_DIR=${ICONV_INCLUDE_PATH} \ -DLIBICONV_LIBRARIES=${ICONV_LIB_PATH} \ -DLIBICONV_LIBRARY=${ICONV_LIB_PATH} .endif Index: head/converters/libiconv/Makefile =================================================================== --- head/converters/libiconv/Makefile (revision 450633) +++ head/converters/libiconv/Makefile (revision 450634) @@ -1,44 +1,44 @@ # Created by: Maxim Sobolev # $FreeBSD$ PORTNAME= libiconv PORTVERSION= 1.14 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= converters devel MASTER_SITES= GNU MAINTAINER= gnome@FreeBSD.org COMMENT= Character set conversion library LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-static \ --disable-nls \ --docdir=${DOCSDIR} \ am_cv_func_iconv=no INSTALL_TARGET= install-strip MAKE_JOBS_UNSAFE= yes USES= libtool USE_CSTD= gnu89 USE_LDCONFIG= yes OPTIONS_DEFINE= DOCS ENCODINGS PATCHES OPTIONS_DEFAULT=ENCODINGS ENCODINGS_DESC= Include extra character sets PATCHES_DESC= Apply patches to fix CP932, add EUCJP-MS ENCODINGS_CONFIGURE_ENABLE= extra-encodings PATCHES_PATCH_SITES= http://apolloron.org/software/libiconv-1.14-ja/ \ LOCAL/kwm PATCHES_PATCHFILES= ${DISTNAME}-ja-1.patch.gz:-p1 post-patch: @${REINPLACE_CMD} -e 's:ei_ksc5601:ei_euc_kr:g' ${WRKSRC}/lib/aliases.h @${REINPLACE_CMD} -e 's:gawk:awk:g' ${WRKSRC}/configure \ ${WRKSRC}/libcharset/configure \ ${WRKSRC}/preload/configure .include Index: head/converters/libiconv/files/patch-include-iconv.h.in =================================================================== --- head/converters/libiconv/files/patch-include-iconv.h.in (revision 450633) +++ head/converters/libiconv/files/patch-include-iconv.h.in (revision 450634) @@ -1,70 +1,76 @@ --- include/iconv.h.in.orig 2011-08-07 17:48:03 UTC +++ include/iconv.h.in @@ -21,8 +21,10 @@ #ifndef _LIBICONV_H #define _LIBICONV_H +#ifndef LIBICONV_PLUG #define _LIBICONV_VERSION 0x010E /* version number: (major<<8) + minor */ extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */ +#endif /* We would like to #include any system header file which could define iconv_t, 1. in order to eliminate the risk that the user gets compilation @@ -94,7 +96,6 @@ extern int iconv_close (iconv_t cd); #endif -#ifndef LIBICONV_PLUG /* Nonstandard extensions. */ @@ -127,12 +128,16 @@ typedef struct { /* Allocates descriptor for code conversion from encoding ‘fromcode’ to encoding ‘tocode’ into preallocated memory. Returns an error indicator (0 or -1 with errno set). */ +#ifndef LIBICONV_PLUG #define iconv_open_into libiconv_open_into +#endif extern int iconv_open_into (const char* tocode, const char* fromcode, iconv_allocation_t* resultp); /* Control of attributes. */ +#ifndef LIBICONV_PLUG #define iconvctl libiconvctl +#endif extern int iconvctl (iconv_t cd, int request, void* argument); /* Hook performed after every successful conversion of a Unicode character. */ -@@ -212,7 +217,9 @@ struct iconv_fallbacks { +@@ -210,9 +215,15 @@ struct iconv_fallbacks { + #define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */ + #define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */ #define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */ ++#ifdef LIBICONV_PLUG ++#define ICONV_GET_ILSEQ_INVALID 128 ++#define ICONV_SET_ILSEQ_INVALID 129 ++#endif /* Listing of locale independent encodings. */ +#ifndef LIBICONV_PLUG #define iconvlist libiconvlist +#endif extern void iconvlist (int (*do_one) (unsigned int namescount, const char * const * names, void* data), -@@ -224,6 +231,7 @@ extern const char * iconv_canonicalize ( +@@ -224,6 +235,7 @@ extern const char * iconv_canonicalize (const char * n /* Support for relocatable packages. */ +#ifndef LIBICONV_PLUG /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both -@@ -231,12 +239,12 @@ extern const char * iconv_canonicalize ( +@@ -231,12 +243,12 @@ extern const char * iconv_canonicalize (const char * n instead of "/"). */ extern void libiconv_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); +#endif #ifdef __cplusplus } #endif -#endif #endif /* _LIBICONV_H */