pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/ncspot



Module Name:    pkgsrc
Committed By:   tnn
Date:           Tue Oct 20 18:40:31 UTC 2020

Modified Files:
        pkgsrc/audio/ncspot: Makefile distinfo
Added Files:
        pkgsrc/audio/ncspot: options.mk
Removed Files:
        pkgsrc/audio/ncspot/patches: patch-Cargo.toml

Log Message:
ncspot: use PKG_OPTIONS framework

In particular allow building w/o dbus and wide curses but also add
options for the various supported audio backends while here (untested).

Also promote libxcb to full dependency because it failed with
"ld: cannot find -lxcb" when disabling dbus.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/audio/ncspot/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/audio/ncspot/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ncspot/options.mk
cvs rdiff -u -r1.4 -r0 pkgsrc/audio/ncspot/patches/patch-Cargo.toml

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.5 pkgsrc/audio/ncspot/Makefile:1.6
--- pkgsrc/audio/ncspot/Makefile:1.5    Mon Oct 12 12:04:13 2020
+++ pkgsrc/audio/ncspot/Makefile        Tue Oct 20 18:40:31 2020
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2020/10/12 12:04:13 pin Exp $
+# $NetBSD: Makefile,v 1.6 2020/10/20 18:40:31 tnn Exp $
 
 DISTNAME=      ncspot-0.2.3
+PKGREVISION=   1
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=hrkfdn/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -15,8 +16,6 @@ USE_TOOLS+=                   pkg-config
 PYTHON_VERSIONS_ACCEPTED=      37
 PYTHON_FOR_BUILD_ONLY=         tool
 
-USE_NCURSES=   yes     # NCURSES_MOUSE_VERSION, also needs wide support
-
 CARGO_CRATE_DEPENDS+=  addr2line-0.13.0
 CARGO_CRATE_DEPENDS+=  adler-0.2.3
 CARGO_CRATE_DEPENDS+=  aes-0.3.2
@@ -425,19 +424,21 @@ CARGO_CRATE_DEPENDS+=     xml-rs-0.6.1
 INSTALLATION_DIRS=     bin
 
 MAKE_ENV+=     OPENSSL_DIR=${BUILDLINK_PREFIX.openssl:Q}
-RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.ncursesw}/lib
 RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib
-RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.portaudio}/${BUILDLINK_LIBDIRS.portaudio}
+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
+
+.include "options.mk"
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/target/release/ncspot ${DESTDIR}${PREFIX}/bin
 
-.include "../../audio/portaudio/buildlink3.mk"
-.include "../../devel/ncursesw/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../lang/rust/cargo.mk"
 .include "../../security/openssl/buildlink3.mk"
-.include "../../sysutils/dbus/buildlink3.mk"
-BUILDLINK_DEPMETHOD.libxcb?=   build
 .include "../../x11/libxcb/buildlink3.mk"
-.include "../../lang/rust/cargo.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/audio/ncspot/distinfo
diff -u pkgsrc/audio/ncspot/distinfo:1.4 pkgsrc/audio/ncspot/distinfo:1.5
--- pkgsrc/audio/ncspot/distinfo:1.4    Mon Oct 12 12:04:13 2020
+++ pkgsrc/audio/ncspot/distinfo        Tue Oct 20 18:40:31 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2020/10/12 12:04:13 pin Exp $
+$NetBSD: distinfo,v 1.5 2020/10/20 18:40:31 tnn Exp $
 
 SHA1 (addr2line-0.13.0.crate) = c7a6843df774a95b4db5a5511b58ab22c44f228a
 RMD160 (addr2line-0.13.0.crate) = 22c733c5358313e9ca7fb95d1dbd695d03fcb552
@@ -1616,4 +1616,3 @@ SHA1 (xml-rs-0.6.1.crate) = 6e27cecdbbc1
 RMD160 (xml-rs-0.6.1.crate) = 470f5a78a46aac7c503aad7a8a00c006c69d898d
 SHA512 (xml-rs-0.6.1.crate) = 27bba3095a92162f4e0b9f27c2c4c49bd61433ccbbd36957c8347aa25f397d7902253b755f0e70809b96db178cee02620b14e120a80111d4e3da4b40cf2203ab
 Size (xml-rs-0.6.1.crate) = 50922 bytes
-SHA1 (patch-Cargo.toml) = cce572043d1ccd8b59f133487e34a6f6b9a099ed

Added files:

Index: pkgsrc/audio/ncspot/options.mk
diff -u /dev/null pkgsrc/audio/ncspot/options.mk:1.1
--- /dev/null   Tue Oct 20 18:40:31 2020
+++ pkgsrc/audio/ncspot/options.mk      Tue Oct 20 18:40:31 2020
@@ -0,0 +1,53 @@
+# $NetBSD: options.mk,v 1.1 2020/10/20 18:40:31 tnn Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.ncspot
+PKG_OPTIONS_OPTIONAL_GROUPS=   backend ui
+PKG_OPTIONS_GROUP.backend=     alsa portaudio pulseaudio rodio
+PKG_OPTIONS_GROUP.ui=          ncursesw termion
+
+PKG_SUPPORTED_OPTIONS= dbus
+PKG_SUGGESTED_OPTIONS= portaudio ncursesw
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CARGO_FEATURES+=       alsa_backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.alsa-lib}/lib
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mportaudio)
+CARGO_FEATURES+=       portaudio_backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.portaudio}/${BUILDLINK_LIBDIRS.portaudio}
+.include "../../audio/portaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CARGO_FEATURES+=       pulseaudio_backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pulseaudio}/lib
+.include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mrodio)
+CARGO_FEATURES+=       rodio_backend
+.endif
+
+.if !empty(PKG_OPTIONS:Mncursesw)
+USE_NCURSES=           yes     # NCURSES_MOUSE_VERSION
+CARGO_FEATURES+=       cursive/pancurses-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.ncursesw}/lib
+.include "../../devel/ncursesw/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mtermion)
+CARGO_FEATURES+=       cursive/termion-backend
+.endif
+
+.if !empty(PKG_OPTIONS:Mdbus)
+CARGO_FEATURES+=       mpris
+CARGO_FEATURES+=       notif
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.dbus}/lib
+.  include "../../sysutils/dbus/buildlink3.mk"
+.else
+
+.endif



Home | Main Index | Thread Index | Old Index