Commit graph

5873 commits

Author SHA1 Message Date
rillig
f4a3dfca23 Warnings must only be prefixed by a warnings heading, not an error
heading.
2006-10-12 20:36:34 +00:00
rillig
636b8b0e77 Portability checks, version two.
The actual check has moved into a shell file to allow for nice-looking
code. Instead of only the configure scripts, it scans all files whose
first line matches "#!*/bin/sh". Therefore the check is run no matter if
HAS_CONFIGURE is set or not.

Added a warning (not an error) for every use of $RANDOM that is not
combined with $$, the process ID. $RANDOM is only implemented by bash
and some versions of the ksh.
2006-10-12 17:57:05 +00:00
reed
cdd5b7e101 Add default DIALER_GROUP and explanation.
I forgot to commit this last week when I updated xisp package.
(This is for PR 34780.)
2006-10-11 14:38:04 +00:00
rillig
91178d291d Added printf to USE_TOOLS, because it is used heavily by the "debug" and
"help" targets.
2006-10-10 16:57:58 +00:00
joerg
72cf605c7c s/LOCALBASE/PREFIX/, but thanks for catching this. 2006-10-10 13:01:26 +00:00
rillig
4fb63bd4af Since a few hours, the .PLIST file does not contain the full pathnames
anymore. Therefore, cd to ${LOCALBASE} to correctly resolve the relative
pathnames.
2006-10-09 23:06:48 +00:00
joerg
5b374e445d Main infrastructure for DESTDIR support.
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or
"user-destdir" to flag support for this, following the same
rules as PKG_INSTALLATION_TYPES (e.g. define before first include
of bsd.prefs.mk).

The user activates it via USE_DESTDIR. When set to "yes",
packages with "user-destdir" are handled as "destdir".
The installation of the package will not go to ${LOCALBASE},
but a subdirectory of ${WRKDIR} instead. pre/post install scripts are
not run and the package is not registered either. A binary package
can be created instead to be installed normally with pkg_add.

For "user-destdir" packages, everything is run as normal user and
ownership is supposed to be correctled by pkg_create later. Since
the current pkg_install code uses pax and it doesn't allow overwriting
owners, this does not work yet.

For "destdir" packages, installation, packaging and cleaning is run as
root.

This commit does not change the handling of DEPENDS_TARGET or
bin-install to allow recursive usage.
2006-10-09 12:25:44 +00:00
joerg
a8e7008902 Add variable to control whether the install target is run as root. 2006-10-09 11:59:08 +00:00
joerg
977a821a8f Add two variables to control whether make package and make clean
are run with elevated privileges. Remove MAKE_PACKAGE_AS_ROOT
for now, since it is not sure whether the functionality in the current
form will stay and developers should spend time on the destdir support
instead.
2006-10-09 11:44:06 +00:00
joerg
bc2ee3463c Introduce _SU_ROOT_USER, which can be used for partially unprivileged
builds, when the normal ROOT_USER overrides should happen, but
su-target is still desired to work.
2006-10-09 10:30:27 +00:00
joerg
bafcfef842 Backout rev 1.13 of rillig. Addresses PR 34764 and complains on
pkgsrc-users.
2006-10-09 08:57:39 +00:00
rillig
39f8019a3e Forgot to provide the default value for EXTRACT_DIR.
EXTRACT_DIR may be given relative to WRKDIR.
2006-10-09 02:37:32 +00:00
rillig
22d4a3747a Added the EXTRACT_DIR variable, which can be used if the distfiles should
not be extracted into ${WRKDIR}.
2006-10-09 02:31:57 +00:00
rillig
f8810ba028 Replaced the pipe operator with temporary files, since the former hides
errors. Now "make depends" stops on dependency directories that don't
exist.

