Commit graph

1622 commits

Author SHA1 Message Date
jlam
b26519d8a4 * Push the imake- and xmkmf-handling into the new tools framework.
* Get rid of an explicit check for ${_IMAKE_MAKE} == ${GMAKE} in
  bsd.pkg.mk to check for whether we need to depend on gmake or not.
  Instead, we now note in Linux.mk that packages that need imake will
  also need to use gmake by setting _IMAKE_TOOLS+=gmake.

* Push the definition of MAKE_PROGRAM from bsd.pkg.mk into make.mk where
  it's closer to related code.
2005-05-02 21:10:02 +00:00
jlam
93657f4c61 We need ldconfig (this should probably be restricted only to packages that
install shared libraries).
2005-05-02 05:45:15 +00:00
jlam
4ba6c74f93 Re-order nested .if statements for brevity. 2005-05-02 03:09:04 +00:00
jlam
96c5deea72 Teach the new tools framework about USE_TOOLS+=bzcat. 2005-05-02 02:50:33 +00:00
jlam
c368f44eea Split replace.mk into two parts, one of which is included by bsd.prefs.mk
to provide "TOOL" definitions for tools used by a top-level make process
(usually because it uses them in a != variable definition).  This allows
USE_TOOLS to be defined before bsd.prefs.mk is included by a package
Makefile, where USE_TOOLS lists the additional (non-default) tools that
are required to build the package.

Also, drop the fallback to existing "TOOL" definitions because we now
have TOOLS_PLATFORM.* for each platform in pkgsr/mk/tools/tools.*.mk.
2005-04-30 04:35:54 +00:00
drochner
8a1ed6d421 whitespace fix -- does nobody use emacs here? 2005-04-25 16:47:18 +00:00
jlam
e95a9612bd Prepend USE_NEW_TOOLS with an underscore to make it private. Developers
should set _USE_NEW_TOOLS=yes in /etc/mk.conf in order to test the new
tools framework.
2005-04-22 02:20:22 +00:00
tv
ccf0e6df92 Work around brain damaged autoconf by stripping leading and trailing
whitespace from *FLAGS and LIBS before doing :Q quoting.

Should fix PR pkg/29945.
2005-04-21 15:53:53 +00:00
agc
30ebfbe282 Add _DISTFILES and _PATCHFILES definitions to the list of definitions
which get recorded in the build information (accessible with pkg_info -B).
2005-04-18 10:06:47 +00:00
agc
82419dde61 Don't fail if there are multiple digest values for the same file with the
same algorithm in the distinfo file - pointed out by Robert Elz in PR 29973.

Additional testing by wiz - thanks!
2005-04-16 09:26:22 +00:00
agc
9318dc5a01 Occasionally we do not want the "--host=${MACHINE_GNU_PLATFORM}" argument
added if GNU_CONFIGURE is specified - the arla and forthcoming openafs
packages are ones that need to be able to let the GNU configure script
guess for itself, rather than hardcoding the value.

Add a switch called USE_GNU_CONFIGURE_HOST to determine whether the
--host argument is provided to the GNU configure script.  This is
switched on (it has a "yes" value) by default, so the previous
behaviour applies, but allows us to specify this value on a
package-by-package basis.

Documentation changes for this are also forthcoming.
2005-04-16 09:20:18 +00:00
jlam
91563cafa5 Add a new yes/no variable USE_NEW_TOOLS to ease testing the new tools
framework.  USE_NEW_TOOLS defaults to "no".
2005-04-15 02:04:57 +00:00
rillig
40631ad1b3 Print out the exitcode of pkg_create if nonzero, as it sometimes exists
without an error message. (Example: editors/abiword on NetBSD-1.6.2/i386.)
Approved by jlam.
2005-04-13 16:15:59 +00:00
jlam
4539e78461 Fix error introduced in rev. 1.1606: "$${PKGVULNDIR}" should be
"${PKGVULNDIR}" (one $, not two).  This was causing the vulnerabilities
file to be looked for in the wrong place.  This fix makes the
check-vulnerable target actually parse the vulnerabilities file and
look for vulnerable installed packages again.
2005-04-13 14:07:30 +00:00
tv
f8bc76558e Always include wrapper/bl3, period, even if NO_BUILD. 2005-04-05 14:00:33 +00:00
minskim
aa94bc412a Prevent MAKEFLAGS from being passed through shell environment. It was
redundant because we explicitly pass MAKEFLAGS to a sub-process
through command line arguments.

