pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Reorganize code so that any dependencies are checked a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/73d8c5b2c05a
branches:  trunk
changeset: 468270:73d8c5b2c05a
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Feb 12 01:59:37 2004 +0000

description:
Reorganize code so that any dependencies are checked as part of deciding
whether the software is built-in or not.  This facilitates implementing
the forthcoming PKGSRC_NATIVE variable.

diffstat:

 archivers/bzip2/buildlink2.mk     |   33 +++++------
 archivers/bzip2/buildlink3.mk     |   27 ++++-----
 converters/libiconv/buildlink2.mk |   39 ++++++++------
 converters/libiconv/buildlink3.mk |   27 ++++-----
 devel/binutils/buildlink2.mk      |   28 +++++----
 devel/binutils/buildlink3.mk      |   27 ++++-----
 devel/cdk/buildlink2.mk           |   20 +++++--
 devel/gettext-lib/buildlink2.mk   |   59 +++++++++++---------
 devel/gettext-lib/buildlink3.mk   |   57 ++++++++++----------
 devel/libevent/buildlink2.mk      |    8 ++-
 devel/ncurses/buildlink2.mk       |   78 +++++++++++++++++-----------
 devel/ncurses/buildlink3.mk       |  104 +++++++++++++++++++-------------------
 devel/readline/buildlink2.mk      |   37 +++++++-----
 devel/readline/buildlink3.mk      |   27 ++++-----
 devel/zlib/buildlink2.mk          |   39 ++++++-------
 devel/zlib/buildlink3.mk          |   70 ++++++++++++-------------
 graphics/MesaLib/buildlink3.mk    |   61 +++++++++++----------
 graphics/freetype2/buildlink2.mk  |   37 ++++++++-----
 graphics/freetype2/buildlink3.mk  |   56 ++++++++++----------
 graphics/glu/buildlink3.mk        |   60 +++++++++++----------
 mail/libmilter/buildlink2.mk      |   12 +++-
 net/hesiod/buildlink2.mk          |   22 +++++--
 net/libpcap/buildlink2.mk         |   12 +++-
 net/libpcap/buildlink3.mk         |   16 ++---
 security/PAM/buildlink2.mk        |    8 ++-
 security/PAM/buildlink3.mk        |   16 ++---
 security/heimdal/buildlink3.mk    |   71 ++++++++++++-------------
 security/openssl/buildlink2.mk    |   42 +++++++-------
 security/openssl/buildlink3.mk    |   54 +++++++++---------
 x11/Xrender/buildlink2.mk         |   42 ++++++++------
 x11/Xrender/buildlink3.mk         |   57 ++++++++++----------
 31 files changed, 659 insertions(+), 587 deletions(-)

diffs (truncated from 2095 to 300 lines):

diff -r e8c206eccba9 -r 73d8c5b2c05a archivers/bzip2/buildlink2.mk
--- a/archivers/bzip2/buildlink2.mk     Thu Feb 12 01:57:52 2004 +0000
+++ b/archivers/bzip2/buildlink2.mk     Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.9 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.10 2004/02/12 01:59:37 jlam Exp $
 
 .if !defined(BZIP2_BUILDLINK2_MK)
 BZIP2_BUILDLINK2_MK=   # defined
@@ -8,37 +8,32 @@
 BUILDLINK_DEPENDS.bzip2?=      bzip2>=1.0.1
 BUILDLINK_PKGSRCDIR.bzip2?=    ../../archivers/bzip2
 
-.if defined(USE_BZIP2)
-_NEED_BZIP2=           YES
-.else
-.  if exists(/usr/include/bzlib.h)
+.if exists(/usr/include/bzlib.h)
 #
 # Recent versions of the libbz2 API prefix all functions with "BZ2_".
 #
 _BUILTIN_BZIP2!=       ${EGREP} -c "BZ2_" /usr/include/bzlib.h || ${TRUE}
-.  else
+.else
 _BUILTIN_BZIP2=                0
-.  endif
-.  if ${_BUILTIN_BZIP2} == "0"
-_NEED_BZIP2=           YES
-.  else
-_NEED_BZIP2=           NO
-.  endif
+.endif
 #
 # Solaris 9 has bzip2 1.0.1, build it on older versions.
 # Darwin only has static libbz2.a, which can't be buildlinked
 #
 _INCOMPAT_BZIP2=       SunOS-5.[678]-* Darwin-*
-INCOMPAT_BZIP2?=       # empty
-.  for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
-.    if !empty(MACHINE_PLATFORM:M${_pattern_})
+.for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
+.  if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_BZIP2=                0
+.  endif
+.endfor
+
+.if ${_BUILTIN_BZIP2} == "0"
 _NEED_BZIP2=           YES
-.    endif
-.  endfor
+.else
+_NEED_BZIP2=           NO
 .endif
 
