summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-06-14 15:33:27 +0000
committernia <nia@pkgsrc.org>2020-06-14 15:33:27 +0000
commit6126f20f213effac25d2b477408cb022d7795aae (patch)
tree883c3889f85a9a0b583726a3b6ffaa4cf9123229
parent8ee5b232965adfd9937fc7cf874314933b58a950 (diff)
downloadpkgsrc-6126f20f213effac25d2b477408cb022d7795aae.tar.gz
Rename rust-bin's PKGNAME to rust-bin. Add rust.mk for rust packages.
This allows rust-bin and rust to coexist in bulk builds (for testing, etc), but the packages still may not be installed at the same time. rust.mk as a solution for picking the correct rust variant was suggested by gdt@. It is intended to be included directly by packages that do not use cargo.mk, and indirectly by packages that do use cargo.mk. rust.mk provides one user-settable variable: RUST_TYPE as before, whether to bootstrap rust from source or use official binaries. may be "src" or "bin" And two package-settable variables: RUST_REQ the minimum version of Rust required by the package. defaults to "1.20.0" RUST_RUNTIME whether Rust is a runtime dependency, may be "yes" or "no"
-rw-r--r--devel/cbindgen/Makefile4
-rw-r--r--graphics/librsvg/Makefile6
-rw-r--r--lang/mozjs68/Makefile7
-rw-r--r--lang/rust-bin/Makefile9
-rw-r--r--lang/rust-bin/buildlink3.mk13
-rw-r--r--lang/rust/Makefile10
-rw-r--r--lang/rust/cargo.mk10
-rw-r--r--lang/rust/rust.mk57
-rw-r--r--lang/rust/type.mk28
-rw-r--r--net/tor/options.mk6
-rw-r--r--sysutils/tealdeer/Makefile3
-rw-r--r--www/cliqz/Makefile7
-rw-r--r--www/firefox/mozilla-common.mk7
-rw-r--r--www/firefox68/mozilla-common.mk7
-rw-r--r--www/geckodriver/Makefile3
-rw-r--r--www/seamonkey/mozilla-common.mk7
-rw-r--r--www/zola/Makefile3
17 files changed, 102 insertions, 85 deletions
diff --git a/devel/cbindgen/Makefile b/devel/cbindgen/Makefile
index e96b93233f6..1515478b102 100644
--- a/devel/cbindgen/Makefile
+++ b/devel/cbindgen/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2020/06/03 08:53:04 ryoon Exp $
+# $NetBSD: Makefile,v 1.16 2020/06/14 15:33:28 nia Exp $
DISTNAME= cbindgen-0.14.2
CATEGORIES= devel
@@ -55,6 +55,6 @@ do-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/target/release/cbindgen ${DESTDIR}${PREFIX}/bin
+RUST_RUNTIME= yes
.include "../../lang/rust/cargo.mk"
-.include "../../lang/rust/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/librsvg/Makefile b/graphics/librsvg/Makefile
index e2268d9c99e..bd24eb4664e 100644
--- a/graphics/librsvg/Makefile
+++ b/graphics/librsvg/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.122 2020/06/02 08:22:44 adam Exp $
+# $NetBSD: Makefile,v 1.123 2020/06/14 15:33:27 nia Exp $
DISTNAME= librsvg-2.48.3
PKGREVISION= 1
@@ -206,8 +206,6 @@ BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.8.0
BUILDLINK_API_DEPENDS.libxml2+= libxml2>=2.9
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
-BUILDLINK_API_DEPENDS.rust+= rust>=1.39.0
-BUILDLINK_DEPMETHOD.rust?= build
-.include "../../lang/rust/buildlink3.mk"
+RUST_REQ= 1.39.0
.include "../../lang/rust/cargo.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/mozjs68/Makefile b/lang/mozjs68/Makefile
index a88863cc889..95c9a30d1a4 100644
--- a/lang/mozjs68/Makefile
+++ b/lang/mozjs68/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2020/06/02 08:22:45 adam Exp $
+# $NetBSD: Makefile,v 1.5 2020/06/14 15:33:28 nia Exp $
DISTNAME= mozjs68_68.6.0.orig
PKGNAME= ${DISTNAME:S/_/-/:S/.orig//}
@@ -66,9 +66,8 @@ post-install:
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
-BUILDLINK_DEPMETHOD.rust= build
-BUILDLINK_API_DEPENDS.rust+= rust>=1.34.0
-.include "../../lang/rust/buildlink3.mk"
+RUST_TYPE= 1.34.0
+.include "../../lang/rust/rust.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../textproc/icu/buildlink3.mk"
diff --git a/lang/rust-bin/Makefile b/lang/rust-bin/Makefile
index d228e6b150f..33705891a04 100644
--- a/lang/rust-bin/Makefile
+++ b/lang/rust-bin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2020/06/09 15:58:05 nia Exp $
+# $NetBSD: Makefile,v 1.9 2020/06/14 15:33:28 nia Exp $
DISTNAME= rust-1.44.0
+PKGNAME= ${DISTNAME:S/rust/rust-bin/1}
CATEGORIES= lang
MASTER_SITES= https://static.rust-lang.org/dist/
@@ -9,11 +10,7 @@ HOMEPAGE= https://rust-lang.org/
COMMENT= Safe, concurrent, practical language (official binaries)
LICENSE= mit OR apache-2.0
-.include "../../lang/rust/type.mk"
-
-.if ${RUST_TYPE} != "bin"
-PKG_SKIP_REASON+= "Rust binary package, RUST_TYPE is src"
-.endif
+CONFLICTS+= rust-[0-9]*
ONLY_FOR_PLATFORM+= Darwin-*-x86_64
ONLY_FOR_PLATFORM+= FreeBSD-*-i386
diff --git a/lang/rust-bin/buildlink3.mk b/lang/rust-bin/buildlink3.mk
new file mode 100644
index 00000000000..cb17cfc28ea
--- /dev/null
+++ b/lang/rust-bin/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/06/14 15:33:28 nia Exp $
+
+BUILDLINK_TREE+= rust-bin
+
+.if !defined(RUST_BIN_BUILDLINK3_MK)
+RUST_BIN_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.rust-bin+= rust-bin>=1.20.0
+BUILDLINK_PKGSRCDIR.rust-bin?= ../../lang/rust-bin
+BUILDLINK_PASSTHRU_DIRS+= ${PREFIX}/lib/rustlib
+.endif
+
+BUILDLINK_TREE+= -rust-bin
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 08aa2f9088d..71ab6239349 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.179 2020/06/14 14:29:25 gdt Exp $
+# $NetBSD: Makefile,v 1.180 2020/06/14 15:33:27 nia Exp $
DISTNAME= rustc-1.43.1-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -11,6 +11,8 @@ HOMEPAGE= https://www.rust-lang.org/
COMMENT= Safe, concurrent, practical language
LICENSE= mit OR apache-2.0
+CONFLICTS+= rust-bin-[0-9]*
+
USE_GCC_RUNTIME= yes
USE_LANGUAGES= c c++11
USE_LIBTOOL= yes
@@ -20,12 +22,6 @@ USE_TOOLS+= bash ggrep gmake perl:build pkg-config
# build on 7). Mark earlier versions as broken.
BROKEN_ON_PLATFORM+= NetBSD-[1-7].*-*
-.include "type.mk"
-
-.if ${RUST_TYPE} != "src"
-PKG_SKIP_REASON+= "Rust source package, RUST_TYPE is bin"
-.endif
-
HAS_CONFIGURE= yes
PYTHON_FOR_BUILD_ONLY= yes
CONFIG_SHELL= ${PYTHONBIN}
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk
index abba173d573..3195eca1206 100644
--- a/lang/rust/cargo.mk
+++ b/lang/rust/cargo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.16 2020/06/14 11:19:34 rillig Exp $
+# $NetBSD: cargo.mk,v 1.17 2020/06/14 15:33:27 nia 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
@@ -22,13 +22,7 @@
MASTER_SITES?= -${MASTER_SITE_CRATESIO}${PKGBASE}/${PKGVERSION_NOREV}/download
-.include "type.mk"
-
-.if ${RUST_TYPE} != "bin"
-BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust
-.else
-BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust-bin
-.endif
+.include "../../lang/rust/rust.mk"
USE_TOOLS+= bsdtar digest
CARGO_VENDOR_DIR= ${WRKDIR}/vendor
diff --git a/lang/rust/rust.mk b/lang/rust/rust.mk
new file mode 100644
index 00000000000..f683026a1ad
--- /dev/null
+++ b/lang/rust/rust.mk
@@ -0,0 +1,57 @@
+# $NetBSD: rust.mk,v 1.1 2020/06/14 15:33:27 nia Exp $
+#
+# This file determines the type of rust package to use.
+#
+# === User-settable variables ===
+#
+# RUST_TYPE
+# The preferred type of Rust release to use -
+# either bootstrap-from-source or an official binary.
+#
+# Official Rust binaries are only published for certain platforms,
+# including Darwin, Linux, and NetBSD x86_64.
+#
+# Possible values: src bin
+# Default: src
+#
+# === Package-settable variables ===
+#
+# RUST_REQ
+# The minimum version of Rust required by the package.
+# Binary Rust is only published for certain platforms.
+#
+# Default: 1.20.0
+#
+# RUST_RUNTIME
+# Whether rust is a runtime dependency.
+# Usually it is only needed to build.
+#
+# Possible values: yes no
+# Default: no
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+RUST_REQ?= 1.20.0
+RUST_RUNTIME?= no
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64)
+RUST_TYPE?= bin
+.else
+RUST_TYPE?= src
+.endif
+
+.if ${RUST_TYPE} == "bin"
+. if ${RUST_RUNTIME} != "no"
+BUILDLINK_DEPMETHOD.rust-bin?= build
+. endif
+BUILDLINK_API_DEPENDS.rust-bin+= rust-bin>=${RUST_REQ}
+. include "../../lang/rust-bin/buildlink3.mk"
+.endif
+
+.if ${RUST_TYPE} == "src"
+. if ${RUST_RUNTIME} != "no"
+BUILDLINK_DEPMETHOD.rust?= build
+. endif
+BUILDLINK_API_DEPENDS.rust+= rust>=${RUST_REQ}
+. include "../../lang/rust/buildlink3.mk"
+.endif
diff --git a/lang/rust/type.mk b/lang/rust/type.mk
deleted file mode 100644
index d2267eebb36..00000000000
--- a/lang/rust/type.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: type.mk,v 1.2 2020/05/18 16:33:44 wiz Exp $
-#
-# This file determines the type of rust package to use -
-# binary (as via rustup) or a source bootstrap.
-#
-# Rust only publishes binaries for specific platforms in specific
-# tiers.
-#
-# === User-settable variables ===
-#
-# RUST_TYPE
-# The preferred Rust type to use.
-#
-# Possible values: src bin
-# Default: src
-
-.if !defined(RUST_TYPE)
-. include "../../mk/bsd.fast.prefs.mk"
-
-# The Rust bootstrapping process is often particularly slow
-# and unreliable on NetBSD due to ld.so bugs
-. if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64)
-RUST_TYPE?= bin
-. else
-RUST_TYPE?= src
-. endif
-
-.endif # !defined(RUST_TYPE)
diff --git a/net/tor/options.mk b/net/tor/options.mk
index 548a6f58a2f..f4c88c5f843 100644
--- a/net/tor/options.mk
+++ b/net/tor/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.11 2020/05/15 16:39:34 wiz Exp $
+# $NetBSD: options.mk,v 1.12 2020/06/14 15:33:28 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.tor
PKG_SUPPORTED_OPTIONS= doc rust
@@ -33,10 +33,8 @@ CARGO_CRATE_DEPENDS+= rand-0.5.0-pre.2
CARGO_CRATE_DEPENDS+= rand_core-0.2.0-pre.0
CARGO_CRATE_DEPENDS+= typenum-1.9.0
+RUST_REQ= 1.34.0
.include "../../lang/rust/cargo.mk"
-BUILDLINK_DEPMETHOD.rust= build
-BUILDLINK_API_DEPENDS.rust+= rust>=1.34.0
-.include "../../lang/rust/buildlink3.mk"
pre-configure:
cd ${WRKSRC} && ${MKDIR} -p src/rust/target/release
diff --git a/sysutils/tealdeer/Makefile b/sysutils/tealdeer/Makefile
index 40a2de1565e..7e757c112f9 100644
--- a/sysutils/tealdeer/Makefile
+++ b/sysutils/tealdeer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/03/19 19:43:52 bsiegert Exp $
+# $NetBSD: Makefile,v 1.2 2020/06/14 15:33:28 nia Exp $
DISTNAME= tealdeer-1.3.0
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -190,6 +190,5 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/bash_tealdeer ${DESTDIR}${PREFIX}/share/bash-completion/completions/tldr
.include "../../lang/rust/cargo.mk"
-.include "../../lang/rust/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/cliqz/Makefile b/www/cliqz/Makefile
index 6e3749b7d7b..5cf7b6c1af6 100644
--- a/www/cliqz/Makefile
+++ b/www/cliqz/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2020/06/02 08:24:56 adam Exp $
+# $NetBSD: Makefile,v 1.43 2020/06/14 15:33:28 nia Exp $
DISTNAME= cliqz-1.36.0
PKGREVISION= 1
@@ -175,8 +175,7 @@ PKG_CC= ${PREFIX}/bin/clang
PKG_CXX= ${PREFIX}/bin/clang++
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
-BUILDLINK_DEPMETHOD.rust= build
-BUILDLINK_API_DEPENDS.rust+= rust>=1.41.0
-.include "../../lang/rust/buildlink3.mk"
+RUST_REQ= 1.41.0
+.include "../../lang/rust/rust.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/firefox/mozilla-common.mk b/www/firefox/mozilla-common.mk
index e24df2460ef..62a41e820cd 100644
--- a/www/firefox/mozilla-common.mk
+++ b/www/firefox/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.169 2020/06/03 09:04:36 ryoon Exp $
+# $NetBSD: mozilla-common.mk,v 1.170 2020/06/14 15:33:28 nia Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -261,9 +261,8 @@ CWRAPPERS_PREPEND.cxx+= \
-stdlib++-isystem \
${BUILDLINK_PREFIX.gcc8}/gcc8/include/c++/backward
.endif
-BUILDLINK_DEPMETHOD.rust= build
-BUILDLINK_API_DEPENDS.rust+= rust>=1.41.0
-.include "../../lang/rust/buildlink3.mk"
+RUST_REQ= 1.41.0
+.include "../../lang/rust/rust.mk"
# webrtc option requires internal libvpx
#BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
#.include "../../multimedia/libvpx/buildlink3.mk"
diff --git a/www/firefox68/mozilla-common.mk b/www/firefox68/mozilla-common.mk
index bfdcb3dc3ff..bb7adaf86c5 100644
--- a/www/firefox68/mozilla-common.mk
+++ b/www/firefox68/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.10 2020/04/28 06:56:48 riastradh Exp $
+# $NetBSD: mozilla-common.mk,v 1.11 2020/06/14 15:33:28 nia Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -227,9 +227,8 @@ BUILDLINK_API_DEPENDS.libwebp+= libwebp>=1.0.2
.include "../../graphics/libwebp/buildlink3.mk"
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
-BUILDLINK_DEPMETHOD.rust= build
-BUILDLINK_API_DEPENDS.rust+= rust>=1.34.0
-.include "../../lang/rust/buildlink3.mk"
+RUST_REQ= 1.34.0
+.include "../../lang/rust/rust.mk"
# webrtc option requires internal libvpx
#BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
#.include "../../multimedia/libvpx/buildlink3.mk"
diff --git a/www/geckodriver/Makefile b/www/geckodriver/Makefile
index 9b006841e5d..0af2c653d72 100644
--- a/www/geckodriver/Makefile
+++ b/www/geckodriver/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2020/01/19 18:20:46 maya Exp $
+# $NetBSD: Makefile,v 1.11 2020/06/14 15:33:29 nia Exp $
DISTNAME= geckodriver-0.24.0
CATEGORIES= www
@@ -175,6 +175,5 @@ do-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/target/release/geckodriver ${DESTDIR}${PREFIX}/bin
-.include "../../lang/rust/buildlink3.mk"
.include "../../lang/rust/cargo.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/seamonkey/mozilla-common.mk b/www/seamonkey/mozilla-common.mk
index 937baf537e0..6371b0b1921 100644
--- a/www/seamonkey/mozilla-common.mk
+++ b/www/seamonkey/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.2 2020/06/08 12:39:19 ryoon Exp $
+# $NetBSD: mozilla-common.mk,v 1.3 2020/06/14 15:33:28 nia Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -201,9 +201,8 @@ BUILDLINK_API_DEPENDS.nss+= nss>=3.35
#.include "../../graphics/cairo/buildlink3.mk"
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
-BUILDLINK_API_DEPENDS.rust+= rust>=1.23.0
-BUILDLINK_DEPMETHOD.rust= build
-.include "../../lang/rust/buildlink3.mk"
+RUST_REQ= 1.23.0
+.include "../../lang/rust/rust.mk"
#BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
#.include "../../multimedia/libvpx/buildlink3.mk"
.include "../../net/libIDL/buildlink3.mk"
diff --git a/www/zola/Makefile b/www/zola/Makefile
index 0cebe265b87..923158ffb49 100644
--- a/www/zola/Makefile
+++ b/www/zola/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/06/08 17:28:05 nikita Exp $
+# $NetBSD: Makefile,v 1.3 2020/06/14 15:33:29 nia Exp $
DISTNAME= zola-0.11.0
CATEGORIES= www
@@ -328,6 +328,5 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/target/release/zola ${DESTDIR}${PREFIX}/bin
.include "../../lang/rust/cargo.mk"
-.include "../../lang/rust/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"