pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   maya
Date:           Sat Oct  7 17:40:27 UTC 2017

Modified Files:
        pkgsrc/lang/rust: Makefile
Added Files:
        pkgsrc/lang/rust/files: config.toml

Log Message:
rust: use files directory rather than echo


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/rust/files/config.toml

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

Modified files:

Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.12 pkgsrc/lang/rust/Makefile:1.13
--- pkgsrc/lang/rust/Makefile:1.12      Sat Oct  7 13:08:37 2017
+++ pkgsrc/lang/rust/Makefile   Sat Oct  7 17:40:27 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2017/10/07 13:08:37 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2017/10/07 17:40:27 maya Exp $
 
 DISTNAME=      rustc-1.20.0-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -115,37 +115,16 @@ post-extract:
        ${MV} ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}/rust-std-${RUST_ARCH}/lib/rustlib/${RUST_ARCH} \
                ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc/lib/rustlib
 
+RUSTC=                 ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc/bin/rustc
+CARGO=                 ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/cargo/bin/cargo
+
+SUBST_CLASSES+=                config
+SUBST_STAGE.config=    post-configure
+SUBST_FILES.config+=   config.toml
+SUBST_VARS.config+=    RUSTC CARGO PREFIX PYTHONBIN
+
 do-configure:
-       echo '[build]' > ${WRKSRC}/config.toml
-       echo 'rustc = "${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc/bin/rustc"' \
-               >> ${WRKSRC}/config.toml
-       echo 'cargo = "${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/cargo/bin/cargo"' \
-               >> ${WRKSRC}/config.toml
-       echo 'python = "${PYTHONBIN}"' >> ${WRKSRC}/config.toml
-       echo 'vendor = true' >> ${WRKSRC}/config.toml
-       echo 'extended = true' >> ${WRKSRC}/config.toml
-       echo 'verbose = 2' >> ${WRKSRC}/config.toml
-
-       echo '[install]' >> ${WRKSRC}/config.toml
-       echo 'prefix = "${PREFIX}"' >> ${WRKSRC}/config.toml
-       echo 'sysconfdir = "${SYSCONFDIR}"' >> ${WRKSRC}/config.toml
-       echo 'mandir = "${PKGMANDIR}"' >> ${WRKSRC}/config.toml
-
-       echo '[rust]' >> ${WRKSRC}/config.toml
-       echo 'channel = "stable"' >> ${WRKSRC}/config.toml
-       echo 'rpath = true' >> ${WRKSRC}/config.toml
-       echo 'codegen-tests = false' >> ${WRKSRC}/config.toml
-
-       echo '[dist]' >> ${WRKSRC}/config.toml
-       echo 'src-tarball = false' >> ${WRKSRC}/config.toml
-
-       echo '[llvm]' >> ${WRKSRC}/config.toml
-       echo 'static-libstdcpp = false' >> ${WRKSRC}/config.toml
-       echo 'ninja = true' >> ${WRKSRC}/config.toml
-
-       echo '[target.${RUST_ARCH}]' >> ${WRKSRC}/config.toml
-       echo 'llvm-config = "${LOCALBASE}/bin/llvm-config"' \
-               >> ${WRKSRC}/config.toml
+       ${CP} ${FILESDIR}/config.toml ${WRKSRC}/config.toml
 
 do-build:
        cd ${WRKSRC} \

Added files:

Index: pkgsrc/lang/rust/files/config.toml
diff -u /dev/null pkgsrc/lang/rust/files/config.toml:1.1
--- /dev/null   Sat Oct  7 17:40:27 2017
+++ pkgsrc/lang/rust/files/config.toml  Sat Oct  7 17:40:27 2017
@@ -0,0 +1,22 @@
+[build]
+rustc = "@RUSTC@"
+cargo = "@CARGO@"
+python = "@PYTHONBIN@"
+vendor = true
+extended = true
+verbose = 2
+[install]
+prefix = "@PREFIX@"
+sysconfdir = ""
+mandir = "man"
+[rust]
+channel = "stable"
+rpath = true
+codegen-tests = false
+[dist]
+src-tarball = false
+[llvm]
+static-libstdcpp = false
+ninja = true
+[target.x86_64-unknown-netbsd]
+llvm-config = "@PREFIX@/bin/llvm-config"



Home | Main Index | Thread Index | Old Index