1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

lang/rust: Clean up more things

- Drop pre-install target: `make restage` should be run after a
  failed `make stage` to wipe out and repopulate the staging
  directory.  No need to hack around this.
- Drop RUST_MANIFESTS, it is only one value after r490852 and now
  only used once in post-install.
- Drop RUST_CHANNEL.  It is only used in do-configure.
- Drop LLNEXTGEN option.  There are no references to LLNextgen in
  the Rust sources, so it appears to not be used for anything
  anymore.
This commit is contained in:
Tobias Kortkamp 2019-07-16 15:49:35 +00:00
parent fc82af5b80
commit c0f71bfc7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=506748

View File

@ -51,8 +51,6 @@ CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_B
CARGO_VENDOR_DIR?= ${WRKSRC}/vendor
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//}
# Rust's target arch string is different from *BSD arch strings
RUST_ARCH_aarch64= aarch64
RUST_ARCH_amd64= x86_64
@ -67,19 +65,12 @@ PLIST_SUB+= RUST_TARGET=${RUST_TARGET}
USES= compiler gmake libedit pkgconfig python:2.7,build ssl tar:xz
OPTIONS_DEFINE= DOCS GDB LLNEXTGEN SOURCES
OPTIONS_DEFINE= DOCS GDB SOURCES
GDB_DESC= Install ports gdb (necessary for debugging rust programs)
LLNEXTGEN_DESC= Build with grammar verification
SOURCES_DESC= Install source files
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb
LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen
# Rust manifests list all files and directories installed by rust-installer.
# We use them in:
# - pre-install to cleanup the ${STAGEDIR}
# - post-install to populate the ${TMPPLIST}
RUST_MANIFESTS= lib/rustlib/manifest-*
PLIST_FILES= lib/rustlib/components \
lib/rustlib/rust-installer-version
@ -151,7 +142,7 @@ do-configure:
-e 's,%SYSCONFDIR%,${PREFIX}/etc,' \
-e 's,%MANDIR%,${MANPREFIX}/man,' \
-e 's,%PYTHON_CMD%,${PYTHON_CMD},' \
-e 's,%CHANNEL%,${RUST_CHANNEL},' \
-e 's,%CHANNEL%,${PKGNAMESUFFIX:Ustable:S/^-//},' \
-e 's,%TARGET%,${RUST_TARGET},' \
-e 's,%CCACHE%,${CCACHE_VALUE},' \
-e 's,%CC%,${CC},' \
@ -182,23 +173,6 @@ do-build:
--config ./config.toml \
--jobs ${MAKE_JOBS_NUMBER}
# In case the previous "make stage" failed, this ensures rust's
# install.sh won't backup previously staged files before reinstalling
# new ones. Otherwise, the staging directory is polluted with unneeded
# files.
pre-install:
@for f in ${RUST_MANIFESTS:S,^,${STAGEDIR}${PREFIX}/,}; do \
if test -f "$$f"; then \
${SED} -E -e 's,^(file|dir):,${STAGEDIR},' \
< "$$f" \
| ${XARGS} ${RM} -r; \
${RM} "$$f"; \
fi; \
done
@for f in ${PLIST_FILES:S,^,${STAGEDIR}${PREFIX}/,}; do \
${RM} "$$f"; \
done
do-install:
cd ${WRKSRC} && \
${SETENV} ${X_PY_ENV} \
@ -223,7 +197,7 @@ do-install:
# We fix manpage entries in the generated manifests because Rust
# installs them uncompressed but the Ports framework compresses them.
post-install:
for f in ${RUST_MANIFESTS:S,^,${STAGEDIR}${PREFIX}/,}; do \
for f in ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-*; do \
${REINPLACE_CMD} -i '' -E \
-e 's|:${STAGEDIR}|:|' \
-e 's|(man/man[1-9]/.*\.[0-9])|\1.gz|' \