Commit graph

1954 commits

Author SHA1 Message Date
joerg
2d1ba244e9 Simply and speed up buildlink3.mk files and processing.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
2009-03-20 19:23:50 +00:00
joerg
4be66048ad Fix circular dependency detection for the case of non-leading circles.
For the dependency chain A->B->B the old code created:
_PKGSRC_DEPS=", B-1.0, A-1.0", which obviously can't match the PKGNAME
of B.
Skip the _flavor-bootstrap-depends processing if PKG_FAIL_REASON is
already set and move the check for circular dependencies right after the
block that defines PKGNAME and friends.
2009-02-06 15:27:00 +00:00
dillo
1c29e98ca7 For packages setting USE_BSD_MAKEFILE, explicitly set MKHTML to no.
This makes these packages build with the changed default in recent
NetBSD -current.

Approved by agc.
2008-09-22 14:52:07 +00:00
agc
b8870d4b60 For no real reason, but per the "discussion" on tech-pkg, default the
creation of a symbolic link to the real work directory to "no".
2008-08-19 17:28:24 +00:00
agc
875cf57fe4 Restore default behaviour for creating a symbolic link to the ${WRKDIR},
which was lost when this definition was introduced without prior discussion.
2008-07-21 22:34:18 +00:00
dillo
f8c3a5bb6b Set MAINTAINER to OWNER if the latter is set.
Somehow this got lost from the original OWNER support commit.
2008-06-14 08:32:33 +00:00
joerg
3ba79d294e Move META_PACKAGE logic from bsd.pkg.mk to bds.prefs.mk, otherwise it
can't define destdir support.
2008-06-12 01:09:01 +00:00
joerg
a58b3852c6 Annotate whether a package was built with DESTDIR. 2008-06-12 00:06:27 +00:00
joerg
d2ec3ef075 Move meta package override earlier. 2008-05-26 13:25:22 +00:00
joerg
a8a3c01339 Explicitly add pax dependency in those Makefiles that use it (or have
patches to add it). Drop pax from the default USE_TOOLS list.
Make bsdtar the default for those places that wanted gtar to extract
long links etc, as bsdtar can be built of the tree.
2008-05-25 21:42:20 +00:00
joerg
b1448e9df8 PKGNAME_NOREV is used to define the DIST_SUBDIR in some places, so
ensure it is defined with the rest of the PKGNAME_* variables before
including the phase variable files.
2008-05-23 12:31:24 +00:00
joerg
65244e1c32 Move digest dependency into checksum and fetch part.
Make _ALL_FILES and in turn _CKSUMFILES available earlier.
Use it to only depend on digest if _CKSUMFILES is non-empty.
NO_CHECKSUM will now only skip the checksum and checksum-phase
targets. FAILOVER_FETCH will independently check the sums on
distfiles and depend on digest, fixing the remaining issues
originally raised in PR 34914.
2008-05-22 16:27:22 +00:00
tnn
3341e37bba Commit a workaround for the "make replace fails as non-root" bug:
Make sure _PKGSRC_BARRIER is set when using just-in-time su.
I've been running this for a long time in my tree without ill effects.
For more information see PR pkg/34470 and PR pkg/38505.
2008-05-21 19:53:59 +00:00
joerg
caa9b2eebf Move handling of pkg_install version into flavor. Add an explicit
phase pkg_install-depends before bootstrap-depends that just tries to
install a new pkg_install if the current version is too old. Still
keep it as bootstrap dependency for the bulk build code.
For NetBSD, PKG_TOOLS_BIN has to be computed in shell code due to a make
bug.

OK: jlam@
2008-04-03 14:07:51 +00:00
joerg
f23c5a7e89 Add PKGVERSION_NOREV to complemenet PKGNAME_NOREV. 2008-03-08 14:28:05 +00:00
joerg
861a664974 Split PKGTOOLS_REQD into two parts. If we don't have PKGTOOLS_REQD,
but something after PKGTOOLS_BASE_REQD, just register a bootstrap
dependency.
2008-02-26 13:46:21 +00:00
rillig
26f0d86945 Pass the proper flags for stripping binaries to packages using BSD Make. 2008-02-13 09:28:41 +00:00
tnn
d91ec32482 Enable fake home directory support. Also add a wrkref check because an
embedded path to the HOME directory can be a security problem if, say,
the package looks in the HOME directory of an unprivileged user for
configuration files.

