Commit graph

1278 commits

Author SHA1 Message Date
Alexey Dokuchaev
2c5c4bf9e3 Currently, when bsd.port.mk outputs a message addressed to a user, it would
typically pipe it through ${FMT} 75 79 command to ensure that if it gets
overly long, it would be wrapped nicely.  Do the same when outputting IGNORE
message which often gets very long.  While here, add missing section number
in sed(1) references in comments.

Differential Revision:	D4116
Approved by:	portmgr (bapt)
2015-11-18 09:19:42 +00:00
John Marino
6eff596ebc Enhance "make makepatch" to address two major deficiencies
This update to the "makepatch" target adds the following enhancements:

1) Conserves comments
   If the existing patch has comments, they will be transferred to the
   regenerated patch.

2) Supports multiple patches per file
   If the patch file contains concatenated patches, the makepatch
   target will keep these patches together.  It may change the order
   of the patches the first time, but every time after the multi-patch
   will be assembled in the same order.

Behavioral changes:

A) The "old" patches are not overwritten, but rather archived at:
   ${WRKDIR}/makepatch-tmp/archived-patches

B) Any patch that was not replaced or renamed is deleted by makepatch
   (but it is archived first, see paragraph above)

C) There regeneration messages for the user will show them which patches
   are using "legacy" names formats.

D) Makepatch will do a great job at "cleaning" git patches; it removes
   lines starting with "diff" and "index" in the comments section.

Notes:

E) Should a source file be modified by multiple patches (e.g. two separate
   multi-patches), a composite patch will be generated.  In the above
   example of two multi-patches, one would get the full patch and the
   other no longer patch the source file.

Approved by:		portmgr (mat)
Differential Revision:	D4136
2015-11-15 15:25:12 +00:00
Dmitry Marakasov
270e3dbc28 Don't use cookie for test target
Test target doesn't produce anything and nothing depends on it.
Also it's often useful to run tests multiple times in a row, so
having a cookie which remembers that the tests were already ran
and inhibits subsequent test runs is needless. It also eliminates
the need for retest target.

Approved by:	portmgr (mat)
Differential Revision:	D3875
2015-11-09 17:32:06 +00:00
Mathieu Arnold
b8b878a219 When !defined(DEVELOPER), stage-qa is not put in the stage pipeline.
Make it depend on stage, and point people to adding DEVELOPER=yes to
their environment.

Discussed with:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D4082
2015-11-09 15:54:03 +00:00
Dmitry Marakasov
7cffd3c8f9 Remove support for WANT_SDL/HAVE_SDL knobs
WANT_SDL/HAVE_SDL macros allowed a port to check which SDL components
are installed. This goes against the policy of avoiding automatic
dependencies, and there are actually no cases in the portstree where
these knobs are used properly, so axe them out.

Approved by:	portmgr (mat)
Differential Revision:	D4093
2015-11-09 14:30:02 +00:00
Mathieu Arnold
ec218a1332 Change the meaning of NO_WRKSUBDIR to force a WRKDIR != WRKSRC.
Right now, NO_WRKSUBDIR means that the extraction does not produce a
subdirectory, and that everything goes straight into WRKDIR.  It is
problematic, because during the build of a port, quite a few files are
created in there, and then, a stage directory, where everything is
installed, and then a pkg directory where the package is created, and
those often conflict, or get in the way, of the building process.

With this, NO_WRKSUBDIR will extract the distfiles directly into WRKSRC
instead of WRKDIR.  In this case, WRKSRC is artificial and is based on
PKGNAME and not DISTNAME, mitigate conflicts with rc files.

PR:		204056
Submitted by:	mat
Reviewed by:	bapt
Exp-run:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D2735
2015-11-05 12:35:26 +00:00
Brad Davis
a1b693ac92 Fix a bug introduced in r399992, where creating only a user would fail
due to $PW not being set.  This only occurred when just a user was being
created without a group.  Solve this by setting $PW outside of the group
creation and above both the user and group creation parts.

PR:		203489
Reviewed by:	bapt
Approved by:	portmgr (bapt)
Approved by:	bdrewery (mentor)
2015-10-29 15:30:35 +00:00
Brad Davis
1990bb0598 Teach the ports framework to handle creating users/groups when
PKG_ROOTDIR is set.  This will enable help support pkg cross installs.

PR:		203489
Reviewed by:	bapt
Approved by:	portmgr (bapt)
Approved by:	bdrewery (mentor)
2015-10-22 16:25:52 +00:00
Bryan Drewery
929dfd6e18 Revert r399921 for now due to fallout with libclc using ninja. 2015-10-21 21:49:46 +00:00
Bryan Drewery
e189ed624b Enable verbose (compiler output) builds for autotools builds when package
building as these commands can be critical for debugging build failures.