-.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
-    !empty(PREFER_PKGSRC:Mbzip2)
+.if defined(USE_BZIP2)
 _NEED_BZIP2=           YES
 .endif
 
diff -r e8c206eccba9 -r 73d8c5b2c05a archivers/bzip2/buildlink3.mk
--- a/archivers/bzip2/buildlink3.mk     Thu Feb 12 01:57:52 2004 +0000
+++ b/archivers/bzip2/buildlink3.mk     Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.11 2004/02/11 11:30:49 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.12 2004/02/12 01:59:37 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 BZIP2_BUILDLINK3_MK:=  ${BZIP2_BUILDLINK3_MK}+
@@ -23,19 +23,27 @@
                ${ECHO} "NO";                                           \
        fi
 .  endif
+.  if !empty(BUILDLINK_CHECK_BUILTIN.bzip2:M[nN][oO])
 #
 # Solaris 9 has bzip2 1.0.1, build it on older versions.
 # Darwin only has static libbz2.a, which can't be buildlinked.
 #
 _INCOMPAT_BZIP2?=      SunOS-5.[678]-* Darwin-*
-.  for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
-.    if !empty(MACHINE_PLATFORM:M${_pattern_})
+.    for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
+.      if !empty(MACHINE_PLATFORM:M${_pattern_})
 BUILDLINK_IS_BUILTIN.bzip2=    NO
-.    endif
-.  endfor
+.      endif
+.    endfor
+.  endif
 MAKEFLAGS+=    BUILDLINK_IS_BUILTIN.bzip2=${BUILDLINK_IS_BUILTIN.bzip2}
 .endif
 
+.if !empty(BUILDLINK_IS_BUILTIN.bzip2:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.bzip2=   YES
+.else
+BUILDLINK_USE_BUILTIN.bzip2=   NO
+.endif
+
 .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
     !empty(PREFER_PKGSRC:Mbzip2)
 BUILDLINK_USE_BUILTIN.bzip2=   NO
@@ -49,15 +57,6 @@
 BUILDLINK_USE_BUILTIN.bzip2=   YES
 .endif
 
-.if !defined(BUILDLINK_USE_BUILTIN.bzip2)
-.  if !empty(BUILDLINK_IS_BUILTIN.bzip2:M[nN][oO])
-BUILDLINK_USE_BUILTIN.bzip2=   NO
-.  else
-BUILDLINK_USE_BUILTIN.bzip2=   YES
-.  endif
-MAKEFLAGS+=    BUILDLINK_USE_BUILTIN.bzip2=${BUILDLINK_USE_BUILTIN.bzip2}
-.endif
-
 .if !empty(BUILDLINK_USE_BUILTIN.bzip2:M[nN][oO])
 .  if !empty(BUILDLINK_DEPTH:M+)
 BUILDLINK_DEPENDS+=    bzip2
diff -r e8c206eccba9 -r 73d8c5b2c05a converters/libiconv/buildlink2.mk
--- a/converters/libiconv/buildlink2.mk Thu Feb 12 01:57:52 2004 +0000
+++ b/converters/libiconv/buildlink2.mk Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.16 2004/02/11 12:17:58 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.17 2004/02/12 01:59:37 jlam Exp $
 
 .if !defined(ICONV_BUILDLINK2_MK)
 ICONV_BUILDLINK2_MK=   # defined
@@ -8,29 +8,30 @@
 BUILDLINK_DEPENDS.iconv?=      libiconv>=1.9.1
 BUILDLINK_PKGSRCDIR.iconv?=    ../../converters/libiconv
 
-.if defined(USE_GNU_ICONV)
-_NEED_ICONV=           YES
-_BLNK_LIBICONV_FOUND=  NO
-.else
-.  if exists(/usr/include/iconv.h)
-_NEED_ICONV=           NO
+.if exists(/usr/include/iconv.h)
+_BUILTIN_ICONV=                YES
 _BLNK_LIBICONV_LIST!=  ${ECHO} /usr/lib/libiconv.*
-.    if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*"
+.  if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*"
 _BLNK_LIBICONV_FOUND=  YES
-.    else
-_BLNK_LIBICONV_FOUND=  NO
-.    endif
 .  else
-_NEED_ICONV=           YES
 _BLNK_LIBICONV_FOUND=  NO
 .  endif
+.else
+_BUILTIN_ICONV=                NO
+_BLNK_LIBICONV_FOUND=  NO
+.endif
 _INCOMPAT_ICONV?=      # should be set from defs.${OPSYS}.mk
-INCOMPAT_ICONV?=       # empty
-.  for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV}
-.    if !empty(MACHINE_PLATFORM:M${_pattern_})
+.for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV}
+.  if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_ICONV=                NO
+_BLNK_LIBICONV_FOUND=  NO
+.  endif
+.endfor
+
+.if ${_BUILTIN_ICONV} == "YES"
+_NEED_ICONV=           NO
+.else
 _NEED_ICONV=           YES