The dependencies are first extracted into two temporary files and then
combined with cat(1) because otherwise "make depends" passes silently on
errors when it is called for the second time. Somehow ${.TARGET} didn't
get removed.
2006-10-09 01:40:49 +00:00
rillig
3fce7deb80 Added a new variable MAKE_PACKAGE_AS_ROOT that controls whether the
package needs to be packed by root or whether the unprivileged user can
do that as well. Most packages don't need root privileges, but the
default value is nevertheless "yes" to not break too many existing
packages.

pkgsrc users are encouraged to add the following to their mk.conf:

    MAKE_PACKAGES_AS_ROOT?= no

The "?=" operator here is important because after the testing phase,
this variable is only intended to be set by packages. If "=" would be
used instead, packages could not override the value.
2006-10-08 20:31:38 +00:00
rillig
b52b81957a Remove the +BUILD_DEFS file before overwriting it. This is necessary to
allow most of the packages to be created as unprivileged user, since the
+BUILD_DEFS file is created by the privileged user in the "install"
phase.
2006-10-08 20:25:43 +00:00
rillig
28003a7775 Made the code simpler and added "set -e". 2006-10-08 20:24:03 +00:00
mishka
0f000d2afb pkg/34695: Static list of package master sites may (and often will)
lead to overloads of very first distribution site. Moreover, if first
site in the list is not available (often seen for sourceforge mirrors)
you have to wait for timeout each time. To distribute load on master
distribution sites and to make second problem not so annoying randomly
intermix list of MASTER_SITES with MASTER_SORT_RANDOM feature. Any of
MASTER_SORT and MASTER_SORT_REGEX can be applied later.

The feature is turned ON by default and is disabled for PKG_DEVELOPERs
or if MASTER_SORT_RANDOM=no.
2006-10-08 11:37:38 +00:00
rillig
ae06ae6696 Meta-packages that had DIST_SUBDIR set (for whatever reason) tried to
fetch files with an empty name, for example "geda/".

The problem was that the expression ${LIST:S,^,${DIST_SUBDIR}/,} results
in ${DIST_SUBDIR}/ when ${LIST} is empty. This is surprising but matches
the documentation in the manual page, so this cannot be called a bug.

The proper fix is to use ${LIST:@f@${DIST_SUBDIR}/${f}@} instead.

Noticed by Don Woodstock on #netbsd-code.
2006-10-07 12:22:06 +00:00
rillig
ee85496ac5 Renamed the "pack" option for _PRESERVE_WRKSRC to "pack-if-failed",
since that's what I really wanted. It's just one day old, so I hope that
nobody has gotten used to it.
2006-10-07 06:35:01 +00:00
rillig
343b18a86f Added more error checking: If a directory is specified in
INSTALLATION_DIRS but a regular file of the same name already exists,
the BSD install(1) program doesn't care but exits successfully.

To avoid much more confusing error messages, this is checked here, and a
_good_ error message is printed.
2006-10-06 20:13:10 +00:00
rillig
4fccc74f6f Instead of removing error and warning messages, they are collected in
.error-done and .warning-done, so they can be inspected later.
2006-10-06 19:05:43 +00:00
rillig
7271fc560f Added a call similar to "make error-check" when the real target fails
for some reason. That way, error and warning messages that have long
been hidden are now shown. They don't appear very prominently by now,
but it's much better than showing them not at all.
2006-10-06 19:04:37 +00:00
joerg
1a3ea34a13 Remove references to DESTDIR. LOCALBASE should not be altered that way,
since it is user settable and most of the time set by the user.
X11BASE follows the same reasons. For staged installations, we don't
want to register the package directly, so there's no need to prefix
PKG_DBDIR either.
2006-10-06 14:51:36 +00:00
joerg
5e78609796 Kill ancient runes: /usr/local as LOCALBASE was not the default for
ages and mk.conf from bootstrap sets it explicitly anyway.
The pkg_install stuff also lives in sbin.
2006-10-06 14:31:32 +00:00
joerg
672d9ead13 Always use LOCALBASE setting from mk/defaults/mk.conf.
Setting it with ?= in the platform files is a nop anyway.
2006-10-06 14:28:46 +00:00
rillig
e20633395b _PRESERVE_WRKDIR can be set to "pack" to save a .tar.gz archive of
WRKDIR in the directory where the other log files are.
2006-10-06 09:41:23 +00:00
reed
4777d2bf99 Add experimental support for -j jobs building in the build
target.