Note that this has the potential to cause some short-term fallout.
2008-02-10 11:43:20 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
joerg
813288f511 pkg_install 20070802 is good enough, don't be overly aggressive. 2008-01-16 01:01:26 +00:00
adrianp
045f83863c Bump PKGTOOLS_REQD to 20071224 so everyone still has the functionality
that used to be in security/audit-packages.
2008-01-13 20:23:18 +00:00
obache
55d54e4005 Add more *ONW, *GRP and *MODE variables to BSD_MAKE_ENV for unprivileged build. 2008-01-01 14:20:20 +00:00
rillig
b7678466da Meta packages have user-destdir support and don't need any patches. 2007-12-19 12:32:06 +00:00
rillig
d877440c8b Added a variable META_PACKAGE that should be set to "yes" by
meta-packages. That way, the packages don't need to know the details of
how meta-packages are defined.
2007-12-19 11:56:19 +00:00
rillig
74b91acea7 show-var is related to show-vars and show-subdir-var. 2007-12-13 11:57:34 +00:00
rillig
9fab8079e7 Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.
2007-12-01 11:11:53 +00:00
dsl
d24555b956 Fix the .include lines so that make looks in the right place first.
Remember .include "foo.mk" is looked for (first) in the directory that
contains the makefile being processed (like in C), so remove all the
${.PARSEDIR} and ../ sequences that just cause grief.
2007-10-13 11:04:15 +00:00
martti
bd986edbc7 Remove trailing spaces. 2007-10-09 19:19:08 +00:00
rillig
712c3ee7d5 Removed a funny comment from 1997. 2007-09-29 16:03:28 +00:00
rillig
84579a3239 More comments. 2007-09-27 11:19:52 +00:00
jlam
5073c3d95d Add a "system features" framework that will eventually be used to
automatically supply missing "basic" headers and libraries from an
older system, e.g. IRIX 5.x or Interix or AIX, etc.

Example usage:

    USE_FEATURES+=      snprintf glob regex

For now, we just pull in libnbcompat to supply the missing bits.
2007-09-07 21:55:44 +00:00
rillig
91c415b938 The WRKDIR and PREFIX can be saved in the log directory when a package
doesn't build properly. These options are off by default since they
require much disk space.
2007-09-07 15:51:53 +00:00
joerg
b0a55e5360 Explicitly bail out if X11_TYPE=xorg is found. 2007-08-18 00:30:21 +00:00
rillig
7d184f93ff Moved the stuff that is common to all directories of pkgsrc into its own
file. Now "make help" can be called from the top-level directory,
avoiding to parse lots of buildlink3.mk files just to get some help.
2007-08-13 06:03:46 +00:00
rillig
3f5fe75745 build-env is no longer defined in bsd.pkg.debug.mk. 2007-08-13 05:24:26 +00:00
rillig
0e365be076 Fixed _PKG_DEBUG_SCRIPT for the case of PKG_DEBUG_LEVEL=0. 2007-08-13 05:22:37 +00:00
joerg
dfb9b6a575 Try a bit harder to guess which mk.conf the user is using, when
telling him to accept a license:
- if MAKECONF is set, use that
- if this is NetBSD and a non-bootstrap make is used, take /etc/mk.conf
- otherwise use ${PREFIX}/etc/mk.conf.

Issues reported by Michael Neumann on DragonFly's user list.
2007-08-10 13:09:52 +00:00
joerg
34c60ba2a2 Update _USE_DESTDIR=full handling to use the new -u/-g code and
require pkg_install-20070802 for using it. It is now considered
to work correctly and ready for general consumption.
2007-08-03 14:03:39 +00:00
jlam
33f30156fb * Add new emulator framework in pkgsrc/mk/emulator that handles all
binary-only packages that require binary "emulation" on the native
  operating system.  Please see pkgsrc/mk/emulator/README for more
  details.

* Teach the plist framework to automatically use any existing
  PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition.

