Received: by mail.netbsd.org (Postfix, from userid 605) id 16AEB84D77; Thu, 11 Jul 2019 10:24:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 93BB684D68 for ; Thu, 11 Jul 2019 10:24:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id s43psPmihlx8 for ; Thu, 11 Jul 2019 10:24:15 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 096D484CDC for ; Thu, 11 Jul 2019 10:24:15 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 03D0EFBF4; Thu, 11 Jul 2019 10:24:15 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1562840654252180" MIME-Version: 1.0 Date: Thu, 11 Jul 2019 10:24:14 +0000 From: "Nia Alarie" Subject: CVS commit: pkgsrc/lang/rust To: pkgsrc-changes@NetBSD.org Reply-To: nia@netbsd.org X-Mailer: log_accum Message-Id: <20190711102415.03D0EFBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1562840654252180 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: nia Date: Thu Jul 11 10:24:14 UTC 2019 Modified Files: pkgsrc/lang/rust: Makefile Added Files: pkgsrc/lang/rust: options.mk Log Message: rust: Make building the internal LLVM optional for everyone (not just Darwin and SunOS). This was posted to tech-pkg@ a while ago with no objections, I've been using it for a while too. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 pkgsrc/lang/rust/Makefile cvs rdiff -u -r0 -r1.1 pkgsrc/lang/rust/options.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1562840654252180 Content-Disposition: inline Content-Length: 2901 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/rust/Makefile diff -u pkgsrc/lang/rust/Makefile:1.107 pkgsrc/lang/rust/Makefile:1.108 --- pkgsrc/lang/rust/Makefile:1.107 Mon Jul 8 15:16:40 2019 +++ pkgsrc/lang/rust/Makefile Thu Jul 11 10:24:14 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.107 2019/07/08 15:16:40 he Exp $ +# $NetBSD: Makefile,v 1.108 2019/07/11 10:24:14 nia Exp $ DISTNAME= rustc-1.36.0-src PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} @@ -14,8 +14,6 @@ USE_GCC_RUNTIME= yes USE_LANGUAGES= c c++11 USE_LIBTOOL= yes USE_TOOLS+= bash ggrep gmake perl:build pkg-config -# For internal llvm -BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake # The NetBSD bootstraps are built for NetBSD 8 (because rust doesn't # build on 7). Mark earlier versions as broken. @@ -124,18 +122,8 @@ CHECK_SSP_SUPPORTED= no CHECK_PORTABILITY_SKIP+= src/vendor/openssl-src/openssl/.travis-create-release.sh -# Required for LLVM (-std=c++11) -GCC_REQD+= 4.8 - .include "../../mk/bsd.prefs.mk" -# The bundled LLVM current has issues building on SunOS. -.if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS" -.include "../../lang/llvm/buildlink3.mk" -CONFIGURE_ARGS+= --enable-llvm-link-shared -CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} -.endif - # # Under NetBSD, do not use DT_RUNPATH # @@ -457,6 +445,8 @@ stage0-bootstrap: install ${GTAR} -zcf ${PKGNAME_NOREV}-${RUST_ARCH}.tar.gz ${PKGNAME_NOREV}-${RUST_ARCH}) .endif +.include "options.mk" + # These dependencies currently use the bundled sources as they require # development features not yet available in released versions. # @@ -465,7 +455,6 @@ stage0-bootstrap: install #.include "../../www/curl/buildlink3.mk" #.include "../../www/http-parser/buildlink3.mk" -.include "../../devel/cmake/buildlink3.mk" #.include "../../devel/jemalloc/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" .include "../../lang/python/tool.mk" Added files: Index: pkgsrc/lang/rust/options.mk diff -u /dev/null pkgsrc/lang/rust/options.mk:1.1 --- /dev/null Thu Jul 11 10:24:14 2019 +++ pkgsrc/lang/rust/options.mk Thu Jul 11 10:24:14 2019 @@ -0,0 +1,28 @@ +# $NetBSD: options.mk,v 1.1 2019/07/11 10:24:14 nia Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.rust +PKG_SUPPORTED_OPTIONS+= rust-llvm + +.include "../../mk/bsd.fast.prefs.mk" + +# The bundled LLVM current has issues building on SunOS. +.if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" +PKG_SUGGESTED_OPTIONS+= rust-llvm +.endif + +.include "../../mk/bsd.options.mk" + +# +# Use the internal copy of LLVM. +# This contains some extra optimizations. +# +.if !empty(PKG_OPTIONS:Mrust-llvm) +# LLVM uses -std=c++11 +GCC_REQD+= 4.8 +BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake +.include "../../devel/cmake/buildlink3.mk" +.else +.include "../../lang/llvm/buildlink3.mk" +CONFIGURE_ARGS+= --enable-llvm-link-shared +CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} +.endif --_----------=_1562840654252180--