Commit graph

2014 commits

Author SHA1 Message Date
jperkin
7002b040bb Remove mk/find-prefix.mk and its usage from the mk infrastructure.
The find-prefix infrastructure was required in a pkgviews world where
packages installed from pkgsrc could have different installation
prefixes, and this was a way for a dependency prefix to be determined.

Now that pkgviews has been removed there is no longer any need for the
overhead of this infrastructure.  Instead we use BUILDLINK_PREFIX.pkg
for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the
dependency is coming from pkgsrc.

Provides a reasonable performance win due to the reduction of `pkg_info
-qp` calls, some of which were redundant anyway as they were duplicating
the same information provided by BUILDLINK_PREFIX.pkg.
2015-11-25 13:05:47 +00:00
jperkin
1a2757e82f Introduce _USE_CWRAPPERS logic to ensure consistency, USE_CWRAPPERS could
differ between a package and user setting, resulting in incorrect WRAPPER_*
values being set from wrapper-defs.mk.
2015-04-29 14:23:23 +00:00
jperkin
d040a0e7c5 Split cwrappers from legacy wrappers. We no longer generate the legacy
wrappers when USE_CWRAPPERS is enabled, saving a reasonable amount of
I/O during builds, mostly due to avoiding the transform/untransform sed
file generations.

WRAPPER_DIR and WRAPPER_BINDIR are used by various packages to override
or point to specific wrappers, and these now point to the cwrappers
directory when enabled, removing the need for CWRAPPERS_BIN_DIR
duplication and fixing packages which previously were using legacy
wrappers by accident.

A number of targets are now duplicated between bsd.wrapper.mk and
cwrappers.mk, the intention being that the legacy wrappers will be
deprecated once cwrappers is verified on all supported platforms.  If
that turns out to take longer than expected, we will probably want to
introduce a wrapper.mk to abstract them away before loading the
appropriate back-end.
2015-04-27 19:59:07 +00:00
tnn
c9632aa0f3 Address issues raised by agc@ to make the github master site handling
more pkgsrcesque.

1) turn _USE_GITHUB into an internal infrastructure variable
2) put back MASTER_SITES in packages' Makefiles.
3) encode the account in the master site URL, remove GH_ACCOUNT
4) rename GH_PROJECT to GITHUB_PROJECT
5) rename GH_TAGNAME to GITHUB_TAG and allow it to accept commit hash
   as well as tag. GH_COMMIT is gone.
6) turn on this functionality when MASTER_SITES matches a predefined github
   pattern instead of via explicit USE_GITHUB setting.
2015-03-07 21:14:32 +00:00
tnn
a5c5eb95d9 Adopt USE_GITHUB from FreeBSD ports to make github MASTER_SITE
handling less painful.
See: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github

To use, set in Makefile:

DISTNAME=	exampleproject-1.2
USE_GITHUB=	YES

The following variables alter USE_GITHUB behavior:

GH_ACCOUNT	defaults to PKGBASE
GH_PROJECT	defaults to PKGBASE
GH_TAGNAME	defaults to PKGVERSION_NOREV
		(sometimes you want to override with v${PKGVERSION_NOREV})
GH_COMMIT	explicit commit hash if no tag is available
GH_RELEASE	default empty, may be set to ${DISTNAME} for example
GH_TYPE		overrides the autodetected MASTER_SITE URL scheme
2015-03-07 14:17:51 +00:00
dholland
2a00e7b840 Use PKG_SKIP_REASON instead of PKG_FAIL_REASON for some cases where
the problem is either situational (e.g. the various RESTRICTED-like
cases) or unfixable in pkgsrc (no pthreads, ipv6, etc. on platform).

Conversely, if the wrong version of mysql is installed, that's a
PKG_FAIL_REASON.
2015-01-01 07:51:47 +00:00
dholland
de73f20ecb Add support for BROKEN_ON_PLATFORM and BROKEN_EXCEPT_ON_PLATFORM, as per
discussion on tech-pkg.

