summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-04-12 19:37:03 +0000
committertv <tv@pkgsrc.org>2004-04-12 19:37:03 +0000
commit885b283c336465e8086761afe24e5142d91d79c0 (patch)
tree28a6b3f755a2618588e22d9147c0bb73a18f85a3
parent949c23d5c12598b69f24f379cfe9be58980b7bca (diff)
downloadpkgsrc-885b283c336465e8086761afe24e5142d91d79c0.tar.gz
Revert the uberdependencies introduced when originally intending to
fix a bug in the way gnome-libs's dependencies work. This should be fixed by a mechanism that takes into account exactly how the API dependencies are structured. fixes PR pkg/25088 -- and reopens PR pkg/24799
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk117
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk120
2 files changed, 15 insertions, 222 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 2da4d8c1c6a..c5e0e3908e2 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.123 2004/03/30 21:58:45 xtraeme Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.124 2004/04/12 19:37:03 tv Exp $
#
# An example package buildlink2.mk file:
#
@@ -133,108 +133,6 @@ LDFLAGS+= ${FLAG}
#
PREPEND_PATH+= ${BUILDLINK_DIR}/bin
-_BLNK_PKGVAR?= ${PKGBASE:S/++$/xx/:S/+$//}
-
-# Try to include buildlink2.mk files for any dependencies that are already
-# installed on the system. This tries to handle the situation where the
-# installed package and the package as it exists in pkgsrc have differing
-# lists of dependencies. If the package directory has moved or been
-# removed from pkgsrc, then set BUILDLINK_INSTALLED_PKGSRCDIR.<pkg> to the
-# correct PKGPATH for that package or to the empty value if it has been
-# removed.
-#
-.if !defined(_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR})
-_BLNK_INSTALLED_DEPS= # empty
-. for _pkg_ in ${BUILDLINK_PACKAGES}
-BUILDLINK_DEPMETHOD.${_pkg_}?= full
-. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
-BUILDLINK_PKGBASE.${_pkg_}?= ${_pkg_}
-_BLNK_INSTALLED_DEPS.${_pkg_}!= \
- pkg="${BUILDLINK_PKGBASE.${_pkg_}}-[0-9]*"; \
- found=`${PKG_BEST_EXISTS} "$$pkg"`; \
- pkgdep=; \
- if [ -n "$$found" ]; then \
- pkgdep=`${PKG_INFO} -qf "$$found" | ${SED} -n "s/^@pkgdep[ ]*//p"`; \
- fi; \
- ${ECHO} "$$pkgdep"
-_BLNK_INSTALLED_DEPS+= ${_BLNK_INSTALLED_DEPS.${_pkg_}}
-. endif
-. endfor
-_BLNK_INSTALLED_DEPPKGS= # empty
-. for _dep_ in ${_BLNK_INSTALLED_DEPS}
-_BLNK_TMP_PKGNAME!= found=`${PKG_BEST_EXISTS} "${_dep_}"`; ${ECHO} "$$found"
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGNAME:C/-[^-]*$//}
-#
-# Map package names into buildlink package variable equivalents when it
-# differs from the PKGBASE for that package.
-#
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/++$/xx/:S/+$//}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/--$/mm/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^PAM$/pam/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^freetype-lib$/freetype/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^gettext-lib$/gettext/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libaudiofile$/audiofile/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libgetopt$/getopt/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libiconv$/iconv/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libtool-base$/libtool/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:C/^py[0-9][0-9][^-]*-/py-/}
-_BLNK_INSTALLED_PKGNAME.${_BLNK_TMP_PKGVAR}:= ${_BLNK_TMP_PKGNAME}
-_BLNK_INSTALLED_DEPPKGS:= \
- ${_BLNK_INSTALLED_DEPPKGS:N${_BLNK_TMP_PKGVAR}} \
- ${_BLNK_TMP_PKGVAR}
-. undef _BLNK_TMP
-. undef _BLNK_TMP_PKGVAR
-. undef _BLNK_TMP_PKGNAME
-. endfor
-_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}= # empty
-. for _pkg_ in ${_BLNK_INSTALLED_DEPPKGS}
-#
-# If BUILDLINK_PKGSRCDIR.<pkg> is already defined (by a previous inclusion
-# of <pkg>'s buildlink2.mk file), then make that the default value for
-# BUILDLINK_INSTALLED_PKGSRCDIR.<pkg>. Otherwise, try to dig it out of
-# the +BUILD_INFO file of the installed package.
-#
-. if defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}}
-. endif
-. if !defined(BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_})
-BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}!= \
- dir=`${PKG_INFO} -qB "${_BLNK_INSTALLED_PKGNAME.${_pkg_}}" | ${SED} -n "s/^PKGPATH=//p"`; ${ECHO} "../../$$dir"
-. endif
-. if exists(${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}}/buildlink2.mk)
-_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}+= \
- ${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}}
-. endif
-. endfor
-.endif
-.for _dir_ in ${_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}}
-. include "${_dir_}/buildlink2.mk"
-.endfor
-
-# Run through EVAL_PREFIX again in case we included any buildlink2.mk files
-# above and need to set BUILDLINK_PREFIX.<pkg> appropriately.
-#
-.if defined(EVAL_PREFIX)
-. for def in ${EVAL_PREFIX}
-. if !defined(${def:C/=.*//}_DEFAULT)
-${def:C/=.*//}_DEFAULT= ${X11PREFIX}
-. endif
-. if !defined(${def:C/=.*//})
-_depend_${def:C/=.*//}!= \
- ${PKG_INFO} -e ${def:C/.*=//} 2>/dev/null; ${ECHO}
-. if empty(_depend_${def:C/=.*//})
-${def:C/=.*//}= ${${def:C/=.*//}_DEFAULT}
-. else
-_dir_${def:C/=.*//}!= \
- (${PKG_INFO} -qp ${def:C/.*=//} 2>/dev/null) | \
- ${AWK} '{ print $$2; exit }'
-${def:C/=.*//}= ${_dir_${def:C/=.*//}}
-MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}}
-. endif
-. endif
-. endfor
-.endif
-
.for _pkg_ in ${BUILDLINK_PACKAGES}
#
# Add the proper dependency on each package pulled in by buildlink2.mk
@@ -243,7 +141,9 @@ MAKEFLAGS+= ${def:C/=.*//}=${_dir_${def:C/=.*//}}
# on <pkg>, otherwise we use a build dependency on <pkg>. By default,
# we use a full dependency.
#
-BUILDLINK_DEPMETHOD.${_pkg_}?= full
+. if !defined(BUILDLINK_DEPMETHOD.${_pkg_})
+BUILDLINK_DEPMETHOD.${_pkg_}= full
+. endif
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
_BUILDLINK_DEPMETHOD.${_pkg_}= DEPENDS
_BUILDLINK_RECMETHOD.${_pkg_}= RECOMMENDED
@@ -270,8 +170,8 @@ ${_BUILDLINK_RECMETHOD.${_pkg_}}+= \
# a list of all of the files installed by <pkg>. This list is relative to
# ${BUILDLINK_PREFIX.<pkg>}.
#
-BUILDLINK_PLIST_CMD.${_pkg_}= \
- ${PKG_INFO} -f "${BUILDLINK_PKGBASE.${_pkg_}}-[0-9]*" | \
+BUILDLINK_PLIST_CMD.${_pkg_}= \
+ ${PKG_INFO} -f ${BUILDLINK_PKGBASE.${_pkg_}} | \
${SED} -n '/File:/s/^[ ]*File:[ ]*//p'
.endfor
@@ -368,9 +268,8 @@ _BUILDLINK_USE: .USE
;; \
esac; \
pkg_prefix=; \
- if [ -n "${BUILDLINK_PKGBASE.${.TARGET:S/-buildlink//}}" ] && \
- ${PKG_INFO} -qe "${BUILDLINK_PKGBASE.${.TARGET:S/-buildlink//}}-[0-9]*"; then \
- pkg_prefix=`${PKG_INFO} -qp "${BUILDLINK_PKGBASE.${.TARGET:S/-buildlink//}}-[0-9]*" | ${AWK} '{ sub("${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}", "", $$2); sub("/", "", $$2); print $$2; exit }'`/; \
+ if [ -n "${BUILDLINK_PKGBASE.${.TARGET:S/-buildlink//}}" ]; then \
+ pkg_prefix=`${PKG_INFO} -qp ${BUILDLINK_PKGBASE.${.TARGET:S/-buildlink//}} | ${AWK} '{ sub("${BUILDLINK_PREFIX.${.TARGET:S/-buildlink//}}", "", $$2); sub("/", "", $$2); print $$2; exit }'`/; \
fi; \
rel_files_cmd=; \
if [ -n "${BUILDLINK_FILES_CMD.${.TARGET:S/-buildlink//}:Q}" ]; then \
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 9c11442e32f..572c6d4cb96 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.138 2004/04/06 04:39:00 xtraeme Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.139 2004/04/12 19:37:03 tv Exp $
#
# An example package buildlink3.mk file:
#
@@ -72,109 +72,6 @@ BUILDLINK_DEPENDS?= # empty
# For each package we use, check whether we are using the built-in
# version of the package or if we are using the pkgsrc version.
#
-.for _pkg_ in ${BUILDLINK_PACKAGES}
-CHECK_BUILTIN.${_pkg_}= yes
-.endfor
-.include "../../mk/buildlink3/bsd.builtin.mk"
-
-_BLNK_PKGVAR?= ${PKGBASE:S/++$/xx/:S/+$//}
-
-# Try to include buildlink3.mk files for any dependencies that are already
-# installed on the system. This tries to handle the situation where the
-# installed package and the package as it exists in pkgsrc have differing
-# lists of dependencies. If the package directory has moved or been
-# removed from pkgsrc, then set BUILDLINK_INSTALLED_PKGSRCDIR.<pkg> to the
-# correct PKGPATH for that package or to the empty value if it has been
-# removed.
-#
-.if !defined(_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR})
-_BLNK_INSTALLED_DEPS= # empty
-. for _pkg_ in ${BUILDLINK_PACKAGES}
-BUILDLINK_DEPMETHOD.${_pkg_}?= full
-. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull) && \
- !empty(USE_BUILTIN.${_pkg_}:M[nN][oO])
-BUILDLINK_PKGBASE.${_pkg_}?= ${_pkg_}
-#
-# XXX This should really recursively walk through the dependency list.
-# XXX This check here for "${BUILDLINK_PKGBASE.<pkg>}-[0-9]*" is also
-# XXX not pkgviews-friendly; it should really be using
-# XXX BUILDLINK_DEPENDS.<pkg> in some way.
-#
-_BLNK_INSTALLED_DEPS.${_pkg_}!= \
- pkg="${BUILDLINK_PKGBASE.${_pkg_}}-[0-9]*"; \
- found=`${PKG_BEST_EXISTS} "$$pkg"`; \
- pkgdep=; \
- if [ -n "$$found" ]; then \
- pkgdep=`${PKG_INFO} -qf "$$found" | ${SED} -n "s/^@pkgdep[ ]*//p"`; \
- fi; \
- ${ECHO} "$$pkgdep"
-_BLNK_INSTALLED_DEPS+= ${_BLNK_INSTALLED_DEPS.${_pkg_}}
-. endif
-. endfor
-_BLNK_INSTALLED_DEPPKGS= # empty
-. for _dep_ in ${_BLNK_INSTALLED_DEPS}
-_BLNK_TMP_PKGNAME!= found=`${PKG_BEST_EXISTS} "${_dep_}"`; ${ECHO} "$$found"
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGNAME:C/-[^-]*$//}
-#
-# Map package names into buildlink package variable equivalents when it
-# differs from the PKGBASE for that package.
-#
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/++$/xx/:S/+$//}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/--$/mm/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^PAM$/pam/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^freetype-lib$/freetype/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^gettext-lib$/gettext/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libaudiofile$/audiofile/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libgetopt$/getopt/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libiconv$/iconv/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libtool-base$/libtool/}
-_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:C/^py[0-9][0-9][^-]*-/py-/}
-_BLNK_INSTALLED_PKGNAME.${_BLNK_TMP_PKGVAR}:= ${_BLNK_TMP_PKGNAME}
-_BLNK_INSTALLED_DEPPKGS:= \
- ${_BLNK_INSTALLED_DEPPKGS:N${_BLNK_TMP_PKGVAR}} \
- ${_BLNK_TMP_PKGVAR}
-. undef _BLNK_TMP
-. undef _BLNK_TMP_PKGVAR
-. undef _BLNK_TMP_PKGNAME
-. endfor
-_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}= # empty
-. for _pkg_ in ${_BLNK_INSTALLED_DEPPKGS}
-#
-# We are using the pkgsrc-installed dependency, so clearly we must not be
-# using any built-in version of the same software.
-#
-USE_BUILTIN.${_pkg_}= no
-#
-# If BUILDLINK_PKGSRCDIR.<pkg> is already defined (by a previous inclusion
-# of <pkg>'s buildlink3.mk file), then make that the default value for
-# BUILDLINK_INSTALLED_PKGSRCDIR.<pkg>. Otherwise, try to dig it out of
-# the +BUILD_INFO file of the installed package.
-#
-. if defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}}
-. endif
-. if !defined(BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_})
-BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}!= \
- dir=`${PKG_INFO} -qB "${_BLNK_INSTALLED_PKGNAME.${_pkg_}}" | ${SED} -n "s/^PKGPATH=//p"`; ${ECHO} "../../$$dir"
-. endif
-. if exists(${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}}/buildlink3.mk)
-_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}+= \
- ${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}}
-. endif
-. endfor
-.endif
-.for _dir_ in ${_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}}
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-. include "${_dir_}/buildlink3.mk"
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
-.endfor
-
-# For each package we use, check whether we are using the built-in
-# version of the package or if we are using the pkgsrc version.
-#
-.for _pkg_ in ${BUILDLINK_PACKAGES}
-CHECK_BUILTIN.${_pkg_}= no
-.endfor
.include "../../mk/buildlink3/bsd.builtin.mk"
# Check whether we should include the X11 buildlink3.mk file here since
@@ -200,22 +97,21 @@ PKG_FAIL_REASON+= \
# We can then check for this value to avoid build loops.
#
.for _pkg_ in ${BUILDLINK_PACKAGES}
-IGNORE_PKG.${_pkg_}?= no
. if defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-. if (${BUILDLINK_PKGSRCDIR.${_pkg_}:C|.*/([^/]*/[^/]*)$|\1|} == ${PKGPATH})
+. if !defined(IGNORE_PKG.${_pkg_}) && \
+ (${BUILDLINK_PKGSRCDIR.${_pkg_}:C|.*/([^/]*/[^/]*)$|\1|} == ${PKGPATH})
IGNORE_PKG.${_pkg_}= yes
-BUILDLINK_VARS+= IGNORE_PKG.${_pkg_}=${IGNORE_PKG.${_pkg_}}
+MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNORE_PKG.${_pkg_}}
. endif
. endif
.endfor
# _BLNK_PACKAGES contains all of the unique elements of BUILDLINK_PACKAGES
-# that shouldn't be ignored.
+# that shouldn't be skipped.
#
_BLNK_PACKAGES= # empty
.for _pkg_ in ${BUILDLINK_PACKAGES}
-. if empty(_BLNK_PACKAGES:M${_pkg_}) && \
- empty(IGNORE_PKG.${_pkg_}:M[yY][eE][sS])
+. if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_})
_BLNK_PACKAGES+= ${_pkg_}
. endif
.endfor
@@ -239,8 +135,7 @@ _BLNK_RECURSIVE_DEPENDS+= ${_pkg_}
_BLNK_DEPENDS= # empty
.for _pkg_ in ${BUILDLINK_DEPENDS}
USE_BUILTIN.${_pkg_}?= no
-. if empty(_BLNK_DEPENDS:M${_pkg_}) && \
- empty(IGNORE_PKG.${_pkg_}:M[yY][eE][sS]) && \
+. if empty(_BLNK_DEPENDS:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) && \
!empty(_BLNK_PACKAGES:M${_pkg_}) && \
!empty(USE_BUILTIN.${_pkg_}:M[nN][oO])
_BLNK_DEPENDS+= ${_pkg_}
@@ -367,7 +262,6 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}}
# information for <pkg>
#
# BUILDLINK_PKGNAME.<pkg> the name of the package
-# BUILDLINK_PKGBASE.<pkg> the name of the package without the version
#
# BUILDLINK_IS_DEPOT.<pkg> "yes" or "no" for whether <pkg> is a
# depoted package.