View | Details | Raw Unified | Return to bug 254678 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/Uses/ninja.mk (-5 / +51 lines)
Lines 4-29 Link Here
4
#
4
#
5
# Feature:		ninja
5
# Feature:		ninja
6
# Usage:		USES=ninja
6
# Usage:		USES=ninja
7
# Valid ARGS:		build, make (default), run
7
#
8
#
9
# build			add a build dependency on ninja
10
# make			use ninja for the build instead of make, implies "build"
11
# run			add a run dependency on ninja
12
#
8
# MAINTAINER: portmgr@FreeBSD.org
13
# MAINTAINER: portmgr@FreeBSD.org
9
14
10
.if !defined(_INCLUDE_USES_NINJA_MK)
15
.if !defined(_INCLUDE_USES_NINJA_MK)
11
_INCLUDE_USES_NINJA_MK=	yes
16
_INCLUDE_USES_NINJA_MK=	yes
12
17
13
.if !empty(ninja_ARGS)
18
_valid_ARGS=	build make run
14
IGNORE=	Incorrect 'USES+= ninja:${ninja_ARGS}' ninja takes no arguments
19
20
.for _arg in ${ninja_ARGS}
21
.    if empty(_valid_ARGS:M${_arg})
22
IGNORE=	'USES+= ninja:${ninja_ARGS}' usage: argument [${_arg}] is not recognized
23
.    endif
24
.endfor
25
26
.if empty(ninja_ARGS)
27
ninja_ARGS+=	make
15
.endif
28
.endif
16
29
17
MAKE_ARGS+=	-v
30
.if ${ninja_ARGS:Mmake}
31
ninja_ARGS+=	build
32
.endif
18
33
19
BUILD_DEPENDS+=	ninja:devel/ninja
34
.if ${NINJA_DEFAULT} == ninja
35
NINJA_CMD=	ninja
36
_NINJA_PORT=	devel/ninja
37
.elif ${NINJA_DEFAULT} == samurai
38
NINJA_CMD=	samu
39
_NINJA_PORT=	devel/samurai
40
MAKE_ENV+=	SAMUFLAGS="-v -j${MAKE_JOBS_NUMBER}"
41
.  if ! ${BINARY_ALIAS:U:Mninja=*}
42
# Cmake and Meson have native support for Samurai and detect and
43
# use it when Ninja is not available in the build environment.  The
44
# alias is needed for other ports which call Ninja directly and do
45
# not fall back to Samurai. There should be no harm in providing it
46
# generally.
47
BINARY_ALIAS+=	ninja=samu
48
.  endif
49
.else
50
IGNORE=	invalid DEFAULT_VERSIONS+=ninja=${NINJA_DEFAULT}
51
.endif
20
52
53
.if ${ninja_ARGS:Mbuild}
54
BUILD_DEPENDS+=	${NINJA_CMD}:${_NINJA_PORT}
55
# Humanize build log and include percentage of completed jobs %p in it.
56
# See samu(1) or the Ninja manual.
57
MAKE_ENV+=	NINJA_STATUS="[%p %s/%t] "
58
.endif
59
60
.if ${ninja_ARGS:Mmake}
61
MAKE_ARGS+=	-v
21
CMAKE_ARGS+=	-GNinja
62
CMAKE_ARGS+=	-GNinja
22
MAKEFILE=
63
MAKEFILE=
23
MAKE_CMD=	ninja
64
MAKE_CMD=	${NINJA_CMD}
24
MAKE_FLAGS=
65
MAKE_FLAGS=
25
# Set a minimal job of 1
66
# Set a minimal job of 1
26
_MAKE_JOBS=	-j${MAKE_JOBS_NUMBER}
67
_MAKE_JOBS=	-j${MAKE_JOBS_NUMBER}
27
_DESTDIR_VIA_ENV=	yes
68
_DESTDIR_VIA_ENV=	yes
69
.endif
28
70
71
.if ${ninja_ARGS:Mrun}
72
RUN_DEPENDS+=	${NINJA_CMD}:${_NINJA_PORT}
29
.endif
73
.endif
74
75
.endif
(-)Mk/bsd.default-versions.mk (-1 / +3 lines)
Lines 20-26 Link Here
20
LOCALBASE?=	/usr/local
20
LOCALBASE?=	/usr/local
21
21
22
.for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT \
22
.for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT \
23
	IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL PERL5 \