MAKE_JOBS is undefined by default. You can test this by setting
in mk.conf: MAKE_JOBS=5 for example.

Some package just won't build correctly with this -- these individual
packages can set MAKE_JOBS_SAFE=no to disable it.

This is based on discussion from last December 2005. Some pkgsrc
users are using ideas like this.

Note I have been using this since December 2005 on various single
processor and multiprocessor systems. (Once I kept some stats on
performance but have misplaced that now.) I haved tested this with
many packages (but not a bulk build) on Linux, NetBSD and DragonFly.

This commit doesn't include the commits for the MAKE_JOB_SAFE. As
this is experimental it needs more testing. Some examples of problems
are: comms/lrzsz, databases/gramps2, editors/vim, graphics/MesaLib,
graphics/netpbm, net/bind9, print/ghostscript-esp, textproc/libxml,
and www/lynx.
2006-10-05 23:35:23 +00:00
rillig
11142e502a Suppress the message that ".DDIR is up-to-date" by introducing a .PHONY
target.
2006-10-05 12:56:27 +00:00
rillig
c6fdabdf40 If a word in a configure script is "#", stop scanning that line for
"test ==".
2006-10-05 10:52:40 +00:00
rillig
5305a8ebc5 Replaced "test -f" with "ls". That way, broken symbolic links are also
replaced with the pkgsrc versions of libtool, config.guess and others.
2006-10-05 02:59:54 +00:00
rillig
ecd4e9d40b It's SKIP_PORTABILITY_CHECK, not SKIP_PORTABILITY_CHECKS. 2006-10-05 02:58:28 +00:00
rillig
9af6cadbee Both, the pkgsrc user and the package maintainer must agree that this
package should run the CHECK_FILES test. Otherwise we cannot prevent the
broken shells/standalone-tcsh from scanning the whole filesystem. (hi
agc!)
2006-10-05 01:10:59 +00:00
gdt
23056ede21 fix comment about CHANGES file for changes-entry, since the default is
really CHANGES-YYYY
2006-10-03 14:22:16 +00:00
rillig
114453d16b Rewrote the bin-install target so that it doesn't lock LOCALBASE
recursively. This bug was reported by Hans Rosenfeld in

    http://mail-index.netbsd.org/tech-pkg/2006/10/03/0002.html

As a side effect, when bin-install fails to install a binary package,
the package is still built from source, but not as a privileged user.
2006-10-03 11:07:05 +00:00
dmcmahill
74c579fb19 Change the quoting to let this work with solaris-2.9 /bin/sh.
The particular /bin/sh bug that was biting here is

  "${x}"/*/*/"$y"

doesn't expand the *'s if $y starts with a "." which, unfortunately, it
does.  Using

  "${x}"/*/*/$y

works correctly.
2006-10-02 16:37:22 +00:00
rillig
48263488c5 Some fixes:
- PKG_DEVELOPER may be undefined, meaning "no".
- Removed unused variables.
- Removed a trailing empty line.
2006-10-02 16:16:14 +00:00
rillig
dba58f8d58 Added a new compile-time check that detects the usage of the "=="
operator in test(1). It is enabled by default when PKG_DEVELOPER is
selected.

