- Avoid shouting in version names. Users may still set MYSQL_VERSION_DEFAULT
to "MARIADB104", but it is preferred to switch to "mariadb104".
- Set the correct variables in BUILD_DEFS_EFFECTS and _SYS_VARS.
- Instead of hardcoding library names with per-OPSYS logic and testing for
their existence to see if the package is installed, do it the correct way
using pkg_info(1).
- Make it easier to add new MySQL versions.
- Avoid unnecesary variables. Use bmake(1) slices to select the first item
in a list rather than a temporary variable.
- Improve documentation.
Based on a patch I've had sitting in the joyent/pkgsrc tree for far too many
years. No functional change other than the switch to lowercase package names
by default. Tested in a bulk build with additional Percona packages.
the problem is either situational (e.g. the various RESTRICTED-like
cases) or unfixable in pkgsrc (no pthreads, ipv6, etc. on platform).
Conversely, if the wrong version of mysql is installed, that's a
PKG_FAIL_REASON.
to tech-pkg:
=====
* USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will
be ignored altogether by mk/; but see below.)
* NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens,
these phases will happen.
* The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER.
If no build happens, those phases are not needed.
* NO_TOOLS will be ignored by mk/. The tools phase, which provides much
more than just the C compiler, will always happen regardless of package.
This will make metapackage builds only slightly slower, in trade for far
less user error.
Default mysql package if there isn't any installed is mysql-4.1.7
(databases/mysql4-client)
You can choose a mysql package via MYSQL_VERSION_DEFAULT, it will
accept the following values:
MYSQL_VERSION_DEFAULT=41 # <- mysql-4.1.7
MYSQL_VERSION_DEFAULT=40 # <- mysql-4.0.21
MYSQL_VERSION_DEFAULT=30 # <- mysql-3.5.x