Up to [cvs.NetBSD.org] / pkgsrc / mk / platform
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
mk: Use "${CC} -E" as CPP on OmniOS
OmniOS does not have cpp(1) in its standard PATH. It has /usr/lib/cpp,
which works mostly like the standard cpp(1) but lacks support of many
standard options. It appears /usr/lib/cpp is some kind of implementation
detail and users aren't expected to execute it directly.
Several months ago I committed a change to mk/tools/tools.SunOS.mk so that
packages could use ${CPP} by declaring "USE_TOOLS+=cpp". This turned out to
be a bad idea for many reasons:
1. Packages expect ${CPP} to be usable without declaring anything.
2. Some packages want to use ${CPP} not only at build time but also at run
time. Having a symlink in ${WRAPPER_BINDIR} isn't useful in this case.
3. Some packages (rightfully) expect that ${CPP} supports -o FILE, which
/usr/lib/cpp doesn't support.
By setting "${CC} -E" to CPP we can now build and use
devel/gobject-introspection, as well as lang/ghc910 on OmniOS.
mk: Switch KRB5_DEFAULT default to mit-krb5. More OS include this than heimdal, and for OS that do not provide either, building the pkgsrc version is a lot more portable. Retain heimdal as the default on NetBSD and FreeBSD, since they include it in their base system. via dreckly, original author jperkin@
mk: Remove _OPSYS_HAS_OSSAUDIO, use oss.buildlink3.mk/OSS_TYPE "please remove it" wiz@
mk: Limit the unlimited stacksize on SunOS. The default hard limit of stacksize on SunOS is "unlimited". If this is set as the soft limit then stack_getbounds(3C) returns the top of the stack as the address with a size of zero. This can confuse stack guard allocators such as the one used by lang/rust which then try to allocate a guard page. Instead set an arbitrary limit of 128MB which should be more than enough, and fixes the build of lang/rust.
mk: Remove _OPSYS_PERL_REQD. It's not 2003 anymore, all platforms use the same perl, we don't support system perl, and this saves calls to pkg_admin for every perl-using package. From Jonathan Perkin <jperkin@smartos.org> via drecklypkg commit $18912d81e683c25b2fec0b7506dfbe421e5b2a90
mk/platform/SunOS.mk: Don't run SSP check on OmniOS The way mk/check/check-ssp-elf.awk checks if SSP is enabled is suboptimal atm. It runs readelf(1) on ELF objects and sees if they have DT_NEEDED to libssp. However, GCC on this platform no longer links objects with libssp because its symbols have been moved to libc. They didn't remove libssp.so, presumably for backwards compatibility, but it has no symbols at all.
mk/platform/SunOS.mk: OmniOS: Extract files on a UTF-8 locale Otherwise bsdtar cannot extract files whose path contains non-ASCII characters.
OmniOS: Use bsdtar for extraction by default
mk: Switch SunOS to default mit-krb5 from pkgsrc. The version supplied in the platform image is quite old at this point and causes build issues in e.g. py-gssapi that will take some work to fix, and this is likely to only get worse over time.
mk: Add memrchr as a potential missing feature It's missing on (all?) Darwin up to 11 and Solaris 10
mk/platform: Introduce a new OPSYS_HAS_POSIX_SPAWN variable.
mk/platform: Remove old SunOS --rpath transformation. This is already handled in cwrappers, if necessary.
mk: Remove generic SunOS linker argument removals. While these were useful in helping many packages to build out of the box, it ended up resulting in some packages installing broken configuration files as their configure tests for supported flags were passing. For example, ruby packages were shipping an rbconfig.rb with LDFLAGS containing -Wl,--no-as-needed, resulting in any ruby software built outside of pkgsrc that required a compiler always failing.
mk: Limit mktools to SunOS 5.11 and newer. Older releases don't have err.h, and I don't want to have to bring in nbcompat yet. Fixes PR#57040.
mk: Enable mktools on supported platforms. The default is now auto detection, which will enable mktools on platforms that have set _OPSYS_SUPPORTS_MKTOOLS. Users can still override either way via PKGSRC_USE_MKTOOLS. Please add and enable on other platforms once they have been verified.
mk: Add OPSYS_EXPLICIT_LIBDEPS and enable on SunOS. Most systems use GNU ld, which will happily pull in symbols required by a program even if they are only available via implicit library dependencies. The SunOS linker is stricter, and if a program uses a symbol then the library that defines that symbol must be an explicit dependency. This mostly causes problems with libiconv and libintl, both of which Linux bundles in its C library, so a lot of third-party software does not correctly check for them. Until now we've had to add many, many overrides, along with variables such as BROKEN_GETTEXT_DETECTION which nowadays only has limited effectiveness. The situation appears to be getting worse, especially with software built with meson, and so both libiconv and gettext-lib will now automatically add the correct LDFLAGS if the OPSYS sets OPSYS_EXPLICIT_LIBDEPS=yes. This isn't perfect. For one it isn't really an OPSYS setting as you can try to use GNU ld on SunOS, it just doesn't work very well. It should also really be done via the wrappers rather than exposing LDFLAGS, but we do not yet have an approved patch for doing this. However it does improve the current situation.
mk: Use OPSYS_VERSION where appropriate. Should improve readability and in some cases avoid potential failure due to string comparisons being used. No other functional change intended.
mk: Register strnlen as missing on Solaris 10 adapted from PR pkg/56511 from pekdon
mk: bmake cannot compare non-integers numerically. Just use an empty() match instead.
mk: Add CTF infrastructure support. Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the user enables support by setting PKGSRC_USE_CTF=yes, and packages can explicitly disable support with CTF_SUPPORTED=no or skip certain files with CTF_FILES_SKIP. The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert. If all of the requisite variables are enabled, a compiler-specific debug flag is passed via the wrappers to ensure we have DWARF information to convert, _INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped prior to conversion, and the conversion is performed during the install stage. It is recommended that users who enable the feature also set STRIP_DEBUG=yes to reduce the final binary size once the conversion has been performed. This has been used for the past year in Joyent SmartOS builds. FreeBSD is marked as supported but is untested.
Optionally detect whether the compiler supports "-fstack-protector-strong". If not, set _OPSYS_SUPPORTS_SSP=no during bootstrap and in mk.conf. Do SSP detection on "SunOS", and let mk/platform/SunOS.mk's default "yes" be overridden in mk.conf. No change to generated mk.conf on NetBSD 8 or CentOS 6. Fixes bootstrap on Tribblix.
mk/platform: Remove unsupported Darwin/SunOS linker arguments.
Set LIBABISUFFIX correctly on SunOS/sparc64. Tested by Jörn Clausen as part of PR#52250.
Default to pkgsrc terminfo. The curses default was switched to pkgsrc a while ago, but since then any packages that included both curses and terminfo ended up with conflicting BUILDLINK_TRANSFORM entries, leaving it to include ordering to determine whether the builtin or pkgsrc curses was used. This keeps them in sync, at least by default, though ideally we'd ensure that at an infrastructure level.
Mark SunOS as _INCOMPAT_CURSES, there are lots of issues with the recent work to use the curses framework and this is the simplest solution for now.
Add support for enabling cwrappers automatically. USE_CWRAPPERS now defaults to "auto", which will enable cwrappers if the _OPSYS_SUPPORTS_CWRAPPERS platform variable is set to "yes". Switch over to cwrappers by default for Darwin, Linux, and SunOS (except when using the sunpro compiler).
Support UNLIMIT_RESOURCES=cputime on SunOS.
Re-arrange support for FORTIFY/MKPIE/RELRO/SSP - No _GCC_* anything in mk/bsd.prefs.mk; - No compiler flags in platform files. Tested again on NetBSD/amd64, with and without cwrappers, with the same outcome. With feedback from jperkin@
Add support for a number of security features - Revisit (and rename) support for FORTIFY as PKGSRC_USE_FORTIFY (instead of PKGSRC_USE_FORT) for easier support outside NetBSD/gcc; - PKGSRC_USE_SSP is no longer enabled by default when PKGSRC_USE_FORTIFY is enabled; - PKGSRC_MKPIE builds executables as PIE (to leverage userland ASLR) - PKGSRC_USE_RELRO builds with a read-only GOT to prevent some exploits from functioning. Tested on NetBSD/amd64 by myself, in every combination, with and without pkgtools/cwrappers. MKPIE is not supported at the moment with cwrappers. Also, MKPIE is known to still break a number of packages when enabled (and actually supported). Tested on SunOS by jperkin@, thank you! As discussed on tech-pkg@, the default behavior is not changed, except where noted above. ok bsiegert@
Strip --enable-new-dtags GNU ld arg on Darwin and SunOS.
Remove _OPSYS_WHOLE_ARCHIVE_FLAG and _OPSYS_NO_WHOLE_ARCHIVE_FLAG, these variables are unused and in at least one case were completely wrong anyway.
Always set _OPSYS_CAN_CHECK_SHLIBS to "yes" regardless of whether TOOLS_PATH.readelf is set. This is a PKG_DEVELOPER feature and it's likely the developer is smart enough to either have it already available in $PATH or be able to install it (e.g. via devel/binutils) if required.
GCC on SunOS supports a non-standard -mimpure-text argument which clang does not have, so remove it unconditionally in the latter case. Fixes various packages.
Default to the native getopt when available.
Stop defaulting to the builtin mit-krb5, it's an old copy which is unlikely to be updated any time soon, and is preventing some Samba Kerberos features from working correctly.
Report that SunOS 5.10 and older don't have "err.h". Change during freeze approved by Jonathan Perkin.
Expand --version-script removals for SunOS back out into package Makefiles rather than trying to consolidate into a single fnmatch. There aren't that many of them, and it will aid the integration of cwrappers which doesn't support globs.
Expand out the list of GNU ld flags we want to remove, rather than applying a blanket removal of any long options, richard@ is concerned this may affect packages which use the long options now available in newer SunOS ld. Whilst here, transform --rpath to -R, used by a few packages.
Remove any -Wl,--* arguments, they are guaranteed to be GNU ld specific and unsupported by the SunOS linker. Tested to only have positive results in a bulk build.
Add -Wl,-export-dynamic to the list of GNU ld patterns to remove.
Introduce infrastructure support for SMF.
SMF is the Service Management Facility, the default init system in
Solaris and derivatives since version 10. This adds "smf" to the list
of supported INIT_SYSTEM types, and makes it the default init system on
platforms where it is available.
Packages can introduce SMF support by providing a manifest file, by
default located in ${FILESDIR}/smf/manifest.xml but manifests under
${WRKSRC} can be used too if the package source includes one.
SMF method scripts are supported too if required, using SMF_METHODS in a
similar manner to RCD_SCRIPTS.
Many parts of the SMF infrastructure are configurable, see mk/smf.mk for
the full details.
Introduce CATMAN_SECTION_SUFFIX which if set to 'yes' will ensure that catman pages are installed with a suffix which matches their section instead of the default '.0'. Enable it by default on SunOS, which requires that particular layout.
Introduce _OPSYS_PREFER.<pkg> variables as a way to set an advisory per-platform default. Previously PREFER.<pkg> was used, and as that has the highest precedence it meant the defaults could not be overridden with the PREFER_PKGSRC and PREFER_NATIVE user variables. While here, set the openssl default for SunOS back to pkgsrc, now that users who wish to use the builtin can do so via PREFER_NATIVE=openssl.
fix openssl builtin support, at least for solaris
Use the native mit-krb5 implementation by default on SunOS.
Default to using the native version of libexecinfo on SunOS.
Apply removal of -export-dynamic for SunOS across all of pkgsrc. Avoids lots of copy/paste and fixes a bunch of packages which hadn't been looked at yet.
_OPSYS_SYSTEM_RPATH must match _OPSYS_LIB_DIRS or else the buildlink substitutions will not be correct. Fixes issue with ABI=64 where /usr/lib/amd64 was being exposed, but packages will need to be rebuilt for the change to take effect.
Introduce _OPSYS_LIB_DIRS and _OPSYS_INCLUDE_DIRS varables. list of system library and header file directories. Also add missing _OPSYS_SYSTEM_RPATH for some platforms.
Enable check-shlibs if the user supplies a working readelf, e.g. from binutils.
Prefer openssl from pkgsrc on SunOS by default.
Set LIBABISUFFIX on SunOS x86_64. Should probably also be done for sparcv9, but I can't test that.
Default to builtin solaris-pam, allows PREFER_PKGSRC=yes to work.
Make MOTIF_TYPE_DEFAULT as motif (LGPL Motif) instead of openmotif or lesstif. No objection on tech-pkg@.
Default to X11_TYPE?=modular if OpenWin headers are not installed.
Drop imake-check logic from X11 components' builtin.mk. Always use xorg-cf-files and imake from pkgsrc, replacing xpkgwedge. Always install man pages, not cat pages when using imake. Unify the various imake PLIST variables in preparation for dropping. Adjust xbattbar for the new expectations.
Use ${MAKE} as IMAKE_MAKE.
Default to lesstif instead of dt if X11_TYPE != native.
From "What platforms work with X11_TYPE=native" thread on pkgsrc-users. Based on the responses I'm going to switch the default X11_TYPE to be modular, and override in platform/*.mk files as required. The new values will be: Changed - from native to modular - FreeBSD - FreeMiNT - Linux Changed - older versions switched from native to modular - NetBSD - native for NetBSD-4 and later Native (unchanged) - should probably be switched to modular - AIX - BSDOS - IRIX - Interix - MirBSD - UnixWare Native (unchanged) - Darwin - for Leopard (10.5) and later - OpenBSD.mk - SunOS.mk Modular (unchanged) - DragonFly - HPUX - Haiku - OSF1 I'd like to encourage anyone using X11 apps on any platforms other than NetBSD, Darwin, DragonFly, FreeBSD, Linux, FreeMiNT, HPUX, Haiku or OSF1 to speak up, whether they are happy with native or having to set modular.
Begin cleanup of setgid game infrastructure. * Introduce USE_GAMESGROUP, which causes the games user and group to be made available. * Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as deprecated. * Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not. * Define these variables in defaults/mk.conf instead of separately in every platform/*.mk file. The definitions used to be the same for each of these platforms anyway, except for some where they were randomly missing or commented out for no clear reason, leading to broken game packages. * Handle all these variables properly when unprivileged. * Update the comments/documentation for these variables. * Describe GAMEOWN and GAMEGRP as deprecated. These need to be retained as aliases for GAMES_USER and GAMES_GROUP respectively for supporting packages that use bsd.*.mk but should otherwise not be used. * Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and GAMEDIRMODE respectively. * Fix a bug I noticed that was improperly mixing the "games" group and "games" user. Things this does *not* do: - get rid of GAMES_USER, for which there should ultimately be no need. - move the declaration/documentation/default value of USE_GAMESGROUP to a suitable place. (It is currently where SETGIDGAME was, which is suboptimal.) - touch any of the games, all of which need updating with at least s/SETGIDGAME/USE_GAMESGROUP/ and probably more. - update the guide to explain how to handle games properly. Also, it would be nice if using GAMES_GROUP without setting USE_GAMESGROUP=yes caused an error but as far as I know there isn't any particularly good way to arrange this right now. Note that these changes may alter the build/install behavior of broken game packages, e.g. some may silently become setgid when they weren't before or things like that. If you run into any of this file a PR. While one might arguably bump the PKGREVISION of all games or other packages using any of these variables as a precaution, that seems like a bad idea. Instead, I think I will be bumping each game once it itself has been fixed up to do everything the right way.
Force libtool 2.2 on all platforms.
Get rid of an abstraction violation which has been in the tree since March 2008. Not vital, but the previous way does not scale well/at all.
While user/group 'games' does not exist by default on Solaris, it will get created correctly if SETGIDGAME=yes and this avoids ugly errors from check-files.mk
Solaris useradd requires a full path to the shell.
+ Conditionally add GAMES_USER and GAMES_GROUP to the platform *.mk
files. These variables are currently usable if ${SETGIDGAME} == yes.
These variables should be used when describing ownership of files
and directories to the pkginstall framework, e.g.
SPECIAL_PERMS= bin/foogame ${GAMES_USER} ${GAMES_GROUP} 2555
+ Rename SETGID_GAME_PERMS to SETGID_GAMES_PERMS because the default
group name is "games".
+ Define SETGID_GAMES_PERMS in terms of GAMES_USER and GAMES_GROUP so
that these names are protected from the normal flow of unprivileged.mk.
This fixes the +INSTALL scripts in "user-destdir" packages to
correctly refer to the games:games instead of the user:group of the
user that built the packages.
Added the feature "asprintf", since Solaris 10 doesn't provide it. The
missing feature is defined in the platform-specific file, which is more
elegant than adding even more of those ".if ${OPSYS} == ..." conditions.
Reverted the last changes, which factored out some definitions that are usually the same on the supported platforms. The reason for having duplicate code in these files is to make it easier to port pkgsrc to a new platform: You just have to copy one of the existing platform files and edit the values in it. With some values factored out, you would have to look at one more file. Pointed out by agc@.
Factored out the parts that are common between all the supported platforms, mainly because it wouldn't have made sense to document the variables in one of those files, but they need to be documented somewhere. Added the file defaults.mk, which now serves as the reference document which provides useful default values and _explains_ the variables.
* Add new emulator framework in pkgsrc/mk/emulator that handles all
binary-only packages that require binary "emulation" on the native
operating system. Please see pkgsrc/mk/emulator/README for more
details.
* Teach the plist framework to automatically use any existing
PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition.
* Convert all of the binary-only packages in pkgsrc to use the
emulator framework. Most of them have been tested to install and
deinstall correctly. This involves the following cleanup actions:
* Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM}
more consistently.
* Simplify packages by using default INSTALL and DEINSTALL scripts
instead of custom INSTALL/DEINSTALL code.
* Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc.
Packages only need to state exactly which emulations they support,
and the framework handles any i386-on-x86_64 or sparc-on-sparc64
uses.
* Remove "USE_NATIVE_LINUX" from pkgsrc. The framework will
automatically detect when the package is installing on Linux.
Specific changes to packages include:
* Bump the PKGREVISIONs for all of the suse100* and suse91* packages
due to changes in the +INSTALL/+DEINSTALL scripts used in all
of the packages.
* Remove pkgsrc/emulators/suse_linux, which is unused by any
packages.
* cad/lc -- remove custom code to create the distinfo file for
all supported platforms; just use "emul-fetch" and "emul-distinfo"
instead.
* lang/Cg-compiler -- install the shared libraries under ${EMULDIR}
instead of ${PREFIX}/lib so that compiled programs will find
the shared libraries.
* mail/thunderbird-bin-nightly -- update to latest binary
distributions for supported platforms.
* multimedia/ns-flash -- update Linux version to 9.0.48 as the
older version is no longer available for interactive fetch.
* security/uvscan -- set LD_LIBRARY_PATH explicitly so that
it's not necessary to install library symlinks into
${EMULDIR}/usr/local/lib.
* www/firefox-bin-flash -- update Linux version to 9.0.48 as the
older version is no longer available for interactive fetch.
Remove RSH definition.
Kill ancient runes: /usr/local as LOCALBASE was not the default for ages and mk.conf from bootstrap sets it explicitly anyway. The pkg_install stuff also lives in sbin.
Always use LOCALBASE setting from mk/defaults/mk.conf. Setting it with ?= in the platform files is a nop anyway.
Remove USE_GNU_GETTEXT from pkgsrc. Packages generally only needed it for plurals support, but that is already handled correctly (FSVO "correctly") by the pkgsrc/mk/tools/msgfmt.sh script. Also remove _USE_GNU_GETTEXT definitions from pkgsrc/mk/platform/*.mk files as that value has been unused by pkgsrc for quite some time (going back several branches).
Remove ${SED} check that no longer works.
EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag.
Add INSTALL_GAME_DIR to complement INSTALL_GAME_DATA. The directories are group-writeable by the games user on those platforms, where GAMEMODE includes setgid. It defaults to PKGDIRMODE otherwise.
require libtool >=1.5.22nb3 for /bin/sh fix.
Remove leftover code sections guarded by _USE_PLIST_MODULE which was mainlined long ago.
Initial commit of a new module that encapsulates all of the code
for manipulating PLISTs. This module is not used by default pending
more widespread testing -- currently the variable _USE_PLIST_MODULE
must be defined in /etc/mk.conf to enable its use.
The main features of the new PLIST module are:
(1) Splits out the PLIST-handling code from bsd.pkg.mk into a
separate "plist" module.
(2) Splits out giant, multi-line awk scripts stored in make
variables into separate awk scripts that may be joined
together to post-process PLISTs. Each of these awk scripts
consolidates the processing for one set of files, e.g.,
man pages, info pages, etc., and is more easily commented
than a make variable.
(3) Splits out the print-PLIST code from the regular PLIST code
since they have no common pieces (print-plist.mk vs.
plist.mk).
(4) Completely re-implements the shared-library handling to be
more efficient. Along the way, this also fixes a problem
for Mac OS X users where the PLISTs incorrectly contained
absolute paths.
(5) Completely re-implements the info-file handling so that we
can migrate from INFO_FILES definitions to just adding
info/foo.info entries in the static PLISTs.
(6) Adds commented-out support for automatically compressed or
decompressed info page entries based on the value of MANZ.
These changes will be activated after texinfo.mk has been
replaced by something that is built using the more modern
primitives now available in pkgsrc.
(7) Move the file compression logic into a separate script
"doc-compress" that compresses or decompresses files while
minding symlinks. This script is now called by bsd.pkg.mk
to do the "autmoatic man page handling". In the future,
it will also handle the "automatic info page handling" and
possible others.
In general, the idea is to move stuff out of the Makefiles and into
separate files where we don't need to worry about quoting rules
and where each file can have a separate history of commits. This
simplifies the makefile logic (especially in terms of readability)
and also simplifies maintenance of the code.
Add IMAKE_GAMEMAN_SUFFIX and IMAKE_GAMEMAN_DIR to allow PLISTs to pick up the correct locations. XXX Default values are guessed, x11/xsnow can be used for testing
Fix typo.
Replace references of pkgsrc/mk/bsd.pkg.defaults.mk to pkgsrc/mk/defaults/mk.conf. This is from PR 30741 from anonymous AT example.net.
IMAKE_FILEMAN_SUFFIX is 4 on Solaris and (as I read it) OSF1 and UnixWare.
Turn IMAKE_MAKE into a public variable that may be set via /etc/mk.conf.
OpenWindows imake installs manual pages to different locations than where the XFree86/xorg ones do.
Remove the old tools framework and references to _USE_NEW_TOOLS.
sync [all but bsd.pkg.mk] with HEAD
Nuke stray GZIP definitions that I missed in a previous commit.
First pass at converting pkgsrc to use the new tools framework (still not on by default). Separate out the variable defintions that are now made by the new tools framework. Some of the trickier platforms (AIX, IRIX, Interix, OSF1) still need more work.
Back out part of a change from revision 1.756 of bsd.pkg.mk. It was
a mistake to include "GZIP" as an ${OPSYS}-specific variable as there
is nothing ${OPSYS}-specific there to tune. Define GZIP in
defaults/mk.conf instead, and remove the definition from each of the
existing platform/${OPSYS}.mk files.
sync with HEAD
Fix a gleaming illustration of why using YES/NO variables everywhere possible, just for the sake of doing so, is not a good thing to do: The platform files define _STRIPFLAG_* to determine whether to strip things. But since this is included in bsd.prefs.mk, ".if ..." checks cannot take things set in the Makefile into account. So convert INSTALL_UNSTRIPPED=YES to a defined/undefined variable check in bsd.pkg.mk, and use the :D:U idiom in the _STRIPFLAG_* variables. This should fix PR pkg/28772 and PR pkg/29031.
sync with HEAD
Don't make pkgsrc depend on dc(1) to be present in the system. Since we already use awk so pervasively in pkgsrc, simply use awk in place of dc for simple computations.
Relax need to put GNU_CONFIGURE before inclusion of bsd.prefs.mk: Convert _OPSYS_MAX_CMDLEN to a plain _OPSYS_MAX_CMDLEN_CMD variable, which is not evaluated by a shell until CONFIGURE_ENV is expanded (and only then if USE_LIBTOOL+GNU_CONFIGURE are both set).
Revert previous (re-add common CPP_PRECOMP_FLAGS). For consistency, also move usage of _USER_DEPENDS and _OPSYS_MAX_CMDLEN to bsd.pkg.mk.
CPP_PRECOMP_FLAGS is a Darwinism only. Move its frobbing of CPPFLAGS to platform/Darwin.mk (simplification).
Set some _OPSYS_SHLIB_TYPE to precisely 'ELF' on platforms where a.out is not being used by pkgsrc at all. This saves some build time in show-shlib-type.
Make strip/no-strip choice more consistent: Move check for INSTALL_UNSTRIPPED to the platform/*.mk files, alongside existing check for DEBUG_FLAGS.
`ulimit' can't parse localized messages of "unlimited"; force `ulimit -H ...' to print out the C-locale message. Problem reported by Hiroyuki Nakaji.
* Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOPDIR,
as it's only used internally by bsd.prefs.mk.
* Make _PKGSRCDIR a public variable by renaming it to PKGSRCDIR.
Also, generate its value from ${_PKGSRC_TOPDIR} so it's less fragile
than the old method of stripping off the last two components of
${.CURDIR}. PKGSRCDIR may now be used after bsd.prefs.mk is defined.
* Change all references to _PKGSRCDIR to PKGSRCDIR.
Reorganize some of the files under pkgsrc/mk:
(1) defs.${OPSYS}.mk --> platform/${OPSYS}.mk.
The "platform" subdirectory is where all of the ${OPSYS}-specific
infrastructure logic should reside.
(2) bsd.pkg.defaults.mk --> defaults/mk.conf
bsd.pkg.obsolete.mk --> defaults/obsolete.mk
Renaming bsd.pkg.defaults.mk to defaults/mk.conf is to mimic the way
that NetBSD has /etc/rc.conf as well as /etc/defaults/rc.conf, where
the latter is a full list of user-settable variables, and the two
files share the same name to reinforce the fact /etc/defaults/rc.conf
can be directly copied in place as /etc/rc.conf. This is the same
relationship shared by defaults/mk.conf and /etc/mk.conf.