Commit graph

1815 commits

Author SHA1 Message Date
reed
af62eac2f9 Rename the _PKGTOOLS_VER variable in the +BUILD_INFO to
PKGTOOLS_VERSION (since that is what it is).

Also add to the +BUILD_INFO the:
HOMEPAGE (also is in DESC)
CATEGORIES
MAINTAINER
DATE (using "+%Y-%m-%d %H:%M:%S %z")

This information will be included in the upcoming
pkg_info -X "summary" output.

(In my own pkgsrc, I have been recording the date and maintainer
for over two years.)
2006-04-12 19:28:47 +00:00
jlam
58140d4125 Correct comment on run-depends-list target (PR pkg/29741). 2006-04-10 04:47:30 +00:00
reed
5abef9be14 Over 1200 files touched but no revisions bumped :)
RECOMMENDED is removed. It becomes ABI_DEPENDS.

BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.

BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.

BUILDLINK_DEPENDS does not change.

IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".

Added to obsolete.mk checking for IGNORE_RECOMMENDED.

I did not manually go through and fix any aesthetic tab/spacing issues.

I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.

I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.

As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.

As discussed on tech-pkg.

I will commit to revbump, pkglint, pkg_install, createbuildlink separately.

Note that if you use wip, it will fail!  I will commit to pkgsrc-wip
later (within day).
2006-04-06 06:21:32 +00:00
jlam
29fefe52e3 * Creates a new variable PKGINFODIR (named similarly to PKGMANDIR)
that is a purely user-settable variable to represent the relative
  path under ${PREFIX} where info files are stored and "dir" files
  are managed.  PKGINFODIR defaults to "info".  INFO_DIR still works,
  but will be obsoleted after the 2006Q1 branch.

* Modify GNU_CONFIGURE_INFODIR to only honor ${PKGINFODIR} if the
  package installs directly into ${PREFIX} and not some subdirectory
  under ${PREFIX}.  This fixes packages that don't really honor
  $(infodir) all that well, and also avoids PLIST problems relating
  to directory removal for those packages.

* Since the majority of Emacs Lisp packages use GNU_CONFIGURE, just
  set GNU_CONFIGURE_INFODIR directly to ${EMACS_INFOPREFIX}, which is
  the Emacs-distro-specific location for info files.  Also pass
  EMACS_INFOPREFIX through PLIST_SUBST for PLIST substitution.

* INFO_FILES should be defined if the package installs info files.
  If the info files are not listed in the PLIST, then INFO_FILES
  must list the filenames for the info files installed by the package,
  which are assumed to be located in ${PREFIX}/${PKGINFODIR}.

* The plist module can now better detect info files listed in PLISTs
  and exports a command to the pkginstall module to append info file
  names to the +INFO_FILES scriptlet at install-time.

* The print-PLIST target is updated to properly list info files in
  the auto-generated PLIST.

* The check-files code is updated to skip all "dir" Info database files.
2006-03-20 01:48:57 +00:00
jlam
3a47f58511 Allow INSTALLATION_DIRS to contain absolute paths so long as they being
with ${PREFIX}.  This simplifies re-using variables that contain full
paths.
2006-03-17 08:02:41 +00:00
jlam
47283bca00 Always run the pkginstall framework targets to generate the
INSTALL/DEINSTALL and rc.d scripts, regardless of whether NO_BUILD is
defined or not.

We do this by renaming the main "build" target to "_build", and creating
a new "build" target that has "_build" and "pkginstall" as dependencies.
This allows the "build" and "install" targets to be consecutive, so
no changes in behavior are visible to the user.

Because the pkginstall targets are no longer run within the protection
of the locks during the build phase, we need to manage locking within
a new "pkginstall" target.
2006-03-15 16:20:11 +00:00
jlam
ce8c6b5c7a Back out previous... it was part of some larger changes that were never
committed and I got ahead of myself.
2006-03-15 14:06:09 +00:00
jlam
934c43ebc6 We can always pass --infodir to configure scripts, regardless of whether
or not there are info files to be installed.
2006-03-14 17:24:34 +00:00
jlam
daad0f3d6c Modify the pkginstall framework so that it manages all aspects of
INSTALL/DEINSTALL script creation within pkgsrc.

If an INSTALL or DEINSTALL script is found in the package directory,
it is automatically used as a template for the pkginstall-generated
scripts.  If instead, they should be used simply as the full scripts,
then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC
explicitly, e.g.:

	INSTALL_SRC=	${PKGDIR}/INSTALL
	DEINSTALL_SRC=	# emtpy

