Skip to content

Commit

Permalink
Ports that depend on youtube-dl: Depend on yt-dlp
Browse files Browse the repository at this point in the history
yt-dlp [1] is a youtube-dl fork with additional features and fixes.  For
ports that depend on www/youtube-dl switch the dependency to www/yt-dlp.
For ports that have an optional dependency on www/youtube-dl, create a
new OPTIONS_RADIO that includes www/yt-dlp and make it the default.

[1] https://github.com/yt-dlp/yt-dlp

Other changes:
- www/yt-dlp: Turn the symlink option on by default
- www/py-pafy: Fix build when depending on www/yt-dlp

PR:		259944
Reported by:	Oleh Vinichenko <moonlapse81@gmail.com>
Reviewed by:	diizzy, Oleh Vinichenko <moonlapse81@gmail.com>,
		VVD <vvd@unislabs.com>
Approved by:	0mp, adridg (kde@), rm, tcberner (multimedia@),
		yuri (maintainers)
		acm and nivit (maintainers, timeout)
Differential Revision:	https://reviews.freebsd.org/D33090
  • Loading branch information
Jehops committed Dec 6, 2021
1 parent 47fbf5a commit 80e4e82
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 22 deletions.
3 changes: 2 additions & 1 deletion multimedia/gpodder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

PORTNAME= gpodder
DISTVERSION= 3.10.17
PORTREVISION= 1
CATEGORIES= multimedia python

MAINTAINER= rm@FreeBSD.org
Expand All @@ -18,7 +19,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}podcastparser>=0.6.0:devel/py-podcastparser@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mutagen>=0:audio/py-mutagen@${PY_FLAVOR} \
youtube_dl>0:www/youtube_dl \
yt-dlp:www/yt-dlp \
${PYTHON_PKGNAMEPREFIX}eyed3>=0:audio/py-eyed3@${PY_FLAVOR}

USES= gettext gmake gnome python:3.5+ shebangfix
Expand Down
3 changes: 2 additions & 1 deletion multimedia/haruna/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= haruna
DISTVERSION= 0.7.3
PORTREVISION= 1
MASTER_SITES= KDE/stable/${PORTNAME}/
CATEGORIES= multimedia kde

Expand All @@ -8,7 +9,7 @@ COMMENT= KDE video player

LIB_DEPENDS= libmpv.so:multimedia/mpv
RUN_DEPENDS= kio-extras>0:devel/kio-extras \
youtube-dl:www/youtube_dl
yt-dlp:www/yt-dlp

USES= cmake compiler:c++11-lang kde:5 qt:5 tar:xz
USE_KDE= auth bookmarks codecs completion config configwidgets coreaddons \
Expand Down
8 changes: 5 additions & 3 deletions multimedia/lives/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= lives
DISTVERSION= 3.2.0
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= multimedia
MASTER_SITES= http://lives-video.com/releases/
DISTNAME= LiVES-${PORTVERSION}
Expand Down Expand Up @@ -60,10 +60,10 @@ OPTIONS_GROUP_RUNTIME= CDDA2WAV GHOSTSCRIPT LAME MATROSKA MENCODER OGG123 OGM \
OPTIONS_GROUP_EXT_WIN_CAPTURE= WMCTRL XDOTOOL
OPTIONS_GROUP_MP3= MPG123 MPG321
OPTIONS_GROUP_MPLAYERS= MPLAYER MPV
OPTIONS_GROUP_YOUTUBE_DLX= YOUTUBE_DL YOUTUBE_DLC
OPTIONS_RADIO_YOUTUBE_DLX= YOUTUBE_DL YOUTUBE_DLC YTDLP
OPTIONS_DEFAULT= CDDA2WAV DOCS DV FFTW GHOSTSCRIPT IMAGEMAGICK JACK LAME \
MPG123 MPLAYER NLS OGG OGG123 OGM OPENCV SCHROEDINGER \
THEORA X264 XDG_SCREENSAVER XDOTOOL XWININFO YOUTUBE_DL
THEORA X264 XDG_SCREENSAVER XDOTOOL XWININFO YTDLP
OPTIONS_SUB= yes

ALSA_CONFIGURE_OFF= --disable-alsa
Expand Down Expand Up @@ -136,6 +136,8 @@ WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \
libwayland-cursor.so:graphics/wayland
WMCTRL_DESC= Install wmctrl
WMCTRL_RUN_DEPENDS= wmctrl:x11/wmctrl
YTDLP_DESC= Install yt-dlp (youtube-dl fork) - requires SYMLINK option
YTDLP_RUN_DEPENDS= yt-dlp:www/yt-dlp
YOUTUBE_DL_DESC= Install youtube-dl
YOUTUBE_DL_RUN_DEPENDS= youtube-dl:www/youtube_dl
YOUTUBE_DLC_DESC= Install youtube-dlc
Expand Down
11 changes: 8 additions & 3 deletions multimedia/mpv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PORTNAME= mpv
DISTVERSIONPREFIX= v
DISTVERSION= 0.34.0
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= multimedia audio
MASTER_SITES= https://waf.io/:waf
Expand Down Expand Up @@ -47,11 +47,13 @@ CONFIGURE_ARGS= --docdir="${EXAMPLESDIR}" \

OPTIONS_DEFINE= ARCHIVE DOCS LCMS2 LUAJIT MANPAGES MUJS TEST UCHARDET EXAMPLES ZIMG
OPTIONS_DEFAULT= ARCHIVE DVDNAV MANPAGES OPENGL UCHARDET \
V4L VAAPI VDPAU VULKAN WAYLAND X11 YTDL
V4L VAAPI VDPAU VULKAN WAYLAND X11 YTDLP
OPTIONS_GROUP= IN VO AO
OPTIONS_GROUP_IN= CDIO DVDNAV LIBBLURAY V4L YTDL
OPTIONS_GROUP_IN= CDIO DVDNAV LIBBLURAY V4L
OPTIONS_GROUP_VO= CACA OPENGL SIXEL VAAPI VDPAU VULKAN WAYLAND X11
OPTIONS_GROUP_AO= ALSA JACK OPENAL PULSEAUDIO SDL
OPTIONS_RADIO= YOUTUBE
OPTIONS_RADIO_YOUTUBE= YTDL YTDLP
OPTIONS_SUB= yes

DVDNAV_DESC= DVD menu navigation
Expand All @@ -60,6 +62,7 @@ MUJS_DESC= Use MuJS for Javascript language support
SIXEL_DESC= Sixel graphics support
UCHARDET_DESC= Guess subtitle encoding via uchardet
VULKAN_DESC= Vulkan output support
YTDLP_DESC= Install yt-dlp (youtube-dl fork)
YTDL_DESC= Install youtube-dl
ZIMG_DESC= High quality software scaling via "z" library
IN_DESC= Input
Expand Down Expand Up @@ -157,6 +160,8 @@ X11_USES= gnome xorg
X11_USE= XORG=x11,xext,xinerama,xorgproto,xrandr,xscrnsaver,xv,xxf86vm
X11_CONFIGURE_OFF= --disable-x11

YTDLP_RUN_DEPENDS= yt-dlp:www/yt-dlp

YTDL_RUN_DEPENDS= youtube-dl:www/youtube_dl

ZIMG_LIB_DEPENDS= libzimg.so:graphics/sekrit-twc-zimg
Expand Down
3 changes: 2 additions & 1 deletion multimedia/smtube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

PORTNAME= smtube
DISTVERSION= 21.10.0
PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= SF/smtube/SMTube/${PORTVERSION}/

Expand All @@ -11,7 +12,7 @@ COMMENT= SMPlayer YouTube browser
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/Copying.txt

RUN_DEPENDS= youtube-dl:www/youtube_dl
RUN_DEPENDS= yt-dlp:www/yt-dlp

USES= gl gmake qt:5 tar:bzip2
USE_GL= gl
Expand Down
3 changes: 2 additions & 1 deletion multimedia/ytfzf/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PORTNAME= ytfzf
DISTVERSIONPREFIX= v
DISTVERSION= 1.2.0
PORTREVISION= 1
CATEGORIES= multimedia

