head 1.28; access; symbols pkgsrc-2023Q4:1.27.0.2 pkgsrc-2023Q4-base:1.27 pkgsrc-2023Q3:1.26.0.6 pkgsrc-2023Q3-base:1.26 pkgsrc-2023Q2:1.26.0.4 pkgsrc-2023Q2-base:1.26 pkgsrc-2023Q1:1.26.0.2 pkgsrc-2023Q1-base:1.26 pkgsrc-2022Q4:1.25.0.24 pkgsrc-2022Q4-base:1.25 pkgsrc-2022Q3:1.25.0.22 pkgsrc-2022Q3-base:1.25 pkgsrc-2022Q2:1.25.0.20 pkgsrc-2022Q2-base:1.25 pkgsrc-2022Q1:1.25.0.18 pkgsrc-2022Q1-base:1.25 pkgsrc-2021Q4:1.25.0.16 pkgsrc-2021Q4-base:1.25 pkgsrc-2021Q3:1.25.0.14 pkgsrc-2021Q3-base:1.25 pkgsrc-2021Q2:1.25.0.12 pkgsrc-2021Q2-base:1.25 pkgsrc-2021Q1:1.25.0.10 pkgsrc-2021Q1-base:1.25 pkgsrc-2020Q4:1.25.0.8 pkgsrc-2020Q4-base:1.25 pkgsrc-2020Q3:1.25.0.6 pkgsrc-2020Q3-base:1.25 pkgsrc-2020Q2:1.25.0.4 pkgsrc-2020Q2-base:1.25 pkgsrc-2020Q1:1.25.0.2 pkgsrc-2020Q1-base:1.25 pkgsrc-2019Q4:1.24.0.4 pkgsrc-2019Q4-base:1.24 pkgsrc-2019Q3:1.23.0.50 pkgsrc-2019Q3-base:1.23 pkgsrc-2019Q2:1.23.0.48 pkgsrc-2019Q2-base:1.23 pkgsrc-2019Q1:1.23.0.46 pkgsrc-2019Q1-base:1.23 pkgsrc-2018Q4:1.23.0.44 pkgsrc-2018Q4-base:1.23 pkgsrc-2018Q3:1.23.0.42 pkgsrc-2018Q3-base:1.23 pkgsrc-2018Q2:1.23.0.40 pkgsrc-2018Q2-base:1.23 pkgsrc-2018Q1:1.23.0.38 pkgsrc-2018Q1-base:1.23 pkgsrc-2017Q4:1.23.0.36 pkgsrc-2017Q4-base:1.23 pkgsrc-2017Q3:1.23.0.34 pkgsrc-2017Q3-base:1.23 pkgsrc-2017Q2:1.23.0.30 pkgsrc-2017Q2-base:1.23 pkgsrc-2017Q1:1.23.0.28 pkgsrc-2017Q1-base:1.23 pkgsrc-2016Q4:1.23.0.26 pkgsrc-2016Q4-base:1.23 pkgsrc-2016Q3:1.23.0.24 pkgsrc-2016Q3-base:1.23 pkgsrc-2016Q2:1.23.0.22 pkgsrc-2016Q2-base:1.23 pkgsrc-2016Q1:1.23.0.20 pkgsrc-2016Q1-base:1.23 pkgsrc-2015Q4:1.23.0.18 pkgsrc-2015Q4-base:1.23 pkgsrc-2015Q3:1.23.0.16 pkgsrc-2015Q3-base:1.23 pkgsrc-2015Q2:1.23.0.14 pkgsrc-2015Q2-base:1.23 pkgsrc-2015Q1:1.23.0.12 pkgsrc-2015Q1-base:1.23 pkgsrc-2014Q4:1.23.0.10 pkgsrc-2014Q4-base:1.23 pkgsrc-2014Q3:1.23.0.8 pkgsrc-2014Q3-base:1.23 pkgsrc-2014Q2:1.23.0.6 pkgsrc-2014Q2-base:1.23 pkgsrc-2014Q1:1.23.0.4 pkgsrc-2014Q1-base:1.23 pkgsrc-2013Q4:1.23.0.2 pkgsrc-2013Q4-base:1.23 pkgsrc-2013Q3:1.22.0.22 pkgsrc-2013Q3-base:1.22 pkgsrc-2013Q2:1.22.0.20 pkgsrc-2013Q2-base:1.22 pkgsrc-2013Q1:1.22.0.18 pkgsrc-2013Q1-base:1.22 pkgsrc-2012Q4:1.22.0.16 pkgsrc-2012Q4-base:1.22 pkgsrc-2012Q3:1.22.0.14 pkgsrc-2012Q3-base:1.22 pkgsrc-2012Q2:1.22.0.12 pkgsrc-2012Q2-base:1.22 pkgsrc-2012Q1:1.22.0.10 pkgsrc-2012Q1-base:1.22 pkgsrc-2011Q4:1.22.0.8 pkgsrc-2011Q4-base:1.22 pkgsrc-2011Q3:1.22.0.6 pkgsrc-2011Q3-base:1.22 pkgsrc-2011Q2:1.22.0.4 pkgsrc-2011Q2-base:1.22 pkgsrc-2011Q1:1.22.0.2 pkgsrc-2011Q1-base:1.22 pkgsrc-2010Q4:1.21.0.2 pkgsrc-2010Q4-base:1.21 pkgsrc-2010Q3:1.20.0.2 pkgsrc-2010Q3-base:1.20 pkgsrc-2010Q2:1.19.0.24 pkgsrc-2010Q2-base:1.19 pkgsrc-2010Q1:1.19.0.22 pkgsrc-2010Q1-base:1.19 pkgsrc-2009Q4:1.19.0.20 pkgsrc-2009Q4-base:1.19 pkgsrc-2009Q3:1.19.0.18 pkgsrc-2009Q3-base:1.19 pkgsrc-2009Q2:1.19.0.16 pkgsrc-2009Q2-base:1.19 pkgsrc-2009Q1:1.19.0.14 pkgsrc-2009Q1-base:1.19 pkgsrc-2008Q4:1.19.0.12 pkgsrc-2008Q4-base:1.19 pkgsrc-2008Q3:1.19.0.10 pkgsrc-2008Q3-base:1.19 cube-native-xorg:1.19.0.8 cube-native-xorg-base:1.19 pkgsrc-2008Q2:1.19.0.6 pkgsrc-2008Q2-base:1.19 cwrapper:1.19.0.4 pkgsrc-2008Q1:1.19.0.2 pkgsrc-2008Q1-base:1.19 pkgsrc-2007Q4:1.17.0.2 pkgsrc-2007Q4-base:1.17 pkgsrc-2007Q3:1.16.0.12 pkgsrc-2007Q3-base:1.16 pkgsrc-2007Q2:1.16.0.10 pkgsrc-2007Q2-base:1.16 pkgsrc-2007Q1:1.16.0.8 pkgsrc-2007Q1-base:1.16 pkgsrc-2006Q4:1.16.0.6 pkgsrc-2006Q4-base:1.16 pkgsrc-2006Q3:1.16.0.4 pkgsrc-2006Q3-base:1.16 pkgsrc-2006Q2:1.16.0.2 pkgsrc-2006Q2-base:1.16 pkgsrc-2006Q1:1.14.0.8 pkgsrc-2006Q1-base:1.14 pkgsrc-2005Q4:1.14.0.6 pkgsrc-2005Q4-base:1.14 pkgsrc-2005Q3:1.14.0.4 pkgsrc-2005Q3-base:1.14 pkgsrc-2005Q2:1.14.0.2 pkgsrc-2005Q2-base:1.14 pkgsrc-2005Q1:1.6.0.6 pkgsrc-2005Q1-base:1.6 pkgsrc-2004Q4:1.6.0.4 pkgsrc-2004Q4-base:1.6 pkgsrc-2004Q3:1.6.0.2 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.5.0.2 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.1.0.2 pkgsrc-2004Q1-base:1.1; locks; strict; comment @# @; 1.28 date 2024.01.13.20.07.32; author riastradh; state Exp; branches; next 1.27; commitid tXCKNfIoMbcmkkUE; 1.27 date 2023.11.14.17.51.58; author adam; state Exp; branches; next 1.26; commitid hBfG4R96HnsrvBME; 1.26 date 2023.01.23.15.22.24; author wiz; state Exp; branches; next 1.25; commitid EN1yTFg9Lop0aGaE; 1.25 date 2020.01.13.17.35.05; author rillig; state Exp; branches; next 1.24; commitid aTalmUlWjHf5rySB; 1.24 date 2019.11.03.17.14.25; author rillig; state Exp; branches; next 1.23; commitid o3OrUW7BezZ3CqJB; 1.23 date 2013.11.23.10.58.46; author obache; state Exp; branches; next 1.22; commitid XvtLm5EmwA6Mjoex; 1.22 date 2011.01.16.11.16.28; author wiz; state Exp; branches; next 1.21; 1.21 date 2010.11.10.21.00.49; author adam; state Exp; branches; next 1.20; 1.20 date 2010.08.30.02.04.58; author obache; state Exp; branches; next 1.19; 1.19 date 2008.02.27.22.10.34; author jlam; state Exp; branches; next 1.18; 1.18 date 2008.02.27.19.32.55; author jlam; state Exp; branches; next 1.17; 1.17 date 2007.11.07.17.24.28; author minskim; state Exp; branches; next 1.16; 1.16 date 2006.04.06.06.21.40; author reed; state Exp; branches; next 1.15; 1.15 date 2006.03.30.18.06.17; author jlam; state Exp; branches; next 1.14; 1.14 date 2005.06.06.01.30.56; author jlam; state Exp; branches; next 1.13; 1.13 date 2005.06.05.22.05.00; author minskim; state Exp; branches; next 1.12; 1.12 date 2005.06.05.10.00.20; author jmmv; state Exp; branches; next 1.11; 1.11 date 2005.06.05.09.25.37; author jlam; state Exp; branches; next 1.10; 1.10 date 2005.06.01.18.02.41; author jlam; state Exp; branches; next 1.9; 1.9 date 2005.05.24.04.22.24; author jlam; state Exp; branches; next 1.8; 1.8 date 2005.05.22.01.22.47; author minskim; state Exp; branches; next 1.7; 1.7 date 2005.05.22.00.01.36; author minskim; state Exp; branches; next 1.6; 1.6 date 2004.08.28.06.05.31; author jlam; state Exp; branches; next 1.5; 1.5 date 2004.06.04.05.21.14; author reed; state Exp; branches; next 1.4; 1.4 date 2004.04.26.04.53.23; author jlam; state Exp; branches; next 1.3; 1.3 date 2004.04.26.00.28.39; author snj; state Exp; branches; next 1.2; 1.2 date 2004.03.29.05.43.28; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.03.10.17.57.14; author jlam; state Exp; branches; next ; desc @@ 1.28 log @*/builtin.mk: Use ${_CROSS_DESTDIR:U} for build-time file checks. These are questions about the target system, whose files at build-time are all relative to ${_CROSS_DESTDIR} if it is defined, i.e., if USE_CROSS_COMPILE is set to yes. No change to native builds because ${_CROSS_DESTDIR:U} is empty in them. (Possible minor change by adding :Q to ${H_FOO} in command lines, but if this makes a difference it likely fixes problems.) @ text @# $NetBSD: builtin.mk,v 1.27 2023/11/14 17:51:58 adam Exp $ # # Package-settable variables: # # GNU_CONFIGURE_ICONV: YesNo # Whether to add --with-libiconv-prefix to CONFIGURE_ARGS. # # Default: yes # # Keywords: iconv BUILTIN_PKG:= iconv BUILTIN_FIND_LIBS:= iconv BUILTIN_FIND_HEADERS_VAR:= H_ICONV H_GLIBC_ICONV H_CITRUS_ICONV BUILTIN_FIND_HEADERS.H_ICONV= iconv.h BUILTIN_FIND_GREP.H_ICONV= GNU LIBICONV Library BUILTIN_FIND_HEADERS.H_GLIBC_ICONV= iconv.h BUILTIN_FIND_GREP.H_GLIBC_ICONV= This file is part of the GNU C Library BUILTIN_FIND_HEADERS.H_CITRUS_ICONV= iconv.h BUILTIN_FIND_GREP.H_CITRUS_ICONV= Copyright.*Citrus Project .include "../../mk/buildlink3/bsd.builtin.mk" ### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN. appropriately ("yes" or "no"). ### .if !defined(IS_BUILTIN.iconv) IS_BUILTIN.iconv= no . if empty(H_ICONV:M__nonexistent__) && \ empty(H_ICONV:M${LOCALBASE}/*) && \ ${BUILTIN_LIB_FOUND.iconv:tl} == yes IS_BUILTIN.iconv= yes . endif .endif MAKEVARS+= IS_BUILTIN.iconv ### ### If there is a built-in implementation, then set BUILTIN_PKG. to ### a package name to represent the built-in package. ### .if !defined(BUILTIN_PKG.iconv) && \ ${IS_BUILTIN.iconv:tl} == yes && \ empty(H_ICONV:M__nonexistent__) BUILTIN_VERSION.iconv!= \ ${AWK} 'BEGIN { hex="0123456789abcdef" } \ /\#define[ ]*_LIBICONV_VERSION[ ]/ { \ M = 16 * (index(hex, tolower(substr($$3, 3, 1))) - 1); \ M += index(hex, tolower(substr($$3, 4, 1))) - 1;\ m = 16 * (index(hex, tolower(substr($$3, 5, 1))) - 1); \ m += index(hex, tolower(substr($$3, 6, 1))) - 1;\ printf "%d.%d\n", M, m; \ exit 0; \ } \ ' ${_CROSS_DESTDIR:U:Q}${H_ICONV:Q} # # If the native GNU iconv is ABI version 1.9, then treat it the same # as the latest version on the libiconv-1.9.x branch. # . if ${BUILTIN_VERSION.iconv} == "1.9" BUILTIN_VERSION.iconv= 1.9.2 # latest version on 1.9.x branch . endif BUILTIN_PKG.iconv= libiconv-${BUILTIN_VERSION.iconv} .endif MAKEVARS+= BUILTIN_PKG.iconv ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). ### .if !defined(USE_BUILTIN.iconv) . if ${PREFER.iconv} == "pkgsrc" USE_BUILTIN.iconv= no . else USE_BUILTIN.iconv= ${IS_BUILTIN.iconv} . if defined(BUILTIN_PKG.iconv) && \ ${IS_BUILTIN.iconv:tl} == yes USE_BUILTIN.iconv= yes . for _dep_ in ${BUILDLINK_API_DEPENDS.iconv} . if ${USE_BUILTIN.iconv:tl} == yes USE_BUILTIN.iconv!= \ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.iconv:Q}; then \ ${ECHO} yes; \ else \ ${ECHO} no; \ fi . endif . endfor . endif # XXX # XXX By default, assume that the native iconv implementation is good # XXX enough to replace GNU libiconv if it is part of glibc (the GNU C # XXX Library). # XXX . if empty(H_GLIBC_ICONV:M__nonexistent__) && \ empty(H_GLIBC_ICONV:M${LOCALBASE}/*) && \ ${BUILTIN_LIB_FOUND.iconv:tl} == no USE_BUILTIN.iconv= yes H_ICONV= ${H_GLIBC_ICONV} . endif # XXX # XXX By default, assume that the Citrus project iconv implementation # XXX (if it exists) is good enough to replace GNU libiconv. # XXX On Darwin, libiconv.* exists. # XXX . if empty(H_CITRUS_ICONV:M__nonexistent__) && \ empty(H_CITRUS_ICONV:M${LOCALBASE}/*) && \ (${BUILTIN_LIB_FOUND.iconv:tl} == no || ${OPSYS} == "Darwin") USE_BUILTIN.iconv= yes H_ICONV= ${H_CITRUS_ICONV} . endif # # Some platforms don't have an iconv implementation that can replace # GNU libiconv. # _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk . for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} . if !empty(MACHINE_PLATFORM:M${_pattern_}) USE_BUILTIN.iconv= no . endif . endfor . endif # PREFER.iconv .endif MAKEVARS+= USE_BUILTIN.iconv # If USE_GNU_ICONV is defined, then force the use of a GNU libiconv # implementation. # .if defined(USE_GNU_ICONV) . if ${IS_BUILTIN.iconv:tl} == no USE_BUILTIN.iconv= no . endif .endif # Define BUILTIN_LIBNAME.iconv to be the base name of the built-in # iconv library. # .if ${BUILTIN_LIB_FOUND.iconv:tl} == yes BUILTIN_LIBNAME.iconv= iconv .else BUILTIN_LIBNAME.iconv= # empty (part of the C library) .endif # ICONV_TYPE is either "gnu" or "native" depending on which iconv # implementation is used. # .if !defined(ICONV_TYPE) ICONV_TYPE?= gnu . if ${USE_BUILTIN.iconv:tl} == yes && \ ${IS_BUILTIN.iconv:tl} == no ICONV_TYPE= native . endif .endif ### ### The section below only applies if we are not including this file ### solely to determine whether a built-in implementation exists. ### CHECK_BUILTIN.iconv?= no .if ${CHECK_BUILTIN.iconv:tl} == no . if ${USE_BUILTIN.iconv:tl} == yes BUILDLINK_LIBNAME.iconv= ${BUILTIN_LIBNAME.iconv} . if empty(BUILTIN_LIBNAME.iconv) BUILDLINK_TRANSFORM+= rm:-liconv . endif . endif . if defined(GNU_CONFIGURE) && ${GNU_CONFIGURE_ICONV:Uyes:tl} == yes . if ${USE_BUILTIN.iconv:tl} == no CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv} . endif . endif .endif # CHECK_BUILTIN.iconv @ 1.27 log @libiconv: allow Citrix built-in libiconv on Darwin 22+ @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.26 2023/01/23 15:22:24 wiz Exp $ d56 1 a56 1 ' ${H_ICONV} @ 1.26 log @libiconv: update to 1.17. New in 1.17: * The libiconv library is now licensed under the LGPL version 2.1, instead of the LGPL version 2.0. The iconv program continues to be licensed under GPL version 3. * Added converters for many single-byte EBCDIC encodings: IBM-{037,273,277,278,280,282,284,285,297,423,424,425,500,838,870,871,875}, IBM-{880,905,924,1025,1026,1047,1097,1112,1122,1123,1130,1132,1137,1140}, IBM-{1141,1142,1143,1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157}, IBM-{1158,1160,1164,1165,1166,4971,12712,16804}. They are available through the configure option '--enable-extra-encodings'. New in 1.16: * The preloadable library has been removed. New in 1.15: * The UTF-8 converter now rejects surrogates and out-of-range code points. * Added ISO-2022-JP-MS converter. * Updated the CP1255 converter to map one more character. * The functions now support strings longer than 2 GB. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.25 2020/01/13 17:35:05 rillig Exp $ d33 1 a33 1 ${BUILTIN_LIB_FOUND.iconv:U:tl} == yes d98 1 a98 1 ${BUILTIN_LIB_FOUND.iconv:U:tl} == no d105 1 d109 1 a109 1 ${BUILTIN_LIB_FOUND.iconv:U:tl} == no d139 1 a139 1 .if ${BUILTIN_LIB_FOUND.iconv:U:tl} == yes d170 1 a170 1 . if defined(GNU_CONFIGURE) && ${GNU_CONFIGURE_ICONV:Uyes:M[yY][eE][sS]} @ 1.25 log @converters/libiconv: allow to skip --with-libiconv-prefix There are several GNU configure scripts that don't support this option. These packages can be found by setting GNU_CONFIGURE_STRICT=yes in mk.conf. To allow these packages to build nevertheless, packages have to skip this option explicitly, for backwards compatibility. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.24 2019/11/03 17:14:25 rillig Exp $ d33 1 a33 1 !empty(BUILTIN_LIB_FOUND.iconv:M[yY][eE][sS]) d44 1 a44 1 !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) && \ d78 1 a78 1 !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) d81 1 a81 1 . if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) d98 1 a98 1 !empty(BUILTIN_LIB_FOUND.iconv:M[nN][oO]) d108 1 a108 1 !empty(BUILTIN_LIB_FOUND.iconv:M[nN][oO]) d130 1 a130 1 . if !empty(IS_BUILTIN.iconv:M[nN][oO]) d138 1 a138 1 .if !empty(BUILTIN_LIB_FOUND.iconv:M[yY][eE][sS]) d149 2 a150 2 . if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) && \ !empty(IS_BUILTIN.iconv:M[nN][oO]) d160 1 a160 1 .if !empty(CHECK_BUILTIN.iconv:M[nN][oO]) d162 1 a162 1 . if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) d170 1 a170 1 . if !empty(USE_BUILTIN.iconv:M[nN][oO]) @ 1.24 log @converters: align variable assignments pkglint -Wall -F --only aligned --only indent -r No manual corrections. @ text @d1 10 a10 1 # $NetBSD: builtin.mk,v 1.23 2013/11/23 10:58:46 obache Exp $ d169 1 a169 1 . if defined(GNU_CONFIGURE) @ 1.23 log @Use find-headers instead of find-files to detect builtin header files. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.22 2011/01/16 11:16:28 wiz Exp $ d28 1 a28 1 MAKEVARS+= IS_BUILTIN.iconv d57 1 a57 1 MAKEVARS+= BUILTIN_PKG.iconv d115 1 a115 1 MAKEVARS+= USE_BUILTIN.iconv @ 1.22 log @Remove "--without-libiconv-prefix", almost no configure script recognizes it. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.21 2010/11/10 21:00:49 adam Exp $ d6 2 a7 3 BUILTIN_FIND_FILES_VAR:= H_ICONV H_GLIBC_ICONV H_CITRUS_ICONV BUILTIN_FIND_FILES.H_ICONV= /usr/include/iconv.h \ /boot/common/include/iconv.h d9 1 a9 2 BUILTIN_FIND_FILES.H_GLIBC_ICONV= /usr/include/iconv.h \ /boot/common/include/iconv.h d11 1 a11 1 BUILTIN_FIND_FILES.H_CITRUS_ICONV= /usr/include/iconv.h @ 1.21 log @Changes 1.13.1: * The library and the iconv program now understand platform dependent aliases, for better compatibility with the platform's own iconv_open function. Examples: "646" on Solaris, "iso88591" on HP-UX, "IBM-1252" on AIX. * For stateful encodings, when the input ends with a shift sequence followed by invalid input, the iconv function now increments the input pointer past the shift sequence before returning (size_t)(-1) with errno = EILSEQ. This is also like GNU libc's iconv() behaves. * The library exports a new function iconv_open_into() that stores the conversion descriptor in pre-allocated memory, rather than allocating fresh memory for it. * Added CP1131 converter. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.20 2010/08/30 02:04:58 obache Exp $ a164 2 . else CONFIGURE_ARGS+= --without-libiconv-prefix @ 1.20 log @tell iconv.h for Haiku. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.19 2008/02/27 22:10:34 jlam Exp $ d164 1 a164 1 CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv:Q} @ 1.19 log @Greatly simplify the logic that tries to determine whether -lintl needs -liconv in order to satisfy linkage requirements. This is now patterned after the approach taken with readline and termlib. Examples on NetBSD for a package that includes only gettext-lib/buildlink3.mk: PREFER_NATIVE= yes PREFER_PKGSRC= # empty # This uses the native gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" PREFER_NATIVE= yes PREFER_PKGSRC= iconv # This uses the native gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" PREFER_NATIVE= yes PREFER_PKGSRC= gettext # This uses the pkgsrc gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" PREFER_NATIVE= yes PREFER_PKGSRC= gettext iconv # This uses the pkgsrc gettext and pkgsrc iconv, with: # BUILDLINK_LDADD.gettext == "-lintl -liconv" PREFER_NATIVE= # empty PREFER_PKGSRC= yes # This uses the pkgsrc gettext and pkgsrc iconv, with: # BUILDLINK_LDADD.gettext == "-lintl -liconv" PREFER_NATIVE= iconv PREFER_PKGSRC= yes # This uses the pkgsrc gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" PREFER_NATIVE= gettext PREFER_PKGSRC= yes # This uses the native gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" PREFER_NATIVE= gettext iconv PREFER_PKGSRC= yes # This uses the native gettext and native iconv, with: # BUILDLINK_LDADD.gettext == "-lintl" @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.18 2008/02/27 19:32:55 jlam Exp $ d7 2 a8 1 BUILTIN_FIND_FILES.H_ICONV= /usr/include/iconv.h d10 2 a11 1 BUILTIN_FIND_FILES.H_GLIBC_ICONV= /usr/include/iconv.h @ 1.18 log @Whitespace. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.17 2007/11/07 17:24:28 minskim Exp $ d5 8 a12 4 BUILTIN_FIND_LIBS:= iconv BUILTIN_FIND_FILES_VAR:= H_ICONV BUILTIN_FIND_FILES.H_ICONV= /usr/include/iconv.h BUILTIN_FIND_GREP.H_ICONV= GNU LIBICONV Library a81 2 . if !defined(_BLTN_REPLACE.iconv) _BLTN_REPLACE.iconv= no d87 6 a92 9 . if exists(/usr/include/iconv.h) H_ICONV= /usr/include/iconv.h _BLTN_REPLACE.iconv!= \ if ${GREP} -q "This file is part of the GNU C Library" ${H_ICONV}; then \ ${ECHO} yes; \ else \ ${ECHO} no; \ fi . endif d94 2 a95 2 # XXX By default, assume that on NetBSD and DragonFly the native iconv # XXX implementation (if it exists) is good enough to replace GNU libiconv. d97 3 a99 8 . if (${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly") && \ exists(/usr/include/iconv.h) H_ICONV= /usr/include/iconv.h _BLTN_REPLACE.iconv= yes . endif . endif MAKEVARS+= _BLTN_REPLACE.iconv . if !empty(_BLTN_REPLACE.iconv:M[yY][eE][sS]) d101 1 d126 9 d153 4 a156 8 . if !empty(USE_BUILTIN.iconv:M[nN][oO]) _BLTN_LIBICONV= -liconv . else . if !empty(BUILTIN_LIB_FOUND.iconv:M[yY][eE][sS]) _BLTN_LIBICONV= -liconv . else _BLTN_LIBICONV= # empty BUILDLINK_TRANSFORM+= rm:-liconv a158 1 BUILDLINK_LDADD.iconv?= ${_BLTN_LIBICONV} @ 1.17 log @Fix version detection when the version number contains capital letters. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.16 2006/04/06 06:21:40 reed Exp $ d18 2 a19 1 . if empty(H_ICONV:M__nonexistent__) && empty(H_ICONV:M${LOCALBASE}/*) && \ d36 4 a39 4 M = 16 * (index(hex, tolower(substr($$3, 3, 1))) - 1); \ M += index(hex, tolower(substr($$3, 4, 1))) - 1; \ m = 16 * (index(hex, tolower(substr($$3, 5, 1))) - 1); \ m += index(hex, tolower(substr($$3, 6, 1))) - 1; \ @ 1.16 log @Over 1200 files touched but no revisions bumped :) RECOMMENDED is removed. It becomes ABI_DEPENDS. BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo. BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo. BUILDLINK_DEPENDS does not change. IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS which defaults to "yes". Added to obsolete.mk checking for IGNORE_RECOMMENDED. I did not manually go through and fix any aesthetic tab/spacing issues. I have tested the above patch on DragonFly building and packaging subversion and pkglint and their many dependencies. I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I have used IGNORE_RECOMMENDED for a long time). I have been an active user of IGNORE_RECOMMENDED since it was available. As suggested, I removed the documentation sentences suggesting bumping for "security" issues. As discussed on tech-pkg. I will commit to revbump, pkglint, pkg_install, createbuildlink separately. Note that if you use wip, it will fail! I will commit to pkgsrc-wip later (within day). @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.15 2006/03/30 18:06:17 jlam Exp $ d35 4 a38 4 M = 16 * (index(hex, substr($$3, 3, 1)) - 1); \ M += index(hex, substr($$3, 4, 1)) - 1; \ m = 16 * (index(hex, substr($$3, 5, 1)) - 1); \ m += index(hex, substr($$3, 6, 1)) - 1; \ @ 1.15 log @Avoid extra stat() calls by not repeatedly checking whether a file exists on the disk -- we can just check whether a variable defined by find-files.mk is "__nonexistent__" or not. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.14 2005/06/06 01:30:56 jlam Exp $ d66 1 a66 1 . for _dep_ in ${BUILDLINK_DEPENDS.iconv} @ 1.14 log @Back out previous and reset the BUILTIN_VERSION.iconv variable instead. This should fix functioning on Linux systems that actually use GNU libiconv as the builtin iconv implementation. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.13 2005/06/05 22:05:00 minskim Exp $ d18 1 a18 1 . if empty(H_ICONV:M${LOCALBASE}/*) && exists(${H_ICONV}) && \ d31 1 a31 1 exists(${H_ICONV}) @ 1.13 log @Make BUILTIN_PKG.iconv follow what the comment says. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.12 2005/06/05 10:00:20 jmmv Exp $ d48 1 a48 1 BUILTIN_ICONV_VERSION= 1.9.2 # latest version on 1.9.x branch d50 1 a50 1 BUILTIN_PKG.iconv= libiconv-${BUILTIN_ICONV_VERSION} @ 1.12 log @Assume that DragonFly's native libiconv is good enough for pkgsrc, just as we do for NetBSD. Patch from Joerg Sonnenberger. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.11 2005/06/05 09:25:37 jlam Exp $ d50 1 a50 1 BUILTIN_PKG.iconv= libiconv-${BUILTIN_VERSION.iconv} @ 1.11 log @In builtin.mk files, use _BLTN_ as the private namespace prefix. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.10 2005/06/01 18:02:41 jlam Exp $ d94 2 a95 2 # XXX By default, assume that on NetBSD the native iconv implementation # XXX (if it exists) is good enough to replace GNU libiconv. d97 2 a98 1 . if (${OPSYS} == "NetBSD") && exists(/usr/include/iconv.h) @ 1.10 log @Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc. Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. , and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.9 2005/05/24 04:22:24 jlam Exp $ d77 2 a78 2 . if !defined(_BLNK_REPLACE.iconv) _BLNK_REPLACE.iconv= no d86 1 a86 1 _BLNK_REPLACE.iconv!= \ d99 1 a99 1 _BLNK_REPLACE.iconv= yes d102 2 a103 2 MAKEVARS+= _BLNK_REPLACE.iconv . if !empty(_BLNK_REPLACE.iconv:M[yY][eE][sS]) d148 1 a148 1 _BLNK_LIBICONV= -liconv d151 1 a151 1 _BLNK_LIBICONV= -liconv d153 1 a153 1 _BLNK_LIBICONV= # empty d157 1 a157 1 BUILDLINK_LDADD.iconv?= ${_BLNK_LIBICONV} @ 1.9 log @Rewrite to use find-libs.mk rename several variables to begin with _BLNK_ to properly namespace those variables, and rewrite BUILTIN_PKG.iconv computation to use one fewer awk invocation. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.8 2005/05/22 01:22:47 minskim Exp $ d3 1 a3 2 BUILDLINK_FIND_LIBS:= iconv .include "../../mk/buildlink3/find-libs.mk" d5 4 a8 1 _BLNK_ICONV_H= /usr/include/iconv.h d10 6 a15 3 # Determine if there is a built-in GNU iconv implementation and set # IS_BUILTIN.iconv appropriately. # d18 3 a20 8 . if exists(${_BLNK_ICONV_H}) && \ !empty(BUILDLINK_LIB_FOUND.iconv:M[yY][eE][sS]) IS_BUILTIN.iconv!= \ if ${GREP} -q "GNU LIBICONV Library" ${_BLNK_ICONV_H}; then \ ${ECHO} yes; \ else \ ${ECHO} no; \ fi d25 8 a32 6 # If there is a built-in GNU iconv implementation, then set # BUILTIN_PKG.iconv to a package name for the built-in iconv. # .if !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) . if !defined(BUILTIN_PKG.iconv) _BLNK_ICONV_VERSION!= \ d42 1 a42 1 ' ${_BLNK_ICONV_H} d47 2 a48 4 . if ${_BLNK_ICONV_VERSION} == "1.9" _BLNK_ICONV_VERSION= 1.9.2 # latest version on 1.9.x branch . endif BUILTIN_PKG.iconv= libiconv-${_BLNK_ICONV_VERSION} d50 2 a52 1 .endif d54 4 a57 3 # Determine whether we should use the built-in iconv implementation # if it exists, and set USE_BUILTIN.iconv appropriately. # d59 6 a64 4 USE_BUILTIN.iconv?= ${IS_BUILTIN.iconv} PREFER.iconv?= pkgsrc . if defined(BUILTIN_PKG.iconv) && !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) d66 2 a67 1 . for _dep_ in ${BUILDLINK_DEPENDS.iconv} a73 14 . endfor . endif . if ${PREFER.iconv} == "native" # XXX # XXX By default, assume that the native iconv on NetBSD systems # XXX supports GNU libiconv's API. # XXX . if (${OPSYS} == "NetBSD") && exists(${_BLNK_ICONV_H}) USE_BUILTIN.iconv= yes _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk . for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} . if !empty(MACHINE_PLATFORM:M${_pattern_}) USE_BUILTIN.iconv= no a75 1 . undef _pattern_ d77 2 d80 3 a82 2 # XXX By default, assume that the native iconv on Linux systems using # XXX GLIBC supports GNU libiconv's API. d84 4 a87 3 . if (${OPSYS} == "Linux") && exists(${_BLNK_ICONV_H}) USE_BUILTIN.iconv!= \ if ${GREP} -q "This file is part of the GNU C Library" ${_BLNK_ICONV_H}; then \ d92 13 d106 13 a118 1 . endif # PREFER.iconv == "native" d120 5 a124 3 . if defined(USE_GNU_ICONV) . if !empty(IS_BUILTIN.iconv:M[nN][oO]) || \ (${PREFER.iconv} == "pkgsrc") a125 1 . endif a127 1 MAKEVARS+= USE_BUILTIN.iconv d140 4 d150 1 a150 1 . if !empty(BUILDLINK_LIB_FOUND.iconv:M[yY][eE][sS]) @ 1.8 log @Simplify a condition. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.7 2005/05/22 00:01:36 minskim Exp $ d3 2 a4 9 .if !defined(_LIBICONV_FOUND) _LIBICONV_FOUND!= \ if [ "`${ECHO} /usr/lib/libiconv.*`" = "/usr/lib/libiconv.*" ]; then \ ${ECHO} "no"; \ else \ ${ECHO} "yes"; \ fi BUILDLINK_VARS+= _LIBICONV_FOUND .endif d6 1 a6 1 _ICONV_H= /usr/include/iconv.h d8 3 d13 5 a17 4 . if exists(${_ICONV_H}) && !empty(_LIBICONV_FOUND:M[yY][eE][sS]) IS_BUILTIN.iconv!= \ if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \ ${ECHO} "yes"; \ d19 1 a19 1 ${ECHO} "no"; \ d22 10 a31 3 . if !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) _ICONV_MAJOR!= \ ${AWK} 'BEGIN { hex="0123456789abcdef" } \ d33 5 a37 3 i = 16 * (index(hex, substr($$3, 3, 1)) - 1); \ i += index(hex, substr($$3, 4, 1)) - 1; \ print i; \ d40 1 a40 11 ' ${_ICONV_H} _ICONV_MINOR!= \ ${AWK} 'BEGIN { hex="0123456789abcdef" } \ /\#define[ ]*_LIBICONV_VERSION[ ]/ { \ i = 16 * (index(hex, substr($$3, 5, 1)) - 1); \ i += index(hex, substr($$3, 6, 1)) - 1; \ print i; \ exit 0; \ } \ ' ${_ICONV_H} _ICONV_VERSION= ${_ICONV_MAJOR}.${_ICONV_MINOR} d42 2 a43 2 # If the native libiconv is ABI version 1.9, then treat it the same as # the latest version on the libiconv-1.9.x branch. d45 2 a46 2 . if ${_ICONV_VERSION} == "1.9" _ICONV_VERSION= 1.9.1 d48 1 a48 2 BUILTIN_PKG.iconv= libiconv-${_ICONV_VERSION} BUILDLINK_VARS+= BUILTIN_PKG.iconv d50 2 a51 2 BUILDLINK_VARS+= IS_BUILTIN.iconv .endif # IS_BUILTIN.iconv d53 3 d60 1 a60 1 . if defined(BUILTIN_PKG.iconv) d62 1 a62 2 . for _depend_ in ${BUILDLINK_DEPENDS.iconv} . if !empty(IS_BUILTIN.iconv:M[yY][eE][sS]) d64 5 a68 6 if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.iconv}; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi . endif d77 1 a77 1 . if (${OPSYS} == "NetBSD") && exists(${_ICONV_H}) d85 1 d88 2 a89 2 # XXX By default, assume that the native iconv on Linux systems using GLIBC # XXX supports GNU libiconv's API. d91 4 a94 7 # XXX Determine we are using the builtin iconv regardless of whether it's # XXX truly GNU libiconv. # XXX . if (${OPSYS} == "Linux") && exists(${_ICONV_H}) USE_BUILTIN.iconv!= \ if ${GREP} -q "This file is part of the GNU C Library" ${_ICONV_H}; then \ ${ECHO} "yes"; \ d96 1 a96 1 ${ECHO} "no"; \ d99 1 a99 1 . endif d101 1 a101 1 . if defined(USE_GNU_ICONV) && ${OPSYS} != "Linux" d107 2 a108 1 .endif # USE_BUILTIN.iconv d110 3 d124 2 a125 5 .if !empty(USE_BUILTIN.iconv:M[nN][oO]) _LIBICONV= -liconv .else . if !empty(_LIBICONV_FOUND:M[yY][eE][sS]) _LIBICONV= -liconv d127 4 a130 1 _LIBICONV= # empty d132 1 d134 1 a134 1 .endif d136 4 a139 6 BUILDLINK_LDADD.iconv?= ${_LIBICONV} .if defined(GNU_CONFIGURE) . if !empty(USE_BUILTIN.iconv:M[nN][oO]) CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv} . else d141 1 a142 1 .endif @ 1.7 log @Use the iconv library in glibc on Linux even if USE_GNU_ICONV is set. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.6 2004/08/28 06:05:31 jlam Exp $ d107 1 a107 2 . if defined(USE_GNU_ICONV) && \ (${OPSYS} != "Linux" || !empty(USE_BUILTIN.iconv:M[nN][oO])) @ 1.6 log @Use the new BUILDLINK_TRANSFORM commands to more precisely state the intended transformation: use "rm" to remove an option, "rmdir" to remove all options containing a path starting with a given directory name, and "rename" to rename options to something else. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.5 2004/06/04 05:21:14 reed Exp $ d107 2 a108 1 . if defined(USE_GNU_ICONV) @ 1.5 log @By default, assume that the native iconv on Linux systems using GLIBC supports GNU libiconv's API. So don't depend on pkgsrc's libiconv for it. This is normal: most other Linux distros don't provide a libiconv package. This was discussed on tech-pkg list over past two months. It has helped a few users under Linux where they had some problems with conflicts with their working iconv() support provided with libc and the libiconv package. This was okayed by maintainer, Rene Hexel. This still needs some improvement. Some packages still try to force libiconv usage even though not needed. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.4 2004/04/26 04:53:23 jlam Exp $ d133 1 a133 1 BUILDLINK_TRANSFORM+= l:iconv: @ 1.4 log @Do previous in a different way. We want USE_GNU_ICONV to always use a GNU libiconv, whether it be builtin or not, and PREFER_{NATIVE,PKGSRC} can be used to decide which iconv we use if USE_GNU_ICONV isn't defined. On NetBSD, the native iconv implementation (if it exists) is considered GNUish enough unless USE_GNU_ICONV is explicitly defined. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.3 2004/04/26 00:28:39 snj Exp $ d90 15 @ 1.3 log @If USE_GNU_ICONV is defined, don't use builtin libiconv if ICONV_TYPE is native. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.2 2004/03/29 05:43:28 jlam Exp $ d17 7 a23 2 . if exists(${_ICONV_H}) IS_BUILTIN.iconv= yes d25 31 d62 21 d84 2 a85 2 . for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} . if !empty(MACHINE_PLATFORM:M${_pattern_}) d87 2 a89 11 . endfor .if !defined(ICONV_TYPE) ICONV_TYPE?= gnu . if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) && exists(${_ICONV_H}) ICONV_TYPE!= \ if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \ ${ECHO} "gnu"; \ else \ ${ECHO} "native"; \ fi a90 2 BUILDLINK_VARS+= ICONV_TYPE .endif d94 1 a94 1 (${PREFER.iconv} == "pkgsrc") || ${ICONV_TYPE} == "native" d100 8 @ 1.2 log @Match the template builtin.mk file in bsd.builtin.mk, and make the two packages that use builtin.mk files (graphics/xpm and pkgtools/x11-links) use the new format correctly. @ text @d1 1 a1 1 # $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ d33 13 d48 1 a48 1 (${PREFER.iconv} == "pkgsrc") a69 13 .if !defined(ICONV_TYPE) ICONV_TYPE?= gnu . if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) && exists(${_ICONV_H}) ICONV_TYPE!= \ if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \ ${ECHO} "gnu"; \ else \ ${ECHO} "native"; \ fi . endif BUILDLINK_VARS+= ICONV_TYPE .endif @ 1.1 log @Split out the code that deals with checking whether the software is built-in or not into a separate builtin.mk file. The code to deal checking for built-in software is much simpler to deal with in pkgsrc. The buildlink3.mk file for a package will be of the usual format regardless of the package, which makes it simpler for packagers to update a package. The builtin.mk file for a package must define a single yes/no variable USE_BUILTIN. that is used by bsd.buildlink3.mk to decide whether to use the built-in software or to use the pkgsrc software. @ text @d1 1 a1 1 # $NetBSD$ d10 1 a10 1 MAKEFLAGS+= _LIBICONV_FOUND=${_LIBICONV_FOUND} d20 1 a20 6 .endif CHECK_BUILTIN.iconv?= no .if !empty(CHECK_BUILTIN.iconv:M[yY][eE][sS]) USE_BUILTIN.iconv= yes .endif d41 3 d67 1 a67 1 MAKEFLAGS+= ICONV_TYPE=${ICONV_TYPE} d77 2 @