This fixes the problem reported in PR pkg/29874 that PKGNAME_REQD is
not overridden in recursive MAKE calls.
2005-04-05 03:18:00 +00:00
agc
974f1af6e8 Fix for PR 28230 (bsd.pkg.mk ignores /etc/audit-packages.conf) by
sourcing any config file, if it's defined.  With thanks to Julio M.
Merino Vidal for the first pass at a fix, and for keeping me honest
and up-to-date with variable checks in portable shell constructs.
2005-03-31 21:02:28 +00:00
garbled
9a6f8c33a1 Fixes for shlib handling on AIX 2005-03-29 08:17:42 +00:00
tv
fe3c1321bf USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per mail
to tech-pkg:

=====

* USE_BUILDLINK3=YES will be unconditional.  (In fact, USE_BUILDLINK3 will
  be ignored altogether by mk/; but see below.)

* NO_BUILDLINK and NO_WRAPPER will be ignored by mk/.  If a build happens,
  these phases will happen.

* The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER.
  If no build happens, those phases are not needed.

* NO_TOOLS will be ignored by mk/.  The tools phase, which provides much
  more than just the C compiler, will always happen regardless of package.
  This will make metapackage builds only slightly slower, in trade for far
  less user error.
2005-03-24 17:46:00 +00:00
xtraeme
896629329a In the distclean target, if PKG_RESUME_TRANSFERS is set, clean
the temp files too.
2005-03-22 22:49:15 +00:00
xtraeme
8ca224b2cb Some changes for PKG_RESUME_TRANSFERS:
o If origfile is already downloaded (size ok) and there's
  a temp file with incomplete size, don't try to resume the
  transfer on the temp file, remove it.
o Clean the code a bit.
2005-03-22 22:20:21 +00:00
jmmv
d5eb7630f4 Reset the current locale to a sane value (that is, 'C') during the build
of packages.  Several utilities behave differently or even incorrectly if
a locale different than 'C' is set.

One of these is perl, which spits a big warning and then breaks some
packages.  An example is irssi, as described in PR pkg/29613 by Hanno
Wagner.
2005-03-20 18:18:09 +00:00
tv
b46a7543a3 Fix a gleaming illustration of why using YES/NO variables everywhere
possible, just for the sake of doing so, is not a good thing to do:

The platform files define _STRIPFLAG_* to determine whether to strip things.
But since this is included in bsd.prefs.mk, ".if ..." checks cannot take
things set in the Makefile into account.  So convert INSTALL_UNSTRIPPED=YES
to a defined/undefined variable check in bsd.pkg.mk, and use the :D:U idiom
in the _STRIPFLAG_* variables.

This should fix PR pkg/28772 and PR pkg/29031.
2005-03-18 18:16:34 +00:00
dmcmahill
fd010f158d make sure we correctly set F77. Addresses PR29666 2005-03-16 02:09:54 +00:00
agc
113eb1558f Put back the speed-up in the vulnerability checking when building a package,
but disable this if the package name in the pkg-vulnerabilities file contains
a meta-character. This speeds up the check-vulnerable target from:

[9:28:06] agc@sys3 ...pkgsrc/misc/libutf 11 > time make check-vulnerable
1.821u 1.988s 0:02.57 147.8%    0+0k 0+0io 0pf+0w
[9:28:17] agc@sys3 ...pkgsrc/misc/libutf 12 >

to

[9:28:27] agc@sys3 ...pkgsrc/misc/libutf 13 > time make check-vulnerable
0.273u 0.233s 0:00.33 151.5%    0+0k 0+0io 0pf+0w
[9:28:30] agc@sys3 ...pkgsrc/misc/libutf 14 >

