Commit graph

1706 commits

Author SHA1 Message Date
reed
c3c7946905 For the fetch-list target: Do not use mkdir if just creating a shell
script that will make the directory later. This fixes the problem
where it fails when doesn't have write access -- for example use
"make fetch-list" to create the shell script to use on another
system.

Thank you, Geert Hendrickx, for your feedback.

Also in a few places echo ${fetchfile:T} instead of ${fetchfile}.

(Todo: maybe should not say "not fetched" until has tried all sites.)
2005-07-06 05:52:34 +00:00
rillig
8506e905d6 pkglint does not output any "OK" lines by default, so there's no need to
filter them out.
2005-06-27 16:25:43 +00:00
wiz
2baa8b4a15 Improve English in warning. From Rhialto in PR 30610. (second occurrence) 2005-06-27 13:34:41 +00:00
wiz
6328437570 Improve English in warning. From Rhialto in PR 30610. 2005-06-27 13:33:55 +00:00
jlam
6efbd72779 Clean up some clutter in pkgsrc/mk: move the ${OPSYS}.*.dist mtree
files into mk/platform, where they now live with the ${OPSYS}.mk files.
2005-06-23 18:41:57 +00:00
wiz
085d1a2044 Back out previous -- committed by mistake. 2005-06-23 12:12:11 +00:00
wiz
e95f3821fb Add missing line continuation backslashes.
Noted by Jukka Salmi.
2005-06-23 12:11:07 +00:00
jlam
5d1e8de6bc Split out the check-wrkref implementation and related variables from
bsd.pkg.mk into bsd.pkg.check.mk file.
2005-06-23 09:02:46 +00:00
jlam
6ae4606464 Split out the check-files implementation and related variables into
a new bsd.pkg.check.mk file.  This new file will eventually collect
all of the various "check" targets that are run at install-time.
While here, change the implementation of check-files so that it is
not so monolithic.

Change the meaning of the CHECK_FILES variables so that if it's not
"no", then the file checks are run.  Also, allow these checks to be
run if the user explicitly sets CHECK_FILES in /etc/mk.conf, even if
PKG_DEVELOPER is not defined.
2005-06-23 08:31:20 +00:00
jlam
8d486b1ebd Reverse the checks for the value of CHECK_WRKREF so that if it's value
isn't "no", then we run the checks.  This allows for possibly making
CHECK_WRKREF a more multi-valued option or list in the future.
2005-06-23 04:15:47 +00:00
jlam
ccd8fe4d4c Allow the test for whether the file is a text file to be overridden via
CHECK_WRKREF_IS_TEXT_FILE.
2005-06-14 22:02:00 +00:00
jlam
1ffcef48db In the check-wrkref target, change the algorithm so that text files
are checked for ${WRKDIR}, but all files are checked for ${TOOLS_DIR}
(assuming that ${TOOLS_DIR} is in ${WRKDIR}).  Also, let CHECK_WRKREF_PKG
set the name of the package to check.
2005-06-13 02:25:50 +00:00
jlam
df53a167da Add a default fall-through for the shell case statement (portability
issue).
2005-06-11 04:26:17 +00:00
jlam
d8e783d924 check-wrkref is a make target that greps through the installed files
for a package and looks for references to the build directory.  If
any such references are found and PKG_DEVELOPER is defined, then exit
with an error.  This target is automatically run after a package is
installed if CHECK_WRKREF is "yes".  The default value for CHECK_WRKREF
is "no".

You can specify certain files to be skipped during the check by setting
CHECK_WRKREF_SKIP to a list of shell globs.  Installed files that
match these globs are skipped when running the check-wrkref target.

The original implementation was from Dan McMahill sent to me in private
email.  I've added a few more bells and whistles for this commit.  This
target will be helpful for catching any unwrapped files or mis-embedded
tool paths.
2005-06-10 23:38:00 +00:00
jlam
29ef35e288 General improvements to the changes-entry target:
* Improve the documentation.
* Avoid running commands during Makefile processing by using the :sh
  modifier instead of defining variables using !=
* Add a new variable PKGSRC_CHANGES that holds the path to the CHANGES
  file to be modified.
* Use ${ID} and ${DATE}, which are provided by the tools framework and
  avoid PATH issues.
