Up to [cvs.NetBSD.org] / pkgsrc / mk / platform
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
mk: always set LC_CTYPE to a UTF-8 locale on NetBSD This fixes extraction of tar files with UTF-8 names on -current. See today's thread "Re: CVS commit: src/external/bsd/libarchive/dist/libarchive" on tech-userlevel for details.
mk: unconditionally set _OPSYS_SHLIB_TYPE for NetBSD to ELF True since about 2008. Saves a fork for every make(1) call in pkgsrc. Found by jperkin.
mk: Register support for RELRO on NetBSD/sparc64.
mk: accidentally dropped powerpc from conditional
mk: Close parentheses
mk: Register support for RELRO and SSP on NetBSD/mips.
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: 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/NetBSD.mk: Handle i386-on-amd64 builds. XXX This should be extended to other compat32-on-64bit builds, and the wackier variations on that theme one finds in MIPS systems -- may require spelunking through the ld emulation schemes in GNU binutils. PR pkg/51400
mk/platform/NetBSD.mk: Make default cross-built PKG_TOOLS_BIN nicer. `bootstrap --prefix /home/user/pkg' will create an mk.conf with PKG_TOOLS_BIN=/home/user/pkg/sbin, but if you are using that installation to cross-build packages, you likely want the default cross-built PKG_TOOLS_BIN to be /usr/pkg/sbin just like the default cross-built LOCALBASE is /usr/pkg. This change implements that. You can still override the cross-built PKG_TOOLS_BIN by setting CROSS_PKG_TOOLS_BIN in mk.conf. No change to native builds because the changed part is conditional on USE_CROSS_COMPILE = yes.
mk/platform: Introduce a new OPSYS_HAS_POSIX_SPAWN variable.
NetBSD supports CTF if /usr/bin/ctfconvert exists.
mk: Define OPSYS_HAS_CIRCLEQ on NetBSD versions before 10
mk: Define OPSYS_HAVE_EPOLL for NetBSD
mk/platform/NetBSD.mk: Query OS characteristics in _CROSS_DESTDIR. No change to native compilation. Step on the way to cross-OS builds.
Split native and cross LOCALBASE for cross-compilation.
This way, you can use an unprivileged prefix of ~/cross/pkg to
cross-compile packages that, when installed, will go in /usr/pkg.
In mk.conf:
- Set CROSS_LOCALBASE to determine the installation prefix of
packages that you cross-compile.
- Set LOCALBASE to determine the installation prefix of native
packages needed for cross compilation.
Both default to /usr/pkg. Note: CROSS_LOCALBASE defaults to /usr/pkg
even if you set LOCALBASE. Of course, if you're not cross-compiling,
this has no effect.
When cross-compiling a package:
- LOCALBASE is where cross-compiled packages will be installed.
(`make install' will put it in ${CROSS_DESTDIR}${LOCALBASE}, of
course, but when you later use pkg_add to install the binary
package on the system you're compiling it for, it will go in
${LOCALBASE}. And you can still set PREFIX for an individual
package, but LOCALBASE refers to where cross-compiled packages are
generally installed, other than the specific ones that override
PREFIX.)
- TOOLBASE is where tool dependencies are installed and available to
be executed at build-time.
For example, if you have TOOL_DEPENDS on a program that is
installed in (say) foo/bin/xyz which is not in PATH so you have to
refer ot its full pathname, you can execute ${TOOLBASE}/foo/bin/xyz
instead of ${LOCALBASE}/foo/bin/xyz.
I chose this split, rather than the other way around, because I
expect that references that are baked into installed packages to be
more common than references that are executed at build-time, but I
didn't do an extensive study of the matter. I chose the name
TOOLBASE because it's where TOOL_DEPENDS go.
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: set EXTRACT_ENV on NetBSD<9, seen on tech-pkg
mk/platform: Add a variable for detectic static PIE support.
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: For consistency, rename PKG_HAS_ to OPSYS_HAVE_. Requested by jperkin.
mk: Create per-platform PKG_HAVE_EVENTFD and PKG_HAVE_TIMERFD variables.
mk: Register support for RELRO on NetBSD/powerpc. Tested on macppc.
mk: Register support for MKPIE on more NetBSD archs, syncing with /usr/share/mk
various fixes for arm64 big endian support. most of these simply extend matching from "aarch64" to "aarch64eb" in various forms of code. most remaining uses in pkgsrc of "MACHINE_ARCH == aarch64" are because of missing aarch64eb support, such as most of the binary-bootstrap requiring languages like rust, go, and java. no pkg-bump because this shouldn't change packages on systems that could already build all of these.
Fix error, pointed out by jperkin, thanks
Simplify check, trust the user's PKGDB_DIR instead of second guessing it. Fixes bootstrapping a second prefix with /var/db/pkg existing. In a bootstrap scenario, PKGDB_DIR is defined, so this should just work.
Move the pkgdb compatibility error to a NetBSD-specific file to avoid breakage for users who have other package managers that use /var/db/pkg (Reported by Frederic Cambus on FreeBSD, OpenBSD) Adjust warning: specifying PKGDB_DIR in mk.conf should be sufficient for building packages for the compatibility pkgdb location. This is still an error message, because: - While we can handle the existing references of PKGDB_DIR, new ones might be created. - It is a minor inconvenience to people building packages from source.
Allow PIE and RELRO on aarch64 I already compiled plenty of packages on my Pinebook Pro with both PIE and RELRO enabled and have yet to see a build failure.
Add a ulimit flag for address space limits. Support it on NetBSD for now.
mk/platform/NetBSD.mk: Default to bsdtar
Native tar on NetBSD <=8 (and later, if MKBSDTAR is no) does not
handle archive formats increasingly being seen in pkgsrc. bsdtar
("libarchive tar") does, and is natively provided on NetBSD >=9.
pkgsrc already has a mechanism to use /bin/tar as the bsdtar tool when
it is bsdtar, so this change should not cause anything different on
NetBSD >= 9. On <=8, it will depend on archivers/bsdtar, which can
be built without using an extract tool, and which will then be broadly
usable.
As broadly discussed over multiple days on tech-pkg.
Add RELRO support for clang, based on the gcc logic.
Add initial support for building packages reproducibly It currently tackles two problems: - gcc(1) hard-coding full paths in debugging information (with one caveat at the moment) - ar(1) hard-coding user IDs in archive headers This allows packages built from the same tree and options to produce identical results bit by bit. This option should be combined with ASLR and PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to exploit security vulnerabilities. This is still disabled by default, and only supports NetBSD so far. As discussed on tech-pkg@
mk: Disable SSP checks on systems where it is provided in libc. The currently implementation of SSP checks simply look for a DT_NEEDED dependency on libssp, and doesn't yet have a way to check for it being enabled when it is done via libc.
Remove hack working around NetBSD 1.5's specfiles.
Disable fortify on netbsd<6. This appears to be causing issues with pkgsrc GCC attempting to insert builtins it does not have, because we don't build libssp. unbreaks icu build. there may be more problems from this issue in the future, but netbsd-7 is better tested now.
Don't bother with a version check for alpha cflags
Register support for PKGSRC_USE_STACK_CHECK This adds -fstack-check to the CFLAGS (with GCC on NetBSD x86). Only tested on NetBSD/amd64 so far. Disabled by default.
Implement a check for RELRO This is only performed if PKG_DEVELOPER and RELRO are in use. After a suggestion during my talk at BSDCan 2017; thanks! Also, submitted on tech-pkg@ for review mid-June. As a next step, it seems this can be extended to libraries, just like the check for SHLIBS does (from which this is inspired).
Move detection of shared library type into the platform file.
Only four platforms, all BSDs, need to resolve "ELF/a.out" into
either ELF or a.out. Calculate it directly in the platform file
and return the value in ${_OPSYS_SHLIB_TYPE} and export that value
in bsd.prefs.mk as ${SHLIB_TYPE}.
Instead of requiring the file(1) tool, we can expect the base
system of those BSDs to have /usr/bin/file, so make use of it
directly.
Enable cwrappers by default on NetBSD.
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@
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.
Add support for building with fortify This is pretty much the same change as with SSP, and completes it with support for fortify (like USE_FORT in NetBSD's base system). Like SSP, this is disabled by default for the moment. Like in NetBSD's base system, enabling fortify explicitly also enables SSP by default - but SSP can still be disabled explicitly in this situation. All four combinations tested on NetBSD/amd64.
More efficient check if SSP is enabled With this change, the check if the current architecture is supported is only performed if SSP is enabled in the first place. This should not change the current behavior; tested on NetBSD/amd64. Suggested by wiz@
Add support for compiling with stack-smashing protection This is enabled with PKGSRC_USE_SSP in mk.conf(5), as documented there. Most NetBSD platforms are supported (when compiling with gcc). After consensus on tech-pkg@.
Let's unconditionally depend on useradd on NetBSD. It has been in base since 1.4 at least.
Add a new ulimit modifier for cputime. Support raising limits for package creation. There are very few things in pkgsrc that needs more than one hour per process on decently fast hardware, so setting that as (soft) limit for bulk builds avoids the infinite loops seen in some other packages. There are a few select exceptions, i.e. flightgear-data needs more than one hour for pkg_create when using xz. This flag allows selectively giving those places more time without wasting resources in the broken cases.
Default to X11_TYPE=modular on netbsd-5. Base xsrc on netbsd-5 has not really worked with pkgsrc for a while, because various programs need newer versions of various X pieces. The 2014Q2 official bulk builds are missing about 1500 packages as a result of this. Therefore, switch to modular on netbsd-5 (as netbsd-4 has been for a very long time), which should result in more useful binary packages for netbsd-5 for 2014Q3. (There is a notion of updating netbsd-5 base xsrc to more modern xorg. If that happens, and there's a 5.x formal release, and builds show that pkgsrc with native succeeds on it, this can perhaps be flipped back. Odds are that's not going to happen, and it's overwhelmingly unlikely to happen soon.) Anyone who prefers to stay with native can set X11_TYPE=native in mk.conf. Note that this is about pkgsrc and specifically the default dependencies for pkgsrc programs that use X11, so the native servers are unaffected and can be run from /usr/X11R7, the same as they are now, without any changes being necessary. (This message is in fact being typed on a system with a native server, native xterm and modular libs for pkgsrc.) Discussed on tech-pkg, tech-x11 multiple times over the last 6 months or so, and specifically encouraged by wiz@.
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.
Make MOTIF_TYPE_DEFAULT as motif (LGPL Motif) instead of openmotif or lesstif. No objection on tech-pkg@.
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.
Fix comment about NetBSD X11: the default for NetBSD 4 is now "modular".
switch NetBSD-4 and AIX to default to modular X11_TYPE
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.
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.
Pullup ticket #2509 - requested by joerg mk/platform/NetBSD.mk: portability fix Revisions pulled up: - mk/platform/NetBSD.mk 1.31 --- Module Name: pkgsrc Committed By: joerg Date: Sun Aug 10 17:40:00 UTC 2008 Modified Files: pkgsrc/mk/platform: NetBSD.mk Log Message: Use patch --suffix instead of -b, the latter will be problematic when PR 11220 gets addressed.
Use patch --suffix instead of -b, the latter will be problematic when PR 11220 gets addressed.
Move handling of pkg_install version into flavor. Add an explicit phase pkg_install-depends before bootstrap-depends that just tries to install a new pkg_install if the current version is too old. Still keep it as bootstrap dependency for the bulk build code. For NetBSD, PKG_TOOLS_BIN has to be computed in shell code due to a make bug. OK: jlam@
+ 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.
Make the default rpath for USE_CHECK_SHLIBS_ELF a platform variable. Define the values for NetBSD and DragonFly.
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.
* Support netbsd-* as a valid platform in EMUL_PLATFORMS. Use the pkgsrc/emulator/compat* and pkgsrc/emulator/netbsd32_compat* packages to provide the necessary shared libraries to run dynamically linked NetBSD binaries from the days of yore. * Add some additional compat* packages for completeness: compat15, compat20, compat30 * Modify the compat* packages so that "compatNM" only provides files that aren't in "NetBSD-N.(M+1)". For example, compat12 only provides files that don't exist in NetBSD-1.3.x, compat13 only provides files that don't exist in NetBSD-1.4.x, etc. As a result, if you are running NetBSD-3.0/alpha and want to run a 1.3 dynamically linked binary, there is an automatic dependency chain that causes the following packages to be installed: compat13, compat14, compat15, compat16, compat20 There are some deviations from this dependency chain on platforms that have changed executable formats, e.g. i386, m68, sparc, etc. However, in general pkgsrc will require that you have the necessary COMPAT_* options in your kernel to match the installed compat* packages. This restriction is an artificial one imposed by pkgsrc, but allows for a single set of distfiles to be used on all versions of NetBSD. * Provide compat* package support for every supported architecture of NetBSD. Verily, it is now possible to run 1.2 binaries on NetBSD-1.5.3/pc532 by installing the compat12 package from pkgsrc. Rejoice, one and all! * The netbsd32_compat* packages mirror the corresponding compat* packages for use by sparc64 and x86_64 to allow running 32-bit binaries with COMPAT_NETBSD32 kernel support. The "extras" packages supply the additional shared libraries from the corresponding release of NetBSD so that the set of files in /emul/netbsd32 will be complete. * pkgsrc/emulators/compat_netbsd contains infrastructure files shared by all of the compat* packages.
Note the proper /emul/* dir for Darwin libraries.
* 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.
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).
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.
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
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.
Turn IMAKE_MAKE into a public variable that may be set via /etc/mk.conf.
On NetBSD, OpenBSD and BSDOS imake always installs man/catN pages with a "0" suffix.
Remove the old tools framework and references to _USE_NEW_TOOLS.
sync [all but bsd.pkg.mk] with HEAD
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.
Several NetBSD ports (e.g. sparc64) don't have "/sbin/ldconfig". So check whether it exists and use "true" otherwise.
Bump LIBTOOL_REQD to 1.5.14; this unifies all the support again and fixes a good number of bugs.
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).
NetBSD now needs libtool-base-1.5.10nb6.
Make strip/no-strip choice more consistent: Move check for INSTALL_UNSTRIPPED to the platform/*.mk files, alongside existing check for DEBUG_FLAGS.
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.