Page MenuHomeFreeBSD

New Port: devel/mage
ClosedPublic

Authored by seanc on Apr 22 2018, 10:40 PM.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

seanc created this revision.Apr 22 2018, 10:40 PM
swills accepted this revision.Apr 23 2018, 12:01 AM

Approved

This revision is now accepted and ready to land.Apr 23 2018, 12:01 AM
This revision was automatically updated to reflect the committed changes.
mat added inline comments.Apr 23 2018, 7:54 AM
head/devel/mage/Makefile
5

2.1 and remove GH_TAGNAME.

24–30

Why 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.

seanc updated this revision to Diff 41752.Apr 23 2018, 9:03 AM
seanc marked an inline comment as done.

Address feedback from @mat and use post-patch instead of pre-patch and do-patch.

seanc reopened this revision.Apr 23 2018, 9:04 AM
seanc added inline comments.
head/devel/mage/Makefile
5

When 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.

24–30

The 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.

swills accepted this revision.May 9 2018, 12:15 PM

Looks OK to me

This revision is now accepted and ready to land.May 9 2018, 12:15 PM
This revision was automatically updated to reflect the committed changes.