As part of the restructuring of the pkginstall framework internals,
we now *always* generate temporary INSTALL or DEINSTALL scripts.  By
comparing these temporary scripts with minimal INSTALL/DEINSTALL
scripts formed from only the base templates, we determine whether or
not the INSTALL/DEINSTALL scripts are actually needed by the package
(see the generate-install-scripts target in bsd.pkginstall.mk).

In addition, more variables in the framework have been made private.
The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are
more sensible names given the very few exported variables in this
framework.  The only public variables relating to the templates are:

	INSTALL_SRC		INSTALL_TEMPLATE
	DEINSTALL_SRC		DEINSTALL_TEMPLATE
				HEADER_TEMPLATE

The packages in pkgsrc have been modified to reflect the changes in
the pkginstall framework.
2006-03-14 01:14:26 +00:00
rillig
3ef535342c Added the variable PHASE_MSG, STEP_MSG, WARNING_MSG and ERROR_MSG to
facilitate the generation of consistent-looking progress messages.
2006-03-12 14:55:18 +00:00
tonio
5371ea65c7 replace-interpreter should use REPLACE_FILES.${lang} instead of
_REPLACE_FILES.${lang}
2006-03-10 11:02:00 +00:00
jlam
11d32442f2 Make it safe to include bsd.pkginstall.mk directly in bsd.pkg.mk, and
drop pkginstall.mk, which did the same thing.  Also, rework some of
the targets so that we avoid needing to inspect *_MEMBERS variables
within make -- we defer the check to the shell code invoked by the
targets.

All changes are internal and don't affect existing packages in a
visible way.
2006-03-09 23:31:51 +00:00
rillig
1b68c0a8f7 Since the REPLACE_INTERPRETER is used in more and more packages, it is
not good style to make the package author define variables from the
pkgsrc-internal namespace. The variables REPLACE.* and REPLACE_FILES.*
can now be used as replacements for _REPLACE.* and _REPLACE_FILES.*.
Support for the old variable names will be removed after 2006Q2.
2006-03-09 15:58:10 +00:00
jlam
51cac88fb9 Reimplement the info-file handling so that we use an +INFO_FILES
scriptlet to manage the info-file registration.  The new scriptlet's
template is install/info-files.  Remove obsolete texinfo.mk and
install/install-info.

No changes to package Makefiles are necessary -- the re-implementation
is internal to pkgsrc infrastructure.
2006-03-09 00:20:27 +00:00
jlam
9c8b5ede43 Point MAINTAINER to pkgsrc-users@NetBSD.org in the case where no
developer is officially maintaining the package.

The rationale for changing this from "tech-pkg" to "pkgsrc-users" is
that it implies that any user can try to maintain the package (by
submitting patches to the mailing list).  Since the folks most likely
to care about the package are the folks that want to use it or are
already using it, this would leverage the energy of users who aren't
developers.
2006-03-04 21:28:51 +00:00
joerg
530f1cacf5 Make GNU_CONFIGURE_PREFIX the default prefix for GNU_CONFIGURE_MANDIR
and GNU_CONFIGURE_INFODIR. Add the latter for symmetry.
2006-03-02 19:15:37 +00:00
rillig
7db088da96 Added SITES.${foo} as an alias for SITES_${foo}. The latter will be
deprecated after the 2006Q1 branch.
2006-02-18 15:37:22 +00:00
rillig
19488e75a4 If the replace-interpreter program cannot find a file, a warning is
printed.
2006-02-02 21:15:46 +00:00
jlam
6a485fcc01 Don't write ${FOO:Mbar} == "bar", when !empty(FOO:Mbar) will suffice.
In this case, "FOO" is "INTERACTIVE_STAGE".
2006-01-21 21:32:51 +00:00
rillig
e9f81c65bc Unquoted SUBST_MESSAGE.*, as this is no longer needed. 2006-01-21 10:10:42 +00:00
jlam
e08f70e543 Remove the old PLIST-handling code after bulk building has shown the new
PLIST module works correctly.
2006-01-20 20:17:07 +00:00
jlam
f6808df1ba Move more "patch"-related variables and targets out of bsd.pkg.mk and into
bsd.pkg.patch.mk.
2006-01-19 20:32:17 +00:00
jlam
4a3e4a25bc Move more of the "extract"-related variables and targets out of bsd.pkg.mk
and into bsd.pkg.extract.mk.
2006-01-19 19:35:25 +00:00
jlam
15e61bbe84 * Split out the "clean" targets and variables and put them into a separate
file pkgsrc/mk/bsd.pkg.clean.mk.