(with caches filled, on a fairly fast machine - P4 2.8 GHz, 2GB RAM).
2005-03-13 09:30:31 +00:00
agc
ddacec0cfe When FAILOVER_FETCH is set, only use the first digest algorithm found
for a dist file or patch, and let the "checksum" target do the full
digest integrity checks.  Should fix a problem reported by John Klos
on tech-pkg, which I was a bit dim in analysing.
2005-03-02 11:11:36 +00:00
veego
d53b01d221 Fix PLIST_SRC error introduced in rev 1.1593.
Before this fix it would include
  PLIST.common
then _only_ one of the following
  PLIST.${OPSYS}
  PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
  PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
  PLIST
and then PLIST.common_end.

Now, uses all of the following PLIST files, in that order:

PLIST.common
PLIST.${OPSYS}
PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
PLIST
PLIST.common_end
2005-02-27 22:10:25 +00:00
agc
c323caee5b Fix a problem introduced in the previous commit, noticed by Matthiases
Scheler and Drochner.

Handle missing checksums in distinfo properly.

Tested by myself and tron.
2005-02-25 13:05:52 +00:00
agc
e96ce79e2e As seen on tech-pkg - allow multiple digest algorithms to be used to
ensure the integrity of distfiles and dist patches.  For now, the
default algorithms are SHA1 and RMD160, set as a whitespace-separated
list in the DIGEST_ALGORITHMS definition.  The DIGEST_ALGORITHM
definition is deprecated.

Patchfiles will still use simply SHA1, since we are trying to detect a
binary "has this file changed", rather than proect against tampering.
In short, if someone can modify the patch file, they can modify the
distinfo file holding its digest information. This value is set in the
new PATCH_DIGEST_ALGORITHM definition.

Triggered by the breaking of SHA1, as reported in

	http://www.schneier.com/blog/archives/2005/02/sha1_broken.html
2005-02-22 21:01:10 +00:00
veego
8b44024dc5 Change the files to be used for PLIST_SRC from
PLIST.common
 PLIST.${OPSYS}
 PLIST
 PLIST.common_end
to
 PLIST.common
 PLIST.${OPSYS}
 PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
 PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
 PLIST
 PLIST.common_end

Which makes it possible to remove duplicated code in some packages.
This doesn't change anything, because all affected packages define PLIST_SRC,
so this code would never be used for them.
And most of them will be fixed with the next commit.