-.    endif
-.  endfor
 .endif
 
 .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -38,6 +39,10 @@
 _NEED_ICONV=           YES
 .endif
 
+.if defined(USE_GNU_ICONV)
+_NEED_ICONV=           YES
+.endif
+
 .if ${_NEED_ICONV} == "YES"
 # let other packages know that we're using the pkgsrc
 # GNU libiconv
diff -r e8c206eccba9 -r 73d8c5b2c05a converters/libiconv/buildlink3.mk
--- a/converters/libiconv/buildlink3.mk Thu Feb 12 01:57:52 2004 +0000
+++ b/converters/libiconv/buildlink3.mk Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.12 2004/02/11 12:17:58 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.13 2004/02/12 01:59:37 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 ICONV_BUILDLINK3_MK:=  ${ICONV_BUILDLINK3_MK}+
@@ -20,12 +20,20 @@
 .  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_})
+.    for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV}
+.      if !empty(MACHINE_PLATFORM:M${_pattern_})
 BUILDLINK_IS_BUILTIN.iconv=    NO
-.    endif
-.  endfor
+.      endif
+.    endfor
+.  endif
+.endif
+
+.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_PKGSRC:M[yY][eE][sS]) || \
@@ -41,15 +49,6 @@
 BUILDLINK_USE_BUILTIN.iconv=   YES
 .endif
 
-.if !defined(BUILDLINK_USE_BUILTIN.iconv)
-.  if !empty(BUILDLINK_IS_BUILTIN.iconv:M[nN][oO])
-BUILDLINK_USE_BUILTIN.iconv=   NO
-.  else
-BUILDLINK_USE_BUILTIN.iconv=   YES
-.  endif
-MAKEFLAGS+=    BUILDLINK_USE_BUILTIN.iconv=${BUILDLINK_USE_BUILTIN.iconv}
-.endif
-
 .if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO])
 .  if !empty(BUILDLINK_DEPTH:M+)
 BUILDLINK_DEPENDS+=    iconv
diff -r e8c206eccba9 -r 73d8c5b2c05a devel/binutils/buildlink2.mk
--- a/devel/binutils/buildlink2.mk      Thu Feb 12 01:57:52 2004 +0000
+++ b/devel/binutils/buildlink2.mk      Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.13 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.14 2004/02/12 01:59:37 jlam Exp $
 
 .if !defined(BINUTILS_BUILDLINK2_MK)
 BINUTILS_BUILDLINK2_MK=        # defined
@@ -9,11 +9,6 @@
 BUILDLINK_PKGSRCDIR.binutils?=         ../../devel/binutils
 BUILDLINK_DEPMETHOD.binutils?=         build
 
-.if defined(USE_BINUTILS)
-_NEED_BINUTILS=                YES
-.else
-_NEED_BINUTILS=                NO
-#
 # These versions of NetBSD didn't have a toolchain that could be used in
 # place of modern binutils and will need this package
 #
@@ -23,12 +18,17 @@
 # XXX: _INCOMPAT_BINUTILS settings for other operating systems possibly
 # XXX: needed here
 #
-INCOMPAT_BINUTILS?=       # empty
-.  for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
-.    if !empty(MACHINE_PLATFORM:M${_pattern_})
-_NEED_BINUTILS=          YES
-.    endif
-.  endfor
+_BUILTIN_BINUTILS=     YES
+.for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
+.  if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_BINUTILS=     NO
+.  endif
+.endfor
+
+.if ${_BUILTIN_BINUTILS} == "YES"
+_NEED_BINUTILS=                NO
+.else
+_NEED_BINUTILS=                YES
 .endif
 
 .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -36,6 +36,10 @@
 _NEED_BINUTILS=                YES
 .endif
 
+.if defined(USE_BINUTILS)
+_NEED_BINUTILS=                YES
+.endif
+
 .if ${_NEED_BINUTILS} == "YES"
 BUILDLINK_PACKAGES+=           binutils
 BUILDLINK_PREFIX.binutils=     ${LOCALBASE}
diff -r e8c206eccba9 -r 73d8c5b2c05a devel/binutils/buildlink3.mk
--- a/devel/binutils/buildlink3.mk      Thu Feb 12 01:57:52 2004 +0000
+++ b/devel/binutils/buildlink3.mk      Thu Feb 12 01:59:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.10 2004/02/11 11:30:49 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.11 2004/02/12 01:59:37 jlam Exp $
 
 BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
 BINUTILS_BUILDLINK3_MK:=       ${BINUTILS_BUILDLINK3_MK}+
@@ -16,6 +16,7 @@



Home | Main Index | Thread Index | Old Index