* Convert all of the binary-only packages in pkgsrc to use the
  emulator framework.  Most of them have been tested to install and
  deinstall correctly.  This involves the following cleanup actions:

    * Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM}
      more consistently.

    * Simplify packages by using default INSTALL and DEINSTALL scripts
      instead of custom INSTALL/DEINSTALL code.

    * Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc.
      Packages only need to state exactly which emulations they support,
      and the framework handles any i386-on-x86_64 or sparc-on-sparc64
      uses.

    * Remove "USE_NATIVE_LINUX" from pkgsrc.  The framework will
      automatically detect when the package is installing on Linux.

  Specific changes to packages include:

    * Bump the PKGREVISIONs for all of the suse100* and suse91* packages
      due to changes in the +INSTALL/+DEINSTALL scripts used in all
      of the packages.

    * Remove pkgsrc/emulators/suse_linux, which is unused by any
      packages.

    * cad/lc -- remove custom code to create the distinfo file for
	all supported platforms; just use "emul-fetch" and "emul-distinfo"
	instead.

    * lang/Cg-compiler -- install the shared libraries under ${EMULDIR}
	instead of ${PREFIX}/lib so that compiled programs will find
	the shared libraries.

    * mail/thunderbird-bin-nightly -- update to latest binary
	distributions for supported platforms.

    * multimedia/ns-flash -- update Linux version to 9.0.48 as the
	older version is no longer available for interactive fetch.

    * security/uvscan -- set LD_LIBRARY_PATH explicitly so that
	it's not necessary to install library symlinks into
	${EMULDIR}/usr/local/lib.

    * www/firefox-bin-flash -- update Linux version to 9.0.48 as the
	older version is no longer available for interactive fetch.
2007-07-29 05:18:36 +00:00
jlam
9bb51d11c7 Putting bsd.pkginstall.mk under bsd.tools.mk was a bad idea -- the
former set several USE_TOOLS lines that were being missed by bsd.tools.mk.

Rearrange the +SHLIBS code so that bsd.tools.mk can now be included
after bsd.pkginstall.mk again.  The +SHLIBS code has now been moved
over to the plist module, which is so far the repository for all of
the shlib-type handling.

This should fix the problem with fonts handling being broken.
2007-07-23 15:23:46 +00:00
rillig
210f9de622 Enabled the warnings. 2007-07-20 14:25:03 +00:00
jlam
2d76049e1e Add back a facility to rebuild the run-time library search paths database
on platforms that need it.

XXX Right now, if the platform needs it, then it runs for every package.
XXX This needs to be fixed to only run for packages that install shared
XXX libraries.

* Move mk/plist/shlib-type to mk/scripts.

* Move definition of SHLIB_TYPE from mk/plist/plist.mk to bsd.pkg.mk.

* Move inclusion of bsd.pkginstall.mk below bsd.tools.mk so that it
  can use SHLIB_TYPE.  This is necessary because SHLIB_TYPE's value
  is the result of evaluating a command, and the command needs "TOOL"
  definitions provided by bsd.tools.mk.
2007-07-18 18:01:02 +00:00
joerg
6890115248 Change default value of CREATE_WRKDIR_SYMLINK to no. In combination with
WRKOBJDIR, the pkgsrc tree is now read-only. Brought up multiple times
on tech-pkg and no major objection.
2007-07-16 20:51:07 +00:00
joerg
79cc54a7ec Add two targets, pbulk-index and pbulk-index-item.
pbulk-index-item prints a number of variables used by the parallel bulk
build code during either the build, the report or the upload phase.

pbulk-index checks whether multiple versions of the current package
could be build (e.g. because multiple Python versions are supported) and
uses pbulk-index-item for each possible combination.

Thanks to David Laight for explaining the different between using :[#]
in the body of a make target and in a clause of an .if.

Powered-by: Google SoC 2007.
2007-05-09 23:33:51 +00:00
kristerw
14eee92e95 Fix quoting issue that gave syntax error when printing the message
that new package tools are needed.
2007-04-01 19:02:14 +00:00
wiz
082ea716fe Remove warning about LIB_DEPENDS, it's sooooo long gone... 2007-03-02 06:01:44 +00:00
rillig
322b451e11 Finished the split of PKGSRC_LOCKTYPE into LOCALBASE_LOCKTYPE and
WRKDIR_LOCKTYPE. Added more documentation.
2007-02-22 07:20:41 +00:00
rillig
70e7958fda I find the ABI useful to know when looking at a binary package. 2007-02-20 10:32:09 +00:00
obache
abd8e894eb MAKEFLAGS for su-${.TARGET} is ${MAKEFLAGS.su-${.TARGET}},
not ${MAKEFLAGS.${.TARGET}} .

Fix non-root user update target.
2007-02-09 01:57:17 +00:00
rillig
9ea67301ad Added the INFO_MSG command, which can be used when the user should be
noticed about something that is not severe enough to need a warning.
INFO messages go to stdout instead of stderr.

Added the :M* modifier to the INSTALL_MACROS to make the resulting
command lines somewhat shorter.
2007-01-11 12:11:03 +00:00