Date: Thu, 14 Jun 2018 09:56:02 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r472373 - in head: Mk/Uses devel/pijul sysutils/flowgger textproc/bat x11/alacritty Message-ID: <201806140956.w5E9u2O3066851@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Thu Jun 14 09:56:02 2018 New Revision: 472373 URL: https://svnweb.freebsd.org/changeset/ports/472373 Log: Mk/Uses/cargo.mk: Encode more crate build dependencies - Add build/lib dependencies, environment variables to ports using the backtrace-sys, freetype-sys, gettext-sys, onig_sys, thrussh-libsodium crates instead of doing this individually for every port. - Add a DEV_WARNING when using libc versions < 0.2.37 to prevent instability of Rust applications on 12.0-CURRENT [1] - Sort cargo-crates-licenses output Reviewed by: pizzamig, jbeich [1] Differential Revision: https://reviews.freebsd.org/D15463 Modified: head/Mk/Uses/cargo.mk head/devel/pijul/Makefile head/sysutils/flowgger/Makefile head/textproc/bat/Makefile head/x11/alacritty/Makefile Modified: head/Mk/Uses/cargo.mk ============================================================================== --- head/Mk/Uses/cargo.mk Thu Jun 14 09:34:31 2018 (r472372) +++ head/Mk/Uses/cargo.mk Thu Jun 14 09:56:02 2018 (r472373) @@ -117,23 +117,67 @@ CARGO_TEST_ARGS+= --release CARGO_INSTALL_ARGS+= --debug .endif -.if ${CARGO_CRATES:Mlibgit2-sys-*} +.if ${CARGO_CRATES:Mbacktrace-sys-[0-9]*} +BUILD_DEPENDS+= gmake:devel/gmake +.endif + +.if ${CARGO_CRATES:Mcmake-[0-9]*} +BUILD_DEPENDS+= cmake:devel/cmake +.endif + +.if ${CARGO_CRATES:Mfreetype-sys-[0-9]*} +LIB_DEPENDS+= libfreetype.so:print/freetype2 +.endif + +.if ${CARGO_CRATES:Mgettext-sys-[0-9]*} +.include "${USESDIR}/gettext.mk" +CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \ + GETTEXT_INCLUDE_DIR=${LOCALBASE}/include \ + GETTEXT_LIB_DIR=${LOCALBASE}/lib +.endif + +.if ${CARGO_CRATES:Mlibc-[0-9]*} +# FreeBSD 12.0 changed ABI: r318736 and r320043 +# https://github.com/rust-lang/libc/commit/78f93220d70e +# https://github.com/rust-lang/libc/commit/969ad2b73cdc +_libc_VER= ${CARGO_CRATES:Mlibc-[0-9]*:C/.*-//} +. if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 38) +DEV_WARNING+= "CARGO_CRATES=libc-0.2.37 or older maybe unstable on FreeBSD 12.0. Consider updating to the latest version." +. endif +.undef _libc_VER +.endif + +.if ${CARGO_CRATES:Mlibgit2-sys-[0-9]*} # Use the system's libgit2 instead of building the bundled version -LIB_DEPENDS+= libgit2.so:devel/libgit2 CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1 +LIB_DEPENDS+= libgit2.so:devel/libgit2 .endif -.if ${CARGO_CRATES:Mopenssl-sys-*} +.if ${CARGO_CRATES:Monig_sys-[0-9]*} +# onig_sys always prefers the system library but will try to link +# statically with it. Since devel/oniguruma doesn't provide a static +# library it'll link to libonig.so instead. Strictly speaking setting +# RUSTONIG_SYSTEM_LIBONIG is not necessary, but will force onig_sys to +# always use the system's libonig as returned by `pkg-config oniguruma`. +CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 +LIB_DEPENDS+= libonig.so:devel/oniguruma +.endif + +.if ${CARGO_CRATES:Mopenssl-sys-[0-9]*} # Make sure that openssl-sys can find the correct version of OpenSSL .include "${USESDIR}/ssl.mk" CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \ OPENSSL_INCLUDE_DIR=${OPENSSLINC} .endif -.if ${CARGO_CRATES:Mpkg-config-*} +.if ${CARGO_CRATES:Mpkg-config-[0-9]*} .include "${USESDIR}/pkgconfig.mk" .endif +.if ${CARGO_CRATES:Mthrussh-libsodium-[0-9]*} +LIB_DEPENDS+= libsodium.so:security/libsodium +.endif + _USES_extract+= 600:cargo-extract cargo-extract: # target for preparing crates directory. It will put all crates in @@ -222,5 +266,5 @@ cargo-crates-licenses: configure | ${SED} \ -e 's@^${CARGO_VENDOR_DIR}/@@' \ -e 's@/Cargo.toml:license.*= *"@|@' \ - -e 's@"$$@@g' | /usr/bin/column -t -s '|' + -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' .endif Modified: head/devel/pijul/Makefile ============================================================================== --- head/devel/pijul/Makefile Thu Jun 14 09:34:31 2018 (r472372) +++ head/devel/pijul/Makefile Thu Jun 14 09:56:02 2018 (r472373) @@ -14,9 +14,7 @@ LICENSE= GPLv2 BROKEN_aarch64= fails to compile: aesv8-armx-linux64.S:53:2: instruction requires: crypto aese v6.16b,v0.16b -LIB_DEPENDS+= libsodium.so:security/libsodium - -USES= cargo gmake ssl +USES= cargo CARGO_CRATES= adler32-1.0.2 \ advapi32-sys-0.2.0 \ aho-corasick-0.6.4 \ Modified: head/sysutils/flowgger/Makefile ============================================================================== --- head/sysutils/flowgger/Makefile Thu Jun 14 09:34:31 2018 (r472372) +++ head/sysutils/flowgger/Makefile Thu Jun 14 09:56:02 2018 (r472373) @@ -12,8 +12,7 @@ COMMENT= Fast data collector LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE -# gmake for backtrace-sys -USES= cargo gmake +USES= cargo USE_GITHUB= yes GH_ACCOUNT= jedisct1 GH_TUPLE= Manishearth:rust-clippy:387efd459c0ad3db7af15f1a573057b8587f9748:clippy \ Modified: head/textproc/bat/Makefile ============================================================================== --- head/textproc/bat/Makefile Thu Jun 14 09:34:31 2018 (r472372) +++ head/textproc/bat/Makefile Thu Jun 14 09:56:02 2018 (r472373) @@ -10,10 +10,7 @@ COMMENT= Clone of cat with syntax highlighting LICENSE= APACHE20 -LIB_DEPENDS= libonig.so:devel/oniguruma -CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 - -USES= cargo cmake:noninja +USES= cargo USE_GITHUB= yes GH_ACCOUNT= sharkdp Modified: head/x11/alacritty/Makefile ============================================================================== --- head/x11/alacritty/Makefile Thu Jun 14 09:34:31 2018 (r472372) +++ head/x11/alacritty/Makefile Thu Jun 14 09:56:02 2018 (r472373) @@ -11,9 +11,7 @@ COMMENT= GPU-accelerated terminal emulator LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE -BUILD_DEPENDS= cmake:devel/cmake -LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ - libfreetype.so:print/freetype2 +LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig USES= cargo USE_GITHUB= yes
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806140956.w5E9u2O3066851>