2005-06-09 16:26:23 +00:00
jlam
94f3443509 Don't reinvent PKGPATH, which already contains just the "category/package"
portion of the path.
2005-06-09 16:09:58 +00:00
jlam
1ad3a3bdd6 Add a documentation block above the changes-entry target. 2005-06-09 16:08:27 +00:00
wiz
16b3e5b4cc Delay running of id until it is needed. Fixes PR 30477 by Neil Hoggarth. 2005-06-09 10:09:58 +00:00
wiz
c209ba29cb Add changes-entry target, which adds an entry for the current package
into pkgsrc/doc/CHANGES.
The type of the entry depends on what CTYPE is set to, which defaults
to "Updated".  Other possible values are "Added", "Renamed", "Moved",
and "Removed". An example usage would be:
	cd /usr/pkgsrc/category/package
	make changes-entry CTYPE=Added
after you added a new package, and similar for the others.
If NETBSD_LOGIN_NAME is not set in /etc/mk.conf, it defaults to
your local login name.
2005-06-08 22:44:08 +00:00
rillig
e3aa46eedc Added a leading underscore to the names of the *_COOKIE variables, as they
are not part of the public interface.
2005-06-04 20:56:47 +00:00
jlam
a741f4ed26 Back out revision 1.1684. MAKEFLAGS was being propagated incorrectly
through to dependencies, which caused dependencies to have improper
lists of tools required.

XXX This whole mess with MAKEFLAGS and which ones are passed along when
XXX running the install-depends target needs to be fixed for real.
2005-06-03 20:22:59 +00:00
jlam
95fd1f6ec9 Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc.
Several changes are involved since they are all interrelated.  These
changes affect about 1000 files.

The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk.  bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files.  Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred.  This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.

The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages.  Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc.  This modification is a nod toward LOCALBASE=/usr.  The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.

The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc.  The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.

The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files.  Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories.  These files are used as input
to imake since imake can't use stdin for that purpose.

The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead.  This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed.  Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries.  Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
2005-06-01 18:02:37 +00:00
jlam
d811860c7b *.makevars.mk doesn't exist until after ${WRKDIR} is created, which
doesn't happen until after the package is extracted.  Prior to
extraction, cache the variables named in MAKEVARS using MAKEFLAGS
instead.  This avoids invoking each expensive computation up to four
times before it gets cached.  For packages that include lots of
buildlink3.mk files, this saves a lot of CPU time.
2005-06-01 17:27:22 +00:00
jlam
a72cd1c453 Include bsd.makevars.mk in bsd.prefs.mk instead of bsd.pkg.mk. This
allows the saved make variables to be re-set whenever bsd.prefs.mk is
included, and is a shortcut for the common case where a Makefile
includes both.
2005-06-01 17:05:19 +00:00
jlam
4631a73a95 Separate out the logic to include the correct <phase>.makevars.mk file
into a new file bsd.makevars.mk that can be included by other Makefiles.
2005-06-01 03:04:16 +00:00
jlam
54de37e60e Convert USE_GNU_TOOLS into USE_TOOLS as the former is no longer supported
in pkgsrc.
2005-05-31 21:53:26 +00:00
dillo
8cda012601 Rename describe-options to show-options, replacing the old show-options
target.
2005-05-31 12:10:07 +00:00
jmmv
d5789c138e Simplify unprivileged builds by adding a new variable, UNPRIVILEGED, that,
when set to YES, changes multiple defaults to let this work properly.
2005-05-29 17:12:15 +00:00
rillig
c7b8094edd Fixed the output of show-tools. 2005-05-26 11:15:30 +00:00
jlam
6a44e12a0b Finish removing instances of _USE_NEW_TOOLS from pkgsrc. 2005-05-22 20:15:40 +00:00
jlam
9f94b112f0 Remove the old tools framework and references to _USE_NEW_TOOLS. 2005-05-22 19:11:12 +00:00
rillig
aeb4d04119 Fixed some quoting issues. 2005-05-22 15:31:03 +00:00
jlam
1cfa811f1b In computing _REPLACE_LOCALEDIR_PATTERNS_FIND_cmd, make sure the :sh
operator does not result in an empty string as make(1) doesn't like
them.  Also, rewrite the variable substitution for the find(1) command
to be more readable, and get rid of the extra grep(1) in favor of
using :N.
2005-05-21 01:55:53 +00:00
jlam
262ed77f43 Change instances where we stored shell command in a make variable into
variables that use the :sh modifier.  This still causes expansion to only
happen when referenced, and has the advantage of being :Q-safe.