* Reimplement the clean target so that we don't need to invoke a separate
  make process just to do clean-depends.

* Reimplement clean-depends using a pipe to avoid command-line length
  issues.
2006-01-19 16:11:10 +00:00
jlam
19a4f23ea1 Move the following targets from bsd.pkg.mk to bsd.utils.mk:
show-depends-dirs
	show-all-depends-dirs
	show-all-depends-dirs-excl

While we're here, reimplement them using the new pkg_paths and
depends-depth-first.awk scripts.  As a side effect, this speeds up
the execution of these targets by around 5-15% depending on the
complexity of the dependency graph.

NOTE: This *does* change the behavior of these targets slightly because
      the output is now newline-separated instead of space-separated,
      and the order of the output lines doesn't match the original
      targets because the dependency graph is now walked depth-first
      instead of breadth first.
2006-01-18 20:18:04 +00:00
jlam
c7da3f7718 Remove unused "show-root-only" target. 2006-01-18 19:12:54 +00:00
jlam
5c5ac03ec1 Create a standalone awk script, depends-depth-first.awk, that encapsulates
the code that performs the dependency graph traversal (in depth-first
fashion).  This script has a hook that allows executing a shell command
line upon visiting a dependency's package directory in either prefix
or postfix order, and may be used to simplify the code in bsd.pkg.mk
that iterates over dependencies.

This awk script requires the target "show-depends-pkgpaths", which is
defined in a new Makefile pkgsrc/mk/bsd.utils.mk.  This file should
accumulate "utility" targets that current exist in bsd.pkg.mk, i.e.,
"helper" targets for various actions.
2006-01-18 00:10:07 +00:00
jlam
8e0e10d3fa 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.
2006-01-12 23:43:56 +00:00
rillig
d3b0a7ae64 Added the target check-interpreter to bsd.pkg.check.mk, which checks
that the interpreter of "#!"-style scripts exists. It is disabled by
default, and can be enabled by setting CHECK_INTERPRETER=yes. As for the
other check-* targets, CHECK_INTERPRETER_SKIP is a list of shell globs
that can be used to to skip certain files.

Ok'ed by jlam.
2006-01-12 00:40:19 +00:00
schmonz
ae8a1c813a Since qmail and related packages install into ${PREFIX} (and have
for a while now), we no longer need to add ${QMAILDIR} in PLIST_SUBST
or MESSAGE_SUBST. Noticed by jlam.
2006-01-11 05:48:19 +00:00
joerg
f8ae6026cd Revert unintended part of last commit. 2006-01-05 23:18:26 +00:00
joerg
c750987c17 Adjust comment about SUBST_FILES to match reality:
absolute file names work as well.
2006-01-05 23:16:01 +00:00
schmonz
094c4b78c1 Add a wee bit of infrastructure to improve how we deprecate broken
packages from branch to branch:

When a package is considered broken (for whatever reason) at branch
time, we'll mark it with BROKEN_IN=name-of-branch. At the next
branch, we can easily determine which ones have remained broken and
remove them.

BROKEN_IN is visible to users iff a build fails, when it appends a
warning message to the above effect.

With feedback from dillo. Reviewed by jlam.
2006-01-04 04:25:47 +00:00
wiz
d5a0e27f9a In the bin-install target, instead of running pkg_add for every
BINPKG_SITES entry separately, construct an appropriate PKG_PATH
and call pkg_add only once. Patch from Chapman Flack in PR 30929.

Use PKGNAME_REQD when installing package dependencies.
Patch from Chapman Flack in PR 30954.
2006-01-03 17:26:56 +00:00
jlam
d7e2d97754 Instead of patching the generated config.status script, patch the GNU
configure script itself so that the generated config.status script
does what we want (just exit if asked to "recheck").  This ensures
the timestamp for config.status is earlier than the timestamps for
the files that config.status generates (Makefile, config.h, etc.).

