Changeset View
Standalone View
head/devel/mage/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= mage | PORTNAME= mage | ||||
DISTVERSIONPREFIX= v | DISTVERSIONPREFIX= v | ||||
DISTVERSION= 2.1.0 | DISTVERSION= 2.1 | ||||
mat: `2.1` and remove `GH_TAGNAME`. | |||||
Not Done Inline ActionsWhen I do that, I'm unable to fetch the src tarball. Admittedly I haven't looked into why, but those two seem to be required atm: % svn diff . Index: Makefile =================================================================== --- Makefile (revision 468072) +++ Makefile (working copy) @@ -2,7 +2,7 @@ PORTNAME= mage DISTVERSIONPREFIX= v -DISTVERSION= 2.1.0 +DISTVERSION= 2.1 CATEGORIES= devel MAINTAINER= seanc@FreeBSD.org @@ -16,7 +16,6 @@ USE_GITHUB= yes GH_ACCOUNT= magefile GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} -GH_TAGNAME= 2.1 GH_TAG_COMMIT= 771ebed PLIST_FILES= bin/mage % make makesum => magefile-mage-v2.1_GH0.tar.gz doesn't seem to exist in /usr/home/seanc/src/FreeBSD/ports/distfiles/. => Attempting to fetch https://codeload.github.com/magefile/mage/tar.gz/v2.1?dummy=/magefile-mage-v2.1_GH0.tar.gz fetch: https://codeload.github.com/magefile/mage/tar.gz/v2.1?dummy=/magefile-mage-v2.1_GH0.tar.gz: Not Found => Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/magefile-mage-v2.1_GH0.tar.gz fetch: http://distcache.FreeBSD.org/ports-distfiles/magefile-mage-v2.1_GH0.tar.gz: Not Found => Couldn't fetch it - please try to retrieve this => port manually into /usr/home/seanc/src/FreeBSD/ports/distfiles/ and try again. *** Error code 1 Stop. make: stopped in /usr/home/seanc/src/FreeBSD/ports/devel/mage Exit 1 If I leave in GH_TAGNAME then the port can fetch correctly. This requires more investigation into the GH_* variables. seanc: When I do that, I'm unable to fetch the src tarball. Admittedly I haven't looked into why, but… | |||||
CATEGORIES= devel | CATEGORIES= devel | ||||
MAINTAINER= seanc@FreeBSD.org | MAINTAINER= seanc@FreeBSD.org | ||||
COMMENT= Command-line make-like build tool using Go as input files | COMMENT= Command-line make-like build tool using Go as input files | ||||
LICENSE= APACHE20 | LICENSE= APACHE20 | ||||
LICENSE_FILE= ${WRKSRC}/LICENSE | LICENSE_FILE= ${WRKSRC}/LICENSE | ||||
BUILD_DEPENDS= go:lang/go | BUILD_DEPENDS= go:lang/go | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= magefile | GH_ACCOUNT= magefile | ||||
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} | GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} | ||||
GH_TAGNAME= 2.1 | GH_TAGNAME= 2.1 | ||||
GH_TAG_COMMIT= 771ebed | GH_TAG_COMMIT= 771ebed | ||||
PLIST_FILES= bin/mage | PLIST_FILES= bin/mage | ||||
pre-patch: | post-patch: | ||||
@${SED} -e "s|%%GH_TAGNAME%%|${GH_TAGNAME}|g; s|%%GH_TAG_COMMIT%%|${GH_TAG_COMMIT}|g" \ | @${REINPLACE_CMD} -e "s|%%GH_TAGNAME%%|${GH_TAGNAME}|g; s|%%GH_TAG_COMMIT%%|${GH_TAG_COMMIT}|g" \ | ||||
${FILESDIR}/patch-magefile.go > ${WRKSRC}/magefile.go.patch | ${WRKSRC}/magefile.go | ||||
do-patch: | |||||
@cd ${WRKSRC} && ${PATCH} --forward --quiet -p2 < magefile.go.patch | |||||
do-build: | do-build: | ||||
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \ | @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \ | ||||
${LOCALBASE}/bin/go run bootstrap.go | ${LOCALBASE}/bin/go run bootstrap.go | ||||
Done Inline ActionsWhy two separate targets ? Also, never, ever, ever, overwrite do-patch it is the target used by the framework to apply patches. It would be better to do this the other way, remove your do-patch target, have the framework apply the patch with the %% placeholders, and replace them in post-patch. mat: Why two separate targets ?
Also, never, ever, ever, overwrite `do-patch` it is the target used… | |||||
Not Done Inline ActionsThe pre-patch step is prepping the supplied patch. In the do-patch step, I'm no longer preparing the patch to be applied, instead I'm now applying it. However I am explicitly not applying the patch found in ${FILESDIR} because I want to apply a patch using the processed patch. The reverse, however, is nicer. Updated. seanc: The `pre-patch` step is prepping the supplied patch. In the `do-patch` step, I'm no longer… | |||||
do-install: | do-install: | ||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} | ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
2.1 and remove GH_TAGNAME.