Up to [cvs.NetBSD.org] / pkgsrc / mk / pkgformat / pkg
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
mk: Add support for stricter USE_INDIRECT_DEPENDS. The current and historical behaviour is that the BUILDLINK_DEPMETHOD for a package defaults to "full", regardless of what any parent package that included it has set for its BUILDLINK_DEPMETHOD. In addition, only direct dependencies and indirect "build" dependencies are logged as dependencies in the files that are used for check-shlibs verification and package dependency metadata for pkg_install. Any indirect "full" dependency is ignored. This combination of factors can lead to a broken package being produced. A package may end up linking against a pkgsrc library, but because it is an indirect dependency, and because indirect "full" dependencies are not registered, check-shlibs will have no knowledge of it and has to assume that it is correct. This situation will occur if any packages that are a parent dependency of the required library have set BUILDLINK_DEPMETHOD to "build". To mitigate this problem, a more accurate algorithm is implemented to calculate BUILDLINK_DEFAULT_DEPMETHOD for each package based on the setting of its parent(s), rather than simply defaulting to "full". If USE_INDIRECT_DEPENDS is enabled, then the output of this algorithm is used, and both "build" and "full" indirect dependencies are calculated and added to the dependency metadata files. check-shlibs can then use this extra information to issue an error if a library is found to belong to an indirect build dependency. Unfortunately due to buildlink3.mk inclusion guards, we cannot currently guarantee that the BUILDLINK_DEFAULT_DEPMETHOD setting for each package is 100% accurate, and so there may be the occasional false positive when USE_INDIRECT_DEPENDS is enabled. For this reason it is currently not enabled by default, but it is strongly recommended that developers, and especially anyone producing public binary packages, enable it.
mk: Minor improvements to resolve-dependencies. * Remove useless use of cat. * Remove pointless renaming of _DEPENDS_FILE * Exclude unsupported depends types earlier in the loop.
Introduce TEST_DEPENDS. Place them in ALL_DEPENDS iff PKGSRC_RUN_TESTS is set, so that bulk builds will pick them up.
Split BUILD_DEPENDS into TOOL_DEPENDS and BUILD_DEPENDS in mk/. Build depends are target packages that are needed at build-time for, e.g., static libraries to link against, header files to include, &c. Tool depends are native packages that are needed at build-time for, e.g., compilers/linkers/&c. to run. ok agc
Rename "flavor" to "pkgformat". This is from Anton Panev's GSoC 2011 project to add RPM and DPKG support to pkgsrc. (I am not adding that further support in this commit.) This is just a rename of the existing functionality. Now it will be easy to test the GSoC work by simply putting in a single directory (such as "rpm" or "deb"). See http://addpackageforma.sourceforge.net/ for some details. This is from Anton's CVS, but I made some minor changes: - changed plural pkgformats to singular pkgformat (to be consistent) - fixed a few places (in comments) that were missed - catch up on some additions to flavor not in the pkgforma cvs: PKGSRC_SETENV and _flavor-destdir-undo-replace and undo-destdir-replace-install.