* Don't add any dependencies (via BUILDLINK_DEPENDS) unless
buildlink3.mk files add them. This fixes case where the software
existed both in the base system and in /usr/pkg, we used only the
built-in software, but we still recorded a dependency on the one in
/usr/pkg.
* Re-structure the code that populates ${BUILDLINK_DIR} so that we
don't bump into ARG_MAX limits in the shell. This should fix the
problem present in the buildlink2 framework noted in:
http://mail-index.netbsd.org/tech-pkg/2004/01/03/0005.html
CHANGES:
* Define a new yes/no variable BUILDLINK_USE_BUILTIN.<pkg> that
determines if we should use the built-in software or not. This
should probably replace the various USE_NCURSES, USE_GNU_READLINE,
USE_GNU_GETTEXT, etc. variables with something whose naming is a
bit more consistent and is integrated directly into the buildlink3
framework.
* Garbage-collect "$$pkg_prefix", which was used exclusively in
BUILDLINK_FILES_CMD.<pkg>. It no longer exists in the
buildlink3/pkgviews world. Packages _should_ _no_ _longer_
directly set the PREFIX variable in the package Makefile. As a
consequence, the various Java VM packages will need some changes
when they're converted to use buildlink3.
For each file listed in INFO_FILES the installed files matching
${PREFIX}/${INFO_DIR}/filename(-[0-9]+)? are registered as belonging
to the package.
Also ignore the same files in print-PLIST target.
Info files should not be listed in PLIST files anymore but the awk code
snippet (_PLIST_AWK_INFO) in charge of actually dealing with info files for
the plist target will strip any it finds in them.
Now for the reason behind this...
Older makeinfo command (before pre-release version 4.5.90 or before release
version 4.6) had SPLIT_SIZE_THRESHOLD: when an info file size was
>= SPLIT_SIZE_THRESHOLD then the info file was split in chunks of
DEFAULT_SPLIT_SIZE size.
DEFAULT_SPLIT_SIZE in older versions of makeinfo was 50000 (bytes)
and SPLIT_SIZE_THRESHOLD was 70000.
So if an info file has a size < 70000 and is processed by makeinfo < 4.6
it is not split in chunks. But if it is processed by makeinfo >= 4.6
texinfo.mk to emulate older version automatically adds `--split-size=50000'
to makeinfo's command line and this time the info file is split in chunks...
This can lead to PLIST inconsistency from platform to platform or more
exactly from version to version of makeinfo.
Now we don't have to care about this problem and the info files removal
from PLIST files can happen.
unintentionally.
Also revert revision 1.6 as part of the overall change, as I suspect
the change might be unnecessary. While I'm not 100% sure, this does
just revert to the previous behaviour.
before subst'ing it.
previously, only a warning would be printed and the .subst_done
cookie(s) would be created, indicating that the subst target was
successful when it really was not.
output of file(1) which reports too many false negatives (not
detecting a file as a text file when it really is).
package developers are aware of which files the subst operation
applies to, since they need to specify the filenames, so this test is
not really required.
it's also not inconceivable that one would want to subst over a
non-text file, which is now possible.
- reduce the number of components with pervasive awk usage.
- handle Info directory file when it is not `info/dir'.
Notice that print-PLIST substitutions are now made globally (awk's gsub())
when previously the sed substitution commands did not have the 'g'lobal
flag.
While here fix PKGVERSION substitution just like PLIST_SUBST's PKGVERSION
element is handled in ${PLIST} target i.e. without considering
the 'nb${PKGREVISION}' suffix.
While here give COMMON_DIRS variable a more "internal type" name:
_PRINT_PLIST_COMMON_DIRS.
- properly quote any filenames in ${PLIST} before feeding them
to xargs. This allows latest textproc/docbook-xsl package
to be registered with its correct size because it contains a file with
a single quote in its name.
XXX pkg_add does not like this filename anyway.
- fix the awk script that parse ${PLIST} so pathname containing space
(hence awk's NF > 1) are not removed from size calculation.
Many thanks to atatat@ to remind me the proper way to quote a shell
word.
This way font directories are not automatically removed; the package must
define OWN_DIRS if it wants them to be deleted during deinstallation.
This is done to avoid removal of standard font directories (those that
appear in *.dist files).
changed when they're defined but empty. Although it might sound weird
to have DISTFILES empty and DIST_SUBDIR set, it makes sense for wrapper
packages such as graphics/Mesa.
Fixes PR 23658 from Aaron J. Grier.
<1062867125.27063.26.camel@frotz.local> on tech-pkg.
Darwin has no rpath, but many packages pass "-Wl,${RPATH_NAME}..." to
the linker, breaking the build of these packages on Darwin. using -L
essentially makes these arguments a no-op, and fixes packages which
were solely broken by this.
LOWER_OPSYS for libtool use under BSD/OS.
Add initial support for using pkgsrc under BSD/OS. This was tested
under BSDI BSD/OS 4.3.1. (Thank you D. Hege.)
(Need to add BSDOS.x11.dist later.)
CVS ----------------------------------------------------------------------
the "cvs" command inside the su returns an error, that should be ignored.
(Aparently cvs returns "1" even if it's done a successful update but if
there were some files removed on purpose).
Prepending caused everything in ${BUILDLINK_DIR} to be found first, which
was bad when you built something like MesaLib where the X11R6 headers
conflict with the ones provided in the source.
need to protect the full path after "-o" from being transformed from
"/srcdir/shlib" to "-L/srcdir -lshlib". This fixes building
graphics/freetype2, which uses lots of full paths to sources and objects.
packages. All pkgviews packages are safe to install into the same tree,
and we rely on more dynamic file collision detection through linkfarm(1)
rather than just using CONFLICTS.
* Ensure that VIEW-INSTALL is called after _all_ POST-INSTALL actions
(including any in the INSTALL_EXTRA_TMPL file) by moving the call to
a file that is included after all other INSTALL templates.
* Ensure that VIEW-DEINSTALL is called before _all_ DEINSTALL actions
(including any in the DEINSTALL_EXTRA_TMPL file) by moving the call to
a file that is included before all other DEINSTALL templates.
package Makefiles to customize the options passed to the extraction
commands when the defaults don't suffice. Patch from Michal Pasternak with
additions by me.
normally apply: treat them as if the distinfo file was empty.
This solves the reason why pkgtools/pkg_install/distinfo was resurrected,
and allows us to remove it again, since it had the side effect of
introducing a dependency on digest, which is not acceptable when updating
pkg_install: it made it impossible to use the pkgsrc tree, as reported
by several people.
1.1298) properly by using single quotes instead of double quotes
around the PKGNAME_REQD value, ensuring that the shell does not
interpret the > character as a redirect.
confirmed that no "=1.0.43" files are created on NetBSD and
Linux when a pre-requisite package has a wildcarded version
number eg. ">=1.0.43", and that the original problem is fixed.
installing a pre-requisite package with a wildcarded (e.g. '>=1.0.43')
version number. The problem manifested itself by creating a file
called '=1.0.43' in the pre-requisite package's directory, and a
coupld of "dc: stack empty" spurious messages appeared.
If this needs to be fixed by an OS-dependent variable, we'll address
that in the future.
!defined(COMPILER_MK) for now.
some packages include bsd.prefs.mk before defining USE_BUILDLINK2,
which resulted in the libstdc++ fake-la target being missed.
XXX the real fix is to include compiler.mk from both bsd.prefs.mk and
XXX bsd.pkg.mk, and have compiler.mk make the right decisions based on
XXX where it was included from.
build a dependency so that the shell does not attempt to do
interpret the value of PKGNAME_REQD.
noticed on Linux building graphics/mplayer where the build of
audio/nas was broken because ${MAKE} was being called with
PKGNAME_REQD=nas>=1.4.2 instead of PKGNAME_REQD="nas>=1.4.2"
Changes include supporting XFree86-4.3.99.14 aka XFree86-current.
Added some new library versions and some freetype2 include files.
And bump the required version number in the bsd.buildlink mk's.
1) When checking if any of the required binary pkgs is newer, it's
not good to look into the (already existing) binary pkg, as that
might be unchanged. Instead, look at the DEPENDS.
In the context of the recent jpeg changes, the gd package itself was
not changed, but the DEPENDS were (via buildlink files). Now looking
into the existing gd binary pkg still said it wanted jpeg-6b instead
of the now-wanted jpeg>=6b, which was only available via the DEPENDS.
That's the first chunk of the patch below.
2) While debugging this, I found that the change in rev. 1.48 was
wrong, as can be seen throughout the last bulk build, search for errors
like:
find: "/usr/cvs.local/pkgsrc/packages/i386/All/gd-2.0.15.tgz": No such file or directory
As the whole operation is really on two files (as assured by "pkg_admin
lsbest" for pkg and REFS by definition), the quotes can be ommitted.
Why this wasn't caught when that change was tested is beyond me - maybe
different sh(1) behaviour? (The error happened on 1.6.1_STABLE, see
e.g. http://smaug.fh-regensburg.de/~feyrer/ftp/pub/NetBSD/pkgstat-i386/last/www/p5-Template-Toolkit/.broken.yui.html).
Anyways, that's addressed in the second part of the patch below, too.
3) Use ${FIND} while there.
know read the arguments by first placing them in a buffer and taking
the argument in the first non-empty buffer as the argument to process.
The buffer is there to allow "splitting" an argument into multiple
arguments (currently up to five arguments), e.g. "-Wl,-R/path1:/path2"
is split into "-Wl,-R/path1" and "-Wl,-R/path2". Each split argument
is placed into a buffer. Using a buffer lets us read and process all
of the arguments in a single pass despite "pushing" more arguments
onto the front of the argument array.