Bring back the changes from revision 1.19 of mk/subst.mk now that the
problem noted above has been fixed.  This passes the buildlink-unwrap
regression test.
2005-05-20 21:36:05 +00:00
rillig
296e86963f Replaced the NO_WRKDIR_SYMLINK variable with CREATE_WRKDIR_SYMLINK, as
suggested by Alistair. If you don't want the symlinks, set the variable
to "no".
2005-05-18 23:59:44 +00:00
rillig
e6648d55fb If NO_WRKDIR_SYMLINK is defined, no symlink to ${WRKSRC} is created when
the WRKOBJDIR is set explicitly. This allows for having pkgsrc mounted
r/w without actually modifying it.
2005-05-18 19:42:01 +00:00
rillig
8a83e6b802 Added the show-tools target, which emits a shell code fragment defining all
tools known to the pkgsrc infrastructure.
2005-05-18 02:52:38 +00:00
jlam
876fcd9d31 Turn _MANCOMPRESSED into a strictly "yes" and "no" variable
(case-sensitive) to simplify writing the do-install target code that
automatically compresses or decompresses man pages after installation.
2005-05-17 22:07:56 +00:00
dmcmahill
832614bc4c Rework the README.html generation code. Major changes are:
- completely redo the code which decides on the machine architecture,
  operating system, and operating system version for the binary packages.
  The old way just used to directory names to take a guess.  The new
  way creates a cache file containing meta-data for all the binary packages
  in each "All" directory.  This cache file is consulted when generating
  the lists of available binary packages.  The meta-data is obtained with
  pkg_info so it should always be correct even if you do something silly
  like mix OS_VERSION or MACHINE_ARCH packages up in the same directory.

  Among the benefits are:  works when PACKAGES is not $PKGSRC/packages,
  works with a more or less arbitrary subdirectory structure, works
  when there are subdirectories for multiple operating systems.

  This portion of the fix should address PR25390.

  The cache files are only updated when the contents of an "All" directory
  changes or if the cache file format changes.  There is some room for
  improving the updating of the cache files, but its not too bad the way
  it is.

- fix up some of the awk code so that generadme.awk works with Solaris
  nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems).

- remove some "if ! foo" shell constructs to increase portability.

- be more consistent with what variables get passed to mkreadme from
  make and which ones are determined automatically.  Mostly this meant
  moving stuff into mkreadme to make it easier to run it standalone.
2005-05-17 21:46:59 +00:00
jlam
62c3dfb798 Save the names of the patches applied during the patch phase into the
patch cookie file, one per line.  A package with no patches applied
will have a patch cookie file with no lines (zero bytes).
2005-05-17 06:31:00 +00:00
jlam
e87497f3c3 Don't have USE_TOOLS+=imake replace USE_IMAKE. Rather let the former
specify that imake is used by the package, while the latter triggers
the special do-configure process.
2005-05-16 18:01:12 +00:00
jlam
d48540d243 Fix mistake in previous commit -- expr is required by the wrapper
framework.  Problem & fix from tron@.
2005-05-16 15:20:15 +00:00
jlam
4a3b99d323 No package seems to be using ${NICE} so don't require it. 2005-05-16 05:11:51 +00:00
jlam
1b0d713866 Don't require m4 for all packages, only for packages that use it. 2005-05-16 05:09:21 +00:00
jlam
e3326eaf55 tee is only used by bsd.bulk-pkg.mk. 2005-05-16 04:54:11 +00:00
jlam
86c375af36 We only need "date" to write the date into the +PRESERVE file. 2005-05-16 04:48:05 +00:00
jlam
6d30b7cae1 expr is only used by bsd.bulk-pkg.mk. 2005-05-16 04:39:04 +00:00
jlam
242f38689e tsort is only used by bsd.bulk-pkg.mk. 2005-05-16 04:30:41 +00:00
jlam
2338cbae27 Change the EXTRACT_USING_PAX defined/undefined option into a EXTRACT_USING
which can take multiple values -- "pax" or "gtar".  The default value
of EXTRACT_USING is "pax", which more closely matches reality since
before, we were using bootstrap "tar" for ${GTAR} and it was actually
pax-as-tar.  Also, stop pretending pax-as-tar from the bootstrap kit
or on NetBSD is GNU tar.  Lastly, in bsd.pkg.extract.mk, note whether
we need "pax" or "gtar" depending on what we need to extract the
distfiles.
2005-05-16 03:04:44 +00:00
jlam
e61f25dea9 We only need mtree if NO_MTREE isn't defined. 2005-05-16 00:11:50 +00:00