diff options
author | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
commit | d0b4c54eb698e718080690cf98ab5b8bbb4001e0 (patch) | |
tree | 1226d07b8f66083168895189decc88848b70903f /converters/libiconv/buildlink3.mk | |
parent | 9d61fef8537aed11013bf556e319b2d8e398a11b (diff) | |
download | pkgsrc-d0b4c54eb698e718080690cf98ab5b8bbb4001e0.tar.gz |
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.<pkg> that is used by bsd.buildlink3.mk to decide whether
to use the built-in software or to use the pkgsrc software.
Diffstat (limited to 'converters/libiconv/buildlink3.mk')
-rw-r--r-- | converters/libiconv/buildlink3.mk | 111 |
1 files changed, 7 insertions, 104 deletions
diff --git a/converters/libiconv/buildlink3.mk b/converters/libiconv/buildlink3.mk index 100ea810a8c..b08a3f314f3 100644 --- a/converters/libiconv/buildlink3.mk +++ b/converters/libiconv/buildlink3.mk @@ -1,115 +1,18 @@ -# $NetBSD: buildlink3.mk,v 1.15 2004/02/18 16:35:27 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.16 2004/03/10 17:57:14 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ ICONV_BUILDLINK3_MK:= ${ICONV_BUILDLINK3_MK}+ -.include "../../mk/bsd.prefs.mk" - -.if !empty(ICONV_BUILDLINK3_MK:M+) -BUILDLINK_PACKAGES+= iconv -BUILDLINK_DEPENDS.iconv+= libiconv>=1.9.1 -BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv -.endif # ICONV_BUILDLINK3_MK - -BUILDLINK_CHECK_BUILTIN.iconv?= NO - -_ICONV_H= /usr/include/iconv.h - -.if !defined(BUILDLINK_IS_BUILTIN.iconv) -BUILDLINK_IS_BUILTIN.iconv= NO -. if exists(${_ICONV_H}) -BUILDLINK_IS_BUILTIN.iconv= YES -. endif -. if !empty(BUILDLINK_CHECK_BUILTIN.iconv:M[nN][oO]) -_INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk -. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV} -. if !empty(MACHINE_PLATFORM:M${_pattern_}) -BUILDLINK_IS_BUILTIN.iconv= NO -. endif -. endfor -. endif -.endif - -.if !empty(BUILDLINK_CHECK_BUILTIN.iconv:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.iconv= YES -.endif - -.if !defined(BUILDLINK_USE_BUILTIN.iconv) -. if !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.iconv= YES -. else -BUILDLINK_USE_BUILTIN.iconv= NO -. endif - -. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \ - !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.iconv= YES -. endif -. if !empty(PREFER_PKGSRC:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.iconv= NO -. endif -. if !empty(PREFER_NATIVE:Miconv) && \ - !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.iconv= YES -. endif -. if !empty(PREFER_PKGSRC:Miconv) -BUILDLINK_USE_BUILTIN.iconv= NO -. endif - -. if defined(USE_GNU_ICONV) -BUILDLINK_USE_BUILTIN.iconv= NO -. endif -.endif - -.if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO]) -. if !empty(BUILDLINK_DEPTH:M+) +.if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= iconv -. endif .endif -.if !empty(ICONV_BUILDLINK3_MK:M+) -. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO]) -_BLNK_LIBICONV= -liconv -. else -. if !defined(_BLNK_LIBICONV_FOUND) -_BLNK_LIBICONV_FOUND!= \ - if [ "`${ECHO} /usr/lib/libiconv.*`" = "/usr/lib/libiconv.*" ]; then \ - ${ECHO} NO; \ - else \ - ${ECHO} YES; \ - fi -MAKEFLAGS+= _BLNK_LIBICONV_FOUND=${_BLNK_LIBICONV_FOUND} -. endif -. if ${_BLNK_LIBICONV_FOUND} == "YES" -_BLNK_LIBICONV= -liconv -. else -_BLNK_LIBICONV= # empty -BUILDLINK_TRANSFORM+= l:iconv: -. endif -BUILDLINK_LDADD.iconv?= ${_BLNK_LIBICONV} -. endif +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Niconv} +BUILDLINK_PACKAGES+= iconv -.if !defined(ICONV_TYPE) -ICONV_TYPE?= gnu -. if !empty(BUILDLINK_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 -MAKEFLAGS+= ICONV_TYPE=${ICONV_TYPE} -.endif - -. if defined(GNU_CONFIGURE) -. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO]) -CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv} -. else -CONFIGURE_ARGS+= --without-libiconv-prefix -. endif -. endif +.if !empty(ICONV_BUILDLINK3_MK:M+) +BUILDLINK_DEPENDS.iconv+= libiconv>=1.9.1 +BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv .endif # ICONV_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} |