23
	IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA PERL5 \
24
	PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH
24
	PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH
25
.if defined(${lang}_DEFAULT)
25
.if defined(${lang}_DEFAULT)
26
ERROR+=	"The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
26
ERROR+=	"The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
Lines 83-88 Link Here
83
MONO_DEFAULT=		5.10
83
MONO_DEFAULT=		5.10
84
# Possible values: 5.5, 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.5p, 5.6p, 5.7p, 5.6w, 5.7w
84
# Possible values: 5.5, 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.5p, 5.6p, 5.7p, 5.6w, 5.7w
85
MYSQL_DEFAULT?=		5.7
85
MYSQL_DEFAULT?=		5.7
86
# Possible values: ninja, samurai
87
NINJA_DEFAULT?=		ninja
86
# Possible values: 5.28, 5.30, 5.32, devel
88
# Possible values: 5.28, 5.30, 5.32, devel
87
.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
89
.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
88
    defined(PACKAGE_BUILDING))
90
    defined(PACKAGE_BUILDING))
(-)devel/jiri/Makefile (-3 / +2 lines)
Lines 13-23 Link Here
13
LICENSE=	BSD3CLAUSE
13
LICENSE=	BSD3CLAUSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
15
16
BUILD_DEPENDS=	cmake:devel/cmake \
16
BUILD_DEPENDS=	cmake:devel/cmake
17
		ninja:devel/ninja
18
RUN_DEPENDS=	git:devel/git
17
RUN_DEPENDS=	git:devel/git
19
18
20
USES=		go:modules
19
USES=		go:modules ninja:build
21
20
22
GITHASH=	1eee1043d12d1baabae7f2466cc0b1646395e32c
21
GITHASH=	1eee1043d12d1baabae7f2466cc0b1646395e32c
23
TIMESTAMP=	2020-08-28T00:00:00.000000
22
TIMESTAMP=	2020-08-28T00:00:00.000000
(-)devel/meson/Makefile (-2 / +1 lines)
Lines 12-21 Link Here
12
LICENSE=	APACHE20
12
LICENSE=	APACHE20
13
LICENSE_FILE=	${WRKSRC}/COPYING
13
LICENSE_FILE=	${WRKSRC}/COPYING
14
14
15
RUN_DEPENDS=	ninja:devel/ninja
16
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR}
15
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR}
17
16
18
USES=		python:3.6+ shebangfix
17
USES=		ninja:run python:3.6+ shebangfix
19
USE_PYTHON=	autoplist distutils noflavors
18
USE_PYTHON=	autoplist distutils noflavors
20
SHEBANG_FILES=	mesonbuild/rewriter.py \
19
SHEBANG_FILES=	mesonbuild/rewriter.py \
21
		mesonbuild/scripts/cmake_run_ctgt.py
20
		mesonbuild/scripts/cmake_run_ctgt.py
(-)devel/tinygo/Makefile (-3 / +2 lines)
Lines 12-22 Link Here
12
LICENSE=	BSD3CLAUSE
12
LICENSE=	BSD3CLAUSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
14
15
BUILD_DEPENDS=	cmake:devel/cmake \
15
BUILD_DEPENDS=	cmake:devel/cmake
16
		ninja:devel/ninja
17
TEST_DEPENDS=	qemu-system-arm:emulators/qemu
16
TEST_DEPENDS=	qemu-system-arm:emulators/qemu
18
17
19
USES=		gmake go:modules,run
18
USES=		gmake go:modules,run ninja:build
20
19
21
USE_GITHUB=	yes
20
USE_GITHUB=	yes
22
GH_ACCOUNT=	tinygo-org
21
GH_ACCOUNT=	tinygo-org
(-)graphics/py-h3/Makefile (-2 / +1 lines)
Lines 15-27 Link Here
15
15
16
BUILD_DEPENDS=	cmake:devel/cmake \
16
BUILD_DEPENDS=	cmake:devel/cmake \
17
		h3>=${PORTVERSION}:graphics/h3 \
17
		h3>=${PORTVERSION}:graphics/h3 \
18
		ninja:devel/ninja \
19
		${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR}
18
		${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR}
20
LIB_DEPENDS=	libh3.so:graphics/h3
19
LIB_DEPENDS=	libh3.so:graphics/h3
21
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
20
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
21
		${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
23
22
24
USES=		localbase:ldflags python:3.6+
23
USES=		localbase:ldflags ninja:build python:3.6+
25
USE_PYTHON=	autoplist concurrent cython distutils
24
USE_PYTHON=	autoplist concurrent cython distutils
26
25
27
CFLAGS+=	-I${LOCALBASE}/include/h3
26
CFLAGS+=	-I${LOCALBASE}/include/h3
(-)japanese/mozc-server/Makefile (-4 / +3 lines)
Lines 10-17 Link Here
10
MAINTAINER=	hrs@FreeBSD.org
10
MAINTAINER=	hrs@FreeBSD.org
11
COMMENT?=	Mozc Japanese Input Method, Server
11
COMMENT?=	Mozc Japanese Input Method, Server
12
12
13
BUILD_DEPENDS=	ninja:devel/ninja \
13
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}gyp>=20200512:devel/py-gyp@${PY_FLAVOR}
14
		${PYTHON_PKGNAMEPREFIX}gyp>=20200512:devel/py-gyp@${PY_FLAVOR}
15
EXTRACT_DEPENDS=${PYTHON_CMD}:${PYTHON_PORTSDIR}
14
EXTRACT_DEPENDS=${PYTHON_CMD}:${PYTHON_PORTSDIR}
16
LIB_DEPENDS=	libprotobuf.so:devel/protobuf \
15
LIB_DEPENDS=	libprotobuf.so:devel/protobuf \
17
		libzinnia.so:japanese/zinnia
16
		libzinnia.so:japanese/zinnia
Lines 26-33 Link Here
26
GH_ACCOUNT=	hrs-allbsd
25
GH_ACCOUNT=	hrs-allbsd
27
GH_TUPLE=	hiroyuki-komatsu:japanese-usage-dictionary:e5b3425:udic
26
GH_TUPLE=	hiroyuki-komatsu:japanese-usage-dictionary:e5b3425:udic
28
27
29
USES=		compiler:c++11-lang pkgconfig gmake \
28
USES=		compiler:c++11-lang gmake ninja:build pkgconfig \
30
		tar:bzip2 python:3.5+,build shebangfix
29
		python:3.5+,build shebangfix tar:bzip2
31
SHEBANG_FILES=	src/build_mozc.py
30
SHEBANG_FILES=	src/build_mozc.py
32
BUILD_WRKSRC=	${WRKSRC}/src
31
BUILD_WRKSRC=	${WRKSRC}/src
33
32
(-)lang/mono6.8/Makefile (-1 / +1 lines)
Lines 80-86 Link Here
80
80
81
NINJA_DESC=	Use ninja to build wherever possible
81
NINJA_DESC=	Use ninja to build wherever possible
82
NINJA_CONFIGURE_ON=	ninja
82
NINJA_CONFIGURE_ON=	ninja
83
NINJA_BUILD_DEPENDS=	ninja>0:devel/ninja
83
NINJA_USES=	ninja:build
84
84
85
NLS_DESC=	NLS Localization Support
85
NLS_DESC=	NLS Localization Support
86
NLS_CONFIGURE_OFF=	--disable-nls
86
NLS_CONFIGURE_OFF=	--disable-nls
(-)lang/rust/Makefile (-3 / +2 lines)
Lines 29-39 Link Here
29
ONLY_FOR_ARCHS?=	aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le
29
ONLY_FOR_ARCHS?=	aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le
30
ONLY_FOR_ARCHS_REASON?=	requires prebuilt bootstrap compiler
30
ONLY_FOR_ARCHS_REASON?=	requires prebuilt bootstrap compiler
31
31
32
BUILD_DEPENDS=	cmake:devel/cmake \
32
BUILD_DEPENDS=	cmake:devel/cmake
33
		ninja:devel/ninja
