Skip to content

Instantly share code, notes, and snippets.

@spchamp
Created September 29, 2019 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spchamp/b59a74a0dcc7007a86baa0d3ad51889c to your computer and use it in GitHub Desktop.
Save spchamp/b59a74a0dcc7007a86baa0d3ad51889c to your computer and use it in GitHub Desktop.
Snippet - use ninja-build in pkgsrc www/webkit-gtk
BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
CMAKE_ARGS+= -GNinja
do-build:
cd ${WRKSRC} && ninja
@spchamp
Copy link
Author

spchamp commented Sep 29, 2019

Limit build parallelization per MAKE_JOBS

BUILD_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
CMAKE_ARGS+=		-GNinja
do-build:
	cd ${WRKSRC} && ninja ${MAKE_JOBS:D-j ${MAKE_JOBS}}

@spchamp
Copy link
Author

spchamp commented Sep 29, 2019

Use MAKE_ENV, INSTALL_ENV

BUILD_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
CMAKE_ARGS+=	-GNinja
do-build:
	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja ${MAKE_JOBS:D-j ${MAKE_JOBS}}

do-install:
	@cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ninja install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment