git: e9dba04db7fe - main - sysutils/mmc-utils: Minor changes to port

From: Marius Strobl <marius_at_FreeBSD.org>
Date: Sun, 19 Dec 2021 15:40:42 UTC
The branch main has been updated by marius:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e9dba04db7fe00a325c36a54e2470935decb8947

commit e9dba04db7fe00a325c36a54e2470935decb8947
Author:     Marius Strobl <marius@FreeBSD.org>
AuthorDate: 2021-12-19 15:16:38 +0000
Commit:     Marius Strobl <marius@FreeBSD.org>
CommitDate: 2021-12-19 15:39:40 +0000

    sysutils/mmc-utils: Minor changes to port
    
    - Fetch the distfile directly from the master git repository based on
      the nifty approach taken by mail/alpine instead of using a local copy.
      Note that this bumps the PORTVERSION to the last commit date (rather
      than last change date) of the repository w/o a change in source. [1]
    - Chase outdated repository URL in pkg-descr (still wrong in WWW). [2]
    
    PR:             260527
    Obtained from:  mail/alpine [1]
    Submitted by:   diizzy [2]
---
 sysutils/mmc-utils/Makefile  | 25 +++++++------------------
 sysutils/mmc-utils/distinfo  |  6 +++---
 sysutils/mmc-utils/pkg-descr |  2 +-
 3 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/sysutils/mmc-utils/Makefile b/sysutils/mmc-utils/Makefile
index c593023d166c..f9f4e040822d 100644
--- a/sysutils/mmc-utils/Makefile
+++ b/sysutils/mmc-utils/Makefile
@@ -1,10 +1,10 @@
 # Created by: Marius Strobl <marius@FreeBSD.org>
 
 PORTNAME=	mmc-utils
-PORTVERSION=	20211130
-DISTVERSIONSUFFIX=	-a1b233c2
+DISTVERSION=	20211202
+DISTVERSIONSUFFIX=	-${MMC_GITSHASH}
 CATEGORIES=	sysutils
-MASTER_SITES=	LOCAL/marius
+MASTER_SITES=	https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/${MMC_GITHASH}${EXTRACT_SUFX}?dummy=/
 
 MAINTAINER=	marius@FreeBSD.org
 COMMENT=	Userspace tools for MMC/SD devices
@@ -13,12 +13,11 @@ LICENSE=	BSD3CLAUSE GPLv2
 LICENSE_COMB=	multi
 
 IGNORE_DragonFly=	only supported on FreeBSD
-
-USES=		gmake tar:bzip2
-
+MMC_GITHASH=	a1b233c2a31baa5b77cb67c0c3be4767be86f727
+MMC_GITSHASH=	${MMC_GITHASH:C/^(........).*/\1/}
 PLIST_FILES=	man/man1/mmc.1.gz sbin/mmc
-
-MMC_GITURL=	git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
+USES=		gmake
+WRKSRC=		${WRKDIR}/${MMC_GITHASH}
 
 post-patch:
 .for i in Makefile mmc_cmds.c mmc.c man/mmc.1
@@ -30,14 +29,4 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/mmc ${STAGEDIR}${PREFIX}/sbin
 	${INSTALL_MAN} ${WRKSRC}/man/mmc.1 ${STAGEDIR}${PREFIX}/man/man1
 
-maintainer-fetch:
-	@${MAKE} clean
-	@${MKDIR} ${WRKSRC}
-	@git clone ${MMC_GITURL} ${WRKSRC}
-	@cd ${WRKSRC} && git reset --hard ${DISTVERSIONSUFFIX:S|^-||}
-	@${TAR} -cyf ${_DISTDIR:S|/$||}/${DISTFILES:M${PORTNAME}-*} \
-		-C ${WRKSRC}/.. --exclude .git* .
-	@${MAKE} makesum
-	@${MAKE} clean
-
 .include <bsd.port.mk>
diff --git a/sysutils/mmc-utils/distinfo b/sysutils/mmc-utils/distinfo
index f978889f5446..7278400b05f9 100644
--- a/sysutils/mmc-utils/distinfo
+++ b/sysutils/mmc-utils/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1639857562
-SHA256 (mmc-utils-20211130-a1b233c2.tar.bz2) = 08580126453b7ca20988236030d98d5e59c82ebbd990a4b9bbf9a8b6dfaa59aa
-SIZE (mmc-utils-20211130-a1b233c2.tar.bz2) = 42512
+TIMESTAMP = 1639924509
+SHA256 (mmc-utils-20211202-a1b233c2.tar.gz) = fb275b57353bb53ff97d9ba4716928ed159341a1e1539f6face40bc63b39e674
+SIZE (mmc-utils-20211202-a1b233c2.tar.gz) = 47220
diff --git a/sysutils/mmc-utils/pkg-descr b/sysutils/mmc-utils/pkg-descr
index d19fdee673b6..a0c4c46b5c0d 100644
--- a/sysutils/mmc-utils/pkg-descr
+++ b/sysutils/mmc-utils/pkg-descr
@@ -3,7 +3,7 @@ MMC tools introduction
 
 There is one MMC test tools called mmc-utils, which is maintained by
 Chris Ball, you can find it at the below public git repository:
-http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/
+https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git
 
 Functions
 =========