MAINTAINER= 0mp@FreeBSD.org
Expand All @@ -16,7 +17,7 @@ RUN_DEPENDS= curl:ftp/curl \
notify-send:devel/libnotify \
shuf:sysutils/shuf \
ueberzug:graphics/py-ueberzug@${PY_FLAVOR} \
youtube-dl:www/youtube_dl
yt-dlp:www/yt-dlp

USES= python
USE_GITHUB= yes
Expand Down
4 changes: 2 additions & 2 deletions net-p2p/awgg/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= awgg
PORTVERSION= 0.6.0
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net-p2p
PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX}

Expand All @@ -12,7 +12,7 @@ LICENSE= GPLv2
RUN_DEPENDS= aria2c:www/aria2 \
wget:ftp/wget \
curl:ftp/curl \
youtube-dl:www/youtube_dl \
yt-dlp:www/yt-dlp \
axel:ftp/axel

gtk2_CONFLICTS_INSTALL= ${PORTNAME}-qt5
Expand Down
6 changes: 3 additions & 3 deletions www/py-pafy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= pafy
PORTVERSION= 0.5.5
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -13,8 +13,8 @@ COMMENT= Python API for YouTube
LICENSE= GPLv3

# At the moment the internal backend does not work
BUILD_DEPENDS= youtube_dl>=2016.02.22:www/youtube_dl
RUN_DEPENDS= youtube_dl>=2016.02.22:www/youtube_dl
BUILD_DEPENDS= yt-dlp:www/yt-dlp
RUN_DEPENDS= yt-dlp:www/yt-dlp

USES= python:3.6+
USE_PYTHON= autoplist concurrent distutils
Expand Down
8 changes: 5 additions & 3 deletions www/py-pafy/files/patch-pafy_backend__youtube__dl.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
--- pafy/backend_youtube_dl.py.orig 2018-02-11 21:15:57 UTC
--- pafy/backend_youtube_dl.py.orig 2019-11-20 14:42:31 UTC
+++ pafy/backend_youtube_dl.py
@@ -8,6 +8,9 @@ if sys.version_info[:2] >= (3, 0):
@@ -10,7 +10,10 @@ if sys.version_info[:2] >= (3, 0):
else:
uni = unicode

-import youtube_dl
+if sys.platform.startswith('freebsd'):
+ # FreeBSD installs youtube_dl as a zip archive
+ sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl')
import youtube_dl
+import yt_dlp

from . import g
from .backend_shared import BasePafy, BaseStream, remux, get_status_string, get_size_done
8 changes: 5 additions & 3 deletions www/py-pafy/files/patch-pafy_pafy.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
--- pafy/pafy.py.orig 2018-02-11 21:15:57 UTC
--- pafy/pafy.py.orig 2019-11-20 14:42:31 UTC
+++ pafy/pafy.py
@@ -45,6 +45,9 @@ Pafy = None
@@ -45,7 +45,10 @@ Pafy = None
backend = "internal"
if os.environ.get("PAFY_BACKEND") != "internal":
try:
- import youtube_dl
+ if sys.platform.startswith('freebsd'):
+ # FreeBSD installs youtube_dl as a zip archive
+ sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl')
import youtube_dl
+ import yt_dlp
backend = "youtube-dl"
except ImportError:
raise ImportError(
2 changes: 1 addition & 1 deletion www/yt-dlp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MAKE_ARGS= PYTHON=${PYTHON_CMD}
NO_ARCH= yes

OPTIONS_DEFINE= FFMPEG RTMPDUMP SYMLINK
OPTIONS_DEFAULT= FFMPEG RTMPDUMP
OPTIONS_DEFAULT= FFMPEG RTMPDUMP SYMLINK
OPTIONS_SUB= yes

FFMPEG_RUN_DEPENDS= ffprobe:multimedia/ffmpeg
Expand Down

0 comments on commit 80e4e82

Please sign in to comment.