Commit graph

1432 commits

Author SHA1 Message Date
Richard Gallamore
8035da77dd * Add USE_GITLAB for fetching from www.gitlab.com and GitLab deployed sites.
Reviewed by:	mat
Approved by:	portmgr (mat)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D12162
2018-03-03 06:50:15 +00:00
Bryan Drewery
ecec71a78a ports_env: Store list of variables to export in PORTS_ENV_VARS in mk files.
This will avoid renamed/removed variables being orphaned, and allows for
exporting variables in ports_env that are not wanted to be exported in
sub-makes via _EXPORTED_VARS.

Approved by:	portmgr (implicit)
2018-02-28 18:38:17 +00:00
Bryan Drewery
e5a42a8c3c Fix RANDOMIZE_MASTER_SITES.
- /usr/games/random moved to /usr/bin/random in 11.0+
- Need to explicitly add in the pipe '|'

Approved by:	portmgr (implicit)
2018-02-20 22:58:19 +00:00
Bryan Drewery
51fc1d5b8c Reduce fstat(2) calls for SCRIPTDIR/* scripts.
There's only about 10 ports that actually use this, so rather than
spamming a dozen fstat(2) calls for every port during INDEX reduce
it to 1 for now.

Also avoid the fstat(2) if the target already exists.

Approved by:	portmgr (implicit)
2018-02-20 22:45:24 +00:00
Bryan Drewery
eef0418ce0 Fix editors/vim-tiny hanging on reading stdin during generate-plist.
test -f "" is true so we need to only test if $PLIST is not empty.

Approved by:	portmgr (implicit)
2018-02-08 05:52:06 +00:00
Steve Wills
b52a2cbd82 Fix cross build of base/ ports
This is a follow up to r461057 and fixes base/binutils and base/gcc in my
testing.

PR:		224217
Submitted by:	nwhitehorn (partially, I made additional changes)
Reviewed by:	bapt
2018-02-06 14:32:52 +00:00
Steve Wills
592d8d2d7c Changes from BZ PR 224217 plus minor changes to fix base/gcc fetch 2018-02-06 14:26:41 +00:00
Joseph Mingrone
a3cc513bfc Flavorize and modernize Emacs ports
- Convert USE_EMACS to USES=emacs
- Remove editors/emacs-nox11 (refer to nox flavors of editors/emacs and
  editors/emacs-devel)
- Permit default Emacs flavor to be specified in make.conf
- Rename japanese/migemo-emacs23 to japanese/migemo-emacs
- Update and simplify audio/emms and fix build on FreeBSD 10 [1]
- Update databases/bbdd and fix build on FreeBSD 10 [1]
- Update editors/emacs-devel
- Ensure Makefile shell commands that change directory are executed in a
  subshell
- Silence some portlint warnings

[1] By not depending on base texinfo

PR:		225404
Reviewed by:	antoine
Approved by:	portmgr (mat) ashish (maintainer)
Differential Revision:	https://reviews.freebsd.org/D13506
2018-02-01 18:03:09 +00:00
Mathieu Arnold
f508975358 Don't run create-manifest as root.
PR:		224992
Submitted by:	tobik
Reported by:	yuri
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D13798
2018-02-01 08:31:05 +00:00
Mathieu Arnold
1aecf7b366 Extract desktop-categories, check-desktop-entries, and install-desktop-entries into scripts.
PR:		225301
Exp-run by:	antoine
Reviewed by:	jilles, kevans
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D11304
2018-01-28 08:25:06 +00:00
Mathieu Arnold
3bbc00468a Add support to passing directories to EXTRA_PATCHES.
Instead of:

  EXTRA_PATCHES=	${PATCHDIR}/feat-foo-patch-file.c \
			${PATCHDIR}/feat-foo-patch-file.h \
			${PATCHDIR}/feat-foo-patch-file2.c

Move those files to ${PATCHDIR}/feat-foo/, name them patch-*, and set:

  EXTRA_PATCHES=	${PATCHDIR}/feat-foo

Approved by:	bdrewery
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D10855
2018-01-25 09:12:21 +00:00
Bryan Drewery
6339d61d4f Allow passing -DDEPENDS_SHOW_FLAVOR to list flavors for dependency lists.
Submitted by:	se (based on D13535)
With hat:	portmgr
2018-01-24 18:54:57 +00:00
Torsten Zuehlsdorff
2816b55780 add new stage-qa target: gemfiledeps
This checks whether rubygem based ports have all of their dependencies
in Gemfile(s) satisfied by what's currently installed. Sample output:

====> Running Q/A tests (stage-qa)
Warning: Dependencies defined in /usr/ports/www/gitlab/work/stage/usr/local/www/gitlab/Gemfile are not satisfied

These ports could (!) be broken at runtime. Be aware: some projects
defines multiple Gemfiles and not all are used at runtime. For example
www/gitlab has two Gemfiles, but only one is used for testing and warnings
about it can be ignored.

Approved by: portmgr (mat), lifanov
Differential Revision: https://reviews.freebsd.org/D11865
2018-01-22 16:35:23 +00:00
Tijl Coosemans
0821501cfa Retire USE_AUTOTOOLS and bsd.autotools.mk.
PR:		225170
Approved by:	portmgr (antoine)
2018-01-15 10:01:32 +00:00
Mathieu Arnold
f89aabecf9 Add another solution to the WRKSRC+USE_GITHUB warning.
Sponsored by:	Absolight
2018-01-12 12:59:00 +00:00
Mathieu Arnold
bb5196a149 Remove support for variables that have been deprecated for a while.
variables                  deprecation       revision
WITHOUT_NLS                2013-12-13        r336337
WITH_/WITHOUT_             2014-02-24        r345870
NOPORT(DOC|EXAMPLE)S       2014-04-19        r351587
WITH_BDB_VER               2016-05-02        r414444
OVERRIDE_LINUX_BASE_PORT   2016-09-05        r421387
WITH_OPENSSL_(BASE|PORT)   2016-06-16        r416965

While there, add an ERROR variable that works like DEV_ERROR, but for
user facing errors, and move NOPORTDOCS,
NOPORTEXAMPLES and WITHOUT_NLS to it.

Cleanup bsd.sanity.mk a bit.

Fix fallout.

PR:		224613
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D13490
2018-01-09 07:40:55 +00:00
Bryan Drewery
3b4e6dfcc3 Fix flavor helpers when only bsd.port.pre.mk is not used and FLAVOR is not set.
The helpers were being evaluated before the default FLAVOR was set. The
helpers worked fine if the FLAVOR was specified by the user but not if
it was left to the default value. Resolve this by moving the helpers
right after the default FLAVOR is set.

PR:		224879
exp-run by:	antoine
Approved by:	portmgr (implicit)
MFH:		2018Q1
Differential Revision:	https://reviews.freebsd.org/D13756
2018-01-08 00:24:48 +00:00
Bryan Drewery
dc0000f87f Disallow forced FLAVOR as make argument.
This otherwise prevents properly setting FLAVOR to the default internally
since it is in a separate namespace in bmake that is read-only.

Approved by:	portmgr (implicit)
MFH:		2018Q1
2018-01-04 20:17:40 +00:00
Bryan Drewery
1811387546 Follow-up r458048: Properly trim FLAVOR from .MAKEOVERRIDES.
The code I removed was wrong but it still achieved the proper effect of
removing FLAVOR from .MAKEOVERRIDES.  This is still needed and now is
done properly without truncating away all of the other valuable variables.

Pointyhat to:	bdrewery
Approved by:	portmgr (implicit)
MFH:		2018Q1
2018-01-04 20:06:21 +00:00
Bryan Drewery
e5b07eeb28 Pass FLAVOR in enviroment to avoid forcing an empty value in some cases.
Approved by:	portmgr (implicit)
MFH:		2018Q1
2018-01-04 19:37:24 +00:00
Bryan Drewery
0f12fc7d32 Stop truncating .MAKEOVERRIDES after the FLAVORS work.
There is no such variable as ${MAKEOVERRIDES}, only ${.MAKEOVERRIDES}, so this
code was simply truncating .MAKEOVERRIDES entirely which could cause performance
and other odd issues with OSREL and make recursion.

We don't want to leak FLAVOR to child sub-makes but that can be fixed later;
this code was not doing what it intended.

Approved by:	portmgr (implicit)
MFH:		2018Q1
2018-01-04 19:18:48 +00:00
Bryan Drewery
2c91ba6c3c Fix package-depends-list for FLAVORS.
Reported by:	dinoex
Approved by:	portmgr (implicit)
MFH:		2018Q1
2018-01-04 19:07:42 +00:00
Jan Beich
6191d576e5 bsd.port.mk: don't create a new variable just to check LLD
PR:		224760
Approved by:	portmgr (antoine)
2018-01-01 20:16:39 +00:00
Bryan Drewery
15714bc164 Fix 'make -j'.
- Pass MAKEFLAGS down into do-depends properly.
- Remove redundant dependencies, run-depends and lib-depends, from
  targets that already depend on earlier targets that depend on
  the needed targets.

Reported by:	emaste
With hat:	portmgr
2017-12-07 01:51:00 +00:00
Mathieu Arnold
e5eb98236d Add a warning to try and prevent people from mis-using USE_GITHUB.
Sponsored by:	Absolight
2017-12-06 11:55:15 +00:00
Mathieu Arnold
244209f68c Fix build-depends-list and run-depends-list.
Sponsored by:	Absolight
2017-12-01 12:11:58 +00:00
Mathieu Arnold
3d94ff12c5 11.0 is no longer supported.
Sponsored by:	Absolight
2017-12-01 11:54:35 +00:00
Mathieu Arnold
471896e0a8 Add various FLAVOR related helpers.
To help with flavored ports, helpers are available.  In these, replace <*>
  with the flavor name.

  *_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variable.

  *_CONFLICTS *_CONFLICTS_BUILD *_CONFLICTS_INSTALL *_PKG_DEPENDS
  *_EXTRACT_DEPENDS *_PATCH_DEPENDS *_FETCH_DEPENDS *_BUILD_DEPENDS
  *_LIB_DEPENDS *_RUN_DEPENDS *_TEST_DEPENDS will append to the variable.

Reviewed by:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12483
2017-11-30 15:33:46 +00:00
Mathieu Arnold
30c4ca5784 Generic FLAVORS work.
- Enable FLAVORS.
- Make make describe flavors aware.
- Add a qa check for unique package names amongst flavors.
- Make MOVEDlint understand flavors.
- Add a bit of sanity check to make sure FLAVORS stay lowercase.
- Various fixes.

Reviewed by:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12577
2017-11-30 15:33:29 +00:00
Mathieu Arnold
d45d670c33 Add a check for options names.
They must be all uppercase, so that they do not conflict with flavors
that are lowercase.

Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12810
2017-11-02 15:16:31 +00:00
Bryan Drewery
e7718f19b1 FLAVORS: Fix 'make clean' not respecting passed in FLAVOR.
With hat:	portmgr
2017-10-20 17:07:23 +00:00
Jilles Tjoelker
0ae23b516e Make COPYTREE_* work with POSIX-compliant sh -c
The COPYTREE_BIN and COPYTREE_SHARE macros use constructs like

sh -c 'command' -- arg0 arg1

and assume that $0 will expand to arg0 and $1 will expand to arg1.

Our current sh implements it that way. However, POSIX specifies that $0 will
expand to -- and $1 will expand to arg0, since the command string is an
operand and not an option-argument. Bug #220587 requests making sh
POSIX-compliant in this regard.

If the argument after the command string does not start with '-', the
current sh behaves as required by POSIX. Therefore, adjust the macros so
this is always the case.

PR:		222870
Approved by:	portmgr (antoine)
2017-10-15 15:30:20 +00:00
Guido Falsi
b1fac01e5e Retire WITHOUT_DEBUG flag.
The flag has partial support across the tree, and the same effect
can be obtained by using ".undef WITH_DEBUG".

Reviewed by:		mat, rene
Approved by:		portmgr (rene)
Differential Revision:	https://reviews.freebsd.org/D12548
2017-10-15 14:05:04 +00:00
Baptiste Daroussin
ec229aec83 Introduce the new BINARY_ALIAS variable
When defined it will create symlinks of some given binaries in a directory which
will be prepended to the PATH.

The syntax is the following:
BINARY_ALIAS=   target1=source1  target2=source2

For example to have a "swig" binary in the path which will be pointing at
swig3.0 and a "sed" pointing at GNU sed: gsed

BINARY_ALIAS=  swig=swig3.0 sed=gsed

Reviewed by:	swills, adamw, mat
Approved by:	swills (portmgr)
Differential Revision:	https://reviews.freebsd.org/D12603
2017-10-11 19:03:24 +00:00
Bryan Drewery
cfc9bb0ea1 Disable FLAVORS support for now until we have real FLAVORS-using ports.
Having this enabled breaks Poudriere's ability to build py2 and py3 ports
together which FLAVORS aims to resolve.  Once we have actual python
FLAVORS support ready to commit we can then enable this feature again.

With hat:	portmgr
2017-09-29 23:37:16 +00:00
Mathieu Arnold
7b6015bee4 Fix post-clean.
Submitted by:	antoine
Sponsored by:	Absolight
2017-09-26 20:28:53 +00:00
Mathieu Arnold
e2e97eb2bc Implement basic flavors.
**Do not start migrating any ports, a hook will prevent it**

This has been a long awaiting feature, most of the work has been done by
bapt, bdrewery and antoine, I am just the one actually doing the commit.

All this informations, and more to come are in the first link to our wiki
in the bottom block. A roadmap is in the second link.

To define a different flavors in a port, before any include, set:

FLAVORS=  flavor1 flavor2 [...]

The first flavor in the list will be the default.

You can then check for flavors after includ'ing bsd.port.options.mk with:

.if ${FLAVOR} == flavor2
[some stuff]
.endif

To build flavor2, simply run:

make FLAVOR=flavor2

To depend on a specific flavor, write @<flavor> at the end of the depend
string, like:

RUN_DEPENDS=	something:origin@foo

Submitted by:	bapt, bdrewery, antoine
Reviewed by:	portmgr
More infos:	https://wiki.freebsd.org/Ports/FlavorsMigration
Todo List:	https://wiki.freebsd.org/Ports/FlavorsAndSubPackages
With hat:	portmgr
Differential Revision: https://reviews.freebsd.org/D10327
2017-09-26 14:14:44 +00:00
Joseph Mingrone
212ed26ec9 Ensure .CURDIR contains an absolute path without a trailing slash.
Failed builds can occur when PORTSDIR is a symbolic link, or with

make -C /usr/ports/category/port/

PR:		221296
Reported by:	yasu@utahime.org, rum1cro@yandex.ru
Reviewed by:	bdrewery, sjg
Approved by:	portmgr (bdrewery)
Differential Revision:	https://reviews.freebsd.org/D11934
2017-09-17 14:20:14 +00:00
Ed Maste
6c3b516b73 Add LLD_UNSAFE to force use of ld.bfd when ld is lld
By default the compiler will find /usr/bin/ld for the linker.  If a port
sets LLD_UNSAFE and /usr/bin/ld is ld.lld, then add -fuse-ld=bfd to
force the use of the binutils BFD linker (from the base system, if
available, or by setting USE_BINUTILS).

This change is based on an earlier, similar patch from bapt, with the
addition of the -fuse-ld flag.

PR:		214864
Reviewed by:	bapt
Approved by:	portmgr (bapt)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12064
2017-08-22 18:55:00 +00:00
Nikolai Lifanov
327751a539 add new stage-qa target: gemdeps
This checks whether rubygem ports have all of their dependencies
in gemspec satisfied by what's currently installed. Sample output:

====> Running Q/A tests (stage-qa)
Error: RubyGem dependency archive-tar-minitar = 0.5.2 is not satisfied.
*** Error code 1

Stop.
make: stopped in /usr/home/lifanov/src/svn/freebsd/ports/head/archivers/rubygem-fpm

These ports would be broken at runtime.

Big thanks to:
  swills - discussion
  mat - reviews
  antoine - exp runs
  sunpoet - fixing several dozens of ports :)

PR:		220605
Reviewed by:	mat, sunpoet
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D11841
2017-08-07 19:09:41 +00:00
David Naylor
9920d3ae65 qa: add check for NO_ARCH
If NO_ARCH is set then check that no FreeBSD elf(5) files are in $STAGEDIR.
If an elf(5) file is bundles as part of the package, but is not meant to be
run directly (i.e. the elf(5) file is a payload, and not compiled) then
those files can be added to NO_ARCH_IGNORE to avoid the check from failing,

Changes to ports:
 - Ports that have NO_ARCH set, but actually compile files have had NO_ARCH
   removed.
 - Ports that have elf(5) payloads have had those files added to
   NO_ARCH_IGNORE.
 - R-cran ports that do not set USES=cran:compiles have NO_ARCH set,

PR:		218976
Reviewed by:	antoine, mat
Approved by:	portmgr
2017-06-18 18:09:16 +00:00
Tobias C. Berner
225919920d Add note, that WRKDIRPREFIX must not end in '/'.
PR:		199297
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D11032
2017-06-14 20:18:38 +00:00
Mathieu Arnold
9de6aff58e Add a fixup-lib-pkgconfig target to move files in lib/pkgconfig into
libdata/pkgconfig.

Fix ports that where installing the file in the wrong place.

PR:		218067
Submitted by:	mat
Exp-run by:	antoine
Reviewed by:	rene, antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D10129
2017-06-06 16:38:00 +00:00
Baptiste Daroussin
6ecabaebaa Fix issues with PACKAGES is set by a user with a ':' in the path
Reported by:	dim
Approved by:	portmgr (adamw)
Differential Revision:	https://reviews.freebsd.org/D10847
2017-05-25 19:13:37 +00:00
Matthew Rezny
e6acde078c Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
  graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]

PR:		218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by:	dbn [1], jbeich [2,3]
Reported by:	afiskon@devzen.ru [1]
Reviewed by:	kwm, johalun0@gmail.com
Approved by:	portmgr, swills (mentor)
Differential Revision:  https://reviews.freebsd.org/D10448
2017-05-12 18:46:53 +00:00
Alex Kozlov
f37a53c2ba - Remove checks for .PARSEDIR and vestiges of pmake support
PR:	218832
Approved by:	portmgr (antoine)
2017-04-26 19:04:30 +00:00
Antoine Brodin
d6dba918f2 Use POSIX conformant expressions with grep(1)
PR:		218691
Submitted by:	Kyle Evans
With hat:	portmgr
2017-04-21 19:36:36 +00:00
Baptiste Daroussin
d8a738baa6 Refactor do-package aka subpackages step 2
Now each files generated are explicit targets depending on the files
This would allow to simply loop over a list of packages for subpackages to
create them.

Remove the code for transition from pkg_install to pkg packages

The latest symlink is now a specific target only defined when needed

Reviewed by:	swills
Approved by:	portmgr (swills)
Differential Revision:	https://reviews.freebsd.org/D10323
2017-04-19 18:32:50 +00:00
Mathieu Arnold
09de5005d1 Remove something that I did not even know I had.
Sponsored by:	Absolight
2017-04-17 20:20:22 +00:00
Mathieu Arnold
a33cc87ee8 Remove @comment $FreeBSD$ from plists.
Whatever you do, things always get to creep back in the ports tree.

Sponsored by:	Absolight
2017-04-17 20:16:25 +00:00