In my private bulk build of about 3700 packages, there had been no false
positive.
2006-10-02 15:42:47 +00:00
rillig
25e3638a11 Replaced ${RECURSIVE_MAKE} with ${SH}, so that the README.html files can
be generated again.
2006-10-02 09:37:09 +00:00
rillig
2527b18e5a Progress messages are prefixed with "sort-packages>", not "upload>". 2006-10-01 14:54:16 +00:00
rillig
f1509b7f5e Reformatted the header comment to be searchable by bsd.pkg.help.mk. 2006-10-01 14:53:30 +00:00
rillig
28034cde51 All the files in mk/ are searched for helping information.
Variable help texts may also start with the variable name, followed by a
colon.

The help message is more detailed.
2006-10-01 14:52:32 +00:00
rillig
02fa6bfec1 The value of PKG_OPTIONS_VAR is printed as is in an error message. This
makes "double quotes" visible when they are accidentally included by the
pkgsrc user.
2006-10-01 14:51:03 +00:00
joerg
3675902ba1 Remove XFree86. 2006-09-27 15:18:12 +00:00
minskim
2b7640f4c7 Use /bin/mount if it exists on Linux, because some distros (e.g. Ubuntu
Linux) do not have /sbin/mount.
2006-09-26 20:56:28 +00:00
salo
ede2607dbc Adjust MASTER_SITE_MOZILLA. 2006-09-25 14:13:17 +00:00
ghen
b255a2482c PR pkg/33876: use the actual package name instead of "this package" in
supported-options-message.  ok with wiz.
2006-09-25 08:23:59 +00:00
salo
b0143c74e0 Generalize Mozilla GTK2 packages in a comment. 2006-09-24 16:23:04 +00:00
salo
a69f682092 Describe "seamonkey" gecko option. 2006-09-24 16:22:42 +00:00
joerg
7545d135e6 - Compute CHEKCK_FILES filter on the entries requested and keep it
as tight as possible. Files we don't handle shouldn't be skipped.
- fonts.alias is not created automatically, so don't remove it.
- create fonts.encoding with mkfontdir using -e X11_ENCODINGSDIR.
  On platforms not following the X11R6 loayout this might need to
  be overriden.
- Fix type1inst calls.
- Modify packages which installed fonts.alias before to actually
  include it in the PLIST and bump the revisions accordingly.
- Modify xorg-fonts* packages to use FONTS_DIRS.* to build indices
  at run time.

Discussed with wiz and jlam.
2006-09-22 21:53:56 +00:00
rillig
262f164d43 Bugfix: In the #! interpreter lines, allow white-space behind the #!.
This fixes the build for audio/madman. Before, only some of the
interpreters had been replaced.
2006-09-19 20:51:34 +00:00
rillig
8a9fdf8254 Even if NO_CHECKSUM is set, the "checksum" target still needs to depend
on "fetch". Otherwise the distfiles are never fetched.
2006-09-19 00:03:44 +00:00
tron
6620b33b6b Define "NOLOGIN" to "/usr/bin/false" rather than ${FALSE} (which doesn't
contain the directory name) and don't set "_PKG_USER_SHELL" which should
really be private to "bsd.pkginstall.mk".
2006-09-18 15:11:37 +00:00
rillig
a9df3d8786 When $debug_log is set to ":" and at the same time $IFS is ":", the
command line

    $debug_log $arguments

tries to execute the empty command. This results in error messages of
the form

    cc[50]: : cannot execute   (IRIX)
    bash: : command not found  (Bash)
    : permission denied        (NetBSD /bin/sh)

Setting IFS to the original value as soon as possible fixes these bugs.

