Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136845979
D15463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D15463.diff
View Options
Index: head/Mk/Uses/cargo.mk
===================================================================
--- head/Mk/Uses/cargo.mk
+++ head/Mk/Uses/cargo.mk
@@ -117,23 +117,67 @@
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 @@
| ${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
Index: head/devel/pijul/Makefile
===================================================================
--- head/devel/pijul/Makefile
+++ head/devel/pijul/Makefile
@@ -14,9 +14,7 @@
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 \
Index: head/sysutils/flowgger/Makefile
===================================================================
--- head/sysutils/flowgger/Makefile
+++ head/sysutils/flowgger/Makefile
@@ -12,8 +12,7 @@
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 \
Index: head/textproc/bat/Makefile
===================================================================
--- head/textproc/bat/Makefile
+++ head/textproc/bat/Makefile
@@ -10,10 +10,7 @@
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
Index: head/x11/alacritty/Makefile
===================================================================
--- head/x11/alacritty/Makefile
+++ head/x11/alacritty/Makefile
@@ -11,9 +11,7 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 1:25 AM (7 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25745632
Default Alt Text
D15463.diff (4 KB)
Attached To
Mode
D15463: Mk/Uses/cargo.mk: Encode more crate build dependencies
Attached
Detach File
Event Timeline
Log In to Comment