Discussed with:	bapt, kwm
With hat:	portmgr
2015-10-21 14:43:29 +00:00
Bryan Drewery
278dd71cd6 - Combine clean-depends-list.sh into depends-list.sh
- Refactor how depends-list.sh is called from bsd.port.mk for each variant.

With hat:	portmgr
2015-10-19 19:23:53 +00:00
Bryan Drewery
d40cc1cce4 Fix test-depends after r399703.
With hat:	portmgr
2015-10-19 18:37:06 +00:00
Baptiste Daroussin
8cea2b0147 Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched
This gives more time for tools to get updated, available in packages etc before
bothering users
2015-10-15 07:36:38 +00:00
Baptiste Daroussin
869e1f27d0 Drop the necessity to add ${PORTSDIR} to dependency line
Modify make describe to automatically prepend ${PORTSDIR} if the path for the
port is not absolute

Checked with poudriere, portmaster, portupgrade

PR:		203685
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D3866
2015-10-14 16:49:35 +00:00
Bryan Drewery
45535ed69c Don't check for minimal Pkg version for package building.
Package building always builds Pkg first.  If someone downgrades their
pkg locally this change will hurt them, but then they are already
running an unsupported configuration.

With hat:	portmgr
2015-10-12 23:22:20 +00:00
Bryan Drewery
16162f77dd Name the 'uname -r' variable the same as the bsd.port.subdir.mk version, _OSRELEASE.
This will allow passing in the environment consistently from calling script
to avoid looking it up if.

With hat:	portmgr
2015-10-12 22:44:19 +00:00
Bryan Drewery
5dc6e4f3f3 Export more sysctl(8) vars.
LINUX_OSRELEASE, _SMP_CPUS (used as default MAKE_JOBS), CONFIGURE_MAX_CMD_LEN.

With hat:	portmgr
2015-10-12 22:41:34 +00:00
Bryan Drewery
c04897eb8c Remove debugging leftover from r399160.
With hat:	portmgr
2015-10-12 22:30:01 +00:00
Bryan Drewery
c46779db54 Export HAVE_COMPAT_IA32_KERN to sub-makes and ensure it is not exported if empty.
With hat:	portmgr
2015-10-12 22:28:15 +00:00
Bryan Drewery
1c65a7751e Move the exported variable assignments to where they are looked-up.
This is so we are less likely to carry around old vars that are no longer
needed and to keep logic more coupled.

With hat:	portmgr
2015-10-12 22:19:35 +00:00
Bryan Drewery
fe77fdc73b Spell 'OSREL' properly from r399155.
With hat:	portmgr
2015-10-12 22:17:09 +00:00
Bryan Drewery
6d9ce0831c Don't check for minimal pkg version in sub-makes.
With hat:	portmgr
2015-10-12 22:14:45 +00:00
Bryan Drewery
863afee20a Pass result of 'uname -r' to sub-makes to avoid unneeded lookup.
With hat:	portmgr
2015-10-12 22:13:21 +00:00
Bryan Drewery
4ad83bd568 Use a loop to export vars.
This also fixes adding duplicates to .MAKEFLAGS with fmake, which was a
bug present before recent changes.

With hat:	portmgr
2015-10-12 22:09:47 +00:00
Bryan Drewery
19f179cf3b Re-apply r398953 with protection for 'make *config*'.
This will only include the descriptions file if needed to very slightly
lower overhead with -V lookups and package building dependency calculations.

With hat:	portmgr
2015-10-12 21:41:43 +00:00
Bryan Drewery
1289b5e043 Replace escaping for exported vars with :Q feature.
With hat:	portmgr
2015-10-12 21:38:28 +00:00
Bryan Drewery
ac1cb7e914 Remove SYSTEMVERSION exporting, not needed since r99913.
This is a relic of port.mkversion.

With hat:	portmgr
2015-10-12 21:36:55 +00:00
Baptiste Daroussin
2ae2321acb Avoid a useless call to dirname 2015-10-10 21:19:43 +00:00
Baptiste Daroussin
2af7305829 Remove another unused variable 2015-10-10 20:53:34 +00:00
Baptiste Daroussin
8a102da7c2 Remove unused variable 2015-10-10 20:23:40 +00:00
Baptiste Daroussin
62c0718df2 Check if the port directory is aboslute otherwise prepend ${PORTSDIR} in FETCH_LIST
It allows dependencies to be defined without ${PORTSDIR}
2015-10-10 19:53:36 +00:00
Baptiste Daroussin
81c092df16 Revert r398953 per bdrewery demand it breaks make config
Reported by:	novel
2015-10-10 19:45:51 +00:00
Bryan Drewery
3456a0671a Don't include/parse bsd.options.desc.mk if not needed (showconfig or -V *_DESC).
This is targetting dependency listing overhead.