Fixes PR 34135.
2006-09-17 22:52:45 +00:00
rillig
6dbf373945 Fixed the "unknown command" error messages for debug_log, which is a
variable, not a shell function.
2006-09-17 18:46:00 +00:00
joerg
86ec0977ff Also ignore fontconfig cache like the "clasic" databases. 2006-09-17 17:02:38 +00:00
obache
1874782916 Now, gettext tools is available from devel/gettext-tools, so prioritize
gettext-tools over gettext.
2006-09-15 14:18:41 +00:00
rillig
5fbbc4d343 Bugfix: Missing shared libraries are reported again. This feature had been
broken since the introduction of delayed errors and warnings.
2006-09-14 22:00:49 +00:00
joerg
030dbf012a Add support for cpio archives. 2006-09-13 11:10:36 +00:00
jmmv
e738feda0d Add the nds@NFE locale directory, initially used by yelp-2.16.0. 2006-09-12 17:04:58 +00:00
jmmv
6bda98c0c6 Add a bunch of Spanish locale directories (es_*), initially used by
gnome2-applets-2.16.0.
2006-09-12 13:20:20 +00:00
joerg
b86e8f2641 Add description for psycopg[12] options used by www/py-django. 2006-09-11 11:40:57 +00:00
schwarz
cb784f6e64 cosmetic change 2006-09-10 20:19:39 +00:00
schwarz
aa38134c13 ${X11BASE} can now be set to /usr, so just do so for IRIX and OSF1. No need
for any artificial symlinking any more in bootstrap.
2006-09-10 20:14:43 +00:00
schwarz
94201593d3 ensure that -I and -L paths are correctly rewritten even if ${LOCALBASE}
contains ${X11BASE} (e.g. ${LOCALBASE} being /usr/local and ${X11BASE} being
/usr)
2006-09-10 19:49:53 +00:00
jmmv
1dd0b8c5b8 Add the gn locale directory, initially used by gnome-menus 2.16.0. 2006-09-10 17:08:25 +00:00
tron
5311471179 Fix PR pkg/34139 in a diffent way:
Setting "WRAPPER_SKIP_TRANSFORM" to "yes" isn't enough because "imake"
will invoke the C compiler which might be a wrapper script which always
fails because the package didn't use "USE_LANGUAGES+= c".

The "imake-check" script now simply uses the original command path before
"bsd.pkg.mk" modified and will therefore avoid using any wrappers.
2006-09-10 16:39:31 +00:00
schwarz
dd2de6f7ef improve imake support on IRIX 5 2006-09-10 13:44:58 +00:00
obache
33d4b2b7d2 Rename variable MAKEFILE to MAKE_FILE, as suggested in PR 28392. 2006-09-09 02:35:13 +00:00
jmmv
1e5e95d9bf Add the share/gtk-doc/html directory. This is already used by several
packages that do not remove this at all, and others will be migrated to
use it in the future.
2006-09-07 18:11:11 +00:00
wiz
a68d94c1e6 Describe libgpod option. Sort. 2006-09-06 22:57:01 +00:00
schwarz
d478480a96 use gzip -cd instead of gzcat, the latter not being available on all systems,
notably not being part of pkgsrc.
2006-09-03 16:36:37 +00:00
hira
0dbc81e89e Call imake(1) with `WRAPPER_SKIP_TRANSFORM=yes'. The arguments
should not be transformed by wrapper.  This fixes PR pkg/34139.
Reviewed by tron@.
2006-09-03 13:07:59 +00:00
wiz
9d3304f7eb Update MASTER_SITES (mirror.switch.ch).
From Jukka Salmi in PR 34457.
2006-09-03 10:21:52 +00:00
obache
ee65247b9c Added http://qgpop.dl.sourceforge.jp/ in MASTER_SITE_SOURCEFORGE_JP. 2006-09-02 15:10:38 +00:00
obache
5624d01004 SUNSITE in Tokyo University of Science has been closed,
so remove sunsite.{tus,sut}.ac.jp
2006-09-02 09:07:03 +00:00
obache
a76da5187a Canonical name of SourceForge.jp's DNS round robin download server is
`download', not `downloads'.
2006-09-02 08:13:07 +00:00
rillig
9a607f8e53 Instead of the variables CHOWN and CHGRP, the TOOLS_PLATFORM.* variables
need to be overridden to generate tool wrappers that also work when
called with their simple names (for example chown instead of ${CHOWN}).
2006-08-31 16:21:20 +00:00
dmcmahill
e141f363dc Add missing $NetBSD$ 2006-08-28 13:27:41 +00:00
schwarz
0f4045fde0 spelling correction 2006-08-26 19:07:00 +00:00
schwarz
b309575681 X11_TYPE being undefined cannot occur thanks to the preceeding line 2006-08-26 18:55:43 +00:00
minskim
6220854e14 Make sure that /usr/bin/wish exists before using it as a tool. 2006-08-25 10:03:02 +00:00
joerg
5c0a40494e Avoid spurious false negatives when the directories are reordered
during install phase by sorting explicitly.
2006-08-22 18:50:56 +00:00
schwarz
ffe01c2d57 it is not necessary to have a variable _EXTRACT_PATTERNS that contains
${EXTRACT_SUFX}, so one can directly use EXTRACT_ONLY instead.
EXTRACT_ONLY defaults to ${DISTFILES} which in turn defaults to
${DISTNAME}${EXTRACT_SUFX}. So if EXTRACT_SUFX is relevant for determining
which tools are needed this can only happen if neither DISTFILES nor
EXTRACT_ONLY have been set by the package, in which case the relevant
variable EXTRACT_ONLY would contain EXTRACT_SUFX.
2006-08-19 20:32:28 +00:00
schwarz
463b1f8ab6 only depend on the extract tools if there are actually any files to extract 2006-08-19 20:06:57 +00:00
tonio
4a6bf57917 document mutt-compressed-mbox option 2006-08-16 10:43:58 +00:00
wiz
ea6e146043 Update some more comments for teTeX2 removal. 2006-08-11 13:32:28 +00:00
rillig
dd2923d156 When installing packages, first "cd $USR_PKGSRC" to be independent of
the current working directory.