34
LIB_DEPENDS=	libcurl.so:ftp/curl
33
LIB_DEPENDS=	libcurl.so:ftp/curl
35
34
36
USES=		pkgconfig python:3.6+,build ssl tar:xz
35
USES=		ninja:build pkgconfig python:3.6+,build ssl tar:xz
37
36
38
MAKE_ENV=	DESTDIR=${STAGEDIR} \
37
MAKE_ENV=	DESTDIR=${STAGEDIR} \
39
		OPENSSL_DIR="${OPENSSLBASE}" \
38
		OPENSSL_DIR="${OPENSSLBASE}" \
(-)lang/rust-bootstrap/Makefile (-2 / +1 lines)
Lines 31-37 Link Here
31
31
32
BUILD_DEPENDS=	cmake:devel/cmake \
32
BUILD_DEPENDS=	cmake:devel/cmake \
33
		gmake:devel/gmake \
33
		gmake:devel/gmake \
34
		ninja:devel/ninja \
35
		rust>=${PORTVERSION}:lang/rust
34
		rust>=${PORTVERSION}:lang/rust
36
35
37
FLAVORS=	aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 powerpc64le
36
FLAVORS=	aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 powerpc64le
Lines 48-54 Link Here
48
powerpc64_elfv2_PKGNAMEPREFIX=	powerpc64-elfv2-
47
powerpc64_elfv2_PKGNAMEPREFIX=	powerpc64-elfv2-
49
powerpc64le_PKGNAMEPREFIX=	powerpc64le-
48
powerpc64le_PKGNAMEPREFIX=	powerpc64le-
50
49
51
USES=		perl5 python:3.6+,build tar:xz
50
USES=		ninja:build perl5 python:3.6+,build tar:xz
52
.if ${FLAVOR} == powerpc64_elfv1
51
.if ${FLAVOR} == powerpc64_elfv1
53
USE_GCC=	9:build
52
USE_GCC=	9:build
54
.endif
53
.endif
(-)math/py-pdal/Makefile (-3 / +2 lines)
Lines 14-26 Link Here
14
14
15
BUILD_DEPENDS=	${PYNUMPY} \
15
BUILD_DEPENDS=	${PYNUMPY} \
16
		${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR} \
17
		${LOCALBASE}/bin/cmake:devel/cmake \
17
		cmake:devel/cmake
18
		${LOCALBASE}/bin/ninja:devel/ninja
19
LIB_DEPENDS=	libpdal_base.so:math/pdal
18
LIB_DEPENDS=	libpdal_base.so:math/pdal
20
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
19
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
21
		${PYNUMPY}
20
		${PYNUMPY}
22
21
23
USES=		compiler:c++11-lang python:3.6+
22
USES=		compiler:c++11-lang ninja:build python:3.6+
24
USE_PYTHON=	autoplist cython distutils
23
USE_PYTHON=	autoplist cython distutils
25
24
26
post-install:
25
post-install:
(-)math/sage/Makefile (-4 / +4 lines)
Lines 143-149 Link Here
143
		pari-nftables>0:math/pari_nftables	\
143
		pari-nftables>0:math/pari_nftables	\
144
		pari-seadata>0:math/pari_seadata\
144
		pari-seadata>0:math/pari_seadata\
145
		QuadraticSieve:math/flintqs	\
145
		QuadraticSieve:math/flintqs	\
146
		ninja:devel/ninja		\
147
		gpatch:devel/patch		\
146
		gpatch:devel/patch		\
148
		rubiks>0:math/rubiks		\
147
		rubiks>0:math/rubiks		\
149
		sympow:math/sympow		\
148
		sympow:math/sympow		\
Lines 339-347 Link Here
339
		yasm:devel/yasm			\
338
		yasm:devel/yasm			\
340
		pixz:archivers/pixz
339
		pixz:archivers/pixz
341
340
342
USES=		autoreconf blaslapack:openblas compiler:c++11-lib fortran	\
341
USES=		autoreconf blaslapack:openblas compiler:c++11-lib fortran \
343
		gettext gmake gnome iconv jpeg libtool localbase ncurses perl5	\
