Subject: New pkgsrc wrapper script framework
To: None <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 08/19/2004 00:01:58
I've created a new wrapper script framework that encapsulates all of
the non-buildlink-related code and moved it out of mk/buildlink3.
These features include:

   * making MIPSpro accept GCC options

   * making MIPSpro "ucode" accept GCC options

   * making SunPro accept GCC options

   * making "ld" accept -Wl,* options and silently removing the "-Wl,"

   * (NEW) making UnixWare GCC accept -rpath options and silently
     converting them into an appropriate LD_RUN_PATH

One major benefit of this is that the buildlink3 code is now much
tighter and easier to understand since it concerns itself solely with
buildlink-related details.  I haven't yet optimized the wrapper cache,
so the new wrapper scripts may take slightly longer to execute than
the old buildlink3 wrapper scripts, but I'll be improving this over

The new wrapper script framework will be used by default for all
packages.  I've lightly tested by building and installing perl58, pth,
zlib, jpeg and tiff on NetBSD-1.6.2_STABLE, so I'm pretty certain the
basic mechanism works correctly.  I would appreciate testers using
other compilers on other platforms.  The framework is available at:

To use it, extract it into pkgsrc/mk, then patch the pkgsrc/mk files
with wrapper.diff, e.g.:

	cd /usr/pkgsrc/mk
	tar zxvf wrapper-20040818.tgz
	patch < wrapper.diff

For now, the debugging output for the scripts defaults to "on", so
the work/.work.log file will be somewhat verbose.  The debugging output
can be disabled by setting WRAPPER_DEBUG to "no" in /etc/mk.conf.

Please let me know if you find any packages that won't compile using
the new wrapper framework.  I'm planning on committing this work after
pkgsrc-2004Q3 is branched.


	-- Johnny Lam <>