See http://mail-index.netbsd.org/tech-pkg/2006/08/08/0006.html
2006-08-10 17:58:10 +00:00
adrianp
b1fc0d3437 Add in FTP option for INGO update. 2006-08-10 14:30:36 +00:00
adrianp
d441d06525 Add in new options for mrtg and smokeping for latest updates. 2006-08-10 14:28:46 +00:00
minskim
69e7be5b27 Remove references to teTeX2. 2006-08-10 03:35:33 +00:00
jlam
76a1020667 Drop .ORDER declarations since pkgsrc doesn't support "make -j ...". 2006-08-09 15:31:01 +00:00
jlam
39b54abe7c Only acquire the localbase lock after acquiring root privileges. This
fixes "make install" using just-in-time su-to-root.
2006-08-09 15:25:49 +00:00
cube
7e44cbf35d Add "dvipdf" to the list of tools provided by ghostscript. 2006-08-07 14:54:14 +00:00
schwarz
ff389f044d CPP on IRIX 5 with IDO cc is /usr/lib/cpp 2006-08-06 18:59:41 +00:00
jmmv
476a9de1a8 Add the mg locale directory (to be used by libgtop2). 2006-08-06 11:36:59 +00:00
jmmv
74a4c2179c Handle the share/pkgconfig directory where platform-independent packages
(e.g. gtk-doc 1.6) want to install .pc files.
2006-08-06 09:35:39 +00:00
perry
132c931981 add an http: urls for gnome and gnu for the benefit of those with
broken ftp proxies
2006-08-06 04:56:50 +00:00
wiz
d46ae655fd Document sane-backends-hp3900. 2006-08-05 22:42:20 +00:00
rillig
a5c5777ae5 Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.
Added two targets acquire-localbase-lock and release-localbase-lock,
which mark the complete LOCALBASE directory as locked, so that multiple
packages cannot run the install, deinstall or bin-install targets at the
same time.

The install target aquires locks in both WRKSRC and LOCALBASE, the other
two targets only need the LOCALBASE lock, since they may be run without
WRKSRC being present on the system.

locking.mk must be included before tools.mk and the PKG_FAIL_REASON
check.
2006-08-04 20:52:27 +00:00