in bsd.pkg.mk. The java.mk Java handling is largely based on the
lang/python/pyversion.mk file.
There are two new variables:
PKG_JVM_DEFAULT is a user-settable variable whose value is the
default JVM to use.
PKG_JVMS_ACCEPTED is a package-settable list of JVMs that may be
used as possible dependencies for the package.
Two existing variables have been redefined to be only read-only, though
there is some logic to handle legacy /etc/mk.conf which may contain an
explicit PKG_JVM=...
PKG_JVM is a publicly readable variable containing the name of
the JVM we will be using.
PKG_JAVA_HOME is a publicly readable variable containing
${JAVA_HOME} for the PKG_JVM described above.
To do:
Have some way to specify which JVMs are acceptable for each
platform, and use the intersection of these JVMs and the ones
listed in PKG_JVMS_ACCEPTED as the JVMS that may really be used.
Currently, we assume all of the JVMs are usable by all platforms.
I'm not sure if Darwin's special stub sun-{jre,jdk}13 packages
are usable by buildlink2. This needs to be verified.
stdout a list of files relative to ${BUILDLINK_PREFIX.<pkg>}. The shell
variable $${pkg_prefix} may be used and is the subdirectory (ending in /)
of ${BUILDLINK_PREFIX.<pkg>} to which the PLIST is relative, e.g. if
`pkg_info -qp foo' returns "/usr/pkg/java/kaffe", then $${pkg_prefix} is
"java/kaffe/".
BUILDLINK_PKGBASE.<pkg> that is the ${PKGBASE} for that package and can
be used as "pkg_info ${BUILDLINK_PKGBASE.<pkg>}". This variable is
currently only used if the buildlink2.mk file uses
BUILDILNK_PLIST_CMD.<pkg> (described below).
* Create readable variable BUILDLINK_PLIST_CMD.<pkg> that is a pipeline of
shell commands that outputs to stdout a list of the files installed the
<pkg>, relative to its installation prefix.
readable through CONFIGURE_ENV and MAKE_ENV. These may be used to fix
up packages that use imake to check the appropriate locations for headers
and libraries.
* Don't be so aggressive in prepending _BLNK_{CPP,LD}FLAGS to
{C,CPP,CXX,LD}FLAGS. The buildlink2 wrapper scripts will automatically
filter out bad -[IL] paths, even if their added inadvertantly by package
Makefiles, so we can simply append them to the existing
{C,CPP,CXX,LD}FLAGS. We try to be smarter about appending them to avoid
needless duplication.
${CONFIGURE_ENV} and in ${MAKE_ENV} for the configure and build processes,
respectively. This allows overriding the value of "CC" passed to the
build, e.g.:
BUILDLINK_ENV+= CC="/usr/pkg/pthread/bin/pgcc"
Disables to "no", which results in no gnome-libs being needed.
Patch contributed by Stefan Krüger <skrueger@europe.com> in private mail,
with some changes from me.
SPECIAL_PERMS are lists that look like:
file user group mode
At post-install time, file (it may be a directory) is changed to be
owned by user:group with mode permissions.
SPECIAL_PERMS should be used primarily to change permissions of files or
directories listed in the PLIST. This may be used to make certain files
set-uid or to change the ownership or a directory.
Packages that install setuid executables should list them in SPECIAL_PERMS
so that the correct user and group will be used for file ownership, even
if the uid/gid changes between the package creation and the package
installation.
was only able to check the paths for NetBSD and Linux...Solaris and Darwin
pkgsrc developers should change the path to expr in the right defs.*.mk
file.
environment. Instead, create a new variable PKG_JAVA_HOME, which is
passed to the configure and build processes via:
JAVA_HOME=${PKG_JAVA_HOME}
to override any environment setting for JAVA_HOME. This should fix
pkg/17989.
preference to or in place of Sun audio support in various packages. People
using audio/oss should set USE_OSS in their /etc/mk.conf when building
packages.
when support for BUILD_DEPEND-only java packages was introduced -- this problem
was preventing java from being registered as a dependency for a number of java-based
packages.
to only add -Ldir/.libs for *.la files that are not named with absolute
paths or named with an absolute path starting with ${WRKSRC}. This should
fix the problem with converting kdebase3 to buildlink2.
overflowing the make variable size limit.
* Rename _BLNK_WRAP_ENV to _BLNK_WRAP_SETENV, and use _BLNK_WRAP_ENV to
set the shell environment for the wrappee. Allow BUILDLINK_WRAPPER_ENV
to add to the shell environment.
a full dependency. BUILDLINK_DEPMETHOD.<pkg> is now a space-separated
list of the words "full" and/or "build", and if any of them is "full",
then a full dependency on <pkg> is used. buildlink2.mk files may now do:
BUILDLINK_DEPMETHOD.<pkg>+= full
to convert from a build to a full dependency.
Previously, if a package Makefile set BUILDLINK_DEPMETHOD.<pkg>=build,
there was no way to override its value consistently.
use buildlink2 and set USE_X11 will use x11-links, or if they will simply
symlink the X11 files directly into ${BUILDLINK_DIR}. If USE_X11_LINKS is
"YES" (the default), then x11-links is used. If USE_X11_LINKS is "NO",
then the X11 files are symlinked directly.
There is a choice here between speed and flexibility. Using x11-links is
faster since you don't need to spend time symlinking all of the X11 files
into ${BUILDLINK_DIR}. However, if you update your X11 installation, then
the x11-links package will likely be out-of-date. Conversely, directly
symlinking the X11 files will protect you from changes in your X11
installation when you update, but there is a (small) time penalty to have
to do it for every package that uses X11.
buildlinking them into ${BUILDLINK_DIR}. This should allow cases where a
/usr/lib/libintl.la escaped into an installed libtool archive (during the
time when buildlink2 was broken for about 4 days) to be handled properly.
BUILDLINK_DEPENDS.foo= foo>=1.0 foo<1.5
then this is converted to:
DEPENDS+= foo>=1.0:../../category/foo
DEPENDS+= foo<1.5:../../category/foo
We can use this to record upper bounds on dependency versions.
directory escape into the installed *.la files. Fix this by only adding
-L*/.libs if the *.la file is uninstalled, and by filtering out references
to ${WRKSRC}.
* Replace ELK_USE_{X11,MOTIF} with ELK_GUI, which is either "none" or is
some combination of "xaw" and/or "motif".
* Reenable Motif -- it seems to build properly with OpenMotif-2.0.x.
* Modernize this package a bit and clean up how linker flags are passed to
the build process by using the new variables available.
the main transformations have been performed.
The ld wrapper can now accept "-Wl,*" arguments and transform them
appropriately by stripping of the -Wl and the commas. This will obiviate
the need for logic in pkgsrc that strips away the "-Wl," depending on
whether the platform was a.out or ELF, and whether the individual package
chose to link using "cc" or "ld".
depend on other uninstalled libtool archives. During the relinking process
the newly installed libraries weren't being found. We now insert the
appropriate -Ldir flags to allow them to be found in the uninstalled
locations.
/etc/rc.d. This is controlled by the new variable PKG_RCD_SCRIPTS which
may be set in /etc/mk.conf or in the shell environment in which the
INSTALL script is executed. PKG_RCD_SCRIPTS only takes effect if
${PKG_CONFIG} == "YES" and defaults to NO.
RCD_SCRIPTS. From the comments in bsd.pkg.install.mk:
# rc.d scripts are automatically generated and installed into the rc.d
# scripts example directory at the post-install step. The following
# variables are relevent to this process:
#
# RCD_SCRIPTS lists the basenames of the rc.d scripts
#
# RCD_SCRIPT_SRC.<script> the source file for <script>; this will
# be run through FILES_SUBST to generate
# the rc.d script
#
# RCD_SCRIPTS_EXAMPLEDIR the directory in which to install the
# example rc.d scripts
#
# If the source rc.d script is not present, then the automatic handling
# doesn't occur.
bsd.buildlink2.mk. This allows packages that use buildlink2 to fix up
*-config and other shell scripts that hardcode wrong library names as a
side-effect of how buildlink2 works, e.g., the package thinks "-laa" works
because the wrapper silently converts it to "-laa-x11.
REPLACE_BUILDLINK files relative to ${WRKSRC}
REPLACE_BUIDLINK_PATTERNS shell glob
REPLACE_BUILDLINK_SED sed expression to run over the files named
above
buildlink2. We used to create a timestamp file in the .libs directory.
Now, we add a line to the *.la and *.lai file that directly notes that it
has been "modified by buildlink2". This makes it easier to debug problems
caused by using the wrong libtool during either a build or install by
checking if the *.la or *.lai files have the "modified by buildlink2" line.
the shell would definitely interpret in a wrong fashion (like
"perl>=5.0" - we don't want to create some file).
Pointed out by Jan Schaumann <jschauma@netmeister.org> on tech-pkg.
dependency on ghostscript. This handles the dependency patterns that will
match either ghostscript{,-nox11} and ghostscript-gnu{,-nox11} depending
on which version number of ghostscript is required. From the comments at
the top of the file:
To use this Makefile fragment, simply:
(1) Optionally set GHOSTSCRIPT_REQD to the minimum version number of
Ghostscript required by the package,
(2) Optionally set USE_GHOSTSCRIPT to "build" to only add a build-time
dependency on Ghostscript,
(3) And include this Makefile fragment in the package Makefile,
CONFIGURE_DIRS, and allows running the shell commands in the do-build and
do-install targets within the specified directories. Both variables
default to ${WRKSRC}.
${_PKGSRCDIR} and ${BUILDLINK_DIR} from any filtering, as they may be
subdirectories of ${LOCALBASE}, /usr/pkg, or /usr/local.
This should fix pkg/18142 and other puzzling problems reported on the
tech-pkg mailing list where it was necessary to revert back to buildlink1
versions of packages in order to build when the pkgsrc tree or the work
directories are kept under /usr/local.
contains all of the transformations that we may want to use to fix up
any *-config scripts that have incorrect paths or library names. Also
add some _BLNK_UNTRANSFORM_SED.* variables that do the opposite of the
corresponding _BLNK_TRANSFORM_SED.* variables, and that are used to clean
up libtool archives.
generalise the linker flags used to export symbols by setting them on
a per-OS basis.
> many packages force -Wl,-export-dynamic which is not portable outside GNU ld
> and cause problems e.g. on Solaris. some of these packages use if
> conditionals either only for NetBSD or except SunOS, but the state is not
> coherent and it may complicate later when support for new OS is added to
> pkgsrc (e.g. ongoing work on HP-UX support).
>
> jlam proposed the following framework in discussion on tech-pkg:
>
> http://mail-index.netbsd.org/tech-pkg/2002/06/21/0009.html
>
> now, ${EXPORT_SYMBOLS_LDFLAGS} is used instead of directly defining
> -Wl,-export-dynamic which is set in appropriate defs.*.mk to reasonable
> values. packages should be converted to this framework by:
>
> 1) replacing LDFLAGS+= -Wl,-export-dynamic and LIBS+= -export-dynamic with:
>
> LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
>
> 2) for use in patchfiles, add this variable to MAKE_ENV if needed:
>
> MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS=${EXPORT_SYMBOLS_LDFLAGS}
>
> 3) replace occurances of -Wl,-export-dynamic and -export-dynamic in patch
> files with:
>
> $(EXPORT_SYMBOLS_LDFLAGS)
add one section for SunOS to possibly allow using the SUNWspro compilers
when building X11 packages that use imake. Many thanks to Matthias Scheler
for his help on this.
Also use _BLNK_OPSYS instead of OPSYS in bsd.buildlink2.mk so that's it's
easier to pretend I'm using a different OS when doing buildlink2 work.
This script is part of the buildlink2 infrastructure and is harmless if
not used. This allows devel/zlib to build on Solaris. Problem noted by
Stoned Elipot.
OPENSSH_USER
OPENSSH_UID
OPENSSH_GROUP
OPENSSH_GID
OPENSSH_CHROOT
Use these to automatically create user/group if they do not already
exist. Assists platforms which do not have an 'sshd' user by default,
while adding flexibility for NetBSD systems.
Checked by Stoned Elipot <seb@netbsd.org>.
Each word of UNLIMIT_RESOURCES is supposed to be a knob on
ULIMIT_CMD_<word> variable which value if defined is added to _ULIMIT_CMD.
The ULIMIT_CMD_* variables are set per $OPSYS in defs.*.mk and are overridable
by the user.
Solaris' default value of ULIMIT_CMD_memorysize adjusted as suggested in PR
pkg/18087 by Jonathan Perkin <sketch@rd.bbc.co.uk>.
to ease the use of the sandbox.
$sandbox/sandbox umount
Umount the null mounts from the sandbox
$sandbox/sandbox mount
Mount the null mounts required by the sandbox (useful across reboots, ...).
$sandbox/sandbox whatever
Runs the command passed as arguments, chrooted into the sandbox.
Typical usage would be `$sandbox/sandbox /my/favourite/shell'.
$sandbox/sandbox
Same as `$sandbox/sandbox /bin/sh'
Approved by agc.
This prevent surprise when /etc/localtime -previously copied over in the
sandbox by pax/tar- is a symlink to /usr/share/zoneinfo/whatever.
- Improve somewhat some messages.
- Make sure $sandbox/$packages and $sandbox/$distfiles are created instead of
$packages and $distfiles.
environment, and pass them down to the bulk build. This means that the
/etc/mk.conf (or $MAKECONF) can be shared between ordinary builds and
bulk builds.
if the interactive stage is "fetch", since there will be no ${WRKDIR} at
that time.
Instead, since ${INTERACTIVE_COOKIE}s are only used in bulk builds, create
them in the package directory, along with the related .broken.`hostname`
file.
- Change the mplayer default font size from 18 to 14
- Add MPLAYER_USE_REALMEDIA, defaulting to NO
Used by mplayer to enable realmedia support by using the realplayer
libraries. Note that this only works on i386 and also adds a
dependency for the linux emulation to this package.
environment variable, which contains the name of the make(1) program to
invoke - suggestion by Julien Letessier some time ago, the confusion mine,
since I thought he was referring to something else completely.
Don't rely on there being a POSIX tr(1) in the path by default - test
explicitly for both "yes" and "YES".
Set the default for PRUNEDISTFILES to "no", since we can't assume that
the user wants us to delete something which he may have been keeping
around, and there are other ways of accomplishing this aim (lintpkgsrc
-o, for example).
Clean up some superfluous white space at the end of lines.
* move redundant sed expression into variable to only maintain it once
* properly catch grep return code in *both* cases (makes substitution
of pkg variables in @dirrm statements / directory names work)
will override the effects of any instance of the word "require". This
should _only_ be used by those packages that can be built with or
without pthreads _independently_ of whether any of its dependencies need
pthreads. Currently, this only only www/mozilla, which uses its own
threading library if native pthreads is unavailable, despite that it
uses GTK+, which _does_ need pthreads.
hard-syscall version of GNU pth as the official pthread replacement
package for those platforms that don't have a native pthread library.
USE_PTHREAD is now deprecated in favor of directly include
pthread.buildlink.mk, but the behaviour may be tweaked by setting
PTHREAD_OPTS to contain any of "native" and "require". More complete
documentation may be found in the first half of this file.
contents.
* Each PKG_JVM needs its own special _JAVA_PREFIX_DEFAULT hardcoded as
there's no way to discern the subdirectory of ${LOCALBASE}/java in which
the PKG_JVM is installed.
* If PKG_JVM == "sun-jdk", allow either sun-jdk13 or sun-jdk14 to be used,
preferring whichever one is already installed, but otherwise using the
best default for a given platform.