pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   tnn
Date:           Tue Oct 20 19:03:07 UTC 2020

Modified Files:
        pkgsrc/audio/ncspot: Makefile
        pkgsrc/lang/rust: cargo.mk

Log Message:
cargo.mk: move CARGO_FEATURES from lang/ncspot to here

It seems to be a generally useful feature. If a package supports
optional cargo dependencies then you may now (instead of messing with
CARGO_ARGS directly) set in your Makefile for example:

CARGO_NO_DEFAULT_FEATURES=      YES
CARGO_FEATURES+=                dbus pulseaudio


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/audio/ncspot/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/lang/rust/cargo.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/ncspot/Makefile
diff -u pkgsrc/audio/ncspot/Makefile:1.6 pkgsrc/audio/ncspot/Makefile:1.7
--- pkgsrc/audio/ncspot/Makefile:1.6    Tue Oct 20 18:40:31 2020
+++ pkgsrc/audio/ncspot/Makefile        Tue Oct 20 19:03:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2020/10/20 18:40:31 tnn Exp $
+# $NetBSD: Makefile,v 1.7 2020/10/20 19:03:07 tnn Exp $
 
 DISTNAME=      ncspot-0.2.3
 PKGREVISION=   1
@@ -428,9 +428,9 @@ RUSTFLAGS+= -C link-arg=${COMPILER_RPATH
 RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libxcb}/lib
 RUSTFLAGS+=    -C link-arg=-L${BUILDLINK_PREFIX.libxcb}/lib
 MAKE_ENV+=     RUSTFLAGS=${RUSTFLAGS:Q}
-CARGO_ARGS=    ${DEFAULT_CARGO_ARGS} --no-default-features --features ${CARGO_FEATURES:S/ /,/Wg}
 
-CARGO_FEATURES+=       share_clipboard
+CARGO_NO_DEFAULT_FEATURES=     YES
+CARGO_FEATURES+=               share_clipboard
 
 .include "options.mk"
 

Index: pkgsrc/lang/rust/cargo.mk
diff -u pkgsrc/lang/rust/cargo.mk:1.22 pkgsrc/lang/rust/cargo.mk:1.23
--- pkgsrc/lang/rust/cargo.mk:1.22      Fri Aug 14 21:19:22 2020
+++ pkgsrc/lang/rust/cargo.mk   Tue Oct 20 19:03:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.22 2020/08/14 21:19:22 tnn Exp $
+# $NetBSD: cargo.mk,v 1.23 2020/10/20 19:03:07 tnn Exp $
 #
 # Common logic that can be used by packages that depend on cargo crates
 # from crates.io. This lets existing pkgsrc infrastructure fetch and verify
@@ -66,7 +66,10 @@ print-cargo-depends:
                        print "CARGO_CRATE_DEPENDS+=\t" name "-" vers;  \
                        }' ${WRKSRC}/Cargo.lock
 
-DEFAULT_CARGO_ARGS=    build --offline --release -j${_MAKE_JOBS_N}
+DEFAULT_CARGO_ARGS=    build --offline --release -j${_MAKE_JOBS_N}     \
+                         ${CARGO_NO_DEFAULT_FEATURES:M[yY][eE][sS]:C/[yY][eE][sS]/--no-default-features/}      \
+                         ${CARGO_FEATURES:C/.*/--features/W}   \
+                         ${CARGO_FEATURES:S/ /,/Wg}
 CARGO_ARGS?=           ${DEFAULT_CARGO_ARGS}
 
 .if !target(do-build)



Home | Main Index | Thread Index | Old Index