ToDO: ${MACHINE_ARCH:C/i[3-6]86/i386/g} looks wrong and should be changed,
but thats what we allready use for MESSAGE_SRC.
2005-02-21 20:12:01 +00:00
grant
384e38172b fix bug introduced in 1.1569: use ${GREP} instead of 'grep' and not
all grep(1)s support grepping for empty string. `${GREP} .' instead.
2005-02-20 06:02:06 +00:00
grant
d84e86c700 update the PLIST handling for AIX, shared libraries have the .so
extension when the runtime linker is used. from garbled@.
2005-02-19 04:25:31 +00:00
agc
b10fb63e34 Fix an anomaly noted by Steve Bellovin in
<20050215182853.AC52D3C03B8@berkshire.machshav.com>

The check for a vulnerable package at package fetch time is producing
incorrect results when csh-style alternates are used in the
pkg-vulnerabilities specification of the vulnerable package - disable
the incorrect speed-up that was there previously, at the expense of
some machine cycles at build time.
2005-02-16 11:01:03 +00:00
tv
568d0bf7bd Some older ${FIND}s do not have an implicit "-print"; make sure to specify
it explicitly (as with other ${FIND} usage here).
2005-02-15 16:21:41 +00:00
rillig
b791494593 Corrected a misspelling of a variable. I used $rebooted in a shell code,
which had better been $$rebooted (Makefile quoting). Approved by jlam.
2005-02-13 03:49:12 +00:00
rillig
0fff1d5ac8 Don't use the -nt operator for ${TEST}. It is not defined in POSIX, and
not provided by the Solaris 9 /bin/sh. Use the find(1) -newer expression
instead, as it expresses exactly what we want, compared to the "ls -t"
hack.
2005-02-12 00:27:41 +00:00
tv
239f7cd34f Whitespace formatting nits. 2005-02-11 17:00:07 +00:00
tv
79ba5ea33a Consolidate PLIST_SRC default generation and the plethora of failsafe
error checks into labelled blocks toward the top of the file.

While here, remove the historic (now completely empty; it was replaced by
PKG_FAIL_REASON some time ago) uptodate-pkgtools target and the references
to it.
2005-02-11 16:57:45 +00:00
tv
614ff30790 Visual cleanup from tv-derecurse:
Consolidate many MAKE_ENVs and SCRIPTS_ENVs into a common block.
(CONFIGURE_ENVs to be done later.)

Introduce new variable ALL_ENV which is automatically included into all
of MAKE_ENV, SCRIPTS_ENV, and CONFIGURE_ENV; this allows much cleaner
addition of the common CC/CXX/CFLAGS/etc. variables needed by all of these.
2005-02-11 16:36:49 +00:00
tv
4c2cccef33 Migrate the big block of USE_PERL5 and PERL5_REQD logic to bsd.pkg.use.mk. 2005-02-11 16:15:53 +00:00
tv
4b3f94acc8 Migrate several USE_* logic blocks, previously sprinkled liberally
throughout bsd.pkg.mk, to labelled blocks in bsd.pkg.use.mk.
2005-02-11 16:11:36 +00:00
tv
5655fbe984 Merge down some more visual cleanup from tv-derecurse to reduce divergence.
Part of this, introduce bsd.pkg.use.mk, where the Special Logic invoked
by various pkgsrc-wide USE_* variables will be migrated/consolidated.
2005-02-11 15:55:13 +00:00
tv
7e17264955 "replace" should depend on ${_PKGSRC_BUILD_TARGETS}, just like "install". 2005-02-09 16:03:47 +00:00
jlam
2ab02f1ddd Bump PKGTOOLS_REQD to 20050204. This version of pkg_install passes
the correct information to the +INSTALL and +DEINSTALL scripts to fix
problems with binary packages incorrectly locating the reference counts
database, e.g. /var/db.refcount.
2005-02-04 09:19:41 +00:00
jlam
642fa3e0e6 Don't make pkgsrc depend on dc(1) to be present in the system. Since
we already use awk so pervasively in pkgsrc, simply use awk in place
of dc for simple computations.
2005-01-28 21:05:59 +00:00
jlam
ce33cd0c70 Move the creation of ${PKG_DB_TMPDIR} to when we create ${WRKDIR}.
This ensures that it's always created with the same user/group/mode
as ${WRKDIR}, so if a non-root user thinks he has permissions to remove
${WRKDIR}, then that expectation will remain true for ${PKG_DB_TMPDIR}.
2005-01-27 18:32:20 +00:00
tv
1d26911a04 Fix handling of PREPEND_PATH in dependency-recursed builds. 2005-01-27 11:21:46 +00:00
tv
bcce274c8b Move the PREPEND_PATH for LOCALBASE/bin (and optionally X11BASE/bin) to a
spot that will come before compiler.mk (in bsd.prefs.mk).  Previously,
LOCALBASE/bin was appearing earlier in the path than work/.<compiler>/bin,
which could cause the Wrong Thing to happen.
2005-01-27 04:05:08 +00:00
tv
e2d4e995a8 Relax need to put GNU_CONFIGURE before inclusion of bsd.prefs.mk:
Convert _OPSYS_MAX_CMDLEN to a plain _OPSYS_MAX_CMDLEN_CMD variable, which
is not evaluated by a shell until CONFIGURE_ENV is expanded (and only then
if USE_LIBTOOL+GNU_CONFIGURE are both set).
2005-01-25 18:15:58 +00:00
jmmv
f70b9a4716 Add alternatives.mk, a file used to manipulate the alternatives system.
A package can optionally provide an ALTERNATIVES file which contains pairs
of wrapper/alternative, one per line.  The file is then used by the install
and deinstall scripts to register the alternatives and to create the
appropriate wrappers.

Make bsd.pkg.mk include this new file.  This happens unconditionally to
keep all the alternatives logic in an independent file.  Otherwise, some
of the stuff could have to be moved to bsd.pkg.mk, breaking consistency.
2005-01-25 13:13:35 +00:00