Skip to content

Commit

Permalink
www/youtube_dl: Un-deprecate port, update to recent upstream snap
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ephemeralriggs committed Mar 20, 2023
1 parent 49277a8 commit f38c599
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 31 deletions.
18 changes: 7 additions & 11 deletions 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
Expand All @@ -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 \
Expand All @@ -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>
6 changes: 3 additions & 3 deletions 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
22 changes: 5 additions & 17 deletions 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
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -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

0 comments on commit f38c599

Please sign in to comment.