git: f38c599f9ba6 - main - www/youtube_dl: Un-deprecate port, update to recent upstream snap

From: Thomas Zander <riggs_at_FreeBSD.org>
Date: Mon, 20 Mar 2023 21:31:46 UTC
The branch main has been updated by riggs:

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

commit f38c599f9ba66af1ff65009808e4ce84be464722
Author:     Thomas Zander <riggs@FreeBSD.org>
AuthorDate: 2023-03-20 21:19:02 +0000
Commit:     Thomas Zander <riggs@FreeBSD.org>
CommitDate: 2023-03-20 21:31:44 +0000

    www/youtube_dl: Un-deprecate port, update to recent upstream snap
    
    Details:
    - Rework the port to fetch from GitHub per repo hash instead of
      releases.
    - Rationale: Upstream does not seem to publish releases
      anymore, but continues development on git HEAD.
    
    PR:             270108
---
 www/youtube_dl/Makefile             | 18 +++++++-----------
 www/youtube_dl/distinfo             |  6 +++---
 www/youtube_dl/files/patch-Makefile | 22 +++++-----------------
 3 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile
index 70bc68026475..a167bb31e173 100644
--- a/www/youtube_dl/Makefile
+++ b/www/youtube_dl/Makefile
@@ -1,9 +1,6 @@
 PORTNAME=	youtube_dl
-DISTVERSION=	2021.12.17
+PORTVERSION=	2023.03.14
 CATEGORIES=	www
-MASTER_SITES=	https://github.com/ytdl-org/youtube-dl/releases/download/${DISTVERSION}/ \
-		https://yt-dl.org/downloads/${DISTVERSION}/
-DISTNAME=	youtube-dl-${DISTVERSION}
 
 # Implicit approval to commit trivial version updates.
 MAINTAINER=	multimedia@FreeBSD.org
@@ -13,15 +10,18 @@ WWW=		https://yt-dl.org/
 LICENSE=	UNLICENSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-DEPRECATED=	Unmaintained upstream, www/yt-dlp can be used going forward
-EXPIRATION_DATE=2023-03-31
+BUILD_DEPENDS=	pandoc:textproc/hs-pandoc
 
 USES=		gmake python
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	ytdl-org
+GH_PROJECT=	youtube-dl
+GH_TAGNAME=	6fece0a
+
 MAKE_ARGS=	PYTHON=${PYTHON_CMD}
 ALL_TARGET=	youtube-dl
 NO_ARCH=	yes
-WRKSRC=		${WRKDIR}/youtube-dl
 
 PLIST_FILES=	bin/youtube-dl \
 		etc/bash_completion.d/youtube-dl.sh \
@@ -37,8 +37,4 @@ RTMPDUMP_DESC=	Use rtmpdump to download rtmp video streams
 FFMPEG_RUN_DEPENDS=	ffprobe:multimedia/ffmpeg
 RTMPDUMP_RUN_DEPENDS=	rtmpdump:multimedia/rtmpdump
 
-post-extract:
-# remove tarball provided version, build our own
-	@${RM} ${WRKSRC}/youtube-dl
-
 .include <bsd.port.mk>
diff --git a/www/youtube_dl/distinfo b/www/youtube_dl/distinfo
index 32eb9ce55533..0c54f5e88d1d 100644
--- a/www/youtube_dl/distinfo
+++ b/www/youtube_dl/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1639680444
-SHA256 (youtube-dl-2021.12.17.tar.gz) = 9f3b99c8b778455165b4525f21505e86c7ff565f3ac319e19733d810194135df
-SIZE (youtube-dl-2021.12.17.tar.gz) = 3332299
+TIMESTAMP = 1679299345
+SHA256 (ytdl-org-youtube-dl-2023.03.14-6fece0a_GH0.tar.gz) = e6a57710bde2e7d137f28a6e829834281f2f0470675f99dcb9182088533aaa46
+SIZE (ytdl-org-youtube-dl-2023.03.14-6fece0a_GH0.tar.gz) = 1638794
diff --git a/www/youtube_dl/files/patch-Makefile b/www/youtube_dl/files/patch-Makefile
index d88e1149d60a..8ac0bb1eed00 100644
--- a/www/youtube_dl/files/patch-Makefile
+++ b/www/youtube_dl/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig	2019-12-24 22:21:59.865317000 +0100
-+++ Makefile	2019-12-24 22:24:39.962172000 +0100
-@@ -12,7 +12,7 @@
+--- Makefile.orig	2023-03-14 16:23:20 UTC
++++ Makefile
+@@ -12,7 +12,7 @@ SHAREDIR ?= $(PREFIX)/share
  PYTHON ?= /usr/bin/env python
  
  # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
@@ -9,7 +9,7 @@
  
  # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2
  MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi)
-@@ -23,11 +23,11 @@
+@@ -23,11 +23,11 @@ install: youtube-dl youtube-dl.1 youtube-dl.bash-compl
  	install -d $(DESTDIR)$(MANDIR)/man1
  	install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
  	install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
@@ -24,7 +24,7 @@
  
  codetest:
  	flake8 .
-@@ -65,7 +65,7 @@
+@@ -65,7 +65,7 @@ youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
  	done
  	touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py
  	mv zip/youtube_dl/__main__.py zip/
@@ -33,15 +33,3 @@
  	rm -rf zip
  	echo '#!$(PYTHON)' > youtube-dl
  	cat youtube-dl.zip >> youtube-dl
-@@ -90,11 +90,6 @@
- 
- README.txt: README.md
- 	pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
--
--youtube-dl.1: README.md
--	$(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
--	pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
--	rm -f youtube-dl.1.temp.md
- 
- youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
- 	$(PYTHON) devscripts/bash-completion.py