342
		gettext gmake gnome iconv jpeg libtool localbase ncurses \
344
		pkgconfig python:3.7+ readline shebangfix sqlite tk xorg
343
		ninja:build perl5 pkgconfig python:3.7+ readline shebangfix \
344
		sqlite tk xorg
345
USE_TEX=	latex:build pdftex:build tex:build
345
USE_TEX=	latex:build pdftex:build tex:build
346
USE_XORG=	x11 xext xscrnsaver
346
USE_XORG=	x11 xext xscrnsaver
347
USE_GNOME=	cairo glib20 pango
347
USE_GNOME=	cairo glib20 pango
(-)sysutils/fluxengine/Makefile (-3 / +1 lines)
Lines 10-19 Link Here
10
LICENSE=	MIT
10
LICENSE=	MIT
11
LICENSE_FILE=	${WRKSRC}/COPYING.md
11
LICENSE_FILE=	${WRKSRC}/COPYING.md
12
12
13
BUILD_DEPENDS=	ninja:devel/ninja
13
USES=		compiler:gcc-c++11-lib gmake ninja:build pkgconfig sqlite
14
14
15
USES=		pkgconfig gmake compiler:gcc-c++11-lib sqlite
16
17
USE_GITHUB=	yes
15
USE_GITHUB=	yes
18
GH_ACCOUNT=	davidgiven
16
GH_ACCOUNT=	davidgiven
19
GH_TAGNAME=	61ff48c
17
GH_TAGNAME=	61ff48c
(-)sysutils/fluxengine/files/patch-mkninja.sh (+17 lines)
Line 0 Link Here
1
Fix ninja generator
2
3
devel/samurai does not like the extra whitespace:
4
5
ninja: .obj/build.ninja:6:5: expected name
6
7
--- mkninja.sh.orig	2021-03-31 12:47:37 UTC
8
+++ mkninja.sh
9
@@ -7,7 +7,7 @@ rule cxx
10
     description = CXX \$in
11
     depfile = \$out.d
12
     deps = gcc
13
-    
14
+
15
 rule library
16
     command = $AR \$out \$in
17
     description = AR \$in
(-)www/qt5-webengine/Makefile (-2 / +1 lines)
Lines 26-32 Link Here
26
COMMENT=	Qt 5 library to render web content
26
COMMENT=	Qt 5 library to render web content
27
27
28
BUILD_DEPENDS=	bison:devel/bison \
28
BUILD_DEPENDS=	bison:devel/bison \
29
		ninja:devel/ninja \
30
		yasm:devel/yasm \
29
		yasm:devel/yasm \
31
		${LOCALBASE}/include/linux/input.h:devel/evdev-proto \
30
		${LOCALBASE}/include/linux/input.h:devel/evdev-proto \
32
		${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
31
		${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
Lines 74-80 Link Here
74
# We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks
73
# We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks
75
# whether webenginewidgets is available, which fails when qmake processes all
74
# whether webenginewidgets is available, which fails when qmake processes all
76
# .pro files at once.
75
# .pro files at once.
77
USES=		gl gnome gperf jpeg python:2.7,build pkgconfig \
76
USES=		gl gnome gperf jpeg ninja:build pkgconfig python:2.7,build \
78
		qmake:norecursive,outsource qt-dist:5,webengine shebangfix xorg
77
		qmake:norecursive,outsource qt-dist:5,webengine shebangfix xorg
79
USE_GL=		gl
78
USE_GL=		gl
80
USE_GNOME=	glib20 libxml2 libxslt
79
USE_GNOME=	glib20 libxml2 libxslt
(-)x11-fonts/font-manager/Makefile (-1 lines)
Lines 13-19 Link Here
13
13
14
BUILD_DEPENDS=	cmake:devel/cmake \
14
BUILD_DEPENDS=	cmake:devel/cmake \
15
		itstool:textproc/itstool \
15
		itstool:textproc/itstool \
16
		ninja:devel/ninja \
17
		valac:lang/vala \
16
		valac:lang/vala \
18
		yelp-build:textproc/yelp-tools
17
		yelp-build:textproc/yelp-tools
19
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
18
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \

Return to bug 254678