diff --git a/www/yt-dlp/Makefile b/www/yt-dlp/Makefile index c0e696fb4d86..80d0a1dd34a3 100644 --- a/www/yt-dlp/Makefile +++ b/www/yt-dlp/Makefile @@ -1,44 +1,45 @@ PORTNAME= yt-dlp DISTVERSION= 2022.07.18 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= yuri@FreeBSD.org COMMENT= Command-line program for downloading videos from various platforms LICENSE= UNLICENSE LICENSE_FILE= ${WRKSRC}/LICENSE PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}brotli>0:archivers/py-brotli@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}certifi>0:security/py-certifi@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pycryptodomex>0:security/py-pycryptodomex@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}websockets>0:devel/py-websockets@${PY_FLAVOR} BUILD_DEPENDS= ${PY_DEPENDS} RUN_DEPENDS= ${PY_DEPENDS} USES= gmake python:3.7+ shebangfix USE_GITHUB= yes SHEBANG_GLOB= devscripts/*.py MAKE_ARGS= PYTHON=${PYTHON_CMD} NO_ARCH= yes OPTIONS_DEFINE= FFMPEG RTMPDUMP SYMLINK OPTIONS_DEFAULT= FFMPEG RTMPDUMP SYMLINK OPTIONS_SUB= yes FFMPEG_RUN_DEPENDS= ffprobe:multimedia/ffmpeg RTMPDUMP_DESC= Use rtmpdump to download rtmp video streams RTMPDUMP_RUN_DEPENDS= rtmpdump:multimedia/rtmpdump SYMLINK_DESC= Install youtube-dl symbolic link for executable SYMLINK_CONFLICTS= youtube_dl post-install-SYMLINK-on: @${RLN} ${STAGEDIR}${PREFIX}/bin/yt-dlp ${STAGEDIR}${PREFIX}/bin/youtube-dl .include diff --git a/www/yt-dlp/files/patch-yt__dlp_update.py b/www/yt-dlp/files/patch-yt__dlp_update.py index 605de73d672c..964f4d186e10 100644 --- a/www/yt-dlp/files/patch-yt__dlp_update.py +++ b/www/yt-dlp/files/patch-yt__dlp_update.py @@ -1,13 +1,22 @@ - this patch prevents -U from updating yt-dlp - it makes it "unrecognized" ---- yt_dlp/update.py.orig 2022-06-22 01:54:04 UTC +--- yt_dlp/update.py.orig 2022-07-18 00:03:50 UTC +++ yt_dlp/update.py -@@ -29,7 +29,7 @@ def _get_variant_and_executable_path(): +@@ -39,7 +39,7 @@ def _get_variant_and_executable_path(): path = os.path.dirname(__file__) if isinstance(__loader__, zipimporter): - return 'zip', os.path.join(path, '..') + return 'unknown', os.path.join(path, '..') elif (os.path.basename(sys.argv[0]) in ('__main__.py', '-m') and os.path.exists(os.path.join(path, '../.git/HEAD'))): return 'source', path +@@ -64,7 +64,7 @@ _NON_UPDATEABLE_REASONS = { + **{variant: f'Auto-update is not supported for unpackaged {name} executable; Re-download the latest release' + for variant, name in {'win32_dir': 'Windows', 'darwin_dir': 'MacOS', 'linux_dir': 'Linux'}.items()}, + 'source': 'You cannot update when running from source code; Use git to pull the latest changes', +- 'unknown': 'It looks like you installed yt-dlp with a package manager, pip or setup.py; Use that to update', ++ 'unknown': 'Please use the command \'pkg upgrade yt-dlp\' to upgrade.', + 'other': 'It looks like you are using an unofficial build of yt-dlp; Build the executable again', + } +