BROKEN_ON_PLATFORM and NOT_FOR_PLATFORM are the same, except that
(now) BROKEN_ON_PLATFORM sets PKG_FAIL_REASON and NOT_FOR_PLATFORM
sets PKG_SKIP_REASON. BROKEN_EXCEPT_FOR_PLATFORM and ONLY_FOR_PLATFORM
correspond in the same way.

The idea is that going forward we will distinguish unbuildable
packages that theoretically ought to be fixed (these are BROKEN) from
packages where it doesn't make sense to build (these are NOT_FOR)...
examples of the former include most non-64-bit-clean packges; examples
of the latter include OS-specific language bindings.

A general review of the uses of NOT_FOR_PLATFORM and ONLY_FOR_PLATFORM
(converting many of them to BROKEN...) is coming up.

Similarly, a general review of the uses of PKG_FAIL_REASON and
PKG_SKIP_REASON is coming up.

For this to become useful, pbulk needs to be taught to report failing
and skipped packages differently - the idea is that failing packages
should be reported up front and skipped packages don't need to be. This
has not been done yet, but one set of things at a time...
2015-01-01 06:06:06 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00
joerg
6f8622bb33 mk/buildlink3/* (via mk/wrapper/bsd.wrapper.mk") must be included before
mk/cwrappers.mk, so fix include order.
2014-11-25 18:27:17 +00:00
joerg
516b42831c Add cwrappers glue as developed during Google's Summer of Code 2007. 2014-11-24 00:32:31 +00:00
joerg
c6e1b83d1b Simplify PKG_DEVELOPER checks. 2014-10-12 23:39:17 +00:00
wiz
e8647fedbb Remove SVR4_PKGNAME, per discussion on tech-pkg. 2014-10-09 13:44:32 +00:00
riz
3ab8e30838 Make package cross-compiling work through su-target as
well as it does for unprivileged builds.  From riastradh.
2014-08-28 22:29:37 +00:00
jperkin
aec701da4b Split SMF handling across bsd.pkg.mk and bsd.prefs.mk. Should fix issues
with packages which include bsd.prefs.mk before setting SMF variables.
2014-08-14 11:08:37 +00:00
wiz
c9122e82ab Remove old bulk build code. Use pbulk. 2014-06-02 10:24:05 +00:00
jperkin
5329420146 Move INIT_SYSTEM to bsd.prefs.mk, allowing it to be tested in
package Makefiles when packages perform custom rc.d handling.
2014-05-06 14:48:06 +00:00
wiz
8c640bc103 Remove DEBUG_FLAGS variable that occurs exactly once in pkgsrc -- here.
Set INSTALL_UNSTRIPPED if you want the behaviour it affected.
2014-04-15 18:55:18 +00:00
jperkin
e393ce6d94 Introduce infrastructure support for SMF.
SMF is the Service Management Facility, the default init system in
Solaris and derivatives since version 10.  This adds "smf" to the list
of supported INIT_SYSTEM types, and makes it the default init system on
platforms where it is available.

Packages can introduce SMF support by providing a manifest file, by
default located in ${FILESDIR}/smf/manifest.xml but manifests under
${WRKSRC} can be used too if the package source includes one.

SMF method scripts are supported too if required, using SMF_METHODS in a
similar manner to RCD_SCRIPTS.

Many parts of the SMF infrastructure are configurable, see mk/smf.mk for
the full details.
2014-03-11 14:07:04 +00:00
jperkin
b3106a0b77 Add initial support for alternative init systems.
This commit introduces an INIT_SYSTEM variable which will determine the
type of init system to be used on the target system, supporting "rc.d"
at this time.

The pkginstall infrastructure is changed to only install RCD_SCRIPTS if
INIT_SYSTEM is set to "rc.d", and PLIST entries for rc.d scripts are
now handled automatically based on RCD_SCRIPTS.
2014-03-11 13:45:07 +00:00
obache
7c1e3ef362 Use PKGNAME_NOREV as a part of default WRKSRC if DISTNAME is not defined. 2014-03-03 03:21:16 +00:00
obache
b2f380436c loose mandantory DISTNAME. 2014-03-02 08:54:41 +00:00
christos
0399286bdf Reset MAKELEVEL=0 to fix bad gmake/bsdmake interactions.
Our make(1) now sets $MAKELEVEL. While this should cause no harm, gmake
detects a non-zero $MAKELEVEL and automatically sets "w" in $MAKEFLAGS
for subordinate makes, in order to print the entry and exit directories.
Our make, does not understand -w, so it prints an error message and exits.

In order to catch this everywhere (since cmake for example can invoke
either our make or gmake depending on how it feels), we reset the variable
for any top level command. This effectively reverts to the behavior of
our make not setting $MAKELEVEL.
2013-07-15 20:22:15 +00:00
tron
65964dec38 Revert change to "PKG_SETENV":
1.) It breaks the build of "www/firefox" which gets upset if "SHELL" is
    not defined in the environment. There are probably more packages
    which similar problems.
2.) It breaks established use case like this one:

	export ALLOW_VULNERABLE_PACKAGES=yes
	cd pkgsrc/multimedia/ffmpeg2theora
	bmake install

    In this case the value of "ALLOW_VULNERABLE_PACKAGES" will not be
    passed to the build of "pkgsrc/multimedia/ffmpeg". And the build of
    this package will fail due to known vulnerabilities.
2013-06-05 08:19:57 +00:00
riastradh
d872ff9ca8 Make PKGSRC_SETENV sanitize the environment. 2013-06-03 23:27:14 +00:00
obache
add5c36964 drop `file' command from default USE_TOOLS list.
It is used in limited case, and does not exist by default on some platforms.
proposed at over 30 months ago, and no negative feedback (only one request).
2013-05-12 06:17:50 +00:00
riastradh
9e0c502480 Split BUILD_DEPENDS into TOOL_DEPENDS and BUILD_DEPENDS in mk/.
Build depends are target packages that are needed at build-time for,
e.g., static libraries to link against, header files to include, &c.
Tool depends are native packages that are needed at build-time for,
e.g., compilers/linkers/&c. to run.

ok agc
2013-05-09 23:37:25 +00:00
obache
ad404487da also reset LC_ALL as C. 2013-04-25 12:58:08 +00:00
obache
4617fbb678 Allow to overwrite commnand of privilege check as _IS_ROOT_CMD. 2013-02-22 13:35:27 +00:00
obache
f68d1d940a if `id -u' failed, assume that numeric ID is specified (especially for Cygwin). 2013-02-21 13:33:10 +00:00
obache
8351306655 check requirement of uac manifest, it is required for Windows Vista
(aka NT-6.0) and later.
2013-02-15 09:22:50 +00:00
obache
7072cb4ef3 Experimental support of manifest files for Windows UAC.
For Windows Vista or later, executable files including special keywords
(install, update, patch, and so on) in its name are expected as requireing
privileged permissions by default (UAC).
If not, it must be specified with manifest file, or it will be failed to
execute as "Permission denied".
2013-02-10 13:04:08 +00:00
jperkin
c6fe57f401 Introduce PKGGNUDIR as a way to control gnu prefix.
By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install
native versions of GNU tools, which are them symbolically linked back to
the 'g' versions of the files in LOCALBASE, and users can then add
LOCALBASE/gnu/bin to PATH to pick up those tools.

On systems where the GNU environment is desired, PKGGNUDIR now allows
users to install the non-'g' files directly into LOCALBASE, making them
the default without having to alter PATH, whilst retaining the 'g' files
in order to ensure dependencies and tool paths remain the same.
2012-12-06 11:36:30 +00:00
obache
4e145b5eb0 Pass down ${_PATH_ORIG} to privileged stage sub make instead of modified ${PATH}
for pkgsrc internally, It may cause some problems (ex. unwanted pick up commands
of tools/wrapper).

No objection in teck-pkg@ for a week.
2012-07-18 12:29:12 +00:00
abs
522bbdff73 Use ?= for setting PKGSRC_SETENV to make it easy to override in mk.conf 2012-05-24 11:34:15 +00:00
sbd
4f93900636 Pass MKCATPAGES to packages that use BSD-style Makefiles. 2012-03-05 07:17:15 +00:00
reed
88166ad6f5 Rename "flavor" to "pkgformat".
This is from Anton Panev's GSoC 2011 project to add RPM and DPKG
support to pkgsrc. (I am not adding that further support in this
commit.)

This is just a rename of the existing functionality. Now it will
be easy to test the GSoC work by simply putting in a single
directory (such as "rpm" or "deb"). See
http://addpackageforma.sourceforge.net/ for some details.

This is from Anton's CVS, but I made some minor changes:

- changed plural pkgformats to singular pkgformat (to be consistent)

- fixed a few places (in comments) that were missed

- catch up on some additions to flavor not in the pkgforma cvs:
PKGSRC_SETENV and _flavor-destdir-undo-replace and
undo-destdir-replace-install.
2011-10-15 00:23:07 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
wiz
a2163548a9 Add MULTI variable, and add it to BUILD_DEFS, to more easily find
variable settings affecting binary packages.

From Aleksey Cheusov in PR 44695.
2011-03-12 14:07:13 +00:00
wiz
4e0907259f Handle '-' in uname output, needed for DragonFly. From Justin Sherrill in PR 44526. 2011-02-07 10:32:32 +00:00
adam
1bc3acdf31 Removed duplicate PKGVERSION line 2010-11-03 18:02:40 +00:00
bad
89f715edf7 I'm fed up with having to waste time because PKG_DEVELOPER is "special" and
can't be disabled by setting it to "no" like the other variables.
Besides, flavor/pkg/metadata.mk has been expecting for a long time that "no"
is a valid value.

Make PKG_DEVELOPER DWIM.
2010-08-24 19:08:28 +00:00
darcy
1cdb460a8a Remove MKDIR line that causes the one following to effectively
be a no-op.  With this line removed the umask will be applied
to the created directories.

As discussed with joerg@.
2010-07-03 04:27:00 +00:00
sbd
1c5f2a96f3 On Linux systems record the glibc version in the build information.
OKed by wiz@
2010-05-20 07:57:22 +00:00
sbd
0ae82b5fa9 Add BUILTIN_PKGS with the "builtin" package names to the build information.
E.g if readline 6.0 and ncurses 5.7 are part of the system we get:
BUILTIN_PKGS=readline-6.0 ncurses-5.7
2010-05-19 09:12:15 +00:00
sbd
5290bb9aee Simplify the osabi dependence as suggested by wiz@. 2010-04-30 08:14:04 +00:00
sbd
8a68e86174 Improve the pattern of the osabi dependence again! 2010-04-30 05:42:12 +00:00
sbd
97498284c6 Change the pattern of the osabi dependence to one the actually works! 2010-04-30 04:05:16 +00:00
sbd
53eb3c505b Make all packages that set OSVERSION_SPECIFIC depends on pkgtools/osabi.
Also include a note about changes to OS_VERSION in bsd.prefs.mk
2010-04-30 03:29:55 +00:00
joerg
22ab3c41df Retire check for ONLY_FOR_ARCHS, NOT_FOR_ARCHS and NOT_FOR_OPSYS. 2010-02-23 17:24:55 +00:00
joerg
0af7166ac0 Retire check for MASTER_SITE_SUBDIR and PATCH_SITE_SUBDIR. 2010-02-23 17:24:17 +00:00