This fixes some problems where some packages end up "rebuilding" as
part of the install target, which makes the rebuilt files owned by
root and makes cleaning the work directory fail.
2006-01-03 00:41:51 +00:00
dmcmahill
ce2d3019e4 Change some remaining ONLY_FOR_ARCHS to ONLY_FOR_PLATFORM and NOT_FOR_ARCH to
NOT_FOR_PLATFORM that were missed when these variables were changed ages ago.
2006-01-02 23:24:58 +00:00
rillig
c666e33407 Don't check for PKG_FAIL_REASON when doing show-depends-dirs. This prevents
packages that set PKG_FAIL_REASON from being excluded from the bulk build
databases like .index and .dependstree.
2005-12-31 15:20:59 +00:00
wiz
14b750b437 Fix some quoting as per PR 30956 by Chapman Flack. 2005-12-31 08:18:34 +00:00
wiz
8466aed83c If target is real-su-bin-install, set DEPENDS_TARGET to bin-install.
From Chapman Flack in PR 30928.
2005-12-31 08:05:00 +00:00
wiz
62a3e4fd03 Handle automatic dependencies in bin-install correctly.
From Chapman Flack in PR 32422.
2005-12-31 07:53:11 +00:00
jlam
4ab7433a2c Teach the pkgsrc infrastructure to Just Know when the pkginstall
framework should be used.  This is implemented by creating a small
file mk/install/pkginstall.mk that guards the implementation makefile
mk/install/bsd.pkginstall.mk.  This guard file just checks whether
one of the pkginstall-related variables is non-empty, and if so, then
the implementation file is automatically included.  This completely
deprecates USE_PKGINSTALL, which no longer has any affect in pkgsrc.
2005-12-29 06:18:53 +00:00
rillig
999f8b6e04 Applied all quoting fixes found by "pkglint --autofix". 2005-12-05 22:07:07 +00:00
rillig
7d139e4056 The checksums for pkgsrc patches are always checked -- even if
NO_CHECKSUM is set.
2005-12-04 15:52:32 +00:00
rillig
0f75425cfe Don't create distinfo files in the "makesum" and "makepatchsum" targets
if NO_CHECKSUM is set to "yes". This allows to run "make makepatchsum"
in the top level pkgsrc directory without having to worry about lots of
additional distinfo files being created.
2005-12-01 11:18:30 +00:00
rillig
f39d78748c Inserted "set -e" as the first command in the show-depends-dirs target
to force an early exit as soon as a "cd" command fails. Otherwise, "/"
would have been added as a dependency, leading to undefined behavior.
See PR 32202 for details.

Fixes the second item of PR 32202.
2005-12-01 00:27:56 +00:00
rillig
be7bdd3b87 The new target do-check-pkg-fail-reason should to be a dependency of
every top level target that is intended to be called by the user or by a
package different from the current package. It provides the same action
as the "main" targets like "fetch", "expand", "build" before in case
PKG_FAIL_REASON is set, that is it prints all PKG_FAIL_REASONs and
fails.

Fixes PR 32202.

Implementation notes:
- The target names have the "do-" prefix to not pollute the
  bsd.pkg.check.mk namespace.
- The PKG_SKIP_REASON has no influence on the do-check-pkg-fail-reason
  target, although both are handled with the same code.
2005-12-01 00:17:05 +00:00
reed
31d6bf1215 Fix REQUIRES= when ldd output has wrong number of fields.
(This also fixes problem where on some Linux systems, ldd
outputs linux-gate.so.1 entry without corresponding library.)
This was noticed on Linux.

This was discussed and okayed on the tech-pkg list in February,
2002. I have been using this on NetBSD and Linux since then. (Also
just tested on DragonFly.)
2005-11-29 22:18:38 +00:00
erh
4d2fdd7bd5 Per request, back out all the SKIP_AUDIT_PACKAGES changes.
bsd.pkg.mk:1.1758-1.1752
bsd.prefs.mk:1.210
bulk/build:1.79
defaults/mk.conf:1.93-1.92
2005-11-23 18:27:13 +00:00
jlam
fbde187715 Missing a line from the previous commit that would cause PKG_DB_TMPDIR
to also be forcibly created (if missing) as part of "make install".
2005-11-22 03:41:20 +00:00
jlam
02f3f44940 Create PKG_DB_TMPDIR (${WRKDIR}/.pkgdb) in a separate step from creating
${WRKDIR}, and just always create it as part of a "make extract".  This
should fix problems where if an old work directory is lying around that
doesn't already have .pkgdb, then a "make reinstall" won't break.
2005-11-22 03:38:40 +00:00