Changeset View
Standalone View
devel/cargo/Makefile
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | |||||
# $FreeBSD$ | |||||
PORTNAME= cargo | |||||
PORTVERSION= 0.2.0.20150612 | |||||
CATEGORIES= devel | |||||
MAINTAINER= ports@FreeBSD.org | |||||
COMMENT= Rust's Package Manager | |||||
kwm: Hmm, take maintainership for now until your sure it stable? It is unfortunate that rust doesn't… | |||||
# ' <-- Help Vim syntax hilighting... | |||||
LICENSE= APACHE20 \ | |||||
MIT | |||||
LICENSE_COMB= dual | |||||
LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE \ | |||||
${WRKSRC}/LICENSE-MIT | |||||
# The following files are required: | |||||
# | |||||
# GH:src | |||||
# This is the source of Cargo, taken from GitHub. | |||||
# | |||||
# LOCAL/dumbbell:bootstrap | |||||
# Like Rust, this is a prebuilt "cargo" used to bootstrap it, because | |||||
# Cargo is a standard Rust package itself. | |||||
# | |||||
# LOCAL/dumbbell:registry | |||||
# Cargo clones several Git repositories for its dependencies and | |||||
# caches them in its "registry". This is a archive of this registry so | |||||
# nothing is downlaoded during the build. | |||||
# | |||||
# LOCAL/dumbbell:installer | |||||
# This is a collection of mainly shell scripts which are used to | |||||
# install Cargo. | |||||
MASTER_SITES= LOCAL/dumbbell:bootstrap \ | |||||
Not Done Inline ActionsI don't really like this, but I don't see any other way of doing this. So carry on. kwm: I don't really like this, but I don't see any other way of doing this. So carry on. | |||||
LOCAL/dumbbell:registry \ | |||||
https://people.freebsd.org/~dumbbell/rust/:bootstrap \ | |||||
https://people.freebsd.org/~dumbbell/rust/:registry | |||||
DISTFILES= ${CARGO_BOOT}:bootstrap \ | |||||
Not Done Inline Actionseuh LOCAL/dumbbell gets translated to people.freebsd.org/~dumbbell . Also can't you move all the distfiles into rust/ to begin with? kwm: euh LOCAL/dumbbell gets translated to people.freebsd.org/~dumbbell . Also can't you move all… | |||||
Not Done Inline ActionsI added that for the cases I update the files but they are not available right away from the mirrors. dumbbell: I added that for the cases I update the files but they are not available right away from the… | |||||
Not Done Inline ActionsI was wrong, local/dumbbell gets resolved to the distcache. not people.f.o. Imoa I think it beter not to "abuse" people.f.o for this. And just wait until the new files get pickedup by the distcache. kwm: I was wrong, local/dumbbell gets resolved to the distcache. not people.f.o. Imoa I think it… | |||||
${CARGO_REGISTRY}:registry | |||||
EXTRACT_ONLY= ${DISTNAME}${_GITHUB_EXTRACT_SUFX} \ | |||||
${DISTFILE_rust_installer} \ | |||||
${CARGO_REGISTRY} | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= rust-lang | |||||
GH_PROJECT= ${PORTNAME} \ | |||||
rust-installer:rust_installer | |||||
GH_TAGNAME= ae8b752b4e \ | |||||
e54d482:rust_installer | |||||
CARGO_BOOT= ${PORTNAME}-bootstrap-0.2.0.20150503-${CARGO_BOOT_SIG}${EXTRACT_SUFX} | |||||
CARGO_BOOT_SIG= x86_64-unknown-freebsd | |||||
CARGO_REGISTRY= ${DISTNAME:S/${GH_ACCOUNT}-${PORTNAME}/${PORTNAME}-registry/}${EXTRACT_SUFX} | |||||
RUST_INSTALLER= ${GH_ACCOUNT}-rust-installer-${PORTVERSION}-e54d4823d26cdb3f98e5a1b17e1c257cd329aa61_GH0${EXTRACT_SUFX} | |||||
USES= gmake python:2,build pkgconfig | |||||
BUILD_DEPENDS= ${LOCALBASE}/bin/cmake:${PORTSDIR}/devel/cmake \ | |||||
rustc:${PORTSDIR}/lang/rust-nightly | |||||
Not Done Inline ActionsCan't you replace this with USES=cmake or does Mk/Uses/cmake.mk do something funny which breaks the build horribly for some unclear reason? (like it does for webkit2-gtk3...) kwm: Can't you replace this with USES=cmake or does Mk/Uses/cmake.mk do something funny which breaks… | |||||
Not Done Inline Actionscmake is not the main build tool for Rust, there is a non-autoconf configure script. cmake is used to build a dependency, libgit2. dumbbell: cmake is not the main build tool for Rust, there is a non-autoconf configure script. cmake is… | |||||
LIB_DEPENDS= libssh2.so:${PORTSDIR}/security/libssh2 \ | |||||
libcurl.so:${PORTSDIR}/ftp/curl | |||||
# FIXME: Don't add rust as a runtime dependency. As we need rust-nightly | |||||
# to build Cargo, the same version would be pulled by installing Cargo, | |||||
# preventing its use with the stable version of Rust. | |||||
# RUN_DEPENDS= rustc:${PORTSDIR}/lang/rust | |||||
HAS_CONFIGURE= yes | |||||
CONFIGURE_ARGS= --mandir=${MANPREFIX}/man | |||||
MAKE_ENV+= LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib" | |||||
# git log -1 --date=short --pretty=format:'%cd' | |||||
CFG_VER_DATE= 2015-06-12 | |||||
# git rev-parse --short HEAD | |||||
CFG_VER_HASH= ${GH_TAGNAME} | |||||
.if defined(BATCH) || defined(PACKAGE_BUILDING) | |||||
MAKE_ARGS+= VERBOSE=1 | |||||
.endif | |||||
MAKE_JOBS_UNSAFE= yes | |||||
.include <bsd.port.pre.mk> | |||||
Not Done Inline Actions.include <bsd.port.options.mk> while this port doesn't have options you don't have to hassle with pre.mk/post.mk .. kwm: .include <bsd.port.options.mk> while this port doesn't have options you don't have to hassle… | |||||
post-extract: | |||||
@(${RMDIR} ${WRKSRC}/src/rust-installer && \ | |||||
${MV} ${WRKSRC_rust_installer} ${WRKSRC}/src/rust-installer) | |||||
@${MKDIR} ${WRKSRC}/target/dl | |||||
${LN} -sf ${DISTDIR}/${CARGO_BOOT} ${WRKSRC}/target/dl/${PORTNAME}-nightly-${CARGO_BOOT_SIG}${EXTRACT_SUFX} | |||||
#${EXTRACT_CMD} \ | |||||
# -C ${WRKSRC}/.. \ | |||||
# ${EXTRACT_BEFORE_ARGS}${DISTDIR}/${CARGO_REGISTRY} \ | |||||
# ${EXTRACT_AFTER_ARGS} | |||||
post-patch: | |||||
${REINPLACE_CMD} \ | |||||
-e 's|^CFG_VER_DATE =.*|CFG_VER_DATE = ${CFG_VER_DATE}|' \ | |||||
-e 's|^CFG_VER_HASH =.*|CFG_VER_HASH = ${CFG_VER_HASH}|' \ | |||||
${WRKSRC}/Makefile.in | |||||
# In case the previous "make stage" failed, this ensures rust's | |||||
# install.sh won't backup previously staged files before reinstalling | |||||
# new ones. Otheriwe, the staging directory is polluted with unneeded | |||||
# files. | |||||
pre-install: | |||||
@if test -f ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo; then \ | |||||
${SED} -E -e 's,^(dir|file:),${STAGEDIR},' \ | |||||
< ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo \ | |||||
| ${XARGS} ${RM}; \ | |||||
fi | |||||
@${RM} \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/components \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh | |||||
post-install: | |||||
@${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/install.log | |||||
@${REINPLACE_CMD} -e 's|${STAGEDIR}||' \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo | |||||
@${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo.bak | |||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cargo | |||||
@${RM} \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/components \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh | |||||
.include <bsd.port.post.mk> | |||||
Not Done Inline Actions.include <bsd.port.mk> while this port doesn't have options you don't have to hassle with pre.mk/post.mk .. kwm: .include <bsd.port.mk> while this port doesn't have options you don't have to hassle with pre. |
Hmm, take maintainership for now until your sure it stable? It is unfortunate that rust doesn't have a active maintainer.