With hat:	portmgr
2015-10-09 19:20:24 +00:00
Bryan Drewery
78aeec8db1 Unify depends-list.sh and all-depends-list.sh into one script, depends-list.sh.
With hat:	portmgr
2015-10-09 18:00:44 +00:00
Dmitry Marakasov
a46575cc6b Add LOCALBASE-based ldconfig dir to plist for non-default PREFIX
ldconfig file is always installed into LOCALBASE-based directory
(${LOCALBASE}/${LDCONFIG_DIR}) which is first created. When a port
redefines PREFIX (PREFIX != LOCALBASE), this directory needs to be
mentioned in pkg-plist.

Add the directory to the plist. While here, add identation to nested
make conditions and loops to improve readability and simplify one
empty .if body.

This fixes stage-qa for biology/emboss and cad/brlcad

Approved by:	portmgr (bapt)
Differential Revision:	D3815
2015-10-08 14:57:29 +00:00
Dmitry Marakasov
0521b2fe8e Add a way to cleanly handle terminfo.db file used by devel/ncurses
This database contains compiled terminfo entries and is merged from
a large part which comes with ncurses themselves and compiled
.terminfo files installed by other ports (currently only rxvt-unicode
and jfbterm)

- Now the database is always kept up to date, regardless of port
  installation order (both ncurses installed before .terminfo files
  and the other way around work as expected)
- All affected ports now support clean deinstallation and do not
  produce stage-qa errors
- Affected ports are simplified, as they now only need to define
  USES=terminfo
- rxvt-unicode no longer pulls in ncurses: the dependency is not
  really needed for anything beside updating it's own database
- The patch contains Q/A test to check whether a port needs, or
  needs not USES=terminfo

Approved by:	portmgr (mat, bapt)
Differential Revision:	D3747
2015-10-08 14:12:53 +00:00
Dmitry Marakasov
5c57225987 Implemented complete support for test target.
You can now `make test' on any port to run test sequence, no-op by default.
If a port defines TEST_TARGET, it'll run sub-make with specified target,
usually `check' or `test', useful if upstream supports that. The port may
instead define custom do-test target, as well as usual satellite targets:

  {pre,do,post}-test, {pre,do,post}-test-OPT, {pre,do,post}-test-OPT-off

`make test' builds and stages port first, so test may use both WRKDIR and
STAGEDIR, and both BUILD and RUN depends are available for test target.
Additionally, TEST_DEPENDS is now properly supported and may be used to
define additional depends specifically for testing.

Framework may define default tests for specific cases. For instance,
perl5.mk and cran.mk already provide default test target on their own.

This commit also converts my ports which have tests to this new framework.

Approved by:	portmgr (bapt)
Differential Revision:	D3680
2015-09-28 17:20:42 +00:00
Antoine Brodin
a11549b651 Restore _FORCE_POST_PATTERNS, some ports are were missed in the conversion
With hat:	portmgr
2015-09-26 06:37:40 +00:00
Baptiste Daroussin
df5382dbbd ocamlfind is not run anymore from any @exec lines 2015-09-26 00:44:22 +00:00
Baptiste Daroussin
904f48db63 update-desktop-database is not used anymore @*exec 2015-09-26 00:36:40 +00:00
Baptiste Daroussin
70e2226c26 Convert update-mime-database into @post* 2015-09-26 00:26:58 +00:00
Baptiste Daroussin
59eaaf3ef0 Convert load-octave-pkg to proper @postexec 2015-09-26 00:19:56 +00:00
Baptiste Daroussin
0eae03bd38 Specify correctly @post* for gtk-query-immodules 2015-09-26 00:08:26 +00:00
Baptiste Daroussin
12b59fc91a Convert a bunch of @exec into proper @postexec 2015-09-25 23:52:09 +00:00
Baptiste Daroussin
8702bbcc8c mkfontscale and mkfontdir are not used anymore in @exec lines 2015-09-25 23:47:32 +00:00
Baptiste Daroussin
d70351f98d kldxref is not used anymore in any @exec 2015-09-25 23:41:29 +00:00
Baptiste Daroussin
ffc12ae7e2 Bump the minimal version of pkg to 1.6.0 2015-09-25 23:31:35 +00:00
Baptiste Daroussin
fa5faefc21 Use @post[un]exec for ldconfig to ensure ldconfig is run when needed instead of
the hackish _FORCE_POST_PATTERNS
2015-09-25 23:30:40 +00:00
Baptiste Daroussin
e82e5f144b Remove another wrong comment 2015-09-24 23:19:37 +00:00
Baptiste Daroussin
3816bffcaa Remove now wrong comment 2015-09-24 23:14:24 +00:00